:root {
  --bg: #0d1f16; --surface: #163126; --surface-2: #1f4234; --ink: #f1f3ee; --ink-2: #9db8a8; --line: #24463a;
  --accent: #f2c14e; --accent-ink: #1a1200; --ok: #86efac; --warn: #f2c14e; --bad: #ff6b6b; --info: #9dd6b5;
  --felt: #1f7a45; --felt-2: #176238; --grid: #0f4a29; --frame: #2a1a10; --frame-2: #4a2f1c;
  --disc-black: #111111; --disc-white: #f5f5f0; --rim: #6e6e68; --gold: #f2c14e;
  --font-display: "Josefin Sans", "Nunito Sans", sans-serif; --font-ui: "Nunito Sans", system-ui, sans-serif;
}
:root[data-theme="light"] { --bg: #e4ece4; --surface: #ffffff; --surface-2: #d3e1d5; --ink: #10231a; --ink-2: #4f6a5c; --line: #bfd2c4; --accent: #a8730a; --accent-ink: #fff; --felt: #2a8a50; --felt-2: #1f7a45; --grid: #145a32; --frame: #5a3a22; --frame-2: #7a5236; --rim: #8a8a82; }
:root[data-contrast="1"] { --grid: #072e18; --felt: #23864b; --ink-2: #c4d8cb; }
body { background: radial-gradient(ellipse at 50% 20%, #143324 0%, var(--bg) 60%); }
:root[data-theme="light"] body { background: radial-gradient(ellipse at 50% 20%, #ffffff 0%, var(--bg) 65%); }
.play { background: radial-gradient(ellipse at 50% 45%, #143324 0%, var(--bg) 65%); }
:root[data-theme="light"] .play { background: radial-gradient(ellipse at 50% 45%, #f3f7f2 0%, var(--bg) 70%); }
.logo { display: flex; justify-content: center; margin-bottom: -6px; } .logo canvas { width: 240px; height: 96px; }
.title { font-size: clamp(2.8rem, 14vw, 4.8rem); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); text-shadow: 0 2px 0 rgba(0,0,0,.35), 0 0 26px color-mix(in oklab, var(--accent) 35%, transparent); }
:root[data-theme="light"] .title { text-shadow: none; }
.tagline { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; letter-spacing: .08em; color: var(--ink-2); }
.modes { grid-template-columns: 1fr 1fr; }
.mode b { font-family: var(--font-display); letter-spacing: .04em; }
/* phone: the board keeps its square, the rails share the spare height so the seats sit close to the board */
.play .stage { flex: 0 1 100vw; }
.play .rail { flex: 1 1 0; }
.play .stage-canvas { box-shadow: 0 1px 0 rgba(255,255,255,.08) inset, 0 26px 50px rgba(0,0,0,.55), 0 6px 12px rgba(0,0,0,.35); border-radius: 14px; }
/* live count pill: black count · proportional bar · white count */
.play .hud .btn-icon { flex: 0 0 auto; }
.count-pill { gap: 8px; padding: 0 12px; font-family: var(--font-ui); flex: 0 1 auto; min-width: 0; }
.count-pill .tnum { min-width: 2ch; text-align: center; font-size: 1rem; }
.count-pill #count-0 { color: var(--ink); text-shadow: 0 0 0 var(--ink); } 
.count-bar { position: relative; flex: 1 1 60px; min-width: 40px; max-width: 110px; height: 10px; border-radius: 5px; background: var(--disc-white); overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0,0,0,.3), inset 0 1px 2px rgba(0,0,0,.25); }
.count-bar i { position: absolute; inset: 0; width: calc(var(--k) * 100%); background: var(--disc-black); transition: width .45s cubic-bezier(.2,.8,.2,1); }
/* seats: a disc avatar plus a live count */
.seat { max-width: 66vw; }
.seat .avatar.disc { background: radial-gradient(circle at 35% 30%, color-mix(in oklab, var(--pc) 70%, white) 0%, var(--pc) 45%, color-mix(in oklab, var(--pc) 60%, black) 100%); box-shadow: 0 3px 0 var(--rim), 0 4px 6px rgba(0,0,0,.4); }
.seat .who small { white-space: nowrap; }
.seat .count { margin-left: 2px; padding: 2px 9px; border-radius: var(--r-pill); background: rgba(0,0,0,.28); font-size: .85rem; font-weight: 800; color: var(--ink); }
:root[data-theme="light"] .seat .count { background: rgba(0,0,0,.08); }
.seat[data-active="true"] { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 0 18px color-mix(in oklab, var(--gold) 45%, transparent); }
.seat[data-pass="true"] { animation: seat-pass .7s ease-in-out 2; }
@keyframes seat-pass { 50% { border-color: var(--bad); box-shadow: 0 0 0 1px var(--bad), 0 0 18px color-mix(in oklab, var(--bad) 50%, transparent); } }
.seat-row[data-seat="0"] .swatch { --pc: var(--disc-black); box-shadow: inset 0 -3px 0 rgba(0,0,0,.4), 0 0 0 1px rgba(255,255,255,.2); }
.seat-row[data-seat="1"] .swatch { --pc: var(--disc-white); }
/* toasts on the play screen sit below the HUD instead of over it */
body:has(.play:not([hidden])) .toast-host { top: 58px; }
.overlay h2 { font-family: var(--font-display); font-size: clamp(2.2rem, 10vw, 3.4rem); letter-spacing: .1em; color: var(--ink); }
.overlay p { color: var(--ink-2); font-weight: 600; }
.result-verdict { font-family: var(--font-ui); font-size: 1rem; color: var(--ink); }
.sheet-title { font-family: var(--font-display); letter-spacing: .08em; text-transform: uppercase; }
.best-line { gap: 14px; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
@container screen (min-width: 640px) { .board-home .modes { grid-template-columns: 1fr 1fr; } }
