/* THE DROP — aligned to the clutch.game site design system
   (beta.clutch.game tokens: ink #05090E / panel #070B12, paper #EBEFF4,
   Clutch Red #FF154D + Clutch Blue #121B6C, hairline rgba(235,239,244,.x)
   borders, DM Sans display / DM Mono data, sharp corners everywhere.
   Kickers keep the small red bar ABOVE them — never a left keyline.) */

:root {
  --bg: #05090E;
  --bg-sunken: #04060A;
  --bg-raised: #070B12;
  --bg-card: #070B12;
  --bg-hover: #0B1119;
  --border-faint: rgba(235,239,244,.06);
  --border: rgba(235,239,244,.1);
  --border-strong: rgba(235,239,244,.2);
  --fg: #EBEFF4;
  --muted: #8A929C;
  --dim: #6B737D;
  --faint: #3C434D;
  --red: #FF154D;
  --red-soft: #FF4D7A;
  --red-hover: #E00F42; /* site CTA hover — darken, never lighten */
  --red-wash: rgba(255, 21, 77, .12);
  --red-glow: rgba(255, 21, 77, .35);
  --navy: #121B6C;          /* Clutch Blue — meta, daily, depth */
  --navy-soft: #8A96E0;
  --navy-wash: rgba(18, 27, 108, .35);
  --ok: #2EA96F;  /* site green #1F8A5B, lightened one step for dark-bg text */
  /* The clutch.game site runs square — everything gets 0. */
  --r-xs: 0;     /* buttons, inputs, chips, HUD pills */
  --r-sm: 0;     /* panels, cards, the knowledge/readout boxes */
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, .55);
  --display: 'DM Sans', system-ui, sans-serif;
  --sans: 'DM Sans', system-ui, sans-serif;
  --mono: 'DM Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
::selection { background: var(--red); color: #fff; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hot { color: var(--red); }
.up { color: var(--ok); }
.down { color: var(--red); }
b, strong { font-weight: 700; }

/* the house kicker: small red bar above letterspaced mono */
.kicker-bar::before {
  content: '';
  display: block;
  width: 26px; height: 3px;
  background: var(--red);
  margin-bottom: 8px;
}

/* ── stage ─────────────────────────────────────────────────────────── */
#stage { position: fixed; inset: 0; }
#scene { width: 100%; height: 100%; display: block; touch-action: manipulation; }

#wipe {
  position: fixed; inset: -10%; pointer-events: none; z-index: 40;
  background: linear-gradient(104deg, transparent 28%, rgba(18,27,108,.85) 42%, rgba(255,21,77,.9) 47%, #05090E 51%, rgba(5,9,14,.96) 55%, transparent 72%);
  transform: translateX(-130%);
  opacity: 0;
}
#wipe.go { animation: wipe .62s cubic-bezier(.7,0,.2,1); }
@keyframes wipe {
  0% { transform: translateX(-130%); opacity: 1; }
  100% { transform: translateX(130%); opacity: 1; }
}

/* ── HUD ───────────────────────────────────────────────────────────── */
#hud {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  /* 1fr · auto · 1fr → the middle column is TRUE-centred in the viewport,
     regardless of how wide the left (logo) and right (wind/score) blocks are */
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  height: 52px; padding: 0 18px;
  background: linear-gradient(180deg, rgba(5,9,14,.9), rgba(5,9,14,.45) 78%, transparent);
}
.hud-left { grid-column: 1; justify-self: start; display: flex; align-items: center; gap: 10px; min-width: 0; }
.hud-mark { width: 20px; height: 20px; }
.hud-title { font-weight: 800; font-size: 13.5px; letter-spacing: .05em; }
.hud-mode {
  font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: .1em;
  color: var(--navy-soft); background: var(--navy-wash); border: 1px solid rgba(90,104,200,.55);
  padding: 3px 8px; border-radius: var(--r-xs);
}
.hud-mid { grid-column: 2; justify-self: center; display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.hud-round { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .14em; }
.hud-sep { width: 1px; height: 14px; background: var(--border); }
.hud-venue { font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: .12em; color: var(--muted); }
.hud-right { grid-column: 3; justify-self: end; display: flex; align-items: center; gap: 16px; }
.hud-wind, .hud-score-wrap { display: flex; align-items: baseline; gap: 7px; font-family: var(--mono); }
.hud-wind b, .hud-score-wrap b { font-size: 8.5px; font-weight: 700; letter-spacing: .14em; color: var(--muted); }
.hud-wind span { font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; }
.hud-wind.hot span { color: var(--fg); }
.hud-wind .arr { color: var(--red); font-weight: 700; }
.hud-score { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 64px; text-align: right; display: inline-block; }
.onair { display: flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: .16em; color: var(--red); }
.onair i { width: 7px; height: 7px; border-radius: 50%; background: var(--red); animation: blink 1.6s infinite; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .25; } }

