/* Saarthi components. Mobile-first; breakpoints 768 and 1200.
   Motion animates only transform and opacity. */

/* ==== Reset ============================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 80px; }
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul[role="list"], ol[role="list"], .plain { list-style: none; padding: 0; margin: 0; }
img, svg, video { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
[hidden] { display: none !important; }
table { border-collapse: collapse; }

/* ==== Base =============================================================== */
body {
  min-height: 100dvh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: var(--t-16);
  line-height: 1.5;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { line-height: 1.15; font-weight: 600; letter-spacing: -0.01em; }
.display { font-family: var(--font-display); font-weight: 500; font-optical-sizing: auto; letter-spacing: -0.02em; }
.h1 { font-size: clamp(2rem, 6vw, var(--t-48)); }
.h2 { font-size: clamp(1.5rem, 4vw, var(--t-32)); }
.h3 { font-size: var(--t-20); }
.eyebrow { font-size: var(--t-12); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.lead { font-size: var(--t-20); color: var(--ink-2); }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--accent); }
.link { color: var(--road); font-weight: 500; text-decoration: none; }
.link:hover { text-decoration: underline; }
.num, .price { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); }
.small { font-size: var(--t-14); }
.tiny { font-size: var(--t-12); }
.strong { font-weight: 600; }
.mono { font-family: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace; }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
hr, .divider { border: 0; border-top: 1px solid var(--line); margin: var(--s-6) 0; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--accent-soft); color: var(--ink); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--s-4); top: var(--s-2); z-index: 100;
  padding: var(--s-2) var(--s-4); border-radius: var(--r-pill);
  background: var(--ink); color: var(--paper); text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

.icon { width: 20px; height: 20px; flex: none; }
.icon.sm { width: 16px; height: 16px; }
.icon.lg { width: 24px; height: 24px; }
.icon.xl { width: 32px; height: 32px; }

/* ==== Layout helpers ===================================================== */
.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 720px; }
.stack > * + * { margin-top: var(--s-4); }
.stack-2 > * + * { margin-top: var(--s-2); }
.stack-3 > * + * { margin-top: var(--s-3); }
.stack-6 > * + * { margin-top: var(--s-6); }
.stack-8 > * + * { margin-top: var(--s-8); }
.row { display: flex; align-items: center; gap: var(--s-3); }
.row-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.grow { flex: 1 1 auto; min-width: 0; }
.section { padding-block: var(--s-8); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-4); }
.section-title { font-size: var(--t-20); }
.page-head { padding-block: var(--s-8) var(--s-4); }
.page-head .lead { margin-top: var(--s-2); }
.split { display: grid; gap: var(--s-6); }
@media (min-width: 1024px) {
  .split { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; gap: var(--s-10); }
}

/* ==== Brand ============================================================= */
.brand {
  display: inline-flex; align-items: center; gap: var(--s-2);
  text-decoration: none; font-family: var(--font-display); font-weight: 600;
  font-size: var(--t-20); letter-spacing: -0.02em; min-height: var(--tap);
}
.brand-mark { width: 28px; height: 28px; color: var(--ink); }
.brand-mark .arc { stroke: var(--accent); }

/* ==== Top bar / tabs (renter) ========================================== */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-fast) var(--ease);
}
.topbar.is-scrolled { border-bottom-color: var(--line); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); min-height: 64px; }
.topnav { display: none; align-items: center; gap: var(--s-1); }
.topnav a, .menu-link {
  display: inline-flex; align-items: center; gap: var(--s-2);
  min-height: var(--tap); padding-inline: var(--s-3);
  border-radius: var(--r-pill); text-decoration: none; color: var(--ink-2);
  font-weight: 500; font-size: var(--t-14);
}
.topnav a:hover, .menu-link:hover { color: var(--ink); background: var(--paper-2); }
.topnav a[aria-current="page"] { color: var(--ink); background: var(--paper-2); }
.topbar-end { display: flex; align-items: center; gap: var(--s-2); }
.avatar {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-strong); font-weight: 600; font-size: var(--t-14);
}
@media (min-width: 768px) { .topnav { display: flex; } }

.tabbar {
  position: fixed; inset: auto 0 0 0; z-index: 30;
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 56px; text-decoration: none; color: var(--ink-2); font-size: var(--t-12); font-weight: 500;
}
.tabbar a[aria-current="page"] { color: var(--accent); }
.layout-app main { padding-bottom: calc(88px + env(safe-area-inset-bottom)); min-height: 60vh; }
@media (min-width: 768px) {
  .tabbar { display: none; }
  .layout-app main { padding-bottom: var(--s-8); }
}
.site-footer { border-top: 1px solid var(--line); padding-block: var(--s-8) calc(var(--s-8) + 64px); color: var(--ink-2); font-size: var(--t-14); }
@media (min-width: 768px) { .site-footer { padding-bottom: var(--s-8); } }
.site-footer .row-wrap { gap: var(--s-4); }

/* ==== Theme switch ====================================================== */
.theme-switch {
  display: inline-flex; padding: 3px; gap: 2px;
  border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface);
}
.theme-switch button {
  position: relative; display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: var(--r-pill); color: var(--ink-2);
  transition: transform var(--dur-fast) var(--ease);
}
.theme-switch button::after { content: ""; position: absolute; inset: -5px -1px; }
.theme-switch button:hover { color: var(--ink); }
.theme-switch button:active { transform: scale(0.94); }
.theme-switch button[aria-pressed="true"] { background: var(--paper-2); color: var(--ink); }
.theme-switch .icon { width: 18px; height: 18px; }

