/* Scope the viewport layout to map views; editing and reporting forms keep their styles. */
body:has(#wa-service #wa-map) main{max-width:none;padding:8px 16px 12px}
#wa-service:has(#wa-map){min-height:0}
#wa-service:has(#wa-map) .wa-header{padding:8px 12px}
#wa-service:has(#wa-map) .wa-header strong{font-size:1rem}
#wa-service .wa-body{grid-template-columns:minmax(0,3fr) minmax(280px,1fr);min-height:0}
#wa-service #wa-map{height:var(--wa-map-height,50dvh);min-height:160px}
#wa-service:has(#wa-map) .wa-side{height:var(--wa-map-height,50dvh);max-height:var(--wa-map-height,50dvh);min-height:0;overscroll-behavior:contain}
#wa-service .wa-map-jumps,#wa-service .wa-map-touch-hint{display:none}
@media(max-width:900px),(max-height:500px) and (pointer:coarse){
 body:has(#wa-service #wa-map) main{padding:8px}
 #wa-service:has(#wa-map){overflow:clip}
 #wa-service .wa-body{grid-template-columns:minmax(0,1fr)}
 #wa-service:has(#wa-map) .wa-side{height:auto;max-height:none;overflow:visible;overscroll-behavior:auto;touch-action:pan-y pinch-zoom}
 #wa-service:has(#wa-map) .wa-side input[type=range]{touch-action:pan-y}
 #wa-service:has(#wa-map) .wa-map-jumps{display:flex;gap:8px;position:sticky;top:0;z-index:4;padding:8px;background:#f2edf8;border-bottom:1px solid var(--wa-line,#d7c9e5)}
 #wa-service .wa-map-jumps button{flex:1;min-height:44px;padding:8px 12px;border:1px solid var(--wa-line,#d7c9e5);border-radius:8px;background:#fff;color:#512477;font-weight:700}
 #wa-service:has(#wa-map) .wa-map-touch-hint{display:block;margin:0;padding:8px 12px;background:#f2edf8;color:#59456b;font-size:.82rem;line-height:1.45}
 #wa-service:has(#wa-map) #wa-map,#wa-service:has(#wa-map) #wa-map-filters{scroll-margin-top:68px}
 #wa-service.wa-full:has(#wa-map){box-sizing:border-box;height:100dvh;max-height:100dvh;min-height:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain}
}

/* Only Embornals uses this frame adjustment; the same connected frame is retained. */
#dmroses-application-embornals:not(.is-expanded){height:var(--embedded-map-height,calc(100dvh - 52px));min-height:0}
#mapa.active #map{height:var(--drain-map-height,53dvh);min-height:160px}
@media(min-width:800px){
 #app .view.active#mapa{height:var(--drain-map-height,calc(100dvh - 127px));min-height:0;grid-template-columns:minmax(0,3fr) minmax(300px,1fr)}
 #app .view#mapa #map{height:100%;min-height:0}
 #app .view#mapa .sheet{min-height:0}
}
@media(max-width:799px){#app #mapa.active .sheet{margin-top:0}}
