/* ComeGetMe — teal ride-share look (cache-busted via ?v=filemtime) */
:root {
  --bg: #f5f9f9;
  --mint: #e6efef;
  --surface: #ffffff;
  --surface-2: #eef4f4;
  --text: #1e2a32;
  --muted: #1e2a32;
  --line: #cfdcdc;
  --teal: #2a827f;
  --teal-hover: #236e6b;
  --teal-ink: #1f6f6c;
  --teal-soft: #d7efee;
  --navy: #3f4d7b;
  --navy-soft: #e4e8f3;
  --star: #f3b61f;
  --ok: #22805f;
  --ok-soft: #e0f4ec;
  --warn: #8a5d05;
  --warn-soft: #fff3da;
  --bad: #c53a2e;
  --bad-soft: #fde4e1;
  --driver: #2a827f;
  --rider: #3f4d7b;
  --sheet-r: 28px;
  --card-r: 20px;
  --pill-r: 999px;
  --shadow: 0 10px 30px rgba(30, 42, 50, 0.08);
  --sheet-shadow: 0 -12px 40px rgba(30, 42, 50, 0.12);
  --topbar-h: 60px;
  --nav-h: 66px;
  --track: 0.04em;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0f1a1c;
  --mint: #15262a;
  --surface: #16262a;
  --surface-2: #1f3236;
  --text: #e9f1f1;
  --muted: #e9f1f1;
  --line: #334a4f;
  --teal: #6dd3d1;
  --teal-hover: #82dedc;
  --teal-ink: #8be0dd;
  --teal-soft: #1b3d3d;
  --navy: #8a9bd1;
  --navy-soft: #253050;
  --ok: #4fc897;
  --ok-soft: #173a2d;
  --warn: #f0b64a;
  --warn-soft: #3b2f12;
  --bad: #ff6f63;
  --bad-soft: #3f1f1c;
  --driver: #6dd3d1;
  --rider: #8a9bd1;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  --sheet-shadow: 0 -12px 40px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
  min-height: 100dvh; -webkit-font-smoothing: antialiased;
}
a { color: var(--teal-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0 0 .35rem; line-height: 1.2; font-weight: 400; letter-spacing: -0.005em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .75rem; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88em; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.sub { color: var(--muted); letter-spacing: var(--track); font-weight: 400; }
.center { text-align: center; }
.right { display: flex; justify-content: flex-end; margin-top: .75rem; }
.wrap { max-width: 720px; margin: 0 auto; padding: 0 20px; width: 100%; }
button { font: inherit; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50; height: var(--topbar-h);
  background: linear-gradient(to bottom, var(--bg) 0%, color-mix(in srgb, var(--bg) 82%, transparent) 100%);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.topbar .wrap { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 100%; gap: 8px; }
.topbar-left { display: flex; align-items: center; justify-self: start; }
.topbar-title { justify-self: center; font-size: 1.05rem; font-weight: 400; letter-spacing: 0.06em; color: var(--text); margin: 0; white-space: nowrap; }
.topbar-right { display: flex; align-items: center; gap: 2px; justify-self: end; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none !important; font-weight: 500; }
.logo { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-weight: 700; font-size: 1.1rem; letter-spacing: -0.01em; }
.logo img { display: block; width: 28px; height: 28px; }
.logo span { color: var(--text); }
.hero-body .logo img { width: 44px; height: 44px; }
.auth-card .logo img { width: 36px; height: 36px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%;
  border: 0; background: transparent; color: var(--text); cursor: pointer; text-decoration: none !important;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg { stroke-width: 1.6; }
.theme-toggle .i-sun { display: none; }
[data-theme="dark"] .theme-toggle .i-sun { display: block; }
[data-theme="dark"] .theme-toggle .i-moon { display: none; }

/* Dashboard navigation: inline on wide screens, bottom tabs on phones */
.dash-nav { display: flex; gap: 2px; justify-self: center; }
.dash-nav a {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: var(--pill-r);
  color: var(--muted); font-size: .9rem; letter-spacing: 0.03em; text-decoration: none !important;
}
.dash-nav a svg { stroke-width: 1.5; }
.dash-nav a:hover { color: var(--text); background: var(--surface-2); }
.dash-nav a.active { color: var(--teal-ink); }
.topbar.has-nav .wrap { grid-template-columns: 1fr auto 1fr; }
@media (max-width: 680px) {
  .dash-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding: 8px 10px env(safe-area-inset-bottom);
    background: var(--surface); border-top: 1px solid var(--line); justify-content: space-around;
  }
  .dash-nav a { flex-direction: column; gap: 3px; font-size: .68rem; padding: 4px 8px; flex: 1; }
  .dash-nav a svg { width: 24px; height: 24px; }
  .dash-nav a.active { background: transparent; }
  .page-dash .dash-main { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 24px); }
  .topbar.has-nav .wrap { grid-template-columns: 1fr auto 1fr; }
  .topbar.has-nav .topbar-title { display: block; }
}
@media (min-width: 681px) { .topbar.has-nav .topbar-title { display: none; } }

/* ---------- Page scaffolding ---------- */
.dash-main { padding-top: 12px; padding-bottom: 40px; }
.section { margin-bottom: 30px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; gap: 12px; }
.section-head h2 { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 1.2rem; }
.count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: var(--pill-r); background: var(--teal-soft); color: var(--teal-ink); font-size: .75rem; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.card { background: var(--surface); border-radius: var(--card-r); padding: 18px; box-shadow: var(--shadow); }
.card + .card { margin-top: 12px; }
.card.empty { text-align: center; color: var(--muted); padding: 30px 18px; font-weight: 400; letter-spacing: var(--track); }
.card.empty p { margin-bottom: .75rem; }
.card.empty p:last-child { margin: 0; }
.card-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.card-row > div:first-of-type { min-width: 0; flex: 1; }
.list { padding: 0; overflow: hidden; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; color: var(--text); text-decoration: none !important; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.list-row:hover { background: var(--surface-2); }
.note { margin: 8px 0 0; font-style: italic; background: var(--surface-2); border-radius: 14px; padding: 8px 12px; color: var(--text); }
.link-card.inactive { opacity: .55; }
.link-url { display: block; margin: 10px 0; padding: 10px 12px; background: var(--surface-2); border-radius: 14px; word-break: break-all; font-size: .85rem; color: var(--muted); }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--teal); animation: pulse 2.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--teal) 45%, transparent); } 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 10px 18px; margin: 0; }
.facts dt { color: var(--muted); font-size: .85rem; letter-spacing: var(--track); font-weight: 400; }
.facts dd { margin: 0; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; padding: 4px 11px; border-radius: var(--pill-r); font-size: .72rem; letter-spacing: 0.06em; text-transform: uppercase; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.badge-ok { background: var(--teal-soft); color: var(--teal-ink); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-bad { background: var(--bad-soft); color: var(--bad); }
.badge-muted { background: var(--surface-2); color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 24px; border-radius: var(--pill-r); border: 1px solid transparent;
  font-size: .82rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; cursor: pointer;
  text-decoration: none !important; transition: background .15s, transform .05s, color .15s; -webkit-tap-highlight-color: transparent; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary, .btn-pill { background: var(--teal); color: #fff; }
.btn-primary:hover, .btn-pill:hover { background: var(--teal-hover); }
[data-theme="dark"] .btn-primary, [data-theme="dark"] .btn-pill { color: #0f1a1c; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-secondary { background: var(--surface-2); color: var(--text); }
.btn-secondary:hover { background: var(--line); }
.btn-success { background: var(--navy); color: #fff; }
.btn-ghost { background: transparent; color: var(--muted); min-height: 40px; padding: 8px 14px; }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-ghost.danger { color: var(--bad); }
.btn-danger-outline { background: transparent; color: var(--bad); border-color: var(--bad); }
.btn-danger-outline:hover { background: var(--bad-soft); }
.btn-lg { min-height: 54px; padding: 14px 30px; font-size: .88rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: default; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; align-items: center; }
.btn-row.compact { margin-top: 8px; }
.btn-row form { margin: 0; }
.btn-row .btn-ghost { text-transform: none; letter-spacing: 0; font-size: .9rem; }
.btn-row .btn-ghost.danger { margin-left: auto; }

/* ---------- Forms ---------- */
.form-card label, .auth-card label { display: block; font-size: .8rem; letter-spacing: var(--track); color: var(--muted); margin-bottom: 14px; }
.form-card label input, .form-card label select, .auth-card label input, .form-card textarea {
  display: block; width: 100%; margin-top: 6px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--text); font: inherit; font-size: 1rem;
}
label.check { display: flex; align-items: flex-start; gap: 10px; color: var(--text); font-size: .9rem; letter-spacing: 0; }
label.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--teal); flex: none; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 520px) { .grid-2 { grid-template-columns: 1fr; } }
.form-card h3 { margin-bottom: 14px; }
.form-card .btn, .auth-card .btn { width: 100%; }

/* ---------- Flash / banners ---------- */
.flash { padding: 12px 16px; border-radius: 16px; margin-bottom: 14px; font-size: .92rem; }
.flash-ok { background: var(--teal-soft); color: var(--teal-ink); }
.flash-bad { background: var(--bad-soft); color: var(--bad); }
.banner { padding: 12px 18px; font-size: .92rem; line-height: 1.4; letter-spacing: 0.01em; }
.banner-near { background: var(--bad); color: #fff; animation: flashIn .4s ease; }
.banner-warn { background: var(--warn-soft); color: var(--warn); }
.banner-info { background: var(--navy-soft); color: var(--navy); }
[data-theme="dark"] .banner-info { color: var(--text); }
@keyframes flashIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- Auth / hero ---------- */
.auth, .hero { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 20px 48px; min-height: 100dvh; position: relative; }
.auth-top, .hero-top { position: absolute; top: 10px; right: 12px; }
.auth-card { width: 100%; max-width: 400px; padding: 30px 26px; }
.auth-card .logo { margin-bottom: 16px; }
.auth-card h1 { font-size: 1.4rem; }
.auth-card .muted { font-weight: 400; }
.auth-card .btn { margin-top: 6px; }
.hero-body { text-align: center; max-width: 480px; }
.hero-body .logo { font-size: 1.5rem; justify-content: center; margin-bottom: 20px; }
.hero-body h1 { font-size: 2rem; margin-bottom: 12px; }
.hero-body p { color: var(--muted); font-size: 1.05rem; font-weight: 400; letter-spacing: var(--track); margin-bottom: 26px; }

/* ---------- Maps ---------- */
.map { width: 100%; height: 300px; background: var(--mint); border-radius: var(--card-r); overflow: hidden; z-index: 0; }
.map-card { padding: 0; overflow: hidden; }
.map-card .map { border-radius: var(--card-r) var(--card-r) 0 0; }
.map-meta { display: flex; gap: 18px; padding: 12px 18px; font-size: .82rem; color: var(--muted); flex-wrap: wrap; letter-spacing: var(--track); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; margin-right: 4px; }
.dot-driver { background: var(--driver); }
.dot-rider { background: var(--rider); }
.leaflet-container { font: inherit; background: var(--mint); }
.leaflet-layer { filter: saturate(.08) brightness(1.04) sepia(.18) hue-rotate(125deg) contrast(.92); }
[data-theme="dark"] .leaflet-layer { filter: invert(1) hue-rotate(180deg) saturate(.2) brightness(.78) contrast(.85) sepia(.25) hue-rotate(125deg); }
.leaflet-control-zoom { border: 0 !important; box-shadow: var(--shadow) !important; border-radius: 14px !important; overflow: hidden; }
.leaflet-control-zoom a, .leaflet-control-attribution { background: var(--surface) !important; color: var(--text) !important; border-color: var(--line) !important; }
.leaflet-control-attribution { font-size: .62rem !important; border-radius: 10px 0 0 0; }
.leaflet-control-attribution a { color: var(--teal-ink) !important; }
.leaflet-bar a { border-bottom-color: var(--line) !important; }
.mk-wrap { background: transparent; border: 0; }
.mk { width: 22px; height: 22px; border-radius: 50%; border: 4px solid var(--driver); background: var(--surface); box-shadow: 0 2px 8px rgba(0,0,0,.18); position: relative; }
.mk-driver::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--driver); animation: ring 1.8s ease-out infinite; }
.mk-rider { border-color: var(--rider); background: var(--rider); }
.mk-rider::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--rider); animation: ring 2.4s ease-out infinite; }
.mk-stale { filter: grayscale(.7); opacity: .75; }
.mk-stale::after { animation: none; }
@keyframes ring { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(2.4); opacity: 0; } }
.mk-photo { width: 44px; height: 44px; overflow: hidden; border-width: 3px; }
.mk-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.mk-photo::after { inset: -3px; }

