/* Driver app (driver.html) · phone first (360-430 px), fine on a tablet. Builds on apps/shared/app.css. */
/* Steady on a phone: no pull-to-refresh or rubber-band reload mid-route, no double-tap zoom delay, no grey tap flash,
   the page height follows the phone's address bar (dvh) and the keyboard (interactive-widget in driver.html). */
html:has(> body.drv) { overscroll-behavior-y: none; }
.drv { font-size: 16px; overscroll-behavior-y: none; min-height: 100vh; min-height: 100dvh; touch-action: manipulation; -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
.drv button, .drv a, .drv summary { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.drv #posCloudBtn { display: none; }   /* the counter's Cloud pill floats over the action bar; the sync strip below the title says the same thing */
.drv .ico { display: inline-flex; width: 1.2em; height: 1.2em; flex-shrink: 0; vertical-align: -0.22em; }
.drv .ico svg { width: 100%; height: 100%; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.drv-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.drv-noscroll { overflow: hidden; }

/* Top bar: keep it one line at 360 px */
.drv .sx-bar { padding: 8px 8px 8px 14px; padding-top: max(8px, env(safe-area-inset-top)); gap: 6px; }
.drv .sx-bar .sx-brand { font-size: 16px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 0 1 auto; }
.drv .sx-bar .sx-sandbox { padding: 2px 6px; font-size: 12px; flex-shrink: 0; }
@media (max-width: 420px) { .drv .sx-bar .sx-sandbox { display: none; } }   /* the test-build tag would push the menu button off a 375 px phone */
.drv .sx-bar .sx-spacer { flex: 1 1 0; min-width: 0; }
#drvRoot { overflow-x: clip; }   /* nothing inside may make the page slide sideways */
.drv .sx-bar .sx-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.drv .sx-bar .drv-bar-btn { width: 48px; height: 48px; padding: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }

.drv-main { max-width: 640px; padding-bottom: 40px; }
.drv-with-bar .drv-main { padding-bottom: calc(160px + env(safe-area-inset-bottom)); }
.drv-h1 { font-size: 26px; color: var(--navy); margin: 12px 0 8px; }
.drv-h1-date { display: block; font-family: var(--font); font-size: 14px; font-weight: 600; color: var(--text-muted); letter-spacing: 0; margin-top: 2px; }
.drv-h2 { font-size: 20px; color: var(--navy); margin-bottom: 8px; }
.drv-lead { margin-bottom: 14px; }
.drv-block { width: 100%; }
.drv-center { text-align: center; }
.drv-center-text { text-align: center; }
.drv-form { text-align: left; margin-top: 16px; }
.drv-hero-ico { display: inline-flex; width: 64px; height: 64px; border-radius: 50%; align-items: center; justify-content: center; background: var(--gold-pale); color: var(--navy); font-size: 28px; margin-bottom: 8px; }
.drv-center h1 { font-size: 28px; color: var(--navy); margin-bottom: 6px; }
.drv-err { color: var(--danger); font-weight: 600; font-size: 14px; min-height: 1px; }
.drv-err:empty { display: none; }
.drv-alt { margin-top: 12px; }
.drv-small { font-size: 14px; margin: 0; }
.drv-tip { margin: 16px 0 0; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2, #F1F5F9); font-size: 14px; text-align: left; }
.drv-hint { font-size: 14px; color: var(--text-muted); }
.drv-url { font-family: ui-monospace, Consolas, monospace; font-size: 14px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px; margin: 10px 0; word-break: break-all; color: var(--navy); user-select: all; }
.drv-link { background: none; border: 0; color: var(--navy); font-weight: 600; text-decoration: underline; padding: 8px 4px; min-height: 48px; font-size: inherit; }
.drv .sx-btn { min-height: 48px; font-size: 16px; }
.drv .sx-btn.big { min-height: 60px; font-size: 20px; }
.drv .sx-input { font-size: 16px; min-height: 48px; }
.drv-sm { min-height: 48px !important; padding: 6px 12px; font-size: 14px !important; }
.drv-code { font-family: ui-monospace, Consolas, monospace; font-size: 28px !important; letter-spacing: 0.18em; text-transform: uppercase; text-align: center; }
.drv-sandbox-box { margin-top: 16px; padding: 14px 16px; border: 2px dashed rgba(201,168,76,0.7); border-radius: var(--radius); background: var(--gold-pale); font-size: 14px; }
.drv-sandbox-box p { margin-bottom: 10px; }

/* Sign in */
.drv-names { list-style: none; display: grid; gap: 10px; }
.drv-name { width: 100%; display: flex; align-items: center; gap: 14px; min-height: 72px; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--white); color: var(--text); font-size: 20px; font-weight: 600; text-align: left; box-shadow: var(--shadow); }
.drv-name:active { background: var(--gold-pale); }
.drv-name-text { flex: 1; min-width: 0; }
.drv-name-text small { display: block; font-size: 14px; font-weight: 600; color: var(--text-muted); }
.drv-avatar { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 600; font-size: 16px; flex-shrink: 0; }
.drv-avatar.big { width: 72px; height: 72px; font-size: 28px; margin: 0 auto 8px; display: flex; }
.drv-pin-card { max-width: 380px; margin: 0 auto; }
.drv-pin-card h1 { font-size: 28px; color: var(--navy); }
.drv-pin-card .sx-pin h2 { font-size: 20px; color: var(--text-muted); font-family: var(--font); font-weight: 600; margin-top: 4px; }
.drv-pin-card .sx-pin-keys button { min-height: 68px; font-size: 28px; }
.drv-locked { text-align: center; padding: 20px 0; }
.drv-locked h2 { color: var(--danger); font-size: 20px; }
.drv-back { display: inline-flex; align-items: center; gap: 4px; min-height: 48px; padding: 8px 10px 8px 2px; background: none; border: 0; color: var(--navy); font-weight: 600; font-size: 16px; }

/* Status strip */
/* One line that never wraps, so a longer name or a new GPS state cannot push the route down. */
.drv-strip { display: flex; align-items: center; flex-wrap: nowrap; gap: 8px; padding: 6px 14px; min-height: 60px; background: var(--white); border-bottom: 1px solid var(--border); font-size: 14px; }
.drv-strip-name { font-weight: 600; color: var(--navy); display: inline-flex; align-items: center; gap: 6px; margin-right: auto; min-width: 0; }
.drv-strip-name > .ico { font-size: 18px; color: var(--text-muted); }
.drv-strip-name > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drv-strip .sx-chip { font-size: 14px; padding: 4px 10px; flex-shrink: 0; white-space: nowrap; }
.drv-strip .sx-btn { flex-shrink: 0; white-space: nowrap; }
.drv-strip #drvGeo { display: inline-flex; flex-shrink: 0; }
.drv-geo-chip { border: 0; width: 44px; min-height: 48px; padding: 0 !important; justify-content: center; cursor: pointer; border-radius: 50%; }
.drv-geo-chip .ico { font-size: 22px; }
@media (max-width: 420px) {
  .drv-strip { gap: 6px; padding-inline: 12px; }
  .drv-strip-name > .ico { display: none; }   /* the name gets the room: a 375 px phone cut "Dee Alvarez" to "Dee Alv…" */
  .drv-strip .sx-chip { padding: 4px 8px; }
}
.drv .sx-bar .sx-lang { flex-shrink: 0; min-width: 44px; min-height: 48px; padding: 8px 10px; font-size: 14px; }
.drv-notice > span:not(.ico) { flex: 1 1 0; min-width: 0; }
.drv-notice { display: flex; gap: 8px; align-items: flex-start; flex-wrap: nowrap; background: rgba(180,83,9,0.10); color: #7a3d06; border-radius: var(--radius-sm); padding: 10px 12px; font-size: 14px; margin: 10px 0; }
.drv-strip + .drv-notice { margin: 8px 14px 0; }
.drv-notice.soft { background: rgba(10,10,10,0.06); color: var(--text-muted); }
.drv-notice .drv-link { padding: 0 8px; min-height: 48px; display: inline-flex; align-items: center; color: inherit; }
.drv-notice[hidden] { display: none; }

/* Date switcher */
.drv-dates { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; background: rgba(10,10,10,0.08); border-radius: 12px; padding: 4px; margin-top: 12px; }
.drv-dates button { min-height: 48px; border: 0; border-radius: 9px; background: none; color: var(--navy); font-weight: 600; font-size: 14px; }
.drv-dates button[aria-pressed="true"] { background: var(--white); box-shadow: 0 1px 4px rgba(10,10,10,0.18); }

/* Progress */
.drv-progress { margin: 4px 0 12px; }
.drv-progress-track { height: 10px; border-radius: 5px; background: var(--surface-3); overflow: hidden; }
.drv-progress-track span { display: block; height: 100%; width: 100%; background: var(--ok); border-radius: 5px; transform-origin: left; transition: transform .3s; will-change: transform; }
.drv-progress p { margin-top: 6px; font-size: 16px; }

/* Stop cards */
.drv-stops { list-style: none; display: grid; gap: 10px; }
.drv-stop { width: 100%; display: flex; align-items: flex-start; gap: 12px; padding: 14px 10px 14px 12px; border-radius: var(--radius); border: 1px solid var(--border); border-left: 4px solid var(--line-strong); background: var(--white); color: var(--text); text-align: left; box-shadow: var(--shadow); font-size: 16px; }
.drv-stop.warn { border-left-color: var(--warn); }
.drv-stop.ok { border-left-color: var(--ok); }
.drv-stop.bad { border-left-color: var(--danger); }
.drv-stop:active { background: var(--gold-pale); }
.drv-stop > .ico { align-self: center; color: var(--text-muted); font-size: 20px; }
.drv-seq { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 600; font-size: 20px; flex-shrink: 0; }
.drv-seq.ok { background: var(--ok); }
.drv-seq.bad { background: var(--danger); }
.drv-seq.warn { background: var(--gold); color: var(--on-ink); }
.drv-seq.big { width: 52px; height: 52px; font-size: 28px; }
.drv-stop-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.drv-stop-name { font-weight: 600; font-size: 20px; color: var(--navy); }
.drv-stop-addr { color: var(--text); overflow-wrap: anywhere; }
.drv-stop-meta { font-size: 14px; color: var(--text-muted); display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; }
.drv-stop-note { font-size: 14px; color: var(--text-muted); font-style: italic; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.drv-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0; }
.drv-chips .sx-chip { font-size: 14px; padding: 3px 10px; }
.drv-type-pickup { background: rgba(201,168,76,0.22) !important; color: var(--gold-ink) !important; }
.drv-alldone { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; border-color: rgba(22,163,74,0.35); background: rgba(22,163,74,0.06); }
.drv-alldone > .ico { font-size: 28px; color: var(--ok); }
.drv-alldone h2 { font-size: 20px; margin-bottom: 2px; }
.drv-summary-btn { margin-top: 16px; }
.drv-due { color: var(--navy); }
.drv-unpaid { color: var(--danger); }
.drv-h2-sm { font-size: 16px; margin: 14px 2px 8px; }

/* Up next: the next open stop, pinned above the rest */
.drv-next { background: var(--white); border: 2px solid var(--gold); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px 10px 12px; margin-bottom: 4px; }
.drv-next-tag { font-family: var(--font); font-size: 20px; font-weight: 600; color: var(--navy); margin: 0 4px 6px; }
.drv-next .drv-next-main { box-shadow: none; border: 0; padding: 6px 4px; }
.drv-next .drv-next-main:active { background: none; }
.drv-next .drv-stop-name { font-size: 20px; }
.drv-next-actions { display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; margin-top: 8px; }
.drv-next-actions a.sx-btn { text-decoration: none; }

/* Finished stops: collapsed, small rows */
.drv-done { margin-top: 14px; }
.drv-done summary { min-height: 48px; display: flex; align-items: center; font-weight: 600; color: var(--text-muted); cursor: pointer; padding: 0 4px; }
.drv-done .drv-stops { gap: 6px; }
.drv-stop-done { padding: 8px 10px 8px 10px; align-items: center; opacity: 1; box-shadow: none; background: var(--bg); }
.drv-stop-done .drv-seq { width: 32px; height: 32px; font-size: 14px; }
.drv-stop-done .drv-stop-name { font-size: 16px; }

/* Stop detail */
.drv-detail-head { display: flex; gap: 12px; align-items: flex-start; }
.drv-detail h1 { font-size: 28px; color: var(--navy); overflow-wrap: anywhere; }
.drv-detail-addr { font-size: 20px; margin-top: 2px; overflow-wrap: anywhere; }
.drv-detail .drv-chips { margin: 10px 0 4px; }
.drv-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; margin-top: 10px; }
.drv-facts dt { font-size: 14px; color: var(--text-muted); font-weight: 600; }
.drv-facts dd { font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.drv-note-box { margin-top: 12px; padding: 10px 12px; background: var(--gold-pale); border-radius: var(--radius-sm); }
.drv-items { margin-top: 12px; }
.drv-items summary { min-height: 48px; display: flex; align-items: center; font-weight: 600; color: var(--navy); cursor: pointer; }
.drv-items ul { padding-left: 20px; font-size: 14px; }
.drv-quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0 4px; }
.drv-quick-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 76px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--white); color: var(--navy); font-weight: 600; font-size: 14px; text-decoration: none; box-shadow: var(--shadow); }
.drv-quick-btn .ico { font-size: 28px; }
.drv-quick-btn:active { background: var(--gold-pale); }
.drv-quick-btn:disabled { opacity: 0.45; box-shadow: none; cursor: not-allowed; }
.drv-navpref { font-size: 14px; color: var(--text-muted); text-align: center; margin-bottom: 12px; }
.drv-hist { list-style: none; display: grid; gap: 10px; font-size: 14px; }
.drv-hist li { display: flex; gap: 12px; }
.drv-hist-time { min-width: 68px; color: var(--text-muted); font-variant-numeric: tabular-nums; font-weight: 600; }
.drv-main > .sx-card + .sx-card, .drv-main > .sx-card + .drv-quick { margin-top: 12px; }
.drv-main > .drv-quick + .drv-navpref + .sx-card { margin-top: 4px; }

/* Bottom action bar */
/* The side actions share one row (two or three of them); the main action is always its own full-width row at the bottom, so the bar is the same shape on every stop. */
.drv-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 10px calc(10px + env(safe-area-inset-bottom)); background: var(--white); border-top: 1px solid var(--border); box-shadow: 0 -4px 18px rgba(10,10,10,0.10); }
.drv-bar > * { flex: 1 1 0; min-width: 0; }
.drv-bar > :last-child { flex: 1 1 100%; }
.drv-bar .sx-btn { min-height: 52px; padding: 6px 4px; font-size: 14px; flex-direction: column; gap: 2px; line-height: 1.15; }
.drv-bar .sx-btn .ico { font-size: 16px; }
.drv-bar .sx-btn.primary { min-height: 60px; flex-direction: row; gap: 8px; font-size: 20px; }
.drv-bar .sx-btn.primary .ico { font-size: 22px; }
.drv-bar .drv-btn-fail { background: transparent; color: var(--text-muted); border: 1px solid var(--border); font-weight: 600; }
.drv-arrived-chip { display: flex; align-items: center; justify-content: center; text-align: center; gap: 4px; min-height: 52px; padding: 4px 6px; border-radius: var(--radius-sm); background: var(--ok-bg); color: var(--ok-fg); border: 1px solid var(--ok-line); font-weight: 600; font-size: 14px; line-height: 1.15; }
.drv-bar-msg { grid-column: 1 / -1; text-align: center; font-weight: 600; color: var(--text-muted); padding: 10px 0; display: flex; justify-content: center; align-items: center; gap: 6px; }
.drv-bar-msg.ok { color: var(--ok); }
@media (min-width: 641px) { .drv-bar { max-width: 640px; margin: 0 auto; border-radius: var(--radius) var(--radius) 0 0; border: 1px solid var(--border); } }

