/* Mobile-only refinements. Desktop rules are intentionally untouched. */
@media (max-width:700px) {
 main { padding:14px 10px; }
 .topbar { min-height:56px; padding:8px 12px; gap:8px; }
 .topbar .brand { gap:7px; }.topbar .brand-mark { width:32px; height:32px; }
 .topbar-actions { gap:6px; }.topbar-actions .button { padding:8px; }
 .tabs { margin-bottom:18px; gap:2px; }.tabs>* { flex-shrink:0; min-height:44px; }
 #view-live .section-heading,#view-team-live .section-heading { flex-direction:column; align-items:stretch; gap:12px; }
 #view-live .live-select,#view-team-live .live-select { justify-content:flex-start; width:100%; }
 #view-live .live-select label,#view-team-live .live-select label { min-width:0; flex:1 1 100%; }
 #view-live button,#view-team-live button { min-height:44px; }
 #view-live select,#view-team-live select { font-size:16px; }
 #team-dashboard.live-dashboard,.team-live-grid { grid-template-columns:minmax(0,1fr); }
 #team-dashboard .live-channel-group { padding:12px; }
 #team-dashboard .telemetry-grid,.team-car-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
 #team-dashboard .stable-reading-tile,.team-car-metrics .stable-reading-tile { height:120px; min-height:120px; padding:10px; }
 #team-dashboard .stable-reading-tile .tile-label { font-size:10px; letter-spacing:.04em; padding-right:0; }
 #team-dashboard .stable-reading-tile .tile-value { font-size:20px; }
 #team-dashboard .stable-reading-tile .tile-text-value { font-size:15px; }
 .team-car-metrics .stable-reading-tile strong { font-size:18px; }
 .team-car-metrics .stable-reading-tile>span { height:30px; line-height:15px; }
 #view-live .panel-heading,#view-team-live .panel-heading { flex-wrap:wrap; gap:8px; }
 #view-live .map-actions,#view-team-live .map-actions { flex-wrap:wrap; }
 .live-status-row { gap:8px; font-size:12px; }
 /* Analysis controls stack, while detailed tables scroll within their panels. */
 .analysis-subtabs { gap:0; }.analysis-subtabs button { min-height:46px; padding:10px 12px; }
 .analysis-context { overflow-wrap:anywhere; }
 .analysis-tab-panel { min-width:0; }
 .analysis-tab-panel .panel { padding:12px; margin-bottom:12px; }
 .analysis-tab-panel button,.analysis-tab-panel .button { min-height:44px; }
 .analysis-tab-panel input:not([type=checkbox]),.analysis-tab-panel select { font-size:16px; max-width:100%; min-width:0; }
 .analysis-tab-panel label { min-width:0; }
 .heading { gap:10px; margin-bottom:14px; }.heading h1 { font-size:27px; }
 .heading>div { min-width:0; }.heading>.button { min-height:44px; }
 .saved-controls { display:grid; grid-template-columns:minmax(0,1fr); gap:8px; }
 .saved-controls>* { width:100%; min-width:0; }.saved-actions { gap:8px; }
 .analysis-tab-panel .controls { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
 .analysis-tab-panel .pairs { grid-template-columns:minmax(0,1fr); gap:12px; }
 .analysis-tab-panel .pairs>div { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
 .analysis-tab-panel .pairs>div button { white-space:normal; }
 #circuit { width:100%; }.file-list span,#gps-fix-diagnostic,#live-detail { overflow-wrap:anywhere; }
 .workspace,.workspace>aside { grid-template-columns:minmax(0,1fr); gap:12px; }
 .workspace .plot-title { flex-direction:column; align-items:flex-start; gap:4px; }
 .workspace .readout { overflow-wrap:anywhere; }
 .workspace canvas { touch-action:pan-y; }
 .workspace-channels summary,.sector-settings summary { min-height:44px; display:flex; align-items:center; }
 .map-sections button { min-width:44px; }.workspace-sector { min-height:52px; }
 #sections { min-width:0; width:100%; flex-basis:100%; }
 #lap-table,#sector-table,.theoretical-table,.boundary-table,#live-splits { max-width:100%; overflow-x:auto; -webkit-overflow-scrolling:touch; }
 .sector-summary { grid-template-columns:minmax(0,1fr); }
 .live-tracking-grid { grid-template-columns:minmax(0,1fr); gap:14px; }
 .live-tracking-grid svg { max-height:320px; }
 #live-panel .row>label { width:100%; }
 .live-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
 .live-metrics>div { padding:10px; min-width:0; }.live-metrics>div:last-child { grid-column:1 / -1; }
 .live-metrics strong { font-size:24px; }.live-reference-total { font-size:16px; }
}