.mutebtn {
  font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: .12em;
  color: var(--muted); background: rgba(7,11,18,.8); border: 1px solid var(--border);
  padding: 6px 10px; border-radius: var(--r-xs);
}
.mutebtn.on, .mutebtn[aria-pressed="true"] { color: var(--fg); border-color: var(--border-strong); }
.mutebtn:hover { border-color: var(--red); color: var(--fg); }

/* ── announce (PERFECT / MISSED / NO DROP) ─────────────────────────── */
#announce {
  position: fixed; left: 50%; top: 30%; transform: translate(-50%, -50%) scale(.8);
  z-index: 35; pointer-events: none; opacity: 0;
  font-family: var(--display);
  font-weight: 800; font-size: clamp(30px, 5.2vw, 58px); letter-spacing: -.02em;
  text-shadow: 0 4px 34px rgba(4,6,10,.9);
  white-space: nowrap;
}
#announce[data-kind="miss"] { color: var(--fg); }
#announce.show { animation: pop 1.35s cubic-bezier(.2,1.4,.3,1) forwards; }
@keyframes pop {
  0% { opacity: 0; transform: translate(-50%,-50%) scale(.7); }
  12% { opacity: 1; transform: translate(-50%,-50%) scale(1.04); }
  20% { transform: translate(-50%,-50%) scale(1); }
  78% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%,-56%) scale(1); }
}

/* the 5K moment — huge, dead-centre, with a burst of light behind it */
#announce[data-kind="perfect"] {
  top: 50%;
  color: #fff;
  font-size: clamp(96px, 22vw, 300px);
  letter-spacing: -.04em;
  text-shadow: 0 0 60px var(--red), 0 0 130px var(--red-glow), 0 8px 40px rgba(4,6,10,.9);
}
#announce[data-kind="perfect"]::before {
  content: ''; position: absolute; left: 50%; top: 50%;
  width: 150vmax; height: 150vmax; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255,21,77,.28) 0%, rgba(255,21,77,.10) 22%, transparent 48%);
  z-index: -1;
}
#announce[data-kind="perfect"].show { animation: popBig 1.9s cubic-bezier(.15,1.5,.3,1) forwards; }
@keyframes popBig {
  0% { opacity: 0; transform: translate(-50%,-50%) scale(.35); }
  14% { opacity: 1; transform: translate(-50%,-50%) scale(1.12); }
  26% { transform: translate(-50%,-50%) scale(1); }
  40% { transform: translate(-50%,-50%) scale(1.04); }
  50% { transform: translate(-50%,-50%) scale(1); }
  84% { opacity: 1; transform: translate(-50%,-50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%,-52%) scale(1.05); }
}

/* ── 3 · 2 · 1 · GO! ──────────────────────────────────────────────── */
#countdown {
  position: fixed; left: 50%; top: 40%; transform: translate(-50%, -50%);
  z-index: 36; pointer-events: none; opacity: 0;
  font-family: var(--display); font-weight: 800;
  font-size: clamp(72px, 13vw, 150px); letter-spacing: -.03em;
  color: #fff; text-shadow: 0 6px 50px rgba(4,6,10,.9);
}
#countdown.go { color: var(--red); text-shadow: 0 0 60px var(--red-glow), 0 6px 40px rgba(4,6,10,.9); }
#countdown.show { animation: countIn .55s cubic-bezier(.2,1.5,.3,1) forwards; }
@keyframes countIn {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.45); }
  30% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
  45% { transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* ── flare coaching hint ───────────────────────────────────────────── */
#flarehint {
  position: fixed; left: 50%; bottom: 27%; transform: translateX(-50%);
  z-index: 33; pointer-events: none; opacity: 0;
  font-family: var(--mono); font-size: 10.5px; font-weight: 700; letter-spacing: .14em;
  color: var(--red-soft);
  background: rgba(5,9,14,.82); border: 1px solid var(--border);
  padding: 8px 14px; border-radius: var(--r-xs);
  white-space: nowrap;
}
#flarehint[data-kind="good"] { color: var(--ok); border-color: rgba(52,211,153,.4); }
#flarehint[data-kind="max"] { color: var(--red); border-color: rgba(255,21,77,.55); }
#flarehint[data-kind="zero"] { color: var(--muted); }
#flarehint.show { animation: hint 1.5s ease forwards; }
@keyframes hint {
  0% { opacity: 0; transform: translate(-50%, 6px); }
  12% { opacity: 1; transform: translate(-50%, 0); }
  80% { opacity: 1; }
  100% { opacity: 0; }
}

/* once a run ends (results / dinner up), never let a lingering card show */
body.run-over #lowerthird,
body.run-over #readout,
body.run-over #announce,
body.run-over #flarehint { display: none !important; }