/* ---------- Map-and-sheet screens (rider + drive) ---------- */
.page-rider, .page-drive { height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.page-rider .topbar, .page-drive .topbar { flex: none; position: relative; }
.screen { flex: 1; position: relative; display: flex; flex-direction: column; min-height: 0; }
.map-bg { position: absolute; inset: 0; height: auto; border-radius: 0; z-index: 0; }
.screen-banners { position: absolute; left: 0; right: 0; top: 0; z-index: 3; display: flex; flex-direction: column; }
.screen-banners .banner { margin: 10px 16px 0; border-radius: 16px; box-shadow: var(--shadow); }
.sheet {
  position: relative; z-index: 2; margin-top: auto; max-height: 72%; overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface); border-radius: var(--sheet-r) var(--sheet-r) 0 0; box-shadow: var(--sheet-shadow);
  padding: 10px 22px calc(18px + env(safe-area-inset-bottom));
}
.sheet-grip { width: 44px; height: 4px; border-radius: 2px; background: var(--line); margin: 2px auto 16px; }
.sheet { will-change: transform; touch-action: pan-y; }
.sheet-head { touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; margin: 0 -22px; padding: 0 22px 4px; }
.sheet-head:active { cursor: grabbing; }
.sheet.collapsed { overflow: hidden; }
.sheet.collapsed .sheet-head .sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet h2 { font-size: 1.45rem; margin-bottom: 2px; }
.sheet .sub { margin-bottom: 14px; font-size: .95rem; }
.status-icon { display: none; }
.status-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.status-actions:empty { display: none; }
.status-actions .btn { width: 100%; min-height: 52px; }
.status-actions .btn-ghost { min-height: 40px; }
.spinner { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--teal); animation: spin .9s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Person block: avatar, name, stars */
.person { display: flex; align-items: center; gap: 14px; padding: 10px 0 14px; }
.person .avatar { width: 56px; height: 56px; }
.person-name { font-size: 1.05rem; }
.person-rating { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .85rem; }
.person-rating .stars { font-size: .95rem; }
.person.centered { flex-direction: column; text-align: center; gap: 8px; padding: 18px 0 16px; }
.person.centered .avatar { width: 96px; height: 96px; font-size: 1.9rem; }
.chip-rating { color: var(--star); margin-left: 6px; font-size: .9rem; }

