/*
 * "Route Signage" design system (2026-09-03) — replaces the original
 * "carnet de route" palette (cream/navy/Fraunces-serif/dashed rules)
 * with a cobalt + signal-amber system borrowed from transit signage:
 * flat plates with hard borders instead of soft shadowed cards, a
 * numbered-line motif for routes, geometric type instead of a serif.
 * See the three Route Signage / Waiting Room / Night Dispatch phone
 * mockups reviewed before this landed — this is Route Signage, refined
 * (real app icon, line-icon tab bar already matched it, palette cut
 * from four accent hues to two).
 *
 * Deliberately NOT renamed: the custom properties below keep their
 * original names (--teal, --rust, ...) and so do the class names that
 * use them (.btn-teal, .status-chip.warn, ...) even though the colour
 * bound to "teal" is now cobalt blue. Several of those class names are
 * toggled from JS via classList (push.js, costs.js, home.js, ...);
 * renaming them is a real rename-and-verify-every-call-site job, not a
 * colour change, so it's left for a follow-up if this direction is
 * adopted rather than bundled into a visual-only branch.
 *
 * Colour is also deliberately reduced to two accent hues used
 * consistently for meaning, not four used inconsistently:
 *   --teal (now cobalt)  = resolved / go — confirmed, paid, primary
 *                          actions, links.
 *   --amber              = needs attention — cost, an open slot, an
 *                          unpaid split, a schedule exception.
 *   --rust (now a muted red, narrowed) = kept, but ONLY for genuine
 *                          errors and destructive states (toast.error,
 *                          auth failure, push permission denied) —
 *                          collapsing "you owe money" and "something
 *                          broke" into the same colour would be a real
 *                          usability regression, not just a palette
 *                          trim, so that distinction stays.
 */

:root {
    color-scheme: light;
    --bg: #F4F6F8;
    --surface: #FFFFFF;
    --ink: #12213D;
    --ink-soft: #3C5177;
    --text: #1B2740;
    --muted: #6B7686;
    --line: #DDE2E9;
    --teal: #1D4ED8;
    --teal-soft: #E3EAFB;
    --amber: #F5A623;
    --amber-soft: #FFF3DC;
    --amber-ink: #8A5A0B;
    --rust: #D94B4B;
    --rust-soft: #FBE3E1;
    --radius: 10px;
}

* { box-sizing: border-box; }

/*
 * Real bug caught live (2026-09-01): an element toggled via the plain
 * `hidden` attribute (el.hidden = true/false, the pattern used
 * throughout this app — destination-pill, tab-bar, the various
 * sheets/banners) stays visibly on-screen if its own class also sets
 * `display` (flex/grid/etc) unconditionally, e.g. `.tab-bar { display:
 * flex; }` — same specificity as the browser's own `[hidden] {
 * display: none }` default, and this stylesheet loads after it, so
 * the later, more "normal-looking" rule wins and silently defeats
 * `hidden`. #push-error (born already `display: flex`) sat there
 * empty-but-visible the whole time as a result; .tab-bar had the same
 * latent issue, just invisible in practice since it's only hidden for
 * the few milliseconds before startRouter() reveals it. This one
 * global rule is the fix for all of them, present and future, rather
 * than special-casing every `display`-setting class that might get
 * toggled this way.
 */
[hidden] { display: none !important; }

html, body {
    margin: 0;
    padding: 0;
}

body {
    background: var(--bg);
    font-family: 'Public Sans', sans-serif;
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}

a { color: var(--teal); }

/* ---------- header / switcher ---------- */

/*
 * The header and the destination pill are on every screen, so they
 * stay put while content scrolls under them (2026-09-02, reported from
 * a Pixel 8a — on a phone the page scrolls far enough to lose them,
 * taking the unread-messages badge with it, which defeats the point of
 * a badge).
 *
 * `sticky` rather than `fixed` deliberately: it keeps the chrome in
 * normal flow, so nothing below needs a hand-maintained top padding
 * that would drift out of step the moment the header's height changes.
 * The pill is hidden until destinations load, and the wrapper simply
 * gets shorter — which `fixed` would not have handled for free.
 *
 * Needs an opaque background, or scrolled content shows through it.
 */
.app-chrome {
    position: sticky;
    top: 0;
    z-index: 900; /* under the sheet overlay (2000) and the gates above it */
    background: var(--bg);
    /* Installed on a phone the app draws under the status bar. */
    padding-top: env(safe-area-inset-top, 0px);
    transition: box-shadow .18s ease;
}

/* Only once something has actually scrolled beneath it — a permanent
   shadow at rest looks like a mistake. Toggled from app.js. */
.app-chrome.is-stuck {
    box-shadow: 0 6px 16px -12px rgba(18, 33, 61, .55);
}

.app-header {
    flex-shrink: 0;
    padding: 10px 16px 12px;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 8px; }
.brand-mark { width: 26px; height: 26px; flex-shrink: 0; }

.brand-name {
    font-family: 'Archivo', sans-serif;
    font-weight: 600;
    font-size: 19px;
    color: var(--ink);
    letter-spacing: -.01em;
}

.header-actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
    width: 34px; height: 34px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--surface);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    color: var(--ink-soft);
    position: relative;
}

.icon-btn:hover { background: var(--teal-soft); }

