/* ============================================================
   SmashDay — UX redesign prototype
   Theme v3: "SEASON MODE — EMBER"
   Sports-game menu aesthetic rebuilt around the original SmashDay
   court-line orange as THE primary:
   - warm ember-charcoal ground (no blue navy — orange owns saturation)
   - orange for every action: buttons, active nav, tabs, focus, links
   - numerals stay orange and glow like sodium floodlights
   - LIVE shifts to crimson (clearly redder than brand); warning is
     yellow-gold; the grade ramp stays cool so it never competes
   Full-showtime motion; stops under prefers-reduced-motion; print
   falls back to plain paper.
   ============================================================ */

/* ---------- tokens ---------- */
:root {
  /* ground — warm blacks, ember-tinted */
  --paper: #0d0a07;
  --paper-deep: #161009;
  --card: #1a130d;
  --line: rgba(255, 190, 140, 0.12);
  --line-strong: rgba(255, 190, 140, 0.26);

  /* ink = text, warm white on dark */
  --ink: #f7efe7;
  --ink-soft: #c2b3a4;
  --ink-faint: #877766;

  /* action — THE orange */
  --act: #ff5c1a;
  --act-deep: #d94a12;
  --act-wash: rgba(255, 92, 26, 0.14);
  --act-glow: rgba(255, 92, 26, 0.2);

  /* energy = the same orange family; numerals glow like floodlights */
  --volt: #ff5c1a;
  --volt-glow: rgba(255, 92, 26, 0.18);
  --volt-ink: #fff;

  /* status — rails-with-words, never fills */
  --ok: #35d07c;
  --ok-wash: rgba(53, 208, 124, 0.12);
  --warn: #ffd23d;
  --warn-wash: rgba(255, 210, 61, 0.1);
  --bad: #ff4059;
  --bad-wash: rgba(255, 64, 89, 0.12);
  --live: #ff2447;

  /* floodlit tokens — the deepest, hottest surface */
  --night: #080503;
  --night-card: #17100a;
  --night-line: rgba(255, 190, 140, 0.15);
  --night-ink: #fbf4ec;
  --night-soft: #b3a08c;

  /* team colours — vivid categorical, none in the brand-orange band */
  --team-1: #f4649c;
  --team-2: #ffd23d;
  --team-3: #a8e05f;
  --team-4: #3ddc84;
  --team-5: #4dc3ff;
  --team-6: #9d8bfa;
  --team-7: #e26ee0;
  --team-8: #cfc09a;

  /* grade colours — cool ordinal ramp, never competes with primary */
  --grade-1: #5b8bff;
  --grade-2: #38bdf8;
  --grade-3: #2dd4bf;
  --grade-4: #34d399;
  --grade-5: #a3e635;
  --grade-6: #facc15;
  --grade-7: #fb7185;
  --grade-8: #f43f5e;
  --grade-mixed: #c084fc;
  --grade-none: #8a7a6d;

  /* role colours — line-work only */
  --role-organizer: #ffd23d;
  --role-admin: #b794f6;
  --role-treasurer: #35d07c;
  --role-referee: #4dc3ff;
  --role-captain: #f4649c;
  --role-player: #22d3ee;
  --role-spectator: #a89e91;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 0 rgba(255, 200, 150, 0.05) inset, 0 10px 30px rgba(5, 2, 0, 0.55);

  --font-display: "Kanit", "Arial Narrow", sans-serif;
  --font-hud: "Chakra Petch", "Kanit", sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "Spline Sans Mono", ui-monospace, monospace;
}

/* ---------- reset & ground ---------- */
* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: linear-gradient(175deg, #171009 0%, #0d0a07 40%, #080604 100%) fixed;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  position: relative;
}
/* drifting stadium-light glows — ember and coal */
body::before, body::after {
  content: ""; position: fixed; z-index: -1; pointer-events: none;
  width: 60vmax; height: 60vmax; border-radius: 50%;
  filter: blur(60px); opacity: 0.35;
}
body::before {
  top: -25vmax; left: -18vmax;
  background: radial-gradient(circle, rgba(255, 92, 26, 0.16), transparent 62%);
  animation: drift-a 26s ease-in-out infinite alternate;
}
body::after {
  bottom: -30vmax; right: -20vmax;
  background: radial-gradient(circle, rgba(255, 170, 60, 0.1), transparent 62%);
  animation: drift-b 32s ease-in-out infinite alternate;
}
@keyframes drift-a { to { transform: translate(9vmax, 7vmax) scale(1.12); } }
@keyframes drift-b { to { transform: translate(-8vmax, -6vmax) scale(1.08); } }

