:root {
  color-scheme: dark;
  --bg: #000000;
  --panel: #050505;
  --panel-raised: #0b0b0b;
  --ink: #ffffff;
  --muted: #b8b8b8;
  --line: #2a2a2a;
  --line-strong: #ffffff;
  --green: #8bff58;
  --green-deep: #55c62f;
  --danger: #ff4a4a;
  --warning: #ffd75c;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.46);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(139, 255, 88, 0.08), transparent 210px),
    var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: relative;
  display: flex;
  width: min(1160px, calc(100% - 32px));
  min-height: 112px;
  margin: 0 auto;
  align-items: center;
  justify-content: center;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.brand-mark img {
  display: block;
  width: clamp(126px, 15vw, 190px);
  height: auto;
}

.live-stack {
  position: absolute;
  top: 34px;
  right: 0;
  display: flex;
  gap: 8px;
  align-items: center;
}

.live-pill {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  background: #070707;
  color: var(--ink);
  text-decoration: none;
  text-transform: uppercase;
  font-family: "Arial Black", Arial, Helvetica, sans-serif;
  font-size: 0.75rem;
  font-weight: 900;
}

.stream-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.platform-name {
  display: inline-block;
}

.live-pill:hover,
.live-pill:focus-visible {
  border-color: var(--green);
  outline: none;
}

.live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 0 3px rgba(255, 74, 74, 0.18);
}

.live-pill[data-live="true"] .live-dot {
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(139, 255, 88, 0.2);
}

.live-pill[data-live="unknown"] .live-dot {
  background: var(--warning);
  box-shadow: 0 0 0 3px rgba(255, 215, 92, 0.2);
}

.page-shell {
  width: min(760px, calc(100% - 28px));
  min-height: calc(100vh - 112px);
  margin: 0 auto;
  padding: 10px 0 58px;
}

.checkout-panel {
  display: grid;
  min-width: 0;
  gap: 16px;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin: 0;
  color: var(--ink);
  font-family: "Arial Black", Arial, Helvetica, sans-serif;
  font-size: clamp(2.1rem, 7vw, 4.7rem);
  font-weight: 900;
  line-height: 0.94;
  text-transform: uppercase;
}

h2 {
  margin: 0;
  font-family: "Arial Black", Arial, Helvetica, sans-serif;
  font-size: 1rem;
  text-transform: uppercase;
}

.donation-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  width: 100%;
  max-width: 100%;
  min-width: 0;
  gap: 8px;
  overflow: visible;
  padding-bottom: 10px;
}

.tab-button,
.method-card,
.primary-button,
.preset-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #030303;
  color: var(--ink);
  text-transform: uppercase;
  font-family: "Arial Black", Arial, Helvetica, sans-serif;
  font-size: 0.86rem;
  font-weight: 900;
}

.tab-button {
  position: relative;
  display: inline-flex;
  min-width: 0;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  overflow: visible;
  padding: 0 10px;
  line-height: 1.1;
  white-space: normal;
}

.tab-button::after {
  position: absolute;
  left: 50%;
  bottom: -9px;
  width: 48%;
  max-width: 70px;
  height: 3px;
  border-radius: 999px;
  background: var(--green);
  content: "";
  opacity: 0;
  transform: translateX(-50%) scaleX(0.75);
  transition: opacity 140ms ease, transform 140ms ease;
}

.tab-button.is-active::after {
  opacity: 1;
  transform: translateX(-50%) scaleX(1);
}

.tab-icon {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  fill: currentColor;
}

.tab-image-icon {
  object-fit: contain;
}

.tab-button.is-active,
.method-card.is-active,
.preset-button.is-active,
.print-redeem-button.is-active {
  border-color: var(--green);
  background: var(--green);
  color: #000000;
}

.tab-button:hover,
.method-card:hover,
.preset-button:hover,
.print-redeem-button:hover {
  border-color: var(--green);
}

.tab-button[disabled],
.tab-button[disabled]:hover {
  border-color: rgba(255, 215, 92, 0.55);
  background: rgba(255, 215, 92, 0.08);
  color: var(--warning);
  cursor: not-allowed;
}

.tab-button[disabled]::after {
  display: none;
}

