/* RideLog styles.
   One quiet system: cool off-white page, white surfaces, one pine-green accent,
   red only for problems, and the yellow kilometre stone as the single signature mark.
   Public Sans for the interface, Source Serif 4 for ride stories. */

:root {
  --bg: #f4f5f3;
  --surface: #ffffff;
  --ink: #1c2421;
  --ink-2: #3b4642;
  --muted: #67716d;
  --line: #e1e4e0;
  --line-2: #cdd3ce;
  --accent: #2c5e4f;
  --accent-hover: #234c40;
  --accent-soft: #e8f0ec;
  --danger: #b3261e;
  --danger-soft: #fbeeec;
  --signal: #e9b020;
  --signal-soft: #fff7df;
  --ok: #23704a;
  --ok-soft: #e6f3ec;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Source Serif 4", Charter, "Iowan Old Style", Georgia, serif;
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --shadow: 0 1px 2px rgba(28, 36, 33, .05), 0 6px 20px rgba(28, 36, 33, .06);
  --gutter: 20px;
  --measure: 700px;     /* one column width for the whole ride page */
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }   /* scrolled-to things stop below the sticky header */
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.55 var(--sans); }
img { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }
h1, h2, h3 { line-height: 1.2; color: var(--ink); margin: 0 0 .5em; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small-text, small { font-size: .875rem; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
body.no-scroll { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

.container { max-width: 1120px; margin: 0 auto; padding: 28px var(--gutter) 72px; }
.narrow { max-width: 640px; margin-left: auto; margin-right: auto; }
.reading { max-width: var(--measure); margin-left: auto; margin-right: auto; }
@media (max-width: 600px) { :root { --gutter: 16px; } .container { padding-top: 20px; } h1 { font-size: 1.5rem; } }

/* ------------------------------------------------------------------ header + menu */
.topbar { position: sticky; top: 0; z-index: 1000; display: flex; align-items: center; gap: 6px; height: 60px;
          padding: 0 calc(var(--gutter) - 8px); background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--line);
          backdrop-filter: saturate(1.2) blur(6px); }
.brand { flex: 1; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.1rem; letter-spacing: -.01em; padding: 0 6px; }
.brand:hover { color: var(--ink); }
.icon-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin: 0;
            padding: 0; border: 0; border-radius: 10px; background: none; color: var(--ink); cursor: pointer; }
.icon-btn:hover { background: var(--bg); }
.icon-btn .ico { width: 22px; height: 22px; }
.dot { position: absolute; top: 7px; right: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--danger); border: 2px solid #fff; }
.topbar .btn { margin-left: 4px; }

.scrim { position: fixed; inset: 0; z-index: 2500; background: rgba(28, 36, 33, .4); }
.sidebar { position: fixed; top: 0; bottom: 0; left: 0; z-index: 3000; width: min(300px, 84vw); overflow-y: auto; background: var(--surface);
           transform: translateX(-102%); visibility: hidden; transition: transform .2s ease, visibility .2s; box-shadow: 6px 0 30px rgba(0, 0, 0, .12); }
.sidebar.open { transform: none; visibility: visible; }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; height: 60px; padding: 0 10px 0 20px; border-bottom: 1px solid var(--line); }
.sidebar-head span { font-weight: 600; }
.sidebar nav { padding: 8px 0; }
.sidebar nav a { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; color: var(--ink); text-decoration: none; font-weight: 500; }
.sidebar nav a:hover { background: var(--bg); }
.sidebar nav hr { border: 0; border-top: 1px solid var(--line); margin: 8px 20px; }
.count { display: inline-block; min-width: 22px; padding: 0 7px; border-radius: 999px; background: var(--accent); color: #fff;
         font-size: .75rem; font-weight: 700; line-height: 20px; text-align: center; }

.footer { max-width: 1120px; margin: 0 auto; padding: 24px var(--gutter) 40px; border-top: 1px solid var(--line);
          display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .875rem; }
.footer a { color: var(--muted); }

.flash { margin: 0 0 20px; padding: 12px 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line);
         border-left: 4px solid var(--accent); }

