:root {
  --ink: #0B0B0C;
  --ink-2: #2B2C30;
  --grey: #8A8A8E;
  --grey-2: #5E5F64;
  --line: #ECECEE;
  --bg: #F6F6F7;
  --white: #FFFFFF;
  --amber: #F5A524;
  --amber-soft: #FFF4DF;
  --green: #1F9D55;
  --red: #D93A3A;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --radius: 16px;
  --shadow: 0 12px 40px rgba(11, 11, 12, .14), 0 2px 6px rgba(11, 11, 12, .06);
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font: 400 15px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
body { overflow: hidden; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -.02em; }
.muted { color: var(--grey-2); }
.small { font-size: 13px; }
.hidden { display: none !important; }

/* Map */
#map { position: fixed; inset: 0; }
.maplibregl-ctrl-attrib { font-size: 10px; }
/* Licence: attribution exists as the compact (i) control; it only opens when tapped. */
.maplibregl-ctrl-attrib.maplibregl-compact:not(.maplibregl-compact-show) .maplibregl-ctrl-attrib-inner { display: none; }
.maplibregl-ctrl-bottom-right { bottom: auto; top: 64px; }

/* Top bar */
.topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px; pointer-events: none; }
.topbar > * { pointer-events: auto; }
.brand { display: inline-flex; align-items: center; gap: 10px; background: var(--white); padding: 6px 14px 6px 6px; border-radius: 999px; box-shadow: var(--shadow); font-weight: 700; letter-spacing: -.01em; }
.brand small { font-weight: 500; color: var(--grey); margin-left: 2px; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; background: var(--white); box-shadow: var(--shadow); display: grid; place-items: center; }
.icon-btn svg { width: 20px; height: 20px; }
.locate { position: fixed; z-index: 4; right: 16px; }

/* Sheet: bottom sheet on phones, side panel on desktop */
.sheet { position: fixed; z-index: 6; left: 0; right: 0; bottom: 0; max-height: 86vh; background: var(--white); border-radius: 24px 24px 0 0; box-shadow: 0 -10px 40px rgba(11,11,12,.16); display: flex; flex-direction: column; padding-bottom: var(--safe-b); transition: transform var(--t-slow) var(--ease-spring); }
.handle { padding: 10px 0 4px; display: grid; place-items: center; touch-action: none; cursor: grab; }
.handle span { width: 40px; height: 5px; border-radius: 3px; background: #D9D9DC; }
.sheet-body { overflow-y: auto; padding: 4px 20px 20px; overscroll-behavior: contain; }
@media (min-width: 900px) {
  .sheet { top: 84px; left: 24px; right: auto; bottom: auto; width: 400px; max-height: calc(100vh - 108px); border-radius: 20px; box-shadow: var(--shadow); }
  .handle { display: none; }
  .sheet-body { padding: 22px 24px 24px; }
  .topbar { padding: 18px 24px; }
}

/* Typography in the sheet */
.title { font-size: 26px; font-weight: 700; line-height: 1.15; }
.sub { color: var(--grey-2); margin-top: 6px; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--grey); }
.row { display: flex; align-items: center; gap: 12px; }
.between { justify-content: space-between; }
.stack > * + * { margin-top: 12px; }
.divider { height: 1px; background: var(--line); margin: 16px 0; }

/* Promise strip */
.promise { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 4px; }
.promise span { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; color: var(--ink-2); background: var(--bg); padding: 6px 10px; border-radius: 999px; }
.promise svg { width: 14px; height: 14px; }

