/* RoueLigne — « Paddock » theme: navy rail, racing red, gold, large soft cards */
:root {
  --navy: #0c1a30;
  --navy-2: #132a4a;
  --gold: #f2b84b;
  --primary: #e5242b;
  --primary-hover: #c81d24;
  --primary-light: #fdecec;
  --success: #16a34a;
  --success-hover: #15803d;
  --bg: #eef1f6;
  --card: #ffffff;
  --text: #0d1b2e;
  --muted: #5b6b82; /* 5.4:1 on white, 4.8:1 on --bg (WCAG AA) */
  --divider: #e3e8f0;
  --hover: #f3f5f9;
  --input: #eef1f6;
  --secondary-btn: #eef1f6;
  --secondary-btn-hover: #e1e6ee;
  --danger: #e5242b;
  --shadow: 0 10px 30px rgba(13, 27, 46, 0.06);
  --shadow-lg: 0 24px 60px rgba(13, 27, 46, 0.18);
  --nav-h: 76px;
  /* The top bar as drawn: its height plus the notch / status bar on phones. */
  --top-h: calc(var(--nav-h) + env(safe-area-inset-top, 0px));
  --rail-w: 250px;
  --radius: 22px;
  --radius-sm: 14px;
  --font-display: "Space Grotesk", Inter, system-ui, sans-serif;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.3px; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: none; background: none; cursor: pointer; padding: 0; }
button:disabled { cursor: not-allowed; opacity: 0.6; }
input, textarea, select { font: inherit; color: inherit; }

