:root {
  --navy: #0B1748;
  --pink: #FF5D9E;
  --bg: #FFFFFF;
  --surface: #F8F9FC;
  --border: #E9EDF5;
  --text: #111827;
  --muted: #6B7280;
  --success: #22C55E;
  --warning: #F59E0B;
  --error: #EF4444;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  --radius-input: 20px;
  --radius-card: 24px;
  --radius-btn: 16px;
  --nav-h: 80px;
  /* Mobile-first shell; desktop overrides expand to full viewport */
  --shell-max: 480px;
  --shell-pad-x: 24px;
  --page-max: 480px;
  /* Vehicle photos — same natural crop everywhere */
  --photo-ratio: 16 / 10;
  --photo-ratio-thumb: 4 / 3;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: Inter, Manrope, system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
}

button, input, select { font-family: inherit; }

/* Outline icons — grey stroke, no fill */
.icon {
  width: 1.15em;
  height: 1.15em;
  display: inline-block;
  vertical-align: -0.15em;
  flex-shrink: 0;
  color: var(--muted);
}
.icon-sm { width: 16px; height: 16px; }
.icon-md { width: 20px; height: 20px; }
.icon-lg { width: 28px; height: 28px; }
.icon-xl { width: 36px; height: 36px; }
.nav .icon { width: 22px; height: 22px; }
.nav button.active .icon { color: var(--pink); }
.search-wrap > .icon { width: 20px; height: 20px; color: #9CA3AF; }
.icon-btn .icon { width: 20px; height: 20px; color: var(--muted); }
.stat-card .ico {
  color: var(--muted);
  background: var(--surface);
}
.stat-card .ico .icon { width: 20px; height: 20px; color: var(--muted); }
.chip .icon { width: 15px; height: 15px; margin-right: 2px; }
.fav-btn .icon, .cmp-btn .icon { width: 18px; height: 18px; color: var(--muted); }
.fav-btn.on .icon { color: var(--pink); }
.cmp-btn.on .icon { color: var(--navy); }
.ai-badge .icon { width: 12px; height: 12px; color: #fff; }
.empty-state .illu .icon { width: 32px; height: 32px; color: var(--muted); }
.gallery-nav .icon { width: 18px; height: 18px; color: var(--navy); }
.ghost-btn .icon { width: 15px; height: 15px; margin-right: 4px; color: inherit; }
.inline-ico { display: inline-flex; align-items: center; gap: 6px; }

.shell {
  width: 100%;
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 0 var(--shell-pad-x) calc(var(--nav-h) + 24px + env(safe-area-inset-bottom));
  min-height: 100vh;
  min-height: 100dvh;
}

.view { display: none; animation: fadeIn 220ms ease; }
.view.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 76px;
  margin-bottom: 4px;
}
.lang-btn {
  width: 40px;
  height: 32px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 10px;
  padding: 4px 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.lang-btn:hover { border-color: #C7D2FE; }
.flag-icon {
  width: 24px;
  height: 16px;
  display: block;
  border-radius: 2px;
}
.logo,
button.logo-home {
  font-size: 32px !important;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.8px;
  line-height: 1;
}
.logo span { color: var(--pink); }
.logo.sm { font-size: 32px; margin-bottom: 8px; }
button.logo-home {
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
}
button.logo-home:hover { opacity: 0.85; }

[data-view="home"] .app-header {
  margin-bottom: 8px;
}
[data-view="home"] .hero-title {
  font-size: 26px;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.35px;
  margin: 4px 0 22px;
  max-width: none;
  white-space: nowrap;
}

.page-title {
  font-size: 28px !important;
  margin-bottom: 10px !important;
}
.search-explain {
  margin: 0 0 18px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
}

[data-view="search"] .search-intro-line {
  position: relative;
  z-index: 1;
  display: block;
  clear: both;
  margin: 4px 0 20px;
  max-width: 52rem;
  font-size: clamp(18px, 2.2vw, 26px);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--navy);
  background: transparent;
}

.icon-btn, .ghost-btn {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--navy);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.icon-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 14px;
  font-size: 16px;
}
.ghost-btn:disabled { opacity: 0.5; cursor: wait; }

/* Typography */
.hero-title {
  font-size: 28px;
  line-height: 1.2;
  margin: 8px 0 16px;
  color: var(--navy);
  font-weight: 700;
}
.hero-title .accent { color: var(--pink); }
.subtitle {
  color: var(--muted);
  font-size: 16px;
  margin: 0 0 24px;
  line-height: 1.45;
}
.subtitle .accent { color: var(--pink); font-weight: 600; }
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 24px 0 12px;
}
.section-header h2 {
  margin: 0;
  font-size: 18px;
  color: var(--navy);
}
.section-header .link {
  border: none;
  background: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
}

