/* RideOrg. Map first, black and white, one accent green. Phone first: 48px touch targets. */
:root {
  --bg: #fff; --surface: #fff; --raised: #fff; --soft: #f4f4f5; --line: #e7e7ea; --rail: #c4c4cc;
  --ink: #0b0b0c; --ink2: #3f3f46; --mute: #71717a; --faint: #a1a1aa; --inv: #0b0b0c; --on-inv: #fff;
  --go: #16a34a; --go-text: #16a34a; --go-soft: #dcfce7; --blue: #2563eb; --blue-soft: #dbeafe; --warn: #b45309; --warn-soft: #fef3c7; --bad: #dc2626; --bad-soft: #fee2e2;
  --mapbg: #eceae4; --nav: rgba(255,255,255,.94); --next: #0b0b0c;
  --r: 18px; --navh: 0px; --sat: env(safe-area-inset-top); --sab: env(safe-area-inset-bottom);
  --shadow: 0 -8px 30px rgba(0,0,0,.08), 0 -1px 0 rgba(0,0,0,.04);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: light;
}
/* Dark mode: set on <html> from the phone setting or the Account switch. */
:root[data-theme="dark"] {
  --bg: #0b0b0c; --surface: #151517; --raised: #2c2c31; --soft: #1f1f23; --line: #2c2c31; --rail: #4a4a52;
  --ink: #f4f4f5; --ink2: #d4d4d8; --mute: #a1a1aa; --faint: #6b6b74; --inv: #f4f4f5; --on-inv: #0b0b0c;
  --go-text: #4ade80; --go-soft: rgba(34,197,94,.18); --blue: #60a5fa; --blue-soft: rgba(96,165,250,.18); --warn: #fbbf24; --warn-soft: rgba(251,191,36,.16); --bad: #f87171; --bad-soft: rgba(248,113,113,.16);
  --mapbg: #1a1a1d; --nav: rgba(16,16,18,.92); --next: #1f1f23;
  --shadow: 0 -8px 30px rgba(0,0,0,.55), 0 -1px 0 rgba(255,255,255,.06);
  color-scheme: dark;
}
body.hasnav { --navh: 64px; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font: 16px/1.4 var(--font); -webkit-text-size-adjust: 100%; font-feature-settings: "cv11", "ss01"; }
body.mapmode { overflow: hidden; }
svg.i { width: 22px; height: 22px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
svg.i.sm { width: 18px; height: 18px; }
svg.i.lg { width: 28px; height: 28px; }
a { color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; }
h1 { font-size: 28px; font-weight: 800; }
h2 { font-size: 20px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 700; }
p { margin: 0; }
.mute { color: var(--mute); }
.small { font-size: 14px; }
.tiny { font-size: 12px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); }
.row { display: flex; align-items: center; gap: 10px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.grow { flex: 1 1 auto; min-width: 0; }
.stack > * + * { margin-top: 10px; }
.hide { display: none !important; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Buttons */
button, .btn { appearance: none; font: inherit; color: inherit; border: 0; background: var(--soft); min-height: 48px; padding: 0 18px; border-radius: 14px;
  font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; text-decoration: none; transition: transform .08s, background .15s, opacity .15s; }
button:active, .btn:active { transform: scale(.98); }
button:disabled { opacity: .45; }
.cta { background: var(--inv); color: var(--on-inv); min-height: 56px; font-size: 17px; border-radius: 16px; width: 100%; }
.cta.go { background: var(--go); color: #fff; }
.ghost { background: transparent; border: 1.5px solid var(--line); }
.wide { width: 100%; }
.icon-btn { width: 48px; min-height: 48px; padding: 0; border-radius: 50%; background: var(--soft); }
.icon-btn.dark { background: var(--inv); color: var(--on-inv); }
.link { background: none; min-height: 40px; padding: 0 4px; color: var(--mute); font-weight: 600; }
.link.bad { color: var(--bad); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--soft); font-size: 13px; font-weight: 700; }
.pill.go { background: var(--go-soft); color: var(--go-text); }
.pill.blue { background: var(--blue-soft); color: var(--blue); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }

/* Map behind everything */
#map { position: fixed; inset: 0; z-index: 0; background: var(--mapbg); }
body:not(.mapmode) #map { display: none; }
.maplibregl-ctrl-attrib { font-size: 10px !important; }
.maplibregl-ctrl-top-left { top: calc(var(--sat) + 62px) !important; }
.marker-me { width: 20px; height: 20px; border-radius: 50%; background: var(--blue); border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(37,99,235,.2), 0 2px 6px rgba(0,0,0,.3); }
.marker-car { width: 40px; height: 40px; border-radius: 50%; background: var(--inv); color: var(--on-inv); display: grid; place-items: center; border: 3px solid var(--surface); box-shadow: 0 4px 12px rgba(0,0,0,.35); }
.marker-car svg { width: 20px; height: 20px; }
.marker-stop { min-width: 28px; height: 28px; padding: 0 6px; border-radius: 9px; background: var(--surface); color: var(--ink); border: 2.5px solid var(--ink); font-weight: 800; font-size: 13px; display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.marker-stop.end { background: var(--inv); color: var(--on-inv); }

/* Top bar floating over the map */
.topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 10; padding: calc(var(--sat) + 10px) 14px 0; display: flex; justify-content: space-between; align-items: center; pointer-events: none; }
.topbar > * { pointer-events: auto; }
.float { background: var(--surface); color: var(--ink); border-radius: 999px; box-shadow: 0 4px 16px rgba(0,0,0,.14); min-height: 44px; padding: 0 14px; display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--inv); color: var(--on-inv); display: grid; place-items: center; font-weight: 700; font-size: 15px; flex: none; }
.avatar.sm { width: 40px; height: 40px; font-size: 14px; }
.topbar .avatar { box-shadow: 0 4px 16px rgba(0,0,0,.2); border: 2px solid var(--surface); padding: 0; min-height: 0; }

/* Bottom sheet */
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: var(--surface); border-radius: 24px 24px 0 0; box-shadow: var(--shadow);
  max-height: calc(64dvh - var(--sat)); overflow-y: auto; overscroll-behavior: contain; padding: 8px 18px calc(var(--navh) + var(--sab) + 18px); animation: up .28s cubic-bezier(.2,.8,.2,1); }