.icon-btn .badge {
    /* Unread count: "needs attention", not an error — amber, not the
       narrowed error-red. */
    position: absolute; top: -3px; right: -3px;
    background: var(--amber); color: var(--ink);
    font-family: 'JetBrains Mono', monospace; font-size: 9px; font-weight: 600;
    min-width: 15px; height: 15px; border-radius: 999px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 3px;
}

.destination-pill {
    margin: 0 auto 10px;
    max-width: 40rem;
    width: calc(100% - 32px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: var(--ink);
    color: #fff;
    padding: 10px 14px;
    border-radius: var(--radius);
    cursor: pointer;
    border: none;
    font-family: 'Public Sans', sans-serif;
    /* <button>'s UA stylesheet defaults to text-align:center, which
       cascades to .label/.name below and centers each line inside its
       own width — looks like a growing indent as the destination name
       gets shorter. Same fix applies anywhere else a <button> wraps
       left-aligned content (the sheet-opt rows below, for instance,
       happen to dodge it only because their content already spans
       close to the full width). */
    text-align: left;
}

.destination-pill .label {
    font-size: 9.5px;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #B9CBFA;
    display: block;
    margin-bottom: 1px;
    font-family: 'JetBrains Mono', monospace;
}

.destination-pill .name { font-size: 14px; font-weight: 600; }

/* ---------- layout ---------- */

main.screen {
    flex: 1;
    width: 100%;
    max-width: 40rem;
    margin: 0 auto;
    /* Bottom padding clears the fixed tab bar, plus whatever the phone
       reserves for its gesture bar underneath it. 110px because the bar
       grew from 35px to 64px when it gained icons — at the old 90px the
       last card sat 26px from it, close enough to look clipped. */
    padding: 4px 16px calc(110px + env(safe-area-inset-bottom, 0px));
}

.section-title {
    font-family: 'Archivo', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--ink);
    margin: 18px 0 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-title .see-all {
    font-family: 'Public Sans', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: var(--teal);
    cursor: pointer;
    background: none;
    border: none;
}

.date-banner {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--muted);
    letter-spacing: .03em;
    margin: 14px 0 2px;
    text-transform: uppercase;
}

/* ---------- route card ---------- */

.route-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
    margin-top: 10px;
}

.route-line { display: flex; align-items: stretch; gap: 12px; }

.route-line .track { width: 14px; display: flex; flex-direction: column; align-items: center; flex-shrink: 0; }

/* Signage plate, not a circular map pin — a small rounded square reads
   as a stop marker on a line diagram; the destination end is amber
   (a highlight, not an error) to match the cost/attention family. */
.route-line .node {
    width: 11px; height: 11px; border-radius: 3px;
    background: var(--teal);
    border: 2px solid var(--surface);
    box-shadow: 0 0 0 1.5px var(--teal);
    flex-shrink: 0;
}

.route-line .node.end { background: var(--amber); box-shadow: 0 0 0 1.5px var(--amber); }

/* A solid line rather than the original dashed track — signage draws
   its lines solid, dashes are reserved for the diagram's other
   dividers only where they mean "optional"/"in progress". */
.route-line .dashes {
    flex: 1; width: 2px;
    background: var(--line);
    margin: 2px 0;
}

.route-stops { flex: 1; display: flex; flex-direction: column; justify-content: space-between; }

.route-stop .stop-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px; text-transform: uppercase; letter-spacing: .08em;
    color: var(--muted); margin-bottom: 1px;
}

.route-stop .stop-name { font-size: 14px; font-weight: 600; color: var(--text); }

.route-meta {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line);
}

/* Flat plate with a hard border, not a soft pill — matches the
   signage-plate language of .route-line .node above. */
.cost-badge {
    display: inline-flex; align-items: center; gap: 5px;
    background: var(--amber-soft); color: var(--amber-ink);
    font-family: 'JetBrains Mono', monospace; font-weight: 600; font-size: 12.5px;
    padding: 5px 10px; border-radius: 6px; border: 1px solid #EAC57C;
}

.meet-time { font-family: 'JetBrains Mono', monospace; font-size: 12.5px; color: var(--ink-soft); font-weight: 600; }

/* ---------- generic cards ---------- */

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 10px;
}

.empty-card {
    background: var(--surface);
    border: 1.5px dashed var(--line);
    border-radius: var(--radius);
    padding: 22px 16px;
    text-align: center;
    margin-top: 10px;
}

.empty-card p { font-size: 13px; color: var(--muted); margin: 0 0 12px; line-height: 1.5; }

.notif-prompt {
    margin: 0 auto 10px;
    max-width: 40rem;
    width: calc(100% - 32px);
    background: var(--amber-soft);
    border: 1px solid #EAC57C;
    border-radius: var(--radius);
    padding: 14px 16px;
    text-align: center;
}
.notif-prompt p { font-size: 13px; color: var(--amber-ink); margin: 0 0 10px; line-height: 1.5; }
.notif-prompt-actions { display: flex; gap: 8px; justify-content: center; }

/* ---------- install-to-home-screen prompt (install-prompt.js) ----------
   Same shape and family as .notif-prompt just above (a proactive,
   dismissible offer, amber like the app's other opt-in banners) rather
   than sharing its class — offline-banner/update-banner/push-error keep
   their own blocks too, so a change to one opt-in prompt never risks
   the others. */