/* Search bar */
.search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  min-height: 56px;
  height: 56px;
  padding: 0 14px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.search-wrap:focus-within { border-color: #C7D2E0; }
.search-wrap.tap-only { cursor: pointer; }
.search-wrap input,
.search-wrap textarea.search-query {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  color: var(--text);
  background: transparent;
  min-width: 0;
  font-family: inherit;
  line-height: 1.35;
  resize: none;
  overflow-y: auto;
}
.search-wrap textarea.search-query {
  height: 1.35em;
  min-height: 1.35em;
  max-height: min(45vh, 420px);
  padding: 0;
  margin: 0;
}
.search-wrap input::placeholder,
.search-wrap textarea.search-query::placeholder { color: #9CA3AF; }
.mic-btn {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: #6B7280;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.mic-btn .icon,
.mic-btn .icon-slot svg {
  width: 22px;
  height: 22px;
}
.mic-btn:hover { color: var(--navy, #0B1748); background: #F3F4F6; }
.mic-btn.listening {
  color: #fff;
  background: #16A34A;
  animation: micPulse 1.1s ease-in-out infinite;
}
.mic-btn.busy { opacity: 0.55; cursor: wait; }
@keyframes micPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.45); }
  50% { transform: scale(1.06); box-shadow: 0 0 0 8px rgba(22, 163, 74, 0); }
}

/* Expand search card while typing / voice so text stays visible */
.search-wrap.is-expanded,
.search-wrap:focus-within,
.search-wrap.is-listening {
  height: auto;
  min-height: 56px;
  align-items: flex-end;
  padding-top: 10px;
  padding-bottom: 10px;
}
.search-wrap.is-expanded .search-lead-icon,
.search-wrap:focus-within .search-lead-icon,
.search-wrap.is-listening .search-lead-icon {
  align-self: flex-start;
  margin-top: 8px;
}
.search-btn, .primary-btn {
  border: none;
  background: var(--navy);
  color: #fff;
  border-radius: 12px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.search-btn:disabled, .primary-btn:disabled { opacity: 0.5; cursor: wait; }

.search-meta {
  margin: -8px 0 14px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--muted);
  text-align: center;
}
.primary-btn.block {
  display: block;
  width: 100%;
  text-align: center;
  border-radius: var(--radius-btn);
  padding: 14px 16px;
  text-decoration: none;
}
.primary-btn.pink { background: var(--pink); }

/* Chips */
.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 8px;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--navy);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.chip:hover { border-color: #C7D2E0; }

.chip-suggest,
.chips-suggest .chip,
.chips-suggest .chip-suggest {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.chip-suggest:hover,
.chips-suggest .chip:hover,
.chips-suggest .chip-suggest:hover {
  background: #13225e;
  border-color: #13225e;
  color: #fff;
}
.chip-suggest .icon,
.chips-suggest .chip .icon,
.chips-suggest .chip-suggest .icon {
  color: #fff;
}

.search-card {
  margin: 0 0 20px;
  padding: 18px 16px 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
}
.search-card-title {
  margin: 0 0 14px;
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.03em;
  color: var(--navy);
}
.search-card-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 420px;
  align-items: stretch;
}
.search-wrap-in-card {
  margin: 0;
  max-width: none;
  width: 100%;
}
.search-wrap-in-card .search-btn { display: none; }
.search-card-submit {
  margin-top: 2px;
  min-height: 46px;
  font-size: 15px;
  width: 100%;
  max-width: none;
  align-self: stretch;
}
@media (min-width: 768px) {
  .search-card {
    padding: 22px 24px 20px;
  }
  .search-card-form {
    max-width: 380px;
    gap: 12px;
  }
  .search-card-submit.block {
    width: 100%;
    display: inline-flex;
    justify-content: center;
  }
}
@media (max-width: 767px) {
  .search-card-form {
    max-width: none;
  }
}
.search-recent-pager { margin-top: 8px; }
.pager-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  color: var(--navy);
  cursor: pointer;
}
.pager-btn:hover:not(:disabled) {
  border-color: var(--pink);
  color: var(--pink);
}
.pager-btn.on {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
  font-weight: 600;
}
.pager-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

/* Stats */
.stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0;
}
.stat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}
.stat-card .ico {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}
.stat-card .num {
  font-size: 24px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.1;
}
.stat-card .cap {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

/* Popular grid — 4 cards */
.popular-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 8px;
}
.mini-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  position: relative;
  text-align: left;
  padding: 0;
  font: inherit;
  color: inherit;
  width: 100%;
}
.mini-card img {
  width: 100%;
  height: auto;
  aspect-ratio: var(--photo-ratio);
  object-fit: cover;
  object-position: center center;
  background: var(--surface);
  display: block;
}
.mini-card .body { padding: 12px; }
.mini-card .name {
  font-weight: 700;
  font-size: 14px;
  color: var(--navy);
  margin-bottom: 4px;
}
.mini-card .meta {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
.mini-card .price {
  font-weight: 700;
  font-size: 15px;
  color: var(--navy);
}

/* AI Banner */
.ai-banner {
  margin: 24px 0 8px;
  background: linear-gradient(135deg, #0B1748, #1a2f7a);
  color: #fff;
  border: none;
  border-radius: var(--radius-card);
  padding: 20px;
  box-shadow: var(--shadow);
}
.ai-banner .eyebrow {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.ai-banner .ai-pink {
  color: #FF5D9E;
}
.ai-banner h3 {
  margin: 0 0 8px;
  font-size: 20px;
  color: #fff;
}
.ai-banner p {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.9);
}

/* Results toolbar */
.results-search {
  margin: 4px 0 12px;
}
.toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.toolbar .meta-line {
  flex: 1;
  margin: 0;
  min-height: 0;
  font-weight: 600;
  color: var(--navy);
}
.toolbar select {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--navy);
  flex-shrink: 0;
}

.back-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 8px;
}
.back-btn {
  border: none;
  background: none;
  color: var(--navy);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  padding: 0;
}