/* Bottom sheets */
#drvSheet[hidden] { display: none; }
.drv-sheet-backdrop { position: fixed; inset: 0; background: rgba(17,30,74,0.45); z-index: 100; }
.drv-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 101; max-height: 92vh; max-height: 92dvh; display: flex; flex-direction: column; background: var(--white); border-radius: 18px 18px 0 0; box-shadow: 0 -8px 32px rgba(17,30,74,0.25); animation: drv-up .2s ease-out; }
@media (min-width: 641px) { .drv-sheet { max-width: 560px; margin: 0 auto; } }
@keyframes drv-up { from { transform: translateY(24px); opacity: 0.6; } to { transform: none; opacity: 1; } }
.drv-sheet-head { display: flex; align-items: flex-start; gap: 8px; padding: 16px 12px 10px 18px; border-bottom: 1px solid var(--border); }
.drv-sheet-head > div { flex: 1; min-width: 0; }
.drv-sheet-head h2 { font-size: 28px; color: var(--navy); }
.drv-sheet-head p { color: var(--text-muted); font-size: 14px; overflow-wrap: anywhere; }
.drv-x { width: 48px; height: 48px; border: 0; border-radius: 50%; background: var(--bg); color: var(--navy); font-size: 20px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.drv-sheet-body { padding: 14px 18px; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; flex: 1; min-height: 0; }
.drv-sheet-foot { padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); }
.drv-sheet-foot.drv-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 10px; }
.drv-sheet-foot.drv-two .sx-btn.big { font-size: 18px; padding-inline: 10px; }
.drv-sheet-backdrop { touch-action: none; }
.drv-menu { display: grid; gap: 6px; }
.drv-menu-row { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--white); color: var(--navy); font-weight: 600; font-size: 16px; text-decoration: none; text-align: left; width: 100%; }
.drv-menu-row:active { background: var(--gold-pale); }
.drv-menu-row .sx-chip { margin-left: auto; }
.drv-menu-end { margin-top: 14px; border-color: rgba(220,38,38,0.35); color: var(--danger); }
.drv-help h3 { font-size: 20px; color: var(--navy); margin: 14px 0 4px; }
.drv-help h3:first-child { margin-top: 0; }
.drv-help p { font-size: 16px; margin-bottom: 6px; }

