/* Only the phone/tablet presentation changes. Desktop retains its original layout. */
@media (max-width:800px) {
  .header{grid-template-columns:1fr;grid-template-areas:"brand" "actions" "mobile-controls";gap:10px;padding:12px 14px}
  .header-monitoring,.detail-drawer{display:none!important}
  .header .brand{flex-wrap:nowrap;gap:12px}
  .header .brand-logo{width:min(57vw,230px);height:auto}
  .header .brand .brand-updated{font-size:9px;padding-left:0;border:0;white-space:nowrap;margin-left:auto}
  .header .header-actions .button{min-height:40px;padding:8px;font-size:12px}
  #mobileMapControls{grid-area:mobile-controls;min-width:0}
  #mobileMapControls .map-toolbar{position:static;display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:0;width:100%;max-width:none;pointer-events:auto}
  #mobileMapControls .map-toolbar-left{display:contents;max-width:none}
  #mobileMapControls .map-caption{display:none}
  #mobileMapControls .map-yandex-toggle,#mobileMapControls .map-stop-setting,#mobileMapControls .map-button{min-height:42px;border:1px solid #3b5363;border-radius:7px;background:#203645;box-shadow:none;color:#eef5fa;padding:7px 10px;font-size:12px;margin:0;justify-content:space-between;min-width:0}
  #mobileMapControls .map-yandex-toggle:not(.today-routes-toggle){order:1}
  #mobileMapControls #fitMapButton{order:2;width:100%;font-weight:600}
  #mobileMapControls .today-routes-toggle{order:3;gap:8px}
  #mobileMapControls .map-stop-setting{order:4;gap:5px}
  #mobileMapControls #yandexToggleState,#mobileMapControls #todayRoutesState{display:none}
  #mobileMapControls .today-routes-toggle>span:first-child{font-size:0}
  #mobileMapControls .today-routes-toggle>span:first-child::after{content:"Маршрут";font-size:12px}
  #mobileMapControls .map-stop-setting>span:first-child{font-size:0}
  #mobileMapControls .map-stop-setting>span:first-child::after{content:"Остановки от";font-size:11px}
  #mobileMapControls .map-stop-setting input{width:39px;min-height:28px;font-size:12px;padding:3px}
  .map-column{height:65dvh;min-height:380px}
  .map-wrap{min-height:0;flex:1}
  .map-notice{top:12px;max-width:calc(100% - 70px)}
  .history-legend{display:none!important}
  .fleet-panel{height:450px}
  #mobileMapControls .mobile-clear-track{grid-column:1/-1;order:5;min-height:36px;font-size:12px;color:#d9e7ef;background:#294351;border:1px solid #3b5363;box-shadow:none}
}
