/* =========================================================
   JOINTRIP — style.css
   Layout concept: an app shell (sticky top bar, phone tab bar) around
   content built from one object: the seat. Seats fill as people join.
   ========================================================= */
:root {
  /* colour: clean white, warm sunset orange for actions, peach for taken seats, ink for money panels */
  --bg: #ffffff; --surface: #ffffff; --surface-2: #f7f7f7; --line: #e9e6e3; --fg: #1f1f1f; --fg-2: #5b5753; --muted: #8b8682;
  --brand: #f0532d; --brand-hover: #db4320; --brand-text: #d4421d; --on-brand: #ffffff;
  --saffron: #f0532d; --saffron-soft: #fff1eb; --saffron-ink: #ffffff;
  --coral: #d93636; --coral-soft: #fdecec; --ok: #12845a; --ok-soft: #e6f4ed;
  --hero: #1f1f1f; --hero-2: #2b2b2b; --on-hero: #ffffff; --on-hero-2: #b9b4b0;
  --warm: #fff6f1; --warm-2: #ffe7dc;
  --taken-bg: #ffe8de; --taken-line: #ffcdb9; --taken-fg: #b93f1c; --taken-strong: #ffb39a;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 10px 28px -14px rgba(0,0,0,.18);
  --shadow-lg: 0 24px 60px -24px rgba(60,30,20,.28);
  /* type */
  --f-display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --f-body: 'Instrument Sans', 'Segoe UI', system-ui, sans-serif;
  --r: 20px; --r-sm: 12px; --r-xs: 8px;
  --hd: 68px;
  --gut: max(16px, env(safe-area-inset-left, 0px));
  --gut-r: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: light;
}
:root[data-mode="dark"] {
    --bg: #121212; --surface: #1b1b1b; --surface-2: #242424; --line: #313131; --fg: #f3f1ef; --fg-2: #bfbab6; --muted: #8e8a86;
    --brand: #ff6743; --brand-hover: #ff7d5e; --brand-text: #ff8b6c; --on-brand: #ffffff;
    --saffron: #ff6743; --saffron-soft: #35211a; --saffron-ink: #ffffff;
    --coral: #ff6b6b; --coral-soft: #3a1d1d; --ok: #4cc38a; --ok-soft: #15301f;
    --hero: #0c0c0c; --hero-2: #181818; --on-hero: #ffffff; --on-hero-2: #a9a5a1;
    --warm: #1a1512; --warm-2: #2b1e17;
    --taken-bg: #3a251c; --taken-line: #5c3828; --taken-fg: #ffb49c; --taken-strong: #8f4c35;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 14px 30px -16px rgba(0,0,0,.6); --shadow-lg: 0 30px 60px -30px rgba(0,0,0,.8);
    color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 1rem/1.6 var(--f-body); overflow-x: hidden; }
body::before { content: ''; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--surface); }
[hidden] { display: none !important; }

/* Page-to-page navigation: the content cross-fades while the header and tab bar stay put
   (browsers without view transitions just change page as before). */
@view-transition { navigation: auto; }
.app-header { view-transition-name: app-header; }
.tabbar { view-transition-name: tabbar; }
.sidebar { view-transition-name: sidebar; } /* computers: the sidebar stays still while the page changes */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .16s; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 700; line-height: 1.05; margin: 0; letter-spacing: -.02em; text-wrap: balance; }
p { margin: 0; }
.ic { width: 1.15em; height: 1.15em; flex: none; }
:focus-visible { outline: 2.5px solid var(--saffron); outline-offset: 2px; border-radius: 6px; }
.wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-left: var(--gut); padding-right: var(--gut-r); }
.num { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--brand-text); }
.muted { color: var(--muted); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 999px; border: 1.5px solid transparent; font-weight: 600; font-size: .95rem; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .2s, border-color .2s, transform .15s, color .2s; }
.btn:active { transform: scale(.98); }
.btn-brand { background: var(--brand); color: var(--on-brand); }
.btn-brand:hover { background: var(--brand-hover); }
.btn-sun { background: var(--saffron); color: var(--saffron-ink); }
.btn-sun:hover { filter: brightness(1.05); }
.btn-ghost { border-color: var(--line); background: var(--surface); }
.btn-ghost:hover { border-color: var(--fg-2); }
.btn-light { background: var(--surface); color: var(--fg); border-color: var(--line); }
.btn-light:hover { border-color: var(--fg); }
.btn-lg { min-height: 54px; padding: 0 26px; font-size: 1rem; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: .85rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; }
.icon-btn:hover { border-color: var(--fg-2); }
.link { color: var(--brand-text); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
/* text-style buttons look like links, not like the browser's grey button */
button.link { background: none; border: 0; padding: 0; margin: 0; font: inherit; font-weight: 600; cursor: pointer; border-radius: 6px; }
button.link:focus-visible { outline: 2px solid var(--brand-text); outline-offset: 3px; }
.link.a-danger { color: var(--coral, #d4421d); }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- header ---------- */
.app-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.hd { display: flex; align-items: center; gap: 28px; height: var(--hd); max-width: 1240px; margin-inline: auto; padding-left: var(--gut); padding-right: var(--gut-r); }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--f-display); font-weight: 800; font-size: 1.4rem; letter-spacing: -.03em; }
.logo-mark { width: 34px; height: 34px; }
.hd-nav { display: flex; gap: 4px; margin-right: auto; }
.hd-nav a { text-decoration: none; padding: 8px 14px; border-radius: 999px; font-weight: 500; color: var(--fg-2); font-size: .95rem; }
.hd-nav a:hover { background: var(--surface-2); color: var(--fg); }
.hd-nav a[aria-current] { background: var(--surface-2); color: var(--fg); font-weight: 600; }
.hd-right { display: flex; align-items: center; gap: 10px; }
.hd-me { display: block; text-decoration: none; }
/* phone-only parts (shown by app.css, which loads only on phones) */
.hd-back, .hd-title, .ac-more, .m-only, .sidebar { display: none; }

/* ---------- avatars ---------- */
.av { --h: 140; position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; flex: none; background: hsl(var(--h) 45% 82%); color: hsl(var(--h) 55% 22%); font-weight: 700; font-size: .85rem; border: 2px solid var(--surface); }
.av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.av i { font-style: normal; }
.av.xs { width: 28px; height: 28px; font-size: .68rem; }
.av.sm { width: 36px; height: 36px; font-size: .78rem; }
.av.md { width: 48px; height: 48px; font-size: 1rem; }
.av.lg { width: 64px; height: 64px; font-size: 1.2rem; }
.av.xl { width: 112px; height: 112px; font-size: 2rem; border-width: 4px; }
.av.more { background: var(--surface-2); color: var(--fg-2); }
:root[data-mode="dark"] .av:not(.more) { background: hsl(var(--h) 30% 30%); color: hsl(var(--h) 60% 88%); }

/* ---------- image slots + placeholders ---------- */
.slot { position: relative; display: block; overflow: hidden; background: var(--surface-2); isolation: isolate; }
.slot > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s, transform .7s; z-index: 0; }
.slot.loaded > img { opacity: 1; }
.slot.ph { background:
  radial-gradient(110% 90% at 90% 0%, color-mix(in srgb, var(--brand) 22%, transparent), transparent 60%),
  repeating-radial-gradient(circle at 15% 115%, transparent 0 18px, color-mix(in srgb, var(--brand) 9%, transparent) 18px 19px),
  linear-gradient(150deg, var(--warm), var(--warm-2)); }
.ph-label { position: absolute; left: 14px; bottom: 12px; z-index: 1; display: inline-flex; align-items: center; gap: 8px; color: var(--fg); font-family: var(--f-display); font-size: 1.05rem; }
.ph-label .ic { width: 20px; height: 20px; color: var(--brand-text); }