/* Proof form */
.drv-sec h3 { font-size: 20px; color: var(--navy); margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.drv-req { font-family: var(--font); font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 20px; background: rgba(10,10,10,0.08); color: var(--text-muted); letter-spacing: 0; }
.drv-req.on { background: rgba(220,38,38,0.12); color: #b91c1c; }
.drv-req.one { background: var(--gold-pale); color: var(--navy); }
.drv-hint-proof { font-size: 14px; color: var(--navy); font-weight: 600; }
.drv-warn { display: flex; gap: 8px; align-items: flex-start; background: rgba(180,83,9,0.10); color: #7a3d06; border-radius: var(--radius-sm); padding: 10px 12px; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.drv-warn[hidden] { display: none; }
.drv-file { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); }
.drv-photo-box:empty { display: none; }
.drv-photo-box { margin-bottom: 8px; }
.drv-photo-box img { display: block; width: 100%; max-height: 240px; object-fit: contain; background: var(--bg); border-radius: var(--radius-sm); border: 1px solid var(--border); }
.drv-photo-meta { display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: var(--text-muted); }
.drv-sig-wrap { position: relative; margin-bottom: 8px; }
.drv-sig-wrap canvas { display: block; width: 100%; height: 170px; border: 2px dashed rgba(10,10,10,0.3); border-radius: var(--radius-sm); background: #fff; touch-action: none; cursor: crosshair; }
.drv-sig-hint { position: absolute; left: 0; right: 0; bottom: 18px; text-align: center; color: rgba(10,10,10,0.35); font-weight: 600; pointer-events: none; }
.drv-sig-hint[hidden] { display: none; }
.drv-check { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-weight: 600; cursor: pointer; }
.drv-check input { width: 26px; height: 26px; accent-color: var(--navy); flex-shrink: 0; }
.drv-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 8px; }
.drv-seg label { position: relative; }
.drv-seg input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.drv-seg span { display: flex; align-items: center; justify-content: center; min-height: 48px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-weight: 600; color: var(--navy); background: var(--white); }
.drv-seg input:checked + span { background: var(--navy); color: #fff; border-color: var(--navy); }
.drv-seg input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.drv-seg + .sx-field[hidden] { display: none; }
.drv-money { font-size: 20px !important; font-variant-numeric: tabular-nums; }
.drv-stepper { display: flex; align-items: center; gap: 16px; }
.drv-stepper .sx-btn { width: 60px; height: 60px; font-size: 28px; padding: 0; }
.drv-stepper output { font-family: var(--font); font-size: 36px; font-weight: 600; color: var(--navy); min-width: 48px; text-align: center; }
.drv-reasons { border: 0; display: grid; gap: 6px; }
.drv-reasons legend { font-weight: 600; color: var(--navy); font-size: 16px; margin-bottom: 6px; }
.drv-reason { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-weight: 600; font-size: 16px; cursor: pointer; }
.drv-reason input { width: 24px; height: 24px; accent-color: var(--danger); flex-shrink: 0; }
.drv-reason:has(input:checked) { border-color: var(--danger); background: rgba(220,38,38,0.05); }

/* Summary */
.drv-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 8px 0 12px; }
.drv-stats .sx-card { padding: 12px 14px; }
.drv-main > .drv-stats + .sx-card { margin-top: 0; }
.drv-main > .sx-card + .sx-btn { margin-top: 16px; }

/* "Saved on this phone" tick */
.drv-saved { position: fixed; left: 50%; top: calc(72px + env(safe-area-inset-top)); transform: translate(-50%, -8px); z-index: 200; display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 22px; background: var(--ok); color: #fff; font-weight: 600; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; box-shadow: var(--shadow); white-space: nowrap; }
.drv-saved.show { opacity: 1; transform: translate(-50%, 0); }
.drv-with-bar .pos-toast { bottom: calc(96px + env(safe-area-inset-bottom)); }

@media (max-width: 480px) {
  .drv-bar .sx-btn { font-size: 14px; }
  .drv-quick-btn { min-height: 68px; }
  .drv-detail h1 { font-size: 24px; }
  .drv-detail-addr { font-size: 18px; }
  .drv-facts { gap: 8px 12px; }
}
@media (max-width: 340px) {
  .drv-facts { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .drv-sheet { animation: none; }
  .drv-saved, .drv-progress-track span { transition: none; }
}

/* Route in one tap, on-my-way text, reschedule, close-out */
.drv-omw, .drv-route-btn { margin-top: 8px; text-decoration: none; }
.drv-route-btn { margin: 10px 0 4px; }
.drv-check[hidden], .drv-resched [hidden] { display: none; }
.drv-resched .sx-input { min-height: 52px; font-size: 16px; }
.drv-closed { display: flex; gap: 10px; align-items: center; margin: 12px 0 0; padding: 12px; border: 1px solid rgba(22,163,74,0.35); background: rgba(22,163,74,0.06); border-radius: var(--radius-sm); color: var(--navy); font-weight: 600; }
.drv-closed > .ico { color: var(--ok); font-size: 20px; }
.drv-hint + .drv-block { margin-top: 12px; }

/* Route map */
.drv-viewtoggle { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; background: rgba(10,10,10,0.08); border-radius: 12px; padding: 4px; margin: 4px 0 12px; }
.drv-viewtoggle button { min-height: 48px; border: 0; border-radius: 9px; background: none; color: var(--navy); font-weight: 600; font-size: 14px; }
.drv-viewtoggle button[aria-pressed="true"] { background: var(--white); box-shadow: 0 1px 4px rgba(10,10,10,0.18); }
.drv-ordernote { margin: -4px 0 10px; }
.drv-ordernote .drv-link { padding: 0 6px; min-height: 48px; }
.drv-donext { margin: 2px 0 0 52px; min-height: 40px; padding: 4px 6px; font-size: 14px; }
.drv-mapblock { margin-bottom: 12px; }
.drv-mapwrap { position: relative; isolation: isolate; overflow: hidden; max-width: 100%; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); background: var(--bg); }
.drv-map { width: 100%; height: 50vh; height: 50svh; min-height: 280px; max-height: 560px; font-family: inherit; }
.drv-map.leaflet-container { font-family: inherit; }
.drv-map .leaflet-top { top: 4px; }
.drv-map .leaflet-control-zoom a { width: 40px; height: 40px; line-height: 40px; color: var(--navy); }
.drv-map .leaflet-control-attribution { font-size: 12px; max-width: 70%; }
.drv-mapcard { position: absolute; left: 8px; right: 8px; bottom: 22px; z-index: 1100; max-height: 75%; overflow-y: auto; background: var(--white); border: 2px solid var(--gold); border-radius: var(--radius); box-shadow: 0 6px 22px rgba(17,30,74,0.3); padding: 10px 10px 12px; }
.drv-mapcard[hidden] { display: none; }
.drv-mapcard-head { display: flex; align-items: flex-start; gap: 10px; }
.drv-mapcard-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.drv-mapcard-title strong { font-size: 20px; color: var(--navy); overflow-wrap: anywhere; }
.drv-mapcard-title span { font-size: 14px; overflow-wrap: anywhere; }
.drv-mapcard-x { flex-shrink: 0; width: 44px; height: 44px; margin: -6px -4px 0 0; border: 0; background: none; color: var(--navy); font-size: 20px; display: inline-flex; align-items: center; justify-content: center; }
.drv-mapcard .drv-chips { margin: 6px 0 2px; }
.drv-mapcard-acts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.drv-mapcard-acts .sx-btn { width: 100%; text-decoration: none; justify-content: center; }
.drv-mapcard-acts .drv-donext-btn { grid-column: 1 / -1; border-color: var(--gold); color: var(--navy); background: var(--gold-pale); }
.drv-demonote { margin: 6px 2px 0; text-align: center; }
.drv-nomap { margin-top: 10px; }
.drv-nomap-list { list-style: none; display: grid; gap: 6px; margin-top: 6px; }
.drv-nomap-btn { width: 100%; min-height: 48px; text-align: left; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--white); color: var(--navy); font-size: 16px; font-weight: 600; display: flex; flex-direction: column; }
.drv-nomap-btn span { font-weight: 400; color: var(--text-muted); font-size: 14px; overflow-wrap: anywhere; }

/* Pickup: piece count, item photos (round 5, P5) */
.drv-stepper .drv-count { width: 96px; height: 60px; text-align: center; font-size: var(--t-28); font-weight: var(--w-semibold); padding: 0 4px; }
.drv-photo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2); margin-bottom: var(--s-2); }
.drv-photo-grid:empty { display: none; }
.drv-photo-grid > p { grid-column: 1 / -1; margin: 0; }
.drv-thumb { position: relative; margin: 0; aspect-ratio: 4 / 3; border-radius: var(--r-control); overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.drv-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.drv-thumb-x { position: absolute; top: 6px; right: 6px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--ink); color: var(--on-ink); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.drv-thumb-x .ico { width: 16px; height: 16px; }

/* Round 7, 3.1 / 3.5: what is waiting to send, and larger text for gloves and bright sun. */
.drv-sync { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin: 8px 14px 0; padding: 8px 12px; border-radius: var(--radius-sm); font-weight: 600; font-size: 15px; min-height: 48px; }
.drv-sync.ok { background: var(--ok-bg); color: var(--ok-fg); justify-content: flex-start; gap: 8px; min-height: 36px; padding-block: 6px; font-size: 14px; }
.drv-sync:empty { display: none; }
.drv-sync.warn { background: var(--warn-bg); color: var(--warn-fg); }
.drv-sync-text { display: inline-flex; align-items: center; gap: 6px; }
.drv-sync-low { flex-basis: 100%; font-weight: 500; font-size: 14px; }
.drv-sync-btn { min-height: 48px; }
.drv-bigtext #drvRoot { zoom: 1.2; }
.drv-charge { margin-top: 12px; }
.drv-charge-msg { margin: 0 0 10px; font-weight: 600; color: var(--danger); }
.drv-charge-msg.ok { color: var(--ok, #0f7b5f); }