.install-prompt {
    margin: 0 auto 10px;
    max-width: 40rem;
    width: calc(100% - 32px);
    background: var(--amber-soft);
    border: 1px solid #EAC57C;
    border-radius: var(--radius);
    padding: 14px 16px;
    text-align: center;
}
.install-prompt p { font-size: 13px; color: var(--amber-ink); margin: 0 0 10px; line-height: 1.5; }
.install-prompt-actions { display: flex; gap: 8px; justify-content: center; }

/* install-instructions-sheet's three steps (iOS only — see the sheet's
   own comment for why there's nothing dynamic to render here). */
.install-steps { margin: 0 0 4px; padding-left: 22px; }
.install-steps li { font-size: 13px; color: var(--ink); line-height: 1.6; margin-bottom: 8px; }

.push-error {
    margin: 0 auto 10px;
    max-width: 40rem;
    width: calc(100% - 32px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: var(--rust-soft);
    border: 1px solid #F3C6C6;
    border-radius: var(--radius);
    padding: 10px 14px;
}
.push-error span { font-size: 12.5px; color: var(--rust); line-height: 1.4; }
.push-error button {
    flex-shrink: 0; border: none; background: none; color: var(--rust); font-size: 14px;
    cursor: pointer; padding: 2px 4px;
}

/* ---------- PWA update prompt (app.js watchForUpdates) ---------- */
.update-banner {
    margin: 0 auto 10px;
    max-width: 40rem;
    width: calc(100% - 32px);
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--teal-soft);
    border: 1px solid var(--teal);
    border-radius: var(--radius);
    padding: 10px 14px;
}
.update-banner span { flex: 1; font-size: 12.5px; color: var(--teal); line-height: 1.4; }
.update-banner button#update-dismiss {
    flex-shrink: 0; border: none; background: none; color: var(--teal); font-size: 14px;
    cursor: pointer; padding: 2px 4px;
}

/* ---------- view switcher (Explore's two views) ---------- */
.segmented {
    display: flex;
    gap: 4px;
    padding: 3px;
    margin-bottom: 12px;
    background: var(--line);
    border-radius: var(--radius);
}
.segmented button {
    flex: 1;
    padding: 7px 10px;
    border: none;
    border-radius: calc(var(--radius) - 3px);
    background: none;
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
    cursor: pointer;
}
.segmented button.active {
    background: var(--surface);
    color: var(--ink);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}

/* ---------- people: avatars, rows, profile card (v1 spec §3a) ----------
   The photo is an identification aid, so it's always circular and
   always the same size in a given context — a list where some rows
   have photos and some don't must still read as one list, which is
   what the placeholder's matching footprint is for. */
.avatar {
    width: 34px; height: 34px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    background: var(--line);
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.is-empty { background: var(--amber-soft); color: var(--amber-ink); }
.avatar-lg { width: 84px; height: 84px; font-size: 38px; }

.person-row {
    display: flex; align-items: center; gap: 10px;
    width: 100%;
    padding: 8px 4px;
    background: none;
    border: none;
    border-bottom: 1px dashed var(--line);
    font: inherit;
    text-align: left;
    cursor: pointer;
}
.person-row:last-child { border-bottom: none; }
.person-row-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.person-row-text .n { font-weight: 500; }
.person-row-text .muted { font-size: 11.5px; }

.profile-card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }

.photo-editor { display: flex; align-items: center; gap: 14px; }
.photo-editor-actions { display: flex; flex-direction: column; gap: 6px; }

/* ---------- ownership line (about.js, splash) ---------- */
.copyright {
    margin: 14px 0 0;
    text-align: center;
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 0.02em;
}

/* ---------- pending seat requests (home.js journeyCardHtml) ----------
   Amber and slightly heavier than .muted: it isn't a warning, it's a
   thing the driver still has to do, and it has to survive a glance at
   a card among several. */
.pending-flag {
    font-size: 12px;
    font-weight: 600;
    color: var(--amber-ink);
    margin: 4px 0 0;
    display: flex;
    align-items: center;
    gap: 6px;
}
.pending-flag::before {
    content: '';
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--amber);
    flex-shrink: 0;
}

/* ---------- offline notice (app.js updateConnectionStatus) ----------
   Amber, not the rust used for errors: being offline is a state the
   app copes with, not a failure — the content underneath it is still
   worth reading, and colouring it like a fault would say otherwise. */
.offline-banner {
    margin: 0 auto 10px;
    max-width: 40rem;
    width: calc(100% - 32px);
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--amber-soft);
    border: 1px solid var(--amber);
    border-radius: var(--radius);
    padding: 10px 14px;
}
.offline-banner span { flex: 1; font-size: 12.5px; color: var(--amber-ink); line-height: 1.4; }
.offline-banner .btn { flex-shrink: 0; }

/* ---------- push bell state (header icon) ---------- */
.icon-btn.push-active { background: var(--teal-soft); color: var(--teal); border-color: var(--teal); }

/* ---------- buttons ---------- */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    font-family: 'Public Sans', sans-serif; font-weight: 600; font-size: 13px;
    padding: 10px 16px; border-radius: 8px; border: none; cursor: pointer;
    transition: transform .1s ease, background .15s ease;
    text-decoration: none; /* the "call" button (messages.js) is an <a href="tel:...">, not a <button> */
}

