:root{color-scheme:dark;font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;--cream:#fcf5e4;--gold:#e2c89a;--edge:clamp(16px,3.25vw,64px);--soft:rgba(240,245,242,.76)}
*{box-sizing:border-box}html,body,main{margin:0;width:100%;height:100%;height:100dvh;overflow:hidden;background:#102329;color:var(--cream)}main{position:relative;isolation:isolate}main:after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(180deg,rgba(5,13,17,.37),transparent 18%,transparent 78%,rgba(5,13,17,.50));z-index:0}
#view{display:block;width:100%;height:100%;position:absolute;inset:0;outline:none;touch-action:none;cursor:grab}#view:active{cursor:grabbing}
header{position:absolute;z-index:3;inset:max(19px,env(safe-area-inset-top)) var(--edge) auto;display:flex;align-items:center;gap:16px;pointer-events:none}button,a{font:inherit;color:inherit}button{cursor:pointer}header button,header a,.mission,#action,dialog{backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px)}
header a,header button,.tools{pointer-events:auto}.back,.tools button{display:inline-flex;align-items:center;justify-content:center;height:40px;border:1px solid #e4edea51;text-decoration:none;background:#0d1b20aa}.back{border-radius:23px;gap:8px;padding:0 15px 1px 12px;font-size:13px;font-weight:600}.tools{margin-left:auto;display:flex;gap:8px}.tools button{width:40px;border-radius:50%}svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}.back:hover,.tools button:hover,#action:hover{background:#20363de6}.headtitle{display:flex;align-items:baseline;gap:10px;text-shadow:0 1px 8px #071114;color:#fff}.headtitle #song{font-family:Georgia,serif;font-size:23px;letter-spacing:-.04em}.headtitle #region{font-size:12px;opacity:.75}.tools #audio[aria-pressed=true]{color:#babbb7}.tools #audio[aria-pressed=true]:after{content:"";position:absolute;width:25px;height:1.4px;background:currentColor;transform:rotate(-45deg)}
#bearing{position:absolute;top:max(32px,env(safe-area-inset-top));left:50%;transform:translateX(-50%);color:#f9f8ebc9;display:flex;align-items:center;gap:7px;font:10px ui-monospace,monospace;letter-spacing:.14em;text-shadow:0 1px 6px #0009;z-index:1}#bearing i{width:24px;height:4px;border-block-end:1px solid #e4edea82;border-inline:1px solid #e4edea82}#crosshair{position:absolute;z-index:1;top:50%;left:50%;width:3px;height:3px;transform:translate(-50%,-50%);border-radius:50%;background:#f4f6dea8;box-shadow:0 0 3px #0008;pointer-events:none}
.mission{position:absolute;z-index:1;bottom:max(37px,env(safe-area-inset-bottom));left:var(--edge);width:min(325px,74vw);padding:15px 19px 16px;border:1px solid #fcf5e431;border-radius:3px;background:linear-gradient(115deg,#0b1a20ce,#101f26a6);pointer-events:none}.missionline{display:flex;align-items:center;justify-content:space-between;gap:25px}.missionline>span,.kicker{font:600 9px ui-monospace,SFMono-Regular,monospace;letter-spacing:.145em;color:#e2c89e}#steps{display:flex;gap:4px}#steps b{width:15px;height:2px;background:#e6e8d844}#steps b.done{background:#e4c895}#steps b.active{background:#fcf5e4aa}.mission h1{margin:6px 0 8px;font:400 clamp(21px,2.25vw,34px)/1.04 Georgia,serif;letter-spacing:-.038em}.guidance{display:flex;align-items:center;gap:7px;color:#e7edebd6;font-size:12px;line-height:1.3}#arrow{color:var(--gold);font-size:16px;line-height:1;width:14px;text-align:center}#meter{position:relative;height:4px;background:#b3bbba42;margin-top:11px;overflow:visible}#band{height:100%;position:absolute;background:#e4c67f;left:64%;width:28%}#needle{position:absolute;top:-3px;height:10px;width:2px;background:#fff}#action{position:absolute;bottom:max(43px,env(safe-area-inset-bottom));right:var(--edge);z-index:3;border:1px solid #e2c89ac4;background:#152624d9;border-radius:26px;padding:9px 15px 9px 9px;align-items:center;gap:8px;user-select:none;-webkit-user-select:none;touch-action:none;font-weight:600;font-size:13px}#action:not([hidden]){display:flex}kbd{border:1px solid #f2eedb7d;border-radius:50%;width:25px;height:25px;display:grid;place-items:center;font:12px ui-monospace,monospace;color:var(--gold)}.bottomhelp{position:absolute;bottom:19px;right:var(--edge);z-index:1;color:#e6ecebc2;font-size:10px;letter-spacing:.025em;text-shadow:0 1px 4px #061116}.bottomhelp span{color:var(--gold);padding:0 4px}
#toast{position:absolute;z-index:2;top:18%;left:50%;transform:translate(-50%,-5px);opacity:0;padding:9px 16px;border:1px solid #d5d4b84f;background:#0b1d24ce;border-radius:20px;max-width:90%;text-align:center;transition:.25s;pointer-events:none;font-size:13px}#toast.show{opacity:1;transform:translate(-50%,0)}#loading{position:absolute;inset:0;z-index:5;display:grid;place-content:center;justify-items:center;background:radial-gradient(ellipse at 60% 57%,#324c56,#0d1b22);color:#e1e8de;transition:opacity .3s}#loading[hidden]{display:none}#loading span{width:28px;height:28px;border-radius:50%;border:1px solid #849799;border-top-color:#f4dfb0;animation:spin 1s linear infinite}#loading p{font-size:13px;letter-spacing:.03em}@keyframes spin{to{transform:rotate(1turn)}}
dialog{background:#10232bf2;color:var(--cream);border:1px solid #8faaa788;border-radius:8px;width:min(390px,90vw);padding:28px;max-height:85dvh}dialog::backdrop{background:#020c1066}dialog h2{font:32px Georgia,serif;letter-spacing:-.04em;margin:8px 0}dialog p,dialog dl{font-size:13px;line-height:1.5;color:var(--soft)}dialog #close{position:absolute;right:12px;top:8px;background:none;border:0;font-size:25px}dialog dl{display:grid;grid-template-columns:1fr auto;gap:6px 5px;border-block:1px solid #ffffff2a;padding:14px 0}dialog dd{margin:0;color:var(--cream);text-align:right}dialog a{color:var(--gold);display:inline-block;font-size:12px;margin:10px 12px 0 0}
#pad,#touchlook{display:none}#pad{width:92px;height:92px;border-radius:50%;border:1px solid #dae9e37a;background:#14222a66;z-index:3;position:absolute;bottom:max(19px,env(safe-area-inset-bottom));left:var(--edge);touch-action:none}#pad i{position:absolute;left:50%;top:50%;width:38px;height:38px;transform:translate(-50%,-50%);border-radius:50%;border:1px solid #e2e6dfae;background:#cad8d72e}.touch .bottomhelp{display:none}.touch #pad,.touch #touchlook{display:block}.touch .mission{bottom:max(126px,calc(env(safe-area-inset-bottom) + 110px));padding:11px 14px;width:min(275px,80vw)}.touch #touchlook{position:absolute;z-index:1;bottom:23px;right:var(--edge);color:#f3f5efbb;font:11px system-ui;text-shadow:0 1px 4px black}.touch #action{bottom:46px}.touch #action kbd{display:none}.touch #action{min-height:44px;padding:10px 16px}.touch #bearing{top:75px}
@media(max-width:700px){.headtitle #region{display:none}.back{height:37px}.tools button{height:37px;width:37px}.headtitle #song{font-size:21px}header{gap:10px}.mission h1{font-size:24px}.tools{gap:6px}#bearing{top:66px}}
@media(max-height:480px) and (pointer:coarse){.touch .mission{bottom:16px;left:130px;width:215px}.touch #bearing{top:22px}.touch #pad{width:78px;height:78px}.touch .mission h1{font-size:19px}}
@media(prefers-reduced-motion:reduce){*,*:after{transition:none!important;scroll-behavior:auto!important}#loading span{animation:none}}

.tools #performer[aria-pressed=true]{color:#1b251e;background:#e0e6d7;border-color:#e0e6d7}
.tools #performer[aria-busy=true]{opacity:.6}
@media(max-width:405px){header{gap:5px}.tools{gap:4px}.tools button{width:32px;height:32px}.back{padding-inline:10px}.headtitle #song{font-size:18px}}

#world [hidden]{display:none!important}

/* Once movement is understood, leave the horizon clear. Header controls stay
   available to pointer, keyboard and touch throughout the walk. */
#keyhint,#touchlook,#bearing,.headtitle #region {transition:opacity .8s}
.exploring #keyhint,.exploring #touchlook,.exploring #bearing,.exploring .headtitle #region {opacity:0;pointer-events:none}
.exploring header:not(:hover):not(:focus-within) .back,.exploring header:not(:hover):not(:focus-within) .tools button {background:#101c2078;border-color:#f4f4ee50}
@media (prefers-reduced-motion:reduce){#keyhint,#touchlook,#bearing,.headtitle #region{transition:none}}