/* Where to */
.where { display: flex; align-items: center; gap: 12px; width: 100%; background: var(--bg); border-radius: 14px; padding: 16px; font-size: 18px; font-weight: 600; margin-top: 16px; text-align: left; }
.where:hover { background: #EFEFF1; }
.where .sq { width: 10px; height: 10px; background: var(--ink); border-radius: 2px; }
.where .when { margin-left: auto; font-size: 13px; font-weight: 600; background: var(--white); border-radius: 999px; padding: 6px 10px; display: inline-flex; gap: 6px; align-items: center; }

.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.quick button { background: var(--bg); border-radius: 14px; padding: 12px 8px; text-align: center; font-weight: 600; font-size: 13px; }
.quick button:hover { background: #EFEFF1; }
.quick .qi { width: 36px; height: 36px; margin: 0 auto 6px; border-radius: 10px; background: var(--white); display: grid; place-items: center; }
.quick svg { width: 20px; height: 20px; }

.list { margin: 8px -8px 0; }
.list button { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 8px; border-radius: 12px; text-align: left; }
.list button:hover, .list button.active { background: var(--bg); }
.list .li-icon { width: 36px; height: 36px; border-radius: 50%; background: var(--bg); display: grid; place-items: center; flex: none; }
.list button:hover .li-icon { background: var(--white); }
.list .li-icon svg { width: 18px; height: 18px; }
.list .li-main { font-weight: 600; }
.list .li-sub { font-size: 13px; color: var(--grey-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 290px; }

/* Search inputs */
.trip { position: relative; display: grid; grid-template-columns: 22px 1fr; gap: 8px 10px; align-items: center; margin-top: 8px; }
.trip .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ink); justify-self: center; }
.trip .dot.sq { border-radius: 2px; }
.trip .line { position: absolute; left: 10px; top: 26px; height: 30px; width: 2px; background: #D0D0D4; }
.field { width: 100%; border: 0; outline: 0; background: var(--bg); border-radius: 12px; padding: 13px 14px; font-size: 16px; }
.field:focus { background: #EFEFF1; box-shadow: inset 0 0 0 2px var(--ink); }
label.lbl { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 6px; }
.back { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; margin: 4px 0 8px -4px; padding: 6px 4px; border-radius: 8px; }
.back svg { width: 20px; height: 20px; }

/* Ride option cards */
.options { margin-top: 14px; display: grid; gap: 10px; }
.chip { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; border-radius: 16px; padding: 12px 14px; border: 2px solid transparent; background: var(--bg); transition: border-color var(--t-fast), transform var(--t-fast) var(--ease-out), box-shadow var(--t-fast); }
.chip.selected { border-color: var(--ink); background: var(--white); box-shadow: 0 6px 20px rgba(11,11,12,.08); }
.chip .art { width: 74px; height: 46px; flex: none; display: grid; place-items: center; }
.chip .art svg { width: 74px; height: 46px; }
.chip .name { font-weight: 700; font-size: 16px; }
.chip .meta { font-size: 13px; color: var(--grey-2); }
.chip .price { margin-left: auto; text-align: right; }
.chip .price b { font-size: 20px; font-weight: 700; display: block; letter-spacing: -.02em; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: var(--amber-soft); color: #8A5A00; }
.stepper { display: inline-flex; align-items: center; gap: 10px; margin-top: 6px; }
.stepper button { width: 30px; height: 30px; border-radius: 50%; background: var(--white); box-shadow: inset 0 0 0 1.5px var(--line); font-weight: 700; }

/* Segmented control */
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg); border-radius: 12px; padding: 4px; margin-top: 14px; }
.seg button { padding: 10px; border-radius: 9px; font-weight: 600; display: inline-flex; gap: 6px; align-items: center; justify-content: center; }
.seg button.on { background: var(--white); box-shadow: 0 2px 8px rgba(11,11,12,.08); }
.seg svg { width: 16px; height: 16px; }

/* Buttons */
.btn { display: flex; width: 100%; align-items: center; justify-content: center; gap: 8px; background: var(--ink); color: var(--white); font-weight: 700; font-size: 16px; padding: 16px; border-radius: 14px; margin-top: 16px; }
.btn:hover { background: var(--ink-2); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn.ghost { background: var(--bg); color: var(--ink); }
.btn.ghost:hover { background: #EFEFF1; }
.btn.danger { background: var(--white); color: var(--red); box-shadow: inset 0 0 0 1.5px var(--line); }
.link { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* Info blocks */
.note { display: flex; gap: 10px; background: var(--amber-soft); color: #6B4500; border-radius: 12px; padding: 12px 14px; font-size: 13.5px; margin-top: 12px; }
.note svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.note.plain { background: var(--bg); color: var(--ink-2); }
.err { color: var(--red); font-size: 13.5px; margin-top: 10px; font-weight: 500; }
.kv { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; }
.kv span:first-child { color: var(--grey-2); }
.big-time { font-size: 30px; font-weight: 800; letter-spacing: -.03em; }
.center { text-align: center; }
.radar-text { text-align: center; font-weight: 600; margin: 4px 0 0; }
.countdown { font-variant-numeric: tabular-nums; }
.card-box { background: var(--bg); border-radius: 12px; padding: 13px 14px; min-height: 48px; }
.check-row { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; font-size: 13.5px; }
.check-row input { width: 20px; height: 20px; accent-color: var(--ink); margin: 0; flex: none; }
details summary { cursor: pointer; font-weight: 600; font-size: 13.5px; color: var(--grey-2); margin-top: 10px; list-style: none; }
details summary::-webkit-details-marker { display: none; }
details[open] summary { margin-bottom: 4px; }

/* Toast */
.toast { position: fixed; z-index: 20; left: 50%; top: calc(72px + env(safe-area-inset-top, 0px)); transform: translate(-50%, -20px); opacity: 0; background: var(--ink); color: var(--white); padding: 10px 16px; border-radius: 12px; font-weight: 600; font-size: 14px; transition: all var(--t-med) var(--ease-out); pointer-events: none; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Driver and admin pages share these */
.page { max-width: 560px; margin: 0 auto; padding: 16px 16px 60px; overflow-y: auto; height: 100%; }
.card { background: var(--white); border-radius: var(--radius); padding: 16px; box-shadow: 0 1px 3px rgba(11,11,12,.06); margin-top: 12px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.pill.green { background: #E3F5EA; color: var(--green); }
.pill.amber { background: var(--amber-soft); color: #8A5A00; }
.pill.red { background: #FBE6E6; color: var(--red); }
.pill.ink { background: var(--ink); color: var(--white); }
.toggle { position: relative; width: 52px; height: 32px; border-radius: 999px; background: #D9D9DC; transition: background var(--t-fast); flex: none; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: var(--white); box-shadow: 0 2px 4px rgba(0,0,0,.2); transition: transform var(--t-med) var(--ease-spring); }
.toggle.on { background: var(--green); }
.toggle.on::after { transform: translateX(20px); }
.btn-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.btn-row .btn { margin-top: 12px; padding: 12px 8px; font-size: 14px; }
