:root {
    color-scheme: dark;
    --ink: #fff2d6;
    --muted: #d2b997;
    --paper: #201b18;
    --edge: #635245;
    --accent: #ffc45c;
    background: #151311;
    color: var(--ink);
    font-family: system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; }
.lobby {
    max-width: 520px;
    margin: auto;
    padding: clamp(18px, 6vw, 36px);
}
h1, h2, p { margin: 0 0 .65em; }
h1, h2 { font-family: Georgia, serif; line-height: 1; }
h1 { font-size: clamp(2.7rem, 11vw, 4.5rem); }
h2 { font-size: clamp(1.8rem, 6vw, 2.5rem); }
.eyebrow { color: var(--accent); font-size: .9em; font-weight: 750; letter-spacing: .07em; }
.panel { padding: 20px; border: 1px solid var(--edge); border-radius: 12px; background: var(--paper); }
button {
    padding: 11px 16px;
    min-height: 46px;
    border: 1px solid var(--accent);
    border-radius: 6px;
    background: var(--accent);
    color: #23180d;
    font: inherit;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}
button.secondary, button.choice { background: #302820; color: var(--ink); border-color: var(--edge); }
button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
button:disabled { opacity: .55; }
.small, #status { color: var(--muted); }
#camera { margin: 10px 0; }
#camera video { display: block; width: 100%; max-height: 40vh; background: #000; }
.buttons { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.choices { display: grid; gap: 8px; }
#round p { line-height: 1.4; }
.score { font: 700 clamp(3rem, 14vw, 5rem)/1 Georgia, serif; color: var(--accent); }
.signage {
    display: grid;
    min-height: 100vh;
    grid-template-rows: 1fr auto;
    padding: clamp(12px, 3vmin, 40px);
    gap: 12px;
    background: radial-gradient(ellipse at top right, #3c291c, #151311 65%);
}
.signage-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 3vmin;
}
.signage h1 { font-size: clamp(30px, 9vmin, 116px); }
.signage h2 { font-size: clamp(21px, 5vmin, 64px); }
.signage p, .signage ol { font-size: clamp(15px, 3.6vmin, 45px); margin-bottom: .35em; }
.signage #recent, .signage .ready-band p { font-size: clamp(14px, 3vmin, 36px); }
.signage ol { padding-left: 1.4em; }
.signage li { margin-bottom: .1em; overflow-wrap: anywhere; }
.signage .qr { text-align: center; font-weight: 750; color: var(--accent); }
.signage .qr-code { width: min(28vw, 40vh, 420px); margin-bottom: .3em; }
.signage .qr-code svg { display: block; width: 100%; height: auto; }
.ready-band { padding: 8px 12px; border: 2px solid var(--accent); border-radius: 6px; }
.ready-band strong { color: var(--accent); }
#ready-names { overflow-wrap: anywhere; }
@media (max-aspect-ratio: 3/4) {
    .signage-content { grid-template-columns: 1fr; justify-items: start; }
    .signage .qr-code { width: min(42vw, 24vh); }
}
a { color: var(--accent); }
.setup-links { margin-top: 1em; }
input { font: inherit; }
#menu .choices button { display: grid; gap: .35em; padding: 13px 15px; background: #302820; color: var(--ink); border-color: var(--edge); }
#menu .choices strong { font: 700 1.4em Georgia, serif; color: var(--accent); }
#menu .choices span { font-weight: 450; }
#back-to-games { margin-bottom: 14px; }
#round > .choices + button, #round > button + .choices { margin-top: 12px; }
.game-bingo { padding-inline: clamp(8px, 2.6vw, 20px); }
.bingo-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
}
.bingo-square {
    min-height: 56px;
    padding: 5px 2px;
    font-size: clamp(.71rem, 2.85vw, .95rem);
    line-height: 1.15;
    text-align: center;
    overflow-wrap: anywhere;
    background: #302820;
    color: var(--ink);
    border-color: var(--edge);
}
.bingo-square[aria-pressed="true"], .choice[aria-pressed="true"] {
    background: var(--accent);
    color: #23180d;
    border-color: var(--accent);
}
.bingo-square[aria-pressed="true"]::before { content: '✓'; display: block; }
.bingo-square.winning { box-shadow: inset 0 0 0 2px #fff2d6; }
.bingo-square:disabled { opacity: 1; cursor: default; }
.bingo-win, .reading-outcome { color: var(--accent); font-size: 1.35em; font-weight: 750; }
.reading-field { display: grid; gap: 6px; margin-bottom: 12px; }
.reading-field input { width: 100%; min-height: 44px; padding: 8px; border: 1px solid var(--edge); border-radius: 6px; }
.reading-turn { font-weight: 750; font-size: 1.22em; }
.reading-scores { margin: 10px 0; padding-left: 1.3em; overflow-wrap: anywhere; }
.signage .game-highlights p { font-size: clamp(14px, 3vmin, 36px); overflow-wrap: anywhere; }
@media (prefers-reduced-motion: no-preference) {
    .reading-outcome { animation: reading-reveal .3s ease-out both; }
    @keyframes reading-reveal {
        from { opacity: 0; transform: translateY(4px); }
        to { opacity: 1; transform: translateY(0); }
    }
}
.queue-notices { display: grid; gap: 8px; }
#entrance-names { overflow-wrap: anywhere; }
.game-selection { margin: 16px 0 8px; padding: 8px 12px 12px; border: 1px solid var(--edge); border-radius: 8px; }
.game-selection legend { padding: 0 5px; font-weight: 700; }
.game-selection label { display: flex; align-items: center; gap: 8px; min-height: 36px; }

.queue-setup { max-width: 58rem; }
.game-setup-tabs { display: flex; flex-wrap: wrap; gap: .55rem; margin: 1.1rem 0; }
.game-setup-tabs a, .setup-add { display: inline-block; padding: .5rem .85rem; border: 1px solid #634e4e; border-radius: .45rem; }
.game-setup-tabs a[aria-current="page"] { color: #20160f; background: #ffba75; border-color: #ffba75; text-decoration: none; }
.game-setup-fields { margin: 1.25rem 0; border: 1px solid #634e4e; border-radius: .6rem; padding: .9rem; }
.game-setup-fields legend { font-weight: 700; padding: 0 .35rem; }
.game-setup-fields input[type="number"] { width: 6rem; margin-left: .35rem; }
.game-season-dates { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 1rem; }
.game-content-group { border-top: 1px solid #574242; padding: .7rem 0; }
.game-content-group summary { cursor: pointer; font-weight: 700; }
.game-content-group li { margin: .45rem 0; }
.game-content-group li small { margin-left: .35rem; }
.game-content-editor { display: grid; gap: 1rem; }
.game-content-editor label { display: grid; gap: .35rem; }
.game-content-editor :is(input,select,textarea) { min-width: 0; width: 100%; box-sizing: border-box; font: inherit; }
.game-content-editor :is(select,textarea), .game-setup-fields input[type="number"] {
    color: #fff4e7; background: #1d171b; border: 1px solid #745d66; border-radius: .4rem; padding: .5rem;
}
.game-content-editor label[hidden] { display: none; }
.game-choice-editor { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: .75rem; }
.game-editor-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem; }