.sheet .handle { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 4px auto 14px; }
.sheet-inner { max-width: 560px; margin: 0 auto; }
@keyframes up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Where to */
.greet { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; margin: 2px 0 14px; }
.where { width: 100%; min-height: 58px; background: var(--soft); border-radius: 16px; justify-content: flex-start; padding: 0 16px; font-size: 18px; font-weight: 700; color: var(--ink); }
.where .when { margin-left: auto; background: var(--raised); border-radius: 999px; padding: 6px 12px; font-size: 14px; display: inline-flex; gap: 6px; align-items: center; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0 6px; }
.tile { flex-direction: column; min-height: 88px; padding: 12px 6px; border-radius: 16px; background: var(--soft); font-size: 13px; font-weight: 700; gap: 8px; text-align: center; line-height: 1.15; }
.tile svg { width: 26px; height: 26px; }
.saved { width: 100%; justify-content: flex-start; background: none; padding: 10px 0; min-height: 60px; border-radius: 0; border-top: 1px solid var(--line); text-align: left; }
.saved .ic { width: 40px; height: 40px; border-radius: 50%; background: var(--soft); display: grid; place-items: center; flex: none; }
.saved b { display: block; font-size: 16px; }
.saved span { font-size: 14px; color: var(--mute); font-weight: 500; }