.meta-line {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 12px;
  min-height: 20px;
}
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px;
}
.chip-filter {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 10px;
}

.insight {
  display: none;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.insight.show { display: block; }
.insight h2 { margin: 0 0 10px; font-size: 15px; color: var(--navy); }
.insight-row { font-size: 13px; line-height: 1.45; margin-bottom: 8px; }
.insight-row strong { color: var(--navy); }
.insight-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }

.clarify, .fallback {
  display: none;
  border-radius: 20px;
  padding: 16px;
  margin-bottom: 16px;
}
.clarify, .fallback {
  background: #fff;
  border: 1px solid var(--border);
}
.clarify.show, .fallback.show { display: block; }
.clarify strong, .fallback strong { color: var(--navy); display: block; margin-bottom: 6px; }
.clarify p, .fallback p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--muted); }

.extend-box {
  display: none;
  margin: 20px 0 48px;
  padding: 20px 18px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
}
.extend-box.show { display: block !important; }
.extend-hint {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
}
.extend-btn {
  appearance: none;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, #FF5D9E, #FF8FBD);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.01em;
  padding: 12px 22px;
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(255, 93, 158, 0.22);
}
.extend-btn:disabled {
  opacity: 0.55;
  cursor: wait;
  box-shadow: none;
}
.extend-box.is-loading .extend-hint { color: var(--navy); }
.extend-note {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.error-box {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 16px;
  display: none;
  font-size: 14px;
}
.error-box.show { display: block; }
.error-box .retry {
  margin-top: 10px;
  border: 1px solid #FECACA;
  background: #fff;
  color: #991B1B;
  border-radius: 12px;
  padding: 8px 12px;
  font-weight: 600;
  cursor: pointer;
}

/* Vehicle card */
.results { display: grid; gap: 16px; }
.results .extend-box,
.results [data-extend-box] {
  grid-column: 1 / -1;
  display: block !important;
  margin: 8px 0 32px;
}
.card {
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid var(--border);
  position: relative;
}
.card.top-pick {
  border-color: var(--pink);
  box-shadow: 0 12px 32px rgba(255, 93, 158, 0.18);
}
.top-banner {
  background: linear-gradient(135deg, #FF5D9E, #FF8FBD);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 8px 16px;
  text-transform: uppercase;
}
.card-media { position: relative; }
.card-media img {
  width: 100%;
  height: auto;
  aspect-ratio: var(--photo-ratio);
  object-fit: cover;
  object-position: center center;
  background: var(--surface);
  display: block;
}
.fav-btn, .cmp-btn {
  position: absolute;
  top: 10px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fav-btn { right: 10px; }
.cmp-btn { right: 52px; }
.fav-btn.on { color: var(--pink); }
.cmp-btn.on { color: var(--navy); font-weight: 700; }
.ai-badge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #FF5D9E, #FF8FBD);
  color: #fff;
  border: none;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
}
.card-body { padding: 16px; }
.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 6px;
}
.model { font-weight: 700; font-size: 18px; color: var(--navy); }
.price { font-weight: 700; font-size: 18px; color: var(--navy); white-space: nowrap; }
.details { color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.provider {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--navy);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 8px;
  margin-bottom: 8px;
  text-transform: uppercase;
}
.why {
  margin-top: 12px;
  padding: 12px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.why h3 { margin: 0 0 8px; font-size: 13px; color: var(--navy); }
.why ul { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.45; }
.why ul.warn, .why-detail ul.warn { color: var(--muted); margin-top: 8px; }
.why .alt { margin-top: 8px; font-size: 12px; color: var(--muted); }
.why-detail ul { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.5; }
.why-detail strong { color: var(--navy); }
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.quick-actions-row .icon-only-btn {
  width: 42px;
  min-width: 42px;
  padding-left: 0;
  padding-right: 0;
  justify-content: center;
}
.quick-actions-row .icon-only-btn .icon {
  margin-right: 0;
}
.contact-panel {
  margin-top: 12px;
  padding: 14px 14px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fafbfd;
}
.contact-panel[hidden] { display: none !important; }
.contact-panel h3 {
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--navy);
}
.contact-note {
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}
.contact-dl {
  margin: 0 0 10px;
  display: grid;
  gap: 8px;
}
.contact-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 8px;
  font-size: 13px;
  align-items: baseline;
}
.contact-row dt {
  margin: 0;
  color: var(--muted);
  font-weight: 500;
}
.contact-row dd {
  margin: 0;
  color: var(--navy);
  font-weight: 600;
  word-break: break-word;
}
.contact-row a {
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.contact-panel .link-btn .icon {
  width: 14px;
  height: 14px;
  margin-left: 4px;
  vertical-align: -2px;
}
@media (max-width: 520px) {
  .contact-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}
.card a.open, .link-btn {
  display: inline-flex;
  align-items: center;
  color: var(--navy);
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}
.card a.open.analysis, .link-btn.analysis {
  color: var(--navy);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
}

.pill {
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  border: 1px solid var(--border);
}
/* Brand differentiator: navy+white = OK, pink edge = atenție */
.pill.ok {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.pill.warn {
  background: #fff;
  color: var(--navy);
  border-color: var(--pink);
}
button.pill {
  font: inherit;
  cursor: pointer;
}
button.pill.alt-search:hover {
  background: var(--pink);
  border-color: var(--pink);
  color: #fff;
}

/* Empty / skeleton */
.empty-state {
  text-align: center;
  padding: 48px 16px;
  color: var(--muted);
  display: none;
}
.empty-state.show { display: block; }
.empty-state .illu {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}
.empty-state h3 { margin: 0 0 8px; color: var(--navy); font-size: 18px; }
.empty-state p { margin: 0 0 16px; font-size: 14px; line-height: 1.45; }

.skeleton-list { display: grid; gap: 16px; }
.skeleton {
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 37%, #f3f4f6 63%);
  background-size: 400% 100%;
  animation: shimmer 1.2s ease infinite;
  border-radius: 16px;
}
.skel-card { height: 280px; border-radius: var(--radius-card); }
@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

/* Mobile: stack media then panel */
.detail-layout {
  display: block;
}
.detail-media { margin-bottom: 4px; }
.detail-panel { min-width: 0; }

/* Details / Analysis */
.hero-img {
  width: 100%;
  height: auto;
  aspect-ratio: var(--photo-ratio);
  object-fit: cover;
  object-position: center center;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: block;
}

/* Vehicle gallery */
.gallery {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  margin-bottom: 4px;
}
.gallery-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-track img {
  flex: 0 0 100%;
  width: 100%;
  height: auto;
  aspect-ratio: var(--photo-ratio);
  object-fit: cover;
  object-position: center center;
  scroll-snap-align: start;
  background: var(--surface);
  display: block;
}
.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-sm);
  color: var(--navy);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.gallery-nav.prev { left: 10px; }
.gallery-nav.next { right: 10px; }
.gallery-nav:disabled { opacity: 0.35; cursor: default; }
.gallery-count {
  position: absolute;
  right: 12px;
  bottom: 12px;
  background: rgba(11, 23, 72, 0.75);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  z-index: 2;
}
.gallery-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 10px 8px 12px;
  background: #fff;
}
.gallery-dots button {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  border: none;
  padding: 0;
  background: var(--border);
  cursor: pointer;
}
.gallery-dots button.on { background: var(--navy); width: 16px; }
.gallery-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 0 8px;
  margin-top: 10px;
  scrollbar-width: none;
}
.gallery-thumbs::-webkit-scrollbar { display: none; }
.gallery-thumbs button {
  flex: 0 0 72px;
  height: auto;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
  cursor: pointer;
}
.gallery-thumbs button.on { border-color: var(--navy); }
.gallery-thumbs img {
  width: 100%;
  height: auto;
  aspect-ratio: var(--photo-ratio-thumb);
  object-fit: cover;
  object-position: center center;
  display: block;
}
.title-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0 6px;
  align-items: flex-start;
}
.title-row h1 {
  margin: 0;
  font-size: 24px;
  color: var(--navy);
  line-height: 1.2;
}
.score-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(135deg, #0B1748, #1a2f7a);
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 16px 18px;
  margin-bottom: 16px;
}
.score-box .num { font-size: 36px; font-weight: 700; }
.score-box .label { font-size: 13px; opacity: 0.9; color: #fff; }
.badge-pink {
  background: var(--pink);
  color: #fff;
  border: none;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
}
.section {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.section h2 { margin: 0 0 10px; font-size: 17px; color: var(--navy); }
.section ul { margin: 0; padding-left: 18px; font-size: 15px; line-height: 1.55; }
.section p { margin: 0; font-size: 15px; line-height: 1.55; }
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.info-row {
  background: var(--surface);
  border-radius: 12px;
  padding: 10px 12px;
}
.info-row .k { font-size: 12px; color: var(--muted); }
.info-row .v { font-size: 15px; font-weight: 600; color: var(--navy); margin-top: 2px; }
.pill-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.bars { display: grid; gap: 8px; }
.verdict-card {
  border-color: rgba(11, 23, 72, 0.18);
  background:
    linear-gradient(180deg, rgba(11, 23, 72, 0.04), #fff 42%),
    #fff;
}
.verdict-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.verdict-head h2 { margin: 0; }
.verdict-badge {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
}
.verdict-card.level-buy .verdict-badge {
  background: #1F7A4D;
}
.verdict-card.level-negotiate .verdict-badge {
  background: var(--navy);
}
.verdict-card.level-skip .verdict-badge {
  background: var(--pink);
}
.verdict-summary {
  margin: 0 0 8px !important;
  color: var(--navy);
  font-weight: 600;
}
.verdict-card ul {
  margin: 0 0 10px;
}
.verdict-next {
  margin: 0 !important;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface);
  color: var(--navy);
  font-size: 14px !important;
  font-weight: 600;
}
.bar-row {
  display: grid;
  grid-template-columns: 1fr 40px;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}
.bar-track {
  height: 8px;
  background: var(--surface);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--pink), #ff8fbd);
  border-radius: 999px;
}

.sticky-cta {
  position: sticky;
  bottom: calc(var(--nav-h) + 8px);
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding-top: 8px;
  background: linear-gradient(to top, var(--bg) 70%, transparent);
}

/* Saved grid */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.grid-2 .mini-card { flex: none; width: 100%; }

/* Compare */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
.compare-table th, .compare-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.compare-table th {
  background: var(--surface);
  color: var(--navy);
  font-size: 12px;
}
.compare-table tr:last-child td { border-bottom: none; }
.compare-slots {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 16px;
}
.compare-slot {
  flex: 0 0 120px;
  border: 1px dashed var(--border);
  border-radius: 16px;
  padding: 10px;
  font-size: 12px;
  background: #fff;
  position: relative;
}
.compare-slot img {
  width: 100%;
  height: auto;
  aspect-ratio: var(--photo-ratio);
  object-fit: cover;
  object-position: center center;
  border-radius: 10px;
  background: var(--surface);
  display: block;
}
.compare-slot .rm {
  position: absolute;
  top: 4px;
  right: 4px;
  border: none;
  background: #fff;
  border-radius: 999px;
  width: 22px;
  height: 22px;
  cursor: pointer;
  font-size: 12px;
  box-shadow: var(--shadow-sm);
}

/* Profile */
.profile-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}
.profile-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
  width: 100%;
  font: inherit;
  color: inherit;
  text-align: left;
}
.profile-item.profile-link {
  cursor: pointer;
}
.profile-item.profile-link:hover {
  border-color: #C7D2FE;
}
.profile-item.profile-link .icon {
  color: var(--muted);
}
.profile-item span { font-size: 14px; color: var(--navy); font-weight: 500; }
.profile-item select, .profile-item button {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
}
.profile-item button.danger {
  background: #fff;
  color: var(--muted);
  border-color: var(--border);
}