/* ==== Buttons =========================================================== */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: var(--tap); padding: 0 var(--s-5);
  border: 1px solid transparent; border-radius: var(--r-pill);
  font-weight: 600; font-size: var(--t-16); line-height: 1; text-decoration: none; white-space: nowrap;
  transition: transform var(--dur-fast) var(--ease), opacity var(--dur-fast) var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn:active:not(:disabled) { transform: scale(0.98); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover:not(:disabled) { background: var(--accent-strong); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn-secondary:hover:not(:disabled) { border-color: var(--ink-2); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover:not(:disabled) { background: var(--paper-2); }
.btn-danger { background: var(--surface); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.btn-danger:hover:not(:disabled) { background: var(--bad-soft); }
.btn-road { background: var(--road); color: var(--road-ink); }
.btn-sm { min-height: 36px; padding: 0 var(--s-4); font-size: var(--t-14); }
.btn-lg { min-height: 52px; padding: 0 var(--s-6); font-size: var(--t-16); }
.btn-block { width: 100%; }
.btn .wheel { display: none; width: 18px; height: 18px; }
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading .wheel { display: block; position: absolute; inset: 0; margin: auto; color: var(--accent-ink); animation: spin 900ms linear infinite; }
.btn-secondary.is-loading .wheel, .btn-ghost.is-loading .wheel { color: var(--ink); }
.btn.htmx-request, form.htmx-request .btn[type="submit"] { color: transparent !important; pointer-events: none; }
.btn.htmx-request .wheel, form.htmx-request .btn[type="submit"] .wheel { display: block; position: absolute; inset: 0; margin: auto; color: var(--accent-ink); animation: spin 900ms linear infinite; }
.btn-secondary.htmx-request .wheel, form.htmx-request .btn-secondary .wheel, form.htmx-request .btn-ghost .wheel, form.htmx-request .btn-danger .wheel { color: var(--ink); }
.btn.is-loading .icon, .btn.htmx-request .icon, form.htmx-request .btn[type="submit"] .icon { opacity: 0; }
.icon-btn {
  display: inline-grid; place-items: center; width: var(--tap); height: var(--tap); flex: none;
  border-radius: 50%; color: var(--ink-2);
  transition: transform var(--dur-fast) var(--ease);
}
.icon-btn:hover { color: var(--ink); background: var(--paper-2); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn.on-media { background: color-mix(in srgb, var(--surface) 88%, transparent); color: var(--ink); border: 1px solid var(--line); }

/* ==== Forms ============================================================= */
.field { display: grid; gap: 6px; }
.field-label { font-size: var(--t-14); font-weight: 600; }
.field-hint { font-size: var(--t-12); color: var(--ink-2); }
.field-error { font-size: var(--t-14); color: var(--bad); display: flex; gap: 6px; align-items: center; }
.input {
  width: 100%; min-height: var(--tap); padding: 10px 14px;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line-2); border-radius: var(--r-input);
  font-size: var(--t-16);
  transition: border-color var(--dur-fast) var(--ease);
}
.input::placeholder { color: var(--ink-3); }
.input:hover { border-color: var(--ink-3); }
.input:focus { outline: none; border-color: var(--road); box-shadow: 0 0 0 3px color-mix(in srgb, var(--road) 22%, transparent); }
.input[aria-invalid="true"] { border-color: var(--bad); }
textarea.input { min-height: 96px; resize: vertical; line-height: 1.5; }
select.input {
  appearance: none; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238E897E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.input-group { display: flex; align-items: stretch; }
.input-group .addon {
  display: grid; place-items: center; padding: 0 12px; background: var(--paper-2);
  border: 1px solid var(--line-2); border-right: 0; border-radius: var(--r-input) 0 0 var(--r-input); color: var(--ink-2);
}
.input-group .input { border-radius: 0 var(--r-input) var(--r-input) 0; }
.form-grid { display: grid; gap: var(--s-4); }
@media (min-width: 768px) { .form-grid.two { grid-template-columns: 1fr 1fr; } .form-grid.three { grid-template-columns: repeat(3, 1fr); } }
.form-error {
  display: flex; gap: var(--s-2); align-items: flex-start; padding: var(--s-3) var(--s-4);
  border-radius: var(--r-input); background: var(--bad-soft); color: var(--bad); font-size: var(--t-14);
}

/* switch */
.switch { display: inline-flex; align-items: center; gap: var(--s-3); min-height: var(--tap); cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track {
  position: relative; width: 44px; height: 26px; border-radius: 13px; flex: none;
  background: var(--line-2); transition: background var(--dur-fast) var(--ease);
}
.switch-thumb {
  position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--surface); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform var(--dur-base) var(--ease);
}
.switch input:checked + .switch-track { background: var(--road); }
.switch input:checked + .switch-track .switch-thumb { transform: translateX(18px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--focus); outline-offset: 2px; }
button.switch { padding: 0; }
button.switch[aria-checked="true"] .switch-track { background: var(--road); }
button.switch[aria-checked="true"] .switch-thumb { transform: translateX(18px); }
form.htmx-request button.switch .switch-thumb { opacity: 0.6; }
.chip-edit:hover { text-decoration: underline; text-underline-offset: 3px; }
.cal-day.is-out { visibility: hidden; }

/* check rows (add-ons) */
.check-row {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--s-3);
  min-height: 56px; padding: var(--s-3) var(--s-4); cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--r-input); background: var(--surface);
  transition: border-color var(--dur-fast) var(--ease);
}
.check-row:hover { border-color: var(--line-2); }
.check-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check-box {
  display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px;
  border: 1.5px solid var(--line-2); color: transparent; transition: transform var(--dur-fast) var(--ease);
}
.check-box .icon { width: 14px; height: 14px; }
.check-row:has(input:checked) { border-color: var(--road); background: color-mix(in srgb, var(--road-soft) 50%, var(--surface)); }
.check-row:has(input:checked) .check-box { background: var(--road); border-color: var(--road); color: var(--road-ink); }
.check-row:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.check-text b { display: block; font-weight: 600; font-size: var(--t-16); }
.check-text small { color: var(--ink-2); font-size: var(--t-14); }
.check-price { font-variant-numeric: tabular-nums; font-weight: 600; }

/* segmented */
.segmented { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--r-pill); background: var(--paper-2); border: 1px solid var(--line); }
.segmented > * {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 var(--s-4);
  border-radius: var(--r-pill); color: var(--ink-2); font-weight: 500; font-size: var(--t-14); text-decoration: none;
}
.segmented > [aria-pressed="true"], .segmented > [aria-current="page"], .segmented > :has(input:checked) {
  background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(31, 29, 26, 0.08);
}
.segmented input { position: absolute; opacity: 0; width: 1px; height: 1px; }

/* stars */
.stars { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.stars label { cursor: pointer; color: var(--line-2); display: grid; place-items: center; width: var(--tap); height: var(--tap); transition: transform var(--dur-fast) var(--ease); }
.stars label .icon { width: 32px; height: 32px; }
.stars label:hover, .stars label:hover ~ label, .stars input:checked ~ label { color: var(--warn); }
.stars label:hover .icon, .stars label:hover ~ label .icon, .stars input:checked ~ label .icon { fill: currentColor; }
.stars label:active { transform: scale(0.9); }
.stars input:focus-visible + label { outline: 2px solid var(--focus); border-radius: 8px; }
.rating { display: inline-flex; align-items: center; gap: 4px; font-size: var(--t-14); font-weight: 600; font-variant-numeric: tabular-nums; }
.rating .icon { width: 14px; height: 14px; color: var(--warn); fill: currentColor; }

/* ==== Chips ============================================================= */
.chip {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  min-height: 36px; padding: 0 var(--s-3);
  border: 1px solid var(--line-2); border-radius: var(--r-pill);
  background: var(--surface); color: var(--ink);
  font-size: var(--t-14); font-weight: 500; text-decoration: none; white-space: nowrap;
  transition: transform var(--dur-fast) var(--ease);
}
a.chip:hover, button.chip:hover, label.chip:hover { border-color: var(--ink-2); }
.chip:active { transform: scale(0.97); }
.chip .icon { width: 16px; height: 16px; color: var(--ink-2); }
.chip-sm { min-height: 28px; padding: 0 10px; font-size: var(--t-12); }
.chip-x { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: -6px; border-radius: 50%; color: var(--ink-2); }
.chip-x:hover { background: var(--paper-2); color: var(--ink); }
.chip-filter { cursor: pointer; }
.chip-filter input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip-filter:has(input:checked), .chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip-filter:has(input:checked) .icon, .chip[aria-pressed="true"] .icon { color: var(--paper); }
.chip-filter:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.chip-ask { border-color: color-mix(in srgb, var(--road) 35%, var(--line)); background: var(--road-soft); color: var(--ink); }
.chip-ask .icon { color: var(--road); }
.chip-assumed { font-size: var(--t-12); color: var(--ink-2); font-weight: 500; padding-left: 4px; border-left: 1px solid var(--line-2); margin-left: 2px; }
.chip-status { min-height: 26px; padding: 0 10px; border: 0; font-size: var(--t-12); font-weight: 600; letter-spacing: 0.01em; }
.chip-status .icon { width: 14px; height: 14px; color: currentColor; }
.tone-good { background: var(--good-soft); color: var(--good-ink); }
.tone-warn { background: var(--warn-soft); color: var(--warn-ink); }
.tone-bad { background: var(--bad-soft); color: var(--bad); }
.tone-road { background: var(--road-soft); color: var(--road); }
.tone-muted { background: var(--paper-2); color: var(--ink-2); }
.tone-accent { background: var(--accent-soft); color: var(--accent-strong); }
.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chips-scroll { display: flex; gap: var(--s-2); overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); }
.chips-scroll::-webkit-scrollbar { display: none; }

/* ==== Banner ============================================================ */
.banner {
  display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-4);
  border-radius: var(--r-card); font-size: var(--t-14);
}
.banner .icon { margin-top: 1px; }
.banner b { display: block; font-size: var(--t-16); margin-bottom: 2px; }
.banner.tone-warn { border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); }
.banner.tone-good { border: 1px solid color-mix(in srgb, var(--good) 30%, transparent); }
.banner.tone-bad { border: 1px solid color-mix(in srgb, var(--bad) 30%, transparent); }
.banner.tone-road { border: 1px solid color-mix(in srgb, var(--road) 30%, transparent); }
.pulse-dot { width: 10px; height: 10px; border-radius: 50%; background: currentColor; flex: none; margin-top: 5px; animation: soft-pulse 1.8s var(--ease) infinite; }

/* ==== Cards ============================================================= */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: var(--s-5); }
.card-flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-4); }
.card-head h2, .card-head h3 { font-size: var(--t-16); }
.card-link { display: block; text-decoration: none; transition: transform var(--dur-fast) var(--ease); }
@media (hover: hover) { .card-link:hover { transform: translateY(-2px); } }
.dl { display: grid; gap: var(--s-3); }
.dl > div { display: grid; grid-template-columns: 110px 1fr; gap: var(--s-3); }
.dl dt { color: var(--ink-2); font-size: var(--t-14); }
.dl dd { font-weight: 500; }

/* ==== Composer (Ask Saarthi) =========================================== */
.composer {
  position: relative; display: flex; align-items: center; gap: var(--s-2);
  width: 100%; min-height: 64px; padding: 8px 8px 8px 20px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-pill);
  transition: border-color var(--dur-fast) var(--ease);
  view-transition-name: composer;
}
.composer:focus-within { border-color: var(--road); box-shadow: 0 0 0 4px color-mix(in srgb, var(--road) 16%, transparent); }
.composer > .icon { color: var(--ink-2); }
.composer-field { position: relative; flex: 1; min-width: 0; align-self: stretch; display: flex; align-items: center; }
.composer-input {
  width: 100%; border: 0; outline: none; background: transparent; padding: 0;
  font-size: var(--t-16); min-height: 44px;
}
.composer-ghost {
  position: absolute; inset: 0; display: flex; align-items: center; pointer-events: none;
  color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
}
.composer-ghost.is-out { opacity: 0; transform: translateY(-8px); }
.composer-ghost.is-in { opacity: 0; transform: translateY(8px); }
.composer-input:not(:placeholder-shown) + .composer-ghost { opacity: 0; }
.composer .btn { flex: none; }
.composer-lg { min-height: 72px; }
@media (min-width: 768px) { .composer-lg .composer-input { font-size: var(--t-20); } }
.composer .send-label { display: none; }
@media (min-width: 480px) { .composer .send-label { display: inline; } }
.ask-chips { display: flex; flex-wrap: wrap; gap: var(--s-2); min-height: 0; view-transition-name: chips; }
.ask-chips:empty { display: none; }
.ask-missing { padding: var(--s-4); border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--line); }
.ask-missing p { font-family: var(--font-display); font-size: var(--t-20); margin-bottom: var(--s-3); }
.fly-word {
  position: fixed; z-index: 90; pointer-events: none; white-space: pre;
  font-size: var(--t-16); color: var(--road); font-weight: 600;
  padding: 2px 6px; margin: -2px -6px; border-radius: 6px; background: var(--road-soft);
}
.classic { display: grid; gap: var(--s-3); padding: var(--s-4); border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
@media (min-width: 768px) { .classic { grid-template-columns: 1fr 1.4fr 1fr auto; align-items: end; } }

/* ==== Hero ============================================================== */
.hero { padding-block: var(--s-10) var(--s-6); }
.hero h1 { font-size: clamp(2.5rem, 8vw, 4rem); max-width: 12ch; line-height: 1.02; }
.hero .lead { margin-top: var(--s-3); max-width: 38ch; }
.hero-ask { margin-top: var(--s-8); display: grid; gap: var(--s-3); max-width: 820px; }
@media (min-width: 768px) { .hero { padding-block: var(--s-16) var(--s-8); } }
.hero-art { position: absolute; right: var(--gutter); top: var(--s-12); width: 360px; color: var(--line-2); display: none; }
@media (min-width: 1200px) { .hero-art { display: block; } }
.hero-wrap { position: relative; }

/* ==== Vehicle art & cards ============================================== */
.art { width: 100%; height: 100%; color: var(--ink-2); }
.art svg * { vector-effect: non-scaling-stroke; }
.art svg { width: 100%; height: 100%; }
.art .accent { stroke: var(--accent); }
.tint-scooter, .tint-ev-scooter { background: var(--tint-scooter); }
.tint-bike { background: var(--tint-bike); }
.tint-car { background: var(--tint-car); }
.tint-ev-car { background: var(--tint-ev); }
.tint-cycle { background: var(--tint-cycle); }

.cards { display: grid; gap: var(--s-5); grid-template-columns: 1fr; }
@media (min-width: 560px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .cards.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.cards-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 80%); gap: var(--s-4); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); padding-bottom: var(--s-2); }
.cards-row::-webkit-scrollbar { display: none; }
.cards-row > * { scroll-snap-align: start; }
@media (min-width: 768px) { .cards-row { grid-auto-columns: minmax(260px, 31%); } }

