/*
 * DOODLE AFTER DARK - cabinet styles
 * Copied from Trivia After Dark (2026-10-29), which copied Hold'em's cabinet: the fixed 1600x900 stage app.js scales
 * to fit, the bezel with its neon rails, 9-sliced plates, LCD readouts and arcade buttons. Desktop only (019c):
 * no portrait stage; a phone gets one card. The doodle playfield follows at the bottom of this file.
 */
/*
 * The cabinet's two typefaces, served from here instead of Google Fonts (same as Euchre,
 * 2026-10-28): Bungee (display) and Barlow Condensed 500/600/700 (UI), both SIL Open Font
 * License 1.1 (fonts/OFL-*.txt). Same files and unicode ranges Google served; a browser only
 * fetches the ranges a page actually uses.
 */
/* vietnamese */
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/barlow-condensed-500-vietnamese.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/barlow-condensed-500-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/barlow-condensed-500-latin.woff2) format('woff2');
  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;
}
/* vietnamese */
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/barlow-condensed-600-vietnamese.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/barlow-condensed-600-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/barlow-condensed-600-latin.woff2) format('woff2');
  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;
}
/* vietnamese */
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/barlow-condensed-700-vietnamese.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/barlow-condensed-700-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/barlow-condensed-700-latin.woff2) format('woff2');
  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;
}
/* vietnamese */
@font-face {
  font-family: 'Bungee';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/bungee-400-vietnamese.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Bungee';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/bungee-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Bungee';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/bungee-400-latin.woff2) format('woff2');
  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;
}

:root {
    --ink: #0d0a09;
    --felt-dark: #15100d;
    --cream: #f7f0e1;
    --card-red: #c8261b;
    --card-black: #16120f;
    --gold: #f2c14e;
    --gold-deep: #a8761c;
    --neon-red: #ff5544;
    --neon-blue: #45c9ff;
    --lcd: #7dff6b;
    --text: #f3eadb;
    --muted: #b5a690;
    --display: 'Bungee', 'Impact', 'Arial Black', sans-serif;
    --ui: 'Barlow Condensed', 'Arial Narrow', 'Helvetica Neue', sans-serif;
    --card-w: 92px;
    --card-h: 128px;
    color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
    background: radial-gradient(ellipse at 50% 40%, #241812 0%, var(--ink) 70%);
    color: var(--text);
    font: 600 18px/1.25 var(--ui);
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
#safe-probe {
    position: fixed; visibility: hidden; pointer-events: none;
    padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
}
.phone-only { display: none; }

/* ---------- Stage & bezel ---------- */

#viewport { position: fixed; inset: 0; overflow: clip; }
/* Scrollbars, house rule: fit first; when a panel must scroll, one thin gold bar, never the grey default, never nested. */
* { scrollbar-width: thin; scrollbar-color: var(--gold) transparent; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 3px; }
#stage { position: absolute; left: 0; top: 0; width: 1600px; height: 900px; transform-origin: 0 0; }
#stage::before {
    content: ''; position: absolute; inset: 60px 30px; z-index: -1; border-radius: 40px;
    box-shadow: -50px 0 90px -20px rgba(255, 85, 68, .35), 50px 0 90px -20px rgba(69, 201, 255, .35);
}
.bezel {
    position: absolute; inset: 0; border-style: solid; border-width: 50px 56px 78px;
    border-image: url(assets/bezel.webp) 132 147 205 147 stretch;
    pointer-events: none; z-index: 50;
}
.screen {
    position: absolute; inset: 44px 50px 72px; overflow: clip;
    background: url(assets/felt.webp) center / cover, var(--felt-dark);
    border-radius: 18px;
}
.view { position: absolute; inset: 6px; }

/* ---------- Buttons ---------- */

