/* One scene, with controls floating over its edges rather than three page columns. */
body[data-screen="levels"] header{position:fixed;inset:0 0 auto;height:80px;padding:8px 28px;background:linear-gradient(#020d1dea,transparent);border:0;pointer-events:none}
body[data-screen="levels"] header>*{pointer-events:auto}
body[data-screen="levels"] .map-screen-title{font-size:22px;letter-spacing:.02em;text-shadow:0 3px 12px #000}
body[data-screen="levels"] .map-back,body[data-screen="levels"] .tools button{background:#061c2bd9;border:1px solid #74d8e95e;border-radius:0;clip-path:polygon(14% 0,86% 0,100% 14%,100% 86%,86% 100%,14% 100%,0 86%,0 14%)}
.level-map-screen{inset:0;padding:0;overflow:hidden;background:linear-gradient(90deg,#03132295,#03132222 50%,#03132295),var(--world-map-art) center/cover no-repeat}
.level-map-screen::after{content:"";position:absolute;inset:0;pointer-events:none;box-shadow:inset 0 0 120px 30px #020b16a0;z-index:1}
.levelmap-grid{display:block;position:relative;isolation:isolate;height:100%}
.world-nav{position:absolute;left:24px;top:116px;bottom:auto;width:175px;z-index:8;overflow:visible;padding:0;border:0;background:none}
.world-nav::before,.world-nav h2{display:none}
.map-worlds{gap:24px;overflow:visible}
.map-worlds button{position:relative;display:flex;flex-direction:column;gap:6px;align-items:center;padding:0;width:100%;min-height:0;background:none!important;color:#c6dce6;text-align:center;filter:none;transition:filter .15s,transform .15s}
.map-worlds button::before{content:"";position:absolute;top:0;left:50%;width:80px;height:80px;transform:translateX(-50%) rotate(45deg);background:#03121b;border:2px solid #567486;box-shadow:0 5px 18px #0009}
.map-worlds button[aria-pressed="true"]{color:#fff0ce}
.map-worlds button[aria-pressed="true"]::before{border-color:#ffe4a7;box-shadow:0 0 0 4px #03121b,0 0 25px #57ebf37a}
.map-worlds button:hover{filter:brightness(1.18);transform:translateY(-2px)}
.map-worlds .world-thumbnail{position:relative;width:108px;height:108px;clip-path:polygon(50% 4%,96% 50%,50% 96%,4% 50%);object-position:50% 35%}
.map-worlds button>span{position:relative;display:block;width:100%;padding:5px 0;background:radial-gradient(ellipse,#021322d9,transparent 73%);text-shadow:0 2px 5px #000}
.map-worlds strong{font-size:18px}.map-worlds small{font-size:11px}.map-worlds small:last-child{color:#86e5e6}
.map-column,.level-map-screen[data-world] .map-column{position:absolute;inset:0;background:none;overflow:visible}
.map-column>.map-backdrop{display:block;position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:.5;filter:blur(7px) brightness(.65);z-index:-1}
.map-heading,.level-map-screen[data-world] .map-heading{left:220px;right:310px;top:94px;min-height:0;padding:0 16px 24px;background:none;text-align:center;pointer-events:none;z-index:6}
.map-heading h2{font:900 clamp(24px,2.5vw,38px)/1.1 'Roboto Slab',serif;margin:0 0 8px;color:#fff0d5;text-shadow:0 3px 5px #000,0 0 28px #00101a}
.map-heading p{font-size:12px;margin-bottom:9px}
#world-progress{width:155px;height:4px;margin:auto;border:0;background:#071625}
#map-visible-range{display:none}
#map-current{pointer-events:auto;top:auto;bottom:-40px;right:16px;padding:9px;width:42px;height:42px;background:#041a2ce0;border-color:#71dbe07a;border-radius:50%}
#map-current span{display:none}
.map-scroll{top:170px;bottom:0;left:205px;right:295px;scrollbar-width:none;mask-image:linear-gradient(transparent,#000 8%,#000 93%,transparent)}
.map-scroll::-webkit-scrollbar{display:none}
.map-cliff{mask-image:linear-gradient(90deg,transparent,#000 12%,#000 88%,transparent)}
.map-cliff[data-section="0"]{mask-image:linear-gradient(90deg,transparent,#000 12%,#000 88%,transparent)}
.map-scroll-hint{z-index:6;left:220px;right:310px;bottom:10px;line-height:24px;background:none;text-shadow:0 2px 4px #000;font-size:10px;pointer-events:none}
.map-detail{position:absolute;right:22px;bottom:32px;width:260px;max-height:calc(100% - 100px);overflow:visible;border:0;background:none;z-index:8}
.map-character-art{height:205px;min-height:0;max-height:none;background:radial-gradient(ellipse at 50% 75%,#4dd9e033,transparent 65%);margin-bottom:-22px;z-index:1;pointer-events:none}
.map-character-art::after{display:none}
.map-character-art canvas{width:100%;height:100%;bottom:-20px;filter:brightness(1.13) drop-shadow(0 8px 15px #03101b)}
.map-detail-content{position:relative;padding:28px 18px 16px;background:linear-gradient(145deg,#0c3042f5,#031420f5);border:1px solid #5aa2af;border-top:3px solid #c5dfcc;box-shadow:0 12px 35px #0008;clip-path:polygon(12px 0,calc(100% - 12px) 0,100% 12px,100% calc(100% - 12px),calc(100% - 12px) 100%,12px 100%,0 calc(100% - 12px),0 12px);text-align:center}
.map-selected-description h2{font:900 32px/1.1 'Roboto Slab',serif;margin:0 0 8px;color:#ffedca}
.map-selected-description p{font-size:14px;min-height:2.6em;margin:0 0 8px}
.map-selected-description small{display:block;font-size:10px;line-height:1.5;color:#96d5d9}
.map-play{margin:16px -12px 10px;width:calc(100% + 24px);min-height:82px;font-size:25px;gap:12px}
.map-edge-actions{flex-direction:row;justify-content:space-between;border:0;padding:0;gap:8px}
.map-edge-actions button{font-size:10px;gap:4px;min-height:36px;padding:0;background:none}
.map-edge-actions img{width:18px;height:18px}
@media(min-width:1600px){.world-nav{left:4vw;width:200px}.map-detail{right:4vw;width:300px}.map-scroll{left:22%;right:26%}.map-heading{left:22%;right:26%}.map-character-art{height:265px}}
@media(max-width:900px){
 body[data-screen="levels"] header{height:60px;padding:7px 14px}
 body[data-screen="levels"] .map-screen-title{font-size:20px;left:65px;right:65px}
 .world-nav{left:12px;right:12px;top:68px;width:auto;height:74px;padding:0}
 .map-worlds{flex-direction:row;justify-content:center;gap:20px;height:auto;overflow:visible}
 .map-worlds button{width:100px;min-width:0;flex:none;flex-direction:row;gap:6px;text-align:left}
 .map-worlds button::before{width:43px;height:43px;top:7px;left:28px}
 .map-worlds .world-thumbnail{width:56px;height:56px;flex:none}
 .map-worlds button>span{padding:0;background:none}.map-worlds strong{font-size:12px;white-space:normal}.map-worlds small{display:none}
 .map-heading,.level-map-screen[data-world] .map-heading{top:146px;left:10px;right:10px;padding:0 25px 12px}
 .map-heading h2{font-size:23px;margin:0 0 5px}.map-heading p{font-size:11px;margin-bottom:6px}
 #map-current{right:3px;bottom:0;width:36px;height:36px;padding:7px}
 .map-scroll{top:214px;left:0;right:0;bottom:165px;mask-image:linear-gradient(transparent,#000 7%,#000 92%,transparent)}
 .map-detail{right:12px;left:12px;bottom:max(10px,env(safe-area-inset-bottom));width:auto;max-height:none}
 .map-character-art{display:none}
 .map-detail-content{padding:12px 14px 7px;display:grid;grid-template-columns:minmax(0,1fr) 145px;gap:2px 8px;text-align:left}
 .map-selected-description h2{font-size:24px;margin:0 0 4px}.map-selected-description p{font-size:12px;white-space:normal;min-height:0;margin:0 0 4px}.map-selected-description small{position:static;text-align:left;max-width:none;font-size:9px}
 .map-play{margin:0 -8px;width:calc(100% + 16px);min-height:68px;font-size:20px;gap:7px;padding:12px}.map-play>img{width:20px;height:20px}
 .map-edge-actions{grid-column:1/-1}.map-edge-actions button{font-size:10px;min-height:28px}.map-scroll-hint{display:none}
}
@media(orientation:landscape) and (max-height:560px){
 .world-nav{top:74px;left:14px;right:auto;width:110px;height:auto}.map-worlds{flex-direction:column;gap:13px}.map-worlds button{width:110px}
 .map-heading,.level-map-screen[data-world] .map-heading{top:68px;left:140px;right:230px;padding:0 5px}.map-heading h2{font-size:20px}
 .map-scroll{left:130px;right:220px;top:135px;bottom:0}
 .map-detail{left:auto;right:12px;bottom:16px;width:200px}.map-detail-content{display:block;text-align:center;padding:16px 12px 7px}.map-selected-description small{text-align:center}.map-play{margin:8px -8px 0}.map-edge-actions{flex-direction:row}
}
@media(prefers-reduced-motion:reduce){.map-worlds button{transition:none}}
/* Blend each cliff into the surrounding scene, including the first landing. */
.level-map-screen .map-cliff,.level-map-screen .map-cliff[data-section="0"]{mask-image:linear-gradient(90deg,transparent,#000 12%,#000 88%,transparent),linear-gradient(transparent,#000 14%,#000);mask-composite:intersect}
/* The frame and artwork share exactly the same 108px square and center. */
.map-worlds button::before{top:0;width:108px;height:108px;box-sizing:border-box;transform:translateX(-50%);clip-path:polygon(50% 0,100% 50%,50% 100%,0 50%);border:0;background:#688a9b}
.map-worlds button[aria-pressed="true"]::before{background:#ffe4a7;filter:drop-shadow(0 0 8px #57ebf3);box-shadow:none}
@media(max-width:900px){.map-worlds button::before{top:0;left:28px;width:56px;height:56px}}