/* ---------- Phones: feel like an app, not a web page ---------- */
/* No gray flash on tap (each control has its own :active), no font inflation in landscape. */
html { scrollbar-gutter: stable; -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
/* Controls react at once (no wait for a double-tap zoom). */
button, a, summary, label, select, [role="button"], [role="tab"], [role="switch"] { touch-action: manipulation; }
/* A long press on a control does not select its label or open the link callout; content stays selectable. */
button, [role="button"], [role="tab"], [role="switch"], .chip, .rail-item, .dropdown-item, .tab, .paddock-section {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
/* iOS zooms into any field under 16px and stays zoomed: on touch screens, none is. */
@media (pointer: coarse) {
  input, textarea, select, .language-switcher select { font-size: 16px; }
}
/* Press feedback on touch, where there is no hover. */
.icon-btn, .round-btn, .chip, .dropdown-item, .rail-item, .side-item, .listing-card, .vehicle-card, .store-card,
.person-card, .contact, .chat-peer {
  transition-property: background-color, transform, color, box-shadow;
  transition-duration: 120ms;
  transition-timing-function: var(--ease-out);
}
.icon-btn:active, .round-btn:active, .chip:active { transform: scale(0.94); }
.dropdown-item:active, .side-item:active, .contact:active, .chat-peer:active { background: var(--hover); }
.listing-card:active, .vehicle-card:active, .store-card:active, .person-card:active { transform: scale(0.985); }
@media (prefers-reduced-motion: reduce) {
  .icon-btn:active, .round-btn:active, .chip:active,
  .listing-card:active, .vehicle-card:active, .store-card:active, .person-card:active { transform: none; }
}
hr { border: none; border-top: 1px solid var(--divider); margin: 12px 0; }
h1, h2, h3, h4, p { margin: 0; }
h2 { font-size: 20px; }
h3 { font-size: 20px; font-weight: 700; margin-bottom: 12px; }
h4 { font-size: 17px; color: var(--muted); font-weight: 600; margin: 8px 8px; }
img { display: block; }

.icon { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.pad { padding: 12px; }
.center { text-align: center; display: flex; flex-direction: column; align-items: center; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pre-line { white-space: pre-line; }
.error-text { color: var(--danger); font-size: 14px; margin: 8px 0; }

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px 16px;
  margin-bottom: 16px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 15px;
  transition: background-color 0.15s, transform 0.1s;
}
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn-primary { background: var(--primary); color: #fff; }
@media (hover: hover) and (pointer: fine) { .btn-primary:hover:not(:disabled) { background: var(--primary-hover); } }
.btn-secondary { background: var(--secondary-btn); color: var(--text); }
@media (hover: hover) and (pointer: fine) { .btn-secondary:hover:not(:disabled) { background: var(--secondary-btn-hover); } }
.btn-light-primary { background: var(--primary-light); color: var(--primary); }
@media (hover: hover) and (pointer: fine) { .btn-light-primary:hover { background: #dbe7f2; } }
.btn-success { background: var(--success); color: #fff; }
@media (hover: hover) and (pointer: fine) { .btn-success:hover:not(:disabled) { background: var(--success-hover); } }
.btn-lg { height: 48px; font-size: 17px; padding: 0 16px; }
.btn.wide { min-width: 194px; }
.btn-row { display: flex; gap: 8px; margin-top: 6px; }
.btn-row .btn { flex: 1; }
.vehicle-actions { flex-wrap: wrap; }
.vehicle-actions .btn { min-width: max-content; white-space: nowrap; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--muted);
}
@media (hover: hover) and (pointer: fine) { .icon-btn:hover { background: var(--hover); } }
.icon-btn.green, .composer-action.green { color: #45bd62; }
.icon-btn.orange, .composer-action.orange { color: #f7b928; }
.icon-btn.send { color: var(--primary); }

.round-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--secondary-btn);
  color: var(--text);
}
@media (hover: hover) and (pointer: fine) { .round-btn:hover { background: var(--secondary-btn-hover); } }
.round-btn.active { background: var(--primary-light); color: var(--primary); }

.link-btn { color: var(--text); font-weight: 600; }
@media (hover: hover) and (pointer: fine) { .link-btn:hover { text-decoration: underline; } }
.link-btn.muted { color: var(--muted); font-weight: 400; }

.count-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 10px;
  background: var(--danger);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.count-badge.inline { position: static; margin-left: auto; }

/* ---------- Avatar & badges ---------- */
.avatar { position: relative; flex-shrink: 0; border-radius: 50%; }
.avatar img, .avatar-initials {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.avatar-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
}
.avatar-ring img, .avatar-ring .avatar-initials { box-shadow: 0 0 0 3px var(--primary); }
/* "For sale" / "buying" frame over the avatar edge (see _AvatarFrame) */
.avatar-frame { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.avatar-frame text {
  fill: #fff;
  font-family: var(--font-display);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
}
.intro-list .for-sale-item, .intro-list .for-sale-item strong, .intro-list .for-sale-item .icon { color: var(--primary); }
.intro-list .buying-item, .intro-list .buying-item strong, .intro-list .buying-item .icon { color: #1d7bf2; }

/* Toggle switch row (role="switch") */
.switch-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px;
  margin: 12px 0;
  text-align: left;
  border-radius: var(--radius-sm);
  background: var(--input);
}
.switch-row > div { flex: 1; display: flex; flex-direction: column; gap: 2px; }
/* In a dialog the body's gap already spaces the rows. */
.modal-body > .switch-row { margin: 0; }
.switch {
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 26px;
  border-radius: 13px;
  background: #c3ccd9;
  transition: background 0.2s ease;
}
.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(13, 27, 46, 0.25);
  transition: transform 0.2s ease;
}
.switch.on { background: var(--primary); }
.switch.on::after { transform: translateX(18px); }
@media (prefers-reduced-motion: reduce) {
  .switch, .switch::after { transition: none; }
}
.online-dot {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 28%;
  height: 28%;
  min-width: 10px;
  min-height: 10px;
  border-radius: 50%;
  background: #31a24c;
  border: 2px solid #fff;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px 2px 7px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  vertical-align: middle;
}
.badge-car { background: #e8eefb; color: #1d4ed8; }
.badge-moto { background: #fff1e6; color: #d35400; }

/* ---------- Shell: rail + top bar ---------- */
.shell { display: flex; min-height: 100vh; min-height: 100dvh; }
.shell-main { flex: 1; min-width: 0; margin-left: var(--rail-w); }

/* Light menu on the page background, like Facebook's left column. */
.rail {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  width: var(--rail-w);
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 10px;
  background: var(--bg);
  color: var(--text);
  overflow-y: auto; overscroll-behavior: contain;
}
.rail-brand { display: flex; align-items: center; min-height: 44px; padding: 0 10px; font-size: 34px; }
/* Logo: the name with a red wheel for the "o", sized by font-size like text. */
.brand-logo { display: inline-flex; align-items: center; line-height: 0; }
.brand-wordmark { display: block; width: auto; height: 1.2em; }
/* White letters on dark backgrounds, navy ones elsewhere. A dark theme only
   needs to add its selector next to .on-dark. */
.brand-wordmark-dark, .on-dark .brand-wordmark-light { display: none; }
.on-dark .brand-wordmark-dark { display: block; }
/* The app icon replaces the name on narrow rails. */
.brand-mark { display: none; width: 44px; height: 44px; border-radius: 12px; }
.rail-nav { display: flex; flex-direction: column; gap: 2px; }
.rail-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 8px;
  border-radius: 10px;
  font-weight: 500;
  font-size: 15px;
  transition: background-color 0.15s;
}
.rail-label { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-item.active { background: var(--secondary-btn-hover); font-weight: 600; }
.rail-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--tile);
  color: #fff;
}
@media (hover: hover) and (pointer: fine) {
  .rail-item:hover:not(.active) { background: var(--secondary-btn-hover); }
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  /* Under the notch / status bar on phones (viewport-fit=cover). */
  height: var(--top-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: env(safe-area-inset-top, 0px) 28px 0;
  background: rgba(238, 241, 246, 0.82);
  backdrop-filter: blur(14px);
}
.topbar-actions { position: relative; display: flex; align-items: center; gap: 10px; z-index: 2; }
.avatar-btn { border-radius: 50%; }
.click-catcher { position: fixed; inset: 0; z-index: 1; }

.search {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  width: min(460px, 100%);
  padding: 0 16px;
  border-radius: 18px;
  background: var(--card);
  color: var(--muted);
  box-shadow: var(--shadow);
}
.search input { flex: 1; min-width: 0; border: none; background: transparent; outline: none; color: var(--text); }
.search .kbd { font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 6px; background: var(--bg); color: var(--muted); }
.search:focus-within { box-shadow: 0 0 0 3px rgba(229, 36, 43, 0.15), var(--shadow); }
.search-results { left: 0; top: 54px; width: 100%; min-width: 320px; }

.dropdown {
  position: absolute;
  top: 56px;
  right: 0;
  width: 380px;
  max-height: calc(100vh - 96px); max-height: calc(100dvh - 96px);
  overflow-y: auto; overscroll-behavior: contain;
  padding: 10px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 60;
  animation: pop-in 0.16s ease-out;
}
@keyframes pop-in { from { opacity: 0; transform: translateY(-6px) scale(0.98); } }
.dropdown h3 { padding: 6px 8px 10px; margin: 0; font-size: 22px; }
.dropdown-account { width: 340px; }
.dropdown-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border-radius: var(--radius-sm); text-align: left; }
@media (hover: hover) and (pointer: fine) { .dropdown-item:hover:not(.static) { background: var(--hover); } }
.dropdown-item.unread .dropdown-text strong, .dropdown-item.unread .dropdown-text > span:first-child { font-weight: 700; }
.dropdown-item.unread .muted { color: var(--primary); font-weight: 600; }
.dropdown-item.profile-link { background: var(--bg); margin-bottom: 6px; }
.dropdown-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.menu-icon, .notif-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--bg);
  flex-shrink: 0;
}
.notif-icon { width: 52px; height: 52px; border-radius: 16px; background: var(--navy); color: var(--gold); }
.unread-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--primary); flex-shrink: 0; }
.small-menu { top: 40px; width: 260px; }

/* ---------- Layout ---------- */
.page { min-height: calc(100vh - var(--top-h)); min-height: calc(100dvh - var(--top-h)); }
.page-center { display: flex; justify-content: center; padding: 64px; }
.home { display: flex; justify-content: center; gap: 28px; padding: 0 28px 40px; }
.feed { flex: 0 1 680px; min-width: 0; }
.sidebar-right { position: sticky; top: var(--top-h); align-self: flex-start; width: 320px; flex-shrink: 0; display: flex; flex-direction: column; gap: 18px; }
.side-panels { display: flex; flex-direction: column; gap: 18px; }
.panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.panel-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.panel-title h3 { margin: 0; font-size: 16px; }
.contact { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px; border-radius: var(--radius-sm); font-weight: 500; text-align: left; }
@media (hover: hover) and (pointer: fine) { .contact:hover { background: var(--hover); } }
.contact-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.request-row { display: flex; gap: 12px; padding: 8px; border-radius: var(--radius-sm); }
.request-body { flex: 1; }
.next-appointment { display: flex; align-items: center; gap: 14px; padding: 6px; border-radius: var(--radius-sm); }
@media (hover: hover) and (pointer: fine) { .next-appointment:hover { background: var(--hover); } }
.next-text { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.date-tile {
  width: 56px;
  height: 60px;
  flex-shrink: 0;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  color: #fff;
}
.date-tile strong { font-size: 22px; line-height: 1; font-family: var(--font-display); }
.date-tile span { font-size: 11px; font-weight: 700; color: var(--gold); letter-spacing: 0.5px; }
.next-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.side-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 8px 10px; border-radius: var(--radius-sm); font-weight: 500; text-align: left; }
.side-item.active { background: var(--hover); }
@media (hover: hover) and (pointer: fine) { .side-item:hover:not(.static) { background: var(--hover); } }
.side-item.active { color: var(--primary); }
.side-item.active .side-icon { background: var(--primary); color: #fff; }
.side-icon { display: flex; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: 12px; flex-shrink: 0; background: var(--bg); }

/* ---------- Stories ---------- */
/* Compact strip as on Facebook: six cards across the feed. */
.stories { position: relative; margin-bottom: 16px; }
.stories-track { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x mandatory; }
.stories-track::-webkit-scrollbar { display: none; }
.story-card {
  position: relative;
  display: block;
  padding: 0;
  text-align: left;
  flex: 0 0 calc((100% - 5 * 8px) / 6);
  min-width: 96px;
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  overflow: hidden;
  background: #ddd;
  box-shadow: 0 1px 2px rgba(13, 27, 46, 0.15);
  scroll-snap-align: start;
}
.story-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.3), transparent 30%, transparent 60%, rgba(0,0,0,.55));
  transition: background-color 0.2s;
}
@media (hover: hover) and (pointer: fine) { .story-card:hover::after { background-color: rgba(0, 0, 0, 0.12); } }
.story-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
@media (hover: hover) and (pointer: fine) { .story-card:hover .story-bg { transform: scale(1.03); } }
/* Clear of the avatar above and the name below. */
.story-text-bg { display: flex; align-items: center; justify-content: center; padding: 48px 8px 36px; color: #fff; font-weight: 700; font-size: 13px; text-align: center; word-break: break-word; }
.story-avatar { position: absolute; top: 10px; left: 10px; z-index: 1; }
.story-name {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 1;
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  line-height: 1.25;
  text-align: left;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.story-card.create { background: var(--card); }
.story-card.create::after { display: none; }
.story-create-photo { position: absolute; top: 0; left: 0; right: 0; height: 62%; overflow: hidden; }
.story-create-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
@media (hover: hover) and (pointer: fine) { .story-card.create:hover .story-create-photo img { transform: scale(1.03); } }
.story-create-placeholder { height: 100%; display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg, #e8eefb, #fdecec); color: var(--navy); }
.story-plus {
  position: absolute;
  left: 50%;
  top: 62%;
  transform: translate(-50%, -50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: 4px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.story-create-label { position: absolute; bottom: 8px; left: 4px; right: 4px; text-align: center; font-weight: 600; font-size: 12.5px; line-height: 1.2; }
.stories-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(13, 27, 46, 0.25); z-index: 2; }
.stories-arrow.left { left: 8px; }
.stories-arrow.right { right: 8px; }

.story-viewer {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #18191a;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}
.story-close { position: absolute; top: 16px; right: 16px; }
.story-frame {
  position: relative;
  height: min(90vh, 820px);
  aspect-ratio: 9 / 16;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  animation: story-in 0.25s ease-out;
}
@keyframes story-in { from { opacity: 0; transform: scale(0.98); } to { opacity: 1; transform: none; } }
.story-progress { position: absolute; top: 8px; left: 8px; right: 8px; display: flex; gap: 4px; z-index: 2; }
.story-progress .bar { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,.35); overflow: hidden; }
.story-progress .bar > span { display: block; height: 100%; width: 0; background: #fff; }
.story-progress .bar.done > span { width: 100%; }
.story-progress .bar.running > span { animation: story-progress 5s linear forwards; }
/* Video stories follow the playback, reported a few times per second. */
.story-progress .bar.video > span { transition: width 250ms linear; }
@media (prefers-reduced-motion: reduce) {
  .story-progress .bar.video > span { transition: none; }
}
@keyframes story-progress { to { width: 100%; } }
.story-meta { position: absolute; top: 20px; left: 12px; right: 12px; z-index: 2; display: flex; align-items: center; gap: 8px; color: #fff; font-size: 14px; }
.story-meta span { opacity: 0.8; }
.story-image { width: 100%; height: 100%; object-fit: contain; }
.story-caption { position: absolute; bottom: 32px; left: 16px; right: 16px; text-align: center; color: #fff; background: rgba(0,0,0,.45); padding: 8px; border-radius: 8px; }
.story-text-full { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 32px; }
.story-text-full p { color: #fff; font-size: 28px; font-weight: 700; text-align: center; word-break: break-word; }
.story-nav { background: rgba(255,255,255,.9); }

.story-editor { display: flex; gap: 16px; }
.story-preview {
  width: 220px;
  aspect-ratio: 9 / 16;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  flex-shrink: 0;
}
.story-preview img, .story-preview video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.story-preview p { position: relative; color: #fff; font-weight: 700; font-size: 18px; text-align: center; padding: 12px; text-shadow: 0 1px 3px rgba(0,0,0,.5); word-break: break-word; }
.story-preview p.placeholder { opacity: 0.6; }
/* Over a photo or video the text becomes a caption, as in the viewer. */
.story-preview.has-media { align-items: flex-end; }
.story-preview.has-media p { margin: 0 10px 14px; padding: 6px 10px; border-radius: 8px; background: rgba(0, 0, 0, 0.45); font-size: 14px; font-weight: 600; text-shadow: none; }
.story-preview .story-preview-remove {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  box-shadow: none;
}
@media (hover: hover) and (pointer: fine) { .story-preview .story-preview-remove:hover:not(:disabled) { background: rgba(0, 0, 0, 0.75); color: #fff; } }
.story-media-picks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.story-media-pick > span { display: inline-flex; align-items: center; gap: 8px; }
.story-tools { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.story-tools textarea { border: 1px solid var(--divider); border-radius: 8px; padding: 10px; resize: none; }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.swatch { width: 28px; height: 28px; border-radius: 50%; border: 3px solid transparent; }
.swatch.selected { border-color: #fff; box-shadow: 0 0 0 2px var(--primary); }

/* ---------- Composer & posts ---------- */
.composer-row { display: flex; align-items: center; gap: 8px; }
.composer-input {
  flex: 1;
  height: 40px;
  padding: 0 12px;
  border-radius: 20px;
  background: var(--input);
  color: var(--muted);
  text-align: left;
  font-size: 17px;
}
@media (hover: hover) and (pointer: fine) { .composer-input:hover { background: var(--secondary-btn); } }
.composer-input { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.composer-action { width: 40px; height: 40px; }
.author-row { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.author-row > div { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.post-textarea { width: 100%; border: none; outline: none; resize: none; font-size: 22px; min-height: 120px; }
.image-preview { position: relative; border: 1px solid var(--divider); border-radius: 8px; padding: 8px; margin-bottom: 12px; }
.image-preview img { width: 100%; max-height: 360px; object-fit: contain; border-radius: 6px; }
.image-preview .remove { position: absolute; top: 16px; right: 16px; background: #fff; box-shadow: var(--shadow); }
.add-to-post {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--divider);
  border-radius: 8px;
  padding: 8px 16px;
  font-weight: 600;
}
.image-picker { cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }

.post { padding: 12px 0 0; }
.post-header { display: flex; align-items: center; gap: 8px; padding: 0 16px 12px; }
.post-meta { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.post-author { font-weight: 600; }
@media (hover: hover) and (pointer: fine) { .post-author:hover { text-decoration: underline; } }
.post-menu { position: relative; }
.post-content { padding: 0 16px 12px; white-space: pre-line; word-break: break-word; }
.post-content.big { font-size: 24px; }
.like-bubble {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(#18afff, #0062df);
  color: #fff;
  vertical-align: middle;
}
@keyframes like-pop { 50% { transform: scale(1.3) rotate(-10deg); } }
.comments { border-top: 1px solid var(--divider); margin: 0 16px; padding: 8px 0 12px; }
.comment { display: flex; gap: 6px; margin: 6px 0; }
.comment-bubble { background: var(--input); border-radius: 18px; padding: 8px 12px; display: inline-block; }
.comment-author { font-weight: 600; font-size: 13px; }
.comment-form { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.comment-form input, .chat-input input {
  flex: 1;
  height: 36px;
  border: none;
  outline: none;
  border-radius: 18px;
  background: var(--input);
  padding: 0 12px;
}
.post-list > .btn { display: flex; margin: 8px auto 24px; }

.empty-state { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 32px; color: var(--muted); text-align: center; }
.spinner {
  width: 32px;
  height: 32px;
  margin: 24px auto;
  border-radius: 50%;
  border: 3px solid var(--secondary-btn);
  border-top-color: var(--primary);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.splash { height: 100vh; height: 100dvh; display: flex; align-items: center; justify-content: center; }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(244, 244, 244, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fade-in 0.15s ease-out;
}
@keyframes fade-in { from { opacity: 0; } }
.modal {
  width: 500px;
  max-width: 100%;
  max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px);
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  animation: modal-in 0.2s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}
@keyframes modal-in { from { opacity: 0; transform: scale(0.96); } }
.modal-wide { width: 900px; }
.modal-header { position: relative; display: flex; align-items: center; justify-content: center; height: 60px; border-bottom: 1px solid var(--divider); flex-shrink: 0; }
.modal-close { position: absolute; right: 16px; background: var(--secondary-btn); color: var(--muted); }
.modal-body { padding: 16px; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 10px; }
/* Nothing shrinks when the body scrolls (the submit button used to get squashed). */
.modal-body > * { flex-shrink: 0; }
/* Buttons keep their natural width: the submit button sits at the bottom right. */
.modal-body > .btn, .story-tools > .btn { align-self: flex-end; margin-top: 6px; }
.listing-detail-info > .btn { align-self: flex-start; }

/* ---------- QR code ---------- */
.qr-code { width: min(300px, 100%); align-self: center; border-radius: var(--radius-sm); overflow: hidden; box-shadow: 0 0 0 1px var(--divider); }
.qr-code svg { display: block; width: 100%; height: auto; }
.qr-code-url { text-align: center; word-break: break-all; color: var(--muted); }

.text-field {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #ccd0d5;
  border-radius: 6px;
  background: #f5f6f7;
  outline: none;
}
textarea.text-field { height: auto; padding: 10px 12px; resize: vertical; }
.text-field:focus { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-light); background: #fff; }
.text-field.invalid { border-color: var(--danger); }
.field-row { display: flex; gap: 10px; }
.field-row > * { flex: 1; min-width: 0; }
.field-label { font-size: 13px; color: var(--muted); margin-top: 4px; }
.form-field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.form-field.narrow { flex: 0 0 120px; }
.community-choice { display: flex; gap: 10px; }
.community-choice.invalid .community-option { border-color: var(--danger); }
.community-option {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 8px;
  border: 2px solid #ccd0d5;
  border-radius: 10px;
  color: var(--muted);
  transition: border-color 0.15s, background-color 0.15s;
}
.community-option strong { color: var(--text); }
@media (hover: hover) and (pointer: fine) { .community-option:hover { background: var(--hover); } }
.community-option.selected { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }
.community-choice.compact .community-option { flex-direction: row; justify-content: center; padding: 8px; }


/* ---------- Chat dock ---------- */
.chat-dock { position: fixed; right: 16px; bottom: 0; z-index: 70; display: flex; align-items: flex-end; gap: 10px; pointer-events: none; }
.chat-dock > * { pointer-events: auto; }
.chat-bubbles { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.chat-bubble { border-radius: 50%; box-shadow: var(--shadow-lg); }
.chat-window {
  width: 328px;
  height: 455px;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-radius: 8px 8px 0 0;
  box-shadow: var(--shadow-lg);
  animation: chat-in 0.2s ease-out;
}
@keyframes chat-in { from { transform: translateY(20px); opacity: 0; } }
.chat-header { display: flex; align-items: center; gap: 2px; padding: 6px; border-bottom: 1px solid var(--divider); }
.chat-header .icon-btn { width: 30px; height: 30px; color: var(--primary); }
.chat-peer { flex: 1; display: flex; align-items: center; gap: 8px; padding: 2px 4px; border-radius: 6px; min-width: 0; }
@media (hover: hover) and (pointer: fine) { .chat-peer:hover { background: var(--hover); } }
.chat-peer > div { display: flex; flex-direction: column; min-width: 0; }
.chat-peer strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-messages { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.chat-empty { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.chat-time { text-align: center; color: var(--muted); font-size: 12px; margin: 10px 0 4px; }
.msg { display: flex; }
.msg.mine { justify-content: flex-end; }
.msg-bubble {
  max-width: 75%;
  padding: 8px 12px;
  border-radius: 18px;
  white-space: pre-wrap;
  word-break: break-word;
  animation: fade-in 0.15s ease-out;
}
.msg.theirs .msg-bubble { background: var(--secondary-btn); }
.msg.mine .msg-bubble { background: var(--primary); color: #fff; }
.chat-error { padding: 0 12px; margin: 4px 0; }
/* Typing indicator: three dots bouncing in turn, like Messenger */
.msg.typing { align-items: flex-end; gap: 6px; margin-top: 4px; }
.typing-dots { display: inline-flex; align-items: center; gap: 4px; padding: 12px 14px; }
.typing-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  animation: typing-dot 1.2s ease-in-out infinite;
}
.typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.typing-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing-dot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-4px); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .typing-dots span { animation-name: typing-dot-fade; }
  @keyframes typing-dot-fade { 0%, 60%, 100% { opacity: 0.4; } 30% { opacity: 1; } }
}
.chat-input { display: flex; align-items: center; gap: 4px; padding: 8px; }

/* ---------- Profile ---------- */
.profile-top { background: var(--card); box-shadow: var(--shadow); }
.profile-top-inner { max-width: 1250px; margin: 0 auto; padding: 0 32px; }
/* Same 4:1 band as the crop dialog (CropFrame.cover), so what is framed is what shows. */
.cover {
  position: relative;
  aspect-ratio: 4 / 1;
  max-height: 300px;
  min-height: 120px;
  border-radius: 0 0 8px 8px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 55%, var(--primary) 130%);
}
.cover img { width: 100%; height: 100%; object-fit: cover; }
/* z-index: .profile-identity overlaps the bottom of the cover (negative margin) and would swallow the clicks. */
.cover-btn { position: absolute; z-index: 2; right: 24px; bottom: 16px; background: #fff; }
/* Upload in progress: local preview, dimmed until the server confirms. */
.cover.uploading img, .profile-avatar.uploading .avatar-preview { opacity: 0.6; transition: opacity 200ms ease; }
.profile-avatar .avatar-preview { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.image-picker.disabled { cursor: progress; opacity: 0.85; }
.btn-spinner.dark { display: inline-block; width: 16px; height: 16px; vertical-align: -3px; border-color: rgba(13, 27, 46, 0.2); border-top-color: var(--text); }
.profile-identity { display: flex; align-items: flex-start; gap: 16px; padding: 0 16px 16px; margin-top: -84px; position: relative; }
.profile-avatar { position: relative; border: 4px solid #fff; border-radius: 50%; background: #fff; }
.avatar-camera { position: absolute; right: 6px; bottom: 6px; }
/* Reposition the photo in place: next to the cover button, and at the avatar's bottom left. */
.profile-names { flex: 1; min-width: 260px; padding-top: 100px; }
.profile-names h1 { font-size: 32px; font-weight: 700; }
.friend-faces { display: flex; margin-top: 6px; }
.friend-faces .avatar { margin-right: -8px; border: 2px solid #fff; }
/* Many actions (book, call, report, verify) wrap instead of squeezing the name. */
.profile-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding-top: 120px; max-width: 380px; }
.profile-tabs { display: flex; gap: 4px; }
.profile-tabs span { padding: 16px; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; }
.profile-tabs span.active { color: var(--primary); border-bottom-color: var(--primary); }
.profile-body { max-width: 1250px; margin: 16px auto; padding: 0 32px; display: flex; gap: 16px; align-items: flex-start; }
.profile-side { width: 40%; position: sticky; top: calc(var(--top-h) + 16px); }
.profile-feed { flex: 1; min-width: 0; }
.bio { margin-bottom: 12px; }
.intro-list { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-direction: column; gap: 12px; }
.intro-list li { display: flex; align-items: center; gap: 8px; color: var(--text); }
.intro-list .icon { color: #8c939d; }
.car-photo { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 8px; margin-bottom: 8px; }
.car-photo.placeholder { display: flex; align-items: center; justify-content: center; background: var(--input); color: #bcc0c4; }
.friends-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.friend-tile { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; }
.friend-tile .avatar { width: 100% !important; height: auto !important; aspect-ratio: 1; border-radius: 8px; }
.friend-tile .avatar img, .friend-tile .avatar-initials { border-radius: 8px; }

/* ---------- Friends ---------- */
.friends-page { max-width: 1200px; margin: 0 auto; padding: 24px 32px; }
.friends-page section { margin-bottom: 8px; }
.friends-page h2 { margin-bottom: 16px; }
/* A member as a card (invitations, suggestions, friends) */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.person-card {
  position: relative; display: flex; flex-direction: column; align-items: center; padding: 0 0 14px; margin: 0;
  overflow: hidden; text-align: center; transition: box-shadow 160ms ease, transform 160ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) { .person-card:hover { box-shadow: var(--shadow-lg); } }
.person-card.highlighted { box-shadow: var(--shadow), inset 0 0 0 2px var(--primary); }
.person-band { width: 100%; height: 64px; background: linear-gradient(135deg, #dfe8fb, #eef3fd); }
.person-card.moto .person-band { background: linear-gradient(135deg, #ece5ff, #f5f1ff); }
.person-card.highlighted .person-band { background: linear-gradient(135deg, #fde2e3, #fff1f1); }
.person-face { margin-top: -48px; border-radius: 50%; line-height: 0; }
.person-face .avatar { border: 4px solid var(--card); box-sizing: content-box; }
.person-body { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; padding: 8px 14px 0; min-width: 0; }
.person-name {
  font-weight: 700; font-size: 16px; line-height: 1.25; text-decoration: none; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere;
}
@media (hover: hover) and (pointer: fine) { .person-name:hover { text-decoration: underline; } }
.person-subtitle { font-size: 12.5px; color: var(--muted); }
.person-actions { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; width: 100%; padding: 12px 14px 0; margin-top: auto; }
.person-actions .btn { width: 100%; min-width: 0; height: 38px; padding: 0 10px; font-size: 14px; justify-content: center; gap: 6px; }
@media (max-width: 600px) {
  .people-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .person-actions { grid-auto-flow: row; }
}

/* ---------- Marketplace ---------- */
.market { display: flex; }
.market-side {
  position: sticky;
  top: var(--top-h);
  height: calc(100vh - var(--top-h)); height: calc(100dvh - var(--top-h));
  width: 360px;
  flex-shrink: 0;
  background: var(--card);
  box-shadow: var(--shadow);
  padding: 16px 8px;
  overflow-y: auto; overscroll-behavior: contain;
}
.market-side h2 { font-size: 24px; padding: 0 8px 8px; }
.market-side .btn { margin: 12px 8px; }
.market-main { flex: 1; padding: 24px; }
.market-main h2 { margin-bottom: 16px; }
.market-main .page-title h2 { margin: 0; }
.listing-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px 12px; }
.listing-card { display: flex; flex-direction: column; align-items: flex-start; text-align: left; gap: 2px; border-radius: 8px; }
.listing-photo {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: var(--secondary-btn);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #bcc0c4;
  margin-bottom: 6px;
}
.listing-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
@media (hover: hover) and (pointer: fine) { .listing-card:hover .listing-photo img { transform: scale(1.04); } }
.listing-price { font-size: 17px; }
.listing-price.big { font-size: 22px; }
.listing-title { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.listing-detail { display: flex; gap: 20px; }
.listing-detail-photo {
  flex: 1.3;
  min-height: 360px;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
}
.listing-detail-photo img { width: 100%; max-height: 70vh; object-fit: contain; }

/* Detail photos open full screen */
.photo-zoom { position: relative; display: block; width: 100%; height: 100%; padding: 0; border-radius: 0; cursor: zoom-in; }
.photo-zoom img { display: block; }
.photo-zoom-hint { position: absolute; right: 10px; bottom: 10px; display: flex; padding: 7px; border-radius: 50%; background: rgba(13, 27, 46, .55); color: #fff; opacity: .85; transition: opacity .15s; }
.photo-zoom:focus-visible .photo-zoom-hint { opacity: 1; }
@media (hover: hover) and (pointer: fine) { .photo-zoom:hover .photo-zoom-hint { opacity: 1; } }
.lightbox { position: fixed; inset: 0; z-index: 120; display: flex; align-items: center; justify-content: center; padding: 56px 72px; background: rgba(8, 12, 20, .94); animation: fade-in .15s ease-out; }
.lightbox-photo { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; user-select: none; }
.lightbox button { display: flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; transition: background-color .15s; }
@media (hover: hover) and (pointer: fine) { .lightbox button:hover { background: rgba(255, 255, 255, .24); } }
.lightbox-close { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; }
.lightbox-arrow { position: absolute; top: 50%; width: 52px; height: 52px; transform: translateY(-50%); }
.lightbox-arrow.prev { left: 12px; }
.lightbox-arrow.next { right: 12px; }
.lightbox-count { position: absolute; top: 24px; left: 50%; transform: translateX(-50%); color: rgba(255, 255, 255, .8); font-size: 14px; font-variant-numeric: tabular-nums; }
@media (max-width: 700px) {
  .lightbox { padding: 56px 0; }
  .lightbox-arrow { width: 44px; height: 44px; background: rgba(0, 0, 0, .35); }
}
.listing-detail-info { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.listing-detail-info h2 { font-size: 24px; }
.listing-detail-info h4 { margin: 8px 0 0; color: var(--text); }
.listing-upload {
  height: 180px;
  border: 2px dashed var(--divider);
  border-radius: 8px;
  overflow: hidden;
  color: var(--muted);
  text-align: center;
  background: var(--input);
}
@media (hover: hover) and (pointer: fine) { .listing-upload:hover { background: var(--secondary-btn); } }
.listing-upload img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Stores ---------- */
.page-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.link { color: var(--primary); }
@media (hover: hover) and (pointer: fine) { .link:hover { text-decoration: underline; } }
.btn-danger { background: var(--danger); color: #fff; }
@media (hover: hover) and (pointer: fine) { .btn-danger:hover { background: #c81a37; } }
.btn-light-danger { background: #ffebee; color: var(--danger); }
@media (hover: hover) and (pointer: fine) { .btn-light-danger:hover { background: #ffd7dd; } }
a.btn { text-decoration: none; }
.badge-store-garage { background: #fff1e6; color: #d35400; }
.badge-store-dealer { background: #e8eefb; color: #1d4ed8; }
.badge-store-manufacturer { background: #efe7fb; color: #6f42c1; }
.store-logo {
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, #e4e6eb, #ccd0d5);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
}
.store-logo img { width: 100%; height: 100%; object-fit: cover; }
.store-avatar .store-logo { border-radius: 50%; }
.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-bottom: 16px; }
/* The member's stores, listed in the side panel like Facebook's "Pages you manage". */
/* Stores & La Bourse: filters in a horizontal toolbar so the content gets the full width */
.toolbar-page { padding: 8px 28px 40px; }
.filter-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.filter-toolbar .search { flex: 1 1 280px; width: auto; max-width: 460px; }
.filter-toolbar .side-item { width: auto; min-height: 46px; padding: 5px 14px 5px 6px; border-radius: 18px; background: var(--card); box-shadow: var(--shadow); }
.filter-toolbar .side-icon { width: 34px; height: 34px; }
.filter-toolbar .area-button-text { max-width: 220px; }
.filter-toolbar .country-filter .text-field { width: 200px; flex: none; }
.filter-tabs { display: flex; align-items: center; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 4px; margin-bottom: 20px; }
.filter-tabs::-webkit-scrollbar { display: none; }
.filter-tabs .chip { flex-shrink: 0; gap: 8px; height: 38px; padding: 0 16px; white-space: nowrap; }
.filter-tabs-sep { flex-shrink: 0; width: 1px; height: 24px; margin: 0 4px; background: var(--divider); }
.page-title-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.stores-page .store-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
/* Businesses: the list on the left, the map on the right (kept in view while the list scrolls). */
.stores-split { display: grid; grid-template-columns: minmax(300px, 420px) 1fr; gap: 16px; align-items: start; }
.stores-list { display: flex; flex-direction: column; gap: 8px; transition: opacity .15s; }
.stores-list.busy { opacity: .6; }
.store-item { display: flex; align-items: center; gap: 8px; padding: 8px 12px 8px 8px; border: 2px solid transparent; transition: border-color .15s, box-shadow .15s; }
.store-item.selected { border-color: var(--primary); }
.store-item-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 4px; text-align: left; border-radius: var(--radius-sm); }
@media (hover: hover) and (pointer: fine) { .store-item-main:hover { background: var(--hover); } }
.store-item-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.store-item .btn.small { flex-shrink: 0; height: 34px; padding: 0 14px; font-size: 14px; }
.stores-map-panel { position: sticky; top: calc(var(--top-h) + 12px); }
.stores-map { height: calc(100vh - var(--top-h) - 40px); height: calc(100dvh - var(--top-h) - 40px); min-height: 360px; border-radius: var(--radius); overflow: hidden; background: #e8eef4; box-shadow: var(--shadow); z-index: 0; }
.stores-map.failed { display: none; }
.area-pin.selected { z-index: 1000 !important; }
@media (max-width: 900px) {
  .stores-split { grid-template-columns: 1fr; }
  .stores-map-panel { position: static; order: -1; }
  .stores-map { height: 300px; min-height: 0; }
}
@media (max-width: 1000px) { .toolbar-page { padding: 8px 12px 40px; } }
.store-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; margin: 0; transition: box-shadow 0.15s, transform 0.15s; }
@media (hover: hover) and (pointer: fine) { .store-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); } }
.store-card-cover { height: 96px; background: linear-gradient(135deg, var(--navy), var(--primary)); }
.store-card-cover img { width: 100%; height: 100%; object-fit: cover; }
.store-card-body { display: flex; gap: 10px; padding: 0 12px 12px; align-items: flex-start; }
.store-card-body .store-logo { border: 3px solid #fff; margin-top: -28px; }
.store-card-body > div { padding-top: 6px; }
.store-card-body > div { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.store-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.open-now { font-size: 13px; font-weight: 600; }
.open-now.open { color: #31a24c; }
.open-now.closed { color: var(--danger); }
.profile-tabs button { padding: 16px; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; border-radius: 0; }
@media (hover: hover) and (pointer: fine) { .profile-tabs button:hover { background: var(--hover); } }
.profile-tabs button.active { color: var(--primary); border-bottom-color: var(--primary); }
.store-about { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; width: 100%; align-items: start; }
.hours-table { width: 100%; border-collapse: collapse; }
.hours-table td { padding: 8px 4px; border-bottom: 1px solid var(--hover); }
.hours-table td:last-child { text-align: right; }
.hours-table tr.today td { font-weight: 700; color: var(--primary); }
.store-vehicles, .agenda-tab { width: 100%; }
.agenda-tab { display: grid; grid-template-columns: 1fr 420px; gap: 16px; align-items: start; }
.agenda-side { position: sticky; top: calc(var(--top-h) + 16px); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border-radius: 16px;
  background: var(--secondary-btn);
  font-weight: 600;
  font-size: 14px;
  transition: background-color 0.15s;
}
@media (hover: hover) and (pointer: fine) { .chip:hover { background: var(--secondary-btn-hover); } }
.chip.selected { background: var(--primary-light); color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }

.hours-editor { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--divider); border-radius: 8px; padding: 8px 12px; }
.hours-editor.invalid { border-color: var(--danger); }
.hours-row { display: flex; align-items: center; gap: 8px; min-height: 40px; }
.hours-row .text-field { width: 120px; height: 34px; }
.hours-day { width: 120px; font-weight: 600; display: flex; align-items: center; gap: 4px; cursor: pointer; }
.hours-row.closed .hours-day { color: var(--muted); }

/* ---------- Agenda & appointments ---------- */
.agenda { display: flex; flex-direction: column; gap: 8px; }
.agenda-head { display: flex; align-items: center; gap: 6px; }
.agenda-date { width: auto; flex: 1; }
.agenda-dayname { min-width: 80px; text-align: right; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 6px; transition: opacity 0.15s; }
.slots.busy, .vehicle-grid.busy { opacity: 0.5; pointer-events: none; }
.slot { height: 38px; border-radius: 8px; font-weight: 600; border: 1px solid transparent; transition: transform 0.1s, background-color 0.15s; }
.slot:active:not(:disabled) { transform: scale(0.95); }
.slot-available { background: #e9f7ee; color: #1e7b3a; border-color: #b9e4c7; }
@media (hover: hover) and (pointer: fine) { .slot-available:hover { background: #d4f0de; } }
.slot-booked { background: var(--primary-light); color: var(--primary); }
.slot-blocked { background: #f1f1f1; color: #8a8d91; text-decoration: line-through; }
.slot-past { background: transparent; color: #bcc0c4; border-color: var(--hover); }
.slot.selected { background: var(--primary); color: #fff; border-color: var(--primary); }
.slot:disabled { opacity: 1; cursor: not-allowed; }
.legend { display: flex; gap: 14px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: middle; border: 1px solid var(--divider); }
.status { padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.status-pending { background: #fff4e5; color: #b26a00; }
.status-confirmed { background: #e9f7ee; color: #1e7b3a; }
.status-proposed { background: var(--primary-light); color: var(--primary); }
.status-cancelled, .status-declined { background: #f1f1f1; color: var(--muted); }
.appointments-page { max-width: 760px; margin: 0 auto; padding: 24px 16px; }
.settings-page { max-width: 640px; margin: 0 auto; padding: 24px 16px; display: flex; flex-direction: column; gap: 16px; }
.settings-card { display: flex; flex-direction: column; gap: 12px; padding: 20px; }
.settings-success { padding: 10px 12px; border-radius: 8px; background: #e8f5e9; color: #1b5e20; font-weight: 600; }
.settings-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--card, #fff); box-shadow: 0 1px 2px rgba(0, 0, 0, .06); overflow-x: auto; }
.settings-tab { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 12px; border-radius: 9px; font-weight: 600; color: var(--muted); text-decoration: none; white-space: nowrap; }
.settings-tab:hover { background: rgba(0, 0, 0, .04); }
.settings-tab.active { background: var(--primary); color: #fff; }
.settings-card h3 { margin: 0; }
.settings-card .switch-row { margin: 0; }
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.settings-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.settings-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.settings-card .btn-sm { padding: 6px 12px; font-size: 14px; }
.session-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.session { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px solid var(--divider, #e5e7eb); }
.session:first-child { border-top: 0; }
.session.ended { opacity: .65; }
.session.blocked-member { align-items: center; }
.session-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex-shrink: 0; border-radius: 10px; background: rgba(0, 0, 0, .05); }
.session-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.session-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.session-now { color: #1b5e20; font-weight: 600; }
.muted-badge { background: rgba(0, 0, 0, .06); color: var(--muted); }
.session-credit { margin: 0; text-align: right; }
.session-credit a { color: inherit; }
.appointment { display: flex; flex-direction: column; gap: 8px; }
.appointment-head { display: flex; align-items: center; gap: 10px; }
.appointment-title { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.appointment-note { background: var(--input); border-radius: 8px; padding: 8px 12px; }
.appointment-note.cancelled { background: #ffebee; }
.appointment-vehicle { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: var(--radius-sm); background: var(--input); }
.appointment-vehicle-photo { display: flex; align-items: center; justify-content: center; width: 96px; height: 64px; flex-shrink: 0; border-radius: 10px; overflow: hidden; background: var(--bg); color: var(--muted); }
.appointment-vehicle-photo img { width: 100%; height: 100%; object-fit: cover; }
.appointment-vehicle-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

/* ---------- Vehicles ---------- */
.vehicle-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; transition: opacity 0.15s; }
.vehicle-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; margin: 0; text-align: left; transition: box-shadow 0.15s, transform 0.15s; }
@media (hover: hover) and (pointer: fine) { .vehicle-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); } }
.vehicle-photo { position: relative; aspect-ratio: 4 / 3; background: var(--secondary-btn); display: flex; align-items: center; justify-content: center; color: #bcc0c4; overflow: hidden; }
.vehicle-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
@media (hover: hover) and (pointer: fine) { .vehicle-card:hover .vehicle-photo img { transform: scale(1.04); } }
.vehicle-condition { position: absolute; top: 10px; left: 10px; padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 700; background: #fff; }
.vehicle-condition.inline { position: static; display: inline-block; }
.vehicle-condition.new { background: #e9f7ee; color: #1e7b3a; }
.vehicle-condition.used { background: #fff4e5; color: #b26a00; }
.photo-count { position: absolute; right: 10px; bottom: 10px; background: rgba(0,0,0,.6); color: #fff; border-radius: 10px; padding: 2px 8px; font-size: 12px; display: flex; align-items: center; gap: 2px; }
.vehicle-body { padding: 12px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.vehicle-title { font-size: 17px; }
.vehicle-facts { color: var(--muted); }
.vehicle-price { font-size: 20px; margin-top: 4px; }
.vehicle-store { display: flex; align-items: center; gap: 6px; color: var(--muted); margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--hover); min-width: 0; }
.vehicle-gallery { flex: 1.3; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.vehicle-gallery .listing-detail-photo { flex: none; aspect-ratio: 4 / 3; min-height: 0; }
.vehicle-gallery .listing-detail-photo img { height: 100%; object-fit: cover; }
.thumbs { display: flex; gap: 6px; overflow-x: auto; }
.thumb { flex: 0 0 72px; height: 54px; border-radius: 6px; overflow: hidden; opacity: 0.6; border: 2px solid transparent; }
.thumb.selected { opacity: 1; border-color: var(--primary); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.spec-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 8px 0; }
.spec { display: grid; grid-template-columns: 22px 1fr; grid-template-rows: auto auto; column-gap: 6px; background: var(--input); border-radius: 8px; padding: 8px; }
.spec .icon { grid-row: span 2; color: var(--primary); }
.photo-strip { display: flex; gap: 8px; flex-wrap: wrap; }
.photo-thumb { position: relative; width: 104px; height: 78px; border-radius: 8px; overflow: hidden; background: var(--input); }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.photo-thumb .remove { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; background: #fff; }
.photo-thumb.add { border: 2px dashed var(--divider); color: var(--muted); font-size: 12px; text-align: center; }
@media (hover: hover) and (pointer: fine) { .photo-thumb.add:hover { background: var(--secondary-btn); } }
.photo-thumb .spinner { width: 24px; height: 24px; margin: 0; }
.vehicle-filters { display: flex; flex-direction: column; gap: 4px; }
.vehicle-filters h2 { padding: 4px 8px 4px; }
.vehicle-filters > .chips { padding: 0 8px 8px; }
.filter-section { padding: 10px 8px; border-top: 1px solid var(--hover); display: flex; flex-direction: column; gap: 8px; }
.filter-section h4 { margin: 0; color: var(--text); font-size: 15px; }

/* Drop-down list of checkboxes (vehicle type, brand, model) */
.multi-select { position: relative; display: flex; flex-direction: column; gap: 6px; }
.multi-select-label { font-weight: 600; font-size: 14px; }
.multi-select-button { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; text-align: left; cursor: pointer; color: var(--muted); }
.multi-select-button.has-value { color: var(--text); font-weight: 600; }
.multi-select-button:disabled { cursor: default; opacity: .7; }
.multi-select-button .icon { flex-shrink: 0; transition: transform .15s; }
.multi-select.open .multi-select-button { border-color: var(--primary); }
.multi-select.open .multi-select-button .icon { transform: rotate(180deg); }
.multi-select-backdrop { position: fixed; inset: 0; z-index: 20; }
.multi-select-panel { position: absolute; top: 100%; left: 0; right: 0; z-index: 21; margin-top: 4px; display: flex; flex-direction: column; background: var(--card); border-radius: var(--radius-sm); box-shadow: 0 12px 32px rgba(13, 27, 46, .18); overflow: hidden; }
.multi-select-search { margin: 8px; width: auto; }
.multi-select-options { max-height: 280px; overflow-y: auto; overscroll-behavior: contain; padding: 4px; }
.multi-select-group { padding: 8px 8px 2px; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.multi-select-option { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .multi-select-option:hover { background: var(--hover); } }
.multi-select-option input { width: 16px; height: 16px; flex-shrink: 0; accent-color: var(--primary); }
.multi-select-image { width: 24px; height: 24px; flex-shrink: 0; object-fit: contain; }
.multi-select-none { padding: 8px; }
.multi-select-footer { display: flex; justify-content: flex-end; padding: 6px 10px; border-top: 1px solid var(--divider); }
.sort { display: flex; align-items: center; gap: 6px; }
.sort .text-field { width: auto; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 16px; margin: 24px 0; }
.market-side h4 { margin: 14px 8px 4px; font-size: 13px; text-transform: uppercase; letter-spacing: .3px; }

/* ---------- Manufacturer news & events ---------- */
.store-posts, .news-page { width: 100%; }
.news-page { max-width: 900px; margin: 0 auto; padding: 24px 16px; }
.news-page section { margin-bottom: 24px; }
.news-page h2 { margin-bottom: 12px; }
.news-page .section-title { margin: 28px 0 14px; }
.store-post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.store-post-grid .store-post { margin: 0; }
.store-post { padding: 0; overflow: hidden; }
.store-post.past { opacity: 0.7; }
.store-post-image { width: 100%; max-height: 360px; object-fit: cover; }
.store-post-body { display: flex; gap: 14px; padding: 14px 16px; }
.store-post-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.store-post-text h3 { margin: 0; font-size: 19px; }
.store-post-meta { display: flex; align-items: center; gap: 8px; }
.store-post-content { color: var(--text); }
.store-post-store { margin: 4px 0 0; }
.kind { padding: 2px 10px; border-radius: 12px; font-size: 12px; font-weight: 700; }
.kind-news { background: #efe7fb; color: #6f42c1; }
.kind-event { background: #fff1e6; color: #d35400; }
.kind-past { background: #f1f1f1; color: var(--muted); }
.event-date {
  flex: 0 0 58px;
  height: 64px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  text-align: center;
}
.event-month { background: var(--danger); color: #fff; font-size: 11px; font-weight: 800; padding: 3px 0; letter-spacing: .5px; }
.event-day { flex: 1; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 800; background: #fff; }
.event-line { color: var(--muted); font-size: 14px; display: flex; align-items: center; gap: 2px; }

/* ---------- Language switcher ---------- */
.language-switcher {
  position: relative;
  display: inline-flex;
  align-self: center;
  align-items: center;
  margin: 16px auto 0;
  color: var(--muted);
}
.language-icon { position: absolute; left: 10px; pointer-events: none; }
.language-switcher select {
  appearance: none;
  height: 36px;
  padding: 0 30px 0 32px;
  border: 1px solid var(--divider);
  border-radius: 10px;
  background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%235b6b82'%3E%3Cpath d='M1.6 5.1a.6.6 0 0 1 .85 0L8 10.65l5.55-5.55a.6.6 0 1 1 .85.85l-6 6a.6.6 0 0 1-.85 0l-6-6a.6.6 0 0 1 0-.85'/%3E%3C/svg%3E") no-repeat right 10px center / 12px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.language-switcher select:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.dropdown-item .language-switcher { margin: 0 0 0 auto; }

/* ---------- Paddock refinements ---------- */
.btn { height: 40px; padding: 0 16px; border-radius: var(--radius-sm); }
.btn-lg { height: 50px; border-radius: 16px; }
.btn-primary { box-shadow: 0 8px 18px rgba(229, 36, 43, 0.28); }
@media (hover: hover) and (pointer: fine) { .btn-primary:hover:not(:disabled) { box-shadow: 0 10px 22px rgba(229, 36, 43, 0.36); } }
@media (hover: hover) and (pointer: fine) { .btn-light-primary:hover { background: #fadada; } }
.btn-success { background: var(--navy); }
@media (hover: hover) and (pointer: fine) { .btn-success:hover:not(:disabled) { background: var(--navy-2); } }
.icon-btn { border-radius: 12px; }
.icon-btn.green, .composer-action.green { color: #16a34a; }
.icon-btn.orange, .composer-action.orange { color: #d4931d; }
.composer-action.red { color: var(--primary); }
.round-btn { width: 44px; height: 44px; border-radius: 16px; background: var(--card); box-shadow: var(--shadow); }
@media (hover: hover) and (pointer: fine) { .round-btn:hover { background: var(--card); color: var(--primary); } }
.round-btn.active { background: var(--navy); color: #fff; }
.count-badge { background: var(--primary); border: 2px solid var(--bg); }
.link, .side-title a { color: var(--primary); }

.card { border-radius: var(--radius); box-shadow: var(--shadow); border: none; }
/* Feed cards are flatter and less rounded, as on Facebook. */
.feed .card { border-radius: 12px; box-shadow: 0 1px 2px rgba(13, 27, 46, 0.12); }
.text-field { border-radius: var(--radius-sm); border-color: var(--divider); background: var(--input); }
.text-field:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(229, 36, 43, 0.12); }
.chip { border-radius: 12px; }
.chip.selected { background: var(--navy); color: #fff; box-shadow: none; }
.badge-car { background: #e8eefb; color: #1d4ed8; }
.badge-moto { background: #efe9ff; color: #6d28d9; }
.avatar-ring img, .avatar-ring .avatar-initials { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--primary); }
.online-dot { background: #22c55e; }
.spinner { border-top-color: var(--primary); }

/* Stories */
.story-create-placeholder { background: linear-gradient(160deg, #e8eefb, #fdecec); color: var(--navy); }
.story-plus { background: var(--primary); border-color: var(--card); }

/* Composer & posts */
.composer { padding: 12px 16px; }
.composer-input { background: var(--input); border-radius: 20px; font-size: 16px; }
.like-bubble { background: var(--primary); }
.comment-bubble { border-radius: 16px; background: var(--bg); }
.comment-form input, .chat-input input { border-radius: 14px; }

/* Chat */
.chat-window { border-radius: 24px 24px 0 0; background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(14px); box-shadow: var(--shadow-lg); overflow: hidden; }
.chat-header { background: var(--navy); color: #fff; border-bottom: none; padding: 10px; }
.chat-header .muted { color: #9fb0c9; }
.chat-header .icon-btn { color: #fff; }
@media (hover: hover) and (pointer: fine) { .chat-header .icon-btn:hover { background: rgba(255, 255, 255, 0.1); } }
@media (hover: hover) and (pointer: fine) { .chat-peer:hover { background: rgba(255, 255, 255, 0.08); } }
.msg.theirs .msg-bubble { background: var(--bg); border-radius: 18px 18px 18px 6px; }
.msg.mine .msg-bubble { background: var(--navy); border-radius: 18px 18px 6px 18px; }
.chat-input .send { background: var(--primary); color: #fff; border-radius: 12px; }
@media (hover: hover) and (pointer: fine) { .chat-input .send:hover { background: var(--primary-hover); } }
.chat-bubble { box-shadow: var(--shadow-lg); }

/* Modal */
.modal-backdrop { background: rgba(12, 26, 48, 0.45); backdrop-filter: blur(4px); }
.modal { border-radius: 26px; }
.modal-header { border-bottom: 1px solid var(--divider); }
.modal-close { border-radius: 12px; }

.splash .brand-logo { font-size: 56px; }
.splash { background: var(--bg); }

/* Profile & stores */
.profile-top { background: transparent; box-shadow: none; }
.cover { border-radius: 0 0 28px 28px; background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 55%, var(--primary) 130%); }
.profile-avatar { border-color: var(--bg); background: var(--bg); }
.profile-tabs span.active, .profile-tabs button.active { color: var(--primary); border-bottom-color: var(--primary); }
.store-card-cover { background: linear-gradient(135deg, var(--navy), var(--navy-2) 60%, var(--primary) 140%); }
.store-card { border-radius: var(--radius); }
.date-tile, .event-date { box-shadow: none; }
.event-month { background: var(--navy); color: var(--gold); }
.status-proposed { background: #e8eefb; color: #1d4ed8; }

/* Marketplace & catalog: side filters become a floating panel */
.market { gap: 24px; padding: 0 28px 40px; }
.market-side {
  top: calc(var(--top-h) + 8px);
  height: auto;
  max-height: calc(100vh - var(--top-h) - 24px); max-height: calc(100dvh - var(--top-h) - 24px);
  width: 300px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 10px;
}
.market-main { padding: 8px 0; }
.listing-photo, .vehicle-photo { border-radius: 18px; }
.vehicle-card, .listing-card { border-radius: var(--radius); }
.vehicle-photo { margin: 8px 8px 0; border-radius: 16px; }
.spec { border-radius: 14px; }
.spec .icon { color: var(--primary); }
.friends-page, .appointments-page, .news-page { padding-top: 8px; }
/* The agenda's tabs share one width and one header height, so switching tabs doesn't shift anything. */
.appointments-page, .news-page { width: 100%; max-width: 900px; }
.page-title:has(> .page-tabs) { min-height: 40px; }
.page-tabs { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.page-tabs h2 { margin: 0; }
.segmented { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--input); }
.segmented a {
  border: 0; background: transparent; padding: 6px 14px; border-radius: 999px; text-decoration: none;
  font: inherit; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer;
  transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out);
}
.segmented a.selected { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(31, 42, 44, 0.12); }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .sidebar-right { display: none; }
}
@media (max-width: 1100px) {
  :root { --rail-w: 84px; }
  .rail { padding: 18px 12px; align-items: center; }
  .rail-label, .rail .brand-wordmark { display: none; }
  .rail .brand-mark { display: block; }
  .rail-brand { justify-content: center; padding: 0; }
  .rail-item { justify-content: center; }
}
@media (max-width: 1000px) {
  .store-about, .agenda-tab { grid-template-columns: 1fr; }
  .agenda-side { position: static; }
  .home { padding: 0 12px 40px; }
  .profile-body { flex-direction: column; padding: 0 12px; }
  .profile-side { width: 100%; position: static; }
  .market { flex-direction: column; }
  .market-side { position: static; width: auto; height: auto; }
}
@media (max-width: 700px) {
  /* The rail becomes a bottom tab bar on phones. */
  :root { --rail-w: 0px; }
  .rail {
    inset: auto 0 0 0;
    width: 100%;
    /* Above the home indicator. */
    height: calc(64px + env(safe-area-inset-bottom, 0px));
    flex-direction: row;
    justify-content: space-around;
    padding: 0 8px env(safe-area-inset-bottom, 0px);
    background: var(--card);
    box-shadow: 0 -1px 2px rgba(13, 27, 46, 0.1);
    overflow: visible;
  }
  .rail-brand, .rail-me { display: none; }
  .rail-nav { flex-direction: row; justify-content: space-around; width: 100%; }
  /* Every section shares the bar's width, however many there are. */
  .rail-item { min-height: 0; padding: 6px 0; flex: 1 1 0; min-width: 0; justify-content: center; }
  .rail-icon { width: 32px; height: 32px; background: none; color: var(--muted); }
  .rail-item.active { background: none; }
  .rail-item.active .rail-icon { color: var(--primary); }
  .shell-main { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
  .topbar { padding-left: 12px; padding-right: 12px; gap: 8px; }
  .search { flex: 1; min-width: 0; width: auto; }
  .search .kbd { display: none; }
  .topbar-actions { gap: 6px; }
  .round-btn { width: 40px; height: 40px; }
  .dropdown {
    position: fixed; top: calc(68px + env(safe-area-inset-top, 0px)); left: 8px; right: 8px; width: auto;
    max-height: calc(100dvh - 68px - 72px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  }
  .profile-identity { flex-direction: column; align-items: center; text-align: center; margin-top: -60px; }
  .profile-names, .profile-actions { padding-top: 0; }
  .profile-names h1 { font-size: 26px; }
  .friend-faces { justify-content: center; }
  .chat-dock { bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
  .chat-window { width: calc(100vw - 32px); }
  /* Taller cards, about three and a half across, as in the Facebook app. */
  .story-card { flex-basis: 30%; aspect-ratio: 3 / 5; }
  .composer-action.orange { display: none; }
  .story-editor, .listing-detail { flex-direction: column; }
  .story-preview { width: 100%; max-height: 320px; }
}



/* ---------- Auth: split screen (paddock showcase + form) ---------- */
.auth-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(440px, 1fr);
  background: var(--card);
}

.auth-showcase {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin: 12px;
  padding: 40px 56px;
  border-radius: 28px;
  color: #fff;
  background:
    radial-gradient(640px 420px at 100% 100%, rgba(229, 36, 43, 0.38), transparent 65%),
    linear-gradient(160deg, var(--navy-2) 0%, var(--navy) 70%);
}
/* Wheel motif: a thick 70 % red / 30 % gold ring cut out with a radial mask. */
.auth-wheel {
  position: absolute;
  z-index: -1;
  right: -220px;
  bottom: -260px;
  width: 560px;
  aspect-ratio: 1;
  border-radius: 50%;
  /* Starts at 300° so the gold section shows in the visible top-left quarter. */
  background: conic-gradient(from 300deg, var(--primary) 0 70%, var(--gold) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 34px), #000 calc(100% - 33px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 34px), #000 calc(100% - 33px));
  opacity: 0.9;
}
.auth-wheel::after {
  content: "";
  position: absolute;
  inset: 70px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, 0.14);
}
.auth-brand { display: flex; align-items: center; gap: 12px; font: 700 24px var(--font-display); letter-spacing: -0.5px; }
.auth-brand .brand-logo { font-size: 34px; color: inherit; }
.auth-pitch { margin: auto 0; }
.auth-pitch h1 {
  max-width: 11ch;
  font-size: clamp(40px, 4.6vw, 64px);
  line-height: 1.02;
  letter-spacing: -2px;
}
.auth-pitch > p { max-width: 42ch; margin-top: 18px; color: #c5d0e3; font-size: 17px; line-height: 1.55; }
.auth-features { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 14px; }
.auth-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #dbe4f3;
  font-size: 15px;
  /* First visit only: short ease-out stagger */
  animation: auth-rise 360ms var(--ease-out) backwards;
}
.auth-features li:nth-child(2) { animation-delay: 50ms; }
.auth-features li:nth-child(3) { animation-delay: 100ms; }
.auth-features li:nth-child(4) { animation-delay: 150ms; }
.auth-feature-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 12px;
  color: var(--gold);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* Top-anchored (not centered) so the tabs stay put when the form height changes. */
.auth-main { display: flex; justify-content: center; padding: clamp(48px, 14vh, 150px) 24px 48px; }
.auth-panel { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 28px; }

/* Segmented control: the white pill slides under the active tab. */
.auth-tabs {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  border-radius: 14px;
  background: var(--bg);
}
.auth-tabs-indicator {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(13, 27, 46, 0.08), 0 4px 12px rgba(13, 27, 46, 0.08);
  transition: transform 250ms var(--ease-out);
}
.auth-tabs.register .auth-tabs-indicator { transform: translateX(100%); }
.auth-tab {
  position: relative;
  height: 40px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  color: var(--muted);
  transition: color 200ms ease;
}
.auth-tab.active { color: var(--text); }

.auth-step { display: flex; flex-direction: column; gap: 16px; animation: auth-rise 260ms var(--ease-out); }
@keyframes auth-rise { from { opacity: 0; transform: translateY(6px); } }
.auth-heading { display: flex; flex-direction: column; gap: 6px; margin-bottom: 4px; }
.auth-heading h2 { font-size: 30px; line-height: 1.1; letter-spacing: -0.8px; }
.auth-heading p { color: var(--muted); font-size: 15px; line-height: 1.5; }
.auth-step-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 8px;
  border-radius: 14px;
  color: var(--primary);
  background: var(--primary-light);
}

.auth-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.auth-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.auth-label { font-size: 13px; font-weight: 600; color: var(--text); }
.auth-input { position: relative; }
.auth-step .text-field {
  height: 48px;
  padding: 0 14px;
  font-size: 16px; /* below 16px iOS zooms the page on focus */
  border: 1px solid #8592a6; /* 3:1 against white: the field boundary stays visible */
  border-radius: 12px;
  background: #fff;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.auth-step .text-field::placeholder { color: #7c889b; }
.auth-step .text-field:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(229, 36, 43, 0.12); }
.auth-step .text-field.invalid { border-color: #c81d24; box-shadow: 0 0 0 1px #c81d24; }
.auth-step .text-field.has-trailing { padding-right: 48px; }
.auth-step .code-field {
  height: 64px;
  /* The spacing is added after each digit: pad the left by as much so they stay centred. */
  padding: 0 0 0 0.45em;
  text-align: center;
  letter-spacing: 0.45em;
  font-size: 28px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.auth-step .code-field::placeholder { color: #b8c1cf; letter-spacing: 0.45em; }
/* A long address wraps instead of overflowing the screen. */
.auth-heading p { overflow-wrap: anywhere; }
.auth-eye {
  position: absolute;
  top: 50%;
  right: 6px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: var(--muted);
  transform: translateY(-50%);
  transition: color 150ms ease, background-color 150ms ease;
}
.auth-eye:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }

.auth-link {
  /* Padding grows the hit area to 24px+ without moving the text. */
  margin: -5px -4px;
  padding: 5px 4px;
  border-radius: 6px;
  color: var(--primary);
  font-weight: 600;
  font-size: 13px;
}
.auth-page button { touch-action: manipulation; }
.auth-hint, .auth-field-error { margin: 0; font-size: 13px; line-height: 1.4; }
.auth-hint { color: var(--muted); }
.auth-field-error { display: flex; align-items: center; gap: 6px; color: #c81d24; font-weight: 500; }
.auth-field-error::before {
  content: "!";
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  border-radius: 50%;
  color: #fff;
  background: #c81d24;
  font-size: 11px;
  font-weight: 800;
}
.btn:focus-visible { outline: 3px solid rgba(229, 36, 43, 0.45); outline-offset: 2px; }
.btn-spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}
.auth-link:focus-visible, .auth-back:focus-visible, .auth-tab:focus-visible, .auth-community:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.auth-switch { text-align: center; color: var(--muted); font-size: 14px; }
.auth-switch .auth-link { font-size: 14px; }
.auth-submit { margin-top: 4px; }
.auth-terms { color: var(--muted); font-size: 12px; line-height: 1.5; text-align: center; margin-top: -4px; }
.auth-info { color: var(--success); font-size: 14px; }
.auth-step .error-text { margin: 0; }
.auth-back {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: -8px;
  padding: 6px 10px 6px 8px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  transition: color 150ms ease, background-color 150ms ease;
}

/* Community picker: two radio cards with a check badge. */
.auth-communities-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.auth-community {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  text-align: left;
  border: 1.5px solid #8592a6;
  border-radius: 14px;
  background: #fff;
  transition: border-color 150ms ease, background-color 150ms ease, transform 160ms var(--ease-out);
}
.auth-community:active { transform: scale(0.98); }
.auth-communities-choice.invalid .auth-community { border-color: var(--danger); }
.auth-community-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 12px;
  color: var(--muted);
  background: var(--bg);
  transition: color 150ms ease, background-color 150ms ease;
}
.auth-community-text { display: flex; flex-direction: column; min-width: 0; font-size: 12px; color: var(--muted); line-height: 1.3; }
.auth-community-text strong { font-size: 14px; color: var(--text); }
.auth-community-check {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  color: #fff;
  background: var(--primary);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 150ms ease, transform 200ms var(--ease-out);
}
.auth-community.selected { border-color: var(--primary); background: #fff7f7; }
.auth-community.selected .auth-community-icon { color: var(--primary); background: var(--primary-light); }
.auth-community.selected .auth-community-check { opacity: 1; transform: scale(1); }

.auth-panel .language-switcher { margin-top: 0; }

@media (hover: hover) and (pointer: fine) {
  .auth-tab:not(.active):hover { color: var(--text); }
  .auth-eye:hover { color: var(--text); background: var(--bg); }
  .auth-link:hover { text-decoration: underline; }
  .auth-back:hover { color: var(--text); background: var(--bg); }
  .auth-community:not(.selected):hover { border-color: var(--text); }
}

@media (max-width: 1000px) {
  .auth-page { grid-template-columns: 1fr; align-content: start; }
  /* Under the notch / status bar: the navy paints edge to edge, the content stays clear of it. */
  .auth-showcase {
    margin: 0;
    padding: calc(20px + env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px)) 26px max(20px, env(safe-area-inset-left, 0px));
    gap: 16px;
    border-radius: 0 0 28px 28px;
  }
  /* Code and password steps: just the brand, so the form and its keyboard fit. */
  .auth-showcase.compact { padding-bottom: 16px; border-radius: 0 0 20px 20px; }
  .auth-showcase.compact .auth-pitch { display: none; }
  .auth-showcase.compact .auth-wheel { width: 180px; right: -90px; bottom: -120px; }
  .auth-pitch h1 { max-width: none; font-size: 32px; letter-spacing: -1px; }
  .auth-pitch > p { margin-top: 10px; font-size: 15px; }
  .auth-features { display: none; }
  .auth-wheel { width: 300px; right: -140px; bottom: -170px; opacity: 0.6; }
  .auth-main { padding: 24px max(20px, env(safe-area-inset-right, 0px)) calc(32px + env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px)); }
  .auth-panel { gap: 22px; }
  .auth-heading h2 { font-size: 26px; letter-spacing: -0.5px; }
}
@media (max-width: 420px) {
  .auth-pitch h1 { font-size: 28px; }
  .auth-pitch > p { font-size: 14px; line-height: 1.45; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-step, .auth-features li { animation-name: fade-in; }
  .auth-tabs-indicator, .auth-community, .auth-community-check { transition-property: opacity, color, background-color, border-color; }
}

/* ---------- Post card: header, full-bleed media, compact action bar ---------- */
/* No overflow clipping: the ••• menu must be able to overflow the card (the media clips itself). */
.post { padding: 0; overflow: visible; }
.post .post-header { gap: 12px; padding: 16px 10px 10px 16px; }
.post .post-meta { min-width: 0; gap: 2px; }
.post-title { display: flex; align-items: center; gap: 6px; min-width: 0; }
.post .post-author {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font: 600 15.5px var(--font-display);
}
.post-dot { color: var(--muted); }
.post-follow { flex-shrink: 0; color: var(--primary); font-weight: 600; font-size: 14px; }
.post-follow.sent { color: var(--muted); font-weight: 500; }
.post-time { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 13px; }
.post .post-header .icon-btn { width: 38px; height: 38px; color: var(--muted); }
.post .post-content { padding: 0 18px 14px; font-size: 15.5px; line-height: 1.5; }
.post .post-content.big { font: 600 24px/1.3 var(--font-display); letter-spacing: -0.4px; padding: 4px 18px 20px; }
.hashtag { color: var(--primary); font-weight: 600; }

/* The photo is never cropped: its blurred copy fills the sides. */
.post-media { position: relative; margin: 0; overflow: hidden; display: flex; justify-content: center; background: #0b0d12; }
.post-media-blur {
  position: absolute;
  inset: -40px;
  background: center / cover no-repeat;
  filter: blur(36px) brightness(0.55) saturate(1.2);
}
.post-media img { position: relative; display: block; max-width: 100%; max-height: 620px; object-fit: contain; }

.post-stats { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 16px; padding: 10px 0; color: var(--muted); font-size: 14px; }
.post-stats .post-comment-count { margin-left: auto; color: var(--muted); font-weight: 400; }
.post-bar { display: flex; align-items: center; gap: 4px; margin: 0 12px; padding: 4px 0; border-top: 1px solid var(--divider); }
.post-act {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 1;
  justify-content: center;
  min-width: 0;
  height: 40px;
  padding: 0 8px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  transition: background-color 150ms ease, color 150ms ease, transform 160ms var(--ease-out);
}
.post-act:active { transform: scale(0.96); }
.post-act:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.post-act.on, .post-act.copied { color: var(--primary); }
.post-act.copied { color: var(--success); }
.post-act.on .icon { animation: like-pop 0.3s ease-out; }
.post-reactions { display: inline-flex; align-items: center; gap: 6px; }
.post-reactions .like-bubble {
  width: 20px;
  height: 20px;
  background: linear-gradient(180deg, #ff4a4e, var(--primary));
  box-shadow: 0 0 0 2px var(--card);
}
.post .comments { margin: 0; padding: 8px 16px 12px; }

.post-hidden { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; color: var(--muted); }
.post-page { max-width: 680px; margin: 0 auto; }

@media (hover: hover) and (pointer: fine) {
  .post-act:hover { background: var(--bg); }
  .post .post-header .icon-btn:hover { color: var(--text); }
}
@media (prefers-reduced-motion: reduce) {
  .post-act.on .icon { animation: none; }
}

/* Address opening Google Maps */
.map-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(229, 36, 43, 0.35);
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
.map-link-icon { flex-shrink: 0; opacity: 0.75; }
.map-link:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
@media (hover: hover) and (pointer: fine) {
  .map-link:hover { text-decoration-color: currentColor; }
}

/* @mentions: suggestion list above the comment field, linked names in comments */
.mention-input { position: relative; flex: 1; display: flex; align-items: center; gap: 6px; min-width: 0; }
.mention-list {
  position: absolute;
  z-index: 30;
  left: 0;
  bottom: calc(100% + 6px);
  width: min(340px, 100%);
  max-height: 280px;
  overflow-y: auto; overscroll-behavior: contain;
  margin: 0;
  padding: 6px;
  list-style: none;
  border-radius: 16px;
  background: var(--card);
  box-shadow: 0 1px 2px rgba(13, 27, 46, 0.08), 0 12px 32px rgba(13, 27, 46, 0.18);
  transform-origin: bottom left;
  animation: mention-in 160ms var(--ease-out);
}
@keyframes mention-in { from { opacity: 0; transform: translateY(4px) scale(0.98); } }
.mention-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 8px;
  border-radius: 12px;
  cursor: pointer;
}
.mention-option.active { background: var(--bg); }
.mention-name { font-weight: 600; font-size: 14px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mention {
  color: var(--primary);
  font-weight: 600;
  border-radius: 4px;
  background: rgba(229, 36, 43, 0.08);
  padding: 0 2px;
}
.mention:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
@media (hover: hover) and (pointer: fine) {
  .mention:hover { text-decoration: underline; }
}
@media (prefers-reduced-motion: reduce) {
  .mention-list { animation-name: fade-in; }
}

/* Comment threads: replies indented under their comment, one level deep */
.comment-body { min-width: 0; }
.comment-bubble p { overflow-wrap: anywhere; }
.comment-meta { display: flex; align-items: center; gap: 12px; padding: 2px 12px 0; color: var(--muted); font-size: 12px; }
.comment-reply {
  margin: -6px -4px;
  padding: 6px 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.comment-reply:focus-visible, .replies-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; border-radius: 4px; }
.comment-replies {
  position: relative;
  margin-left: 38px;
  padding-left: 12px;
}
/* Thread line from the parent avatar down to the replies */
.comment-replies::before {
  content: "";
  position: absolute;
  left: -22px;
  top: -6px;
  bottom: 16px;
  width: 2px;
  border-radius: 2px;
  background: var(--divider);
}
.comment.reply { margin: 4px 0; }
.comment.reply .comment-bubble { padding: 6px 11px; }
.replies-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 4px 0;
  padding: 4px 6px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}
.reply-form { margin-top: 4px; }
@media (hover: hover) and (pointer: fine) {
  .comment-reply:hover, .replies-toggle:hover { text-decoration: underline; }
}

/* Post audience: Public / Friends */
.audience-choice { display: inline-flex; gap: 4px; margin-top: 4px; padding: 3px; border-radius: 10px; background: var(--bg); }
.audience-option {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  transition: background-color 150ms ease, color 150ms ease;
}
.audience-option.selected { background: var(--card); color: var(--text); box-shadow: 0 1px 2px rgba(13, 27, 46, 0.12); }
.audience-option:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.post-audience { display: inline-flex; }
.dropdown-label { margin: 4px 0 0; padding: 6px 12px 2px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.menu-check { margin-left: auto; color: var(--primary); display: inline-flex; }
.small-menu hr { margin: 4px 0; }
@media (hover: hover) and (pointer: fine) {
  .audience-option:not(.selected):hover { color: var(--text); }
}

/* Unsubscribe page (public, opened from an email) */
.unsubscribe-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background: radial-gradient(700px 400px at 50% 0%, rgba(229, 36, 43, 0.1), transparent 70%), var(--bg);
}
.unsubscribe-card {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 32px 28px;
  text-align: center;
  border-radius: 26px;
  box-shadow: var(--shadow-lg);
  animation: auth-rise 260ms var(--ease-out);
}
.unsubscribe-brand { color: var(--text); font-size: 20px; margin-bottom: 8px; }
.unsubscribe-brand .brand-logo { font-size: 28px; }
.unsubscribe-card .auth-step-icon { margin: 0; }
.unsubscribe-card .auth-step-icon .spinner { width: 22px; height: 22px; margin: 0; }
.unsubscribe-card h1 { font-size: 24px; letter-spacing: -0.5px; }
.unsubscribe-card p { color: var(--muted); line-height: 1.55; }
.unsubscribe-card .btn { align-self: center; }
.unsubscribe-card .language-switcher { margin-top: 4px; }

/* Contact page (public at /contact, and in the app): the email and the phone as two big links */
.contact-card { width: 100%; max-width: 560px; display: flex; flex-direction: column; gap: 12px; padding: 28px; }
.contact-card h1 { margin: 0; font-size: 24px; letter-spacing: -0.5px; }
.contact-card > p { line-height: 1.55; }
.unsubscribe-page .contact-card { border-radius: 26px; box-shadow: var(--shadow-lg); animation: auth-rise 260ms var(--ease-out); }
.contact-options { display: grid; gap: 10px; margin-top: 8px; }
.contact-option { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--input); color: inherit; text-decoration: none; transition: background-color 150ms var(--ease-out); }
.contact-option .auth-step-icon { margin: 0; flex-shrink: 0; }
.contact-option-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.contact-option:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .contact-option:hover { background: var(--divider); } }
.contact-actions { display: flex; flex-direction: column; align-items: center; gap: 12px; padding-top: 12px; }
.auth-help { margin-top: -4px; }
.settings-link { color: inherit; text-decoration: none; }
.settings-link > div { display: flex; flex-direction: column; gap: 2px; }

/* Compact switch inside a menu row */
.small-switch { margin-left: auto; width: 36px; height: 22px; }
.small-switch::after { width: 16px; height: 16px; }
.small-switch.on::after { transform: translateX(14px); }

/* Video posts */
.post-video { background: #000; }
.post-video video { display: block; width: 100%; max-height: 620px; background: #000; }
.image-preview video { display: block; width: 100%; max-height: 360px; border-radius: 12px; background: #000; }
.icon-btn.red { color: var(--primary); }
.media-limit { margin: -2px 0 0; }

/* Upload progress of a photo or video */
.upload-progress { height: 6px; border-radius: 3px; background: var(--bg); overflow: hidden; }
.upload-progress-bar {
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
  transform-origin: left;
  transition: transform 200ms linear;
}
@media (prefers-reduced-motion: reduce) {
  .upload-progress-bar { transition: none; }
}

/* Videos playing while on screen, with a sound button */
.auto-video { position: relative; width: 100%; }
.auto-video video { display: block; width: 100%; }
.auto-video.story-bg, .auto-video.story-image { position: absolute; inset: 0; height: 100%; }
.auto-video.story-bg video, .auto-video.story-image video { height: 100%; }
.auto-video.story-bg video { object-fit: cover; pointer-events: none; }
.auto-video.story-image video { object-fit: contain; }
.video-sound {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 34px;
  height: 34px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
}
@media (hover: hover) and (pointer: fine) { .video-sound:hover { background: rgba(0, 0, 0, 0.75); } }
/* Below the progress bars and next to the author of the story. */
.story-frame .video-sound { top: 22px; }

/* Place field: free text with OpenStreetMap suggestions below */
.place-field { position: relative; }
.place-input {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  border: 1px solid var(--divider);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--muted);
  cursor: text;
}
.place-input:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(229, 36, 43, 0.12); }
.place-input-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.place-input-field { border: none; outline: none; background: transparent; padding: 2px 0; font-size: 16px; color: var(--text); }
.place-input .spinner { width: 18px; height: 18px; margin: 0; border-width: 2px; }
.place-suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 5;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--card);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
}
.place-suggestions li.muted { padding: 10px; }
.place-suggestions button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px; border-radius: 10px; text-align: left; }
.place-suggestions button .icon { color: var(--muted); flex-shrink: 0; }
@media (hover: hover) and (pointer: fine) {
  .place-suggestions button:hover { background: var(--hover); }
}

/* Search area map (Leaflet, see area_map.js) */
.area-map-wrap { position: relative; }
.area-map { height: 300px; border-radius: var(--radius-sm); overflow: hidden; background: #e8eef4; z-index: 0; }
.area-map.empty, .area-map.failed {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}
.area-map .leaflet-control-attribution { font-size: 10px; }
.area-pin { background: none; border: none; }
.area-map-wrap .area-locate { position: absolute; top: 12px; right: 12px; z-index: 2; width: 40px; height: 40px; border-radius: 10px; }
.area-locate .spinner { width: 18px; height: 18px; margin: 0; border-width: 2px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }

/* Search area row in the side panels */
.area-button-text { display: flex; flex-direction: column; min-width: 0; text-align: left; }
.area-button .side-icon { color: var(--primary); }

/* Report dialog */
.report-why { font-size: 16px; margin: 0; }
.report-reasons { display: flex; flex-direction: column; gap: 6px; }
.report-reason {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--divider);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 500;
}
.report-reason input { accent-color: var(--primary); width: 18px; height: 18px; margin: 0; }
.report-reason.selected { border-color: var(--primary); background: var(--primary-light); }
@media (hover: hover) and (pointer: fine) {
  .report-reason:hover:not(.selected) { background: var(--hover); }
}
.report-thanks { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 12px 8px; text-align: center; }
.report-thanks-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #e7f6ec;
  color: var(--success);
}
.story-meta .story-report { margin-left: auto; color: #fff; opacity: 0.85; padding: 6px; border-radius: 50%; }
@media (hover: hover) and (pointer: fine) { .story-meta .story-report:hover { opacity: 1; background: rgba(255, 255, 255, 0.15); } }
/* Reactions and sharing, at the bottom of a story */
.story-actions { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 3; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.story-caption { bottom: 72px; }
.story-emojis { display: flex; gap: 2px; padding: 4px; border-radius: 999px; background: rgba(0, 0, 0, 0.45); }
.story-emoji { width: 36px; height: 36px; border-radius: 50%; font-size: 20px; line-height: 1; transition: transform 120ms ease, background 120ms ease; }
@media (hover: hover) and (pointer: fine) { .story-emoji:hover { transform: scale(1.2); } }
.story-emoji.selected { background: rgba(255, 255, 255, 0.3); }
.story-action { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; padding: 8px 12px; border-radius: 999px; color: #fff; background: rgba(0, 0, 0, 0.45); font-weight: 600; font-size: 13px; }
@media (hover: hover) and (pointer: fine) { .story-action:hover { background: rgba(0, 0, 0, 0.6); } }
.story-action + .story-action { margin-left: 0; }
.story-error { width: 100%; color: #fff; background: rgba(229, 36, 43, 0.85); padding: 6px 10px; border-radius: 8px; font-size: 13px; }
.story-reactions { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.story-reactions li { display: flex; align-items: center; gap: 10px; }
.story-reaction-emoji { font-size: 22px; }
@media (hover: none) { @media (hover: hover) and (pointer: fine) { .story-emoji:hover { transform: none; } } }

/* Moderation queue (platform and store reports) */
.moderation-page { max-width: 760px; margin: 0 auto; padding: 8px 28px 40px; }
.report-queue { display: flex; flex-direction: column; gap: 12px; }
.report-queue > .chips { margin-bottom: 4px; }
.report-card { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 16px 18px; }
.report-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.report-head .muted { margin-left: auto; }
.report-target { background: var(--bg); color: var(--text); font-weight: 600; }
.report-excerpt {
  margin: 0;
  padding: 10px 14px;
  border-left: 3px solid var(--divider);
  background: var(--bg);
  border-radius: 0 10px 10px 0;
  white-space: pre-line;
  word-break: break-word;
}

/* Store team */
.store-team { display: flex; flex-direction: column; gap: 16px; }
.store-team .card { margin: 0; }
.role-legend { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.team-add-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.team-search { flex: 1; min-width: 220px; width: auto; box-shadow: none; border: 1px solid var(--divider); }
.team-role-select { width: auto; min-width: 140px; }
.team-results { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.team-results li, .team-member { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: var(--radius-sm); }
.team-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.team-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.team-list { display: flex; flex-direction: column; gap: 2px; padding: 8px; }
@media (max-width: 700px) {
  .team-member { flex-wrap: wrap; }
  .team-actions { width: 100%; justify-content: flex-start; }
  .moderation-page { padding: 8px 12px 40px; }
}

/* Stores verified by RoueLigne */
.verified-badge { display: inline-flex; vertical-align: middle; margin-left: 6px; color: #1d7bf2; }
.verified-badge .icon { display: inline-flex; }
.pending-verification {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fff4e0;
  color: #9a5b00;
  font-size: 13px;
  font-weight: 600;
}
.moderation-tabs { margin-bottom: 16px; }
.verify-item { display: flex; flex-direction: column; gap: 8px; }
.verify-item .btn { align-self: flex-start; }

/* Profile tabs other than the posts: one column */
.profile-body.single { display: block; }
.profile-body.single > * { max-width: 940px; margin-left: auto; margin-right: auto; }
.profile-about { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.profile-about .card { margin: 0; }
.profile-friends .friends-grid.wide { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.profile-body .friends-page, .profile-body .affiliation-page { padding: 0; }
.saved-feed h2 { margin: 0 0 12px; }
.user-store { display: flex; flex-direction: column; gap: 6px; }
.user-store-role { align-self: flex-start; background: var(--bg); color: var(--text); font-weight: 600; }
.profile-tabs button { padding: 16px; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; }
.profile-tabs button.active { color: var(--primary); border-bottom-color: var(--primary); }
@media (max-width: 1000px) {
  .profile-about { grid-template-columns: 1fr; }
}

/* Store address: a read-only field that opens the map (see store_location_picker.dart) */
.address-picker { position: relative; }
.address-picker .text-field { padding-right: 36px; cursor: pointer; }
.address-picker .icon { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.country-filter { cursor: default; }
.country-filter .text-field { flex: 1; min-width: 0; height: 36px; }

/* Brand and model from the catalog (see catalog_widgets.dart) */
.brand-model { display: flex; flex-direction: column; gap: 8px; }
.brand-model-preview { display: flex; align-items: center; gap: 12px; }
.brand-model-preview .brand-logo-img { width: 48px; height: 48px; object-fit: contain; border-radius: 10px; background: var(--card); border: 1px solid var(--divider); }
.brand-model-preview .model-photo { height: 72px; max-width: 160px; object-fit: cover; border-radius: 10px; }
.vehicle-filters .brand-model .field-row { flex-direction: column; }

/* Store reviews: 0 to 5 cars */
.car-rating { position: relative; display: inline-flex; flex-shrink: 0; vertical-align: middle; line-height: 0; }
.car-rating-empty, .car-rating-full { display: inline-flex; gap: 2px; }
.car-rating-empty { color: #d7dde6; }
.car-rating-full { position: absolute; inset: 0 auto 0 0; overflow: hidden; color: var(--primary); white-space: nowrap; }
.car-rating .icon { flex-shrink: 0; }
.store-rating { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.store-rating strong { font-variant-numeric: tabular-nums; }
.store-card-body .store-rating { font-size: 12.5px; gap: 4px; }
.profile-names .store-rating { margin-top: 8px; }
.store-rating.link-like { padding: 2px 6px; margin-left: -6px; border-radius: 8px; }
@media (hover: hover) and (pointer: fine) { .store-rating.link-like:hover { background: var(--primary-light); } }

.store-reviews { display: grid; grid-template-columns: 340px 1fr; gap: 16px; align-items: start; }
.store-reviews-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 80px; }
.store-reviews-list { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.rating-summary { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.rating-summary-score { font: 700 48px/1 "Space Grotesk", Inter, sans-serif; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.review-form { display: flex; flex-direction: column; gap: 12px; }
.review-form h3 { margin: 0; }
.review-form textarea { width: 100%; resize: vertical; }
.car-picker { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.car-picker button { display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; transition: color 120ms ease, background-color 120ms ease, transform 120ms ease; }
.car-picker button:active { transform: scale(0.92); }
.car-picker-car { width: 40px; height: 40px; color: #d7dde6; }
.car-picker-car.on { color: var(--primary); }
@media (hover: hover) and (pointer: fine) { .car-picker-car:hover { background: var(--primary-light); } }
.car-picker-zero { width: 32px; height: 32px; margin-right: 4px; border: 1.5px solid var(--divider); font-weight: 700; color: var(--muted); }
.car-picker-zero.on { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }
.car-picker-value { margin-left: 6px; min-width: 32px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.review-card { display: flex; flex-direction: column; gap: 10px; }
.review-card.mine { box-shadow: inset 3px 0 0 var(--primary); }
.review-head { display: flex; align-items: center; gap: 10px; }
.review-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.review-name { font-weight: 600; text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .review-name:hover { text-decoration: underline; } }
.review-meta { display: flex; align-items: center; gap: 8px; }
.review-comment { margin: 0; word-break: break-word; }
.review-head .review-delete { margin-left: auto; width: 32px; height: 32px; color: var(--muted); }
.review-reply { display: flex; gap: 10px; margin-left: 50px; padding: 10px 12px; border-radius: 12px; background: var(--hover); }
.review-reply-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.review-reply-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; }
.review-reply-head .review-delete { margin-left: auto; width: 28px; height: 28px; color: var(--muted); }
.review-reply-toggle { align-self: flex-start; margin-left: 50px; }
.review-reply-form { display: flex; flex-direction: column; gap: 8px; margin-left: 50px; }
.danger-zone { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--divider); }
.store-reviews .see-more { align-self: center; }
.review-filters .chip { display: inline-flex; align-items: center; font-variant-numeric: tabular-nums; }
.review-filters .chip:disabled { opacity: 0.45; cursor: default; }
.rating-bars { display: flex; flex-direction: column; gap: 2px; width: 100%; margin: 4px 0; }
.rating-bar { display: flex; align-items: center; gap: 8px; width: 100%; padding: 3px 6px; border-radius: 8px; font-size: 13px; transition: background-color 120ms ease; }
.rating-bar.active { background: var(--primary-light); }
@media (hover: hover) and (pointer: fine) { .rating-bar:hover { background: var(--primary-light); } }
.rating-bar-label { display: inline-flex; align-items: center; gap: 3px; width: 28px; font-weight: 600; color: var(--muted); }
.rating-bar-track { flex: 1; height: 8px; border-radius: 999px; background: #edf0f4; overflow: hidden; }
.rating-bar-fill { display: block; height: 100%; border-radius: inherit; background: var(--primary); }
.rating-bar-count { min-width: 24px; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .car-picker button { transition: none; } .car-picker button:active { transform: none; } }
@media (max-width: 900px) {
  .store-reviews { grid-template-columns: 1fr; }
  .store-reviews-side { position: static; }
}

/* Le Paddock: listings, dealers' vehicles and pros under one header */
.paddock-header { display: flex; flex-direction: column; gap: 14px; margin-bottom: 18px; }
.paddock-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.paddock-title { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.paddock-title h2 { margin: 0; font-size: 28px; letter-spacing: -0.5px; }
.paddock-title p { margin: 0; }
.paddock-sections { display: flex; gap: 4px; border-bottom: 1px solid var(--divider); overflow-x: auto; scrollbar-width: none; }
.paddock-section {
  display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; padding: 10px 14px; margin-bottom: -1px;
  border-bottom: 3px solid transparent; border-radius: 10px 10px 0 0; color: var(--muted); font-weight: 600; text-decoration: none;
  transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease;
}
@media (hover: hover) and (pointer: fine) { .paddock-section:hover { color: var(--text); background: var(--hover, #f3f5f9); } }
.paddock-section.active { color: var(--primary); border-bottom-color: var(--primary); }
.paddock-vehicles > .paddock-header { padding: 8px 28px 0; }
.paddock-vehicles > .filter-toolbar { padding: 0 28px; margin-bottom: 18px; }
@media (max-width: 1000px) {
  .paddock-vehicles > .paddock-header { padding: 8px 12px 0; }
  .paddock-vehicles > .filter-toolbar { padding: 0 12px; }
  .paddock-title h2 { font-size: 24px; }
}
@media (max-width: 600px) {
  .paddock-title p { display: none; }
  .paddock-section { padding: 10px 10px; }
}

/* Paddock listings: one toolbar (search, area, parts or services), then the results with their own link */
.paddock-head { align-items: center; }
.paddock-head .btn-primary { box-shadow: 0 4px 12px rgba(229, 36, 43, 0.22); }
.market-page .filter-toolbar { margin-bottom: 22px; }
.filter-toolbar .segmented { height: 46px; padding: 4px; background: var(--card); box-shadow: var(--shadow); }
.filter-toolbar .segmented a { display: inline-flex; align-items: center; padding: 0 16px; }
.filter-toolbar .segmented a.selected { background: var(--text); color: #fff; box-shadow: none; }
@media (hover: hover) and (pointer: fine) { .filter-toolbar .segmented a:not(.selected):hover { color: var(--text); } }
.listings-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.listings-head h3 { margin: 0; }
.listings-head h3 .muted { font-weight: 500; font-variant-numeric: tabular-nums; }
.listings-head-link { display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; color: var(--primary); font-weight: 600; text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .listings-head-link:hover { text-decoration: underline; } }
.garage-strip { margin-bottom: 28px; }
.garage-strip .store-grid {
  display: grid; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(240px, 280px);
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: thin; padding-bottom: 6px;
}
.garage-strip .store-grid > * { scroll-snap-align: start; }
.empty-state-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
@media (max-width: 600px) {
  .filter-toolbar .segmented { width: 100%; }
  .filter-toolbar .segmented a { flex: 1; justify-content: center; padding: 0 8px; }
}

/* Vehicle filters: clear all from the panel header, remove one from the results */
.filters-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-right: 8px; }
.filters-head h2 { padding: 4px 8px; }
.filters-clear {
  display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; height: 30px; padding: 0 6px 0 10px;
  border-radius: 999px; background: var(--primary-light); color: var(--primary); font-size: 13px; font-weight: 600;
  transition: background-color 150ms ease;
}
@media (hover: hover) and (pointer: fine) { .filters-clear:hover { background: #fadada; } }
.filters-clear .count {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--primary); color: #fff;
  font-size: 11.5px; line-height: 20px; text-align: center; font-variant-numeric: tabular-nums;
}
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -4px 0 14px; }
.active-filter {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 8px 0 12px; border-radius: 999px;
  background: var(--card); box-shadow: inset 0 0 0 1px var(--divider); font-size: 13px; font-weight: 600;
  transition: box-shadow 150ms ease, color 150ms ease;
}
.active-filter .icon { color: var(--muted); transition: color 150ms ease; }
@media (hover: hover) and (pointer: fine) { .active-filter:hover { box-shadow: inset 0 0 0 1px var(--primary); color: var(--primary); } }
@media (hover: hover) and (pointer: fine) { .active-filter:hover .icon { color: var(--primary); } }
.active-filters-clear { margin-left: 4px; font-size: 13px; font-weight: 600; color: var(--primary); }
@media (hover: hover) and (pointer: fine) { .active-filters-clear:hover { text-decoration: underline; } }
.empty-state .btn { margin-top: 4px; }

/* Photo framing before upload (cover, profile picture, store logo) */
.cropper {
  position: relative; width: 100%; overflow: hidden; border-radius: var(--radius-sm); background: #0c1a30;
  cursor: grab; touch-action: none; user-select: none; outline: none;
}
.cropper:focus-visible { box-shadow: 0 0 0 3px rgba(229, 36, 43, 0.35); }
.cropper.dragging { cursor: grabbing; }
.cropper img { position: absolute; max-width: none; pointer-events: none; -webkit-user-drag: none; }
.cropper .spinner { position: absolute; inset: 0; margin: auto; }
/* A thin frame, and for round photos a dimmed outside of the circle. */
.cropper-mask { position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.7); border-radius: inherit; }
.cropper.round { width: min(100%, 360px); align-self: center; }
.cropper.round .cropper-mask { border-radius: 50%; box-shadow: 0 0 0 9999px rgba(12, 26, 48, 0.55), inset 0 0 0 2px rgba(255, 255, 255, 0.8); }
.cropper-zoom { display: flex; align-items: center; gap: 8px; width: min(100%, 420px); align-self: center; }
.cropper-zoom input[type=range] { flex: 1; accent-color: var(--primary); }
.modal-body > p.center { text-align: center; }

/* View counts (posts, listings, dealers' vehicles) */
.view-count { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.view-count .icon { display: inline-flex; }
.post-stats-right { display: inline-flex; align-items: center; gap: 12px; margin-left: auto; }
.vehicle-price-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.listing-card .view-count { margin-top: 2px; }

/* Chat: photos, videos and shared posts */
.msg-body { display: flex; flex-direction: column; gap: 4px; max-width: 75%; }
.msg.mine .msg-body { align-items: flex-end; }
.msg-body .msg-bubble { max-width: 100%; }
.msg-media { position: relative; overflow: hidden; border-radius: 16px; max-width: 220px; background: var(--bg); line-height: 0; }
.msg-media img, .msg-media video { display: block; width: 100%; max-height: 260px; object-fit: cover; }
.msg-media .photo-zoom { display: block; width: 100%; padding: 0; border-radius: 0; }
.msg-uploading img, .msg-uploading video { opacity: 0.6; }
.msg-uploading .upload-progress { position: absolute; left: 8px; right: 8px; bottom: 8px; }
.msg-post {
  display: flex; flex-direction: column; width: 220px; overflow: hidden; border-radius: 16px; background: var(--card);
  box-shadow: inset 0 0 0 1px var(--divider); text-decoration: none; color: var(--text); transition: box-shadow 150ms ease;
}
@media (hover: hover) and (pointer: fine) { .msg-post:hover { box-shadow: inset 0 0 0 1px var(--primary); } }
.msg-post-media { display: block; width: 100%; height: 120px; object-fit: cover; background: var(--bg); }
.msg-post-media.video { position: relative; }
.msg-post-media.video video { width: 100%; height: 100%; object-fit: cover; }
.msg-post-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; background: rgba(12, 26, 48, 0.25); }
.msg-post-text { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px 10px; }
.msg-post-author { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.msg-post-excerpt { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.msg-unavailable { font-style: italic; opacity: 0.8; }
.msg-story { display: flex; flex-direction: column; width: 160px; overflow: hidden; border-radius: 16px; background: var(--card); box-shadow: inset 0 0 0 1px var(--divider); }
.msg-story-media { display: block; width: 100%; aspect-ratio: 9 / 16; max-height: 260px; object-fit: cover; background: #000; }
.msg-story-text { display: flex; align-items: center; justify-content: center; padding: 12px; color: #fff; font-weight: 600; text-align: center; word-break: break-word; }
.chat-attach { flex-shrink: 0; color: var(--primary); cursor: pointer; }

/* Share a post with friends */
.share-preview { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: var(--radius-sm); background: var(--bg); }
.share-preview > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.share-excerpt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.share-thumb { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.share-search { width: auto; }
.share-friends { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; max-height: 320px; overflow-y: auto; overscroll-behavior: contain; }
.share-friends li { display: flex; align-items: center; gap: 10px; padding: 6px 4px; border-radius: 12px; }
@media (hover: hover) and (pointer: fine) { .share-friends li:hover { background: var(--hover); } }
.share-friends .grow { display: flex; flex-direction: column; min-width: 0; }
.share-sent { display: inline-flex; align-items: center; gap: 2px; color: var(--ok, #16a34a); font-weight: 600; font-size: 14px; padding: 0 8px; }
.share-footer { justify-content: center; }
.share-friends .btn { flex-shrink: 0; height: 34px; padding: 0 14px; font-size: 14px; }

/* Group chats */
.group-avatar { position: relative; display: inline-block; flex-shrink: 0; }
.group-avatar-face { position: absolute; line-height: 0; }
.group-avatar-face .avatar { border: 2px solid var(--card); }
.group-avatar-face.face-0 { left: 0; top: 0; }
.group-avatar-face.face-1 { right: 0; bottom: 0; }
.group-avatar-face:only-child { inset: 0; }
.group-avatar-face:only-child .avatar { border: none; }
.chat-peer { text-align: left; }
button.chat-peer { background: none; color: inherit; cursor: pointer; }
.chat-event { align-self: center; max-width: 85%; margin: 6px 0; padding: 3px 10px; border-radius: 999px; background: var(--bg); color: var(--muted); font-size: 12px; text-align: center; }
.msg.in-group { align-items: flex-end; gap: 6px; }
.msg-avatar-space { width: 28px; flex-shrink: 0; }
.msg-from { display: flex; flex-direction: column; gap: 2px; min-width: 0; max-width: calc(100% - 40px); }
.msg-from .msg-body { max-width: 100%; }
.msg-sender { margin: 6px 0 0 12px; color: var(--muted); font-size: 12px; }
.dropdown-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-right: 4px; }
.dropdown-head h3 { padding-bottom: 6px; }
.btn-new-group { height: 34px; padding: 0 12px; font-size: 14px; }
.contact.new-group { color: var(--muted); }
.new-group-inner { display: flex; align-items: center; gap: 12px; }
.new-group-icon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--secondary-btn); color: var(--text); }
.friend-picker { display: flex; flex-direction: column; gap: 10px; }
.friend-picker .search { width: auto; }
.picked-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.picked-chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 8px 0 4px; border-radius: 999px; background: var(--primary-light); color: var(--primary); font-size: 13px; font-weight: 600; }
.pick-list { list-style: none; margin: 0; padding: 0; max-height: 300px; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 2px; }
.pick-row { display: flex; align-items: center; gap: 10px; padding: 6px 4px; border-radius: 12px; cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .pick-row:hover { background: var(--hover); } }
.pick-row input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--primary); }
.group-info-head { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.group-rename { display: flex; gap: 8px; }
.group-rename .text-field { flex: 1; min-width: 0; }
.group-add { align-self: flex-start; }
.group-members { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; max-height: 280px; overflow-y: auto; overscroll-behavior: contain; }
.group-members li { display: flex; align-items: center; gap: 10px; padding: 6px 4px; border-radius: 12px; }
.group-members .grow { display: flex; flex-direction: column; min-width: 0; }
.group-leave { color: var(--danger); }
.share-section { padding: 8px 4px 2px !important; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
@media (hover: hover) and (pointer: fine) { .share-section:hover { background: none !important; } }

/* Chat: sent / seen, and messages being sent or that failed */
.msg-status { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin: 2px 4px 4px; color: var(--muted); font-size: 11.5px; }
.msg-status .icon { display: inline-flex; }
.msg-status.seen { color: var(--text); }
.seen-faces { display: inline-flex; }
.seen-faces .avatar { margin-left: -4px; border: 1.5px solid var(--card); }
.seen-faces .avatar:first-child { margin-left: 0; }
.msg.pending .msg-bubble, .msg.pending .msg-media { opacity: 0.6; }
.msg.failed .msg-bubble { opacity: 1; background: var(--primary-light); color: var(--primary); box-shadow: inset 0 0 0 1px rgba(229, 36, 43, 0.35); }
.msg.failed .msg-media { opacity: 1; box-shadow: inset 0 0 0 2px var(--primary); }
.msg.pending .msg-status { justify-content: flex-end; }
.msg-failed { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px 8px; margin: 3px 4px 4px; color: var(--primary); font-size: 12px; }
.msg-failed .icon { display: inline-flex; }
.msg-failed .link-btn { font-size: 12px; font-weight: 700; color: var(--primary); }
.msg-failed .link-btn.muted { color: var(--muted); font-weight: 600; }

/* My cars (profile, private) */
.my-cars { display: flex; flex-direction: column; gap: 16px; }
.my-cars-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.my-cars-head h2 { margin: 0 0 2px; }
.car-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.car-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; border-radius: var(--radius-sm);
  background: var(--card); box-shadow: var(--shadow), inset 0 0 0 1px var(--divider); text-align: left;
  transition: box-shadow 150ms ease, transform 150ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) { .car-card:hover { box-shadow: var(--shadow), inset 0 0 0 1px #c9d1dd; } }
.car-card.selected { box-shadow: var(--shadow), inset 0 0 0 2px var(--primary); }
.car-card:active { transform: scale(0.98); }
.car-card-top { display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0; }
.car-card-icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 40px; height: 40px; border-radius: 12px; background: var(--primary-light); color: var(--primary); }
.car-card-name { display: flex; flex-direction: column; min-width: 0; }
.car-card-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plate {
  display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 5px; background: #fff;
  box-shadow: inset 0 0 0 1.5px var(--text), inset 6px 0 0 #1d4ed8; padding-left: 12px;
  font: 700 12.5px/1 var(--font-display); letter-spacing: 0.06em; color: var(--text);
}
.reminder-chip { display: inline-flex; align-items: center; gap: 2px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--secondary-btn); color: var(--muted); }
.reminder-chip.overdue { background: var(--primary-light); color: var(--primary); }
.reminder-chip.soon { background: #fff4e0; color: #b45309; }
.reminder-chip.done { background: #e7f6ec; color: var(--success); }
.car-detail { display: flex; flex-direction: column; gap: 12px; }
.car-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.car-detail-head h3 { margin: 0; font-size: 22px; }
.car-detail-actions { display: flex; align-items: center; gap: 6px; }
.car-specs { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin: 0; }
.car-shared { display: inline-flex; align-items: center; gap: 2px; }
.car-managers { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--input); }
.car-managers-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.car-managers p { margin: 0; }
.car-managers .group-members { max-height: none; }
.car-tabs { border-bottom: 1px solid var(--divider); }
.car-tabs .count-badge.inline { margin-left: 6px; }

.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.stat-tile { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--input); }
.stat-tile strong { font: 700 20px/1.25 var(--font-display); font-variant-numeric: tabular-nums; }

/* Spending per month: one series, columns from a shared baseline. */
.cost-chart { margin: 4px 0 0; display: flex; flex-direction: column; gap: 10px; }
.cost-chart figcaption { font-size: 14px; }
.cost-columns { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2px; height: 170px; padding-top: 22px; border-bottom: 1px solid var(--divider); }
.cost-col { position: relative; display: flex; flex-direction: column; align-items: center; min-width: 0; outline: none; }
.cost-bar-slot { position: relative; flex: 1; width: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.cost-bar { width: min(24px, 70%); min-height: 2px; border-radius: 4px 4px 0 0; background: #f2a2a5; transition: background-color 150ms ease; }
.cost-col.current .cost-bar, .cost-col:focus-visible .cost-bar { background: var(--primary); }
@media (hover: hover) and (pointer: fine) { .cost-col:hover .cost-bar { background: var(--primary); } }
.cost-cap { position: absolute; top: -20px; font-size: 11.5px; font-weight: 700; white-space: nowrap; color: var(--text); font-variant-numeric: tabular-nums; }
.cost-month { position: absolute; bottom: -20px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.cost-chart { padding-bottom: 20px; }
.cost-tip {
  position: absolute; bottom: calc(100% - 10px); left: 50%; z-index: 3; display: none; flex-direction: column; gap: 1px;
  padding: 7px 10px; border-radius: 10px; background: var(--navy); color: #fff; font-size: 12px; white-space: nowrap;
  transform: translateX(-50%); box-shadow: var(--shadow-lg); pointer-events: none;
}
.cost-tip .muted { color: #b8c2d3; }
.cost-col:focus-visible .cost-tip { display: flex; }
@media (hover: hover) and (pointer: fine) { .cost-col:hover .cost-tip { display: flex; } }
.cost-col:first-child .cost-tip { left: 0; transform: none; }
.cost-col:last-child .cost-tip { left: auto; right: 0; transform: none; }
.year-costs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.year-cost { font-variant-numeric: tabular-nums; }

.fuel-form { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--radius-sm); background: var(--input); }
.fuel-form h4 { margin: 0; color: var(--text); }
.fuel-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.fuel-fields .text-field, .fuel-form .text-field { background: var(--card); }
.fuel-form-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.fuel-panel { display: flex; flex-direction: column; gap: 14px; }
.fuel-panel > h4 { margin: 4px 0 0; color: var(--text); }
.fuel-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.fuel-table th { padding: 8px 6px; text-align: left; color: var(--muted); font-size: 12px; font-weight: 600; border-bottom: 1px solid var(--divider); }
.fuel-table td { padding: 8px 6px; border-bottom: 1px solid var(--divider); }
.fuel-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.fuel-table .actions { width: 36px; text-align: right; }

.reminders-panel { display: flex; flex-direction: column; gap: 12px; }
.reminders-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.reminder-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.reminder-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--input); }
.reminder-row.overdue { box-shadow: inset 3px 0 0 var(--primary); }
.reminder-row.soon { box-shadow: inset 3px 0 0 #d97706; }
.reminder-row .grow { display: flex; flex-direction: column; min-width: 0; }
.reminder-list.done .reminder-row { opacity: 0.7; }
.reminder-list.done strong { text-decoration: line-through; }
.reminder-check input { width: 20px; height: 20px; accent-color: var(--success); cursor: pointer; }
.reminder-icon { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 10px; background: var(--card); color: var(--muted); flex-shrink: 0; }
.reminder-note { color: var(--muted); white-space: pre-line; }
.toggle-row { display: flex; flex-wrap: wrap; gap: 10px; }
.toggle { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 12px; background: var(--input); cursor: pointer; font-weight: 600; }
.toggle input { width: 18px; height: 18px; accent-color: var(--primary); }
@media (max-width: 600px) {
  .cost-month { font-size: 10px; }
  .reminder-row { flex-wrap: wrap; }
}

/* Single choice with search (brand, model, vehicle type…), styled like the other form fields */
.search-select { gap: 4px; min-width: 0; }
.search-select .multi-select-label { font-size: 13px; font-weight: 400; color: var(--muted); }
.search-select .multi-select-button { font-weight: 400; color: var(--muted); }
.search-select .multi-select-button.has-value { color: var(--text); font-weight: 500; }
.search-select .multi-select-button:focus-visible { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(229, 36, 43, 0.12); }
.search-select.open .multi-select-button { box-shadow: 0 0 0 3px rgba(229, 36, 43, 0.12); }
.search-select.invalid .multi-select-button { border-color: var(--danger); }
.search-select .multi-select-button:disabled { opacity: 1; background: var(--secondary-btn); }
.search-select-value { display: flex; align-items: center; gap: 10px; min-width: 0; }
.search-select-value .multi-select-image { width: 22px; height: 22px; }
.search-select .multi-select-panel { z-index: 300; margin-top: 0; }
.search-select .multi-select-options { flex: 1; min-height: 0; max-height: none; }
.search-select .multi-select-search { flex-shrink: 0; height: 40px; }
.search-select .multi-select-backdrop { z-index: 299; }
.search-select-option { cursor: pointer; }
.search-select-option.active { background: var(--hover); }
.search-select-option.selected { font-weight: 600; color: var(--primary); }
.search-select-option.selected .icon { color: var(--primary); flex-shrink: 0; }
.search-select-option.clear { color: var(--muted); }
.search-select-option .grow { flex: 1; min-width: 0; }

/* Listing form: wider, in sections; several photos; car equipment */
.form-section { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; border-top: 1px solid var(--divider); }
.form-section h4 { margin: 0; font-size: 15px; color: var(--text); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; align-items: start; }
.form-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.form-grid > .field-row { grid-column: span 1; }
.photo-picker { display: flex; flex-direction: column; gap: 8px; }
.photo-picker-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.photo-picker .photo-strip { gap: 10px; }
.photo-picker .photo-thumb { width: 132px; height: 99px; border-radius: 12px; }
.photo-picker .photo-thumb.add { display: flex; align-items: center; justify-content: center; cursor: pointer; }
.photo-thumb.cover { box-shadow: 0 0 0 2px var(--primary); }
.photo-thumb.uploading { display: flex; align-items: center; justify-content: center; }
.photo-thumb.uploading img { position: absolute; inset: 0; opacity: 0.5; }
.photo-thumb.uploading .spinner { position: relative; }
.photo-cover-badge, .photo-make-cover {
  position: absolute; left: 6px; bottom: 6px; height: 22px; padding: 0 8px; border-radius: 999px;
  font-size: 11px; font-weight: 700; line-height: 22px; white-space: nowrap;
}
.photo-cover-badge { background: var(--primary); color: #fff; }
.photo-make-cover { background: rgba(12, 26, 48, 0.72); color: #fff; opacity: 0; transition: opacity 150ms ease; }
.photo-make-cover:focus-visible { opacity: 1; }
@media (hover: hover) and (pointer: fine) { .photo-thumb:hover .photo-make-cover { opacity: 1; } }
.feature-toggles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.feature-group { margin: 6px 0 0; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.feature-toggle {
  display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 12px; border-radius: 12px;
  background: var(--input); font-weight: 600; font-size: 14px; cursor: pointer; transition: background-color 150ms ease, box-shadow 150ms ease;
}
.feature-toggle input { width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--primary); }
.feature-toggle.on { background: var(--primary-light); box-shadow: inset 0 0 0 1px rgba(229, 36, 43, 0.35); color: var(--primary); }
.feature-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; }
.feature-list li { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.feature-list .icon { color: var(--success); display: inline-flex; }
.listing-detail-photo { position: relative; }
@media (max-width: 700px) {
  .form-grid, .form-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid > .form-field:only-child { grid-column: 1 / -1; }
  .feature-list { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .form-grid { grid-template-columns: 1fr; }
}
.vehicle-gallery .listing-detail-photo .photo-count { right: auto; left: 10px; pointer-events: none; }

/* Stories of members near the viewer who are not friends */
.story-suggested {
  position: absolute; top: 46px; left: 8px; z-index: 2; height: 18px; padding: 0 7px; border-radius: 999px;
  background: rgba(12, 26, 48, 0.62); color: #fff; font-size: 10.5px; font-weight: 700; line-height: 18px;
  backdrop-filter: blur(4px);
}

/* ---------- Affiliation ---------- */
.affiliation-page { max-width: 760px; margin: 0 auto; padding: 24px 16px; display: flex; flex-direction: column; gap: 16px; }
.affiliation-page .card { margin-bottom: 0; padding: 20px; }
.affiliation-hero { display: flex; flex-direction: column; gap: 16px; background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #fff; }
.affiliation-hero h2 { font-size: 26px; }
.affiliation-hero .muted { color: rgba(255, 255, 255, 0.78); line-height: 1.5; margin-top: 6px; }
.affiliation-link > span { color: rgba(255, 255, 255, 0.78); }
.affiliation-link-row { display: flex; gap: 8px; }
.affiliation-link-row .text-field { flex: 1; min-width: 0; background: #fff; color: var(--text); font-variant-numeric: tabular-nums; }
.affiliation-link-row .btn { white-space: nowrap; }
.affiliation-earnings { display: flex; flex-direction: column; gap: 16px; }
.affiliation-total { display: flex; flex-direction: column; gap: 2px; }
.affiliation-total strong { font-family: var(--font-display); font-size: 40px; line-height: 1.1; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.affiliation-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.affiliation-stat { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: var(--radius-sm); background: var(--bg); }
.affiliation-stat strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.affiliation-withdraw { display: flex; flex-direction: column; gap: 8px; }
.affiliation-meter { height: 8px; border-radius: 4px; background: var(--divider); overflow: hidden; }
.affiliation-meter-fill { height: 100%; border-radius: 4px; background: var(--success); }
.affiliation-mission h3, .affiliation-referrals h3, .affiliation-withdrawals h3 { font-size: 18px; margin-bottom: 4px; }
.affiliation-steps-list { margin: 12px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.referral-list, .withdrawal-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; }
.referral-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--divider); }
.referral-row:first-child { border-top: none; }
.referral-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.referral-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.referral-name { font-weight: 600; }
@media (hover: hover) and (pointer: fine) { .referral-name:hover { text-decoration: underline; } }
.referral-badge-done { background: #e7f6ec; color: var(--success-hover); }
.referral-badge-off { background: var(--primary-light); color: var(--primary); }
.referral-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.referral-step { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; position: relative; }
/* The line joining a step to the previous one. */
.referral-step + .referral-step::before {
  content: "";
  position: absolute;
  top: 10px;
  right: calc(50% + 12px);
  width: calc(100% - 20px);
  height: 2px;
  background: var(--divider);
}
.referral-step.done + .referral-step.done::before { background: var(--success); }
.referral-step-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--bg);
  box-shadow: inset 0 0 0 2px var(--divider);
  color: #fff;
}
.referral-step.done .referral-step-dot { background: var(--success); box-shadow: none; }
.referral-step-label { font-size: 11px; color: var(--muted); line-height: 1.2; }
.referral-step.done .referral-step-label { color: var(--text); }
.withdrawal-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--divider); }
.withdrawal-row:first-child { border-top: none; }
.withdrawal-pending { background: #fff6e0; color: #a16207; }
.withdrawal-approved { background: #e7f6ec; color: var(--success-hover); }
.withdrawal-rejected { background: var(--primary-light); color: var(--primary); }
.withdrawal-form { display: flex; flex-direction: column; gap: 12px; }
.auth-invited { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-radius: var(--radius-sm); background: #e7f6ec; color: var(--success-hover); font-weight: 600; font-size: 14px; }
@media (max-width: 600px) {
  .affiliation-link-row { flex-direction: column; }
  .affiliation-stats { grid-template-columns: 1fr; }
  .referral-step-label { display: none; }
}

/* Dealers' and members' vehicles listed together: who sells it. */
.vehicle-source { position: absolute; top: 10px; right: 10px; padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 700; }
.vehicle-source.pro { background: var(--navy); color: #fff; }
.vehicle-source.private { background: #fff; color: var(--text); }
/* A member's car for rent, priced per day. */
.offer-badge { position: absolute; left: 10px; bottom: 10px; padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 700; background: var(--primary); color: #fff; }
.offer-badge.inline { position: static; display: inline-block; }
.listing-photo { position: relative; }

/* ---------- Live location ---------- */
.location-page { max-width: 1280px; margin: 0 auto; padding: 24px 16px; display: flex; flex-direction: column; gap: 16px; }
.location-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.location-head h2 { font-size: 26px; }
.location-head p { margin-top: 4px; max-width: 560px; line-height: 1.5; }
.location-sharing { width: auto; min-width: 320px; margin: 0; background: var(--card); box-shadow: var(--shadow); }
.location-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.location-map { position: relative; padding: 0; margin: 0; overflow: hidden; }
.people-map { height: calc(100vh - var(--top-h) - 170px); height: calc(100dvh - var(--top-h) - 170px); min-height: 420px; background: #e8eef4; z-index: 0; }
.people-map.failed { display: none; }
.location-map-actions { position: absolute; left: 12px; bottom: 12px; z-index: 1; display: flex; gap: 8px; flex-wrap: wrap; }
.location-map-actions .btn { box-shadow: var(--shadow); background: var(--card); }
.location-side { display: flex; flex-direction: column; gap: 12px; }
.location-section { margin: 0; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.location-section h3 { font-size: 16px; margin-bottom: 6px; }
.location-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.location-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; cursor: default; }
.location-row-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.location-row-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* A person on the map: their avatar in a ring, their name underneath. */
.map-person-marker { background: none; border: none; }
.map-person { position: relative; width: 48px; height: 48px; }
.map-person-face {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; overflow: hidden;
  background: var(--navy); color: #fff; font-weight: 700; font-size: 16px;
  border: 3px solid #fff; box-shadow: 0 4px 14px rgba(13, 27, 46, 0.35);
}
.map-person-face img { width: 100%; height: 100%; object-fit: cover; }
.map-person-face.me { border-color: #1d7bf2; }
.map-person-name {
  position: absolute; top: 52px; left: 50%; transform: translateX(-50%);
  padding: 2px 8px; border-radius: 10px; background: var(--card); color: var(--text);
  font: 600 12px/1.4 Inter, system-ui, sans-serif; white-space: nowrap; box-shadow: 0 2px 8px rgba(13, 27, 46, 0.2);
}
.map-person-name.me { background: #1d7bf2; color: #fff; }
/* Markers glide to the new position rather than jump. */
.leaflet-marker-icon.map-person-marker { transition: transform 0.6s var(--ease-out); }
.leaflet-zoom-anim .leaflet-marker-icon.map-person-marker { transition: none; }
@media (prefers-reduced-motion: reduce) {
  .leaflet-marker-icon.map-person-marker { transition: none; }
}
@media (max-width: 900px) {
  .location-layout { grid-template-columns: 1fr; }
  .people-map { height: 60vh; min-height: 320px; }
  .location-sharing { width: 100%; min-width: 0; }
}

/* ---------- Maps: Mapbox-style controls on our vector base map ---------- */
.area-map, .stores-map, .people-map { background: #f5f3f0; }
.leaflet-container { font-family: Inter, system-ui, sans-serif; }
.leaflet-touch .leaflet-bar, .leaflet-bar {
  border: none;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 0 2px rgba(13, 27, 46, 0.08), 0 2px 6px rgba(13, 27, 46, 0.12);
}
.leaflet-touch .leaflet-bar a, .leaflet-bar a {
  width: 30px;
  height: 30px;
  line-height: 30px;
  color: #333;
  font: 600 18px/30px Inter, system-ui, sans-serif;
  border-bottom: 1px solid #e3e3e3;
  background: #fff;
}
.leaflet-bar a:last-child { border-bottom: none; }
.leaflet-bar a:focus-visible { background: #f2f2f2; color: #000; }
@media (hover: hover) and (pointer: fine) { .leaflet-bar a:hover { background: #f2f2f2; color: #000; } }
.leaflet-control-attribution, .leaflet-container .leaflet-control-attribution {
  margin: 0 6px 6px 0;
  padding: 2px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
  color: rgba(0, 0, 0, 0.75);
  font-size: 10.5px;
}
.leaflet-control-attribution a { color: inherit; }
@media (hover: hover) and (pointer: fine) { .leaflet-control-attribution a:hover { text-decoration: underline; } }
/* Tooltips (business names) as Mapbox popups: white card, soft shadow. */
.leaflet-tooltip {
  border: none;
  border-radius: 8px;
  padding: 4px 10px;
  font: 600 12.5px/1.4 Inter, system-ui, sans-serif;
  box-shadow: 0 2px 10px rgba(13, 27, 46, 0.18);
}

/* How the member appears on the live map: Multiavatar + chosen nickname. */
.map-profile-row { display: flex; align-items: flex-end; gap: 12px; }
.map-profile-avatar {
  display: grid; place-items: center; flex-shrink: 0; width: 64px; height: 64px; border-radius: 50%; overflow: hidden;
  background: var(--input); font-weight: 700; color: var(--muted); box-shadow: 0 0 0 3px #1d7bf2;
}
.map-profile-avatar img { width: 100%; height: 100%; }
.map-profile-field { flex: 1; min-width: 0; margin: 0; }
.map-profile-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
/* Multiavatar draws its own round background. */
.map-person-face:has(img) { background: #fff; }

/* Several people at the same spot: their avatars stacked, how many, their names. */
.map-group-faces { position: absolute; top: 0; left: 50%; transform: translateX(-50%); display: flex; }
.map-group .map-person-face { width: 44px; height: 44px; margin-top: 2px; flex-shrink: 0; }
.map-group .map-person-face + .map-person-face { margin-left: -26px; }
.map-group-count {
  position: absolute; top: -6px; right: -18px; z-index: 1; min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 11px; background: var(--primary); color: #fff; border: 2px solid #fff;
  font: 700 12px/18px Inter, system-ui, sans-serif; text-align: center; box-shadow: 0 2px 6px rgba(13, 27, 46, 0.3);
}
.map-group { cursor: pointer; }
.map-group .map-person-name { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
/* A fanned-out group: a line from each avatar to where the person really is. */
.map-group-leg { stroke: #1d2b45; stroke-width: 1.5; stroke-opacity: 0.55; stroke-dasharray: 4 3; fill: none; }
.map-group-spot { stroke: #fff; stroke-width: 1.5; fill: #1d2b45; fill-opacity: 0.85; }

/* ---------- Carpooling (BlaBlaCar style) ---------- */
.btn-outline-primary { background: var(--card); color: var(--primary); box-shadow: inset 0 0 0 2px var(--primary); border-radius: 999px; }
@media (hover: hover) and (pointer: fine) { .btn-outline-primary:hover { background: var(--primary-light); } }
.icon.flip { transform: scaleX(-1); }
.carpool-page { max-width: 1240px; margin: 0 auto; padding: 24px 16px 40px; display: flex; flex-direction: column; gap: 18px; }
.carpool-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.carpool-head h2 { font-size: 28px; }
.carpool-head p { margin-top: 4px; }

/* The search bar: one rounded strip, cells split by thin lines, the button at the end. */
.carpool-search {
  display: flex; align-items: stretch; min-height: 72px;
  background: var(--card); border-radius: 20px; box-shadow: 0 0 0 2px var(--navy), var(--shadow);
  position: relative; z-index: 5;
}
/* Thin lines between the cells, none around the swap button and the search button. */
.carpool-search > :not(:first-child, .carpool-swap, .carpool-go) { border-left: 1px solid var(--divider); }
.carpool-search-field { flex: 1.4; min-width: 0; display: flex; align-items: center; }
.carpool-search-field .place-field { width: 100%; }
.carpool-search .place-input { border: none; border-radius: 0; background: transparent; box-shadow: none; padding: 12px 16px; height: 100%; }
.carpool-search .place-input:focus-within { box-shadow: none; background: var(--hover); }
.carpool-search .place-suggestions { top: calc(100% + 6px); min-width: 320px; }
.carpool-swap { align-self: center; flex-direction: column; width: 40px; height: 40px; color: var(--primary); }
.carpool-swap .icon { height: 9px; }
.carpool-search-cell { display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 10px 16px; min-width: 0; }
.carpool-date { border: none; outline: none; background: transparent; font-size: 16px; font-weight: 600; color: var(--text); padding: 0; max-width: 180px; }
.carpool-go { border-radius: 0 18px 18px 0; height: auto; padding: 0 28px; font-size: 17px; }

/* Search: the bar, what is missing, and the profile's country (not a filter). */
.carpool-search-block { display: flex; flex-direction: column; gap: 8px; }
.carpool-search.invalid { box-shadow: 0 0 0 2px var(--danger), 0 0 0 6px rgba(200, 30, 30, 0.12); }
.carpool-search-error { display: flex; align-items: center; gap: 6px; margin: 0; padding-left: 4px; color: var(--danger); font-size: 14px; font-weight: 500; }
.trip-country-note { display: flex; align-items: center; gap: 6px; margin: 0; padding-left: 4px; }
.trip-country-flag { font-size: 16px; line-height: 1; }
/* Before a search: where to start, and the drivers' way in. */
.carpool-intro { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.carpool-intro .card { margin: 0; }
.carpool-intro-search { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 28px; }
.carpool-intro-search h3 { margin: 6px 0 0; font-size: 22px; }
.carpool-intro-search p { margin: 0; max-width: 52ch; line-height: 1.5; }
.carpool-intro-search .btn { margin-top: 8px; }
.carpool-intro-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; color: var(--primary); background: var(--primary-light, #fdecea); }
.carpool-intro-driver { display: flex; flex-direction: column; justify-content: space-between; gap: 14px; padding: 24px; }
.carpool-intro-driver p { margin: 4px 0 0; }
.carpool-intro-driver .btn { align-self: flex-start; }
@media (max-width: 760px) {
  .carpool-intro { grid-template-columns: 1fr; }
  .carpool-intro-search { padding: 22px; }
}
.carpool-tabs { display: flex; gap: 4px; padding: 4px; background: var(--card); border-radius: 14px; box-shadow: var(--shadow); align-self: flex-start; }
.carpool-tab { padding: 10px 18px; border-radius: 10px; font-weight: 600; color: var(--muted); }
.carpool-tab.active { background: var(--navy); color: #fff; }

.carpool-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }
.carpool-filters { margin: 0; padding: 18px; position: sticky; top: calc(var(--top-h) + 12px); }
.carpool-filters h3 { font-size: 18px; margin: 0; }
.carpool-filters .filters-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.carpool-option { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 10px; padding: 10px 2px; cursor: pointer; font-weight: 500; }
.carpool-option input { width: 18px; height: 18px; accent-color: var(--primary); margin: 0; }
.carpool-option .icon { color: var(--muted); }
.carpool-results { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.carpool-results-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 16px; }

.trip-list { display: flex; flex-direction: column; gap: 12px; }
.trip-list.busy { opacity: 0.6; }
.trip-card {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 16px; width: 100%; margin: 0;
  padding: 18px 22px; text-align: left; border-radius: 18px;
}
@media (hover: hover) and (pointer: fine) { .trip-card:hover { box-shadow: 0 0 0 2px var(--navy), var(--shadow); } }
.trip-card:active { transform: scale(0.99); }
.trip-card.unavailable { opacity: 0.45; }
.trip-card-route { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.trip-times {
  display: grid; grid-template-columns: auto minmax(60px, 240px) auto; justify-content: start; align-items: center;
  gap: 2px 10px; font-size: 18px; font-variant-numeric: tabular-nums;
}
.trip-town { font-size: 16px; font-weight: 600; font-variant-numeric: normal; overflow-wrap: anywhere; }
.trip-line { display: flex; align-items: center; gap: 4px; color: var(--navy); }
.trip-dot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--navy); flex-shrink: 0; }
.trip-bar { flex: 1; height: 4px; border-radius: 2px; background: var(--navy); }
.trip-duration { font-size: 13px; color: var(--muted); padding: 0 2px; }
.trip-via { margin-top: 2px; }
.trip-card-price strong { font-family: var(--font-display); font-size: 26px; letter-spacing: -0.5px; white-space: nowrap; }
.trip-card-price .trip-full { color: var(--text); }
.trip-card-driver { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.trip-car { color: var(--muted); }
.trip-driver-name { font-weight: 600; }
.trip-sep { width: 1px; height: 22px; background: var(--divider); }
.trip-role { margin-left: auto; background: var(--primary-light); color: var(--primary); }
.trip-role.driver { background: #e8eefb; color: #1d4ed8; }

/* A trip in detail: its stops as a vertical line, the member's part highlighted. */
.trip-detail { display: flex; flex-direction: column; gap: 12px; }
.trip-timeline { list-style: none; margin: 0; padding: 0; }
.trip-stop { display: grid; grid-template-columns: 52px 22px 1fr; gap: 10px; position: relative; padding-bottom: 18px; }
.trip-stop:last-child { padding-bottom: 0; }
.trip-stop::before { content: ""; position: absolute; left: 72px; top: 16px; bottom: -2px; width: 4px; border-radius: 2px; background: var(--divider); }
.trip-stop:last-child::before { display: none; }
.trip-stop.on::before { background: var(--navy); }
.trip-stop:has(+ .trip-stop:not(.on))::before { background: var(--divider); }
.trip-stop-time { font-weight: 700; font-variant-numeric: tabular-nums; padding-top: 1px; }
.trip-stop-dot { width: 14px; height: 14px; margin: 3px auto 0; border-radius: 50%; border: 3px solid var(--divider); background: var(--card); position: relative; z-index: 1; }
.trip-stop.on .trip-stop-dot { border-color: var(--navy); }
.trip-stop-place { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.trip-stop-place strong { font-size: 16px; }
.trip-stop:not(.on) .trip-stop-place strong { color: var(--muted); }
.trip-stop-tag { align-self: flex-start; margin-top: 4px; padding: 2px 8px; border-radius: 8px; background: var(--primary-light); color: var(--primary); font-size: 12px; font-weight: 600; }
.trip-detail-row { display: flex; align-items: center; justify-content: space-between; font-size: 16px; }
.trip-detail-row > span { display: inline-flex; align-items: center; gap: 4px; }
.trip-driver-score { display: inline-flex; align-items: center; font-size: 13px; font-weight: 600; color: var(--muted, #6b7280); }
.trip-driver-rating { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.trip-reviews { display: flex; flex-direction: column; gap: 12px; }
.trip-reviews h4 { margin: 0; }
.trip-review .author-row { align-items: center; }
.trip-review .author-row > div { flex: 1; min-width: 0; }
.trip-review p { margin: 6px 0 0; }
.trip-review-form h4 { margin: 0; }
.offer-locked { margin: 0; padding: 10px 12px; border-radius: 10px; background: #fff7e6; }
.offer-locked-route { display: flex; flex-direction: column; gap: 2px; }
.offer-no-car { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 8px 0; }
.offer-no-car p { margin: 0; }
.offer-no-car .form-actions { align-self: stretch; }
.trip-detail-price { font-family: var(--font-display); font-size: 24px; }
.trip-note { background: var(--bg); border-radius: 12px; padding: 12px; }
.trip-actions { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.trip-seats-picker { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.trip-seats-picker select { min-width: 140px; }
.trip-state { font-weight: 600; color: var(--muted); }
.trip-state.ok { color: var(--success); display: inline-flex; align-items: center; gap: 4px; }

/* Offering a trip: the route as a column of places, each with its time. */
.offer-trip { display: flex; flex-direction: column; gap: 14px; }
.offer-route { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 16px; background: var(--bg); }
.offer-route.invalid { box-shadow: inset 0 0 0 2px var(--danger); }
.offer-place { display: flex; align-items: flex-end; gap: 8px; }
.offer-place-field { flex: 1; min-width: 0; }
.offer-time { width: 150px; flex-shrink: 0; margin: 0; }
.offer-remove { margin-bottom: 8px; }
.offer-add-stop { align-self: flex-start; }

@media (max-width: 900px) {
  .carpool-layout { grid-template-columns: 1fr; }
  /* Phones: the trips first, the sorting and filters after them. */
  .carpool-filters { position: static; order: 2; }
  .carpool-search { flex-direction: column; border-radius: 18px; }
  .carpool-search > :not(:first-child, .carpool-swap, .carpool-go) { border-left: none; border-top: 1px solid var(--divider); }
  .carpool-swap { position: absolute; right: 12px; top: 44px; z-index: 2; background: var(--card); box-shadow: 0 0 0 1px var(--divider); border-radius: 50%; transform: rotate(90deg); }
  .carpool-date { max-width: none; width: 100%; }
  .search-select.bare .multi-select-button { width: 100%; }
  .carpool-go { border-radius: 0 0 16px 16px; height: 52px; }
}
@media (max-width: 600px) {
  .trip-card { padding: 14px 16px; grid-template-columns: 1fr; }
  .trip-card-price { order: -1; justify-self: end; margin-bottom: -38px; }
  .trip-card-price strong { font-size: 22px; }
  .trip-times { grid-template-columns: auto minmax(40px, 1fr) auto; font-size: 16px; padding-right: 90px; }
  .offer-place { flex-wrap: wrap; }
  .offer-time { width: 100%; }
}

/* Country picker (searchable list instead of the browser's full-screen one). */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
/* In the carpooling search bar: a bare cell, label above, value in bold. */
.search-select.bare { gap: 2px; }
.search-select.bare .multi-select-button { height: auto; padding: 0; border: none; background: transparent; box-shadow: none; font-size: 16px; color: var(--text); font-weight: 600; min-width: 160px; }
.search-select.bare .multi-select-button:focus-visible { outline: 2px solid var(--primary); outline-offset: 4px; border-radius: 4px; }
/* Sign-up: the same label and field as the other inputs of the form. */
.search-select.auth-country .multi-select-label { font-size: 13px; font-weight: 600; color: var(--text); }
.search-select.auth-country .multi-select-button { height: 48px; padding: 0 14px; font-size: 16px; border: 1px solid #8592a6; border-radius: 12px; background: #fff; }
.search-select.auth-country.invalid .multi-select-button { border-color: #c81d24; box-shadow: 0 0 0 1px #c81d24; }
/* Stores: the filter row keeps its globe icon and a compact field. */
.country-filter .search-select { flex: 1; min-width: 0; }
.country-filter .multi-select-button { height: 36px; }
.filter-toolbar .country-filter .search-select { width: 200px; flex: none; }

/* Carpooling: the map button of each place, distances to the searched places, trips nearby. */
.offer-map { margin-bottom: 8px; color: var(--muted); }
.offer-map.placed { color: var(--success); }
.trip-distance { display: inline-flex; align-items: center; gap: 2px; font-size: 12.5px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.trip-distance.close { color: var(--success); }
.trip-distance.near { color: #b26a00; }
.carpool-nearby-head { display: flex; flex-direction: column; gap: 2px; margin-top: 12px; padding-top: 14px; border-top: 1px dashed var(--divider); }
.post-translate { display: flex; align-items: center; gap: 10px; padding: 0 16px 12px; margin-top: -4px; }
.post-translate .link-btn { font-size: 14px; color: var(--muted); }
.post-translate .link-btn:disabled { cursor: progress; opacity: 0.7; }

/* ---------- Stores as pages ---------- */
.grow { flex: 1; min-width: 0; }
/* The store the member acts as, in the top bar, with a way back to themselves. */
.acting-as { display: flex; align-items: center; gap: 8px; max-width: 280px; padding: 3px 3px 3px 4px; border-radius: 999px; background: var(--primary-light); color: var(--primary); font-size: 13px; font-weight: 600; }
.acting-as-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acting-as .icon-btn { width: 26px; height: 26px; color: var(--primary); }
.acting-as .store-logo { flex-shrink: 0; }
@media (max-width: 900px) { .acting-as-text { display: none; } }
/* The profile in use in the account menu, and the switch to another. */
.account-card { background: var(--bg); border-radius: var(--radius-sm); margin-bottom: 6px; padding-bottom: 2px; }
.account-card-head { display: flex; align-items: center; gap: 4px; padding-right: 8px; }
.account-card-head .profile-link { flex: 1; min-width: 0; }
.account-switch { flex: none; background: var(--card); box-shadow: 0 1px 4px rgba(13, 27, 46, 0.12); }
.account-switch.active { color: var(--primary); }
.account-card .dropdown-label { padding-top: 2px; }
.store-followers::before { content: '·'; margin-right: 10px; }
.act-as-store { display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin-bottom: 12px; }
.store-inbox { padding: 6px; }
.store-inbox-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border-radius: 12px; text-align: left; }
.store-inbox-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.store-inbox-row.unread strong { font-weight: 800; }
.store-inbox-row .count-badge { position: static; }
@media (hover: hover) and (pointer: fine) {
  .store-inbox-row:hover { background: var(--hover); }
}
