:root {
  --orange: #f26b1d;
  --orange-ink: #c94f0a;
  --navy: #13294b;
  --navy-2: #1f3d6b;
  --bg: #eef1f5;
  --surface: #ffffff;
  --surface-2: #e3e8ef;
  --line: #d3dae4;
  --text: #0f1b2d;
  --muted: #5b6878;
  --ok: #1a8a4a;
  --bad: #c62f2f;
  --board-bg: var(--navy);
  --board-text: #ffffff;
  --display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b111b;
    --surface: #141c2a;
    --surface-2: #1d2738;
    --line: #2a3549;
    --text: #e8edf4;
    --muted: #93a0b3;
    --ok: #3ccf7c;
    --bad: #ff6b6b;
    --board-bg: #0f2240;
    --orange-ink: #ff8a45;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 var(--body);
}
.wrap {
  max-width: 520px;
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) 16px calc(32px + env(safe-area-inset-bottom));
  display: grid;
  gap: 16px;
}
h1, h2 { font-family: var(--display); text-transform: uppercase; letter-spacing: .02em; margin: 0; line-height: .95; }
h2 { font-size: 28px; font-weight: 800; margin-bottom: 12px; }

/* Scoreboard */
.board {
  background: var(--board-bg);
  color: var(--board-text);
  border-radius: 16px;
  padding: 18px 18px 16px;
  border-bottom: 5px solid var(--orange);
}
.board-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.board h1 { font-size: 44px; font-weight: 900; }
.board h1::first-line { color: var(--orange); }
.board-stats { display: flex; gap: 14px; }
.stat { display: grid; text-align: right; }
.stat-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; opacity: .7; }
.stat-num { font-family: var(--display); font-size: 48px; font-weight: 900; line-height: .9; font-variant-numeric: tabular-nums; }
.stat-num small { font-size: 24px; opacity: .6; }
.board-status { display: flex; align-items: center; gap: 10px; margin: 14px 0 6px; }
.board-dates { margin: 0 0 12px; font-size: 14px; font-weight: 600; opacity: .8; }
.pill {
  font-family: var(--display); font-weight: 800; font-size: 18px; text-transform: uppercase; letter-spacing: .06em;
  padding: 3px 12px; border-radius: 999px; background: var(--ok); color: #fff;
}
.pill.locked { background: var(--orange); }
.live { font-size: 12px; font-weight: 700; color: #7ee2a8; letter-spacing: .06em; text-transform: uppercase; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.chips li {
  font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  background: rgba(255,255,255,.08); color: rgba(255,255,255,.55);
}
.chips li.in { background: var(--orange); color: #fff; }
.chips li.in::before { content: "✓ "; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.label { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.label em { font-weight: 400; font-style: normal; }
.field { display: block; margin-bottom: 14px; }
.hint { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.form-hint { margin: -6px 0 14px; }
.msg { min-height: 1.5em; margin: 10px 0 0; font-weight: 700; font-size: 14px; }
.msg.ok { color: var(--ok); }
.msg.err { color: var(--bad); }

input, select, textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--text);
  background: var(--surface-2); border: 2px solid transparent; border-radius: 12px;
  padding: 12px 14px; min-height: 50px;
}
textarea { resize: vertical; min-height: 84px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--orange); }
input:disabled, select:disabled, textarea:disabled { opacity: .55; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: 800 18px/1 var(--display); text-transform: uppercase; letter-spacing: .05em; text-decoration: none;
  min-height: 50px; padding: 0 18px; border-radius: 12px; cursor: pointer;
  background: var(--surface-2); color: var(--text); border: 2px solid var(--line);
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn-navy { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-big { width: 100%; min-height: 58px; font-size: 24px; }
.row { display: flex; gap: 10px; margin-bottom: 12px; }
.row > * { flex: 1; }
.row.two > .btn { flex: 0 0 auto; }
.row.two > .btn-navy { flex: 1; font-size: 15px; line-height: 1.1; padding: 6px 12px; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 600; margin-bottom: 14px; min-height: 44px; }
.check input { width: 22px; height: 22px; min-height: 0; accent-color: var(--orange); }

.badge {
  display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: #fff; background: var(--muted);
}
.badge.tiktok { background: #111; box-shadow: inset 0 0 0 1px #25f4ee; }
.badge.instagram { background: linear-gradient(45deg, #f58529, #dd2a7b, #8134af); }

/* Wheel */
.wheel-card { padding: 18px 14px; }
.wheel-box { position: relative; width: 100%; max-width: 420px; margin: 0 auto; aspect-ratio: 1; }
#wheel { width: 100%; height: 100%; display: block; }
.pointer {
  position: absolute; left: 50%; top: -6px; transform: translateX(-50%); z-index: 1;
  width: 0; height: 0; border-left: 16px solid transparent; border-right: 16px solid transparent;
  border-top: 30px solid var(--orange); filter: drop-shadow(0 2px 2px rgba(0,0,0,.35));
}
.wheel-caption { text-align: center; color: var(--muted); font-weight: 600; margin: 10px 0 0; }
.reveal { margin-top: 16px; padding: 16px; border-radius: 14px; background: var(--surface-2); border-left: 6px solid var(--orange); display: grid; gap: 12px; }
.reveal-kicker { margin: 0; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--orange-ink); }
.reveal-line { margin: 0; font-family: var(--display); font-size: 32px; font-weight: 800; line-height: 1.05; text-transform: uppercase; }
.reveal-line strong { color: var(--orange-ink); }
.reveal-rules p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.reveal.pop { animation: pop .45s ease-out; }
@keyframes pop { from { transform: scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }

/* History */
.history { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.history li { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; padding: 12px; border-radius: 12px; background: var(--surface-2); }
.history .h-round { grid-row: span 4; font-family: var(--display); font-weight: 900; font-size: 22px; text-transform: uppercase; color: var(--orange-ink); line-height: 1; min-width: 40px; }
.history .h-who { font-weight: 700; }
.history a { color: var(--text); font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.history .h-when { font-size: 12px; color: var(--muted); }
.history .h-note { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; white-space: pre-wrap; }

.admin { border: 2px dashed var(--orange); }
.foot { text-align: center; margin: 0; font-size: 13px; }
.foot a, .hint a { color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  .reveal.pop { animation: none; }
  .btn:active { transform: none; }
}
