/* Query-only phone layout. All desktop geometry stays in its existing CSS. */
.mobile-query-weather,.mobile-query-toggle,.mobile-nav,.mobile-tool-tray,.mobile-sheet-handle{display:none}
@media(max-width:900px){
 .app-shell{height:100dvh;min-height:0}
 .topbar{height:84px;min-height:84px;padding:6px 12px;gap:4px;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:28px 40px}
 .brand{grid-column:1;grid-row:1;gap:6px}.brand h1{font-size:15px}.brand-mark,.brand-mark svg{width:25px;height:25px}
 .locate-button{grid-column:2;grid-row:1;height:28px;padding:0 8px;font-size:12px}
 .search-wrap{grid-column:1/-1;grid-row:2;width:100%}.search-wrap input{height:40px;font-size:16px}
 .app-readiness,.map-tool-stack,.interaction-status,.mobile-nav,.mobile-tool-tray,.mobile-drawing-actions,.dsm-selection-actions,.maintenance-notice{display:none!important}
 .workspace,.workspace:has(>.drawing-list-panel:not([hidden])){--sidebar-width:0px;min-height:0;grid-template-columns:0 minmax(0,1fr)}
 .drawing-properties,.drawing-list-panel,.weather-panel,.route-planner-panel,.layer-control{display:none!important}
 .result-panel{top:auto!important;bottom:max(8px,env(safe-area-inset-bottom))!important;left:8px!important;right:8px!important;width:auto!important;max-width:none!important;
   height:auto!important;max-height:min(270px,42dvh)!important;padding:10px 12px 5px!important;border:1px solid #dce5f1;border-radius:14px!important;
   box-shadow:0 3px 18px #23395c22;z-index:12;box-sizing:border-box;overflow:auto;overscroll-behavior:contain}
 .result-panel[hidden]{display:none!important}
 .result-panel .panel-heading{position:static;margin:0 0 5px!important;gap:6px;align-items:center}
 .result-panel h2{font-size:14px;line-height:1.35;flex:1;min-width:0;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
 .result-panel .status-badge{padding:4px 6px;font-size:10px;white-space:nowrap}
 .result-panel .panel-close{width:28px;height:32px;min-width:28px;flex-shrink:0}
 .result-panel .details{margin:0;font-size:12px}
 .result-panel .details>div{padding:5px 0;gap:8px;border-color:#edf1f7}
 .result-panel:not(.mobile-query-expanded) .details>div:not(:last-child),.result-panel:not(.mobile-query-expanded) .verdict-note,.result-panel:not(.mobile-query-expanded) .data-version{display:none!important}
 .result-panel .verdict-note{margin:6px 0;font-size:11px;line-height:1.45}
 .result-panel .data-version{margin:6px 0 4px;font-size:10px}
 .result-panel .coordinate-value{font-size:11px;flex-wrap:wrap;gap:5px}
 .result-panel .copy-button{min-height:30px;min-width:40px}
 .result-panel .navigation-actions{margin-top:7px;gap:6px}
 .result-panel .navigation-actions a,.result-panel .navigation-actions button{min-height:36px!important;padding:6px!important;font-size:12px}
 .result-panel:not(.mobile-query-expanded) .navigation-copy{display:none!important}
 .mobile-query-weather:not([hidden]){display:block;margin:4px 0 0;padding:5px 8px 7px;border-radius:8px;background:#f3f7fc}
 .mobile-weather-heading{display:flex;align-items:center;gap:6px;min-height:26px}
 .mobile-weather-heading strong{font-size:13px;color:#243e63;flex:1;min-width:0}
 .mobile-weather-heading small{color:#8291a5;font-size:10px;white-space:nowrap}
 .mobile-weather-heading button{height:28px;min-width:32px;padding:0 3px;border:0;background:none;color:#4872a8;font-size:11px}
 .mobile-weather-metrics:not([hidden]){display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;margin-top:3px}
 .mobile-weather-metrics>div{display:grid;gap:3px}.mobile-weather-metrics span{font-size:10px;color:#7c8ca5}.mobile-weather-metrics b{font-size:12px;font-weight:600;color:#294766}
 .mobile-query-weather.is-stale{background:#fff7e9}
 .mobile-query-toggle:not([hidden]){display:block;width:100%;min-height:28px;margin-top:2px;padding:3px;border:0;background:none;color:#6c82a2;font-size:11px}
 .mobile-query-toggle::after{content:'⌄';margin-left:6px}.mobile-query-expanded .mobile-query-toggle::after{content:'⌃'}
 .result-panel:not(.mobile-query-expanded)>.navigation-actions{padding-right:96px}
 .result-panel:not(.mobile-query-expanded)>.mobile-query-toggle:not([hidden]){position:absolute;right:12px;bottom:5px;width:88px;min-height:36px;margin:0}
 .result-panel:not(.mobile-query-expanded):has(>.navigation-actions[hidden]):has(>.mobile-query-toggle:not([hidden])){padding-bottom:42px!important}
 .result-panel.mobile-query-expanded{max-height:min(440px,60dvh)!important}
 .mobile-query-expanded h2{-webkit-line-clamp:3}
 .location-notice,.maintenance-notice{width:calc(100% - 24px);max-width:350px;font-size:11px}
 .maplibregl-ctrl-group button{width:36px;height:36px}
 .map-hint{max-width:calc(100% - 24px);white-space:normal;font-size:11px}
 .workspace:has(>.result-panel:not([hidden]))>.map-hint{bottom:auto;top:8px}
 dialog{max-height:calc(100dvh - 24px);overflow:auto}
}
@media(max-width:900px) and (max-height:500px){
 .topbar{height:50px;min-height:50px;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:40px;padding:5px 10px;gap:6px}
 .brand{display:none}.search-wrap{grid-row:1;grid-column:1}.locate-button{grid-row:1;grid-column:2;height:36px}
 .result-panel{left:auto!important;right:8px!important;width:min(350px,52vw)!important;max-height:calc(100% - 16px)!important}
 .result-panel.mobile-query-expanded{max-height:calc(100% - 16px)!important}
}