.vcard { position: relative; border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--line); transition: transform var(--dur-base) var(--ease); }
@media (hover: hover) { .vcard:hover { transform: translateY(-2px); } .vcard:hover .vcard-media .art { transform: scale(1.02); } }
.vcard.is-hot { transform: translateY(-2px); border-color: var(--road); }
.vcard-link { display: block; text-decoration: none; color: inherit; border-radius: var(--r-card); }
.vcard-media { position: relative; aspect-ratio: 16 / 10; border-radius: calc(var(--r-card) - 1px) calc(var(--r-card) - 1px) 0 0; overflow: hidden; display: grid; place-items: center; }
.vcard-media .art { padding: 10% 12%; transition: transform var(--dur-slow) var(--ease); }
.vcard-media img { width: 100%; height: 100%; object-fit: cover; }
.vcard-badge { position: absolute; left: 12px; top: 12px; }
.vcard-body { padding: var(--s-4); display: grid; gap: 4px; }
.vcard-top { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-2); }
.vcard-title { font-size: var(--t-16); font-weight: 600; letter-spacing: -0.01em; }
.vcard-meta { font-size: var(--t-14); color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vcard-price { display: flex; align-items: baseline; gap: 6px; margin-top: 6px; }
.vcard-price .price-total { font-family: var(--font-display); font-size: var(--t-24); font-weight: 600; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.vcard-fine { font-size: var(--t-12); color: var(--ink-2); }
.vcard-compare { position: absolute; right: 10px; top: 10px; z-index: 2; margin: 0; }
.vcard-compare [aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ==== Results / map ===================================================== */
.results-layout { display: grid; gap: var(--s-6); }
@media (min-width: 1200px) { .results-layout { grid-template-columns: minmax(0, 1fr) 440px; align-items: start; } }
.results-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; margin-block: var(--s-4); }
.results-count { font-weight: 600; }
.map-wrap { position: sticky; top: 80px; height: calc(100dvh - 104px); border-radius: var(--r-card); overflow: hidden; border: 1px solid var(--line); background: var(--paper-2); }
.map { width: 100%; height: 100%; }
@media (max-width: 1199px) {
  .map-wrap { display: none; position: fixed; inset: 64px 0 0 0; height: auto; border-radius: 0; border: 0; z-index: 25; }
  body.show-map .map-wrap { display: block; }
}
.map-toggle { position: fixed; left: 50%; bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 26; transform: translateX(-50%); box-shadow: var(--shadow-float); }
@media (min-width: 768px) { .map-toggle { bottom: 24px; } }
@media (min-width: 1200px) { .map-toggle { display: none; } }
.pin {
  display: inline-flex; align-items: center; padding: 4px 10px; border-radius: var(--r-pill);
  background: var(--surface); color: var(--ink); border: 1px solid var(--line-2);
  font: 600 13px/1.2 var(--font-ui); font-variant-numeric: tabular-nums; white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12); transform: translate(-50%, -50%);
  transition: transform var(--dur-fast) var(--ease);
}
.pin.is-hot, .pin:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); transform: translate(-50%, -50%) scale(1.08); z-index: 1000 !important; }
.leaflet-container { font-family: var(--font-ui); background: var(--paper-2); }
.leaflet-div-icon { background: none; border: 0; }
.leaflet-control-attribution { font-size: 10px; background: color-mix(in srgb, var(--surface) 80%, transparent) !important; color: var(--ink-2) !important; }
.leaflet-control-attribution a { color: var(--ink-2) !important; }
.leaflet-bar a { background: var(--surface) !important; color: var(--ink) !important; border-color: var(--line) !important; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--surface); color: var(--ink); border-radius: 12px; }

.skeletons { display: none; }
#results.is-waiting .results-cards { display: none; }
#results.is-waiting .skeletons { display: grid; }
.skeleton { border-radius: var(--r-card); border: 1px solid var(--line); background: var(--surface); overflow: hidden; }
.skel { background: var(--paper-2); border-radius: 6px; animation: skel 1.4s var(--ease) infinite; }
.skeleton .skel-media { aspect-ratio: 16 / 10; border-radius: 0; }
.skeleton .skel-lines { padding: var(--s-4); display: grid; gap: 10px; }
.skel-line { height: 12px; }
.skel-line.w-60 { width: 60%; } .skel-line.w-40 { width: 40%; } .skel-line.w-80 { width: 80%; }
.skel-line.tall { height: 22px; width: 35%; }

/* ==== Vehicle detail =================================================== */
.gallery { display: grid; gap: var(--s-2); }
.gallery-hero { position: relative; aspect-ratio: 16 / 10; border-radius: var(--r-card); overflow: hidden; display: grid; place-items: center; }
.gallery-hero .art { padding: 8% 10%; }
.gallery-hero img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: var(--s-2); overflow-x: auto; }
.gallery-thumbs button { width: 88px; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; border: 2px solid transparent; flex: none; }
.gallery-thumbs button[aria-pressed="true"] { border-color: var(--ink); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.detail-title { margin-top: var(--s-5); }
.detail-title h1 { font-size: clamp(1.75rem, 5vw, 2.5rem); }
.specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }
@media (min-width: 768px) { .specs { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.spec { padding: var(--s-4); border: 1px solid var(--line); border-radius: 12px; background: var(--surface); display: grid; gap: 4px; }
.spec .icon { color: var(--ink-2); }
.spec b { font-weight: 600; }
.spec span { font-size: var(--t-12); color: var(--ink-2); }
.included { display: grid; gap: var(--s-2); }
@media (min-width: 768px) { .included { grid-template-columns: 1fr 1fr; } }
.included li { display: flex; gap: var(--s-3); align-items: flex-start; }
.included .icon { color: var(--good); margin-top: 2px; }
.rules li { display: flex; gap: var(--s-3); padding-block: var(--s-3); border-bottom: 1px solid var(--line); }
.rules li:last-child { border-bottom: 0; }
.rules .icon { color: var(--ink-2); margin-top: 2px; }
.shop-card { display: grid; gap: var(--s-3); }
.shop-card .row { align-items: flex-start; }
.shop-logo { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--paper-2); font-family: var(--font-display); font-weight: 600; font-size: var(--t-20); flex: none; }
.mini-map { height: 180px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.review { padding-block: var(--s-4); border-bottom: 1px solid var(--line); }
.review:last-child { border-bottom: 0; }

/* price box */
.pricebox { position: sticky; top: 88px; display: grid; gap: var(--s-4); padding: var(--s-5); border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--line); }
.pricebox-total { display: flex; align-items: baseline; gap: var(--s-2); flex-wrap: wrap; }
.pricebox-total .odo { font-family: var(--font-display); font-size: var(--t-32); font-weight: 600; letter-spacing: -0.02em; }
.pricebox-deposit { font-size: var(--t-14); color: var(--ink-2); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.conflict { padding: var(--s-3) var(--s-4); border-radius: 12px; background: var(--warn-soft); color: var(--warn-ink); font-size: var(--t-14); display: grid; gap: var(--s-2); }
.mobile-bookbar {
  position: fixed; inset: auto 0 calc(56px + env(safe-area-inset-bottom)) 0; z-index: 28;
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  padding: var(--s-3) var(--gutter); background: var(--surface); border-top: 1px solid var(--line);
}
.mobile-bookbar .odo { font-family: var(--font-display); font-size: var(--t-24); font-weight: 600; }
@media (min-width: 768px) { .mobile-bookbar { bottom: 0; } }
@media (min-width: 1024px) { .mobile-bookbar { display: none; } }
.has-bookbar main { padding-bottom: calc(160px + env(safe-area-inset-bottom)) !important; }

/* odometer */
.odo { display: inline-flex; align-items: flex-end; font-variant-numeric: tabular-nums; white-space: nowrap; line-height: 1.15; }
.odo > span { display: inline-flex; align-items: flex-end; }
.odo-digit { display: inline-block; height: 1.15em; line-height: 1.15em; overflow: hidden; position: relative; }
.odo-strip { display: flex; flex-direction: column; will-change: transform; }
.odo-strip > span { height: 1.15em; line-height: 1.15em; text-align: center; }
.odo-char { display: inline-block; height: 1.15em; line-height: 1.15em; }

/* itemised bill */
.bill { display: grid; gap: 0; font-size: var(--t-14); }
.bill-row { display: flex; justify-content: space-between; gap: var(--s-3); padding-block: 8px; }
.bill-row dt { color: var(--ink); }
.bill-row dt small { display: block; color: var(--ink-2); font-size: var(--t-12); }
.bill-row dd { font-variant-numeric: tabular-nums; white-space: nowrap; }
.bill-total { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 12px; font-weight: 600; font-size: var(--t-16); }
.bill-deposit dt, .bill-deposit dd { color: var(--ink-2); }
.bill-pay_now { border-top: 1px dashed var(--line-2); margin-top: 4px; padding-top: 12px; font-weight: 700; font-size: var(--t-16); }
.bill-details summary { list-style: none; display: inline-flex; min-height: 32px; align-items: center; }
.bill-details summary::-webkit-details-marker { display: none; }
.bill-details[open] summary { margin-bottom: 4px; }
.bill-deduct dd { color: var(--bad); }
.bill-refund { border-top: 1px solid var(--line); padding-top: 12px; font-weight: 700; color: var(--good); }

/* ==== Tooltip =========================================================== */
.tip { position: relative; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: var(--ink-3); cursor: help; vertical-align: middle; }
.tip .icon { width: 16px; height: 16px; }
.tip:hover, .tip:focus-visible { color: var(--ink); }
.tip::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%; z-index: 60;
  width: max-content; max-width: 240px; padding: 8px 12px; border-radius: 10px;
  background: var(--ink); color: var(--paper); font-size: var(--t-12); font-weight: 500; line-height: 1.4; text-align: left; white-space: normal;
  opacity: 0; transform: translate(-50%, 4px); pointer-events: none;
  transition: opacity var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.tip:hover::after, .tip:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
.tip.tip-left::after { left: auto; right: -8px; transform: translate(0, 4px); }
.tip.tip-left:hover::after, .tip.tip-left:focus-visible::after { transform: none; }

/* ==== Sheets & dialogs (native <dialog>) =============================== */
dialog { padding: 0; border: 0; background: transparent; color: inherit; max-width: none; max-height: none; }
dialog::backdrop { background: var(--scrim); opacity: 0; transition: opacity var(--dur-base) var(--ease); }
dialog[open].is-shown::backdrop { opacity: 1; }
.sheet { position: fixed; inset: auto 0 0 0; width: 100%; margin: 0; }
.sheet-panel {
  max-height: 92dvh; overflow: auto; overscroll-behavior: contain;
  background: var(--surface); border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  box-shadow: var(--shadow-float); padding-bottom: env(safe-area-inset-bottom);
  transform: translateY(100%); transition: transform var(--dur-slow) var(--ease-enter);
}
.sheet.is-shown .sheet-panel { transform: translateY(0); }
.sheet.is-dragging .sheet-panel { transition: none; }
.sheet-handle { display: grid; place-items: center; height: 24px; cursor: grab; touch-action: none; }
.sheet-handle::before { content: ""; width: 40px; height: 4px; border-radius: 2px; background: var(--line-2); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: 0 var(--s-5) var(--s-3); }
.sheet-head h2 { font-family: var(--font-display); font-size: var(--t-24); font-weight: 500; }
.sheet-body { padding: 0 var(--s-5) var(--s-5); }
.sheet-foot { position: sticky; bottom: 0; padding: var(--s-4) var(--s-5); background: var(--surface); border-top: 1px solid var(--line); display: flex; gap: var(--s-3); }
@media (min-width: 768px) {
  .sheet { inset: 0; display: none; place-items: center; }
  .sheet[open] { display: grid; }
  .sheet-panel { width: min(560px, calc(100vw - 48px)); max-height: 86dvh; border-radius: var(--r-sheet); transform: translateY(24px); opacity: 0; transition: transform var(--dur-slow) var(--ease-enter), opacity var(--dur-base) var(--ease); }
  .sheet.is-shown .sheet-panel { opacity: 1; }
  .sheet.wide .sheet-panel { width: min(960px, calc(100vw - 48px)); }
  .sheet-handle { visibility: hidden; height: 16px; }
}
.dialog { position: fixed; inset: 0; margin: auto; width: min(440px, calc(100vw - 32px)); height: fit-content; }
.dialog-panel {
  background: var(--surface); border-radius: var(--r-sheet); padding: var(--s-6); box-shadow: var(--shadow-float);
  transform: scale(0.96); opacity: 0; transition: transform var(--dur-base) var(--ease-enter), opacity var(--dur-base) var(--ease);
}
.dialog.is-shown .dialog-panel { transform: none; opacity: 1; }
.dialog h2 { font-family: var(--font-display); font-weight: 500; font-size: var(--t-24); margin-bottom: var(--s-2); }
.dialog-actions { display: flex; gap: var(--s-3); justify-content: flex-end; margin-top: var(--s-6); flex-wrap: wrap; }
body.has-modal { overflow: hidden; }

/* ==== Toasts ============================================================ */
.toasts { position: fixed; z-index: 120; left: 50%; bottom: calc(80px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: grid; gap: var(--s-2); width: min(440px, calc(100vw - 32px)); pointer-events: none; }
@media (min-width: 768px) { .toasts { bottom: 24px; } }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: var(--s-3);
  min-height: 52px; padding: 10px 10px 10px 16px; border-radius: 14px;
  background: var(--ink); color: var(--paper); box-shadow: var(--shadow-float); font-size: var(--t-14);
  animation: toast-in var(--dur-slow) var(--ease-enter) both;
}
.toast.is-leaving { animation: toast-out var(--dur-base) var(--ease) both; }
.toast .icon { width: 18px; height: 18px; }
.toast.tone-good .icon { color: var(--good-soft); }
.toast.tone-bad .icon { color: #F4A79F; }
.toast-msg { flex: 1; }
.toast-undo { font-weight: 700; color: var(--accent-soft); padding: 8px 10px; border-radius: 8px; min-height: 36px; }
.toast-undo:hover { background: rgba(255, 255, 255, 0.08); }
.toast .icon-btn { color: var(--paper); width: 36px; height: 36px; }
.toast .icon-btn:hover { background: rgba(255, 255, 255, 0.08); }

/* ==== Empty states ===================================================== */
.empty { display: grid; justify-items: center; text-align: center; gap: var(--s-3); padding: var(--s-12) var(--s-4); }
.empty-art { width: 200px; height: 120px; color: var(--line-2); }
.empty h2, .empty h1 { font-family: var(--font-display); font-weight: 500; font-size: var(--t-24); }
.empty p { color: var(--ink-2); max-width: 42ch; }

/* ==== Status line ======================================================= */
.statusline { display: grid; grid-template-columns: repeat(6, 1fr); counter-reset: s; }
.sl-step { position: relative; display: grid; justify-items: center; gap: 8px; text-align: center; }
.sl-dot {
  position: relative; z-index: 1; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--line-2); color: transparent;
}
.sl-dot .icon { width: 14px; height: 14px; }
.sl-label { font-size: var(--t-12); color: var(--ink-2); line-height: 1.25; max-width: 9ch; }
.sl-line { position: absolute; top: 13px; left: calc(50% + 14px); width: calc(100% - 28px); height: 2px; background: repeating-linear-gradient(90deg, var(--line-2) 0 6px, transparent 6px 10px); }
.sl-fill { position: absolute; inset: 0; background: var(--road); transform-origin: left center; transform: scaleX(0); }
.sl-step.is-done .sl-dot { background: var(--road); border-color: var(--road); color: var(--road-ink); }
.sl-step.is-done .sl-fill { transform: scaleX(1); }
.sl-step.is-done .sl-label { color: var(--ink); }
.sl-step.is-current .sl-dot { border-color: var(--road); background: var(--surface); }
.sl-step.is-current .sl-dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--road); animation: soft-pulse 1.8s var(--ease) infinite; }
.sl-step.is-current .sl-label { color: var(--ink); font-weight: 600; }
.statusline.is-off { opacity: 0.5; }