.list-block { margin-top: 8px; }
.list-block button.chip {
  display: flex;
  width: 100%;
  margin-bottom: 8px;
  height: auto;
  min-height: 44px;
  padding: 10px 14px;
  white-space: normal;
  text-align: left;
}

/* Bottom nav */
.nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: min(var(--page-max), 100%);
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: #fff;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  z-index: 50;
}
.nav button {
  border: none;
  background: transparent;
  font-size: 11px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  font-family: inherit;
  padding: 8px 4px;
}
.nav button.active { color: var(--pink); font-weight: 600; }
.nav .ico {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 24px;
}
.nav.hidden { display: none; }

.hidden { display: none !important; }

/* Home site card (matches AI banner language) */
.site-card {
  margin: 16px 0 24px;
  background: linear-gradient(135deg, #0B1748, #1a2f7a);
  color: #fff;
  border-radius: var(--radius-card);
  padding: 20px;
  box-shadow: var(--shadow);
}
.site-card .eyebrow {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.site-card .ai-pink { color: #FF5D9E; }
.site-card h3 { margin: 0 0 8px; font-size: 20px; color: #fff; }
.site-card > p { margin: 0 0 14px; font-size: 14px; line-height: 1.45; color: rgba(255,255,255,0.9); }
.site-card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.site-card-links a {
  color: #fff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255,255,255,0.06);
}
.site-card-links a:hover { border-color: var(--pink); color: #fff; }
.site-social {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 10px;
}
.site-social a {
  color: rgba(255,255,255,0.85);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.site-card .copyright {
  margin: 0;
  font-size: 12px;
  color: rgba(255,255,255,0.65);
}

.legal-root { padding-bottom: 24px; }
.legal-body {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 16px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--navy);
}
.legal-body h3 { margin: 16px 0 8px; font-size: 16px; }
.legal-body p { margin: 0 0 10px; }
.legal-body ul { margin: 0 0 12px; padding-left: 18px; }
.faq-item { margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.faq-item h3 { margin: 0 0 6px; font-size: 15px; }
.faq-item p { margin: 0; color: var(--muted); }

.contact-form {
  display: grid;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 16px;
  margin-bottom: 24px;
}
.contact-form label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
}
.contact-form input,
.contact-form textarea {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  font: inherit;
  color: var(--navy);
  background: #fff;
}
.contact-form textarea { resize: vertical; min-height: 120px; }

.cookie-banner {
  display: none;
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 10px);
  width: min(var(--page-max), calc(100% - 20px));
  z-index: 80;
}
.cookie-banner.show { display: block; }
.cookie-inner {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 14px;
}
.cookie-inner p {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--navy);
}
.cookie-inner a { color: var(--pink); font-weight: 600; }
.cookie-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
a.profile-item {
  text-decoration: none;
  color: inherit;
  width: 100%;
  box-sizing: border-box;
}

/* ========== Desktop / tablet — full-screen responsive ========== */
@media (min-width: 768px) {
  :root {
    --shell-max: 100%;
    --shell-pad-x: 40px;
    --page-max: 100%;
    --nav-h: 0px;
  }

  body {
    background:
      radial-gradient(1200px 480px at 10% -10%, rgba(255, 93, 158, 0.08), transparent 55%),
      radial-gradient(900px 420px at 90% 0%, rgba(11, 23, 72, 0.06), transparent 50%),
      var(--bg);
  }

  .shell {
    max-width: min(1200px, 100%);
    padding-top: 8px;
    padding-bottom: 40px;
  }

  /* Desktop/tablet: no bottom bar — nav lives in the header row */

  .nav {
    top: 0;
    bottom: auto !important;
    left: 50%;
    right: 0;
    transform: none;
    width: auto;
    height: 76px;
    margin: 0;
    padding: 0 calc(max(40px, calc((100% - 1200px) / 2 + 40px)) + 52px) 0 12px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 2px;
    background: transparent !important;
    border: none !important;
    border-top: none !important;
    box-shadow: none !important;
    pointer-events: none;
    z-index: 55;
  }

  .nav button {
    pointer-events: auto;
    flex-direction: row;
    gap: 7px;
    padding: 8px 12px;
    font-size: 13px;
    letter-spacing: -0.01em;
    border-radius: 10px;
    color: var(--muted);
    transition: color 0.15s ease, background 0.15s ease;
  }

  .nav button:hover {
    color: var(--navy);
    background: rgba(11, 23, 72, 0.04);
  }

  .nav button.active {
    color: var(--pink);
    background: transparent;
    font-weight: 600;
  }

  .nav .ico {
    height: 20px;
  }

  .nav .icon {
    width: 18px;
    height: 18px;
  }

  .nav [data-nav="home"] {
    display: none;
  }

  .app-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(to bottom, #fff 82%, rgba(255, 255, 255, 0));
    margin-left: calc(-1 * var(--shell-pad-x));
    margin-right: calc(-1 * var(--shell-pad-x));
    padding-left: var(--shell-pad-x);
    padding-right: var(--shell-pad-x);
  }

  .app-header .lang-btn {
    position: relative;
    z-index: 60;
  }

  .cookie-banner {
    bottom: 20px;
    width: min(720px, calc(100% - 40px));
  }

  .hero-title {
    font-size: clamp(32px, 4vw, 44px);
    max-width: 16ch;
  }

  [data-view="home"] .hero-title {
    max-width: 18ch;
  }

  .search-wrap {
    max-width: 720px;
  }

  /* Home desktop: 2 rows × 4 popular cars; blue cards full content width */
  [data-view="home"] .hero-title,
  [data-view="home"] .search-wrap,
  [data-view="home"] .search-meta {
    max-width: 720px;
    width: 100%;
  }

  [data-view="home"] .section-header,
  [data-view="home"] .popular-grid,
  [data-view="home"] .ai-banner,
  [data-view="home"] .site-card {
    max-width: none;
    width: 100%;
  }

  [data-view="home"] .popular-grid,
  .popular-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
  }

  [data-view="home"] .mini-card img,
  .results .card-media img,
  .gallery-track img,
  .hero-img,
  .compare-slot img {
    aspect-ratio: var(--photo-ratio);
  }

  .gallery-thumbs img {
    aspect-ratio: var(--photo-ratio-thumb);
  }

  .results {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  .ai-banner,
  .site-card {
    max-width: none;
    width: 100%;
  }

  .site-card-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .site-social {
    gap: 20px;
  }

  .toolbar {
    gap: 16px;
  }

  .filters {
    gap: 8px;
  }

  .profile-list {
    max-width: 640px;
  }

  .contact-form,
  .legal-body {
    max-width: 720px;
  }

  .info-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1024px) {
  :root {
    --shell-pad-x: 48px;
    --nav-h: 0px;
  }

  .shell {
    max-width: min(1360px, 100%);
    padding-bottom: 40px;
  }

  .app-header {
    height: 88px;
  }

  .nav {
    height: 88px;
    bottom: auto !important;
    padding: 0 calc(max(48px, calc((100% - 1360px) / 2 + 48px)) + 52px) 0 12px;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }

  .results {
    grid-template-columns: repeat(4, 1fr);
  }

  /* Desktop detail: gallery left, text + CTAs right */
  .detail-layout {
    display: grid;
    grid-template-columns: minmax(420px, 1.15fr) minmax(360px, 0.95fr);
    gap: 28px 40px;
    align-items: start;
  }

  .detail-media {
    position: sticky;
    top: 20px;
    align-self: start;
  }

  .detail-media .gallery {
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
  }

  .detail-media .gallery-track img {
    aspect-ratio: var(--photo-ratio);
    border-radius: 0;
  }

  .detail-media .gallery-thumbs {
    margin-top: 0;
    padding-bottom: 0;
  }

  .detail-panel {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .detail-panel .title-row {
    margin-top: 0;
  }

  .detail-panel .title-row h1 {
    font-size: clamp(26px, 2.2vw, 34px);
  }

  .detail-panel .price {
    font-size: clamp(22px, 2vw, 28px);
  }

  .detail-panel .info-grid {
    grid-template-columns: 1fr 1fr;
  }

  .detail-panel .section {
    margin-bottom: 14px;
  }

  .detail-panel .sticky-cta,
  .detail-panel .detail-cta {
    position: sticky;
    bottom: calc(var(--nav-h) + 12px);
    margin-top: 8px;
    padding: 12px 0 4px;
    background: linear-gradient(to top, var(--bg) 72%, transparent);
    z-index: 5;
  }

  .detail-panel .card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .compare-table,
  #compareRoot {
    overflow-x: auto;
  }

  .grid-2 {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1280px) {
  .results {
    grid-template-columns: repeat(4, 1fr);
  }

  .search-wrap {
    max-width: 800px;
  }
}

/* Prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .view { animation: none; }
}

/* Account / profile */
.profile-shell {
  display: grid;
  gap: 14px;
  margin-top: 10px;
  width: 100%;
  max-width: 920px;
}
.auth-card,
.profile-section {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 1px 0 rgba(11, 23, 72, 0.03);
}
.auth-card-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 16px;
}
.auth-card-head h2 {
  margin: 0 0 4px;
  color: var(--navy);
  font-size: 1.25rem;
  line-height: 1.2;
}
.auth-badge {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(145deg, #0B1748, #1a2f7a);
  color: #fff;
  display: grid;
  place-items: center;
}
.auth-badge .icon,
.auth-badge svg {
  width: 22px;
  height: 22px;
  color: #fff;
  stroke: #fff;
}
.oauth-stack {
  display: grid;
  gap: 10px;
  margin-top: 0;
}
.oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--navy);
  font: inherit;
  font-size: 15px;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}
.oauth-btn:hover {
  border-color: #c7d2fe;
  box-shadow: 0 2px 10px rgba(11, 23, 72, 0.06);
}
.oauth-btn:active {
  transform: scale(0.99);
}
.oauth-btn.facebook {
  background: #1877F2;
  border-color: #1877F2;
  color: #fff;
}
.oauth-btn.facebook:hover {
  border-color: #166fe5;
  box-shadow: 0 2px 12px rgba(24, 119, 242, 0.28);
}
.oauth-btn.is-off {
  opacity: 0.72;
}
.oauth-ico {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}
.waitlist-promo {
  background: linear-gradient(135deg, rgba(11, 23, 72, 0.96), rgba(26, 47, 122, 0.92));
  color: #fff;
  border-radius: 20px;
  padding: 18px 18px 16px;
  box-shadow: 0 8px 28px rgba(11, 23, 72, 0.18);
}
.waitlist-promo strong {
  display: block;
  font-size: 1.05rem;
  line-height: 1.3;
  margin-bottom: 8px;
  color: #fff;
}
.waitlist-promo p {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.9);
}
.waitlist-promo .waitlist-slots {
  margin: 10px 0 0;
  font-weight: 700;
  color: #FF5D9E;
  font-size: 14px;
}
.waitlist-card textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  font: inherit;
  color: var(--navy);
  background: #fff;
  box-sizing: border-box;
}
.waitlist-card textarea:focus {
  outline: 2px solid rgba(255, 93, 158, 0.35);
  border-color: #FF5D9E;
}
.login-ok {
  color: #15803d;
  font-size: 14px;
  margin: 0 0 8px;
}
.oauth-hint {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.4;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.login-form {
  display: grid;
  gap: 12px;
}
.login-form label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
}
.login-form input,
.add-car-form input,
.add-car-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  font-size: 16px; /* avoids iOS zoom */
  background: #fafbff;
  color: var(--navy);
}
.add-car-form textarea {
  min-height: 88px;
  resize: vertical;
  line-height: 1.4;
}
.login-form input:focus,
.add-car-form input:focus,
.add-car-form textarea:focus {
  outline: 2px solid rgba(255, 93, 158, 0.35);
  border-color: #FF5D9E;
  background: #fff;
}
.login-err {
  margin: 0;
  color: #b42318;
  font-size: 13px;
  font-weight: 600;
}
.profile-quick {
  display: grid;
  gap: 8px;
}
.count-pill {
  min-width: 28px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef0f8;
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.account-hero {
  display: grid;
  gap: 0;
  padding: 14px 16px;
}
.account-hero-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.user-row {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
  flex: 1;
}
.user-meta {
  min-width: 0;
}
.user-meta strong {
  display: block;
  color: var(--navy);
  font-size: 1.1rem;
}
.avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
}
.avatar-ph {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #eef0f6;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--navy);
}
.account-menu-toggle {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #f7f8fc;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.account-menu-toggle:hover {
  border-color: #c7d2fe;
  background: #fff;
}
.account-chevron {
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--navy);
  border-bottom: 2px solid var(--navy);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.18s ease;
}
.account-menu-toggle.open .account-chevron {
  transform: rotate(225deg) translateY(-1px);
}
.account-menu {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 4px;
}
.account-menu[hidden] {
  display: none !important;
}
.account-menu-details {
  display: grid;
  gap: 8px;
  padding: 4px 4px 10px;
  margin-bottom: 4px;
}
.account-detail-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 12px;
  font-size: 13px;
}
.account-detail-row span {
  color: var(--muted);
}
.account-detail-row strong {
  color: var(--navy);
  font-weight: 650;
  word-break: break-all;
  text-align: right;
}
.account-menu-item {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 12px;
  padding: 12px 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
}
.account-menu-item:hover {
  background: #f4f6fb;
}
.account-menu-item.danger {
  color: #9b1c1c;
}
.account-menu-item.danger:hover {
  background: #fff5f5;
}
.danger-btn {
  border: 1px solid #f0d0d0;
  background: #fff;
  color: #9b1c1c;
  border-radius: 12px;
  padding: 10px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.danger-btn:hover {
  background: #fff5f5;
}
.profile-grid {
  display: grid;
  gap: 12px;
}
.profile-section h3 {
  margin: 0 0 8px;
  color: var(--navy);
  font-size: 1.05rem;
}
.profile-section h4.listings-title {
  margin: 18px 0 8px;
  color: var(--navy);
  font-size: 0.95rem;
}
.add-car-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 12px 0 4px;
  padding: 4px;
  background: #f1f3f9;
  border-radius: 14px;
}
.add-car-tabs .tab {
  border: 0;
  background: transparent;
  border-radius: 11px;
  padding: 10px 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}
