/* One complete illustrated world; white edge mist softens the illustration perimeter. */
#map-screen.world-map { display: block; padding: 0; background: #fff; animation: none; overflow: hidden; touch-action: auto; }
.wm-viewport { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; touch-action: pan-y; }
.wm-stage { position: relative; width: 100%; min-height: 100%; overflow: hidden; isolation: isolate; background: #fff; }
.wm-scene { position: absolute; top: 0; }
.wm-terrain { display: block; width: 100%; height: 100%; user-select: none; pointer-events: none; mask-image: linear-gradient(to right, transparent, #000 clamp(40px, 5vw, 150px), #000 calc(100% - clamp(40px, 5vw, 150px)), transparent); }
.wm-route { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; z-index: 1; }
.wm-route path { fill: none; stroke: #edfff2; stroke-width: 3; stroke-dasharray: 4 13; stroke-linecap: round; stroke-linejoin: round; opacity: .65; vector-effect: non-scaling-stroke; animation: mapCurrent 14s linear infinite; }
@keyframes mapCurrent { to { stroke-dashoffset: -68; } }
.wm-stops { position: absolute; inset: 0; z-index: 3; }
.wm-edge-mist { position: absolute; top: -40px; height: calc(100% + 80px); width: auto; aspect-ratio: 1 / 3; object-fit: contain; mask-image: linear-gradient(to right, transparent, #000 45%); pointer-events: none; z-index: 2; user-select: none; }
.wm-edge-mist-left { left: 0; transform: translateX(-55%); }
.wm-edge-mist-right { right: 0; transform: translateX(55%) scaleX(-1); }
.wm-stop { position: absolute; width: var(--stop-size, 60px); height: var(--stop-size, 60px); transform: translate(-50%, -60%); border: 0; border-radius: 50%; padding: 0; background: none; color: #10434c; cursor: pointer; font: 900 clamp(23px, 2.2vw, 31px)/1 Nunito, sans-serif; -webkit-tap-highlight-color: transparent; transition: scale .16s ease; }
.wm-stop:hover { scale: 1.08; }
.wm-stop:active { scale: .95; }
.wm-stop:focus-visible { outline: 3px solid #10434c; outline-offset: 5px; }
.wm-badge { position: absolute; inset: -5%; width: 110%; height: 110%; pointer-events: none; }
.wm-num { position: absolute; inset: 16%; display: grid; place-items: center; border-radius: 50%; padding-bottom: 2px; }
.wm-stop.done .wm-num { background: #f5c855; color: #61491c; }
.wm-stop.current .wm-num { background: #ec8c70; color: #fffdf5; }
.wm-stop.selected { outline: 3px solid #fffdf5; outline-offset: 3px; }
.wm-stop.locked { color: #5b716b; }
.wm-stop.locked .wm-badge { filter: saturate(.5); }
.wm-stop .wm-stop-stars { position: absolute; top: 86%; left: 50%; transform: translateX(-50%); display: flex; gap: 1px; width: auto; height: 19px; margin: 0; padding: 3px 4px; background: #fffdf2; border-radius: 9px; box-shadow: 0 1px 0 #627b4933; pointer-events: none; }
.wm-stop .wm-stop-stars { align-items: center; line-height: 0; font-size: 0; }
.wm-stop-stars i { display: block; width: 13px; height: 13px; margin: 0; position: relative; line-height: 0; }
.wm-stop-stars svg { display: block; width: 100%; height: 100%; overflow: visible; }
.wm-stop-stars .sk { fill: #b9c5b1; stroke: #82947a; stroke-width: 1.4; }
.wm-stop-stars .gold { display: none; }
.wm-stop-stars .on .gold { display: block; }
.wm-stop-stars .sb { fill: #f6c346; stroke: #c48625; stroke-width: 1.2; }
.wm-stop-stars .si { fill: #f8d969; }
.wm-stop-stars .sh { fill: none; stroke: #fff1b1; stroke-width: 2; }
.wm-stop-stars b { display: none; }
.wm-mascot { position: absolute; width: var(--otter-size, 96px); transform: translate(-50%, -50%); z-index: 4; pointer-events: none; }
.wm-mascot img { width: 100%; display: block; animation: mapOtterFloat 5s ease-in-out infinite; }
@keyframes mapOtterFloat { 50% { transform: translateY(-4px) rotate(-2deg); } }
.wm-header { position: absolute; z-index: 6; top: max(16px, env(safe-area-inset-top)); left: 24px; right: 24px; display: grid; grid-template-columns: 54px minmax(0, 1fr) 54px; align-items: start; gap: 12px; pointer-events: none; }
.wm-header button, .wm-heading { pointer-events: auto; background: #fffdf2; color: #10434c; box-shadow: 0 3px 0 #51664b22; }
.wm-header .icon-btn { width: 54px; height: 54px; border-radius: 18px; flex: 0 0 auto; }
.wm-header .icon-btn svg { width: 27px; height: 27px; fill: currentColor; }
.wm-heading { grid-column: 2; justify-self: center; text-align: center; padding: 10px 26px; border-radius: 22px; min-width: 280px; max-width: 430px; }
.wm-heading h1 { margin: 0; color: #10434c; font: 900 27px/1.08 Nunito, sans-serif; }
.wm-heading p { margin: 4px 0 0; color: #517c75; font: 800 15px/1.1 Nunito, sans-serif; }
.wm-footer { position: absolute; z-index: 7; bottom: max(18px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: min(580px, calc(100% - 28px)); min-height: 78px; display: flex; align-items: center; gap: 14px; padding: 9px 12px 11px; background: #fffdf2; border-radius: 25px; box-shadow: 0 4px 0 #c5d3b588; }
.wm-footer .wm-home { flex: 0 0 48px; width: 48px; height: 50px; min-height: 44px; border: 0; border-radius: 16px; color: #197977; background: #e1efe6; box-shadow: none; cursor: pointer; }
.wm-home svg { width: 25px; height: 25px; fill: currentColor; }
.wm-home:hover { background: #cde6d9; }
.wm-home:focus-visible { outline: 3px solid #10434c; outline-offset: 2px; }
.wm-selection { flex: 1; color: #10434c; font: 900 25px/1.1 Nunito, sans-serif; white-space: nowrap; }
.wm-selection small { display: block; font: 800 11px/1.3 Nunito, sans-serif; color: #6b8780; margin-top: 3px; }
.wm-play { flex: 1.2; min-width: 0; min-height: 54px; border: 0; background: #e98b6e; border-radius: 20px; box-shadow: 0 4px 0 #ce7359; color: #fffdf5; font: 900 25px/1.1 Nunito, sans-serif; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 8px 18px; cursor: pointer; }
.wm-play:hover { background: #ef987c; }
.wm-play:active { translate: 0 2px; box-shadow: 0 2px 0 #ce7359; }
.wm-play:focus-visible, .wm-travel:focus-visible { outline: 3px solid #10434c; outline-offset: 3px; }
.wm-play .tri { border-left-width: 17px; border-top-width: 10px; border-bottom-width: 10px; filter: none; }
.wm-navigation { position: absolute; z-index: 7; bottom: max(28px, env(safe-area-inset-bottom)); left: 24px; right: 24px; display: flex; justify-content: space-between; pointer-events: none; }
.wm-travel { pointer-events: auto; border: 0; background: #fffdf2; color: #10434c; min-height: 44px; padding: 9px 17px; border-radius: 22px; font: 900 15px/1.1 Nunito, sans-serif; box-shadow: 0 3px 0 #b5c8ac66; cursor: pointer; }
.wm-travel[aria-disabled="true"] { color: #71817a; }
.wm-travel[hidden] { display: none; }
.wm-next { margin-left: auto; }
.wm-world-list { display: grid; gap: 5px; max-height: min(56vh, 510px); overflow-y: auto; margin: 6px -6px; padding: 4px 6px 10px; }
.wm-world-choice { display: flex; text-align: left; align-items: center; gap: 12px; border: 0; border-radius: 14px; padding: 11px 13px; min-height: 54px; background: #eaf3e8; color: #10434c; cursor: pointer; }
.wm-world-choice span { font: 900 20px/1 Nunito, sans-serif; min-width: 28px; }
.wm-world-choice b { flex: 1; font: 800 16px/1.2 Nunito, sans-serif; }
.wm-world-choice small { color: #5d8076; }
.wm-world-choice.on { background: #d0e7d7; outline: 2px solid #2a9d94; }
.wm-world-choice[aria-disabled="true"] { opacity: .65; }
.wm-world-pages { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; }
.wm-world-pages button { background: #fffdf2; color: #10434c; min-height: 44px; border: 1px solid #d9e2cf; border-radius: 12px; padding: 8px 15px; font-weight: 800; cursor: pointer; }
.wm-world-pages button:disabled { opacity: .4; cursor: default; }
#modal:has(.wm-world-list) { padding: 16px; align-items: center; }
#modal .card:has(.wm-world-list) { display: block; padding-top: 22px; max-height: calc(100svh - 32px); overflow-y: auto; }
#modal .card:has(.wm-world-list) .card-title { position: static; transform: none; margin: 0 36px 14px; padding: 0; background: none; box-shadow: none; }
@media (max-width: 1000px) {
  .wm-navigation { bottom: max(110px, calc(env(safe-area-inset-bottom) + 95px)); left: 14px; right: 14px; }
  .wm-travel { font-size: 13px; padding: 8px 13px; min-height: 40px; }
  .wm-previous { position: fixed; top: max(90px, calc(env(safe-area-inset-top) + 82px)); left: 14px; }
}
@media (max-width: 600px) {
  .wm-terrain { mask-image: none; }
  .wm-edge-mist { display: none; }
  .wm-header { top: max(12px, env(safe-area-inset-top)); left: 12px; right: 12px; gap: 8px; grid-template-columns: 0 minmax(0, 1fr) 44px; }
  .wm-header .icon-btn { width: 44px; height: 46px; border-radius: 15px; }
  .wm-heading { min-width: 0; width: 100%; max-width: none; padding: 9px 8px; border-radius: 18px; }
  .wm-heading h1 { font-size: clamp(18px, 5.2vw, 24px); }
  .wm-heading p { font-size: 12px; }
  .wm-stop { font-size: 24px; }
  .wm-footer { min-height: 70px; gap: 10px; padding: 8px 10px 10px; border-radius: 22px; bottom: max(13px, env(safe-area-inset-bottom)); }
  .wm-footer .wm-home { flex-basis: 44px; width: 44px; height: 46px; border-radius: 14px; }
  .wm-selection { font-size: 22px; }
  .wm-play { min-height: 49px; font-size: 23px; padding: 7px 14px; border-radius: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  .wm-mascot img, .wm-route path { animation: none; }
  .wm-mascot, .wm-stop { transition: none; }
}
.reduce-motion .wm-mascot img, .reduce-motion .wm-route path { animation: none; }
.reduce-motion .wm-mascot, .reduce-motion .wm-stop { transition: none; }