/* Timeline rows: driver ring, dotted connector, pickup pin */
.timeline { list-style: none; margin: 4px 0 6px; padding: 0; }
.timeline li { display: flex; gap: 16px; align-items: flex-start; position: relative; padding: 8px 0 18px; }
.timeline li + li::before { content: ""; position: absolute; left: 11px; top: -12px; height: 22px; border-left: 2px dotted var(--line); }
.timeline li:last-child { padding-bottom: 6px; }
.tl-dot { flex: none; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; color: var(--rider); }
.tl-ring { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--teal); background: transparent; margin: 1px; }
.tl-ring.filled { background: var(--teal); }
.tl-pin svg { width: 24px; height: 24px; stroke: var(--rider); stroke-width: 1.6; fill: none; }
.timeline small { display: block; color: var(--muted); font-size: .8rem; letter-spacing: var(--track); font-weight: 400; }
.timeline strong { display: block; font-weight: 400; font-size: 1.02rem; letter-spacing: 0.02em; }

/* Tool chips open compact panels in the sheet */
.tool-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 4px; }
.tool-chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: var(--pill-r); border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: .82rem; letter-spacing: 0.03em; cursor: pointer; }
.tool-chip.active, .tool-chip:hover { color: var(--teal-ink); border-color: var(--teal); }
.tool-chip svg { width: 16px; height: 16px; stroke-width: 1.6; }
.tool-panel { display: none; margin: 12px 0 4px; padding: 14px; background: var(--surface-2); border-radius: 18px; }
.tool-panel.open { display: block; }
.tool-panel label { display: block; font-size: .8rem; color: var(--muted); letter-spacing: var(--track); margin-bottom: 8px; }
.note-row { display: flex; gap: 8px; }
.note-row input { flex: 1; min-width: 0; padding: 11px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; }
.note-row .btn { min-height: 44px; padding: 8px 18px; }
.selfie-row, .share-row { display: flex; gap: 14px; align-items: flex-start; }
.selfie-thumb { flex: none; width: 84px; height: 84px; border-radius: 16px; overflow: hidden; background: var(--surface); }
.selfie-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.selfie-help, .share-row > div { flex: 1; min-width: 0; }
.selfie-help strong, .share-row strong { display: block; font-weight: 400; margin-bottom: 2px; }
.selfie-help p, .share-row p { margin-bottom: 10px; font-weight: 400; }
.share-icon { display: none; }
.progress { height: 5px; border-radius: 3px; background: var(--surface); overflow: hidden; margin-top: 10px; }
.progress-bar { height: 100%; width: 0; background: var(--teal); transition: width .2s; }
.file-btn { position: relative; overflow: hidden; cursor: pointer; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.tool-panel .btn-row { margin-top: 0; }
.tool-panel .btn { min-height: 42px; padding: 8px 16px; font-size: .76rem; }

/* Rating */
.stars { display: inline-flex; gap: 2px; font-size: 1.2rem; line-height: 1; }
.stars-sm { font-size: .85rem; vertical-align: -1px; }
.star { position: relative; color: var(--line); }
.star::before { content: "★"; position: absolute; left: 0; top: 0; width: calc(var(--fill, 0) * 100%); overflow: hidden; color: var(--star); }
.rate-block { text-align: center; padding: 10px 0 4px; border-top: 1px solid var(--line); margin-top: 8px; }
.rate-block h2 { font-size: .85rem; color: var(--muted); letter-spacing: var(--track); font-weight: 400; margin: 10px 0 4px; }
.star-picker { display: flex; justify-content: center; gap: 8px; margin: 4px 0 10px; }
.star-btn { font-size: 2rem; line-height: 1; background: none; border: 0; padding: 4px; color: var(--line); cursor: pointer; transition: transform .1s, color .1s; -webkit-tap-highlight-color: transparent; }
.star-btn.on { color: var(--star); }
@media (hover: hover) { .star-btn:hover { color: var(--star); } }
.star-btn:active { transform: scale(1.15); }
.rate-block .btn-row { justify-content: center; margin-top: 10px; }
.rate-block .btn { width: 100%; }
.rating-card { display: flex; align-items: center; gap: 18px; }
.rating-big { font-size: 2.4rem; font-weight: 400; line-height: 1; flex: none; min-width: 56px; text-align: center; }
.rating-card .note { margin-top: 8px; }

/* Drive page specifics */
.sheet-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 6px 0 12px; }
.stat { background: var(--surface-2); border-radius: 16px; padding: 10px 12px; }
.stat-label { display: block; font-size: .68rem; letter-spacing: 0.08em; color: var(--muted); font-weight: 400; text-transform: uppercase; }
.stat strong { font-size: 1.05rem; font-weight: 400; }
.depart-note { margin: 0 0 10px; padding: 10px 14px; background: var(--surface-2); border-radius: 14px; font-weight: 400; }
.drive-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.drive-actions form { margin: 0; display: contents; }
.drive-actions .btn { width: 100%; min-height: 52px; }
.drive-actions .btn-ghost { min-height: 40px; }
.selfie-box { display: flex; align-items: center; gap: 14px; width: 100%; margin: 0 0 12px; padding: 0; border: 0; background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.selfie-box img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; background: var(--surface-2); }
.selfie-box span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.selfie-box strong { font-weight: 400; font-size: 1.05rem; }
.selfie-box small { font-size: .8rem; color: var(--muted); letter-spacing: var(--track); }
.events { list-style: none; margin: 14px 0 0; padding: 0; font-size: .85rem; color: var(--muted); }
.events li { padding: 7px 0; border-top: 1px solid var(--line); display: flex; gap: 12px; }
.events li time { flex: none; font-variant-numeric: tabular-nums; }
.events li.ev-near { color: var(--bad); }
.events li.ev-rider_offline { color: var(--warn); }
.events li.ev-rider_online, .events li.ev-end { color: var(--ok); }
.events li.ev-rating { color: var(--star); }
.events li.ev-companion { color: var(--navy); }
.events:empty { display: none; }
.lightbox { position: fixed; inset: 0; z-index: 300; background: rgba(10,20,22,.92); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 20px; }
.lightbox img { max-width: 100%; max-height: 80vh; border-radius: 20px; object-fit: contain; }