/* ── landing readout ───────────────────────────────────────────────── */
#readout {
  position: fixed; z-index: 32; transform: translate(-50%, -100%); pointer-events: none;
  background: rgba(7,11,18,.94); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 12px 14px 10px; text-align: left; min-width: 158px;
  opacity: 0;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(6px);
}
#readout.show { animation: roIn .5s cubic-bezier(.2,1.2,.3,1) forwards; }
@keyframes roIn {
  from { opacity: 0; transform: translate(-50%, calc(-100% + 12px)); }
  to { opacity: 1; transform: translate(-50%, -100%); }
}
.ro-sub { font-family: var(--mono); font-size: 9px; font-weight: 500; letter-spacing: .12em; color: var(--muted); }
.ro-sub::before { content: ''; display: block; width: 18px; height: 3px; background: var(--red); margin-bottom: 7px; }
.ro-points { font-family: var(--display); font-weight: 800; font-size: 33px; line-height: 1.2; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ro-points.perfect { color: var(--red); }
.ro-chips { display: flex; gap: 6px; }
.ro-chips .chip {
  font-family: var(--mono); font-size: 8.5px; font-weight: 700; letter-spacing: .08em;
  padding: 2px 7px; border-radius: 0; background: var(--bg-hover); color: var(--muted);
}
.ro-chips .chip.flare { color: var(--ok); background: rgba(52,211,153,.12); }
.ro-chips .chip.flare.max { color: var(--red); background: var(--red-wash); }
.ro-hint { font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: .1em; color: var(--red); margin-top: 6px; }
.ro-ghost { font-family: var(--mono); font-size: 9.5px; color: var(--muted); margin-top: 6px; font-variant-numeric: tabular-nums; }

/* ── broadcast cards: boarding = top-centre bumper, facts = bottom-centre ── */
#lowerthird {
  position: fixed; z-index: 31;
  background: rgba(7,11,18,.95); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 13px 20px;
  opacity: 0; pointer-events: none;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(8px);
  text-align: center;
  max-width: min(600px, calc(100vw - 32px));
}
/* boarding = full-width departure-board banner, unlike any other card */
#lowerthird[data-kind="boarding"] {
  top: 52px; left: 0; right: 0; bottom: auto;
  transform: translateY(-14px);
  max-width: none; border-radius: 0;
  border: none; border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  background: linear-gradient(180deg, rgba(5,9,14,.95), rgba(7,11,18,.78));
  padding: 16px 20px 13px;
}
#lowerthird[data-kind="boarding"].show { animation: ltDown .45s cubic-bezier(.2,1.1,.3,1) forwards; }
@keyframes ltDown { to { transform: translateY(0); opacity: 1; } }
#lowerthird[data-kind="boarding"] .lt-kicker::before { display: none; }
.flap-row { display: flex; justify-content: center; align-items: center; gap: 4px; flex-wrap: wrap; margin: 7px 0 8px; perspective: 400px; }
.flap {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 27px; height: 36px; padding: 0 4px;
  background: linear-gradient(180deg, #131B26 0 49%, #0A1018 51% 100%);
  border: 1px solid var(--border-strong);
  font-family: var(--display); font-weight: 800; font-size: 23px; line-height: 1;
  animation: flapIn .34s cubic-bezier(.3,1.25,.4,1) backwards;
  animation-delay: calc(var(--i) * 26ms);
}
.flap::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(0,0,0,.45); }
@keyframes flapIn { from { transform: rotateX(85deg); opacity: 0; } }
.flap-gap { width: 12px; }
/* compact split-flap variant — used on the fact / no-drop info cards */
.flap-row.sm { gap: 3px; margin: 5px 0 8px; }
.flap.sm { min-width: 20px; height: 27px; padding: 0 2.5px; font-size: 16px; }
.flap-row.sm .flap-gap { width: 8px; }
/* fact / no-drop = the must-read cards → vertically CENTRED, the focal point.
   The landing is resolved by the time they show, so the middle is free; the
   score readout stays at the landing point (~77% down), clear of the centre. */
#lowerthird[data-kind="fact"], #lowerthird[data-kind="nodrop"] {
  top: 50%; left: 50%; bottom: auto;
  transform: translate(-50%, calc(-50% + 14px));
  /* explicit width — slightly less wide, and stops the flap row from
     collapsing the card on narrow screens */
  width: min(430px, calc(100vw - 24px)); max-width: none;
}
#lowerthird[data-kind="fact"].show, #lowerthird[data-kind="nodrop"].show { animation: ltCenter .45s cubic-bezier(.2,1.1,.3,1) forwards; }
@keyframes ltCenter { to { transform: translate(-50%, -50%); opacity: 1; } }
.lt-kicker { font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: .16em; color: var(--muted); margin-bottom: 5px; }
.lt-kicker::before { content: ''; display: block; width: 26px; height: 3px; background: var(--red); margin: 0 auto 8px; }
/* "NEXT ROUND" footer with a draining ticker bar — the countdown is now
   explicitly labelled so it can't be misread as this venue's intro */
