.mobile-map-expand{display:none}
@media(max-width:768px){
.mobile-map-expand{display:inline-flex;align-items:center;justify-content:center;min-height:44px;background:#087e82;color:#fff;border:0;border-radius:9px;padding:8px 12px;font-weight:700;flex-shrink:0}
body.mobile-map-open{position:fixed;overflow:hidden;width:100%;overscroll-behavior:none}
body.mobile-map-open[data-panel=map] .workspace{position:fixed;inset:0;z-index:1800;margin:0;width:100%;height:100vh;height:100dvh;max-height:none;min-height:0;display:flex;flex-direction:column;border:0;border-radius:0;background:#fff;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);box-sizing:border-box}
body.mobile-map-open .workspace .camera-directory{display:none!important}
body.mobile-map-open .workspace .map-section{display:flex;flex-direction:column;flex:1 1 0;min-height:0;height:auto;overflow:hidden}
body.mobile-map-open .workspace #camera-map{flex:1 1 0;height:auto!important;min-height:0!important}
body.mobile-map-open .workspace .map-toolbar{flex:none;flex-wrap:wrap;padding:6px;gap:5px}
body.mobile-map-open .workspace .map-caption,body.mobile-map-open .workspace .find-camera,body.mobile-map-open .workspace .explore-context,body.mobile-map-open .workspace .map-legend,body.mobile-map-open .workspace .map-status{display:none}
body.mobile-map-open .workspace .mobile-map-expand{margin-left:auto}
body.mobile-map-open[data-camera-selected] .workspace .viewer{display:block;flex:0 1 40%;min-height:0;max-height:40dvh;overflow:auto;overscroll-behavior:contain;padding:10px;border-top:2px solid #087e82}
}
body:not([data-panel=map]) .mobile-map-expand{display:none}

/* A small latest-image sheet only in mobile full-screen map mode. */
@media(max-width:768px){
body.mobile-map-open[data-panel=map][data-camera-selected] .workspace .viewer{position:relative;inset:auto;flex:0 0 auto;width:100%;max-width:100%;max-height:45dvh;margin:0;padding:6px 10px 8px;border:0;border-top:1px solid #cbdcde;border-radius:0;box-shadow:0 -3px 14px #163e4914;box-sizing:border-box;overflow:auto}
body.mobile-map-open .workspace .viewer> :not(#explore-close):not(#camera-title):not(#image-frame):not(.capture-info){display:none!important}
body.mobile-map-open .workspace .viewer #explore-close{position:absolute;top:2px;right:6px;z-index:3;min-width:44px;min-height:44px;width:44px;height:44px;padding:0;border:0;background:#fff;box-shadow:none;font-size:0;border-radius:50%}
body.mobile-map-open .workspace .viewer #explore-close:after{content:'×';font-size:28px;line-height:1}
body.mobile-map-open .workspace .viewer #camera-title{margin:0 42px 5px 0;font-size:14px;line-height:1.5;min-height:30px;display:flex;align-items:center;overflow-wrap:anywhere}
body.mobile-map-open .workspace .viewer .image-frame{width:100%;height:clamp(90px,26dvh,230px);max-height:26dvh;min-height:0;aspect-ratio:auto;border-radius:6px;background:#14282d}
body.mobile-map-open .workspace .viewer #camera-image,body.mobile-map-open .workspace .viewer #camera-overlay{width:100%;height:100%;object-fit:contain}
body.mobile-map-open .workspace .viewer #enlarge{display:none!important}
body.mobile-map-open .workspace .viewer .capture-info{display:flex;flex-wrap:wrap;align-items:center;gap:3px 8px;margin:5px 0 0;padding:0;font-size:10px;line-height:1.35}
body.mobile-map-open .workspace .viewer .capture-info p{margin:0;font-size:10px}
body.mobile-map-open .workspace .viewer #received-time{font-size:10px}
body.mobile-map-open .workspace .viewer #image-state{font-size:10px;padding:2px 5px}
}

/* Desktop uses the same map/workspace and close/Escape restoration path. */
@media(min-width:769px){
.mobile-map-expand{display:inline-flex;align-items:center;min-height:44px;padding:8px 12px;background:#087e82;color:white;border:0;border-radius:9px;font-weight:700}
body.mobile-map-open{position:fixed;overflow:hidden;width:100%;overscroll-behavior:none}
body.mobile-map-open[data-panel=map] .workspace{position:fixed;inset:0;z-index:1800;margin:0;padding:0;width:100%;height:100vh;height:100dvh;max-height:none;min-height:0;display:flex;flex-direction:row;border:0;border-radius:0;background:white}
body.mobile-map-open .workspace .camera-directory{display:none!important}
body.mobile-map-open .workspace .map-section{flex:1 1 0;min-width:0;min-height:0;height:100%;grid-column:auto;grid-row:auto}
body.mobile-map-open .workspace #camera-map{height:100%!important;min-height:0!important}
body.mobile-map-open .workspace .explore-context,body.mobile-map-open .workspace .map-legend,body.mobile-map-open .workspace .map-status{display:none}
body.mobile-map-open[data-camera-selected] .workspace .viewer{display:block;flex:0 0 min(380px,36vw);width:min(380px,36vw);max-width:36vw;min-width:0;max-height:100dvh;height:100%;overflow:auto;border-left:1px solid #cbdcde;padding:16px;grid-column:auto;grid-row:auto}
}
body:not([data-panel=map]) .mobile-map-expand{display:none}