.arcade-btn {
    min-width: 150px; height: 70px; padding: 0 14px;
    border-style: solid; border-width: 20px 24px;
    border-image: url(assets/btn-blue.webp) 76 90 fill stretch;
    background: none;
    font: 400 20px/1 var(--display); letter-spacing: .02em; color: #fff;
    text-shadow: 0 2px 0 rgba(0, 0, 0, .55), 0 0 10px rgba(0, 0, 0, .35);
    cursor: pointer; white-space: nowrap;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    transition: transform .08s ease;
}
.arcade-btn > * { margin: -20px 0; }
.arcade-btn.green { border-image-source: url(assets/btn-green.webp); }
.arcade-btn.red { border-image-source: url(assets/btn-red.webp); }
.arcade-btn.gold { border-image-source: url(assets/btn-gold.webp); color: #3b2300; text-shadow: 0 1px 0 rgba(255, 240, 200, .6); }
.arcade-btn:hover:not(:disabled) { filter: brightness(1.12); }
.arcade-btn:active:not(:disabled) { transform: translateY(2px) scale(.98); }
/* Waiting for your turn: the buttons stay put, dark steel with dim lettering, so nothing jumps when it's you. */
.arcade-btn:disabled {
    border-image-source: url(assets/btn-gold.webp); border-image-slice: 76 90;
    background: linear-gradient(#34302d, #1a1715 60%, #26221f); background-clip: padding-box;
    color: #7b6f60; text-shadow: 0 1px 0 #000; cursor: default; opacity: .8;
}
.arcade-btn.busy { opacity: .7; pointer-events: none; }
.arcade-btn:focus-visible, .round:focus-visible, .avatar-grid button:focus-visible { outline: 3px solid var(--neon-blue); outline-offset: 3px; }

.round { position: relative; width: 60px; height: 60px; padding: 0; border: 0; background: none; cursor: pointer; transition: transform .08s; }
.round img { width: 100%; height: 100%; display: block; }
.round:hover { filter: brightness(1.12); }
.round:active { transform: scale(.94); }
/* Speaker: a dark steel face over the base button's "?", the speaker on it, a red slash when off. */
.sound-btn::before {
    content: ''; position: absolute; inset: 20%; border-radius: 50%; z-index: 1;
    background: radial-gradient(ellipse at 50% 16%, rgba(255, 255, 255, .45) 0 18%, transparent 42%),
        radial-gradient(circle at 50% 40%, #5a5550 0%, #2b2724 60%, #141210 100%);
}
.round.sound-btn img.spk { position: absolute; left: 24%; top: 30%; width: 54%; height: 40%; object-fit: contain; z-index: 2; }
.sound-btn:not(.on) img.spk { opacity: .45; }
.sound-btn:not(.on)::after {
    content: ''; position: absolute; left: 24%; right: 24%; top: 48%; height: 4px; border-radius: 3px; z-index: 3;
    background: #e3261b; box-shadow: 0 0 0 2px #1a0503; transform: rotate(-35deg);
}
.text-btn { background: none; border: 0; color: var(--muted); font: 700 15px var(--ui); letter-spacing: .12em; text-transform: uppercase; cursor: pointer; padding: 6px 10px; }
.text-btn:hover { color: var(--gold); }

/* ← The Bar (Ben's sign) and the jukebox beside it, in the top-left corner of every view. */
.corner { position: absolute; left: 12px; top: 12px; z-index: 30; display: flex; align-items: center; gap: 8px; }
.door { height: 40px; padding: 0; border: 0; background: none; cursor: pointer; transition: transform .08s; }
.door img { height: 100%; width: auto; display: block; }
.door:hover { filter: brightness(1.15); }
.door:active { transform: scale(.96); }
.door:focus-visible { outline: 3px solid var(--neon-blue); outline-offset: 3px; }
/* In the game it heads the plates column on desktop, and sits beside the menu gear on the phone. */
#game:not([hidden]) ~ .corner { top: 12px; left: 14px; }
body:not(.portrait) .plates { padding-top: 52px; grid-auto-rows: 80px; gap: 6px; }
body:not(.portrait) .plates .plate { height: 80px; }
body.portrait .corner { gap: 4px; }
body.portrait .corner .door { height: 32px; }
body.portrait .corner .ad-juke { width: 30px; height: 30px; }
body.portrait #game:not([hidden]) ~ .corner { top: 31px; left: 84px; }
/* If the sign can't load (the front page is down), the door says it in words. */
.door.words img { display: none; }
.door.words::after { content: '← THE BAR'; font: 400 16px/40px var(--display); color: var(--gold); white-space: nowrap; }

/* ---------- Logo ---------- */


.title-panel {
    display: grid; gap: 10px; padding: 18px 24px 18px 16px;
    border-style: solid; border-width: 28px 35px 31px 23px;
    border-image: url(assets/chat-frame.webp) 63 77 68 51 fill stretch;
}
.field-label { display: block; font: 400 15px var(--display); color: var(--gold); letter-spacing: .04em; margin-top: 4px; }
#player-name {
    width: 100%; height: 52px; padding: 0 16px; border-radius: 10px;
    border: 2px solid var(--gold-deep); background: #050505; color: var(--lcd);
    font: 400 22px var(--display); text-transform: uppercase; user-select: text;
    box-shadow: inset 0 0 14px rgba(125, 255, 107, .12);
}
#player-name::placeholder { color: #2f5a2b; }
#player-name:focus { outline: none; border-color: var(--gold); }
.avatar-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.avatar-grid button {
    aspect-ratio: 1; padding: 4px; border-radius: 12px; border: 2px solid #3a2c20;
    background: #120d0a; cursor: pointer;
}
.avatar-grid button img { width: 100%; height: 100%; object-fit: contain; display: block; }
.avatar-grid button.selected { border-color: var(--gold); background: #2a1c0c; box-shadow: 0 0 14px rgba(242, 193, 78, .45); }
.title-panel .arcade-btn.wide { width: 100%; height: 82px; font-size: 26px; border-width: 22px 26px; margin-top: 6px; }
.title-actions { display: grid; grid-template-columns: 1fr; gap: 12px; }
.title-actions .arcade-btn { width: 100%; min-width: 0; font-size: 18px; }
.smallprint { text-align: center; font: 700 14px var(--ui); letter-spacing: .1em; color: var(--muted); text-transform: uppercase; }

/* ---------- Lobby ---------- */

/* ---------- Plates ---------- */
.plate {
    position: relative; width: 230px; height: 82px;
    border-style: solid; border-width: 19px 23px;
    border-image: url(assets/plate-name.webp) 66 72 fill stretch;
    display: grid; align-content: center; padding-right: 58px;
}
.plate .name { font: 400 18px/1 var(--display); color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: -6px 0 0 -6px; }
.plate .sub { font: 700 13px/1 var(--ui); letter-spacing: .12em; color: #d7cff5; margin: 6px 0 -6px -6px; white-space: nowrap; }
.plate .stack { display: flex; align-items: center; gap: 6px; margin: 6px 0 -6px -6px; }
.plate .stack::before { content: ''; width: 17px; height: 17px; flex: none; background: url(assets/chip-1k-flat.webp) center / contain no-repeat; }
.plate .stack b { font: 400 17px/1 var(--display); color: var(--gold); text-shadow: 0 1px 0 #000; font-variant-numeric: tabular-nums; }
.plate .avatar { position: absolute; right: -38px; top: 50%; width: 90px; height: 90px; transform: translateY(-54%); object-fit: contain; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .6)); z-index: 2; }
.seat.me .plate, .lobby-seat.me .plate { border-image-source: url(assets/plate-name-me.webp); }
.say {
    position: absolute; left: 0; top: -82px; z-index: 8; max-width: 280px; width: max-content;
    padding: 8px 14px; border-radius: 14px; background: var(--cream); color: var(--card-black);
    font: 700 17px/1.15 var(--ui); box-shadow: 0 6px 14px rgba(0, 0, 0, .55);
    animation: pop-in-say .3s cubic-bezier(.2, 1.6, .4, 1);
}
.say::after { content: ''; position: absolute; left: 40px; bottom: -9px; border: 10px solid transparent; border-bottom: 0; border-top-color: var(--cream); }
@keyframes pop-in-say { from { transform: scale(.6); opacity: 0; } }

/* ---------- Side column ---------- */

.side { display: flex; flex-direction: column; gap: 6px; min-height: 0; }
.side-top { display: flex; justify-content: flex-end; gap: 6px; margin-bottom: 2px; }
#exit { margin-left: 12px; }
.readout, .readout-clock {
    height: 52px; padding: 0 8px; border-style: solid; border-width: 13px 15px;
    border-image: url(assets/readout.webp) 64 70 fill stretch; background: none;
    display: flex; align-items: center; justify-content: space-between;
}
.readout span, .readout-clock span { font: 700 14px var(--ui); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: -8px 0; }
.readout b, .readout-clock b { font: 400 24px/1 var(--display); color: var(--lcd); text-shadow: 0 0 8px rgba(125, 255, 107, .6); margin: -8px 0; font-variant-numeric: tabular-nums; }
.readout b.up { color: var(--lcd); }
.readout b.down { color: #ff8a73; text-shadow: 0 0 8px rgba(255, 85, 68, .6); }
.readout-clock { height: 56px; border-width: 14px 15px 14px 58px; border-image: url(assets/readout-clock.webp) 58 64 58 236 fill stretch; padding-left: 12px; }
.room-code { cursor: pointer; }
.room-code b { letter-spacing: .1em; }
.chat {
    flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 6px; padding: 2px 4px 4px;
    border-style: solid; border-width: 28px 35px 31px 23px;
    border-image: url(assets/chat-frame.webp) 63 77 68 51 fill stretch;
}
/* Log filter: All / Game / Chat */
.chat-filter { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.chat-filter button {
    position: relative; height: 26px; padding: 0; border-radius: 8px; border: 1px solid #4a3a2c; background: #120d0a;
    font: 400 12px var(--display); color: var(--muted); cursor: pointer;
}
.chat-filter button[aria-checked='true'] { border-color: var(--gold); color: var(--gold); box-shadow: 0 0 10px rgba(242, 193, 78, .25); }
.chat-filter .dot { position: absolute; top: 4px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: #e3261b; box-shadow: 0 0 6px rgba(227, 38, 27, .8); }
.chat-log[data-filter='game'] .msg:not(.sys), .chat-log[data-filter='game'] .msg.react { display: none; }
.chat-log[data-filter='chat'] .msg.sys:not(.react), .chat-log[data-filter='chat'] .divider { display: none; }
.chat-log .msg.react { color: var(--gold); border-left-color: var(--gold-deep); }
.connection { font: 700 13px var(--ui); letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
.connection:empty { display: none; }
.chat-log { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; padding-right: 4px; font-size: 16px; user-select: text; }
.chat-log .msg { display: flex; gap: 6px; align-items: flex-start; line-height: 1.2; }
.chat-log .msg img { width: 26px; height: 26px; object-fit: contain; flex: none; margin-top: -2px; }
.chat-log .msg b { color: var(--gold); font-weight: 700; margin-right: 5px; }
.chat-log .msg.me b { color: var(--neon-blue); }
.chat-log .msg.sys { color: var(--muted); font-weight: 500; font-size: 15px; padding-left: 4px; border-left: 2px solid #4a3a2c; }
.chat-log .msg.sys.big { color: var(--text); border-left-color: var(--gold); }
.chat-log .divider { display: flex; align-items: center; gap: 8px; margin: 6px 0 2px; font: 400 12px var(--display); color: var(--gold-deep); letter-spacing: .06em; text-transform: uppercase; }
.chat-log .divider::before, .chat-log .divider::after { content: ''; flex: 1; height: 1px; background: #4a3a2c; }
.quick-chat { display: flex; flex-wrap: wrap; gap: 4px; }
.quick-chat button { padding: 3px 9px; border-radius: 999px; border: 1px solid #5a4632; background: #120d0a; font: 600 14px var(--ui); color: var(--text); cursor: pointer; }
.quick-chat button:hover { border-color: var(--gold); color: var(--gold); }
.chat-form { display: flex; gap: 4px; }
.chat-form input { flex: 1; min-width: 0; height: 36px; padding: 0 10px; border-radius: 8px; border: 1px solid #5a4632; background: #050505; color: var(--text); font: 600 16px var(--ui); user-select: text; }
.chat-form input:focus { outline: none; border-color: var(--gold); }
.chat-form button { height: 36px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--gold-deep); background: #2a1c0c; color: var(--gold); font: 400 13px var(--display); cursor: pointer; }

/* ---------- Dialogs & toast (outside the stage, sized to the window) ---------- */

dialog {
    width: min(560px, 92vw); max-height: 88vh; overflow: auto; color: var(--text); background: none;
    padding: 22px 26px 22px 20px; border-style: solid; border-width: 28px 35px 31px 23px;
    border-image: url(assets/chat-frame.webp) 63 77 68 51 fill stretch;
    font: 600 18px/1.35 var(--ui);
}
dialog::backdrop { background: rgba(5, 3, 2, .75); }
body.modal .view, body.modal #lobby.view { overflow: hidden; }
dialog:has(.cat-list) { width: min(640px, 92vw); }
dialog h2 { margin: 4px 0 10px; font: 400 28px/1.1 var(--display); color: var(--gold); }
dialog p, dialog ol { margin: 0 0 12px; }
dialog ol { padding-left: 20px; }
dialog li { margin-bottom: 6px; }
dialog .arcade-btn { width: 100%; margin-top: 10px; }
dialog .field-label { margin: 8px 0 6px; }
.dialog-close { position: absolute; right: 8px; top: 2px; background: none; border: 0; color: var(--muted); font-size: 30px; cursor: pointer; }
.invite-url { width: 100%; height: 40px; padding: 0 10px; border-radius: 8px; border: 1px solid #5a4632; background: #050505; color: var(--text); font: 600 14px var(--ui); }
.menu-list { display: grid; gap: 4px; }
/* Table speed: Relaxed / Normal / Quick */
.table-settings { display: grid; gap: 6px; margin: 4px 0 14px; padding-bottom: 12px; border-bottom: 1px solid rgba(242, 193, 78, .25); }
.table-settings .arcade-btn { margin-top: 0; }
.speed-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 6px; }
.speed-row button {
    height: 44px; border-radius: 10px; border: 2px solid #4a3a2c; background: #120d0a; cursor: pointer;
    font: 400 15px var(--display); color: var(--muted);
}
@media (max-width: 500px) { .speed-row button { font-size: 12px; } } /* dialogs are sized to the window, not the stage */
.speed-row button[aria-checked='true'] { border-color: var(--gold); color: var(--gold); box-shadow: 0 0 14px rgba(242, 193, 78, .25); }
#toast {
    position: fixed; left: 50%; bottom: 7vh; transform: translateX(-50%); z-index: 100; max-width: 90vw;
    padding: 12px 22px; border-radius: 999px; background: #050505; border: 2px solid var(--gold-deep);
    font: 700 18px var(--ui); color: var(--gold); box-shadow: 0 8px 24px rgba(0, 0, 0, .6); text-align: center;
}
.bar-calling, .bar-closed { text-align: center; font-size: 20px; margin: 18px 0 6px; }
.bar-calling { color: var(--muted); animation: bar-blink 1.2s ease-in-out infinite; }
@keyframes bar-blink { 50% { opacity: .45; } }
.bar-me { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; }
.bar-face {
    width: 64px; height: 64px; padding: 4px; border-radius: 14px; border: 2px solid var(--gold-deep);
    background: #120d0a; cursor: pointer; box-shadow: 0 0 14px rgba(242, 193, 78, .25);
}
.bar-face img { width: 100%; height: 100%; object-fit: contain; display: block; }
#bar-name, #bar-code {
    width: 100%; min-width: 0; height: 52px; padding: 0 14px; border-radius: 10px;
    border: 2px solid var(--gold-deep); background: #050505; color: var(--lcd);
    font: 400 22px var(--display); text-transform: uppercase; user-select: text;
    box-shadow: inset 0 0 14px rgba(125, 255, 107, .12);
}
#bar-code { letter-spacing: .3em; }
#bar-name::placeholder, #bar-code::placeholder { color: #2f5a2b; }
#bar-name:focus, #bar-code:focus { outline: none; border-color: var(--gold); }
.bar-note { margin: 8px 0 4px !important; font: 600 15px/1.3 var(--ui); color: var(--muted); }
.bar-join { display: grid; grid-template-columns: 1fr 132px; gap: 10px; align-items: center; }
dialog .bar-join .arcade-btn { margin-top: 0; height: 56px; min-width: 0; font-size: 18px; }
.bar-tables ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.bar-tables li {
    display: grid; grid-template-columns: auto 1fr 120px; gap: 10px; align-items: center;
    padding: 6px 8px 6px 12px; border-radius: 10px; background: rgba(0, 0, 0, .45); border: 1px solid #3a2c20;
}
.bar-tables li b { font: 400 20px var(--display); color: var(--lcd); letter-spacing: .12em; }
.bar-tables li span { font: 600 14px var(--ui); color: var(--muted); }
dialog .bar-tables .arcade-btn { margin-top: 0; height: 48px; min-width: 0; font-size: 15px; }
.bar-error { min-height: 0; margin: 8px 0 0 !important; color: #ff8a7a; font: 600 15px var(--ui); }
.bar-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 10px; }
.bar-tabs button {
    height: 38px; border-radius: 8px; border: 1px solid var(--gold-deep); background: #120d0a;
    color: var(--muted); font: 400 15px var(--display); cursor: pointer;
}
.bar-tabs button[aria-selected='true'] { background: #2a1c0c; color: var(--gold); }
.bar-faces { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; max-height: 46vh; overflow: auto; }
.bar-faces button { aspect-ratio: 1; padding: 4px; border-radius: 12px; border: 2px solid #3a2c20; background: #120d0a; cursor: pointer; }
.bar-faces button img { width: 100%; height: 100%; object-fit: contain; display: block; }
.bar-faces button.selected { border-color: var(--gold); background: #2a1c0c; box-shadow: 0 0 14px rgba(242, 193, 78, .45); }
@media (max-width: 520px) {
    .bar-join { grid-template-columns: 1fr 104px; }
    #bar-code { letter-spacing: .12em; padding: 0 10px; font-size: 20px; }
    .bar-tables li { grid-template-columns: auto 1fr; }
    .bar-tables li button { grid-column: 1 / -1; }
    .bar-faces { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* The host's gone: the bar's countdown, over the felt, on every seat */
.bar-wait {
    position: absolute; left: 50%; top: 318px; z-index: 30; transform: translateX(-50%);
    display: grid; justify-items: center; gap: 2px; padding: 12px 28px 14px; min-width: 340px;
    border-radius: 16px; border: 2px solid var(--gold-deep); background: rgba(5, 4, 3, .92);
    box-shadow: 0 0 0 1px #000, 0 12px 40px rgba(0, 0, 0, .7), 0 0 24px rgba(242, 193, 78, .2);
    pointer-events: none;
}
.bar-wait b { font: 400 20px var(--display); color: var(--gold); letter-spacing: .06em; }
.bar-wait span { font: 400 48px/1 var(--display); color: #ff6a5a; text-shadow: 0 0 12px rgba(255, 80, 60, .5); }
.bar-wait small { font: 600 14px var(--ui); color: var(--muted); }
body.portrait .bar-wait { top: 480px; min-width: 0; width: 470px; }

.react-menu .rm-grid .rm-kick { border-color: #6a1d18; }
/* =================================================================================
   DOODLE: the playfield (desktop 1600x900). Plates left; Bobby, the word bar, the canvas,
   the tray and the clock centre; readouts, the board and the log right.
   ================================================================================= */

.screen { background: linear-gradient(rgba(8, 5, 4, .55), rgba(8, 5, 4, .78)), url(assets/bar.webp) center / cover, var(--felt-dark); }
body.season-halloween .screen { background: linear-gradient(rgba(30, 10, 0, .5), rgba(8, 5, 4, .8)), url(assets/bar.webp) center / cover, var(--felt-dark); }
body.season-christmas .screen { background: linear-gradient(rgba(4, 18, 10, .5), rgba(8, 5, 4, .8)), url(assets/bar.webp) center / cover, var(--felt-dark); }

/* Title */
#title-screen { display: grid; grid-template-columns: 1fr 520px; grid-template-rows: 1fr auto; align-items: center; gap: 0 24px; padding: 0 48px 8px; }
.title-brand { display: grid; justify-items: center; gap: 10px; }
.title-logo { width: 100%; max-width: 600px; filter: drop-shadow(0 0 24px rgba(255, 85, 68, .45)) drop-shadow(0 0 60px rgba(69, 201, 255, .25)); }
.title-crew { width: 100%; max-width: 700px; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .7)); }
.tagline { margin: 0; font: 400 24px var(--display); color: var(--gold); letter-spacing: .04em; text-shadow: 0 2px 0 #000, 0 0 12px rgba(242, 193, 78, .35); }
.title-join { display: grid; grid-template-columns: 1fr 150px; gap: 10px; align-items: center; }
#join-code {
    width: 100%; min-width: 0; height: 56px; padding: 0 14px; border-radius: 10px; border: 2px solid var(--gold-deep); background: #050505; color: var(--lcd);
    font: 400 26px var(--display); letter-spacing: .3em; text-transform: uppercase; user-select: text; box-shadow: inset 0 0 14px rgba(125, 255, 107, .12);
}
#join-code::placeholder { color: #2f5a2b; }
#join-code:focus { outline: none; border-color: var(--gold); }
.title-join .arcade-btn { min-width: 0; height: 62px; }
.title-panel .bar-error:empty { display: none; }
.title-fine { grid-column: 1 / -1; margin: 0; text-align: center; font: 600 14px var(--ui); letter-spacing: .04em; color: rgba(181, 166, 144, .7); }
.title-fine span { margin-left: 10px; white-space: nowrap; }

/* Lobby */
#lobby { display: grid; grid-template-columns: 1fr 396px; gap: 16px; padding: 4px 6px 2px; }
.lobby-left { display: grid; grid-template-rows: 58px 1fr; gap: 8px; min-height: 0; }
.lobby-head { display: flex; align-items: center; gap: 18px; padding-left: 210px; }
.lobby-logo { height: 58px; filter: drop-shadow(0 0 10px rgba(255, 85, 68, .45)); }
.lobby-head .field-label { font-size: 17px; }
.lobby-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 88px; gap: 14px 22px; align-content: start;
    padding: 22px 30px 18px 34px; border-style: solid; border-width: 28px 35px 31px 23px; border-image: url(assets/chat-frame.webp) 63 77 68 51 fill stretch;
    overflow-y: auto; min-height: 0; }
.lobby-grid .lobby-seat { position: relative; min-width: 0; }
.lobby-grid .lobby-seat .plate { width: 100%; height: 76px; padding: 0 8px 0 60px; gap: 2px; }
.lobby-grid .lobby-seat .plate .name { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lobby-grid .lobby-seat.empty { padding: 0; border: 0; background: none; cursor: pointer; }
.lobby-grid .lobby-seat.empty .plate { padding: 0; filter: grayscale(.85) brightness(.38); transition: filter .15s; }
.lobby-grid .lobby-seat.empty:hover .plate, .lobby-grid .lobby-seat.empty:focus-visible .plate { filter: grayscale(.6) brightness(.6); }
.lobby-grid .lobby-seat.empty > .place { left: 6px; top: 4px; opacity: .7; }
.lobby-grid .lobby-seat .join { position: absolute; inset: 0 0 12px; display: flex; align-items: center; justify-content: center; font: 400 17px var(--display); color: #fff; letter-spacing: .06em; }
.lobby-grid .lobby-seat .join i { font-style: normal; display: inline-grid; place-items: center; width: 30px; height: 30px; margin-right: 6px; border-radius: 50%; border: 2px solid #fff; font: 400 20px/1 var(--display); }
.lobby-side { display: flex; flex-direction: column; gap: 10px; min-height: 0; padding: 18px 20px 12px 12px;
    border-style: solid; border-width: 28px 35px 31px 23px; border-image: url(assets/chat-frame.webp) 63 77 68 51 fill stretch; }
.lobby-count { display: grid; justify-items: center; padding: 4px 0 2px; }
.lobby-count b { font: 400 30px/1 var(--display); color: var(--gold); text-shadow: 0 2px 0 #000, 0 0 12px rgba(242, 193, 78, .35); }
.lobby-count span { font: 700 15px var(--ui); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.lobby-codebox { display: grid; justify-items: center; gap: 6px; }
.lobby-codebox .field-label { font-size: 13px; }
.lobby-code { width: 100%; height: 76px; padding: 0 16px; cursor: pointer; display: grid; place-items: center;
    border-style: solid; border-width: 16px 18px; border-image: url(assets/readout.webp) 64 70 fill stretch; background: none; }
.lobby-code b { font: 400 46px/1 var(--display); letter-spacing: .14em; color: var(--lcd); text-shadow: 0 0 12px rgba(125, 255, 107, .6); margin: -10px 0; }
.lobby-codebox .arcade-btn { width: 100%; height: 58px; font-size: 19px; }
.lobby-settings { display: grid; gap: 4px; padding-top: 6px; border-top: 1px solid rgba(242, 193, 78, .25); }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 38px; font: 700 15px var(--ui); letter-spacing: .12em; color: var(--muted); }
.set-ctl { display: flex; align-items: center; gap: 8px; }
.set-row b { min-width: 52px; text-align: center; font: 400 22px var(--display); color: var(--lcd); text-shadow: 0 0 8px rgba(125, 255, 107, .5); }
.set-row button { height: 34px; min-width: 34px; border-radius: 8px; border: 2px solid #5a4632; background: #120d0a; color: var(--gold); font: 400 16px var(--display); cursor: pointer; }
.set-row button:disabled { opacity: .35; cursor: default; }
.set-row .tog { min-width: 70px; color: var(--muted); }
.set-row .tog.on { border-color: var(--gold); color: var(--lcd); text-shadow: 0 0 8px rgba(125, 255, 107, .5); box-shadow: 0 0 10px rgba(242, 193, 78, .25); }
.set-cat em { flex: 1; text-align: right; font: 400 15px var(--display); font-style: normal; color: var(--lcd); letter-spacing: .03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.set-row .cat-change { padding: 0 10px; font: 700 13px var(--ui); letter-spacing: .12em; }
.lobby-side > .arcade-btn { width: 100%; height: 74px; font-size: 24px; margin-top: auto; }
.lobby-side > .arcade-btn:disabled { opacity: .6; }
.lobby-need { margin: -4px 0 0; text-align: center; font: 700 16px var(--ui); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.lobby-side > .text-btn { align-self: center; padding: 2px 10px; }

/* The category checklist: a box that's filled gold with a tick, or empty. Nothing in between. */
.cat-now { margin: 0 0 10px; font: 600 18px var(--ui); color: var(--muted); }
.cat-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 8px; margin-bottom: 12px; }
.cat-row { display: flex; align-items: center; gap: 14px; min-height: 42px; padding: 4px 12px; border-radius: 10px; border: 2px solid #3a2e22;
    background: #120d0a; color: var(--muted); font: 700 18px var(--ui); letter-spacing: .1em; text-align: left; cursor: pointer; }
.cat-row i { flex: none; width: 28px; height: 28px; border-radius: 6px; border: 2px solid #6b5a46; display: grid; place-items: center; font: 400 18px/1 var(--display); font-style: normal; }
.cat-row.on { border-color: var(--gold); color: #fff; background: rgba(242, 193, 78, .12); }
.cat-row.on i { background: var(--gold); border-color: var(--gold); color: #2b1800; }
.cat-row.mix { grid-column: 1 / -1; margin-bottom: 4px; }
.cat-row:focus-visible { outline: 3px solid var(--neon-blue); outline-offset: 2px; }

/* The game grid */
#game { display: grid; grid-template-columns: 292px 1fr 296px; gap: 14px; padding: 6px 8px 4px; }

/* Plates: top seven by score, yours pinned eighth */
.plates { display: grid; grid-auto-rows: 80px; gap: 6px; align-content: start; padding-top: 52px; }
.plates .seat { position: relative; }
.plates .plate, .lobby-seat .plate { width: 100%; height: 80px; padding: 0 44px 0 64px; display: grid; grid-template-rows: auto auto; align-content: center; gap: 4px; }
.lobby-seat .plate { height: 78px; padding-right: 10px; gap: 2px; }
.plate .avatar { left: -16px; right: auto; width: 74px; height: 74px; transform: translateY(-52%); }
.lobby-seat .plate .avatar { width: 62px; height: 62px; left: -12px; }
.plate .name { margin: 0; font-size: 19px; }
.plate .pts { font: 400 20px/1 var(--display); color: var(--gold); text-shadow: 0 1px 0 #000; font-variant-numeric: tabular-nums; }
.lobby-seat .plate .pts { font: 700 13px var(--ui); letter-spacing: .14em; color: #d7cff5; }
.plate .place, .lobby-seat.empty > .place { position: absolute; left: -14px; top: -14px; z-index: 3; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
    background: radial-gradient(circle at 40% 35%, #ffe38a, #c8901e 70%); color: #2b1800; font: 400 14px/1 var(--display); box-shadow: 0 2px 4px rgba(0, 0, 0, .6); }
.plate .st { position: absolute; right: -8px; top: 50%; width: 38px; height: 38px; margin-top: -19px; border-radius: 50%; font-style: normal;
    display: grid; place-items: center; font: 400 22px/1 var(--display); box-shadow: inset 0 2px 3px rgba(255, 255, 255, .35), 0 2px 5px rgba(0, 0, 0, .6); }
.st.wait { background: radial-gradient(circle at 40% 35%, #8a8580, #3e3a36 70%); }
.st.wait::after { content: '•••'; font: 700 13px var(--ui); letter-spacing: 1px; color: #eee; }
.st.idle { display: none; }
.st.right { background: radial-gradient(circle at 40% 35%, #8df07a, #23961a 70%); box-shadow: 0 0 14px rgba(125, 255, 107, .8); }
.st.right::after { content: '✓'; color: #fff; text-shadow: 0 1px 0 #0b4a06; }
/* the drawer's pencil badge */
.st.draw { background: radial-gradient(circle at 40% 35%, #ffe38a, #c8901e 70%); box-shadow: 0 0 14px rgba(242, 193, 78, .8); }
.st.draw::after { content: ''; width: 24px; height: 24px; background: url(assets/btn-pen.webp) center / 150% no-repeat; border-radius: 50%; }
.plate .gain { position: absolute; right: 36px; top: 6px; font: 400 15px var(--display); font-style: normal; color: var(--lcd); text-shadow: 0 0 8px rgba(125, 255, 107, .7), 0 1px 0 #000; animation: gain-up .6s ease-out; }
@keyframes gain-up { from { transform: translateY(10px); opacity: 0; } }
.seat.me .plate { border-image-source: url(assets/plate-name-me.webp); }
.seat.solved .plate { border-image-source: url(assets/plate-name-solved.webp); }
.seat.drawer .plate { filter: drop-shadow(0 0 8px rgba(242, 193, 78, .7)); }
.seat.left .plate { opacity: .45; filter: grayscale(.8); }
.plates .say { left: 60px; bottom: calc(100% - 6px); top: auto; z-index: 20; max-width: 250px; }
.plates .seat:first-child .say { bottom: auto; top: calc(100% - 4px); }
.plates .seat:first-child .say::after { bottom: auto; top: -9px; border: 10px solid transparent; border-top: 0; border-bottom-color: var(--cream); }

/* Centre: Bobby, the word bar, the canvas, the tray, the clock */
.center { position: relative; display: grid; grid-template-rows: 92px 54px minmax(0, 1fr) 64px 56px; gap: 6px; min-width: 0; }
.host-row { display: grid; grid-template-columns: 200px 1fr; align-items: center; gap: 10px; }
.desk-logo { width: 200px; filter: drop-shadow(0 0 12px rgba(255, 85, 68, .45)); }
.donna { display: grid; grid-template-columns: 100px 1fr; align-items: center; }
.donna img { width: 104px; height: 104px; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .7)); z-index: 2; }
.donna-say { position: relative; min-height: 66px; padding: 8px 18px 8px 22px; border-radius: 18px; background: var(--cream); color: #241507;
    font: 600 20px/1.2 var(--ui); box-shadow: 0 6px 16px rgba(0, 0, 0, .55); display: grid; align-content: center; }
.donna-say::before { content: ''; position: absolute; left: -16px; top: 50%; margin-top: -10px; border: 10px solid transparent; border-right: 16px solid var(--cream); border-left: 0; }
.donna-say b { font: 400 12px var(--display); letter-spacing: .08em; color: #a0441c; }
.donna-say.pop { animation: pop-in-say .25s ease-out; }

/* The word bar: the category, the letters as tiles, the length */
.word-bar { display: grid; grid-template-columns: 150px 1fr 130px; align-items: center; gap: 10px; margin: 0 26px; padding: 0 16px; border-radius: 12px; background: #050505;
    box-shadow: inset 0 0 0 2px #a8761c, inset 0 0 0 5px #2a1c0c, 0 0 0 2px #3a2a18, 0 6px 14px rgba(0, 0, 0, .55); }
.word-cat { font: 400 13px var(--display); letter-spacing: .06em; color: var(--gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.word-len { text-align: right; font: 400 14px var(--display); letter-spacing: .06em; color: var(--muted); }
.word { display: flex; justify-content: center; align-items: flex-end; gap: 20px; height: 42px; }
.word .w { display: flex; gap: 5px; }
.word i { width: 28px; height: 38px; display: grid; place-items: end center; font: 400 30px/1 var(--display); font-style: normal; color: var(--lcd);
    text-shadow: 0 0 10px rgba(125, 255, 107, .6); border-bottom: 4px solid var(--gold); }
.word i.hint { color: #fff; text-shadow: 0 0 10px rgba(255, 255, 255, .5); animation: pop-in-say .3s ease-out; }
.word.long i { width: 22px; font-size: 24px; }
.word.long { gap: 14px; }
.word.mine i { color: var(--gold); text-shadow: 0 0 10px rgba(242, 193, 78, .6); }
.word.shown i { color: var(--lcd); }

/* The easel: the canvas, 5:3, white, a thin gold rim */
.easel { position: relative; display: grid; place-items: center; min-height: 0; container-type: size; } /* the row decides the canvas's size, never the canvas's 600 px */
#canvas { display: block; width: min(100cqw - 12px, (100cqh - 12px) * 5 / 3); height: auto; aspect-ratio: 5 / 3; background: #fff; border-radius: 6px; touch-action: none;
    box-shadow: 0 0 0 3px var(--gold), 0 0 0 6px #3a2a18, 0 10px 26px rgba(0, 0, 0, .7); }
#canvas.live { cursor: crosshair; }
#canvas.live.tool-fill { cursor: cell; }
.easel-note { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 10px; padding: 20px 36px 22px; border-radius: 18px;
    background: rgba(8, 5, 4, .88); box-shadow: 0 0 0 2px var(--gold-deep), 0 12px 30px rgba(0, 0, 0, .6); pointer-events: none; }
.count-lead { display: block; font: 400 22px var(--display); letter-spacing: .08em; color: var(--gold); text-align: center; }
.why { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); padding: 10px 28px; border-radius: 999px; background: #050505; border: 3px solid var(--gold);
    font: 400 26px var(--display); color: var(--lcd); text-shadow: 0 0 10px rgba(125, 255, 107, .6); white-space: nowrap; box-shadow: 0 8px 20px rgba(0, 0, 0, .6); animation: pop-in-say .3s ease-out; }

/* The tray: five tools, twelve colours, four sizes; the drawer's only, dim and inert for everyone else */
.tray { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 0 26px; padding: 0 14px; border-radius: 14px;
    background: linear-gradient(#1d1712, #0b0908); box-shadow: inset 0 0 0 2px #a8761c, inset 0 0 0 5px #2a1c0c, 0 6px 14px rgba(0, 0, 0, .55); transition: opacity .2s, filter .2s; }
.tray.inert { opacity: .4; filter: grayscale(.7); pointer-events: none; }
.tray button { padding: 0; border: 0; background: none; cursor: pointer; }
.tools { display: flex; gap: 4px; }
.tool { width: 52px; height: 52px; border-radius: 50%; transition: transform .08s; }
.tool img { width: 100%; height: 100%; display: block; }
.tool:hover { filter: brightness(1.12); }
.tool:active { transform: scale(.93); }
.tool.on { box-shadow: 0 0 0 3px #fff, 0 0 14px 4px rgba(255, 255, 255, .55); }
.swatches { display: grid; grid-template-columns: repeat(6, 22px); grid-auto-rows: 22px; gap: 4px; }
.swatch { width: 22px; height: 22px; border-radius: 50%; background: var(--c) !important; box-shadow: inset 0 -3px 4px rgba(0, 0, 0, .35), 0 0 0 2px #2a1c0c; }
.swatch.on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--gold), 0 0 10px rgba(242, 193, 78, .8); }
.sizes { display: flex; align-items: center; gap: 4px; }
.size { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: #050505 !important; box-shadow: inset 0 0 0 2px #3a2a18; }
.size i { width: var(--d); height: var(--d); border-radius: 50%; background: #fff; }
.size.on { box-shadow: inset 0 0 0 2px var(--neon-blue), 0 0 10px rgba(69, 201, 255, .6); }
.give-up { height: 34px; padding: 0 10px !important; border-radius: 8px; border: 1px solid #6a1d18 !important; background: #1a0503 !important; color: #ff8a73; font: 400 12px var(--display); letter-spacing: .06em; }
.give-up:hover { color: #fff; border-color: #e3261b !important; }

/* The clock */
/* The label has its own row over the track, never on it; 14 + 4 + 14 fills the frame's 32 px, so the bar stays 56 tall */
.clock-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 14px 14px; gap: 4px 16px; align-content: center; align-items: center; padding: 0 26px 0 70px; margin: 0 26px;
    border-style: solid; border-width: 12px 15px 12px 58px; border-image: url(assets/readout-clock.webp) 58 64 58 236 fill stretch; }
.clock-label { grid-column: 1; min-width: 0; font: 400 13px/14px var(--display); text-align: center; letter-spacing: .08em; color: var(--gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clock-label.good { color: var(--lcd); text-shadow: 0 0 8px rgba(125, 255, 107, .6); }
.clock-label.bad { color: #ff8a73; }
.clock-track { grid-column: 1; height: 14px; border-radius: 12px; background: #050505; box-shadow: inset 0 2px 5px rgba(0, 0, 0, .9), 0 0 0 2px #3a2a18; overflow: hidden; }
.clock-track i { display: block; height: 100%; border-radius: 12px; background: linear-gradient(#b8ff9f, #3fd12b 50%, #1f8a14); box-shadow: 0 0 12px rgba(125, 255, 107, .6); transition: width .1s linear; }
.clock-track i.mid { background: linear-gradient(#fff1a0, #f2c11e 50%, #a8761c); }
.clock-track i.low { background: linear-gradient(#ffb3a3, #e3261b 50%, #8a1208); box-shadow: 0 0 12px rgba(255, 85, 68, .7); }
.clock-track i.soft { background: linear-gradient(#8a7a5a, #5a4632); box-shadow: none; }
.clock-big { grid-column: 2; grid-row: 1 / -1; font: 400 30px/1 var(--display); color: var(--lcd); text-shadow: 0 0 10px rgba(125, 255, 107, .6); font-variant-numeric: tabular-nums; }

/* Pick, round card, final board, paused: over the word bar, canvas, tray and clock */
.card-over { position: absolute; inset: 98px -4px 0; z-index: 30; display: grid; place-items: center; background: rgba(5, 3, 2, .86); border-radius: 18px; animation: pop-in-say .25s ease-out; }
.round-card, .final-card, .pick-card { width: 640px; max-height: 100%; display: grid; justify-items: center; gap: 10px; padding: 18px 24px 16px 16px;
    border-style: solid; border-width: 28px 35px 31px 23px; border-image: url(assets/chat-frame.webp) 63 77 68 51 fill stretch; }
.pick-card { width: 760px; gap: 16px; }
.round-card .field-label, .final-card .field-label, .pick-card .field-label { font-size: 22px; }
.pick-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; width: 100%; }
.pick-word { display: grid; gap: 6px; justify-items: center; align-content: center; min-height: 128px; padding: 14px 10px; border-radius: 16px; cursor: pointer;
    border: 3px solid var(--gold-deep); background: radial-gradient(ellipse at 50% 30%, #2a1c0c, #0b0908 80%); box-shadow: 0 8px 18px rgba(0, 0, 0, .6); transition: transform .08s; }
.pick-word b { font: 400 28px/1.05 var(--display); color: #fff; text-shadow: 0 2px 0 #000; text-wrap: balance; text-transform: uppercase; }
.pick-word span { font: 700 14px var(--ui); letter-spacing: .14em; color: var(--gold); }
.pick-word:hover:not(:disabled) { border-color: var(--gold); transform: translateY(-2px); box-shadow: 0 0 18px rgba(242, 193, 78, .4); }
.pick-word:disabled { cursor: default; opacity: .45; }
.pick-word.chosen { opacity: 1; border-color: var(--lcd); box-shadow: 0 0 20px rgba(125, 255, 107, .55); }
.winner { margin: 0; font: 400 34px/1 var(--display); color: var(--lcd); text-shadow: 0 0 12px rgba(125, 255, 107, .6); }
.card-note { margin: 0; font: 600 19px var(--ui); color: var(--muted); }
/* The count: a ring that empties to its moment, the seconds in the middle. */
.count { position: relative; width: 104px; height: 104px; margin: 0 auto; display: grid; place-items: center; }
.count svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.count circle { fill: none; stroke-width: 9; }
.count .track { stroke: rgba(125, 255, 107, .14); }
.count .arc { stroke: var(--lcd); stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(125, 255, 107, .7)); transition: stroke-dashoffset .1s linear; }
.count b { position: relative; font: 400 46px/1 var(--display); color: var(--lcd); text-shadow: 0 0 14px rgba(125, 255, 107, .7); }
.round-card .count, .pick-card .count { width: 84px; height: 84px; }
.round-card .count b, .pick-card .count b { font-size: 36px; }
.mini-board, .final-board { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; gap: 4px; }
.final-board { max-height: 300px; overflow-y: auto; padding-right: 6px; }
.mini-board li, .final-board li { display: grid; grid-template-columns: 34px auto 1fr auto; align-items: center; gap: 10px; padding: 4px 12px; border-radius: 8px; background: rgba(0, 0, 0, .45); font: 700 21px var(--ui); }
.mini-board li { grid-template-columns: 34px 1fr auto; }
.mini-board li b, .final-board li b { font: 400 18px var(--display); color: var(--gold); }
.final-board li img { width: 38px; height: 38px; object-fit: contain; }
.mini-board li i, .final-board li i { font: 400 20px var(--display); font-style: normal; color: var(--lcd); }
.final-board li:first-child { background: rgba(242, 193, 78, .18); box-shadow: inset 0 0 0 2px var(--gold-deep); }
.mini-board li.me, .final-board li.me { box-shadow: inset 0 0 0 2px var(--neon-blue); }
.final-board li.left { opacity: .45; }
.send-off { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 14px 6px 6px; border-radius: 14px;
    background: var(--cream); color: #241507; text-decoration: none; font: 700 19px/1.15 var(--ui); }
.send-off img { width: 46px; height: 46px; flex: none; }
.send-off b { display: block; font: 400 11px var(--display); letter-spacing: .08em; color: #a0441c; }
.send-off span { flex: 1; }
.send-off span::after { content: ' →'; color: #a0441c; }
.send-off:hover { filter: brightness(1.06); }
.send-off:hover span { text-decoration: underline; }
.send-off:focus-visible { outline: 3px solid var(--neon-blue); outline-offset: 3px; }
.card-actions { display: flex; gap: 14px; align-items: center; margin-top: 6px; }
.card-actions .arcade-btn { min-width: 170px; height: 68px; }

/* Side column */
.side-top { gap: 4px; }
.side-top .round { width: 56px; height: 56px; }
#exit { margin-left: 8px; }
.readout-clock span { font-size: 12px; letter-spacing: .04em; white-space: nowrap; }
.readout-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.readout-row .readout { padding: 0 4px; }
.readout-row .readout span { font-size: 12px; letter-spacing: .08em; }
.readout-row .readout b { font-size: 19px; white-space: nowrap; }
.board-lcd { display: flex; flex-direction: column; height: 196px; flex: none; padding: 6px 8px 8px; border-radius: 12px; background: #050505;
    box-shadow: inset 0 0 0 2px #a8761c, inset 0 0 0 5px #2a1c0c, inset 0 0 18px rgba(125, 255, 107, .08); }
.board-lcd h3 { margin: 2px 0 4px; text-align: center; font: 400 16px var(--display); letter-spacing: .1em; color: var(--gold); }
.board-lcd ol { flex: 1; min-height: 0; list-style: none; margin: 0; padding: 0 4px 0 0; overflow-y: auto; display: grid; align-content: start; gap: 2px; }
.board-lcd li { display: grid; grid-template-columns: 28px 1fr auto; gap: 6px; align-items: center; padding: 2px 6px; border-radius: 4px; font: 400 16px/1.25 var(--display); color: var(--lcd); text-shadow: 0 0 6px rgba(125, 255, 107, .45); }
.board-lcd li b { color: #3fa830; font-weight: 400; }
.board-lcd li span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board-lcd li i { font-style: normal; font-variant-numeric: tabular-nums; }
.board-lcd li.me { background: var(--gold); color: #2b1800; text-shadow: none; }
.board-lcd li.me b { color: #2b1800; }
.board-lcd li.left { opacity: .45; }
.chat-log .msg.host b { color: #ff9a6e; }
.chat-log .msg.host { color: var(--cream); }
.chat-log[data-filter='chat'] .msg.host, .chat-log[data-filter='chat'] .msg.got { display: none; }
.chat-log[data-filter='game'] .msg.host, .chat-log[data-filter='game'] .msg.got { display: flex; }
.chat-log .msg.sys.big { font-weight: 700; }
/* "<name> got it!": a green line, the face beside it */
.chat-log .msg.got { padding: 3px 6px; border-radius: 8px; border-left: 0; background: rgba(47, 158, 68, .28); box-shadow: inset 0 0 0 1px rgba(125, 255, 107, .45); color: var(--lcd); font-weight: 700; }
/* the solved back-channel: dim, tagged */
.chat-log .msg.solved { opacity: .7; }
.chat-log .msg .tag { margin-left: 6px; padding: 0 6px; border-radius: 6px; background: rgba(47, 158, 68, .35); color: var(--lcd); font: 700 11px/16px var(--ui); letter-spacing: .1em; text-transform: uppercase; font-style: normal; vertical-align: 1px; }
.chat-log .msg.near { opacity: .75; }
.chat-log .msg .almost-tag { background: rgba(224, 49, 49, .35); color: #ffb3a3; text-transform: none; letter-spacing: .02em; }
.chat-form { position: relative; }
.chat-form.back input { border-color: #2f9e44; }
/* Almost! slapped by the guess box */
.almost { position: absolute; right: 54px; bottom: 18px; width: 170px; z-index: 5; pointer-events: none; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .6)); transform: rotate(-8deg); }
.almost.slap { animation: slap .32s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes slap { from { transform: rotate(-20deg) scale(2.2); opacity: 0; } 60% { opacity: 1; } to { transform: rotate(-8deg) scale(1); } }
#toast { position: fixed; }
.speed-row.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fine-print { font: 600 14px var(--ui); color: var(--muted); }

/* Desktop only (019c): a phone gets the logo, one line and the link */
.phone-card { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px 22px calc(24px + env(safe-area-inset-bottom, 0px));
    text-align: center; background: linear-gradient(rgba(8, 5, 4, .6), rgba(8, 5, 4, .85)), url(assets/bar.webp) center / cover, var(--felt-dark); }
.phone-card-logo { width: min(92vw, 420px); filter: drop-shadow(0 0 20px rgba(255, 85, 68, .45)); }
.phone-card-say { margin: 0; font: 400 22px/1.3 var(--display); color: var(--gold); text-shadow: 0 2px 0 #000; }
.phone-card .arcade-btn { width: min(86vw, 360px); height: 74px; font-size: 22px; }
.phone-card-note { margin: 0; font: 600 17px var(--ui); color: var(--muted); }
.phone-card .fine { margin: 0; font: 600 13px var(--ui); color: rgba(181, 166, 144, .6); }