.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .6; cursor: default; transform: none; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover:not(:disabled) { background: #1B2E52; }
.btn-teal { background: var(--teal); color: #fff; }
.btn-teal:hover:not(:disabled) { background: #15359B; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover:not(:disabled) { background: #EEF1F5; }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 12px; font-size: 12px; border-radius: 8px; }

/* ---------- badges / chips ---------- */

/* Flat plate, not a pill — matches the cost-badge/route-node signage
   language rather than the old "carnet de route" rounded-everything. */
.status-chip {
    font-family: 'JetBrains Mono', monospace; font-size: 10px; font-weight: 600;
    padding: 3px 8px; border-radius: 5px;
}

.status-chip.confirmed { background: var(--teal-soft); color: var(--teal); }
.status-chip.open { background: var(--amber-soft); color: var(--amber-ink); }
.status-chip.warn { background: var(--rust-soft); color: var(--rust); }

/* ---------- collecting payment (v1 spec §8) ---------- */

.collect-qr {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 10px;
    text-align: center;
}

/* The name and the amount, together, above the code. Not decoration:
   each QR carries one passenger's own amount, so the pair has to be
   verifiable before anyone scans — otherwise the same code gets shown
   to people who owe different sums. */
.collect-qr-head {
    display: flex; align-items: baseline; justify-content: center; gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.collect-qr-head strong { font-size: 15px; }

.collect-qr-amount {
    font-family: 'JetBrains Mono', monospace;
    font-size: 17px; font-weight: 600;
    color: var(--teal);
}

/* White ground regardless of the card colour — a QR on a tinted
   background is measurably harder for a camera to lock onto. */
.collect-qr-code {
    display: inline-block;
    background: #FFFFFF;
    padding: 10px;
    border-radius: 10px;
    line-height: 0;
}

.collect-qr-code svg { width: 190px; height: 190px; }
.collect-qr-note { font-size: 11.5px; line-height: 1.45; margin: 10px 0 0; }

/* ---------- seat alerts (v1 spec §7a) ---------- */

.alert-card { border-style: dashed; }

.alert-row {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
}

.alert-row:last-of-type { border-bottom: 0; }
.alert-row strong { font-size: 13px; }
.alert-row .muted { font-size: 11.5px; margin-left: 6px; }

/* The driver-facing demand count on the post-a-journey form. Given
   weight deliberately — it exists to prompt someone to post a journey
   they might not otherwise, so reading as incidental grey text would
   defeat it. */
.demand-hint {
    margin: 4px 0 10px;
    padding: 8px 10px;
    border-radius: 10px;
    background: var(--amber-soft);
    color: var(--amber-ink);
    font-size: 12.5px;
    font-weight: 600;
}

/* "Mes points de départ" — a checkbox list, one row per candidate. */
.check-row {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
    cursor: pointer;
}

.check-row:last-of-type { border-bottom: 0; }
.check-row input { margin-top: 2px; flex-shrink: 0; }
.check-row span { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.check-row .muted { font-size: 11.5px; }

/* ---------- form fields ---------- */

.field { margin-bottom: 10px; display: flex; flex-direction: column; gap: 4px; }

.field label { font-size: 12px; font-weight: 600; color: var(--ink-soft); }

.field input[type="text"],
.field input[type="email"],
.field input[type="number"],
.field input[type="search"],
.field input[type="time"],
.field input[type="date"],
.field select,
.field textarea {
    font: inherit;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px 10px;
    background: #F7F9FB;
    color: var(--ink);
}

.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--teal); outline-offset: 1px; }

/* ---------- day navigation (Phase 12) ---------- */

.day-nav {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    margin-top: 14px;
}
.day-nav .date-banner { margin: 0; flex: 1; text-align: center; }
.day-nav .icon-btn { flex-shrink: 0; }

/* ---------- search results / explore ---------- */

.search-result {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 10px 0; border-bottom: 1px solid var(--line);
}

.search-result:last-child { border-bottom: none; }
.search-result .t1 { font-size: 13.5px; font-weight: 600; }
.search-result .t2 { font-size: 11.5px; color: var(--muted); }

.map-wrap {
    position: relative;
    margin-top: 10px;
}

.map-box {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--line);
    height: min(50vh, 420px);
    background: #E4E9EF;
}

.map-wrap.fullscreen {
    position: fixed;
    inset: 0;
    z-index: 1000;
    margin: 0;
    background: var(--bg);
}

.map-wrap.fullscreen .map-box {
    height: 100%;
    border-radius: 0;
    border: none;
}

.map-exit-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 1001;
    background: var(--surface);
}

/* Leaflet's own zoom control sits at z-index 1000 (its stylesheet, not
   ours), which otherwise floats it above .app-chrome (900) once the
   map scrolls the embedded (non-fullscreen) box up under the sticky
   header. Fullscreen mode needs no such cap — there the map covers the
   header anyway, and .map-wrap.fullscreen itself already sits at 1000. */
.map-wrap:not(.fullscreen) .leaflet-top,
.map-wrap:not(.fullscreen) .leaflet-bottom {
    z-index: 750;
}

/* ---------- tab bar ---------- */

/* Solid ink bar, not a dashed line on the page background — signage
   uses a distinct colour block for its own strip rather than blending
   into the page, and it's what gives the amber active-indicator
   something to read against. */
.tab-bar {
    flex-shrink: 0;
    display: flex;
    background: var(--ink);
    position: fixed;
    left: 0; right: 0; bottom: 0;
    max-width: 40rem;
    margin: 0 auto;
    /* Same reason .app-chrome needs one, and the same value: without an
       explicit z-index a fixed, positioned element with z-index:auto
       still loses to *any* positive z-index descendant elsewhere in the
       document, stacking-context or not — which is exactly what
       Leaflet's own panes are (tile/marker/popup panes run 200-700,
       independently of the 750 cap just above, which only covers the
       zoom/attribution controls). Reported live (2026-09-03): the
       Explore meeting-points map painted over the tab bar once its
       scroll position put the map's own panes level with it. */
    z-index: 900;
    /* Same reason as the chrome's top inset: keeps the tabs clear of
       the gesture bar on a phone. */
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

/*
 * Icon above a centred label (2026-09-02): the bar was 10px text alone
 * and read as an afterthought rather than the app's primary
 * navigation.
 */
.tab-btn {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 0 12px;
    background: none;
    border: none;
    cursor: pointer;
    /* Muted blue-grey on the dark bar, not the page's neutral --muted
       (which is tuned for text on --bg/--surface and would be too low
       contrast here). */
    color: #7C8CB3;
    font-family: 'Public Sans', sans-serif;
    font-size: 11.5px;
    font-weight: 700;
    -webkit-tap-highlight-color: transparent;
    transition: color .15s ease;
}

/* Geometry lives in the markup, appearance here — so the active state
   changes colour *and* weight without the markup knowing anything. */
.tab-btn svg {
    width: 23px;
    height: 23px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke-width .15s ease;
}

.tab-btn.active { color: #fff; }
.tab-btn.active svg { stroke-width: 2.1; }

/*
 * The active marker is a pseudo-element rather than a border, so
 * turning it on doesn't resize the button — the old `border-top` had
 * to be paid back with a matching padding-top on the same rule to stop
 * the whole tab jumping by 2px as you switched screens.
 */
.tab-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 2.5px;
    border-radius: 0 0 3px 3px;
    background: transparent;
    transition: background .15s ease;
}

.tab-btn.active::before { background: var(--amber); }

/* Screens a later phase registers — visibly unavailable, not just inert. */
.tab-btn:disabled { opacity: .4; cursor: default; }

/* ---------- sheets / modals ---------- */

.overlay {
    /* Above Leaflet's own panes (tile/overlay/marker/popup panes run
       200-700) — a plain z-index:51 lost to those every time, which is
       why the destination-switcher sheet rendered *under* the map on
       the Explore screen. */
    position: fixed; inset: 0; background: rgba(18, 33, 61, .42);
    opacity: 0; pointer-events: none; transition: opacity .18s ease; z-index: 2000;
}

.overlay.show { opacity: 1; pointer-events: auto; }

.sheet {
    position: fixed; left: 0; right: 0; bottom: 0;
    max-width: 40rem; margin: 0 auto;
    background: var(--surface);
    border-radius: 16px 16px 0 0; padding: 8px 18px 22px; z-index: 2001;
    transform: translateY(105%); transition: transform .24s ease;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, .15);
    max-height: 80vh; overflow-y: auto;
}

.sheet.show { transform: translateY(0); }

/*
 * The grab handle became a full-width row so it can carry a close
 * button (2026-09-02): tapping the backdrop dismissed a sheet, but
 * nothing said so, which on a phone reads as being stuck. It's sticky
 * rather than absolutely positioned because .sheet scrolls — on a long
 * sheet (vehicles, invites) an absolute button would scroll out of
 * reach, which is the same problem again.
 *
 * Negative margins bleed the row out to .sheet's own 18px padding, so
 * the opaque background covers content passing underneath it.
 */
.sheet-handle {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    margin: 0 -18px 10px;
    padding: 8px 18px 0;
    background: var(--surface);
}

/* The grabber itself — decorative, hence a pseudo-element. */
.sheet-handle::before {
    content: '';
    width: 36px;
    height: 4px;
    background: var(--line);
    border-radius: 99px;
}

/*
 * Any sheet long enough to scroll on most phones (#profile-sheet,
 * #feature-requests-sheet — 2026-09-04, same issue reported there):
 * the plain `.sheet` scrolls itself, and the browser's own scrollbar
 * track then draws square-cornered right across the sheet's rounded
 * top corner, regardless of its border-radius. Moving the scrolling
 * onto an inner `.sheet-body` wrapper keeps the outer sheet's corners
 * clipped and puts the scrollbar inside the rounded frame. Opt in by
 * giving a sheet's content a `.sheet-body` wrapper — most sheets are
 * short enough not to need this at all.
 */
#profile-sheet,
#feature-requests-sheet {
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#profile-sheet .sheet-body,
#feature-requests-sheet .sheet-body {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.sheet-close {
    position: absolute;
    top: 2px;
    right: 12px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
    color: var(--ink-soft);
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.sheet-close:hover { background: #EEF1F5; color: var(--ink); }
.sheet-close:active { transform: scale(.94); }
.sheet-close:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.sheet h3 { font-family: 'Archivo', sans-serif; font-size: 17px; margin: 0 0 12px; color: var(--ink); }

.sheet-opt-row {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    border-bottom: 1px solid var(--line);
}

.sheet-opt-row:last-of-type { border-bottom: none; }

.sheet-opt {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 4px; cursor: pointer; background: none; border: none; flex: 1; min-width: 0; text-align: left; font: inherit;
}

.sheet-opt .g1 { font-size: 13.5px; font-weight: 600; }
.sheet-opt .g2 { font-size: 11px; color: var(--muted); }
.sheet-opt-unpin { flex-shrink: 0; width: 28px; height: 28px; }
.sheet-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }

/* ---------- quick-start tour (tour.js, 2026-09-03) ---------- */

/*
 * A scroll-snap carousel rather than JS gesture tracking: swipe
 * momentum, the rubber-band at both ends, two-finger trackpad swipe
 * and shift+wheel are all native behaviours here, and the Next/Back
 * buttons drive the same scroll position the finger does.
 *
 * `overscroll-behavior-x: contain` earns its place — without it, an
 * over-swipe past the last card triggers iOS Safari's own
 * back-navigation gesture, which is a spectacular way to end an
 * onboarding tour.
 *
 * No `touch-action` on the cards, deliberately: `pan-y` there — the
 * instinctive "help the vertical scroll" move, since .sheet is itself
 * a vertical scroller — would kill the horizontal swipe outright.
 * Browsers pick the axis per-gesture on their own.
 */
.tour-track {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    /*
     * No min-height, and none needed: the six cards are flex items in
     * one row, so the track is already exactly as tall as the tallest
     * of them and every card is stretched to match. That's what stops
     * the dots and the Next button jumping vertically mid-swipe —
     * which would read as a layout bug rather than as a carousel —
     * without guessing a pixel value that the copy would then outgrow.
     */
}

.tour-track::-webkit-scrollbar { display: none; }

.tour-card {
    flex: 0 0 100%;
    scroll-snap-align: center;
    padding: 2px 2px 4px;
}

.tour-card .tour-glyph { font-size: 30px; line-height: 1.1; }
.tour-card h4 { font-size: 16.5px; margin: 8px 0 10px; color: var(--ink); }
.tour-card p { font-size: 13px; line-height: 1.55; color: var(--text); margin: 0 0 9px; }
.tour-card .tour-note { font-size: 11.5px; color: var(--muted); font-style: italic; }

.tour-dots { display: flex; justify-content: center; gap: 8px; padding: 4px 0 2px; }

/*
 * Real buttons, not decorative spans: jumping straight to a card is a
 * legitimate control, and it costs nothing to make it work for a
 * pointer and a screen reader at the same time.
 */
.tour-dot {
    width: 8px; height: 8px; padding: 0;
    border: none; border-radius: 50%;
    background: var(--line);
    cursor: pointer;
    transition: background .18s ease, transform .18s ease;
}

.tour-dot.is-active { background: var(--teal); transform: scale(1.35); }

.tour-actions { margin-top: 8px; }
.tour-secondary { display: flex; justify-content: space-between; align-items: center; }

/* Present for assistive tech, absent visually — the tour's heading is
   the sheet's accessible name, but the cards carry their own titles
   and a second one on screen would just be noise. */
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- planning screen (Phase 11) ---------- */

.week-grid { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.week-row {
    display: flex; align-items: center; gap: 10px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px;
}
.week-row .dname { font-size: 13px; font-weight: 600; width: 38px; flex-shrink: 0; }
.week-row .time-sep { color: var(--muted); font-size: 12px; }
.week-row.off { opacity: .55; }
.week-row.off .time-field { visibility: hidden; }
.week-row .off-label { font-size: 12px; color: var(--muted); font-style: italic; }
.week-row .field { margin-bottom: 0; }
.week-row .off-toggle { flex-shrink: 0; }

.time-field {
    font-family: 'JetBrains Mono', monospace; font-size: 12.5px; border: 1px solid var(--line);
    border-radius: 8px; padding: 6px 6px; background: #F7F9FB; width: 100px; text-align: center; color: var(--ink);
}

/* Amber, not the narrowed error-red: a schedule exception ("early
   departure today") is a heads-up, not a fault — same "needs
   attention" family as the cost badge and an open seat. */
.exception-card {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
    background: var(--amber-soft); border: 1px solid #EAC57C; border-radius: 10px; padding: 11px 12px; margin-bottom: 8px;
}
.exception-card .t1 { font-size: 12.5px; font-weight: 600; color: var(--amber-ink); }
.exception-card .t2 { font-size: 11px; color: #A87A2E; margin-top: 2px; }

/* ---------- costs screen (Phase 13) ---------- */

.balance-card {
    background: var(--ink); color: #fff; border-radius: var(--radius); padding: 18px;
    margin-top: 10px; text-align: center;
}
.balance-card .label { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: #B9CBFA; }
.balance-card .amount { font-family: 'Archivo', sans-serif; font-size: 32px; font-weight: 600; margin: 4px 0 0; }

.trip-cost-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-top: 10px; }
.trip-cost-header { display: flex; align-items: center; justify-content: space-between; }
.trip-cost-header .t1 { font-size: 13px; font-weight: 600; }
.trip-cost-header .t2 { font-size: 11px; color: var(--muted); }
.split-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--line); margin-top: 8px; gap: 8px; }
.split-row .n { font-size: 12.5px; }
/* The parking-split slider's live readout (2026-09-06) — sits between
   the two end labels, and is the one part of that row that is not muted. */
.split-row .split-value { font-size: 12px; color: var(--ink); white-space: nowrap; }
.pay-toggle {
    font-family: 'JetBrains Mono', monospace; font-size: 10.5px; font-weight: 600;
    border: none; padding: 5px 10px; border-radius: 6px; cursor: pointer; flex-shrink: 0;
}
.pay-toggle.paid { background: var(--teal-soft); color: var(--teal); }
/* Amber, not the narrowed error-red: an unpaid split is something to
   settle, not a fault — same family as an open seat or a cost badge. */
.pay-toggle.unpaid { background: var(--amber-soft); color: var(--amber-ink); }
.settled-badge { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--teal); background: var(--teal-soft); padding: 3px 8px; border-radius: 5px; }