/* Found-driver overlay */
.found-backdrop { position: fixed; inset: 0; z-index: 200; background: rgba(30,42,50,.45); display: flex; align-items: flex-end; justify-content: center; backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: fadeIn .25s ease; }
.found-card { background: var(--surface); color: var(--text); border-radius: var(--sheet-r) var(--sheet-r) 0 0; padding: 14px 24px calc(22px + env(safe-area-inset-bottom)); width: 100%; max-width: 560px; text-align: center; box-shadow: var(--sheet-shadow); animation: slideUp .4s cubic-bezier(.2,.9,.3,1.05); }
.found-card::before { content: ""; display: block; width: 44px; height: 4px; border-radius: 2px; background: var(--line); margin: 0 auto 16px; }
.found-burst { display: none; }
.found-card h2 { font-size: 1.45rem; margin-bottom: 2px; text-align: left; }
.found-card .found-sub { text-align: left; margin-bottom: 8px; }
.avatar-xl { width: 110px; height: 110px; font-size: 2.3rem; margin: 10px auto 12px; }
.found-name { font-size: 1.1rem; letter-spacing: 0.02em; }
.found-rating { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 6px 0 16px; }
.found-card p { margin-bottom: 18px; font-weight: 400; }
.found-card .btn { min-height: 52px; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }

/* ---------- Avatars ---------- */
.avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; display: inline-flex; align-items: center; justify-content: center; background: var(--mint); color: var(--navy); font-weight: 400; font-size: 1rem; flex: none; }
.avatar-sm { width: 32px; height: 32px; font-size: .75rem; }
.avatar-lg { width: 112px; height: 112px; font-size: 2.2rem; }
.avatar-btn { width: 42px; height: 42px; }
.driver-chip { display: none; }
.photo-row { display: flex; gap: 20px; align-items: flex-start; }
.photo-help { flex: 1; min-width: 0; }
.photo-help p { margin-bottom: 12px; font-weight: 400; }
.photo-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.photo-form .btn, .photo-card .btn { width: auto; }
.form-card .file-btn { margin-bottom: 0; color: var(--text); }
@media (max-width: 480px) { .photo-row { flex-direction: column; align-items: center; text-align: center; } .photo-form { justify-content: center; } }
.thumb { flex: none; width: 52px; height: 52px; border-radius: 50%; overflow: hidden; background: var(--surface-2); display: block; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.photo-grid a { display: block; border-radius: 16px; overflow: hidden; background: var(--surface-2); text-align: center; font-size: .75rem; color: var(--muted); }
.photo-grid img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; display: block; }
.photo-grid time { display: block; padding: 5px 0; }

