/* ---------- Tokens ---------- */
:root {
  --bg: #f3efe6;
  --surface: #fffdf8;
  --surface-2: #ebe4d4;
  --text: #17150f;
  --muted: #6a6457;
  --line: #d8cfbb;
  --accent: #d90f1f;
  --accent-hover: #b80a18;
  --accent-ink: #ffffff;
  --hl: #f5c542;
  --hl-ink: #17150f;
  --ok: #0d8a4b;
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.04), 0 12px 32px -18px rgba(40, 30, 10, 0.35);
  --radius: 14px;
  --font: 'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0b0b0c;
    --surface: #141416;
    --surface-2: #1e1e21;
    --text: #f2efe8;
    --muted: #9c978c;
    --line: #2b2b2f;
    --accent: #ff2b2b;
    --accent-hover: #ff4d4d;
    --accent-ink: #ffffff;
    --hl: #f5c542;
    --hl-ink: #17150f;
    --ok: #2fd27f;
    --shadow: 0 1px 0 rgba(255, 255, 255, 0.03), 0 18px 40px -20px rgba(0, 0, 0, 0.8);
    color-scheme: dark;
  }
}

:root[data-theme='dark'] {
  --bg: #0b0b0c;
  --surface: #141416;
  --surface-2: #1e1e21;
  --text: #f2efe8;
  --muted: #9c978c;
  --line: #2b2b2f;
  --accent: #ff2b2b;
  --accent-hover: #ff4d4d;
  --accent-ink: #ffffff;
  --hl: #f5c542;
  --hl-ink: #17150f;
  --ok: #2fd27f;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03), 0 18px 40px -20px rgba(0, 0, 0, 0.8);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
  transition: background-color 0.25s ease, color 0.25s ease;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--hl);
  outline-offset: 2px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

.mono {
  font-family: var(--mono);
  letter-spacing: 0.02em;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.875rem;
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 100;
  background: var(--hl);
  color: var(--hl-ink);
  padding: 8px 12px;
}

.skip:focus {
  left: 8px;
}

/* ---------- Ticker ---------- */
.ticker {
  display: flex;
  align-items: stretch;
  background: #111113;
  color: #f2efe8;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.8rem;
  height: 34px;
  overflow: hidden;
}

.ticker__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.ticker__viewport {
  flex: 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}

.ticker__track {
  display: inline-flex;
  gap: 48px;
  white-space: nowrap;
  padding-left: 100%;
  animation: ticker 40s linear infinite;
}

.ticker__track.is-static {
  padding-left: 16px;
  animation: none;
}

.ticker__item b {
  color: var(--hl);
}

@keyframes ticker {
  to {
    transform: translateX(-100%);
  }
}

.rec-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
  animation: blink 1.2s steps(2, start) infinite;
}

.live .rec-dot,
.screen__bar .rec-dot {
  background: var(--accent);
}

@keyframes blink {
  to {
    visibility: hidden;
  }
}

/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-width: 0;
}

.brand__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 2px solid var(--accent);
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand__text strong {
  font-size: 1.1rem;
  font-weight: 800;
  font-stretch: 85%;
}