.donation-form,
.payment-section,
.setup-warning,
.payment-status {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.donation-form,
.payment-section {
  display: grid;
  min-width: 0;
  gap: 16px;
  padding: 20px;
}

.setup-warning,
.payment-status {
  min-height: 50px;
  padding: 13px 16px;
  display: flex;
  align-items: center;
  color: var(--muted);
  line-height: 1.35;
}

.setup-warning {
  border-color: var(--danger);
  color: var(--danger);
}

.payment-status {
  animation: alert-pop 160ms ease both;
  gap: 14px;
  background:
    linear-gradient(90deg, rgba(139, 255, 88, 0.16), transparent 60%),
    var(--panel);
}

.payment-status[data-kind="success"] {
  border-color: var(--green);
  color: var(--green);
  box-shadow: 0 0 28px rgba(139, 255, 88, 0.14), var(--shadow);
}

.payment-status[data-kind="error"] {
  border-color: var(--danger);
  color: var(--danger);
}

.payment-status[data-kind="notice"] {
  border-color: var(--warning);
  color: var(--warning);
}

.status-icon,
.status-end-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  color: var(--green);
}

.status-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--green);
  color: #000000;
}

.status-icon svg,
.status-end-icon svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

.status-copy {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
}

.status-title {
  color: var(--green);
  font-family: "Arial Black", Arial, Helvetica, sans-serif;
  font-size: 1.06rem;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-body {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  text-transform: none;
}

@keyframes alert-pop {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.payment-note,
.payment-helper span {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.45;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

legend,
.field-grid label > span:first-child,
.card-label > span:first-child {
  margin-bottom: 8px;
  display: block;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 900;
  text-transform: uppercase;
}

.money-control {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #000000;
}

.currency-symbol {
  display: grid;
  place-items: center;
  border-right: 1px solid var(--line);
}

.currency-symbol img {
  display: block;
  width: 28px;
  height: 28px;
  object-fit: contain;
}

input,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #000000;
  color: var(--ink);
  outline: none;
  padding: 11px 12px;
  font-weight: 800;
}

input {
  min-height: 54px;
}

textarea {
  min-height: 54px;
  overflow: hidden;
  resize: none;
}

input::placeholder,
textarea::placeholder {
  color: #7d7d7d;
}

input:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(139, 255, 88, 0.18);
}

.money-control input {
  height: 100%;
  border: 0;
  border-radius: 0;
  font-family: "Arial Black", Arial, Helvetica, sans-serif;
  font-size: 1.2rem;
}

.money-control input:focus {
  box-shadow: none;
}

.money-control input[readonly] {
  cursor: default;
}

.preset-row,
.print-redeem-row {
  display: grid;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  gap: 8px;
  margin-top: 10px;
  overflow: hidden;
}

.preset-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.print-redeem-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.preset-button,
.print-redeem-button {
  min-width: 0;
  min-height: 44px;
  overflow: hidden;
}

.print-redeem-button {
  display: grid;
  align-content: center;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #030303;
  color: var(--ink);
  font-family: "Arial Black", Arial, Helvetica, sans-serif;
  font-weight: 900;
  text-transform: uppercase;
}

.redeem-price {
  font-size: 1.05rem;
}

.redeem-label {
  color: var(--muted);
  font-size: 0.76rem;
}

.print-redeem-button.is-active .redeem-label {
  color: #000000;
}

.field-grid,
.payment-method-grid,
.card-row {
  display: grid;
  min-width: 0;
  gap: 10px;
}

.field-grid {
  grid-template-columns: 1fr 1fr;
}

.input-shell {
  display: grid;
  min-height: 58px;
  align-items: center;
  grid-template-columns: 38px minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #000000;
  padding: 0 12px;
}

.input-shell:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(139, 255, 88, 0.16);
}

.field-icon {
  width: 23px;
  height: 23px;
  fill: var(--green);
}

.input-shell input,
.input-shell textarea {
  min-height: 56px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
}

.input-shell textarea {
  display: block;
  padding-top: 17px;
  line-height: 1.35;
}

.input-shell input:focus,
.input-shell textarea:focus {
  box-shadow: none;
}

.field-note {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
}

.payment-method-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.method-card {
  min-height: 54px;
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  padding: 8px 13px;
  text-align: left;
}

.method-card[disabled] {
  cursor: not-allowed;
  opacity: 0.55;
}

.method-svg,
.paypal-wordmark {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--green);
  font-weight: 900;
}

.method-svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.paypal-wordmark {
  color: #009cde;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.78rem;
  font-style: italic;
  font-weight: 900;
  letter-spacing: -0.4px;
  text-transform: none;
}

.apple-wordmark {
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.88rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: none;
}

.payment-logo {
  display: block;
  flex: 0 0 auto;
  object-fit: contain;
}

.paypal-logo {
  width: 20px;
  height: 20px;
}

.google-pay-logo {
  width: 24px;
  height: 24px;
}

