/* Native vector chart and fixed-size touch markers stay legible on iPad Safari. */
#map-dialog{width:min(1120px,calc(100% - 32px));padding:24px;max-height:calc(var(--view-height,100dvh) - 32px);overflow:auto;-webkit-overflow-scrolling:touch}
.map-heading{gap:16px;align-items:center}
.map-heading h2{font-size:clamp(24px,3.5vw,34px);margin:7px 0 0}
#close-map{width:44px;height:44px;flex-shrink:0}
#map-dialog>p{font-size:14px;line-height:1.5;margin:12px 0 16px}
.map-status{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:12px;font-size:12px;color:#b5cfd8}
#map-progress{color:#bdffe3;font-weight:600}
.map-layout{grid-template-columns:minmax(0,1fr) 264px;gap:18px;align-items:start}
#ocean-map{position:relative;display:block;min-width:0;width:100%;height:auto;aspect-ratio:6400 / 4200;overflow:hidden;background:linear-gradient(155deg,#15556a,#102f48 55%,#282644);border-radius:12px;border:1px solid #a7d6e35c;isolation:isolate;touch-action:pan-y}
#ocean-map>svg{display:block;position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.map-marker{position:absolute;z-index:2;width:44px;height:44px;min-width:44px;padding:0;display:grid;place-items:center;border:2px solid #c3ffe9;border-radius:50%;background:#123e49;color:#e4fff4;font:700 17px 'DM Sans',sans-serif;box-shadow:0 0 0 4px #081e3288,0 0 18px #9dfbd344;transform:translate(-50%,-50%);touch-action:manipulation}
.map-marker:hover,.map-marker:active{transform:translate(-50%,-50%);background:#29686a}
.map-marker.collected::after{content:'✓';position:absolute;right:-3px;top:-5px;font-size:11px;background:#b5ffdc;color:#073336;border-radius:50%;width:17px;height:17px;line-height:17px}
.map-marker.lagoon,.map-badge.lagoon{border-color:#ffe3a9;background:#5b482b;color:#fff0c8}
.map-player{position:absolute;z-index:3;width:16px;height:16px;border-radius:50%;background:#082d4a;box-shadow:0 0 0 2px #fff,0 0 14px #fff;transform:translate(-50%,-50%);pointer-events:none}
.map-player i{display:block;width:0;height:0;margin:3px 0 0 5px;border-left:9px solid white;border-top:5px solid transparent;border-bottom:5px solid transparent;transform-origin:3px 5px}
.map-waypoint{position:absolute;width:54px;height:54px;border:2px dashed #fff;border-radius:50%;transform:translate(-50%,-50%);pointer-events:none}
#map-destinations{display:grid;grid-template-columns:1fr;gap:8px;min-width:0}
.map-destination{flex-direction:row;align-items:center;gap:12px;margin:0;padding:11px 12px;min-height:72px;touch-action:manipulation}
.map-destination.lagoon{border-color:#ffe3a95c;background:#ffdc9a0b}
.map-badge{display:grid;place-items:center;flex-shrink:0;width:30px;height:30px;border:1px solid #c3ffe980;border-radius:50%;color:#c3ffe9;font-size:14px}
.map-destination.lagoon .map-badge{color:#ffe3a9;border-color:#ffe3a9}
.map-destination-copy{display:flex;flex-direction:column;gap:4px;min-width:0}
.map-destination strong{font:500 16px/1.2 Outfit,sans-serif;overflow-wrap:anywhere;color:#e9fff9}
.map-destination span,.map-destination small{font-size:12px;line-height:1.3}
.map-destination.collected .map-badge{background:#b5ffdc;color:#10362e}
.map-legend{gap:14px;flex-wrap:wrap;font-size:12px;line-height:1.5;margin-top:14px}
.map-legend>span:last-child{margin:0}
@media(max-width:900px) and (orientation:portrait){.map-layout{grid-template-columns:1fr}#map-destinations{grid-template-columns:1fr 1fr}.map-destination.lagoon{grid-column:1/-1}.map-destination{min-height:72px}}
@media(max-width:600px){#map-dialog{width:calc(100% - 20px);padding:16px;max-height:calc(var(--view-height,100dvh) - 20px)}.map-layout{grid-template-columns:1fr;gap:12px}#map-destinations{grid-template-columns:1fr 1fr}.map-destination.lagoon{grid-column:1/-1}.map-destination{padding:9px;gap:8px}.map-destination strong{font-size:14px}.map-destination span,.map-destination small{font-size:11px}.map-badge{width:24px;height:24px}#map-dialog>p{font-size:12px}.map-heading .eyebrow{font-size:10px}}
@media(max-height:500px) and (orientation:landscape){
 #map-dialog{padding:12px;max-height:calc(var(--view-height,100dvh) - 16px)}
 .map-heading .eyebrow,#map-dialog>p{display:none}
 .map-heading h2{font-size:24px;margin:0}
 .map-status{font-size:11px;margin:4px 0 8px}
 .map-layout{grid-template-columns:minmax(0,1fr) 190px;gap:12px}
 #ocean-map{max-width:calc((var(--view-height,100dvh) - 160px) * 1.5238);justify-self:center}
 #map-destinations{grid-template-columns:1fr;max-height:calc(var(--view-height,100dvh) - 160px);overflow-y:auto;padding-right:4px;overscroll-behavior:contain}
 .map-destination{min-height:64px;padding:8px;gap:8px}.map-destination.lagoon{grid-column:auto}
 .map-legend{margin-top:8px;gap:8px;font-size:10px}
}
