:root{--bg:#0b1220;--panel:#111827;--panel2:#172033;--line:#334155;--text:#f8fafc;--muted:#94a3b8;--green:#22c55e;--yellow:#f59e0b;--red:#ef4444;--cyan:#38bdf8;--purple:#8b5cf6;--shadow:0 8px 24px rgba(0,0,0,.26)}
    *{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
    html,body{margin:0;background:var(--bg);color:var(--text);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Hiragino Sans","Yu Gothic UI","Yu Gothic",sans-serif;overscroll-behavior-y:none}
    body{min-height:100vh;min-height:100dvh;touch-action:pan-x pan-y}
    button,input,select{font:inherit}button{touch-action:manipulation}
    .app{max-width:1400px;margin:0 auto;padding:calc(10px + env(safe-area-inset-top)) 10px calc(94px + env(safe-area-inset-bottom))}
    .topbar{display:flex;gap:8px;align-items:center;justify-content:space-between;margin-bottom:10px;position:sticky;top:0;z-index:10;background:linear-gradient(var(--bg) 86%,rgba(11,18,32,0));padding-bottom:8px}
    .title{font-weight:900;letter-spacing:.05em}.clock{font-variant-numeric:tabular-nums;font-size:24px;font-weight:900}.toolbar{display:flex;gap:6px;flex-wrap:wrap}.smallbtn{background:#1e293b;color:var(--text);border:1px solid var(--line);border-radius:10px;padding:8px 10px;font-weight:800}
    .grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}@media(min-width:760px){.grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(min-width:1150px){.grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
    .car{background:var(--panel);border:2px solid var(--line);border-radius:15px;padding:9px;box-shadow:var(--shadow)}.car.inpit{border-color:var(--yellow);background:linear-gradient(180deg,#1f2937,#111827)}
    .carhead{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}.num{font-size:26px;font-weight:950;line-height:1}.status{font-size:12px;color:var(--muted);font-weight:800}.driver-now{font-size:12px;color:#cbd5e1;margin-top:3px}.elapsed{font-variant-numeric:tabular-nums;font-size:19px;font-weight:950;color:var(--yellow)}
    .pitin,.pitout{width:100%;border:0;border-radius:12px;padding:14px 10px;font-size:19px;font-weight:950;color:#061018}.pitin{background:var(--green)}.pitout{background:var(--red);color:#fff}
    .actions{display:grid;grid-template-columns:repeat(2,1fr);gap:6px;margin-top:8px}.act{background:#22304a;color:var(--text);border:1px solid #3b4a65;border-radius:10px;padding:10px 5px;font-weight:850;min-height:46px}.act.on{background:#0ea5e9;border-color:#7dd3fc;color:#03121a}
    .driver{margin-top:8px;background:var(--panel2);border-radius:10px;padding:8px;overflow:hidden}.driverrow{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:6px;align-items:center;width:100%}.driverrow select{min-width:0;width:100%;background:#0f172a;color:white;border:1px solid var(--line);border-radius:9px;padding:9px 8px;font-size:16px;font-weight:900;text-align:center;-webkit-appearance:none;appearance:none}.drivergo{grid-column:1/-1;width:100%;background:var(--purple);color:white;border:0;border-radius:9px;padding:10px 11px;font-weight:900}.driver-preview{margin-top:6px;font-size:12px;color:#cbd5e1}.last{margin-top:7px;font-size:12px;color:var(--muted);min-height:24px}
    .panel{margin-top:12px;background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:10px}.panel h2{font-size:16px;margin:0 0 5px}.hint{font-size:12px;color:var(--muted);line-height:1.5}
    .history-list{display:flex;flex-direction:column;gap:8px;margin-top:9px}.history-empty{padding:16px;text-align:center;color:var(--muted);border:1px dashed var(--line);border-radius:10px}.history-card{background:#0f172a;border:1px solid #273449;border-radius:12px;padding:9px}.history-top{display:flex;align-items:center;justify-content:space-between;gap:8px}.history-car{font-weight:950;font-size:18px}.editbtn{background:var(--cyan);color:#07131c;border:0;border-radius:9px;padding:9px 14px;font-weight:950}.history-times{font-variant-numeric:tabular-nums;font-size:13px;color:#e2e8f0;margin-top:4px}.chips{display:flex;gap:5px;flex-wrap:wrap;margin-top:7px}.chip{font-size:11px;background:#1e293b;border:1px solid #334155;border-radius:999px;padding:4px 7px;color:#cbd5e1}.chip.on{background:#0c4a6e;border-color:#0369a1;color:#e0f2fe}.chip.driverchip{background:#3b0764;border-color:#6b21a8;color:#f3e8ff}
    .bottom{position:fixed;left:0;right:0;bottom:0;background:rgba(15,23,42,.97);border-top:1px solid var(--line);padding:8px 10px calc(8px + env(safe-area-inset-bottom));display:flex;gap:8px;justify-content:center;z-index:20}.bottom button{border:0;border-radius:12px;padding:12px 14px;font-weight:900}.csv{background:var(--cyan);color:#07131c}.undo{background:#475569;color:white}.reset{background:#7f1d1d;color:white}
    dialog{width:min(780px,95vw);max-height:88vh;overflow:auto;border:1px solid var(--line);border-radius:16px;background:#0f172a;color:white;padding:16px;overscroll-behavior:contain}dialog::backdrop{background:rgba(0,0,0,.65)}
    .settingsgrid,.editgrid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.editgrid .full{grid-column:1/-1}.settingsgrid label,.editgrid label,.driverconfig label{display:block;font-size:12px;color:#cbd5e1}.settingsgrid input,.editgrid input,.editgrid select,.driverconfig input,.driverconfig select{width:100%;margin-top:4px;background:#111827;color:white;border:1px solid var(--line);border-radius:8px;padding:10px}
    .vehicle-row{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:end;background:#111827;border:1px solid #263248;border-radius:10px;padding:8px}.vehicle-row button{height:40px;border:0;border-radius:9px;background:#0c4a6e;color:white;font-weight:850;padding:0 11px}.vehicle-row button.configured{background:#0c4a6e}
    .closebtn{margin-top:14px;width:100%;padding:12px;border:0;border-radius:10px;background:var(--cyan);font-weight:900;color:#07131c}.raceclear{margin-top:10px;width:100%;padding:12px;border:1px solid #991b1b;border-radius:10px;background:#3f0b0b;color:#fecaca;font-weight:900}.checks{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;margin:12px 0}.checks label{display:flex;align-items:center;gap:8px;background:#172033;padding:10px;border-radius:9px;font-size:13px}.modal-actions{display:flex;gap:8px;margin-top:14px}.modal-actions button{flex:1;border:0;border-radius:10px;padding:12px;font-weight:900}.saveedit{background:var(--cyan);color:#07131c}.deleteedit{background:#7f1d1d;color:white}.cancel{background:#475569;color:white}.driverconfig{display:grid;grid-template-columns:1fr 1fr;gap:10px}.section-title{font-size:13px;font-weight:900;color:#e2e8f0;margin:12px 0 6px}.flash{animation:flash .28s ease}@keyframes flash{0%{transform:scale(1)}50%{transform:scale(.97)}100%{transform:scale(1)}}
    .car{container-type:inline-size}.time-picker{display:grid;grid-template-columns:1fr auto 1fr auto 1fr;gap:5px;align-items:center;margin-top:4px}.time-picker select{width:100%;min-width:0;background:#111827;color:white;border:1px solid var(--line);border-radius:8px;padding:10px 5px;text-align:center;font-weight:800}.time-sep{color:#94a3b8;font-weight:900;text-align:center}@container (max-width:220px){.driverrow{grid-template-columns:1fr}.drivergo{grid-column:1}.driver-preview{white-space:normal}.driverrow select{font-size:15px}}@media(max-width:430px){.clock{font-size:22px}.smallbtn{padding:7px 8px}.history-card{padding:8px}.settingsgrid{grid-template-columns:1fr}.editgrid{grid-template-columns:1fr 1fr}.driverconfig{grid-template-columns:1fr 1fr}}

/* v1.04 additions */
.predriver{margin-top:8px}.prelabel{font-size:11px;font-weight:900;color:#cbd5e1;margin-bottom:6px}.predriverrow{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.actions .runend{grid-column:1/-1;background:#3b2f1d;border-color:#8b6a2e;color:#fde68a}.actions .runend.on,.actions .runend:disabled{background:#78350f;border-color:#f59e0b;color:#fff;opacity:1}.car.runended{border-color:#f59e0b}.endchip{background:#78350f!important;border-color:#f59e0b!important;color:#fff!important}.runend-time{color:#fbbf24}
#settings h2,#driverDialog h2{font-size:22px;margin-top:0}#settings .hint,#driverDialog .hint{font-size:15px;line-height:1.65}#settings .settingsgrid label,#driverDialog .driverconfig label,#driverDialog label{font-size:16px!important}#settings .settingsgrid input,#driverDialog .driverconfig input,#driverDialog select{font-size:17px;padding:13px 11px!important;min-height:48px}#settings .vehicle-row button{height:48px;font-size:15px;padding:0 14px}#settings .closebtn,#settings .raceclear,#driverDialog .modal-actions button{font-size:16px;min-height:48px}#driverDialog .section-title{font-size:16px}
@container (max-width:220px){.predriverrow{grid-template-columns:1fr}}

/* v1.04 refinement */
html,body{height:100%;overflow:hidden}
body{min-height:100%;touch-action:auto}
.app{height:100dvh;overflow-y:auto;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;touch-action:pan-y}
.runend-bottom{width:100%;margin-top:8px;background:#3b2f1d;border:1px solid #8b6a2e;color:#fde68a;border-radius:10px;padding:12px 10px;font-weight:900;min-height:46px}
.runend-compact{width:100%;background:#475569;color:#fff;border:1px solid #64748b;border-radius:12px;padding:12px 10px;font-size:17px;font-weight:900}
.car.runended{background:var(--panel);padding:9px}
.car.runended .ended-head{margin-bottom:8px}
.driver-count-row{margin:10px 0 12px}
.driver-count-row label{display:block;font-size:16px;color:#cbd5e1;font-weight:800}
.driver-count-row select{width:100%;margin-top:6px;background:#111827;color:white;border:1px solid var(--line);border-radius:8px;padding:13px 11px;font-size:17px;min-height:48px}

.vehicle-block{background:#0f172a;border:1px solid #263248;border-radius:12px;padding:8px}
.vehicle-block .vehicle-row{background:transparent;border:0;padding:0}
.pitwait-setting{display:flex!important;align-items:center;gap:9px;margin-top:8px;padding:9px 10px;border-radius:9px;background:#172033;color:#e2e8f0!important;font-size:15px!important;font-weight:800}
.pitwait-setting input{width:20px!important;height:20px;min-height:0!important;margin:0!important;padding:0!important}
.pitwait-compact{width:100%;background:#475569;color:#fff;border:1px solid #64748b;border-radius:12px;padding:12px 10px;font-size:17px;font-weight:900}
.car.pitwait{border-color:#64748b;background:var(--panel)}
.startchip{background:#374151!important;border-color:#64748b!important;color:#fff!important}


/* v1.04 operational refinements */
.pitout-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px;align-items:stretch}
.pitout-row .pitout{width:100%}
.pitcancel{min-width:58px;border:1px solid #64748b;border-radius:12px;background:#475569;color:#fff;font-weight:900;padding:10px 9px}
.memo-label{display:block;font-size:13px;color:#cbd5e1;margin-top:10px}
.memo-label textarea{width:100%;min-height:58px;resize:vertical;margin-top:5px;background:#111827;color:#fff;border:1px solid var(--line);border-radius:9px;padding:10px;font:inherit;line-height:1.35}
.history-memo{margin-top:6px;color:#cbd5e1;font-size:12px;line-height:1.35;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;word-break:break-word}
@container (max-width:220px){.pitout-row{grid-template-columns:minmax(0,1fr) 54px}.pitcancel{min-width:0;padding:9px 5px;font-size:13px}}


/* v1.04 final review fixes */
[hidden]{display:none!important}
.vehicle-advanced{display:grid;gap:8px;margin-top:8px}
.start-driver-setting{display:block!important;font-size:15px!important;font-weight:800;color:#e2e8f0!important;background:#172033;border-radius:9px;padding:9px 10px}
.start-driver-setting select{width:100%;margin-top:6px;background:#111827;color:#fff;border:1px solid var(--line);border-radius:8px;padding:10px;font-size:16px;min-height:44px}
.endcancel-row{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:8px}
.endcancel-row .runend-bottom,.endcancel-row .pitcancel{width:100%;min-width:0;margin:0;min-height:42px;padding:7px 6px;font-size:15px;line-height:1.1;white-space:nowrap}
.pitwait-actions{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.pitwait-actions .pitwait-compact,.pitwait-actions .runend-compact-wait{width:100%;min-width:0;min-height:42px;padding:8px 6px;border-radius:10px;font-size:14px;font-weight:900;white-space:nowrap}
.runend-compact-wait{background:#3b2f1d;border:1px solid #8b6a2e;color:#fde68a}
.driverconfig [data-driver-index][hidden]{display:none!important}


/* v1.04 handover */
.handover-settings{margin:0 0 14px;padding:12px;background:#111827;border:1px solid #334155;border-radius:12px}
.handover-title{font-size:17px;font-weight:900;margin-bottom:3px}
.handover-settings .hint{margin:4px 0 10px}
.handover-buttons{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.handover-buttons button{border:0;border-radius:10px;min-height:48px;padding:10px 8px;font-size:15px;font-weight:900}
#handoverExportBtn{background:#0c4a6e;color:#fff}
#handoverImportBtn{background:#166534;color:#fff}
.handover-restore{width:100%;margin-top:8px;border:1px solid #64748b;border-radius:9px;background:#334155;color:#e2e8f0;padding:9px;font-weight:800}
.handover-restore:disabled{opacity:.38}
.handover-dialog{width:min(620px,95vw)}
.handover-dialog h2{font-size:22px;margin:0 0 6px}
.handover-meta,.handover-status,.handover-summary{margin:10px 0;padding:10px;border-radius:10px;background:#172033;color:#e2e8f0;font-size:14px;line-height:1.55}
.handover-qr-wrap{display:flex;justify-content:center;align-items:center;background:#fff;border-radius:12px;padding:10px;margin:10px auto;max-width:440px}
#handoverQrCanvas{display:block;width:100%;height:auto;image-rendering:pixelated}
.handover-pager{display:grid;grid-template-columns:1fr auto 1fr;gap:10px;align-items:center;margin:10px 0}
.handover-pager button{border:0;border-radius:9px;background:#475569;color:#fff;padding:10px;font-weight:900}
.handover-pager strong{text-align:center}
.handover-note{text-align:center}
.handover-camera{position:relative;width:100%;aspect-ratio:4/3;background:#020617;border-radius:12px;overflow:hidden;margin-top:10px}
#handoverVideo{width:100%;height:100%;object-fit:cover}
.handover-scan-frame{position:absolute;left:8%;right:8%;top:8%;bottom:8%;border:3px solid #38bdf8;border-radius:14px;box-shadow:0 0 0 999px rgba(0,0,0,.14);pointer-events:none}
.handover-status.ok{background:#0f3d2a;border:1px solid #166534}
.handover-status.warn{background:#422006;border:1px solid #92400e}
#handoverApplyBtn:disabled{opacity:.4}
@media(max-width:430px){.handover-buttons{grid-template-columns:1fr 1fr}.handover-buttons button{font-size:14px;padding:9px 6px}.handover-dialog{padding:14px}}

.settings-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:14px}
.settings-actions .closebtn{margin-top:0;width:100%}
.settings-actions .cancel{border:0;border-radius:10px;min-height:48px;font-size:16px;font-weight:900}


/* v1.04 handover field usability */
.handover-import-dialog{position:fixed;inset:0;width:100vw;height:100dvh;max-width:none;max-height:none;margin:0;border:0;border-radius:0;padding:calc(12px + env(safe-area-inset-top)) 12px calc(12px + env(safe-area-inset-bottom));display:none;overflow:hidden}
.handover-import-dialog[open]{display:flex;flex-direction:column}
.handover-import-dialog h2{flex:0 0 auto;margin:0 0 4px}
.handover-import-dialog>.hint{flex:0 0 auto;margin:0 0 8px;font-size:13px;line-height:1.4}
.handover-import-dialog .handover-camera{flex:1 1 auto;min-height:44dvh;max-height:none;aspect-ratio:auto;margin:0;border-radius:14px}
.handover-import-dialog .modal-actions{flex:0 0 auto;margin-top:8px;padding-bottom:env(safe-area-inset-bottom)}
.handover-import-dialog .handover-status,.handover-import-dialog .handover-summary{flex:0 0 auto;margin:7px 0 0}
.handover-scan-progress{flex:0 0 auto;margin-top:8px;padding:9px 10px;border-radius:10px;background:#111827;border:1px solid #334155}
.handover-progress-top{display:flex;align-items:center;gap:10px}
#handoverProgressBig{font-size:26px;line-height:1;color:#7dd3fc;font-variant-numeric:tabular-nums;white-space:nowrap}
#handoverProgressLabel{font-size:13px;font-weight:800;color:#e2e8f0}
.handover-progress-track{height:9px;margin-top:8px;background:#334155;border-radius:999px;overflow:hidden}
#handoverProgressBar{height:100%;width:0;background:#22c55e;transition:width .2s ease}
.handover-progress-pages{display:flex;gap:5px;flex-wrap:wrap;margin-top:7px}
.handover-progress-page{min-width:28px;padding:3px 6px;border-radius:999px;text-align:center;font-size:11px;font-weight:900;background:#334155;color:#94a3b8}
.handover-progress-page.done{background:#166534;color:#dcfce7}
.handover-read-flash{position:absolute;z-index:10;left:50%;top:50%;transform:translate(-50%,-50%) scale(.95);min-width:220px;padding:20px 18px;border-radius:18px;background:rgba(22,101,52,.96);border:2px solid #86efac;color:#fff;text-align:center;font-size:26px;font-weight:950;box-shadow:0 12px 40px rgba(0,0,0,.5);pointer-events:none}
.handover-read-flash.show{display:block!important;animation:handoverReadFlash .7s ease both}
@keyframes handoverReadFlash{0%{opacity:0;transform:translate(-50%,-50%) scale(.85)}18%,72%{opacity:1;transform:translate(-50%,-50%) scale(1)}100%{opacity:0;transform:translate(-50%,-50%) scale(1.04)}}
@media(max-width:430px){
  .handover-import-dialog>.hint{font-size:12px}
  .handover-import-dialog .handover-camera{min-height:48dvh}
  #handoverProgressBig{font-size:28px}
}


/* v1.04 handover scan performance/completion */
.handover-import-dialog.scan-complete{overflow-y:auto}
.handover-import-dialog.scan-complete .handover-camera{display:none}
.handover-import-dialog.scan-complete>.hint{display:none}
.handover-import-dialog.scan-complete .handover-scan-progress{margin-top:4px}
.handover-import-dialog.scan-complete .handover-status{font-size:16px;font-weight:900}


/* v1.04 about link */
.about-link{display:block;margin-top:12px;padding:12px;border:1px solid #334155;border-radius:10px;background:#111827;color:#bae6fd;text-align:center;text-decoration:none;font-size:15px;font-weight:900}
.about-link:active{transform:scale(.99)}
.handover-status{white-space:pre-line}


/* v1.04 transcription workflow */
.history-panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.history-stats{flex:0 0 auto;padding:5px 8px;border-radius:999px;background:#172033;border:1px solid #334155;color:#cbd5e1;font-size:11px;font-weight:900;white-space:nowrap}
.history-filter{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:9px}
.history-filter-btn{border:1px solid #475569;border-radius:9px;background:#1e293b;color:#cbd5e1;min-height:40px;padding:8px;font-weight:900}
.history-filter-btn.active{background:#0c4a6e;border-color:#38bdf8;color:#fff}
.history-card-actions{display:flex;align-items:center;gap:6px;flex:0 0 auto}
.transcribe-btn{border:1px solid #b45309;border-radius:9px;background:#78350f;color:#fde68a;padding:9px 10px;font-weight:950;white-space:nowrap}
.transcribe-btn.done{background:#166534;border-color:#22c55e;color:#dcfce7}
.transcribe-btn.waiting{background:#334155;border-color:#475569;color:#94a3b8;opacity:.78}
.history-card.transcribed{border-color:#166534;background:#0e1b19}
.transcribed-chip{background:#14532d!important;border-color:#22c55e!important;color:#dcfce7!important}
@media(max-width:430px){
  .history-panel-head{display:block}
  .history-stats{display:inline-block;margin-top:6px}
  .history-card-actions{flex-direction:column;align-items:stretch}
  .history-card-actions .editbtn,.history-card-actions .transcribe-btn{padding:8px 9px;font-size:12px}
}


/* v1.04 compact history header + iPhone scroll stability */
.history-panel-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.history-title-wrap{display:flex;align-items:center;gap:7px;min-width:0}
.history-title-wrap h2{margin:0!important;white-space:nowrap}
.history-stats{margin:0!important;font-size:10px;padding:4px 7px}
.history-filter{display:flex;gap:5px;margin:0;flex:0 0 auto}
.history-filter-btn{min-height:32px;padding:5px 9px;font-size:12px;border-radius:8px;white-space:nowrap}
.history-list{margin-top:8px}
@media(max-width:430px){
  .history-panel-head{display:flex;align-items:center}
  .history-title-wrap{gap:5px}
  .history-stats{font-size:9px;padding:3px 5px}
  .history-filter{display:flex;gap:4px;margin:0}
  .history-filter-btn{min-height:30px;padding:4px 7px;font-size:11px}
}
@media(max-width:360px){
  .history-stats{display:none}
  .history-filter-btn{padding:4px 6px;font-size:10px}
}


/* v1.05 compact monitoring and history */
.car.outpending{border-color:var(--cyan)}
.pitout.confirm-out{background:var(--yellow);color:#061018}
.runend-bottom:disabled{opacity:.45}
.carhead{margin-bottom:5px}
.actions{margin-top:6px;gap:5px}
.actions .act{min-height:43px;padding:7px 4px}
.compact-driver{margin-top:6px;padding:5px;background:transparent}
.compact-driver .driverrow select{min-height:44px}
.endcancel-row{margin-top:6px}
.predriver{margin-top:6px;padding:6px}
.prelabel{margin-bottom:4px}
.last{min-height:0;margin-top:5px}
.history-heading{display:flex;align-items:center;gap:8px}
.history-heading .history-duration{font-size:12px;color:#cbd5e1;font-variant-numeric:tabular-nums;white-space:nowrap}
.history-heading .editbtn{margin-left:auto;min-width:52px;min-height:32px;padding:5px 8px;font-size:13px}
.history-card .history-times{font-size:16px;line-height:1.3;white-space:nowrap;letter-spacing:-.03em;color:#f8fafc;margin-top:4px}
.history-bottom{display:flex;align-items:flex-end;justify-content:space-between;gap:6px;margin-top:5px}
.history-bottom .chips{flex:1 1 auto;min-width:0;margin-top:0}
.history-bottom .transcribe-btn{flex:0 0 auto;min-height:36px;padding:6px 8px;font-size:13px}
.offline-status{font-size:11px;font-weight:800;color:#fbbf24;white-space:nowrap}
.offline-status.ready{color:#86efac}
@media(max-width:360px){.history-card .history-times{font-size:14px}.history-heading .editbtn{min-width:48px}}

/* v1.05 field review */
.carhead>div:first-child{min-width:0;width:100%}
.carhead .pit-times{white-space:nowrap;font-size:clamp(10px,2.65vw,12px);letter-spacing:-.055em;font-variant-numeric:tabular-nums}
.compact-driver .driverrow,.predriverrow{grid-template-columns:repeat(2,minmax(0,1fr))}
.compact-driver .driverrow select.driver-required-error{border:2px solid var(--red);box-shadow:0 0 0 2px rgba(239,68,68,.35)}
.pitout:disabled{opacity:.58}
.history-heading .history-duration{font-size:16px}
.history-heading .transcribe-btn{margin-left:auto;flex:0 0 auto;min-height:32px;padding:5px 7px;font-size:13px}
.history-heading .editbtn{margin-left:0;flex:0 0 auto}
.history-heading .history-duration+.editbtn{margin-left:auto}
.history-heading .history-duration+.transcribe-btn{margin-left:auto}
.history-bottom .transcribed-chip{white-space:nowrap}
#editDialog .editgrid label,#editDialog .checks label,#editDialog .memo-label{font-size:16px}
#editDialog .editgrid input,#editDialog .editgrid select,#editDialog .memo-label textarea{font-size:17px;min-height:44px}
#editDialog .checks input{width:20px;height:20px;flex:0 0 auto}
#settings{height:calc(100dvh - 20px);max-height:calc(100dvh - 20px)}
@media(max-width:360px){.history-heading{gap:5px}.history-heading .history-duration{font-size:14px}.history-heading .transcribe-btn,.history-heading .editbtn{font-size:12px;padding:5px 6px}}

/* v1.05 record edit time controls: keep the existing type size and give each picker room. */
#editDialog .time-picker{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
#editDialog .time-picker select{min-width:0}
@media(max-width:600px){
  #editDialog .edit-time{grid-column:1/-1;min-width:0}
}
@media(max-width:359px){
  .history-heading{flex-wrap:wrap}
  .history-card .history-times{white-space:normal}
}


/* v1.10 approved additions: PIT first, person name and one-driver support. */
.monitor-actor{display:block;margin:12px 0;font-size:16px}.monitor-actor input{display:block;width:100%;margin-top:6px;padding:13px 11px;font:inherit;min-height:48px;background:#111827;color:#fff;border:1px solid var(--line);border-radius:8px}
#settings .vehicle-row{grid-template-columns:minmax(65px,.65fr) minmax(95px,1fr) auto;gap:8px}.pit-number{min-width:0}.vehicle-row label{min-width:0}.handover-selection{margin:8px 0}.handover-selection summary{padding:8px 0;cursor:pointer}#handoverChoose{display:grid;gap:6px}#handoverChoose label{display:flex;gap:8px;padding:8px;background:#172033;border-radius:9px}
#handoverAutoQr{margin:8px 0}#offlineStatus{font-size:11px;color:#94a3b8}#offlineStatus.ready{color:#86efac}

#handoverQrRaw{width:100%;font:inherit;background:#111827;color:#fff;border:1px solid var(--line);border-radius:8px;padding:8px}