/* ==== Deposit tracker =================================================== */
.deposit { display: grid; gap: var(--s-4); }
.dep-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; }
.dep-amount { font-family: var(--font-display); font-size: var(--t-32); font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.dep-track { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); padding-top: 44px; }
.dep-rail { position: absolute; left: 12.5%; right: 12.5%; top: 58px; height: 4px; border-radius: 2px; background: var(--paper-2); overflow: hidden; }
.dep-rail-fill { position: absolute; inset: 0; background: var(--good); transform-origin: left; transform: scaleX(0); }
.dep-stop { position: relative; display: grid; justify-items: center; gap: 8px; text-align: center; font-size: var(--t-12); color: var(--ink-2); }
.dep-stop::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line-2); position: relative; z-index: 1; margin-top: 8px; }
.dep-stop.is-done::before { background: var(--good); border-color: var(--good); }
.dep-stop.is-done { color: var(--ink); }
.dep-stop time { display: block; font-size: 11px; color: var(--ink-2); }
.dep-coin {
  position: absolute; top: 0; left: 0; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; font-family: var(--font-display);
  background: radial-gradient(circle at 35% 30%, #F3D58A, #D9A441 60%, #B9852A); color: #5A3E0E;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.15), 0 4px 10px -4px rgba(0, 0, 0, 0.35);
}
.dep-list { display: grid; gap: 6px; font-size: var(--t-14); }
.dep-list > div { display: flex; justify-content: space-between; gap: var(--s-3); }
.dep-list dd { color: var(--bad); font-variant-numeric: tabular-nums; }
.dep-list small { display: block; color: var(--ink-2); font-size: var(--t-12); }

/* ==== Photos ============================================================ */
.photogrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2); }
@media (min-width: 768px) { .photogrid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.photogrid figure { position: relative; border-radius: 12px; overflow: hidden; background: var(--paper-2); aspect-ratio: 4 / 3; }
.photogrid img { width: 100%; height: 100%; object-fit: cover; }
.photogrid figcaption { position: absolute; inset: auto 0 0 0; padding: 18px 8px 6px; font-size: 11px; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, 0.55)); }
.photogrid .missing { display: grid; place-items: center; color: var(--ink-3); font-size: var(--t-12); }

.checkin { display: grid; gap: var(--s-6); }
@media (min-width: 900px) { .checkin { grid-template-columns: 260px 1fr; align-items: start; } }
.silhouette { width: 100%; max-width: 220px; margin-inline: auto; color: var(--ink-2); }
.silhouette .zone { fill: var(--road); opacity: 0; transition: opacity var(--dur-slow) var(--ease); }
.silhouette .zone.is-filled { opacity: 0.85; }
.silhouette .outline { fill: none; stroke: currentColor; stroke-width: 2; }
.silhouette text { font: 600 9px var(--font-ui); fill: var(--ink-2); letter-spacing: 0.06em; }
.angles { display: grid; gap: var(--s-2); }
@media (min-width: 640px) { .angles { grid-template-columns: 1fr 1fr; } }
.angle-tile {
  display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: var(--s-3);
  min-height: 80px; padding: 8px 14px 8px 8px; cursor: pointer;
  border: 1px dashed var(--line-2); border-radius: 14px; background: var(--surface);
  transition: border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.angle-tile:hover { border-color: var(--ink-2); }
.angle-tile:active { transform: scale(0.99); }
.angle-tile:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.angle-thumb { width: 64px; height: 64px; border-radius: 10px; overflow: hidden; display: grid; place-items: center; background: var(--paper-2); color: var(--ink-2); }
.angle-thumb img { width: 100%; height: 100%; object-fit: cover; }
.angle-text b { display: block; }
.angle-text small { color: var(--ink-2); font-size: var(--t-12); }
.angle-check { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line-2); color: transparent; }
.angle-check .icon { width: 14px; height: 14px; }
.angle.is-done .angle-tile { border-style: solid; border-color: color-mix(in srgb, var(--road) 50%, var(--line)); }
.angle.is-done .angle-check { background: var(--road); border-color: var(--road); color: var(--road-ink); }
.angle.is-uploading .angle-thumb { animation: skel 1s var(--ease) infinite; }
.angle.is-error .angle-tile { border-color: var(--bad); }
.checkin-hint { font-size: var(--t-14); color: var(--warn-ink); background: var(--warn-soft); padding: var(--s-3) var(--s-4); border-radius: 12px; }

/* ==== Swipe to confirm ================================================== */
.swipe {
  position: relative; height: 64px; border-radius: var(--r-pill); overflow: hidden;
  background: var(--paper-2); border: 1px solid var(--line); user-select: none; touch-action: pan-y;
}
.swipe-fill { position: absolute; inset: 0; background: var(--road); transform-origin: left; transform: scaleX(0); }
.swipe-label { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 600; color: var(--ink-2); padding-left: 56px; transition: opacity var(--dur-fast) var(--ease); }
.swipe-thumb {
  position: absolute; left: 6px; top: 6px; width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 4px 10px -4px rgba(0, 0, 0, 0.4); cursor: grab; touch-action: none;
}
.swipe-thumb:active { cursor: grabbing; }
.swipe[aria-disabled="true"] { opacity: 0.55; }
.swipe[aria-disabled="true"] .swipe-thumb { background: var(--ink-3); cursor: not-allowed; }
.swipe.is-done .swipe-label { color: var(--road-ink); opacity: 1; }
.swipe.is-done .swipe-thumb { background: var(--surface); color: var(--road); }
.swipe-help { font-size: var(--t-12); color: var(--ink-2); text-align: center; margin-top: var(--s-2); }