/* Live ride card */
.ride { border-radius: 20px; background: var(--surface); border: 1.5px solid var(--line); padding: 16px; margin-bottom: 12px; }
.ride .headline { font-size: 21px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.eta { text-align: right; flex: none; }
.eta b { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; display: block; line-height: 1; }
.eta span { font-size: 12px; color: var(--mute); font-weight: 600; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin: 14px 0 6px; }
.steps i { height: 5px; border-radius: 3px; background: var(--line); }
.steps i.on { background: var(--ink); }
/* The step in progress blinks with opacity only: the phone's graphics chip does that without redrawing the
   page (the old sliding stripe redrew the sheet 60 times a second). */
.steps i.now { background: var(--ink); animation: blink 1.4s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .3; } }
.driver { display: flex; align-items: center; gap: 8px; padding: 12px 0 0; margin-top: 12px; border-top: 1px solid var(--line); }
.driver .icon-btn { width: 40px; min-height: 40px; }
.driver .grow .small { white-space: normal; }
.dots::after { content: '...'; } /* still dots: animated dots re-laid out the sheet several times a second */

/* Route timeline */
.route { position: relative; }
.stop { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 0; background: none; border-radius: 0; text-align: left; justify-content: flex-start; font-weight: 500; }
.stop .mark { width: 28px; flex: none; display: grid; place-items: center; position: relative; align-self: stretch; }
.stop .mark::before { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: var(--rail); transform: translateX(-50%); }
.stop:first-child .mark::before { top: 50%; }
.stop.last .mark::before { bottom: 50%; }
.stop .mark i { position: relative; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 3px solid var(--ink); }
.stop.last .mark i { border-radius: 3px; background: var(--ink); }
.stop.mid .mark i { border-radius: 3px; }
.stop .lbl { font-size: 12px; font-weight: 700; color: var(--mute); text-transform: uppercase; letter-spacing: .05em; }
.stop .val { font-size: 16px; font-weight: 600; color: var(--ink); }
.stop .val.unset { color: var(--faint); }
.addstop { background: none; min-height: 44px; padding: 0 0 0 40px; color: var(--ink2); justify-content: flex-start; width: 100%; }

.plain { background: none; min-height: 0; padding: 0; border-radius: 0; display: block; text-align: left; font-weight: 500; width: auto; }
.plain:active { transform: none; opacity: .6; }