/* ---------- Archive detail ("Pickup details") ---------- */
.detail-head { margin: 8px 0 16px; }
.detail-head h2 { font-size: 1.5rem; margin-bottom: 2px; }
.detail-map { height: 300px; }

/* ---------- Install cards ---------- */
.install-row { display: flex; gap: 14px; align-items: flex-start; }
.install-row img { width: 48px; height: 48px; border-radius: 14px; flex: none; }
.install-row strong { display: block; font-weight: 400; margin-bottom: 2px; }
.install-row p { margin-bottom: 8px; font-weight: 400; }
.install-row .btn { width: auto; min-height: 42px; padding: 8px 18px; font-size: .76rem; }
.page-dash .install-card { margin-bottom: 20px; }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 20px); transform: translateX(-50%) translateY(10px); background: var(--text); color: var(--bg); padding: 12px 20px; border-radius: var(--pill-r); font-size: .9rem; letter-spacing: 0.02em; box-shadow: var(--shadow); opacity: 0; transition: opacity .2s, transform .2s; z-index: 400; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (min-width: 681px) { .toast { bottom: 24px; } }
@media (display-mode: standalone) { .topbar { padding-top: env(safe-area-inset-top); height: calc(var(--topbar-h) + env(safe-area-inset-top)); } }
@media (prefers-reduced-motion: reduce) { *, *::after, *::before { animation: none !important; transition: none !important; } }