.brand__text span {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.icon-btn:hover {
  background: var(--surface-2);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.i-moon {
  display: none;
}

:root[data-theme='dark'] .i-sun {
  display: none;
}

:root[data-theme='dark'] .i-moon {
  display: block;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .i-sun {
    display: none;
  }

  :root:not([data-theme='light']) .i-moon {
    display: block;
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.btn--yt {
  background: var(--text);
  color: var(--bg);
}

.btn--yt svg {
  fill: var(--accent);
}

.btn--yt:hover {
  opacity: 0.88;
}

.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 10px 24px -12px var(--accent);
}

.btn--primary:hover {
  background: var(--accent-hover);
}

.btn--primary:disabled {
  opacity: 0.6;
  cursor: wait;
}

.btn--ghost {
  background: transparent;
  border-color: var(--line);
}

.btn--ghost:hover {
  background: var(--surface-2);
}

.btn--lg {
  padding: 14px 24px;
  font-size: 1.05rem;
}

.btn--block {
  width: 100%;
}

/* ---------- Hero ---------- */
.hero {
  padding: 56px 0 40px;
  background:
    repeating-linear-gradient(0deg, transparent 0 3px, color-mix(in srgb, var(--text) 3%, transparent) 3px 4px);
  border-bottom: 1px solid var(--line);
}

.kicker {
  font-family: var(--mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 0 0 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.stamp {
  display: inline-block;
  border: 2px solid var(--accent);
  color: var(--accent);
  padding: 2px 8px;
  font-weight: 600;
  transform: rotate(-3deg);
  border-radius: 4px;
}

.hero__title {
  font-size: clamp(2.1rem, 6.4vw, 4.4rem);
  line-height: 1.02;
  font-weight: 900;
  font-stretch: 78%;
  letter-spacing: -0.01em;
  margin: 0 0 20px;
  max-width: 16ch;
  text-wrap: balance;
}

.hl {
  background: linear-gradient(transparent 12%, var(--hl) 12%, var(--hl) 88%, transparent 88%);
  color: var(--hl-ink);
  padding: 0 0.12em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.hero__lead {
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  max-width: 60ch;
  color: var(--muted);
  margin: 0 0 28px;
}

.redact {
  background: var(--text);
  color: transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: color 0.3s ease, background 0.3s ease;
  user-select: none;
}

.redact:hover,
.redact:focus,
.redact.is-open {
  background: color-mix(in srgb, var(--hl) 45%, transparent);
  color: var(--text);
}

/* Goal timeline */
.hero__grid {
  display: grid;
  gap: 28px;
  align-items: center;
}

@media (min-width: 900px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 48px;
  }
}

.hero__side {
  display: grid;
  gap: 14px;
}

.spotlight {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border-radius: var(--radius);
  background: #17150f;
  color: #f2efe8;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.spotlight::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 12% 50%, color-mix(in srgb, var(--hl) 28%, transparent), transparent 55%);
  pointer-events: none;
}

.spotlight__icon {
  font-size: 2rem;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.spotlight__body {
  display: grid;
  min-width: 0;
}

.spotlight__role {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: var(--hl);
}

.spotlight__name {
  font-size: 1.35rem;
  font-weight: 900;
  font-stretch: 82%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spotlight .muted {
  color: #b9b4a8;
}

.goal {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.goal__head,
.goal__foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.goal__label {
  font-weight: 700;
}

.goal__numbers {
  color: var(--muted);
}

.goal__numbers strong {
  color: var(--text);
  font-size: 1.2rem;
}

.goal__foot {
  color: var(--muted);
  font-size: 0.8rem;
}

.timeline {
  position: relative;
  height: 22px;
  margin: 10px 0 8px;
  background: var(--surface-2);
  border-radius: 4px;
  overflow: hidden;
}

.timeline__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 70%, var(--hl)));
  transition: width 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.timeline__fill::after {
  content: '';
  position: absolute;
  right: -1px;
  top: -4px;
  bottom: -4px;
  width: 3px;
  background: var(--hl);
  box-shadow: 0 0 10px var(--hl);
}

.timeline__ticks {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 1px), color-mix(in srgb, var(--text) 18%, transparent) calc(10% - 1px) 10%);
}

/* ---------- Layout ---------- */
.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  padding-top: 32px;
  padding-bottom: 32px;
}

@media (min-width: 900px) {
  .grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    align-items: start;
    gap: 28px;
  }

  .stack {
    position: sticky;
    top: 84px;
  }
}

.stack {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  min-width: 0;
}

.card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.card__title {
  font-size: 1.45rem;
  font-weight: 800;
  font-stretch: 85%;
  margin: 0;
  line-height: 1.15;
}

.section-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 900;
  font-stretch: 80%;
  line-height: 1.05;
  margin: 0 0 12px;
}

.pill {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  white-space: nowrap;
}

.live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--muted);
}

/* ---------- Dossier form ---------- */
.dossier {
  position: relative;
  margin-top: 18px;
  border-top: 4px solid var(--accent);
}

.dossier__tab {
  position: absolute;
  top: -30px;
  left: 18px;
  font-size: 0.7rem;
  padding: 5px 12px 6px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 8px 8px 0 0;
}

.field {
  border: 0;
  padding: 0;
  margin: 18px 0 0;
  min-width: 0;
}

.label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 8px;
  padding: 0;
}

input:not([type='radio']):not([type='checkbox']),
textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 1rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:not([type='radio']):not([type='checkbox']):focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}

textarea {
  resize: vertical;
  min-height: 84px;
}

