/* Story worlds: world map, level stones and the level sheet.
   Loaded only for the map; everything is scoped to .world-map-page, .level-sheet and .story-stars. */

/* Per-world palettes: stone face, stone edge, light tint and trail glow. */
[data-world]{--w-face:#b98be0;--w-edge:#6a3d8e;--w-tint:#f4e4ff;--w-glow:#ffd6f5;--w-sky:#3a2350}
[data-world="unicorns"]{--w-face:#c48fe6;--w-edge:#6f3f98;--w-tint:#f7e6ff;--w-glow:#ffc8ee;--w-sky:#3d2457}
[data-world="dinosaurs"]{--w-face:#79b956;--w-edge:#2f6b33;--w-tint:#e3f6cd;--w-glow:#ffe49a;--w-sky:#1f3d2a}
[data-world="princesses"]{--w-face:#ea8fbb;--w-edge:#93366a;--w-tint:#ffe3f0;--w-glow:#ffd98a;--w-sky:#4a2243}
[data-world="mermaids"]{--w-face:#45bccb;--w-edge:#17627a;--w-tint:#d2f6f8;--w-glow:#b5fff4;--w-sky:#12384a}
[data-world="space"]{--w-face:#6a7ef0;--w-edge:#262c79;--w-tint:#dde2ff;--w-glow:#9fe8ff;--w-sky:#141a42}
[data-world="dragons"]{--w-face:#e8774a;--w-edge:#7e2a1b;--w-tint:#ffdccb;--w-glow:#ffc061;--w-sky:#3d1a17}
[data-world="robots"]{--w-face:#6b9dc6;--w-edge:#284b6b;--w-tint:#dceaf6;--w-glow:#c2ff85;--w-sky:#1a2e40}
[data-world="pirates"]{--w-face:#3fa4a2;--w-edge:#1d4f5e;--w-tint:#f4e5bd;--w-glow:#ffd77a;--w-sky:#14353f}
[data-world="jungle"]{--w-face:#58a965;--w-edge:#1f5a35;--w-tint:#e6f6cd;--w-glow:#fff08a;--w-sky:#183a24}

/* Star shapes shared by the banner, stones, sheet and result screen. */
.star-row{display:inline-flex;gap:3px;vertical-align:middle}.star-row i{display:block;width:20px;height:20px}
.star-row svg,.world-star-count svg,.sheet-title p svg{width:100%;height:100%;fill:#e4d6ea;stroke:#b79bc4;stroke-width:1.2;stroke-linejoin:round}
.star-row i.on svg{fill:#ffc531;stroke:#c98700;filter:drop-shadow(0 1px 0 #fff7d0)}
.star-row.star-lg i{width:42px;height:42px}

/* Banner: reuse the approved level banner, swap the counter for stars. */
.world-map-page .world-star-count{display:inline-flex;align-items:center;gap:8px}
.world-map-page .world-star-count svg{width:18px;height:18px;fill:#ffc531;stroke:#a86d00}
.world-map-page .world-star-count b{font-size:16px;color:#fff3c4}

.world-map-head{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:4px 20px}
.world-map-head .levelhint{margin:0 0 18px}

/* The board: the world painting stays pinned behind the trail as you scroll. */
.map-board{position:relative;isolation:isolate;overflow:hidden;overflow:clip;border-radius:28px;border:3px solid #f2d79f;background:var(--w-sky);box-shadow:0 6px 0 #c7a1b1,0 24px 48px #2a143d40;margin:0 0 34px}
.map-scene{position:sticky;top:0;height:min(100vh,var(--map-h));height:min(100lvh,var(--map-h));margin-bottom:calc(-1 * min(100vh,var(--map-h)));margin-bottom:calc(-1 * min(100lvh,var(--map-h)));z-index:-1;overflow:hidden;will-change:transform;transform:translateZ(0);backface-visibility:hidden}
.map-scene img{display:block;width:100%;height:100%;object-fit:cover}
.map-haze{position:absolute;inset:0;background:linear-gradient(#00000014,#00000014),radial-gradient(ellipse 55% 75% at 50% 50%,transparent 0%,#00000022 70%,#00000055 100%),linear-gradient(180deg,#ffffff00 0%,#ffffff00 55%,color-mix(in srgb,var(--w-sky) 55%,transparent) 100%)}
.map-track{position:relative}

/* Trail: a soft road, the finished stretch in gold, and a stitched centre line. */
.map-trail{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none;contain:strict}
.map-trail path{fill:none;stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke}
.trail-shadow{stroke:#000;stroke-opacity:.16;stroke-width:30px}
.trail-bed{stroke:#fff8e6;stroke-opacity:.82;stroke-width:30px}
.trail-glow{stroke:var(--w-glow);stroke-opacity:.4;stroke-width:44px}
.trail-done{stroke:#ffd25e;stroke-width:30px}
.trail-dash{stroke:var(--w-edge);stroke-opacity:.35;stroke-width:4px;stroke-dasharray:2 16}

/* Stones: chunky glossy blocks, the trail's stepping stones. */
.map-stop{position:absolute;transform:translate(-50%,-50%);display:flex;flex-direction:column;align-items:center;gap:10px;z-index:1}.map-current{z-index:3}
.map-stone{--s:86px;position:relative;width:var(--s);height:var(--s);padding:0;border:0;border-radius:26px;background:none;cursor:pointer;transition:transform .18s cubic-bezier(.3,1.6,.5,1)}
.stone-top{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;border-radius:inherit;background:radial-gradient(circle at 32% 24%,#ffffffb0 0 9%,transparent 30%),linear-gradient(160deg,color-mix(in srgb,var(--w-face) 72%,#fff) 0%,var(--w-face) 46%,color-mix(in srgb,var(--w-face) 78%,var(--w-edge)) 100%);border:3px solid #ffffffc0;box-shadow:0 9px 0 var(--w-edge),0 16px 22px #00000048,inset 0 -6px 0 #00000014}
.stone-top strong{display:block;font:700 40px/1 Georgia,serif;padding-top:2px;color:#fff;text-shadow:0 2px 0 color-mix(in srgb,var(--w-edge) 80%,#000),0 0 14px #ffffff55}
@media(hover:hover){.map-stone:hover:not(:disabled){transform:translateY(-4px) scale(1.04)}}
.map-stone:active:not(:disabled){transform:translateY(5px)}
.map-stone:active:not(:disabled) .stone-top{box-shadow:0 4px 0 var(--w-edge),0 8px 12px #00000040}
.map-stone:focus-visible{outline:none}.map-stone:focus-visible .stone-top{outline:5px solid #ffd55e;outline-offset:5px}
.stone-badge{position:absolute;right:-10px;top:-10px;display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:#fff;color:#2f8a3a;border:3px solid #ffd25e;box-shadow:0 3px 0 #b8870e}
.stone-badge svg{width:17px;height:17px;stroke-width:3}

/* Finished: gold. */
.map-passed .stone-top{background:radial-gradient(circle at 32% 24%,#ffffffd0 0 9%,transparent 30%),linear-gradient(160deg,#fff1a6 0%,#ffcd45 48%,#e9a21b 100%);box-shadow:0 9px 0 #a8690b,0 16px 22px #00000048,inset 0 -6px 0 #0000000f}
.map-passed .stone-top strong{color:#7a4a00;text-shadow:0 2px 0 #fff3b0}
/* Current: glows and gently breathes. */
.map-current .map-stone{--s:100px}
.map-current .map-stone{isolation:isolate}
.map-current .stone-top{box-shadow:0 10px 0 var(--w-edge),0 18px 30px #00000055,inset 0 -6px 0 #00000014}
/* Halo around the whole block, including its 10px bottom edge, so the space is even on every side. */
.map-current .map-stone::before{content:'';position:absolute;z-index:-1;inset:-12px -12px -22px;border-radius:36px;background:#ffffffc4;box-shadow:0 0 0 6px color-mix(in srgb,var(--w-glow) 72%,transparent),0 10px 24px #00000040}
.map-current .map-stone::after{content:'';position:absolute;inset:-22px -22px -32px;border-radius:44px;border:3px solid #fff;opacity:0;animation:stone-ping 2.2s ease-out infinite}
.map-current .stone-pips{margin-top:30px}
/* Locked: quiet slate, still part of the landscape. */
.map-locked .stone-top{background:radial-gradient(circle at 30% 22%,#ffffff40 0 8%,transparent 28%),linear-gradient(160deg,#a9b1c2 0%,#828ba0 55%,#697186 100%);border-color:#d9dde6;box-shadow:0 8px 0 #4b5163,0 14px 20px #00000050,inset 0 -5px 0 #0000001a}
.map-locked .stone-top strong{color:#eef0f5;text-shadow:0 2px 0 #4b5163}
.map-locked .map-stone{cursor:default;--s:72px}
.stone-lock{color:#6d7284;border-color:#fff;box-shadow:0 3px 0 #8a8fa0;width:28px;height:28px}.stone-lock svg{width:14px;height:14px}

/* Pips: one per story at this level; gold once read. */
.stone-pips{display:flex;gap:5px;padding:5px 9px;border-radius:999px;background:#2a173a73}
.stone-pips i{width:9px;height:9px;border-radius:50%;background:#ffffff70}
.stone-pips i.on{background:#ffd25e;box-shadow:0 0 6px #ffd25e}

/* The child's character stands above the current stone. */
.map-hero{position:absolute;bottom:calc(100% + 28px);left:50%;display:flex;flex-direction:column;align-items:center;transform:translateX(-50%);animation:hero-hop 2.4s ease-in-out infinite;pointer-events:none;will-change:transform}
.map-hero .map-hero-avatar{border-radius:50%!important;overflow:hidden;background:var(--w-tint);box-shadow:0 0 0 4px #fff,0 6px 14px #00000050}
.map-hero b{position:relative;margin-top:-9px;padding:2px 11px;border-radius:999px;background:#5b2f6e;color:#fff;font-size:11px;line-height:16px;letter-spacing:.03em;white-space:nowrap;box-shadow:0 0 0 2px #fff}

/* Floating world motifs and the end of the trail. */
.map-motif{position:absolute;width:44px;height:44px;opacity:.82;color:#fff;fill:#fff;stroke:#fff;animation:motif-float 6s ease-in-out infinite;animation-delay:var(--d);pointer-events:none;will-change:transform}
.map-motif svg{width:100%;height:100%}.map-motif-alt{width:26px;height:26px;fill:var(--w-glow);opacity:.95}
[data-world="space"] .map-motif:not(.map-motif-alt),[data-world="princesses"] .map-motif:not(.map-motif-alt){fill:#ffe08a;stroke:#ffe08a}
[data-world="dragons"] .map-motif:not(.map-motif-alt){fill:#ffb347}[data-world="jungle"] .map-motif:not(.map-motif-alt),[data-world="dinosaurs"] .map-motif:not(.map-motif-alt){fill:#d6f5a8}
[data-world="mermaids"] .map-motif:not(.map-motif-alt){fill:none;stroke:#d9fbff}[data-world="pirates"] .map-motif:not(.map-motif-alt){fill:none;stroke:#fff1c6}
.map-finish{position:absolute;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:8px;padding:8px 16px;border-radius:999px;background:#2a173a8c;color:#fff;font-size:13px;font-weight:800;white-space:nowrap}
.map-finish svg{width:18px;height:18px;fill:#ffd25e}

@keyframes stone-ping{0%{transform:scale(.86);opacity:.75}100%{transform:scale(1.18);opacity:0}}
@keyframes hero-hop{0%,100%{transform:translate(-50%,0)}45%{transform:translate(-50%,-8px)}55%{transform:translate(-50%,-8px)}}
@keyframes motif-float{0%,100%{transform:translateY(0) rotate(-4deg)}50%{transform:translateY(-12px) rotate(4deg)}}

/* Level sheet: a modal with the level story and its bonus stories. */
.level-sheet{width:min(760px,calc(100vw - 24px));max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);padding:0;border:0;border-radius:30px;background:#fff7e6;color:#452453;box-shadow:0 30px 80px #1a0a2b80;overflow:hidden}
.level-sheet[open]{display:flex;flex-direction:column}
.level-sheet::backdrop{background:#1d0d2bb8}
html.sheet-open{overflow:hidden}
.level-sheet[open]{animation:sheet-in .32s cubic-bezier(.2,1.2,.4,1)}
.sheet-inner{display:flex;flex-direction:column;min-height:0;max-height:inherit}
.sheet-scroll{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;scrollbar-width:none;padding-bottom:22px}.sheet-scroll::-webkit-scrollbar{display:none}
.sheet-head{position:relative;flex:0 0 auto;display:flex;align-items:flex-end;gap:16px;min-height:150px;padding-right:76px;padding:22px 24px;color:#fff;overflow:hidden;isolation:isolate}
.sheet-head>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:-2}
.sheet-head::after{content:'';position:absolute;inset:0;z-index:-1;background:linear-gradient(90deg,#2d173ef2 0%,#3d2050c4 48%,#3d205022 100%)}
.sheet-medal{flex-shrink:0;display:grid;place-items:center;width:84px;height:84px;border-radius:24px;background:linear-gradient(160deg,#fff3bf,#f4cc7a);color:#603775;box-shadow:0 6px 0 #b38534,0 10px 18px #00000055;border:3px solid #fff8dc}
.sheet-medal{align-content:center;gap:2px}.sheet-medal small{font-size:9px;font-weight:900;letter-spacing:.14em;line-height:1}.sheet-medal strong{font:700 42px/1 Georgia,serif}
.sheet-title>span{font-size:12px;font-weight:900;letter-spacing:.1em;text-transform:uppercase;color:#ffe7a6}
.sheet-title h2{margin:2px 0 4px;font:700 clamp(26px,4vw,34px)/1.1 Georgia,serif;text-shadow:0 2px 6px #00000060}
.sheet-title p{display:flex;flex-wrap:wrap;align-items:center;gap:2px 8px;margin:0;font-size:14px;font-weight:700;color:#fff2d6}.sheet-title p>span{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}
.sheet-title p svg{width:16px;height:16px;fill:#ffc531;stroke:#a86d00}
.sheet-close{position:absolute;top:16px;right:16px;z-index:2;display:flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;border-radius:50%;border:2px solid #ffffffc0;background:#2d173e8c;color:#fff;font:400 30px/1 ui-rounded,'Trebuchet MS',system-ui,sans-serif}
.sheet-close:focus-visible{outline:4px solid #ffd55e;outline-offset:2px}
.sheet-close:hover{background:#ffffff45}
.sheet-stories{list-style:none;display:grid;grid-template-columns:1.2fr 1fr 1fr;gap:16px;margin:0;padding:22px 24px 6px}
.sheet-stories>li:first-child{grid-row:span 2}.sheet-stories>li:only-child{grid-column:1/-1;max-width:420px;justify-self:center;width:100%}
.sheet-stories>li:first-child .sheet-cover{flex:1;aspect-ratio:auto;min-height:150px}.sheet-stories>li:first-child .sheet-copy strong{font-size:23px}
.sheet-story{display:flex;flex-direction:column;width:100%;height:100%;padding:0;text-align:left;border:3px solid #f0dcae;border-radius:22px;background:#fffdf6;color:inherit;overflow:hidden;box-shadow:0 6px 0 #dcc3a0;transition:transform .16s ease,box-shadow .16s ease}
@media(hover:hover){.sheet-story:hover{transform:translateY(-3px);box-shadow:0 9px 0 #dcc3a0,0 14px 24px #4a245a22}}
.sheet-story:active{transform:translateY(3px);box-shadow:0 3px 0 #dcc3a0}
.sheet-story.is-main{border-color:#e9b84e}
.sheet-cover{position:relative;display:block;aspect-ratio:16/9;overflow:hidden}
.sheet-cover img{width:100%;height:100%;object-fit:cover;transform:scale(var(--zoom,1.7));transform-origin:var(--focus,50% 50%);transition:transform .4s ease}
@media(hover:hover){.sheet-story:hover .sheet-cover img{transform:scale(calc(var(--zoom,1.7) + .08))}}
/* Bonus covers: a soft, blurred view of the world painting, each in its own colour, with the world's emblem. */
.is-bonus .sheet-cover{isolation:isolate;background:var(--w-sky)}
.is-bonus .sheet-cover img{filter:blur(9px) saturate(1.25);transform:scale(calc(var(--zoom,1.7) + .25))}
.is-bonus .sheet-cover::after{content:'';position:absolute;inset:0;z-index:0;background:linear-gradient(150deg,var(--tint-a) 0%,var(--tint-b) 100%);opacity:.62;mix-blend-mode:normal}
.is-bonus[data-slot="2"]{--tint-a:#ff9fcb;--tint-b:#8a3d9e}.is-bonus[data-slot="3"]{--tint-a:#8fd8ff;--tint-b:#3a4fb0}
.is-bonus[data-slot="4"]{--tint-a:#8fe8c0;--tint-b:#1f6f6c}.is-bonus[data-slot="5"]{--tint-a:#ffd27a;--tint-b:#b0502c}
.sheet-emblem{position:absolute;z-index:1;left:50%;top:50%;display:flex;align-items:center;justify-content:center;width:68px;height:68px;margin:-34px 0 0 -34px;border-radius:50%;background:#ffffff3d;border:2px solid #ffffffb3;box-shadow:0 8px 20px #00000030,inset 0 1px 0 #ffffffa0}
.sheet-emblem svg{width:36px;height:36px;fill:#fff;stroke:#fff;filter:drop-shadow(0 2px 3px #00000040)}
.sheet-emblem i{position:absolute;right:-4px;top:-6px;width:20px;height:20px}.sheet-emblem i svg{width:100%;height:100%;fill:#fff6c8;stroke:none}
.is-bonus .sheet-num,.is-bonus .story-chip{z-index:2}
.sheet-num{position:absolute;z-index:2;left:10px;top:10px;display:flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:50%;background:#fff8e6;color:#5b2f6e;font:800 17px/1 ui-rounded,'Trebuchet MS',system-ui,sans-serif;font-variant-numeric:lining-nums tabular-nums;box-shadow:0 3px 0 #c7a1b1}
.story-chip{position:absolute;right:10px;top:10px;padding:4px 10px;border-radius:999px;font-size:11px;font-weight:900;letter-spacing:.04em;box-shadow:0 2px 0 #00000026}
.chip-new{background:#ff6fae;color:#fff}.chip-again{background:#fff8e6;color:#5b2f6e}.chip-next{background:#ffd25e;color:#5b2f00}
.sheet-copy{display:grid;gap:6px;padding:12px 14px 14px}
.sheet-copy small{font-size:10px;font-weight:900;letter-spacing:.12em;color:#9a7a3a}
.sheet-copy strong{font:700 19px/1.2 Georgia,serif;color:#452453}
.sheet-note{margin:14px 24px 0;font-size:15px;font-weight:700;color:#7b5a8a;text-align:center}
@keyframes sheet-in{from{transform:translateY(24px) scale(.97);opacity:0}to{transform:none;opacity:1}}

/* Result screen: stars for the story just read and a way back to the map. */
.story-stars{display:grid;justify-items:center;gap:6px;margin:6px 0 4px}
.story-stars .star-row i{animation:star-pop .5s cubic-bezier(.3,1.8,.5,1) both}
.story-stars .star-row i:nth-child(2){animation-delay:.15s}.story-stars .star-row i:nth-child(3){animation-delay:.3s}
.story-stars small{font-weight:800;color:#7b5a8a}
@keyframes star-pop{from{transform:scale(0) rotate(-40deg)}to{transform:none}}

@media(max-width:650px){
 .sheet-stories>li:first-child{grid-row:auto}.sheet-stories>li:first-child .sheet-cover{flex:0 0 38%;min-height:118px}.sheet-stories>li:first-child .sheet-copy strong{font-size:19px}
 .map-board{border-radius:22px;margin-inline:-6px}
 .map-stone{--s:70px;border-radius:22px}.map-current .map-stone{--s:82px}.map-locked .map-stone{--s:60px}
 .stone-top strong{font-size:32px}.stone-badge{width:28px;height:28px;right:-8px;top:-8px}

 .map-motif{width:32px;height:32px}.map-motif-alt{width:20px;height:20px}
 .sheet-dot{display:none}
 .sheet-head{min-height:120px;padding:18px 70px 18px 18px}.sheet-close{top:12px;right:12px}.sheet-medal{width:70px;height:70px;border-radius:20px}.sheet-medal strong{font-size:34px}
 .sheet-stories{grid-template-columns:1fr;padding:18px 16px 4px;gap:12px}
 .sheet-story{flex-direction:row;align-items:stretch}.sheet-cover{flex:0 0 38%;aspect-ratio:auto;min-height:104px}
 .sheet-copy{align-content:center}.sheet-copy strong{font-size:17px}
 .story-chip{top:auto;right:auto;left:8px;bottom:8px;font-size:10px;padding:3px 8px}
 .sheet-emblem{width:50px;height:50px;margin:-25px 0 0 -25px}.sheet-emblem svg{width:26px;height:26px}.sheet-emblem i{width:15px;height:15px}
}
@media(prefers-reduced-motion:reduce){.map-current .map-stone::after,.map-hero,.map-motif,.level-sheet[open],.story-stars .star-row i{animation:none}.map-stone,.sheet-story,.sheet-cover img{transition:none}}

/* Younger edition (Toddler/Pre-K and Kindergarten): a crisp drawn storybook land.
   Their cartoon pictures are small character close-ups, so they appear as a badge, not as scenery. */
.map-young{--y-sky1:#cfe8ff;--y-sky2:#f3e1ff;--y-h1:#f6c9ef;--y-h2:#e9b4ec;--y-h3:#dba4e6;--y-dot:#ffffffb3;border-color:#fff1cf;
 background:
  radial-gradient(circle,var(--y-dot) 0 2px,transparent 2.5px) 0 0/38px 38px,
  radial-gradient(140% 55% at 12% 100%,var(--y-h3) 0 58%,transparent 58.4%) 0 0/100% 720px repeat-y,
  radial-gradient(120% 50% at 92% 100%,var(--y-h2) 0 56%,transparent 56.4%) 0 -240px/100% 720px repeat-y,
  radial-gradient(130% 45% at 45% 100%,var(--y-h1) 0 55%,transparent 55.4%) 0 -480px/100% 720px repeat-y,
  linear-gradient(180deg,var(--y-sky1) 0,var(--y-sky2) 520px,var(--y-h1) 100%)}

[data-world="dinosaurs"] .map-young{--y-sky1:#cdeeff;--y-sky2:#fff1c9;--y-h1:#c9ecaa;--y-h2:#addf8e;--y-h3:#93d074}
[data-world="princesses"] .map-young{--y-sky1:#ffe0f0;--y-sky2:#fff3d6;--y-h1:#ffd3e6;--y-h2:#fbbcd8;--y-h3:#f3a6cb}
[data-world="mermaids"] .map-young{--y-sky1:#d2f6ff;--y-sky2:#b8ecf4;--y-h1:#9fe0ec;--y-h2:#7ed2e3;--y-h3:#5fc2d8}
[data-world="space"] .map-young{--y-sky1:#2f3485;--y-sky2:#4a3c9e;--y-h1:#5b4fb4;--y-h2:#6f63c8;--y-h3:#857adc;--y-dot:#ffffffd9}
[data-world="dragons"] .map-young{--y-sky1:#ffe6c9;--y-sky2:#ffd6b8;--y-h1:#f9c39e;--y-h2:#f2aa82;--y-h3:#e8946b}
[data-world="robots"] .map-young{--y-sky1:#dceeff;--y-sky2:#eef6ff;--y-h1:#c6dcf2;--y-h2:#adcbea;--y-h3:#93b8df}
[data-world="pirates"] .map-young{--y-sky1:#cff1ff;--y-sky2:#eefcff;--y-h1:#f3e1b3;--y-h2:#9edcea;--y-h3:#72c8de}
[data-world="jungle"] .map-young{--y-sky1:#dcf8cf;--y-sky2:#f4ffdc;--y-h1:#b7e69c;--y-h2:#9dda82;--y-h3:#83cc69}
.map-young .trail-shadow{stroke:var(--w-edge);stroke-opacity:.22}
.map-young .trail-bed{stroke:#fff;stroke-opacity:1}
.map-young .trail-dash{stroke-opacity:.45}
.map-young .map-motif{fill:var(--w-edge);stroke:var(--w-edge);opacity:.32}
.map-young .map-motif-alt{fill:#fff;opacity:.9}
[data-world="space"] .map-young .map-motif{fill:#ffe08a;stroke:#ffe08a;opacity:.7}
.map-young .stone-pips{background:color-mix(in srgb,var(--w-edge) 55%,transparent)}
.map-young .map-finish{background:color-mix(in srgb,var(--w-edge) 80%,transparent)}
/* The world friend: the world's cartoon picture, crisp at badge size. */
.map-friend{position:absolute;z-index:2;left:clamp(14px,4%,48px);top:22px;display:flex;flex-direction:column;align-items:center;pointer-events:none}
.map-friend img{width:132px;height:132px;object-fit:cover;border-radius:50%;border:5px solid #fff;background:#fff;box-shadow:0 6px 0 color-mix(in srgb,var(--w-edge) 60%,#fff),0 14px 24px #4a245a33}
.map-friend span{margin-top:-14px;padding:5px 14px;border-radius:999px;background:#fff8e6;color:#5b2f6e;font:700 15px/1.2 Georgia,serif;box-shadow:0 3px 0 #d9b98a;white-space:nowrap}
@media(max-width:650px){.map-friend{top:16px}.map-friend img{width:84px;height:84px;border-width:4px}.map-friend span{font-size:12px;padding:4px 10px;margin-top:-10px}}
/* A few soft clouds in the younger edition's sky. */
.map-young::before{content:'';position:absolute;inset:0 0 auto 0;height:460px;z-index:0;pointer-events:none;background:
 radial-gradient(60px 26px at 22% 70px,#ffffffe6 98%,transparent),radial-gradient(42px 30px at 26% 56px,#ffffffe6 98%,transparent),radial-gradient(38px 22px at 18% 78px,#ffffffe6 98%,transparent),
 radial-gradient(70px 28px at 78% 120px,#ffffffd9 98%,transparent),radial-gradient(48px 34px at 82% 102px,#ffffffd9 98%,transparent),radial-gradient(40px 24px at 73% 128px,#ffffffd9 98%,transparent),
 radial-gradient(54px 22px at 55% 300px,#ffffffb3 98%,transparent),radial-gradient(36px 26px at 58% 288px,#ffffffb3 98%,transparent)}
[data-world="space"] .map-young::before{opacity:.18}
.map-young .map-track{z-index:1}
/* Narrow phones: the title block shrinks and the level badge stacks, so it never runs off the tile. */
.levelwelcome .levelwelcometext{min-width:0;flex:1 1 auto}
.levelwelcome .worldlevel{flex:0 0 auto;max-width:42%}
@media (max-width:520px){
 .levelwelcome .worldlevel{flex-direction:column;gap:2px;padding:7px 12px;text-align:center;align-self:flex-start;margin-top:4px}
 .levelwelcome .worldlevel small{font-size:8px;letter-spacing:.1em;white-space:nowrap}
 .levelwelcome .worldlevel strong{font-size:24px}
 .world-map-welcome .levelwelcome h1,.world-map-welcome h1{overflow-wrap:anywhere}
}