/* ==== Tabs & tables ===================================================== */
.tabs { display: flex; gap: var(--s-1); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tab {
  position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 0 var(--s-4);
  color: var(--ink-2); font-weight: 500; text-decoration: none; white-space: nowrap;
}
.tab:hover { color: var(--ink); }
.tab[aria-current="page"], .tab[aria-selected="true"] { color: var(--ink); }
.tab[aria-current="page"]::after, .tab[aria-selected="true"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent); }
.tab-count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--paper-2); font-size: var(--t-12); display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
.table { width: 100%; font-size: var(--t-14); }
.table th { text-align: left; font-size: var(--t-12); font-weight: 600; color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.05em; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--paper-2); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: color-mix(in srgb, var(--paper-2) 50%, transparent); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .actions { text-align: right; white-space: nowrap; }

/* ==== Availability calendar ============================================ */
.cal { display: grid; gap: var(--s-3); }
.cal-head { display: flex; align-items: center; justify-content: space-between; }
.cal-head h3 { font-size: var(--t-16); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.cal-dow { font-size: var(--t-12); color: var(--ink-2); padding-block: 4px; }
.cal-day { position: relative; aspect-ratio: 1; display: grid; place-items: center; border-radius: 10px; font-size: var(--t-14); font-variant-numeric: tabular-nums; }
.cal-day.is-free { color: var(--ink); }
.cal-day.is-busy { color: var(--ink-2); text-decoration: line-through; text-decoration-color: var(--bad); text-decoration-thickness: 1.5px; background: var(--paper-2); }
.cal-day.is-partial::after { content: ""; position: absolute; bottom: 6px; width: 4px; height: 4px; border-radius: 50%; background: var(--warn); }
.cal-day.is-past { color: var(--ink-3); opacity: 0.5; }
.cal-day.is-today { box-shadow: inset 0 0 0 1.5px var(--ink); }
.cal-day.is-picked { background: var(--road-soft); color: var(--road); font-weight: 700; }
.cal-legend { display: flex; flex-wrap: wrap; gap: var(--s-4); font-size: var(--t-12); color: var(--ink-2); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }

/* ==== Date range picker ================================================= */
.drp-trigger {
  display: grid; grid-template-columns: 1fr 1fr; width: 100%; text-align: left;
  border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); overflow: hidden;
}
.drp-trigger:hover { border-color: var(--ink-3); }
.drp-trigger > span { display: grid; gap: 2px; padding: 10px 14px; min-height: 60px; }
.drp-trigger > span + span { border-left: 1px solid var(--line); }
.drp-trigger small { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.drp-trigger b { font-weight: 500; font-size: var(--t-14); }
.drp-native { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); }
.drp.is-enhanced .drp-native { display: none; }
.drp:not(.is-enhanced) .drp-trigger { display: none; }
.drp-months { display: grid; gap: var(--s-6); }
@media (min-width: 768px) { .drp-months { grid-template-columns: 1fr 1fr; } }
.drp-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s-2); }
.drp-month h3 { font-size: var(--t-16); text-align: center; margin-bottom: var(--s-2); }
.drp-grid { position: relative; display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 4px; }
.drp-day {
  position: relative; z-index: 1; height: 44px; display: grid; place-items: center; border-radius: 50%;
  font-size: var(--t-14); font-variant-numeric: tabular-nums; color: var(--ink);
}
.drp-day:hover:not(:disabled) { box-shadow: inset 0 0 0 1.5px var(--ink); }
.drp-day:disabled { color: var(--ink-3); opacity: 0.45; cursor: default; }
.drp-day.is-busy { text-decoration: line-through; text-decoration-color: var(--bad); color: var(--ink-2); }
.drp-day.is-today { font-weight: 700; }
.drp-day.is-start, .drp-day.is-end { background: var(--ink); color: var(--paper); }
.drp-range { position: absolute; z-index: 0; height: 44px; border-radius: 22px; background: var(--road-soft); transform-origin: left center; pointer-events: none; }
.drp-times { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); margin-top: var(--s-5); }
.drp-summary { font-size: var(--t-14); color: var(--ink-2); }
.drp-summary b { color: var(--ink); }

/* ==== Wheel loader ====================================================== */
.loader {
  position: fixed; z-index: 140; left: 50%; top: 76px; transform: translate(-50%, -8px);
  display: flex; align-items: center; gap: 10px; padding: 8px 16px 8px 10px; border-radius: var(--r-pill);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-float);
  font-size: var(--t-14); font-weight: 500; color: var(--ink-2);
  opacity: 0; pointer-events: none; transition: opacity var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.loader.is-on { opacity: 1; transform: translate(-50%, 0); }
.wheel-loader { position: relative; width: 44px; height: 30px; overflow: hidden; }
.wheel-loader .wheel { position: absolute; left: 10px; top: 0; width: 24px; height: 24px; animation: spin 900ms linear infinite; color: var(--ink); }
.wheel-loader .road { position: absolute; left: 0; right: 0; bottom: 1px; height: 2px; background: repeating-linear-gradient(90deg, var(--ink-3) 0 6px, transparent 6px 12px); background-size: 12px 2px; animation: road 400ms linear infinite; }
.wheel .arc { stroke: var(--accent); }

/* ==== Pickup pass ======================================================= */
.pass-wrap { perspective: 1400px; }
.pass {
  position: relative; max-width: 480px; margin-inline: auto; border-radius: var(--r-sheet); overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); transform-style: preserve-3d;
}
.pass-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-5) var(--s-5) var(--s-3); }
.pass-head .brand-mark { width: 32px; height: 32px; }
.pass-code { padding: 0 var(--s-5); font-family: var(--font-display); font-size: clamp(2.25rem, 10vw, 3rem); font-weight: 600; letter-spacing: 0.04em; font-variant-numeric: tabular-nums; }
.pass-vehicle { display: grid; grid-template-columns: 96px 1fr; gap: var(--s-4); align-items: center; padding: var(--s-4) var(--s-5); }
.pass-vehicle .media { aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; display: grid; place-items: center; }
.pass-vehicle .art { padding: 8px; }
.pass-perf { position: relative; height: 24px; margin-inline: -1px; }
.pass-perf::before { content: ""; position: absolute; left: 20px; right: 20px; top: 50%; border-top: 2px dashed var(--line-2); }
.pass-perf::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 0 50%, var(--paper) 11px, transparent 12px), radial-gradient(circle at 100% 50%, var(--paper) 11px, transparent 12px); }
.pass-body { padding: var(--s-2) var(--s-5) var(--s-5); }
.pass-foot { padding: var(--s-4) var(--s-5) var(--s-5); display: grid; gap: var(--s-2); }
.pass.is-awaiting .pass-code { color: var(--ink-3); }

/* ==== Trip cards ======================================================== */
.trip-card { display: grid; grid-template-columns: 88px 1fr; gap: var(--s-4); align-items: center; padding: var(--s-4); text-decoration: none; }
.trip-card .media { aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; display: grid; place-items: center; }
.trip-card .art { padding: 6px; }
.trip-card h3 { font-size: var(--t-16); }
.live-card { padding: var(--s-5); display: grid; gap: var(--s-5); border-color: color-mix(in srgb, var(--road) 40%, var(--line)); }
.live-card .live-top { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s-3); }
.live-dot { display: inline-flex; align-items: center; gap: 8px; color: var(--road); font-weight: 600; font-size: var(--t-14); }
.live-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: soft-pulse 1.8s var(--ease) infinite; }
.next-step { display: grid; gap: var(--s-3); padding: var(--s-5); border-radius: var(--r-card); background: var(--paper-2); }
.next-step h2 { font-family: var(--font-display); font-weight: 500; font-size: var(--t-24); }
.timeline { display: grid; gap: var(--s-3); font-size: var(--t-14); }
.timeline li { display: grid; grid-template-columns: 12px 1fr; gap: var(--s-3); }
.timeline li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); margin-top: 7px; }
.timeline li:last-child::before { background: var(--road); }
.timeline time { display: block; font-size: var(--t-12); color: var(--ink-2); }

/* ==== Compare =========================================================== */
.tray {
  position: fixed; z-index: 27; left: 50%; bottom: calc(72px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  display: flex; align-items: center; gap: var(--s-3); padding: 8px 8px 8px 12px;
  background: var(--ink); color: var(--paper); border-radius: var(--r-pill); box-shadow: var(--shadow-float);
}
@media (min-width: 768px) { .tray { bottom: 24px; } }
.has-bookbar .tray { bottom: calc(140px + env(safe-area-inset-bottom)); }
@media (min-width: 1024px) { .has-bookbar .tray { bottom: 24px; } }
.tray-thumbs { display: flex; }
.tray-thumb { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; border: 2px solid var(--ink); margin-left: -10px; display: grid; place-items: center; }
.tray-thumb:first-child { margin-left: 0; }
.tray-thumb .art { padding: 4px; color: var(--ink); }
.tray-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tray-count { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); font-size: var(--t-12); font-weight: 700; }
.tray .btn { background: var(--paper); color: var(--ink); min-height: 40px; }
.tray-empty-slot { width: 40px; height: 40px; border-radius: 50%; border: 2px dashed rgba(255, 255, 255, 0.3); margin-left: -10px; }
.fly-thumb { position: fixed; z-index: 95; border-radius: 12px; overflow: hidden; pointer-events: none; display: grid; place-items: center; }
.compare-table { width: 100%; font-size: var(--t-14); }
.compare-table th, .compare-table td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.compare-table thead th { vertical-align: bottom; }
.compare-table tbody th { color: var(--ink-2); font-weight: 500; white-space: nowrap; }
.compare-table td { font-variant-numeric: tabular-nums; }
.compare-table .best { font-weight: 700; color: var(--good); }
.compare-media { width: 140px; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; display: grid; place-items: center; margin-bottom: 8px; }
.compare-media .art { padding: 8px; }

/* ==== Auth ============================================================== */
.auth { max-width: 440px; margin: var(--s-10) auto; }
.auth .card { padding: var(--s-6); }
.auth h1 { font-family: var(--font-display); font-weight: 500; font-size: var(--t-32); }
.or { display: flex; align-items: center; gap: var(--s-3); color: var(--ink-2); font-size: var(--t-14); }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.demo-buttons { display: grid; gap: var(--s-2); }
.demo-buttons .btn { justify-content: flex-start; }
.demo-buttons .btn small { margin-left: auto; color: var(--ink-2); font-weight: 500; font-size: var(--t-12); }