.hint {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 6px;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 0.88rem;
  color: var(--muted);
  cursor: pointer;
}

.check input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.tiers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (min-width: 520px) {
  .tiers {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.tier,
.chip {
  position: relative;
  cursor: pointer;
}

.tier input,
.chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tier__body {
  display: grid;
  gap: 2px;
  padding: 12px;
  height: 100%;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.tier:hover .tier__body {
  transform: translateY(-2px);
}

.tier__icon {
  font-size: 1.4rem;
}

.tier__name {
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.2;
}

.tier__amt {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
}

.tier input:checked + .tier__body {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  box-shadow: inset 0 0 0 1px var(--accent);
}

.tier input:focus-visible + .tier__body,
.chip input:focus-visible + span {
  outline: 3px solid var(--hl);
  outline-offset: 2px;
}

.money {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  overflow: hidden;
}

.money:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}

.money__prefix {
  padding: 0 4px 0 14px;
  font-weight: 700;
  color: var(--muted);
}

.money #customAmount {
  border: 0;
  box-shadow: none;
  font-family: var(--mono);
  font-size: 1.15rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip span {
  display: inline-block;
  padding: 8px 14px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  background: var(--bg);
  transition: all 0.15s ease;
}

.chip input:checked + span {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.summary {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 22px 0 12px;
  padding: 14px 0 0;
  border-top: 1px dashed var(--line);
}

.summary strong {
  font-family: var(--mono);
  font-size: 1.5rem;
}

.form-error {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
}

.fine {
  margin: 12px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
  text-align: center;
}

/* ---------- Tabs / board ---------- */
.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--surface-2);
  border-radius: 999px;
  margin-bottom: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tab {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}

.tab[aria-selected='true'] {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.board,
.log {
  list-style: none;
  margin: 0;
  padding: 0;
}

.board li {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--line);
  animation: rise 0.35s ease both;
}

.board li:last-child,
.log li:last-child {
  border-bottom: 0;
}

.rank {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-family: var(--mono);
  font-weight: 600;
  background: var(--surface-2);
  font-size: 0.85rem;
}

.board li:nth-child(1) .rank {
  background: var(--hl);
  color: var(--hl-ink);
}

.board li:nth-child(2) .rank {
  background: #c9ccd2;
  color: #17150f;
}

.board li:nth-child(3) .rank {
  background: #d9a066;
  color: #17150f;
}

.who {
  min-width: 0;
}

.who__name {
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}

.who__meta {
  font-size: 0.78rem;
  color: var(--muted);
}

.amt {
  font-family: var(--mono);
  font-weight: 600;
  white-space: nowrap;
}

.empty {
  padding: 18px 4px;
  color: var(--muted);
  text-align: center;
  font-size: 0.92rem;
}

.log {
  max-height: 420px;
  overflow-y: auto;
}

.log li {
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
  animation: rise 0.35s ease both;
}

.log__top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.log__msg {
  margin: 6px 0 0;
  padding: 8px 10px;
  background: var(--bg);
  border-left: 3px solid var(--hl);
  border-radius: 0 8px 8px 0;
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.68rem;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--muted);
  margin-left: 6px;
  vertical-align: middle;
}

.tag--request {
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  color: var(--accent);
}

.tag--shoutout {
  background: color-mix(in srgb, var(--hl) 35%, transparent);
  color: var(--text);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

/* ---------- Credits ---------- */
.credits-section {
  padding: 48px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.credits-grid {
  display: grid;
  gap: 28px;
  align-items: center;
}

@media (min-width: 900px) {
  .credits-grid {
    grid-template-columns: 1fr 1fr;
    gap: 48px;
  }
}

.perks {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  display: grid;
  gap: 14px;
}

.perks li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.perks li > span {
  font-size: 1.4rem;
  line-height: 1.2;
}

.screen {
  background: #050506;
  color: #f2efe8;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid #2b2b2f;
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.8);
}

.screen__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: 0.75rem;
  color: #9c978c;
  border-bottom: 1px solid #1e1e21;
}

.screen__bar span:last-child {
  margin-left: auto;
}

.screen__viewport {
  position: relative;
  height: 300px;
  overflow: hidden;
  mask-image: linear-gradient(transparent, #000 18%, #000 82%, transparent);
}

.credits {
  position: absolute;
  inset: 0 0 auto;
  text-align: center;
  padding: 300px 16px 0;
  animation: roll 22s linear infinite;
}

.credits__role {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #9c978c;
  margin: 26px 0 6px;
}

.credits__name {
  font-size: 1.25rem;
  font-weight: 800;
  font-stretch: 85%;
  margin: 2px 0;
}

.credits__name small {
  display: block;
  font-family: var(--mono);
  font-weight: 400;
  font-size: 0.72rem;
  color: #f5c542;
}

@keyframes roll {
  to {
    transform: translateY(-100%);
  }
}

/* ---------- Videos ---------- */
.videos-section {
  padding-top: 40px;
  padding-bottom: 48px;
}

.videos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 18px;
}

.video {
  text-decoration: none;
  display: grid;
  gap: 8px;
}

.video__thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-2);
}

