:root{color-scheme:dark}.game-theme-toggle{min-width:44px;min-height:44px;font-size:22px;line-height:1;pointer-events:auto}
.hud-right .game-theme-toggle{margin-bottom:8px;padding:5px;display:inline-grid;place-items:center}.utilities .game-theme-toggle{border:1px solid #abc6ad60;padding:5px;font-size:22px;color:#edf5e8;background:#0e2b2b}
:root[data-theme=light]{color-scheme:light}
:root[data-theme=light],:root[data-theme=light] body{background:#f3f7fc;color:#10243b}
:root[data-theme=light] button{background:#e5edf6;color:#10243b;border-color:#8b9fb4}
:root[data-theme=light] button:hover,:root[data-theme=light] button:focus-visible{background:#d8e6f4;outline-color:#075fa9}
:root[data-theme=light] .primary,:root[data-theme=light] .primary:hover{background:#c8ff3d;color:#10200b;border-color:#557818}
:root[data-theme=light] a{color:#265700}
:root[data-theme=light] .overlay{background:linear-gradient(90deg,#f3f7fcfa 0%,#f3f7fcf2 55%,#f3f7fcd9 100%)}
:root[data-theme=light] :is(.eyebrow,h1 em,.coordinates i,#result-rank,#settings-title,#loading){color:#335f00;border-color:#335f00}
:root[data-theme=light] h1 span{color:#8a4900}
:root[data-theme=light] :is(.mission-tag,#intro,.footnote,.keyboard-help,.menu-art>span,.menu-art b,.coordinates,.map-unlock-note,.utilities button,.result-card p,#invite){color:#40536c}
:root[data-theme=light] .menu-art{border-color:#8b9fb4}
:root[data-theme=light] :is(#coop-panel,#controls-panel,.result-card,#results.mission-result){background:#f3f7fc;color:#10243b;border-color:#8b9fb4}
:root[data-theme=light] #results.mission-result .result-card{background:transparent}
:root[data-theme=light] #room-code{background:#fff;color:#10243b;border-color:#8b9fb4}
:root[data-theme=light] #message{color:#894000}
:root[data-theme=light] .map-picker button[aria-pressed=true]{background:#dceecb;color:#234d07;border-color:#46721e;box-shadow:inset 0 -2px #46721e}
/* Opaque HUD panels stay legible against both jungle and flooded-valley artwork. */
:root[data-theme=light] #hud{color:#10243b;text-shadow:none}
:root[data-theme=light] :is(.hud-left,.hud-right,.hud-bottom,.control-guide){background:#f3f7fcf5;border:1px solid #8b9fb4;border-radius:6px;padding:9px}
:root[data-theme=light] .hud-right{min-width:140px}
:root[data-theme=light] :is(.hud-left small span,.hud-bottom small,#hint,#checkpoint-notice,#team,.control-guide){color:#265700}
:root[data-theme=light] :is(#timer,.retry-count,.checkpoint-route){color:#40536c}
:root[data-theme=light] :is(#threat,.checkpoint-route .current){color:#7c4500}
:root[data-theme=light] .checkpoint-route .passed{color:#265700}
:root[data-theme=light] .hit-pips{color:#335f00}:root[data-theme=light] .hit-pips .spent{color:#607184;opacity:.6}
:root[data-theme=light] #reload-button{color:#10243b;border-color:#8b9fb4}
:root[data-theme=light] #target-marker{color:#10243b;text-shadow:none}
:root[data-theme=light] #target-label{background:#fff;color:#10243b;border-color:#8b9fb4}
:root[data-theme=light] #target-arrow{color:#ffe19c;filter:drop-shadow(0 1px 2px #000)}
:root[data-theme=light] #boss{background:#f3f7fcf5;color:#10243b;padding:7px;border-radius:6px}
:root[data-theme=light] #connection:not(:empty){background:#fff;color:#265700;padding:6px;border-radius:4px}
:root[data-theme=light] .combat-notice{background:#fff2cd;color:#573700;border-color:#9a6a14}
@media(max-width:760px){:root[data-theme=light] #hud.compact-play .hud-left{width:125px}:root[data-theme=light] #hud.compact-play .hud-right{min-width:105px}.hud-right .game-theme-toggle{min-width:38px;min-height:38px;margin-bottom:3px;font-size:20px}}
#menu{align-items:safe center}
/* Keep the three HUD columns separate when the world is letterboxed on phones. */
:root[data-theme=light] #hud.compact-play .hud-left{width:105px;padding:6px}
:root[data-theme=light] #hud.compact-play .health-track{width:100%}
#hud.compact-play .hud-bottom{width:40%}
#hud.compact-play .hud-right{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:center;gap:3px;width:105px;min-width:0;padding:6px}
#hud.compact-play #weapon{grid-column:1/-1;grid-row:1;font-size:7px;overflow-wrap:anywhere}
#hud.compact-play #ammo{grid-column:1;grid-row:2;font-size:18px;margin:0;white-space:nowrap}
#hud.compact-play .hud-right .game-theme-toggle{grid-column:2;grid-row:2;justify-self:end;width:30px;min-width:30px;min-height:30px;margin:0;padding:3px;font-size:18px}
#hud.compact-play #timer{grid-column:1/-1;grid-row:3;font-size:8px}
#hud.compact-play #reload-button,#hud.compact-play #menu-button{grid-row:4;min-width:0;width:100%;font-size:7px;padding:5px 2px;margin:0;line-height:1.4}
#hud.compact-play #reload-button{grid-column:1}#hud.compact-play #menu-button{grid-column:2}