/* ---------- messaging (Phase 14) + notifications (2026-09-01) ---------- */

.tab-switch {
    display: flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 10px 0 14px;
}
.tab-switch button {
    flex: 1; border: none; background: var(--surface); padding: 8px 0; cursor: pointer;
    font-family: 'Public Sans', sans-serif; font-size: 12.5px; font-weight: 600; color: var(--muted);
}
.tab-switch button.active { background: var(--ink); color: #fff; }

.conversation-row {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    width: 100%; padding: 12px 0; border: none; border-bottom: 1px solid var(--line);
    background: none; cursor: pointer; text-align: left; font: inherit;
}
.conversation-row:last-child { border-bottom: none; }
.conversation-row .t1 { font-size: 13.5px; font-weight: 500; color: var(--text); }
.conversation-row .t1.unread { font-weight: 700; color: var(--ink); }
.conversation-row .t2 { font-size: 11.5px; color: var(--muted); margin-top: 2px; display: block; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation-row .time { font-size: 10px; color: var(--muted); font-family: 'JetBrains Mono', monospace; }
/* Amber, not the narrowed error-red — an unread message is something
   to attend to, not a fault. */
.unread-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); display: inline-block; }

/* Read notifications (Messages > Notifications tab), collapsed by
   default — see messages.js's groupByRecency()/recencyGroupHtml(). */
