/* Theme tokens override the original dark values only for the daylight palette. */
:root{--canvas-dot:#34373a;--canvas-outline:#14151a;--canvas-name:#d6fc74;--canvas-secondary:#b59bf6;--canvas-warm:#ffaf76}
:root[data-theme=night]{--theme-muted:#a5aaa1}
:root[data-theme=day]{color-scheme:light;--theme-bg:#d6e1db;--theme-panel:#e2e9e1;--theme-input:#d2ddcf;--theme-text:#263e2d;--theme-muted:#465740;--theme-accent:#2c623e;--theme-purple:#715078;--theme-on-accent:#e2e9e1;--theme-line:#a5b59a;--theme-border:#788b6d;--theme-shadow:#ccd6bb;--theme-title-shadow:#d9e3c8;--theme-purple-shadow:#e4dbe5;--theme-overlay:#d6e1dbf5;--theme-glass:#d6e1dbe8;--theme-backdrop:#253c32a6;--theme-gold:#795618;--theme-error:#9b352e;--theme-stage:#e6ddeb;--theme-selected:#e7deeb;--canvas-dot:#b4c5a5;--canvas-outline:#e2e9e1;--canvas-name:#214e31;--canvas-secondary:#715078;--canvas-warm:#985333}
html[data-theme=day] body:after{display:none}
#garden-scenery{pointer-events:none;z-index:0;image-rendering:pixelated}
#world{z-index:1}
#game-shell>main,body>main:not(.legal):not(.why){z-index:2}
.seo-home #garden-scenery{position:absolute}
html[data-theme=day] #game-shell>header,html[data-theme=day] body>header{background:#a9d2e540;border-bottom-color:#788b6d40}
html[data-theme=day] #game-shell>footer,html[data-theme=day] body:not(.marketing)>footer:not(.site-footer):not(.marketing-footer){background:#d1dbc7f5}
html[data-theme=day] #hunt-hud,html[data-theme=day] #active-name{text-shadow:none}
html[data-theme=day] #product-title{text-shadow:3px 3px var(--theme-title-shadow)}
html[data-theme=day] button:hover{filter:brightness(.97)}
html[data-theme=day] #live-board{opacity:1}
/* Quiet HUD surfaces: lower the fill, not the opacity of readable text. */
:root{--hud-fill:#14151a24;--hud-control:#14151a38;--hud-line:#a5aaa138;--hud-hover:#14151a8c}
:root[data-theme=day]{--hud-fill:#d6e1db24;--hud-control:#d6e1db38;--hud-line:#52634f30;--hud-hover:#d6e1db99}
html body[data-mode=hunt] #hunt-hud{background:var(--hud-fill);border-color:var(--hud-line);backdrop-filter:none;text-shadow:none}
html body[data-mode=hunt] #hunt-intro{background:transparent;border-color:var(--hud-line)}
html body[data-mode=hunt] #auto-fire-control{background:var(--hud-control);border-color:var(--hud-line);opacity:1;transition:background .15s,border-color .15s}
html body[data-mode=hunt] #auto-fire-control:hover,html body[data-mode=hunt] #auto-fire-control:focus-within{background:var(--hud-hover);border-color:var(--theme-border,#697451)}
html body[data-mode=hunt] #live-board{background:var(--hud-fill);border-color:var(--hud-line);opacity:1;text-shadow:none;color:var(--theme-muted,#a5aaa1)}
#theme-open{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:8px 12px;border:1px solid var(--theme-border,#5a5d55);background:var(--theme-panel,#22252a);color:var(--theme-text,#dfdfd5);font:700 11px/1.3 var(--font-lead,) 'Space Mono',var(--font-script,monospace),monospace;box-shadow:2px 2px var(--theme-shadow,#070809);cursor:pointer;white-space:nowrap;max-width:100%;letter-spacing:0}
#theme-picker{box-sizing:border-box;width:min(500px,calc(100vw - 28px));max-height:calc(100svh - 28px);overflow:auto;margin:auto;padding:28px;border:1px solid var(--theme-border,#697451);background:var(--theme-panel,#181a20);color:var(--theme-text,#efeee7);box-shadow:8px 8px var(--theme-shadow,#070809)}
#theme-picker::backdrop{background:var(--theme-backdrop,#08090bd9);backdrop-filter:blur(3px)}
#theme-picker h2{margin:0 0 24px;margin-inline-end:44px;font:700 23px/1.3 var(--font-lead,) 'Space Mono',var(--font-script,monospace),monospace;color:var(--theme-accent,#d6fc74);overflow-wrap:anywhere}
#theme-picker .theme-close{position:absolute;inset-inline-end:14px;top:12px;padding:0;width:44px;height:44px;min-height:44px;border:0;background:transparent;box-shadow:none;color:inherit;font:28px monospace;cursor:pointer}
.theme-options{display:grid;grid-template-columns:1fr 1fr;gap:14px}
#theme-picker .theme-options button{display:flex;flex-direction:column;gap:14px;align-items:stretch;padding:10px;text-align:start;background:var(--theme-input,#22252a);color:var(--theme-text,#efeee7);border:2px solid var(--theme-line,#5a5d55);box-shadow:none;min-width:0;cursor:pointer;font:700 13px/1.5 var(--font-lead,) 'Space Mono',var(--font-script,monospace),monospace}
#theme-picker .theme-options button[aria-pressed=true]{border-color:var(--theme-accent,#d6fc74);outline:2px solid var(--theme-accent,#d6fc74);outline-offset:2px}
.theme-swatch{display:block;height:90px;position:relative;overflow:hidden;image-rendering:pixelated}
.theme-swatch.day{background:linear-gradient(#eaf2e6,#d6e1db)}
.theme-swatch.day:before{content:'';position:absolute;bottom:0;left:0;width:28px;height:25px;background:#91b27b;box-shadow:12px 10px #719766,135px 10px #91b27b,145px -2px #c4d6aa}
.theme-swatch.day:after{content:'';position:absolute;left:30px;top:19px;width:35px;height:8px;background:#e2e9e1;box-shadow:7px -5px #e2e9e1}
.theme-swatch.night{background-color:#14151a;background-image:radial-gradient(#555963 1px,transparent 1px);background-size:14px 14px}
.theme-swatch.night:after{content:'✦';position:absolute;top:20px;left:45%;color:#d6fc74;font:32px monospace}
#theme-open:focus-visible,#theme-picker button:focus-visible{outline:3px solid var(--theme-purple,#b59bf6);outline-offset:4px}
html[data-theme=day] .head-right #theme-open,html[data-theme=day] .head-right #share,html[data-theme=day] .head-right #settings-open,html[data-theme=day] .head-right #lang-menu>summary{background:#e2e9e166;border-color:#788b6d66;box-shadow:none}
html[data-theme=day] .head-right #theme-open:hover,html[data-theme=day] .head-right #share:hover,html[data-theme=day] .head-right #settings-open:hover,html[data-theme=day] .head-right #lang-menu>summary:hover,html[data-theme=day] .head-right #lang-menu[open]>summary{background:#e2e9e1d9;color:var(--theme-text);border-color:var(--theme-border)}
@media(max-width:700px){#theme-open{font-size:10px;min-height:38px;padding:7px 8px}.head-right{flex-wrap:wrap;justify-content:flex-end;row-gap:8px}#game-shell>header,body>header{gap:10px}.theme-options{gap:10px}#theme-picker{padding:22px 18px}.theme-swatch{height:70px}}
@media(max-width:700px){
 #game-shell>header,body>header:not(.site-header){height:112px;flex-wrap:wrap;align-content:center;padding-top:10px;padding-bottom:10px}
 .head-right{width:100%;justify-content:flex-end}
 .head-right #theme-open{width:auto!important;padding:0 10px;max-width:calc(100% - 138px)}
 body[data-mode=hunt] #hunt-hud{top:122px}
 body[data-mode=results] #results,body[data-quick=true] #results{top:122px}
 .seo-home #game-shell>main{top:46%}
 #theme-picker .theme-options button{font-size:12px}
}

/* Bug Race in daylight: readable HUD on the soil, same tokens as the hunt HUD. */
html[data-theme=day] #race-hud{text-shadow:none}
html[data-theme=day] #race-call{color:var(--theme-text);text-shadow:0 0 6px #d6e1db,0 0 2px #d6e1db}
html[data-theme=day] #race-rank li{background:#d6e1dbcc}
html[data-theme=day] #race-count{text-shadow:5px 5px var(--theme-title-shadow)}
/* Phones: Appearance shows only its icon, like Share and Settings; screen readers still hear its name. */
@media(max-width:700px){
 .head-right #theme-open{display:block;width:38px!important;height:38px;min-height:38px;max-width:none;padding:0;font-size:0;line-height:36px;text-align:center}
 .head-right #theme-open:first-letter{font-size:14px}
}
/* Phones 360px and wider: brand and buttons share one row. Narrower phones keep the two-row header above. */
@media(min-width:360px) and (max-width:700px){
 #game-shell>header,body>header:not(.site-header){height:auto;flex-wrap:nowrap;padding-top:16px;padding-bottom:16px}
 .head-right{width:auto;flex-wrap:nowrap}
 body[data-mode=hunt] #hunt-hud{top:80px}
 body[data-mode=results] #results,body[data-quick=true] #results{top:80px}
 .seo-home #game-shell>main{top:43%}
}
