/* Additive mobile-only layout. Desktop styles and native map/data logic are untouched. */
.pa-mobile-split-slot,.pa-mobile-plan-info{display:none}
@media(max-width:850px){
 #atlas-view.pa-mobile-map-ready:not(.is-mobile-workspace){height:var(--pa-mobile-map-height,clamp(300px,52svh,620px));min-height:340px}
 #atlas-view.pa-mobile-map-ready.pa-mobile-pinch-ready:not(.is-mobile-workspace){min-height:260px}
 /* Reserve a dedicated 44px touch target beside the horizontally scrollable toolbar. */
 #atlas-view.pa-mobile-map-ready .map-top{display:none}
 #atlas-view.pa-mobile-map-ready .atlas-control-group{top:10px;left:10px;right:62px;gap:4px;padding:4px;max-width:calc(100% - 72px)}
 #atlas-view.pa-mobile-map-ready.is-mobile-workspace .atlas-control-group{top:max(64px,calc(env(safe-area-inset-top) + 58px))}
 #atlas-view.pa-mobile-map-ready .atlas-control{width:44px;min-width:44px;height:44px;padding:4px;flex:0 0 auto}
 #atlas-view.pa-mobile-map-ready .atlas-control svg{width:22px;height:22px}
 #atlas-view.pa-mobile-map-ready #tool-tkgm,#atlas-view.pa-mobile-map-ready #tool-eimar{gap:0}
 #atlas-view.pa-mobile-map-ready #tool-tkgm svg,#atlas-view.pa-mobile-map-ready #tool-eimar svg{width:18px;height:18px}
 #atlas-view.pa-mobile-map-ready #tool-tkgm span,#atlas-view.pa-mobile-map-ready #tool-eimar span{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto;font-size:11px;line-height:1.1;letter-spacing:0}
 #atlas-view>.pa-mobile-split-slot{display:block;position:absolute;right:10px;top:10px;z-index:12;pointer-events:none}
 #atlas-view.is-mobile-workspace>.pa-mobile-split-slot{top:max(64px,calc(env(safe-area-inset-top) + 58px))}
 #atlas-view .pa-mobile-split-slot .pa-kiyas-ctrl{float:none;margin:0;border:1px solid #d9b25f;border-radius:10px;overflow:hidden;pointer-events:auto;box-shadow:0 2px 8px #0d233840}
 #atlas-view .pa-mobile-split-slot .pa-kiyas-ctrl button{width:44px;height:46px;background:#fff}
 #atlas-view .pa-mobile-split-slot .pa-kiyas-ctrl button[aria-pressed=true]{background:#0d2338}
 #atlas-view .pa-mobile-split-slot .pa-kiyas-ctrl button svg{width:23px;height:23px}
 /* Native divider is a later sibling; keep its drag strip below controls.
    Opaque selector cards prevent the line showing through their background. */
 #atlas-view.pa-mobile-map-ready .pa-kiyas-line{z-index:1}
 #atlas-view.pa-mobile-map-ready .pa-kiyas-tag{z-index:2;background:#0d2338;box-sizing:border-box;min-width:0;min-height:44px;padding:0;border-radius:8px;border:1px solid #d9b25f;box-shadow:0 2px 8px #0d233840}
 #atlas-view.pa-mobile-map-ready .pa-kiyas-tag.sol{left:10px;width:31%;max-width:31%!important}
 #atlas-view.pa-mobile-map-ready .pa-kiyas-tag.sag{right:10px;width:min(224px,calc(69% - 28px));max-width:calc(69% - 28px)!important;display:flex;align-items:center;gap:0}
 #atlas-view.pa-mobile-map-ready .pa-kiyas-tag label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 #atlas-view.pa-mobile-map-ready .pa-kiyas-tag select{box-sizing:border-box;display:block;min-width:0;width:100%;max-width:100%;min-height:44px;font-size:11px;font-weight:500;line-height:1.2;padding:4px 5px;border:0;white-space:nowrap;text-overflow:ellipsis}
 #atlas-view.pa-mobile-map-ready .pa-kiyas-tag.sag select{order:0;flex:1}
 #atlas-view.pa-mobile-map-ready .pa-kiyas-row{display:contents}
 #atlas-view.pa-mobile-map-ready .pa-kiyas-close{order:1;flex:0 0 44px;min-width:44px;min-height:44px;padding:0;border:0;border-radius:6px;font-size:0}
 #atlas-view.pa-mobile-map-ready .pa-kiyas-close::after{content:'×';font:400 20px/1 system-ui,sans-serif}
 /* The same source/link/hint nodes live here on mobile, never deleted or clipped. */
 #atlas-view .pa-mobile-plan-info{display:block;position:absolute;left:10px;bottom:98px;z-index:3;max-width:calc(100% - 62px);pointer-events:auto;color:#fff;border-radius:8px;font:12px/1.4 system-ui,sans-serif}
 /* A 30px visual chip inside a 44px hit area: less map coverage, not a tiny tap target. */
 #atlas-view .pa-mobile-plan-info>summary{display:flex;align-items:center;min-height:44px;box-sizing:border-box;padding:0;cursor:pointer;color:#ffe2a6;font-weight:500;list-style:none}
 #atlas-view .pa-mobile-plan-info>summary::-webkit-details-marker{display:none}
 #atlas-view .pa-mobile-plan-label{display:inline-flex;align-items:center;gap:5px;box-sizing:border-box;min-height:30px;padding:4px 8px;background:rgba(13,35,56,.94);border:1px solid #d9b25f;border-radius:7px;font-size:11px;line-height:1.3}
 #atlas-view .pa-mobile-plan-label::before{content:'▸';font-size:11px}
 #atlas-view .pa-mobile-plan-info[open] .pa-mobile-plan-label::before{content:'▾'}
 /* Explicitly opened sources may cover bottom map actions until collapsed.
    Keep the selectors/toolbar clear and the collapse summary always reachable. */
 #atlas-view .pa-kiyas-ui:has(.pa-mobile-plan-info[open]){z-index:auto}
 #atlas-view .pa-mobile-plan-info[open]{top:var(--pa-mobile-info-top,118px);bottom:max(10px,env(safe-area-inset-bottom));width:calc(100% - 20px);max-width:calc(100% - 20px);max-height:none;overflow:auto;overscroll-behavior:contain;z-index:13;background:rgba(13,35,56,.96);border:1px solid #d9b25f}
 #atlas-view .pa-mobile-plan-info[open]>summary{position:sticky;top:0;z-index:1;background:#0d2338;padding:0 2px}
 #atlas-view .pa-mobile-plan-info[open] .pa-mobile-plan-label{border-color:transparent;background:transparent}
 #atlas-view .pa-mobile-plan-info-body{padding:0 10px 10px;overflow-wrap:anywhere}
 #atlas-view .pa-mobile-plan-info-body>section+section{border-top:1px solid #ffffff30;padding-top:6px;margin-top:6px}
 #atlas-view .pa-mobile-plan-info-body strong{font-size:11px;color:#ffe2a6}
 #atlas-view .pa-mobile-plan-info .pa-kiyas-attr{font-size:11px;max-height:none;overflow:visible;opacity:1}
 #atlas-view .pa-mobile-plan-info .pa-kiyas-attr a{white-space:normal}
 #atlas-view .pa-mobile-plan-info .pa-kiyas-hint{font-size:12px}
 #atlas-view .pa-mobile-plan-info .pa-kiyas-hint button{min-height:30px}
 #atlas-view.is-mobile-workspace .pa-mobile-plan-info:not([open]){bottom:calc(max(18px,env(safe-area-inset-bottom)) + 144px)}
 #atlas-view .pa-mobile-plan-info :focus-visible,#atlas-view .pa-mobile-split-slot button:focus-visible{outline:3px solid #d9b25f;outline-offset:2px}
 /* Enabled only when the native pinch handler is available; compass stays intact. */
 #atlas-view.pa-mobile-pinch-ready .maplibregl-ctrl-zoom-in,
 #atlas-view.pa-mobile-pinch-ready .maplibregl-ctrl-zoom-out{display:none}
 #atlas-view.pa-mobile-pinch-ready .maplibregl-ctrl-compass{border-top:0}
}
/* On short full-screen maps, use the free bottom-right slot instead of stacking
   the disclosure into the selectors. Parcel and zoom controls keep their space. */
@media(max-width:850px) and (max-height:480px){
 #atlas-view.is-mobile-workspace .pa-mobile-plan-info:not([open]){left:auto;right:62px;bottom:max(18px,env(safe-area-inset-bottom));width:max-content;max-width:calc(100% - 206px)}
}