.lt-next {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 11px;
  font-family: var(--mono); font-size: 8px; font-weight: 700; letter-spacing: .18em;
  color: var(--dim);
}
.lt-tick {
  height: 3px; width: 46px; flex-shrink: 0;
  background: var(--red);
  transform-origin: left center;
  animation: tickdown linear forwards;
  animation-duration: var(--tickms, 3000ms);
}
@keyframes tickdown { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.lt-kicker .hot { color: var(--red); }
.lt-kicker.hot { color: var(--red); }
.lt-title { font-family: var(--display); font-weight: 800; font-size: 25px; letter-spacing: -.02em; line-height: 1.05; }
.lt-meta { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 6px; font-family: var(--mono); font-size: 9.5px; font-weight: 500; letter-spacing: .1em; color: var(--muted); flex-wrap: wrap; }
.lt-meta .sep { width: 1px; height: 10px; background: var(--border); }
.lt-meta .time { color: var(--navy-soft); }
.lt-meta .approach { color: var(--red-soft); font-weight: 700; }
.lt-meta .wind { color: var(--fg); }
.lt-fact { font-size: 14.5px; font-weight: 500; line-height: 1.45; color: var(--fg); max-width: 42ch; margin: 0 auto; }

/* ── reduced-motion bars ───────────────────────────────────────────── */
#bars { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 33; width: min(560px, calc(100vw - 40px)); }
.bar { background: rgba(7,11,18,.95); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 12px 16px 16px; box-shadow: var(--shadow-lg); }
.bar + .bar { margin-top: 10px; }
.bar-hint { font-family: var(--mono); font-size: 9.5px; font-weight: 700; letter-spacing: .12em; color: var(--muted); margin-bottom: 10px; }
.bar-track { position: relative; height: 14px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-xs); }
.bar-marker { position: absolute; top: -4px; bottom: -4px; width: 3px; background: var(--fg); transform: translateX(-50%); }
.bar-target { position: absolute; top: -7px; width: 2px; height: 7px; background: var(--red); transform: translateX(-50%); }
.bar-target::after { content: ''; position: absolute; top: 7px; left: -5px; border: 6px solid transparent; border-top-color: var(--red); border-width: 5px 6px 0; }
.bar-zone { position: absolute; top: 0; bottom: 0; }
.bar-zone.good { left: 46.4%; width: 31.2%; background: rgba(52,211,153,.16); }
.bar-zone.perfect { left: 59.3%; width: 5.4%; background: rgba(255,21,77,.38); }
/* deploy bar: marker sweeps altitude 1.0 → the deck; stop low for the bonus.
   good band alt .58→.33 (deployPos .60→.957), full +200 alt .33→.30 (.957→1.0) */
.bar-zone.dgood { left: 60%; width: 35.7%; background: rgba(52,211,153,.10); }
.bar-zone.dperfect { left: 95.7%; width: 4.3%; background: rgba(52,211,153,.28); }

/* ── overlays: shared ──────────────────────────────────────────────── */
#intro, #results, #dinner, #board {
  position: fixed; inset: 0; z-index: 50;
  display: flex; flex-direction: column; align-items: center;
  overflow-y: auto;
}
#intro { justify-content: space-between; padding: 26px 22px 74px; background: linear-gradient(180deg, rgba(5,9,14,.32), rgba(5,9,14,.66) 74%, rgba(5,9,14,.92)); }

/* ── intro ─────────────────────────────────────────────────────────── */
.intro-brand { display: flex; align-items: center; gap: 10px; align-self: flex-start; }
.ib-word { height: 15px; }
.ib-sub { font-family: var(--mono); font-size: 9px; font-weight: 500; letter-spacing: .2em; color: var(--muted); border-left: 1px solid var(--border); padding-left: 10px; }
.intro-centre { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; max-width: 640px; }
.intro-kicker {
  font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .22em; color: var(--red);
  display: flex; flex-direction: column; align-items: center; gap: 0;
}
.intro-kicker::before { content: ''; display: block; width: 34px; height: 4px; background: var(--red); margin-bottom: 10px; }
.intro-title {
  font-family: var(--display);
  font-size: clamp(60px, 12vw, 118px); font-weight: 800; line-height: .95;
  letter-spacing: -.035em;
  color: #FFFFFF;
  text-shadow: 0 24px 80px rgba(0,0,0,.6);
}
.intro-tag { font-size: 15.5px; color: var(--muted); }
.intro-tag b { color: var(--fg); }
.intro-actions { display: flex; flex-direction: column; gap: 10px; width: min(470px, 92vw); margin-top: 4px; }
.intro-row { display: flex; gap: 8px; }
.intro-row .btn-secondary { flex: 1 1 auto; min-width: 0; }
.intro-row .btn-ghost { flex: 0 0 auto; }
.intro-homage { font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .18em; color: var(--muted); }
.intro-settings { display: flex; gap: 8px; }

