@charset "UTF-8";
* { box-sizing:border-box }
:root { color-scheme:dark; --night:#112637; --paper:#fff2ce; --mint:#88f5da; --gold:#ffc54b }
body { margin:0; background:var(--night); color:var(--paper); font:650 1rem/1.4 "Trebuchet MS",Arial,sans-serif }
main { height:100vh; height:100dvh; display:flex; flex-direction:column; position:relative; isolation:isolate; overflow:hidden }
button,a { font:inherit; cursor:pointer; -webkit-tap-highlight-color:transparent }
button:focus-visible,a:focus-visible { outline:3px solid white; outline-offset:3px }
header { flex:none; min-height:62px; display:flex; align-items:center; gap:12px; padding:5px max(12px,4vw); background:#132c3c; border-bottom:2px solid #486571; z-index:2 }
header button,header a { display:grid; place-items:center; min-width:48px; height:48px; border:1px solid #759399; border-radius:12px; color:var(--paper); background:#213f4c; text-decoration:none }
#home,#pause { font:900 1.55rem/1 system-ui }
.brand,h1,#sum,#start { font-family:"Arial Black","Trebuchet MS",system-ui,sans-serif; font-weight:1000 }
.brand { font-size:clamp(1rem,3vw,1.55rem); letter-spacing:-.06em; font-style:italic; text-transform:uppercase }
.brand b,h1 em { color:var(--gold) }
.meters { margin-inline-start:auto }.wallet { display:flex; align-items:center; gap:5px }.wallet i { color:var(--gold); font-style:normal; font-size:1.35rem }
.meters { display:flex; gap:10px }.wallet .stub { width:17px; height:11px; border:2px solid var(--mint); border-inline-start:5px double var(--mint); transform:rotate(-12deg); border-radius:3px }
@media(max-width:355px){.brand { font-size:.87rem }.meters { gap:4px }header { gap:4px!important }#sound { padding-inline:4px }}
#sound { font-size:.88rem; padding-inline:10px }
#world { flex:1; min-height:0; position:relative; overflow:hidden; touch-action:none }
canvas { position:absolute; inset:0; width:100%; height:100%; display:block }
#question { position:absolute; top:12px; left:50%; transform:translateX(-50%); text-align:center; width:max-content; max-width:96%; padding:7px 20px 10px; background:#102938f5; border:1px solid #bdcec3; border-radius:16px; box-shadow:0 4px #0c1b2c55 }
#sum { display:block; line-height:1.14; font-size:clamp(1.65rem,4vw,2.8rem) }
progress { width:100%; height:6px; display:block; margin-top:5px; accent-color:var(--gold) }
#feedback:not(:empty) { position:absolute; bottom:7px; left:50%; transform:translateX(-50%); width:max-content; max-width:96%; padding:5px 14px; text-align:center; background:#102938f5; color:#fff1c7; border:1px solid var(--mint); border-radius:10px }
#controls { flex:none; text-align:center; background:#142e3c; border-top:3px solid #7a989a; padding:10px 12px max(8px,env(safe-area-inset-bottom)) }
.console { display:flex; gap:12px; max-width:580px; margin:auto }
#choices { display:grid; grid-template-columns:repeat(3,1fr); gap:6px; flex:1 }
#choices button { min-height:50px; border:2px solid #8da6aa; border-radius:10px; background:#264654; color:white; font-weight:900; font-size:1.3rem }
#choices button[aria-pressed=true] { background:var(--mint); color:#0a3739; border-color:white; box-shadow:inset 0 -4px #38ac9d }
#choices button[aria-pressed=true]::before { content:"â—† "; font-size:.65em }
#steerHint { margin-top:8px; font-size:.82rem; color:#d6e8e6 }
[hidden] { display:none!important }
@media(max-width:480px) { header { gap:7px; padding-inline:8px }.console { gap:8px } }
@media(max-width:360px) {
  main[data-mode=running] .brand { display:none }
}
@media(max-height:520px) {
  header { min-height:44px; padding-block:0 }header a,header button { height:44px }
  #question { left:10px; transform:none; top:6px; padding:4px 10px }#sum { font-size:1.6rem }#controls { padding-block:5px }#steerHint { display:none }
}

#lifeMeter i { color:#ff9caa }
@media(max-width:400px){ .brand { display:none } }

#menu { position:absolute; inset:0; top:auto; height:calc(100% - 62px); display:flex; flex-direction:column; background:#1e8994; overflow:auto }
.cover { position:relative; flex:1 0 190px; overflow:hidden; isolation:isolate }
.cover img { position:absolute; width:100%; height:100%; object-fit:fill; z-index:-2 }
.map-heading { position:absolute; inset-block-start:clamp(10px,3vh,28px); inset-inline-start:clamp(12px,4vw,60px);
  padding:10px 22px 14px; border-radius:6px 22px 22px 22px; border:3px solid #ffe3a1;
  background:linear-gradient(150deg,#24565c,#153844); box-shadow:0 4px 0 #754d2a,0 7px 16px #173d4155 }
#crew,#count { color:#b1f3db; font-size:.76rem; font-weight:900; letter-spacing:.08em; text-transform:uppercase }
h1 { margin:2px 0 0; color:#fff2c9; font-size:clamp(1.45rem,3.8vw,3.5rem); line-height:1.08; letter-spacing:-.045em; text-shadow:0 3px #102832 }
#route { list-style:none; padding:0; margin:0; position:absolute; inset:0; pointer-events:none }
#route li { position:absolute; transform:translate(-50%,-50%) }
#route li:nth-child(1) { left:21%; top:75% }
#route li:nth-child(2) { left:53%; top:58% }
#route li:nth-child(3) { left:84%; top:29% }
#route button { pointer-events:auto; display:grid; justify-items:center; background:none; border:none; padding:4px; color:#fff6d5 }
#route b { display:grid; place-items:center; position:relative; width:clamp(42px,5.4vw,76px); aspect-ratio:1; border-radius:50%;
  font:1000 clamp(1.3rem,3vw,2.5rem)/1 system-ui; background:linear-gradient(#fff7c1,#ffca49 70%,#ef9e23); color:#5d3412;
  border:4px solid #fff5c9; box-shadow:0 0 0 3px #915621,0 6px 0 3px #81421e,0 10px 12px #243e4e66 }
#route span { margin-top:7px; white-space:nowrap; padding:4px 11px; background:#193e48; border:2px solid #f1d097;
  border-radius:18px; font-weight:900; font-size:clamp(.75rem,1.5vw,1rem); box-shadow:0 2px 0 #3b3828 }
#route button:disabled { cursor:default; opacity:1 }
#route [data-status=locked] b { background:linear-gradient(#e1ece6,#a1b7b3); color:#32484d; border-color:#f5edcf }
#route b::after { position:absolute; right:-10px; bottom:-2px; border-radius:50%; background:#225958; color:white; padding:4px; border:2px solid #fff2bf; font:900 .72rem/1 system-ui }
#route [data-status=current] b::after { content:"▶" }
#route [data-status=locked] b::after { content:"🔒" }
#route [data-status=done] b::after { content:"✓" }
#route button:enabled:hover { transform:translateY(-3px) }
.ticket { flex:none; display:flex; align-items:center; justify-content:center; gap:clamp(12px,3vw,42px); padding:14px max(16px,4vw) max(14px,env(safe-area-inset-bottom));
  background:#153c48; border-top:4px solid #efc87b }
#info { margin:0; font-size:clamp(1rem,1.7vw,1.32rem); font-weight:900 }
#hint { color:#d4ede7 }
#speedPicker { display:grid; gap:2px; color:#d4ede7; font-size:.8rem }
#difficulty { min-height:44px; padding-inline:10px; background:#244e58; color:white; border:1px solid #9bb7b3; border-radius:9px; font:inherit }
#start { min-height:48px; padding:8px 24px; border:2px solid #fff2a9; border-radius:15px; color:#523211; background:linear-gradient(#ffe083,#ffba38); box-shadow:0 4px #995720; font-size:1.08rem }
@media(max-aspect-ratio:1/1){
  .cover img { object-fit:cover; object-position:55% center }
  .ticket { flex-wrap:wrap; gap:8px 16px; padding:10px 14px 14px }
  .brief { width:100%; text-align:center }
  #route li:nth-child(1) { left:20%; top:79% }
  #route li:nth-child(2) { left:52%; top:55% }
  #route li:nth-child(3) { left:80%; top:32% }
  #speedPicker { display:flex; align-items:center; gap:5px }
  #start { padding-inline:14px }
}
@media(max-height:520px){
  #menu { height:calc(100% - 46px) }
  .ticket { padding:5px 12px 9px; gap:12px }
  .map-heading { padding:5px 12px; inset-block-start:8px }
  #speedPicker { display:flex; align-items:center; gap:6px }
  #hint { font-size:.78rem }
}