/* ---------- section scaffolding ---------- */
.section { padding-block: clamp(56px, 8vw, 96px); }
.section.tight { padding-block: 32px 56px; }
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.sec-head h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); margin-top: 8px; }
.sec-head p { color: var(--fg-2); max-width: 58ch; margin-top: 10px; }
.band { background: var(--warm); color: var(--fg); }
.trip-hero .eyebrow { color: #ffd2c2; }
.band .sec-head p { color: var(--fg-2); }

/* ---------- home hero ---------- */
.hero { background: linear-gradient(180deg, var(--warm) 0%, var(--bg) 100%); color: var(--fg); position: relative; overflow-x: clip; z-index: 5; }
.hero::after { content: ''; position: absolute; inset: -30% -10% auto 45%; height: 110%; background: radial-gradient(closest-side, color-mix(in srgb, var(--brand) 14%, transparent), transparent); pointer-events: none; }
.hero-in { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 5vw, 64px); align-items: center; padding-block: clamp(48px, 7vw, 88px) clamp(56px, 7vw, 96px); }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); font-weight: 800; letter-spacing: -.035em; }
.hero h1 .seat-word { display: inline-flex; align-items: center; gap: .12em; }
.hero h1 .seat-chip { display: inline-block; width: .62em; height: .62em; border-radius: .16em; background: var(--brand); vertical-align: .05em; }
.hero h1 em { font-style: normal; color: var(--brand-text); }
.hero-lead { font-size: 1.15rem; color: var(--fg-2); max-width: 46ch; margin: 20px 0 28px; }
.search { display: grid; grid-template-columns: 1fr 1fr 1fr .8fr auto; gap: 6px; background: var(--surface); color: var(--fg); border-radius: 22px; padding: 6px; box-shadow: var(--shadow-lg); max-width: 640px; }
.search label { display: grid; gap: 0; padding: 8px 14px; border-radius: 16px; cursor: text; min-width: 0; }
.search label:hover { background: var(--surface-2); }
.search label > span:first-child { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.search .dd-val { font-size: 1rem; }
.search input, .search select { border: 0; background: none; padding: 0; font-weight: 600; outline: none; width: 100%; min-width: 0; }
.search .btn { min-height: 100%; border-radius: 16px; padding: 0 22px; }
.hero-proof { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 26px; color: var(--fg-2); font-size: .9rem; }
.hero-proof span { display: inline-flex; gap: 8px; align-items: center; }
.hero-proof .ic { color: var(--brand-text); }

/* live seat board in the hero */
.board { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 22px; box-shadow: var(--shadow-lg); }
.board-top { display: flex; justify-content: space-between; align-items: start; gap: 12px; margin-bottom: 18px; }
.board-top h3 { font-size: 1.25rem; }
.board-top p { color: var(--fg-2); font-size: .88rem; margin-top: 4px; }
.board-price { text-align: right; }
.board-price b { font-family: var(--f-display); font-size: 1.5rem; color: var(--fg); display: block; line-height: 1; }
.board-price small { color: var(--muted); font-size: .78rem; }
.board-feed { display: grid; gap: 8px; margin-top: 16px; min-height: 92px; }
.feed-item { display: flex; align-items: center; gap: 10px; font-size: .88rem; color: var(--fg-2); animation: feedIn .5s ease both; }
.feed-item b { color: var(--fg); font-weight: 600; }
.feed-item .av { border-color: var(--surface); }
@keyframes feedIn { from { opacity: 0; transform: translateY(6px); } }

/* ---------- category rail ---------- */
.rail { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.cat { display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 16px; background: var(--surface); border: 1.5px solid var(--line); text-decoration: none; font-weight: 600; white-space: nowrap; cursor: pointer; }
.cat .ic { color: var(--brand-text); width: 20px; height: 20px; }
.cat:hover { border-color: var(--brand-text); }
.cat.on { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.cat.on .ic { color: var(--on-brand); }

/* ---------- trip cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.tcard { position: relative; display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r); border: 1px solid var(--line); overflow: hidden; transition: box-shadow .25s, transform .25s; }
.tcard:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.tc-media { aspect-ratio: 16 / 10; max-width: 100%; }
.tcard:hover .tc-media > img { transform: scale(1.04); }
.tc-cat, .tc-flag { position: absolute; z-index: 2; top: 12px; left: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; background: rgba(255, 255, 255, .94); color: #1f1f1f; font-size: .75rem; font-weight: 700; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.tc-cat .ic { color: #d4421d; }
.tc-flag { top: auto; bottom: 12px; background: var(--saffron); color: var(--saffron-ink); }
.tc-save { position: absolute; z-index: 3; top: 10px; right: 10px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); color: #1b2a22; display: grid; place-items: center; cursor: pointer; }
.tc-save.on { color: var(--coral); }
.tc-save.on .ic { fill: currentColor; }
.tc-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.tc-route { display: flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tc-route .ic { width: 14px; height: 14px; }
.tcard h3 { font-size: 1.25rem; letter-spacing: -.02em; }
.tcard h3 a { text-decoration: none; }
.tcard h3 a:hover { color: var(--brand-text); }
.tc-when { display: flex; align-items: center; gap: 6px; font-size: .88rem; color: var(--fg-2); }
.tc-when .ic { color: var(--muted); }
.tc-fill { font-size: .82rem; }
.tc-foot { display: flex; justify-content: space-between; align-items: end; margin-top: auto; padding-top: 6px; }
.tc-people { display: flex; }
.tc-people .av + .av { margin-left: -8px; }
.tc-price { text-align: right; }
.tc-price b { font-family: var(--f-display); font-size: 1.35rem; display: block; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tc-price small { color: var(--muted); font-size: .75rem; }

/* seat strip: one square per seat */
.strip { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 2px; }
.strip i { width: 13px; height: 13px; border-radius: 4px; border: 1.5px solid var(--line); background: var(--surface-2); }
.strip i.on { background: var(--taken-strong); border-color: var(--taken-strong); }
.strip i.you { background: var(--brand); border-color: var(--brand); }
.fill { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.fill .ic { width: 14px; height: 14px; }
.fill.ok { color: var(--ok); }
.fill.need { color: var(--brand-text); }
.fill.low { color: var(--coral); }
.fill.full { color: var(--muted); }

/* ---------- seat map ---------- */
.seatmap { --seat-bg: var(--surface); --seat-line: var(--line); --seat-fg: var(--fg); display: flex; justify-content: center; }
.sm-body { display: grid; gap: 10px; padding: 18px 16px 22px; border-radius: 34px 34px 18px 18px; border: 2px solid var(--seat-line); min-width: 0; }
.sm-row { display: grid; grid-template-columns: repeat(var(--cols), 46px); gap: 8px; justify-content: center; }
.sm-cell { height: 46px; border-radius: 12px 12px 8px 8px; display: grid; place-items: center; font-size: .8rem; }
.sm-aisle { background: none; }
.sm-driver { border: 1.5px dashed var(--seat-line); color: var(--seat-fg); opacity: .6; }
.sm-door { font-size: .66rem; color: var(--seat-fg); opacity: .5; text-transform: uppercase; letter-spacing: .08em; }
.sm-seat { position: relative; border: 1.5px solid var(--seat-line); background: var(--seat-bg); color: var(--seat-fg); align-content: center; gap: 0; line-height: 1.1; padding: 0; }
.sm-seat b { font-weight: 700; font-size: .9rem; }
.sm-seat small { font-size: .6rem; opacity: .7; text-transform: uppercase; letter-spacing: .04em; }
button.sm-seat { cursor: pointer; transition: transform .12s, background .15s, border-color .15s; }
button.sm-seat:hover { border-color: var(--brand-text); transform: translateY(-1px); }
.sm-seat.prem { border-style: dashed; border-color: var(--saffron); }
.sm-seat.taken { background: var(--taken-bg); border-color: var(--taken-line); color: var(--taken-fg); }
.sm-seat.taken small { opacity: .75; }
.sm-seat.blocked { background: repeating-linear-gradient(45deg, var(--surface-2) 0 6px, transparent 6px 12px); border-color: var(--seat-line); color: var(--muted); }
.sm-seat.sel, .sm-seat.you { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: .8rem; color: var(--fg-2); justify-content: center; margin-top: 14px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 14px; border-radius: 4px; border: 1.5px solid var(--line); background: var(--surface); }
.legend i.t { background: var(--taken-bg); border-color: var(--taken-line); }
.legend i.s { background: var(--brand); border-color: var(--brand); }
.legend i.p { border-style: dashed; border-color: var(--saffron); }

/* ---------- home: how it works, for owners, community ---------- */
.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.how-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 26px; display: grid; gap: 12px; align-content: start; }
.how-card .step { font-family: var(--f-display); font-size: .85rem; font-weight: 700; color: var(--brand-text); display: inline-flex; align-items: center; gap: 8px; }
.how-card .step i { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: var(--saffron); color: var(--saffron-ink); font-style: normal; }
.how-card h3 { font-size: 1.35rem; }
.how-card p { color: var(--fg-2); }
.owner { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.owner-media { border-radius: 28px; aspect-ratio: 5 / 4; max-width: 100%; }
.owner h2 { font-size: clamp(2rem, 4vw, 3rem); margin: 10px 0 16px; }
.owner p { color: var(--fg-2); max-width: 50ch; }
.owner-math { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; margin: 26px 0; }
.owner-math div { background: var(--surface); padding: 16px; }
.owner-math small { color: var(--fg-2); font-size: .78rem; display: block; }
.owner-math b { font-family: var(--f-display); font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.owner-math .hi b { color: var(--brand-text); }
.community { display: grid; grid-template-columns: 1.1fr 1fr; gap: 22px; }
.comm-photo { border-radius: var(--r); min-height: 340px; }
.comm-list { display: grid; gap: 14px; }
.comm-item { display: flex; gap: 16px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.comm-item .ic-wrap { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--saffron-soft); color: var(--brand-text); flex: none; }
:root[data-mode="dark"] .comm-item .ic-wrap { color: var(--saffron); }
.comm-item h3 { font-size: 1.1rem; margin-bottom: 4px; }
.comm-item p { color: var(--fg-2); font-size: .94rem; }

/* ---------- explore ---------- */
.ex-head { background: var(--surface); border-bottom: 1px solid var(--line); padding-block: 26px 18px; }
.ex-head h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.ex-head .search { margin-top: 18px; max-width: none; box-shadow: none; border: 1.5px solid var(--line); }
.ex-layout { display: grid; grid-template-columns: 260px 1fr; gap: 28px; align-items: start; }
.filters { position: sticky; top: calc(var(--hd) + 20px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; display: grid; gap: 20px; }
.filters h3 { font-size: .78rem; font-family: var(--f-body); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 10px; }
.chk { display: flex; align-items: center; gap: 10px; padding: 6px 0; cursor: pointer; font-size: .94rem; }
.chk input { width: 18px; height: 18px; accent-color: var(--brand); }
.range { width: 100%; accent-color: var(--brand); }
.range-val { display: flex; justify-content: space-between; font-size: .85rem; color: var(--fg-2); margin-top: 4px; font-variant-numeric: tabular-nums; }
.ex-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.ex-bar p { color: var(--fg-2); }
.select { border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px; padding: 9px 14px; font-weight: 600; font-size: .9rem; }
.filter-btn { display: none; }
.empty { text-align: center; padding: 56px 20px; background: var(--surface); border: 1.5px dashed var(--line); border-radius: var(--r); }
.empty h3 { font-size: 1.4rem; margin-bottom: 8px; }
.empty p { color: var(--fg-2); margin-bottom: 18px; }

/* ---------- trip detail ---------- */
.trip-hero { position: relative; }
.trip-cover { height: clamp(260px, 42vw, 460px); }
.trip-cover::after { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(0deg, rgba(6,18,12,.85), rgba(6,18,12,.1) 60%); }
.trip-hero-in { position: absolute; inset: auto 0 0 0; z-index: 2; color: #f4f7f1; padding-bottom: 28px; }
.crumbs { display: flex; gap: 8px; flex-wrap: wrap; font-size: .84rem; opacity: .85; margin-bottom: 12px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.trip-hero h1 { font-size: clamp(2rem, 5vw, 3.6rem); max-width: 22ch; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; font-size: .85rem; font-weight: 600; background: var(--surface-2); color: var(--fg); border: 0; }
.trip-hero .chip { background: rgba(255,255,255,.14); color: #fff; backdrop-filter: blur(6px); }
.chip .ic { width: 15px; height: 15px; }
.trip-layout { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 40px; align-items: start; }
.trip-main { display: grid; gap: 40px; min-width: 0; }
.trip-main h2 { font-size: 1.6rem; margin-bottom: 16px; }
.lead { font-size: 1.15rem; color: var(--fg-2); max-width: 62ch; }
.vibes { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.stops { list-style: none; margin: 0; padding: 0; display: grid; }
.stops li { display: grid; grid-template-columns: 110px 22px 1fr; gap: 14px; position: relative; padding-bottom: 22px; }
.stops li::before { content: ''; position: absolute; left: 134px; top: 18px; bottom: -2px; width: 2px; background: var(--line); }
.stops li:last-child::before { display: none; }
.stops time { font-size: .82rem; color: var(--muted); font-weight: 600; padding-top: 2px; font-variant-numeric: tabular-nums; }
.stops .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 3px solid var(--brand-text); margin-top: 5px; position: relative; z-index: 1; justify-self: center; }
.stops li:first-child .dot, .stops li:last-child .dot { background: var(--saffron); border-color: var(--saffron); }
.stops h3 { font-size: 1.05rem; font-family: var(--f-body); font-weight: 700; letter-spacing: 0; }
.stops p { color: var(--fg-2); font-size: .92rem; }
.goers { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.goer { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); min-width: 0; }
.goer b { display: block; font-size: .92rem; }
.goer small { color: var(--muted); font-size: .78rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.goer.match { border-color: var(--saffron); background: var(--saffron-soft); }
.match-note { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--saffron-soft); color: var(--fg); font-size: .92rem; margin-bottom: 14px; }
.match-note .ic { color: var(--coral); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.list-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 22px; }
.list-card h3 { font-size: 1.1rem; margin-bottom: 10px; }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ticks li { display: flex; gap: 10px; align-items: start; color: var(--fg-2); font-size: .94rem; }
.ticks .ic { margin-top: 3px; color: var(--ok); }
.ticks.no .ic { color: var(--muted); }
.host-card { display: grid; grid-template-columns: auto 1fr; gap: 18px; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.host-card h3 { font-size: 1.3rem; }
.host-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--fg-2); font-size: .88rem; margin: 6px 0 10px; }
.host-meta span { display: inline-flex; gap: 6px; align-items: center; }
.host-meta .ic { width: 15px; height: 15px; }
.star { color: var(--saffron); fill: var(--saffron); }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.badge { display: inline-flex; gap: 5px; align-items: center; padding: 4px 9px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); font-size: .76rem; font-weight: 700; }
.badge .ic { width: 13px; height: 13px; }
.vehicle-row { display: flex; gap: 16px; align-items: center; padding: 14px; border-radius: 16px; background: var(--surface-2); margin-top: 16px; }
.vehicle-row .slot { width: 110px; height: 72px; border-radius: 12px; flex: none; }
.vehicle-row b { display: block; }
.vehicle-row small { color: var(--fg-2); }

/* booking panel */
.book { position: sticky; top: calc(var(--hd) + 20px); background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 22px; box-shadow: var(--shadow); display: grid; gap: 16px; }
.book-top { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.book-top b { font-family: var(--f-display); font-size: 2rem; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.book-top small { color: var(--muted); display: block; margin-top: 4px; }
.book-sum { display: grid; gap: 8px; padding-top: 14px; border-top: 1px dashed var(--line); font-size: .92rem; }
.book-sum div { display: flex; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; }
.book-sum .tot { font-weight: 700; font-size: 1.05rem; }
.book-note { display: flex; gap: 8px; font-size: .82rem; color: var(--fg-2); }
.book-note .ic { color: var(--ok); margin-top: 2px; }
.anchor { font-size: .82rem; color: var(--fg-2); background: var(--surface-2); border-radius: 12px; padding: 10px 12px; }
.anchor b { color: var(--fg); }
.mbar { display: none; }

/* ---------- forms ---------- */
.field { display: grid; gap: 6px; min-width: 0; align-content: start; } /* side-by-side fields keep the same input height */
.field > span { font-weight: 600; font-size: .88rem; }
.field > span i { font-style: normal; font-weight: 400; color: var(--muted); }
.input, .field input:not([type=checkbox]):not([type=radio]):not([type=range]), .field select, .field textarea { width: 100%; min-width: 0; padding: 12px 14px; border-radius: var(--r-sm); border: 1.5px solid var(--line); background: var(--surface); font-size: .96rem; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand-text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-text) 20%, transparent); }
.field small { color: var(--muted); font-size: .8rem; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; }
.card h2 { font-size: 1.35rem; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.card h2 .n { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: var(--brand); color: var(--on-brand); font-size: .9rem; }
.opts { display: grid; gap: 10px; }
.opt { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; background: var(--surface); }
.opt input { accent-color: var(--brand); width: 18px; height: 18px; }
.opt:has(input:checked) { border-color: var(--brand-text); background: color-mix(in srgb, var(--brand-text) 6%, var(--surface)); }
.opt b { display: block; font-size: .95rem; }
.opt small { color: var(--muted); font-size: .82rem; }
.opt > [data-ic] { margin-left: auto; color: var(--muted); display: grid; }
.opt .ic { width: 22px; height: 22px; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.toggle:last-child { border-bottom: 0; }
.toggle b { display: block; font-size: .95rem; }
.toggle small { color: var(--muted); font-size: .84rem; }
.switch { appearance: none; width: 46px; height: 28px; border-radius: 999px; background: var(--line); position: relative; cursor: pointer; flex: none; transition: background .2s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch:checked { background: var(--brand); }
.switch:checked::after { transform: translateX(18px); }

/* ---------- checkout ---------- */
.co-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 32px; align-items: start; }
.co-main { display: grid; gap: 20px; min-width: 0; }
.hold { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 16px; background: var(--saffron-soft); font-size: .94rem; }
.hold b { font-variant-numeric: tabular-nums; font-family: var(--f-display); font-size: 1.15rem; }
.hold .ic { color: var(--coral); }
.pass-row { display: grid; grid-template-columns: auto 1fr 1fr; gap: 12px; align-items: end; padding: 14px 0; border-bottom: 1px solid var(--line); }
.pass-row:last-child { border-bottom: 0; }
.seat-tag { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px 12px 8px 8px; background: var(--brand); color: var(--on-brand); font-weight: 700; }
.summary { position: sticky; top: calc(var(--hd) + 20px); display: grid; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; }
.summary .slot { aspect-ratio: 16 / 8; max-width: 100%; }
.sum-body { padding: 20px 22px; display: grid; gap: 14px; }
.sum-body h3 { font-size: 1.25rem; }
.lines { display: grid; gap: 8px; font-size: .92rem; }
.lines div { display: flex; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; }
.lines .tot { padding-top: 10px; border-top: 1px solid var(--line); font-weight: 700; font-size: 1.1rem; }

/* ---------- ticket ---------- */
.ticket-wrap { max-width: 760px; margin-inline: auto; }
.confirm-top { text-align: center; margin-bottom: 26px; }
.confirm-top .ok-ring { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); margin: 0 auto 16px; }
.confirm-top .ok-ring .ic { width: 34px; height: 34px; }
.confirm-top h1 { font-size: clamp(2rem, 5vw, 3rem); }
.confirm-top p { color: var(--fg-2); margin: 10px auto 0; max-width: 430px; } /* clear of the backpack picture */
.ticket { display: grid; grid-template-columns: 1fr 220px; background: var(--surface); border-radius: 26px; box-shadow: var(--shadow); border: 1px solid var(--line); overflow: hidden; }
.tk-main { padding: 26px; display: grid; gap: 18px; min-width: 0; }
.tk-route { display: flex; align-items: center; gap: 14px; }
.tk-route b { font-family: var(--f-display); font-size: clamp(1.6rem, 4vw, 2.2rem); letter-spacing: -.03em; }
.tk-route .ic { color: var(--saffron); width: 26px; height: 26px; }
.tk-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tk-grid small { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.tk-grid b { font-size: 1rem; }
.tk-side { position: relative; background: var(--hero); color: var(--on-hero); padding: 26px 22px; display: grid; gap: 12px; align-content: center; justify-items: center; text-align: center; border-left: 2px dashed var(--line); }
.tk-side::before, .tk-side::after { content: ''; position: absolute; left: -13px; width: 24px; height: 24px; border-radius: 50%; background: var(--bg); }
.tk-side::before { top: -12px; } .tk-side::after { bottom: -12px; }
.tk-side { min-width: 0; }
.tk-side canvas { width: 156px; height: 156px; max-width: 100%; box-sizing: border-box; background: #fff; border-radius: 14px; padding: 6px; image-rendering: pixelated; }
.tk-side small { color: var(--on-hero-2); font-size: .78rem; overflow-wrap: anywhere; }
.tk-side.void canvas { opacity: .25; }
.tk-pin { display: grid; gap: 2px; }
.tk-pin small { text-transform: uppercase; letter-spacing: .14em; font-weight: 700; font-size: .68rem; }
.tk-pin b { font-family: var(--f-display); font-size: 2rem; letter-spacing: .32em; padding-left: .32em; line-height: 1.1; }
.tk-grid b { overflow-wrap: anywhere; }
/* long place names ("Monaragala Bus Stand → Ella Rock") wrap as whole lines, not one word per line */
.ticket .tk-route { flex-wrap: wrap; gap: 4px 12px; }
.ticket .tk-route b { font-size: clamp(1.4rem, 3.2vw, 1.9rem); line-height: 1.15; text-wrap: balance; }
.tk-ref b { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .86rem; font-weight: 600; letter-spacing: .02em; word-break: break-all; }
/* checked in: the QR code is used up */
.tk-status { display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px; border-radius: 999px; background: var(--ok); color: #fff; font-weight: 700; font-size: .8rem; white-space: nowrap; }
.tk-status .ic { width: 16px; height: 16px; }
.tk-side.boarded canvas, .tk-side.boarded .tk-pin { opacity: .3; filter: grayscale(1); }
.tk-side.boarded .tk-pin b { text-decoration: line-through; }
/* used ticket: the stub is torn off along the perforation and hangs at a small angle to the right.
   The two pieces have matching ragged edges (one shape, generated once), the torn edge shows the
   paper's light core, and one shadow follows both torn shapes. */
.tk-main, .tk-side { transition: transform .8s cubic-bezier(.3, 1.35, .5, 1); }
.ticket.used { overflow: visible; background: none; border: 0; box-shadow: none; gap: 4px;
  filter: drop-shadow(0 1px 1px rgba(20, 16, 8, .14)) drop-shadow(0 12px 18px rgba(20, 16, 8, .13)); }
.ticket.used .tk-main { position: relative; background: var(--surface); border-radius: 26px 0 0 26px;
  clip-path: polygon(0% 0%, calc(100% - 5.9px) 0%, calc(100% - 7.0px) 2.94%, calc(100% - 5.6px) 5.88%, calc(100% - 6.4px) 8.82%, calc(100% - 8.1px) 11.76%, calc(100% - 10.1px) 14.71%, calc(100% - 4.5px) 17.65%, calc(100% - 3.0px) 20.59%, calc(100% - 6.7px) 23.53%, calc(100% - 8.1px) 26.47%, calc(100% - 8.3px) 29.41%, calc(100% - 7.7px) 32.35%, calc(100% - 6.9px) 35.29%, calc(100% - 10.1px) 38.24%, calc(100% - 7.2px) 41.18%, calc(100% - 4.6px) 44.12%, calc(100% - 8.3px) 47.06%, calc(100% - 7.2px) 50%, calc(100% - 8.7px) 52.94%, calc(100% - 8.3px) 55.88%, calc(100% - 9.0px) 58.82%, calc(100% - 4.9px) 61.76%, calc(100% - 7.1px) 64.71%, calc(100% - 4.4px) 67.65%, calc(100% - 8.9px) 70.59%, calc(100% - 8.4px) 73.53%, calc(100% - 4.8px) 76.47%, calc(100% - 10.0px) 79.41%, calc(100% - 3.8px) 82.35%, calc(100% - 9.6px) 85.29%, calc(100% - 9.6px) 88.24%, calc(100% - 4.7px) 91.18%, calc(100% - 5.6px) 94.12%, calc(100% - 9.3px) 97.06%, calc(100% - 9.0px) 100%, 0% 100%); }
.ticket.used .tk-main::after { content: ''; position: absolute; top: 0; bottom: 0; right: 0; width: 22px; pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(120, 100, 70, .16) 0 2px, rgba(120, 100, 70, .09) 2px 4px);
  clip-path: polygon(100% 0%, calc(100% - 7.2px) 0%, calc(100% - 8.6px) 2.94%, calc(100% - 7.6px) 5.88%, calc(100% - 9.1px) 8.82%, calc(100% - 10.5px) 11.76%, calc(100% - 12.5px) 14.71%, calc(100% - 7.2px) 17.65%, calc(100% - 5.4px) 20.59%, calc(100% - 9.6px) 23.53%, calc(100% - 9.7px) 26.47%, calc(100% - 9.5px) 29.41%, calc(100% - 9.2px) 32.35%, calc(100% - 9.3px) 35.29%, calc(100% - 11.6px) 38.24%, calc(100% - 8.9px) 41.18%, calc(100% - 5.6px) 44.12%, calc(100% - 10.6px) 47.06%, calc(100% - 8.4px) 50%, calc(100% - 10.4px) 52.94%, calc(100% - 10.3px) 55.88%, calc(100% - 11.9px) 58.82%, calc(100% - 7.1px) 61.76%, calc(100% - 9.1px) 64.71%, calc(100% - 6.2px) 67.65%, calc(100% - 11.1px) 70.59%, calc(100% - 10.2px) 73.53%, calc(100% - 5.9px) 76.47%, calc(100% - 11.8px) 79.41%, calc(100% - 5.1px) 82.35%, calc(100% - 11.5px) 85.29%, calc(100% - 12.5px) 88.24%, calc(100% - 7.5px) 91.18%, calc(100% - 7.1px) 94.12%, calc(100% - 10.1px) 97.06%, calc(100% - 11.5px) 100%, 100% 100%); }
.ticket.used .tk-side { border-left: 0; border-radius: 0 26px 26px 0; transform-origin: 0% 100%; transform: translate(14px, 6px) rotate(3.5deg);
  background-image: linear-gradient(100deg, rgba(255, 255, 255, .08) 0%, transparent 32%, transparent 72%, rgba(0, 0, 0, .2) 100%);
  clip-path: polygon(6.1px 0%, 5px 2.94%, 6.4px 5.88%, 5.6px 8.82%, 3.9px 11.76%, 1.9px 14.71%, 7.5px 17.65%, 9px 20.59%, 5.3px 23.53%, 3.9px 26.47%, 3.7px 29.41%, 4.3px 32.35%, 5.1px 35.29%, 1.9px 38.24%, 4.8px 41.18%, 7.4px 44.12%, 3.7px 47.06%, 4.8px 50%, 3.3px 52.94%, 3.7px 55.88%, 3px 58.82%, 7.1px 61.76%, 4.9px 64.71%, 7.6px 67.65%, 3.1px 70.59%, 3.6px 73.53%, 7.2px 76.47%, 2px 79.41%, 8.2px 82.35%, 2.4px 85.29%, 2.4px 88.24%, 7.3px 91.18%, 6.4px 94.12%, 2.7px 97.06%, 3px 100%, 100% 100%, 100% 0%); }
.ticket.used .tk-side::before { display: none; }
.ticket.used .tk-side::after { content: ''; left: 0; top: 0; bottom: 0; width: 26px; height: auto; border-radius: 0; pointer-events: none;
  background: repeating-linear-gradient(180deg, #f3ede1 0 2px, #e2d9c6 2px 3px, #f7f2e8 3px 5px);
  clip-path: polygon(0px 0%, 8.0px 0%, 7.3px 2.94%, 9.3px 5.88%, 9.4px 8.82%, 7.4px 11.76%, 5.3px 14.71%, 11.3px 17.65%, 12.4px 20.59%, 9.4px 23.53%, 6.2px 26.47%, 5.4px 29.41%, 6.4px 32.35%, 8.6px 35.29%, 4.0px 38.24%, 7.3px 41.18%, 8.8px 44.12%, 7.0px 47.06%, 6.5px 50%, 5.7px 52.94%, 6.6px 55.88%, 7.1px 58.82%, 10.3px 61.76%, 7.7px 64.71%, 10.1px 67.65%, 6.2px 70.59%, 6.1px 73.53%, 8.8px 76.47%, 4.5px 79.41%, 10.1px 82.35%, 5.1px 85.29%, 6.5px 88.24%, 11.3px 91.18%, 8.5px 94.12%, 3.9px 97.06%, 6.6px 100%, 0px 100%); }
.ticket-wrap:has(.ticket.used) { padding-right: 28px; } /* room for the tilted stub */
@media (max-width: 880px) {
  /* one column: the stub is below, torn along its top */
  .ticket.used .tk-main { border-radius: 26px 26px 0 0; clip-path: polygon(0% 0%, 100% 0%, 100% calc(100% - 9.0px), 97.06% calc(100% - 9.3px), 94.12% calc(100% - 5.6px), 91.18% calc(100% - 4.7px), 88.24% calc(100% - 9.6px), 85.29% calc(100% - 9.6px), 82.35% calc(100% - 3.8px), 79.41% calc(100% - 10.0px), 76.47% calc(100% - 4.8px), 73.53% calc(100% - 8.4px), 70.59% calc(100% - 8.9px), 67.65% calc(100% - 4.4px), 64.71% calc(100% - 7.1px), 61.76% calc(100% - 4.9px), 58.82% calc(100% - 9.0px), 55.88% calc(100% - 8.3px), 52.94% calc(100% - 8.7px), 50% calc(100% - 7.2px), 47.06% calc(100% - 8.3px), 44.12% calc(100% - 4.6px), 41.18% calc(100% - 7.2px), 38.24% calc(100% - 10.1px), 35.29% calc(100% - 6.9px), 32.35% calc(100% - 7.7px), 29.41% calc(100% - 8.3px), 26.47% calc(100% - 8.1px), 23.53% calc(100% - 6.7px), 20.59% calc(100% - 3.0px), 17.65% calc(100% - 4.5px), 14.71% calc(100% - 10.1px), 11.76% calc(100% - 8.1px), 8.82% calc(100% - 6.4px), 5.88% calc(100% - 5.6px), 2.94% calc(100% - 7.0px), 0% calc(100% - 5.9px)); }
  .ticket.used .tk-main::after { top: auto; left: 0; right: 0; bottom: 0; width: auto; height: 22px;
    background: repeating-linear-gradient(90deg, rgba(120, 100, 70, .16) 0 2px, rgba(120, 100, 70, .09) 2px 4px); clip-path: polygon(0% 100%, 0% calc(100% - 7.2px), 2.94% calc(100% - 8.6px), 5.88% calc(100% - 7.6px), 8.82% calc(100% - 9.1px), 11.76% calc(100% - 10.5px), 14.71% calc(100% - 12.5px), 17.65% calc(100% - 7.2px), 20.59% calc(100% - 5.4px), 23.53% calc(100% - 9.6px), 26.47% calc(100% - 9.7px), 29.41% calc(100% - 9.5px), 32.35% calc(100% - 9.2px), 35.29% calc(100% - 9.3px), 38.24% calc(100% - 11.6px), 41.18% calc(100% - 8.9px), 44.12% calc(100% - 5.6px), 47.06% calc(100% - 10.6px), 50% calc(100% - 8.4px), 52.94% calc(100% - 10.4px), 55.88% calc(100% - 10.3px), 58.82% calc(100% - 11.9px), 61.76% calc(100% - 7.1px), 64.71% calc(100% - 9.1px), 67.65% calc(100% - 6.2px), 70.59% calc(100% - 11.1px), 73.53% calc(100% - 10.2px), 76.47% calc(100% - 5.9px), 79.41% calc(100% - 11.8px), 82.35% calc(100% - 5.1px), 85.29% calc(100% - 11.5px), 88.24% calc(100% - 12.5px), 91.18% calc(100% - 7.5px), 94.12% calc(100% - 7.1px), 97.06% calc(100% - 10.1px), 100% calc(100% - 11.5px), 100% 100%); }
  .ticket.used .tk-side { border-top: 0; border-radius: 0 0 26px 26px; transform-origin: 50% 0%; transform: translate(3px, 10px) rotate(1.8deg) scale(.96);
    background-image: linear-gradient(190deg, rgba(255, 255, 255, .08), transparent 35%); clip-path: polygon(0% 6.1px, 2.94% 5px, 5.88% 6.4px, 8.82% 5.6px, 11.76% 3.9px, 14.71% 1.9px, 17.65% 7.5px, 20.59% 9px, 23.53% 5.3px, 26.47% 3.9px, 29.41% 3.7px, 32.35% 4.3px, 35.29% 5.1px, 38.24% 1.9px, 41.18% 4.8px, 44.12% 7.4px, 47.06% 3.7px, 50% 4.8px, 52.94% 3.3px, 55.88% 3.7px, 58.82% 3px, 61.76% 7.1px, 64.71% 4.9px, 67.65% 7.6px, 70.59% 3.1px, 73.53% 3.6px, 76.47% 7.2px, 79.41% 2px, 82.35% 8.2px, 85.29% 2.4px, 88.24% 2.4px, 91.18% 7.3px, 94.12% 6.4px, 97.06% 2.7px, 100% 3px, 100% 100%, 0% 100%); }
  .ticket.used .tk-side::after { left: 0; right: 0; top: 0; bottom: auto; width: auto; height: 26px;
    background: repeating-linear-gradient(90deg, #f3ede1 0 2px, #e2d9c6 2px 3px, #f7f2e8 3px 5px); clip-path: polygon(0% 0px, 0% 8.0px, 2.94% 7.3px, 5.88% 9.3px, 8.82% 9.4px, 11.76% 7.4px, 14.71% 5.3px, 17.65% 11.3px, 20.59% 12.4px, 23.53% 9.4px, 26.47% 6.2px, 29.41% 5.4px, 32.35% 6.4px, 35.29% 8.6px, 38.24% 4.0px, 41.18% 7.3px, 44.12% 8.8px, 47.06% 7.0px, 50% 6.5px, 52.94% 5.7px, 55.88% 6.6px, 58.82% 7.1px, 61.76% 10.3px, 64.71% 7.7px, 67.65% 10.1px, 70.59% 6.2px, 73.53% 6.1px, 76.47% 8.8px, 79.41% 4.5px, 82.35% 10.1px, 85.29% 5.1px, 88.24% 6.5px, 91.18% 11.3px, 94.12% 8.5px, 97.06% 3.9px, 100% 6.6px, 100% 0px); }
  .ticket-wrap:has(.ticket.used) { padding-right: 0; }
  .ticket.used { margin-bottom: 26px; }
}
/* keep the PIN private / cancel */
.tk-care { display: flex; gap: 14px; align-items: flex-start; margin-top: 16px; padding: 18px 20px; border-radius: 20px; background: var(--saffron-soft); border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent); }
.tk-care > .ic { width: 24px; height: 24px; flex: none; color: var(--brand-text); margin-top: 2px; }
.tk-care b { display: block; font-size: 1rem; }
.tk-care p { margin: 4px 0 0; color: var(--fg-2); font-size: .92rem; line-height: 1.55; }
.tk-care-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 12px; font-size: .85rem; }
.tk-care-acts .muted { display: inline-flex; align-items: center; gap: 6px; }
.tk-care-acts .ic { width: 15px; height: 15px; }
.tk-care.ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.tk-care.ok > .ic { color: var(--ok); }
/* the host's number, under the ticket */
.tk-host { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 16px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.tk-host-txt { display: grid; gap: 2px; flex: 1; min-width: 140px; }
.tk-host-txt small { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.tk-host-txt p { margin: 0; font-size: .85rem; }
.phone-acts { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.host-contact { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 14px; }
.host-contact small { font-size: .82rem; }
.phone-acts .ic { width: 16px; height: 16px; }
.next-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 22px; }
.next-steps .card { padding: 18px; display: grid; gap: 8px; }
.next-steps .ic { color: var(--brand-text); width: 24px; height: 24px; }
.next-steps h3 { font-size: 1.05rem; }
.next-steps p { font-size: .88rem; color: var(--fg-2); }

/* ---------- tabs / lists ---------- */
.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface-2); margin-bottom: 22px; flex-wrap: wrap; }
.tabs button { border: 0; background: none; padding: 9px 18px; border-radius: 999px; font-weight: 600; cursor: pointer; color: var(--fg-2); }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--fg); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.trip-row { display: grid; grid-template-columns: 140px 1fr auto; gap: 18px; align-items: center; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.trip-row .slot { height: 96px; border-radius: 14px; }
.trip-row h3 { font-size: 1.15rem; margin: 4px 0; }
.trip-row p { color: var(--fg-2); font-size: .9rem; }
.trip-row .acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: end; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; }
.status.ok { background: var(--ok-soft); color: var(--ok); }
.status.wait { background: var(--saffron-soft); color: var(--fg); }
.status.done { background: var(--surface-2); color: var(--fg-2); }
.stack { display: grid; gap: 12px; }

/* ---------- profile ---------- */
.prof-head { background: linear-gradient(180deg, var(--warm), var(--bg)); color: var(--fg); padding-block: 40px 0; border-bottom: 1px solid var(--line); }
.prof-in { display: grid; grid-template-columns: auto 1fr auto; gap: 26px; align-items: end; padding-bottom: 28px; }
.prof-in h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
.prof-in p { color: var(--fg-2); margin-top: 6px; }
.prof-stats { display: flex; gap: 28px; }
.prof-stats div { text-align: center; }
.prof-stats b { display: block; font-family: var(--f-display); font-size: 1.6rem; color: var(--fg); }
.prof-stats small { color: var(--fg-2); font-size: .8rem; }
.prof-layout { display: grid; grid-template-columns: 1fr 340px; gap: 32px; align-items: start; }
.review { padding: 18px 0; border-bottom: 1px solid var(--line); }
.review:last-child { border-bottom: 0; }
.review-top { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.review-top small { color: var(--muted); display: block; font-size: .8rem; }
.stars { display: inline-flex; gap: 2px; margin-left: auto; }
.stars .ic { width: 15px; height: 15px; }
.review p { color: var(--fg-2); }

/* ---------- drive & earn ---------- */
.drive-hero { background: linear-gradient(180deg, var(--warm), var(--bg)); color: var(--fg); overflow: hidden; }
.drive-in { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; padding-block: clamp(48px, 7vw, 88px); }
.drive-in h1 { font-size: clamp(2.4rem, 5.6vw, 4.2rem); font-weight: 800; letter-spacing: -.035em; }
.drive-in h1 em { font-style: normal; color: var(--brand-text); }
.drive-in p { color: var(--fg-2); font-size: 1.12rem; max-width: 48ch; margin: 18px 0 26px; }
.calc { background: var(--surface); color: var(--fg); border-radius: 26px; padding: 24px; box-shadow: var(--shadow-lg); display: grid; gap: 18px; }
.calc h2 { font-size: 1.3rem; }
.calc-row { display: grid; gap: 8px; }
.calc-row label { display: flex; justify-content: space-between; font-weight: 600; font-size: .92rem; gap: 12px; }
.calc-row label output { font-variant-numeric: tabular-nums; color: var(--brand-text); }
.calc-result { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.calc-result div { border-radius: 16px; padding: 14px 16px; background: var(--surface-2); }
.calc-result small { display: block; color: var(--fg-2); font-size: .8rem; }
.calc-result b { font-family: var(--f-display); font-size: 1.45rem; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.calc-result .big { grid-column: 1 / -1; background: var(--brand); color: var(--on-brand); }
.calc-result .big small { color: var(--on-brand); opacity: .8; }
.calc-result .big b { font-size: 2.2rem; }
.loan-bar { height: 14px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.loan-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--saffron), var(--ok)); border-radius: 999px; transition: width .4s; }
.loan-note { font-size: .9rem; color: var(--fg-2); }
.loan-note b { color: var(--fg); }
.steps4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: s; }
.steps4 li { list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; display: grid; gap: 8px; align-content: start; }
.steps4 li::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--saffron); color: var(--saffron-ink); font-family: var(--f-display); font-weight: 800; }
.steps4 h3 { font-size: 1.15rem; }
.steps4 p { color: var(--fg-2); font-size: .92rem; }
.steps4 { padding: 0; margin: 0; }
.fee-split { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; }
.fee-bar { display: flex; height: 54px; border-radius: 16px; overflow: hidden; font-weight: 700; font-size: .9rem; }
.fee-bar span { display: grid; place-items: center; }
.fee-bar .you { flex: 9; background: var(--hero); color: var(--on-hero); }
.fee-bar .us { flex: 1; background: var(--saffron); color: var(--saffron-ink); min-width: 60px; }
.reqs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.req { display: flex; gap: 12px; align-items: center; padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; font-size: .94rem; }
.req .ic { color: var(--brand-text); width: 22px; height: 22px; }

/* ---------- trip designer ---------- */
.wiz { display: grid; grid-template-columns: 240px minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.wiz-steps { position: sticky; top: calc(var(--hd) + 20px); list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.wiz-steps button { width: 100%; display: flex; gap: 12px; align-items: center; text-align: left; padding: 12px 14px; border-radius: 14px; border: 0; background: none; cursor: pointer; font-weight: 600; color: var(--fg-2); }
.wiz-steps button i { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; border: 1.5px solid var(--line); font-style: normal; font-size: .85rem; flex: none; }
.wiz-steps button[aria-current="step"] { background: var(--surface); color: var(--fg); box-shadow: var(--shadow); }
.wiz-steps button[aria-current="step"] i { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.wiz-steps button.done i { background: var(--ok-soft); border-color: var(--ok-soft); color: var(--ok); }
.wiz-panel { display: grid; gap: 18px; min-width: 0; }
.wiz-panel[hidden] { display: none; }
.wiz-nav { display: flex; justify-content: space-between; gap: 12px; }
.stop-list { display: grid; gap: 10px; }
.stop-row { display: grid; grid-template-columns: 26px 140px 1fr auto; gap: 10px; align-items: center; }
.stop-row .grip { color: var(--muted); display: grid; place-items: center; }
.stop-list.multi .stop-row { grid-template-columns: 26px 250px 1fr auto; }
.stop-when { display: flex; gap: 8px; min-width: 0; }
.stop-sel { flex: 1; min-width: 0; }
.stop-day { flex: 0 0 106px; }
.stop-when .dd-btn { gap: 4px; }
.stop-row .dd-field { padding: 11px 12px; border-radius: 12px; min-height: 0; }
.stop-row .dd-pop { width: max(100%, 180px); }
@media (max-width: 560px) {
  .stop-row, .stop-list.multi .stop-row { grid-template-columns: 26px 1fr auto; }
  .stop-row .stop-when { grid-column: 2 / 3; }
  .stop-row input { grid-column: 2 / 3; }
  .stop-row .icon-btn { grid-row: 1; grid-column: 3; }
  .stop-day { flex-basis: 86px; }
  .stop-row .dd-field { padding: 11px 9px; }
}
/* trip designer: what's included */
.inc-block { display: grid; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.inc-block h3 { display: flex; align-items: center; gap: 8px; font-size: 1rem; margin: 0; }
.inc-block h3 .ic { width: 18px; height: 18px; color: var(--ok); }
.inc-block.no h3 .ic { color: var(--coral, #d4421d); }
.inc-tags { display: flex; flex-wrap: wrap; gap: 8px; min-height: 34px; align-items: center; }
.inc-tag { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px 7px 13px; border-radius: 999px; border: 0; background: var(--ok-soft); color: var(--ok); font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; }
.inc-block.no .inc-tag { background: color-mix(in srgb, var(--coral, #d4421d) 12%, transparent); color: var(--coral, #d4421d); }
.inc-tag .ic { width: 14px; height: 14px; opacity: .7; }
.inc-tag:hover .ic { opacity: 1; }
.inc-add { display: flex; gap: 8px; }
.inc-add input { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); font: inherit; color: var(--fg); }
.inc-add input:focus { outline: none; border-color: var(--brand-text); }
.inc-sugg { display: flex; flex-wrap: wrap; gap: 6px; }
.inc-chip { display: inline-flex; align-items: center; gap: 4px; padding: 6px 11px; border-radius: 999px; border: 1.5px dashed var(--line); background: none; color: var(--fg-2); font: inherit; font-size: .84rem; font-weight: 600; cursor: pointer; }
.inc-chip:hover { border-color: var(--fg); color: var(--fg); }
.inc-chip .ic { width: 13px; height: 13px; }
.prev-note { display: block; color: var(--muted); font-size: .8rem; margin-top: -8px; }
.stop-row input { padding: 11px 12px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); min-width: 0; width: 100%; }
.veh-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.veh-pick label { display: grid; gap: 4px; padding: 14px; border-radius: 16px; border: 1.5px solid var(--line); cursor: pointer; background: var(--surface); }
.veh-pick label:has(input:checked) { border-color: var(--brand-text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-text) 15%, transparent); }
.veh-pick input { position: absolute; opacity: 0; pointer-events: none; }
.veh-pick b { font-size: .95rem; }
.veh-pick small { color: var(--muted); font-size: .8rem; }
.veh-pick .ic { width: 26px; height: 26px; color: var(--brand-text); }
.preview-pane { position: sticky; top: calc(var(--hd) + 20px); display: grid; gap: 14px; }
.earn { background: var(--hero); color: var(--on-hero); border-radius: 22px; padding: 20px; display: grid; gap: 10px; }
.earn small { color: var(--on-hero-2); }
.earn .lines div { color: var(--on-hero-2); }
.earn .lines b { color: var(--on-hero); }
.earn .lines .tot { border-color: rgba(255,255,255,.15); color: var(--on-hero); }
.earn .lines .tot b { color: #ff8d6e; font-family: var(--f-display); font-size: 1.5rem; }
.published { text-align: center; display: grid; gap: 14px; justify-items: center; padding: 40px 20px; }
.published .ok-ring { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); }
.published .ok-ring .ic { width: 34px; height: 34px; }

/* ---------- dashboard ---------- */
.dash-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.dash-head h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.dash-head-acts { display: flex; flex-wrap: wrap; gap: 10px; }
.my-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.dash-head p { color: var(--fg-2); margin-top: 6px; }
.kpis { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 14px; margin-bottom: 22px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; display: grid; gap: 4px; align-content: start; }
.kpi small { color: var(--fg-2); font-size: .82rem; font-weight: 600; }
.kpi b { font-family: var(--f-display); font-size: 1.9rem; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.kpi .delta { font-size: .8rem; color: var(--ok); font-weight: 600; }
.kpi.main { background: var(--hero); color: var(--on-hero); border-color: transparent; }
.kpi.main small { color: var(--on-hero-2); }
.kpi.main b { color: #ff8d6e; font-size: 2.3rem; }
.kpi svg.spark { width: 100%; height: 54px; margin-top: 6px; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.dash-grid.solo { grid-template-columns: minmax(0, 1fr); }
/* ---------- review card (components/review-prompt.js) ---------- */
.rv-sheet { width: min(460px, calc(100vw - 24px)); padding: 0; overflow: hidden auto; animation: authIn .22s ease-out; }
.rv-sheet::backdrop { background: rgba(14, 10, 8, .55); backdrop-filter: blur(3px); }
.rvs, .rvs-done, .rv-sheet form.rvs { position: relative; display: grid; gap: 12px; padding: 0 22px 20px; text-align: center; }
.rv-sheet form.rvs::before { display: none; }
.rvs-x { position: absolute; z-index: 3; top: 12px; right: 12px; width: 34px; height: 34px; background: rgba(255, 255, 255, .9); border: 0; color: #1f1f1f; }
.rvs-hero { position: relative; margin: 0 -22px 34px; height: 120px; }
.rvs-cover { position: absolute; inset: 0; }
.rvs-cover::after { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(0,0,0,.05), rgba(0,0,0,.35)); }
.rvs-host { position: absolute; z-index: 2; left: 50%; bottom: -34px; transform: translateX(-50%); border-radius: 50%; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.rvs-host .av.lg { width: 76px; height: 76px; border-width: 4px; font-size: 1.4rem; }
.rvs-head h2 { font-size: 1.25rem; letter-spacing: -.02em; }
.rvs-trip { margin-top: 4px; color: var(--fg-2); font-weight: 600; font-size: .92rem; }
.rvs-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 10px; }
.rvs-meta span { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--fg-2); font-size: .76rem; font-weight: 600; }
.rvs-meta .ic { width: 13px; height: 13px; color: var(--muted); }
.rvs-stars { display: flex; justify-content: center; gap: 6px; margin-top: 6px; }
.rvs-stars button { width: 48px; height: 48px; padding: 0; border: 0; background: none; cursor: pointer; color: color-mix(in srgb, var(--fg) 18%, transparent); transition: transform .12s, color .12s; }
.rvs-stars button .ic { width: 42px; height: 42px; fill: currentColor; stroke-width: 1.2; }
.rvs-stars button.on { color: #f5a524; }
.rvs-stars button:active { transform: scale(.9); }
.rvs-star-lbl { margin-top: -6px; font-weight: 700; font-size: .95rem; color: var(--fg); min-height: 1.4em; }
.rvs-more { display: grid; gap: 12px; animation: authIn .2s ease-out; }
.rvs-q { font-weight: 700; font-size: .92rem; }
.rvs-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.rvs-badge { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--fg); font: inherit; font-size: .84rem; font-weight: 600; cursor: pointer; transition: border-color .15s, background .15s, transform .12s; }
.rvs-badge .ic { width: 16px; height: 16px; color: var(--muted); }
.rvs-badge[aria-pressed="true"] { border-color: var(--brand); background: var(--saffron-soft); color: var(--brand-text); }
.rvs-badge[aria-pressed="true"] .ic { color: var(--brand-text); }
.rvs-badge.bad[aria-pressed="true"] { border-color: var(--coral); background: var(--coral-soft); color: var(--coral); }
.rvs-badge.bad[aria-pressed="true"] .ic { color: var(--coral); }
.rvs-badge:active { transform: scale(.96); }
.rvs-text textarea { width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); font: inherit; font-size: .92rem; resize: vertical; }
.rvs-text textarea:focus { outline: none; border-color: var(--brand); }
.rvs-later { justify-self: center; color: var(--muted); font-size: .88rem; }
.rvs-note { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: .74rem; color: var(--muted); }
.rvs-note .ic { width: 13px; height: 13px; }
.rvs-done { padding-top: 34px; justify-items: center; }
.rvs-done-ic { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); }
.rvs-done-ic .ic { width: 30px; height: 30px; }
.rvs-done p { color: var(--fg-2); font-size: .92rem; }
/* host compliments (trip page) and your own stars (ticket) */
.host-praise { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 2px; }
.host-praise span { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; background: var(--saffron-soft); color: var(--fg); font-size: .78rem; font-weight: 600; }
.host-praise .ic { width: 13px; height: 13px; color: var(--brand-text); }
.host-praise b { color: var(--brand-text); }
.tk-my-stars { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
/* search landing pages (routes/, trips/: scripts/landing.mjs) */
.lp-hero { padding-block: 34px 24px; background: linear-gradient(180deg, var(--warm), var(--bg)); }
.lp-crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: .82rem; color: var(--muted); margin-bottom: 12px; }
.lp-crumbs a { color: inherit; text-decoration: none; }
.lp-crumbs a:hover { color: var(--brand-text); }
.lp-hero h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); max-width: 22ch; }
.lp-lead { margin: 12px 0 18px; max-width: 60ch; color: var(--fg-2); font-size: 1.02rem; line-height: 1.6; }
.lp-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; padding: 0; margin: 0 0 20px; list-style: none; max-width: 820px; }
.lp-facts li { padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.lp-facts small { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.lp-facts b { font-size: .92rem; }
.lp-body { display: grid; gap: 26px; max-width: 820px; }
.lp-body h2 { font-size: 1.25rem; margin-bottom: 10px; }
.lp-body p, .lp-body li { color: var(--fg-2); line-height: 1.65; }
.lp-body ul, .lp-body ol { padding-left: 20px; margin: 0; display: grid; gap: 4px; }
.lp-none { grid-column: 1 / -1; }
.lp-related, .pop-links { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lp-related h2 { flex-basis: 100%; }
.lp-related a, .pop-links a { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); text-decoration: none; font-size: .86rem; font-weight: 600; }
.lp-related a:hover, .pop-links a:hover { border-color: var(--brand); color: var(--brand-text); }
.pop-searches h2 { font-size: 1.2rem; margin-bottom: 12px; }
/* home: questions (collapsed, so the page stays short) */
.home-faq h2 { font-size: 1.2rem; margin-bottom: 10px; }
.home-faq details { border-bottom: 1px solid var(--line); }
.home-faq summary { cursor: pointer; padding: 13px 28px 13px 0; font-weight: 600; font-size: .95rem; list-style: none; position: relative; }
.home-faq summary::-webkit-details-marker { display: none; }
.home-faq summary::after { content: '+'; position: absolute; right: 4px; top: 10px; font-size: 1.2rem; color: var(--muted); }
.home-faq details[open] summary::after { content: '–'; }
.home-faq details p { padding: 0 0 14px; color: var(--fg-2); font-size: .92rem; line-height: 1.6; }
/* admin: editable rules */
.a-edit { cursor: default; }
.a-edit .a-num { display: flex; align-items: center; gap: 8px; flex: none; }
.a-edit .a-num input { width: 92px; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface); font: inherit; font-weight: 700; text-align: right; }
.a-edit .a-num input:focus { outline: none; border-color: var(--brand); }
.a-edit .a-num em { font-style: normal; font-size: .78rem; color: var(--muted); width: 92px; }
#rulesForm .a-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 8px; flex-wrap: wrap; }
/* Explore: the filters in use, removable */
.ex-applied { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: -4px 0 14px; }
.ap-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px 5px 12px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--line)); background: var(--saffron-soft); color: var(--fg); font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer; }
.ap-chip .ic { width: 14px; height: 14px; color: var(--brand-text); }
.ap-chip:hover { border-color: var(--brand); }
.ap-all { font-size: .82rem; margin-left: 4px; }
/* Explore: nothing matches */
.ex-empty { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 28px 18px; border: 1px dashed var(--line); border-radius: 18px; background: var(--surface); }
.ex-empty-ic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--surface-2); color: var(--muted); }
.ex-empty-ic .ic { width: 22px; height: 22px; }
.ex-empty h3 { font-size: 1.1rem; }
.ex-empty p { color: var(--fg-2); font-size: .9rem; }
.ex-empty-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 6px; }
.ex-more-title { font-size: 1rem; margin: 10px 0 0; }
/* Top Host badge (10 five-star reviews from scanned seats) */
.tc-top { display: inline-flex; align-items: center; gap: 3px; margin-left: 4px; padding: 2px 7px; border-radius: 999px; background: #fff4d6; color: #8a5a00; font-size: .7rem; font-weight: 700; }
.tc-top .ic { width: 11px; height: 11px; fill: currentColor; }
:root[data-mode="dark"] .tc-top { background: #3a2e12; color: #ffd27a; }
/* trip cards: until when travellers can cancel */
.tc-cancel { display: flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--ok); font-weight: 600; }
.tc-cancel .ic { width: 13px; height: 13px; }
.comm-alert { margin: 0 0 12px; }
.a-slip { display: block; margin-top: 10px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--soft, #f4efe9); }
.a-slip img { display: block; width: 100%; max-height: 60vh; object-fit: contain; }
.a-row-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
td.a-row-acts { margin: 0; }
.dash-hold { margin: 0 0 18px; text-decoration: none; color: inherit; }
.comm-status > * { display: block; }
.comm-status > * + * { margin-top: 4px; }
.comm-status .btn { display: inline-flex; margin-top: 8px; }
.comm-slip { display: inline-flex !important; align-items: center; gap: 4px; font-weight: 600; color: var(--ok, #1f8a5b); }
.comm-slip svg { width: 14px; height: 14px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; min-width: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.panel-head h2 { font-size: 1.2rem; }
.up-trip { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.up-trip:last-child { border-bottom: 0; }
.up-trip h3 { font-size: 1.05rem; font-family: var(--f-body); font-weight: 700; letter-spacing: 0; }
.up-trip p { color: var(--fg-2); font-size: .86rem; }
.up-trip .strip { grid-column: 1 / -1; }
.up-trip .money { text-align: right; font-variant-numeric: tabular-nums; }
.up-trip .money b { display: block; font-family: var(--f-display); font-size: 1.15rem; }
.up-trip .money small { color: var(--muted); font-size: .76rem; }
.table-wrap { overflow-x: auto; scrollbar-width: thin; }
/* tables fit their panel; only on phones do they keep a minimum width and scroll sideways */
table.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
@media (max-width: 600px) { table.tbl { min-width: 460px; } }
.tbl .tel { color: var(--fg); font-weight: 600; text-decoration: none; white-space: nowrap; }
.tbl .tel:hover { color: var(--brand-text); text-decoration: underline; }
.tbl th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 12px 10px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td.r, .tbl th.r { text-align: right; white-space: nowrap; }
.tbl td:first-child { white-space: nowrap; }
.doc-list { display: grid; gap: 10px; }
.doc { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; background: var(--surface-2); font-size: .92rem; }
.doc .ic { color: var(--brand-text); }
.doc .status { margin-left: auto; }

/* ---------- auth ---------- */
.auth { display: grid; grid-template-columns: 1fr 1fr; min-height: calc(100vh - var(--hd)); }
.auth-media { position: relative; overflow: hidden; }
.auth-media .slot { position: absolute; inset: 0; }
.auth-quote { position: absolute; z-index: 2; left: 32px; right: 32px; bottom: 32px; background: rgba(6,18,12,.7); backdrop-filter: blur(10px); color: #f2f6f0; padding: 22px; border-radius: 20px; }
.auth-quote p { font-family: var(--f-display); font-size: 1.3rem; line-height: 1.3; letter-spacing: -.01em; }
.auth-quote small { display: block; margin-top: 10px; color: #b8c7bd; }
.auth-form { display: grid; align-content: center; justify-items: center; padding-block: 48px; padding-left: var(--gut); padding-right: var(--gut-r); }
.auth-box { width: 100%; max-width: 440px; display: grid; gap: 18px; }
.auth-box h1 { font-size: clamp(2rem, 4vw, 2.6rem); }
.role { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.role label { display: grid; gap: 4px; padding: 16px; border-radius: 16px; border: 1.5px solid var(--line); cursor: pointer; background: var(--surface); }
.role label:has(input:checked) { border-color: var(--brand-text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-text) 15%, transparent); }
.role input { position: absolute; opacity: 0; pointer-events: none; }
.role .ic { color: var(--brand-text); width: 24px; height: 24px; }
.role b { font-size: .98rem; }
.role small { color: var(--muted); font-size: .8rem; }
.otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.otp input { text-align: center; font-size: 1.3rem; font-weight: 700; padding: 12px 0; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); width: 100%; min-width: 0; }
.upload { display: flex; gap: 12px; align-items: center; padding: 14px; border: 1.5px dashed var(--line); border-radius: 14px; cursor: pointer; font-size: .92rem; }
.upload input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.upload .ic { color: var(--brand-text); width: 22px; height: 22px; }
.upload span { color: var(--fg-2); }
.field small.bad { color: var(--coral, #d4421d); font-weight: 600; }
.cover-pick { display: flex; align-items: center; gap: 14px; padding: 10px; border: 1px solid var(--line); border-radius: 16px; }
.cover-prev { width: 132px; height: 84px; flex: none; object-fit: cover; border-radius: 12px; background: var(--surface-2); }
.cover-acts { display: grid; gap: 8px; justify-items: start; min-width: 0; }
.cover-acts small { color: var(--muted); }
.cover-acts .btn .ic { width: 16px; height: 16px; }
.cover-pick.busy .cover-prev { opacity: .5; }
.dash-veh { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; background: var(--surface-2); color: inherit; text-decoration: none; }
.dash-veh + .dash-veh { margin-top: 8px; }
.dash-veh .slot { flex: none; width: 74px; height: 52px; border-radius: 10px; overflow: hidden; background: var(--line); }
.dash-veh .slot img { width: 100%; height: 100%; object-fit: cover; }
.dash-veh > span:nth-child(2) { display: grid; min-width: 0; flex: 1; }
.dash-veh small { color: var(--muted); }
.dash-veh-edit { display: inline-flex; align-items: center; gap: 5px; font-size: .8rem; font-weight: 600; color: var(--brand-text); }
.dash-veh-edit .ic { width: 15px; height: 15px; }
.veh-own { display: grid !important; gap: 4px; }
.veh-own .slot { display: block; width: 100%; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: var(--surface-2); margin-bottom: 6px; }
.veh-own .slot img { width: 100%; height: 100%; object-fit: cover; }
.veh-add-link { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 14px; border: 1.5px dashed var(--line); border-radius: 16px; color: var(--brand-text); font-weight: 600; text-decoration: none; }
.fleet { display: grid; gap: 14px; margin: 14px 0; }
.fleet-card { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 18px; padding: 16px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.fleet-card.busy { opacity: .6; pointer-events: none; }
.fleet-photo { position: relative; display: block; cursor: pointer; border-radius: 14px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--surface-2); }
.fleet-photo .slot { position: absolute; inset: 0; }
.fleet-photo .slot img { width: 100%; height: 100%; object-fit: cover; }
.fleet-photo-btn { position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 99px; background: rgba(0, 0, 0, .6); color: #fff; font-size: .8rem; font-weight: 600; }
.fleet-photo-btn .ic { width: 15px; height: 15px; }
.fleet-fields { display: grid; gap: 12px; align-content: start; }
.fleet-acts { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.fleet-add { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
@media (max-width: 640px) { .fleet-card { grid-template-columns: 1fr; } }
.veh-wrap { max-width: 760px; }
/* Bank details for payouts (components/bank-form.js) */
.bank-form { display: grid; gap: 14px; }
.bank-note { display: flex; align-items: center; gap: 6px; font-size: .8rem; }
.bank-note .ic { width: 14px; height: 14px; flex: none; }
.pay-bank { display: grid; gap: 12px; margin: 0 0 14px; padding: 14px 16px; border-radius: 16px; background: var(--surface-2); }
.pay-bank-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pay-bank-row > .ic { width: 22px; height: 22px; color: var(--fg-2); flex: none; }
.pay-bank-row div { flex: 1; min-width: 160px; display: grid; }
.pay-bank-row small { color: var(--muted); font-size: .8rem; }
.pay-bank.missing { background: var(--saffron-soft); }
.pay-bank.missing > .pay-bank-row > .ic { color: var(--brand-text); }
.pay-bank-acts { display: flex; justify-content: flex-end; gap: 8px; }
/* Check-in (/checkin/) */
/* ---------- check-in (/checkin/): the host's boarding desk ---------- */
.ci-wrap { max-width: 760px; }
.ci-hero { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 14px; padding: 26px 28px 42px; border-radius: 26px; background: var(--hero); color: var(--on-hero); }
.ci-hero::before { content: ''; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--brand) 38%, transparent), transparent 70%); pointer-events: none; }
.ci-hero-txt { position: relative; min-width: 0; }
.ci-kicker { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px 5px 9px; border-radius: 999px; background: rgba(255, 255, 255, .1); color: var(--on-hero); font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.ci-kicker .ic { width: 15px; height: 15px; color: var(--saffron); }
.ci-hero h1 { margin: 12px 0 6px; font-size: clamp(1.8rem, 4.4vw, 2.5rem); color: var(--on-hero); letter-spacing: -.03em; }
.ci-hero p { margin: 0; max-width: 430px; color: var(--on-hero-2); font-size: .94rem; line-height: 1.55; }
.ci-ring { --p: 0; position: relative; flex: none; width: 118px; height: 118px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--saffron) calc(var(--p) * 1%), rgba(255, 255, 255, .13) 0); transition: background .4s; }
.ci-ring.full { background: conic-gradient(var(--ok) 100%, transparent 0); }
.ci-ring > div { width: 94px; height: 94px; border-radius: 50%; background: var(--hero); display: grid; place-content: center; text-align: center; }
.ci-ring b { font-family: var(--f-display); font-size: 1.7rem; line-height: 1; letter-spacing: -.02em; }
.ci-ring small { margin-top: 4px; color: var(--on-hero-2); font-size: .68rem; font-weight: 600; max-width: 76px; line-height: 1.25; }

.ci-card { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; margin: -14px 14px 0; padding: 22px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); }
.ci-ways { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 14px; }
.ci-scan { display: grid; justify-items: center; align-content: center; gap: 6px; min-height: 196px; padding: 20px; border: 1.5px dashed color-mix(in srgb, var(--brand) 45%, var(--line)); border-radius: 20px; background: var(--saffron-soft); color: var(--fg); font: inherit; cursor: pointer; transition: transform .15s, box-shadow .2s, border-color .2s; }
.ci-scan:hover { transform: translateY(-2px); border-color: var(--brand); box-shadow: 0 10px 24px -14px color-mix(in srgb, var(--brand) 60%, transparent); }
.ci-scan:active { transform: none; }
.ci-scan-ic { width: 68px; height: 68px; border-radius: 20px; display: grid; place-items: center; background: var(--brand); color: #fff; box-shadow: 0 8px 18px -8px var(--brand); margin-bottom: 6px; }
.ci-scan-ic .ic { width: 32px; height: 32px; }
.ci-scan b { font-size: 1.08rem; }
.ci-scan small { color: var(--muted); font-size: .82rem; }
.ci-pin { display: grid; grid-template-columns: minmax(0, 1fr); align-content: center; gap: 10px; padding: 18px; border-radius: 20px; background: var(--surface-2); }
.ci-pin > label { display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: .9rem; }
.ci-pin > label .ic { width: 16px; height: 16px; color: var(--fg-2); }
.ci-pin input { width: 100%; min-width: 0; height: 74px; padding: 0 12px 0 calc(12px + .5em); border-radius: 16px; border: 1.5px solid var(--line); background: var(--surface); color: var(--fg); font-family: var(--f-display); font-size: 2.4rem; font-weight: 700; letter-spacing: .5em; text-align: center; font-variant-numeric: tabular-nums; }
.ci-pin input:focus { outline: none; border-color: var(--brand-text); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-text) 16%, transparent); }
.ci-pin input::placeholder { color: color-mix(in srgb, var(--muted) 45%, transparent); }
.ci-pin small { color: var(--muted); font-size: .78rem; text-align: center; }
.ci-trip > span { font-weight: 700; }

.ci-res { display: flex; gap: 14px; align-items: flex-start; margin-top: 18px; padding: 18px 20px; border-radius: 20px; background: var(--surface-2); border: 1px solid var(--line); animation: ci-pop .35s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes ci-pop { from { transform: scale(.97); opacity: 0; } }
.ci-res > .ic { width: 40px; height: 40px; padding: 9px; flex: none; border-radius: 50%; background: var(--surface); box-sizing: border-box; }
.ci-res > div { min-width: 0; flex: 1; }
.ci-res b { font-size: 1.05rem; }
.ci-res p { margin: 4px 0 12px; color: var(--fg-2); }
.ci-res.ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 30%, transparent); } .ci-res.ok > .ic { background: var(--ok); color: #fff; } .ci-res.ok b { color: var(--ok); }
.ci-res.warn { background: var(--saffron-soft); border-color: color-mix(in srgb, var(--brand) 30%, transparent); } .ci-res.warn > .ic { background: var(--brand); color: #fff; }
.ci-res.bad { background: var(--coral-soft, color-mix(in srgb, #d4421d 12%, transparent)); border-color: color-mix(in srgb, var(--coral, #d4421d) 30%, transparent); } .ci-res.bad > .ic { background: var(--coral, #d4421d); color: #fff; } .ci-res.bad b { color: var(--coral, #d4421d); }
.ci-choose { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }

.ci-list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 34px 0 10px; }
.ci-list-head h2 { font-size: 1.35rem; }
.ci-list-head .muted { font-weight: 700; font-size: .88rem; }
.ci-bar { height: 6px; margin-bottom: 14px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.ci-bar span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--saffron), var(--ok)); transition: width .5s ease; }
.ci-list { display: grid; gap: 10px; }
.ci-row { position: relative; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 16px 14px 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); transition: border-color .2s, background .2s; }
.ci-row::before { content: ''; position: absolute; left: -1px; top: 14px; bottom: 14px; width: 4px; border-radius: 0 4px 4px 0; background: var(--line); }
.ci-seat { flex: none; display: grid; place-content: center; text-align: center; min-width: 56px; height: 56px; padding: 0 8px; border-radius: 16px; background: var(--surface-2); }
.ci-seat small { font-size: .6rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ci-seat b { font-family: var(--f-display); font-size: 1.35rem; line-height: 1.05; white-space: nowrap; }
.ci-who { display: grid; gap: 2px; flex: 1; min-width: 150px; }
.ci-who > b { font-size: 1.02rem; }
.ci-who small { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: .82rem; }
.ci-who small .ic { width: 13px; height: 13px; }
.ci-state { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 999px; background: var(--surface-2); color: var(--fg-2); font-size: .8rem; font-weight: 700; white-space: nowrap; }
.ci-state .ic { width: 14px; height: 14px; }
.ci-row.on { border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); background: color-mix(in srgb, var(--ok-soft) 45%, var(--surface)); }
.ci-row.on::before { background: var(--ok); }
.ci-row.on .ci-seat { background: var(--ok); }
.ci-row.on .ci-seat small, .ci-row.on .ci-seat b { color: #fff; }
.ci-row.on .ci-state { background: var(--ok); color: #fff; }
@media (max-width: 640px) {
  .ci-hero { padding: 22px 20px 34px; align-items: flex-start; }
  .ci-ring { width: 84px; height: 84px; } .ci-ring > div { width: 66px; height: 66px; }
  .ci-ring b { font-size: 1.2rem; } .ci-ring small { font-size: .58rem; max-width: 56px; }
  .ci-card { margin: -18px 0 0; padding: 16px; }
  .ci-ways { grid-template-columns: minmax(0, 1fr); }
  .ci-scan { min-height: 0; grid-template-columns: auto 1fr; justify-items: start; text-align: left; column-gap: 14px; padding: 16px; }
  .ci-scan-ic { grid-row: span 2; width: 54px; height: 54px; margin: 0; border-radius: 16px; }
  .ci-scan-ic .ic { width: 26px; height: 26px; }
  .ci-row { gap: 10px 12px; }
  .ci-row .phone-acts { order: 3; flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 8px; }
  .ci-row .ci-acts { order: 4; }
}
.ci-cam { width: min(440px, calc(100vw - 24px)); padding: 16px; border: 0; border-radius: 24px; background: var(--surface); color: var(--fg); text-align: center; }
.ci-cam::backdrop { background: rgba(10, 8, 6, .7); }
.ci-cam-view { position: relative; aspect-ratio: 1; border-radius: 18px; overflow: hidden; background: #000; }
.ci-cam video { width: 100%; height: 100%; object-fit: cover; }
.ci-frame { position: absolute; inset: 18%; border: 3px solid #fff; border-radius: 18px; box-shadow: 0 0 0 999px rgba(0, 0, 0, .35); }
.ci-cam p { margin: 12px 0; color: var(--fg-2); font-size: .9rem; }
/* Your profile (/account/) */
.ac-wrap { max-width: 620px; }
.ac-wrap .veh-title { margin-bottom: 6px; }
.ac-back { display: flex; width: fit-content; align-items: center; gap: 6px; margin-bottom: 14px; color: var(--muted); font-weight: 600; font-size: .9rem; text-decoration: none; }
.ac-back:hover { color: var(--fg); }
.ac-back .ic { width: 16px; height: 16px; }
.ac-card { display: grid; gap: 18px; margin-top: 18px; padding: 22px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); transition: opacity .2s; }
.ac-card.busy { opacity: .6; pointer-events: none; }
.ac-photo { display: flex; align-items: center; gap: 18px; }
.ac-photo-txt { display: grid; gap: 4px; min-width: 0; }
.ac-photo-txt small { color: var(--muted); }
.ac-photo-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 8px; }
.ac-photo-acts label.btn { cursor: pointer; }
.ac-ro p { margin: 2px 0; font-weight: 600; overflow-wrap: anywhere; }
.ac-ro small { color: var(--muted); font-size: .8rem; }
@media (max-width: 480px) { .ac-photo { flex-direction: column; align-items: flex-start; } .ac-card { padding: 16px; } }
.veh-title { font-size: clamp(1.9rem, 4vw, 2.6rem); margin: 6px 0 18px; }
.veh-form { display: grid; gap: 20px; margin-top: 18px; padding: clamp(18px, 3vw, 28px); border: 1px solid var(--line); border-radius: 22px; background: var(--surface); }
.veh-actions { display: flex; justify-content: flex-end; }
.notice.ok { background: color-mix(in srgb, var(--ok, #12805c) 10%, var(--surface)); }
.notice.ok .ic { color: var(--ok, #12805c); }
.up-docs { display: grid; gap: 10px; }
.up-docs-h { margin: 0; display: grid; gap: 2px; }
.up-docs-h small { color: var(--muted); font-size: .84rem; }
.up-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 10px; }
.up-grid .upload { position: relative; min-height: 64px; padding: 12px; }
.up-txt { display: grid; gap: 2px; min-width: 0; flex: 1; }
.up-txt b { color: var(--fg); font-size: .9rem; }
.up-txt small { color: var(--muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-prev { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; flex: none; }
.upload.busy { border-style: solid; border-color: var(--brand-text); }
.upload.busy small { color: var(--brand-text); }
.upload.ok { border-style: solid; border-color: var(--ok, #2e9e5b); }
.upload.ok .up-ic .ic { color: var(--ok, #2e9e5b); }
.upload.ok small { color: var(--ok, #2e9e5b); }
.upload.bad { border-style: solid; border-color: var(--coral, #d4421d); }
.upload.bad small { color: var(--coral, #d4421d); white-space: normal; }
.upload:focus-within { outline: 2px solid var(--brand-text); outline-offset: 2px; }

/* ---------- safety ---------- */
.safe-hero { background: linear-gradient(180deg, var(--warm), var(--bg)); color: var(--fg); padding-block: clamp(48px, 7vw, 80px); }
.safe-hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); max-width: 18ch; }
.safe-hero p { color: var(--fg-2); font-size: 1.1rem; max-width: 56ch; margin-top: 16px; }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pillar { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; display: grid; gap: 12px; align-content: start; }
.pillar .ic-wrap { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); }
.pillar .ic-wrap .ic { width: 24px; height: 24px; }
.pillar h3 { font-size: 1.25rem; }
.pillar ul { margin: 0; padding-left: 18px; color: var(--fg-2); display: grid; gap: 6px; font-size: .94rem; }
.faq { display: grid; gap: 10px; max-width: 820px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 0 20px; }
.faq summary { cursor: pointer; padding: 18px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::after { content: '+'; font-size: 1.4rem; line-height: 1; color: var(--brand-text); }
.faq details[open] summary::after { content: '–'; }
.faq details p { color: var(--fg-2); padding-bottom: 18px; }

/* ---------- footer ---------- */
.app-footer { background: var(--surface); border-top: 1px solid var(--line); margin-top: 40px; }
.ft { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 32px; padding-block: 48px 32px; max-width: 1240px; margin-inline: auto; padding-left: var(--gut); padding-right: var(--gut-r); }
.ft-brand p { color: var(--fg-2); margin-top: 14px; max-width: 38ch; font-size: .94rem; }
.ft h4 { font-size: .8rem; font-family: var(--f-body); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 12px; }
.ft a:not(.logo) { display: block; text-decoration: none; padding: 5px 0; font-size: .94rem; color: var(--fg-2); }
.ft a:not(.logo):hover { color: var(--fg); }
.ft-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-block: 18px 26px; border-top: 1px solid var(--line); font-size: .84rem; color: var(--muted); max-width: 1240px; margin-inline: auto; padding-left: var(--gut); padding-right: var(--gut-r); }
.credit { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--fg-2); }
.credit b { color: var(--fg); font-weight: 800; }
.credit em { font-style: normal; color: #fdc00b; }
.credit-seats { display: inline-flex; gap: 2px; }
.credit-seats i { width: 8px; height: 8px; border-radius: 2.5px; border: 1.5px solid var(--line); transition: background .2s, border-color .2s; }
.credit:hover .credit-seats i { background: #fdc00b; border-color: #fdc00b; }
.credit:hover .credit-seats i:nth-child(2) { transition-delay: .08s; }
.credit:hover .credit-seats i:nth-child(3) { transition-delay: .16s; }

/* ---------- tab bar (phones) ---------- */
.tabbar { display: none; }
#toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 16px); background: var(--fg); color: var(--bg); padding: 12px 20px; border-radius: 999px; font-weight: 600; font-size: .9rem; opacity: 0; transition: all .25s; z-index: 200; pointer-events: none; white-space: nowrap; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } html { scroll-behavior: auto; } }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .wiz { grid-template-columns: 200px minmax(0, 1fr); }
  .preview-pane { grid-column: 2; position: static; }
}
@media (max-width: 1024px) {
  .trip-layout, .co-layout, .prof-layout { grid-template-columns: 1fr; }
  .book, .summary { position: static; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .dash-grid { grid-template-columns: 1fr; }
  .steps4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 880px) {
  :root { --hd: 60px; }
  .hd-nav, .hd-pub { display: none; }
  .hd { justify-content: space-between; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; z-index: 70; left: 0; right: 0; bottom: 0; background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding: 6px max(8px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px)); }
  .tabbar a { display: grid; justify-items: center; gap: 2px; text-decoration: none; font-size: .68rem; font-weight: 600; color: var(--muted); padding: 6px 0; border-radius: 12px; }
  .tabbar a .ic { width: 22px; height: 22px; }
  .tabbar a[aria-current] { color: var(--brand-text); }
  .tabbar .tab-pub .ic { width: 40px; height: 32px; padding: 5px 9px; border-radius: 12px; background: var(--brand); color: var(--on-brand); margin-top: -4px; }
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
  .hero-in, .owner, .community, .drive-in, .auth { grid-template-columns: 1fr; }
  .auth-media { min-height: 240px; }
  .auth-quote { left: 16px; right: 16px; bottom: 16px; padding: 16px; }
  .auth-quote p { font-size: 1.05rem; }
  .how, .pillars { grid-template-columns: 1fr; }
  .ex-layout { grid-template-columns: 1fr; }
  .filters { position: static; display: none; }
  .filters.open { display: grid; }
  .filter-btn { display: inline-flex; }
  .wiz { grid-template-columns: 1fr; }
  .wiz-steps { position: static; display: flex; overflow-x: auto; gap: 6px; scrollbar-width: none; }
  .wiz-steps li { flex: none; }
  .wiz-steps button { padding: 8px 12px; }
  .preview-pane { grid-column: auto; }
  .ticket { grid-template-columns: 1fr; }
  .tk-side { border-left: 0; border-top: 2px dashed var(--line); }
  .tk-side::before, .tk-side::after { top: -13px; left: auto; bottom: auto; }
  .tk-side::before { left: -12px; } .tk-side::after { right: -12px; }
  .next-steps { grid-template-columns: 1fr; }
  .prof-in { grid-template-columns: auto 1fr; }
  .prof-stats { grid-column: 1 / -1; justify-content: space-between; }
  .ft { grid-template-columns: 1fr 1fr; }
  .ft-brand { grid-column: 1 / -1; }
  .mbar { display: flex; position: fixed; z-index: 75; left: 0; right: 0; bottom: 0; align-items: center; justify-content: space-between; gap: 12px; background: var(--surface); border-top: 1px solid var(--line); padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); box-shadow: 0 -12px 24px -18px rgba(0,0,0,.35); }
  .mbar b { font-family: var(--f-display); font-size: 1.3rem; display: block; line-height: 1.1; }
  .mbar small { color: var(--muted); font-size: .78rem; }
  body.has-mbar .tabbar { display: none; }
}
@media (max-width: 600px) {
  .search { grid-template-columns: 1fr 1fr; border-radius: 20px; }
  .search .btn { grid-column: 1 / -1; min-height: 50px; }
  .two-col, .row2, .row3, .calc-result, .role { grid-template-columns: 1fr; }
  .calc-result .big { grid-column: auto; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi.main { grid-column: 1 / -1; }
  .owner-math { grid-template-columns: 1fr; }
  .stops li { grid-template-columns: 74px 18px 1fr; gap: 10px; }
  .stops li::before { left: 92px; }
  .trip-row { grid-template-columns: 96px 1fr; }
  .trip-row .slot { height: 80px; }
  .trip-row .acts { grid-column: 1 / -1; justify-content: start; }
  .tk-grid { grid-template-columns: 1fr 1fr; }
  .steps4 { grid-template-columns: 1fr; }
  .stop-row { grid-template-columns: 1fr auto; }
  .stop-row .grip { display: none; }
  .stop-row input:first-of-type { grid-column: 1 / -1; }
  .sm-row { grid-template-columns: repeat(var(--cols), 40px); gap: 6px; }
  .sm-cell { height: 42px; }
  .pass-row { grid-template-columns: auto 1fr; }
  .pass-row .field:last-child { grid-column: 1 / -1; }
  .fee-split { grid-template-columns: 1fr; }
  .ft { grid-template-columns: 1fr; }
  .hero-proof { gap: 12px; }
}

/* =========================================================
   Layer 2: cut-outs, vectors, reviews, history, galleries
   ========================================================= */

/* ---------- vectors and overlapping cut-outs ---------- */
.vec { display: block; width: 100%; height: 100%; }
.hero-vec { position: absolute; z-index: 0; left: -2%; right: 30%; bottom: 0; height: 200px; color: color-mix(in srgb, var(--brand) 55%, transparent); pointer-events: none; }
.board-wrap { position: relative; }
.board-wrap .board { position: relative; z-index: 1; }
.float-chip { position: absolute; z-index: 3; display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 10px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-lg); border: 1px solid var(--line); font-size: .85rem; line-height: 1.25; animation: floaty 6s ease-in-out infinite; }
.float-chip:empty { display: none; }
.float-chip b { display: flex; align-items: center; gap: 4px; }
.float-chip small { color: var(--muted); display: block; }
.float-chip > .ic { width: 22px; height: 22px; color: var(--brand-text); margin-left: 4px; }
.fc-trust { top: -22px; left: -46px; }
.fc-last { bottom: 96px; right: -34px; animation-delay: -3s; }
.fc-pay { right: -18px; bottom: 34px; }
.fc-ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: var(--saffron-soft); color: var(--brand-text); }
@keyframes floaty { 50% { transform: translateY(-6px); } }
.vec-float { position: absolute; z-index: 2; pointer-events: none; color: var(--brand); }
.vf-spark1 { width: 28px; height: 28px; top: -30px; right: 24%; }
.vf-spark2 { width: 16px; height: 16px; top: 40%; left: -34px; opacity: .6; }
.vf-spark3 { width: 22px; height: 22px; top: -18px; left: 30%; }
.cutout { position: absolute; z-index: 2; pointer-events: none; filter: drop-shadow(0 18px 24px rgba(40, 20, 10, .22)); }
.co-friends { width: 300px; left: -150px; bottom: -40px; }
.owner-stage { position: relative; }
.co-van { width: 62%; right: -8%; bottom: -14%; }
.vf-palm { width: 120px; height: 170px; top: -60px; left: -36px; opacity: .55; color: var(--brand-text); z-index: 0; }
.calc-stage { position: relative; }
.co-driver { width: 220px; left: -170px; bottom: 0; z-index: 0; }
.calc-stage .calc { position: relative; z-index: 1; }
.drive-hero, .safe-hero { position: relative; }
.drive-vec, .proof-vec { position: absolute; left: 0; right: 0; bottom: 0; height: 160px; color: var(--brand); pointer-events: none; }
.drive-in, .safe-hero .wrap { position: relative; z-index: 1; }
.proof { position: relative; overflow: hidden; background: var(--warm); }
.proof .wrap { position: relative; z-index: 1; }
.confirm-top { position: relative; }
.co-pack { width: 150px; right: 0; top: -10px; }
.vf-ticket { width: 90px; height: 56px; left: 4%; top: 6px; transform: rotate(-12deg); color: var(--brand-text); }
@media (prefers-reduced-motion: reduce) { .float-chip { animation: none; } }

/* ---------- trip cards: trust line ---------- */
.tc-host { display: flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--fg-2); }
.tc-host .ic { width: 14px; height: 14px; }
.tc-host b { color: var(--fg); }
.tc-hot { position: absolute; z-index: 2; top: 50px; left: 12px; display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 999px; background: var(--brand); color: var(--on-brand); font-size: .72rem; font-weight: 700; }
.tc-hot .ic { width: 13px; height: 13px; }
.star-off { color: var(--line); fill: var(--line); }

/* ---------- interest-matched seats ---------- */
.seat-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.seat-head h2 { margin: 0 !important; }
.like-pick { display: inline-flex; align-items: center; gap: 8px; font-size: .88rem; font-weight: 600; color: var(--fg-2); flex-wrap: wrap; }
.like-pick .ic { color: var(--brand-text); }
.like-pick .select { padding: 7px 12px; }
.sm-seat.match { border-color: var(--brand-text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent); }
.sm-heart { position: absolute; top: -7px; right: -7px; width: 18px; height: 18px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; }
.sm-heart .ic { width: 11px; height: 11px; fill: currentColor; }
.legend i.m { border-color: var(--brand-text); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 18%, transparent); }

/* ---------- reviews ---------- */
.rv-list { display: grid; gap: 0; margin-top: 8px; }
.rv-list .rv { border-bottom: 1px solid var(--line); }
.rv-list .rv:last-child { border-bottom: 0; }
.rv-cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.rv-cols .rv { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.rv { padding: 18px 0; display: grid; gap: 10px; align-content: start; min-width: 0; }
.rv.mine { position: relative; }
.rv.mine::before { content: 'Your review'; justify-self: start; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-text); background: var(--saffron-soft); padding: 3px 8px; border-radius: 999px; }
.rv-top { display: flex; gap: 12px; align-items: center; }
.rv-top b { display: block; }
.rv-top small { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: .78rem; flex-wrap: wrap; }
.rv-top small .ic { width: 13px; height: 13px; color: var(--ok); }
.rv .stars { margin-left: auto; flex: none; }
.rv p { color: var(--fg-2); }
.rv-best { font-size: .9rem; background: var(--surface-2); padding: 8px 12px; border-radius: 10px; }
.rv-best b { color: var(--fg); }
.rv-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.rv-tags span { font-size: .75rem; font-weight: 600; padding: 4px 9px; border-radius: 999px; background: var(--surface-2); color: var(--fg-2); }
.rv-photos { display: grid; grid-template-columns: repeat(4, 76px); gap: 6px; }
.rv-photos .slot { aspect-ratio: 1; border-radius: 10px; max-width: 100%; }
.rating { display: grid; grid-template-columns: auto 1fr; gap: 14px 28px; align-items: center; }
.rating-big { display: grid; justify-items: start; gap: 4px; }
.rating-big b { font-family: var(--f-display); font-size: 3rem; line-height: 1; letter-spacing: -.03em; }
.rating-big small { color: var(--muted); font-size: .82rem; }
.rating-bars { display: grid; gap: 5px; min-width: 0; }
.rating-bars div { display: grid; grid-template-columns: 14px 1fr 24px; gap: 10px; align-items: center; font-size: .8rem; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.rating-bars i { height: 7px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.rating-bars em { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.rating-tags { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.rating-tags span { font-size: .8rem; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line); color: var(--fg-2); }
.rating-tags b { color: var(--brand-text); }
.chip.on { background: var(--fg); color: var(--bg); }
.review-goal { display: grid; gap: 10px; padding: 16px 18px; border-radius: 16px; background: var(--saffron-soft); margin-bottom: 16px; }
.review-goal small { display: block; color: var(--fg-2); font-size: .84rem; }
.goal-bar { height: 8px; border-radius: 999px; background: color-mix(in srgb, var(--brand) 15%, var(--surface)); overflow: hidden; }
.goal-bar span { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.my-rv { display: flex; gap: 8px; align-items: center; margin-top: 6px; font-size: .86rem; }
.my-rv .stars .ic { width: 13px; height: 13px; }
.sub-h { font-size: 1.15rem; margin: 32px 0 14px; }

/* ---------- galleries ---------- */
.ph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ph-grid.six { grid-template-columns: repeat(6, 1fr); }
.ph-tile { position: relative; display: block; padding: 0; border: 0; border-radius: 14px; overflow: hidden; cursor: zoom-in; background: none; aspect-ratio: 1; max-width: 100%; }
.ph-tile .slot { position: absolute; inset: 0; }
.ph-tile .ph-label { font-size: .85rem; bottom: 34px; }
.ph-tile:hover .slot > img { transform: scale(1.05); }
.ph-cap { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; align-items: center; gap: 6px; padding: 20px 8px 8px; color: #fff; font-size: .76rem; font-weight: 600; background: linear-gradient(transparent, rgba(0,0,0,.55)); }
.ph-cap .av { border-color: transparent; }
.ph-grid.masonry { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); grid-auto-rows: 160px; }
.ph-grid.masonry .ph-tile { aspect-ratio: auto; }
.ph-grid.masonry .ph-tile:nth-child(5n+1) { grid-row: span 2; }
.lb { position: fixed; inset: 0; z-index: 300; background: rgba(10,10,10,.9); display: grid; place-items: center; padding: max(20px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(20px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.lb figure { margin: 0; width: min(900px, 100%); display: grid; gap: 12px; }
.lb-img { aspect-ratio: 4 / 3; border-radius: 16px; max-width: 100%; }
.lb-img > img { object-fit: contain; background: #000; }
.lb figcaption { color: #eee; text-align: center; font-size: .9rem; }
.lb-x { position: absolute; top: max(16px, env(safe-area-inset-top, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); }

/* ---------- host trip history ---------- */
.hist { list-style: none; margin: 0; padding: 0; display: grid; }
.hist li { display: grid; grid-template-columns: 18px 1fr; gap: 14px; position: relative; padding-bottom: 20px; }
.hist li::before { content: ''; position: absolute; left: 8px; top: 14px; bottom: 0; width: 2px; background: var(--line); }
.hist li:last-child::before { display: none; }
.hist-dot { width: 18px; height: 18px; border-radius: 50%; border: 4px solid var(--brand); background: var(--surface); margin-top: 2px; position: relative; z-index: 1; }
.hist-body { display: grid; gap: 10px; min-width: 0; }
.hist-top { display: flex; justify-content: space-between; gap: 12px; }
.hist-top small { display: block; color: var(--muted); font-size: .82rem; }
.hist-score { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; }
.hist-photos { display: flex; gap: 6px; flex-wrap: wrap; }
.ph-mini { width: 72px; height: 54px; padding: 0; border: 0; border-radius: 10px; overflow: hidden; cursor: zoom-in; position: relative; }
.ph-mini .slot { position: absolute; inset: 0; }

/* ---------- write a review ---------- */
.rv-page { max-width: 760px; display: grid; gap: 18px; }
.rv-trip { display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: center; padding: 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.rv-trip .slot { height: 90px; border-radius: 14px; }
.rv-trip h2 { font-size: 1.35rem; margin: 6px 0 2px; }
.rv-form { display: grid; gap: 20px; }
.rv-form h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); }
.star-input { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.star-input button { width: 48px; height: 48px; border: 0; background: none; cursor: pointer; color: var(--line); padding: 4px; transition: transform .12s; }
.star-input button .ic { width: 100%; height: 100%; fill: currentColor; }
.star-input button.on { color: var(--brand); }
.star-input button:hover { transform: scale(1.1); }
.star-input b { font-family: var(--f-display); font-size: 1.2rem; }
.up-row { display: flex; gap: 10px; flex-wrap: wrap; }
.up-thumb { position: relative; width: 96px; height: 96px; border-radius: 14px; overflow: hidden; }
.up-thumb img { width: 100%; height: 100%; object-fit: cover; }
.up-thumb button { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; cursor: pointer; }
.up-thumb button .ic { width: 14px; height: 14px; }
.up-add { width: 96px; height: 96px; border-radius: 14px; border: 1.5px dashed var(--line); display: grid; place-items: center; align-content: center; gap: 4px; font-size: .78rem; font-weight: 600; color: var(--fg-2); cursor: pointer; position: relative; }
.up-add .ic { width: 24px; height: 24px; color: var(--brand-text); }
.up-add input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* ---------- stories ---------- */
.stories-hero { overflow: hidden; }
.st-stats { display: flex; gap: 32px; flex-wrap: wrap; margin-top: 26px; }
.st-stats b { display: block; font-family: var(--f-display); font-size: 2rem; color: var(--brand-text); line-height: 1; }
.st-stats small { color: var(--fg-2); font-size: .85rem; }

@media (max-width: 1100px) {
  .co-friends { width: 220px; left: -60px; bottom: -60px; }
  .co-driver { display: none; }
  .fc-trust { left: -10px; }
  .fc-last { right: -6px; }
}
@media (max-width: 880px) {
  .ph-grid.six { grid-template-columns: repeat(3, 1fr); }
  .fc-trust { top: -18px; left: 8px; }
  .fc-last { right: 8px; bottom: auto; top: 120px; }
  .co-friends { width: 170px; left: auto; right: -8px; bottom: -70px; }
  .board-wrap { margin-top: 20px; margin-bottom: 40px; }
  .hero-vec { right: 0; height: 120px; opacity: .6; }
  .vf-spark2 { display: none; }
  .fc-pay { right: 8px; }
}
@media (max-width: 600px) {
  .rating { grid-template-columns: 1fr; }
  .rv-photos { grid-template-columns: repeat(4, 1fr); }
  .rv-trip { grid-template-columns: 84px 1fr; }
  .rv-trip .slot { height: 70px; }
  .star-input button { width: 42px; height: 42px; }
  .rv-top { flex-wrap: wrap; }
  .rv .stars { margin-left: 0; }
  .co-pack { width: 100px; }
  .vf-ticket { display: none; }
  .ph-grid.masonry { grid-template-columns: 1fr 1fr; grid-auto-rows: 130px; }
}
@media (max-width: 600px) { .co-van { width: 58%; right: 0; bottom: -10%; } .co-friends { right: 0; } }
.rv-top small { display: block; }
.rv-top small .ic { display: inline-block; vertical-align: -2px; margin-right: 2px; }

/* =========================================================
   Top-view vehicle seat map (front at the top, right-hand drive)
   ========================================================= */
.vmap { --maxh: 680px; position: relative; container-type: inline-size; width: min(100%, calc(var(--maxh) * var(--vw) / var(--vh))); aspect-ratio: var(--vw) / var(--vh); max-width: 100%; margin: 30px auto 0; }
.vmap[data-kind="car"] { --maxh: 520px; }
.vmap[data-kind="suv"] { --maxh: 560px; }
.vmap[data-kind="bus"] { --maxh: 980px; }
.vmap.compact { --maxh: 470px; }
.vmap.compact[data-kind="bus"] { --maxh: 600px; }
.vm-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.vs-body { fill: var(--surface); stroke: color-mix(in srgb, var(--fg) 22%, transparent); stroke-width: 2; }
.vs-floor { fill: var(--surface-2); }
.vs-glass { fill: color-mix(in srgb, #5f8fb8 30%, var(--surface)); stroke: color-mix(in srgb, var(--fg) 18%, transparent); stroke-width: 1.5; }
.vs-wheel { fill: var(--fg); opacity: .85; }
.vs-light { fill: #ffd27a; }
.vs-tail { fill: #ef5b4c; }
.vm-photo { position: absolute; inset: 0; z-index: 1; background: none; }
.vm-photo.ph { display: none; }
.vm-photo > img { object-fit: fill; transition: none; }
.vmap:has(.vm-photo.loaded) .vm-seat:not(.taken):not(.sel):not(.you) { background: color-mix(in srgb, var(--surface) 88%, transparent); }
.vmap:has(.vm-photo.loaded) .vm-driver { background: color-mix(in srgb, var(--surface-2) 75%, transparent); }
.vmap:has(.vm-photo.loaded) .vm-door { color: #fff; background: rgba(20,20,20,.55); padding: 2px 5px; border-radius: 4px; }
.vmap:has(.vm-photo.loaded) .vm-svg { opacity: 0; }
.vm-seat { position: absolute; z-index: 2; width: var(--seat); aspect-ratio: 1 / 1.1; transform: translate(-50%, -50%); display: grid; place-items: center; padding: 0; border: 1.5px solid color-mix(in srgb, var(--fg) 25%, transparent); border-radius: 32% 32% 20% 20%; background: var(--surface); color: var(--fg); font: 700 clamp(.58rem, 5.2cqw, .95rem) / 1 var(--f-body); box-shadow: 0 2px 4px rgba(0,0,0,.08); }
.vm-seat::after { content: ''; position: absolute; left: 14%; right: 14%; bottom: 7%; height: 16%; border-radius: 4px; background: currentColor; opacity: .14; }
button.vm-seat { cursor: pointer; transition: transform .12s, background .15s, border-color .15s; }
button.vm-seat:hover { transform: translate(-50%, -50%) scale(1.08); border-color: var(--brand-text); }
.vm-seat.prem { border-style: dashed; border-color: var(--brand); }
.vm-seat.taken { background: var(--taken-bg); border-color: var(--taken-line); color: var(--taken-fg); }
.vm-seat.blocked { background: repeating-linear-gradient(45deg, var(--surface-2) 0 5px, var(--surface) 5px 10px); color: var(--muted); }
.vm-seat.sel, .vm-seat.you { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.vm-seat.match { border-color: var(--brand-text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.vm-seat .sm-heart { top: -8px; right: -8px; }
.vm-driver { background: var(--surface-2); color: var(--muted); border-style: solid; }
.vm-driver .ic { width: 62%; height: 62%; }
.vm-door { position: absolute; z-index: 2; transform: translate(-50%, -50%); font-size: .58rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.vm-front { position: absolute; z-index: 3; left: 50%; top: -28px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 4px; font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.vm-front .ic { width: 13px; height: 13px; transform: rotate(-90deg); }
.board .vmap { margin-top: 26px; }

/* ---------- custom dropdown ---------- */
.dd-native { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0; pointer-events: none; }
.dd-wrap { position: relative; }
.search label.dd-wrap { cursor: pointer; }
.search label.dd-open { background: var(--surface-2); }
.dd-btn { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-width: 0; padding: 0; border: 0; background: none; font: inherit; font-weight: 600; color: var(--fg); text-align: left; cursor: pointer; }
.dd-btn:focus-visible { outline: none; }
.dd-wrap:has(.dd-btn:focus-visible) { box-shadow: 0 0 0 2.5px var(--brand); border-radius: 16px; }
.dd-val { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* option pictures (e.g. trip covers on the check-in page) */
.dd-thumb { flex: none; width: 46px; height: 34px; border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.dd-thumb-ic { display: grid; place-items: center; color: var(--muted); }
.dd-thumb-ic .ic { width: 18px; height: 18px; }
.dd-btn .dd-thumb { width: 40px; height: 30px; border-radius: 7px; }
.dd-btn .dd-val { flex: 1; min-width: 0; }
.dd-has-thumb .dd-field { padding-block: 8px; }
.dd-has-thumb .dd-opt { padding: 7px 10px; }
.dd-opt .dd-txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-any { color: var(--fg-2); }
.dd-chev { width: 18px; height: 18px; color: var(--muted); transition: transform .2s; }
.dd-open .dd-chev { transform: rotate(180deg); color: var(--brand-text); }
.dd-pill { display: inline-flex; width: auto; gap: 6px; padding: 8px 12px 8px 14px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--surface); font-size: .9rem; }
.dd-pill:hover, .dd-open .dd-pill { border-color: var(--fg); }
.like-pick.dd-wrap, label.dd-wrap:has(.dd-pill) { display: inline-flex; }
.dd-pop { position: absolute; z-index: 80; top: calc(100% + 10px); left: 0; width: max(100%, 280px); max-width: calc(100vw - 24px); background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 24px 60px -18px rgba(40, 20, 10, .35), 0 2px 6px rgba(0,0,0,.06); padding: 8px; cursor: default; animation: ddIn .16s ease-out; text-transform: none; letter-spacing: 0; }
@keyframes ddIn { from { opacity: 0; transform: translateY(-6px); } }
.dd-search { display: flex; align-items: center; gap: 8px; padding: 10px 12px; margin-bottom: 6px; border-radius: 14px; background: var(--surface-2); }
.dd-search .ic { color: var(--muted); width: 18px; height: 18px; }
.dd-search input { border: 0; background: none; outline: none; width: 100%; min-width: 0; font: inherit; font-weight: 500; color: var(--fg); }
.dd-list { max-height: 300px; overflow-y: auto; display: grid; gap: 2px; overscroll-behavior: contain; }
.dd-opt { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; cursor: pointer; font-weight: 600; font-size: .95rem; color: var(--fg); }
.dd-opt.active { background: var(--surface-2); }
.dd-opt[aria-selected="true"] { background: var(--saffron-soft); color: var(--brand-text); }
.dd-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2); color: var(--fg-2); flex: none; }
.dd-opt.active .dd-ic { background: var(--surface); }
.dd-opt[aria-selected="true"] .dd-ic { background: var(--surface); color: var(--brand-text); }
.dd-ic .ic { width: 17px; height: 17px; }
.dd-txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-opt small { color: var(--muted); font-weight: 500; font-size: .8rem; white-space: nowrap; }
.dd-tick { width: 18px; height: 18px; color: var(--brand-text); }
.dd-empty { padding: 14px; color: var(--muted); text-align: center; font-size: .9rem; }
@media (max-width: 600px) {
  .dd-pop { width: min(300px, calc(100vw - 32px)); }
}
/* friends cut-out: overlap the card's lower-left edge, not its text */
.co-friends { width: 270px; left: -235px; right: auto; bottom: -56px; z-index: 2; }
@media (max-width: 1100px) { .co-friends { width: 210px; left: -150px; bottom: -70px; } }
@media (max-width: 880px) { .co-friends { width: 150px; left: auto; right: -4px; bottom: auto; top: -108px; z-index: 0; } .board-wrap { margin-top: 110px; } }

/* form-style dropdown */
.dd-field { padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); font-weight: 500; min-height: 48px; }
.dd-field:hover, .dd-open .dd-field { border-color: var(--fg); }
.dd-wrap:has(.dd-field:focus-visible) { box-shadow: none; }
.dd-field:focus-visible { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.co-driver { width: 190px; left: -96px; bottom: 0; }
.drive-in h1 { max-width: 11ch; }
@media (max-width: 1100px) { .co-driver { display: none; } }

.drive-in > div:first-child { position: relative; z-index: 2; }
.drive-in > div:first-child p { max-width: 30rem; }
.co-driver { width: 175px; left: -62px; bottom: 0; z-index: 0; }
.co-driver { width: 165px; left: -140px; }
@media (max-width: 1250px) { .co-driver { display: none; } }
.calc .loan-note { font-size: .88rem; color: var(--muted); margin: 14px 0 0; }

/* ================= HOME HERO v2: marketplace ================= */
.hero h1 { max-width: 13ch; }
.who { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; }
.who-q { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.who button { display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px 9px 11px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--fg); font: inherit; font-weight: 600; font-size: .92rem; cursor: pointer; transition: border-color .15s, background .15s, transform .15s; }
.who button .ic { width: 17px; height: 17px; color: var(--muted); }
.who button:hover { border-color: var(--fg); }
.who button[aria-checked="true"] { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.who button[aria-checked="true"] .ic { color: var(--brand); }
.who button:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 35%, transparent); }
.who-line { display: flex; gap: 8px; align-items: flex-start; min-height: 2.9em; margin: 0 0 18px; color: var(--fg-2); font-size: .95rem; max-width: 52ch; }
.who-line .ic { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--ok, #12805c); }
.who-line b { color: var(--fg); }

.mk-wrap { position: relative; }
.mk { position: relative; z-index: 1; background: var(--surface); border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow-lg); padding: 22px; }
.mk-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.mk-head h3 { font-size: 1.15rem; }
.mk-hosts { display: flex; align-items: center; flex: none; }
.mk-hosts > * { margin-left: -10px; border: 2.5px solid var(--surface); border-radius: 50%; }
.mk-more { display: grid; place-items: center; width: 36px; height: 36px; background: var(--surface-2); font-size: .78rem; font-weight: 700; }
.mk-types { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 16px 0 6px; }
.mk-types span { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 14px; background: var(--surface-2); font-size: .82rem; line-height: 1.25; }
.mk-types small { color: var(--muted); }
.mk-list { display: grid; }
.mk-row { display: grid; grid-template-columns: 74px 1fr auto; gap: 12px; align-items: center; padding: 12px 6px; border-top: 1px solid var(--line); color: inherit; text-decoration: none; border-radius: 14px; transition: background .15s; animation: feedIn .35s both; }
.mk-row:first-child { border-top: 0; }
.mk-row:hover { background: var(--surface-2); }
.mk-veh { width: 74px; height: 52px; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.mk-veh img { width: 100%; height: 100%; object-fit: cover; }
.mk-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mk-main > b { font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-main > small { color: var(--muted); font-size: .8rem; }
.mk-own { display: flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--fg-2); margin-top: 3px; min-width: 0; }
.mk-own > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-own .star { width: 12px; height: 12px; color: var(--brand); vertical-align: -1px; }
.mk-own em { font-style: normal; color: var(--brand-text); font-weight: 600; }
.mk-side { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; text-align: right; }
.mk-side b { font-size: .98rem; }
.mk-side small { color: var(--muted); font-size: .74rem; }
.mk-side small.hot { color: var(--brand-text); font-weight: 700; }
.mk-fill { width: 64px; height: 5px; border-radius: 9px; background: var(--surface-2); overflow: hidden; margin-top: 5px; }
.mk-fill i { display: block; height: 100%; background: var(--brand); border-radius: inherit; }
.co-van { position: absolute; z-index: 2; width: 230px; left: -150px; bottom: -40px; pointer-events: none; filter: drop-shadow(0 18px 18px rgba(40, 20, 10, .18)); }
@media (max-width: 1100px) { .co-van { width: 170px; left: -90px; bottom: -50px; } }
@media (max-width: 880px) { .co-van { display: none; } }
@media (max-width: 520px) {
  .mk { padding: 16px; border-radius: 22px; }
  .mk-head h3 { font-size: 1rem; }
  .mk-types { grid-template-columns: repeat(2, 1fr); }
  .mk-row { grid-template-columns: 56px 1fr auto; gap: 10px; padding: 11px 2px; }
  .mk-veh { width: 56px; height: 44px; }
  .who-q { width: 100%; }
  .who button { padding: 8px 12px 8px 10px; font-size: .88rem; }
}

/* ways to travel */
.ways-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.way { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; color: inherit; text-decoration: none; transition: transform .2s, box-shadow .2s; }
.way:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.way-img { display: block; aspect-ratio: 16 / 10; background: var(--surface-2); }
.way-img img { width: 100%; height: 100%; object-fit: cover; }
.way-body { display: flex; flex-direction: column; gap: 10px; padding: 18px 18px 20px; flex: 1; }
.way-t { display: flex; align-items: center; gap: 8px; font-size: 1.1rem; }
.way-t .ic { width: 20px; height: 20px; color: var(--brand-text); }
.way q { color: var(--muted); font-style: italic; font-size: .92rem; }
.way ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; font-size: .9rem; color: var(--fg-2); flex: 1; }
.way li { display: flex; gap: 8px; align-items: flex-start; }
.way li .ic { flex: none; width: 16px; height: 16px; margin-top: 3px; color: var(--ok, #12805c); }
.way .link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.way .link .ic { width: 16px; height: 16px; }
@media (max-width: 1000px) { .ways-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .ways-grid { grid-template-columns: 1fr; } .way { flex-direction: row; } .way-img { width: 38%; aspect-ratio: auto; flex: none; } .way-body { padding: 14px; gap: 7px; } .way ul { font-size: .84rem; } }

/* the maths */
.maths { display: grid; grid-template-columns: .8fr 2fr; gap: 28px; align-items: center; background: var(--warm); border-radius: 28px; padding: clamp(22px, 4vw, 40px); }
.maths-q p { color: var(--fg-2); margin-top: 8px; }
.maths-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.m-col { display: flex; flex-direction: column; gap: 6px; padding: 18px; background: var(--surface); border-radius: 20px; border: 1px solid var(--line); }
.m-col small { color: var(--muted); font-weight: 600; font-size: .82rem; }
.m-col b { font-size: 1.35rem; letter-spacing: -.02em; }
.m-col p { color: var(--fg-2); font-size: .88rem; flex: 1; }
.m-col:not(.hi) b { color: var(--muted); }
.m-col.hi { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.m-col.hi small, .m-col.hi p { color: color-mix(in srgb, var(--bg) 72%, transparent); }
.m-col.hi b { color: var(--brand); }
.m-col .btn { margin-top: 6px; align-self: flex-start; }
@media (max-width: 900px) { .maths { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .maths-cols { grid-template-columns: 1fr; } }
/* the van peeks out from behind the card's bottom-right corner, clear of the search bar */
.co-van { width: 190px; left: auto; right: -36px; bottom: -70px; z-index: 0; }
.mk { position: relative; z-index: 1; }
.mk-empty { display: flex; align-items: center; gap: 10px; padding: 18px 4px; color: var(--muted); font-size: .95rem; }
.mk-empty .ic { width: 20px; height: 20px; }
@media (max-width: 880px) { .board-wrap.mk-wrap { margin-top: 8px; } }
@media (max-width: 520px) {
  .mk-main > b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.25; }
  .mk-own > span { white-space: normal; }
}

.owner-note { font-size: .85rem; color: var(--muted); margin: -6px 0 22px; }
.maths-range { display: flex; gap: 8px; align-items: flex-start; margin-top: 14px; padding: 10px 12px; border-radius: 14px; background: var(--surface); font-size: .86rem; color: var(--fg-2); }
.maths-range .ic { flex: none; width: 17px; height: 17px; margin-top: 2px; color: var(--brand-text); }
.maths-range b { color: var(--fg); }

/* ================= ADMIN CONSOLE ================= */
.admin-body { background: var(--surface-2); }
.adm { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.adm-gate { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.adm-gate-card { width: 100%; max-width: 380px; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 32px 24px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; }
.adm-gate-card h1 { margin: 0; font-size: 1.5rem; }
.adm-gate-card p { margin: 0; }
.adm-gate-card .btn { width: 100%; justify-content: center; }
.adm-example { margin: 16px 24px 0; }
/* Page start-up: until the header is drawn (components/shell.js), the content and footer stay
   hidden and a progress line runs under the header, so a page never shows without its header. */
#main, .app-footer, .tabbar { transition: opacity .18s ease; }
.booting #main, .booting .app-footer, .booting .tabbar { opacity: 0; }
.booting .app-header::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: linear-gradient(90deg, transparent, var(--brand) 40%, var(--brand) 60%, transparent); background-size: 50% 100%; background-repeat: no-repeat; animation: page-bar 1.1s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { #main, .app-footer, .tabbar { transition: none; } .booting .app-header::after { animation: none; } }

/* Loading state (components/loading.js): progress bar + placeholders in empty content areas */
.page-bar { position: fixed; top: 0; left: 0; z-index: 200; height: 3px; width: 100%; background: linear-gradient(90deg, transparent, var(--brand) 40%, var(--brand) 60%, transparent); background-size: 50% 100%; background-repeat: no-repeat; animation: page-bar 1.1s ease-in-out infinite; }
.page-bar.done { animation: none; background: var(--brand); transition: opacity .35s ease; opacity: 0; }
@keyframes page-bar { from { background-position: -50% 0; } to { background-position: 150% 0; } }
.is-loading #main :is(div, ul, section, tbody, p)[id]:empty { position: relative; display: block; min-height: 132px; border-radius: 18px; background: var(--surface-2); overflow: hidden; }
.is-loading #main :is(div, ul, section)[id]:empty::before { content: ''; position: absolute; inset: 18px; border-radius: 12px; background: repeating-linear-gradient(180deg, var(--line) 0 14px, transparent 14px 34px); opacity: .55; }
.is-loading #main :is(div, ul, section, tbody, p)[id]:empty::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--bg, #fff) 70%, transparent), transparent); animation: shimmer 1.2s infinite; }
.is-loading #main :is(h1, h2, p, span, b)[id]:empty { display: inline-block; min-width: 9ch; min-height: 1em; border-radius: 6px; background: var(--surface-2); }
@keyframes shimmer { to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .page-bar, .is-loading #main [id]:empty::after { animation: none; } }
.gate-card { max-width: 520px; margin: clamp(40px, 10vh, 110px) auto; padding: 0 16px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.gate-card h1 { margin: 0; font-size: clamp(1.6rem, 4vw, 2.1rem); }
.gate-card p { margin: 0 0 6px; color: var(--fg-2); }
.gate-ic { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; background: var(--brand-soft, var(--surface-2)); color: var(--brand-text); }
.gate-ic .ic { width: 26px; height: 26px; }
.a-doc-img { display: block; width: 100%; max-height: 420px; object-fit: contain; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; }
.adm-side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px; padding: 20px 14px; background: var(--surface); border-right: 1px solid var(--line); overflow-y: auto; z-index: 40; }
.adm-side .logo { padding: 4px 10px; }
.adm-role { margin: 2px 10px 16px; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-text); }
.adm-nav { display: grid; gap: 2px; }
.adm-nav a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 12px; color: var(--fg-2); text-decoration: none; font-weight: 600; font-size: .93rem; }
.adm-nav a .ic { width: 19px; height: 19px; color: var(--muted); }
.adm-nav a:hover { background: var(--surface-2); color: var(--fg); }
.adm-nav a[aria-current="page"] { background: var(--fg); color: var(--bg); }
.adm-nav a[aria-current="page"] .ic { color: var(--brand); }
.adm-nav em { margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 99px; background: var(--brand); color: #fff; font-style: normal; font-size: .74rem; text-align: center; }
.adm-me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 10px 4px; border-top: 1px solid var(--line); }
.adm-me small { display: block; color: var(--muted); font-size: .78rem; }
.adm-av { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--fg); color: var(--bg); font-weight: 700; font-size: .8rem; }
.adm-main { min-width: 0; display: flex; flex-direction: column; }
.adm-top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; padding: 12px clamp(16px, 3vw, 32px); background: color-mix(in srgb, var(--surface-2) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.adm-menu { display: none; }
.adm-search { flex: 1; max-width: 520px; display: flex; align-items: center; gap: 8px; padding: 0 14px; height: 42px; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--line); }
.adm-search:focus-within { border-color: var(--fg); }
.adm-search .ic { width: 18px; height: 18px; color: var(--muted); }
.adm-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; color: var(--fg); }
.adm-top-r { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.adm-date { color: var(--muted); font-size: .88rem; white-space: nowrap; }
.adm-content { padding: clamp(18px, 3vw, 32px); display: grid; gap: 18px; align-content: start; max-width: 1360px; width: 100%; }
.adm-scrim { display: none; }

.a-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.a-head h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -.03em; margin-top: 6px; }
.a-head p { color: var(--fg-2); max-width: 70ch; margin-top: 6px; }
.a-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.a-kpis.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.a-kpi { display: flex; flex-direction: column; gap: 4px; padding: 18px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.a-kpi small { color: var(--muted); font-weight: 600; font-size: .82rem; }
.a-kpi b { font-family: 'Bricolage Grotesque', sans-serif; font-size: clamp(1.35rem, 2.4vw, 1.8rem); letter-spacing: -.02em; }
.a-kpi span { color: var(--fg-2); font-size: .84rem; display: inline-flex; align-items: center; gap: 5px; }
.a-kpi span.up { color: var(--ok); }
.a-kpi span .ic { width: 15px; height: 15px; }
.a-kpi.dark { background: var(--ink, #1f1f1f); border-color: var(--ink, #1f1f1f); color: #fff; }
.a-kpi.dark small, .a-kpi.dark span { color: rgba(255,255,255,.66); }
.a-kpi.dark b { color: var(--brand); }
.a-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.a-card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 18px; min-width: 0; }
.a-card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.a-card-h h2 { font-size: 1.08rem; display: flex; align-items: center; gap: 8px; }
.a-count { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 99px; background: var(--brand); color: #fff; font-size: .78rem; }
.a-sub { font-size: .92rem; margin: 18px 0 8px; }
.a-empty { display: flex; align-items: center; gap: 10px; padding: 18px; border-radius: 14px; background: var(--ok-soft); color: var(--ok); font-weight: 600; }
.a-empty .ic { width: 18px; height: 18px; }

.a-todo { display: grid; gap: 6px; }
.a-todo a { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 14px; background: var(--surface-2); color: var(--fg); text-decoration: none; }
.a-todo a:hover { background: var(--warm); }
.a-todo a > .ic:first-child { width: 20px; height: 20px; color: var(--brand-text); }
.a-todo a > .ic:last-child { margin-left: auto; width: 16px; height: 16px; color: var(--muted); }
.a-todo b { font-size: 1.05rem; margin-right: 2px; }
.a-bars { width: 100%; height: auto; display: block; }
.a-bars line { stroke: var(--line); stroke-dasharray: 3 4; }
.a-bars rect { fill: color-mix(in srgb, var(--brand) 30%, var(--surface-2)); }
.a-bars rect.now { fill: var(--brand); }
.a-bars text { font-size: 11px; fill: var(--muted); text-anchor: middle; font-family: inherit; }
.a-bars text.v { fill: var(--fg); font-weight: 700; }
.a-fleet { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.a-fleet div { padding: 12px; border-radius: 14px; background: var(--surface-2); }
.a-fleet b { display: block; font-size: 1.4rem; font-family: 'Bricolage Grotesque', sans-serif; }
.a-fleet small { color: var(--muted); }
.a-log { display: grid; }
.a-log div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: .88rem; }
.a-log div:first-child { border-top: 0; }
.a-log small { color: var(--muted); white-space: nowrap; }

/* tables */
.a-table-wrap { overflow-x: auto; margin: 0 -6px; padding: 0 6px; }
.a-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.a-table th { text-align: left; font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.a-table td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.a-table tr:last-child td { border-bottom: 0; }
.a-table td > small, .a-table td b + small { display: block; color: var(--muted); font-size: .78rem; margin-top: 2px; }
.a-table.dense td { padding: 9px 10px; }
.a-table tr.click { cursor: pointer; }
.a-table tr.click:hover td { background: var(--surface-2); }
.a-table tr.click:focus-visible td { background: var(--warm); }
.a-table code { font-size: .82rem; background: var(--surface-2); padding: 3px 7px; border-radius: 8px; }
.a-table .stars .ic { width: 14px; height: 14px; }
.a-table .star { width: 14px; height: 14px; color: var(--brand); vertical-align: -2px; }
.a-text { max-width: 360px; color: var(--fg-2); }
.a-wrap { white-space: normal; }
.a-wrap .pill-s { margin: 2px 0; }
.muted-row td { opacity: .45; }
.a-chev { width: 16px; height: 16px; color: var(--muted); transform: rotate(-90deg); }
.a-who { display: inline-flex; align-items: center; gap: 9px; min-width: 0; }
.a-who b { display: block; white-space: nowrap; }
.a-who small { display: block; color: var(--muted); font-size: .78rem; white-space: nowrap; }
.a-who small .star { width: 12px; height: 12px; }
.a-fill { position: relative; display: block; width: 92px; height: 6px; border-radius: 9px; background: var(--surface-2); }
.a-fill i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: var(--brand); }
.a-fill b { position: absolute; top: -3px; width: 2px; height: 12px; background: var(--fg); border-radius: 2px; }
.pill-s { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 99px; font-size: .74rem; font-weight: 700; white-space: nowrap; }
.pill-s.ok { background: var(--ok-soft); color: var(--ok); }
.pill-s.wait { background: var(--saffron-soft, #fff3d6); color: var(--fg); }
.pill-s.bad { background: var(--coral-soft); color: var(--coral); }
.pill-s.done { background: var(--surface-2); color: var(--fg-2); }
.pill-s.brand { background: var(--brand); color: #fff; }
.pill-s.soft { background: var(--warm); color: var(--brand-text); }
.btn-s { padding: 7px 12px; font-size: .82rem; min-height: 0; }
.a-danger { color: var(--coral); }
.a-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.a-actions .btn[disabled] { opacity: .45; cursor: not-allowed; }

.a-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.a-tabs button { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 99px; border: 1.5px solid var(--line); background: var(--surface); font: inherit; font-weight: 600; font-size: .88rem; color: var(--fg); cursor: pointer; white-space: nowrap; }
.a-tabs button span { font-size: .76rem; color: var(--muted); }
.a-tabs button[aria-selected="true"] { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.a-tabs button[aria-selected="true"] span { color: var(--brand); }

/* applications */
.a-apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.a-app { display: flex; flex-direction: column; gap: 14px; padding: 16px; border-radius: 18px; border: 1px solid var(--line); background: var(--bg); }
.a-app-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.a-app-top .a-who { flex: 1; align-items: flex-start; }
.a-app-top .a-who small { white-space: normal; overflow-wrap: anywhere; line-height: 1.45; }
.a-app-top .pill-s { flex: none; }
.a-refresh .ic { width: 16px; height: 16px; }
.a-refresh.busy .ic { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.a-app-veh { display: flex; gap: 12px; align-items: center; }
.a-app-veh .slot { width: 92px; height: 64px; border-radius: 12px; overflow: hidden; flex: none; background: var(--surface-2); }
.a-app-veh .slot img { width: 100%; height: 100%; object-fit: cover; }
.a-app-veh small { display: block; color: var(--muted); font-size: .8rem; }
.a-imgs { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.a-img { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); transition: opacity .2s; }
.a-img.busy { opacity: .55; pointer-events: none; }
.a-img .slot { aspect-ratio: 16 / 9; border-radius: 12px; background: var(--surface-2); }
.a-img .slot img { object-fit: contain; }
.a-img b { display: block; }
.a-img small { color: var(--muted); font-size: .8rem; }
.a-img-acts { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.a-img-acts label.btn { cursor: pointer; }
.a-docs { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.a-docs li { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 10px; background: var(--surface-2); font-size: .86rem; }
.a-docs li .ic { width: 15px; height: 15px; }
.a-docs li small { margin-left: auto; font-weight: 600; font-size: .76rem; }
.a-docs li.ok .ic, .a-docs li.ok small { color: var(--ok); }
.a-docs li.check .ic, .a-docs li.check small { color: var(--brand-text); }
.a-docs li.missing .ic, .a-docs li.missing small { color: var(--coral); }
.a-done-line { font-size: .88rem; color: var(--fg-2); }
.a-done-line .link { background: none; border: 0; font: inherit; cursor: pointer; }

/* reports */
.a-reports { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.a-rep { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 18px; border: 1px solid var(--line); background: var(--bg); }
.a-rep.closed { opacity: .6; }
.a-rep-h { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: center; }
.a-rep-h small { grid-column: 1 / -1; color: var(--muted); font-size: .8rem; }
.a-rep p { color: var(--fg-2); font-size: .9rem; }
.a-closed { display: flex; align-items: center; gap: 6px; color: var(--ok) !important; font-weight: 600; }
.a-closed .ic { width: 16px; height: 16px; }
.a-closed .link { margin-left: auto; background: none; border: 0; font: inherit; cursor: pointer; }

/* settings */
.a-field { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.a-card-h + .a-field { border-top: 0; }
.a-field > span:first-child { min-width: 0; }
.a-field b { display: block; }
.a-field small { display: block; color: var(--muted); font-size: .82rem; margin-top: 2px; }
.a-num { display: flex; align-items: center; gap: 6px; flex: none; }
.a-num input { width: 84px; padding: 9px 10px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); font: inherit; font-weight: 700; color: var(--fg); text-align: right; }
.a-num input:focus { outline: 0; border-color: var(--brand); }
.a-num em { font-style: normal; color: var(--muted); font-size: .85rem; min-width: 38px; }
.a-switch { position: relative; flex: none; width: 46px; height: 28px; }
.a-switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.a-switch i { position: absolute; inset: 0; border-radius: 99px; background: var(--line); transition: background .2s; }
.a-switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.a-switch input:checked + i { background: var(--brand); }
.a-switch input:checked + i::after { transform: translateX(18px); }
.a-switch input:focus-visible + i { box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 30%, transparent); }
.a-save { grid-column: 1 / -1; display: flex; justify-content: flex-end; align-items: center; gap: 14px; flex-wrap: wrap; }

/* drawer */
.adm-drawer { position: fixed; z-index: 90; top: 0; right: 0; bottom: 0; width: min(520px, 100vw); display: flex; flex-direction: column; background: var(--surface); box-shadow: -20px 0 60px rgba(30, 15, 5, .18); animation: drIn .22s ease-out; }
.adm-drawer[hidden] { display: none; }
@keyframes drIn { from { transform: translateX(30px); opacity: 0; } }
body.dr-open .adm-scrim, body.nav-open .adm-scrim { display: block; position: fixed; inset: 0; z-index: 80; background: rgba(20, 12, 6, .35); }
.dr-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 20px 20px 14px; border-bottom: 1px solid var(--line); }
.dr-h h2 { font-size: 1.3rem; margin: 4px 0; }
.dr-body { flex: 1; overflow-y: auto; padding: 16px 20px; }
.dr-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.dr-stats div { padding: 12px; border-radius: 14px; background: var(--surface-2); }
.dr-stats small { display: block; color: var(--muted); font-size: .76rem; }
.dr-stats b { display: block; font-size: 1.1rem; margin: 2px 0; }
.dr-owner { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; }
.dr-map { max-width: 260px; margin: 0 auto; }
.dr-pax { list-style: none; padding: 0; margin: 0; display: grid; }
.dr-pax li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); font-size: .88rem; }
.dr-pax li > span:first-child { width: 56px; color: var(--muted); font-size: .8rem; }
.dr-pax li > small { margin-left: auto; font-weight: 600; }
.dr-foot { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); }
.dr-person { display: flex; align-items: center; gap: 14px; min-width: 0; }
.dr-person h2 { overflow-wrap: anywhere; }
.dr-person p { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.dr-rows { display: grid; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.dr-row { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 10px 14px; font-size: .9rem; }
.dr-row + .dr-row { border-top: 1px solid var(--line); }
.dr-row > span { color: var(--muted); }
.dr-row > b { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.dr-row small { color: var(--muted); font-weight: 400; }
.dr-veh-img { display: block; width: 100px; height: 66px; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.dr-veh-img img { width: 100%; height: 100%; object-fit: cover; }
.dr-docs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.dr-doc { margin: 0; display: grid; gap: 6px; }
.dr-doc .a-doc-img { height: 150px; max-height: none; object-fit: cover; }
.dr-doc figcaption { display: grid; gap: 1px; font-size: .84rem; }
.dr-doc figcaption small { color: var(--muted); font-size: .76rem; }
.dr-doc-missing { display: grid; place-items: center; height: 150px; border: 1.5px dashed var(--line); border-radius: 14px; color: var(--muted); }
.dr-doc-missing .ic { width: 26px; height: 26px; }
@media (max-width: 480px) { .dr-docs { grid-template-columns: 1fr; } .dr-row { grid-template-columns: 96px 1fr; } }
.dr-foot .btn-sun { margin-left: auto; }

@media (max-width: 1180px) { .a-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .a-grid { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .adm { grid-template-columns: 1fr; }
  .adm-side { position: fixed; left: 0; top: 0; bottom: 0; width: 270px; transform: translateX(-102%); transition: transform .22s ease; z-index: 85; box-shadow: 20px 0 50px rgba(0,0,0,.15); }
  body.nav-open .adm-side { transform: none; }
  .adm-menu { display: inline-grid; }
  .adm-date { display: none; }
}
@media (max-width: 600px) {
  .adm-top { gap: 8px; padding: 10px 12px; }
  .adm-top-r .btn { display: none; }
  .a-kpis, .a-kpis.three { grid-template-columns: 1fr 1fr; gap: 10px; }
  .a-kpis.three .a-kpi:first-child { grid-column: 1 / -1; }
  .a-kpi { padding: 14px; }
  .a-card { padding: 14px; border-radius: 18px; }
  .a-fleet { grid-template-columns: repeat(2, 1fr); }
  .a-apps, .a-reports { grid-template-columns: 1fr; }
  .dr-stats { grid-template-columns: 1fr 1fr; }
  .a-field { flex-wrap: wrap; }
  .a-head .btn { width: 100%; justify-content: center; }
}
@media (max-width: 600px) {
  .adm-search { min-width: 0; }
  .adm-top-r { flex: none; gap: 6px; }
  .adm-top > .icon-btn, .adm-top-r .icon-btn { flex: none; }
  .a-apps, .a-reports { grid-template-columns: minmax(0, 1fr); }
  .a-app-top { flex-wrap: wrap; }
}
@media (max-width: 600px) {
  .a-table-wrap { overflow: visible; margin: 0; padding: 0; }
  .a-table thead { display: none; }
  .a-table, .a-table tbody { display: block; }
  .a-table tr { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .a-table tr:last-child { border-bottom: 0; }
  .a-table td, .a-table.dense td { display: block; padding: 0; border: 0; }
  .a-table td:first-child { flex: 1 1 100%; }
  .a-table td:empty { display: none; }
  .a-table tr.click:hover td { background: none; }
  .a-table .a-chev { display: none; }
  .a-text { max-width: none; }
  .a-who b, .a-who small { white-space: normal; }
}

/* ---------- booking window: notices, cancel dialog ---------- */
.notice { display: flex; gap: 10px; align-items: start; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); color: var(--fg-2); font-size: .9rem; }
.notice .ic { margin-top: 3px; color: var(--fg); }
.notice b { color: var(--fg); }
.notice.bad { background: var(--coral-soft); }
.notice.bad .ic { color: var(--coral); }
.status.bad { background: var(--coral-soft); color: var(--coral); }
.row-note { color: var(--muted) !important; font-size: .84rem !important; margin-top: 4px; }
.up-acts { grid-column: 1 / -1; display: flex; justify-content: end; flex-wrap: wrap; gap: 8px; }
.up-trip.cancelled h3, .up-trip.cancelled .money b { color: var(--muted); }
/* on the road: waiting for "Complete trip" */
.up-trip.departed { margin: 4px -12px; padding: 14px 12px; border-radius: 16px; border-bottom: 0; background: var(--saffron-soft); }
.up-trip.departed .row-note b { color: var(--brand-text); }
.up-trip.completed .row-note b { color: var(--ok); }
.up-trip.completed .strip { opacity: .55; }
.hold.closed { background: var(--surface-2); }
.btn-danger { background: var(--coral); color: #fff; }
.btn-danger:hover { filter: brightness(1.06); }
.chk-top { align-items: start; line-height: 1.5; }
.chk-top input { margin-top: 2px; flex: none; }
.dlg { border: 0; padding: 0; border-radius: var(--r); background: var(--surface); color: var(--fg); width: min(480px, calc(100vw - 32px)); max-height: calc(100vh - 32px); box-shadow: var(--shadow-lg); }
.dlg::backdrop { background: rgba(10, 10, 10, .55); }
.dlg form { display: grid; gap: 16px; padding: 24px; }
.dlg h2 { font-size: 1.4rem; }
.dlg-body { display: grid; gap: 12px; font-size: .94rem; }
.dlg-body .lines { padding: 12px 14px; border-radius: 14px; background: var(--surface-2); }
.dlg-acts { display: flex; gap: 10px; justify-content: end; flex-wrap: wrap; }
/* sign-in, interests and phone pop-ups (components/auth.js) */
.auth-dlg { width: min(420px, calc(100vw - 24px)); overflow: visible; animation: authIn .22s ease-out; }
.auth-dlg::backdrop { background: rgba(14, 10, 8, .55); backdrop-filter: blur(3px); }
@keyframes authIn { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.auth-dlg-in { position: relative; display: grid; gap: 14px; padding: 30px 26px 24px; text-align: center; }
.auth-dlg h2 { font-size: 1.5rem; letter-spacing: -.02em; }
.auth-dlg .muted { font-size: .92rem; line-height: 1.55; margin-top: -6px; }
.auth-x { position: absolute; top: 10px; right: 10px; }
.auth-logo { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 2px; }
.auth-logo .logo-mark { width: 52px; height: 52px; }
.auth-logo-soft { border-radius: 18px; background: var(--saffron-soft); color: var(--brand-text); }
.auth-logo-soft .ic { width: 26px; height: 26px; }
.auth-legal { font-size: .76rem; color: var(--muted); line-height: 1.5; }
.auth-owner { display: flex; align-items: center; justify-content: center; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); font-size: .86rem; color: var(--fg-2); }
.auth-owner .ic { width: 18px; height: 18px; color: var(--brand-text); }
.auth-chips { justify-content: center; margin: 2px 0 4px; }
.auth-chips .chip { cursor: pointer; padding: 9px 14px; font-size: .9rem; transition: background .15s, color .15s, transform .1s; }
.auth-chips .chip:active { transform: scale(.96); }
.chip[aria-pressed="true"] { background: var(--brand); color: var(--on-brand); }
.auth-acts { display: flex; gap: 10px; justify-content: space-between; }
.auth-acts .btn { flex: 1; }
.auth-form-step { display: grid; gap: 12px; text-align: left; }
.auth-form-step .link { justify-self: center; }
.auth-err { margin: -2px 0 0; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, #d92d20 10%, var(--bg)); color: #b42318; font-size: .86rem; font-weight: 600; line-height: 1.45; text-align: left; }
[data-mode="dark"] .auth-err { color: #fda29b; }
.auth-row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.auth-row .link:disabled { opacity: .6; }
.btn-spin { width: 16px; height: 16px; margin-right: 8px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; display: inline-block; vertical-align: -3px; animation: spin .7s linear infinite; }
.auth-dlg.busy .auth-x { pointer-events: none; opacity: .4; }
/* the owner registration page (/join/) */
.j-intro { margin: -4px 0 4px; }
.j-traveller { font-size: .86rem; color: var(--fg-2); padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
@media (max-width: 520px) { .dlg-acts .btn { flex: 1 1 100%; } }

/* ---------- policy pages ---------- */
.legal-hero { background: linear-gradient(180deg, var(--warm), var(--bg)); padding-block: clamp(40px, 6vw, 64px) 24px; }
.legal-hero h1 { font-size: clamp(2.1rem, 5vw, 3.2rem); margin-top: 10px; }
.legal-hero p { color: var(--fg-2); margin-top: 12px; max-width: 62ch; }
.legal-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; }
.legal-tabs a { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; font-weight: 600; font-size: .9rem; color: var(--fg-2); }
.legal-tabs a[aria-current] { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.legal { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px; padding-block: 32px 72px; }
.legal-toc { position: sticky; top: calc(var(--hd) + 20px); align-self: start; display: grid; gap: 2px; font-size: .88rem; }
.legal-toc b { font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 8px; }
.legal-toc a { text-decoration: none; color: var(--fg-2); padding: 5px 0; }
.legal-toc a:hover { color: var(--brand-text); }
.legal-doc { max-width: 760px; }
.legal-doc section { scroll-margin-top: calc(var(--hd) + 16px); padding-top: 8px; margin-bottom: 30px; }
.legal-doc h2 { font-size: 1.45rem; margin-bottom: 12px; }
.legal-doc h3 { font-size: 1.05rem; font-family: var(--f-body); letter-spacing: 0; margin: 16px 0 6px; }
.legal-doc p, .legal-doc li { color: var(--fg-2); }
.legal-doc p + p { margin-top: 10px; }
.legal-doc ul, .legal-doc ol { padding-left: 20px; margin: 8px 0 0; display: grid; gap: 6px; }
.legal-doc strong { color: var(--fg); }
.legal-doc a { color: var(--brand-text); }
.legal-note { display: flex; gap: 10px; padding: 14px 16px; border-radius: 14px; background: var(--saffron-soft); color: var(--fg); font-size: .9rem; margin-bottom: 28px; }
.legal-note .ic { margin-top: 3px; color: var(--brand-text); }
.legal-key { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 32px; }
.legal-key div { padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.legal-key b { display: block; font-family: var(--f-display); font-size: 1.25rem; }
.legal-key small { color: var(--fg-2); font-size: .86rem; }
.legal-table { width: 100%; border-collapse: collapse; font-size: .92rem; margin-top: 10px; }
.legal-table th, .legal-table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal-table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.legal-table td:last-child { font-weight: 700; color: var(--fg); white-space: nowrap; }
.legal-table .no { color: var(--coral); }
.legal-table .yes { color: var(--ok); }
.legal-meta { color: var(--muted); font-size: .86rem; margin-top: 8px; }
@media (max-width: 900px) {
  .legal { grid-template-columns: 1fr; gap: 20px; }
  .legal-toc { position: static; grid-template-columns: 1fr 1fr; gap: 0 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; }
  .legal-toc b { grid-column: 1 / -1; }
  .legal-table td:last-child { white-space: normal; }
}

/* ---------- paying the host directly ---------- */
.co-direct { display: flex; gap: 12px; align-items: flex-start; margin-top: 14px; padding: 14px 16px; border-radius: 16px; background: var(--saffron-soft); }
.co-direct > .ic { width: 22px; height: 22px; flex: none; color: var(--brand-text); margin-top: 2px; }
.co-direct ol { margin: 6px 0 0; padding-left: 18px; color: var(--fg-2); font-size: .9rem; line-height: 1.55; display: grid; gap: 4px; }
.tk-grid .tk-due b, .tk-due b { color: var(--brand-text); }
.tk-care p + b { margin-top: 12px; }
.ci-pay { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; font-size: .78rem; font-weight: 700; color: var(--muted); }
.ci-pay .ic { width: 13px; height: 13px; }
.ci-pay.due { color: var(--brand-text); }
.ci-pay.ok { color: var(--ok); }
.ci-acts { display: flex; align-items: center; gap: 12px; flex-basis: 100%; justify-content: flex-end; }
.ci-owed { margin: 0 0 12px; }
.ci-money { margin: 0 0 10px !important; font-weight: 600; color: var(--fg) !important; }
.tbl small.pay-due, .tbl td small.muted { display: block; font-size: .74rem; }
.tbl small.pay-due { color: var(--brand-text); font-weight: 700; }
.comm-intro { margin: -4px 0 16px; font-size: .9rem; max-width: 760px; }
.comm-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.comm-grid .tbl td small { display: block; font-size: .74rem; margin-top: 3px; }
.comm-bank { display: grid; gap: 10px; padding: 16px 18px; border-radius: 16px; background: var(--surface-2); font-size: .9rem; }
.comm-bank > b { display: flex; align-items: center; gap: 8px; }
.comm-bank > b .ic { width: 18px; height: 18px; color: var(--fg-2); }
.comm-bank dl { margin: 0; display: grid; gap: 8px; }
.comm-bank dl div { display: grid; gap: 1px; }
.comm-bank dt { color: var(--muted); font-size: .76rem; }
.comm-bank dd { margin: 0; font-weight: 600; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.comm-acct { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.comm-bank small { font-size: .8rem; line-height: 1.5; }
@media (max-width: 860px) { .comm-grid { grid-template-columns: minmax(0, 1fr); } }

/* admin: on/off switches and the commission account form */
.a-payway:first-child { border-top: 0; padding-top: 4px; }
.a-toggle { display: inline-flex; align-items: center; gap: 8px; flex: none; padding: 4px 12px 4px 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); color: var(--fg-2); font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; }
.a-toggle span { width: 34px; height: 20px; border-radius: 999px; background: var(--line); position: relative; transition: background .2s; }
.a-toggle span::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .2s; }
.a-toggle[aria-checked="true"] { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); }
.a-toggle[aria-checked="true"] span { background: var(--ok); }
.a-toggle[aria-checked="true"] span::after { transform: translateX(14px); }
.a-bank { display: grid; gap: 12px; }
.a-bank p { margin: 0; }
.a-small { font-size: .8rem; margin: 10px 0 0; }

/* profile page: get the JoinTrip app (installable web app) */
.ac-app { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; margin-top: 18px; padding: 20px 22px; border-radius: 22px; background: linear-gradient(120deg, var(--saffron-soft), var(--surface) 70%); border: 1px solid color-mix(in srgb, var(--brand) 22%, var(--line)); }
.ac-app-ic { width: 64px; height: 64px; border-radius: 16px; box-shadow: 0 8px 18px -10px var(--brand); }
.ac-app-txt { display: grid; gap: 3px; }
.ac-app-txt .eyebrow { font-size: .68rem; }
.ac-app-txt b { font-size: 1.06rem; }
.ac-app-txt small { color: var(--fg-2); font-size: .86rem; line-height: 1.5; }
.ac-app .btn { white-space: nowrap; }
.ac-app.done { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.ac-app-help { grid-column: 1 / -1; padding: 14px 16px; border-radius: 16px; background: var(--surface); font-size: .9rem; }
.ac-app-help ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.ac-app-help .ic { width: 16px; height: 16px; vertical-align: -3px; }
.ac-app-help small { display: block; margin-top: 8px; color: var(--muted); }
@media (max-width: 560px) {
  .ac-app { grid-template-columns: auto minmax(0, 1fr); padding: 18px; }
  .ac-app-ic { width: 54px; height: 54px; }
  .ac-app .btn { grid-column: 1 / -1; justify-content: center; }
}