.video__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.video:hover .video__thumb img {
  transform: scale(1.04);
}

.video__title {
  font-weight: 700;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video__meta {
  font-size: 0.8rem;
  color: var(--muted);
}

.link {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
}

.footer p {
  margin: 4px 0;
}

/* ---------- Modal ---------- */
.modal {
  width: min(440px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.6);
}

.modal::backdrop {
  background: rgba(5, 5, 6, 0.72);
  backdrop-filter: blur(4px);
}

.modal[open] {
  animation: pop 0.25s ease;
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
}

.modal__inner {
  position: relative;
  padding: 24px 20px 20px;
  text-align: center;
}

.modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
}

.modal .kicker {
  justify-content: center;
  margin-bottom: 6px;
}

.qr {
  position: relative;
  width: min(260px, 100%);
  margin: 18px auto 14px;
  padding: 12px;
  background: #fff;
  border-radius: 16px;
}

.qr img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  image-rendering: pixelated;
}

.qr__corner {
  position: absolute;
  width: 26px;
  height: 26px;
  border: 4px solid var(--accent);
}

.qr__corner--tl { top: -6px; left: -6px; border-right: 0; border-bottom: 0; border-radius: 10px 0 0 0; }
.qr__corner--tr { top: -6px; right: -6px; border-left: 0; border-bottom: 0; border-radius: 0 10px 0 0; }
.qr__corner--bl { bottom: -6px; left: -6px; border-right: 0; border-top: 0; border-radius: 0 0 0 10px; }
.qr__corner--br { bottom: -6px; right: -6px; border-left: 0; border-top: 0; border-radius: 0 0 10px 0; }

.qr__scan {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 2px;
  top: 12px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  animation: scan 2.4s ease-in-out infinite alternate;
  opacity: 0.7;
}

@keyframes scan {
  to {
    top: calc(100% - 14px);
  }
}

.pay__amount {
  display: grid;
  gap: 2px;
  justify-items: center;
}

.amount-copy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 1.9rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 8px;
}

.amount-copy:hover {
  background: var(--surface-2);
}

.amount-copy svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
}

.amount-copy .suffix {
  background: var(--hl);
  color: var(--hl-ink);
  border-radius: 4px;
  padding: 0 2px;
}

.pay__status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 14px 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-2);
  font-weight: 600;
  font-size: 0.92rem;
}

.countdown {
  margin-left: auto;
  color: var(--accent);
}

.spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.pay__actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 8px;
}

.thanks {
  padding-top: 8px;
}

.thanks__stamp {
  display: inline-block;
  margin: 12px 0 16px;
  padding: 6px 18px;
  border: 4px double var(--ok);
  color: var(--ok);
  font-family: var(--mono);
  font-weight: 600;
  font-size: 1.6rem;
  letter-spacing: 0.2em;
  border-radius: 8px;
  transform: rotate(-8deg);
  animation: stamp 0.45s cubic-bezier(0.2, 1.6, 0.4, 1) both;
}

@keyframes stamp {
  from {
    opacity: 0;
    transform: rotate(-8deg) scale(2.4);
  }
}

.thanks__msg {
  font-size: 1.05rem;
  margin: 10px 0 14px;
}

.badge-big {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface-2);
  font-weight: 700;
  margin-bottom: 12px;
}

#confetti {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1000;
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .ticker__track {
    padding-left: 16px;
  }

  .credits {
    position: static;
    padding-top: 16px;
  }

  .screen__viewport {
    overflow-y: auto;
  }
}
