/* Map-first exploration: preserve an unobstructed pan/zoom surface and contextual evidence. */
.explore-heading,.explore-context,.explore-close{display:none}
body[data-panel=map] main{padding-top:16px}
body[data-panel=map] .intro,body[data-panel=map] .metric-grid,body[data-panel=map] .workspace-title,body[data-panel=map] .notice{display:none}
body[data-panel=map] .explore-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.explore-heading h1{font-size:22px;margin:0;line-height:1.5}.explore-heading p{margin:3px 0 0;font-size:12px;color:var(--muted)}.explore-heading button{min-height:44px;flex-shrink:0;background:#174f58;color:white;border:0}
body[data-panel=map] .workspace{height:calc(100dvh - 255px);min-height:530px;max-height:1100px}
body[data-panel=map] .map-section{display:flex;flex-direction:column;min-width:0;overflow:hidden}
body[data-panel=map] #camera-map{position:relative;flex:1;min-height:310px;height:auto;width:100%}
body[data-panel=map] .map-legend{display:none}
body[data-panel=map] .map-toolbar{z-index:450;right:64px;flex-wrap:wrap;pointer-events:none}.map-toolbar>*{pointer-events:auto}
body[data-panel=map] .leaflet-control-zoom{margin-top:12px!important}
body[data-panel=map] .explore-context{display:block;background:#fff;border-top:1px solid var(--border);padding:12px 14px;flex:none;z-index:1;min-width:0}
.explore-context header{all:unset;display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap}.explore-context h2{font-size:13px;margin:0}.explore-context header span{font-size:11px;color:var(--muted)}.explore-context>p{font-size:10px;color:var(--muted);margin:5px 0 0;line-height:1.5}
.explore-cards{display:flex;gap:9px;overflow-x:auto;padding:9px 0 4px;scroll-snap-type:x proximity;min-height:96px}
.explore-card{flex:0 0 210px;min-width:0;display:flex;flex-direction:column;gap:3px;text-align:left;padding:9px;background:#f5f9f8;border:1px solid #d9e5e2;border-radius:10px;scroll-snap-align:start;white-space:normal;color:#183e49}.explore-card b{font-size:12px;line-height:1.5;overflow-wrap:anywhere}.explore-card strong{font-size:20px}.explore-card small,.explore-card-type{font-size:10px;line-height:1.6;color:#536d75}.explore-card.old{background:#f5f3ee;border-style:dashed}.explore-card img{width:100%;height:80px;object-fit:cover;border-radius:6px;background:#dfebe7}.explore-card-text{display:grid;gap:4px}.explore-empty{font-size:12px;line-height:1.8;margin:4px 0;color:#536d75}.explore-station strong{font-size:15px}.explore-station p{margin:8px 0!important}.explore-station .explore-reading{font-size:23px;font-weight:700}.explore-old{color:#955514}.explore-station small{line-height:1.7;display:block}
body[data-panel=map] .viewer{overflow:auto;min-width:0}body[data-panel=map] .explore-close{display:block;width:100%;margin-bottom:12px;min-height:44px}body[data-panel=map] .map-status{bottom:auto;top:75px;pointer-events:none}#explore-position{font-size:10px;letter-spacing:.06em;color:#53777b}
@media(max-width:900px){body[data-panel=map] .workspace{height:calc(100dvh - 285px);min-height:520px}.explore-heading h1{font-size:20px}}
@media(max-width:650px){body[data-panel=map] main{padding:10px 8px}body[data-panel=map] .explore-heading{align-items:flex-start;gap:6px}.explore-heading h1{font-size:17px}.explore-heading p{font-size:11px}.explore-heading button{font-size:11px;padding:8px}#explore-position{font-size:9px}body[data-panel=map] .workspace{height:auto;min-height:0}body[data-panel=map] .map-section{height:calc(100dvh - 300px);min-height:510px}body[data-panel=map] #camera-map{min-height:300px}.explore-context{padding:10px!important}.explore-card{flex-basis:180px}.explore-card img{height:65px}body[data-panel=map] .viewer{max-height:65dvh;overflow:auto;scroll-margin-top:145px}body[data-panel=map] .map-toolbar{right:50px}.explore-context header span{font-size:10px}.explore-context>p{font-size:9px}body[data-panel=map] .map-layers{flex-wrap:nowrap;overflow-x:auto;padding-bottom:4px}body[data-panel=map] .map-layers label{flex:none}body[data-panel=map] .layer-more{white-space:nowrap}}
body[data-panel=map] .flow-panel{padding:4px 14px;margin:6px 0 10px}body[data-panel=map] .flow-top h2{font-size:13px}body[data-panel=map] .flow-toggle{font-size:11px}
body[data-panel=map] .workspace{height:calc(100dvh - 275px);min-height:460px}
body[data-panel=map] .explore-context{height:186px}.explore-cards{height:128px;min-height:0;align-items:stretch}.explore-card img{height:54px}.explore-card{overflow:hidden;flex-shrink:0}.explore-card small{font-size:9px}
@media(max-width:650px){body[data-panel=map] .map-section{min-height:500px}body[data-panel=map] .workspace{height:auto;min-height:0}body[data-panel=map][data-camera-selected] .viewer{position:fixed;bottom:8px;left:8px;right:8px;max-height:43dvh;z-index:1050;border:1px solid #a8c6c8;border-radius:16px;box-shadow:0 -8px 35px #163e4933;background:white;padding:12px}body[data-panel=map] .explore-close{position:sticky;top:-12px;z-index:3;background:#fff;box-shadow:0 2px 4px #183e4912}body[data-panel=map] .viewer .image-frame{max-height:24dvh;aspect-ratio:16/9}body[data-panel=map] .viewer h2{font-size:17px}body[data-panel=map] .flow-top{gap:2px}body[data-panel=map] .flow-toggle{font-size:10px}.explore-heading h1{font-size:16px}}

/* Primary action stays above the map, never covering camera or water markers. */
.explore-actions{display:flex;align-items:center;gap:8px;flex-shrink:0}
.explore-heading #map-report{min-height:56px;padding:12px 24px;background:#b93c22;color:#fff;border:1px solid #a32d16;font-size:19px;font-weight:750;border-radius:12px;box-shadow:0 3px 10px #96331d24}
.explore-heading #map-report>span:first-child{font-size:26px;line-height:1}
.explore-heading #map-report:hover{background:#9e301a}.explore-heading #map-report:active{transform:translateY(1px)}
.explore-heading #map-report:focus-visible{outline:3px solid #175e72;outline-offset:3px}
@media(max-width:650px){body[data-panel=map] .explore-heading{flex-wrap:wrap}.explore-actions{width:100%;display:grid;grid-template-columns:minmax(0,1fr) auto}.explore-heading #map-report{width:100%;font-size:18px;min-height:56px;padding:10px 16px}.explore-actions #explore-home{min-height:48px}}

#explore-mode{scroll-margin-top:90px}@media(max-width:900px){#explore-mode{scroll-margin-top:210px}}

/* Desktop map controls: leave more of the viewport for the actual map. */
@media(min-width:901px){
 body[data-panel=map]>header{height:44px;min-height:44px;padding:5px 24px}
 body[data-panel=map]>header #language{min-height:32px;padding:4px 8px}
 body[data-panel=map] main{padding-top:8px}
 body[data-panel=map] .explore-heading{gap:8px;margin-bottom:6px}
 body[data-panel=map] .explore-heading h1{font-size:17px;line-height:1.35}
 body[data-panel=map] #explore-position{font-size:9px}
 body[data-panel=map] .explore-heading p{font-size:11px;margin:0}
 body[data-panel=map] .explore-actions{gap:6px}
 body[data-panel=map] .explore-actions button{min-height:36px;padding:6px 12px;font-size:12px}
 body[data-panel=map] .explore-actions #map-report{min-height:36px;font-size:14px;padding:6px 14px}
 body[data-panel=map] .explore-actions #map-report>span:first-child{font-size:18px}
 body[data-panel=map] .map-layers{gap:6px;margin-bottom:5px}
 body[data-panel=map] .map-layers label{min-height:32px;padding:5px 9px;border-radius:7px;font-size:11px}
 body[data-panel=map] .map-layers input{width:14px;height:14px}
 body[data-panel=map] .camera-health-key{margin:3px 0;font-size:10px}
 body[data-panel=map] .flow-panel{margin:5px 0;padding:4px 12px;border-radius:9px}
 body[data-panel=map] .flow-top h2{font-size:13px}
 body[data-panel=map] .flow-toggle{min-height:32px;font-size:11px}
 body[data-panel=map] .workspace{height:calc(100dvh - 210px);min-height:420px;max-height:none}
 body[data-panel=map] .explore-context{height:130px;padding:8px 12px}
 body[data-panel=map] .explore-cards{height:80px;padding:5px 0}
 body[data-panel=map] .explore-card{padding:6px;flex-basis:190px}
 body[data-panel=map] .explore-card img{height:32px}
 body[data-panel=map] .map-toolbar button{min-height:34px;padding:6px 9px;font-size:11px}
}
