.home-link { display:grid; place-items:center; text-decoration:none; }
.journey span { white-space:nowrap; }
@media(max-width:600px) { .journey { gap:6px; padding:12px 8px; } .journey i { width:8px; flex-shrink:0; } .journey span { gap:3px; } .journey b { font-size:12px; } }
.show-map { background:#255f37; }
.map-home { min-height:100dvh; display:grid; place-items:center; }
.map-viewport { width:min(100%, calc(100dvh * 4 / 3)); max-width:1448px; overflow:auto; scrollbar-width:thin; scrollbar-color:#deb878 #255f37; }
.map-canvas { position:relative; width:100%; aspect-ratio:4/3; background:url("assets/map-12-locked.png") center/100% 100% no-repeat; isolation:isolate; }
.map-canvas button { position:absolute; padding:0; border:0; background-color:transparent; background-repeat:no-repeat; border-radius:0; }
.station-marker { z-index:1; cursor:default; }
.station-marker.available { cursor:pointer; }
.station-marker.illustrated { mask-image:linear-gradient(to right,transparent,#000 7%,#000 93%,transparent),linear-gradient(to bottom,transparent,#000 7%,#000 93%,transparent); mask-composite:intersect; }
.station-marker.available:hover { filter:brightness(1.07); }
.station-marker.available:active { filter:brightness(.94); }
.map-canvas button:focus-visible { outline:4px solid #fff; outline-offset:-4px; border-radius:12px; }
.map-start { left:1.7%; top:82.4%; width:26.5%; height:13%; z-index:2; }
.map-start:hover { filter:brightness(1.07); }
.map-settings { left:90.8%; top:1%; width:6.8%; height:8.2%; z-index:2; }
.map-settings:hover { background:#ffffff20; border-radius:50%; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.finish-actions { display:flex; justify-content:center; gap:12px; margin-top:24px; flex-wrap:wrap; }
dialog .finish-actions button { margin-top:0; padding:12px 18px; }
.settings-dialog { width:min(90vw,380px); }
.storybook-finish { width:min(94vw,560px,calc((100dvh - 32px) * 1402 / 1122)); max-width:none; aspect-ratio:1402/1122; padding:0; border:0; border-radius:0; background:transparent; box-shadow:none; overflow:visible; }
.storybook-finish::backdrop { background:#23352b66; backdrop-filter:blur(6px); }
.finish-panel-art { display:block; width:100%; height:100%; pointer-events:none; user-select:none; }
.storybook-finish .eyebrow { position:absolute; left:26%; top:29.5%; width:48%; height:6%; display:grid; place-items:center; margin:0; color:#78834b; font-size:14px; font-weight:700; }
.storybook-finish h2 { position:absolute; left:25%; top:35%; width:50%; height:7%; display:grid; place-items:center; margin:0; color:#35552a; font-size:22px; line-height:1.2; }
.storybook-finish #finishSummary { position:absolute; left:15%; top:42%; width:70%; height:5%; display:grid; place-items:center; margin:0; color:#7a794b; font-size:12px; line-height:1.3; }
.storybook-finish .finish-actions { margin:0; }
dialog.storybook-finish .finish-actions button { position:absolute; left:18.5%; width:63%; display:grid; place-items:center; padding:0; margin:0; border:0; background:transparent; font-weight:900; }
.storybook-finish #returnHome { top:47.5%; height:16.7%; color:#a3330c; font-size:27px; text-shadow:0 2px #fff9e8; }
.storybook-finish #nextMap,.storybook-finish #replayStage { top:67%; height:21%; color:#fffdec; font-size:32px; text-shadow:0 3px #23601b,2px 0 #23601b,-2px 0 #23601b,0 -2px #23601b; }
.storybook-finish button:hover { filter:brightness(1.12); }
.storybook-finish button:active { transform:translateY(2px); }
.storybook-finish button:focus-visible { outline:3px solid #205c37; outline-offset:3px; border-radius:24px; }
.storybook-finish.illustrated-finish {
  container-type: inline-size;
  --finish-ink: #144c75;
  --finish-accent: #063b7c;
}
.storybook-finish.ocean-finish {
  --finish-ink: #165b64;
  --finish-accent: #004b58;
}
.storybook-finish.snow-finish::backdrop { background: #19395c66; }
.storybook-finish.ocean-finish::backdrop { background: #103f5166; }
.illustrated-finish-banner {
  position: absolute;
  inset: 11% 26% auto;
  height: 15%;
  display: grid;
  place-items: center;
  color: #fffce9;
  font-size: 7.2cqw;
  font-weight: 900;
  letter-spacing: .07em;
  text-shadow: 0 2px 2px var(--finish-accent), 0 0 7px var(--finish-accent);
}
.ocean-finish .illustrated-finish-banner { top: 12%; }
.storybook-finish.illustrated-finish .eyebrow,
.storybook-finish.illustrated-finish h2,
.illustrated-finish-summary {
  color: var(--finish-ink);
}
.storybook-finish.illustrated-finish .eyebrow { top: 29%; font-size: 2.7cqw; }
.storybook-finish.illustrated-finish h2 { left: 15%; width: 70%; font-size: 4.4cqw; }
.illustrated-finish-summary {
  position: absolute;
  inset: 42% 14% auto;
  height: 5%;
  display: grid;
  place-items: center;
  margin: 0;
  font-size: 3cqw;
  font-weight: 600;
}
dialog.illustrated-finish .finish-actions button {
  min-height: 0;
  color: var(--finish-accent);
  font-size: 5cqw;
}
dialog.illustrated-finish .illustrated-finish-home {
  top: 48%;
  height: 16.5%;
}
dialog.illustrated-finish .finish-actions .illustrated-finish-next {
  top: 68%;
  height: 20%;
  color: #fffef6;
  font-size: 5.5cqw;
  text-shadow: 0 2px 2px var(--finish-accent), 0 0 5px var(--finish-accent);
}
.storybook-finish.illustrated-finish button:focus-visible {
  outline-color: var(--finish-accent);
  outline-offset: -5px;
}
@media(max-width:600px) { .storybook-finish h2 { font-size:17px; } .storybook-finish .eyebrow { font-size:12px; } .storybook-finish #finishSummary { font-size:10px; } .storybook-finish #returnHome { font-size:21px; } .storybook-finish #nextMap,.storybook-finish #replayStage { font-size:25px; } }
@media(max-height:420px) { .storybook-finish h2 { font-size:16px; } .storybook-finish .eyebrow { font-size:11px; } .storybook-finish #finishSummary { font-size:10px; } .storybook-finish #returnHome { font-size:20px; } .storybook-finish #nextMap,.storybook-finish #replayStage { font-size:24px; } }
.settings-dialog h2 { font-size:23px; }
.settings-actions { display:flex; flex-direction:column; gap:12px; }
.settings-actions button { margin-top:0; }
.settings-actions .secondary { color:#964633; }
.storybook-settings { width:min(94vw,440px,calc((100dvh - 32px) * 1402 / 1122)); max-width:none; aspect-ratio:1402/1122; padding:0; border:0; border-radius:0; background:transparent; box-shadow:none; overflow:visible; }
.storybook-settings::backdrop { background:#23352b66; backdrop-filter:blur(6px); }
.settings-panel-art { display:block; width:100%; height:100%; pointer-events:none; user-select:none; }
.storybook-settings .settings-progress { position:absolute; left:26%; top:32.5%; width:48%; height:12%; display:flex; align-items:center; justify-content:center; margin:0; color:#3c5430; font-size:17px; font-weight:800; white-space:nowrap; }
.storybook-settings button { position:absolute; display:grid; place-items:center; border:0; padding:0; margin:0; background:transparent; font-family:inherit; font-weight:900; cursor:pointer; letter-spacing:0; }
.storybook-settings button:focus-visible { outline:3px solid #205c37; outline-offset:3px; border-radius:24px; }
.storybook-settings button:hover { filter:brightness(1.12); }
.storybook-settings button:active { transform:translateY(2px); }
.storybook-settings .settings-close { left:86%; top:12%; width:13%; height:15%; min-width:44px; min-height:44px; border-radius:50%; }
.storybook-settings .settings-reset { left:18.5%; top:47.5%; width:63%; height:16.7%; color:#a3330c; font-size:22px; text-shadow:0 2px #fff9e8; }
.storybook-settings .settings-done { left:18.5%; top:67%; width:63%; height:21%; color:#fffdec; font-size:30px; text-shadow:0 3px 0 #23601b,2px 0 0 #23601b,-2px 0 0 #23601b,0 -2px 0 #23601b; }
@media(max-width:600px), (max-height:600px) {
  .storybook-settings .settings-progress { font-size:18px; }
  .storybook-settings .settings-reset { font-size:22px; }
  .storybook-settings .settings-done { font-size:30px; }
}
@media(max-width:400px), (max-height:400px) {
  .storybook-settings .settings-progress { font-size:15px; }
  .storybook-settings .settings-reset { font-size:18px; }
  .storybook-settings .settings-done { font-size:25px; }
}
.pending-level { min-height:100dvh; background:#f5faf2; display:grid; place-items:center; padding:28px; text-align:center; }
.pending-content { width:min(100%,560px); }
.pending-illustration { position:relative; width:100%; aspect-ratio:4/3; overflow:hidden; }
.pending-art { position:absolute; background-repeat:no-repeat; }
.pending-illustration .pending-art { left:0!important; top:0!important; width:100%!important; height:100%!important; }
.pending-content h1 { font-size:28px; margin:12px 0; }
.pending-content p { color:#70806b; }
.pending-content a { display:inline-block; margin-top:16px; padding:12px 24px; background:#4f7b50; color:white; border-radius:6px; text-decoration:none; }
@media(max-width:600px) {
  .map-home { display:block; background:#fce5b9; }
  .map-home > h1 { position:static; width:100%; height:auto; margin:0; padding:22px 58px 22px 14px; overflow:visible; clip:auto; white-space:normal; font-size:28px; color:#fff9dc; background:#287245; }
  .map-viewport { width:100%; height:auto; max-width:none; overflow:visible; }
  .map-canvas { width:100%; max-width:none; aspect-ratio:auto; padding:16px 10px 24px; background:#fce5b9 url("assets/map-paper.png") center/100% 100% no-repeat; }
  #mapStations { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px 8px; }
  .map-canvas .station-marker { position:relative; left:auto!important; top:auto!important; width:100%!important; height:auto!important; aspect-ratio:1.18; background-image:var(--illustration)!important; mask-image:linear-gradient(to right,transparent,#000 7%,#000 93%,transparent),linear-gradient(to bottom,transparent,#000 7%,#000 93%,transparent); mask-composite:intersect; }
  .map-canvas .map-start { position:relative; display:block; left:auto; top:auto; width:min(100%,320px); height:94px; margin:24px auto 0; background-image:url("assets/map-start-adventure.png?v=1"); background-size:277.778% 714.286%; background-position:4.531% 96.512%; }
  .map-canvas .map-settings { left:auto; right:10px; top:-67px; width:44px; height:44px; border-radius:50%; background-image:url("assets/map-12-unlocked.png"); background-size:1470.588% 1219.512%; background-position:97.425% 1.089%; }
  .map-canvas button:focus-visible { outline-width:3px; }
}