.howto {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
  width: min(560px, 92vw); margin-top: 8px;
  text-align: left;
}
.ht-step {
  background: rgba(7,11,18,.8); border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 12px; display: flex; flex-direction: row; align-items: center; gap: 12px;
  transition: border-color .14s ease, background .14s ease;
}
.ht-step:hover { border-color: var(--border-strong); background: rgba(11,17,25,.85); }
/* the icon "key" — a framed glyph that mirrors what you'll see on screen */
.ht-icon {
  position: relative; flex-shrink: 0;
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg); border: 1px solid var(--border-strong);
  color: var(--red);
}
.ht-icon svg { width: 27px; height: 27px; display: block; }
.ht-num {
  position: absolute; top: -8px; left: -8px;
  width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  background: var(--red); color: #fff;
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  box-shadow: 0 0 0 2px var(--bg);
}
.ht-body { min-width: 0; }
.ht-title {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .16em;
  color: var(--fg); margin-bottom: 4px;
}
.ht-key {
  font-style: normal; font-size: 8px; font-weight: 700; letter-spacing: .1em;
  color: var(--red); background: var(--red-wash); border: 1px solid rgba(255,21,77,.4);
  padding: 2px 5px 1px;
}
.ht-key.alt { color: var(--navy-soft); background: var(--navy-wash); border-color: rgba(90,104,200,.5); }
.ht-body p { font-size: 11.5px; line-height: 1.4; color: var(--muted); }

.duel-banner {
  display: flex; flex-direction: column; gap: 3px; text-align: left;
  background: rgba(7,11,18,.92); border: 1px solid rgba(255,21,77,.45);
  border-radius: var(--r-sm); padding: 12px 16px;
}
.db-kicker { font-family: var(--mono); font-size: 8.5px; font-weight: 700; letter-spacing: .18em; color: var(--red); }
.db-kicker::before { content: ''; display: block; width: 22px; height: 3px; background: var(--red); margin-bottom: 7px; }
.db-line { font-size: 14px; }