img, svg { max-width: 100%; display: block; }
a { color: #ffa268; text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; }
:focus-visible { outline: 2px solid var(--act); outline-offset: 2px; }
::selection { background: var(--act); color: #fff; }

/* ---------- type ---------- */
.display, h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.01em; }
h1 {
  font-size: 28px; font-weight: 800; line-height: 1.12;
  font-style: italic; text-transform: uppercase; letter-spacing: 0.01em;
}
h2 { font-size: 19px; font-weight: 750; line-height: 1.2; }
h3 { font-size: 16px; font-weight: 700; }
.eyebrow {
  font-family: var(--font-hud);
  font-size: 11px; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-faint);
}
.sub { color: var(--ink-soft); font-size: 14px; }
.fine { color: var(--ink-faint); font-size: 12.5px; }
.figure { font-variant-numeric: tabular-nums; font-weight: 600; }
.figure-xl {
  font-family: var(--font-display); font-style: italic;
  font-weight: 900; font-size: 44px; line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--volt);
  text-shadow: 0 0 10px var(--volt-glow);
}
.mono { font-family: var(--font-mono); }

/* ---------- layout ---------- */
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.page { padding-top: 20px; padding-bottom: 96px; display: grid; gap: 18px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.grid-2 { display: grid; gap: 16px; }
@media (min-width: 760px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.grid-3 { display: grid; gap: 12px; grid-template-columns: repeat(3, 1fr); }
.stack { display: grid; gap: 10px; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.spread { flex: 1; }

/* content + action column, stacking on phones */
.split-cta { display: grid; gap: 14px; align-items: center; }
@media (min-width: 600px) { .split-cta { grid-template-columns: 1fr auto; } }

/* staggered entrance — the season-menu slide-in */
.page > * { animation: enter 0.45s cubic-bezier(0.2, 0.9, 0.25, 1) both; }
.page > *:nth-child(2) { animation-delay: 0.05s; }
.page > *:nth-child(3) { animation-delay: 0.1s; }
.page > *:nth-child(4) { animation-delay: 0.15s; }
.page > *:nth-child(5) { animation-delay: 0.2s; }
.page > *:nth-child(n+6) { animation-delay: 0.25s; }
@keyframes enter { from { opacity: 0; transform: translateY(14px); } }

/* ---------- app shell ---------- */
.shell { display: grid; min-height: 100vh; grid-template-rows: auto 1fr; }
@media (min-width: 900px) {
  .shell { grid-template-columns: 248px 1fr; grid-template-rows: 1fr; }
}
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(22, 15, 9, 0.85); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
}
@media (min-width: 900px) { .topbar { display: none; } }
.burger { background: none; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 7px 10px; color: var(--ink); }

.sidebar {
  background: linear-gradient(190deg, #1c130b, #100a06 70%);
  border-right: 1px solid var(--line);
  padding: 14px; display: flex; flex-direction: column; gap: 4px;
  position: fixed; inset: 0 auto 0 0; width: 272px; z-index: 60;
  transform: translateX(-100%); transition: transform 0.18s ease;
  overflow-y: auto;
}
.sidebar.open { transform: none; box-shadow: 0 0 0 100vmax rgba(8, 4, 1, 0.65); }
@media (min-width: 900px) {
  .sidebar { position: sticky; top: 0; height: 100vh; transform: none; width: auto; }
  .sidebar.open { box-shadow: none; }
}
.brand { display: flex; align-items: baseline; gap: 6px; padding: 6px 8px 14px; }
.brand b {
  font-family: var(--font-display); font-style: italic;
  font-weight: 900; font-size: 20px; letter-spacing: -0.01em; color: var(--ink);
}
.brand span { color: var(--act); font-size: 20px; line-height: 0; text-shadow: 0 0 6px var(--act-glow); }

.nav-group { padding: 12px 8px 4px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: var(--radius-sm);
  color: var(--ink-soft); font-size: 14.5px; font-weight: 550;
  border-left: 3px solid transparent;
}
.nav-item:hover { background: rgba(255, 190, 140, 0.06); color: var(--ink); text-decoration: none; }
.nav-item.active {
  background: var(--act-wash); color: #fff; font-weight: 650;
  border-left-color: var(--act);
}
.nav-item .soon {
  margin-left: auto; font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
  color: var(--ink-faint); border: 1px solid var(--line-strong);
  border-radius: 99px; padding: 1px 7px;
}
.nav-item .count {
  margin-left: auto; min-width: 20px; text-align: center;
  background: var(--act); color: var(--volt-ink); border-radius: 99px;
  font-size: 11.5px; font-weight: 800; padding: 1px 6px;
  box-shadow: 0 0 6px var(--act-glow);
}

.shell-foot { margin-top: auto; display: grid; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.tourn-tile {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: rgba(255, 190, 140, 0.04); color: var(--ink);
}
.tourn-tile:hover { text-decoration: none; border-color: var(--act); box-shadow: 0 0 0 1px var(--act-glow); }
.tourn-tile .mono-sq {
  width: 34px; height: 34px; border-radius: 8px;
  background: linear-gradient(135deg, var(--act), #ff8a3d); color: #fff;
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 800;
}
.person-row { display: flex; align-items: center; gap: 10px; padding: 6px 10px; color: var(--ink); }
.person-row:hover { text-decoration: none; background: rgba(255, 190, 140, 0.06); border-radius: var(--radius-sm); }
.face {
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 190, 140, 0.07); border: 1.5px solid var(--role, var(--ink-faint));
  color: var(--role, var(--ink-soft)); font-size: 12px; font-weight: 700;
}
.role-label { font-size: 12px; font-weight: 600; color: var(--role, var(--ink-soft)); }

/* sync strip — the offline-first cue, on every screen */
.sync-strip {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; padding: 7px 10px; border-radius: var(--radius-sm);
}
.sync-strip .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.sync-strip[data-sync="saved"] { color: var(--ink-faint); }
.sync-strip[data-sync="saved"] .dot { background: var(--ok); box-shadow: none; }
.sync-strip[data-sync="pending"] { color: var(--warn); background: var(--warn-wash); }
.sync-strip[data-sync="pending"] .dot { background: var(--warn); }
.sync-strip[data-sync="refused"] { color: var(--bad); background: var(--bad-wash); }
.sync-strip[data-sync="refused"] .dot { background: var(--bad); }

.main { min-width: 0; }

/* ---------- cards & panels ---------- */
.card {
  background: linear-gradient(165deg, #1e150d 0%, #171009 60%, #130d08 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 16px; border-bottom: 1px solid var(--line);
}
.card-body { padding: 14px 16px; display: grid; gap: 12px; }
.card-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 16px; border-bottom: 1px solid var(--line);
}
.card-row:last-child { border-bottom: 0; }
.card-row.link { color: inherit; }
.card-row.link:hover { background: rgba(255, 190, 140, 0.05); text-decoration: none; }
.card-foot { padding: 12px 16px; border-top: 1px solid var(--line); }

/* hype panel — deliberate emphasis, reserved for rules a user acts on */
.block-ink {
  background: linear-gradient(120deg, var(--act), #ff8a3d);
  color: #fff; border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: 0 0 16px var(--act-glow);
}
.block-ink .fine, .block-ink .sub { color: rgba(255, 255, 255, 0.82); }
.block-ink a { color: #fff; text-decoration: underline; }

/* ---------- status rails — panel surface + coloured edge + a word ---------- */
.rail {
  display: flex; gap: 10px; align-items: flex-start;
  background: linear-gradient(165deg, #1d140c, #150f09);
  border: 1px solid var(--line);
  border-inline-start: 4px solid var(--ink-faint);
  border-radius: var(--radius-sm); padding: 10px 14px; font-size: 14px;
}
.rail b { font-weight: 650; }
.rail-ok { border-inline-start-color: var(--ok); }
.rail-ok b { color: var(--ok); }
.rail-warn { border-inline-start-color: var(--warn); }
.rail-warn b { color: var(--warn); }
.rail-bad { border-inline-start-color: var(--bad); }
.rail-bad b { color: var(--bad); }
.rail-live { border-inline-start-color: var(--live); box-shadow: none; }
.rail-live b { color: var(--live); }

/* LIVE chip — crimson is reserved for this */
.live-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-hud);
  font-size: 11px; font-weight: 700; letter-spacing: 0.1em;
  color: var(--live); text-transform: uppercase;
  text-shadow: 0 0 6px rgba(255, 36, 71, 0.25);
}
.live-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--live);
  box-shadow: 0 0 5px rgba(255, 36, 71, 0.5); animation: pulse 1.4s ease infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: var(--radius-sm); padding: 9px 16px;
  font-weight: 650; font-size: 14.5px; border: 1px solid transparent;
  text-decoration: none; position: relative; overflow: hidden;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.97); }
.btn-solid {
  background: linear-gradient(120deg, var(--act), #ff8a3d);
  color: #fff; box-shadow: 0 3px 12px var(--act-glow);
}
.btn-solid:hover { box-shadow: 0 4px 16px var(--act-glow); }
.btn-solid::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
  transform: translateX(-120%);
}
.btn-solid:hover::after { animation: shine 0.7s ease; }
@keyframes shine { to { transform: translateX(120%); } }
.btn-ghost { background: rgba(255, 190, 140, 0.05); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--act); box-shadow: 0 0 0 1px var(--act-glow); }
.btn-quiet { background: none; color: #ffa268; padding: 9px 10px; }
.btn-danger { background: rgba(255, 64, 89, 0.08); color: var(--bad); border-color: var(--bad); }
.btn-danger:hover { background: var(--bad-wash); box-shadow: none; }
.btn-big { padding: 13px 22px; font-size: 16px; border-radius: var(--radius-sm); }
.btn-sm { padding: 5px 11px; font-size: 13px; }
.btn[disabled], .btn.disabled { opacity: 0.4; pointer-events: none; }
.btn-hint { font-size: 12.5px; color: var(--ink-faint); }

/* ---------- forms ---------- */
.field { display: grid; gap: 5px; }
.field > label { font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.input, select.input, textarea.input {
  background: rgba(10, 6, 3, 0.7); border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); padding: 9px 12px; font-size: 15px;
  width: 100%; color: var(--ink);
}
.input::placeholder { color: var(--ink-faint); }
.input:focus { border-color: var(--act); outline: none; box-shadow: 0 0 0 3px var(--act-wash); }
select.input option { background: #171009; color: var(--ink); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--act); }

/* ---------- chips & filters ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line-strong); border-radius: 99px;
  background: rgba(255, 190, 140, 0.04); color: var(--ink-soft);
  padding: 5px 13px; font-size: 13px; font-weight: 550;
}
.chip:hover { border-color: var(--act); color: var(--ink); text-decoration: none; }
.chip-on {
  background: var(--act); border-color: var(--act); color: var(--volt-ink); font-weight: 700;
  box-shadow: 0 0 8px var(--act-glow);
}
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- badges ---------- */
.team-badge {
  width: 30px; height: 30px; border-radius: 8px; flex: none;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: 12px;
  color: #170d05; background: var(--tc, var(--ink-faint));
  box-shadow: 0 0 14px color-mix(in srgb, var(--tc, transparent) 20%, transparent);
}
.team-badge.lg { width: 44px; height: 44px; font-size: 16px; border-radius: 10px; }
.team-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--tc, var(--ink-faint)); color: #170d05;
  border-radius: 99px; padding: 3px 11px; font-size: 12.5px; font-weight: 700;
}
.grade-badge {
  min-width: 24px; height: 24px; padding: 0 6px; border-radius: 6px; flex: none;
  display: inline-grid; place-items: center;
  background: var(--gc, var(--grade-none)); color: #10130a;
  font-family: var(--font-display); font-weight: 800; font-size: 12px;
}
.grade-badge.hollow { background: none; border: 1.5px dashed var(--ink-faint); color: var(--ink-faint); }
.grade-pick {
  width: 38px; height: 38px; border-radius: 9px; border: 2px solid transparent;
  background: var(--gc); color: #10130a;
  font-family: var(--font-display); font-weight: 800; font-size: 15px;
  opacity: 0.35; transition: opacity 0.12s ease, box-shadow 0.12s ease;
}
.grade-pick.on {
  opacity: 1; border-color: #fff;
  box-shadow: 0 0 16px color-mix(in srgb, var(--gc) 35%, transparent);
}
.grade-pick:hover { opacity: 0.85; }

/* ---------- stat tiles ---------- */
.stat-tile {
  background: linear-gradient(165deg, #1e150d, #130d08);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px;
  position: relative; overflow: hidden;
}
.stat-tile::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--act), #ffd23d);
  opacity: 0.85;
}
.stat-tile .figure-xl { font-size: 34px; }
@media (min-width: 760px) { .stat-tile .figure-xl { font-size: 44px; } }

