:root{color-scheme:dark;--ink:#11171c;--paper:#f5f5e9;--muted:#c3c7c1;--accent:#d4ef94;--line:#ffffff28;font-family:Arial,Helvetica,sans-serif}*{box-sizing:border-box}body{margin:0;background:var(--ink);color:var(--paper);overflow:hidden}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer}button:disabled{opacity:.5;cursor:wait}a{color:inherit;text-decoration:none}button:focus-visible,a:focus-visible{outline:3px solid var(--accent);outline-offset:5px}button{color:inherit} [hidden]{display:none!important}#game,#viewport,.vignette{position:fixed;inset:0}#viewport{background:#332d37 url('./assets/poster.jpg') center/cover no-repeat}#viewport canvas{display:block;width:100%;height:100%;touch-action:none}.vignette{pointer-events:none;background:linear-gradient(180deg,#11171c77,transparent 28%,transparent 68%,#11171c55)}.hud{position:fixed;pointer-events:none;z-index:2}.header{top:0;left:0;right:0;padding:28px 38px;display:flex;align-items:center;justify-content:space-between;gap:20px}.brand{display:flex;align-items:center;gap:10px;pointer-events:auto;font-weight:700;font-size:18px;letter-spacing:-.4px}.brand img{object-fit:contain}.brand small{display:block;font-size:8px;letter-spacing:3.1px;font-weight:500;margin-top:4px;color:var(--muted)}.tools{display:flex;gap:8px}.icon-button{pointer-events:auto;background:#141a2080;border:1px solid var(--line);padding:10px 14px;border-radius:7px;font-size:13px;backdrop-filter:blur(15px)}#fullscreen-button{font-size:22px;padding:4px 12px}.overlay{position:fixed;inset:0;z-index:3;background:linear-gradient(90deg,#11171ced 0%,#11171cc9 34%,#11171c50 68%,#11171c33);padding:120px 7vw 70px;display:flex;align-items:center;pointer-events:none}.welcome-content{width:min(670px,68vw);pointer-events:auto}.eyebrow{font-size:10px;font-weight:600;letter-spacing:2.2px;line-height:1.6;color:var(--accent);margin:0 0 24px}h1{font-size:clamp(56px,6.2vw,91px);font-weight:500;letter-spacing:-5px;line-height:.96;margin:0 0 25px}h1 span{display:block;font-size:.58em;color:#dadcd0;letter-spacing:-2.8px;line-height:1.4}p.intro{font-size:17px;line-height:1.65;max-width:480px;color:var(--muted);margin:0 0 25px}.facts{display:flex;flex-wrap:wrap;gap:12px 18px;font-size:11px;color:#e0e4d7;margin-bottom:36px}.facts span+span{border-left:1px solid #ffffff44;padding-left:18px}.actions{display:flex;gap:12px}.primary,.secondary{border-radius:7px;min-height:50px;padding:15px 24px;border:1px solid transparent;font-size:14px;font-weight:600;display:flex;align-items:center;justify-content:space-between;gap:24px}.primary{background:var(--accent);color:#202a19}.primary:hover{background:#e1ffad}.secondary{background:#ffffff0b;border-color:#ffffff4a;color:var(--paper)}.secondary:hover{background:#ffffff19}.loading{height:2px;width:310px;max-width:100%;background:#ffffff14;margin-top:23px}.loading div{background:var(--accent);height:100%;width:5%;transition:width .3s}#load-status{font-size:11px;color:var(--muted);margin:8px 0 22px}.controls-desktop,.controls-touch{font-size:10px;line-height:2;color:#c9cbc6}.controls-desktop span{padding:0 7px;color:#7f8783}kbd{font-family:inherit;font-size:9px;border:1px solid #ffffff3d;border-radius:3px;padding:3px 5px;white-space:nowrap}.controls-touch{display:none}.model-note{font-size:10px;line-height:1.6;color:#9fa6a1;max-width:440px;margin-top:23px}.welcome-side{margin-left:auto;align-self:flex-end;text-align:right;font-size:10px;letter-spacing:2px;line-height:1.8;color:#efefdf}.welcome-side .line{height:50px;border-right:1px solid #ffffff70;margin:20px 2px}.copyright{position:fixed;bottom:15px;left:38px;z-index:4;font-size:9px;color:#c5c8c2b5;pointer-events:none}.run-status{position:absolute;left:50%;transform:translateX(-50%);text-align:center;background:#161d24b0;border:1px solid var(--line);padding:11px 24px;border-radius:8px;min-width:160px;backdrop-filter:blur(12px)}.run-status span{display:block;font-size:8px;letter-spacing:2px;color:var(--accent);margin-bottom:5px}.run-status strong{font:500 23px/1.1 Arial,sans-serif;font-variant-numeric:tabular-nums}.objective{position:fixed;bottom:84px;left:38px;background:#151c24df;border:1px solid var(--line);border-radius:10px;padding:21px 23px;width:320px;max-width:calc(100vw - 76px);backdrop-filter:blur(14px)}.objective .eyebrow{font-size:9px;margin-bottom:8px}.objective h2{font-size:22px;font-weight:500;letter-spacing:-.5px;margin:0 0 6px}.objective p{font-size:12px;color:var(--muted);margin:0}.progress{height:3px;margin-top:18px;border-radius:4px;background:#ffffff19;overflow:hidden}.progress span{display:block;height:100%;background:var(--accent);width:0;transition:width .35s}.map-panel{position:fixed;right:38px;bottom:65px;width:224px;padding:14px;background:#151c24e6;border:1px solid var(--line);border-radius:10px;backdrop-filter:blur(12px)}.map-heading{display:flex;justify-content:space-between;font-size:8px;letter-spacing:1.8px;color:#dfe3d8}.map-panel canvas{width:100%;height:auto;display:block;margin:6px 0}.map-panel p{font-size:8px;color:var(--muted);display:flex;align-items:center;gap:5px;margin:0}.map-panel p span{margin-left:auto}.you-dot,.target-dot{display:inline-block;height:5px;width:5px;border-radius:50%;background:#fff;margin:0 4px}.target-dot{background:var(--accent)}.toast{position:fixed;left:50%;bottom:55px;transform:translateX(-50%);background:#182121df;color:var(--accent);font-size:12px;padding:10px 17px;border:1px solid #ffffff44;border-radius:30px;opacity:0;transition:opacity .2s;white-space:nowrap}.toast.visible{opacity:1}.bottom-hint{position:fixed;bottom:34px;left:38px;margin:0;font-size:10px;color:#d9dccf}.modal-backdrop{position:fixed;inset:0;z-index:5;display:grid;place-items:center;background:#101720a3;backdrop-filter:blur(9px);padding:25px}.modal{width:420px;max-width:100%;background:#1b242bf5;border:1px solid var(--line);border-radius:15px;padding:38px;box-shadow:0 20px 120px #0007}.modal .eyebrow{font-size:9px;margin-bottom:17px}.modal h2{font-size:36px;letter-spacing:-1.2px;font-weight:500;margin:0 0 16px}.modal p{font-size:13px;line-height:1.7;color:var(--muted)}.modal .primary,.modal .secondary{width:100%;margin-top:12px}.text-button{display:block;text-align:center;width:100%;border:0;background:transparent;font-size:12px;padding:20px 0 0;color:#c9d4c0}.modal .modal-controls{font-size:10px;margin-top:24px;line-height:1.8}.finish-time{font-size:60px;letter-spacing:-3px;color:var(--accent);font-variant-numeric:tabular-nums}.no-script{position:fixed;inset:20%;z-index:10;background:var(--ink);padding:40px}#touch-controls{display:none}.look-label{position:fixed;right:26px;bottom:120px;font-size:8px;letter-spacing:2px;color:#ffffff50}#joystick{position:fixed;left:30px;bottom:80px;width:100px;height:100px;border:1px solid #ffffff45;border-radius:50%;background:#ffffff0a;touch-action:none;pointer-events:auto}#stick{position:absolute;left:30px;top:30px;width:40px;height:40px;border:1px solid #ffffff55;border-radius:50%;background:#ffffff30;pointer-events:none}#joystick small{position:absolute;bottom:-22px;width:100%;text-align:center;font-size:8px;letter-spacing:2px;color:#ffffff75}@media(pointer:coarse){.controls-desktop,.bottom-hint{display:none}.controls-touch{display:block}#touch-controls{display:block}.objective{bottom:225px}.map-panel{width:175px;bottom:195px}.copyright{bottom:10px;font-size:8px}.toast{bottom:28px}}@media(max-width:700px){.header{padding:19px 20px}.brand{font-size:15px}.brand img{width:27px;height:27px}.brand small{font-size:7px;letter-spacing:2.4px}.overlay{padding:100px 26px 55px;background:linear-gradient(90deg,#11171ce8,#11171c88)}.welcome-content{width:100%}h1{font-size:66px;letter-spacing:-3.8px}h1 span{letter-spacing:-2px}p.intro{font-size:14px;max-width:370px}.eyebrow{font-size:8px;letter-spacing:1.6px;margin-bottom:20px}.facts{font-size:9px;gap:10px;margin-bottom:28px}.facts span+span{padding-left:10px}.actions{gap:9px}.primary,.secondary{font-size:12px;padding:13px 16px;gap:10px}.welcome-side{display:none}.copyright{left:20px;right:15px;font-size:8px}.tools{gap:5px}.icon-button{padding:9px;font-size:11px}.run-status{top:80px;min-width:124px;padding:7px 14px}.run-status strong{font-size:19px}.run-status span{font-size:7px}.objective{left:20px;bottom:225px;width:210px;padding:15px}.objective h2{font-size:18px}.objective p{font-size:10px}.map-panel{right:20px;bottom:80px;width:145px;padding:10px}.map-panel p{font-size:6px;gap:1px}.map-heading{font-size:7px}.progress{margin-top:12px}.toast{font-size:10px;max-width:90vw;white-space:normal;text-align:center}.bottom-hint{left:20px;font-size:9px}.model-note{font-size:9px}.modal{padding:28px}.modal h2{font-size:31px}}@media(max-height:610px){.overlay{padding:78px 6vw 35px}.welcome-content{max-width:640px}.welcome-content h1{font-size:54px;margin-bottom:12px}.welcome-content .eyebrow{margin-bottom:12px}.intro{margin-bottom:14px!important}.facts,.model-note,.welcome-side,.loading,#load-status{display:none}.controls-desktop,.controls-touch{margin-bottom:0}.objective{bottom:48px;left:25px;padding:12px;width:245px}.map-panel{bottom:30px;width:165px}.bottom-hint{display:none}.copyright{bottom:8px}.header{padding:16px 25px}.run-status{top:16px}.modal{padding:24px}.modal .modal-controls{margin:12px 0 0}.modal-backdrop{padding:12px}.modal h2{font-size:28px}.finish-time{font-size:40px}}@media(pointer:coarse) and (max-height:610px){.objective{top:83px;bottom:auto;width:225px}.map-panel{top:72px;bottom:auto;width:145px}#joystick{bottom:40px}.look-label{bottom:75px}.toast{bottom:20px}}@media(prefers-reduced-motion:reduce){*{transition:none!important}}

.header{z-index:4}

@media(max-width:700px) and (min-height:611px){.objective{bottom:265px}.look-label{bottom:255px}}



.quality-setting{display:flex;align-items:center;gap:12px;flex-wrap:wrap;font-size:11px;margin:0 0 23px;color:var(--muted)}.quality-setting select{font:inherit;color:var(--paper);background:#222c35;border:1px solid #ffffff3a;border-radius:5px;padding:8px 28px 8px 10px;cursor:pointer;outline-offset:4px}.quality-setting span{font-size:10px}.quality-label{font-size:10px;align-self:center;color:var(--accent);margin-right:7px;letter-spacing:.5px}.modal .quality-setting{margin:20px 0}.modal .quality-setting span{width:100%;font-size:9px}@media(max-width:700px){.quality-label{display:none}.quality-setting{gap:8px;margin-bottom:20px}.quality-setting span{width:100%;font-size:9px}.welcome-content .eyebrow{margin-bottom:17px}.welcome-content .facts{margin-bottom:21px}}@media(max-height:610px){.quality-setting{margin:10px 0;gap:10px}.quality-setting span{width:auto}.welcome-content h1{font-size:42px!important}.welcome-content .intro{font-size:13px;line-height:1.5}.welcome-content .controls-touch{font-size:9px}.welcome-content .eyebrow{font-size:8px;margin-bottom:8px}.quality-setting select{padding:5px 24px 5px 8px}.modal .quality-setting{margin:12px 0}.modal .modal-controls{display:none}}

/* Echo the walkthrough sky on the resume button and route-complete accents. */
#finish-menu{--accent:#edb8de}
#resume,#finish-menu .primary{background:linear-gradient(110deg,#56417f 0%,#825297 48%,#d87bab 100%);border-color:#f0c3e555;color:#fff;box-shadow:inset 0 1px 0 #ffffff20;transition:filter .18s,box-shadow .18s}#resume:hover,#finish-menu .primary:hover{filter:brightness(1.12);box-shadow:inset 0 1px 0 #ffffff35,0 4px 20px #ad63ba25}#resume:focus-visible,#finish-menu .primary:focus-visible{outline-color:#edb8de}.map-panel canvas{border-radius:5px}

/* Main menu colors follow the purple and pink twilight in the walkthrough. */
#welcome{--accent:#e9bfe8;--paper:#fff6ff;--muted:#e0d3e5}
#welcome h1{color:#fff7ff}#welcome h1 span{color:#ecd9ef}
#welcome .intro,#welcome .controls-desktop,#welcome .controls-touch{color:#e3d7e8}
#welcome .facts{color:#efdbef}#welcome .facts span+span{border-color:#e3b4dd55}
#welcome .primary{background:linear-gradient(110deg,#654488 0%,#8c4f8e 58%,#a65b91 100%);border-color:#e7add45c;color:#fff;box-shadow:inset 0 1px 0 #ffffff25,0 6px 22px #29123435}
#welcome .primary:hover{background:linear-gradient(110deg,#74509a 0%,#995d9c 58%,#9f6093 100%);box-shadow:inset 0 1px 0 #ffffff35,0 7px 26px #a25d982a}
#welcome .secondary{background:#b885c223;border-color:#e2b5de70;color:#fff5ff;backdrop-filter:blur(12px)}
#welcome .secondary:hover{background:#c18bd43b;border-color:#f2d1edaa}
#welcome .quality-setting{color:#e4d3e9}#welcome .quality-setting select{color:#fff4ff;background:#37243e;border-color:#d6a5d568}
#welcome .quality-setting select:focus{outline:none;box-shadow:none;border-color:#e6b4dc}
#welcome .quality-setting span,#welcome #load-status{color:#d8c5de}
#welcome .loading{background:#d6a9d622}#welcome .loading div{background:linear-gradient(90deg,#b49fe7,#e6a9d2)}
#welcome kbd{border-color:#d8afda66;background:#b98bc017}#welcome .controls-desktop span{color:#c5a6ce}
#welcome .model-note{color:#cbb7d1}#welcome .welcome-side{color:#f3d9ec}#welcome .welcome-side .line{border-color:#e2b4d98a}
.quality-label{color:#edc7ec}

/* Keep every main-menu label pure white over the twilight palette. */
#welcome{--paper:#fff;--muted:#fff}
#welcome h1,#welcome h1 span,#welcome .intro,#welcome .facts,#welcome .quality-setting,#welcome .quality-setting span,#welcome .quality-setting select,#welcome #load-status,#welcome .controls-desktop,#welcome .controls-touch,#welcome .controls-desktop span,#welcome .model-note,#welcome .welcome-side,#welcome .primary,#welcome .secondary{color:#fff}
body:has(#welcome:not([hidden])) .brand,body:has(#welcome:not([hidden])) .brand small,body:has(#welcome:not([hidden])) .quality-label,body:has(#welcome:not([hidden])) .copyright,body:has(#welcome:not([hidden])) .icon-button{color:#fff}

#welcome #start-route{position:relative;isolation:isolate;overflow:hidden;background:linear-gradient(110deg,#94467f,#ae538c);border-color:#efb0d780;box-shadow:inset 0 1px 0 #ffffff28,0 6px 22px #72244e30}
#welcome #start-route:hover{background:linear-gradient(110deg,#9c4c86,#b35691);border-color:#ffd4edaa;box-shadow:inset 0 1px 0 #ffffff38,0 7px 24px #b35b9638}
.header .tools{margin-left:auto}

#start-route .button-smoke{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:0;mix-blend-mode:screen}#start-route .button-label{position:relative;z-index:1;pointer-events:none;color:#fff;text-shadow:0 1px 3px #3f153dcc}

/* Route labels, progress, and map indicators stay white against the site. */
.run-status,#play-hud{--accent:#fff}

#map-north{display:inline-block;transform-origin:center}

/* Larger, higher-contrast pause controls remain crisp at every graphics setting. */
#pause-menu{--paper:#fff;--muted:#fff;--accent:#edb8de}
#pause-menu .modal{width:min(500px,calc(100vw - 50px));padding:36px 40px;max-height:calc(100dvh - 40px);overflow-y:auto;background:#1b242b}
#pause-menu .eyebrow{font-size:11px;letter-spacing:1.8px;margin-bottom:18px}
#pause-menu h2{font-size:40px;line-height:1.15}
#pause-menu p{font-size:16px;line-height:1.6;color:#fff}
#pause-menu .quality-setting{font-size:14px;gap:12px;margin:24px 0}
#pause-menu .quality-setting select{font-size:14px;min-height:42px;padding:10px 32px 10px 12px;color:#fff}
#pause-menu .quality-setting select:focus{outline:none;border-color:#e6b4dc;box-shadow:none}
#pause-menu .quality-setting span{font-size:12px;line-height:1.5}
#pause-menu .primary,#pause-menu .secondary{min-height:56px;padding:16px 20px;font-size:16px;font-weight:700;color:#fff}
#pause-menu #resume{background:linear-gradient(110deg,#56417f 0%,#825297 48%,#ad5a91 100%)}
#pause-menu #resume:hover{filter:none}
#pause-menu .text-button{font-size:15px;color:#fff;padding-top:22px}
#pause-menu .modal-controls{font-size:14px;line-height:1.75;margin-top:26px}
@media(max-width:700px){#pause-menu .modal{padding:28px 24px}#pause-menu h2{font-size:34px}}
@media(max-height:610px){#pause-menu .modal{padding:24px;max-height:calc(100dvh - 24px)}#pause-menu h2{font-size:32px}}

/* Menu text is rendered by the browser, independently of the 3D resolution. */
#welcome{align-items:safe center;overflow-y:auto;background:transparent}
body:has(#welcome:not([hidden])) .vignette{display:none}
#welcome .welcome-content{width:min(740px,100%);flex-shrink:0;text-shadow:0 1px 2px #160d23b3}
#welcome h1{font-weight:600;letter-spacing:-3.5px}
#welcome h1 span{font-weight:600;letter-spacing:-1.8px}
#welcome .intro{font-size:20px;line-height:1.6;max-width:600px}
#welcome .facts{font-size:14px;line-height:1.6;font-weight:500;margin-bottom:28px}
#welcome .quality-setting{font-size:14px;gap:12px;margin-bottom:24px}
#welcome .quality-setting select{font-size:14px;min-height:42px;padding:10px 32px 10px 12px}
#welcome .quality-setting span{font-size:13px;line-height:1.5}
#welcome .primary,#welcome .secondary{font-size:16px;font-weight:700;min-height:56px;padding:16px 22px}
#welcome #load-status{font-size:14px;line-height:1.6;margin-bottom:22px}
#welcome .controls-desktop,#welcome .controls-touch{font-size:14px;line-height:1.9}
#welcome kbd{font-size:12px;background:#33203fcc;border-color:#d8afda99}
@media(max-width:700px){
 #welcome{padding:90px 26px 50px}
 #welcome h1{font-size:clamp(48px,12vw,66px);letter-spacing:-2.5px}
 #welcome .intro{font-size:18px}
 #welcome .facts{gap:10px 14px;margin-bottom:24px}
 #welcome .facts span+span{padding-left:14px}
 #welcome .quality-setting span{width:100%}
 #welcome .actions{flex-direction:column;gap:12px}
 #welcome .primary,#welcome .secondary{width:100%}
}
@media(max-height:610px){#welcome{align-items:flex-start;padding:78px 6vw 40px}#welcome .intro{font-size:18px}#welcome .controls-touch{font-size:14px}}

/* Translucent controls keep the original site visible behind the menu. */
#welcome #quality,#welcome #start-route,#welcome #start-explore{
 background:rgba(15,23,32,.28);
 -webkit-backdrop-filter:blur(10px) saturate(120%);
 backdrop-filter:blur(10px) saturate(120%);
}
#welcome #quality:hover,#welcome #start-route:hover,#welcome #start-explore:hover{
 background:rgba(15,23,32,.36);
}

/* VR setup is separate from the existing main-menu layout. */
#vr-menu{z-index:6;--accent:#edb8de;--paper:#fff;--muted:#fff}
#vr-menu .modal{width:540px;max-height:calc(100dvh - 40px);overflow-y:auto}
#vr-menu p{font-size:15px;color:#fff}
#vr-menu .quality-setting,#vr-menu .text-button{font-size:15px;color:#fff}
#vr-menu .primary{background:rgba(195,134,189,.25);border-color:#edb8de80;color:#fff}
#vr-menu .primary:hover{background:rgba(195,134,189,.4)}
#vr-menu #vr-status{font-size:14px;color:#edc7ec}
body.in-vr .overlay,body.in-vr .modal-backdrop,body.in-vr #play-hud,body.in-vr .vignette,body.in-vr .copyright,body.in-vr #run-status{display:none}