/* ==== Console layout (provider / admin) ================================= */
.layout-console { background: var(--paper); }
.console { display: grid; min-height: 100dvh; }
.side { display: flex; align-items: center; gap: var(--s-2); padding: 8px var(--gutter); border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 30; overflow-x: auto; }
.side .brand { margin-right: var(--s-2); }
.side-nav { display: flex; gap: 2px; }
.side-nav a {
  display: inline-flex; align-items: center; gap: var(--s-3); min-height: var(--tap); padding: 0 var(--s-3);
  border-radius: 10px; color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: var(--t-14); white-space: nowrap;
}
.side-nav a:hover { background: var(--paper-2); color: var(--ink); }
.side-nav a[aria-current="page"] { background: var(--paper-2); color: var(--ink); }
.side-nav .badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; }
.side-shop { display: none; }
.side-foot { display: none; }
.console-main { min-width: 0; }
.console-top { display: none; }
.console-body { padding: var(--s-6) var(--gutter) var(--s-16); max-width: 1280px; }
@media (min-width: 1024px) {
  .console { grid-template-columns: 260px 1fr; }
  .side { position: sticky; top: 0; height: 100dvh; flex-direction: column; align-items: stretch; gap: var(--s-6); padding: var(--s-5) var(--s-4); border-bottom: 0; border-right: 1px solid var(--line); overflow: auto; }
  .side-nav { flex-direction: column; }
  .side-shop { display: grid; gap: 4px; padding: var(--s-4); border-radius: 12px; background: var(--paper-2); font-size: var(--t-14); }
  .side-foot { display: grid; gap: var(--s-3); margin-top: auto; }
  .console-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); min-height: 64px; padding: 0 var(--gutter); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
  .console-body { padding-top: var(--s-8); }
  .side-mobile-only { display: none; }
}
.console-title { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.75rem, 4vw, 2.25rem); }