/* Swipe to confirm */
.swipe { position: relative; height: 60px; border-radius: 16px; background: var(--go); color: #fff; overflow: hidden; margin-top: 10px; user-select: none; -webkit-user-select: none; }
.swipe-text { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700; font-size: 17px; padding-left: 44px; pointer-events: none; }
.swipe-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: rgba(0,0,0,.18); pointer-events: none; }
.swipe-knob { position: absolute; left: 4px; top: 4px; width: 52px; height: 52px; border-radius: 13px; background: #fff; color: var(--go); display: grid; place-items: center; touch-action: none; cursor: grab; box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.swipe.busy { opacity: .6; pointer-events: none; }

/* Steppers, segmented, chips */
.stepper { display: inline-flex; align-items: center; gap: 4px; background: var(--soft); border-radius: 999px; padding: 4px; }
.stepper button { width: 36px; min-height: 36px; padding: 0; border-radius: 50%; background: var(--raised); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.stepper b { min-width: 52px; text-align: center; font-size: 15px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--soft); border-radius: 14px; padding: 4px; gap: 4px; }
.seg button { min-height: 42px; background: none; border-radius: 11px; }
.seg button.on { background: var(--raised); box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 44px; padding: 0 14px; border-radius: 999px; background: var(--soft); font-weight: 600; font-size: 15px; }
.chip.on { background: var(--inv); color: var(--on-inv); }
.chip svg { width: 18px; height: 18px; }

/* Forms */
label, .label { display: block; font-size: 13px; font-weight: 700; color: var(--mute); margin: 20px 0 8px; text-transform: uppercase; letter-spacing: .05em; }
input, select, textarea { width: 100%; font: inherit; font-size: 16px; padding: 14px 16px; border: 0; border-radius: 14px; background: var(--soft); color: var(--ink); outline: none; }
input:focus, select:focus, textarea:focus { box-shadow: inset 0 0 0 2px var(--ink); background: var(--surface); }
textarea { min-height: 84px; resize: vertical; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
.card { background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.section { margin-top: 22px; }

/* Full screen overlay (plan a ride, search a place, settings) */
.overlay { position: fixed; inset: 0; z-index: 30; background: var(--bg); overflow-y: auto; overscroll-behavior: contain; animation: up .25s cubic-bezier(.2,.8,.2,1); }
.overlay .wrap { max-width: 560px; margin: 0 auto; padding: calc(var(--sat) + 8px) 18px 140px; }
.oh { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; background: var(--bg); z-index: 2; padding: 8px 0 10px; }
.oh h2 { flex: 1; }
.foot { position: fixed; left: 0; right: 0; bottom: 0; z-index: 31; background: linear-gradient(transparent, var(--bg) 22%); padding: 22px 18px calc(var(--sab) + 14px); }
.foot .in { max-width: 560px; margin: 0 auto; }
.foot .sum { font-size: 14px; color: var(--mute); text-align: center; margin-bottom: 8px; font-weight: 600; }
.types { display: flex; gap: 8px; overflow-x: auto; margin: 4px -18px 0; padding: 4px 18px 8px; scrollbar-width: none; }
.types::-webkit-scrollbar { display: none; }
.type { flex: none; flex-direction: column; width: 92px; min-height: 84px; gap: 6px; font-size: 13px; line-height: 1.15; border-radius: 16px; background: var(--soft); text-align: center; padding: 10px 6px; }
.type.on { background: var(--inv); color: var(--on-inv); }
.search { display: flex; align-items: center; gap: 10px; background: var(--soft); border-radius: 14px; padding: 0 6px 0 14px; }
.search input { background: none; padding: 14px 0; }
.search input:focus { box-shadow: none; }
.search button { min-height: 40px; padding: 0 14px; background: var(--inv); color: var(--on-inv); border-radius: 10px; }
.list { margin-top: 8px; }
.item { width: 100%; display: flex; align-items: center; gap: 14px; text-align: left; justify-content: flex-start; background: none; border-radius: 0; min-height: 64px; padding: 8px 0; border-bottom: 1px solid var(--line); font-weight: 500; }
.item .ic { width: 40px; height: 40px; border-radius: 50%; background: var(--soft); display: grid; place-items: center; flex: none; }
.item b { display: block; font-weight: 600; }
.item span { display: block; color: var(--mute); font-size: 14px; }
.item .avatar { display: grid; color: var(--on-inv); } /* initials centered in the circle (the rule above had pushed them to the corner) */
.item:disabled { opacity: .45; }

/* Driver */
.switch { display: inline-flex; align-items: center; gap: 10px; }
.toggle { width: 52px; min-height: 32px; height: 32px; padding: 0; border-radius: 999px; background: var(--faint); position: relative; }
.toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.toggle.on { background: var(--go); }
.toggle.on::after { transform: translateX(20px); }
.next { border-radius: 20px; background: var(--next); color: #fff; border: 1px solid var(--line); padding: 18px; }
.next .eyebrow { color: rgba(255,255,255,.6); }
.next .addr { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; margin: 6px 0 4px; }
.next .meta { color: rgba(255,255,255,.75); font-size: 14px; }
.next .note { background: rgba(255,255,255,.1); border-radius: 12px; padding: 10px 12px; margin-top: 12px; font-size: 14px; white-space: pre-wrap; }
.next .acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.next .acts .btn, .next .acts button { background: rgba(255,255,255,.14); color: #fff; }
.next .cta { margin-top: 10px; background: var(--go); }
.next .who { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.next .who .avatar { background: #fff; color: #0b0b0c; }
.next .here-btn { background: #fff; color: #0b0b0c; }
.next .who .icon-btn { background: rgba(255,255,255,.14); color: #fff; }
.upnext .item { min-height: 58px; }
.num { width: 28px; height: 28px; border-radius: 8px; background: var(--soft); font-weight: 800; font-size: 13px; display: grid; place-items: center; flex: none; }
.offer { border-radius: 20px; border: 1.5px solid var(--line); padding: 16px; margin-bottom: 12px; }
.offer .from, .offer .to { display: flex; gap: 10px; align-items: baseline; font-weight: 600; }
.offer .from::before, .offer .to::before { content: ''; width: 9px; height: 9px; border-radius: 50%; border: 2.5px solid var(--ink); flex: none; transform: translateY(-1px); }
.offer .to::before { border-radius: 2px; background: var(--ink); }
.offer .via { color: var(--mute); font-size: 14px; margin: 4px 0 4px 19px; }

/* Bottom nav */
nav.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; height: calc(var(--navh) + var(--sab)); padding-bottom: var(--sab);
  background: var(--nav); backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px); border-top: 1px solid var(--line); display: flex; }
nav.tabs button { flex: 1; flex-direction: column; gap: 3px; background: none; border-radius: 0; min-height: var(--navh); font-size: 12px; color: var(--faint); font-weight: 600; }
nav.tabs button.on { color: var(--ink); }

/* Pages without a map: sign in, boss */
.page { max-width: 560px; margin: 0 auto; padding: calc(var(--sat) + 18px) 18px calc(var(--navh) + var(--sab) + 30px); }
.auth { min-height: 100dvh; background: #0b0b0c; color: #fff; padding: calc(var(--sat) + 28px) 22px calc(var(--sab) + 28px); display: flex; flex-direction: column; }
.auth .in { max-width: 440px; width: 100%; margin: auto; }
.auth .logo { width: 84px; height: 84px; border-radius: 22px; display: block; margin-bottom: 22px; box-shadow: 0 0 0 1px rgba(255,255,255,.12); }
.auth h1 { font-size: 38px; letter-spacing: -0.04em; }
.auth .sub { color: rgba(255,255,255,.6); margin: 8px 0 26px; font-size: 17px; }
.auth .seg { background: rgba(255,255,255,.1); }
.auth .seg button { color: rgba(255,255,255,.7); }
.auth .seg button.on { background: var(--raised); color: #0b0b0c; box-shadow: none; }
.auth label { color: rgba(255,255,255,.5); }
.auth input { background: rgba(255,255,255,.1); color: #fff; }
.auth input:focus { background: rgba(255,255,255,.14); box-shadow: inset 0 0 0 2px #fff; }
.auth .cta { background: #fff; color: #0b0b0c; margin-top: 24px; }
.auth .hint { color: rgba(255,255,255,.5); font-size: 14px; margin-top: 10px; }
.boot { min-height: 100dvh; display: grid; place-items: center; background: #0b0b0c; }
.boot img { width: 84px; height: 84px; border-radius: 22px; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.94); opacity: .7; } }

/* Banners, toast */
.banner { display: flex; gap: 12px; align-items: center; background: var(--soft); border-radius: 16px; padding: 12px 14px; margin-bottom: 14px; font-size: 14px; }
.banner.warn { background: var(--warn-soft); }
#toast { position: fixed; left: 50%; top: calc(var(--sat) + 12px); transform: translate(-50%, -12px); background: var(--inv); color: var(--on-inv); padding: 12px 18px;
  border-radius: 14px; max-width: 92vw; font-weight: 600; font-size: 15px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 60; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
.empty { text-align: center; padding: 26px 10px; color: var(--mute); }
.empty svg { width: 34px; height: 34px; color: var(--faint); margin-bottom: 8px; }
.stop .plain { padding: 10px 0; }
.overlay.still { animation: none; }
body.tab-drive .sheet { max-height: calc(60dvh - var(--sat)); }
.auth input { color-scheme: dark; }
/* Map credit (i) in dark mode */
:root[data-theme="dark"] .maplibregl-ctrl-attrib { background: rgba(21,21,23,.88) !important; color: #a1a1aa; }
:root[data-theme="dark"] .maplibregl-ctrl-attrib a { color: #d4d4d8 !important; }
:root[data-theme="dark"] .maplibregl-ctrl-attrib-button { filter: invert(1); }
.float.btn-float, button.float { color: var(--ink); }
.dot-on { width: 8px; height: 8px; border-radius: 50%; background: var(--go); box-shadow: 0 0 0 3px var(--go-soft); }
/* Upright only. Android's home-screen app locks itself through the manifest; iPhones can't be locked
   by a web app, so a phone held sideways gets a full-screen "turn upright" card. Tablets and
   computers are tall enough to skip it. */
#turn { display: none; }
@media (orientation: landscape) and (max-height: 520px) {
  #turn { display: flex; position: fixed; inset: 0; z-index: 9999; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
    background: var(--bg); color: var(--ink); text-align: center; padding: 24px; }
  #turn b { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
  #turn span { color: var(--mute); font-size: 15px; }
}
/* Speed. While a full-screen panel is open, the map and the sheet under it are hidden, so the phone stops
   drawing them and typing stays smooth (body.covered is set by app.js once the panel has slid in).
   Buttons answer a tap at once, with no wait to see if it is a double tap. */
body.covered #map, body.covered #app { visibility: hidden; }
button, a, input, select, textarea, label { touch-action: manipulation; }
[hidden] { display: none !important; } /* rows hidden by a search stay hidden even when their class sets display */
/* Joining: the open-in-Safari screen, the home-screen steps and the alerts step. */
.auth .seg button.on { background: #fff; color: #0b0b0c; }
.auth .cta.ghost-dark { background: rgba(255,255,255,.1); color: #fff; margin-top: 14px; }
.howtos { margin-top: 18px; }
.howto { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 16px; line-height: 1.45; }
.howto .num { margin-top: 1px; }
.key { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--soft); color: var(--blue); vertical-align: middle; margin: 0 2px; }
.join h1 { font-size: 28px; }
.join .sub { color: var(--mute); margin-top: 8px; }
.twin { color: var(--warn) !important; font-weight: 600; }
/* Phone sizes, checked from 320 px wide (iPhone SE 1st gen) to 430 px (Pro Max), Dec 2 2026. */
/* Tabs (Boss, Now/Schedule, Car/SUV/Truck, Auto/Light/Dark) always fit: their buttons shrink instead of
   pushing the page wider than the screen. */
.seg { grid-auto-columns: minmax(0, 1fr); }
.seg button { padding: 0 6px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* A select that shares a row (Boss "Give to...") takes the room left over instead of the whole row. */
.row select.grow { width: auto; flex: 1 1 0; min-width: 0; }
/* All six ride types show at once, three across, instead of three in view and three hidden off screen. */
.types { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; margin: 4px 0 0; padding: 4px 0 8px; }
.type { width: auto; min-height: 76px; }
/* The "How" button in a banner is a small pill, centered. */
.banner .chip { display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; font-size: 14px; flex: none; }
/* Short phones (SE): the sheet leaves more of the map in view, and sign-in fits without scrolling. */
@media (max-height: 700px) {
  .sheet { max-height: calc(62dvh - var(--sat)); } /* (64 on taller phones) */
  body.tab-drive .sheet { max-height: calc(56dvh - var(--sat)); }
  .auth .logo { width: 60px; height: 60px; border-radius: 16px; margin-bottom: 14px; }
  .auth h1 { font-size: 30px; }
  .auth .sub { margin: 6px 0 18px; font-size: 16px; }
  .auth .cta { margin-top: 18px; }
}
/* Narrow phones (under 360 px): the top bar pills are tighter so the account button keeps its room. */
@media (max-width: 359px) {
  .topbar .float { padding: 0 11px; gap: 6px; }
  .greet { font-size: 23px; }
}
/* Dark mode: the chosen tab (Now or Schedule, Car/SUV/Truck, Boss tabs) is white, like the chosen ride type,
   so it is easy to tell which one is on. */
:root[data-theme="dark"] .seg button.on { background: var(--inv); color: var(--on-inv); }
:root[data-theme="dark"] .seg button.on .mute { color: var(--faint); }
/* You on the map: your initials in a blue circle with a soft pulse (opacity and size only, so the phone's
   graphics chip draws it), and the round button under your account button that brings the map back to you. */
.me-pin { width: 34px; height: 34px; border-radius: 50%; background: #2563eb; color: #fff; font-weight: 800; font-size: 12px; letter-spacing: -0.02em;
  display: grid; place-items: center; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.35); position: relative; }
.me-pin::after { content: ''; position: absolute; inset: -10px; border-radius: 50%; background: rgba(37,99,235,.3); z-index: -1; animation: ping 2s ease-out infinite; }
@keyframes ping { 0% { transform: scale(.55); opacity: .9; } 100% { transform: scale(1.35); opacity: 0; } }
.locate-btn { position: fixed; right: 14px; top: calc(var(--sat) + 104px); z-index: 10; width: 44px; min-height: 44px; padding: 0; border-radius: 50%;
  background: var(--surface); color: var(--blue); box-shadow: 0 4px 16px rgba(0,0,0,.18); }
/* Under a full-screen panel the map controls and pins are hidden too (MapLibre marks them visible). */
body.covered #map * { visibility: hidden !important; }
/* Launch features (Dec 2 2026): drivers online line, feedback card, safety and help panels. */
.avail { display: flex; align-items: center; gap: 8px; margin: -6px 0 14px; font-size: 14px; color: var(--mute); }
.avail .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--go); box-shadow: 0 0 0 3px var(--go-soft); flex: none; }
.avail.none .dot { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }
.card.rate { margin-bottom: 14px; }
.card.rate .chip svg { width: 16px; height: 16px; }
.icon-btn.sos { color: var(--bad); }
.next .who .icon-btn.sos { color: #fca5a5; }
.cta.sos-call { background: #dc2626; color: #fff; margin-top: 18px; }
.cta.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.item .ic.good { color: var(--go-text); }
.item .ic.badfb { color: var(--bad); }
.item .chip { flex: none; min-height: 36px; padding: 0 12px; font-size: 14px; }
.howto .num svg { width: 16px; height: 16px; }
.join textarea { margin-top: 14px; }
/* Boss, People: the buttons stack on the right, so names and status keep room on small phones. */
.item .pacts { display: flex; flex-direction: column; gap: 6px; align-items: stretch; flex: none; }
.item .pacts:empty { display: none; }

/* ride-org: terms checkbox, stats tiles and bars, the shift time box */
label.check { display: flex; gap: 12px; align-items: flex-start; text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 500; line-height: 1.4; cursor: pointer; }
label.check input { width: 22px; height: 22px; min-width: 22px; padding: 0; margin: 0; accent-color: #16a34a; }
.auth label.check { color: rgba(255,255,255,.8); }
.auth label.check input { background: none; }
.auth label.check a { color: #fff; }
.auth select { background-color: rgba(255,255,255,.1); color: #fff; }
.auth select option { color: #0b0b0c; }
input[type="datetime-local"] { min-width: 0; -webkit-appearance: none; appearance: none; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tile { border: 1.5px solid var(--line); border-radius: var(--r); padding: 14px; background: var(--surface); }
.tile b { display: block; font-size: 26px; }
.tile span { font-size: 13px; color: var(--mute); }
.barrow { display: grid; grid-template-columns: 70px 1fr 44px; gap: 8px; align-items: center; margin: 6px 0; font-size: 13px; }
.barrow > div { background: var(--soft); border-radius: 6px; height: 10px; overflow: hidden; }
.barrow .bar { display: block; height: 100%; background: var(--ink); }
.barrow b { text-align: right; }
a.item { text-decoration: none; color: inherit; }

/* Four tabs must fit a 320px phone. */
@media (max-width: 380px) { .seg button { font-size: 13.5px; padding-left: 2px; padding-right: 2px; min-width: 0; } }
a.icon-btn { display: grid; place-items: center; flex: none; }
.chips.wrap { flex-wrap: wrap; }