/* ---------- Accounts, plans & admin (2026-10-18) ---------- */
.auth-alt { text-align: center; margin: 16px 0 0; }
.auth-alt a { color: var(--teal-ink); }
.code-input { text-transform: uppercase; letter-spacing: .12em; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.badge.plan-basic { background: var(--surface-2); color: var(--muted); }
.badge.plan-plus { background: var(--navy-soft); color: var(--navy); }
.badge.plan-premium { background: var(--teal-soft); color: var(--teal-ink); }
[data-theme="dark"] .badge.plan-plus { background: rgba(63, 77, 123, .35); color: #b9c3e6; }
.plan-features { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.plan-features li { position: relative; padding-left: 26px; font-size: .92rem; }
.plan-features li::before { content: ''; position: absolute; left: 0; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--teal-soft); }
.plan-features li::after { content: ''; position: absolute; left: 5px; top: 7px; width: 6px; height: 3px; border-left: 2px solid var(--teal); border-bottom: 2px solid var(--teal); transform: rotate(-45deg); }
.plan-features li.off { color: var(--muted); }
.plan-features li.off::before { background: var(--surface-2); }
.plan-features li.off::after { width: 8px; height: 0; border: 0; border-top: 2px solid var(--muted); transform: none; left: 4px; top: 10px; }
.sub-nav { display: flex; gap: 6px; margin: 0 0 20px; overflow-x: auto; }
.sub-nav a { padding: 8px 14px; border-radius: var(--pill-r); font-size: .8rem; letter-spacing: var(--track); text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.sub-nav a.active { background: var(--teal-soft); color: var(--teal-ink); }
.sub-nav a:hover { color: var(--text); text-decoration: none; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 30px; }
.card.stat { text-align: center; padding: 14px 8px; }
.card.stat strong { display: block; font-size: 1.6rem; color: var(--teal-ink); font-weight: 400; }
.card.stat span { font-size: .72rem; letter-spacing: var(--track); text-transform: uppercase; color: var(--muted); }
.row-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.row-main > div { min-width: 0; }
.list-row .badge { flex-shrink: 0; }
.invite-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .1em; }
.bad { color: var(--bad); }
.form-card label small { display: block; margin-top: 4px; letter-spacing: 0; text-transform: none; }

/* Landing page */
.landing { max-width: 960px; margin: 0 auto; padding: 18px 20px 60px; }
.landing-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 40px; }
.landing-actions { display: flex; align-items: center; gap: 8px; }
.landing-actions .btn { min-height: 40px; padding: 8px 18px; }
.landing .hero-body { text-align: left; max-width: 640px; margin: 0 0 50px; }
.landing .hero-body h1 { font-size: clamp(1.9rem, 5vw, 3rem); line-height: 1.15; margin: 0 0 16px; }
.landing .hero-body p { color: var(--muted); font-size: 1.05rem; max-width: 560px; }
.hero-cta { margin-top: 24px; }
.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 56px; }
.how-step { display: flex; gap: 12px; align-items: flex-start; }
.how-n { flex: 0 0 34px; height: 34px; border-radius: 50%; background: var(--navy); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: .9rem; }
.how-step p { margin: 4px 0 0; color: var(--muted); font-size: .92rem; }
.plans h2 { text-align: center; margin-bottom: 18px; }
.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 18px; }
.plan { display: flex; flex-direction: column; gap: 14px; }
.plan + .plan { margin-top: 0; }
.plan-name { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.plan-links { font-size: 2.2rem; line-height: 1; color: var(--teal-ink); font-weight: 400; }
.plan-links small { display: block; font-size: .78rem; color: var(--muted); margin-top: 4px; letter-spacing: var(--track); }
.plan-card-plus { border: 1px solid var(--navy-soft); }
.plan-card-premium { border: 1px solid var(--teal-soft); }
.center { text-align: center; }
@media (max-width: 720px) {
  .how, .plan-grid { grid-template-columns: 1fr; }
  .stat-row { gap: 8px; }
}

/* ---------- Rider beacon ---------- */
.beacon { position: fixed; inset: 0; z-index: 500; cursor: pointer; display: flex; align-items: flex-end; justify-content: center; padding: 0 20px calc(40px + env(safe-area-inset-bottom)); -webkit-tap-highlight-color: transparent; user-select: none;
  background: #ff3b30; animation: beacon-cycle 2.4s linear infinite; }
.beacon[hidden] { display: none; }
.beacon-hint { text-align: center; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.35); display: grid; gap: 4px; opacity: .9; }
.beacon-hint strong { font-size: 1.1rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 500; }
.beacon-hint span { font-size: .8rem; letter-spacing: var(--track); }
@keyframes beacon-cycle {
  0%   { background: #ff3b30; }
  16%  { background: #ff9500; }
  33%  { background: #ffe600; }
  50%  { background: #34e36b; }
  66%  { background: #2f8cff; }
  83%  { background: #b44bff; }
  100% { background: #ff3b30; }
}
@media (prefers-reduced-motion: reduce) { .beacon { animation-duration: 9s; } }
body.beacon-on { overflow: hidden; }
.tool-chip-beacon { color: var(--navy); border-color: var(--navy-soft); }
.tool-chip-beacon:hover { color: var(--navy); border-color: var(--navy); }
