/* Theme changes surfaces and contrast; question images and QR pixels retain their original colors. */
.header-controls{margin-inline-start:auto;display:flex;align-items:center;justify-content:flex-end;gap:12px;flex-wrap:wrap;min-width:0}
.header-controls nav{margin-inline-start:0}
.theme-toggle{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:44px;white-space:nowrap;flex-shrink:0}
.theme-indicator{display:inline-block;width:30px;height:18px;border:2px solid currentColor;position:relative;background:transparent;flex-shrink:0}
.theme-indicator:before{content:'';position:absolute;top:2px;left:2px;width:10px;height:10px;background:currentColor}
.theme-toggle[aria-checked="true"] .theme-indicator{background:var(--gold);color:#203d3a;border-color:var(--gold)}
.theme-toggle[aria-checked="true"] .theme-indicator:before{left:14px}
.word-theme-controls{display:flex;justify-content:flex-end;margin-bottom:20px}

:root[data-theme="dark"]{color-scheme:dark;--bg:#121d1b;--panel:#1c2b27;--edge:#789487;--text:#f5f0df;--muted:#bbcbc3;--lime:#8eddaf;--violet:#a7d7ff;--red:#ffac98;--gold:#ffc849}
:root[data-theme="dark"] .ambient{background-image:radial-gradient(#bbcbc30a 1px,transparent 1px)}
:root[data-theme="dark"] button{box-shadow:0 4px 0 #080f0d}
:root[data-theme="dark"] button:hover:enabled{background:#30483c;box-shadow:0 6px 0 #080f0d}
:root[data-theme="dark"] button:active:enabled{box-shadow:0 1px 0 #080f0d}
:root[data-theme="dark"] button:focus-visible,:root[data-theme="dark"] a:focus-visible{outline-color:var(--violet)}
:root[data-theme="dark"] .primary{color:#203d3a}
:root[data-theme="dark"] .primary:hover:enabled{background:#ffdb77}
:root[data-theme="dark"] .danger{box-shadow:0 4px 0 #744136}
:root[data-theme="dark"] .brand-symbol{background:#f8f1df;border-radius:2px}
:root[data-theme="dark"] .hero h1 em,:root[data-theme="dark"] .vs b{color:#ffaf87;text-shadow:3px 3px 0 #543321}
:root[data-theme="dark"] .hero-kicker{background:#203b32}
:root[data-theme="dark"] .pill,:root[data-theme="dark"] .banner,:root[data-theme="dark"] .result{background:#3d331c;color:var(--text);box-shadow:3px 3px 0 #080f0d}
:root[data-theme="dark"] .banner .primary{background:var(--gold)}
:root[data-theme="dark"] .panel,:root[data-theme="dark"] .question,:root[data-theme="dark"] .board-category,:root[data-theme="dark"] .team,:root[data-theme="dark"] .table-wrap,:root[data-theme="dark"] .game-row{box-shadow:4px 4px 0 #080f0d}
:root[data-theme="dark"] input:not([type=checkbox]),:root[data-theme="dark"] textarea,:root[data-theme="dark"] select{background:#101b18;border-color:#789487;box-shadow:inset 2px 2px 0 #080f0d}
:root[data-theme="dark"] input::placeholder,:root[data-theme="dark"] textarea::placeholder{color:#9eafa5}
:root[data-theme="dark"] input:focus,:root[data-theme="dark"] textarea:focus,:root[data-theme="dark"] select:focus{border-color:var(--lime);outline-color:var(--lime)}
:root[data-theme="dark"] .category-choice{background:var(--panel);border-color:#789487;box-shadow:3px 3px 0 #080f0d}
:root[data-theme="dark"] .category-choice:has(input:checked){background:#254734;border-color:var(--lime)}
:root[data-theme="dark"] .team.current{background:#243b2d;border-top-color:var(--lime)}
:root[data-theme="dark"] .team:nth-child(3){background:#1b2b38}
:root[data-theme="dark"] .team:nth-child(3).current{background:#203e52;border-top-color:var(--violet)}
:root[data-theme="dark"] .board-category:nth-child(3n+2){background:#293426}
:root[data-theme="dark"] .board-category:nth-child(3n+3){background:#1d3038}
:root[data-theme="dark"] .category-icon{background:#264739;color:#c0ecd3;box-shadow:4px 4px 0 #080f0d}
:root[data-theme="dark"] .board-category:nth-child(3n+2) .category-icon{background:#46381e;color:#ffe3a5;box-shadow:4px 4px 0 #080f0d}
:root[data-theme="dark"] .board-category:nth-child(3n+3) .category-icon{background:#23445c;color:#a7d7ff;box-shadow:4px 4px 0 #080f0d}
:root[data-theme="dark"] .tile,:root[data-theme="dark"] .tile small{color:#203d3a}
:root[data-theme="dark"] .tile:hover:enabled{background:#ffe6a3}
:root[data-theme="dark"] .tile.done{background:#2a3b35;color:#a6b7ad;border-color:#52685e;opacity:1;box-shadow:none}
:root[data-theme="dark"] .tile.done:before{border-color:#455d51}
:root[data-theme="dark"] .timer-panel{background:#223a2b;box-shadow:3px 3px 0 #080f0d}
:root[data-theme="dark"] .timer-panel.timer-paused:not(.urgent){background:#203c4d}
:root[data-theme="dark"] .timer-panel.urgent{background:#492a25}
:root[data-theme="dark"] .answer{background:#203d2c}
:root[data-theme="dark"] th{background:#294237}
:root[data-theme="dark"] th,:root[data-theme="dark"] td{border-bottom-color:#4e6b5f}
:root[data-theme="dark"] tbody tr:nth-child(even){background:#21332d}
:root[data-theme="dark"] .notice{background:#263e31;border-color:#688e75}
:root[data-theme="dark"] dialog{box-shadow:8px 8px 0 #080f0d}
:root[data-theme="dark"] dialog::backdrop{background:#040807cc}
:root[data-theme="dark"] footer{background:#101a17}
:root[data-theme="dark"] .word-phone #secret-word{color:#203d3a}
:root[data-theme="dark"] .admin-tabs [aria-selected="true"]{background:var(--gold);color:#203d3a}
:root[data-theme="dark"] .admin-tabs [aria-selected="true"]:hover:enabled{background:#ffdb77}
@media(max-width:680px){.header-controls{width:100%;justify-content:space-between;gap:10px}.header-controls nav{width:auto;flex:1;justify-content:flex-end;margin-top:0}.theme-toggle{font-size:12px;padding:9px 11px}}