.apple-pay-logo {
  width: 24px;
  height: 24px;
  filter: invert(1);
}

.method-card.is-active .method-svg,
.method-card.is-active .paypal-wordmark,
.method-card.is-active .apple-wordmark {
  color: #000000;
}

.method-card.is-active .apple-pay-logo {
  filter: none;
}

.payment-panel {
  display: none;
}

.payment-panel.is-open {
  display: grid;
  animation: panel-open 180ms ease both;
}

@keyframes panel-open {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.payment-helper {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
}

.payment-helper strong {
  font-family: "Arial Black", Arial, Helvetica, sans-serif;
  text-transform: uppercase;
}

.paypal-slot {
  min-height: 44px;
}

paypal-button {
  --paypal-button-border-radius: 8px;
  display: block;
  width: 100%;
  min-height: 44px;
}

.card-form {
  display: grid;
  gap: 8px;
}

.card-row {
  grid-template-columns: 1fr 1fr;
}

.card-field {
  position: relative;
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #000000;
  padding: 0;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(139, 255, 88, 0.05);
}

.card-field::after {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  background:
    linear-gradient(#000000, #000000) top / 100% 13px no-repeat,
    linear-gradient(#000000, #000000) bottom / 100% 13px no-repeat,
    linear-gradient(#000000, #000000) left / 13px 100% no-repeat,
    linear-gradient(#000000, #000000) right / 13px 100% no-repeat;
  box-shadow: inset 0 0 0 1px var(--line);
  content: "";
  pointer-events: none;
}

.card-field:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(139, 255, 88, 0.16);
}

.card-field:focus-within::after {
  box-shadow: inset 0 0 0 1px var(--green);
}

.card-field iframe {
  display: block;
  width: 100%;
  min-height: 56px;
  border: 0 !important;
  background: #000000 !important;
}

.primary-button {
  min-height: 52px;
  border-color: var(--green);
  background: var(--green);
  color: #000000;
  box-shadow: 0 4px 0 var(--green-deep);
}

.primary-button:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--green-deep);
}

.wallet-stack {
  display: grid;
  gap: 10px;
}

#googlepay-container,
#applepay-container {
  width: 100%;
}

#googlepay-container > *,
#applepay-container > * {
  width: 100%;
}

#googlepay-container:empty,
#applepay-container:empty {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.86rem;
}

.wallet-message {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  place-items: center;
  padding: 0 12px;
  color: var(--muted);
  font-size: 0.86rem;
  text-align: center;
}

#card-button-fallback[hidden] {
  display: none;
}

#applepay-container[hidden] {
  display: none;
}

apple-pay-button {
  --apple-pay-button-width: 100%;
  --apple-pay-button-height: 44px;
  --apple-pay-button-border-radius: 8px;
  --apple-pay-button-padding: 0;
  --apple-pay-button-box-sizing: border-box;
  display: block;
  width: 100%;
  height: 44px;
}

@media (max-width: 760px) {
  .site-header {
    min-height: 128px;
    flex-direction: column;
    gap: 12px;
    padding: 18px 0 14px;
  }

  .live-stack {
    position: static;
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
  }

  .live-pill {
    min-height: 32px;
    gap: 5px;
    padding: 0 8px;
    font-size: 0.66rem;
  }

  .page-shell {
    width: 100%;
    padding: 4px 9px 58px;
  }

  .tab-button,
  .method-card,
  .primary-button,
  .preset-button,
  .print-redeem-button {
    font-size: 0.78rem;
  }

  .tab-button {
    gap: 4px;
    padding: 0 2px;
    font-size: 0.66rem;
  }

  .tab-icon {
    width: 14px;
    height: 14px;
  }

  .donation-tabs {
    gap: 4px;
  }

  .preset-row,
  .print-redeem-row {
    gap: 6px;
  }

  .tab-button,
  .method-card {
    justify-content: center;
    text-align: center;
  }

  .donation-form,
  .payment-section {
    padding: 15px;
  }

  .field-grid,
  .card-row {
    grid-template-columns: 1fr;
  }

  .payment-method-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .page-shell {
    width: min(100%, 390px);
  }
}

@media (max-width: 480px) {
  .tab-button {
    min-height: 42px;
    padding: 0 2px;
    font-size: 0.56rem;
  }

  .tab-icon {
    width: 13px;
    height: 13px;
  }

  .stream-logo {
    width: 16px;
    height: 16px;
  }

  .preset-button {
    min-height: 40px;
    padding: 0 4px;
    font-size: 0.68rem;
  }
}
