:root{font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#fff1e2;background:#1b1b1b;color-scheme:dark;--muted:#9f9689;--line:#555151;--bronze:#b76e2d;--ivory:#fff1e2;--cyan:#59e1e6}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button,a,input,select,textarea{touch-action:manipulation}button,a{outline-offset:5px}button{cursor:pointer}a{color:var(--ivory);text-underline-offset:4px}button:disabled{cursor:wait;opacity:.6}.site-head{display:flex;align-items:center;justify-content:space-between;padding:25px max(24px,calc((100vw - 1240px)/2));border-bottom:1px solid var(--line);gap:20px}.brand{font-size:24px;font-weight:900;letter-spacing:.18em;color:var(--ivory);text-decoration:none}.brand span{display:block;font-size:10px;letter-spacing:.22em;font-weight:600;color:var(--muted);margin-top:4px}nav{display:flex;align-items:center;gap:22px}main{max-width:1288px;padding:0 24px;margin:auto}.intro{padding:64px 0 36px}.eyebrow{letter-spacing:.18em;font-size:11px;font-weight:800;color:var(--muted)}h1{font-size:clamp(36px,5vw,68px);letter-spacing:-.04em;line-height:1.05;margin:17px 0}p{line-height:1.6;color:var(--muted)}h2{letter-spacing:-.025em}.worlds{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin:34px 0 22px}.world{border:1px solid var(--line);border-radius:12px;padding:30px;background:#623f2b2e}.world>span{font-size:12px;letter-spacing:.15em;font-weight:800;color:var(--ivory)}.world.abyss>span{color:var(--muted)}.world h2{font-size:28px;margin:18px 0 12px}.world p{max-width:460px;min-height:52px}.meteor{border-top:3px solid var(--bronze)}.abyss{border-top:3px solid var(--muted)}.primary{border:1px solid var(--bronze);border-radius:6px;background:#623f2b;color:var(--ivory);padding:13px 18px;font-weight:750;min-height:46px}.secondary{background:#555151;color:var(--ivory);border-color:#9f9689}.quiet{background:transparent;border:1px solid var(--line);border-radius:5px;padding:9px 13px;color:var(--ivory)}.small{font-size:12px;line-height:1.6}.hidden{display:none!important}#game-section{padding:22px 0}.game-toolbar{display:flex;align-items:center;gap:12px;padding:0 0 12px;font-size:12px}.game-toolbar strong{margin-right:auto}.game-toolbar span{color:var(--muted)}#game-wrap{position:relative;background:#020508;width:100%;aspect-ratio:16/9;border:1px solid var(--line);overflow:hidden;border-radius:7px}#game-wrap:fullscreen{width:100vw;height:100vh;border-radius:0}#unity-canvas{display:block;width:100%;height:100%;outline:none;touch-action:none}.loading{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;background:#071015e8;text-align:center;padding:30px}.loading h2{font-size:26px}progress{width:min(420px,90%);height:10px;accent-color:var(--cyan)}.loading p{max-width:600px}.feedback{display:grid;grid-template-columns:.8fr 1.2fr;gap:70px;padding:64px 0;border-top:1px solid var(--line);margin-top:36px}.feedback h2{font-size:32px}.feedback form{display:grid;gap:20px}label{display:grid;gap:8px;font-size:14px}input,select,textarea{background:#1b1b1b;color:var(--ivory);border:1px solid #9f9689;border-radius:5px;padding:12px;width:100%}fieldset{border:0;padding:0;margin:0}legend{font-size:14px;margin-bottom:10px}.ratings{display:flex;gap:10px}.ratings label{display:flex;align-items:center;justify-content:center;gap:7px;padding:12px;border:1px solid #9f9689;border-radius:5px;flex:1}.ratings input{width:auto;accent-color:var(--ivory)}footer{display:flex;justify-content:center;gap:28px;flex-wrap:wrap;padding:24px;border-top:1px solid var(--line);font-size:12px;color:var(--muted)}dialog{background:#1b1b1b;color:var(--ivory);border:1px solid #9f9689;border-radius:12px;padding:30px;max-width:660px;width:calc(100% - 32px)}dialog::backdrop{background:#1b1b1bd9}.choice{display:flex;gap:12px;flex-wrap:wrap}.choice button{flex:1;min-width:210px}dialog h2{margin-top:0}.document{max-width:850px;padding-top:45px;padding-bottom:70px}.document h1{font-size:46px}.document h2{margin-top:34px}.admin-head{display:flex;align-items:center;justify-content:space-between;gap:15px}.metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:14px}.metric{background:#623f2b2e;padding:20px;border:1px solid var(--line);border-radius:7px}.metric b{font-size:28px;display:block}.metric span{font-size:12px;color:var(--muted)}.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:6px;margin:16px 0 30px}table{width:100%;border-collapse:collapse;font-size:13px}th,td{text-align:left;padding:12px;border-bottom:1px solid var(--line);vertical-align:top;max-width:500px;overflow-wrap:anywhere}th{background:#623f2b;white-space:nowrap}details{border:1px solid var(--line);border-radius:6px;padding:15px;margin:10px 0}summary{cursor:pointer;overflow-wrap:anywhere}.error{color:#ffb8a2}.notice{padding:15px 20px;background:#623f2b2e;border:1px solid #555151;border-radius:6px}.admin-login{max-width:520px;margin:50px auto}.admin-login form{display:grid;gap:16px}.feedback-text{white-space:pre-wrap;overflow-wrap:anywhere}.admin-section{margin:35px 0}.admin-section h2{font-size:24px}@media(max-width:720px){.site-head{padding:18px}.brand{font-size:20px}.brand span{font-size:8px}nav{gap:12px}main{padding:0 16px}.intro{padding-top:34px}.worlds,.feedback{grid-template-columns:1fr}.world{padding:22px}.world p{min-height:0}.feedback{gap:12px;padding-top:30px}.game-toolbar{flex-wrap:wrap}.game-toolbar span{width:100%;order:3}#game-wrap{aspect-ratio:9/14;max-height:78vh}.game-toolbar .quiet{padding:7px 10px}.document h1{font-size:35px}.choice{flex-direction:column}footer{gap:14px}.admin-head{align-items:start;flex-wrap:wrap}}
input::placeholder,textarea::placeholder{color:var(--muted);opacity:1}
/* Optional website theme. Bronze above remains the unchanged default. */
:root[data-site-theme=gold]{background:#070402;--muted:#d8bc7c;--line:#6c6233;--bronze:#dda202}
:root[data-site-theme=gold] :is(.brand,.intro h1,.eyebrow,.world>span){color:#dda202}
:root[data-site-theme=gold] :is(.world,.metric,.notice){background:#7e45092e}
:root[data-site-theme=gold] .abyss{border-top-color:#9c6e21}
:root[data-site-theme=gold] :is(#launcher,#feedback,dialog,#admin-login,#dashboard) .primary{background:#dda202;color:#070402;border-color:#dda202}
:root[data-site-theme=gold] :is(#launcher,#feedback,dialog,#admin-login,#dashboard) .secondary{background:#7e4509;color:#fff1e2;border-color:#9c6e21}
:root[data-site-theme=gold] :is(.site-head,#feedback,dialog,.document,#admin-login,#dashboard) :is(input,select,textarea){background:#070402;border-color:#9c6e21}
:root[data-site-theme=gold] .ratings label{border-color:#9c6e21}
:root[data-site-theme=gold] .ratings input{accent-color:#dda202}
:root[data-site-theme=gold] dialog{background:#070402;border-color:#9c6e21}
:root[data-site-theme=gold] dialog::backdrop{background:#070402d9}
:root[data-site-theme=gold] th{background:#7e4509}
:root[data-site-theme=gold] .notice{border-color:#6c6233}
/* Forest: green background, sage foliage tones and warm earth/cream accents. */
:root[data-site-theme=forest]{background:#24574e;--muted:#d4dfc5;--line:#789779;--bronze:#e6bd93}
:root[data-site-theme=forest] :is(.world,.metric,.notice){background:#294f40}
:root[data-site-theme=forest] .world.abyss{background:#644633;border-top-color:#a3b58c}
:root[data-site-theme=forest] :is(#launcher,#feedback,dialog,#admin-login,#dashboard) .primary{background:#e6bd93;color:#203e32;border-color:#e6bd93}
:root[data-site-theme=forest] :is(#launcher,#feedback,dialog,#admin-login,#dashboard) .secondary{background:#a3b58c;color:#203e32;border-color:#a3b58c}
:root[data-site-theme=forest] :is(.site-head,#feedback,dialog,.document,#admin-login,#dashboard) :is(input,select,textarea){background:#203e32;border-color:#a3b58c}
:root[data-site-theme=forest] .ratings label{border-color:#a3b58c}
:root[data-site-theme=forest] .ratings input{accent-color:#e6bd93}
:root[data-site-theme=forest] dialog{background:#294f40;border-color:#a3b58c}
:root[data-site-theme=forest] dialog::backdrop{background:#173c33d9}
:root[data-site-theme=forest] th{background:#644633}
:root[data-site-theme=forest] .notice{border-color:#789779}
.site-head{flex-wrap:wrap}
.site-head nav{flex-wrap:wrap;justify-content:flex-end}
.theme-picker{display:flex;align-items:center;gap:8px;font-size:12px;white-space:nowrap}
.theme-picker select{width:auto;min-width:106px;min-height:44px;padding:8px 10px;font-size:16px}
@media(max-width:720px){.site-head nav{justify-content:flex-start}}
/* The website palette stops at the game: preserve the existing gameplay UI. */
#game-section{--muted:#9bb3bc;--line:#29434c;color:#eaf5f7}
#game-section .quiet{color:#d2e8ed}
/* Touch presentation is a viewport overlay, never a smaller canvas between rails. */
.touch-controls,.rotate-hint,.touch-control-label{display:none}
.touch-key{border:1px solid #8bdce1a8;border-radius:12px;color:#fff;background:#0a273a85;min-height:44px;min-width:44px;padding:7px;font-weight:750;font-size:12px;text-shadow:0 1px 3px #000;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;box-shadow:inset 0 0 14px #8ee9f511}
.touch-key:disabled{cursor:default;opacity:.25}
.touch-key.is-held{background:#65e7e5b8;border-color:#fff;color:#06212b;text-shadow:none;box-shadow:0 0 0 2px #b0ffff50}
.touch-key[hidden]{display:none!important}
.direction-pad{position:relative;width:144px;height:144px;border:1px solid #8bdce180;border-radius:50%;background:radial-gradient(circle,#163e4d50 0 45%,#0a273a55 46% 100%);box-shadow:inset 0 0 20px #8ee9f511;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;pointer-events:auto}
.joystick-knob{position:absolute;left:28%;top:28%;width:44%;height:44%;display:grid;place-items:center;border:1px solid #a5faffb8;border-radius:50%;background:#246073b3;box-shadow:0 2px 10px #0005,inset 0 0 12px #a5faff18;transform:translate(var(--stick-x,0px),var(--stick-y,0px));pointer-events:none}
.joystick-knob span{font-size:9px;line-height:1.25;font-weight:750;color:#eafaff;text-align:center;text-shadow:0 1px 3px #000}
.direction-pad.is-held .joystick-knob{background:#3a91a4cc;border-color:#fff}
.direction-pad[aria-disabled=true]{opacity:.25}
#touch-toggle[aria-pressed=true]{border-color:var(--cyan);color:var(--cyan)}
html.touch-game-open{overflow:hidden;overscroll-behavior:none}
body.touch-enabled.game-open{position:fixed;inset:0;width:100%;height:100%;overflow:hidden;overscroll-behavior:none}
body.touch-enabled.game-open .site-head,body.touch-enabled.game-open #feedback,body.touch-enabled.game-open footer,body.touch-enabled.game-open #game-help{display:none}
body.touch-enabled.game-open main{max-width:none;width:100%;height:100%;padding:0;margin:0}
body.touch-enabled.game-open #game-section{position:fixed;inset:0;width:100%;height:100vh;height:100dvh;padding:0;overflow:hidden;background:#020508;isolation:isolate}
body.touch-enabled.game-open #game-stage{position:absolute;inset:0;display:block;width:100%;height:100%;margin:0;padding:0}
body.touch-enabled.game-open #game-wrap{position:absolute;inset:0;width:100%;height:100%;max-height:none;aspect-ratio:auto;border:0;border-radius:0}
body.touch-enabled.game-open #unity-canvas{width:100%;height:100%}
body.touch-enabled.game-open .touch-controls{position:absolute;z-index:20;display:flex;pointer-events:none}
body.touch-enabled.game-open .touch-controls .touch-key{pointer-events:auto}
body.touch-enabled.game-open .touch-key small,body.touch-enabled.game-open .touch-caption{display:none}
body.touch-enabled.game-open .touch-directions{left:max(12px,env(safe-area-inset-left));bottom:max(12px,env(safe-area-inset-bottom))}
body.touch-enabled.game-open .touch-actions{right:max(12px,env(safe-area-inset-right));bottom:max(12px,env(safe-area-inset-bottom));width:174px;height:136px;display:grid;grid-template-columns:76px 88px;grid-template-rows:62px 62px;gap:8px;align-items:center}
body.touch-enabled.game-open .touch-boost{grid-column:2;grid-row:1/3;align-self:end;width:88px;height:88px;border-radius:50%;font-size:14px;background:#0c40569c;border-color:#a5faff}
body.touch-enabled.game-open .touch-umbrella{grid-column:1;grid-row:1;width:76px;height:56px;font-size:13px}
body.touch-enabled.game-open .touch-interact{grid-column:1;grid-row:2;width:76px;height:56px;font-size:13px}
body.touch-enabled.game-open .touch-session{z-index:50;top:max(8px,env(safe-area-inset-top));left:max(8px,env(safe-area-inset-left));align-items:center;gap:6px}
body.touch-enabled.game-open .touch-session .touch-key{min-width:61px;height:44px;background:#071b28ad;font-size:12px;padding:7px 10px}
body.touch-enabled.game-open .game-toolbar{position:absolute;z-index:50;top:max(8px,env(safe-area-inset-top));right:max(8px,env(safe-area-inset-right));display:flex;align-items:center;gap:6px;margin:0;padding:0;height:44px;flex-wrap:nowrap;pointer-events:none}
body.touch-enabled.game-open .game-toolbar button{pointer-events:auto;height:44px;min-width:44px;padding:7px 10px;background:#071b28ad;border-color:#6b939f80;font-size:12px}
body.touch-enabled.game-open .game-toolbar strong,body.touch-enabled.game-open #tracking-status,body.touch-enabled.game-open .desktop-control-label{display:none}
body.touch-enabled.game-open .touch-control-label{display:inline}
body.touch-enabled.game-open #fullscreen .touch-control-label{font-size:22px;line-height:1}
body.touch-enabled.game-open #touch-toggle .touch-control-label{font-size:20px;line-height:1}
body.touch-enabled.game-open .loading{z-index:40;padding:60px 20px}
body.touch-enabled.game-open .loading h2{font-size:clamp(18px,4vw,28px)}
body.touch-enabled.game-open .loading p{font-size:13px;max-width:520px}
body.touch-enabled.game-open #game-stage:is([data-game-screen=menu],[data-game-screen=intro],[data-game-screen=paused],[data-game-screen=portal],[data-game-screen=results]) .touch-directions,
body.touch-enabled.game-open #game-stage:is([data-game-screen=menu],[data-game-screen=intro],[data-game-screen=paused],[data-game-screen=portal],[data-game-screen=results]) .touch-actions{display:none}
@media(orientation:portrait){
  body.touch-enabled.game-open .rotate-hint{position:absolute;z-index:25;top:calc(max(8px,env(safe-area-inset-top)) + 48px);left:0;right:0;display:block;margin:0;text-align:center;font-size:10px;line-height:1.4;color:#dbf4f5;text-shadow:0 1px 4px #000;pointer-events:none}
  body.touch-enabled.game-open #game-stage:is([data-game-screen=playing],[data-game-screen=bunker]) .rotate-hint{display:none}
}
@media(max-width:350px){
  body.touch-enabled.game-open .touch-actions{width:156px;grid-template-columns:68px 80px}
  body.touch-enabled.game-open .touch-boost{width:80px;height:80px}
  body.touch-enabled.game-open .touch-umbrella,body.touch-enabled.game-open .touch-interact{width:68px;font-size:12px}
  body.touch-enabled.game-open .touch-directions{left:max(6px,env(safe-area-inset-left))}
  body.touch-enabled.game-open .touch-actions{right:max(6px,env(safe-area-inset-right))}
  body.touch-enabled.game-open .game-toolbar{gap:3px;right:max(5px,env(safe-area-inset-right))}
  body.touch-enabled.game-open .game-toolbar button{padding:7px;min-width:40px}
  body.touch-enabled.game-open .touch-session{gap:3px;left:max(5px,env(safe-area-inset-left))}
  body.touch-enabled.game-open .touch-session .touch-key{min-width:55px;padding:7px}
}
.touch-face{display:contents;pointer-events:none}
/* Bigger labels only when touch is enabled; desktop controls and type stay intact. */
body.touch-enabled.game-open .touch-key{font-size:15px}
body.touch-enabled.game-open .joystick-knob span{font-size:11.25px}
body.touch-enabled.game-open .touch-actions{width:192px;grid-template-columns:96px 88px}
body.touch-enabled.game-open .touch-boost{font-size:17.5px}
body.touch-enabled.game-open .touch-umbrella,
body.touch-enabled.game-open .touch-interact{width:96px;font-size:16px}
body.touch-enabled.game-open .touch-session .touch-key,
body.touch-enabled.game-open .game-toolbar button{font-size:15px}
body.touch-enabled.game-open .game-toolbar button{padding:7px;min-width:44px}
body.touch-enabled.game-open #fullscreen .touch-control-label{font-size:27.5px}
body.touch-enabled.game-open #touch-toggle .touch-control-label{font-size:25px}
body.touch-enabled.game-open .loading h2{font-size:clamp(22.5px,5vw,35px)}
body.touch-enabled.game-open .loading p{font-size:16.25px}
body.touch-enabled.game-open .rotate-hint{font-size:12.5px}
@media(max-width:350px){
 body.touch-enabled.game-open .touch-actions{width:168px;grid-template-columns:80px 80px}
 body.touch-enabled.game-open .touch-umbrella,
 body.touch-enabled.game-open .touch-interact{width:80px;font-size:14.5px;padding:5px}
}
/* Portrait input map only. The invisible regions follow a 4 x 8 viewport grid.
   Left half: rows 5-8. Right: Boost rows 5-7, Umbrella row 6, Interact row 7.
   No grid is rendered; the bottom gesture strip never captures movement. */
@media(orientation:portrait){
 body.touch-enabled.game-open .touch-directions{left:0;top:50%;bottom:max(20px,env(safe-area-inset-bottom));width:50%}
 body.touch-enabled.game-open .direction-pad{position:absolute;inset:0;width:100%;height:100%;border:0;border-radius:0;background:none;box-shadow:none;--portrait-stick-size:min(144px,calc(25vw - 12px),calc(12.5dvh - 12px))}
 body.touch-enabled.game-open .direction-pad::before{content:"";position:absolute;left:50%;top:18.75dvh;transform:translate(-50%,-50%);width:var(--portrait-stick-size);height:var(--portrait-stick-size);border:1px solid #8bdce180;border-radius:50%;background:radial-gradient(circle,#163e4d50 0 45%,#0a273a55 46% 100%);box-shadow:inset 0 0 20px #8ee9f511;pointer-events:none}
 body.touch-enabled.game-open .joystick-knob{left:calc(50% - var(--portrait-stick-size)*.22);top:calc(18.75dvh - var(--portrait-stick-size)*.22);width:calc(var(--portrait-stick-size)*.44);height:calc(var(--portrait-stick-size)*.44)}
 body.touch-enabled.game-open .joystick-knob span{display:none}
 body.touch-enabled.game-open .touch-actions{left:50%;right:0;top:50%;bottom:auto;width:50%;height:37.5%;grid-template-columns:1fr 1fr;grid-template-rows:repeat(3,1fr);gap:0;align-items:stretch}
 body.touch-enabled.game-open .touch-actions .touch-key{position:relative;align-self:stretch;display:grid;place-items:center;width:100%;height:100%;min-width:0;min-height:0;padding:0;border:0;border-radius:0;background:none;box-shadow:none}
 body.touch-enabled.game-open .touch-boost{grid-column:2;grid-row:1/4}
 body.touch-enabled.game-open .touch-umbrella{grid-column:1;grid-row:2}
 body.touch-enabled.game-open .touch-interact{grid-column:1;grid-row:3}
 body.touch-enabled.game-open .touch-actions .touch-face{display:grid;place-items:center;width:calc(100% - 8px);max-width:96px;min-height:48px;padding:3px;border:1px solid #8bdce1a8;border-radius:12px;background:#0a273a85;box-shadow:inset 0 0 14px #8ee9f511;font-size:clamp(11px,3.1vw,16px)}
 body.touch-enabled.game-open .touch-boost .touch-face{width:calc(100% - 12px);max-width:88px;aspect-ratio:1;min-height:0;border-radius:50%;background:#0c40569c;border-color:#a5faff;font-size:clamp(14px,4vw,17.5px)}
 body.touch-enabled.game-open .touch-actions .is-held .touch-face{background:#65e7e5b8;border-color:#fff;color:#06212b;text-shadow:none;box-shadow:0 0 0 2px #b0ffff50}
}
