.star-map-section{padding:70px 0 90px;scroll-margin-top:90px}
.star-map-section>.wrap{width:min(1440px,calc(100% - 48px))}
.star-map-heading{align-items:center;gap:24px;margin-bottom:26px}
.star-map-heading h2{font-size:clamp(2.1rem,4.5vw,4.4rem);line-height:1.06;max-width:720px;margin:12px 0 0;letter-spacing:-.04em}
.star-map-heading p{max-width:370px;font-size:.96rem;line-height:1.8}
.map-frame{margin-top:0;height:clamp(630px,75vh,900px);border:1px solid #8ec9df40;border-radius:6px;background:#030812 url('/nebula-space.jpg') center/cover;box-shadow:0 28px 90px #0008,0 0 50px #63c9e00c;isolation:isolate}
.map-frame:before{z-index:3;background:linear-gradient(180deg,#030a1866,transparent 20%,transparent 65%,#020611b3);opacity:1}
.map-frame:after{content:'';position:absolute;inset:10px;border:1px solid #b4eaff12;pointer-events:none;z-index:4}
.map-caption{position:absolute;left:26px;top:24px;z-index:8;color:#e2f6ff;font-size:.66rem;letter-spacing:.17em;text-transform:uppercase;pointer-events:none;max-width:45%;line-height:1.8;text-shadow:0 2px 8px #000}
.map-caption span{display:block;color:#adc3d4;letter-spacing:.07em;font-size:.6rem}
.map-tools{position:absolute;right:24px;top:24px;display:flex;gap:6px;z-index:10;flex-wrap:wrap;justify-content:flex-end;max-width:53%}
.map-tools button,.map-controls button,.map-clear{background:#061221dd;border:1px solid #90c6d649;color:#d7eaf1;border-radius:3px;font:inherit;font-size:.7rem;padding:9px 12px;min-height:38px;cursor:pointer;backdrop-filter:blur(12px)}
.map-tools button:hover,.map-controls button:hover,.map-clear:hover{border-color:#ebd08f;color:#fff1cb;background:#102337}
.map-tools button:disabled{opacity:.6;cursor:default}
.map-tools button:focus-visible,.map-controls button:focus-visible,.map-clear:focus-visible,.map-worlds button:focus-visible,.map-world-link:focus-visible{outline:2px solid #f2d58c;outline-offset:4px}
.map-controls{right:24px;bottom:24px;z-index:11;gap:7px}
.map-controls button{font-size:1.2rem;width:42px;height:42px;padding:0}
.map-help{left:26px;bottom:24px;font-size:.67rem;letter-spacing:.03em;color:#b9cedc;background:none;padding:0;max-width:calc(100% - 190px);z-index:8!important}
.map-information{position:absolute;left:26px;bottom:82px;width:300px;max-width:calc(100% - 52px);padding:21px 22px 20px;z-index:9;border:1px solid #a4d6e83d;border-top:2px solid var(--world-color,#dabe7a);border-radius:3px;background:linear-gradient(120deg,#05101cf2,#071627d9);box-shadow:0 14px 40px #0005;backdrop-filter:blur(16px);cursor:default}
.map-information .eyebrow{font-size:.6rem;letter-spacing:.16em;color:#bdd8e6}
.map-information h3{font-family:Georgia,serif;font-size:1.65rem;font-weight:400;line-height:1.12;letter-spacing:-.03em;margin:11px 0 12px;color:#fbf4df}
.map-information p{font-size:.78rem;line-height:1.7;color:#c3d1df;margin:0 0 12px}
.map-information .map-world-status{font-size:.62rem;color:var(--world-color,#e0c68b);letter-spacing:.04em;margin-bottom:0}
.map-world-link{display:block;font-size:.77rem;color:#f5d895;margin-top:15px;text-decoration:none;font-weight:600}
.map-world-link[hidden],.map-clear[hidden]{display:none}
.map-clear{position:absolute;right:9px;top:9px;font-size:.6rem;padding:4px 7px;min-height:26px}
.public-map-label{transform:translate(-50%,26px);font-size:.75rem;font-weight:500;color:#edf9ff;background:none;border:0;box-shadow:none;padding:3px 6px;text-shadow:0 1px 5px #000,0 0 12px #000;max-width:170px;text-align:center;line-height:1.25;white-space:normal;border-radius:3px}
.public-map-label:before{content:'';position:absolute;left:50%;bottom:100%;height:16px;width:1px;background:linear-gradient(transparent,#acd3e8aa)}
.public-map-label:after{content:'';position:absolute;left:calc(50% - 2px);bottom:calc(100% + 15px);height:4px;width:4px;border-radius:50%;background:var(--world-color,#b5d9eb)}
.public-map-label:hover,.public-map-label:focus-visible,.public-map-label.is-selected{color:#fff2c7;background:#051323cc;outline:none;border:0;text-shadow:0 0 12px #d6b96d88}
.public-map-label:focus-visible{outline:2px solid #f2d58c;outline-offset:3px}
.map-worlds{display:flex;flex-wrap:wrap;gap:8px;margin:22px 0 0}
.map-worlds button{font:inherit;font-size:.78rem;background:#08131fcc;color:#c5d5e1;border:1px solid #86b8d02e;border-radius:3px;padding:12px 16px;cursor:pointer;text-align:left;transition:border-color .2s,background .2s}
.map-worlds button:before{content:'';display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--world-color);box-shadow:0 0 9px var(--world-color);margin-right:10px;vertical-align:middle}
.map-worlds button:hover,.map-worlds button[aria-pressed=true]{border-color:var(--world-color);background:#122537;color:#fff}
.map-directory{margin-top:18px;gap:15px}
.map-directory a{background:none;border:0;border-bottom:1px solid #ddc38b38;padding:3px 0;font-size:.7rem;color:#b9c7d6}
.map-launch{font-size:.75rem;font-weight:400;color:#cfbd99;margin-top:22px}
.map-sun{width:180px;height:180px;box-shadow:0 0 45px #ffb83755,0 0 110px #ee983133;z-index:3}
.map-original-fallback .map-sun.has-solar-art{background:var(--solar-art) center/contain no-repeat;border-radius:0;width:230px;height:230px;box-shadow:none}
.map-planet .planet-name{font-size:.74rem;background:#07101caa;border:0;font-weight:500;border-radius:3px;text-shadow:0 1px 5px #000;padding:4px 6px}
.map-planet .planet-status{display:none}
.map-planet .planet-name{max-width:135px;white-space:normal;line-height:1.25}
.map-planet.is-selected .sphere{filter:brightness(1.3);outline:1px solid #f5d895;outline-offset:5px}
.map-planet.is-selected .planet-name{color:#ffdda0}
.map-is-expanded{overflow:hidden}
.map-frame.map-expanded{position:fixed;inset:0;width:100vw;height:100dvh;min-height:0;border:0;border-radius:0;z-index:10000;margin:0}
@media(min-width:1000px){.map-information{width:310px}.map-worlds button{flex:1;white-space:nowrap;padding:14px 12px}}
@media(max-width:760px){
 .star-map-section>.wrap{width:calc(100% - 28px)}
 .star-map-heading{display:block}.star-map-heading h2{font-size:2.8rem;max-width:500px}.star-map-heading p{margin-top:18px;max-width:100%;font-size:.88rem}
 .map-frame{height:760px;min-height:0;padding-bottom:215px;box-sizing:border-box}
 #public-scene,#orbit-canvas,#public-map-labels,#map-planets{height:calc(100% - 215px)!important;bottom:auto}
 #map-planets{position:absolute;inset:0}
 .map-information{bottom:0;left:0;max-width:none;width:100%;height:215px;box-sizing:border-box;border:0;border-top:1px solid #a4d6e83d;border-radius:0;padding:18px 20px;background:#05101cef}
 .map-information h3{font-size:1.5rem;margin:8px 0}.map-information p{font-size:.76rem;max-width:480px;margin-bottom:8px;line-height:1.55}.map-world-link{margin-top:10px}
 .map-caption{left:16px;top:14px;max-width:40%;font-size:.55rem}.map-caption span{font-size:.5rem}
 .map-tools{right:12px;top:14px;gap:5px;max-width:57%}.map-tools button{font-size:.59rem;padding:7px 8px;min-height:32px}
 .map-controls{bottom:230px;right:14px}.map-controls button{width:34px;height:34px;min-height:34px}
 .map-help{left:15px;bottom:240px;max-width:calc(100% - 150px);font-size:.57rem}
 .public-map-label{font-size:.65rem;max-width:110px;transform:translate(-50%,20px)}
 .map-worlds{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:14px}.map-worlds button{padding:10px;font-size:.7rem}
 .map-frame.map-expanded{height:100dvh;min-height:620px}
 .map-directory{gap:12px}
}
@media(prefers-reduced-motion:reduce){.map-worlds button{transition:none}}
.map-is-expanded .star-map-section{z-index:10000}

/* Dock previews outside the planet scene and keep touch targets comfortable. */
@media(min-width:761px){
 #public-scene,#orbit-canvas,#public-map-labels,#map-planets{height:calc(100% - 170px)!important;bottom:auto}
 .map-information{left:0;bottom:0;width:100%;max-width:none;height:170px;padding:20px 26px;border:0;border-top:1px solid #a4d6e83d;background:#05101cf5;display:grid;grid-template-columns:minmax(230px,.9fr) minmax(250px,1.5fr) minmax(180px,.7fr);column-gap:28px;align-content:center}
 .map-information .eyebrow{grid-column:1;grid-row:1}.map-information h3{grid-column:1;grid-row:2;margin:8px 0}
 .map-information #map-world-copy{grid-column:2;grid-row:1/4;margin:auto 0}
 .map-world-status{grid-column:3;grid-row:1/3}.map-world-link{grid-column:3;grid-row:3;margin:6px 0 0}
 .map-controls{bottom:185px}.map-help{bottom:199px}
}
.map-frame{touch-action:pan-y}.map-frame.map-expanded{touch-action:none}
.public-map-label{transform:none;display:flex;align-items:center;justify-content:center;min-height:38px;padding:7px 5px;border:1px solid #9dc6d32b;background:#051323b3;font-size:.7rem;box-sizing:border-box}
.public-map-label[hidden]{display:none}.public-map-label:before,.public-map-label:after{display:none}
.public-map-label.is-selected{border:1px solid #f2d58c;background:#102337;color:#ffedb4}
.map-tools button,.map-controls button{min-height:44px;min-width:44px}
@media(max-width:760px){.public-map-label{min-height:42px;font-size:.65rem}.map-tools button{min-height:44px;padding:7px}.map-controls button{width:44px;height:44px}.map-help{bottom:237px;max-width:calc(100% - 177px)}}

@media(max-width:760px){.map-help{width:calc(100% - 190px);white-space:normal;line-height:1.5}}


/* Keep preview text reachable when enlarged and all controls tappable. */
.map-information{overflow:auto;overscroll-behavior:contain;touch-action:pan-y}
.map-clear{min-height:44px}
.map-world-link{min-height:44px;display:flex;align-items:center;font-size:.9rem}
.map-directory a{min-height:44px;display:inline-flex;align-items:center;font-size:.875rem}
.map-worlds button{min-height:44px;font-size:.875rem}
@media(max-width:760px){.map-tools{left:12px;right:12px;max-width:none;justify-content:flex-end}.map-tools button{font-size:.75rem}.map-caption{top:78px;max-width:90%;font-size:.65rem}.map-caption span{display:none}.map-information p{font-size:.875rem}.map-information .eyebrow,.map-information .map-world-status{font-size:.75rem}.map-help{font-size:.7rem;bottom:234px}.map-worlds button{font-size:.8rem}.star-map-heading h2{font-size:clamp(2.1rem,9vw,2.8rem)}}

@media(max-width:760px){.map-frame{height:845px;padding-bottom:300px}#public-scene,#orbit-canvas,#public-map-labels,#map-planets{height:calc(100% - 300px)!important}.map-information{height:300px}.map-controls{bottom:315px}.map-help{bottom:326px}}

@media(max-width:760px){.map-clear{position:static;float:right;margin:-8px -8px 0 8px}}
