/* Loaded last. Phone controls live in document flow, outside the map. */
.mobile-only{display:none}
@media screen and (max-width:720px){
  .mobile-only{display:block}
  .masthead{height:60px;padding:0 12px}
  #printMap{display:none}
  .header-actions .quiet{font-size:11px;min-height:44px}
  .workspace{height:auto;min-height:0}
  .map-stage{height:auto;min-height:0}
  .map-topbar{padding:10px 12px;gap:8px;align-items:center}
  .map-topbar h2{font-size:19px;line-height:1.2;margin:3px 0 0}
  .map-topbar .eyebrow{font-size:8px}
  .map-actions{gap:6px;flex-shrink:0}
  .map-actions button{min-height:44px;font-size:12px;padding:8px 10px}
  .selection-bar{padding:0 12px 8px;min-height:44px;gap:6px}
  #selectedChips{flex-wrap:nowrap;max-height:none;overflow-x:auto;scrollbar-width:thin}
  .chip{flex:none;min-height:36px;font-size:11px;padding:3px 6px}
  .chip button{min-width:28px;min-height:32px;font-size:18px}
  #resetView{font-size:11px;min-height:40px}
  .map-canvas{flex:none;height:62svh;min-height:340px;max-height:600px}
  .map-signature{left:10px;bottom:33px;padding:4px 6px;gap:5px;border:0;background:#ffffffe0;box-shadow:none}
  .map-signature small{display:none}
  .map-signature img{width:18px;height:18px}
  .map-signature strong{font-size:10px}
  .watermark{opacity:.08}
  .watermark img{width:25px;height:25px}
  .watermark span{font-size:7px}
  .leaflet-control-zoom{margin-right:10px!important;margin-bottom:52px!important}
  .leaflet-control-zoom a{width:40px!important;height:40px!important;line-height:40px!important}
  .leaflet-control-scale{margin-bottom:12px!important}
  .leaflet-control-attribution{font-size:8px!important;max-width:100%;line-height:1.35}
  #mobileMapTools{padding:14px 12px;background:#f7faf8;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
  #mobileMapTools .map-settings{position:static;display:flex;flex-wrap:wrap;gap:8px;margin-bottom:10px}
  #mobileMapTools select,#mobileMapTools button{min-height:44px;font-size:13px}
  #mobileMapTools .map-settings select{flex:1;max-width:none;min-width:0}
  #mobileMapTools .map-settings button{font-size:13px;padding:8px 12px}
  #mobileMapTools .snapshot-controls{padding:0;background:none;border:0;display:block}
  #mobileMapTools .snapshot-controls label{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-bottom:12px;font-size:13px}
  #mobileMapTools #fitResults{margin:0 0 10px}
  #mobileMapTools .legend{position:static;max-width:none;max-height:none;box-shadow:none;padding:0;background:none;border:0}
  #mobileMapTools .legend-toggle{min-height:44px;text-align:left;align-items:center}
  #mobileMapTools .legend-body{padding:0 0 10px}
  .mobile-evidence-summary{border-bottom:1px solid var(--line);background:#fff;padding:0 12px}
  .mobile-evidence-summary>summary{cursor:pointer;min-height:48px;padding:15px 0;font-size:12px;color:#304e48}
  .mobile-evidence-summary>summary span{float:right;font-size:11px;color:#657971}
  .mobile-evidence-summary .map-summary{position:static;max-width:none;padding:0 0 12px;box-shadow:none;border:0;background:none;pointer-events:auto;font-size:12px;display:block}
  .mobile-evidence-summary .summary-dot{display:none}
  .mobile-evidence-summary #mapSourceCount{display:block;margin-top:6px}
  .mobile-evidence-summary .map-caption{position:static;max-width:none;padding:0 0 15px;font-size:11px;line-height:1.5;background:none;pointer-events:auto}
  .filter-panel{position:static;max-height:none;box-shadow:none;padding:16px 12px}
  .filter-panel select,.filter-panel input{min-height:44px;font-size:13px}
  .filter-heading button{min-height:44px}
  .detail-panel{position:fixed;top:auto;bottom:0;left:0;right:0;width:100%;max-height:75dvh;padding:22px 20px calc(20px + env(safe-area-inset-bottom));border-radius:18px 18px 0 0;border-top:1px solid #d8e0df;box-shadow:0 -8px 36px #143c4026;overscroll-behavior:contain;z-index:1000}
  .detail-panel .close-button{position:sticky;top:0;float:right;width:44px;height:44px;font-size:26px;z-index:10;background:#eff4f2}
  .detail-panel h2{font-size:23px;clear:both}
  .explorer{height:auto;min-height:0}
  .explorer-body{max-height:65dvh}
  .explorer-head{padding:22px 16px 0}
  .explorer-body{padding-left:12px;padding-right:12px}
  .empty-map{max-width:calc(100% - 80px);padding:14px}
}
@media screen and (max-width:360px){
  .map-topbar h2{font-size:16px}
  .map-actions button{font-size:11px;padding:8px}
  .brand strong{font-size:16px}
  .brand small{font-size:5px}
}
@media print{.mobile-only{display:none!important}}
