/* Lek Arena — one stylesheet for the stage (/), ballots (/vote) and control room (/admin).
   Broadcast-scoreboard look: neutral black, warm white type, one acid accent, hairline rules,
   condensed capitals for names and numbers. No gradients, glows or rounded bubbles. */

@font-face {
  font-family: 'Archivo';
  src: url('/fonts/archivo-latin-wdth-normal.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Archivo';
  src: url('/fonts/archivo-latin-ext-wdth-normal.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #0b0b0c;
  --bg-1: #121214;
  --bg-2: #19191c;
  --bg-3: #222226;
  --rule: #26262b;
  --rule-2: #3a3a40;
  --ink: #f3f1ec;
  --ink-2: #a9a7a1;
  --ink-3: #6f6e69;
  --accent: #d8ff3c;
  --accent-ink: #0b0b0c;
  --display: #7cc8ff;
  --failure: #ff7a66;
  --danger: #ff5c4d;
  --warn: #ffc24d;
  --ok: #7ee2a8;
  --gold: #f2c14e;
  --silver: #c9ccd3;
  --bronze: #d08c56;
  --r: 3px;
  --font: 'Archivo', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-stretch: 100%;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--ink); text-decoration-color: var(--rule-2); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }
h1, h2, h3 { margin: 0; line-height: 1.1; font-weight: 700; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.num, .tab { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ type roles */
.eyebrow {
  font-size: 0.72em;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.caps {
  text-transform: uppercase;
  font-stretch: 78%;
  font-weight: 800;
  letter-spacing: -0.005em;
}
.wordmark {
  font-stretch: 125%;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}
.wordmark i { display: inline-block; width: 0.55em; height: 0.55em; background: var(--accent); margin-right: 0.45em; vertical-align: 0.05em; }

/* act type: small caps label with a square marker, no pill */
.kind { display: inline-flex; align-items: center; gap: 0.5em; font-size: 0.78em; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap; }
.kind::before { content: ""; width: 0.62em; height: 0.62em; background: currentColor; }
.kind.success { color: var(--display); }
.kind.failure { color: var(--failure); }
.sq { display: inline-block; width: 0.62em; height: 0.62em; background: var(--team, var(--ink-3)); flex: none; }

/* connection indicator */
.conn { display: inline-flex; align-items: center; gap: 7px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
.conn i { width: 7px; height: 7px; background: var(--ink-3); }
.conn.live i { background: var(--accent); }
.conn.polling i { background: var(--warn); }
.conn.offline i { background: var(--danger); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0.25; } }

/* ------------------------------------------------------------------ controls */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 36px;
  padding: 0 14px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
  background: var(--bg-2);
  border: 1px solid var(--rule-2);
  border-radius: var(--r);
  cursor: pointer;
  text-decoration: none;
  touch-action: manipulation;
  white-space: nowrap;
}
.btn:hover { background: var(--bg-3); border-color: #4a4a52; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: #e4ff6e; }
.btn.danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn.quiet { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.quiet:hover { color: var(--ink); background: var(--bg-2); }
.btn.small { min-height: 28px; padding: 0 10px; font-size: 0.8rem; }
.btn.big { min-height: 52px; padding: 0 22px; font-size: 1.05rem; font-weight: 700; }
.btn[disabled] { opacity: 0.35; cursor: not-allowed; }
.btn .sub { font-weight: 500; opacity: 0.7; }

input[type="text"], input[type="password"], input[type="number"], input[type="url"], select, textarea {
  font: inherit;
  font-size: 0.92rem;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--rule-2);
  border-radius: var(--r);
  padding: 7px 9px;
  min-width: 0;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; }
textarea { width: 100%; font-family: var(--mono); font-size: 0.82rem; }
label { color: var(--ink-2); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.04em; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translate(-50%, 180%);
  transition: transform 0.2s ease;
  background: var(--ink);
  color: var(--bg);
  padding: 11px 16px;
  border-radius: var(--r);
  font-weight: 600;
  font-size: 0.9rem;
  max-width: min(92vw, 520px);
  z-index: 100;
  border-left: 4px solid var(--accent);
}
.toast.show { transform: translate(-50%, 0); }
.toast.error { border-left-color: var(--danger); }
.toast.ok { border-left-color: var(--ok); }

/* ================================================================== STAGE (/) */
body.stage { font-size: clamp(14px, 0.9vw + 0.5vh, 30px); }
.topbar {
  display: flex;
  align-items: center;
  gap: 1.4em;
  padding: 0.9em 1.6em;
  border-bottom: 1px solid var(--rule);
}
.topbar .wordmark { font-size: 1.05em; }
.topbar .phase { font-size: 0.78em; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-2); padding-left: 1.4em; border-left: 1px solid var(--rule-2); }
.topbar .spacer { flex: 1; }
.topbar .vote-at { font-size: 0.78em; color: var(--ink-3); letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; }
.topbar .vote-at b { color: var(--ink); text-transform: none; letter-spacing: 0; font-weight: 700; font-size: 1.15em; margin-left: 0.5em; }

.stage-main { display: grid; }
.feature { padding: 2em 2.2em; display: flex; flex-direction: column; justify-content: center; gap: 0.7em; position: relative; min-width: 0; }
.side { background: var(--bg-1); border-top: 1px solid var(--rule); padding: 1.4em 1.6em; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
@media (min-width: 900px) and (min-height: 560px) {
  body.stage { height: 100vh; overflow: hidden; }
  body.stage #app { height: 100vh; display: flex; flex-direction: column; }
  .stage-main { flex: 1; min-height: 0; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
  .side { border-top: 0; border-left: 1px solid var(--rule); }
}

.feature .team-name { font-size: 4.6em; line-height: 0.92; overflow-wrap: anywhere; }
.feature .team-name.long { font-size: 3.5em; }
.feature .team-name.xlong { font-size: 2.7em; }
.feature .lab { font-size: 1.05em; color: var(--ink-2); font-weight: 500; }
.feature .act-title { font-size: 1.5em; font-weight: 400; color: var(--ink); max-width: 30em; }
.feature .act-title::before { content: "“"; color: var(--ink-3); }
.feature .act-title::after { content: "”"; color: var(--ink-3); }
.line { display: flex; align-items: center; gap: 1.2em; flex-wrap: wrap; }
.big-timer { font-size: 7.4em; font-stretch: 70%; font-weight: 700; line-height: 0.9; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; margin-top: 0.08em; }
.big-timer.low { color: var(--accent); }
.big-timer.done { color: var(--danger); animation: blink 1s steps(2) infinite; }
.big-timer.paused { color: var(--ink-3); }
.timerbar { height: 4px; background: var(--rule); max-width: 34em; }
.timerbar i { display: block; height: 100%; width: 0; background: var(--ink); transition: width 0.25s linear; }
.status-line { color: var(--ink-2); font-size: 1em; }
.status-line b { color: var(--ink); font-weight: 700; }
.meter { height: 4px; background: var(--rule); }
.meter i { display: block; height: 100%; background: var(--accent); transition: width 0.4s ease; }
.voters { display: grid; grid-template-columns: auto minmax(0, 14em); align-items: center; gap: 1em; color: var(--ink-2); font-size: 0.95em; }
.voters b { color: var(--ink); font-variant-numeric: tabular-nums; }
.callout { font-size: 1.35em; font-weight: 500; color: var(--ink); max-width: 26em; }

/* photo beside the spotlight */
.feature.has-photo { flex-direction: row; align-items: center; gap: 2em; }
.feature-text { display: flex; flex-direction: column; justify-content: center; gap: 0.7em; min-width: 0; flex: 1 1 50%; }
.feature-photo { flex: 1 1 50%; min-width: 0; align-self: stretch; display: flex; align-items: center; }
.feature-photo img { width: 100%; max-height: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; animation: fade 0.5s both; }
@media (max-width: 899px), (max-height: 559px) {
  .feature.has-photo { flex-direction: column-reverse; align-items: stretch; }
  .feature-photo img { max-height: 42vh; }
}

/* side column: lists */
.side-head { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 0.7em; border-bottom: 1px solid var(--rule-2); margin-bottom: 0.2em; }
.side-head h2 { font-size: 0.78em; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-2); }
.side-head span { font-size: 0.75em; color: var(--ink-3); letter-spacing: 0.06em; }
.rows { display: grid; min-height: 0; }
@media (min-width: 900px) and (min-height: 560px) {
  .rows { grid-auto-rows: minmax(0, 1fr); flex: 1; }
  .rows.two { grid-template-columns: 1fr 1fr; column-gap: 1.6em; grid-auto-flow: column; grid-template-rows: repeat(var(--rows), minmax(0, 1fr)); }
}

.lb-head, .lb-row { display: grid; grid-template-columns: 1.8em minmax(0, 1fr) 2.6em 2.6em 2.6em 3.6em; align-items: center; gap: 0.5em; }
.lb-head { font-size: 0.92em; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); padding: 0.2em 0.6em 0.4em; }
.lb-head span { font-size: 0.72em; }
.lb-head span:nth-child(n+3) { text-align: right; }
.lb-row { padding: 0 0.6em; border-bottom: 1px solid var(--rule); min-height: 1.9em; font-size: 0.92em; }
.lb-row .rank { font-weight: 700; font-stretch: 80%; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.lb-row .nm { display: flex; align-items: center; gap: 0.6em; min-width: 0; text-transform: uppercase; font-stretch: 82%; font-weight: 700; letter-spacing: 0.01em; }
.lb-row .nm span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-row .c { text-align: right; color: var(--ink-3); font-variant-numeric: tabular-nums; font-stretch: 85%; }
.lb-row .tot { text-align: right; font-weight: 800; font-stretch: 80%; font-size: 1.12em; font-variant-numeric: tabular-nums; }
.lb-row.p1 .rank { color: var(--gold); }
.lb-row.p2 .rank { color: var(--silver); }
.lb-row.p3 .rank { color: var(--bronze); }
.lb-row.hl { background: var(--accent); color: var(--accent-ink); border-bottom-color: var(--accent); }
.lb-row.hl .rank, .lb-row.hl .c { color: var(--accent-ink); }
.lb-row.hl .sq { outline: 1px solid var(--accent-ink); }
.mv { font-size: 0.72em; font-weight: 800; margin-left: 0.2em; font-stretch: 90%; }
.mv.up { color: var(--ok); }
.mv.down { color: var(--failure); }
.lb-row.hl .mv { color: var(--accent-ink); }
@media (max-width: 640px) {
  .lb-head, .lb-row { grid-template-columns: 1.8em minmax(0, 1fr) 3.6em; }
  .lb-head .c, .lb-row .c { display: none; }
}

.ro-row { display: flex; align-items: center; gap: 0.8em; padding: 0 0.4em; border-bottom: 1px solid var(--rule); min-height: 1.7em; font-size: 0.88em; min-width: 0; }
.ro-row .n { width: 1.6em; color: var(--ink-3); font-variant-numeric: tabular-nums; font-weight: 600; }
.ro-row .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-transform: uppercase; font-stretch: 82%; font-weight: 700; }
.ro-row .kind { font-size: 0.7em; }
.rows.two .ro-row .kind { font-size: 0; gap: 0; }
.rows.two .ro-row .kind::before { width: 9px; height: 9px; }
.ro-row.done { color: var(--ink-3); }
.ro-row.done .kind { opacity: 0.5; }
.ro-row.current { background: var(--accent); color: var(--accent-ink); border-bottom-color: var(--accent); }
.ro-row.current .n, .ro-row.current .kind { color: var(--accent-ink); }
.ro-row.noShow { color: var(--ink-3); text-decoration: line-through; }
.tag-next { font-size: 0.66em; font-weight: 800; letter-spacing: 0.14em; color: var(--accent); text-transform: uppercase; }

/* reveal */
.reveal-head { display: flex; align-items: center; gap: 0.8em; }
.reveal-thumb { width: 3.6em; height: 3.6em; object-fit: cover; flex: none; }
.histo { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 0.5em; align-items: end; height: 11em; padding-top: 1.4em; border-bottom: 1px solid var(--rule-2); margin-top: 0.4em; }
.histo .col { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; }
.histo .bar { width: 100%; height: var(--h); min-height: 2px; background: var(--ink); transform-origin: bottom; }
.histo .bar.top { background: var(--accent); }
.histo .count { font-weight: 700; font-stretch: 80%; font-size: 1em; margin-bottom: 0.25em; font-variant-numeric: tabular-nums; }
.histo .count.zero { color: var(--ink-3); font-weight: 500; }
.histo.animate .bar { animation: grow 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both; animation-delay: calc(var(--i) * 55ms); }
.histo.animate .count { animation: fade 0.3s both; animation-delay: calc(var(--i) * 55ms + 0.45s); }
.histo-axis { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 0.5em; text-align: center; color: var(--ink-3); font-weight: 600; font-size: 0.85em; margin-top: 0.35em; font-variant-numeric: tabular-nums; }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.stats { display: flex; gap: 2.6em; align-items: flex-end; flex-wrap: wrap; margin-top: 0.6em; }
.stat .v { font-size: 3em; font-weight: 800; font-stretch: 72%; line-height: 0.95; font-variant-numeric: tabular-nums; }
.stat .k { font-size: 0.66em; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); margin-top: 0.4em; }
.stat.main .v { font-size: 5em; color: var(--accent); }
.animate-pop { animation: fade 0.5s 0.8s both; }

/* QR */
.qr-block { display: flex; gap: 1.2em; align-items: center; }
.qr-block .qr { width: 7.4em; height: 7.4em; background: #fff; padding: 0.3em; flex: none; }
.qr-block .qr svg { width: 100%; height: 100%; display: block; }
.qr-block.big .qr { width: 14em; height: 14em; padding: 0.5em; }
.qr-block .url { font-size: 1.25em; font-weight: 800; font-stretch: 90%; margin-top: 0.15em; word-break: break-all; }
.qr-block .hint { color: var(--ink-2); font-size: 0.9em; margin-top: 0.3em; }
.qr-block .warnline { color: var(--warn); font-size: 0.85em; font-weight: 600; margin-top: 0.3em; }
.side .qr-block { padding-bottom: 1.2em; margin-bottom: 1em; border-bottom: 1px solid var(--rule-2); }

/* lobby */
.lobby { padding: 3em 2.4em; display: grid; gap: 2.6em; align-content: center; max-width: 1600px; margin: 0 auto; width: 100%; }
.lobby .title { font-size: 7em; line-height: 0.85; }
.lobby .tagline { font-size: 1.35em; color: var(--ink-2); margin-top: 0.5em; font-weight: 400; }
.lobby-grid { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 3em; align-items: center; border-top: 1px solid var(--rule-2); border-bottom: 1px solid var(--rule-2); padding: 2em 0; }
.how { display: grid; gap: 1.1em; }
.how .step { display: grid; grid-template-columns: 2.4em minmax(0, 1fr); align-items: baseline; font-size: 1.25em; }
.how .step b { font-stretch: 75%; font-weight: 800; color: var(--accent); font-size: 1.3em; }
.roster { columns: 4 12em; column-gap: 2em; font-size: 0.9em; color: var(--ink-2); }
.roster div { display: flex; align-items: center; gap: 0.6em; padding: 0.2em 0; break-inside: avoid; text-transform: uppercase; font-stretch: 85%; font-weight: 600; letter-spacing: 0.02em; }
@media (max-width: 700px) {
  .lobby { padding: 1.6em 1.1em; }
  .lobby .title { font-size: 3.6em; }
  .lobby-grid { grid-template-columns: 1fr; }
}

/* quiz */
.qbars { display: grid; gap: 0.32em; margin-top: 0.4em; }
.qbar { display: grid; grid-template-columns: minmax(0, 10em) minmax(0, 1fr) 3em; align-items: center; gap: 0.8em; font-size: 0.92em; }
.qbar .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: uppercase; font-stretch: 82%; font-weight: 700; display: flex; gap: 0.5em; align-items: center; }
.qbar .track { height: 0.9em; background: var(--bg-2); }
.qbar .track i { display: block; height: 100%; background: var(--ink); animation: growx 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both; transform-origin: left; animation-delay: calc(var(--i) * 40ms); }
.qbar:first-child .track i { background: var(--accent); }
.qbar .v { text-align: right; font-weight: 800; font-stretch: 80%; font-variant-numeric: tabular-nums; }
@keyframes growx { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* final */
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 0.6em; margin-top: 0.8em; }
.podium .place { display: flex; flex-direction: column; gap: 0.3em; }
.podium .who { font-size: 1.35em; line-height: 1; overflow-wrap: anywhere; }
.podium .pts { color: var(--ink-2); font-variant-numeric: tabular-nums; font-size: 0.9em; }
.podium .block { display: flex; align-items: flex-start; padding: 0.25em 0.3em; font-size: 3em; font-weight: 900; font-stretch: 70%; color: var(--bg); animation: rise 1s cubic-bezier(0.2, 0.8, 0.2, 1) both; transform-origin: bottom; }
.podium .p1 .block { height: 24vh; background: var(--accent); animation-delay: 1.1s; }
.podium .p2 .block { height: 17vh; background: var(--ink); animation-delay: 0.55s; }
.podium .p3 .block { height: 12vh; background: var(--ink-2); animation-delay: 0s; }
.podium .p1 .who { font-size: 1.8em; }
@keyframes rise { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.awards { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6em; margin-top: 1.2em; border-top: 1px solid var(--rule-2); padding-top: 1.1em; }
.award .t { font-size: 1.5em; margin-top: 0.25em; line-height: 1; }
.award .q { color: var(--ink-2); margin-top: 0.3em; }
.award .q::before { content: "“"; } .award .q::after { content: "”"; }
@media (max-width: 700px) {
  .awards { grid-template-columns: 1fr; }
  .podium .block { font-size: 2em; }
}

/* unattended projector */
body.stage.idle, body.stage.idle * { cursor: none !important; }
.fs-hint { position: fixed; right: 16px; bottom: 14px; background: var(--bg-2); border: 1px solid var(--rule-2); color: var(--ink-2); padding: 7px 12px; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; opacity: 0; pointer-events: none; transition: opacity 0.3s; z-index: 50; }
body.show-fs-hint .fs-hint { opacity: 1; }
body.embed .fs-hint { display: none; }

@media (max-width: 640px) {
  .topbar { padding: 0.8em 1em; gap: 0.9em; }
  .topbar .vote-at { display: none; }
  .feature { padding: 1.4em 1.1em; }
  .side { padding: 1.2em 1.1em; }
  .feature .team-name { font-size: 2.9em; }
  .feature .team-name.long { font-size: 2.3em; }
  .feature .team-name.xlong { font-size: 1.9em; }
  .big-timer { font-size: 5em; }
}

/* ================================================================== VOTE (/vote) */
body.vote { font-size: 16px; }
.v-wrap { max-width: 560px; margin: 0 auto; padding: 0 16px 90px; }
.v-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 16px 0 12px; }
.v-head .wordmark { font-size: 13px; }
.v-who { padding: 4px 0 14px; border-bottom: 1px solid var(--rule); }
.v-who .eyebrow { font-size: 11px; }
.v-who .team { font-size: 26px; line-height: 1.05; margin-top: 4px; }
.purse { position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 14px 0 12px; border-bottom: 1px solid var(--rule); margin-bottom: 16px; }
.purse-top { display: flex; align-items: baseline; gap: 10px; }
.purse-top .left { font-size: 44px; font-weight: 800; font-stretch: 72%; line-height: 0.9; font-variant-numeric: tabular-nums; }
.purse-top .of { color: var(--ink-2); font-size: 14px; }
.purse-top .save { margin-left: auto; font-size: 12px; color: var(--ink-3); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.purse-top .save.saving { color: var(--warn); }
.purse .meter { height: 5px; margin-top: 10px; }
.purse.empty .purse-top .left { color: var(--accent); }
.purse-sub { display: flex; justify-content: space-between; color: var(--ink-3); font-size: 12px; margin-top: 7px; font-weight: 500; }
.final-call { border-left: 4px solid var(--accent); background: var(--bg-1); padding: 12px 14px; margin-bottom: 16px; font-weight: 600; }
.spot-card { border-top: 4px solid var(--team); background: var(--bg-1); padding: 14px 14px 16px; margin-bottom: 22px; }
.spot-top { display: flex; justify-content: space-between; align-items: center; }
.spot-top .timer { font-size: 22px; font-weight: 800; font-stretch: 72%; font-variant-numeric: tabular-nums; }
.spot-top .timer.low { color: var(--accent); }
.spot-top .timer.done { color: var(--danger); }
.spot-card h2 { font-size: 30px; margin: 10px 0 6px; line-height: 0.98; }
.spot-card .kline { color: var(--ink-2); font-size: 14px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.spot-img { width: 100%; max-height: 36vh; object-fit: cover; display: block; margin: 12px 0 4px; }
.me-note { color: var(--ink-2); margin: 12px 0 0; }
.picker { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin-top: 14px; }
.pick {
  height: 52px;
  border: 1px solid var(--rule-2);
  border-radius: var(--r);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 22px;
  font-weight: 800;
  font-stretch: 75%;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  touch-action: manipulation;
}
.pick.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pick.over { opacity: 0.22; }
.pick:active { transform: translateY(1px); }
.list-title { font-size: 11px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 6px; }
.team-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--rule); }
.row { border-bottom: 1px solid var(--rule); min-width: 0; }
.row.open { background: var(--bg-1); }
.row.spotted .row-main { box-shadow: inset 3px 0 0 var(--accent); }
.row-main { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 4px 13px 10px; cursor: pointer; background: none; border: 0; color: inherit; font: inherit; text-align: left; }
.row-main .name { flex: 1; min-width: 0; }
.row-main .name b { display: block; font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-main .name small { display: block; color: var(--ink-3); font-size: 12px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-main .score { font-size: 26px; font-weight: 800; font-stretch: 72%; min-width: 2ch; text-align: right; font-variant-numeric: tabular-nums; }
.row-main .score.blank { color: var(--ink-3); }
.row .picker { padding: 0 10px 14px; margin-top: 0; }
.row-img { width: calc(100% - 20px); margin: 0 10px 10px; max-height: 30vh; object-fit: cover; display: block; }
.v-note { color: var(--ink-3); font-size: 13px; margin-top: 16px; }
.notice { border-top: 4px solid var(--rule-2); background: var(--bg-1); padding: 18px 16px; display: grid; gap: 8px; margin-top: 8px; }
.notice h2 { font-size: 22px; }
.v-foot { margin-top: 26px; display: flex; justify-content: space-between; color: var(--ink-3); font-size: 13px; }

.login { max-width: 420px; margin: 0 auto; padding: 12vh 20px 60px; display: grid; gap: 22px; }
.login h1 { font-size: 40px; line-height: 0.95; }
.key-input {
  width: 100%;
  font-family: var(--mono) !important;
  font-size: 44px !important;
  font-weight: 700;
  letter-spacing: 0.55em;
  text-indent: 0.55em;
  text-align: center;
  text-transform: uppercase;
  padding: 14px 0 !important;
  background: var(--bg-1) !important;
  border: 0 !important;
  border-bottom: 2px solid var(--rule-2) !important;
  border-radius: 0 !important;
}
.key-input:focus { border-bottom-color: var(--accent) !important; }
.error-text { color: var(--danger); font-weight: 600; margin: 0; }

/* ================================================================== ADMIN (/admin) */
body.admin { font-size: 14px; }
.a-top { display: flex; align-items: center; gap: 16px; padding: 10px 18px; border-bottom: 1px solid var(--rule); }
.a-top .wordmark { font-size: 13px; }
.a-top .wordmark small { font-stretch: 100%; font-weight: 600; letter-spacing: 0.16em; color: var(--ink-3); margin-left: 10px; font-size: 11px; }
.a-top .spacer { flex: 1; }

/* ON AIR: the only place that changes the screen */
.onair { display: grid; grid-template-columns: minmax(0, 1fr) auto; border-bottom: 1px solid var(--rule-2); background: var(--bg-1); }
.onair-main { padding: 16px 18px 18px; display: grid; gap: 12px; min-width: 0; border-top: 3px solid var(--accent); }
.onair-label { display: flex; align-items: center; gap: 10px; font-size: 11px; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; white-space: nowrap; }
.onair-label .dot { width: 8px; height: 8px; background: var(--accent); }
.onair-label .ph { color: var(--ink-2); font-weight: 600; }
.steps-mini { display: flex; gap: 3px; margin-left: auto; }
.steps-mini i { width: 22px; height: 4px; background: var(--rule-2); }
.steps-mini i.past { background: var(--ink-3); }
.steps-mini i.on { background: var(--accent); }
.onair-now { display: flex; align-items: flex-start; gap: 16px; min-width: 0; }
.onair-now .what { min-width: 0; flex: 1; }
.onair-now .big { font-size: 30px; line-height: 1; }
.onair-now .sub { color: var(--ink-2); margin-top: 6px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.onair-now .clock { font-size: 44px; font-weight: 800; font-stretch: 70%; line-height: 0.9; font-variant-numeric: tabular-nums; }
.onair-now .clock.low { color: var(--accent); }
.onair-now .clock.done { color: var(--danger); }
.onair-now .clock.paused { color: var(--ink-3); }
.onair-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.onair-actions .gap { flex: 1; }
.onair-help { color: var(--ink-3); font-size: 12px; }
.preview { padding: 12px 18px 14px 0; display: flex; flex-direction: column; gap: 6px; }
.preview .frame { width: 400px; height: 225px; overflow: hidden; background: var(--bg); border: 1px solid var(--rule-2); position: relative; }
.preview iframe { position: absolute; top: 0; left: 0; width: 1600px; height: 900px; border: 0; transform: scale(0.25); transform-origin: 0 0; pointer-events: none; }
.onair > * { min-width: 0; }
.preview .cap { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); display: flex; justify-content: space-between; }
@media (max-width: 1000px) {
  .onair { grid-template-columns: 1fr; }
  .preview { padding: 0 18px 14px; }
  .preview .frame { width: 100%; max-width: 400px; height: auto; aspect-ratio: 16 / 9; }
}

.ws-tabs { display: flex; gap: 2px; padding: 0 18px; border-bottom: 1px solid var(--rule); overflow-x: auto; }
.ws-tabs button { font: inherit; font-weight: 600; font-size: 13px; color: var(--ink-3); background: none; border: 0; border-bottom: 2px solid transparent; padding: 12px 12px 10px; cursor: pointer; white-space: nowrap; }
.ws-tabs button:hover { color: var(--ink); }
.ws-tabs button.on { color: var(--ink); border-bottom-color: var(--ink); }
.ws-note { margin-left: auto; align-self: center; font-size: 11px; color: var(--ink-3); letter-spacing: 0.06em; white-space: nowrap; padding-left: 12px; }
.ws { padding: 18px; display: grid; gap: 22px; max-width: 1500px; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 22px; align-items: start; }
.sec { display: grid; gap: 12px; min-width: 0; }
.sec-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border-bottom: 1px solid var(--rule-2); padding-bottom: 8px; }
.sec-head h2 { font-size: 12px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; }
.sec-head .aside { color: var(--ink-3); font-size: 12px; }
.sec-head .right { margin-left: auto; display: flex; gap: 6px; }
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th { text-align: left; font-size: 10.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); padding: 6px 8px; border-bottom: 1px solid var(--rule-2); white-space: nowrap; }
table.tbl td { padding: 7px 8px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
table.tbl td.n, table.tbl th.n { text-align: right; font-variant-numeric: tabular-nums; }
table.tbl tr.current td { background: rgba(216, 255, 60, 0.08); }
table.tbl tr.current td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
table.tbl tr.done td { color: var(--ink-3); }
table.tbl input[type="text"] { width: 100%; background: transparent; border-color: transparent; padding: 5px 6px; }
table.tbl input[type="text"]:hover { border-color: var(--rule-2); }
table.tbl input[type="text"]:focus { border-color: var(--accent); background: var(--bg); }
.keyfield { width: 4.4em !important; font-family: var(--mono) !important; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 700; }
.st { font-size: 10.5px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; white-space: nowrap; }
.st.current { color: var(--accent); }
.st.next { color: var(--ink); }
.st.done { color: var(--ink-3); }
.st.waiting { color: var(--ink-3); }
.st.noShow { color: var(--danger); }
.mini-btns { display: inline-flex; gap: 4px; }
.pill { font-size: 10.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; padding: 3px 7px; background: var(--bg-3); color: var(--ink-2); white-space: nowrap; }
.pill.ok { color: var(--ok); }
.pill.warn { color: var(--warn); }
.pill.bad { color: var(--danger); }
.private { border-left: 3px solid var(--warn); padding-left: 12px; }
.ballot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.bchip { background: var(--bg-1); padding: 8px 10px; font-size: 12px; display: grid; gap: 2px; }
.bchip b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; gap: 6px; align-items: center; }
.bchip.none { color: var(--ink-3); }
.bchip .bar { height: 3px; background: var(--rule-2); margin-top: 4px; }
.bchip .bar i { display: block; height: 100%; background: var(--ink); }
.bchip.full .bar i { background: var(--accent); }
.matrix table.tbl td, .matrix table.tbl th { text-align: center; padding: 4px 5px; white-space: nowrap; }
.matrix table.tbl td.nm, .matrix table.tbl th.nm { text-align: left; }
.matrix table.tbl td.self { background: var(--bg-2); }
.warn-list { color: var(--warn); margin: 0; padding-left: 1.2em; }
.kbd { font-family: var(--mono); font-size: 11px; padding: 1px 5px; border: 1px solid var(--rule-2); color: var(--ink-2); }
.field-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.field { display: grid; gap: 5px; }
.linkbox { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.photo-ctl { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.photo-ctl .thumb { width: 40px; height: 30px; object-fit: cover; display: block; }
.photo-ctl .thumb.big { width: 112px; height: 84px; }
.photo-btn { cursor: pointer; }
.prev-card { display: flex; gap: 14px; align-items: center; }
.prev-card .big { font-size: 22px; }
@media (max-width: 640px) {
  .a-top, .ws-tabs { padding-left: 12px; padding-right: 12px; }
  .a-top { flex-wrap: wrap; gap: 8px 12px; }
  .a-top .wordmark small { display: none; }
  .steps-mini { display: none; }
  .preview { padding: 0 12px 14px; }
  .onair-main { padding: 14px 12px 16px; }
  .ws { padding: 14px 12px; }
  .onair-now { flex-wrap: wrap; }
  .onair-now .big { font-size: 24px; }
  .ws-note { display: none; }
}