/* ------------------------------------------------------------------ buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; margin: 0; padding: 0 18px;
       border: 1px solid var(--accent); border-radius: 10px; background: var(--accent); color: #fff; font: 600 .95rem/1.2 var(--sans);
       text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn:disabled { opacity: .55; cursor: default; }
.btn.secondary { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn.secondary:hover { background: var(--bg); color: var(--ink); }
.btn.ghost { background: none; border-color: transparent; color: var(--accent); padding: 0 10px; }
.btn.ghost:hover { background: var(--accent-soft); }
.btn.danger { background: var(--danger); border-color: var(--danger); }
.btn.danger:hover { background: #8f1e17; border-color: #8f1e17; }
.btn.small { min-height: 34px; padding: 0 12px; font-size: .875rem; border-radius: 8px; }
.btn.block { width: 100%; }
.btn[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-hover); }
.link-button { margin: 0; padding: 0; border: 0; background: none; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.link-button.danger, .danger-link { color: var(--danger); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 24px; }
.inline-form { display: inline-flex; align-items: center; gap: 8px; margin: 0; flex-wrap: wrap; }

/* ------------------------------------------------------------------ page structure */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; margin-bottom: 24px; }
.page-head h1 { margin: 0; }
.page-head p { margin: 6px 0 0; color: var(--muted); max-width: 60ch; }
.section { margin-top: 44px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-title h2 { margin: 0; }
.section-title a { font-size: .9rem; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; margin: 0 0 20px; }
.panel > h2:first-child { margin-top: 0; }
.panel-note { margin: -6px 0 16px; color: var(--muted); font-size: .9rem; }
@media (max-width: 600px) { .panel { padding: 18px; border-radius: var(--r); } }
.empty-state { text-align: center; padding: 56px 16px; color: var(--muted); }
.empty-state p { margin-bottom: 16px; }
.notice { padding: 12px 14px; border-radius: var(--r); background: var(--signal-soft); border: 1px solid #f0dd9d; font-size: .95rem; }
.notice.ok { background: var(--ok-soft); border-color: #bfe0cc; }
.notice p { margin: 0; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); color: var(--ink-2);
         font-size: .78rem; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.badge.ok { background: var(--ok-soft); border-color: #bfe0cc; color: var(--ok); }
.badge.signal { background: var(--signal-soft); border-color: #f0dd9d; color: #7a5600; }
.badge.danger { background: var(--danger-soft); border-color: #f2c4bf; color: var(--danger); }
.chip { display: inline-block; padding: 3px 10px; margin: 0 4px 4px 0; border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
        color: var(--ink-2); font-size: .85rem; }
a.chip { text-decoration: none; }
a.chip:hover { border-color: var(--danger); color: var(--danger); }
.meta { color: var(--muted); font-size: .9rem; }
.meta span + span::before { content: "·"; margin: 0 7px; color: var(--line-2); }

/* lists with dividers (used instead of boxes where possible) */
.list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.list > li, .list > a { display: flex; align-items: center; gap: 12px 16px; padding: 14px 18px; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
.list > :first-child { border-top: 0; }
.list > a:hover { background: #fafbfa; }
.list .grow { flex: 1; min-width: 0; }
.list .title { display: block; font-weight: 600; color: var(--ink); }
.list .sub { display: block; color: var(--muted); font-size: .9rem; }
@media (max-width: 600px) { .list > li, .list > a { padding: 12px 14px; flex-wrap: wrap; } }

/* tables (desktop); .table-wrap scrolls on phones */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--muted); font-size: .8rem; font-weight: 600; }

/* ------------------------------------------------------------------ forms */
.form label, .field { display: block; margin: 0 0 16px; font-weight: 600; font-size: .9rem; color: var(--ink-2); }
.form label small, .hint { display: block; font-weight: 400; color: var(--muted); font-size: .85rem; margin-top: 2px; }
.form label > small { display: inline; margin-left: 4px; }
input, select, textarea { width: 100%; margin-top: 6px; padding: 10px 12px; min-height: 44px; border: 1px solid var(--line-2); border-radius: 10px;
                          background: var(--surface); color: var(--ink); font: 400 1rem/1.4 var(--sans); }
textarea { min-height: 0; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(44, 94, 79, .15); }
input[type=checkbox], input[type=radio] { width: auto; min-height: 0; margin: 0; accent-color: var(--accent); }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 14px; }
label.check { display: flex; align-items: center; gap: 10px; font-weight: 400; font-size: .95rem; color: var(--ink); margin: 0 0 10px; cursor: pointer; }
fieldset { border: 0; padding: 0; margin: 0 0 16px; }
legend { padding: 0; margin-bottom: 8px; font-weight: 600; font-size: .9rem; color: var(--ink-2); }
details > summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: .95rem; padding: 6px 0; list-style-position: inside; }
details[open] > summary { margin-bottom: 10px; }
details.optional { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }

/* pill choices built from radio/checkbox inputs */
.choices { display: flex; flex-wrap: wrap; gap: 6px; }
.choices label { margin: 0; font-weight: 500; }
.choices input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choices span { display: inline-block; padding: 7px 14px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface);
                color: var(--ink-2); font-size: .9rem; cursor: pointer; }
.choices input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.choices input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ------------------------------------------------------------------ the kilometre stone (signature) */
.milestone { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-width: 58px; padding: 7px 12px 5px;
             border: 1.5px solid var(--ink); border-radius: 20px 20px 4px 4px; background: var(--signal); color: var(--ink); line-height: 1; }
.milestone b { font-size: 1.2rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.milestone i { font-style: normal; font-size: .65rem; font-weight: 700; margin-top: 2px; }

/* ------------------------------------------------------------------ home */
.home-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 12px 0 8px; }
.home-head h1 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); margin: 0 0 8px; letter-spacing: -.02em; }
.home-head p { margin: 0; color: var(--muted); max-width: 52ch; font-size: 1.05rem; }
.home-stat { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .9rem; }
.home-stat .milestone b { font-size: 1.6rem; }
.home-stat .milestone { padding: 10px 16px 7px; border-radius: 26px 26px 5px 5px; }

/* ride cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.ride-card { display: flex; flex-direction: column; color: inherit; text-decoration: none; background: var(--surface); border: 1px solid var(--line);
             border-radius: var(--r-lg); overflow: hidden; transition: box-shadow .15s; }
.ride-card:hover { color: inherit; box-shadow: var(--shadow); }
.ride-card .cover { position: relative; aspect-ratio: 16 / 10; background: #dfe5e1 center / cover no-repeat; }
.ride-card .cover.empty { background: linear-gradient(160deg, #e3e9e5, #cfd9d3); }
.ride-card .milestone { position: absolute; left: 14px; bottom: -14px; }
.ride-card .body { padding: 24px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.ride-card h3 { font-size: 1.15rem; margin: 0; }
.ride-card .snippet { margin: 0; color: var(--ink-2); font-size: .95rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ride-card .meta { margin-top: auto; padding-top: 6px; }
@media (min-width: 860px) {
  .ride-card.featured { grid-column: 1 / -1; flex-direction: row; }
  .ride-card.featured .cover { flex: 0 0 58%; aspect-ratio: auto; min-height: 340px; }
  .ride-card.featured .milestone { bottom: 16px; }
  .ride-card.featured .body { padding: 32px; justify-content: center; }
  .ride-card.featured h3 { font-size: 1.6rem; }
  .ride-card.featured .snippet { -webkit-line-clamp: 4; font-size: 1rem; }
  .ride-card.featured .meta { margin-top: 10px; }
}

/* ------------------------------------------------------------------ ride page */
.story-head { max-width: var(--measure); margin: 8px auto 20px; }
.story-head .meta { margin-bottom: 10px; }
.story-head h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(2rem, 5.5vw, 3rem); letter-spacing: -.015em; line-height: 1.1; margin-bottom: 14px; text-wrap: balance; }
.byline { color: var(--muted); }
.byline a { color: var(--ink); }
.facts { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; max-width: var(--measure); margin: 0 auto 28px; padding: 16px 0;
         border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts dl { display: contents; }
.facts div { min-width: 0; }
.facts dt { color: var(--muted); font-size: .8rem; }
.facts dd { margin: 0; font-weight: 600; }
.facts .edit-link { margin-left: auto; }
.cover-photo { margin: 0 auto 32px; max-width: 1000px; }
.cover-photo img { display: block; width: 100%; max-height: 72vh; object-fit: cover; border-radius: var(--r-lg); cursor: zoom-in; }

.prose { max-width: var(--measure); margin: 0 auto; font-family: var(--serif); font-size: 1.15rem; line-height: 1.75; color: #222b28; }
.prose p { margin: 0 0 1.15em; }
.prose .lede { font-size: 1.25rem; }
.prose h2 { font-family: var(--sans); font-size: 1.15rem; margin: 2.2em 0 .6em; }
.prose h2.story-h { font-size: 1.4rem; margin: 1.8em 0 .5em; }
.prose h3, h3.story-h { font-family: var(--sans); font-size: 1.1rem; margin: 1.6em 0 .4em; }
h4.story-h { font-size: 1rem; margin: 1.4em 0 .3em; }
.prose > :first-child { margin-top: 0; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .35em; }
.story-photos { display: grid; gap: 10px; margin: 2em 0; font-family: var(--sans); }
.story-photos figure { margin: 0; }
.story-photos img { display: block; width: 100%; border-radius: var(--r); cursor: zoom-in; background: #e3e7e4; }
.story-photos figcaption { margin-top: 8px; font-size: .85rem; color: var(--muted); text-align: center; line-height: 1.4; }
.story-photos.n1 img { width: auto; max-width: 100%; max-height: 80vh; margin: 0 auto; }
.story-photos.n2 { grid-template-columns: 1fr 1fr; }
.story-photos.n3 { grid-template-columns: repeat(3, 1fr); }
.story-photos.n2 img, .story-photos.n3 img { aspect-ratio: 4 / 3; object-fit: cover; }
@media (min-width: 900px) { .story-photos { margin-left: -10%; margin-right: -10%; } }
@media (max-width: 520px) { .story-photos.n3 { grid-template-columns: 1fr 1fr; } }

.map-block { max-width: var(--measure); margin: 32px auto; }
.map { height: 380px; border-radius: var(--r-lg); border: 1px solid var(--line); background: #eef2ef; }
.map-block label.check { margin-top: 8px; font-size: .9rem; color: var(--muted); }
@media (max-width: 600px) { .map { height: 300px; } }

.route-line { list-style: none; margin: 0; padding: 0; font-family: var(--sans); font-size: 1rem; line-height: 1.4; }
.route-line li { position: relative; display: flex; gap: 14px; padding: 0 0 18px; }
.route-line li:not(:last-child)::before { content: ""; position: absolute; left: 11px; top: 26px; bottom: 2px; border-left: 2px dotted var(--line-2); }
.rl-num { flex: none; display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%;
          border: 2px solid var(--accent); background: var(--surface); color: var(--accent); font-size: .72rem; font-weight: 800; }
.route-line li.dest .rl-num { background: var(--accent); color: #fff; }
.route-line li > div { padding-top: 1px; }
.route-line a, .route-line b { font-weight: 600; color: var(--ink); }
.rl-note { display: block; color: var(--muted); font-size: .9rem; }

.plan-box { max-width: var(--measure); margin: 40px auto 0; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.plan-box h2 { margin-bottom: 16px; }
.pb-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px 32px; }
.pb-grid h3 { font-size: .85rem; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.cost-bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--bg); margin-bottom: 10px; }
.cost-bar span { display: block; height: 100%; }
.c1 { background: #2c5e4f; } .c2 { background: #5b8a7b; } .c3 { background: #93b5a9; } .c4 { background: #c6d8d0; } .c5 { background: #e1e4e0; }
.cost-list { list-style: none; margin: 0; padding: 0; font-size: .95rem; }
.cost-list li { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.cost-list li b { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }
.cost-list .sw { width: 9px; height: 9px; border-radius: 2px; }
.cost-total { margin: 8px 0 0; padding-top: 8px; border-top: 1px solid var(--line); font-size: .95rem; }
.months { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; list-style: none; margin: 0; padding: 0; }
.months li { padding: 6px 0; text-align: center; border-radius: 5px; background: var(--bg); color: #9aa39f; font-size: .75rem; }
.months li.on { background: var(--accent); color: #fff; font-weight: 700; }
.warn { margin: 14px 0 0; padding: 10px 12px; border-radius: var(--r-sm); background: var(--signal-soft); font-size: .95rem; }
.plan-box .actions { margin-top: 20px; }

.gallery { columns: 3 240px; column-gap: 12px; }
.gallery figure { margin: 0 0 12px; break-inside: avoid; }
.gallery img { display: block; width: 100%; border-radius: var(--r); cursor: zoom-in; }
.gallery figcaption { padding: 6px 2px 0; font-size: .85rem; color: var(--muted); }

.share-row { max-width: var(--measure); margin: 44px auto 0; padding: 20px 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.share-row h2 { flex: 1 0 100%; font-size: 1rem; margin: 0 0 4px; }
.owner-zone { max-width: var(--measure); margin: 40px auto 0; display: flex; gap: 10px; flex-wrap: wrap; }

/* v31: quick-fact chips, chapter list, jump links (inside the v32 swipe cards) */
.brief-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.brief-chips span { padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: .82rem; font-weight: 600; }
.brief-chapters { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.brief-chapters h3 { font-size: .85rem; font-weight: 600; color: var(--muted); margin: 0 0 6px; }
.brief-chapters ol { margin: 0; padding: 0; list-style: none; counter-reset: ch; }
.brief-chapters li { counter-increment: ch; }
.brief-chapters li[hidden] { display: none; }
.brief-chapters a { display: flex; gap: 10px; align-items: baseline; padding: 7px 0; color: var(--ink); text-decoration: none; font-weight: 500; line-height: 1.35; }
.brief-chapters a::before { content: counter(ch); flex: none; width: 22px; color: var(--accent); font-weight: 800; font-size: .85rem; font-variant-numeric: tabular-nums; }
.brief-chapters a:hover { color: var(--accent); }
.brief-more { margin: 2px 0 0 32px; padding: 6px 0; border: 0; background: none; color: var(--accent); font: 600 .9rem var(--sans); cursor: pointer; }
.brief-jumps { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; margin: 14px 0 0; font-size: .9rem; }
.brief-jumps span { color: var(--muted); }
.brief-jumps a { font-weight: 600; }
.brief-jumps { max-width: var(--measure); margin: 12px auto 32px; }
@media (prefers-reduced-motion: no-preference) { html:has(.ride-deck) { scroll-behavior: smooth; } }

/* v31: pull quotes and rider tips inside the story */
.pull-quote { margin: 1.6em 0; padding: .2em 0 .2em 22px; border-left: 4px solid var(--signal); font-family: var(--serif); font-style: italic;
              font-size: 1.45rem; line-height: 1.4; color: var(--ink); text-wrap: balance; }
.pull-quote::before { content: "\201C"; }
.pull-quote::after { content: "\201D"; }
@media (min-width: 900px) { .pull-quote { margin-left: -6%; font-size: 1.6rem; } }
.story-tip { margin: 1.6em 0; padding: 14px 16px; border-radius: var(--r); background: var(--signal-soft); border: 1px solid #f1dc9e;
             font-family: var(--sans); font-size: 1rem; line-height: 1.55; color: var(--ink-2); }
.tip-label { display: block; margin-bottom: 2px; font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #8a6406; }

/* v31: earlier / newer ride */
.ride-pager { max-width: var(--measure); margin: 36px auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pager-card { display: flex; gap: 12px; align-items: center; padding: 10px; background: var(--surface); border: 1px solid var(--line);
              border-radius: var(--r-lg); color: inherit; text-decoration: none; min-width: 0; }
.pager-card:hover { color: inherit; box-shadow: var(--shadow); }
.pager-card.newer { flex-direction: row-reverse; text-align: right; }
.pager-card.newer:only-child { grid-column: 2; }
.pager-thumb { flex: none; width: 76px; height: 76px; border-radius: var(--r); background: #dfe5e1 center / cover no-repeat; }
.pager-thumb.empty { background: linear-gradient(160deg, #e3e9e5, #cfd9d3); }
.pager-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pager-dir { display: inline-flex; align-items: center; gap: 2px; color: var(--accent); font-size: .8rem; font-weight: 700; }
.pager-card.newer .pager-dir { justify-content: flex-end; }
.pager-dir .ico { width: 16px; height: 16px; }
.pager-dir .flip { display: inline-flex; transform: scaleX(-1); }
.pager-title { font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pager-sub { color: var(--muted); font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 600px) {
  .ride-pager { grid-template-columns: 1fr; }
  .pager-card.newer, .pager-card.newer:only-child { grid-column: auto; flex-direction: row; text-align: left; }
  .pager-card.newer .pager-dir { justify-content: flex-start; }
}

/* v31: on phones, single photos in the story and the cover run edge to edge */
@media (max-width: 600px) {
  .cover-photo, .story-photos.n1 { margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); }
  .cover-photo img, .story-photos.n1 img { border-radius: 0; width: 100%; max-height: 85vh; object-fit: cover; }
  .story-photos.n1 figcaption { padding: 0 var(--gutter); }
}

.lightbox { position: fixed; inset: 0; z-index: 4000; display: flex; align-items: center; justify-content: center; padding: 56px 16px 48px;
            background: rgba(10, 14, 12, .94); touch-action: pan-y; }
.lightbox[hidden] { display: none; }
.lb-stage { margin: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
            width: 100%; height: 100%; }
.lb-stage img { max-width: 100%; max-height: calc(100% - 40px); object-fit: contain; border-radius: var(--r-sm); user-select: none; -webkit-user-drag: none; }
.lb-stage figcaption { color: #e6ebe8; font-size: .95rem; text-align: center; max-width: 60ch; }
.lb-btn { position: absolute; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border: 0; border-radius: 50%;
          background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; }
.lb-btn:hover { background: rgba(255, 255, 255, .22); }
.lb-btn .ico { width: 24px; height: 24px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%) scaleX(-1); }
.lb-close { right: 12px; top: 10px; }
.lb-count { position: absolute; left: 0; right: 0; top: 22px; margin: 0; text-align: center; color: #cfd8d4; font-size: .9rem; font-variant-numeric: tabular-nums; pointer-events: none; }
.story-photos img, .gallery img, .cover-photo img { cursor: zoom-in; }
@media (max-width: 600px) { .lb-prev, .lb-next { top: auto; bottom: 8px; transform: none; } .lb-next { transform: scaleX(-1); } }

/* plan page (checklist) */
.todo { list-style: none; margin: 0; padding: 0; }
.todo li { border-top: 1px solid var(--line); }
.todo li:first-child { border-top: 0; }
.todo label { display: flex; align-items: flex-start; gap: 12px; margin: 0; padding: 10px 0; font-weight: 400; font-size: 1rem; color: var(--ink); cursor: pointer; }
.todo input { width: 20px; height: 20px; flex: none; margin-top: 2px; }
.todo label:has(input:checked) { color: var(--muted); text-decoration: line-through; }
@media print {
  .topbar, .sidebar, .scrim, .search-sheet, .footer, .no-print, .flash, .alert-stack, .ride-rail, .ride-strip, .ride-side { display: none !important; }
  .ride-layout { display: block !important; }
  body { background: #fff; }
  .container { max-width: none; padding: 0; }
  .panel { border: 0; padding: 0; break-inside: avoid; }
}

/* ------------------------------------------------------------------ search sheet */
.search-sheet { position: fixed; inset: 0; z-index: 3200; overflow-y: auto; background: rgba(28, 36, 33, .4); }
.search-sheet-inner { max-width: 760px; margin: 0 auto; padding: 0 var(--gutter) 24px; background: var(--surface); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; height: 60px; border-bottom: 1px solid var(--line); margin-bottom: 16px; font-weight: 600; }
.filter-top { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-top input { flex: 1 1 260px; margin: 0; }
.filter-top select { flex: 0 1 200px; margin: 0; }
.filters .choices { margin-top: 14px; }
.filters details { margin-top: 16px; }
.near-box { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.near-box label { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 500; }
.near-box select { width: auto; margin: 0; }
.near-box input[type=text] { flex: 1 1 220px; margin: 0; }
.near-box p { flex-basis: 100%; margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 16px; }

/* ------------------------------------------------------------------ rider pages */
.rider-head { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-bottom: 28px; }
.avatar { display: flex; align-items: center; justify-content: center; flex: none; width: 56px; height: 56px; border-radius: 50%;
          background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 1.4rem; }
.rider-head .grow { flex: 1; min-width: 200px; }
.rider-head h1 { margin: 0; }
.rider-head p { margin: 4px 0 0; color: var(--muted); }
.list .avatar { width: 40px; height: 40px; font-size: 1rem; }

/* ------------------------------------------------------------------ ride form (steps) */
.stepper { display: flex; gap: 4px; list-style: none; margin: 0 0 20px; padding: 0; }
.stepper li { flex: 1; }
.stepper button { width: 100%; margin: 0; padding: 10px 4px 9px; border: 0; border-bottom: 3px solid var(--line); background: none;
                  color: var(--muted); font: 600 .9rem var(--sans); cursor: pointer; }
.stepper button.done { color: var(--ink-2); border-bottom-color: #9dbbb0; }
.stepper button.on { color: var(--ink); border-bottom-color: var(--accent); }
form.wizard .step { display: none; }
form.wizard .step.active { display: block; }
form:not(.wizard) .stepper { display: none; }
.wizard-nav { display: flex; gap: 10px; align-items: center; justify-content: flex-end; flex-wrap: wrap; margin-top: 4px; }
.wizard-nav .muted { margin-right: auto; font-size: .85rem; }
form:not(.wizard) #back, form:not(.wizard) #next { display: none; }
@media (max-width: 700px) {
  form.wizard .wizard-nav { position: sticky; bottom: 0; z-index: 20; margin: 0 calc(-1 * var(--gutter)); padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
                            background: rgba(244, 245, 243, .97); border-top: 1px solid var(--line); }
  .wizard-nav .muted { flex-basis: 100%; order: -1; margin: 0; }
  .wizard-nav .btn { flex: 1; }
}
.find-row { display: flex; gap: 8px; }
.find-row input { margin: 0; flex: 1; }
.month-pick { display: flex; flex-wrap: wrap; gap: 6px; }

/* story composer */
.composer { position: relative; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); }
.composer:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(44, 94, 79, .12); }
.composer-bar { position: sticky; top: 60px; z-index: 6; display: flex; align-items: center; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line);
                background: var(--surface); border-radius: var(--r) var(--r) 0 0; }
.tool { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 7px 11px; border: 0; border-radius: 8px; background: none;
        color: var(--ink-2); font: 500 .9rem var(--sans); cursor: pointer; white-space: nowrap; }
.tool:hover, .tool[aria-expanded="true"] { background: var(--bg); color: var(--ink); }
.tool .ico { width: 18px; height: 18px; }
.ideas { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: #fafbfa; }
button.prompt { margin: 0; padding: 5px 12px; border: 1px dashed var(--line-2); border-radius: 999px; background: var(--surface); color: var(--ink-2);
                font: 400 .875rem var(--sans); cursor: pointer; }
button.prompt:hover { border-color: var(--accent); color: var(--accent); }
.story-blocks { padding: 10px 18px 16px; }
.composer .tb { display: block; width: 100%; min-height: 2.6em; margin: 0; padding: 6px 0; border: 0; border-radius: 0; background: transparent; resize: none;
                 overflow: hidden; box-shadow: none; font: 400 1.08rem/1.7 var(--serif); color: var(--ink); }
.composer .tb.solo { min-height: 13em; }
.composer .tb.gap { min-height: 0; height: 2em; padding: 2px 0; font-size: .9rem; }
.composer .tb.gap:not(:focus)::placeholder { color: transparent; }
#ride-form #the_ride { font-family: var(--serif); font-size: 1.05rem; }
/* heading lines inside the editor */
.hb { display: flex; align-items: center; gap: 6px; margin: 14px 0 2px; }
.composer .hb-text { flex: 1; min-width: 0; min-height: 0; margin: 0; padding: 2px 0; border: 0; border-radius: 0; background: transparent;
                     box-shadow: none; font: 650 1.35rem/1.3 var(--sans); letter-spacing: -.01em; color: var(--ink); }
.composer .hb[data-level="3"] .hb-text { font-size: 1.1rem; }
.composer .hb-text::placeholder { color: #a9b1ad; }
.hb-tools { display: flex; opacity: 0; transition: opacity .15s; }
.hb:hover .hb-tools, .hb:focus-within .hb-tools { opacity: 1; }
@media (hover: none) { .hb-tools { opacity: 1; } }
.hb-tools button { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; margin: 0; padding: 0; border: 0;
                   border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.hb-tools button:hover { background: var(--bg); color: var(--ink); }
.hb-tools .ico { width: 16px; height: 16px; }
.composer-bar { flex-wrap: wrap; }
.pb { margin: 10px 0; text-align: center; }
.pb-media { position: relative; display: inline-block; max-width: 100%; vertical-align: top; }
.pb-media img { display: block; max-width: 100%; max-height: 320px; border-radius: 10px; background: var(--bg); }
.pb-tools { position: absolute; top: 8px; right: 8px; display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.pb:hover .pb-tools, .pb:focus-within .pb-tools { opacity: 1; }
@media (hover: none) { .pb-tools { opacity: 1; } }
.pb-tools button, .stop-tools button { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; margin: 0; padding: 0;
                                       border: 0; border-radius: 8px; cursor: pointer; }
.pb-tools button { background: rgba(28, 36, 33, .82); color: #fff; }
.pb-tools button:hover { background: var(--ink); }
.pb-tools button:disabled { opacity: .35; cursor: default; }
.pb-tools .ico, .stop-tools .ico { width: 18px; height: 18px; }
.composer .pb-cap { display: block; width: 100%; max-width: 30rem; min-height: 0; margin: 6px auto 0; padding: 4px 6px; border: 0; border-bottom: 1px dashed transparent;
                     border-radius: 0; background: transparent; box-shadow: none; text-align: center; font-size: .9rem; color: var(--muted); }
.composer .pb-cap:hover { border-bottom-color: var(--line); }
.composer .pb-cap:focus { border-bottom-color: var(--accent); color: var(--ink); }
.pb-status, .tc-status { position: absolute; inset: 0; display: none; flex-direction: column; gap: 8px; align-items: center; justify-content: center;
                         padding: 8px; border-radius: inherit; background: rgba(255, 255, 255, .82); color: var(--ink); font-size: .875rem; font-weight: 600; text-align: center; }
.is-uploading .pb-status, .is-error .pb-status, .is-uploading .tc-status, .is-error .tc-status { display: flex; }
.is-error .pb-status, .is-error .tc-status { background: rgba(251, 238, 236, .95); color: var(--danger); }
.spinner { width: 22px; height: 22px; border: 3px solid var(--accent-soft); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.picker { position: absolute; top: calc(100% + 4px); left: 6px; z-index: 10; width: min(340px, calc(100% - 12px)); padding: 12px;
          background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.picker p { margin: 10px 0 6px; }
.picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 6px; max-height: 232px; overflow-y: auto; }
.picker-grid button { width: 100%; aspect-ratio: 1; margin: 0; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: none; cursor: pointer; }
.picker-grid button:hover, .picker-grid button:focus-visible { border-color: var(--accent); }
.picker-grid img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* photo tray */
.tray { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; align-items: start; margin-bottom: 12px; }
.tray-card { position: relative; display: flex; flex-direction: column; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.tc-media { position: relative; aspect-ratio: 4 / 3; background: var(--bg); }
.tc-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.tray-card.is-cover .tc-media::after { content: "Cover"; position: absolute; left: 8px; top: 8px; padding: 1px 8px; border-radius: 999px;
                                       background: var(--surface); color: var(--ink); font-size: .72rem; font-weight: 700; }
#ride-form .tc-cap { min-height: 0; margin: 0; padding: 8px 10px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; font-size: .875rem; }
.tc-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 10px; padding: 6px 10px 8px; font-size: .8rem; }
.tc-foot label.check { margin: 0; font-size: .8rem; }
.tc-foot .link-button { font-size: .8rem; }
.tc-where { color: var(--muted); }
.tc-where.in { color: var(--accent); font-weight: 600; }
.tray-card.is-removed .tc-media img { filter: grayscale(1); opacity: .4; }
.form label.upload-tile, .upload-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; margin: 0;
                                        padding: 22px 14px; border: 1.5px dashed var(--line-2); border-radius: var(--r); background: var(--surface);
                                        color: var(--accent); text-align: center; cursor: pointer; }
.upload-tile small { font-weight: 400; color: var(--muted); }
.upload-tile:hover, .upload-tile.drag, .upload-tile:focus-within { border-color: var(--accent); background: var(--accent-soft); }

/* stops editor (ride + upcoming forms) */
.route-box { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.route-box h3 { margin-bottom: 4px; }
.route-box > p { margin: 0 0 10px; }
.route-list { list-style: none; margin: 0; padding: 0; }
.route-list .stop { position: relative; display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; }
.route-list .stop:not(:last-child)::before { content: ""; position: absolute; left: 11px; top: 38px; bottom: -6px; border-left: 2px dotted var(--line-2); }
.stop-num { flex: none; position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; margin-top: 10px;
            border-radius: 50%; border: 2px solid var(--accent); background: var(--surface); color: var(--accent); font-weight: 800; font-size: .72rem; }
.stop.no-pin .stop-num { border-style: dashed; border-color: var(--line-2); color: var(--muted); }
.stop.dest .stop-num { background: var(--accent); color: #fff; margin-top: 0; }
.stop-fields { flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 6px; }
.form .stop-fields input { margin: 0; padding: 8px 10px; min-height: 40px; }
.form .stop-fields .stop-name { font-weight: 600; }
.stop-where { grid-column: 1 / -1; margin: 0; font-size: .85rem; }
.stop.dest .stop-fields { display: block; padding-top: 1px; }
.stop-tools { display: flex; gap: 2px; flex: none; margin-top: 4px; }
.stop-tools button { background: none; color: var(--muted); }
.stop-tools button:hover:not(:disabled) { background: var(--bg); color: var(--ink); }
.stop-tools button:disabled { opacity: .3; cursor: default; }
.route-add { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.route-add input { flex: 1 1 220px; margin: 0; }
#stop-status { min-height: 1.3em; margin: 6px 0 0; }
.map.placing { outline: 3px solid var(--signal); outline-offset: 2px; }
.map.placing, .map.placing .leaflet-interactive { cursor: crosshair !important; }
.stop-pin { background: none; border: 0; }
.stop-pin span { display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; border: 2.5px solid var(--accent);
                 background: #fff; color: var(--accent); font: 800 12px/1 var(--sans); box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }
@media (max-width: 600px) { .stop-fields { grid-template-columns: 1fr; } .stop-tools { flex-direction: column; } .route-add .btn { flex: 1; } }
.coords { margin-top: 4px; }

/* ------------------------------------------------------------------ upcoming */
.members-only { display: flex; flex-direction: column; gap: 4px; }
.members-only h2 { margin: 0; }
.members-only p { margin: 0 0 12px; color: var(--muted); }
.comment { padding: 12px 0; border-top: 1px solid var(--line); }
.comment:first-of-type { border-top: 0; }
.comment p { margin: 4px 0 0; white-space: pre-wrap; }
.comment-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.details-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px 24px; margin: 0 0 24px; padding: 16px 0;
                border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.details-grid dt { color: var(--muted); font-size: .8rem; }
.details-grid dd { margin: 0; font-weight: 600; }

/* ------------------------------------------------------------------ ride groups */
.rg-head { margin-bottom: 4px; }
.rg-title { display: flex; align-items: center; gap: 6px; }
.rg-title h1 { margin: 0; font-size: 1.5rem; }
.rg-back { margin-left: -10px; }
.rg-people { margin: 4px 0 12px; color: var(--muted); font-size: .9rem; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.tabs a { padding: 10px 14px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 600; text-decoration: none; }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.tabs a:hover { color: var(--ink); }
.tabs .count { margin-left: 6px; }

.rg { max-width: 760px; margin: 0 auto; }
.rg-active { position: sticky; top: 68px; z-index: 30; margin-bottom: 12px; border-radius: var(--r); background: var(--surface);
             border: 1px solid #f2c4bf; box-shadow: var(--shadow); overflow: hidden; }
.ra-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; font-size: .95rem; }
.ra-row + .ra-row { border-top: 1px solid var(--line); }
.ra-dot { width: 10px; height: 10px; flex: none; border-radius: 50%; background: var(--signal); }
.ra-row.urgent .ra-dot { background: var(--danger); }
.ra-row > a:not(.btn) { flex: 1; min-width: 0; color: var(--ink); text-decoration: none; }
.ra-map { flex: none !important; font-weight: 600; color: var(--accent) !important; text-decoration: underline !important; }
.rg-tools { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-bottom: 6px; }
.offline-note { margin: 0 0 10px; padding: 8px 12px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-size: .9rem; }

.feed { display: flex; flex-direction: column; gap: 4px; padding: 6px 0 12px; min-height: 40vh; }
.day-sep { align-self: center; margin: 14px 0 6px; color: var(--muted); font-size: .8rem; font-weight: 600; }
.cm { display: flex; flex-direction: column; align-items: flex-start; max-width: 80%; }
.cm.mine { align-self: flex-end; align-items: flex-end; }
.cm-name { margin: 8px 0 2px 12px; color: var(--ink-2); font-size: .8rem; font-weight: 600; }
.cm-bubble { padding: 8px 12px 6px; border-radius: 16px 16px 16px 4px; background: var(--surface); border: 1px solid var(--line); line-height: 1.45; }
.cm.mine .cm-bubble { border-radius: 16px 16px 4px 16px; background: var(--accent); border-color: var(--accent); color: #fff; }
.cm-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.cm-time { float: right; margin: 6px 0 -2px 12px; font-size: .7rem; color: var(--muted); }
.cm.mine .cm-time { color: rgba(255, 255, 255, .75); }
.nojs-line { margin: 4px 0; }

.stop-card { align-self: stretch; margin: 10px 0; padding: 14px 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line);
             border-left: 4px solid var(--signal); }
.stop-card.urgent { border-left-color: var(--danger); background: #fffafa; }
.stop-card.resolved { border-left-color: var(--line-2); background: var(--surface); }
.stop-card.flash { animation: flash 1.2s ease 2; }
@keyframes flash { 50% { box-shadow: 0 0 0 5px rgba(233, 176, 32, .4); } }
.stop-card p { margin: 0 0 4px; }
.sc-head { color: var(--ink-2); font-size: .9rem; }
.sc-time { margin-left: 8px; color: var(--muted); font-size: .8rem; }
.sc-reason { font-size: 1.15rem; font-weight: 700; }
.stop-card.urgent .sc-reason { color: var(--danger); }
.sc-note { white-space: pre-wrap; }
.sc-where { color: var(--ink-2); font-size: .95rem; }
.sc-where a { font-weight: 600; }
.sc-acks, .sc-resolved { color: var(--muted); font-size: .9rem; }
.sc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

.new-pill { position: sticky; bottom: 150px; z-index: 25; display: block; margin: 0 auto; padding: 8px 16px; border: 0; border-radius: 999px;
            background: var(--ink); color: #fff; font: 600 .875rem var(--sans); cursor: pointer; box-shadow: var(--shadow); }
.rg-bar { position: sticky; bottom: 0; z-index: 20; display: grid; gap: 8px; margin: 0 calc(-1 * var(--gutter)); padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
          background: rgba(244, 245, 243, .97); border-top: 1px solid var(--line); }
.chat-form { display: flex; gap: 8px; align-items: flex-end; }
.chat-form textarea { margin: 0; min-height: 44px; max-height: 140px; padding: 10px 16px; resize: none; border-radius: 22px; }
.chat-form .btn { width: 44px; min-height: 44px; padding: 0; border-radius: 50%; }
.stop-btn { width: 100%; min-height: 54px; margin: 0; border: 0; border-radius: var(--r); background: var(--danger); color: #fff; cursor: pointer;
            font: 700 1.05rem var(--sans); letter-spacing: .01em; }
.stop-btn:hover { background: #8f1e17; }
.stop-btn:active { transform: translateY(1px); }
.nojs-stop { display: flex; gap: 8px; }
.nojs-stop select { margin: 0; }

.sheet-scrim { position: fixed; inset: 0; z-index: 3300; background: rgba(28, 36, 33, .45); }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 3400; max-width: 560px; max-height: 92vh; margin: 0 auto; overflow-y: auto;
         padding: 10px 20px calc(18px + env(safe-area-inset-bottom)); background: var(--surface); border-radius: 20px 20px 0 0;
         box-shadow: 0 -10px 40px rgba(0, 0, 0, .2); animation: up .18s ease-out; }
@keyframes up { from { transform: translateY(40px); } }
.sheet-grip { width: 40px; height: 4px; margin: 2px auto 14px; border-radius: 2px; background: var(--line-2); }
.sheet h2 { margin-bottom: 4px; }
.loc-status { margin: 0 0 16px; color: var(--muted); font-size: .9rem; }
.reason-group { margin-bottom: 14px; }
.reason-group h3 { font-size: .8rem; color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.reasons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.reason { width: 100%; min-height: 52px; margin: 0; padding: 10px 14px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface);
          color: var(--ink); font: 600 1rem var(--sans); text-align: left; cursor: pointer; }
.reason:hover { border-color: var(--accent); }
.reason.urgent { border-color: #f2c4bf; background: var(--danger-soft); color: var(--danger); }
.reason.chosen { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.reason:disabled:not(.chosen) { opacity: .4; }
#stop-note { margin: 4px 0 0; }
.sheet-foot { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-top: 14px; }

/* expenses */
.balances .grow .sub.pos, .pos { color: var(--ok); }
.neg { color: var(--danger); }
.amount { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.row-actions { display: flex; gap: 12px; font-size: .875rem; }
.split-row { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--line); }
.split-row label.check { margin: 0; }
.split-row .exact { max-width: 140px; margin: 0; text-align: right; }
.blog-cta h2 { margin-bottom: 4px; }
.cost-preview { max-width: 460px; margin: 16px 0; }
.cost-preview.b-mine { display: none; }
.blog-cta:has(input[value="mine"]:checked) .cost-preview.b-mine { display: block; }
.blog-cta:has(input[value="mine"]:checked) .cost-preview.b-avg { display: none; }
.blog-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.add-existing { display: inline-flex; gap: 8px; flex: 1 1 320px; }
.add-existing select { margin: 0; flex: 1 1 160px; min-width: 0; }
@media (max-width: 520px) { .add-existing { flex-wrap: wrap; } .blog-actions .btn { flex: 1 1 100%; } }

/* contact + messages */
.kind-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form label.kind-card { margin: 0; font-weight: 400; cursor: pointer; }
.kind-card input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.kind-card span { display: block; height: 100%; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); }
.kind-card b { display: block; color: var(--ink); font-size: 1rem; }
.kind-card small { display: block; margin-top: 2px; color: var(--muted); }
.kind-card input:checked + span { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-soft); }
.kind-card input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.join-fields { margin: 4px 0 0; }
.contact-form:has(input[name="kind"][value="message"]:checked) .join-fields,
.contact-form:has(input[name="kind"][value="message"]:checked) .msg-label-join,
.contact-form:has(input[name="kind"][value="join"]:checked) .msg-label-msg { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 560px) { .kind-pick { grid-template-columns: 1fr; } }
.msg { padding: 18px 20px; }
.msg.unread { border-left: 4px solid var(--accent); }
.msg-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }
.msg-head h2 { margin: 0; font-size: 1.1rem; }
.msg-head time { margin-left: auto; color: var(--muted); font-size: .85rem; }
.msg-contact { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 4px 0 10px; }
.msg-facts { display: flex; flex-wrap: wrap; gap: 6px 24px; margin: 0 0 10px; }
.msg-facts dt { color: var(--muted); font-size: .8rem; }
.msg-facts dd { margin: 0; }
.msg-body { margin: 0 0 12px; white-space: pre-wrap; }
.msg-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ------------------------------------------------------------------ site-wide alerts + toasts */
.alert-stack { display: grid; gap: 8px; max-width: 1120px; margin: 12px auto 0; padding: 0 var(--gutter); }
.alert-stack:empty { display: none; }
.alert-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r);
              background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--signal); box-shadow: var(--shadow); }
.alert-card.urgent { border-left-color: var(--danger); }
.ac-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ac-text span { color: var(--muted); font-size: .85rem; }
.ac-close { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin: 0; padding: 0; border: 0; border-radius: 8px;
            background: none; color: var(--muted); cursor: pointer; }
.ac-close:hover { background: var(--bg); color: var(--ink); }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 3700; transform: translateX(-50%); max-width: min(92vw, 460px); padding: 10px 16px;
         border-radius: var(--r); background: var(--ink); color: #fff; font-size: .95rem; box-shadow: var(--shadow); transition: opacity .4s; }
.toast.out { opacity: 0; }

/* ---- likes + trending (v14) ---- */
.likes { display: inline-flex; align-items: center; gap: 4px; }
.likes .ico { width: 15px; height: 15px; }
.trend-tag { color: var(--accent); font-weight: 600; }
.like-row { max-width: var(--measure); margin: 44px auto 0; padding: 20px 0 4px; border-top: 1px solid var(--line);
            display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.like-row + .share-row { margin-top: 0; border-top: 0; }
.like-form { margin: 0; }
.like-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 1px solid var(--line-2);
            border-radius: 999px; background: var(--surface); color: var(--ink); font: 600 .95rem/1 var(--sans); cursor: pointer;
            transition: background .15s, border-color .15s, color .15s; }
.like-btn:hover { border-color: var(--accent); color: var(--accent); }
.like-btn[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-hover); }
.like-btn[aria-pressed="true"] .ico { fill: currentColor; }
.like-btn .ico { transition: transform .15s; }
.like-btn:active .ico { transform: scale(.85); }
.like-count { margin: 0; color: var(--muted); font-size: .95rem; }
.trend-list > li { padding: 0; }
.trend-list a { display: flex; flex: 1; align-items: center; gap: 14px; padding: 12px 18px; color: inherit; text-decoration: none; min-width: 0; }
.trend-list a:hover { background: #fafbfa; }
.trend-list .rank { width: 1.4em; color: var(--muted); font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; }
.trend-list .thumb { flex: none; width: 64px; height: 44px; border-radius: 8px; background: #dfe5e1 center / cover no-repeat; }
.trend-list .thumb.empty { background: linear-gradient(160deg, #e3e9e5, #cfd9d3); }
.trend-list .likes { color: var(--muted); font-size: .9rem; }
@media (max-width: 600px) {
  .trend-list > li { flex-wrap: nowrap; padding: 0; }
  .trend-list a { padding: 12px 14px; gap: 12px; }
  .trend-list .thumb { width: 52px; height: 38px; }
}
@media (prefers-reduced-motion: reduce) { .like-btn, .like-btn .ico { transition: none; } }

/* ---- analytics + insights (v15) ---- */
.reach { flex: 1 0 100%; margin: 0; color: var(--muted); font-size: .9rem; }
.stats-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; }
.stats-head > div { flex: 1 1 260px; }
.seg { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.seg a { padding: 6px 12px; border-radius: 7px; color: var(--ink-2); font-size: .9rem; font-weight: 500; text-decoration: none; white-space: nowrap; }
.seg a:hover { background: var(--bg); color: var(--ink); }
.seg a[aria-current="page"] { background: var(--accent); color: #fff; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 0 0 20px; }
.tile { display: flex; flex-direction: column; gap: 2px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.tile-label { color: var(--muted); font-size: .85rem; }
.tile-value { font-size: clamp(1.25rem, 1.9vw, 1.6rem); white-space: nowrap; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.tile-note { color: var(--muted); font-size: .8rem; }
.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; margin: 0 0 20px; min-width: 0; }
.stat-card > h2, .colchart h2 { font-size: 1.05rem; margin: 0 0 12px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 0 20px; }
.colchart { margin: 0; }
.colchart figcaption { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin-bottom: 8px; }
.colchart figcaption h2 { margin: 0; }
.cc-readout { margin: 0; color: var(--ink-2); font-size: .9rem; font-variant-numeric: tabular-nums; min-height: 1.4em; }
.cc-plot { display: flex; gap: 8px; height: 180px; }
.cc-axis { display: flex; flex-direction: column; justify-content: space-between; color: var(--muted); font-size: .75rem; text-align: right;
           min-width: 2ch; font-variant-numeric: tabular-nums; }
.cc-bars { flex: 1; display: flex; align-items: stretch; gap: 2px; border-bottom: 1px solid var(--line-2);
           background: linear-gradient(var(--line) 1px, transparent 1px) top / 100% 50%; min-width: 0; }
.cc-col { flex: 1; display: flex; align-items: flex-end; min-width: 0; cursor: default; border-radius: 4px 4px 0 0; }
.cc-col i { display: block; width: 100%; max-width: 40px; margin: 0 auto; background: var(--accent); border-radius: 4px 4px 0 0; }
.cc-col:hover i, .cc-col:focus i { background: var(--accent-hover); }
.cc-col:hover, .cc-col:focus { background: var(--accent-soft); outline: none; }
.cc-col:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.cc-x { display: flex; justify-content: space-between; margin: 6px 0 0 calc(2ch + 8px); color: var(--muted); font-size: .75rem; }
.table-view { margin-top: 12px; font-size: .9rem; }
.table-view summary, .stat-help summary { cursor: pointer; color: var(--accent); }
.table-view table { margin-top: 8px; }
.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
.data th, .data td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.data thead th { color: var(--muted); font-weight: 500; font-size: .82rem; white-space: nowrap; }
.data tbody th { font-weight: 500; }
.data .num, .hbars .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.data tbody tr:target { background: var(--accent-soft); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.rides-table { min-width: 640px; }
.rides-table tbody th { min-width: 180px; }
.hbars { width: 100%; border-collapse: collapse; font-size: .92rem; }
.hbars th, .hbars td { padding: 6px 0; }
.hbars th { font-weight: 400; text-align: left; padding-right: 12px; width: 38%; overflow-wrap: anywhere; }
.hbars td.num { padding-left: 12px; width: 1%; }
.hb-track span { display: block; height: 10px; min-width: 2px; background: var(--accent); border-radius: 0 4px 4px 0; }
.stat-help { margin: 4px 0 24px; color: var(--ink-2); font-size: .92rem; }
.stat-help ul { margin: 10px 0 0; padding-left: 20px; }
.stat-help li { margin-bottom: 6px; }
@media (max-width: 600px) {
  .stat-card { padding: 16px; }
  .tile:last-child:nth-child(odd) { grid-column: 1 / -1; }
  /* rides table: one card per ride */
  .rides-table { min-width: 0; }
  .rides-table thead { display: none; }
  .rides-table tr { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .rides-table tbody th { grid-column: 1 / -1; min-width: 0; padding: 0; border: 0; }
  .rides-table td, .rides-table td.num { padding: 0; border: 0; text-align: left; }
  .rides-table td::before { content: attr(data-label); display: block; color: var(--muted); font-size: .78rem; }
  .seg { width: 100%; }
  .seg a { flex: 1; text-align: center; padding: 6px 4px; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .tile-value { font-size: 1.35rem; }
  .stat-grid { grid-template-columns: 1fr; }
  .cc-plot { height: 150px; }
}

/* ---- storage (v16) ---- */
.alert-box { margin: 0 0 20px; padding: 14px 16px; border: 1px solid #f2c4bf; border-left: 4px solid var(--danger); border-radius: var(--r);
             background: var(--danger-soft); color: var(--ink); }
.alert-box a { margin-left: 6px; color: var(--danger); font-weight: 600; }
.count.count-warn { background: var(--danger); white-space: nowrap; }
.storage-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin-bottom: 10px; }
.storage-head h2 { margin: 0; font-size: 1.05rem; }
.storage-head p { margin: 0; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.disk-meter { position: relative; height: 12px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); overflow: hidden; }
.disk-meter > span { display: block; height: 100%; background: var(--accent); border-radius: 999px 0 0 999px; }
.disk-meter.full > span { background: var(--danger); }
.disk-meter .mark { position: absolute; top: -1px; bottom: -1px; width: 2px; background: var(--ink-2); opacity: .45; }
.meter-note { margin: 6px 0 14px; color: var(--muted); font-size: .85rem; }
.storage-parts th small { display: block; color: var(--muted); font-size: .8rem; }
.storage-room { margin: 12px 0 0; font-size: .9rem; }
.storage-tips { margin: 12px 0 0; padding-left: 20px; font-size: .9rem; }
.storage-tips li { margin-bottom: 4px; }
.storage-tips code { font-size: .85em; background: var(--bg); padding: 1px 5px; border-radius: 4px; overflow-wrap: anywhere; }

/* ---- photo limit (v17) ---- */
.photos-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.photos-head h2 { margin-bottom: 8px; }
.photo-count { color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.photo-count.full { color: var(--ink); font-weight: 600; }
.limit-msg { margin: 8px 0; padding: 8px 12px; border-radius: 8px; background: var(--bg); border: 1px solid var(--line); color: var(--ink-2); font-size: .9rem; }
.composer .limit-msg { margin: 8px 12px 0; }
.form label.upload-tile.is-full, .upload-tile.is-full,
.upload-tile.is-full:hover, .upload-tile.is-full:focus-within { cursor: default; border-style: solid; border-color: var(--line-2); background: var(--bg); color: var(--muted); }
#picker-upload:disabled { opacity: .55; cursor: default; }


/* ---- ride page motion (v18) ---- */
/* wide screens: the ride in the left column, the road in its own column on the right (never over the text or photos) */
@media (min-width: 1100px) {
  .ride-layout { display: grid; grid-template-columns: minmax(0, 1fr) 176px; gap: 36px; align-items: stretch; }
  .ride-side { position: relative; min-width: 0; }
}
.ride-side:empty { display: none; }
.ride-rail { position: sticky; top: 84px; height: calc(100vh - 108px); max-height: 820px; width: 100%;
             display: none; flex-direction: column; opacity: 0; transition: opacity .3s; pointer-events: none; }
.ride-rail.is-on { opacity: 1; pointer-events: auto; }
@media (min-width: 1100px) { .ride-rail { display: flex; } }
.rr-start, .rr-end { font-size: .82rem; font-weight: 600; color: var(--ink); padding-left: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rr-road { font-size: .74rem; color: var(--muted); padding-left: 12px; margin-bottom: 2px; }
.rr-end { margin-top: 2px; }
.rr-track { position: relative; flex: 1; min-height: 160px; cursor: pointer; }
.road-svg { position: absolute; inset: 0; overflow: visible; }
.rr-stop { fill: #fff; stroke: var(--accent); stroke-width: 2; transition: fill .2s; }
.rr-stop.passed { fill: var(--accent); }
.rr-stop-label { position: absolute; left: 50px; right: 0; transform: translateY(-50%); font-size: .76rem; color: var(--muted);
                 white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .2s; }
.rr-stop-label.passed { color: var(--ink); font-weight: 600; }
.rr-vehicle { position: absolute; left: 0; top: 0; width: 24px; height: 44px; margin: -22px 0 0 -12px; pointer-events: none; will-change: transform;
              /* a white outline so it stands out on a dark road */
              filter: drop-shadow(1.2px 0 0 #fff) drop-shadow(-1.2px 0 0 #fff) drop-shadow(0 1.2px 0 #fff) drop-shadow(0 -1.2px 0 #fff)
                      drop-shadow(0 3px 3px rgba(0, 0, 0, .3)); }
.rr-vehicle svg { display: block; width: 100%; height: 100%; }
.rr-readout { margin-top: 6px; padding-left: 12px; font-size: .78rem; color: var(--ink-2); font-variant-numeric: tabular-nums; min-height: 1.3em; }
/* the same road as a slim strip under the header (narrow screens). It is part of the page (it pushes the
   content down instead of covering it) and stays under the header while scrolling. */
.ride-strip { position: sticky; z-index: 900; top: 60px; height: 34px; margin: -28px calc(-1 * var(--gutter)) 18px;
              background: rgba(255, 255, 255, .97); border-bottom: 1px solid var(--line); opacity: 0; pointer-events: none; transition: opacity .3s; }
.ride-strip.is-on { opacity: 1; pointer-events: auto; }
.ride-strip .rr-track { position: absolute; inset: 0; min-height: 0; }
.ride-strip .rr-vehicle { width: 15px; height: 27px; margin: -13.5px 0 0 -7.5px; }
@media (min-width: 1100px) { .ride-strip { display: none; } }
@media (max-width: 600px) { .ride-strip { margin-top: -20px; } }
@media (max-width: 1099px) { body:has(.ride-strip) { scroll-padding-top: 110px; } }
/* "Play the route" on the map */
.replay-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 12px 0 4px; }
.replay-caption { margin: 0; color: var(--ink-2); font-size: .92rem; min-height: 1.4em; }
.replay-vehicle { background: none; border: 0; }
.replay-vehicle .rv { display: block; width: 22px; height: 40px; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .35)); }
.replay-vehicle svg { display: block; width: 100%; height: 100%; }
.route-line li.is-current .rl-num { background: var(--accent); color: #fff; box-shadow: 0 0 0 4px var(--accent-soft); }
.route-line li.is-current b, .route-line li.is-current a { color: var(--accent-hover); }
@media (prefers-reduced-motion: reduce) { .ride-rail, .ride-strip, .rr-stop, .rr-stop-label { transition: none; } }

/* ---- starting point + stop markers (v19) ---- */
.start-box { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.start-box > label { display: block; font-weight: 600; margin-bottom: 6px; }
.start-box .hint { margin: 6px 0 0; min-height: 1em; }
.start-pin span { background: var(--accent); color: #fff; }
.route-line li.start .rl-num { background: var(--ink); border-color: var(--ink); color: #fff; }
/* "Reached Jispa" in a published story */
.prose .stop-mark { display: flex; align-items: center; gap: 8px; margin: 2em 0 .9em; font-family: var(--sans); font-size: .82rem;
                    font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.prose .stop-mark .ico { width: 18px; height: 18px; }
.prose .stop-mark::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
/* the same marker while writing */
.composer .sb { display: flex; align-items: center; gap: 8px; margin: 10px 0; padding: 7px 10px; border: 1px dashed var(--line-2);
                border-radius: 8px; color: var(--accent); font-size: .9rem; background: var(--accent-soft); }
.composer .sb .ico { width: 17px; height: 17px; }
.composer .sb .sb-label { color: var(--ink-2); }
.composer .sb b { color: var(--ink); }
.sb-remove { margin-left: auto; display: flex; padding: 4px; border: 0; border-radius: 6px; background: none; color: var(--muted); cursor: pointer; }
.sb-remove:hover { background: #fff; color: var(--ink); }
/* v31: pull quote / rider tip while writing (looks like it will on the ride page) */
.composer .cb { margin: 12px 0; padding: 8px 10px 10px 14px; border-radius: 8px; }
.composer .cb[data-kind="quote"] { border-left: 4px solid var(--signal); background: var(--bg); }
.composer .cb[data-kind="tip"] { border: 1px solid #f1dc9e; background: var(--signal-soft); }
.cb-head { display: flex; align-items: center; }
.cb-label { font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #8a6406; }
.composer .cb-text { display: block; width: 100%; min-height: 0; margin: 2px 0 0; padding: 2px 0; border: 0; border-radius: 0; background: transparent;
                     resize: none; overflow: hidden; color: var(--ink); font: 400 1rem/1.5 var(--sans); }
.composer .cb[data-kind="quote"] .cb-text { font: italic 400 1.2rem/1.4 var(--serif); }
.composer .cb-text:focus { outline: none; box-shadow: none; }
.composer .cb-text::placeholder { color: #a39b80; }
.stop-choices { display: flex; flex-direction: column; gap: 4px; margin: 6px 0; }
.stop-choice { display: flex; align-items: baseline; gap: 6px; width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px;
               background: var(--surface); color: var(--ink); font: 500 .95rem var(--sans); text-align: left; cursor: pointer; }
.stop-choice:hover, .stop-choice:focus-visible { border-color: var(--accent); background: var(--accent-soft); }
.stop-picker p { margin: 0; }

/* ---- ride-group guests (v21) ---- */
.login-wrap { max-width: 420px; margin-top: 24px; }
.login-wrap .panel h2 { font-size: 1.1rem; margin-bottom: 4px; }
.guest-join { margin-top: 4px; }
.key-input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .08em; text-transform: uppercase; }
.key-input::placeholder { text-transform: none; letter-spacing: normal; font-family: var(--sans); }
.guest-key { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 0; }
.guest-key b { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.6rem; letter-spacing: .08em; user-select: all; }
.guest-make .inline-label { display: inline-flex; align-items: center; gap: 8px; margin: 0 10px 0 0; font-weight: 500; }
.guest-make .inline-label input { width: 84px; margin: 0; }
.guest-list > li { gap: 8px 16px; }
.guest-tag { display: inline-block; padding: 0 6px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); color: var(--muted);
             font-size: .72rem; font-weight: 600; letter-spacing: .02em; vertical-align: 1px; }
.guest-note { margin: 6px 0 0; padding: 8px 12px; border-radius: 8px; background: var(--accent-soft); color: var(--ink-2); font-size: .88rem; }
.guest-note b { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .06em; }

/* ---- ride group Memories + chat keep note (v22) ---- */
.chat-keep { margin: 0 0 10px; color: var(--muted); font-size: .85rem; }
.mem-head { margin: 4px 0 18px; }
.mem-note { margin: 0 0 6px; color: var(--ink-2); max-width: 62ch; }
.mem-count { margin: 0 0 14px; color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; }
.mem-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.mem-actions label.btn { cursor: pointer; margin: 0; }
.mem-actions label.btn[aria-disabled="true"] { opacity: .55; }
.mem-actions .ico { width: 18px; height: 18px; }
.mem-queue { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; }
.mem-queue li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 8px 12px; border: 1px solid var(--line);
                border-radius: 8px; background: var(--surface); font-size: .88rem; }
.mem-queue .mq-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mem-queue .mq-state { color: var(--muted); }
.mem-queue li.ok .mq-state { color: var(--ok); font-weight: 600; }
.mem-queue li.err { border-color: #f2c4bf; background: var(--danger-soft); }
.mem-queue li.err .mq-state { color: var(--danger); grid-column: 1 / -1; }
.mq-track { grid-column: 1 / -1; height: 4px; border-radius: 4px; background: var(--bg); overflow: hidden; }
.mq-bar { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.mem-queue li.err .mq-track { display: none; }
.mem-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.mem-tile { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mem-open { position: relative; display: block; width: 100%; aspect-ratio: 1; padding: 0; border: 0; border-radius: 10px; overflow: hidden;
            background: #dfe5e1; cursor: zoom-in; }
.mem-open img, .mem-open video { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.mem-play { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: rgba(0, 0, 0, .55); }
.mem-play::after { content: ""; position: absolute; left: 17px; top: 13px; border-style: solid; border-width: 9px 0 9px 14px; border-color: transparent transparent transparent #fff; }
.mem-nothumb { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; color: var(--muted); font-weight: 600; }
.mem-meta { display: flex; justify-content: space-between; gap: 6px; font-size: .78rem; color: var(--muted); }
.mem-meta span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
@media (max-width: 600px) { .mem-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; } .mem-meta span:last-child { display: none; } }
.mv-media { display: flex; align-items: center; justify-content: center; width: 100%; height: calc(100% - 40px); }
.mv-media img, .mv-media video { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: var(--r-sm); }
.mv-cap { color: #e6ebe8; font-size: .9rem; }
.mv-actions { position: absolute; left: 12px; top: 10px; display: flex; gap: 8px; }
.mv-actions form { margin: 0; }
.mv-actions .btn.secondary { background: rgba(255, 255, 255, .12); border-color: transparent; color: #fff; }

/* ------------------------------------------------------------------ ride-group Vault (v23) */
.tabs { overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { white-space: nowrap; }
@media (max-width: 420px) { .tabs a { padding: 10px 10px; } }
.sys-note { max-width: 520px; margin: 10px auto; padding: 8px 12px; border-radius: 10px; background: var(--signal-soft);
            border: 1px solid #f0dd9d; color: #5c4300; font-size: .88rem; text-align: center; }
.sys-note .cm-time { float: none; margin: 0 0 0 8px; }
.section-sm { margin: 0 0 24px; }
.vault-intro { max-width: 640px; }
.vault-points { margin: 0 0 20px; padding-left: 20px; color: var(--ink-2); }
.vault-points li { margin-bottom: 4px; }
.vault-top { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 0; margin: 0 0 20px; background: var(--surface);
             border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.vault-bal { padding: 22px 24px; background: var(--accent); color: #fff; }
.vault-label { margin: 0; font-size: .85rem; font-weight: 600; color: rgba(255, 255, 255, .8); }
.vault-amount { margin: 2px 0 6px; font-size: 2.25rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.vault-flow { margin: 0; font-size: .9rem; color: rgba(255, 255, 255, .85); }
.vault-flow span + span::before { content: "·"; margin: 0 7px; opacity: .6; }
.vault-goal { margin-top: 14px; }
.vault-goal p { margin: 6px 0 0; font-size: .85rem; color: rgba(255, 255, 255, .85); }
.vault-goal-bar { height: 8px; border-radius: 8px; background: rgba(255, 255, 255, .22); overflow: hidden; }
.vault-goal-bar span { display: block; height: 100%; background: var(--signal); border-radius: 8px; }
.vault-facts { margin: 0; padding: 14px 24px; display: grid; gap: 0; align-content: center; }
.vault-facts div { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-top: 1px solid var(--line); font-size: .92rem; }
.vault-facts div:first-child { border-top: 0; }
.vault-facts dt { color: var(--muted); white-space: nowrap; }
.vault-facts dd { margin: 0; text-align: right; color: var(--ink); }
@media (max-width: 700px) {
  .vault-top { grid-template-columns: 1fr; }
  .vault-bal { padding: 18px; }
  .vault-facts { padding: 6px 18px 10px; }
  .vault-amount { font-size: 2rem; }
}
.vault-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -4px 0 16px; }
.vault-status .badge { font-size: .85rem; padding: 3px 10px; }
.vault-payform > label { max-width: 220px; }
.vault-steps { list-style: none; counter-reset: step; margin: 4px 0 0; padding: 0; }
.vault-steps > li { position: relative; padding: 0 0 18px 40px; counter-increment: step; }
.vault-steps > li::before { content: counter(step); position: absolute; left: 0; top: -1px; width: 26px; height: 26px; border-radius: 50%;
                            background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: .85rem; line-height: 26px; text-align: center; }
.vault-steps > li + li { padding-top: 16px; border-top: 1px solid var(--line); }
.vault-steps > li + li::before { top: 15px; }
.vault-steps h3 { margin: 0 0 10px; font-size: 1rem; }
.vault-steps .hint { margin-top: 8px; }
.vault-upi { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 12px 0 0; font-size: .92rem; color: var(--muted); }
.vault-upi code { padding: 3px 8px; border-radius: 6px; background: var(--bg); color: var(--ink); font-size: .92rem; word-break: break-all; }
.vault-qr { margin-top: 6px; }
.vault-qr img { display: block; width: 200px; height: 200px; margin-bottom: 6px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.vault-self { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0 12px; }
.vault-self label { margin-bottom: 0; max-width: 220px; }
.vault-list > li { align-items: center; }
.vault-who, .vault-acts { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px 10px; }
.vault-acts form { margin: 0; }
.vault-hist li.is-rejected .title, .vault-hist li.is-cancelled .title { color: var(--muted); }
.amount.struck { text-decoration: line-through; color: var(--muted); }
.vault-foot { margin: 8px 0 12px; }
.vault-foot form { margin: 0; }
@media (max-width: 600px) { .vault-who, .vault-acts { width: 100%; justify-content: flex-start; } }
.vault-opening > summary small { font-weight: 400; margin-left: 4px; }
.vault-opening-people { display: grid; gap: 8px; max-width: 420px; margin-bottom: 4px; }
.form .vault-opening-row { display: grid; grid-template-columns: minmax(0, 1fr) 140px; align-items: center; gap: 12px; margin: 0 !important; font-weight: 500 !important; }
.form .vault-opening-row input { margin-top: 0; }
.vault-opening-sum { margin: 2px 0 0; font-weight: 600; color: var(--ink-2); }

/* ------------------------------------------------------------------ ride on / off (v24) */
.ride-mode { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; margin: 0 0 14px;
              padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.ride-mode.on { border-color: #bfe0cc; background: var(--ok-soft); }
.ride-state { margin: 0; font-size: .92rem; color: var(--ink-2); flex: 1 1 220px; }
.ride-mode.on .ride-state b { color: var(--ok); }
.ride-mode.on .ride-state b::before { content: ""; display: inline-block; width: 8px; height: 8px; margin: 0 7px 1px 0; border-radius: 50%;
                                       background: var(--ok); vertical-align: middle; animation: ride-pulse 2s ease-in-out infinite; }
@keyframes ride-pulse { 50% { opacity: .35; } }
.ride-form { margin: 0; }
.vault-cover-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; margin: 0 0 14px;
                    padding: 10px 14px; border-radius: var(--r); background: var(--accent-soft); }
.vault-cover-line p { margin: 0; font-size: .92rem; flex: 1 1 240px; }
.vault-cover-line form { margin: 0; }
.vault-ask { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px; margin: 0 0 12px;
             padding: 12px 14px; border: 1px solid #f0dd9d; border-radius: var(--r); background: var(--signal-soft); }
.vault-ask.mine { border-color: var(--line); background: var(--bg); }
.vault-ask p { margin: 0; flex: 1 1 260px; font-size: .95rem; }
.vault-ask form { margin: 0; }
.vault-cover-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; margin: 0 0 12px; }
.vault-cover-form > label { margin: 0; }
.vault-cover-form > label:first-of-type { flex: 1 1 220px; max-width: 320px; }
.vault-cover-form label.check { margin: 0 0 10px; }

/* ------------------------------------------------------------------ the app: install + alerts (v26) */
.install-link { display: block; width: 100%; margin: 0; padding: 12px 20px; border: 0; background: none; text-align: left;
                font: inherit; color: var(--accent); font-weight: 600; cursor: pointer; }
.install-link:hover { background: var(--accent-soft); }
.install-help { text-align: center; }
.install-help img { border-radius: 16px; margin: 4px auto 10px; display: block; }
.install-help ol { text-align: left; margin: 12px 0 18px; padding-left: 22px; }
.install-help li { margin-bottom: 8px; }
.share-glyph { display: inline-block; width: 14px; height: 16px; margin: 0 2px -2px; border: 2px solid var(--accent); border-top: 0;
               border-radius: 0 0 3px 3px; position: relative; }
.share-glyph::before { content: ""; position: absolute; left: 3px; top: -8px; width: 2px; height: 11px; background: var(--accent); }
.share-glyph::after { content: ""; position: absolute; left: 0; top: -8px; width: 6px; height: 6px; border-left: 2px solid var(--accent);
                      border-top: 2px solid var(--accent); transform: rotate(45deg); transform-origin: 0 0; margin-left: 4px; }
.alerts-state { margin: 0 0 12px; color: var(--ink-2); }
.alert-kind { align-items: flex-start !important; padding: 10px 0; margin: 0 !important; border-top: 1px solid var(--line); }
.alert-kind:first-of-type { border-top: 0; }
.alert-kind input { margin-top: 4px; }
.alert-kind span { display: block; }
.alert-kind small { display: block; color: var(--muted); font-size: .85rem; margin-top: 2px; }
.form .alert-kind + .btn, .alert-kind:last-of-type { margin-bottom: 16px !important; }

/* ------------------------------------------------------------------ ride groups: tabs stay in reach (v28) */
/* Chat · Memories · Expenses · Vault stick under the site header, so a long chat never needs scrolling back up. */
.rg .tabs { position: sticky; top: 60px; z-index: 30; background: var(--bg); margin: 0 0 20px; padding-top: 2px;
            box-shadow: 0 6px 8px -8px rgba(28, 36, 33, .18); }
@media (max-width: 760px) { .rg .tabs { margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter));
                                        padding-left: calc(var(--gutter) - 10px); padding-right: var(--gutter); } }
html:has(.rg .tabs) { scroll-padding-top: 118px; }      /* things scrolled to stop below the header and the tabs */

/* ------------------------------------------------------------------ Vault: paying for someone stands out (v29) */
.vault-cover.is-open { border: 1px solid #f0dd9d; background: linear-gradient(var(--signal-soft), var(--surface) 140px); }
.vault-cover.is-open h2::before { content: ""; display: inline-block; width: 10px; height: 10px; margin: 0 8px 2px 0; border-radius: 50%;
                                  background: var(--signal); vertical-align: middle; }
.vault-cover-lead { margin: -4px 0 16px; color: var(--ink-2); }
.vault-cover-forms { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.vault-cover-forms .vault-cover-form { display: block; margin: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r);
                                       background: var(--surface); }
.vault-cover-form fieldset { margin: 0 0 12px; }
.vault-cover-form legend { font-size: .95rem; color: var(--ink); }
.vault-cover-people { display: grid; gap: 2px; }
.vault-cover-people label.check { margin: 0; padding: 6px 0; }
.vault-cover-past { margin: 8px 0 0 !important; padding-top: 8px; border-top: 1px dashed var(--line); color: var(--ink-2) !important; font-size: .9rem !important; }
.vault-cover-form select { margin-top: 0; }
.vault-cover-form .hint { margin: 8px 0 0; }
.vault-cover-form.flash-in { animation: cover-flash 1.6s ease-out; }
@keyframes cover-flash { 0%, 30% { box-shadow: 0 0 0 3px var(--signal); } 100% { box-shadow: 0 0 0 0 transparent; } }
.cover-tip h2 { margin-top: 4px; }
.cover-tip p { color: var(--ink-2); }
.cover-tip-acts { display: grid; gap: 8px; margin-top: 16px; }
.vault-cover-form select[multiple] { min-height: 0; padding: 4px; }
.name-picker-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.name-picker-chips:empty { display: none; }
.name-picker-chip { display: inline-flex; align-items: center; gap: 2px; padding: 3px 4px 3px 12px; border-radius: 999px; background: var(--accent);
               color: #fff; font-size: .9rem; font-weight: 600; }
.name-picker-x { width: 26px; height: 26px; margin: 0; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #fff;
            font-size: 1.1rem; line-height: 1; cursor: pointer; }
.name-picker-x:hover { background: rgba(255, 255, 255, .2); }
.name-picker-search { margin-top: 0; }
.name-picker-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.name-picker-opt { margin: 0; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); color: var(--ink);
              font: 500 .9rem var(--sans); cursor: pointer; }
.name-picker-opt:hover, .name-picker-opt:focus-visible { border-color: var(--accent); color: var(--accent); }
.name-picker-opt::before { content: "+ "; color: var(--muted); }
.name-picker-more { margin: 8px 0 0; font-size: .85rem; color: var(--muted); }
.name-picker-more:empty { display: none; }

/* v31: Where readers stop (Analytics / Insights) */
.drop { border-top: 1px solid var(--line); padding: 4px 0; }
.drop:last-of-type { border-bottom: 1px solid var(--line); }
.drop > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; padding: 10px 0; color: var(--ink); font-weight: 600; list-style: none; }
.drop > summary::-webkit-details-marker { display: none; }
.drop > summary::before { content: "+"; width: 14px; color: var(--accent); font-weight: 800; }
.drop[open] > summary::before { content: "–"; }
.drop-title { flex: 1 1 200px; min-width: 0; }
.drop-sum { color: var(--muted); font-weight: 400; font-size: .88rem; }
.drop-worst { margin: 0 0 10px; padding: 8px 12px; border-radius: var(--r-sm); background: var(--signal-soft); font-size: .92rem; }
.drop-bars th { width: 46%; }
.drop-bars tr.drop-here th { font-weight: 700; }
.drop-bars tr.drop-here .hb-track span { background: var(--signal); }
.drop .hint { margin: 8px 0 6px; }

/* v31: "Get the app" and "Turn on alerts?" pop-ups */
.app-ask { text-align: center; }
.app-ask img { display: block; margin: 4px auto 10px; border-radius: 16px; }
.app-ask h2 { font-size: 1.25rem; margin: 0 0 6px; }
.app-ask p { margin: 0 auto 8px; max-width: 42ch; color: var(--ink-2); }
.ask-bell { display: flex; align-items: center; justify-content: center; width: 60px; height: 60px; margin: 4px auto 12px; border-radius: 50%;
            background: var(--signal-soft); color: #8a6406; }
.ask-bell .ico { width: 30px; height: 30px; }
.ask-state:empty { display: none; }
.ask-state { font-weight: 600; color: var(--ink); }
.ask-state.ok { color: var(--ok); }
.ask-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.ask-actions .btn { margin: 0; }

/* v32: summary on the ride form */
.summary-field { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.summary-field label { margin-bottom: 6px; }
.summary-field textarea { margin-bottom: 8px; font-family: var(--serif); font-size: 1.05rem; line-height: 1.5; }
.summary-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.summary-status { color: var(--muted); font-size: .9rem; }
.summary-field .hint { margin: 8px 0 0; }

/* v32: swipe cards and photo sliders (static/js/swipe.js) */
.swipe-track { display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
               scrollbar-width: none; -webkit-overflow-scrolling: touch; outline-offset: 4px; }
.swipe-track::-webkit-scrollbar { display: none; }
.swipe-slide { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; scroll-snap-stop: always; }
.swipe-dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.swipe-dot { width: 6px; height: 6px; border-radius: 3px; background: var(--line-2); transition: width .2s, background .2s; }
.swipe-dot.on { width: 18px; background: var(--accent); }
.swipe.single .swipe-dots, .swipe.single .swipe-count, .swipe.single .swipe-arrow { display: none; }

/* the cards at the top of a ride */
.ride-deck { max-width: var(--measure); margin: 0 auto; }
.deck-tabs { display: flex; gap: 6px; margin-bottom: 12px; overflow-x: auto; scrollbar-width: none; }
.deck-tabs button { flex: none; margin: 0; padding: 7px 14px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface);
                    color: var(--ink-2); font: 600 .88rem var(--sans); cursor: pointer; }
.deck-tabs button[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.ride-deck .swipe-track { gap: 12px; align-items: flex-start; transition: height .25s ease; }
.ride-deck .swipe-slide { flex-basis: 88%; }
@media (min-width: 700px) { .ride-deck .swipe-slide { flex-basis: 100%; } }
.ride-deck.single .swipe-slide { flex-basis: 100%; }
@media (prefers-reduced-motion: reduce) { .ride-deck .swipe-track { transition: none; } }
.deck-card { display: flex; flex-direction: column; padding: 20px; background: var(--surface); border: 1px solid var(--line);
             border-top: 4px solid var(--accent); border-radius: var(--r-lg); }
.deck-moments { border-top-color: var(--signal); }
.deck-tips { border-top-color: #c9853a; }
.deck-kicker { margin: 0 0 10px; font-size: .75rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--accent); }
.deck-moments .deck-kicker { color: #8a6406; }
.deck-tips .deck-kicker { color: #9a5b1c; }
.deck-summary-text { margin: 0 0 14px; font-family: var(--serif); font-size: 1.15rem; line-height: 1.55; color: var(--ink); }
.deck-card .brief-chapters { margin-top: 14px; }
.deck-next { align-self: flex-end; display: inline-flex; align-items: center; gap: 2px; margin: 14px -6px -6px 0; padding: 6px 6px 6px 10px;
             border: 0; border-radius: 8px; background: none; color: var(--accent); font: 700 .9rem var(--sans); cursor: pointer; }
.deck-next:hover { background: var(--accent-soft); }
.deck-next .ico { width: 18px; height: 18px; }
.deck-more { margin: 10px 0 0; font-size: .9rem; font-weight: 600; }

.moments { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.moment { display: flex; align-items: center; gap: 12px; }
.moment-ico { flex: none; display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%;
              background: var(--signal-soft); color: #8a6406; }
.moment-ico .ico { width: 22px; height: 22px; }
.moment-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.moment-label { font-size: .7rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.moment-text { font-family: var(--serif); font-size: 1.12rem; line-height: 1.35; color: var(--ink); }
.moment-photo { flex: none; width: 58px; height: 58px; border-radius: 10px; object-fit: cover; background: #e3e7e4; }
.m-food .moment-ico { background: #fdeee2; color: #a2501a; }
.m-night .moment-ico { background: #e8e9f7; color: #3d3f8f; }
.m-sun .moment-ico { background: #fff4d6; color: #9a6a00; }
.m-water .moment-ico { background: #e2f0f8; color: #1f6a8f; }
.m-peak .moment-ico { background: var(--accent-soft); color: var(--accent); }
.m-stay .moment-ico { background: #f2ebe2; color: #7a5531; }
.m-people .moment-ico { background: #f8e6ee; color: #9a2f5c; }
.m-road .moment-ico { background: #ebeded; color: #3b4642; }

.tip-list { list-style: none; margin: 0; padding: 0; }
ul.tip-list li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--line); line-height: 1.45; }
ul.tip-list li:first-child { border-top: 0; padding-top: 0; }
.dt-ico { flex: none; display: flex; padding-top: 1px; color: var(--accent); }
.dt-ico .ico { width: 20px; height: 20px; }
ul.tip-list li.dt-warn { margin-bottom: 6px; padding: 9px 10px; border: 0; border-radius: var(--r-sm); background: var(--signal-soft); }
ul.tip-list li.dt-warn + li { border-top: 0; }
.dt-warn .dt-ico { color: #9a6a00; }
.dt-story .dt-ico { color: #9a5b1c; }
.dt-where { white-space: nowrap; font-weight: 600; font-size: .9rem; }
.deck-cta { align-self: flex-start; margin-top: 14px; }

/* photos placed next to each other in a story: one full-width photo at a time */
.photo-swipe { position: relative; --ratio: 1.333; }
.photo-swipe .swipe-slide { margin: 0; }
.story-photos.photo-swipe img { display: block; width: 100%; max-height: none; aspect-ratio: var(--ratio); object-fit: cover; border-radius: var(--r); }
.photo-swipe .swipe-count { position: absolute; top: 10px; right: 10px; z-index: 2; padding: 3px 9px; border-radius: 999px;
                            background: rgba(20, 24, 22, .6); color: #fff; font-size: .78rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.photo-swipe:not(.is-ready) .swipe-count { display: none; }
.swipe-arrow { position: absolute; top: 0; z-index: 2; display: none; align-items: center; justify-content: center; width: 40px; height: 40px;
               margin-top: calc(min(100%, 840px) / var(--ratio) / 2 - 20px); border: 0; border-radius: 50%;
               background: rgba(255, 255, 255, .9); color: var(--ink); box-shadow: var(--shadow); cursor: pointer; }
.swipe-arrow.prev { left: 10px; } .swipe-arrow.next { right: 10px; }
.swipe-arrow:disabled { opacity: 0; pointer-events: none; }
@media (hover: hover) and (pointer: fine) { .photo-swipe.is-ready .swipe-arrow { display: flex; } }
@media (max-width: 600px) {
  .story-photos.photo-swipe { margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); }
  .story-photos.photo-swipe img { border-radius: 0; }
  .photo-swipe figcaption { padding: 0 var(--gutter); }
}

/* v34: reader accounts: sign-in, follow, save, comments */
.signin-wrap { max-width: 520px; }
.signin-panel h1 { margin: 0 0 6px; }
.signin-lede { margin: 0 0 16px; color: var(--muted); }
.signin-perks { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.signin-perks li { display: flex; gap: 12px; align-items: flex-start; line-height: 1.4; }
.signin-perks .ico { flex: none; width: 22px; height: 22px; margin-top: 1px; color: var(--accent); }
.google-btn { min-height: 50px; font-size: 1.02rem; }
.signin-legal { margin: 12px 0 0; }
.signin-others { margin: 18px 4px 0; font-size: .95rem; }
.signin-others p { margin: 0 0 8px; }
.footer-links { display: inline-flex; gap: 16px; }

.follow-form { display: inline; margin: 0 0 0 6px; }
.follow-btn { display: inline-flex; align-items: center; margin: 0 0 0 6px; padding: 3px 12px; border: 1px solid var(--accent); border-radius: 999px;
              background: var(--surface); color: var(--accent); font: 600 .82rem/1.4 var(--sans); text-decoration: none; cursor: pointer; vertical-align: 1px; }
.follow-form .follow-btn { margin: 0; }
.follow-btn[aria-pressed="true"] { background: var(--accent-soft); }
.follow-btn:hover { background: var(--accent); color: #fff; }
.rider-head .follow-form { display: block; margin: 10px 0 0; }
.save-form { margin: 0; }
.save-btn[aria-pressed="true"] .ico { fill: currentColor; }
a.like-btn { text-decoration: none; }

.comments { max-width: var(--measure); margin: 36px auto 0; padding-top: 24px; border-top: 1px solid var(--line); }
.comments h2 { font-size: 1.15rem; margin: 0 0 14px; }
.comments h2 .muted { font-weight: 500; }
.comment-list { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.comment { display: flex; gap: 12px; }
.avatar.small { width: 36px; height: 36px; font-size: .95rem; }
.comment-body { flex: 1; min-width: 0; }
.comment-meta { margin: 0 0 2px; font-size: .9rem; }
.comment-text { margin: 0; white-space: pre-line; overflow-wrap: anywhere; line-height: 1.5; }
.comment-actions { display: flex; gap: 14px; margin-top: 4px; font-size: .85rem; }
.comment:target .comment-body { background: var(--signal-soft); border-radius: var(--r-sm); box-shadow: 0 0 0 6px var(--signal-soft); }
.tag { display: inline-block; padding: 1px 7px; border-radius: 999px; background: var(--accent); color: #fff; font-size: .72rem; font-weight: 700; vertical-align: 1px; }
.tag.soft { background: var(--accent-soft); color: var(--accent); }
.tag.danger { background: var(--danger-soft); color: var(--danger); }
.comment-form { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.comment-form textarea { width: 100%; margin: 0; }
.comment-signin { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0; }

.plain-list { margin: 0; padding-left: 1.1em; line-height: 1.8; }
.danger-zone { border-color: #f2c4bf; }
.danger-zone h2 { color: var(--danger); }
.accounts-table tr.blocked th, .accounts-table tr.blocked td { color: var(--muted); }
.notice-panel { background: var(--signal-soft); border-color: #f0dd9d; }
.notice-panel code, .accounts-table code { overflow-wrap: anywhere; }
.privacy h2 { font-size: 1.1rem; margin: 28px 0 8px; }
.privacy li { margin-bottom: 8px; }
.upgrade-note { margin: 12px 0 0; padding: 10px 12px; border-radius: var(--r-sm); background: var(--accent-soft); font-size: .92rem; }
.byline form.follow-form { display: inline-flex; vertical-align: middle; margin: 0 0 0 6px; }
.byline a.follow-btn { color: var(--accent); }
.byline a.follow-btn:hover { color: #fff; }
.comment-list .comment-meta { white-space: normal; margin: 0 0 2px; }
.comment-list .comment-text { margin: 0; white-space: pre-line; }
.comment-list .comment { padding: 14px 0 0; }

/* v35: a free group's Memories space */
.mem-space { margin: 0 0 14px; }
.mem-space .mem-count { margin: 0 0 6px; color: var(--ink-2); }
.mem-meter { display: block; height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.mem-meter span { display: block; height: 100%; min-width: 2px; border-radius: 4px; background: var(--accent); }
.mem-meter span.full { background: var(--danger); }
.mem-paused { margin: 0 0 14px; }
.storage-switches { margin: 16px 0 0; padding: 12px 14px; border-radius: var(--r); background: var(--bg); font-size: .92rem; }
.storage-switches p { margin: 0 0 6px; }
.storage-switches p:last-child { margin: 0; }

/* v36: the ride group's Settings tab */
.rg-settings-hint { margin: 28px 0 0; }
.people-list .sub { font-size: .85rem; }
.add-person-form { margin: 12px 0 0; }
.settings-links a { display: flex; flex: 1; align-items: center; color: inherit; text-decoration: none; }
.danger-zone-section .panel { margin: 0; }
@media (max-width: 520px) {               /* v56: four (or five) tabs share the phone's width, with room between them */
  .rg .tabs { gap: 4px; }
  .rg .tabs a { flex: 1 1 0; padding: 12px 4px; text-align: center; font-size: .95rem; }
  .rg .tabs .count { margin-left: 4px; }
}

/* ------------------------------------------------------------------ v42: rider cards */
:root { --gold: #b8892e; --gold-2: #e8cd86; --gold-ink: #5b4310; --night: #16211e; }
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.xl { width: 96px; height: 96px; font-size: 2.2rem; border: 4px solid var(--surface); box-shadow: var(--shadow); }
.avatar.crew-ring { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--gold); }
.avatar.xl.crew-ring { border: 0; box-shadow: 0 0 0 4px var(--surface), 0 0 0 7px var(--gold), 0 8px 24px rgba(91, 67, 16, .25); }
.crew-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px 3px 7px; border-radius: 999px; vertical-align: 2px;
              background: linear-gradient(135deg, #f3dc9a, #c99a3c 55%, #e4c473); color: var(--gold-ink);
              font: 800 .72rem/1.2 var(--sans); letter-spacing: .06em; text-transform: uppercase;
              box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 1px 2px rgba(91, 67, 16, .25); }
.crew-badge .ico { width: 14px; height: 14px; stroke-width: 1.8; }
.crew-badge.small { padding: 1px 7px 1px 5px; font-size: .64rem; }
.crew-badge.small .ico { width: 12px; height: 12px; }

.card-back { margin: 0 0 12px; }
.card-back a { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; font-weight: 600; }
.card-nudge { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 18px;
              padding: 14px 18px; border-radius: var(--r); background: var(--signal-soft); border: 1px solid #f0dc9f; }
.card-nudge p { margin: 0; flex: 1 1 260px; }

.rcard { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
         overflow: hidden; margin: 0 0 28px; padding: 0 24px 22px; box-shadow: var(--shadow); }
.rcard.is-crew { border-color: #e2cf9f; background: linear-gradient(180deg, var(--surface) 70%, #fdf9ef); }
.rcard.is-crew::after { content: ""; position: absolute; inset: auto 0 0; height: 3px; background: linear-gradient(90deg, #c99a3c, #f3dc9a, #c99a3c); }
.rcard-cover { height: 128px; margin: 0 -24px; }
.rcard-main { display: flex; align-items: flex-end; gap: 16px; margin-top: -48px; }
.rcard-id { min-width: 0; padding-bottom: 4px; }
.rcard-id h1 { margin: 0; font-size: 1.7rem; overflow-wrap: anywhere; }
.rcard.is-crew .rcard-id h1 { letter-spacing: -.02em; }
.rcard-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 6px 0 0; color: var(--muted); }
.rcard-city { display: inline-flex; align-items: center; gap: 3px; font-weight: 500; }
.rcard-city .ico { width: 16px; height: 16px; }
.rcard-bio { margin: 16px 0 0; font: 400 1.05rem/1.5 var(--serif); color: var(--ink-2); max-width: 60ch; }
.style-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; padding: 0; list-style: none; }
.style-chips li { padding: 4px 11px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-hover); font-size: .85rem; font-weight: 600; }
.rcard.is-crew .style-chips li { background: #f7efd9; color: var(--gold-ink); }
.rcard-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 10px; margin: 20px 0 0; }
.rcard-stats div { padding: 10px 12px; border-radius: var(--r); background: var(--bg); }
.rcard-stats dt { color: var(--muted); font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.rcard-stats dd { margin: 2px 0 0; font-size: 1.35rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.rcard-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; }
.rcard-actions:empty { display: none; }
.rcard-actions .follow-form { margin: 0; }
.rcard-since { margin: 14px 0 0; color: var(--muted); font-size: .85rem; }
@media (max-width: 600px) {
  .rcard { padding: 0 16px 18px; border-radius: var(--r); }
  .rcard-cover { height: 104px; margin: 0 -16px; }
  .rcard-main { flex-direction: column; align-items: flex-start; gap: 10px; margin-top: -44px; }
  .rcard-id h1 { font-size: 1.45rem; }
}

/* covers: a gradient with a soft line of hills */
.rcard-cover, .cover-swatch span { background-color: #2c5e4f; background-position: center bottom; }
.rcard-cover, .cover-swatch span {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 120' preserveAspectRatio='none'%3E%3Cpath d='M0 120V78l40-22 38 18 52-40 46 30 34-16 50 34 44-28 46 22 50-30v74z' fill='%23000' fill-opacity='.16'/%3E%3Cpath d='M0 120V96l60-18 50 14 70-26 60 22 50-12 60 16 50-10v38z' fill='%23000' fill-opacity='.18'/%3E%3C/svg%3E"), var(--cover);
  background-size: 100% 100%, cover; }
.cover-dusk { --cover: linear-gradient(135deg, #f6a664, #d4587a 50%, #4b3473); }
.cover-forest { --cover: linear-gradient(135deg, #a7c79a, #4f8a6c 45%, #1f4a3d); }
.cover-desert { --cover: linear-gradient(135deg, #f7d58e, #e09a52 50%, #a8512f); }
.cover-ocean { --cover: linear-gradient(135deg, #7dd3c8, #1f8f9a 45%, #1d4f91); }
.cover-monsoon { --cover: repeating-linear-gradient(105deg, rgba(255,255,255,.07) 0 2px, transparent 2px 14px), linear-gradient(160deg, #8aa4b8, #46627a 50%, #26384a); }
.cover-snow { --cover: linear-gradient(160deg, #f4f7fb, #c6d3e1 50%, #8ea3bb); }
.cover-crew { --cover: radial-gradient(120% 140% at 85% 0%, rgba(232, 205, 134, .55), transparent 55%), linear-gradient(135deg, #1d3a32, #16211e 70%); }
.cover-carbon { --cover: repeating-linear-gradient(45deg, rgba(255,255,255,.035) 0 6px, transparent 6px 12px), linear-gradient(180deg, #2a2d2c, #121413);
                box-shadow: inset 0 -3px 0 var(--gold); }

.card-section { margin: 0 0 32px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.section-head p { margin: 0; }

/* garage */
.garage-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.garage-list.editing { grid-template-columns: 1fr; margin-bottom: 18px; }
.garage-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.garage-item > div { flex: 1; min-width: 0; }
.garage-item b { display: block; }
.garage-item .muted { font-size: .88rem; }
.garage-kind { display: flex; align-items: center; justify-content: center; flex: none; width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.is-crew ~ .card-section .garage-kind { background: #f7efd9; color: var(--gold-ink); }

/* places ridden */
.places-map { height: 340px; border-radius: var(--r-lg); background: #0f1715; overflow: hidden; margin: 10px 0 12px; }
.places-map .leaflet-control-zoom a { background: #1f2a27; color: #e9efe9; border-color: #34423e; }
.lit-place span { display: block; width: 100%; height: 100%; border-radius: 50%; background: #ffd56b;
                  box-shadow: 0 0 0 3px rgba(255, 213, 107, .25), 0 0 14px 4px rgba(255, 190, 60, .65);
                  animation: light-up .7s ease-out both; }
.lit-place.dest span { background: #fff1c2; box-shadow: 0 0 0 4px rgba(255, 213, 107, .35), 0 0 22px 8px rgba(255, 190, 60, .75); }
@keyframes light-up { from { transform: scale(0); opacity: 0; } 60% { transform: scale(1.35); opacity: 1; } to { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .lit-place span { animation: none; } }
.places-list summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.places-list ul { margin: 10px 0 0; padding: 0; list-style: none; columns: 2 260px; column-gap: 24px; }
.places-list li { break-inside: avoid; padding: 5px 0; }
.places-list .muted { display: block; font-size: .85rem; padding-left: 18px; }
.pl-dot { display: inline-block; width: 9px; height: 9px; margin-right: 8px; border-radius: 50%; background: #e7b743; }
.pl-dot.dest { background: #c98a12; box-shadow: 0 0 0 2px #f6e2a8; }
.places-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 34px 20px; text-align: center;
                border-radius: var(--r-lg); background: #16211e; color: #d7e2dc; }
.places-empty p { margin: 0; max-width: 46ch; }
.places-empty .btn.secondary { background: transparent; color: #fff; border-color: #50625c; }
.places-empty-dots { display: flex; gap: 22px; }
.places-empty-dots i { width: 10px; height: 10px; border-radius: 50%; background: #3a4a45; }
.places-empty-dots i:nth-child(2) { background: #ffd56b; box-shadow: 0 0 14px 4px rgba(255, 190, 60, .6); }

/* card editor */
.photo-pick { display: flex; align-items: center; gap: 18px; margin: 0 0 18px; }
.photo-pick .file-btn { display: inline-flex; margin: 0 0 8px; font-weight: 600; color: var(--ink); cursor: pointer; }
.photo-pick .file-btn:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.photo-pick .hint { margin: 0; }
.crew-name { margin: 0 0 16px; }
.style-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.form label.chip-check { margin: 0; font-weight: 500; }
.chip-check input { position: absolute; opacity: 0; pointer-events: none; }
.chip-check span { display: inline-block; padding: 7px 13px; border: 1px solid var(--line-2); border-radius: 999px; cursor: pointer; background: var(--surface); }
.chip-check input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip-check input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.chip-check input:disabled + span { opacity: .45; cursor: default; }
.cover-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 10px; }
.form label.cover-swatch { margin: 0; font-weight: 500; text-align: center; cursor: pointer; }
.cover-swatch input { position: absolute; opacity: 0; pointer-events: none; }
.cover-swatch span { display: block; height: 48px; border-radius: 10px; border: 2px solid transparent; }
.cover-swatch input:checked + span { border-color: var(--ink); box-shadow: 0 0 0 2px var(--surface) inset; }
.cover-swatch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.cover-swatch small { display: block; margin-top: 4px; color: var(--muted); }
.bike-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0 12px; align-items: end; }
.bike-fields .btn { margin-bottom: 16px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 24px; }

/* ride page: author face + "I've ridden this"; comments link to cards */
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.byline-face { display: inline-flex; text-decoration: none; }
.byline-face .avatar.small { width: 30px; height: 30px; font-size: .85rem; }
.ridden-btn[aria-pressed="true"] { background: #fff7df; border-color: #e0bd5c; color: var(--gold-ink); }
.comment-name { color: var(--ink); text-decoration: none; }
.comment-name:hover b { text-decoration: underline; }

/* top bar: my face (free accounts) */
.me-btn { position: relative; }
.me-btn img, .me-btn > span:first-child { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.me-btn > span:first-child { display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.me-btn .dot { position: absolute; top: 6px; right: 6px; }

/* For you */
.foryou-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.foryou-me { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: .8rem; font-weight: 600; text-decoration: none; color: var(--muted); }
.fy-item { position: relative; }
.new-tag { position: absolute; z-index: 2; top: 10px; left: 10px; padding: 2px 9px; border-radius: 999px; background: var(--signal); color: #3a2c00;
           font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.new-tag.inline { position: static; vertical-align: 1px; }
.talk-list { margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.talk-list li + li { border-top: 1px solid var(--line); }
.talk-list a { display: block; padding: 12px 16px; color: var(--ink); text-decoration: none; }
.talk-list a:hover { background: var(--bg); }
.talk-list li.is-new { background: #fffbec; }
.talk-who { display: block; font-size: .92rem; }
.talk-text { display: block; margin-top: 3px; color: var(--ink-2); }
.rider-suggest { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 0; padding: 0; list-style: none; }
.rider-suggest a { display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border: 1px solid var(--line); border-radius: 999px;
                   background: var(--surface); color: var(--ink); text-decoration: none; }
.rider-suggest a:hover { border-color: var(--gold); }
.rider-suggest small { display: block; }
#city-status { min-height: 2.7em; margin: -8px 0 12px; }     /* room kept, so the page doesn't jump while it looks the city up */
.me-btn, .me-btn:hover { text-decoration: none; }
@media (max-width: 600px) { .rcard-stats { grid-template-columns: 1fr 1fr; } }
.ridden-btn[aria-pressed="true"] .ico { fill: none; stroke-width: 2.4; }
.comment .avatar.crew-ring, .byline-face .avatar.crew-ring { margin-left: 4px; }
.page-head.foryou-head { flex-wrap: nowrap; align-items: flex-start; }
.places-map.leaflet-container { background: #0f1715; }   /* Leaflet sets grey; its CSS loads after ours */

/* v43: "or" between Join with Google and name + PIN */
.or-line { display: flex; align-items: center; gap: 12px; margin: 18px 0 16px; color: var(--muted); font-size: .85rem; }
.or-line::before, .or-line::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.google-btn { display: inline-flex; align-items: center; justify-content: center; }

/* v44: only the photo overlaps the cover; the name always sits below it on the white card (it was dark-on-dark on wide screens) */
.rcard-main { margin-top: 0; align-items: flex-start; }
.rcard-main .avatar.xl { margin-top: -48px; }
.rcard-id { padding: 12px 0 0; }
@media (max-width: 600px) {
  .rcard-main { margin-top: 0; }
  .rcard-main .avatar.xl { margin-top: -44px; }
  .rcard-id { padding-top: 0; }
}

/* ------------------------------------------------------------------ v45: group chat fills the screen, faces row, People page */
/* The chat page fills the phone screen: no footer under it, the message bar sits at the very bottom whether there are
   2 messages or 200, and nothing pushes it up when you scroll to the end. */
.chat-page .footer { display: none; }
.chat-page .container { display: flex; flex-direction: column; min-height: calc(100vh - 60px); min-height: calc(100dvh - 60px); padding-bottom: 0; }
.chat-page .rg { flex: 1; display: flex; flex-direction: column; width: 100%; }
.chat-page #rg { flex: 1; display: flex; flex-direction: column; }
.chat-page .feed { flex: 1; min-height: 0; }
.chat-page .rg-bar { margin-top: auto; }
.stop-btn.is-stopped { background: var(--ok); }
.stop-btn.is-stopped:hover { background: #1b5a3b; }
.stop-help { justify-self: center; font-size: .9rem; color: var(--danger); }

.rg-faces { display: inline-flex; align-items: center; gap: 8px; margin: 6px 0 12px; padding: 4px 10px 4px 4px; border-radius: 999px;
            color: var(--ink-2); text-decoration: none; font-size: .9rem; font-weight: 600; }
.rg-faces:hover { background: var(--surface); color: var(--ink); }
.rg-faces .ico { width: 16px; height: 16px; }
.face-stack { display: inline-flex; }
.face { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; margin-left: -8px; border-radius: 50%;
        overflow: hidden; background: var(--accent-soft); color: var(--accent); font-size: .8rem; font-weight: 700; border: 2px solid var(--bg); }
.face:first-child { margin-left: 0; }
.face img { width: 100%; height: 100%; object-fit: cover; }
.face.crew { box-shadow: 0 0 0 1.5px var(--gold); }
.face.more { background: var(--line); color: var(--ink-2); font-size: .72rem; }
.people-page li { display: flex; align-items: center; gap: 10px; }
.pp-main { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; color: var(--ink); text-decoration: none; }
a.pp-main:hover .title { text-decoration: underline; }
.pp-state { flex: none; padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; text-decoration: none; }
.pp-state.moving { background: var(--ok-soft); color: var(--ok); }
.pp-state.stopped { background: var(--signal-soft); color: #7a5a00; }
.pp-state.stopped.urgent { background: var(--danger-soft); color: var(--danger); }
.other-login summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.other-login[open] summary { margin-bottom: 4px; }

/* v46: card photos are small images loaded as you scroll (they were full-size backgrounds, all loaded at once) */
.ride-card .cover > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.trend-list .thumb { position: relative; overflow: hidden; }
.trend-list .thumb > img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* v48: details that come from your account can't be changed on the contact form */
input.locked, input[readonly].locked { background: var(--bg); color: var(--ink-2); cursor: not-allowed; }

/* ------------------------------------------------------------------ v49: speak your story */
.dictate-btn[aria-pressed="true"] { background: var(--danger); border-color: var(--danger); color: #fff; }
.dictate-mini { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; margin: 0 0 0 8px; padding: 0;
                vertical-align: middle; border: 1px solid var(--line-2); border-radius: 50%; background: var(--surface); color: var(--accent); cursor: pointer; }
.dictate-mini .ico { width: 17px; height: 17px; }
.dictate-mini[aria-pressed="true"] { background: var(--danger); border-color: var(--danger); color: #fff; }
textarea.dictating, input.dictating { border-color: var(--danger) !important; box-shadow: 0 0 0 3px rgba(179, 38, 30, .15) !important; }
.dictate-bar { position: fixed; z-index: 1200; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translateX(-50%);
               width: min(560px, calc(100% - 24px)); display: grid; grid-template-columns: 1fr auto auto; gap: 8px 10px; align-items: center;
               padding: 12px 14px; border-radius: var(--r-lg); background: var(--ink); color: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.dictate-bar.err { background: #5b1d18; }
.dictate-words { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 600; }
.dictate-heard { font-weight: 400; color: #d9e2dd; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dictate-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #ff5a4f; animation: dictate-pulse 1.2s ease-in-out infinite; }
.dictate-bar.err .dictate-dot { animation: none; background: #f2c4bf; }
@keyframes dictate-pulse { 50% { transform: scale(1.5); opacity: .5; } }
@media (prefers-reduced-motion: reduce) { .dictate-dot { animation: none; } }
.dictate-lang { margin: 0; width: auto; max-width: 150px; padding: 6px 8px; font-size: .85rem; }
.dictate-bar .btn { background: #fff; color: var(--ink); border-color: #fff; }
.dictate-note { grid-column: 1 / -1; margin: 0; color: #c9d3ce; font-size: .8rem; }
.dictate-note[hidden] { display: none; }
@media (max-width: 420px) { .dictate-bar { grid-template-columns: 1fr auto; } .dictate-lang { grid-column: 1; grid-row: 2; max-width: none; } }
/* a message only (not listening): just the text and OK */
.dictate-bar.hint { grid-template-columns: 1fr auto; }
.dictate-bar.hint .dictate-lang, .dictate-bar.hint .dictate-words { display: none; }
.dictate-bar.hint .dictate-note { grid-column: 1; grid-row: 1; font-size: .9rem; color: #fff; }

/* ------------------------------------------------------------------ v50: distance from the route */
.km-box { margin: -4px 0 16px; }
.km-box label.check { margin: 0 0 6px; }
.km-box label.check small { color: var(--muted); }
.km-hint { margin: 0; }
.km-hint.warn { color: var(--danger); font-weight: 600; }
.km-check { display: flex; align-items: center; gap: 6px; margin: -8px 0 20px; color: var(--muted); font-size: .88rem; }
.km-check.ok { color: var(--ok); font-weight: 600; }
.km-check .ico { width: 16px; height: 16px; flex: none; }

/* ------------------------------------------------------------------ v51: the climb */
.climb { max-width: var(--measure); margin: 28px auto 0; }
.climb-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.climb-head h2 { margin: 0; }
.climb-head p { margin: 0; color: var(--ink-2); }
.climb-head .ico { width: 18px; height: 18px; margin-right: 5px; color: var(--accent); vertical-align: -3px; }
.climb-svg { display: block; width: 100%; height: auto; margin: 10px 0 4px; overflow: visible; }
.climb-svg .cl-area { fill: rgba(15, 118, 110, .16); }
.climb-svg .cl-line { fill: none; stroke: #0f766e; stroke-width: 2.2; stroke-linejoin: round; }
.climb-svg .cl-grid { stroke: var(--line); stroke-width: 1; }
.climb-svg .cl-axis { fill: var(--muted); font: 600 11px var(--sans); }
.climb-svg .cl-stop { stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 3 3; }
.climb-svg .cl-pin { fill: var(--surface); stroke: #0f766e; stroke-width: 2; }
.climb-svg .cl-pin.cl-dest { fill: #0f766e; }
.climb-svg .cl-pin-t { fill: var(--ink); font: 700 10px var(--sans); }
.climb-svg .cl-dest + .cl-pin-t { fill: #fff; }
.climb-svg .cl-top { fill: #b8892e; }
.climb-svg .cl-top-t { fill: #7a5a12; font: 800 12px var(--sans); paint-order: stroke; stroke: var(--bg); stroke-width: 4px; stroke-linejoin: round; }
.climb-note { margin: 4px 0 0; color: var(--muted); font-size: .85rem; }
.top-pin span { display: inline-block; padding: 2px 7px; border-radius: 999px; background: #fff7df; border: 1px solid #e0bd5c;
                color: #7a5a12; font: 700 12px var(--sans); white-space: nowrap; box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }

/* ------------------------------------------------------------------ v52: your photo menu, ＋ New ride, tour, Get started, hints */
.me-menu { position: relative; }
.me-btn.crew img, .me-btn.crew > span:first-child { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--gold); }
.me-btn:not(.crew) img, .me-btn:not(.crew) > span:first-child { box-shadow: 0 0 0 1px var(--line-2); }
.me-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.me-drop { position: absolute; top: calc(100% + 8px); right: 0; z-index: 1100; width: 230px; padding: 6px; border: 1px solid var(--line);
           border-radius: var(--r); background: var(--surface); box-shadow: 0 10px 30px rgba(28, 36, 33, .16); }
.me-drop[hidden] { display: none; }
.me-drop-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); }
.me-drop-head b { overflow: hidden; max-width: 140px; text-overflow: ellipsis; white-space: nowrap; }
.me-drop a { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 10px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.me-drop a:hover, .me-drop a:focus-visible { background: var(--bg); color: var(--ink); }
.me-drop a:last-child { margin-top: 4px; border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; color: var(--muted); }
.me-drop .count { margin-left: auto; }

/* ＋ New ride: in the top bar on computers, a round button bottom right on phones */
.new-ride-top { white-space: nowrap; }
.fab { display: none; }
@media (max-width: 760px) {
  .new-ride-top { display: none !important; }
  .fab { position: fixed; right: 18px; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 900; display: flex; align-items: center;
         justify-content: center; width: 58px; height: 58px; border-radius: 50%; background: var(--accent); color: #fff; text-decoration: none;
         font-size: 1.9rem; font-weight: 300; line-height: 1; box-shadow: 0 6px 18px rgba(28, 36, 33, .28), 0 0 0 3px rgba(255, 255, 255, .9); }
  .fab:hover, .fab:active { background: var(--accent-hover); color: #fff; }
  .fab span { margin-top: -3px; }
  body:has(.fab) .footer { padding-bottom: 96px; }   /* the last bit of the page isn't hidden under it */
}

/* the tour */
.tour-offer h2 { margin-top: 4px; }
.tour-offer-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.tour-layer { position: fixed; inset: 0; z-index: 5000; }
.tour-hole { position: fixed; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(18, 26, 23, .62); pointer-events: none;
             transition: left .25s ease, top .25s ease, width .25s ease, height .25s ease; }
.tour-hole::after { content: ""; position: absolute; inset: -3px; border: 2px solid var(--signal); border-radius: 14px; }
.tour-hole.round::after { border-radius: 50%; }
.tour-center .tour-hole::after { display: none; }
.tour-tip { position: fixed; padding: 14px 16px 12px; border-radius: var(--r); background: var(--surface); box-shadow: 0 12px 34px rgba(0, 0, 0, .28); }
.tour-center .tour-tip { left: 50% !important; top: 50% !important; width: min(340px, calc(100vw - 32px)) !important; transform: translate(-50%, -50%); }
.tour-count { margin: 0 0 2px; color: var(--muted); font-size: .78rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; }
.tour-title { margin: 0 0 4px; font-size: 1.1rem; }
.tour-text { margin: 0 0 12px; color: var(--ink-2); font-size: .95rem; }
.tour-btns { display: flex; align-items: center; gap: 6px; }
.tour-btns .tour-gap { flex: 1; }
.tour-btns [hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .tour-hole { transition: none; } }

/* Get started */
.get-started { padding: 14px 16px 6px; border: 1px solid #e8dcb6; border-radius: var(--r); background: linear-gradient(180deg, #fffbef, var(--surface) 70%); }
.gs-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.gs-head h2 { margin: 0; }
.gs-count { margin-left: 6px; color: var(--muted); font-size: .85rem; font-weight: 600; }
.gs-bar { height: 6px; margin: 10px 0 8px; overflow: hidden; border-radius: 999px; background: var(--line); }
.gs-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), #4c8a73); }
.gs-list { margin: 0; padding: 0; list-style: none; }
.gs-list li { display: flex; align-items: center; gap: 10px; min-height: 40px; border-bottom: 1px solid var(--line); }
.gs-list li:last-child { border-bottom: 0; }
.gs-tick { flex: none; display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; border: 2px solid var(--line-2);
           border-radius: 50%; font-size: .8rem; font-weight: 800; }
.gs-done .gs-tick { border-color: var(--ok); background: var(--ok); color: #fff; }
.gs-done s { color: var(--muted); text-decoration-color: rgba(103, 113, 109, .5); }
.gs-list a { font-weight: 600; }

/* one-time hints in ride groups */
.hint-bubble { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 14px; padding: 12px 14px; border: 1px solid #ecd58f;
               border-radius: var(--r); background: var(--signal-soft); }
.hint-bubble p { flex: 1; margin: 0; color: var(--ink-2); font-size: .92rem; }
.hint-ico { flex: none; font-size: 1.1rem; line-height: 1.4; }
.hint-bubble form { flex: none; }
[data-tip] { transition: opacity .2s ease, transform .2s ease; }
.tip-gone { opacity: 0; transform: translateY(-4px); }

/* ------------------------------------------------------------------ v53: rides inside groups, expenses per ride */
.rides-head { align-items: center; margin-bottom: 10px; }
.rides-head h2 { margin: 0; font-size: 1.15rem; }
.rides-head .btn .ico { width: 18px; height: 18px; margin-right: 2px; }
.gr-list { margin: 0 0 8px; padding: 0; list-style: none; display: grid; gap: 10px; }
.gr-link { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r);
           background: var(--surface); color: var(--ink); text-decoration: none; box-shadow: var(--shadow); }
.gr-link:hover { border-color: var(--line-2); color: var(--ink); }
.gr-link .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.gr-link .title { font-weight: 650; }
.gr-link .sub { color: var(--muted); font-size: .88rem; }
.gr-link .badge { flex: none; }
.gr-date { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 50px; height: 54px;
           border-radius: 10px; background: var(--accent-soft); color: var(--accent); line-height: 1; }
.gr-date b { font-size: 1.35rem; font-weight: 750; }
.gr-date i { font-style: normal; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin-top: 3px; }
.gr-when { color: var(--ink-2); font-weight: 600; }
.is-off .gr-link { opacity: .65; }
.is-off .gr-date { background: var(--bg); color: var(--muted); }
.gr-empty { margin-top: 4px; }

.gride-head h1 { margin: 6px 0 2px; font-size: 1.6rem; }
.gride-head .meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0; color: var(--muted); font-size: .88rem; }
.gride-where { margin: 0 0 14px; color: var(--ink-2); }
.gride-facts { margin-bottom: 16px; }
.answer-box { margin: 0 0 20px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); }
.answer-box h2 { margin: 0 0 10px; font-size: 1.05rem; }
.answer-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.answer-btns .btn { width: 100%; justify-content: center; }
.answer-btns .ico { width: 18px; height: 18px; margin-right: 4px; }
.answer-btns .answer-out[aria-pressed="true"] { background: var(--ink-2); border-color: var(--ink-2); color: #fff; }
.who-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; padding: 0; list-style: none; }
.who-list li { display: inline-flex; align-items: center; gap: 7px; padding: 4px 12px 4px 4px; border: 1px solid var(--line); border-radius: 999px;
               background: var(--surface); font-size: .92rem; }
.who-list .face { width: 28px; height: 28px; margin: 0; font-size: .8rem; }
.gride-writeup { margin-top: 8px; }
.gride-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 10px; }
.gride-danger { margin: 8px 0 24px; color: var(--muted); }
.gride-danger summary { cursor: pointer; font-size: .9rem; }
.gride-danger form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }

.ledger-pick { display: flex; gap: 8px; overflow-x: auto; margin: 0 calc(-1 * var(--gutter)) 16px; padding: 2px var(--gutter) 6px; scrollbar-width: none; }
.ledger-pick::-webkit-scrollbar { display: none; }
.ledger-pick a { flex: none; display: flex; flex-direction: column; padding: 8px 14px; border: 1px solid var(--line); border-radius: 12px;
                 background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .92rem; max-width: 220px; }
.ledger-pick a small { color: var(--muted); font-weight: 500; font-size: .76rem; white-space: nowrap; }
.ledger-pick a[aria-current="page"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.next-ride { display: flex; align-items: center; gap: 5px; color: var(--accent) !important; font-weight: 600; }
.next-ride .ico { width: 15px; height: 15px; }

/* the stop sheet's "Something else?" */
.other-label { display: block; margin: 4px 0 6px; color: var(--muted); font-size: .8rem; font-weight: 600; }
.other-row { display: flex; gap: 8px; }
.other-row input { flex: 1; min-width: 0; margin: 0 !important; }
.other-row .btn { flex: none; }

/* ------------------------------------------------------------------ v54: public groups, Explore, requests, ride guests */
.page-tabs { margin-bottom: 18px; }
.badge.open-badge { background: #e8f1fb; border-color: #c6dcf3; color: #1f5a92; }
.vis-pick .choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.vis-pick .choices span { display: flex; flex-direction: column; height: 100%; }
.vis-pick small { color: var(--muted); font-weight: 500; font-size: .78rem; margin-top: 2px; }
.share-box { margin: 0 0 18px; }
.share-box label { display: block; margin-bottom: 6px; font-weight: 600; font-size: .92rem; }
.link-row { display: flex; gap: 8px; }
.link-row input { flex: 1; min-width: 0; margin: 0 !important; font-size: .9rem; color: var(--ink-2); background: var(--bg); }
.link-row .btn { flex: none; }

.requests h2 { font-size: 1.1rem; }
.req-card { margin: 0 0 10px; padding: 12px 14px; border: 1px solid #ecd58f; border-radius: var(--r); background: var(--signal-soft); }
.req-who { display: flex; align-items: center; gap: 10px; }
.req-who .grow { min-width: 0; }
.req-name { margin: 0; font-weight: 650; }
.req-name a { color: var(--ink); }
.req-who .sub { margin: 1px 0 0; color: var(--muted); font-size: .86rem; }
.req-note { margin: 10px 0 0; color: var(--ink-2); font-style: italic; }
.req-btns { display: flex; gap: 8px; margin-top: 10px; }

.keep-panel { border-color: #c6dcf3; background: #f4f9fe; }
.keep-panel h2 { font-size: 1.05rem; margin-bottom: 4px; }
.keep-list li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.keep-list .grow { min-width: 140px; }
.keep-btns { display: flex; gap: 6px; }

.open-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.open-row { display: grid; grid-auto-flow: column; grid-auto-columns: min(300px, 82%); gap: 12px; overflow-x: auto;
            margin: 0 calc(-1 * var(--gutter)); padding: 2px var(--gutter) 8px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.open-row::-webkit-scrollbar { display: none; }
.open-row .open-card { scroll-snap-align: start; }
.open-card { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-lg);
             background: var(--surface); color: var(--ink); text-decoration: none; box-shadow: var(--shadow); }
.open-card:hover { border-color: var(--line-2); color: var(--ink); }
.oc-top { display: flex; gap: 12px; align-items: center; }
.oc-top .grow { display: flex; flex-direction: column; min-width: 0; }
.oc-top .title { font-weight: 700; font-size: 1.02rem; line-height: 1.25; }
.oc-top .sub { color: var(--muted); font-size: .88rem; }
.oc-facts { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--ink-2); font-size: .85rem; }
.oc-facts span + span::before { content: "·"; margin-right: 12px; color: var(--line-2); }
.oc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.oc-by { display: inline-flex; align-items: center; gap: 7px; min-width: 0; color: var(--ink-2); font-size: .86rem; font-weight: 600;
         overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.oc-by .face { margin: 0; width: 24px; height: 24px; font-size: .7rem; flex: none; }

.pg-list > li > a { display: flex; align-items: center; gap: 12px; width: 100%; color: inherit; text-decoration: none; }
.pg-list > li > a .ico { flex: none; color: var(--muted); }
.pg-list .title { display: block; font-weight: 650; }
.pg-list .sub { display: block; color: var(--muted); font-size: .88rem; }
.my-requests .list > li > a { display: flex; align-items: center; gap: 10px; width: 100%; color: inherit; text-decoration: none; }
.my-requests .title { display: block; font-weight: 650; }
.my-requests .sub { display: block; color: var(--muted); font-size: .88rem; }
.pg-list .face { margin: 0; width: 38px; height: 38px; flex: none; }
.pg-list .grow { min-width: 0; }
.pg-about { display: block; margin-top: 2px; }
.pg-head h1 { margin: 8px 0 4px; }
.pg-stats { margin: 0 0 8px; color: var(--muted); }
.pg-faces { margin-bottom: 18px; }
.pg-faces .face { width: 34px; height: 34px; }
.pg-about-text { white-space: pre-line; color: var(--ink-2); }
.pg-creator { display: inline-flex; align-items: center; gap: 10px; margin: 6px 0 16px; color: var(--ink); text-decoration: none; }
.pg-creator > span:last-child { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.25; }
.pg-creator .crew-badge { margin-top: 2px; }
.pg-creator small { color: var(--muted); font-size: .76rem; }
.follow-box h2 { font-size: 1.05rem; margin-bottom: 4px; }
.follow-box .btn .ico { width: 18px; height: 18px; margin-right: 4px; }
.pg-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.pg-owner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 0 16px; }
.pg-report { margin: 10px 0 30px; color: var(--muted); }
.pg-report summary { cursor: pointer; font-size: .88rem; }
.join-box .form { margin-top: 8px; }
.join-box .panel-note { margin: 0 0 10px; }
.explore-signin { margin-top: 10px; }
.open-row { scroll-padding-inline: var(--gutter); }
.gride-head .meta > * + *::before, .oride .meta > * + *::before { content: none !important; display: none !important; }
.badge.open-badge::before { content: none !important; }
.vis-pick .choices span { border-radius: 12px; padding: 12px 14px; align-items: flex-start; text-align: left; line-height: 1.3; }
.vis-pick .choices input:checked + span small { color: rgba(255, 255, 255, .78); }
#public-box label > small.hint { display: block; margin: 6px 0 0; }
.readonly-field { background: var(--bg) !important; color: var(--ink-2); }

/* v56: the group's Settings gear, at the right of its name */
.rg-title h1 { flex: 1; min-width: 0; }
.rg-gear { flex: none; color: var(--muted); }
.rg-gear .ico { width: 22px; height: 22px; }
.rg-gear:hover, .rg-gear[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }

/* v58: Ask to join on each open ride of a public group, and the "asking" count on a group's faces */
.pg-ride { display: flex; flex-direction: column; gap: 8px; }
.pg-ride-ask, .pg-ride-state { align-self: flex-end; }
#join-group { margin-top: 4px; }
.rg-faces .count { margin-left: 2px; }

/* v59: share the rider card / places map as a picture */
.share-map-btn { margin-left: auto; }
.share-img-h { margin: 4px 0 10px; font-size: 1.15rem; }
.share-img-box { position: relative; display: flex; align-items: center; justify-content: center; min-height: 240px;
                 border-radius: 14px; background: var(--bg); overflow: hidden; }
.share-img-box img { display: block; width: 100%; max-height: 58vh; object-fit: contain; }
.share-img-box img[hidden] { display: none; }
.share-img-wait { margin: 0; color: var(--muted); }
.share-img-status { margin: 10px 0 0; min-height: 1em; }
.share-img-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.share-img-btns .btn[hidden] { display: none; }
.share-img-btns .btn:not(.ghost) { flex: 1; justify-content: center; }

/* ------------------------------------------------------------------ v60: road intel and road updates on a ride */
.intel, .updates { max-width: var(--measure); margin: 32px auto 0; }
.intel .section-head h2, .updates h2 { margin: 0; }
.intel-sub { margin: 6px 0 12px; }
.intel-groups { display: grid; gap: 8px; }
.intel-group { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.intel-group summary { display: flex; align-items: center; gap: 8px; padding: 12px 14px; cursor: pointer; font-weight: 650; list-style: none; }
.intel-group summary::-webkit-details-marker { display: none; }
.intel-group summary .muted { margin-left: auto; font-weight: 500; }
.intel-emoji { font-size: 1.15rem; }
.intel-group ul { margin: 0; padding: 0 14px 6px; list-style: none; }
.intel-group li { padding: 10px 0; border-top: 1px solid var(--line); }
.intel-name { font-weight: 650; color: var(--ink); text-align: left; }
.intel-price { margin-left: 8px; color: var(--ok); font-weight: 650; font-size: .92rem; }
.intel-stars { margin-left: 8px; color: #c99a3c; letter-spacing: 1px; font-size: .9rem; }
.intel-note { margin: 4px 0 0; color: var(--ink-2); font-size: .92rem; }
.intel-by { margin: 4px 0 0; font-size: .8rem; }
.intel-add { margin-top: 12px; }
.intel-add summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.pin-kinds .choices span { font-size: .9rem; }
.pin-where-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.pin-where-btns[hidden], .pin-price[hidden], .pin-rating[hidden] { display: none; }
.pin-where-state { color: var(--ok); }
.pin-sheet .sheet-head { display: flex; align-items: center; justify-content: space-between; }
.pin-sheet .sheet-head h2 { margin: 0; font-size: 1.15rem; }
.pin-pick-hint { margin: 0 0 8px; padding: 8px 12px; border-radius: 10px; background: var(--signal-soft); color: #7a5600; font-weight: 600; text-align: center; }
.intel-pin { display: flex; align-items: center; justify-content: center; }
.intel-pin span { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%;
                  background: #fff; border: 2px solid var(--accent); box-shadow: 0 2px 6px rgba(0,0,0,.25); font-size: 15px; line-height: 1; }
.intel-pin.intel-bad span { border-color: var(--danger); }
.intel-pin.intel-ev span { border-color: #1f8f9a; }
.update { padding: 12px 0; border-top: 1px solid var(--line); }
.update:first-of-type { border-top: 0; }
.update-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; font-size: .9rem; }
.update-body { margin: 4px 0 0; }
.update.is-old .update-body { color: var(--muted); }
.update-form { margin-top: 12px; }
.update-form textarea { margin-top: 0; }
.update-row { align-items: flex-end; }
.update-row .btn { flex: none; }

/* ---------- v61: Spam folder */
.spam-note { margin-bottom: 16px; display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; }
.spam-note p { margin: 0; flex: 1 1 260px; color: var(--muted); }
.spam-why { margin: 4px 0 8px; font-size: .85rem; color: var(--danger, #b42318); }
