/* RIDEROO styles. Copyright (c) 2026 RIDEROO. All rights reserved. Unauthorised copying, modification or redistribution is prohibited. See terms.php. */
:root {
  --bg: #0e1012;
  --surface: #16191c;
  --surface-2: #1d2125;
  --surface-3: #262b30;
  --border: #2b3036;
  --text: #ecebe7;
  --muted: #959ba2;
  --faint: #6b7178;
  --accent: #ff7a1a;
  --accent-2: #ffa25c;
  --accent-ink: #1b0c00;
  --danger: #ef3b2d;
  --danger-ink: #fff;
  --ok: #3ccf6e;
  --warn: #f5b400;
  --radius: 14px;
  --radius-sm: 10px;
  --font-display: 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif;
  --font-body: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --top: env(safe-area-inset-top, 0px);
  --bottom: env(safe-area-inset-bottom, 0px);
  --header-h: 58px;
  --tab-h: 64px;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 16px; line-height: 1.45; }
body { overscroll-behavior: none; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent-2); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: .01em; margin: 0; line-height: 1.1; }
h1 { font-size: 30px; } h2 { font-size: 24px; } h3 { font-size: 19px; }
.muted { color: var(--muted); } .faint { color: var(--faint); }
.small { font-size: 13px; } .tiny { font-size: 12px; }
.num { font-family: var(--font-display); font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }

/* ---------- boot / auth ---------- */
.boot { position: fixed; inset: 0; display: grid; place-items: center; }
.boot-mark { width: 54px; height: 54px; border-radius: 50%; border: 6px solid var(--surface-3); border-top-color: var(--accent); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.auth { min-height: 100%; display: grid; place-items: center; padding: calc(24px + var(--top)) 20px calc(24px + var(--bottom)); background:
  radial-gradient(120% 70% at 50% -10%, rgba(255,122,26,.20), transparent 60%),
  repeating-linear-gradient(115deg, transparent 0 46px, rgba(255,255,255,.018) 46px 48px), var(--bg); }
.auth-card { width: 100%; max-width: 380px; }
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.brand-mark { width: 46px; height: 46px; flex: none; }
.brand h1 { font-size: 38px; text-transform: uppercase; letter-spacing: .03em; }
.brand p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }

/* ---------- form controls ---------- */
label.field, div.field { display: block; margin-bottom: 14px; }
label.field > span, div.field > span { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .06em; }
.input, select.input, textarea.input { width: 100%; min-height: 50px; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface-2); outline: none; transition: border-color .15s; }
textarea.input { min-height: 90px; resize: vertical; }
.input:focus { border-color: var(--accent); }
.row { display: flex; gap: 10px; align-items: center; }
.row > * { min-width: 0; }
.grow { flex: 1; }
.stack > * + * { margin-top: 12px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 18px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface-2); font-weight: 600; cursor: pointer; text-decoration: none; color: var(--text); white-space: nowrap; user-select: none; transition: transform .08s, background .15s, border-color .15s; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: var(--danger-ink); }
.btn.ghost { background: transparent; }
.btn.block { width: 100%; }
.btn.sm { min-height: 38px; padding: 0 12px; font-size: 14px; }
.btn.xl { min-height: 64px; font-size: 20px; font-family: var(--font-display); letter-spacing: .04em; text-transform: uppercase; }
.btn svg { width: 20px; height: 20px; flex: none; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); cursor: pointer; }
.icon-btn svg { width: 22px; height: 22px; }
.error-text { color: #ff8a80; font-size: 14px; min-height: 20px; margin: 4px 0 10px; }

.switch { position: relative; width: 52px; height: 30px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch i { position: absolute; inset: 0; background: var(--surface-3); border-radius: 30px; transition: .2s; cursor: pointer; }
.switch i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: .2s; }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(22px); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 9px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); cursor: pointer; font-weight: 600; font-size: 15px; }
.chip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* ---------- shell ---------- */
.shell { position: fixed; inset: 0; display: flex; flex-direction: column; }
.topbar { flex: none; height: calc(var(--header-h) + var(--top)); padding: var(--top) 12px 0 16px; display: flex; align-items: center; gap: 10px; background: rgba(14,16,18,.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); z-index: 500; }
.topbar .title { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.topbar .title h1 { font-size: 24px; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conn { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); flex: none; box-shadow: 0 0 0 3px rgba(60,207,110,.18); }
.conn.off { background: var(--warn); box-shadow: 0 0 0 3px rgba(245,180,0,.18); }
.sos-btn { height: 42px; padding: 0 16px; border-radius: 999px; border: 0; background: var(--danger); color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: .08em; cursor: pointer; box-shadow: 0 0 0 0 rgba(239,59,45,.5); }
.sos-btn:active { transform: scale(.95); }

.main { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; position: relative; }
.main.flush { overflow: hidden; }
.page { padding: 18px 16px 28px; max-width: 760px; margin: 0 auto; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }

.tabbar { flex: none; height: calc(var(--tab-h) + var(--bottom)); padding-bottom: var(--bottom); display: grid; grid-template-columns: repeat(6, 1fr); background: rgba(14,16,18,.97); border-top: 1px solid var(--border); z-index: 500; }
.tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; background: none; color: var(--faint); font-size: 11.5px; font-weight: 600; letter-spacing: .03em; cursor: pointer; text-decoration: none; }
.tab svg { width: 25px; height: 25px; }
.tab.on { color: var(--accent); }
.tab .badge { position: absolute; top: 7px; left: calc(50% + 6px); min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.tab .rec-dot { position: absolute; top: 9px; left: calc(50% + 8px); width: 10px; height: 10px; border-radius: 50%; background: var(--danger); animation: pulse 1.4s infinite; }

/* SOS banner */
.sos-banner { flex: none; background: var(--danger); color: #fff; padding: 10px 14px; display: flex; gap: 10px; align-items: center; z-index: 499; cursor: pointer; }
.sos-banner b { font-family: var(--font-display); font-size: 18px; letter-spacing: .03em; }
.sos-banner .grow { min-width: 0; }
.sos-banner .grow div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sos-banner.mine { background: #7d1a12; }
.notice { flex: none; background: #3a2a05; color: #ffd98a; padding: 9px 14px; font-size: 14px; display: flex; gap: 10px; align-items: center; }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.card + .card { margin-top: 12px; }
.card.tap { cursor: pointer; transition: border-color .15s; }
.card.tap:active { border-color: var(--accent); }
.section-label { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 26px 0 10px; }
.empty { text-align: center; padding: 34px 16px; color: var(--muted); border: 1px dashed var(--border); border-radius: var(--radius); }
.empty h3 { color: var(--text); margin-bottom: 6px; }

.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 16px; color: #111; flex: none; text-transform: uppercase; }
.avatar.sm { width: 26px; height: 26px; font-size: 12px; }
.avatars { display: flex; }
.avatars .avatar { border: 2px solid var(--surface); margin-left: -8px; }
.avatars .avatar:first-child { margin-left: 0; }

.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat { background: var(--surface-2); border-radius: var(--radius-sm); padding: 12px 14px; }
.stat .v { font-family: var(--font-display); font-size: 34px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.stat .v small { font-size: 16px; color: var(--muted); font-weight: 600; margin-left: 3px; }
.stat .l { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; margin-top: 6px; }
.stat.big { grid-column: span 2; }
.stat.big .v { font-size: 64px; }

/* ---------- map ---------- */
#map, .map { position: absolute; inset: 0; background: #1a1d20; }
.leaflet-container { font-family: var(--font-body); background: #1a1d20; }
.leaflet-control-attribution { background: rgba(14,16,18,.7) !important; color: #888 !important; font-size: 10px !important; }
.leaflet-control-attribution a { color: #aaa !important; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.leaflet-popup-content { margin: 12px 14px; font-size: 14px; }
.leaflet-container a.leaflet-popup-close-button { color: var(--muted); }
.map-overlay-top { position: absolute; top: 10px; left: 10px; right: 10px; z-index: 450; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.map-overlay-top::-webkit-scrollbar { display: none; }
.rider-pill { flex: none; display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: rgba(22,25,28,.92); border: 1px solid var(--border); cursor: pointer; font-size: 14px; backdrop-filter: blur(6px); }
.rider-pill .avatar { width: 30px; height: 30px; font-size: 13px; }
.rider-pill.stale { opacity: .55; }
.rider-pill b { font-weight: 600; }
.map-tools { position: absolute; right: 10px; top: 64px; z-index: 450; display: flex; flex-direction: column; gap: 8px; }
.map-tools .icon-btn { background: rgba(22,25,28,.94); width: 46px; height: 46px; }
.map-bottom { position: absolute; left: 10px; right: 10px; bottom: 12px; z-index: 450; display: flex; flex-direction: column; gap: 8px; align-items: stretch; pointer-events: none; }
.map-bottom > * { pointer-events: auto; }
.share-bar { display: flex; align-items: center; gap: 12px; background: rgba(22,25,28,.96); border: 1px solid var(--border); border-radius: 16px; padding: 10px 12px 10px 16px; backdrop-filter: blur(8px); }
.share-bar .grow b { display: block; font-size: 16px; }
.share-bar.on { border-color: rgba(60,207,110,.6); }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); display: inline-block; margin-right: 6px; animation: pulse 1.6s infinite; }

.rmark { position: relative; }
.rmark .dot { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #fff; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 14px; color: #111; box-shadow: 0 2px 8px rgba(0,0,0,.6); text-transform: uppercase; }
.rmark .lbl { position: absolute; top: 37px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 12px; font-weight: 700; padding: 1px 6px; border-radius: 6px; background: rgba(14,16,18,.85); color: #fff; }
.rmark .arrow { position: absolute; left: 50%; top: 50%; width: 0; height: 0; margin-left: -7px; margin-top: -31px; border-left: 7px solid transparent; border-right: 7px solid transparent; border-bottom: 11px solid #fff; transform-origin: 7px 31px; }
.rmark.stale { opacity: .5; }
.rmark.me .dot { box-shadow: 0 0 0 6px rgba(255,122,26,.3), 0 2px 8px rgba(0,0,0,.6); }
.pmark { width: 34px; height: 34px; border-radius: 10px 10px 10px 2px; background: var(--warn); color: #111; display: grid; place-items: center; transform: rotate(-45deg); box-shadow: 0 2px 8px rgba(0,0,0,.6); border: 2px solid #fff; }
.pmark svg { transform: rotate(45deg); width: 18px; height: 18px; }
.smark { width: 46px; height: 46px; border-radius: 50%; background: var(--danger); border: 3px solid #fff; display: grid; place-items: center; color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 14px; animation: sosPulse 1.2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes sosPulse { 0% { box-shadow: 0 0 0 0 rgba(239,59,45,.8); } 100% { box-shadow: 0 0 0 26px rgba(239,59,45,0); } }

/* ---------- rides ---------- */
.rec-card { background: linear-gradient(160deg, #24170d, var(--surface) 60%); border-color: #4a2b14; }
.rec-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.rec-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: rgba(239,59,45,.15); color: #ff8a80; font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.rec-badge i { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); animation: pulse 1.2s infinite; }
.rec-badge.paused { background: rgba(245,180,0,.15); color: var(--warn); }
.rec-badge.paused i { background: var(--warn); animation: none; }
.ride-row { display: flex; gap: 14px; align-items: center; }
.ride-thumb { width: 74px; height: 74px; flex: none; border-radius: 10px; background: var(--surface-2); }
.ride-thumb polyline { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.ride-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 14px; color: var(--muted); margin-top: 4px; }
.ride-meta b { color: var(--text); font-family: var(--font-display); font-size: 17px; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 3px; }
.seg button { border: 0; background: none; padding: 7px 14px; border-radius: 8px; font-weight: 600; font-size: 14px; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--surface-3); color: var(--text); }
.leader { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.leader + .leader { border-top: 1px solid var(--border); }
.leader .bar { height: 6px; border-radius: 3px; background: var(--accent); margin-top: 5px; }
.detail-map { position: relative; height: 300px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); margin-bottom: 14px; }
.speed-chart { width: 100%; height: 90px; display: block; }

/* ---------- plans ---------- */
.plan-card { display: flex; gap: 14px; }
.date-block { width: 62px; flex: none; text-align: center; border-radius: 12px; background: var(--surface-2); padding: 8px 0; align-self: flex-start; }
.date-block .m { font-size: 12px; font-weight: 700; letter-spacing: .1em; color: var(--accent); text-transform: uppercase; }
.date-block .d { font-family: var(--font-display); font-weight: 700; font-size: 30px; line-height: 1; }
.date-block .w { font-size: 12px; color: var(--muted); }
.plan-card.cancelled { opacity: .55; }
.plan-card.cancelled h3 { text-decoration: line-through; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; background: var(--surface-3); color: var(--muted); }
.tag.going { background: rgba(60,207,110,.16); color: var(--ok); }
.tag.maybe { background: rgba(245,180,0,.16); color: var(--warn); }
.tag.no { background: rgba(239,59,45,.14); color: #ff8a80; }
.tag.soon { background: rgba(255,122,26,.18); color: var(--accent-2); }
.rsvp { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rsvp .btn.on.going { background: var(--ok); border-color: var(--ok); color: #04210f; }
.rsvp .btn.on.maybe { background: var(--warn); border-color: var(--warn); color: #241a00; }
.rsvp .btn.on.no { background: #5a2420; border-color: #7b2f29; }
.pick-map { position: relative; height: 230px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); }
.info-list { display: grid; gap: 12px; }
.info-list .it { display: flex; gap: 12px; align-items: flex-start; }
.info-list .it svg { width: 20px; height: 20px; color: var(--accent); flex: none; margin-top: 2px; }

/* ---------- chat ---------- */
.chat { display: flex; flex-direction: column; height: 100%; }
.chat-list { flex: 1; overflow-y: auto; padding: 14px 12px 6px; -webkit-overflow-scrolling: touch; }
.chat-inner { max-width: 760px; margin: 0 auto; }
.day-sep { text-align: center; margin: 14px 0 10px; font-size: 12px; font-weight: 700; color: var(--faint); letter-spacing: .08em; text-transform: uppercase; }
.msg { display: flex; gap: 8px; margin-bottom: 8px; align-items: flex-end; }
.msg .bubble { max-width: 78%; background: var(--surface-2); border-radius: 16px 16px 16px 5px; padding: 8px 12px; position: relative; word-wrap: break-word; overflow-wrap: anywhere; }
.msg .who { font-size: 13px; font-weight: 700; margin-bottom: 2px; }
.msg .time { font-size: 11px; color: var(--faint); margin-top: 3px; text-align: right; }
.msg .bubble img { display: block; max-width: 100%; max-height: 320px; border-radius: 10px; margin: 4px 0; cursor: zoom-in; }
.msg.mine { flex-direction: row-reverse; }
.msg.mine .bubble { background: #3a2412; border-radius: 16px 16px 5px 16px; }
.msg.cont .avatar { visibility: hidden; }
.msg .del { position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface-3); display: none; place-items: center; cursor: pointer; font-size: 14px; color: var(--muted); }
.msg .bubble.sel .del { display: grid; }
.composer { flex: none; padding: 8px 10px; border-top: 1px solid var(--border); background: var(--surface); }
.composer .row { max-width: 760px; margin: 0 auto; align-items: flex-end; }
.composer textarea { flex: 1; min-height: 46px; max-height: 140px; padding: 11px 14px; border-radius: 22px; border: 1px solid var(--border); background: var(--surface-2); resize: none; outline: none; }
.composer .icon-btn { border-radius: 50%; width: 46px; height: 46px; }
.composer .send { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.preview-img { max-width: 760px; margin: 0 auto 8px; display: flex; align-items: center; gap: 10px; }
.preview-img img { height: 64px; border-radius: 8px; }
.thread { border-top: 1px solid var(--border); margin-top: 18px; padding-top: 6px; }
.thread .chat-list { max-height: 420px; padding: 6px 0; }
.thread .composer { border: 1px solid var(--border); border-radius: var(--radius); padding: 8px; }

/* ---------- me ---------- */
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.list-row + .list-row { border-top: 1px solid var(--border); }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { width: 38px; height: 38px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; }
.swatch.on { border-color: #fff; }
.callout { background: var(--surface-2); border-left: 3px solid var(--accent); padding: 12px 14px; border-radius: 8px; font-size: 14px; }
.callout.warn { border-color: var(--warn); }
.callout ol { margin: 6px 0 0; padding-left: 20px; }

/* ---------- modal / sheets ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 1000; display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.sheet { width: 100%; max-width: 560px; max-height: calc(100% - 30px - var(--top)); overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-bottom: 0; border-radius: 20px 20px 0 0; padding: 18px 16px calc(18px + var(--bottom)); animation: up .2s ease-out; }
@keyframes up { from { transform: translateY(40px); opacity: .4; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 10px; }
@media (min-width: 700px) { .modal-back { align-items: center; } .sheet { border-radius: 20px; border-bottom: 1px solid var(--border); } }

.sos-sheet { background: #1c0d0b; border-color: #5a1d17; }
.hold { position: relative; width: 200px; height: 200px; margin: 10px auto 18px; border-radius: 50%; border: 0; background: var(--danger); color: #fff; font-family: var(--font-display); font-size: 40px; font-weight: 700; letter-spacing: .08em; cursor: pointer; display: grid; place-items: center; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; box-shadow: 0 0 0 10px rgba(239,59,45,.15); }
.hold svg { position: absolute; inset: -10px; width: 220px; height: 220px; transform: rotate(-90deg); pointer-events: none; }
.hold circle { fill: none; stroke: #fff; stroke-width: 8; stroke-linecap: round; }
.hold span { display: block; font-size: 14px; letter-spacing: .06em; font-family: var(--font-body); font-weight: 600; opacity: .9; }

.alert-full { position: fixed; inset: 0; z-index: 2000; background: #b3150c; color: #fff; display: flex; flex-direction: column; padding: calc(24px + var(--top)) 20px calc(20px + var(--bottom)); animation: flash 1s infinite alternate; overflow-y: auto; }
@keyframes flash { from { background: #b3150c; } to { background: #7c0d07; } }
.alert-full h1 { font-size: 54px; letter-spacing: .06em; }
.alert-full .who { font-family: var(--font-display); font-size: 34px; font-weight: 700; margin-top: 10px; }
.alert-full .btn { border-color: rgba(255,255,255,.4); background: rgba(0,0,0,.25); color: #fff; }
.alert-full .btn.white { background: #fff; color: #9b120a; border-color: #fff; }

#toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tab-h) + var(--bottom) + 14px); z-index: 3000; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast { background: #f1efe9; color: #141414; padding: 12px 16px; border-radius: 12px; font-weight: 600; font-size: 15px; box-shadow: 0 10px 30px rgba(0,0,0,.4); animation: up .2s; pointer-events: auto; }
.toast.err { background: #ffd6d2; color: #5b0d06; }

.lightbox { position: fixed; inset: 0; z-index: 2500; background: rgba(0,0,0,.92); display: grid; place-items: center; padding: 20px; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; }

@media (min-width: 900px) {
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
  .stat.big { grid-column: span 2; }
}

/* ---------- radio ---------- */
.ptt-wrap { padding: 26px 0 18px; display: flex; flex-direction: column; align-items: center; }
.ptt { width: 230px; height: 230px; border-radius: 50%; border: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: radial-gradient(circle at 50% 35%, #ff9a4d, var(--accent) 55%, #c95300); color: var(--accent-ink);
  box-shadow: 0 0 0 10px rgba(255,122,26,.12), 0 14px 40px rgba(0,0,0,.45), inset 0 -6px 18px rgba(0,0,0,.25);
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; transition: transform .1s, box-shadow .2s, background .2s; }
.ptt .ptt-ic svg { width: 54px; height: 54px; }
.ptt .ptt-l { font-family: var(--font-display); font-weight: 700; font-size: 26px; letter-spacing: .06em; text-transform: uppercase; }
.ptt .ptt-t { font-size: 18px; min-height: 22px; font-weight: 700; }
.ptt.down { transform: scale(.96); }
.ptt.live { background: radial-gradient(circle at 50% 35%, #ff6b5e, var(--danger) 55%, #8f150c); color: #fff; animation: txPulse 1s infinite; }
.ptt.cancel { background: var(--surface-3); color: var(--muted); animation: none; }
@keyframes txPulse { 0% { box-shadow: 0 0 0 0 rgba(239,59,45,.6), 0 14px 40px rgba(0,0,0,.45); } 100% { box-shadow: 0 0 0 34px rgba(239,59,45,0), 0 14px 40px rgba(0,0,0,.45); } }
.radio-status { min-height: 26px; margin-top: 16px; font-weight: 700; font-size: 17px; color: var(--accent-2); text-align: center; }

.tiles-dark { filter: invert(1) hue-rotate(185deg) brightness(.92) contrast(.88) saturate(.55); }

/* ---------- v2: crews, invites, places ---------- */
.crew-btn { background: none; border: 0; color: inherit; font: inherit; padding: 4px 0; cursor: pointer; text-align: left; }
.crew-titles { display: flex; flex-direction: column; min-width: 0; line-height: 1.05; }
.crew-titles small { font-size: 12px; font-weight: 700; color: var(--accent); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crew-caret { flex: none; color: var(--muted); display: grid; place-items: center; }
.crew-caret svg { width: 18px; height: 18px; }
button.list-row { width: 100%; background: none; border: 0; color: inherit; font: inherit; cursor: pointer; text-align: left; }
.crew-row.on b { color: var(--accent); }
.crew-row > svg { width: 20px; height: 20px; color: var(--accent); flex: none; }
.crew-ico { width: 38px; height: 38px; border-radius: 10px; background: var(--surface-3); display: grid; place-items: center; flex: none; }
.crew-ico svg { width: 20px; height: 20px; }
.invite-box { margin-top: 14px; padding: 14px; background: var(--surface-2); border: 1px dashed var(--accent); border-radius: var(--radius-sm); text-align: center; }
.invite-code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 28px; font-weight: 800; letter-spacing: .12em; margin: 4px 0 10px; color: var(--accent); }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .06em; }
.owner-link { border-color: var(--accent); color: var(--accent); }
select.input { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
.poi { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; flex: none; }
.poi svg { width: 17px; height: 17px; }
.poi.lg { width: 44px; height: 44px; }
.poi.lg svg { width: 24px; height: 24px; }
.poi-mark .poi { border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.55); }
.place-row .poi { width: 36px; height: 36px; }

/* v6: SOS status, emergency contact, hands-free radio */
.sos-banner.over { background: #1d6b3a; }
.alert-full.over { background: #1f3b2b; animation: none; }
.sos-status { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; font-size: 14px; background: rgba(0,0,0,.3); margin-top: 8px; }
.sos-status.done { background: #3ccf6e; color: #06210f; }
.sos-status .live-dot { background: #fff; }
.ice-box { display: flex; align-items: center; gap: 12px; margin-top: 4px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.ice-box.on-red { background: rgba(0,0,0,.25); border-color: rgba(255,255,255,.3); margin-top: 16px; }
.ice-box .btn { flex: none; }
.radio-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--surface-2); padding: 4px; border-radius: 12px; margin-top: 12px; }
.radio-mode button { border: 0; background: transparent; color: var(--muted); padding: 10px 6px; border-radius: 9px; font-weight: 700; font: inherit; font-weight: 700; cursor: pointer; }
.radio-mode button.on { background: var(--accent); color: #111; }
.vox-panel { text-align: center; }
.vox-ring { width: 210px; height: 210px; margin: 6px auto 8px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: var(--surface-2); border: 3px solid var(--border); transition: background .15s, border-color .15s; font-weight: 800; }
.vox-ring.listening { border-color: var(--ok); }
.vox-ring.tx { background: var(--danger); border-color: #fff; color: #fff; }
.vox-ring.rx { border-color: var(--accent); }
.vox-ring.paused { opacity: .6; }
.vox-ring svg { width: 44px; height: 44px; }
.vox-meter { height: 10px; border-radius: 6px; background: var(--surface-3); position: relative; overflow: hidden; margin: 10px 0 4px; }
.vox-meter i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ok); width: 0; transition: width .08s; }
.vox-meter b { position: absolute; top: -2px; bottom: -2px; width: 3px; background: #fff; }
body[data-vox=listening] .tab[data-tab=radio]::after, body[data-vox=tx] .tab[data-tab=radio]::after, body[data-vox=rx] .tab[data-tab=radio]::after { content: ''; position: absolute; top: 6px; right: calc(50% - 16px); width: 9px; height: 9px; border-radius: 50%; background: var(--ok); }
body[data-vox=tx] .tab[data-tab=radio]::after { background: var(--danger); }
body[data-vox=rx] .tab[data-tab=radio]::after { background: var(--accent); }
[hidden] { display: none !important; }

/* ---------- Revvy the mascot ---------- */
.auth-revvy { display: flex; align-items: flex-end; gap: 6px; margin: 0 0 6px -6px; }
.auth-revvy img { width: 120px; height: auto; flex: none; filter: drop-shadow(0 10px 18px rgba(0,0,0,.45)); }
.revvy-say { position: relative; margin-bottom: 64px; background: #fff; color: #15171a; font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: .02em; text-transform: uppercase; line-height: 1.15; padding: 9px 14px; border-radius: 16px; }
.revvy-say::before { content: ""; position: absolute; left: -9px; bottom: 12px; border: 8px solid transparent; border-right: 11px solid #fff; border-left: 0; }
.empty-revvy { display: block; width: 90px; height: auto; margin: 0 auto 10px; }

/* ---------- sat-nav ---------- */
.map-tools .icon-btn.nav-go { background: var(--accent); color: var(--accent-ink); }
body.navigating #mapBottom, body.navigating #pills, body.navigating .map-tools { display: none; }
#navTop { position: absolute; top: 10px; left: 10px; right: 10px; z-index: 460; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; pointer-events: none; }
#navTop > * { pointer-events: auto; }
.nav-card { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: #136b3c; color: #fff; border-radius: 16px; box-shadow: 0 8px 26px rgba(0,0,0,.45); }
.nav-arrow { width: 58px; height: 58px; flex: none; display: grid; place-items: center; }
.nav-arrow > svg { width: 50px; height: 50px; }
.nav-dist { font-family: var(--font-display); font-weight: 700; font-size: 36px; line-height: 1; }
.nav-text { font-size: 18px; font-weight: 600; line-height: 1.2; margin-top: 3px; overflow-wrap: anywhere; }
.nav-then { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 6px 12px; background: #0d4a29; color: #fff; border-radius: 12px; font-size: 14px; font-weight: 600; box-shadow: 0 4px 14px rgba(0,0,0,.35); }
.nav-then svg { flex: none; }
.nav-then span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-then.warn { background: #7a5200; }
.nav-arrived { background: var(--surface); border: 2px solid var(--accent); color: var(--text); }
.nav-revvy { width: 64px; height: auto; flex: none; margin: -18px 0 -6px; }
.spin { width: 30px; height: 30px; border: 4px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: spin .9s linear infinite; }
#navBottom { position: absolute; left: 10px; right: 10px; bottom: 12px; z-index: 460; }
.nav-panel { background: rgba(22,25,28,.97); border: 1px solid var(--border); border-radius: 16px; padding: 12px; box-shadow: 0 8px 26px rgba(0,0,0,.45); }
.nav-sum { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 0 4px; }
.nav-sum b { font-family: var(--font-display); font-size: 30px; line-height: 1; color: var(--ok); }
.nav-sum .tiny { flex-basis: 100%; }
.nav-btns { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-top: 10px; }
.nav-b { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: 58px; border: 0; border-radius: 12px; background: var(--surface-3); color: var(--text); font: 600 12px var(--font-body); text-decoration: none; cursor: pointer; }
.nav-b svg { width: 22px; height: 22px; }
.nav-b.end { background: var(--danger); color: #fff; }
.nav-compass { position: absolute; right: 14px; z-index: 461; width: 60px; height: 60px; border-radius: 50%; border: 2px solid var(--border); background: rgba(22,25,28,.95); color: var(--text); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; padding: 0; cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,.45); }
.nav-compass .nc-needle { display: block; width: 26px; height: 26px; transition: transform .2s linear; }
.nav-compass .nc-needle svg { display: block; }
.nav-compass .nc-lbl { font: 700 10px var(--font-body); text-transform: uppercase; letter-spacing: .04em; margin-top: 1px; }
.nav-flag { width: 36px; height: 36px; border-radius: 50%; background: #3da2ff; color: #fff; display: grid; place-items: center; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.5); }
.nav-flag svg { width: 18px; height: 18px; }
.dir-dest { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface-2); border-radius: var(--radius-sm); margin-bottom: 14px; }
.dir-dest > svg { width: 22px; height: 22px; color: var(--accent); flex: none; }

/* ---------- Waze live traffic ---------- */
#wazeBox { position: absolute; inset: 0; z-index: 480; display: flex; flex-direction: column; background: var(--surface); }
.waze-bar { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
#wazeBox iframe { flex: 1; width: 100%; border: 0; background: #e8eef3; }
.sheet .list-row > svg { width: 22px; height: 22px; flex: none; color: var(--accent); }

.copy-foot { text-align: center; margin: 16px 0 6px; }
.copy-foot a { color: inherit; text-decoration: underline; }

/* Revvy everywhere */
.revvy-tip { display: flex; align-items: center; gap: 4px; margin: 0 0 12px -4px; }
.revvy-tip img { width: 64px; height: auto; flex: none; filter: drop-shadow(0 6px 10px rgba(0,0,0,.4)); }
.revvy-tip-say { position: relative; background: #fff; color: #15171a; font-family: var(--font-display); font-weight: 700; font-size: 16px; letter-spacing: .02em; text-transform: uppercase; line-height: 1.15; padding: 8px 12px; border-radius: 14px; margin-left: 6px; }
.revvy-tip-say::before { content: ""; position: absolute; left: -9px; top: 50%; margin-top: -8px; border: 8px solid transparent; border-right: 10px solid #fff; border-left: 0; }
.revvy-tip.map-tip { margin: 0 0 6px 2px; pointer-events: none; }
.revvy-tip.map-tip img { width: 52px; }
.revvy-tip.map-tip .revvy-tip-say { font-size: 14px; box-shadow: 0 6px 16px rgba(0,0,0,.35); }
.boot-in { display: grid; justify-items: center; gap: 14px; }
.boot-in img { width: 120px; height: auto; animation: revvyBob 1.4s ease-in-out infinite; }
@keyframes revvyBob { 50% { transform: translateY(-8px); } }

/* ---------- Speed cameras & road reports ---------- */
.map-tools .icon-btn.hz-go { display: flex; align-items: center; justify-content: center; background: var(--warn); color: #1d1500; height: auto; padding: 8px 0 6px; flex-direction: column; gap: 2px; border: 0; box-shadow: 0 2px 10px rgba(0,0,0,.45); }
.map-tools .icon-btn.hz-go span { font: 700 10px var(--font-body); letter-spacing: .02em; }
.map-tools .icon-btn.hz-go svg { width: 22px; height: 22px; }
.nav-b.rep { background: var(--warn); color: #1d1500; }
.cam-mk { position: relative; width: 30px; height: 30px; border-radius: 50%; background: #fff; border: 4px solid #d61f1f; color: #111; display: grid; place-items: center; box-shadow: 0 1px 6px rgba(0,0,0,.55); box-sizing: border-box; font: 800 13px/1 var(--font-body); }
.cam-mk b { font-weight: 800; letter-spacing: -.03em; }
.cam-mk svg { width: 15px; height: 15px; }
.cam-mk i { position: absolute; left: 50%; bottom: -9px; transform: translateX(-50%); background: #111; color: #fff; font: 800 7px/1 var(--font-body); padding: 2px 3px; border-radius: 3px; font-style: normal; letter-spacing: .04em; white-space: nowrap; }
.cam-mk.mobile { border-color: #1f6fd6; }
.cam-mk.mobile i { background: #1f6fd6; }
.cam-mk.redlight { border-color: #222; background: #111; color: #ff5252; }
.cam-mk.unconf { border-style: dashed; opacity: .85; }
.hz-mk { width: 30px; height: 30px; display: grid; place-items: center; color: #1d1500; background: var(--warn); clip-path: polygon(50% 2%, 98% 94%, 2% 94%); padding-top: 7px; box-sizing: border-box; filter: drop-shadow(0 1px 3px rgba(0,0,0,.6)); }
.hz-mk svg { width: 14px; height: 14px; }
.hz-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hz-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 92px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface-3); color: var(--text); font: 600 13px/1.15 var(--font-body); cursor: pointer; padding: 10px 4px; text-align: center; }
.hz-tile:active { transform: scale(.96); background: var(--surface-2); }
.hz-tile .cam-mk, .hz-tile .hz-mk { width: 40px; height: 40px; }
.hz-tile .hz-mk { padding-top: 10px; }
.hz-tile .cam-mk svg, .hz-tile .hz-mk svg { width: 19px; height: 19px; }
.hz-limits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.lim-btn { display: grid; place-items: center; height: 92px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface-3); cursor: pointer; }
.lim-btn .cam-mk { width: 66px; height: 66px; border-width: 8px; font-size: 26px; }
.cam-alert { position: fixed; left: 10px; right: 10px; top: calc(var(--header-h) + var(--top) + 10px); z-index: 900; display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 12px; border-radius: 16px; background: rgba(22,25,28,.97); border: 2px solid var(--warn); color: var(--text); box-shadow: 0 8px 26px rgba(0,0,0,.6); animation: caIn .25s ease-out; max-width: 520px; margin: 0 auto; }
.cam-alert.with-nav { top: calc(var(--top) + 118px); }
.cam-alert.is-cam { border-color: #d61f1f; }
.cam-alert.over { background: #b3141b; border-color: #fff; animation: caIn .25s ease-out, caPulse 1s infinite; }
.cam-alert b { font-size: 16px; }
.cam-alert .ca-sub { font-size: 14px; opacity: .9; margin-top: 2px; }
.cam-alert .ca-sign .cam-mk, .cam-alert .ca-sign .hz-mk { width: 46px; height: 46px; font-size: 18px; }
.cam-alert .ca-sign .cam-mk { border-width: 6px; }
.cam-alert .ca-sign .hz-mk { padding-top: 12px; }
.cam-alert .ca-sign .hz-mk svg { width: 20px; height: 20px; }
.ca-b { flex: none; width: 46px; height: 46px; border-radius: 12px; border: 0; background: rgba(255,255,255,.12); color: #fff; display: grid; place-items: center; cursor: pointer; }
.ca-b svg { width: 22px; height: 22px; }
@keyframes caIn { from { transform: translateY(-14px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes caPulse { 50% { box-shadow: 0 0 0 6px rgba(255,255,255,.25); } }
.btn.xl { min-height: 56px; font-size: 16px; }

/* ---------- Compact cards (v2.3.1) ---------- */
.switch.sm { width: 42px; height: 24px; }
.switch.sm i::after { width: 18px; height: 18px; }
.switch.sm input:checked + i::after { transform: translateX(18px); }
/* Map share bar: smaller, 80% background, and kept clear of the map buttons on the right and the map credits */
.map-bottom { right: 68px; bottom: 22px; max-width: 460px; gap: 6px; }
.share-bar { gap: 10px; padding: 6px 8px 6px 12px; border-radius: 13px; background: rgba(22,25,28,.8); }
.share-bar .grow { min-width: 0; }
.share-bar .grow b { font-size: 14px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.share-bar .grow .tiny { display: block; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.share-bar .rec-badge { padding: 3px 8px; font-size: 12px; }
.share-bar .live-dot { width: 8px; height: 8px; }
/* Radio card */
.radio-page { padding-top: 12px; }
.radio-card { padding: 10px 12px; }
.rc-top { display: flex; align-items: center; gap: 10px; }
.rc-top b { font-size: 15px; }
.rc-revvy { width: 30px; height: auto; flex: none; filter: drop-shadow(0 3px 6px rgba(0,0,0,.4)); }
.rc-listen { display: flex; align-items: center; gap: 8px; margin-top: 6px; min-height: 22px; }
.rc-listen .avatar.sm { width: 22px; height: 22px; font-size: 10px; }
.radio-card .radio-mode { margin-top: 8px; padding: 3px; }
.radio-card .radio-mode button { padding: 7px 6px; font-size: 14px; }
.radio-page .ptt-wrap { padding: 18px 0 12px; }
@media (max-height: 760px) { .ptt { width: 200px; height: 200px; } .radio-page .ptt-wrap { padding-top: 12px; } }
/* Record a ride card */
.rec-start { padding: 12px 14px; }
.rs-head { display: flex; align-items: center; gap: 12px; }
.rs-revvy { width: 36px; height: auto; flex: none; filter: drop-shadow(0 3px 6px rgba(0,0,0,.4)); }
.rs-head h2 { margin: 0 0 2px; font-size: 20px; }
.rs-head p { margin: 0; }
.rs-row { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.rs-notify { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; min-width: 0; }
#rStart { flex: none; min-height: 44px; padding: 0 22px; }
@media (max-width: 520px) { .rs-row { flex-direction: column; align-items: stretch; gap: 8px; } #rStart { width: 100%; } }

/* ---------- problem reports ---------- */
.seg.block { display: flex; width: 100%; }
.seg.block button { flex: 1; padding: 8px 6px; font-size: 13px; line-height: 1.2; }
.bug-photos { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
.bug-ph { position: relative; width: 84px; height: 84px; border-radius: 10px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); }
.bug-ph img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.bug-ph .icon-btn { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border-radius: 50%; background: rgba(0,0,0,.7); }
.bug-ph .icon-btn svg { width: 14px; height: 14px; }
.bug-diag { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 11px; line-height: 1.4; background: var(--surface-2); border-radius: 8px; padding: 10px; margin: 8px 0 0; max-height: 200px; overflow: auto; }
.bug-row { width: 100%; background: none; border: 0; border-top: 1px solid var(--border); color: inherit; font: inherit; cursor: pointer; padding: 10px 0; gap: 10px; }
.bug-row > svg { width: 18px; height: 18px; flex: none; color: var(--muted); }
.bug-clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 4px; }
.badge-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex: none; }
.bug-msg { padding: 10px 12px; border-radius: 12px; margin: 0 0 8px; font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }
.bug-msg.me { background: var(--surface-2); }
.bug-msg.them { background: rgba(255,122,26,.12); border: 1px solid rgba(255,122,26,.35); }
.bug-ev { text-align: center; margin: 4px 0 10px; }

/* ---------- update ready bar ---------- */
.upd-bar { position: fixed; left: 10px; right: 10px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 900; display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 14px; background: #1d3a5c; color: #fff; border: 1px solid #3da2ff; border-radius: 14px; box-shadow: 0 10px 28px rgba(0,0,0,.5); max-width: 560px; margin: 0 auto; }
.upd-bar b { display: block; font-size: 15px; }
.upd-bar span { display: block; font-size: 13px; opacity: .85; }
.upd-bar .icon-btn { width: 36px; height: 36px; background: transparent; border-color: rgba(255,255,255,.25); color: #fff; flex: none; }
.upd-bar .icon-btn svg { width: 16px; height: 16px; }
.upd-bar .btn { flex: none; }

/* ---------- Revvy tip pointing at the Places button ---------- */
.revvy-tip.pl-tip { position: fixed; z-index: 880; margin: 0; padding: 0; color: inherit; font: inherit; text-align: left; max-width: min(300px, calc(100vw - 80px)); animation: plTipIn .35s ease-out; }
.revvy-tip.pl-tip img { width: 52px; transform: scaleX(-1); margin-left: -2px; flex: none; }
.revvy-tip.pl-tip .revvy-tip-say { font-size: 15px; margin: 0 6px 0 0; box-shadow: 0 6px 16px rgba(0,0,0,.45); max-width: 240px; }
.revvy-tip.pl-tip .revvy-tip-say small { display: block; font-family: var(--font-body); font-weight: 500; font-size: 12.5px; text-transform: none; letter-spacing: 0; color: #4a4f57; margin-top: 3px; line-height: 1.3; }
.revvy-tip.pl-tip .revvy-tip-say::before { left: auto; right: -9px; border-right: 0; border-left: 10px solid #fff; }
.pl-tip .tour-n { display: block; font-family: var(--font-body); font-size: 10.5px; font-weight: 700; letter-spacing: .08em; color: var(--accent); margin-bottom: 2px; }
.pl-tip .tour-btns { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 8px; }
.pl-tip .tour-btns button { font: 700 13px var(--font-body); border: 0; border-radius: 999px; cursor: pointer; text-transform: none; letter-spacing: 0; }
.pl-tip .tour-skip { background: none; color: #6b7079; padding: 6px 0; text-decoration: underline; }
.pl-tip .tour-next { background: var(--accent); color: #111; padding: 7px 14px; min-height: 32px; }
/* bubble above or below a button: Revvy sits beside it, the arrow points at the button */
.revvy-tip.pl-tip.tour-below, .revvy-tip.pl-tip.tour-above { flex-direction: row-reverse; max-width: calc(100vw - 16px); }
.revvy-tip.pl-tip.tour-below img, .revvy-tip.pl-tip.tour-above img { transform: none; width: 46px; }
.pl-tip.tour-below .revvy-tip-say::before, .pl-tip.tour-above .revvy-tip-say::before { display: none; }
.pl-tip.tour-below::after, .pl-tip.tour-above::after { content: ""; position: absolute; left: var(--ax, 50%); margin-left: -9px; border: 9px solid transparent; }
.pl-tip.tour-below::after { top: -16px; border-bottom: 9px solid #fff; }
.pl-tip.tour-above::after { bottom: -16px; border-top: 9px solid #fff; }
body.touring .revvy-tip.map-tip { display: none; }
.pulse-hint { box-shadow: 0 0 0 0 rgba(255,122,26,.8); animation: plPulse 1.4s ease-out infinite; border-color: var(--accent) !important; position: relative; z-index: 2; }
#tabs.pulse-hint, .share-bar.pulse-hint { animation: none; box-shadow: 0 0 0 2px var(--accent) inset; }
@keyframes plPulse { 0% { box-shadow: 0 0 0 0 rgba(255,122,26,.75); } 100% { box-shadow: 0 0 0 14px rgba(255,122,26,0); } }
@keyframes plTipIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .revvy-tip.pl-tip, .pulse-hint { animation: none; } }

/* forgotten password */
.pw-code { font-size: 1.5rem; letter-spacing: .35em; text-align: center; font-variant-numeric: tabular-nums; }

/* rider circles with 3 or 4 letters */
.avatar.b3 { font-size: 13px; letter-spacing: -.02em; } .avatar.b4 { font-size: 11px; letter-spacing: -.03em; }
.avatar.sm.b3 { font-size: 9.5px; } .avatar.sm.b4 { font-size: 8px; letter-spacing: -.04em; }
.rmark .dot.b3 { font-size: 11.5px; letter-spacing: -.02em; } .rmark .dot.b4 { font-size: 9.5px; letter-spacing: -.04em; }

/* log-in logo */
.auth-logo { display: flex; align-items: center; justify-content: center; gap: 4px; margin: 0 0 4px; }
.auth-logo img { width: 150px; height: auto; flex: none; filter: drop-shadow(0 12px 22px rgba(0,0,0,.5)); }
.auth-logo .revvy-say { align-self: flex-start; margin-top: 18px; }
.auth-site { text-align: center; font-size: 30px; text-transform: uppercase; letter-spacing: .03em; margin: 4px 0 0; }
.auth-tagline { text-align: center; color: var(--muted); font-size: 14px; margin: 4px 0 20px; }
@media (max-height: 700px) { .auth-logo img { width: 112px; } }

/* ---------- points ---------- */
.pts-card { cursor: pointer; margin-bottom: 12px; }
.pts-big { display: flex; align-items: center; gap: 6px; color: var(--accent); }
.pts-big svg { width: 26px; height: 26px; fill: currentColor; }
.pts-big b { font-size: 26px; font-weight: 800; color: var(--text); }
.pts-big.lg svg { width: 34px; height: 34px; } .pts-big.lg b { font-size: 34px; }
.pts-lv { font-weight: 800; }
.pts-bar { height: 8px; border-radius: 6px; background: var(--surface-3); overflow: hidden; margin: 10px 0 8px; }
.pts-bar i { display: block; height: 100%; background: linear-gradient(90deg, #ff7a1a, #ffb35c); border-radius: 6px; }
.pts-head { display: flex; align-items: center; gap: 14px; }
.pts-levels { display: flex; gap: 4px; flex-wrap: wrap; }
.pts-levels span { flex: 1; min-width: 60px; text-align: center; font-size: 12px; font-weight: 700; padding: 6px 2px; border-radius: 8px; background: var(--surface-2); color: var(--faint); }
.pts-levels span.on { color: var(--text); background: #3a2412; }
.pts-levels small { display: block; font-weight: 500; color: var(--faint); }
.pts-rule, .pts-li, .lb-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--border); }
.pts-rule:first-child, .pts-li:first-child, .lb-row:first-child { border-top: 0; }
.pts-rule svg { width: 18px; height: 18px; color: var(--accent); flex: none; }
.pts-li b, .pts-rule b, .lb-row > b { color: var(--accent); }
.pts-li b.neg { color: #ff8a80; }
.lb-row.me { background: #2a1a0d; border-radius: 10px; padding-left: 6px; padding-right: 6px; }
.lb-rank { width: 30px; text-align: center; font-weight: 800; color: var(--muted); flex: none; font-size: 13px; }
.lb-row .avatar.sm, .lb-row .avatar { width: 30px; height: 30px; font-size: 12px; flex: none; }

/* ---------- ride buddies ---------- */
.bud-card { cursor: pointer; margin-bottom: 18px; }
.bud-card h3 { margin: 0 0 2px; }
.bud-card > .row > svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.bud-ico { width: 42px; height: 42px; border-radius: 12px; background: #3a2412; color: var(--accent); display: grid; place-items: center; flex: none; }
.bud-ico svg { width: 22px; height: 22px; }
.badge.static { position: static; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 800; display: inline-grid; place-items: center; }
.bud-me { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: var(--surface-2); }
.bud-list { display: flex; flex-direction: column; }
.bud-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border: 0; border-top: 1px solid var(--border); background: none; color: inherit; text-align: left; width: 100%; font: inherit; cursor: default; }
button.bud-row { cursor: pointer; }
.bud-row:first-child { border-top: 0; }
.bud-row .grow { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.bud-row .grow small { overflow: hidden; text-overflow: ellipsis; }
.bud-row .badge-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-left: 6px; vertical-align: middle; }
.bud-note { font-size: 13px; color: var(--muted); font-style: normal; margin-top: 2px; }
.bud-thread { max-height: 42vh; overflow-y: auto; margin: 12px 0 6px; padding: 4px 0; }
input.range { width: 100%; accent-color: var(--accent); margin: 8px 0 4px; }
.bud-ok svg { width: 16px; height: 16px; vertical-align: -3px; color: #4ade80; margin-right: 4px; }

/* ---------- score on map tags and the Me tab (v2.6.1) ---------- */
.rmark .lbl { display: flex; flex-direction: column; align-items: center; line-height: 1.25; }
.rmark .lpts { display: inline-flex; align-items: center; gap: 2px; font-size: 10.5px; font-weight: 800; color: #ffb35c; }
.rmark .lpts svg { width: 10px; height: 10px; fill: currentColor; stroke: none; }
.tab .me-pts { width: 27px; height: 27px; border-radius: 50%; border: 2px solid currentColor; display: grid; place-items: center; font-family: var(--font-display); font-size: 11.5px; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.tab .me-pts.sm { font-size: 9.5px; letter-spacing: -.04em; }
.tab.on .me-pts { color: var(--accent); }

/* ride buddies: how matches can contact you */
.bud-share { display: flex; flex-direction: column; gap: 8px; }
.bud-opt { display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: left; padding: 12px 14px; border-radius: 12px; border: 2px solid var(--border); background: var(--surface-2); color: inherit; font: inherit; cursor: pointer; }
.bud-opt > svg { width: 22px; height: 22px; flex: none; margin-top: 1px; color: var(--muted); }
.bud-opt b { display: block; }
.bud-opt small { display: block; color: var(--muted); font-size: 13px; line-height: 1.35; margin-top: 2px; }
.bud-opt.on { border-color: var(--accent); background: #3a2412; }
.bud-opt.on > svg { color: var(--accent); }
.bud-me .muted.small svg { width: 13px; height: 13px; vertical-align: -2px; }

/* ride view: the map follows you when you're moving without a destination */
.cruise { position: absolute; left: 12px; z-index: 461; display: flex; align-items: stretch; gap: 8px; pointer-events: none; }
.cruise > * { pointer-events: auto; }
.cr-speed { min-width: 76px; height: 64px; padding: 0 12px; border-radius: 18px; background: rgba(22,25,28,.95); border: 2px solid var(--border); display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(0,0,0,.45); }
.cr-speed b { font-family: var(--font-display); font-weight: 700; font-size: 34px; line-height: 1; }
.cr-speed span { font: 700 10px var(--font-body); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: 2px; }
.cr-speed.over { background: #b3141b; border-color: #fff; }
.cr-speed.over span { color: #fff; }
.cr-b { width: 64px; height: 64px; border-radius: 18px; border: 2px solid var(--border); background: rgba(22,25,28,.95); color: var(--text); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 0; cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,.45); }
.cr-b svg { width: 22px; height: 22px; }
.cr-b .nc-needle { display: block; width: 26px; height: 26px; transition: transform .2s linear; }
.cr-b .nc-needle svg { width: 26px; height: 26px; display: block; }
.cr-l { font: 700 10px var(--font-body); text-transform: uppercase; letter-spacing: .04em; }
body.cruising .map-tip { display: none; }

/* ---------- weather for planned rides ---------- */
.wx { margin-top: 14px; }
.wx-head { align-items: baseline; margin-bottom: 8px; }
.wx-head h3 { font-size: 20px; }
.wx-credit { font-size: 11px; color: var(--faint); text-decoration: none; }
.wx-credit:hover { color: var(--muted); }
.wx-sub { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.wx-day { display: flex; gap: 12px; align-items: center; }
.wx-day .wx-ico { flex: none; }
.wx-hours { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(46px, 1fr); gap: 4px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.wx-hours::-webkit-scrollbar { display: none; }
.wx-h { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: var(--radius-sm); background: var(--surface-2); text-align: center; line-height: 1.15; }
.wx-h b { font-family: var(--font-display); font-size: 18px; font-weight: 700; }
.wx-h small { font-size: 9px; }
.wx-pp { font-size: 12px; color: #7dbbff; }
.wx-pp.hi { color: #3d9bff; font-weight: 700; }
.wx-warns { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.wx-w { font-size: 14px; padding: 8px 10px; border-radius: var(--radius-sm); border-left: 3px solid var(--muted); background: var(--surface-2); }
.wx-w.ok { border-color: var(--ok); }
.wx-w.info { border-color: #5cb3ff; }
.wx-w.warn { border-color: var(--warn); }
.wx-w.bad { border-color: var(--danger); background: rgba(239, 59, 45, .1); }
.wx-chip { display: inline-flex; align-items: center; gap: 3px; flex: none; font-size: 14px; }
.wx-chip:empty { display: none; }
.wx-chip b { font-family: var(--font-display); font-size: 18px; }
.sheet #fWx .wx { margin: 0 0 14px; }

/* crash alarm */
.crash-alarm { z-index: 6000; justify-content: space-between; text-align: center; gap: 14px; }
.crash-alarm h1 { font-size: clamp(34px, 9vw, 52px); line-height: 1.02; margin: 8px 0 10px; letter-spacing: .02em; }
.crash-why { margin: 0 auto; max-width: 30em; opacity: .92; }
.crash-count { position: relative; width: min(52vw, 210px); aspect-ratio: 1; margin: 0 auto; display: grid; place-items: center; }
.crash-count svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.crash-count circle { fill: none; stroke-width: 9; }
.crash-count .trk { stroke: rgba(255,255,255,.22); }
.crash-count .bar { stroke: #fff; stroke-linecap: round; stroke-dasharray: 339.3; stroke-dashoffset: 0; transition: stroke-dashoffset .25s linear; }
.crash-count b { font-family: var(--font-display); font-size: clamp(56px, 18vw, 84px); line-height: 1; }
.crash-count span { position: absolute; bottom: 24%; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; opacity: .8; }
.crash-say { margin: 0; font-weight: 600; }
.crash-alarm .btn.xl { font-size: 26px; padding: 22px; }
.crash-alarm > * { width: 100%; max-width: 520px; margin-left: auto; margin-right: auto; }
.gap-banner { background: #7a4a00; color: #fff; gap: 8px; }
.gap-banner .btn { background: rgba(0,0,0,.25); color: #fff; border: 0; }