#notif-read-toggle > summary,
.notif-recency-group > summary {
    cursor: pointer; list-style: none; font-family: 'Public Sans', sans-serif;
}
#notif-read-toggle > summary::-webkit-details-marker,
.notif-recency-group > summary::-webkit-details-marker { display: none; }
#notif-read-toggle > summary { font-size: 12.5px; padding: 4px 0; }
.notif-recency-group { margin: 6px 0; padding-left: 4px; border-left: 2px solid var(--line); }
.notif-recency-group > summary {
    font-size: 11.5px; font-weight: 600; color: var(--muted); padding: 4px 0 4px 6px;
}
.notif-recency-group > summary::before { content: '▸ '; }
.notif-recency-group[open] > summary::before { content: '▾ '; }
.notif-recency-group .conversation-row { padding-left: 6px; }

.thread-header { display: flex; align-items: center; gap: 10px; margin: 16px 0 10px; }
.thread-messages { display: flex; flex-direction: column; gap: 8px; padding: 4px 0 12px; }
.msg-bubble { max-width: 78%; padding: 9px 12px; border-radius: 14px; font-size: 13px; line-height: 1.4; }
.msg-bubble.theirs { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg-bubble.mine { align-self: flex-end; background: var(--ink); color: #fff; border-bottom-right-radius: 4px; }
.msg-bubble .meta { display: block; font-size: 9.5px; margin-top: 4px; opacity: .65; font-family: 'JetBrains Mono', monospace; }
.msg-bubble { position: relative; }
/* Report flag (2026-09-06) — only ever on a message from someone
   else, so it is positioned for the .theirs bubble alone. Low-contrast
   until hovered/focused: reporting should be findable, not shouted. */
.msg-report {
    position: absolute; top: 2px; right: -22px;
    border: 0; background: none; cursor: pointer; padding: 2px;
    font-size: 12px; line-height: 1; color: var(--muted); opacity: .5;
}
.msg-report:hover, .msg-report:focus-visible { opacity: 1; color: var(--rust); }
.msg-report.reported { opacity: 1; color: var(--rust); cursor: default; }
.thread-compose { display: flex; gap: 8px; margin-top: 4px; }
.thread-compose input[type="text"] {
    flex: 1; font: inherit; font-family: 'Public Sans', sans-serif; font-size: 13px;
    border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; background: #F7F9FB; color: var(--ink);
}
.thread-compose input[type="text"]:focus { outline: 2px solid var(--teal); outline-offset: 1px; }

/* ---------- toasts (2026-09-01) ---------- */

.toast-container {
    position: fixed; left: 0; right: 0; bottom: 78px; /* clears the fixed tab-bar */
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    padding: 0 16px; z-index: 3000; pointer-events: none;
}
.toast {
    max-width: 100%; padding: 10px 16px; border-radius: 999px;
    font-family: 'Public Sans', sans-serif; font-size: 12.5px; font-weight: 600; color: #fff;
    text-align: center; box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
    animation: toast-in .18s ease;
}
.toast.error { background: var(--rust); }
.toast.info { background: var(--ink); }
@keyframes toast-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------- misc ---------- */

.status { margin: 0.25rem 0 0; font-size: 0.85rem; color: var(--muted); }
/* Amber, matching .offline-banner's reasoning above: being offline is
   a state the app copes with, not a failure, so it shouldn't share a
   colour with genuine errors. */
.status.offline { color: var(--amber-ink); }
.muted { color: var(--muted); font-size: 12.5px; }
.you-tag { font-family: 'JetBrains Mono', monospace; font-size: 9px; color: var(--ink-soft); background: #E6E9F1; padding: 2px 6px; border-radius: 6px; }

/* ---------- invites panel (v1 spec §4) ---------- */

/* Wraps onto a right-justified second line once the email address plus
 * status chip and 1-2 action buttons no longer fit on one — reported
 * off-screen to the right on a narrow phone otherwise, since the plain
 * .search-result row never wraps and .invite-row-actions was pinned
 * flex-shrink: 0. */
.invite-row { flex-wrap: wrap; }
.invite-row-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; flex-basis: 100%; justify-content: flex-end; }

/* ---------- blocking gate (terms re-acceptance / suspended account) ----------
   Deliberately not a .sheet: a sheet is dismissible by tapping the
   overlay, and both of these states leave every other API call
   failing, so a dismissible prompt would strand the user in an app
   where nothing works and nothing says why. One way out, on purpose. */

.blocking-gate {
    position: fixed; inset: 0; z-index: 3100;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    background: rgba(18, 33, 61, .55);
}

.blocking-gate-card {
    background: var(--surface);
    border-radius: 12px;
    padding: 22px 20px;
    width: 100%; max-width: 32rem;
    max-height: 84vh; overflow-y: auto;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .28);
}

.blocking-gate-card h3 { font-family: 'Archivo', sans-serif; font-size: 18px; margin: 0 0 10px; color: var(--ink); }
.blocking-gate-card p { font-size: 13.5px; line-height: 1.55; }

.terms-body {
    margin: 14px 0;
    padding: 14px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 10px;
    max-height: 38vh; overflow-y: auto;
    font-size: 12.5px; line-height: 1.6;
}

/* ---------- auth pages (server-rendered: login, invite, message) ----------
   These sit outside the PWA shell — they're the first thing anyone
   ever sees, and were plain unstyled HTML placeholders until
   2026-09-02. They reuse this stylesheet rather than carrying their
   own so the sign-in flow and the app can't drift apart. */

.auth-body {
    justify-content: center;
    align-items: center;
    padding: 24px 18px 40px;
    background:
        radial-gradient(circle at 50% 0%, #FFFFFF 0%, rgba(255, 255, 255, 0) 55%),
        var(--bg);
}

.auth-card {
    width: 100%;
    max-width: 27rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 30px 26px 26px;
    box-shadow: 0 1px 2px rgba(18, 33, 61, .04), 0 18px 40px -28px rgba(18, 33, 61, .38);
}

.auth-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-bottom: 22px;
}

.auth-brand .name {
    font-family: 'Archivo', sans-serif;
    font-size: 21px;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: -.01em;
}

.auth-card h1 {
    font-family: 'Archivo', sans-serif;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.25;
    color: var(--ink);
    margin: 0 0 6px;
    text-align: center;
    text-wrap: balance;
}

.auth-sub {
    margin: 0 0 20px;
    text-align: center;
    font-size: 13px;
    line-height: 1.55;
    color: var(--muted);
}

/* --- SSO --- */

.sso-list { display: flex; flex-direction: column; gap: 8px; }

.sso-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 11px 14px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, transform .1s ease;
}