/* ---------- tables ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; font-family: var(--font-hud);
  font-size: 11px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-faint);
  padding: 8px 10px; border-bottom: 1px solid var(--line-strong);
}
.table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table-scroll { overflow-x: auto; }
.form-strip { display: inline-flex; gap: 3px; }
.form-strip i {
  width: 18px; height: 18px; border-radius: 4px; font-style: normal;
  display: grid; place-items: center; font-size: 10.5px; font-weight: 800; color: #10130a;
}
.form-strip .w { background: var(--ok); box-shadow: none; }
.form-strip .d { background: var(--ink-faint); }
.form-strip .l { background: var(--bad); color: #fff; }

/* ---------- tabs ---------- */
.tab-bar {
  display: flex; gap: 4px;
  background: rgba(10, 6, 3, 0.8); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 4px;
}
.tab-item {
  flex: 1; text-align: center; padding: 8px 12px; border-radius: 7px;
  font-weight: 600; font-size: 14px; color: var(--ink-soft); border: 0; background: none;
}
.tab-item:hover { text-decoration: none; color: var(--ink); }
.tab-item.active {
  background: linear-gradient(120deg, var(--act), #ff8a3d); color: #fff;
  box-shadow: 0 2px 8px var(--act-glow);
}

/* ---------- stepper (XP-bar energy) ---------- */
.step-track { display: flex; gap: 5px; }
.step-seg { height: 6px; flex: 1; border-radius: 99px; background: rgba(255, 190, 140, 0.13); }
.step-seg.done { background: var(--ok); box-shadow: none; }
.step-seg.now {
  background: linear-gradient(90deg, var(--act), #ffd23d);
  box-shadow: 0 0 6px var(--act-glow);
}

/* ---------- code / link objects ---------- */
.code-hero {
  font-family: var(--font-display); font-style: italic; font-weight: 900;
  font-size: clamp(28px, 8.5vw, 42px); letter-spacing: 0.06em; line-height: 1;
  font-variant-numeric: tabular-nums; white-space: nowrap;
  color: var(--volt); text-shadow: 0 0 10px var(--volt-glow);
}
.link-object {
  border: 2px solid var(--act); border-radius: var(--radius-sm);
  background: rgba(255, 92, 26, 0.06); padding: 12px 14px;
  font-family: var(--font-mono); font-size: 13.5px; word-break: break-all;
  box-shadow: 0 0 10px rgba(255, 92, 26, 0.07);
}

/* ---------- floodlit (courtside — the most intense surface) ---------- */
.floodlit {
  background: linear-gradient(170deg, #120b06, #080503);
  color: var(--night-ink);
  border-radius: var(--radius);
  border: 1px solid var(--night-line);
}
.floodlit .card, .floodlit.card {
  background: linear-gradient(165deg, #1d130b, #120c07);
  border-color: var(--night-line); box-shadow: none;
}
.floodlit .sub, .floodlit .fine { color: var(--night-soft); }
.figure-volt {
  font-family: var(--font-display); font-style: italic; font-weight: 900;
  color: var(--volt); font-variant-numeric: tabular-nums; line-height: 1;
  text-shadow: 0 0 12px var(--volt-glow);
}
.floodlit hr, .floodlit .hairline { border-color: var(--night-line); }
body.floodlit-page { background: linear-gradient(175deg, #150d07, #080503 70%) fixed; color: var(--night-ink); }

/* scoring tap zones */
.tap-zone {
  min-height: 148px; width: 100%; border-radius: 16px;
  background: linear-gradient(165deg, #201409 0%, #130c07 100%);
  border: 1px solid var(--night-line);
  color: var(--night-ink); display: flex; align-items: center; gap: 16px;
  padding: 18px 20px; text-align: left;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.tap-zone:hover { box-shadow: 0 0 0 1px var(--act-glow); }
.tap-zone:active { transform: scale(0.985); background: #2a1a0c; }
.tap-zone .pts { font-size: 76px; margin-left: auto; }
@media (min-width: 760px) { .tap-zone .pts { font-size: 96px; } }
.serve-dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--volt);
  box-shadow: 0 0 5px var(--volt-glow); display: inline-block;
}
.game-pip { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--night-soft); display: inline-block; }
.game-pip.won { background: var(--volt); border-color: var(--volt); box-shadow: 0 0 5px var(--volt-glow); }

/* ---------- misc ---------- */
.hairline { border: 0; border-top: 1px solid var(--line); }
.expando { border: 1px solid var(--line); border-radius: var(--radius-sm); background: linear-gradient(165deg, #1d140c, #150f09); }
.expando > summary {
  list-style: none; cursor: pointer; padding: 11px 14px;
  display: flex; align-items: center; gap: 10px; font-weight: 600;
}
.expando > summary::-webkit-details-marker { display: none; }
.expando > summary::after { content: "▾"; margin-left: auto; color: var(--ink-faint); }
.expando[open] > summary::after { content: "▴"; }
.expando .expando-body { padding: 4px 14px 14px; display: grid; gap: 12px; }

.tick-ring { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-faint); }
.tick-ring .ring { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--ok); box-shadow: none; }
.tick-ring.stale { color: var(--warn); }
.tick-ring.stale .ring { border-color: var(--warn); box-shadow: none; }

.empty {
  text-align: center; padding: 40px 20px; display: grid; gap: 10px; justify-items: center;
  color: var(--ink-soft);
}
.empty h2 { color: var(--ink); }

/* prototype control bar — not part of the product */
.protobar { position: fixed; right: 12px; bottom: 12px; z-index: 90; font-size: 12.5px; }
.protobar-panel {
  background: #161009; color: var(--ink); border: 1px solid var(--line-strong); border-radius: 12px;
  padding: 12px 14px; display: none; gap: 10px; min-width: 240px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.55); margin-bottom: 8px;
}
.protobar.open .protobar-panel { display: grid; }
.protobar-toggle {
  background: linear-gradient(120deg, var(--act), #ff8a3d); color: #fff; border: 0; border-radius: 99px;
  padding: 8px 14px; font-weight: 700; font-size: 12px; letter-spacing: 0.06em;
  float: right; box-shadow: 0 3px 10px var(--act-glow);
}
.protobar select {
  width: 100%; background: #0b0704; color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: 6px; padding: 6px 8px; font-size: 12.5px;
}
.protobar label { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); }
.protobar a { color: #ffa268; }

/* refusal panel (honest refusals) */
.refusal { max-width: 460px; margin: 60px auto; text-align: center; display: grid; gap: 12px; justify-items: center; }

/* ---------- motion off ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- print: the draw sheet goes back to paper ---------- */
@media print {
  .sidebar, .topbar, .protobar, .no-print { display: none !important; }
  body { background: #fff !important; color: #111 !important; }
  body::before, body::after { display: none !important; }
  .card, .rail, .expando, .stat-tile { background: #fff !important; border-color: #ccc !important; box-shadow: none !important; }
  .sub, .fine, .eyebrow { color: #555 !important; }
  .figure-xl, .code-hero { color: #111 !important; text-shadow: none !important; }
  a { color: #111 !important; }
}