/* provider today */
.today-grid { display: grid; gap: var(--s-5); }
@media (min-width: 1100px) { .today-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; } }
.req-card { display: grid; gap: var(--s-3); padding: var(--s-4); border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.req-card + .req-card { margin-top: var(--s-3); }
.req-card .row-between { align-items: flex-start; }
.req-actions { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.req-card.is-leaving { animation: card-out var(--dur-base) var(--ease) both; }
.onboard { display: grid; gap: var(--s-2); }
.onboard li { display: flex; gap: var(--s-3); align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.onboard li:last-child { border-bottom: 0; }
.onboard .tick { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line-2); color: transparent; flex: none; }
.onboard li.is-done .tick { background: var(--good); border-color: var(--good); color: #fff; }
.onboard li.is-done span { color: var(--ink-2); text-decoration: line-through; }

/* fleet */
.fleet { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.fleet .vcard-body { gap: 8px; }
.fleet-actions { display: flex; gap: var(--s-2); align-items: center; justify-content: space-between; padding: 0 var(--s-4) var(--s-4); }

/* editor */
.stepper { display: flex; gap: var(--s-2); margin-bottom: var(--s-6); }
.stepper button { flex: 1; display: grid; gap: 4px; padding: 10px 12px; border-radius: 12px; text-align: left; border: 1px solid var(--line); background: var(--surface); }
.stepper button small { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.stepper button b { font-weight: 600; }
.stepper button[aria-selected="true"] { border-color: var(--ink); }
.stepper button.is-done small { color: var(--good); }
.editor { display: grid; gap: var(--s-8); }
@media (min-width: 1100px) { .editor { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; } .editor-preview { position: sticky; top: 88px; } }
.step-panel[hidden] { display: none; }
.photo-manage { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: var(--s-3); }
.photo-manage figure { position: relative; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: var(--paper-2); }
.photo-manage img { width: 100%; height: 100%; object-fit: cover; }
.photo-manage .icon-btn { position: absolute; right: 6px; top: 6px; width: 34px; height: 34px; }
.drop { display: grid; place-items: center; gap: 6px; aspect-ratio: 4 / 3; border: 1.5px dashed var(--line-2); border-radius: 12px; color: var(--ink-2); cursor: pointer; text-align: center; padding: var(--s-3); font-size: var(--t-14); }
.drop:hover { border-color: var(--ink-2); color: var(--ink); }
.drop:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.publish-gate { display: grid; gap: 6px; font-size: var(--t-14); }
.publish-gate li { display: flex; gap: 8px; align-items: center; color: var(--ink-2); }
.publish-gate li.is-done { color: var(--good); }

/* provider calendar */
.pcal-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
.pcal { min-width: 980px; }
.pcal-head, .pcal-row { display: grid; grid-template-columns: 200px repeat(14, minmax(52px, 1fr)); }
.pcal-head { position: sticky; top: 0; background: var(--paper-2); border-bottom: 1px solid var(--line); }
.pcal-head > div { padding: 10px 6px; font-size: var(--t-12); color: var(--ink-2); text-align: center; border-left: 1px solid var(--line); }
.pcal-head > div:first-child { text-align: left; padding-left: 16px; border-left: 0; }
.pcal-head .is-today { color: var(--accent); font-weight: 700; }
.pcal-head b { display: block; font-size: var(--t-16); color: var(--ink); }
.pcal-row { position: relative; border-bottom: 1px solid var(--line); min-height: 64px; }
.pcal-row:last-child { border-bottom: 0; }
.pcal-name { display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 16px; font-size: var(--t-14); font-weight: 600; min-width: 0; }
.pcal-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcal-name small { display: block; font-weight: 400; color: var(--ink-2); font-size: 11px; }
.pcal-cell { border-left: 1px solid var(--line); min-height: 64px; position: relative; }
.pcal-cell:hover { background: color-mix(in srgb, var(--road-soft) 50%, transparent); }
.pcal-cell.is-weekend { background: color-mix(in srgb, var(--paper-2) 60%, transparent); }
.pcal-cell.is-pick { background: var(--road-soft); box-shadow: inset 0 0 0 2px var(--road); }
.pcal-cell.is-range { background: color-mix(in srgb, var(--road-soft) 70%, transparent); }
.pcal-bars { position: absolute; inset: 0 0 0 200px; pointer-events: none; }
.pcal-bar {
  position: absolute; top: 12px; height: 40px; border-radius: 10px; padding: 4px 10px; overflow: hidden;
  font-size: 12px; line-height: 1.3; pointer-events: auto; text-decoration: none; white-space: nowrap; text-overflow: ellipsis;
  background: var(--road); color: var(--road-ink);
}
.pcal-bar b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.pcal-bar.is-pending { background: var(--warn); color: #fff; }
.pcal-bar.is-done { background: color-mix(in srgb, var(--road) 45%, var(--surface)); }
.pcal-bar.is-block { background: repeating-linear-gradient(135deg, var(--paper-2) 0 8px, var(--line) 8px 16px); color: var(--ink-2); border: 1px solid var(--line-2); cursor: pointer; }
.pcal-bar.is-shaking { animation: shake 360ms var(--ease) 3; }

/* inspection */
.compare-photos { display: grid; gap: var(--s-3); }
.compare-photos .pair { display: grid; grid-template-columns: 80px 1fr 1fr; gap: var(--s-2); align-items: center; }
.compare-photos figure { aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: var(--paper-2); }
.compare-photos img { width: 100%; height: 100%; object-fit: cover; }
.ded-rows { display: grid; gap: var(--s-2); }
.ded-row { display: grid; grid-template-columns: 1fr; gap: var(--s-2); padding: var(--s-3); border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
@media (min-width: 768px) { .ded-row { grid-template-columns: 160px 140px 1fr auto; align-items: center; } }
.ded-row.is-auto { background: var(--paper-2); }
.cap-warn { color: var(--warn-ink); background: var(--warn-soft); padding: var(--s-3) var(--s-4); border-radius: 12px; font-size: var(--t-14); }

/* admin */
.kpis { display: grid; gap: var(--s-3); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 1000px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kpi { padding: var(--s-5); border-radius: var(--r-card); border: 1px solid var(--line); background: var(--surface); display: grid; gap: 6px; }
.kpi .label { color: var(--ink-2); font-size: var(--t-14); display: flex; gap: 8px; align-items: center; }
.kpi .value { font-family: var(--font-display); font-size: clamp(1.75rem, 4vw, var(--t-32)); font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kpi .sub { font-size: var(--t-12); color: var(--ink-2); }

/* styleguide */
.sg-nav { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.sg-section { padding-block: var(--s-8); border-top: 1px solid var(--line); scroll-margin-top: 80px; }
.sg-section > h2 { font-family: var(--font-display); font-weight: 500; font-size: var(--t-24); margin-bottom: 4px; }
.sg-section > p.muted { margin-bottom: var(--s-5); }
.sg-grid { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.swatches { display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.swatch { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); font-size: var(--t-12); }
.swatch i { display: block; height: 64px; }
.swatch div { padding: 8px 10px; display: grid; }
.type-row { display: flex; align-items: baseline; gap: var(--s-4); padding-block: 6px; border-bottom: 1px solid var(--line); }
.type-row small { width: 56px; color: var(--ink-2); flex: none; font-size: var(--t-12); }
.demo-box { padding: var(--s-5); border: 1px dashed var(--line-2); border-radius: var(--r-card); display: grid; gap: var(--s-4); }

/* ==== Motion ============================================================ */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes road { to { transform: translateX(-12px); } }
@keyframes soft-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.45; transform: scale(0.85); } }
@keyframes skel { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px) scale(0.98); } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes card-out { to { opacity: 0; transform: translateX(24px); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@keyframes slide-up { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
.rise { animation: rise var(--dur-slow) var(--ease-enter) both; }
[data-stagger] > * { animation: rise var(--dur-slow) var(--ease-enter) both; }
[data-stagger] > :nth-child(2) { animation-delay: calc(var(--stagger) * 1); }
[data-stagger] > :nth-child(3) { animation-delay: calc(var(--stagger) * 2); }
[data-stagger] > :nth-child(4) { animation-delay: calc(var(--stagger) * 3); }
[data-stagger] > :nth-child(5) { animation-delay: calc(var(--stagger) * 4); }
[data-stagger] > :nth-child(6) { animation-delay: calc(var(--stagger) * 5); }
[data-stagger] > :nth-child(7) { animation-delay: calc(var(--stagger) * 6); }
[data-stagger] > :nth-child(n + 8) { animation-delay: calc(var(--stagger) * 7); }

/* View Transitions: cross-document (Chromium). Composer + chips morph,
   card art grows into the gallery hero, results slide up. */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 200ms; animation-timing-function: var(--ease); }
::view-transition-group(*) { animation-duration: var(--dur-hero); animation-timing-function: var(--ease-enter); }
::view-transition-new(results) { animation: slide-up var(--dur-slow) var(--ease-enter) both; }
.results-anchor { view-transition-name: results; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 120ms !important; animation-iteration-count: 1 !important; animation-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
  [data-stagger] > *, .rise, .toast { animation-name: fade !important; }
  .wheel-loader .wheel, .btn.is-loading .wheel { animation: none !important; }
  .wheel-loader .road { animation: none !important; }
  .pcal-bar.is-shaking { animation: none !important; outline: 2px solid var(--bad); }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation-duration: 120ms !important; }
  .vcard, .card-link, .btn, .chip { transition: none !important; }
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* =====================================================================
   Usability and polish: tap targets, help, motion details
   ===================================================================== */

/* ---- Tap targets ≥ 44 px without growing the visual chip ------------- */
.chip::after, .btn-sm::after, .chip-x::after { content: ""; position: absolute; inset: -6px -2px; }
.chip-sm::after { inset: -10px -2px; }
.chip-x { position: relative; }
.input-sm { min-height: 36px; width: auto; padding: 4px 36px 4px 12px; font-size: var(--t-14); background-position: right 10px center; }
.input-num { width: 96px; padding-right: 10px; }

/* ---- Help popover ---------------------------------------------------- */
.help { position: relative; display: inline-flex; vertical-align: middle; }
.help-btn {
  position: relative; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  color: var(--ink-2); transition: transform var(--dur-fast) var(--ease);
}
.help-btn::after { content: ""; position: absolute; inset: -8px; }
.help-btn .icon { width: 17px; height: 17px; }
.help-btn:hover, .help-btn[aria-expanded="true"] { color: var(--ink); background: var(--paper-2); }
.help-pop {
  position: absolute; z-index: 70; left: 50%; bottom: calc(100% + 8px); width: max-content; max-width: min(280px, 80vw);
  padding: 10px 14px; border-radius: 12px; background: var(--ink); color: var(--paper);
  font-size: var(--t-14); font-weight: 500; line-height: 1.45; text-align: left; white-space: normal;
  box-shadow: var(--shadow-float); transform: translateX(-50%);
}
.help-pop.below { bottom: auto; top: calc(100% + 8px); }
.help-pop.is-left { left: auto; right: -8px; transform: none; }
.help-pop.is-right { left: -8px; transform: none; }

/* ---- Home ------------------------------------------------------------ */
.hero { text-align: center; padding-block: clamp(48px, 12vh, 120px) var(--s-8); }
.hero h1 { max-width: none; margin-inline: auto; font-size: clamp(2.5rem, 7vw, 4rem); }
.hero .lead { margin: var(--s-3) auto 0; max-width: 46ch; }
.hero-mark { display: grid; place-items: center; margin-bottom: var(--s-5); }
.hero-mark .brand-mark { width: 44px; height: 44px; }
.hero-ask { margin: var(--s-8) auto 0; max-width: 760px; text-align: left; }
.hero-picks { justify-content: center; }
.hero .ask-chips { justify-content: center; }
.cat-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(168px, 1fr); gap: var(--s-3); overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; margin-inline: calc(-1 * var(--gutter)); padding: 2px var(--gutter) var(--s-2); }
.cat-strip::-webkit-scrollbar { display: none; }
.cat { display: grid; gap: var(--s-2); padding: var(--s-2); border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); text-decoration: none; scroll-snap-align: start; transition: transform var(--dur-fast) var(--ease); }
@media (hover: hover) { .cat:hover { transform: translateY(-2px); border-color: var(--line-2); } }
.cat:active { transform: scale(0.98); }
.cat-art { aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; display: grid; place-items: center; }
.cat-art .art { padding: 10% 14%; }
.cat-text { display: grid; gap: 2px; padding: 0 var(--s-2) var(--s-1); }
.cat-text small { color: var(--ink-2); font-size: var(--t-12); }
.how { display: grid; gap: var(--s-3); }
@media (min-width: 768px) { .how { grid-template-columns: repeat(3, 1fr); } }
.how li { display: flex; gap: var(--s-4); align-items: flex-start; }
.how-n { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--road-soft); color: var(--road); font-weight: 700; font-size: var(--t-14); }
.composer-input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.composer-clear { width: 36px; height: 36px; position: absolute; right: -4px; top: 50%; transform: translateY(-50%); }
.composer-field:has(.composer-clear:not([hidden])) .composer-input { padding-right: 36px; }
.search-page { padding-top: var(--s-5); }
.search-page .ask-missing { margin-top: var(--s-3); }
.results-layout { margin-top: var(--s-4); }
.more-filters { flex-basis: 100%; padding-top: var(--s-2); }
.widened { margin-bottom: var(--s-4); }

/* ---- Imagery --------------------------------------------------------- */
img { background: var(--paper-2); }
.js .fade-img { opacity: 0; transition: opacity var(--dur-slow) var(--ease); }
.js .fade-img.is-loaded { opacity: 1; }
[data-theme="dark"] img:not(.qr) { filter: brightness(0.92); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) img { filter: brightness(0.92); } }
[data-theme="dark"] .leaflet-tile-pane { filter: brightness(0.85) saturate(0.8); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .leaflet-tile-pane { filter: brightness(0.85) saturate(0.8); } }
.empty-art.lg { width: min(320px, 80vw); height: auto; aspect-ratio: 240 / 150; }
.error-page h1 { font-size: clamp(1.75rem, 5vw, 2.5rem); max-width: 22ch; }
.error-search { max-width: 560px; margin-top: var(--s-4); }
.onboard-art { width: 96px; height: 60px; flex: none; }

/* ---- Gallery: 1 + 4 grid on desktop, swipe carousel on mobile ------- */
.gallery { position: relative; }
.gallery-grid { display: grid; grid-auto-flow: column; grid-auto-columns: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: var(--r-card); gap: 0; }
.gallery-grid::-webkit-scrollbar { display: none; }
.gallery-item { position: relative; aspect-ratio: 16 / 10; overflow: hidden; display: grid; place-items: center; scroll-snap-align: center; cursor: zoom-in; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.gallery-art { width: 100%; height: 100%; display: grid; place-items: center; }
.gallery-art .art { padding: 8% 10%; }
.gallery-art.is-mirror .art { transform: scaleX(-1); }
.gallery-art.is-turn .art { transform: perspective(600px) rotateY(-28deg) scale(0.9); }
.gallery-art.is-mirror.is-turn .art { transform: perspective(600px) rotateY(28deg) scaleX(-1) scale(0.9); }
.gallery-count { position: absolute; right: 12px; bottom: 12px; display: none; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--surface) 90%, transparent); color: var(--ink); border: 1px solid var(--line); }
.gallery-dots { display: flex; justify-content: center; gap: 6px; margin-top: var(--s-3); }
.gallery-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); transition: transform var(--dur-fast) var(--ease); }
.gallery-dots span.is-on { background: var(--ink); transform: scale(1.35); }
.gallery .vcard-compare { right: 12px; top: 12px; }
.gallery-note { margin-top: var(--s-2); }
@media (min-width: 900px) {
  .gallery-grid { grid-auto-flow: row; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; grid-auto-columns: auto; gap: var(--s-2); overflow: visible; aspect-ratio: 2 / 1; }
  .gallery-item { aspect-ratio: auto; border-radius: 12px; }
  .gallery-item.is-hero { grid-row: span 2; }
  .gallery-item:nth-child(n + 6) { display: none; }
  .gallery-dots { display: none; }
  .gallery-count { display: inline-flex; }
  .gallery-item { transition: transform var(--dur-base) var(--ease); }
  .gallery-item:hover { transform: scale(0.99); }
}
.lightbox { position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; background: #111; color: #F2EFE7; }
.lightbox::backdrop { background: #000; }
.lightbox[open] { display: grid; grid-template-rows: auto 1fr auto; }
.lb-top { display: flex; align-items: center; justify-content: space-between; padding: max(12px, env(safe-area-inset-top)) var(--gutter) 8px; }
.lb-stage { position: relative; overflow: hidden; display: grid; place-items: center; touch-action: pan-y pinch-zoom; }
.lb-slide { margin: 0; width: 100%; height: 100%; display: grid; place-items: center; grid-template-rows: 1fr auto; }
.lb-slide img { max-width: 100%; max-height: 78dvh; object-fit: contain; background: transparent; filter: none !important; }
.lb-slide .gallery-art { max-width: 1100px; border-radius: 16px; aspect-ratio: 16 / 10; height: auto; }
.lb-slide figcaption { padding: 8px; font-size: var(--t-14); opacity: 0.8; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); }
.lb-prev { left: var(--gutter); }
.lb-next { right: var(--gutter); }
.lb-hint { text-align: center; opacity: 0.7; padding: 8px 8px max(12px, env(safe-area-inset-bottom)); }
@media (pointer: coarse) { .lb-nav { display: none; } }

/* ---- Wallet-style Pickup Pass --------------------------------------- */
.pass-page { padding-block: var(--s-8); display: grid; gap: var(--s-5); }
.pass { box-shadow: var(--shadow-float); border-radius: 28px; }
.pass-head .row { align-items: center; }
.pass-sub { display: block; color: var(--ink-2); font-weight: 500; }
.pass-banner { padding: var(--s-2) var(--s-5) 0; }
.pass-hero { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); padding: var(--s-2) var(--s-5) var(--s-3); }
.pass-label { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.pass-code { font-family: var(--font-ui); font-size: clamp(2rem, 9vw, 2.75rem); font-weight: 700; letter-spacing: 0.02em; line-height: 1.1; font-variant-numeric: tabular-nums lining-nums; }
.pass-when { color: var(--ink-2); margin-top: 2px; }
.pass-qr { flex: none; width: 104px; padding: 8px; border-radius: 12px; background: #fff; color: #1F1D1A; border: 1px solid var(--line); }
.pass-qr .qr { width: 100%; height: auto; display: block; }
.pass-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4) var(--s-5); }
.pass-grid dt { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.pass-grid dd { font-weight: 500; margin-top: 2px; }
.pass-grid .span2 { grid-column: span 2; }
.pass-grid .icon { display: inline; vertical-align: -3px; }
.how-pickup { display: grid; gap: var(--s-4); border-color: color-mix(in srgb, var(--road) 35%, var(--line)); }
.steps3 { display: grid; gap: var(--s-3); }
@media (min-width: 640px) { .steps3 { grid-template-columns: repeat(3, 1fr); } }
.steps3 li { display: flex; gap: var(--s-3); align-items: flex-start; }
.steps3 p { margin-top: 2px; }

/* ---- Before / after wipe -------------------------------------------- */
.pcompare { display: grid; gap: var(--s-5); }
@media (min-width: 900px) { .pcompare { grid-template-columns: 1fr 1fr; } }
.pc-item { display: grid; gap: var(--s-2); }
.pc-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-3); flex-wrap: wrap; }
.pc-wipe { --pos: 50%; position: relative; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: var(--paper-2); isolation: isolate; }
.pc-wipe > img, .pc-layer { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: grid; place-items: center; }
.pc-layer .art { padding: 10%; }
.pc-after { clip-path: inset(0 0 0 var(--pos)); }
.pc-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2); pointer-events: none; z-index: 2; }
.pc-handle .icon { position: absolute; top: 50%; left: 50%; width: 32px; height: 32px; padding: 7px; margin: -16px 0 0 -16px; border-radius: 50%; background: #fff; color: #1F1D1A; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); }
.pc-tag { position: absolute; top: 10px; z-index: 2; padding: 2px 8px; border-radius: var(--r-pill); font-size: 11px; font-weight: 700; letter-spacing: 0.04em; background: rgba(0, 0, 0, 0.55); color: #fff; }
.pc-tag-before { left: 10px; }
.pc-tag-after { right: 10px; }
.pc-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; z-index: 3; }
.pc-wipe:has(.pc-range:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.pc-single { position: relative; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; margin: 0; }
.pc-single img { width: 100%; height: 100%; object-fit: cover; }
.pc-single figcaption { position: absolute; left: 10px; top: 10px; padding: 2px 8px; border-radius: var(--r-pill); font-size: 11px; font-weight: 700; background: rgba(0, 0, 0, 0.55); color: #fff; }

/* ---- Guided camera --------------------------------------------------- */
.checkin-side { display: grid; gap: var(--s-3); align-content: start; }
.camera { position: fixed; inset: 0; z-index: 200; background: #000; color: #fff; display: grid; grid-template-rows: auto 1fr auto; overscroll-behavior: contain; }
.camera[hidden] { display: none; }
.cam-video, .cam-review { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; filter: none !important; }
.cam-guide { position: absolute; inset: 14% 6% 22%; display: grid; place-items: center; pointer-events: none; color: rgba(255, 255, 255, 0.85); }
.cam-guide .art { color: rgba(255, 255, 255, 0.85); filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.6)); }
.cam-guide .art .accent { stroke: #F3C27A; }
.cam-guide.is-mirror .art { transform: scaleX(-1); }
.cam-guide.is-turn .art { transform: perspective(600px) rotateY(-28deg) scale(0.92); }
.cam-guide.is-mirror.is-turn .art { transform: perspective(600px) rotateY(28deg) scaleX(-1) scale(0.92); }
.cam-guide svg * { stroke-width: 2; stroke-dasharray: 6 5; }
.cam-top, .cam-bar { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: max(12px, env(safe-area-inset-top)) var(--gutter) 12px; background: linear-gradient(rgba(0, 0, 0, 0.55), transparent); }
.cam-bar { grid-row: 3; padding: 16px var(--gutter) max(20px, env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgba(0, 0, 0, 0.65)); }
.cam-title { display: grid; justify-items: center; text-align: center; }
.cam-spacer { width: 44px; }
.cam-tip { position: relative; z-index: 2; grid-row: 2; align-self: end; justify-self: center; margin-bottom: 12px; padding: 8px 14px; border-radius: var(--r-pill); background: rgba(0, 0, 0, 0.6); font-size: var(--t-14); text-align: center; max-width: 90%; }
.cam-tip.is-warn { background: #8A5A12; }
.cam-shutter { width: 76px; height: 76px; border-radius: 50%; border: 4px solid #fff; display: grid; place-items: center; transition: transform var(--dur-fast) var(--ease); }
.cam-shutter span { width: 58px; height: 58px; border-radius: 50%; background: #fff; }
.cam-shutter:active { transform: scale(0.92); }
.camera .btn-ghost { color: #fff; }
.camera .btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }
.cam-confirm { justify-content: center; }
.cam-confirm[hidden] { display: none; }

/* ---- Charts ---------------------------------------------------------- */
.charts { display: grid; gap: var(--s-4); }
@media (min-width: 1100px) { .charts { grid-template-columns: 1fr 1fr; } }
.chart { margin: 0; display: grid; gap: var(--s-3); }
.chart-plot { position: relative; }
.chart-svg { width: 100%; height: auto; overflow: visible; }
.chart-grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-tick { fill: var(--ink-2); font-size: 11px; font-family: var(--font-ui); font-variant-numeric: tabular-nums; }
.chart-line { fill: none; stroke: var(--road); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.chart-area { fill: var(--road); opacity: 0.1; }
.chart-end, .chart-dot { fill: var(--road); stroke: var(--surface); stroke-width: 2; vector-effect: non-scaling-stroke; }
.chart-cross { stroke: var(--ink-3); stroke-width: 1; vector-effect: non-scaling-stroke; }
svg [hidden] { display: none; }
.chart-hit { fill: transparent; cursor: crosshair; }
.chart-tip { position: absolute; z-index: 5; pointer-events: none; padding: 6px 10px; border-radius: 10px; background: var(--ink); color: var(--paper); font-size: var(--t-12); white-space: nowrap; box-shadow: var(--shadow-float); transform: translate(-50%, calc(-100% - 12px)); }
.chart-tip b { display: block; font-size: var(--t-14); }
.chart-table summary { cursor: pointer; display: inline-flex; min-height: 32px; align-items: center; }
.kpi .value { font-variant-numeric: proportional-nums; }

/* ---- Command palette & shortcuts ------------------------------------ */
kbd { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 6px; border: 1px solid var(--line-2); border-bottom-width: 2px; background: var(--surface); color: var(--ink-2); font: 600 11px/1 var(--font-ui); }
.palette-trigger { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; min-width: min(360px, 100%); padding: 0 8px 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink-2); font-size: var(--t-14); }
.palette-trigger span { flex: 1; text-align: left; }
.palette-trigger:hover { border-color: var(--line-2); color: var(--ink); }
.palette.dialog { width: min(640px, calc(100vw - 24px)); top: 12vh; bottom: auto; margin: 0 auto; }
.palette-panel { padding: 0; overflow: hidden; }
.palette-input { display: flex; align-items: center; gap: var(--s-3); padding: 0 var(--s-4); border-bottom: 1px solid var(--line); }
.palette-input input { flex: 1; min-height: 56px; border: 0; outline: none; background: transparent; font-size: var(--t-16); }
.palette-input input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.palette-results { max-height: min(56vh, 420px); overflow-y: auto; padding: var(--s-2); }
.palette-item { display: flex; align-items: center; gap: var(--s-3); padding: 10px 12px; border-radius: 10px; text-decoration: none; }
.palette-item b { display: block; font-weight: 600; }
.palette-item .small { display: block; }
.palette-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--paper-2); color: var(--ink-2); flex: none; }
[aria-selected="true"] > .palette-item { background: var(--road-soft); }
[aria-selected="true"] > .palette-item .palette-icon { background: var(--road); color: var(--road-ink); }
.palette-empty { padding: var(--s-5) var(--s-4); }
.palette-foot { padding: 10px var(--s-4); border-top: 1px solid var(--line); display: flex; gap: 6px; align-items: center; }
.shortcut-list { display: grid; gap: 0; }
.shortcut-list > div { display: flex; justify-content: space-between; gap: var(--s-4); padding: 12px 0; border-bottom: 1px solid var(--line); }
.shortcut-list > div:last-child { border-bottom: 0; }
.shortcut-list dt { white-space: nowrap; }
.shortcut-list dd { color: var(--ink-2); text-align: right; }
.console-top { justify-content: space-between; }
.console-top.is-scrolled { border-bottom-color: var(--line); }

/* ---- Provider calendar: drag to block, keyboard, hatched blocks ------ */
.pcal-cell { touch-action: pan-x pan-y; }
.pcal-cell:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; border-radius: 4px; }
.pcal-ghost {
  position: absolute; top: 12px; height: 40px; border-radius: 10px; pointer-events: none; z-index: 3;
  border: 2px dashed var(--road); background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--road-soft) 80%, transparent) 0 8px, transparent 8px 16px);
  display: flex; align-items: center; padding: 0 10px; font-size: 12px; font-weight: 600; color: var(--road);
}
.pcal-bar.is-block { background: repeating-linear-gradient(135deg, var(--paper-2) 0 6px, color-mix(in srgb, var(--ink-3) 35%, var(--paper-2)) 6px 8px); }
.pcal.is-dragging { cursor: col-resize; user-select: none; }