.sso-btn:hover { background: #F7F9FB; border-color: #C9D2DE; }
.sso-btn:active { transform: scale(.985); }
.sso-btn:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.sso-btn svg { flex: 0 0 auto; }

/* Discord's own brand colour — the one place a third party's palette
   beats ours, because a sign-in button that doesn't look like the
   service it signs you into is harder to trust, not more elegant. */
.sso-discord { background: #5865F2; border-color: #5865F2; color: #fff; }
.sso-discord:hover { background: #4854E0; border-color: #4854E0; }

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0 16px;
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-top: 1px dashed var(--line);
}

/* --- invite page --- */

.auth-terms {
    max-height: 34vh;
    overflow-y: auto;
    padding: 12px 14px;
    margin-bottom: 10px;
    background: #F7F9FB;
    border: 1px solid var(--line);
    border-radius: 10px;
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--text);
    white-space: pre-wrap;
}

.auth-check {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--ink);
    cursor: pointer;
}

.auth-check input { margin-top: 2px; accent-color: var(--teal); flex: 0 0 auto; }

.auth-legend {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 18px 0 8px;
}

.auth-choice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font-size: 13.5px;
    color: var(--ink);
    cursor: pointer;
    margin-bottom: 7px;
    transition: border-color .15s ease, background .15s ease;
}

.auth-choice:hover { background: #F7F9FB; }
.auth-choice input { accent-color: var(--teal); }
.auth-choice:has(input:checked) { border-color: var(--teal); background: var(--teal-soft); }

.auth-meta {
    font-size: 12px;
    color: var(--muted);
    text-align: center;
    margin: 0 0 18px;
}

/* --- message page --- */

.auth-icon {
    display: block;
    margin: 0 auto 14px;
    width: 46px; height: 46px;
}

.auth-body-text {
    text-align: center;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
    margin: 0 0 20px;
}

.auth-foot {
    margin: 18px 0 0;
    text-align: center;
    font-size: 11.5px;
    color: var(--muted);
}

.auth-foot a { color: var(--ink-soft); }

.auth-error {
    background: var(--rust-soft);
    border: 1px solid var(--rust);
    color: #8A3D2C;
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 13px;
    margin-bottom: 14px;
}
