
        body { background: #0a0a14; }
        .glass { background: rgba(30,30,46,0.6); backdrop-filter: blur(16px); border: 1px solid rgba(255,255,255,0.06); }

        /* ── board: fixed 32×32 cell DOM; only cell classes change per tick ──
           gap is 0 so snake segments can JOIN; empty cells re-create the grid
           look with their own margin, and walls stay flush to tile solidly. */
        .board {
            display: grid;
            grid-template-columns: repeat(32, 22px);
            grid-auto-rows: 22px;
            gap: 0;
            padding: 3px;
            border-radius: 12px;
            width: max-content;
            position: relative;
            background: #0d0d16;
            --r: 9px;   /* snake corner radius; one override on phones */
        }
        /* vignette + scanlines, absolutely positioned so it is NOT a grid item */
        .board::after {
            content: ""; position: absolute; inset: 0; pointer-events: none;
            border-radius: 12px; z-index: 2;
            background: repeating-linear-gradient(0deg, transparent 0 2px, #00000012 2px 3px);
            box-shadow: inset 0 0 45px #00000055;
        }
        .cell { position: relative; }
        .c-e { background: #171724; border-radius: 3px; margin: 0.5px; }
        .c-w { background: #3a1d24; box-shadow: inset 0 0 4px #000; }
        .c-v { background: #2a1219; animation: warnpulse 0.8s ease-in-out infinite; }
        @keyframes warnpulse { 0%,100% { background: #2a1219; } 50% { background: #7a2830; } }
        .c-f { background: radial-gradient(circle at 35% 30%, #ffe08a, #e09b00); margin: 2px;
               box-shadow: 0 0 8px #f0b100aa; border-radius: 50%; animation: foodpulse 1.2s ease-in-out infinite; }
        .c-y { background: radial-gradient(circle at 35% 30%, #8ec2ff, #2563eb); margin: 2px;
               border-radius: 50%; animation: berrypulse 1s ease-in-out infinite;
               box-shadow: 0 0 10px #3b82f6cc, 0 0 20px #3b82f666; }
        @keyframes berrypulse { 0%,100% { transform: scale(0.75); } 50% { transform: scale(1.1); } }
        .c-g { background: radial-gradient(circle at 35% 30%, #fff3b0, #d4a600); margin: 1px;
               border-radius: 50%; animation: goldspin 0.8s ease-in-out infinite;
               box-shadow: 0 0 12px #ffd700cc, 0 0 24px #ffd70066; }
        @keyframes foodpulse { 0%,100% { transform: scale(0.85); } 50% { transform: scale(1.05); } }
        @keyframes goldspin { 0%,100% { transform: scale(0.8); } 50% { transform: scale(1.15); } }

        /* corpse pellets — a DIAMOND, so remains never read as an apple */
        .c-k { background: #c2544a; margin: 5px; border-radius: 2px;
               transform: rotate(45deg); box-shadow: 0 0 6px #c2544a88; }

        /* death flash — the ring of empty cells around a kill */
        .c-boom { background: #e5484d; border-radius: 3px; margin: 0.5px;
                  animation: boom 0.45s ease-out 1 forwards; }
        @keyframes boom {
            0%   { opacity: 0.85; transform: scale(1); }
            100% { opacity: 0;    transform: scale(0.4); }
        }

        /* ── snakes: colour class + join class (border-radius) + optional aura ──
           bright near the head, darker over the tail third */
        .c-b1 { background: linear-gradient(145deg, #3aa77f, #276f55); }
        .c-t1 { background: linear-gradient(145deg, #26785b, #17513c); }
        .c-b2 { background: linear-gradient(145deg, #c4661f, #964a16); }
        .c-t2 { background: linear-gradient(145deg, #97501a, #6e3812); }
        .c-b3 { background: linear-gradient(145deg, #8b47d0, #63309a); }
        .c-t3 { background: linear-gradient(145deg, #67349b, #472170); }
        .c-b4 { background: linear-gradient(145deg, #218cbb, #14607f); }
        .c-t4 { background: linear-gradient(145deg, #17688a, #0e4a63); }
        /* specular sheen — body/tail only; heads use ::before/::after for eyes */
        .c-b1::after, .c-b2::after, .c-b3::after, .c-b4::after,
        .c-t1::after, .c-t2::after, .c-t3::after, .c-t4::after {
            content: ""; position: absolute; inset: 0; border-radius: inherit;
            background: linear-gradient(180deg, #ffffff16, transparent 55%);
        }

        /* heads carry TWO classes: colour (c-h<slot>) + eye direction (c-d<dir>),
           so a 4th player costs one colour rule instead of four combined ones. */
        .c-h1 { background: radial-gradient(circle at 35% 30%, #6fe0b4, #3a9d78); box-shadow: 0 0 10px #44b78b88, 0 0 20px #44b78b40; }
        .c-h2 { background: radial-gradient(circle at 35% 30%, #ffa15c, #cc5f18); box-shadow: 0 0 10px #e5732488, 0 0 20px #e5732440; }
        .c-h3 { background: radial-gradient(circle at 35% 30%, #d09bff, #8f3fe0); box-shadow: 0 0 10px #a855f788, 0 0 20px #a855f740; }
        .c-h4 { background: radial-gradient(circle at 35% 30%, #8fdcff, #1e93c9); box-shadow: 0 0 10px #38bdf888, 0 0 20px #38bdf840; }

        /* just ate — a brief lift on the head. The head occupies a NEW cell each
           move, so this restarts every tick for the few moves the flag lasts;
           anything stronger than ~1.5 desaturates the snake to white. */
        .c-ate { animation: atepop 0.3s ease-out 1; }
        @keyframes atepop { 0% { filter: brightness(1.55) saturate(1.3); } 100% { filter: none; } }
        /* combo running — the whole snake glows */
        .c-combo { box-shadow: 0 0 5px #f0b1006b; }

        /* ── joins: a corner rounds only when NEITHER adjacent side continues ──
           order is top-left top-right bottom-right bottom-left */
        .c-jo  { border-radius: var(--r); }
        .c-jt  { border-radius: 0 0 var(--r) var(--r); }
        .c-jr  { border-radius: var(--r) 0 0 var(--r); }
        .c-jb  { border-radius: var(--r) var(--r) 0 0; }
        .c-jl  { border-radius: 0 var(--r) var(--r) 0; }
        .c-jtr { border-radius: 0 0 0 var(--r); }
        .c-jtl { border-radius: 0 0 var(--r) 0; }
        .c-jrb { border-radius: var(--r) 0 0 0; }
        .c-jbl { border-radius: 0 var(--r) 0 0; }
        .c-jtb, .c-jrl { border-radius: 0; }
        /* The sheen runs top-down, which bands a VERTICAL run into stacked
           tiles. Rotate it 90° there so the highlight runs along the body.
           Scoped to body/tail classes on purpose: a head's ::after is an EYE. */
        .c-b1.c-jtb::after, .c-b2.c-jtb::after, .c-b3.c-jtb::after, .c-b4.c-jtb::after,
        .c-t1.c-jtb::after, .c-t2.c-jtb::after, .c-t3.c-jtb::after, .c-t4.c-jtb::after {
            background: linear-gradient(90deg, #ffffff16, transparent 55%);
        }
        .c-du::before, .c-dd::before, .c-dl::before, .c-dr::before,
        .c-du::after,  .c-dd::after,  .c-dl::after,  .c-dr::after {
            content: ""; position: absolute; width: 4px; height: 4px;
            background: #0a0a14; border-radius: 50%;
        }
        .c-du::before { top: 3px; left: 4px; }
        .c-du::after  { top: 3px; right: 4px; }
        .c-dd::before { bottom: 3px; left: 4px; }
        .c-dd::after  { bottom: 3px; right: 4px; }
        .c-dl::before { left: 3px; top: 4px; }
        .c-dl::after  { left: 3px; bottom: 4px; }
        .c-dr::before { right: 3px; top: 4px; }
        .c-dr::after  { right: 3px; bottom: 4px; }

        /* dead snakes flash red */
        .c-x1, .c-x2, .c-x3, .c-x4 { background: #e5484d; animation: deadflash 0.5s ease-in-out 3; }
        @keyframes deadflash { 0%,100% { opacity: 1; } 50% { opacity: 0.25; } }

        .board-shake { animation: shake 0.4s ease-in-out 1; }
        @keyframes shake {
            0%,100% { transform: translate(0,0); }
            20% { transform: translate(-6px,2px); }
            40% { transform: translate(5px,-3px); }
            60% { transform: translate(-4px,-2px); }
            80% { transform: translate(3px,2px); }
        }

        /* ── overlay & countdown ── */
        .overlay {
            position: absolute; inset: 34px 0 0 0; z-index: 20;
            display: flex; flex-direction: column; align-items: center; justify-content: center;
            text-align: center; border-radius: 12px;
            background: rgba(10,10,20,0.82); backdrop-filter: blur(3px);
            transition: opacity .15s ease;
        }
        .overlay.hidden { opacity: 0; pointer-events: none; }
        .overlay.show { opacity: 1; animation: bannerin 0.3s ease-out 1; }
        .overlay.overlay-count { background: rgba(10,10,20,0.55); }
        @keyframes bannerin { from { transform: translateY(10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

        .countdown { font-size: 120px; font-weight: 800; line-height: 1; color: #44b78b;
                     text-shadow: 0 0 30px #44b78b66; margin-bottom: 8px; }
        .countdown.hidden { display: none; }
        /* three aliased keyframes so each digit swap restarts its pop */
        .count-3 { animation: pop3 0.9s ease-out 1; }
        .count-2 { animation: pop2 0.9s ease-out 1; color: #f0b100; text-shadow: 0 0 30px #f0b10066; }
        .count-1 { animation: pop1 0.9s ease-out 1; color: #e57324; text-shadow: 0 0 30px #e5732466; }
        @keyframes pop3 { from { transform: scale(1.6); opacity: 0.2; } to { transform: scale(1); opacity: 1; } }
        @keyframes pop2 { from { transform: scale(1.6); opacity: 0.2; } to { transform: scale(1); opacity: 1; } }
        @keyframes pop1 { from { transform: scale(1.6); opacity: 0.2; } to { transform: scale(1); opacity: 1; } }

        /* ── score pop ── */
        .score-num { display: inline-block; font-size: 20px; font-variant-numeric: tabular-nums;
                     transition: transform 0.15s ease, text-shadow 0.15s ease; }
        .score-num.bumped { transform: scale(1.5); text-shadow: 0 0 12px currentColor; }
        .pips { font-size: 12px; letter-spacing: 2px; opacity: 0.9; margin: 0 4px; }

        /* ── emotes: 6 fixed slots; anim-a/anim-b swap restarts the float ── */
        .emote-layer { position: absolute; inset: 34px 0 0 0; pointer-events: none; overflow: hidden; z-index: 30; }
        .emote { position: absolute; bottom: 0; font-size: 42px; opacity: 0; }
        .pos-0 { left: 10%; } .pos-1 { left: 25%; } .pos-2 { left: 40%; }
        .pos-3 { left: 55%; } .pos-4 { left: 70%; } .pos-5 { left: 85%; }
        .anim-a { animation: floata 2.2s ease-out 1 forwards; }
        .anim-b { animation: floatb 2.2s ease-out 1 forwards; }
        @keyframes floata { 0% { transform: translateY(0) scale(0.6); opacity: 0; }
                            15% { opacity: 1; transform: translateY(-60px) scale(1.1); }
                            100% { transform: translateY(-420px) scale(1); opacity: 0; } }
        @keyframes floatb { 0% { transform: translateY(0) scale(0.6); opacity: 0; }
                            15% { opacity: 1; transform: translateY(-60px) scale(1.1); }
                            100% { transform: translateY(-420px) scale(1); opacity: 0; } }

        /* ── round-2: combos, chips, predictions, leaderboard ── */
        .combo { display: inline-block; font-size: 12px; font-weight: 800; color: #f0b100;
                 opacity: 0; transform: scale(0.6); transition: all 0.15s ease; }
        .combo.show { opacity: 1; transform: scale(1.2); text-shadow: 0 0 8px #f0b10088; }
        .chip { display: inline-block; font-size: 9px; text-transform: uppercase; letter-spacing: 1px;
                padding: 1px 6px; border-radius: 999px; opacity: 0; transition: opacity 0.2s ease; }
        .chip.show { opacity: 1; }
        .chip-p1 { background: #44b78b22; color: #44b78b; border: 1px solid #44b78b55; }
        .chip-p2 { background: #e5732422; color: #e57324; border: 1px solid #e5732455; }
        .predict-row { margin-top: 14px; }
        .predict-row.hidden { display: none; }
        .predict-btn { font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 999px; margin: 0 4px; }
        .predict-p1 { background: #44b78b22; color: #44b78b; border: 1px solid #44b78b66; }
        .predict-p2 { background: #e5732422; color: #e57324; border: 1px solid #e5732466; }
        .crowd { width: 220px; margin-top: 12px; }
        .crowd.hidden { display: none; }
        .crowd-track { height: 6px; border-radius: 999px; background: #e5732466; overflow: hidden; }
        .crowd-fill { height: 100%; background: #44b78b; transition: width 0.3s ease; }
        .set-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
        .set-label { font-size: 11px; color: #9ca3af; }
        .opt { font-size: 10px; padding: 2px 7px; border-radius: 999px; margin-left: 3px;
               background: rgba(255,255,255,0.05); color: #6b7280; border: 1px solid transparent; }
        .opt:hover { color: #d1d5db; }
        .opt.sel { background: #44b78b22; color: #44b78b; border-color: #44b78b66; }
        .shield { font-size: 13px; }
        .crown { font-size: 12px; }
        .feed.hidden { display: none; }
        .feed-row { font-size: 11px; color: #9ca3af; font-variant-numeric: tabular-nums;
                    padding: 1px 0; border-left: 2px solid #e5484d55; padding-left: 6px; }
        .feed-row.hidden { display: none; }
        .recent-row.hidden { display: none; }
        .lb td { padding: 2px 4px; }
        .room-row td { border-top: 1px solid rgba(255,255,255,0.05); }
        .room-row.hidden { display: none; }
        .btn-join { font-size: 12px; font-weight: 600; padding: 3px 12px; border-radius: 999px;
                    background: #44b78b22; color: #44b78b; border: 1px solid #44b78b66; }
        .btn-join:hover { background: #44b78b44; }
        .dpad { display: grid; grid-template-columns: repeat(3, 56px); grid-template-rows: repeat(2, 44px);
                gap: 6px; width: max-content; margin: 14px auto 0; }
        .dpad.hidden { display: none; }
        .pad-btn { background: rgba(255,255,255,0.07); border-radius: 10px; font-size: 16px;
                   color: #9ca3af; touch-action: manipulation; user-select: none; }
        .pad-btn:active { background: #44b78b44; color: #fff; }
        .pad-up { grid-column: 2; grid-row: 1; }
        .pad-left { grid-column: 1; grid-row: 2; }
        .pad-down { grid-column: 2; grid-row: 2; }
        .pad-right { grid-column: 3; grid-row: 2; }
        .lb tr:first-child { border-bottom: 1px solid rgba(255,255,255,0.08); }

        /* ── chrome ── */
        .btn { padding: 8px 20px; border-radius: 8px; font-weight: 600; background: #44b78b; color: #0a0a14; }
        .btn.hidden { display: none; }
        .btn-queue { background: #e57324; }
        .emote-btn { font-size: 22px; padding: 4px 10px; border-radius: 8px; background: rgba(255,255,255,0.06); }
        .emote-btn:hover { background: rgba(255,255,255,0.14); }
        .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
        .dot-p1 { background: #44b78b; }
        .dot-p2 { background: #e57324; }
        .dot-p3 { background: #a855f7; }
        .dot-p4 { background: #38bdf8; }
        .seat-row { display: flex; align-items: center; gap: 8px; }
        .seat-row.hidden { display: none; }

        /* ── scoreboard chips: one fixed slot per seat, hidden when unused ── */
        .pchip { display: inline-flex; align-items: center; gap: 5px; font-weight: 700;
                 padding: 3px 10px; border-radius: 999px; white-space: nowrap;
                 border: 1px solid transparent; background: rgba(255,255,255,0.04);
                 transition: box-shadow .2s ease, opacity .2s ease; }
        .pchip.hidden { display: none; }
        .pchip-name { font-size: 13px; }
        .pchip-1 { color: #44b78b; border-color: #44b78b44; }
        .pchip-2 { color: #e57324; border-color: #e5732444; }
        .pchip-3 { color: #a855f7; border-color: #a855f744; }
        .pchip-4 { color: #38bdf8; border-color: #38bdf844; }
        .pchip.lead { box-shadow: 0 0 0 1px currentColor, 0 0 14px -2px currentColor; }
        .pchip.down { opacity: 0.4; }   /* dead, waiting to respawn */

        /* ── scramble clock ── */
        .clock { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums;
                 color: #d1d5db; letter-spacing: 1px; }
        .clock.hidden { display: none; }
        .clock.idle { opacity: 0.45; }
        .clock.frenzy { color: #f0b100; text-shadow: 0 0 14px #f0b10088;
                        animation: frenzybeat 0.6s ease-in-out infinite; }
        @keyframes frenzybeat { 0%,100% { transform: scale(1); } 50% { transform: scale(1.12); } }
        .seat-taken { color: #44b78b; }
        .seat-open { color: #6b7280; }
        #sfx { display: none; }

        /* phone-size board: smaller cells, same fixed DOM */
        @media (max-width: 860px) {
            .board { grid-template-columns: repeat(32, 10px); grid-auto-rows: 10px; --r: 4px; }
            .c-e { border-radius: 1px; margin: 0; }
            .c-f, .c-y { margin: 1px; }
            .c-g { margin: 0; }
            .c-k { margin: 2px; }
            .c-du::before, .c-dd::before, .c-dl::before, .c-dr::before,
            .c-du::after, .c-dd::after, .c-dl::after, .c-dr::after { width: 2px; height: 2px; }
            .overlay { inset: 30px 0 0 0; }
            .countdown { font-size: 64px; }
            .emote { font-size: 28px; }
        }
    
/* Arena edition: static CSS, including layout and all visual feedback. */
:root { color-scheme: dark; --ink: #ecf4ed; --muted: #91a397; --lime: #c2f36b; --panel: #121b18; }
* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(ellipse at 20% 0%, #1c2b20 0, transparent 45%), #0b110e; color: var(--ink); font: 14px/1.5 ui-sans-serif, system-ui, sans-serif; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; border: 0; }
button, a, input, summary { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--lime); outline-offset: 4px; }
button:disabled, fieldset:disabled button { cursor: default; opacity: .55; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(32px, 4.5vw, 52px); letter-spacing: -2px; line-height: 1.12; font-weight: 750; }
h1 span { color: var(--lime); }
h2 { font-size: 20px; letter-spacing: -.5px; }
main, .site-nav, .site-footer { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }
.site-nav { display: flex; justify-content: space-between; align-items: center; min-height: 86px; border-bottom: 1px solid #ffffff12; }
.brand { display: flex; align-items: center; font-weight: 850; letter-spacing: 1px; font-size: 17px; }
.brand-light { font-weight: 400; color: var(--muted); margin-left: 4px; }
.brand-mark { display: grid; place-items: center; background: var(--lime); color: #19210e; width: 33px; height: 33px; border-radius: 9px; margin-right: 12px; font-size: 24px; transform: rotate(-7deg); }
.engine-badge, .eyebrow { font: 10px/1.5 ui-monospace, monospace; letter-spacing: 1.6px; color: var(--muted); }
a.engine-badge:hover, .site-footer a { color: var(--lime); }
.built-with p.muted { margin-bottom: 16px; }
.engine-badge i { display: inline-block; width: 6px; height: 6px; background: var(--lime); border-radius: 50%; margin-right: 6px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 38px 0 30px; }
.page-heading .eyebrow { margin-bottom: 10px; }
.page-heading .muted { margin-top: 12px; }
.text-link { color: var(--lime); white-space: nowrap; font-size: 12px; }
.muted { color: var(--muted); }.small { font-size: 11px; }.hidden { display: none !important; }
.arena-layout { display: grid; grid-template-columns: minmax(0, 1fr) 326px; gap: 28px; align-items: start; }
.play-column { min-width: 0; padding: 20px; border: 1px solid #ffffff13; border-radius: 18px; background: #101814; }
.match-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.match-status { color: var(--muted); font-size: 11px; }
.scoreboard { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 15px; }
.pchip { border-radius: 9px; padding: 8px 10px; gap: 6px; min-width: 0; }
.pchip-name { flex: 1; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.score-num { font-size: 22px; }.pips { font-size: 10px; letter-spacing: 0; margin: 0; }
.board-stage { position: relative; width: 100%; }
.board { width: 100%; aspect-ratio: 1; grid-template-columns: repeat(32, minmax(0, 1fr)); grid-template-rows: repeat(32, minmax(0, 1fr)); grid-auto-rows: auto; background: #080e0a; border: 1px solid #66845540; border-radius: 9px; padding: 4px; --r: 6px; }
.c-e { background: #172119; margin: .5px; border-radius: 1px; }
.c-w { background: #536046; box-shadow: inset 0 0 0 1px #6c7b5929; }
.board::after { border-radius: 9px; box-shadow: inset 0 0 45px #00000033; }
.overlay { inset: 0; border-radius: 9px; padding: 24px; gap: 8px; background: #08110ddc; }
.overlay h2 { font-size: clamp(18px, 3vw, 29px); text-align: center; }
.overlay p { max-width: 360px; color: #b2c4b7; text-align: center; font-size: 13px; margin-bottom: 12px; }
.overlay.overlay-count { background: #08110d99; }
.emote-layer { inset: 0; border-radius: 9px; }
.telemetry { display: grid; grid-template-columns: repeat(3, 1fr); padding: 18px 0; border-bottom: 1px solid #ffffff10; }
.telemetry > div { padding: 0 15px; border-right: 1px solid #ffffff10; }.telemetry > div:first-child { padding-left: 0; }.telemetry > div:last-child { border: 0; }
.telemetry span { display: block; color: var(--muted); font: 9px ui-monospace, monospace; letter-spacing: 1px; }
.telemetry strong { display: block; font-size: 25px; font-weight: 550; margin-top: 4px; font-variant-numeric: tabular-nums; }.telemetry small { font-size: 13px; color: var(--muted); }
.combo-panel { padding-top: 16px; }.combo-panel > div:first-child { display: flex; justify-content: space-between; font-size: 11px; }.combo-panel p { color: var(--muted); font-size: 11px; margin-top: 8px; }
.combo-track { height: 4px; background: #263322; border-radius: 3px; overflow: hidden; margin-top: 10px; }.combo-track > div { height: 100%; background: var(--lime); transition: width .1s linear; }
.controls-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 16px 0; }.control-hint { color: var(--muted); font-size: 11px; margin-bottom: 10px; }
kbd { border: 1px solid #ffffff20; border-bottom-width: 2px; border-radius: 4px; padding: 3px 5px; color: #d1dfd3; font: 10px ui-monospace, monospace; }
.dpad { margin: 0; grid-template-columns: repeat(3, 44px); grid-template-rows: repeat(2, 44px); gap: 4px; }.pad-btn { background: #202d23; color: var(--lime); border: 1px solid #405637; border-radius: 8px; touch-action: manipulation; font-size: 20px; }.pad-btn:active { background: #415c30; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; border-top: 1px solid #ffffff10; padding-top: 15px; color: var(--muted); font-size: 10px; }.legend span { display: flex; align-items: center; gap: 5px; }.legend-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }.apple { background: #e8a91d; }.gold { background: #ffdf6a; box-shadow: 0 0 6px #e8a91d88; }.phase { background: #609dff; }.rock { background: #6e7c5f; border-radius: 2px; }
.side-column { display: grid; gap: 16px; }.panel { padding: 20px; background: var(--panel); border: 1px solid #ffffff10; border-radius: 14px; }.panel > .eyebrow { margin-bottom: 12px; }.panel h2 { margin-bottom: 14px; }.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.role-line { font-size: 12px; margin-bottom: 14px; }label { color: var(--muted); font-size: 11px; display: block; margin-bottom: 6px; }input { width: 100%; min-width: 0; background: #0d1511; border: 1px solid #ffffff20; color: var(--ink); padding: 10px 12px; border-radius: 8px; }
.seats { list-style: none; padding: 0; margin: 16px 0 10px; }.seat-row { display: flex; align-items: center; gap: 7px; font-size: 12px; margin-bottom: 8px; }.seat-row .seat { margin-left: auto; font-size: 10px; text-transform: uppercase; }
.preset-list, fieldset { padding: 0; margin: 0; border: 0; min-width: 0; }.preset-list { display: grid; gap: 8px; }.preset { text-align: left; background: #18231b; color: var(--ink); border: 1px solid #ffffff12; border-radius: 9px; padding: 11px 12px; }.preset strong { display: block; font-size: 13px; }.preset span { display: block; font-size: 10px; color: var(--muted); margin-top: 3px; }.preset.selected { border-color: #8faf53; background: #26341b; }.preset.selected strong { color: var(--lime); }.preset:hover:enabled { border-color: var(--lime); }
.settings-note { color: #bea56c; font-size: 10px; min-height: 16px; margin-top: 8px; }details { margin-top: 10px; }summary { cursor: pointer; color: var(--muted); font-size: 12px; }details p { margin-top: 12px; color: var(--muted); font-size: 12px; }details fieldset { margin-top: 12px; }.set-row { display: flex; justify-content: space-between; gap: 5px; flex-wrap: wrap; }.set-label { min-width: 65px; }.opt { font-size: 10px; }.opt.sel { background: #314824; color: var(--lime); }
.btn { display: inline-block; background: var(--lime); color: #16200d; border-radius: 8px; padding: 10px 16px; font-size: 12px; font-weight: 750; }.btn:hover { filter: brightness(1.1); }.btn.secondary { background: #202d23; color: #bacbad; border: 1px solid #45543a; font-size: 11px; padding: 7px 10px; }.btn-queue { margin-top: 12px; }
.reactions { display: flex; gap: 8px; }.emote-btn { flex: 1; background: #1d2a20; border-radius: 8px; padding: 8px; font-size: 20px; }.lb { width: 100%; font-size: 10px; border-collapse: collapse; }.lb th { color: var(--muted); font-weight: 400; text-align: left; padding-bottom: 9px; }.lb td { padding: 6px 2px; }.lb td:first-child { max-width: 90px; overflow: hidden; text-overflow: ellipsis; }
.site-footer { display: flex; justify-content: space-between; gap: 16px; padding: 25px 0; margin-top: 28px; border-top: 1px solid #ffffff10; font-size: 10px; color: #718575; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.lobby-hero { padding: 64px 0 34px; max-width: 800px; }.lobby-hero h1 { font-size: clamp(38px, 6vw, 70px); margin: 15px 0; }.lobby-hero p.muted { max-width: 570px; font-size: 16px; }.lobby-actions { display: flex; gap: 15px; align-items: center; margin-top: 25px; }.lobby-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }.room-card { display: grid; grid-template-columns: 1fr auto; gap: 15px; align-items: center; border-top: 1px solid #ffffff10; padding: 18px 0; }.room-card h2 { font-size: 17px; }.room-card p { font-size: 12px; color: var(--muted); margin-top: 3px; }.room-card .room-rules { font-size: 10px; color: #a1bd80; }.room-meta { text-align: right; display: grid; gap: 8px; }.room-meta span { font-size: 10px; color: var(--muted); }.create-form { display: grid; gap: 12px; margin-top: 18px; }.recent-row { padding: 12px 0; border-top: 1px solid #ffffff10; font-size: 12px; }.recent-row span { display: block; color: var(--muted); font-size: 10px; margin-top: 4px; }
@media (max-width: 1000px) { .arena-layout { grid-template-columns: minmax(0,1fr) 290px; gap: 16px; }.play-column, .panel { padding: 15px; }.pips { display: none; }.pchip-name { font-size: 11px; } }
@media (max-width: 760px) { main, .site-nav, .site-footer { width: calc(100% - 28px); }.site-nav { min-height: 70px; }.engine-badge { font-size: 8px; letter-spacing: .5px; }.brand { font-size: 13px; }.brand-mark { width: 27px; height: 27px; margin-right: 7px; }.page-heading { padding: 28px 0 22px; }.page-heading .text-link { align-self: flex-start; margin-top: 3px; }.page-heading h1 { font-size: 33px; }.page-heading .muted { font-size: 12px; }.arena-layout, .lobby-layout { grid-template-columns: 1fr; }.side-column { grid-template-columns: repeat(2, minmax(0,1fr)); }.pips { display: inline; }.board { --r: 5px; }.site-footer { flex-direction: column; gap: 5px; }.lobby-hero { padding-top: 36px; } }
@media (max-width: 480px) { .side-column { grid-template-columns: 1fr; }.play-column { padding: 11px; }.page-heading { display: block; }.page-heading .text-link { display: inline-block; margin-top: 14px; }.engine-badge { max-width: 92px; text-align: right; }.score-num { font-size: 18px; }.pchip { padding: 6px; }.pips { font-size: 9px; }.telemetry span { font-size: 8px; letter-spacing: .5px; }.telemetry strong { font-size: 23px; }.telemetry > div { padding-inline: 10px; }.control-hint { max-width: 155px; line-height: 2.2; }.overlay { padding: 18px; }.overlay p { font-size: 11px; }.overlay h2 { font-size: 20px; }.legend { gap: 9px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; }.emote { display: none; } }

.page-heading h1 span { display: inline-block; margin-left: .12em; }

/* Theme the reusable djust audio bar to match the arcade. */
.audio-toolbar {
    margin: 0;
    --dj-audio-bg: #101a14;
    --dj-audio-text: #dcebcf;
    --dj-audio-muted: #8f9e88;
    --dj-audio-accent: #c5ef70;
    --dj-audio-border: #293729;
    --dj-audio-button: #1d2b1a;
}

.side-column .audio-toolbar [data-audio-controls] {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "toggle status" "volume level";
    width: 100%;
    padding: 12px;
    gap: 14px 10px;
}
.side-column .audio-toolbar [data-audio-toggle] { grid-area: toggle; min-width: 0; justify-content: flex-start; padding: 8px; }
.side-column .audio-toolbar [data-audio-status] { grid-area: status; min-width: 0; width: auto; padding-left: 8px; font-size: 11px; gap: 6px; }
.side-column .audio-toolbar label { grid-area: volume; min-width: 0; gap: 10px; padding-left: 8px; }
.side-column .audio-toolbar label > span { display: inline; }
.side-column .audio-toolbar [data-audio-volume] { flex: 1; width: 70px; min-width: 40px; }
.side-column .audio-toolbar [data-audio-level] { grid-area: level; justify-self: end; width: auto; padding-right: 4px; }

/* How it works */
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-link { font-size: 12px; color: var(--ink); }.nav-link:hover { color: var(--lime); }
.inline-link { color: var(--lime); }.inline-link:hover { text-decoration: underline; }
/* minmax(0, 1fr): cap every child at the page width, so the diagram and the
   code blocks scroll inside their own boxes instead of widening the page. */
.how { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; padding-bottom: 20px; }
.how-hero { padding: 56px 0 8px; }.how-hero h1 { margin: 15px 0; }
.how-lede { max-width: 680px; font-size: 16px; }
.how-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin: 30px 0 0; }
.how-stats div { background: var(--panel); border: 1px solid #ffffff10; border-radius: 12px; padding: 14px; }
.how-stats dt { font-size: 26px; font-weight: 750; color: var(--lime); letter-spacing: -1px; }
.how-stats dd { margin: 2px 0 0; font-size: 11px; color: var(--muted); }
.how-diagram h2 { margin-bottom: 18px; }
/* Scroll on small screens instead of shrinking the text to nothing. */
.arch-scroll { overflow-x: auto; }
.arch { width: 100%; min-width: 640px; height: auto; display: block; }
.arch-box { fill: #0f1714; stroke: #ffffff26; stroke-width: 1.2; }
.arch-host { stroke: var(--lime); }.arch-room { fill: #16221b; stroke: #a1bd80; }
.arch-text { fill: var(--ink); font: 600 13px ui-sans-serif, system-ui, sans-serif; }
.arch-sub { fill: var(--muted); font: 10px ui-monospace, monospace; }
.arch-label { fill: var(--muted); font: 10px ui-monospace, monospace; letter-spacing: 1.5px; }
.arch-line line, .arch-line path { stroke: #ffffff40; stroke-width: 1.4; fill: none; }
.arch-arrowhead { fill: #ffffff80; }
.arch-accent path { stroke: var(--lime); }.arch-accent-text { fill: var(--lime); }
.arch-push path { stroke: #7fb4ff; stroke-dasharray: 4 4; }.arch-push-text { fill: #7fb4ff; }
.how-section { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 28px; padding: 26px 0; border-top: 1px solid #ffffff10; scroll-margin-top: 20px; }
.how-copy h2 { margin: 10px 0 14px; }.how-copy p.muted { margin-bottom: 12px; max-width: 460px; }
.how-code { display: grid; gap: 12px; min-width: 0; }
/* djust's CodeBlock component (server-side Pygments). djust's components.css
   is not loaded: it has its own .btn, which would restyle the site. */
.code-block { background: #080d0b; border: 1px solid #ffffff12; border-radius: 12px; overflow: hidden; }
.code-block-header { display: flex; align-items: center; gap: 10px; padding: 7px 10px 7px 14px; border-bottom: 1px solid #ffffff10; }
.code-block-filename { font: 10px ui-monospace, monospace; color: var(--muted); }
.code-block-lang { margin-left: auto; font: 9px ui-monospace, monospace; letter-spacing: 1.4px; text-transform: uppercase; color: #6f8474; }
.code-block-copy { font-size: 10px; font-weight: 650; padding: 3px 9px; border-radius: 6px; background: #1b2620; color: #bacbad; border: 1px solid #45543a; }
.code-block-copy:hover { color: var(--lime); border-color: var(--lime); }
.code-block-copy.dj-copied { color: #16200d; background: var(--lime); border-color: var(--lime); }
.code-block-pre { margin: 0; padding: 14px; overflow-x: auto; }
.code-block-pre code { font: 12px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; color: #cfe3c8; white-space: pre; }
/* Pygments tokens (hl- prefix), in the site palette */
.code-block .hl-k, .code-block .hl-kn, .code-block .hl-kd, .code-block .hl-kc, .code-block .hl-ow { color: var(--lime); }
.code-block .hl-s, .code-block .hl-s1, .code-block .hl-s2, .code-block .hl-sd, .code-block .hl-sa, .code-block .hl-se, .code-block .hl-si { color: #f2c38b; }
.code-block .hl-nf, .code-block .hl-fm, .code-block .hl-nc, .code-block .hl-nn { color: #7fb4ff; }
.code-block .hl-nd, .code-block .hl-nb, .code-block .hl-bp { color: #e2a6ff; }
.code-block .hl-mi, .code-block .hl-mf, .code-block .hl-m { color: #f2c38b; }
.code-block .hl-c, .code-block .hl-c1, .code-block .hl-cm { color: #6f8474; font-style: italic; }
.code-block .hl-cp { color: #e2a6ff; }          /* {% template tags %} */
.code-block .hl-nv { color: #cfe3c8; }          /* template variables */
.code-block .hl-nt { color: #9fdc6b; }          /* html tags */
.code-block .hl-na { color: #7fb4ff; }          /* html attributes */
.code-block .hl-o, .code-block .hl-p { color: #8fa596; }
.how-tradeoffs h2 { margin-bottom: 18px; max-width: 640px; }
.how-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.how-grid h3 { font-size: 14px; margin: 0 0 6px; }
.how-cta { text-align: center; padding: 30px 0 10px; display: grid; gap: 12px; justify-items: center; }
.how-cta-links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.how-cta .btn.secondary { font-size: 12px; padding: 10px 14px; }
@media (max-width: 1000px) { .how-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }.how-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .how-section { grid-template-columns: minmax(0, 1fr); gap: 16px; }.how-hero { padding-top: 32px; }.nav-links { gap: 12px; }.nav-link { font-size: 11px; } }
@media (max-width: 480px) { .how-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }.how-grid { grid-template-columns: 1fr; }.how-stats dt { font-size: 22px; } }