/* ---- Forms ----------------------------------------------------------- */
.error-summary { padding: var(--s-4); border-radius: 12px; background: var(--bad-soft); color: var(--bad); border: 1px solid color-mix(in srgb, var(--bad) 30%, transparent); }
.error-summary:focus { outline: 2px solid var(--bad); outline-offset: 2px; }
.error-summary ul { margin: 6px 0 0; padding-left: 18px; }
.error-summary a { color: inherit; font-weight: 500; }
.field-error { animation: rise var(--dur-base) var(--ease-enter) both; }
form[data-submitting] .btn[type="submit"] { pointer-events: none; }

/* ---- Shop profile ---------------------------------------------------- */
.shop-hero { display: flex; flex-wrap: wrap; gap: var(--s-5); align-items: flex-start; padding-block: var(--s-8) var(--s-4); }
.shop-logo.lg { width: 72px; height: 72px; font-size: var(--t-32); border-radius: 18px; }
.shop-actions { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.review-grid { display: grid; gap: var(--s-3); }
@media (min-width: 768px) { .review-grid { grid-template-columns: repeat(2, 1fr); } }
.review-card { display: grid; gap: var(--s-2); }

/* skeleton matches the card exactly */
.vcard.skeleton .vcard-media { border-radius: calc(var(--r-card) - 1px) calc(var(--r-card) - 1px) 0 0; }
.vcard.skeleton .vcard-body { gap: 10px; }
.skel-line.w-12 { width: 12%; }

@media (prefers-reduced-motion: reduce) {
  .gallery-item, .cat, .help-btn { transition: none !important; }
  .js .fade-img { transition-duration: 120ms; }
}
