/* P17: phone pages are finite screens. Only labelled lists and sheets scroll. */
@media (max-width:430px){
 html{height:100%;overflow:hidden;text-size-adjust:100%;-webkit-text-size-adjust:100%}
 body{height:var(--phone-height,100dvh);min-height:0;overflow:hidden;margin:0;display:flex;flex-direction:column;overscroll-behavior:none;font-size:clamp(12px,2dvh,15px)}
 *,*::before,*::after{box-sizing:border-box}
 [hidden]{display:none!important}
 h1{font-size:clamp(20px,3.4dvh,26px)!important;line-height:1.12;margin:8px 0!important}
 h2{font-size:clamp(17px,2.8dvh,21px)!important;line-height:1.2;margin:6px 0!important}
 h3{font-size:15px;margin:6px 0}
 p{margin:5px 0;line-height:1.35}
 button,select,input:not([type=checkbox]):not([type=radio]),summary,a.bk-link{min-height:40px;font-size:max(11px,.8rem);max-width:100%}
 button,summary{min-width:40px}
 input,select,textarea{min-width:0;max-width:100%}
 label{font-size:max(11px,.8rem)}
 button:focus-visible,a:focus-visible,summary:focus-visible,select:focus-visible{outline:3px solid var(--blue,#438dff);outline-offset:2px}
 a{min-width:40px;min-height:40px;display:inline-flex;align-items:center}
 label:has(>input[type=checkbox]),label:has(>input[type=radio]){min-height:40px}
 .phone-atom[tabindex="-1"]:not(a,button,summary,input,select,textarea):focus{outline:none}
 .driver-page .dg-root .sm-cap{font-size:11px}
 .source-chip,.calendar-strip small{font-size:11px!important}
 .hint,.bk-hint,small{font-size:max(11px,.7rem)}
 .topbar{flex:none;position:static!important}
 .topbar-in{min-height:52px!important;padding:4px 10px!important;gap:5px!important;flex-wrap:nowrap!important}
 .brand-mark{width:36px;height:36px;font-size:12px}.brand-text small{display:none}.brand-text strong{font-size:16px}
 .topnav{display:none!important}.phone-nav{margin-left:auto;width:160px;min-width:0}
 .wrap,.bk-public,.family-root{width:100%;max-width:none;margin:0!important;padding:8px 10px!important;flex:1;min-height:0;overflow:hidden}
 body>.foot{display:none}
 #view,#book-root,#seat-root{height:100%;min-height:0}
 .page-head,.fuel-heading{margin:0 0 6px;padding:0}
 .page-head>p:not(.eyebrow),.bk-intro,.bk-eyebrow{display:none}
 .bk-surface{padding:8px!important;border-radius:12px;margin:0!important;box-shadow:none}
 #book-root,#seat-root,#book-root>.bk-surface{display:flex;flex-direction:column;min-height:0}
 #book-root>h1{display:none}
 #book-root>.bk-surface,#booking-form,#seat-form{flex:1;min-height:0;display:flex;flex-direction:column}
 .bk-stepbar{margin:0!important;padding:0!important;min-height:30px;flex:none;gap:3px}
 .bk-stepbar li:not([aria-current=step]){display:none}.bk-stepbar li[aria-current=step]{display:flex;gap:8px;align-items:center;font-size:12px}
 .bk-progress{height:3px;margin:4px 0!important;flex:none}
 .bk-fields{gap:7px}.bk-fields label{gap:3px}.bk-pair{gap:8px}
 .bk-chips{gap:4px}.bk-chips button{padding:5px 8px}
 .bk-buses{gap:6px}.bk-bus{padding:8px!important}.bk-actions{margin:4px 0 0!important;padding:4px 0!important;flex:none}
 .bk-error:empty,[role=status]:empty,.error:empty{display:none}
 .bk-honey{display:none!important}
 .phone-paged{position:relative;display:flex!important;flex-direction:column;min-height:0;flex:1;gap:6px;overflow:hidden}
 .phone-flow{display:contents!important}
 .phone-off{display:none!important}
 .phone-feedback{order:98;flex:none;padding:8px;border:1px solid var(--line);border-radius:8px;background:var(--surface)}
 .phone-pagebar{order:99;display:flex;align-items:center;gap:6px;flex:none;margin-top:auto;padding:5px 0;border-top:1px solid var(--line,#888);background:var(--bg);min-height:50px}
 .phone-pagebar select{flex:1;width:0}.phone-pagebar button{flex:none;padding:5px 10px}
 .phone-pagebar small{flex:1;text-align:center}
 .phone-list{display:block;overflow:auto!important;max-height:var(--list-height,240px)!important;min-height:40px;border:1px solid var(--line,#888);border-radius:10px;padding:8px;overscroll-behavior:contain;scrollbar-gutter:stable}
 .phone-list:focus-visible{outline:3px solid var(--blue,#438dff)}
 .phone-paged>.phone-list{flex-shrink:1}
 .phone-atom{margin:0!important;flex-shrink:0;max-width:100%;min-width:0}
 .phone-atom .metric-grid,.phone-atom.fuel-summary{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
 .metric-grid strong,.fuel-stat strong{font-size:23px}.metric-grid>div,.fuel-stat{padding:8px}
 .metric-grid span{font-size:11px}
 .cockpit-bus,.learned-card,.report-sheet,.statement-sheet{padding:10px;margin:0}
 .phone-atom .tracking-map,.phone-atom .family-map{height:180px;min-height:120px}
 .family-root>p:not(.eyebrow):not([role=status]){font-size:11px}
 .family-root .learned-card h2{font-size:15px!important}
 dialog{width:calc(100% - 16px)!important;max-width:414px!important;max-height:calc(var(--phone-height,100dvh) - 16px)!important;margin:auto auto 0!important;overflow:auto;overscroll-behavior:contain;border:1px solid var(--line,#888);border-radius:18px 18px 0 0!important;padding:12px!important}
 dialog::backdrop{background:#0008}
 dialog .dialog-content{padding:0}
 dialog .phone-paged{flex:none;height:calc(var(--phone-height,100dvh) - 270px)}
 dialog .phone-pagebar{position:sticky;bottom:0}
 dialog .dg-actions:last-child{position:sticky;bottom:0;background:var(--bg);padding:4px 0}
 .fuel-details.phone-flow>summary{display:none}
 .dg-prepare .danger{color:var(--red);border-color:var(--red)}
 .fuel-form{gap:6px!important}.fuel-form label{gap:3px}.fuel-payment label{min-height:40px}.fuel-photos label{min-height:40px}
 .parent-live{display:flex;flex-direction:column;gap:7px;height:100%;padding:10px!important}
 .parent-live .page-head{flex:none}.parent-live .page-head p{display:block}
 .parent-live .tracking-map.large{height:auto;min-height:100px;flex:1;margin:0}
 .parent-summary{padding:10px;border:1px solid var(--line);border-radius:12px;flex:none}
 .parent-summary p{font-size:max(11px,.8rem)}
 [data-parent-eta]{font-size:clamp(22px,4dvh,30px)!important;font-weight:700}
 .parent-live footer{display:flex;gap:8px;align-items:center;flex:none}.parent-live footer p{font-size:11px}
 .parent-live [data-parent-child]{font-size:11px;color:var(--muted)}
 .leaflet-control-zoom a{width:40px!important;height:40px!important;line-height:40px!important}
 .leaflet-control-attribution{font-size:11px!important}
 .driver-page{display:block}.driver-page .dg-root{padding:0 8px}
 .driver-page .dg-head h1{font-size:15px!important;margin:0!important}
 .driver-page .dg-stops small,.driver-page .dg-list-count,.driver-page .sm-seat-code,.driver-page .dg-controls>span,.driver-page .dg-sync{font-size:11px}
 .driver-page .dg-root .sm-seat-code,.driver-page .dg-root .dg-seat-person small,.driver-page .dg-root .sm-driver,.driver-page .dg-root .sm-door{font-size:11px}
 .driver-page .dg-prepare{display:flex;gap:6px;flex:0 0 48px;align-items:center}.dg-prepare button{flex:1;height:40px}
 .sr-route-stops{font-size:11px}
 .bk-public .sr-map{--sm-seat-h:var(--public-seat-height,40px);--sm-row-gap:8px;--sm-pad:5px;margin:0 auto!important;width:100%;max-width:300px}
.sr-map .sm-nose{height:24px}.bk-public .sr-map .sm-tail{height:16px}
.sr-map .sm-cabin{padding:4px 5px 6px}.bk-public .sr-map .sm-cap{font-size:11px;line-height:14px;margin:0}
.sr-map .sm-driver,.sr-map .sm-door{height:var(--public-seat-height,40px);min-height:0}
.sr-map .sm-grid{gap:8px 5px}
 .sr-seat{min-height:40px!important;height:var(--public-seat-height,40px)!important;padding:2px!important;font-size:11px!important}
 .sr-seat span{font-size:11px!important}
 .sr-run{padding:6px;margin:0}
 .sr-seat-choice{margin:4px 0}.bk-public .sr-map-head h2{font-size:15px!important}
 .skip{z-index:9999}.skip:focus{top:4px;left:4px}
}
@media(prefers-reduced-motion:reduce){.phone-paged *{scroll-behavior:auto!important;animation:none!important;transition:none!important}}