.add-car-tabs .tab.on {
  background: #fff;
  color: var(--navy);
  box-shadow: 0 1px 3px rgba(11, 23, 72, 0.08);
}
.add-car-form {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}
.add-car-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.listings-stack {
  display: grid;
  gap: 0;
}
.listing-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 0;
  border-top: 1px solid var(--border);
}
.listing-row:first-child {
  border-top: 0;
  padding-top: 4px;
}
.stat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.stat-pills span {
  font-size: 12px;
  color: var(--muted);
  background: #f4f6fb;
  border-radius: 999px;
  padding: 4px 10px;
}
.stat-pills span.hot {
  background: rgba(255, 93, 158, 0.12);
  color: #c2185b;
}
.stat-pills b {
  color: var(--navy);
}
.plan-card .plan-perks {
  margin: 8px 0 14px;
  padding-left: 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}
.plan-card button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  width: 100%;
}
.plan-card.premium {
  background: linear-gradient(180deg, #fff 0%, #fff7fb 100%);
}
.plan-card.enterprise {
  background: linear-gradient(180deg, #fff 0%, #f5f7ff 100%);
}
.empty-listings {
  margin: 4px 0 0;
}

@media (max-width: 480px) {
  .add-car-form .form-row {
    grid-template-columns: 1fr;
  }
  .listing-row {
    flex-direction: column;
    align-items: stretch;
  }
  .listing-row .danger-btn {
    width: 100%;
  }
}

@media (min-width: 768px) {
  .profile-shell {
    gap: 16px;
    margin-top: 16px;
  }
  .auth-card {
    padding: 28px;
    max-width: 440px;
  }
  .profile-shell:not(.logged) {
    justify-items: start;
  }
  .account-hero {
    padding: 18px 22px;
  }
  .profile-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .profile-grid > .add-car-section {
    grid-column: 1 / -1;
  }
  .profile-section {
    padding: 20px 22px;
    margin: 0;
  }
  .plan-card button:disabled {
    width: auto;
  }
}

@media (min-width: 1024px) {
  .profile-shell {
    max-width: 1040px;
  }
  .profile-grid {
    grid-template-columns: 1.2fr 1fr;
  }
  .profile-grid > .add-car-section {
    grid-column: 1;
    grid-row: 1 / span 3;
  }
  .profile-grid > .profile-section:first-child {
    grid-column: 2;
    grid-row: 1;
  }
  .profile-grid > .plan-card.premium {
    grid-column: 2;
    grid-row: 2;
  }
  .profile-grid > .plan-card.enterprise {
    grid-column: 2;
    grid-row: 3;
  }
}
