/* Layout only: the same controls and data remain available at every width. */
.station-popup-controls>summary{cursor:pointer;font-size:12px;color:#456a50;padding:7px 0}
.station-popup-controls{flex-shrink:0}
.station-popup-cursor-bar{flex-shrink:0}
@media(max-width:800px){
  .mobile-drawer{overflow:hidden}
  main{height:100dvh;min-height:0;display:flex;flex-direction:row;overflow:hidden}
  .map-shell{height:100%;min-height:0;flex:1;order:0}
  .mobile-drawer .sidebar{order:0}
  .mobile-drawer .stations{max-height:none;overflow:visible}
  .map-heading{top:calc(12px + env(safe-area-inset-top));left:12px;right:12px;padding:9px 12px;gap:3px}
  .map-heading .map-subtitle{font-size:18px}
  .map-actions{top:calc(85px + env(safe-area-inset-top));left:12px;right:12px;gap:6px;justify-content:space-between}
  .map-actions button{min-height:44px;font-size:12px;padding:9px}
  #filters-toggle{background:#193834;color:#fffefb;flex:1;text-align:left;max-width:220px}
  .layer-controls{top:calc(137px + env(safe-area-inset-top));right:12px;max-height:calc(100dvh - 220px);overflow:auto;padding:10px 14px}
  .layer-controls label{min-height:44px;margin:0;font-size:12px}.layer-controls .tiny-label{margin-bottom:4px}
  .layer-controls input{width:20px;height:20px}
  .legend{left:12px;bottom:calc(53px + env(safe-area-inset-bottom));max-width:calc(100% - 76px);max-height:110px;overflow:auto;gap:8px;font-size:10px}
  .map-help{display:none}
  .notice{top:calc(139px + env(safe-area-inset-top));left:12px;width:calc(100% - 24px);max-width:340px;max-height:140px;overflow:auto}
  .maplibregl-ctrl-bottom-right{bottom:calc(25px + env(safe-area-inset-bottom));right:7px}
  .maplibregl-ctrl-bottom-left{left:12px;bottom:calc(7px + env(safe-area-inset-bottom))}
  .measurement-overlay-legend{left:12px;max-width:calc(100% - 76px);max-height:150px;overflow:auto;bottom:calc(53px + env(safe-area-inset-bottom))}
  .sidebar select,.sidebar input[type=search],.station-popup select,.history-dialog select,.history-dialog input{font-size:16px;min-height:44px}
  .sidebar button,.station-popup button,.history-dialog button{min-height:44px}
  .station-popup-close,.history-close{min-width:44px;min-height:44px}
  .station-popup input[type=range]{min-height:44px;touch-action:pan-y}
  .station-popup{width:100vw;max-height:100dvh;height:100dvh;margin:0;border:0;border-radius:0}
  .station-popup-header{padding:calc(12px + env(safe-area-inset-top)) 16px 12px;gap:12px}
  .station-popup h2{font-size:24px;margin:7px 0 5px}
  .station-popup-body{padding:12px 12px calc(18px + env(safe-area-inset-bottom));overflow:auto;overscroll-behavior:contain;display:block;flex:1}
  .station-popup-scroll{overflow:visible;padding:0;min-height:0}
  .station-popup-toolbar{gap:8px}.station-popup-layout{width:100%;justify-content:space-between}.station-popup-layout select{min-width:0;max-width:70%;height:44px}
  .station-popup-cursor-bar{gap:6px}.station-popup-cursor-bar output{flex-basis:100%;line-height:1.5}
  .station-popup-chart svg{touch-action:pan-y}
  .station-popup-strip{padding:10px}.station-popup-strip-heading{flex-wrap:wrap;gap:8px}.station-popup-latest{max-width:100%;text-align:left}
  .station-popup-chooser{flex-wrap:wrap}.station-popup-chooser select{width:100%;min-width:0}
  .station-popup-snapshot-grid{grid-template-columns:1fr}
  .station-context-controls{flex-wrap:wrap}
  .station-popup summary,.history-dialog summary{min-height:44px;display:list-item;padding-top:12px;padding-bottom:12px}
  .history-header{padding-top:calc(12px + env(safe-area-inset-top))}.history-layout{padding-bottom:env(safe-area-inset-bottom)}
}
@media(max-width:380px){.map-actions button{font-size:11px;padding:7px}.filter-row{grid-template-columns:1fr}}
