/* PickMeUp (טרמפ) — Soft & Friendly. Lavender base, purple accents,
   rounded, playful, approachable. Real GPS route map. RTL. */
:root {
  --bg:        #f5f3f7;
  --bg-2:      #ece3f4;
  --surface:   #ffffff;
  --surface-2: #f7f2fb;
  --surface-3: #eadef5;
  --line:      #e8dff1;
  --line-2:    #f1eaf8;
  --ink:       #4a4a4a;
  --ink-2:     #6f6880;
  --ink-3:     #aaa2b8;
  --accent:    #8b5fbf;
  --accent-2:  #61398f;
  --soft:      rgba(139,95,191,0.11);
  --warm:      #61398f;
  --warm-2:    #4c2c73;
  --ok:        #3bab6d;
  --gold:      #9b6fc9;
  --danger:    #e5567e;
  --r:         18px; --r-lg: 26px; --r-sm: 13px;
  --sh:        0 8px 26px rgba(97,57,143,0.12);
  --sh-sm:     0 3px 12px rgba(97,57,143,0.08);
  --sh-accent: 0 10px 26px rgba(139,95,191,0.34);
  --disp:      'Fredoka', 'Rubik', sans-serif;
  --ui:        'Rubik', system-ui, 'Heebo', sans-serif;
  --safe-b:    env(safe-area-inset-bottom, 0px);
  --safe-t:    env(safe-area-inset-top, 0px);
}
:root[data-theme='cyan']   { --accent:#12b3c7; --accent-2:#0f97a8; --soft:rgba(18,179,199,.1); --sh-accent:0 10px 26px rgba(18,179,199,.3); }
:root[data-theme='desert'] { --accent:#f5a623; --accent-2:#dd8f14; --soft:rgba(245,166,35,.12); --sh-accent:0 10px 26px rgba(245,166,35,.3); }
:root[data-theme='hazard'] { --accent:#ff7a59; --accent-2:#f0603c; --soft:rgba(97,57,143,.12); --sh-accent:0 10px 26px rgba(97,57,143,.3); }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; overflow: hidden; background: var(--bg); }
body {
  color: var(--ink); font-family: var(--ui); font-size: 16px; line-height: 1.45;
  background: radial-gradient(700px 420px at 85% -8%, var(--soft), transparent 60%), radial-gradient(600px 400px at -10% 108%, rgba(97,57,143,.05), transparent 60%), var(--bg);
  -webkit-font-smoothing: antialiased;
}
#app { height: 100dvh; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
input { border: 0; }
.ic { flex: none; display: block; }
.mut { color: var(--ink-2); } .sm { font-size: 14px; } .xs { font-size: 12px; }
h1, h2, h3 { margin: 0; font-family: var(--disp); font-weight: 600; letter-spacing: -.01em; color: var(--ink); }
h1 { font-size: clamp(1.75rem, 6.5vw, 2.25rem); font-weight: 700; } h2 { font-size: 1.3rem; } h3 { font-size: 1.05rem; }
.accent { color: var(--accent); } .warm { color: var(--warm); } .gold { color: var(--gold); }

/* ---------- shell ---------- */
.screen { height: 100dvh; display: flex; flex-direction: column; max-width: 560px; margin: 0 auto; position: relative; }
.topbar { display: flex; align-items: center; gap: 12px; padding: calc(14px + var(--safe-t)) 18px 10px; }
.topbar .back { width: 44px; height: 44px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink); box-shadow: var(--sh-sm); }
.brand { display: inline-flex; align-items: center; gap: 11px; }
.pm-logo { flex: none; border-radius: 15px; display: grid; place-items: center; color: #fff; background: linear-gradient(150deg, var(--accent), var(--accent-2)); box-shadow: var(--sh-accent); }
.brand b { font-family: var(--disp); font-weight: 700; font-size: 21px; color: var(--ink); }
.brand span { font-size: 11px; color: var(--warm); font-weight: 600; display: block; margin-top: -3px; }
.spacer { flex: 1; }
.chip-pts { display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--accent-2); font-weight: 700; font-size: 14px; }
.chip-pts .ic { color: var(--gold); }
.body { flex: 1; overflow-y: auto; padding: 6px 18px calc(30px + var(--safe-b)); }
.body::-webkit-scrollbar { width: 8px; } .body::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 8px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: 54px; padding: 0 22px; border-radius: 16px; font-weight: 700; font-size: 16px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--sh-sm); transition: transform .1s, box-shadow .2s, filter .2s; }
.btn:active { transform: scale(.97); } .btn:disabled { opacity: .45; pointer-events: none; }
.btn.wide { width: 100%; }
.btn.accent { background: linear-gradient(150deg, var(--accent), var(--accent-2)); color: #fff; border: 0; box-shadow: var(--sh-accent); font-weight: 800; }
.btn.warm { background: linear-gradient(150deg, var(--warm), var(--warm-2)); color: #fff; border: 0; box-shadow: 0 10px 24px rgba(97,57,143,.3); font-weight: 800; }
.btn.gold { background: transparent; color: var(--gold); border: 1.5px solid rgba(155,111,201,.5); box-shadow: none; }
.btn.ghost { background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); box-shadow: var(--sh-sm); }
.btn.danger { background: transparent; color: var(--danger); border: 1.5px solid rgba(229,86,126,.4); box-shadow: none; }
.btn.sm { height: 42px; font-size: 14px; padding: 0 15px; border-radius: 12px; }
.btn.mega { height: 78px; font-size: 21px; font-weight: 800; border-radius: 20px; }
.btn.mega .ic { width: 28px; height: 28px; }

/* ---------- cards / inputs ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--sh-sm); }
.field { margin-bottom: 15px; } .field > label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 7px; }
.inp { width: 100%; height: 52px; padding: 0 15px; border-radius: 14px; background: var(--surface); border: 1.5px solid var(--line); color: var(--ink); outline: none; font-size: 16px; transition: border-color .2s, box-shadow .2s; }
.inp:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--soft); }
.inp::placeholder { color: var(--ink-3); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 800; letter-spacing: .06em; color: var(--accent); }

/* seats */
.stepper-seats { display: flex; gap: 8px; }
.seat { flex: 1; height: 52px; border-radius: 14px; background: var(--surface); border: 1.5px solid var(--line); color: var(--ink-2); font-family: var(--disp); font-weight: 700; font-size: 20px; transition: all .15s; }
.seat.on { background: linear-gradient(150deg, var(--accent), var(--accent-2)); color: #fff; border: 0; box-shadow: var(--sh-accent); }

/* ---------- auth ---------- */
.auth { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding: 30px 22px calc(30px + var(--safe-b)); max-width: 460px; margin: 0 auto; }
.auth-hero { text-align: center; margin-bottom: 24px; }
.auth-hero .pm-logo { margin: 0 auto 16px; width: 76px; height: 76px; border-radius: 24px; }
.auth-hero h1 { margin-bottom: 6px; } .auth-hero p { color: var(--ink-2); }
.auth-form .inp { margin-bottom: 12px; }
.auth-err { background: #fdeef3; border: 1px solid rgba(229,86,126,.3); color: var(--danger); border-radius: 13px; padding: 11px 14px; font-size: 14px; margin-bottom: 12px; }
.auth-switch { text-align: center; margin-top: 16px; color: var(--ink-2); font-size: 14px; }
.link { color: var(--accent); font-weight: 700; }

/* ---------- home ---------- */
.hero { margin: 8px 0 18px; } .hero h1 { line-height: 1.14; } .hero .grad { color: var(--accent); }
.hero p { color: var(--ink-2); margin-top: 8px; }
.big-actions { display: grid; gap: 13px; margin-bottom: 20px; }
.action-card { display: flex; align-items: center; gap: 15px; text-align: right; padding: 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-sm); transition: transform .14s, box-shadow .2s; }
.action-card:active { transform: scale(.98); }
.action-card.primary { background: linear-gradient(255deg, var(--soft), var(--surface)); border-color: rgba(139,95,191,.25); }
.ac-ic { width: 56px; height: 56px; flex: none; border-radius: 18px; display: grid; place-items: center; background: var(--surface-2); color: var(--accent); }
.action-card.primary .ac-ic { background: linear-gradient(150deg, var(--accent), var(--accent-2)); color: #fff; box-shadow: var(--sh-accent); }
.ac-t { flex: 1; } .ac-t b { display: block; font-family: var(--disp); font-weight: 700; font-size: 1.15rem; } .ac-t span { color: var(--ink-2); font-size: 13.5px; }
.ac-go { color: var(--ink-3); }
.sect-h { display: flex; align-items: center; justify-content: space-between; margin: 22px 0 12px; } .sect-h h2 { font-size: 1.18rem; }

/* code join */
.code-in { display: flex; gap: 10px; }
.code-in .inp { text-align: center; font-family: var(--disp); font-weight: 700; font-size: 28px; letter-spacing: .3em; text-transform: uppercase; }

/* ---------- GPS ask / trip HUD / map ---------- */
.gps-ask { text-align: center; padding: 22px; border-radius: var(--r); background: var(--soft); border: 1px solid rgba(139,95,191,.25); margin-bottom: 16px; }
.gps-ask .ic { color: var(--accent); margin: 0 auto 8px; }
.map-wrap { position: relative; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--sh-sm); background: #eaeef4; margin-bottom: 16px; }
.map-wrap .lmap-embed { width: 100%; height: 220px; z-index: 1; }
.map-wrap.tall .lmap-embed.tall { height: 300px; }

/* map-first home */
.map-screen { height: 100dvh; display: flex; flex-direction: column; max-width: 560px; margin: 0 auto; position: relative; }
.map-top { position: absolute; top: 0; right: 0; left: 0; z-index: 500; display: flex; align-items: center; gap: 10px; padding: calc(12px + var(--safe-t)) 16px 14px; background: linear-gradient(180deg, rgba(250,247,244,.96), rgba(250,247,244,.55) 70%, transparent); pointer-events: none; }
.map-top > * { pointer-events: auto; }
.lmap-full { flex: 1; width: 100%; z-index: 1; }
.map-sheet { position: absolute; bottom: 0; right: 0; left: 0; z-index: 500; background: var(--surface); border-radius: 26px 26px 0 0; box-shadow: 0 -10px 34px rgba(74,54,140,.16); padding: 10px 18px calc(18px + var(--safe-b)); }
.sheet-grab { width: 42px; height: 5px; border-radius: 5px; background: var(--line); margin: 0 auto 12px; }
.map-sheet-title { text-align: center; font-size: 13.5px; color: var(--ink-2); font-weight: 600; margin-bottom: 12px; }
.sheet-links { display: flex; justify-content: center; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.link-btn { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); padding: 8px 12px; border-radius: 11px; background: var(--surface-2); }
.link-btn .ic { color: var(--accent); }
.round-btn { width: 44px; height: 44px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; color: var(--accent); box-shadow: var(--sh-sm); }
.round-btn.locate { position: absolute; z-index: 500; inset-inline-end: 16px; bottom: 220px; }

/* fuel tracker: car card + solo HUD */
.car-card { display: flex; align-items: center; gap: 14px; width: 100%; text-align: right; padding: 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-sm); }
.cc-ic { width: 52px; height: 52px; flex: none; border-radius: 15px; display: grid; place-items: center; background: var(--surface-2); color: var(--accent); }
.cc-t { flex: 1; } .cc-t b { display: block; font-family: var(--disp); font-weight: 700; } .cc-t span { font-size: 12.5px; color: var(--ink-2); }
.cc-go { color: var(--ink-3); }
.solo-hud { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.sh-box { padding: 16px 8px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-sm); text-align: center; }
.sh-box b { display: block; font-family: var(--disp); font-weight: 700; font-size: 1.45rem; color: var(--ink); } .sh-box span { font-size: 11px; color: var(--ink-2); }
.sh-box.hero { background: linear-gradient(150deg, var(--accent), var(--accent-2)); border: 0; box-shadow: var(--sh-accent); } .sh-box.hero b { color: #fff; font-size: 1.7rem; } .sh-box.hero span { color: rgba(255,255,255,.85); }
.fuel-badge { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px; background: var(--soft); color: var(--accent); font-weight: 600; margin: 4px 0 12px; } .fuel-badge b { font-family: var(--disp); font-weight: 700; }
select.inp { -webkit-appearance: none; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a8a2ba' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left 14px center; padding-left: 38px; }

/* leaflet markers */
.mk { background: none !important; border: 0 !important; }
.mk-car { width: 42px; height: 42px; border-radius: 50%; background: #fff; border: 2.5px solid var(--accent); box-shadow: var(--sh); display: grid; place-items: center; color: var(--accent); }
.mk-pin { color: var(--warm); filter: drop-shadow(0 3px 4px rgba(0,0,0,.28)); }
.mk-pin.ok { color: var(--ok); } .mk-pin.me { color: var(--accent); }
.mk-me { width: 20px; height: 20px; border-radius: 50%; background: var(--accent); border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(139,95,191,.2), var(--sh-sm); }
.leaflet-container { font-family: var(--ui); background: #eaeef4; }
.trip-hud { position: absolute; top: 12px; inset-inline-start: 12px; display: flex; gap: 8px; }
.hud-pill { background: rgba(255,255,255,.92); backdrop-filter: blur(6px); border: 1px solid var(--line); border-radius: 12px; padding: 7px 12px; box-shadow: var(--sh-sm); text-align: center; }
.hud-pill b { display: block; font-family: var(--disp); font-weight: 700; font-size: 1.15rem; color: var(--accent); line-height: 1; } .hud-pill span { font-size: 10px; color: var(--ink-2); }
.map-badge { position: absolute; bottom: 10px; inset-inline-end: 12px; font-size: 10px; color: var(--ink-3); background: rgba(255,255,255,.8); padding: 3px 8px; border-radius: 7px; }

/* nearby rides */
.nearby { display: grid; gap: 11px; }
.ride-card { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-sm); text-align: right; transition: transform .12s, border-color .2s; }
.ride-card:active { transform: scale(.98); } .ride-card:hover { border-color: rgba(139,95,191,.3); }
.rc-av { width: 52px; height: 52px; flex: none; border-radius: 16px; display: grid; place-items: center; background: var(--surface-2); color: var(--accent); }
.rc-t { flex: 1; min-width: 0; } .rc-t b { display: block; font-family: var(--disp); font-weight: 700; } .rc-t span { font-size: 13px; color: var(--ink-2); }
.rc-dist { text-align: center; } .rc-dist b { font-family: var(--disp); font-weight: 700; color: var(--warm); font-size: 1.1rem; display: block; } .rc-dist span { font-size: 10px; color: var(--ink-3); }

/* route slider (fallback / preview) */
.route-map { margin: 16px 0; padding: 20px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-sm); }
.route-ends { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-2); margin-bottom: 14px; } .route-ends b { color: var(--ink); font-family: var(--disp); font-weight: 700; }
.rt { position: relative; height: 46px; margin: 24px 6px 6px; }
.rt-line { position: absolute; top: 50%; right: 0; left: 0; height: 6px; transform: translateY(-50%); border-radius: 6px; background: var(--surface-3); }
.rt-fill { position: absolute; top: 50%; height: 6px; transform: translateY(-50%); border-radius: 6px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.rt-h { position: absolute; top: 50%; width: 32px; height: 32px; transform: translate(50%, -50%); border-radius: 50%; background: #fff; border: 3px solid var(--accent); display: grid; place-items: center; touch-action: none; box-shadow: var(--sh); }
.rt-h .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.rt-lab { position: absolute; top: -23px; transform: translateX(50%); font-size: 11px; font-weight: 700; color: var(--accent); white-space: nowrap; }
.km-note { text-align: center; font-size: 13px; color: var(--ink-2); margin-top: 6px; } .km-note b { color: var(--warm); font-family: var(--disp); font-weight: 700; }

/* ---------- driver board ---------- */
.status-strip { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-radius: 15px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-sm); margin-bottom: 16px; }
.status-strip .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(34,197,94,.15); animation: pulse 1.8s infinite; }
.status-strip b { font-family: var(--disp); font-weight: 700; } .code-badge { margin-inline-start: auto; font-family: var(--disp); font-weight: 700; font-size: 18px; letter-spacing: .18em; color: var(--accent); background: var(--soft); padding: 4px 12px; border-radius: 10px; }
@keyframes pulse { 50% { opacity: .4; } }

.next-card { padding: 22px 20px; border-radius: var(--r-lg); background: linear-gradient(255deg, var(--soft), var(--surface)); border: 1.5px solid rgba(139,95,191,.35); box-shadow: var(--sh); margin-bottom: 16px; }
.next-card .eyebrow { color: var(--warm); }
.next-name { font-family: var(--disp); font-weight: 700; font-size: 2rem; margin: 8px 0 4px; }
.next-where { color: var(--ink-2); display: flex; align-items: center; gap: 6px; } .next-where .ic { color: var(--accent); }
.next-actions { display: grid; gap: 12px; margin-top: 18px; }

.pax-list { display: grid; gap: 10px; }
.pax-row { display: flex; align-items: center; gap: 13px; padding: 14px 15px; border-radius: 15px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-sm); }
.pax-row.onboard { border-color: rgba(34,197,94,.4); background: linear-gradient(255deg, rgba(34,197,94,.06), var(--surface)); }
.pax-row.approaching { border-color: var(--warm); animation: flashRow 1s infinite; }
@keyframes flashRow { 50% { background: rgba(97,57,143,.1); } }
.pax-av { width: 48px; height: 48px; flex: none; border-radius: 15px; display: grid; place-items: center; background: var(--surface-2); color: var(--accent); }
.pax-t { flex: 1; min-width: 0; } .pax-t b { display: block; } .pax-t span { font-size: 12.5px; color: var(--ink-2); }
.pax-badge { font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 9px; }
.pax-badge.waiting { background: var(--surface-3); color: var(--ink-2); }
.pax-badge.approaching { background: rgba(97,57,143,.16); color: var(--warm-2); }
.pax-badge.onboard { background: rgba(34,197,94,.14); color: #16a34a; }
.pax-badge.dropped { background: var(--surface-3); color: var(--ink-3); }

/* ---------- passenger view ---------- */
.pv-hero { text-align: center; padding: 20px 0 8px; } .pv-hero .pm-logo { margin: 0 auto 14px; }
.pv-route { display: flex; align-items: center; justify-content: center; gap: 10px; font-family: var(--disp); font-weight: 700; font-size: 1.35rem; margin: 6px 0; } .pv-route .ic { color: var(--accent); }
.pv-status { margin: 16px 0; padding: 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-sm); text-align: center; }
.pv-status .big { font-family: var(--disp); font-weight: 700; font-size: 1.6rem; margin: 8px 0; }
.pv-you { padding: 16px; }

/* approach overlay — warm friendly urgency */
.approach { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; text-align: center; padding: 30px; background: linear-gradient(160deg, var(--warm), var(--warm-2)); color: #fff; animation: warmFlash .7s steps(1) infinite; }
@keyframes warmFlash { 50% { background: linear-gradient(160deg, var(--accent), var(--accent-2)); } }
.approach .ic { width: 92px; height: 92px; margin: 0 auto 18px; color: #fff; }
.approach h1 { font-size: 2.6rem; color: #fff; } .approach p { font-size: 1.2rem; font-weight: 600; margin: 8px 0 26px; }
.approach .btn { background: #fff; color: var(--warm-2); height: 60px; font-size: 18px; border: 0; }

/* ---------- ledger ---------- */
.ledger-hero { text-align: center; padding: 10px 0 6px; }
.ledger-total { font-family: var(--disp); font-weight: 700; font-size: 2.7rem; color: var(--accent); }
.ledger-sub { color: var(--ink-2); }
.ledger-list { display: grid; gap: 10px; margin: 18px 0; }
.ledger-row { display: flex; align-items: center; gap: 13px; padding: 15px; border-radius: 15px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-sm); }
.lr-t { flex: 1; } .lr-t b { display: block; } .lr-t span { font-size: 12.5px; color: var(--ink-2); }
.lr-amt { font-family: var(--disp); font-weight: 700; font-size: 1.4rem; color: var(--warm); }
.ledger-row.driver .lr-amt { color: var(--ink-3); }
.seg-bar { display: flex; height: 16px; border-radius: 9px; overflow: hidden; margin: 6px 0 4px; }
.seg-bar i { display: block; height: 100%; }
.balanced { display: inline-flex; align-items: center; gap: 6px; color: var(--ok); font-size: 13px; font-weight: 700; }

/* ---------- profile / shop ---------- */
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0; }
.stat { padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-sm); text-align: center; }
.stat b { display: block; font-family: var(--disp); font-weight: 700; font-size: 1.5rem; color: var(--accent); } .stat span { font-size: 12px; color: var(--ink-2); }
.shop-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.cosmetic { padding: 15px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-sm); text-align: center; transition: border-color .2s; }
.cosmetic.equipped { border-color: var(--accent); box-shadow: 0 0 0 2px var(--soft); }
.cosmetic .prev { height: 46px; display: grid; place-items: center; color: var(--accent); margin-bottom: 8px; }
.cosmetic .cn { font-weight: 700; font-size: 14px; } .cosmetic .cp { font-size: 12px; color: var(--gold); margin-top: 3px; }
.swatch { width: 36px; height: 36px; border-radius: 11px; border: 2px solid var(--line); }
.cos-btn { margin-top: 10px; width: 100%; height: 38px; border-radius: 11px; font-size: 13px; font-weight: 700; background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); }
.cos-btn.buy { background: var(--gold); color: #fff; border: 0; } .cos-btn.on { background: var(--accent); color: #fff; border: 0; }

/* ---------- misc ---------- */
.empty { text-align: center; padding: 40px 20px; color: var(--ink-2); } .empty .ic { margin: 0 auto 12px; color: var(--ink-3); }
.spin { width: 42px; height: 42px; border-radius: 50%; border: 4px solid var(--surface-3); border-top-color: var(--accent); animation: spin .9s linear infinite; margin: 40px auto; }
.boot { height: 100dvh; display: grid; place-items: center; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; left: 50%; bottom: calc(88px + var(--safe-b)); transform: translateX(-50%); z-index: 720; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 14px; font-size: 14px; box-shadow: var(--sh); max-width: 90%; text-align: center; animation: toastUp .28s cubic-bezier(.16,1,.3,1) both; }
@keyframes toastUp { from { opacity: 0; transform: translate(-50%, 12px); } }
.hist-row { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 15px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-sm); margin-bottom: 9px; }
.hr-ic { flex: none; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-2); color: var(--accent); }
.hist-row b { font-family: var(--disp); font-weight: 700; } .hist-row .m { margin-inline-start: auto; color: var(--warm); font-weight: 700; font-family: var(--disp); }
.hr-del { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--ink-3); background: var(--surface-2); transition: color .15s, background .15s; }
.hr-del:active { color: var(--danger); background: #fbe7ee; }
@keyframes reveal { from { opacity: 0; transform: translateY(12px); } }
.reveal { animation: reveal .45s cubic-bezier(.16,1,.3,1) both; animation-delay: var(--d, 0s); }

/* ---------- splash / entry animation ---------- */
.splash { height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 30px; overflow: hidden; background: radial-gradient(680px 420px at 50% 12%, var(--soft), transparent 65%), var(--bg); }
.splash-logo { text-align: center; animation: reveal .5s both; }
.splash-logo .pm-logo { margin: 0 auto 14px; animation: logoPop .7s cubic-bezier(.2,1.4,.4,1) both; }
.splash-logo b { display: block; font-family: var(--disp); font-weight: 700; font-size: 2rem; letter-spacing: -.01em; }
.splash-logo span { font-size: 13px; color: var(--ink-2); }
@keyframes logoPop { from { opacity: 0; transform: scale(.5) rotate(-25deg); } }
.splash-scene { position: relative; width: min(320px, 78vw); height: 130px; }
.splash-hills { position: absolute; inset: auto 0 0 0; height: 62px; background:
  radial-gradient(90px 60px at 22% 100%, var(--surface-3) 60%, transparent 62%),
  radial-gradient(120px 74px at 72% 100%, var(--surface-2) 60%, transparent 62%); opacity: .9; }
.splash-road { position: absolute; left: -6%; right: -6%; bottom: 30px; height: 8px; border-radius: 6px; background: var(--ink); overflow: hidden; display: flex; align-items: center; }
.splash-road i { flex: none; width: 26px; height: 3px; margin-inline-start: 22px; border-radius: 3px; background: var(--gold); animation: dash 0.6s linear infinite; }
@keyframes dash { to { transform: translateX(-48px); } }
.splash-car { position: absolute; bottom: 26px; left: 50%; color: var(--accent); animation: carBob .5s ease-in-out infinite alternate; filter: drop-shadow(0 8px 10px rgba(139,95,191,.28)); }
.splash-car .ic { width: 58px; height: 58px; }
@keyframes carBob { from { transform: translate(-50%, 0); } to { transform: translate(-50%, -5px); } }

/* ---------- solo (Waze-like live trip) ---------- */
.solo-screen { position: relative; height: 100dvh; max-width: 560px; margin: 0 auto; overflow: hidden; }
.lmap-solo { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.solo-top { position: absolute; top: 0; right: 0; left: 0; z-index: 500; padding: calc(12px + var(--safe-t)) 14px 0; pointer-events: none; }
.solo-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; background: rgba(255,255,255,.94); backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: 20px; padding: 12px 8px; box-shadow: 0 8px 26px rgba(74,54,140,.18); animation: reveal .45s both; }
.solo-stats .ss { text-align: center; position: relative; }
.solo-stats .ss + .ss::before { content: ''; position: absolute; inset-inline-start: 0; top: 14%; height: 72%; width: 1px; background: var(--line); }
.solo-stats .ss b { display: block; font-family: var(--disp); font-weight: 700; font-size: 1.55rem; line-height: 1.05; color: var(--ink); font-variant-numeric: tabular-nums; }
.solo-stats .ss span { font-size: 11px; color: var(--ink-2); }
.solo-stats .ss.cost b { color: var(--warm); }
.solo-gps { pointer-events: auto; margin: 10px auto 0; width: max-content; max-width: 100%; display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: #fff; background: var(--warm); padding: 9px 14px; border-radius: 12px; box-shadow: var(--sh-sm); }
.solo-bottom { position: absolute; bottom: 0; right: 0; left: 0; z-index: 500; display: flex; align-items: center; gap: 12px; padding: 16px 16px calc(18px + var(--safe-b)); background: linear-gradient(0deg, rgba(250,247,244,.96), rgba(250,247,244,.5) 60%, transparent); }
.solo-bottom .btn { flex: 1; box-shadow: 0 10px 26px rgba(97,57,143,.32); }
.round-btn.cancel { flex: none; width: 58px; height: 58px; border-radius: 18px; color: var(--danger); }
.mk-nav { width: 44px; height: 44px; border-radius: 50%; background: #fff; border: 2.5px solid var(--accent); box-shadow: var(--sh); display: grid; place-items: center; color: var(--accent); transition: transform .5s ease; }
.mk-nav::after { content: ''; position: absolute; inset: -7px; border-radius: 50%; border: 2px solid var(--accent); opacity: .55; animation: navPulse 2.2s ease-out infinite; }
@keyframes navPulse { 0% { transform: scale(.7); opacity: .55; } 100% { transform: scale(1.5); opacity: 0; } }
/* smooth glide of the live position + heading-up map rotation */
.lmap-solo { transform-origin: 50% 50%; will-change: transform; }
.lmap-solo.rot { transition: transform .55s cubic-bezier(.4,0,.2,1); }
.lmap-solo .leaflet-marker-icon { transition: transform .85s linear; }
.rotate-btn { position: absolute; z-index: 500; inset-inline-start: 16px; top: calc(104px + var(--safe-t)); color: var(--ink-3); }
.rotate-btn.on { color: var(--accent); box-shadow: 0 0 0 2px var(--soft), var(--sh-sm); }

/* ---------- summary: route + graphs + friend split ---------- */
.ledger-hero .ledger-total { font-variant-numeric: tabular-nums; }
.chart-card { padding: 16px 12px 12px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-sm); margin-bottom: 4px; }
.spd-svg { display: block; width: 100%; height: 96px; }
.spd-line { stroke-dasharray: 900; stroke-dashoffset: 900; animation: draw 1.1s .2s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.spd-avg { text-align: center; font-size: 12.5px; color: var(--ink-2); margin-top: 8px; } .spd-avg b { font-family: var(--disp); font-weight: 700; color: var(--accent); }
.split-card { padding: 8px 14px 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-sm); }
.split-row { display: flex; align-items: center; gap: 11px; padding: 12px 2px; border-bottom: 1px solid var(--line-2); }
.split-row:last-of-type { border-bottom: 0; }
.split-row b { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.split-row.paid b { color: var(--ink-3); text-decoration: line-through; }
.sp-av { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--accent); }
.sp-amt { font-family: var(--disp); font-weight: 700; color: var(--warm); font-variant-numeric: tabular-nums; }
.pay-toggle { flex: none; display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; padding: 7px 11px; border-radius: 10px; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.pay-toggle.on { background: rgba(34,197,94,.14); color: #16a34a; border-color: rgba(34,197,94,.35); }
.sp-x { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: var(--ink-3); background: none; }
.add-friend { display: flex; gap: 8px; margin-top: 12px; }
.add-friend .inp { flex: 1; height: 46px; }
.add-friend .btn { flex: none; white-space: nowrap; }
.split-note { margin-top: 12px; text-align: center; font-size: 12.5px; color: var(--ink-2); } .split-note b { font-family: var(--disp); font-weight: 700; color: var(--accent); }

/* ---------- car picker (custom bottom-sheet, replaces native selects) ---------- */
.picker-field { display: flex; align-items: center; gap: 8px; width: 100%; height: 52px; padding: 0 14px; border-radius: 14px; background: var(--surface); border: 1.5px solid var(--line); color: var(--ink-3); text-align: start; box-shadow: var(--sh-sm); transition: border-color .15s, transform .1s; }
.picker-field:active { transform: scale(.98); }
.picker-field.has { color: var(--ink); border-color: rgba(139,95,191,.35); }
.picker-field:disabled { opacity: .5; box-shadow: none; }
.picker-field span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.picker-field .ic { color: var(--ink-3); }
.sheet-backdrop { position: fixed; inset: 0; z-index: 660; background: rgba(46,30,66,.34); backdrop-filter: blur(2px); animation: fade .2s both; }
@keyframes fade { from { opacity: 0; } }
.picker-sheet { position: fixed; z-index: 661; left: 0; right: 0; bottom: 0; max-width: 560px; margin: 0 auto; background: var(--surface); border-radius: 26px 26px 0 0; box-shadow: 0 -12px 40px rgba(46,30,66,.24); padding: 10px 16px calc(14px + var(--safe-b)); max-height: 78dvh; display: flex; flex-direction: column; animation: sheetUp .32s cubic-bezier(.16,1,.3,1) both; }
@keyframes sheetUp { from { transform: translateY(100%); } }
.picker-head { display: flex; align-items: center; gap: 10px; padding: 2px 2px 12px; }
.picker-head b { flex: 1; font-family: var(--disp); font-weight: 700; font-size: 1.25rem; }
.picker-search { display: flex; align-items: center; gap: 9px; padding: 0 13px; margin-bottom: 10px; background: var(--surface-2); border: 1.5px solid var(--line); border-radius: 13px; }
.picker-search .ic { color: var(--ink-3); } .picker-search .inp { border: 0; background: none; box-shadow: none; height: 48px; padding: 0; }
.picker-list { overflow-y: auto; display: flex; flex-direction: column; gap: 4px; padding: 2px 0 4px; -webkit-overflow-scrolling: touch; }
.picker-opt { display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 10px 14px; border-radius: 13px; text-align: start; font-size: 16px; font-weight: 600; color: var(--ink); background: var(--surface); }
.picker-opt span, .picker-opt { justify-content: flex-start; }
.picker-opt:active { background: var(--surface-2); }
.picker-opt.on { background: var(--soft); color: var(--accent); }
.picker-opt .ic { margin-inline-start: auto; color: var(--accent); }

/* ---------- map style switcher ---------- */
.map-style-btn { position: absolute; z-index: 500; inset-inline-start: 16px; top: calc(64px + var(--safe-t)); display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 13px; border-radius: 13px; background: rgba(255,255,255,.94); backdrop-filter: blur(8px); border: 1px solid var(--line); color: var(--accent); font-weight: 700; font-size: 13px; box-shadow: var(--sh-sm); }
.solo-screen .map-style-btn { inset-inline-start: auto; inset-inline-end: 16px; top: auto; bottom: 120px; }
.lmap-full.sat, .lmap-solo.sat, .map-wrap .lmap-embed.sat { background: #223140; }

/* ---------- page transitions ---------- */
#app { background: var(--bg); }
.page { height: 100%; }
.page.push { animation: pgPush .34s cubic-bezier(.16,1,.3,1) both; }
.page.pop  { animation: pgPop .34s cubic-bezier(.16,1,.3,1) both; }
.page.fade { animation: pgFade .26s ease both; }
@keyframes pgPush { from { opacity: 0; transform: translateX(30px); } }
@keyframes pgPop  { from { opacity: 0; transform: translateX(-30px); } }
@keyframes pgFade { from { opacity: 0; transform: scale(.985); } }

/* ---------- bottom tab nav ---------- */
.bottom-nav { position: fixed; z-index: 600; left: 0; right: 0; bottom: 0; max-width: 560px; margin: 0 auto; height: calc(60px + var(--safe-b)); padding-bottom: var(--safe-b); display: flex; background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -6px 22px rgba(97,57,143,.09); }
.nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--ink-3); font-size: 11px; font-weight: 600; transition: color .2s; }
.nav-item .ni-ic { display: grid; place-items: center; transition: transform .22s cubic-bezier(.2,1.4,.4,1); }
.nav-item:active .ni-ic { transform: scale(.88); }
.nav-item.on { color: var(--accent); }
.nav-item.on .ni-ic { transform: translateY(-2px); }
.tabbed .body { padding-bottom: calc(84px + var(--safe-b)); }

/* ---------- map-first home ---------- */
.map-home { position: relative; height: 100dvh; max-width: 560px; margin: 0 auto; overflow: hidden; }
.lmap-home { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.home-top { position: absolute; z-index: 500; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; padding: calc(12px + var(--safe-t)) 16px 0; pointer-events: none; }
.home-top > * { pointer-events: auto; }
.brand-mini { display: inline-flex; align-items: center; gap: 9px; background: rgba(255,255,255,.9); backdrop-filter: blur(8px); padding: 6px 12px; border-radius: 15px; box-shadow: var(--sh-sm); }
.brand-mini .pm-logo { border-radius: 11px; }
.brand-mini b { font-family: var(--disp); font-weight: 700; font-size: 16px; }
.home-locate { position: absolute; z-index: 500; inset-inline-end: 16px; top: calc(64px + var(--safe-t)); }
.map-home:has(.home-sheet.full) .map-style-btn, .map-home:has(.home-sheet.full) .home-locate, .map-home:has(.home-sheet.full) .report-btn { opacity: 0; pointer-events: none; transition: opacity .2s; }

.home-sheet { position: absolute; z-index: 400; left: 0; right: 0; bottom: calc(60px + var(--safe-b)); height: 82dvh; background: var(--surface); border-radius: 28px 28px 0 0; box-shadow: 0 -14px 44px rgba(97,57,143,.18); display: flex; flex-direction: column; transition: transform .34s cubic-bezier(.16,1,.3,1); will-change: transform; }
.sheet-handle { flex: none; padding: 0 18px 12px; touch-action: none; cursor: grab; }
.sheet-handle:active { cursor: grabbing; }
.grip { display: flex; justify-content: center; padding: 11px 0 8px; margin: 0 -18px; }
.grip span { width: 46px; height: 5px; border-radius: 5px; background: var(--line); }
.sheet-scroll { flex: 1; overflow-x: hidden; padding: 4px 18px 24px; -webkit-overflow-scrolling: touch; }
.home-sheet.peek .sheet-scroll { overflow-y: hidden; }
.home-sheet.full .sheet-scroll { overflow-y: auto; }
.hi-row { margin: 0 0 12px; } .hi-row .mut { display: block; } .hi-row h2 { line-height: 1.1; font-size: 1.45rem; } .hi-row .grad { color: var(--accent); }
.start-cta { margin-bottom: 0; }
.car-chip { display: flex; align-items: center; gap: 11px; width: 100%; text-align: start; padding: 11px 14px; border-radius: 15px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink); margin-bottom: 14px; }
.car-chip .cc-ic { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--surface); color: var(--accent); box-shadow: var(--sh-sm); }
.car-chip .cc-t { flex: 1; min-width: 0; } .car-chip .cc-t b { display: block; font-family: var(--disp); font-weight: 700; font-size: 15px; } .car-chip .cc-t span { font-size: 12px; color: var(--ink-2); }
.car-chip > .ic { color: var(--ink-3); }
.stat-row.tight { margin: 0 0 6px; gap: 10px; }
.stat-row.tight .stat { padding: 13px 8px; }
.sheet-more { padding-top: 8px; }

/* ---------- settings rows (profile) ---------- */
.settings-row { display: flex; align-items: center; gap: 13px; width: 100%; text-align: start; padding: 15px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-sm); margin-bottom: 10px; }
.sr-ic { width: 46px; height: 46px; flex: none; border-radius: 14px; display: grid; place-items: center; background: var(--surface-2); color: var(--accent); }
.sr-t { flex: 1; min-width: 0; } .sr-t b { display: block; font-family: var(--disp); font-weight: 700; } .sr-t span { font-size: 12.5px; color: var(--ink-2); }
.settings-row > .ic { color: var(--ink-3); }

/* ---------- live speedometer ---------- */
.speedo { position: absolute; z-index: 500; inset-inline-start: 16px; bottom: 118px; width: 92px; height: 92px; filter: drop-shadow(0 6px 16px rgba(97,57,143,.22)); }
.speedo svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.sp-track { fill: rgba(255,255,255,.92); stroke: var(--line); stroke-width: 7; }
.sp-fill { fill: none; stroke: var(--accent); stroke-width: 7; stroke-linecap: round; stroke-dasharray: 264; stroke-dashoffset: 264; transition: stroke-dashoffset .55s ease; }
.sp-val { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.sp-val b { font-family: var(--disp); font-weight: 700; font-size: 1.85rem; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.sp-val span { font-size: 10px; color: var(--ink-2); margin-top: 2px; }

/* ---------- in-app modal (confirm/alert) ---------- */
.modal-back { position: fixed; inset: 0; z-index: 800; background: rgba(46,30,66,.4); backdrop-filter: blur(3px); animation: fade .2s both; }
.modal-card { position: fixed; z-index: 801; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(360px, 88vw); background: var(--surface); border-radius: 24px; padding: 24px 22px 20px; box-shadow: 0 24px 60px rgba(46,30,66,.34); text-align: center; animation: modalPop .3s cubic-bezier(.2,1.3,.4,1) both; }
@keyframes modalPop { from { opacity: 0; transform: translate(-50%, -46%) scale(.9); } }
.modal-card h3 { font-size: 1.3rem; }
.modal-card p { color: var(--ink-2); margin: 8px 0 0; font-size: 14.5px; }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; }
.modal-actions .btn { flex: 1; height: 50px; }
.btn.danger-solid { background: linear-gradient(150deg, var(--danger), #c73862); color: #fff; border: 0; box-shadow: 0 10px 24px rgba(229,86,126,.32); font-weight: 800; }

/* ---------- garage / car types / currency ---------- */
.type-chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.type-chip { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 12px 4px; border-radius: 14px; background: var(--surface); border: 1.5px solid var(--line); color: var(--ink-2); font-size: 11.5px; font-weight: 600; transition: all .15s; }
.type-chip .ic { color: var(--ink-3); transition: color .15s; }
.type-chip.on { border-color: var(--accent); background: var(--soft); color: var(--accent); } .type-chip.on .ic { color: var(--accent); }
.cur-chips { display: flex; gap: 8px; }
.cur-chip { flex: 1; height: 52px; border-radius: 14px; background: var(--surface); border: 1.5px solid var(--line); color: var(--ink-2); font-family: var(--disp); font-weight: 700; font-size: 20px; }
.cur-chip.on { border-color: var(--accent); background: var(--soft); color: var(--accent); }
.car-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.cr-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 13px; padding: 14px 15px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-sm); text-align: start; transition: border-color .2s; }
.car-row.active .cr-main { border-color: var(--accent); box-shadow: 0 0 0 2px var(--soft); }
.cr-main .sr-t { flex: 1; min-width: 0; } .cr-main .sr-t b { display: block; font-family: var(--disp); font-weight: 700; } .cr-main .sr-t span { font-size: 12.5px; color: var(--ink-2); }
.active-badge { flex: none; display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 800; color: var(--accent); background: var(--soft); padding: 4px 9px; border-radius: 9px; }
.cr-btn { flex: none; width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-sm); }
.cr-btn.del { color: var(--ink-3); } .cr-btn.del:active { color: var(--danger); }
.car-opt { min-height: 58px; } .car-opt .sr-ic { width: 40px; height: 40px; border-radius: 12px; } .car-opt .co-t { flex: 1; } .car-opt .co-t b { display: block; }

/* ---------- speed limit warning ---------- */
.sp-limit { position: absolute; top: -6px; inset-inline-end: -6px; min-width: 26px; height: 26px; padding: 0 5px; border-radius: 50%; background: #fff; border: 2.5px solid var(--danger); color: var(--danger); font-family: var(--disp); font-weight: 700; font-size: 12px; display: grid; place-items: center; box-shadow: var(--sh-sm); }
.speedo.over .sp-fill { stroke: var(--danger); }
.speedo.over .sp-val b { color: var(--danger); }
.speedo.over { animation: speedoPulse .7s ease-in-out infinite; }
@keyframes speedoPulse { 50% { filter: drop-shadow(0 6px 18px rgba(229,86,126,.5)); } }

/* ---------- friends + location share ---------- */
.share-toggle { display: flex; align-items: center; gap: 13px; width: 100%; text-align: start; padding: 14px 15px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-sm); margin-bottom: 12px; transition: border-color .2s; }
.share-toggle.on { border-color: var(--accent); background: linear-gradient(255deg, var(--soft), var(--surface)); }
.st-ic { width: 44px; height: 44px; flex: none; border-radius: 13px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-3); }
.share-toggle.on .st-ic { background: linear-gradient(150deg, var(--accent), var(--accent-2)); color: #fff; }
.st-t { flex: 1; min-width: 0; } .st-t b { display: block; font-family: var(--disp); font-weight: 700; } .st-t span { font-size: 12.5px; color: var(--ink-2); }
.switch { flex: none; width: 46px; height: 28px; border-radius: 999px; background: var(--surface-3); position: relative; transition: background .2s; }
.switch i { position: absolute; top: 3px; inset-inline-start: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: var(--sh-sm); transition: transform .22s cubic-bezier(.4,0,.2,1); }
.switch.on { background: var(--accent); } .switch.on i { transform: translateX(-18px); }
.friend-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 15px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-sm); margin-bottom: 9px; }
.friend-row.live { border-color: rgba(139,95,191,.3); }
.friend-row.req { background: linear-gradient(255deg, var(--soft), var(--surface)); }
.fr-av { position: relative; width: 42px; height: 42px; flex: none; border-radius: 13px; display: grid; place-items: center; background: var(--surface-2); color: var(--accent); }
.fr-av.big { width: 52px; height: 52px; border-radius: 16px; }
.fr-av .live-dot { position: absolute; inset-inline-end: -2px; top: -2px; width: 12px; height: 12px; border-radius: 50%; background: var(--ok); border: 2px solid #fff; animation: pulse 1.8s infinite; }
.fr-t { flex: 1; min-width: 0; } .fr-t b { display: block; font-family: var(--disp); font-weight: 700; } .fr-t span { font-size: 12.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.fr-go { flex: none; color: var(--accent); }
.fr-x { flex: none; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: var(--ink-3); background: var(--surface-2); }
/* friend map marker */
.mk-friend { display: flex; flex-direction: column; align-items: center; }
.mkf-dot { width: 40px; height: 40px; border-radius: 50%; background: #fff; border: 2.5px solid var(--accent); box-shadow: var(--sh); display: grid; place-items: center; color: var(--accent); }
.mkf-name { margin-top: 3px; font-size: 11px; font-weight: 700; color: #fff; background: var(--accent); padding: 2px 7px; border-radius: 8px; white-space: nowrap; box-shadow: var(--sh-sm); }
/* friend focus card on the home map */
.friend-card { position: absolute; z-index: 450; left: 0; right: 0; bottom: calc(60px + var(--safe-b)); max-width: 560px; margin: 0 auto; background: var(--surface); border-radius: 28px 28px 0 0; box-shadow: 0 -14px 44px rgba(97,57,143,.18); padding: 22px 18px calc(18px + var(--safe-b)); }
.fc-close { position: absolute; top: 14px; inset-inline-end: 16px; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--ink-3); background: var(--surface-2); }
.fc-head { display: flex; align-items: center; gap: 13px; margin-bottom: 12px; }
.fc-h-t b { display: block; font-family: var(--disp); font-weight: 700; font-size: 1.3rem; }
.fc-addr { display: flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--ink-2); background: var(--surface-2); padding: 11px 13px; border-radius: 13px; margin-bottom: 14px; } .fc-addr .ic { color: var(--accent); flex: none; }
.home-sheet.hidden { display: none; }

/* ---------- hazard reports (Waze-style) ---------- */
.report-btn { color: var(--danger); }
.home-report { position: absolute; z-index: 500; inset-inline-end: 16px; top: calc(112px + var(--safe-t)); }
.solo-report { position: absolute; z-index: 500; inset-inline-start: 16px; top: calc(158px + var(--safe-t)); color: var(--danger); }
.mk-haz { width: 40px; height: 40px; border-radius: 50% 50% 50% 6px; transform: rotate(45deg); background: var(--hc, var(--accent)); border: 2.5px solid #fff; box-shadow: var(--sh); display: grid; place-items: center; }
.mk-haz .ic { transform: rotate(-45deg); color: #fff; }
.report-sheet .haz-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 4px 0 6px; }
.haz-opt { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 6px; border-radius: 16px; background: var(--surface); border: 1.5px solid var(--line); box-shadow: var(--sh-sm); font-size: 12.5px; font-weight: 600; color: var(--ink); transition: transform .1s; }
.haz-opt:active { transform: scale(.95); }
.ho-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--hc, var(--accent)); color: #fff; box-shadow: 0 6px 16px color-mix(in srgb, var(--hc, var(--accent)) 40%, transparent); }
.sheet-backdrop.light { background: rgba(46,30,66,.18); }
.haz-card { position: fixed; z-index: 661; left: 0; right: 0; bottom: calc(60px + var(--safe-b)); max-width: 560px; margin: 0 auto; background: var(--surface); border-radius: 26px 26px 0 0; box-shadow: 0 -14px 44px rgba(97,57,143,.2); padding: 22px 18px 18px; animation: sheetUp .3s cubic-bezier(.16,1,.3,1) both; }
.haz-card.on-solo { bottom: 0; padding-bottom: calc(18px + var(--safe-b)); }
/* shared-ride toggle (on the trip) + summary badge */
.share-ride-chip { margin: 10px auto 0; display: flex; align-items: center; gap: 6px; width: max-content; font-size: 12.5px; font-weight: 700; color: var(--ink-2); background: rgba(255,255,255,.94); backdrop-filter: blur(8px); border: 1px solid var(--line); padding: 9px 15px; border-radius: 999px; box-shadow: var(--sh-sm); pointer-events: auto; }
.share-ride-chip.on { color: #fff; background: linear-gradient(150deg, var(--accent), var(--accent-2)); border: 0; box-shadow: var(--sh-accent); }
.shared-badge { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 12.5px; font-weight: 700; color: var(--accent); background: var(--soft); padding: 6px 13px; border-radius: 999px; }
/* Spotify demo widget (placeholder until OAuth keys) */
.soon-tag { font-size: 10.5px; font-weight: 800; color: var(--ok); background: rgba(59,171,109,.14); padding: 3px 9px; border-radius: 999px; }
.spotify-demo { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; background: linear-gradient(120deg, #1a1526, #2a2440); color: #fff; box-shadow: var(--sh-sm); }
.sp-cover { width: 46px; height: 46px; flex: none; border-radius: 12px; display: grid; place-items: center; background: rgba(59,171,109,.22); color: #3bdb7d; }
.sp-info { flex: 1; min-width: 0; } .sp-info b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .sp-info .mut { color: rgba(255,255,255,.55) !important; }
.sp-bar { height: 3px; border-radius: 3px; background: rgba(255,255,255,.18); margin-top: 7px; overflow: hidden; } .sp-bar i { display: block; height: 100%; width: 38%; background: #3bdb7d; border-radius: 3px; }
.sp-ctrl { display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,.85); } .sp-ctrl .ic { opacity: .6; }
.sp-play { width: 34px; height: 34px; border-radius: 50%; background: #3bdb7d; color: #0a2417; display: grid; place-items: center; } .sp-play .ic { opacity: 1; }
.sp-cover.spin { animation: coverPulse 1.7s ease-in-out infinite; }
@keyframes coverPulse { 50% { transform: scale(1.07); } }
.np-time { display: block; margin-top: 3px; color: rgba(255,255,255,.5) !important; }
/* animated equalizer */
.np-eq { display: flex; align-items: flex-end; gap: 2.5px; height: 15px; flex: none; }
.np-eq i { width: 3px; height: 35%; background: #3bdb7d; border-radius: 2px; }
.np-eq.playing i { animation: eqBar .9s ease-in-out infinite; }
.np-eq.playing i:nth-child(2) { animation-delay: .22s; } .np-eq.playing i:nth-child(3) { animation-delay: .44s; } .np-eq.playing i:nth-child(4) { animation-delay: .12s; }
@keyframes eqBar { 0%, 100% { height: 28%; } 50% { height: 100%; } }
/* now-playing mini bar on the map */
.now-playing.mini { position: absolute; z-index: 500; top: calc(64px + var(--safe-t)); left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 9px; max-width: 64%; height: 42px; padding: 0 5px 0 13px; border-radius: 999px; background: rgba(26,21,38,.93); backdrop-filter: blur(10px); color: #fff; box-shadow: 0 8px 24px rgba(46,30,66,.28); overflow: hidden; }
.mini-fill { position: absolute; bottom: 0; inset-inline-start: 0; height: 3px; width: 0; background: #3bdb7d; border-radius: 0 3px 3px 0; transition: width 1s linear; }
.solo-screen .now-playing.mini { top: calc(98px + var(--safe-t)); }
.now-playing.mini .sp-glyph { color: #3bdb7d; flex: none; display: grid; }
.now-playing.mini .np-title { font-size: 12.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.mini-play { width: 32px; height: 32px; border-radius: 50%; background: #3bdb7d; color: #0a2417; display: grid; place-items: center; flex: none; }
.mini-play .ic { opacity: 1; }
.map-home:has(.home-sheet.full) .now-playing.mini { opacity: 0; pointer-events: none; transition: opacity .2s; }
.hc-head { display: flex; align-items: center; gap: 13px; margin-bottom: 16px; }
.hc-ic { width: 52px; height: 52px; flex: none; border-radius: 16px; display: grid; place-items: center; background: var(--hc, var(--accent)); color: #fff; }
.hc-head b { display: block; font-family: var(--disp); font-weight: 700; font-size: 1.25rem; }
.hc-actions { display: flex; gap: 10px; } .hc-actions .btn { flex: 1; height: 50px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; } .splash-road i, .splash-car { animation: none !important; } .page { animation: none !important; } .speedo.over { animation: none !important; } }