.btn-primary {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: var(--red); color: #fff; border: none; border-radius: var(--r-xs); padding: 15px 22px;
  box-shadow: 0 6px 26px var(--red-glow);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn-primary:hover { transform: translateY(-2px); background: var(--red-hover); box-shadow: 0 10px 26px rgba(255,21,77,.35); }
.btn-primary:active { transform: translateY(0) scale(.995); }
#btnPlay { padding: 22px 26px; gap: 5px; }
#btnPlay .big { font-size: 38px; letter-spacing: .05em; }
#btnPlay .sub { font-size: 9.5px; }
.btn-primary .big { font-family: var(--display); font-weight: 800; font-size: 17px; letter-spacing: .05em; }
.btn-primary .sub { font-family: var(--mono); font-size: 8.5px; font-weight: 500; letter-spacing: .14em; opacity: .85; }
.btn-primary.slim { flex-direction: row; padding: 12px 18px; font-family: var(--display); font-weight: 800; font-size: 13px; letter-spacing: .05em; }
.btn-secondary {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: rgba(7,11,18,.92); color: var(--fg); border: 1px solid var(--border);
  border-radius: var(--r-xs); padding: 13px 22px;
  transition: border-color .12s ease, background .12s ease;
}
.btn-secondary:hover { border-color: var(--border-strong); background: var(--bg-hover); }
.btn-secondary .big { font-family: var(--display); font-weight: 800; font-size: 15px; letter-spacing: .03em; }
.btn-secondary .big em { font-style: normal; color: var(--navy-soft); }
.btn-secondary .sub { font-family: var(--mono); font-size: 8.5px; font-weight: 500; letter-spacing: .12em; color: var(--muted); }
.daily-played {
  position: absolute; top: -8px; right: 10px;
  font-family: var(--mono); font-size: 8.5px; font-weight: 700; letter-spacing: .08em;
  background: var(--bg-hover); border: 1px solid var(--border); color: var(--muted);
  padding: 2px 7px; border-radius: 0;
}
.btn-ghost {
  background: transparent; color: var(--muted); border: 1px solid var(--border); border-radius: var(--r-xs);
  font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .14em; padding: 12px 20px;
  transition: color .12s ease, border-color .12s ease;
}
.btn-ghost:hover { color: var(--fg); border-color: var(--border-strong); }
.btn-ghost.slim { padding: 10px 14px; font-size: 9.5px; }

/* ── results — the score is the hero, centre stage ─────────────────── */
#results { justify-content: flex-start; align-items: center; padding: 60px 22px 74px; pointer-events: none; }
.res-panel {
  pointer-events: auto;
  width: min(560px, 100%);
  align-items: center; text-align: center;
  background:
    linear-gradient(158deg, var(--navy-wash), transparent 42%),
    rgba(7,11,18,.93);
  border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 22px 22px 20px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(10px);
  display: flex; flex-direction: column; gap: 14px;
}
.res-kicker { font-family: var(--mono); font-size: 9.5px; font-weight: 700; letter-spacing: .18em; color: var(--muted); }
.res-kicker::before { content: ''; display: block; width: 26px; height: 3px; background: var(--red); margin: 0 auto 8px; }
.res-total { display: flex; align-items: baseline; justify-content: center; gap: 12px; }
.res-total span { font-family: var(--display); font-size: clamp(64px, 11vw, 104px); font-weight: 800; line-height: .95; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.res-total small { font-family: var(--mono); font-size: 12px; color: var(--navy-soft); font-variant-numeric: tabular-nums; }
.res-tier {
  align-self: center;
  font-family: var(--display); font-weight: 800; font-size: 23px; letter-spacing: .02em;
  padding: 8px 20px; border-radius: var(--r-sm);
  background: var(--bg-card); border: 1px solid var(--border-strong);
  animation: tierIn .7s cubic-bezier(.2,1.3,.3,1) .55s backwards;
}
@keyframes tierIn { from { opacity: 0; transform: translateY(8px) scale(.92); } }
.res-tier.t-finalist { border-color: rgba(120,136,224,.55); color: var(--navy-soft); background: var(--navy-wash); }
.res-tier.t-champion { border-color: rgba(255,194,75,.5); color: #FFC24B; }
.res-tier.t-clutch { background: var(--red); border-color: var(--red); color: #fff; box-shadow: 0 4px 26px var(--red-glow); }
.res-tier.t-dinner { background: var(--red); border-color: #fff; color: #fff; box-shadow: 0 4px 40px rgba(255,21,77,.7); }
.res-pb { font-family: var(--mono); font-size: 9.5px; font-weight: 500; letter-spacing: .1em; color: var(--muted); }

.breakdown { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; width: 100%; }
.bd-cell { position: relative; min-width: 0; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 10px 6px 9px; display: flex; flex-direction: column; gap: 3px; align-items: center; text-align: center; }
.bd-cell > * { max-width: 100%; }
.bd-r { font-family: var(--mono); font-size: 8px; font-weight: 700; letter-spacing: .1em; color: var(--dim); }
.bd-v { font-family: var(--mono); font-size: 7.5px; letter-spacing: .04em; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.bd-p { font-family: var(--display); font-weight: 800; font-size: 22px; line-height: 1.05; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.bd-flag { font-family: var(--mono); font-size: 8.5px; font-weight: 700; letter-spacing: .06em; }
.bd-flag.perfect { color: var(--red); }
.bd-flag.miss { color: var(--dim); }
.bd-flag.flare { color: var(--ok); }

.duel-verdict { border-top: 1px solid var(--border-faint); padding-top: 12px; }
.dv-head { font-family: var(--display); font-weight: 800; font-size: 15px; letter-spacing: -.01em; margin-bottom: 8px; }
.dv-head.win { color: var(--ok); }
.dv-head.loss { color: var(--red); }
.dv-grid { display: flex; flex-direction: column; gap: 3px; }
.dv-row { display: grid; grid-template-columns: 30px 1fr 1fr; font-family: var(--mono); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.dv-row span { color: var(--dim); }
.dv-row i, .dv-row em { font-style: normal; text-align: right; }
.dv-row em { color: var(--muted); }
.dv-lbl i, .dv-lbl em { font-size: 8px; font-weight: 700; letter-spacing: .1em; color: var(--dim); }

.submit-wrap { border-top: 1px solid var(--border-faint); padding-top: 12px; }
.submit-note { font-family: var(--mono); font-size: 8.5px; font-weight: 700; letter-spacing: .14em; color: var(--muted); margin-bottom: 8px; }
#submitForm { display: flex; gap: 8px; }
#nickname {
  flex: 1; min-width: 0; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-xs);
  color: var(--fg); font-family: var(--mono); font-size: 13px; font-weight: 500; letter-spacing: .06em;
  padding: 11px 13px; text-transform: uppercase;
}
#nickname:focus { outline: none; border-color: var(--red); }
.rank-wrap { border-top: 1px solid var(--border-faint); padding-top: 12px; }
.rank-line { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.rank-line b { color: var(--red); font-size: 15px; }
.rank-note { font-family: var(--mono); font-size: 8.5px; color: var(--navy-soft); margin-top: 5px; letter-spacing: .08em; }

.share-panel { display: flex; flex-direction: column; gap: 8px; width: 100%; }

/* opt-in email capture — quiet, value-first, never blocks */
.defend-wrap { width: 100%; border-top: 1px solid var(--border-faint); padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.defend-note { font-family: var(--mono); font-size: 8.5px; font-weight: 700; letter-spacing: .1em; color: var(--navy-soft); text-transform: uppercase; }
#defendForm { display: flex; gap: 8px; max-width: 400px; margin: 0 auto; width: 100%; }
#defendEmail {
  flex: 1; min-width: 0; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-xs);
  color: var(--fg); font-family: var(--mono); font-size: 12px; letter-spacing: .02em; padding: 10px 12px;
}
#defendEmail:focus { outline: none; border-color: var(--navy-soft); }
.defend-consent { display: flex; align-items: center; gap: 8px; justify-content: center; cursor: pointer; }
.defend-consent input {
  appearance: none; -webkit-appearance: none;
  width: 15px; height: 15px; flex-shrink: 0; margin: 0;
  border: 1px solid var(--border-strong);
  background: var(--bg); cursor: pointer; position: relative;
  transition: background .12s ease, border-color .12s ease;
}
.defend-consent input:hover { border-color: var(--muted); }
.defend-consent input:checked { background: var(--red); border-color: var(--red); }
.defend-consent input:checked::after {
  content: ''; position: absolute; left: 4.5px; top: 1.5px;
  width: 3px; height: 6.5px; border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.defend-consent span { font-family: var(--mono); font-size: 9px; letter-spacing: .04em; color: var(--dim); line-height: 1.35; text-align: left; }
.defend-done { width: 100%; border-top: 1px solid var(--border-faint); padding-top: 12px; font-family: var(--mono); font-size: 10px; letter-spacing: .08em; color: var(--ok); text-align: center; }
.share-url { background: var(--bg); border: 1px dashed var(--border-strong); border-radius: var(--r-xs); padding: 8px 12px; font-family: var(--mono); font-size: 10.5px; color: var(--muted); overflow-x: auto; white-space: nowrap; }
.share-btns { display: flex; gap: 7px; flex-wrap: wrap; justify-content: center; }
.res-actions { display: flex; gap: 7px; flex-wrap: wrap; justify-content: center; border-top: 1px solid var(--border-faint); padding-top: 14px; }
.submit-wrap, .rank-wrap, .duel-verdict { width: 100%; }
.dv-head { text-align: center; }
#submitForm { max-width: 400px; margin: 0 auto; }

.replay-bug {
  position: fixed; top: 64px; right: 22px; z-index: 51;
  display: flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .18em; color: var(--fg);
  background: rgba(7,11,18,.88); border: 1px solid var(--border); border-radius: var(--r-xs); padding: 6px 11px;
}
.replay-bug i { width: 7px; height: 7px; border-radius: 50%; background: var(--red); animation: blink 1.2s infinite; }
.replay-label {
  position: fixed; bottom: 58px; right: 22px; z-index: 51;
  font-family: var(--mono); font-size: 9.5px; font-weight: 500; letter-spacing: .12em; color: var(--muted);
  background: rgba(7,11,18,.88); border: 1px solid var(--border);
  border-radius: var(--r-xs); padding: 7px 12px; font-variant-numeric: tabular-nums;
}
.replay-label b { color: var(--fg); }

/* ── chicken dinner ────────────────────────────────────────────────── */
#dinner { justify-content: center; background: radial-gradient(ellipse 70% 60% at 50% 42%, rgba(255,21,77,.18), transparent 70%), radial-gradient(ellipse 120% 90% at 50% 110%, rgba(18,27,108,.5), transparent 60%), rgba(5,9,14,.92); }
.dinner-inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: 24px; }
.dinner-chicken { width: 130px; filter: drop-shadow(0 0 30px var(--red-glow)); animation: chickenIn 1s cubic-bezier(.2,1.4,.3,1); }
@keyframes chickenIn { from { transform: scale(.4) rotate(-14deg); opacity: 0; } }
.dinner-kicker { font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .22em; color: var(--red); }
.dinner-kicker::before { content: ''; display: block; width: 34px; height: 4px; background: var(--red); margin: 0 auto 10px; }
.dinner-title { font-family: var(--display); font-size: clamp(36px, 6.6vw, 66px); font-weight: 800; line-height: 1.02; letter-spacing: -.03em; animation: pop2 .8s cubic-bezier(.2,1.4,.3,1) .2s backwards; }
@keyframes pop2 { from { transform: scale(.8); opacity: 0; } }
.dinner-sub { color: var(--muted); font-size: 14px; max-width: 44ch; }

/* ── leaderboard ───────────────────────────────────────────────────── */
#board { background: rgba(4,6,10,.8); justify-content: center; backdrop-filter: blur(6px); }
.board-panel {
  width: min(520px, calc(100vw - 36px)); max-height: min(640px, calc(100vh - 80px));
  display: flex; flex-direction: column;
  background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--r-sm); overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.board-head { display: flex; align-items: center; gap: 12px; padding: 15px 18px; border-bottom: 1px solid var(--border); }
.board-title { font-family: var(--display); font-weight: 800; font-size: 14px; letter-spacing: .02em; margin-right: auto; }
.board-scopes { display: flex; gap: 5px; }
.scope {
  font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: .12em;
  background: transparent; color: var(--muted); border: 1px solid var(--border); border-radius: var(--r-xs); padding: 5px 10px;
}
.scope.on { background: var(--red); border-color: var(--red); color: #fff; }
#scopeToday.on { background: var(--navy); border-color: rgba(138,150,224,.55); }  /* weekly wears Clutch Blue */
.board-close { background: none; border: none; color: var(--muted); font-size: 15px; padding: 4px 6px; }
.board-close:hover { color: var(--fg); }
.board-list { overflow-y: auto; padding: 6px 0; }
.board-row {
  display: grid; grid-template-columns: 52px 1fr auto 90px; align-items: center; gap: 10px;
  padding: 8px 18px; font-variant-numeric: tabular-nums;
}
.board-row.top { background: rgba(255,21,77,.05); }
.board-row.me { background: var(--red-wash); }
.br-rank { font-family: var(--mono); font-size: 10.5px; font-weight: 700; color: var(--dim); }
.board-row.top .br-rank { color: var(--red); }
.br-nick { font-weight: 700; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.br-tier { font-family: var(--mono); font-size: 8px; font-weight: 700; letter-spacing: .08em; color: var(--dim); }
.br-score { font-family: var(--mono); font-size: 13px; font-weight: 700; text-align: right; }
.board-empty { padding: 44px 20px; text-align: center; font-family: var(--mono); font-size: 10px; letter-spacing: .14em; color: var(--muted); }
.board-foot { padding: 11px 18px; border-top: 1px solid var(--border); font-family: var(--mono); font-size: 8px; letter-spacing: .1em; color: var(--dim); }

/* ── toast / footer ────────────────────────────────────────────────── */
#toast {
  position: fixed; left: 50%; bottom: 104px; transform: translate(-50%, 16px); z-index: 90;
  background: var(--bg-card); border: 1px solid var(--border-strong);
  border-radius: var(--r-xs); padding: 10px 16px; font-size: 13px; opacity: 0; pointer-events: none;
  box-shadow: var(--shadow-lg);
  max-width: min(440px, 90vw);
}
#toast.show { animation: toast 2.8s ease forwards; }
@keyframes toast {
  0% { opacity: 0; transform: translate(-50%, 16px); }
  8% { opacity: 1; transform: translate(-50%, 0); }
  85% { opacity: 1; }
  100% { opacity: 0; }
}

#sitelinks {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex; justify-content: center; gap: 26px; padding: 13px 16px 15px;
  background: linear-gradient(0deg, rgba(5,9,14,.92), transparent);
  font-family: var(--mono); font-size: 9.5px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
}
#sitelinks a { color: var(--muted); text-decoration: none; transition: color .12s ease; }
#sitelinks a:hover { color: var(--fg); }
body.playing #sitelinks { opacity: .55; }

.noscript { position: fixed; inset: 0; z-index: 200; background: var(--bg); padding: 60px 24px; text-align: center; }
.noscript h1 { font-family: var(--display); font-weight: 800; margin-bottom: 12px; }
.noscript a { color: var(--red); }

/* ── reduced motion ────────────────────────────────────────────────── */
html.reduced #wipe, html.reduced .onair i, html.reduced .replay-bug i { animation: none !important; }
html.reduced #announce.show { animation: none; opacity: 1; transform: translate(-50%,-50%); transition: opacity .2s; }
html.reduced #lowerthird.show { animation: none; opacity: 1; }
html.reduced #lowerthird[data-kind="boarding"].show { transform: translateY(0); }
html.reduced #lowerthird[data-kind="fact"].show, html.reduced #lowerthird[data-kind="nodrop"].show { transform: translate(-50%, -50%); }
html.reduced .flap { animation: none; }
html.reduced .lt-tick { animation: none; }
html.reduced #countdown.show { animation: none; opacity: 1; transform: translate(-50%, -50%); }
html.reduced #readout.show { animation: none; opacity: 1; }
html.reduced #flarehint.show { animation: none; opacity: 1; }
html.reduced .btn-primary { transition: none; }
html.reduced .dinner-chicken, html.reduced .dinner-title, html.reduced .res-tier { animation: none; }

@media (max-width: 720px) {
  .hud-mid { display: none; }
  .hud-wind b, .hud-score-wrap b { display: none; }
  #hud { gap: 10px; }
  .onair { display: none; }
  .hud-wind, .hud-score-wrap, .hud-title, .mutebtn { white-space: nowrap; }
  .howto { grid-template-columns: 1fr; gap: 6px; }
  .ht-step { align-items: center; gap: 11px; padding: 9px 11px; }
  .ht-icon { width: 40px; height: 40px; }
  .ht-icon svg { width: 23px; height: 23px; }
  #lowerthird { padding: 11px 14px; max-width: calc(100vw - 20px); }
  #lowerthird[data-kind="boarding"] { top: 46px; max-width: none; padding: 12px 10px 10px; }
  /* fact/no-drop stay centred on mobile (base rule) — no bottom override */
  .flap { min-width: 19px; height: 27px; font-size: 15px; padding: 0 2px; }
  .flap-gap { width: 8px; }
  .lt-title { font-size: 20px; }
  .lt-fact { font-size: 13px; }
  #btnPlay { padding: 18px 20px; }
  #btnPlay .big { font-size: 30px; }
  #results { padding: 58px 12px 70px; }
  .res-panel { width: 100%; }
  .replay-label { display: none; }
  .replay-bug { top: 58px; right: 12px; }
  #sitelinks { gap: 16px; }
}
@media (max-width: 480px) {
  .bd-p { font-size: 16px; }
  .hud-title { display: none; }
  #hud { gap: 8px; padding: 0 12px; height: 46px; }
  .hud-wind span { font-size: 10.5px; }
  .hud-score { font-size: 13.5px; min-width: 52px; }
  .mutebtn { padding: 5px 8px; font-size: 8px; }
}
@media (max-height: 620px) {
  .howto { display: none; }   /* only genuinely cramped viewports drop the explainer */
}
