/* Loaded after the desktop shell. Narrow-screen changes apply only to the map. */
.mobile-layers-toggle,.mobile-layers-scrim,.mobile-sheet-heading,.mobile-view-controls,.mobile-measure-output{display:none}
@media(max-width:900px){
  body.geohaus-map-active{height:100dvh;overflow:hidden;overscroll-behavior:none}
  body.geohaus-map-active>header{position:relative;z-index:40;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:8px;height:calc(64px + env(safe-area-inset-top,0px));min-height:64px;flex:0 0 auto;padding:calc(8px + env(safe-area-inset-top,0px)) max(12px,env(safe-area-inset-right,0px)) 8px max(12px,env(safe-area-inset-left,0px))}
  body.geohaus-map-active .identity{gap:0;min-width:0}
  body.geohaus-map-active .identity img{display:none}
  body.geohaus-map-active .identity span{border:0;padding:0;font-size:22px;white-space:nowrap}
  body.geohaus-map-active #navigation{order:initial;display:flex;min-width:0;width:auto;gap:0;flex-wrap:nowrap}
  body.geohaus-map-active #project{width:100%;max-width:none;min-width:0;font-size:16px;min-height:44px;padding:8px 22px 8px 9px;text-overflow:ellipsis}
  body.geohaus-map-active #account{margin:0;min-width:0;font-size:13px;gap:0}
  body.geohaus-map-active #accountMenu>summary{min-height:44px;min-width:44px;display:flex;align-items:center;justify-content:center;padding:8px}
  body.geohaus-map-active #viewer{position:fixed;inset:var(--mobile-header-height,64px) 0 0;height:auto;min-height:0;display:block;overflow:hidden}
  body.geohaus-map-active #mapRegion{position:absolute;inset:0;width:100%;height:100%;min-height:0;max-height:none;margin:0;flex:none}
  body.geohaus-map-active #map{height:100%;width:100%}
  body.geohaus-map-active #panel{position:absolute;z-index:30;inset:auto 0 0;display:block;max-height:min(78dvh,calc(100% - 24px));height:auto;min-height:0;max-width:560px;margin:0 auto;padding:16px max(16px,env(safe-area-inset-right,0px)) calc(20px + env(safe-area-inset-bottom,0px)) max(16px,env(safe-area-inset-left,0px));border:1px solid #C8C7B9;border-bottom:0;border-radius:20px 20px 0 0;box-shadow:0 -8px 40px #252B2826;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;transform:translateY(calc(100% + 24px));visibility:hidden;transition:transform .2s ease}
  body.geohaus-map-active #viewer.mobile-panel-open #panel{transform:translateY(0);visibility:visible}
  body.geohaus-map-active .mobile-sheet-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;position:sticky;top:-16px;z-index:2;background:#fff;margin:-16px -16px 12px;padding:8px 16px;border-bottom:1px solid #F2EFE7}
  .mobile-sheet-heading strong{font-weight:600;color:#254B3D;font-size:16px}
  body.geohaus-map-active .mobile-sheet-close{min-width:44px;min-height:44px;font-size:26px;padding:0;border:0;background:#F2EFE7;border-radius:50%;line-height:1}
  body.geohaus-map-active .mobile-view-controls{display:flex;flex-wrap:wrap;gap:8px;padding-bottom:15px;margin-bottom:14px;border-bottom:1px solid #F2EFE7}
  body.geohaus-map-active #viewButtons{display:flex;flex-wrap:wrap;gap:8px;width:auto;margin:0}
  body.geohaus-map-active #panel button,body.geohaus-map-active #panel select{min-height:44px;font-size:14px}
  body.geohaus-map-active #panel input[type=search]{font-size:16px;min-height:44px}
  body.geohaus-map-active #panel input[type=checkbox]{width:20px;height:20px;min-width:20px}
  body.geohaus-map-active .layer-row{min-height:44px;align-items:center;padding:10px 0;gap:10px}
  body.geohaus-map-active .layer-row .swatch{margin-top:0}
  body.geohaus-map-active .layer-group>summary{min-height:48px;padding:12px 0;gap:10px}
  body.geohaus-map-active .toolbar{flex-wrap:wrap}
  body.geohaus-map-active .mobile-layers-toggle{display:inline-flex;align-items:center;justify-content:center;gap:8px;position:absolute;left:max(12px,env(safe-area-inset-left,0px));bottom:calc(20px + env(safe-area-inset-bottom,0px));z-index:10;min-height:48px;min-width:104px;padding:10px 18px;border:1px solid #C8C7B9;border-radius:24px;background:#fff;color:#254B3D;font-weight:600;font-size:16px;box-shadow:0 3px 16px #252B2833}
  .mobile-layers-toggle:before{content:'≡';font-size:24px;line-height:1}
  body.geohaus-map-active .mobile-layers-scrim{display:block;position:absolute;inset:0;z-index:20;width:100%;height:100%;border:0;border-radius:0;padding:0;background:#252B2840}
  body.geohaus-map-active .mobile-measure-output{position:absolute;display:flex;align-items:center;gap:12px;z-index:10;left:max(12px,env(safe-area-inset-left,0px));bottom:calc(80px + env(safe-area-inset-bottom,0px));max-width:calc(100% - 24px);padding:8px 8px 8px 14px;border:1px solid #C8C7B9;border-radius:12px;background:#fff;box-shadow:0 3px 16px #252B2826;font-size:14px;line-height:1.35}
  .mobile-measure-output span{min-width:0;overflow-wrap:anywhere}
  .mobile-measure-clear,.mobile-measure-finish{min-width:44px;min-height:44px;font-size:14px}
  body.geohaus-map-active #feature{top:12px;left:max(12px,env(safe-area-inset-left,0px));right:max(12px,env(safe-area-inset-right,0px));max-width:390px;max-height:calc(100% - 105px);padding:16px;border-radius:12px}
  body.geohaus-map-active #feature button{min-width:44px;min-height:44px}
  body.geohaus-map-active #mapStatus{bottom:calc(80px + env(safe-area-inset-bottom,0px));left:12px;right:12px;max-width:420px;font-size:13px;pointer-events:none}
  body.geohaus-map-active .maplibregl-ctrl-group button{width:44px;height:44px}
  body.geohaus-map-active .maplibregl-ctrl-top-right{top:2px;right:max(2px,env(safe-area-inset-right,0px))}
  body.geohaus-map-active .maplibregl-ctrl-bottom-right{bottom:env(safe-area-inset-bottom,0px);right:env(safe-area-inset-right,0px);max-width:calc(100% - 132px)}
  body.geohaus-map-active .maplibregl-ctrl-attrib{font-size:10px;line-height:1.4;max-width:100%;overflow-wrap:anywhere}
  body.geohaus-map-active .maplibregl-ctrl-attrib a{display:inline;white-space:normal}
}
@media(max-width:380px){body.geohaus-map-active .identity span{font-size:19px}body.geohaus-map-active>header{gap:6px;padding-left:8px;padding-right:8px}body.geohaus-map-active #accountMenu>summary{font-size:12px}}
@media(max-width:900px) and (max-height:500px){body.geohaus-map-active #panel{left:auto;right:0;width:min(420px,85vw);max-height:100%;border-radius:18px 0 0 0}body.geohaus-map-active .panel-heading .eyebrow{display:none}}
@media(prefers-reduced-motion:reduce){body.geohaus-map-active #panel{transition:none}}
