:root{color-scheme:dark;font-family:"Arial Rounded MT Bold","Trebuchet MS",Arial,sans-serif;font-weight:900;color:#fff;background:#83d5ed;--outline:#153252;--gold:#ffd348}
*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden}
[hidden]{display:none!important}
button{font:inherit;color:inherit;cursor:pointer;touch-action:none;min-width:48px;min-height:48px;border:3px solid #183957;border-radius:18px;background:#3b8fca;box-shadow:0 5px 0 #173c64;padding:10px 16px}
button:hover{filter:brightness(1.12)}button:active{transform:translateY(3px);box-shadow:0 2px 0 #173c64}
button:focus-visible{outline:4px solid #fff;outline-offset:4px}
#world{position:fixed;inset:0;display:block;width:100%;height:100%;touch-action:none}
#vignette{position:fixed;inset:0;pointer-events:none;background:radial-gradient(ellipse at center,transparent 65%,#244c771a)}
h1,h2,#hud,#toast,#prompt,#compass,.eyebrow,#selected-route,.instructions,.intro{text-shadow:2px 2px 0 var(--outline),-2px -2px 0 var(--outline),2px -2px 0 var(--outline),-2px 2px 0 var(--outline),0 4px 0 var(--outline)}
#menu{position:absolute;inset:0;padding:7vh 6vw;overflow:auto;background:linear-gradient(90deg,#15496665,transparent 70%)}
.eyebrow{color:var(--gold);font-size:20px;letter-spacing:0}
h1{font:1000 clamp(58px,7vw,105px)/.92 "Arial Black","Trebuchet MS",sans-serif;letter-spacing:-.055em;margin:23px 0 22px;-webkit-text-stroke:2px var(--outline);text-shadow:0 7px 0 var(--outline),4px 0 var(--outline),-4px 0 var(--outline)}
h1 em{font-style:normal;color:var(--gold)}
.intro{font-size:20px;line-height:1.5;margin:0 0 24px}
#expeditions{display:flex;gap:9px;width:min(420px,100%)}
.expedition{flex:1;position:relative;min-width:0;padding:7px 3px;display:flex;flex-direction:column;gap:2px;align-items:center;justify-content:center;background:#3196c4;min-height:76px}
.expedition.selected{background:#ffd348;color:#183752;box-shadow:0 5px 0 #b98227}
.number{font-size:27px}.expedition strong{font-size:14px}.complete{position:absolute;top:3px;right:7px;color:#0d734b}
#selected-route{font-size:21px;margin:18px 0 16px;color:#fff}
.primary{background:#ffcb3f;color:#183752;box-shadow:0 6px 0 #b77827;font-size:24px;min-height:64px}
#begin{width:min(420px,100%);display:flex;align-items:center;justify-content:space-between}
.instructions{display:flex;flex-direction:column;font-size:15px;line-height:1.65;margin-top:23px}
#save-note{font-size:14px;max-width:400px;background:#183752b0;padding:8px;border-radius:8px}
#hud{position:absolute;left:max(18px,env(safe-area-inset-left));right:max(18px,env(safe-area-inset-right));top:max(16px,env(safe-area-inset-top));display:flex;justify-content:space-between;align-items:flex-start;pointer-events:none}
.location small{display:block;font-size:17px;color:#ffe581}.location strong{font-size:24px;display:block;margin-top:3px}
.inventory{position:absolute;left:50%;transform:translateX(-50%);text-align:center;width:320px}
#crystals{font-size:39px;color:#ffdf52}.inventory small{display:block;font-size:18px;line-height:1.3}
#progress{height:7px;border-radius:10px;background:#fff8;width:220px;overflow:hidden;margin:9px auto 5px;box-shadow:0 1px 0 #173752}
#progress-fill{display:block;width:0;height:100%;background:#ffcf47;border-radius:10px;transition:width .15s}
#checkpoint{font-size:13px;color:#b9ffce}
.utilities{display:flex;gap:8px;pointer-events:auto}.utilities button{font-size:24px;padding:4px 9px;background:#297baa}
#toast{position:absolute;bottom:24px;left:50%;transform:translateX(-50%);width:min(650px,93%);font-size:22px;text-align:center;color:#fff2a1;pointer-events:none;line-height:1.3}
#prompt{position:absolute;left:50%;top:55%;transform:translate(-50%,-50%);font-size:25px;text-align:center;color:#ffec83;pointer-events:none;width:90%}
#compass{position:absolute;top:151px;left:50%;transform:translateX(-50%);display:flex;gap:9px;font-size:16px;align-items:center;color:#fff}
#bearing{display:block;font-size:24px}
#touch{position:absolute;left:20px;right:20px;bottom:max(24px,env(safe-area-inset-bottom));display:none;align-items:flex-end;justify-content:space-between;pointer-events:none}
#stick{width:130px;height:130px;position:relative;border-radius:50%;background:#153d664d;border:3px solid #ffffffa8;box-shadow:0 3px 0 #14365380;pointer-events:auto;touch-action:none}
.stick-arrows{position:absolute;inset:0;display:grid;place-items:center;font-size:97px;line-height:1;opacity:.45;color:white;pointer-events:none}
#stick-knob{position:absolute;left:50%;top:50%;width:60px;height:60px;margin:-30px;background:#ffffffb3;border:3px solid #fff;border-radius:50%;box-shadow:0 4px 0 #143c6060;pointer-events:none}
.actions{display:flex;gap:13px;align-items:flex-end}.actions button{pointer-events:auto;border-radius:50%;width:78px;height:78px;padding:5px;font-size:18px;background:#478fcc;border:3px solid #fff;box-shadow:0 4px 0 #173e6b}
.actions button:last-child{width:96px;height:96px;background:#ffc83e;color:#163e61;font-size:21px}
.actions button.unavailable{opacity:.45}
#overlay{position:absolute;inset:0;background:#17365292;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;padding:24px;overflow:auto}
#overlay small{font-size:23px;color:#ffdf57;text-shadow:0 3px #163456}
h2{font:1000 clamp(36px,5vw,67px)/1.08 "Arial Black","Trebuchet MS",sans-serif;letter-spacing:-.045em;margin:15px 0;color:#fff;-webkit-text-stroke:1px #163456}
#overlay p{font-size:20px;line-height:1.4;max-width:460px;text-shadow:0 2px #163456;margin:10px 0 17px}
#overlay button{width:min(355px,90%);font-size:19px;margin-top:12px;min-height:54px}
#failure{position:absolute;inset:12%;background:#173456;padding:25px}
@media(pointer:coarse){#touch:not([hidden]){display:flex}#toast{bottom:180px}}
@media(max-width:600px){
  #menu{padding:36px 22px;background:linear-gradient(180deg,#17375220,transparent)}
  h1{font-size:59px;margin:19px 0 21px}.eyebrow{font-size:16px}.intro{font-size:17px}
  #expeditions{gap:6px}.expedition{border-radius:14px;min-height:69px}.expedition strong{font-size:12px}
  #selected-route{font-size:18px;margin:18px 0 16px}.primary{font-size:21px;min-height:59px}
  .instructions{font-size:13px;margin-top:21px}
  #hud{left:12px;right:12px;top:14px}.location small{font-size:13px}.location strong{font-size:17px;max-width:210px}
  .inventory{top:58px;width:100%}#crystals{font-size:32px}.inventory small{font-size:16px}
  #progress{width:170px;height:6px;margin:6px auto 4px}#checkpoint{font-size:12px}
  .utilities button{min-width:46px;min-height:46px;border-radius:14px;font-size:22px}
  #compass{top:178px;font-size:14px;gap:5px}#bearing{font-size:20px}
  #touch:not([hidden]){display:flex}#touch{left:15px;right:15px;bottom:23px}
  #stick{width:116px;height:116px}.stick-arrows{font-size:86px}#stick-knob{width:54px;height:54px;margin:-27px}
  .actions{gap:8px}.actions button{width:64px;height:64px;font-size:15px}.actions button:last-child{width:80px;height:80px;font-size:18px}
  #toast{bottom:160px;font-size:18px}#prompt{font-size:21px}
  #overlay small{font-size:19px}#overlay h2{font-size:42px}#overlay p{font-size:17px}#overlay button{font-size:18px}
}
@media(max-height:480px){
  #menu{padding:20px 30px;display:grid;grid-template-columns:1fr 1fr;column-gap:30px;align-content:center}
  .eyebrow{grid-column:1;font-size:14px}h1{grid-column:1;grid-row:2;font-size:54px;margin:10px 0}
  .intro{grid-column:1;grid-row:3;font-size:15px;margin:0}
  #expeditions{grid-column:2;grid-row:2;align-self:end}
  #selected-route{grid-column:2;grid-row:3;font-size:17px;margin:15px 0 0}
  #begin{grid-column:2;grid-row:4;margin-top:13px;min-height:52px;font-size:20px}
  .instructions{grid-column:1;grid-row:4;font-size:12px;margin-top:16px}#save-note{grid-column:2;grid-row:5}
  #hud{top:9px}.location small{font-size:12px}.location strong{font-size:18px}
  .inventory{top:0}#crystals{font-size:29px}.inventory small{font-size:14px}#progress{margin-top:5px;width:190px}#checkpoint{font-size:11px}
  #compass{top:110px;font-size:13px}#bearing{font-size:18px}
  #touch{bottom:13px}#stick{width:100px;height:100px}.stick-arrows{font-size:77px}
  .actions button{width:64px;height:64px;font-size:15px}.actions button:last-child{width:80px;height:80px;font-size:18px}
  #toast{bottom:120px;font-size:16px}#prompt{font-size:20px}
  #overlay{padding:14px}#overlay small{font-size:17px}#overlay h2{font-size:38px;margin:10px 0}
  #overlay p{font-size:16px;margin:6px 0}#overlay button{min-height:46px;margin-top:8px;font-size:16px}
}
