:root {
  --primary: #1769ff;
  --primary-dark: #0d3f9a;
  --accent: #ff8a1f;
  --success: #11a36a;
  --danger: #d92d20;
  --text: #172033;
  --muted: #667085;
  --line: #e8eef7;
  --surface: #ffffff;
  --page: #f5f8fc;
  --native-safe-top: 0px;
  --native-safe-bottom: 0px;
  --app-safe-top: max(env(safe-area-inset-top), var(--native-safe-top));
  --app-safe-bottom: max(env(safe-area-inset-bottom), var(--native-safe-bottom));
  --app-top-buffer: 8px;
  --filter-dropdown-top: 126px;
  --filter-dropdown-max-height: 340px;
}

* { box-sizing: border-box; }
html { overflow-x: hidden; }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--page);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
button, input, select { font: inherit; }
button { border: 0; cursor: pointer; }
.app {
  min-height: 100vh;
  max-width: 520px;
  width: 100%;
  margin: 0 auto;
  background: var(--page);
  padding-bottom: calc(78px + env(safe-area-inset-bottom));
  overflow-x: hidden;
}
.screen { padding: 14px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 6px 0 14px; }
.top h1 { margin: 0; font-size: 24px; letter-spacing: 0; }
.link { color: var(--primary); font-size: 13px; font-weight: 800; }
.home-top {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px;
  margin: 4px 0 12px;
}
.home-top .search { margin: 0; min-width: 0; border-radius: 999px; background: #fff; padding: 10px 12px; }
.city-picker {
  display: inline-flex; align-items: center; gap: 4px; max-width: 76px;
  background: transparent; color: var(--text); font-size: 17px; font-weight: 900; white-space: nowrap;
}
.city-picker .svg-icon { width: 14px; height: 14px; flex: 0 0 auto; color: var(--muted); }
.city-picker .svg-icon svg { width: 14px; height: 14px; stroke-width: 2.4; }
.store-link {
  background: transparent; color: var(--primary); font-size: 13px; font-weight: 900; white-space: nowrap;
}
.search {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); margin-bottom: 12px;
}
.search input { border: 0; outline: 0; min-width: 0; flex: 1; background: transparent; }
.svg-icon { display: inline-grid; place-items: center; width: 24px; height: 24px; color: currentColor; }
.svg-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.link-btn,
.empty-order button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.link-btn .svg-icon,
.empty-order button .svg-icon {
  width: 16px;
  height: 16px;
}
.link-btn .svg-icon svg,
.empty-order button .svg-icon svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.2;
}
.hero {
  min-height: 166px; border-radius: 8px; color: #fff; padding: 18px;
  background:
    linear-gradient(105deg, rgba(23,105,255,.95), rgba(13,63,154,.82)),
    url("https://images.unsplash.com/photo-1552519507-da3b142c6e3d?auto=format&fit=crop&w=1200&q=80") center/cover;
}
.hero h2 { margin: 8px 0; font-size: 28px; letter-spacing: 0; }
.hero p { margin: 0 0 18px; color: rgba(255,255,255,.88); line-height: 1.5; }
.primary, .ghost, .plain {
  border-radius: 8px; padding: 11px 14px; font-weight: 900;
}
.primary { background: var(--primary); color: #fff; }
.hero .primary, .accent { background: var(--accent); color: #fff; }
.ghost { background: #eef5ff; color: var(--primary); }
.plain { background: #fff; color: var(--text); border: 1px solid var(--line); }
.grid { display: grid; gap: 10px; }
.quick { grid-template-columns: repeat(4, 1fr); margin: 12px 0; }
.quick button {
  min-height: 72px; border-radius: 8px; background: #fff; border: 1px solid var(--line);
  color: var(--text); font-size: 12px; display: grid; place-items: center; align-content: center; gap: 6px;
  box-shadow: 0 6px 18px rgba(23, 105, 255, .06);
}
.quick .svg-icon { width: 34px; height: 34px; border-radius: 8px; color: var(--primary); background: #eef5ff; }
.quick .svg-icon svg { width: 20px; height: 20px; }
.quick button span:last-child { font-weight: 800; }
.brand-panel { padding: 16px 12px 12px; box-shadow: 0 10px 28px rgba(15, 23, 42, .05); }
.brand-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 16px; column-gap: 8px; }
.brand-item {
  min-height: 74px; display: grid; place-items: center; align-content: center; gap: 7px;
  padding: 6px 4px; border-radius: 8px; background: transparent; color: var(--text);
}
.brand-item:active { background: #f5f8fc; }
.brand-logo { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; background: #f5f8fc; color: var(--primary); border: 1px solid #e5edf8; box-shadow: inset 0 0 0 4px #fff; }
.brand-logo img { width: 100%; height: 100%; object-fit: contain; padding: 6px; background: #fff; }
.brand-logo b { width: 100%; height: 100%; display: grid; place-items: center; font-size: 17px; }
.brand-item strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.active-brand { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 0 10px; padding: 9px 10px; border: 1px solid #dbeafe; border-radius: 8px; background: #eff6ff; color: var(--primary); font-weight: 900; }
.active-brand button { color: var(--primary); font-weight: 900; background: transparent; }
.ad-carousel { margin-top: 10px; }
.marketing-stack { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; }
.marketing-stack::-webkit-scrollbar { display: none; }
.promo-card {
  flex: 0 0 100%; min-height: 92px; position: relative; overflow: hidden; text-align: left; border-radius: 8px; padding: 15px 16px;
  color: #fff; display: grid; align-content: center; gap: 3px; scroll-snap-align: center;
}
.promo-card::after {
  content: ""; position: absolute; right: -24px; bottom: -36px; width: 150px; height: 150px; border-radius: 50%;
  background: rgba(255,255,255,.18);
}
.promo-card span { font-size: 12px; font-weight: 800; opacity: .92; }
.promo-card strong { font-size: 22px; letter-spacing: 0; }
.promo-card small { font-size: 13px; opacity: .9; }
.ad-dots { height: 14px; display: flex; align-items: center; justify-content: center; gap: 5px; }
.ad-dots span { width: 5px; height: 5px; border-radius: 999px; background: #cbd5e1; transition: width .2s, background .2s; }
.ad-dots span.active { width: 14px; background: var(--primary); }
.promo-blue { background: linear-gradient(120deg, #0f766e, #115e59); }
.promo-green { background: linear-gradient(120deg, #047857, #166534); }
.promo-orange { background: linear-gradient(120deg, #b45309, #78350f); }
.promo-red { background: linear-gradient(120deg, #b91c1c, #7f1d1d); }
.panel {
  margin-top: 12px; padding: 14px; border-radius: 8px; background: #fff; border: 1px solid var(--line);
}
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.panel h3 { margin: 0; font-size: 18px; }
.car { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.car:last-child { border-bottom: 0; }
.car img { width: 112px; height: 86px; object-fit: cover; border-radius: 8px; background: #dfe6f2; }
.car h4 { margin: 0 0 4px; font-size: 16px; }
.muted { color: var(--muted); font-size: 12px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.tag { padding: 4px 7px; border-radius: 999px; background: #eaf2ff; color: var(--primary-dark); font-size: 11px; font-weight: 800; }
.price-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; min-width: 0; }
.price { padding: 8px; border-radius: 8px; background: #f5f8fc; }
.price span, .field label { display: block; color: var(--muted); font-size: 11px; }
.price strong { display: block; margin-top: 2px; font-size: 14px; white-space: nowrap; }
.filters, .tabs, .segments { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.filters button, .tabs button, .segments button {
  flex: 0 0 auto; padding: 9px 12px; border-radius: 999px; color: var(--muted);
  background: #fff; border: 1px solid var(--line);
}
.filters button.active, .tabs button.active, .segments button.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.sort-bar {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 4px -2px 10px; padding: 6px 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.sort-bar button { min-height: 38px; background: transparent; color: var(--text); font-weight: 800; }
.sort-bar button::after { content: "⌄"; margin-left: 4px; color: var(--muted); font-size: 12px; }
.result-panel { padding-top: 6px; }
.result-count { color: var(--muted); font-size: 12px; margin: 0 0 6px; }
.list-car { grid-template-columns: 128px minmax(0, 1fr); gap: 14px; padding: 16px 0; }
.list-car img { width: 128px; height: 96px; background: #f6f7fb; }
.list-car h4 { font-size: 18px; line-height: 1.25; margin-bottom: 7px; }
.list-price { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; color: var(--danger); }
.list-price strong { font-size: 17px; }
.gallery { position: relative; width: 100%; aspect-ratio: 16 / 7; border-radius: 8px; overflow: hidden; background: #dfe6f2; }
.gallery-track { height: 100%; display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; }
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-slide { position: relative; flex: 0 0 100%; height: 100%; padding: 0; background: transparent; scroll-snap-align: center; }
.detail-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 0; background: #dfe6f2; display: block; }
.gallery-count { position: absolute; z-index: 2; right: 12px; bottom: 10px; padding: 4px 8px; border-radius: 999px; color: #fff; background: rgba(15, 23, 42, .68); font-size: 12px; font-weight: 800; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.metric { padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.metric span { display: block; color: var(--muted); font-size: 11px; }
.metric strong { display: block; margin-top: 3px; font-size: 14px; }
.form { display: grid; gap: 10px; }
.field { display: grid; gap: 7px; }
.field input, .field select {
  width: 100%; padding: 11px; border-radius: 8px; border: 1px solid var(--line); background: #fff; outline: 0;
}
.field input[type="range"] {
  width: calc(100% - 24px);
  margin: 6px 12px 2px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  accent-color: var(--primary);
}
.bill { display: grid; gap: 8px; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.bill-row { display: flex; justify-content: space-between; gap: 10px; }
.bill-row.total { border-top: 1px dashed var(--line); padding-top: 8px; font-weight: 900; }
.steps { display: grid; gap: 10px; }
.step { display: grid; grid-template-columns: 28px 1fr; gap: 10px; }
.dot { width: 26px; height: 26px; border-radius: 50%; color: #fff; background: var(--primary); display: grid; place-items: center; font-size: 12px; font-weight: 900; }
.step.pending .dot { background: #b8c2d4; }
.guarantee-panel { padding-bottom: 16px; }
.guarantee-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.guarantee-item {
  min-height: 74px; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 9px; align-items: start;
  padding: 11px; border: 1px solid var(--line); border-radius: 8px; background: #f8fbff;
}
.guarantee-icon { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--success); font-size: 13px; font-weight: 900; }
.guarantee-item strong { display: block; font-size: 14px; line-height: 1.25; }
.guarantee-item span { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.bottom {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%);
  width: min(520px, 100%); height: calc(68px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom); background: #fff; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(5, 1fr); z-index: 5;
}
.bottom.four { grid-template-columns: repeat(4, 1fr); }
.bottom button { background: transparent; color: var(--muted); font-size: 12px; display: grid; place-items: center; align-content: center; gap: 2px; }
.bottom .svg-icon { width: 24px; height: 24px; }
.bottom .svg-icon svg { width: 21px; height: 21px; }
.bottom button.active { color: var(--primary); font-weight: 900; }
.modal-mask { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 20px; background: rgba(8,16,32,.5); }
.modal { width: min(420px, 100%); border-radius: 8px; background: #fff; padding: 18px; }
.modal h2 { margin-top: 0; }
.booking-modal { max-height: calc(100vh - 40px); overflow-y: auto; }
.booking-modal .modal-head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.booking-modal textarea { width: 100%; min-height: 72px; resize: vertical; padding: 11px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.appointment-item { padding: 12px 0; border-bottom: 1px solid var(--line); }
.appointment-item:last-child { border-bottom: 0; }
.appointment-item > div { display: flex; justify-content: space-between; gap: 10px; }
.appointment-item span, .appointment-item p { color: var(--muted); font-size: 12px; }
.appointment-item p { margin: 7px 0 0; }
.appointment-meta { margin-top: 8px; }
.appointment-meta b { color: var(--primary); font-size: 12px; }
.city-mask { align-items: end; place-items: end center; padding: 0; }
.city-modal {
  width: min(520px, 100%); max-height: 86vh; overflow: hidden; position: relative;
  border-radius: 8px 8px 0 0; padding: 18px 34px calc(20px + env(safe-area-inset-bottom)) 16px;
  box-shadow: 0 -18px 48px rgba(15, 23, 42, .2);
}
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.modal-head h2 { margin: 0; font-size: 20px; }
.city-close { width: 34px; height: 34px; border-radius: 50%; background: #f2f4f7; color: var(--text); font-size: 22px; line-height: 1; }
.city-search { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 999px; background: #f8fafc; margin-bottom: 12px; }
.city-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; }
.current-city { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid #dbeafe; border-radius: 8px; background: #eff6ff; }
.current-city span { color: var(--muted); font-size: 13px; }
.current-city button { padding: 8px 12px; border-radius: 999px; background: var(--primary); color: #fff; font-weight: 900; display: inline-flex; align-items: center; justify-content: center; gap: 5px; white-space: nowrap; }
.city-title { margin: 16px 0 10px; font-size: 15px; }
.city-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.city-grid button { min-height: 42px; border-radius: 8px; background: #f8fafc; border: 1px solid var(--line); color: var(--text); font-weight: 800; }
.city-grid button.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.city-list { max-height: 40vh; overflow-y: auto; padding-right: 2px; margin-top: 14px; scroll-behavior: smooth; }
.city-group { border-top: 1px solid var(--line); padding: 8px 0; }
.city-group h4 { margin: 0 0 4px; color: var(--muted); font-size: 12px; }
.city-group button { width: 100%; min-height: 42px; text-align: left; padding: 0 8px; border-radius: 8px; background: transparent; color: var(--text); font-weight: 700; }
.city-group button.active { color: var(--primary); background: #eff6ff; }
.city-index { position: absolute; right: 8px; top: 126px; bottom: 20px; display: grid; align-content: center; gap: 2px; }
.city-index a { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; color: var(--primary); font-size: 10px; font-weight: 900; text-decoration: none; }
.city-index a:active { background: #eff6ff; }
.city-empty { padding: 18px 4px; }
.image-preview-mask { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 16px; background: rgba(8, 16, 32, .9); }
.preview-image { max-width: 100%; max-height: 86vh; object-fit: contain; border-radius: 8px; background: #111827; }
.preview-close { position: fixed; top: 18px; right: 18px; width: 38px; height: 38px; border-radius: 50%; color: #fff; background: rgba(255,255,255,.18); font-size: 26px; line-height: 1; }
.notice { padding: 12px; border-radius: 8px; background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa; line-height: 1.5; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.profile-top { height: 96px; margin: -14px -14px 0; padding: 18px; display: flex; justify-content: flex-end; background: linear-gradient(135deg, #7f8da6, #4f6384); }
.icon-link { width: 36px; height: 36px; border-radius: 50%; color: #fff; background: rgba(255,255,255,.15); display: grid; place-items: center; }
.profile-hero { margin-top: -30px; padding: 16px; border-radius: 8px; color: #fff; background: linear-gradient(120deg, #1769ff, #0d3f9a); display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 12px; width: 100%; text-align: left; }
.profile-hero .avatar { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.22); font-weight: 900; font-size: 20px; }
.profile-hero h3 { margin: 0 0 4px; }
.profile-hero span { font-size: 12px; opacity: .88; line-height: 1.4; }
.profile-hero button { padding: 7px 10px; border-radius: 999px; background: rgba(255,255,255,.18); color: #fff; font-weight: 800; }
.guest-hero { background: #fff; color: var(--text); box-shadow: 0 8px 24px rgba(15, 23, 42, .08); border: 1px solid var(--line); }
.guest-hero .avatar { color: var(--primary); background: #eef5ff; }
.guest-hero span { color: var(--muted); opacity: 1; }
.guest-hero strong { color: var(--muted); font-size: 24px; }
.inline-chevron,
.profile-list strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.inline-chevron .svg-icon,
.profile-list strong .svg-icon {
  width: 18px;
  height: 18px;
}
.inline-chevron .svg-icon svg,
.profile-list strong .svg-icon svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
}
.profile-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.profile-stats button { min-height: 74px; border-radius: 8px; background: #fff; border: 1px solid var(--line); color: var(--text); display: grid; place-items: center; align-content: center; gap: 4px; }
.profile-stats strong { font-size: 20px; color: var(--primary); }
.profile-stats span { color: var(--muted); font-size: 12px; }
.order-summary { margin-top: 12px; }
.empty-order { min-height: 108px; display: grid; place-items: center; align-content: center; gap: 12px; color: var(--muted); }
.empty-order p { margin: 0; }
.empty-order button { padding: 10px 28px; border-radius: 999px; background: #ffcf4a; color: #1f2937; font-weight: 900; }
.mini-order { display: grid; gap: 8px; padding-top: 6px; }
.mini-order span { color: var(--muted); font-size: 12px; }
.mini-order button { justify-self: start; padding: 8px 14px; border-radius: 999px; background: #eef5ff; color: var(--primary); font-weight: 900; }
.profile-list { padding: 0; overflow: hidden; }
.profile-list button { width: 100%; min-height: 56px; padding: 0 14px; display: flex; justify-content: space-between; align-items: center; background: #fff; border-bottom: 1px solid var(--line); color: var(--text); font-weight: 900; }
.profile-list button:last-child { border-bottom: 0; }
.profile-list strong { color: var(--muted); font-weight: 800; }
.service-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.service-grid button { min-height: 70px; border-radius: 8px; background: #f8fafc; color: var(--text); display: grid; place-items: center; align-content: center; gap: 6px; font-size: 12px; font-weight: 800; }
.service-grid .svg-icon { color: var(--primary); }
.store-list { display: grid; gap: 12px; }
.store-card { padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.store-card.compact { padding: 0; border: 0; }
.store-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.store-head strong { font-size: 16px; }
.store-head span { color: var(--primary); font-weight: 900; font-size: 12px; }
.store-card p { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.detail-store-panel .store-card { margin-top: 4px; }
.store-empty-line { padding: 12px; border-radius: 8px; background: #f8fafc; color: var(--muted); font-size: 13px; line-height: 1.5; }
.stores-screen { background: #f3f7fc; }
.store-page-head { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 10px; align-items: center; margin: -2px 0 14px; }
.store-page-head h1 { margin: 0 0 3px; font-size: 24px; letter-spacing: 0; }
.store-page-head > div:not(.store-head-actions) { min-width: 0; }
.store-page-head span { display: block; color: var(--muted); font-size: 12px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-page-head button { height: 40px; border-radius: 999px; font-weight: 900; border: 1px solid var(--line); }
.store-head-actions { display: flex; align-items: center; gap: 6px; }
.back-btn { width: 40px; background: #fff; color: var(--text); display: inline-grid; place-items: center; }
.back-btn .svg-icon { width: 22px; height: 22px; }
.back-btn .svg-icon svg { width: 21px; height: 21px; stroke-width: 2.2; }
.city-chip { padding: 0 12px; color: var(--primary) !important; background: #eef5ff; border-color: #dbeafe !important; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.city-chip .svg-icon { width: 14px; height: 14px; }
.city-chip .svg-icon svg { width: 14px; height: 14px; stroke-width: 2.4; }
.locate-btn {
  min-width: 64px;
  padding: 0 10px;
  color: #fff;
  background: linear-gradient(135deg, #0f766e, #115e59);
  border-color: #0f766e !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
}
.locate-btn .svg-icon,
.current-city button .svg-icon {
  width: 15px;
  height: 15px;
}
.locate-btn .svg-icon svg,
.current-city button .svg-icon svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.2;
}
.empty-store { min-height: 260px; margin-top: 10px; display: grid; place-items: center; align-content: center; gap: 12px; text-align: center; background: #fff; }
.empty-store-icon { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: #eef5ff; color: var(--primary); }
.empty-store .svg-icon { width: 28px; height: 28px; }
.empty-store h3 { margin: 0; font-size: 18px; }
.empty-store p { max-width: 330px; margin: 0; color: var(--muted); line-height: 1.6; }
.empty-store .primary { width: auto; padding: 11px 18px; border-radius: 999px; }
.auth-screen { background: #fff; min-height: 100vh; }
.auth-nav { height: 52px; display: flex; align-items: center; }
.auth-nav button { width: 40px; height: 40px; border-radius: 50%; color: var(--text); background: #fff; display: grid; place-items: center; }
.auth-nav button .svg-icon { width: 23px; height: 23px; }
.auth-nav button .svg-icon svg { width: 22px; height: 22px; stroke-width: 2.2; }
.auth-title { margin: 28px 0 34px; }
.auth-title h1 { margin: 0 0 10px; font-size: 28px; letter-spacing: 0; }
.auth-title p { margin: 0; color: var(--muted); font-size: 14px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 22px; }
.auth-tabs button { height: 42px; border-radius: 999px; background: #f3f6fb; color: var(--muted); font-weight: 900; }
.auth-tabs button.active { background: #1f6fff; color: #fff; }
.auth-form { display: grid; gap: 14px; }
.auth-form label:not(.agreement) { min-height: 56px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 12px; background: #fff; }
.auth-form input { min-width: 0; border: 0; outline: 0; font-size: 15px; background: transparent; }
.code-row-auth { grid-template-columns: 1fr 106px !important; border-radius: 8px !important; }
.code-row-auth button { height: 38px; border-radius: 999px; background: #eef5ff; color: var(--primary); font-weight: 900; }
.code-row-auth button:disabled {
  cursor: not-allowed;
  color: #64748b;
  background: #eef2f7;
  box-shadow: none;
}
.code-row-auth button.counting {
  font-size: 13px;
  white-space: nowrap;
}
.auth-primary { height: 56px; margin-top: 20px; border-radius: 999px; background: #ffcf4a; color: #111827; font-weight: 900; font-size: 18px; }
.auth-links { display: flex; justify-content: space-between; margin-top: 8px; }
.auth-links button { color: var(--text); background: transparent; font-weight: 900; }
.agreement { display: flex; align-items: flex-start; gap: 8px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.agreement input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--primary); }
.agreement button { padding: 0; color: var(--primary); background: transparent; font-weight: 900; }
.text-link {
  padding: 0;
  background: transparent;
  color: var(--primary);
  font-weight: 900;
  vertical-align: baseline;
}
.auth-note { color: var(--muted); font-size: 12px; text-align: center; }
@media (min-width: 700px) {
  body { background: #eaf0f8; }
  .app { box-shadow: 0 18px 60px rgba(24,32,51,.14); }
}

/* Professional theme polish */
:root {
  --primary: #0f766e;
  --primary-dark: #115e59;
  --accent: #d97706;
  --success: #16a34a;
  --danger: #dc2626;
  --text: #111827;
  --muted: #667085;
  --line: #dbe5ea;
  --surface: #ffffff;
  --page: #f4f8f8;
  --shadow-sm: 0 6px 18px rgba(15, 23, 42, .06);
  --shadow-md: 0 14px 34px rgba(15, 23, 42, .10);
}
body { background: linear-gradient(180deg, #edf6f4 0%, #f7fafb 42%, #eef4f5 100%); }
.app { background: var(--page); }
.screen { padding: 16px; }
.top h1,
.store-page-head h1,
.auth-title h1 { color: #0b1220; font-weight: 900; }
.home-top .search,
.search,
.auth-form label:not(.agreement),
.toolbar input,
.toolbar select {
  border-color: #d5e2e7;
  box-shadow: var(--shadow-sm);
}
.city-picker,
.store-link,
.link,
.link-btn,
.agreement a { color: var(--primary); }
.hero {
  min-height: 172px;
  border-radius: 8px;
  background:
    linear-gradient(108deg, rgba(15, 118, 110, .95), rgba(17, 94, 89, .78)),
    url("https://images.unsplash.com/photo-1552519507-da3b142c6e3d?auto=format&fit=crop&w=1200&q=80") center/cover;
  box-shadow: var(--shadow-md);
}
.primary,
.current-city button,
.city-grid button.active,
.filters button.active,
.tabs button.active,
.segments button.active {
  background: linear-gradient(135deg, #0f766e, #115e59);
  border-color: #0f766e;
  color: #fff;
  box-shadow: 0 8px 18px rgba(15, 118, 110, .18);
}
.hero .primary,
.accent,
.auth-primary,
.empty-order button {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #111827;
  box-shadow: 0 8px 18px rgba(217, 119, 6, .22);
}
.ghost,
.quick .svg-icon,
.guest-hero .avatar,
.empty-store-icon,
.city-chip,
.mini-order button {
  color: var(--primary);
  background: #e9f7f4;
  border-color: #b9e1d8;
}
.quick button,
.panel,
.metric,
.store-card,
.bill,
.profile-stats button,
.service-grid button {
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}
.quick button,
.brand-item,
.service-grid button,
.filters button,
.tabs button,
.segments button,
.city-grid button,
.store-card,
.panel,
.metric,
.price,
.bill,
.notice,
.modal,
.empty-store {
  border-radius: 8px;
}
.panel h3,
.store-head strong,
.car h4,
.list-car h4 { color: #111827; }
.tag {
  color: #115e59;
  background: #e6f5f1;
  border: 1px solid #c4e8df;
}
.price,
.store-empty-line,
.service-grid button,
.city-search {
  background: #f8fbfb;
}
.list-price,
.profile-stats strong { color: #b45309; }
.profile-top { background: linear-gradient(135deg, #1f2937, #0f766e); }
.profile-hero { background: linear-gradient(135deg, #0f766e, #115e59); box-shadow: var(--shadow-md); }
.guest-hero {
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}
.guest-hero .avatar {
  color: var(--primary);
  background: #e9f7f4;
}
.guest-hero h3 { color: #111827; }
.guest-hero span {
  color: var(--muted);
  opacity: 1;
}
.guest-hero strong { color: #8a98a8; }
.bottom {
  height: calc(72px + env(safe-area-inset-bottom));
  border-top-color: #d5e2e7;
  box-shadow: 0 -10px 30px rgba(15, 23, 42, .08);
}
.bottom button.active { color: var(--primary); }
.modal-mask { backdrop-filter: blur(6px); }
.modal { border: 1px solid var(--line); box-shadow: 0 22px 70px rgba(15, 23, 42, .24); }
.update-modal {
  display: grid;
  gap: 14px;
}
.update-modal .modal-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.update-notes {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 8px;
  background: #f8fbfb;
  border: 1px solid var(--line);
}
.update-notes p {
  margin: 0;
  color: var(--text);
  line-height: 1.5;
  font-size: 14px;
}
.car-title-row,
.detail-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.car-title-row h4,
.detail-title-row h3 {
  min-width: 0;
}
.compare-chip {
  flex: 0 0 auto;
  min-width: 46px;
  height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid #cfe2ee;
  background: #fff;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
}
.compare-chip.active {
  border-color: var(--primary);
  background: #e9f7f4;
}
.compare-float {
  position: fixed;
  left: 50%;
  bottom: calc(78px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 18;
  width: min(488px, calc(100% - 24px));
  min-height: 52px;
  padding: 8px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  border: 1px solid rgba(15, 118, 110, .2);
  border-radius: 8px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 14px 34px rgba(15, 23, 42, .16);
  backdrop-filter: blur(12px);
}
.compare-main {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  background: linear-gradient(135deg, #0f766e, #115e59);
  color: #fff;
  display: grid;
  align-content: center;
  gap: 1px;
}
.compare-main strong {
  font-size: 13px;
}
.compare-main span {
  font-size: 11px;
  opacity: .9;
}
.compare-mini-cars {
  min-width: 0;
  display: flex;
  gap: 6px;
  overflow: hidden;
}
.compare-mini-cars span {
  min-width: 0;
  max-width: 78px;
  padding: 5px 7px;
  border-radius: 999px;
  background: #f2f7fb;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.compare-clear {
  height: 34px;
  padding: 0 8px;
  border-radius: 999px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.compare-modal {
  width: min(500px, 100%);
  max-height: calc(100vh - 44px);
  overflow-y: auto;
}
.compare-modal .modal-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.compare-col {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.compare-col img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  background: #eef2f7;
}
.compare-col h3 {
  margin: 9px 0 4px;
  font-size: 15px;
  line-height: 1.25;
}
.compare-values {
  display: grid;
  gap: 7px;
  margin: 10px 0;
}
.compare-values div {
  display: grid;
  gap: 2px;
  padding: 8px;
  border-radius: 8px;
  background: #f8fbfb;
}
.compare-values span,
.compare-benefits strong {
  color: var(--muted);
  font-size: 11px;
}
.compare-values strong {
  font-size: 13px;
  color: var(--text);
  word-break: break-word;
}
.compare-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 56px;
  margin-bottom: 10px;
}
.compare-benefits strong {
  flex: 0 0 100%;
}
.compare-benefits span {
  padding: 4px 6px;
  border-radius: 999px;
  background: #e9f7f4;
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
}
.compare-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}
.compare-actions button {
  min-height: 42px;
  border-radius: 999px;
  font-weight: 900;
}
html.capacitor-android .compare-float {
  bottom: calc(78px + var(--app-safe-bottom));
}
.compare-screen {
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
}
.compare-control-panel .panel-head {
  align-items: flex-start;
}
.compare-control-panel .panel-head span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.finance-controls.compact {
  gap: 10px;
}
.finance-controls.compact .segments {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.compare-page-grid {
  display: grid;
  gap: 12px;
}
.compare-table-panel {
  padding: 0;
  overflow: hidden;
}
.compare-product-head {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.compare-product-cell {
  min-width: 0;
  padding: 10px;
  display: grid;
  gap: 6px;
  align-content: start;
}
.compare-product-cell + .compare-product-cell {
  border-left: 1px solid var(--line);
}
.compare-product-cell img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  background: #eef2f7;
}
.compare-product-cell h3 {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.compare-product-cell span {
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.compare-product-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.compare-product-actions button {
  min-height: 32px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}
.compare-table {
  display: grid;
}
.compare-table-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) minmax(0, 1fr);
  min-height: 48px;
  border-bottom: 1px solid var(--line);
}
.compare-table-row:last-child {
  border-bottom: 0;
}
.compare-row-label {
  padding: 10px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f7fafb;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  border-right: 1px solid var(--line);
}
.compare-row-value {
  min-width: 0;
  padding: 10px 8px;
  display: flex;
  align-items: center;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  word-break: break-word;
}
.compare-row-value + .compare-row-value {
  border-left: 1px solid var(--line);
}
.compare-table-row.important .compare-row-value {
  color: #b45309;
  font-size: 15px;
  font-weight: 950;
}
.compare-page-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}
.compare-page-card > img {
  width: 100%;
  height: 154px;
  object-fit: cover;
  background: #eef2f7;
}
.compare-card-body {
  padding: 12px;
}
.compare-card-body h3 {
  margin: 0 0 4px;
  font-size: 18px;
  line-height: 1.25;
}
.compare-highlight {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}
.compare-highlight div {
  padding: 10px;
  border-radius: 8px;
  background: #f7fbfb;
  border: 1px solid #dcebea;
}
.compare-highlight span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.compare-highlight strong {
  display: block;
  margin-top: 4px;
  color: #b45309;
  font-size: 18px;
  word-break: break-word;
}
.compare-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}
.compare-card-actions button {
  min-height: 40px;
  border-radius: 999px;
  font-weight: 900;
}
.compare-picker-modal {
  width: min(500px, calc(100% - 20px));
  max-height: min(82vh, 680px);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto auto 1fr;
}
.compare-picker-modal .modal-head {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.compare-picker-modal .modal-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.compare-search {
  padding: 12px 0 8px;
}
.compare-search input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fbfb;
  font-size: 14px;
}
.compare-filter-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 10px;
}
.compare-filter-row button {
  flex: 0 0 auto;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-weight: 800;
}
.compare-filter-row button.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}
.compare-picker-list {
  min-height: 0;
  overflow-y: auto;
  display: grid;
  gap: 8px;
  padding-right: 2px;
  overscroll-behavior: contain;
}
.compare-picker-item {
  width: 100%;
  min-height: 92px;
  padding: 8px;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: left;
}
.compare-picker-item img {
  width: 96px;
  height: 76px;
  object-fit: cover;
  border-radius: 8px;
  background: #eef2f7;
}
.compare-picker-item span {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.compare-picker-item strong,
.compare-picker-item small,
.compare-picker-item em,
.compare-picker-item i {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.compare-picker-item strong {
  color: var(--text);
  font-size: 15px;
}
.compare-picker-item small {
  color: var(--muted);
  font-size: 12px;
}
.compare-picker-item em {
  color: #b45309;
  font-style: normal;
  font-size: 13px;
  font-weight: 900;
}
.compare-picker-item i {
  grid-column: 1 / -1;
  color: var(--primary);
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
}
.auth-screen {
  background:
    linear-gradient(180deg, rgba(15, 118, 110, .09), rgba(255,255,255,0) 210px),
    #fff;
}
.auth-tabs button.active { background: linear-gradient(135deg, #0f766e, #115e59); }
.agreement {
  padding: 12px;
  border-radius: 8px;
  background: #f8fbfb;
  border: 1px solid var(--line);
}

/* Filter modal QA fixes */
.filter-mask {
  align-items: center;
}
.filter-modal {
  width: min(420px, calc(100vw - 32px));
  max-height: min(78vh, 620px);
  overflow: hidden;
  padding: 16px;
}
.filter-modal .modal-head {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.filter-modal .modal-head h2 {
  color: var(--text);
  font-size: 19px;
  line-height: 1.25;
}
.filter-modal .city-close {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  background: #eef6f6;
  color: var(--primary);
  font-size: 21px;
}
.option-list {
  display: grid;
  gap: 10px;
  max-height: calc(78vh - 94px);
  overflow-y: auto;
  padding: 2px 2px 4px;
}
.option-list button {
  width: 100%;
  display: grid;
  gap: 4px;
  min-height: 62px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfb;
  color: var(--text);
  text-align: left;
}
.option-list button.active {
  border-color: rgba(15, 118, 110, .42);
  background: #e9f7f4;
  box-shadow: inset 3px 0 0 var(--primary);
}
.option-list strong,
.brand-filter-grid strong {
  min-width: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.28;
  overflow-wrap: anywhere;
}
.option-list span {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.brand-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-height: calc(78vh - 94px);
  overflow-y: auto;
  padding: 2px 2px 4px;
}
.brand-filter-grid button {
  min-width: 0;
  min-height: 92px;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 12px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfb;
}
.brand-filter-grid button.active {
  border-color: rgba(15, 118, 110, .44);
  background: #e9f7f4;
  box-shadow: 0 10px 24px rgba(15, 118, 110, .12);
}
.brand-filter-grid .brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}
.sort-bar button.active {
  color: var(--primary);
}
.sort-bar button.active::after {
  color: var(--primary);
}
.filter-dropdown-layer,
.brand-dropdown-layer {
  position: fixed;
  inset: 0;
  z-index: 18;
  padding-top: 176px;
  background: rgba(15, 23, 42, .18);
}
.filter-dropdown-panel,
.brand-dropdown-panel {
  width: min(520px, 100%);
  max-height: min(58vh, 430px);
  margin: 0 auto;
  overflow-y: auto;
  background: #fff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 18px 42px rgba(15, 23, 42, .14);
}
.option-dropdown-panel .option-list {
  gap: 0;
  max-height: none;
  overflow: visible;
  padding: 0 20px;
}
.option-dropdown-panel .option-list button {
  min-height: 72px;
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}
.option-dropdown-panel .option-list button.active {
  color: var(--primary);
  background: #fff;
  box-shadow: none;
}
.option-dropdown-panel .option-list button.active strong {
  color: var(--primary);
}
.option-dropdown-panel .option-list strong {
  font-size: 17px;
}
.option-dropdown-panel .option-list span {
  font-size: 12px;
}
.brand-all-row {
  width: 100%;
  min-height: 58px;
  display: grid;
  gap: 2px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  text-align: left;
}
.brand-all-row strong {
  font-size: 16px;
  line-height: 1.25;
}
.brand-all-row span {
  color: var(--muted);
  font-size: 12px;
}
.brand-all-row.active,
.brand-list-item.active {
  color: var(--primary);
  background: #eef5ff;
}
.brand-letter-list {
  display: grid;
}
.brand-letter-section h3 {
  position: sticky;
  top: 0;
  z-index: 1;
  margin: 0;
  padding: 8px 20px;
  background: #f5f8fc;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}
.brand-list-item {
  width: 100%;
  min-height: 52px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-size: 16px;
  font-weight: 850;
  line-height: 1.25;
  text-align: left;
}
.brand-list-item:last-child {
  border-bottom-color: transparent;
}

/* Dense mobile layout pass */
.list-screen {
  padding-top: 10px;
}
.list-screen .top {
  margin: 0 0 8px;
}
.list-screen .top h1 {
  font-size: 22px;
  line-height: 1.2;
}
.list-screen .link {
  font-size: 12px;
}
.list-screen .search {
  min-height: 40px;
  margin-bottom: 8px;
  padding: 8px 11px;
  border-radius: 8px;
}
.list-screen .search .svg-icon {
  width: 22px;
  height: 22px;
}
.list-screen .search input {
  font-size: 14px;
}
.list-screen .sort-bar {
  gap: 4px;
  margin: 0 -2px 6px;
  padding: 3px 0;
}
.list-screen .sort-bar button {
  min-height: 32px;
  font-size: 14px;
}
.list-screen .filters {
  gap: 6px;
  padding-bottom: 0;
}
.list-screen .filters button {
  padding: 7px 10px;
  font-size: 13px;
}
.list-screen .result-panel {
  margin-top: 8px;
  padding-top: 8px;
}
.list-screen .result-count {
  margin-bottom: 4px;
}
.list-screen .list-car {
  padding: 12px 0;
}
.list-screen .list-price {
  margin-top: 7px;
}
.filter-dropdown-layer,
.brand-dropdown-layer {
  padding-top: 154px;
}
.home-top {
  gap: 8px;
  margin: 0 0 8px;
}
.home-top .search {
  min-height: 44px;
  padding: 8px 11px;
}
.home-top .search input {
  font-size: 14px;
}
.city-picker {
  font-size: 16px;
}
.hero {
  min-height: 132px;
  padding: 14px;
}
.hero h2 {
  margin: 5px 0;
  font-size: 23px;
  line-height: 1.22;
}
.hero p {
  margin-bottom: 12px;
  font-size: 13px;
  line-height: 1.42;
}
.hero .primary {
  padding: 9px 12px;
}
.ad-carousel {
  margin-top: 8px;
}
.promo-card {
  min-height: 82px;
  padding: 12px 14px;
}
.promo-card strong {
  font-size: 19px;
}
.quick {
  gap: 8px;
  margin: 8px 0;
}
.quick button {
  min-height: 58px;
  gap: 4px;
}
.quick .svg-icon {
  width: 30px;
  height: 30px;
}
.panel {
  margin-top: 10px;
  padding: 12px;
}
.panel-head {
  margin-bottom: 8px;
}
.panel h3 {
  font-size: 17px;
}
.brand-panel {
  padding: 12px 10px 10px;
}
.brand-grid {
  row-gap: 10px;
}
.brand-item {
  min-height: 62px;
}
.brand-logo {
  width: 36px;
  height: 36px;
}

/* Mobile visual QA fixes */
.home-top {
  grid-template-columns: minmax(54px, auto) minmax(0, 1fr) auto;
}
.home-top .search {
  min-height: 56px;
}
.home-top .search input {
  font-size: 15px;
}
.hero h2,
.promo-card strong,
.car h4,
.list-car h4,
.panel h3,
.profile-list span {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.marketing-stack {
  width: 100%;
  contain: layout paint;
}
.promo-card {
  min-height: 104px;
  background: linear-gradient(120deg, #0f766e, #115e59);
  text-shadow: 0 1px 2px rgba(15, 23, 42, .24);
}
.promo-card span,
.promo-card small {
  color: rgba(255,255,255,.92);
}
.car {
  align-items: start;
}
.car > div,
.list-car > div {
  min-width: 0;
}
.car img {
  width: 112px;
  max-width: 100%;
}
.car h4,
.list-car h4 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.car .tags,
.list-car .tags {
  min-width: 0;
}
.car .price-row {
  gap: 6px;
}
.car .price {
  min-width: 0;
  padding: 7px 6px;
}
.car .price strong {
  font-size: 13px;
}
.list-price {
  gap: 8px 12px;
}
.list-price strong {
  min-width: 0;
  white-space: nowrap;
}
.filters,
.sort-bar {
  max-width: 100%;
}
.filters {
  scrollbar-width: none;
}
.filters::-webkit-scrollbar {
  display: none;
}
.sort-bar {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.sort-bar button {
  min-width: 0;
  padding: 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bottom button span {
  line-height: 1.2;
}

@media (max-width: 430px) {
  .screen { padding: 14px; }
  .hero {
    min-height: 156px;
    padding: 16px;
  }
  .hero h2 {
    font-size: 26px;
    line-height: 1.25;
  }
  .quick {
    gap: 8px;
  }
  .quick button {
    min-height: 68px;
    padding: 6px 4px;
  }
  .panel {
    padding: 12px;
  }
  .car {
    grid-template-columns: 116px minmax(0, 1fr);
    gap: 12px;
  }
  .car img,
  .list-car img {
    width: 116px;
    height: 88px;
  }
  .price-row {
    gap: 6px;
  }
  .price {
    padding: 7px 5px;
  }
  .price span {
    font-size: 10px;
  }
  .price strong {
    font-size: 12px;
  }
  .list-car {
    grid-template-columns: 116px minmax(0, 1fr);
    gap: 12px;
  }
  .list-car h4 {
    font-size: 17px;
  }
}

@media (max-width: 380px) {
  .home-top {
    grid-template-columns: 1fr auto;
  }
  .home-top .search {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .hero h2 {
    font-size: 24px;
  }
  .car {
    grid-template-columns: 1fr;
  }
  .car img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }
  .list-car {
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 10px;
  }
  .list-car img {
    width: 104px;
    height: 82px;
    aspect-ratio: auto;
  }
  .list-car h4 {
    font-size: 16px;
  }
  .list-price {
    gap: 6px 10px;
    margin-top: 8px;
  }
  .car .price-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .list-price strong {
    font-size: 15px;
  }
  .sort-bar {
    gap: 4px;
  }
  .sort-bar button {
    font-size: 13px;
  }
  .filter-modal {
    width: calc(100vw - 24px);
    padding: 14px;
  }
  .option-list {
    gap: 8px;
  }
  .option-list button {
    min-height: 58px;
    padding: 11px;
  }
  .brand-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .filter-dropdown-layer,
  .brand-dropdown-layer {
    padding-top: 188px;
  }
  .filter-dropdown-panel,
  .brand-dropdown-panel {
    max-height: min(60vh, 420px);
  }
  .option-dropdown-panel .option-list {
    padding-left: 16px;
    padding-right: 16px;
  }
  .brand-list-item,
  .brand-all-row {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* Final compact layout overrides */
.screen {
  padding: 12px;
}
.list-screen {
  padding-top: 9px;
}
.list-screen .top {
  margin: 0 0 7px;
}
.list-screen .top h1 {
  font-size: 21px;
  line-height: 1.18;
}
.list-screen .link {
  font-size: 12px;
}
.list-screen .search {
  min-height: 39px;
  margin-bottom: 7px;
  padding: 7px 10px;
}
.list-screen .sort-bar {
  gap: 3px;
  margin: 0 -2px 5px;
  padding: 2px 0;
}
.list-screen .sort-bar button {
  min-height: 31px;
  font-size: 14px;
}
.list-screen .filters {
  gap: 6px;
  padding-bottom: 0;
}
.list-screen .filters button {
  padding: 6px 10px;
  font-size: 13px;
}
.list-screen .result-panel {
  margin-top: 7px;
  padding-top: 7px;
}
.list-screen .list-car {
  padding: 11px 0;
}
.list-screen .list-car h4 {
  font-size: 16px;
}
.list-screen .list-price {
  margin-top: 6px;
}
.filter-dropdown-layer,
.brand-dropdown-layer {
  padding-top: 146px;
}
.home-top {
  gap: 8px;
  margin: 0 0 8px;
}
.home-top .search {
  min-height: 42px;
  padding: 8px 10px;
}
.hero {
  min-height: 128px;
  padding: 14px;
}
.hero h2 {
  margin: 5px 0;
  font-size: 23px;
  line-height: 1.2;
}
.hero p {
  margin-bottom: 10px;
  font-size: 13px;
  line-height: 1.4;
}
.hero .primary {
  padding: 8px 12px;
}
.promo-card {
  min-height: 80px;
  padding: 12px 14px;
}
.promo-card strong {
  font-size: 19px;
}
.quick {
  gap: 8px;
  margin: 8px 0;
}
.quick button {
  min-height: 58px;
  gap: 4px;
  padding: 5px 4px;
}
.quick .svg-icon {
  width: 30px;
  height: 30px;
}
.panel {
  margin-top: 10px;
  padding: 12px;
}
.panel-head {
  margin-bottom: 8px;
}
.brand-panel {
  padding: 12px 10px 10px;
}
.brand-grid {
  row-gap: 10px;
}
.brand-item {
  min-height: 62px;
}
.brand-logo {
  width: 36px;
  height: 36px;
}

@media (max-width: 430px) {
  .screen {
    padding: 12px;
  }
  .hero {
    min-height: 126px;
    padding: 13px;
  }
  .hero h2 {
    font-size: 22px;
  }
  .quick button {
    min-height: 56px;
  }
  .car {
    gap: 10px;
  }
  .list-car {
    grid-template-columns: 108px minmax(0, 1fr);
    gap: 10px;
  }
  .list-car img {
    width: 108px;
    height: 80px;
  }
  .filter-dropdown-layer,
  .brand-dropdown-layer {
    padding-top: 143px;
  }
}

@media (max-width: 380px) {
  .home-top .search {
    min-height: 40px;
  }
  .hero {
    min-height: 118px;
  }
  .hero h2 {
    font-size: 21px;
  }
  .list-car {
    grid-template-columns: 100px minmax(0, 1fr);
  }
  .list-car img {
    width: 100px;
    height: 76px;
  }
  .filter-dropdown-layer,
  .brand-dropdown-layer {
    padding-top: 140px;
  }
}

/* Single-line header polish */
.list-screen {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 8px;
}
.list-screen .top {
  display: contents;
}
.list-screen .top h1 {
  grid-column: 1;
  margin: 0;
  font-size: 18px;
  line-height: 1.15;
  white-space: nowrap;
}
.list-screen .top .link {
  grid-column: 3;
  white-space: nowrap;
  font-size: 11px;
}
.list-screen > .search {
  grid-column: 2;
  margin: 0;
  min-height: 34px;
  padding: 6px 9px;
}
.list-screen > .search .svg-icon {
  width: 20px;
  height: 20px;
}
.list-screen > .search input {
  font-size: 13px;
}
.list-screen > .active-brand,
.list-screen > .sort-bar,
.list-screen > .filters,
.list-screen > .result-panel {
  grid-column: 1 / -1;
}
.list-screen .sort-bar {
  margin-top: 8px;
}
.filter-dropdown-layer,
.brand-dropdown-layer {
  padding-top: 116px;
}
.home-top {
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 7px;
}
.home-top .city-picker {
  max-width: 62px;
  font-size: 14px;
}
.home-top .store-link {
  font-size: 12px;
}
.home-top .search {
  min-height: 36px;
  padding: 6px 9px;
}
.home-top .search .svg-icon {
  width: 20px;
  height: 20px;
}
.home-top .search input {
  font-size: 13px;
}

@media (max-width: 430px) {
  .list-screen {
    grid-template-columns: auto minmax(0, 1fr) auto;
    column-gap: 7px;
  }
  .list-screen .top h1 {
    font-size: 17px;
  }
  .list-screen > .search {
    min-height: 33px;
    padding: 6px 8px;
  }
  .filter-dropdown-layer,
  .brand-dropdown-layer {
    padding-top: 112px;
  }
}

@media (max-width: 380px) {
  .home-top {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  .home-top .search {
    grid-column: auto;
    grid-row: auto;
  }
  .list-screen {
    column-gap: 6px;
  }
  .list-screen .top h1 {
    font-size: 16px;
  }
  .list-screen .top .link {
    font-size: 10px;
  }
  .list-screen > .search input {
    font-size: 12px;
  }
  .filter-dropdown-layer,
  .brand-dropdown-layer {
    padding-top: 108px;
  }
}

/* Refined vehicle toolbar */
.list-screen {
  grid-template-columns: minmax(72px, auto) minmax(0, 1fr);
  column-gap: 10px;
  row-gap: 0;
}
.list-screen .top h1 {
  align-self: end;
  font-size: 17px;
}
.list-screen .top .link {
  grid-column: 1;
  align-self: start;
  margin-top: 2px;
  font-size: 10px;
  color: var(--muted);
}
.list-screen > .search {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  min-height: 36px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(23, 105, 255, .06);
}
.list-screen .sort-bar {
  margin-top: 9px;
}
.filter-dropdown-layer,
.brand-dropdown-layer {
  padding-top: 112px;
}

@media (max-width: 430px) {
  .list-screen {
    grid-template-columns: minmax(66px, auto) minmax(0, 1fr);
    column-gap: 8px;
  }
  .list-screen .top h1 {
    font-size: 16px;
  }
  .list-screen > .search {
    min-height: 34px;
  }
}

@media (max-width: 380px) {
  .list-screen {
    grid-template-columns: minmax(62px, auto) minmax(0, 1fr);
    column-gap: 7px;
  }
  .list-screen .top h1 {
    font-size: 15px;
  }
  .list-screen .top .link {
    font-size: 9px;
  }
  .list-screen > .search {
    min-height: 32px;
    padding: 5px 8px;
  }
}

/* Search-first vehicle toolbar */
.list-screen {
  grid-template-columns: minmax(0, 1fr) auto;
}
.list-screen .top h1 {
  display: none;
}
.list-screen .top .link {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  margin-top: 0;
  font-size: 11px;
  color: var(--primary);
  font-weight: 900;
}
.list-screen > .search {
  grid-column: 1;
  grid-row: 1;
}
.filter-dropdown-layer,
.brand-dropdown-layer {
  padding-top: 98px;
}

@media (max-width: 430px) {
  .list-screen {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .filter-dropdown-layer,
  .brand-dropdown-layer {
    padding-top: 96px;
  }
}

@media (max-width: 380px) {
  .list-screen {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .filter-dropdown-layer,
  .brand-dropdown-layer {
    padding-top: 94px;
  }
}

/* Formal filter dropdowns */
.filter-dropdown-layer,
.brand-dropdown-layer {
  padding-top: 96px;
  background: rgba(15, 23, 42, .24);
}
.filter-dropdown-panel,
.brand-dropdown-panel {
  width: min(508px, calc(100% - 24px));
  max-height: min(46vh, 360px);
  border: 1px solid #d9e3ef;
  border-radius: 0 0 10px 10px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .18);
}
.option-dropdown-panel .option-list {
  max-height: min(46vh, 360px);
  overflow-y: auto;
  padding: 6px 10px;
  background: #fff;
}
.option-dropdown-panel .option-list button {
  position: relative;
  min-height: 48px;
  padding: 8px 34px 8px 12px;
  border: 0;
  border-bottom: 1px solid #eef2f7;
  border-radius: 8px;
  background: #fff;
}
.option-dropdown-panel .option-list button:last-child {
  border-bottom: 0;
}
.option-dropdown-panel .option-list button.active {
  background: #f4f9ff;
  box-shadow: inset 3px 0 0 var(--primary);
}
.option-dropdown-panel .option-list button.active::after {
  content: "✓";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary);
  font-size: 15px;
  font-weight: 900;
}
.option-dropdown-panel .option-list strong {
  color: var(--text);
  font-size: 15px;
  line-height: 1.25;
}
.option-dropdown-panel .option-list span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}
.brand-dropdown-panel {
  overflow: hidden;
}
.brand-all-row {
  min-height: 48px;
  padding: 8px 16px;
  border-bottom: 1px solid #eef2f7;
}
.brand-all-row.active,
.brand-list-item.active {
  background: #f4f9ff;
  color: var(--primary);
}
.brand-letter-section h3 {
  padding: 7px 16px;
  background: #f8fafc;
  color: #7a8798;
  font-size: 11px;
}
.brand-list-item {
  min-height: 44px;
  padding: 0 16px;
  border-bottom: 1px solid #eef2f7;
  font-size: 14px;
  font-weight: 800;
}

@media (max-width: 430px) {
  .filter-dropdown-layer,
  .brand-dropdown-layer {
    padding-top: 94px;
  }
  .filter-dropdown-panel,
  .brand-dropdown-panel {
    width: calc(100% - 20px);
    max-height: min(48vh, 360px);
  }
}

@media (max-width: 380px) {
  .filter-dropdown-layer,
  .brand-dropdown-layer {
    padding-top: 92px;
  }
  .option-dropdown-panel .option-list button {
    min-height: 46px;
  }
}

/* Premium filter controls */
.list-screen .sort-bar {
  gap: 6px;
  padding: 7px 0;
  border-top-color: #e6edf5;
  border-bottom-color: #e6edf5;
}
.list-screen .sort-bar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 30px;
  padding: 0 8px;
  border-radius: 7px;
  background: transparent;
  color: #23324a;
  font-size: 13px;
  font-weight: 850;
}
.list-screen .sort-bar button.active {
  background: #eef5ff;
  color: var(--primary);
}
.list-screen .sort-bar button::after {
  content: "";
  width: 0;
  height: 0;
  margin-left: 1px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #8a98aa;
}
.list-screen .sort-bar button.active::after {
  border-top-color: var(--primary);
}
.filter-dropdown-layer,
.brand-dropdown-layer {
  padding-top: 100px;
  background: rgba(15, 23, 42, .18);
}
.filter-dropdown-panel,
.brand-dropdown-panel {
  width: min(500px, calc(100% - 28px));
  max-height: min(42vh, 330px);
  overflow: hidden;
  border: 1px solid rgba(216, 226, 239, .96);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(16, 24, 40, .18);
}
.option-dropdown-panel .option-list {
  max-height: min(42vh, 330px);
  overflow-y: auto;
  gap: 0;
  padding: 6px;
  background: #fff;
  scrollbar-width: thin;
  scrollbar-color: #c9d5e4 transparent;
}
.option-dropdown-panel .option-list::-webkit-scrollbar,
.brand-dropdown-panel::-webkit-scrollbar {
  width: 4px;
}
.option-dropdown-panel .option-list::-webkit-scrollbar-thumb,
.brand-dropdown-panel::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #c9d5e4;
}
.option-dropdown-panel .option-list button {
  min-height: 46px;
  padding: 8px 36px 8px 12px;
  border: 0;
  border-radius: 8px;
  background: #fff;
}
.option-dropdown-panel .option-list button + button {
  margin-top: 2px;
}
.option-dropdown-panel .option-list button:hover,
.option-dropdown-panel .option-list button:active {
  background: #f7faff;
}
.option-dropdown-panel .option-list button.active {
  background: linear-gradient(90deg, #f2f7ff, #fff);
  box-shadow: inset 3px 0 0 var(--primary);
}
.option-dropdown-panel .option-list button.active::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 6px;
  height: 11px;
  border-right: 2px solid var(--primary);
  border-bottom: 2px solid var(--primary);
  transform: translateY(-58%) rotate(45deg);
}
.option-dropdown-panel .option-list strong {
  color: #172033;
  font-size: 14px;
  font-weight: 900;
}
.option-dropdown-panel .option-list span {
  color: #687789;
  font-size: 11px;
}
.brand-dropdown-panel {
  max-height: min(42vh, 330px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #c9d5e4 transparent;
}
.brand-all-row,
.brand-list-item {
  border-bottom-color: #eef2f7;
}
.brand-all-row.active,
.brand-list-item.active {
  background: linear-gradient(90deg, #f2f7ff, #fff);
  box-shadow: inset 3px 0 0 var(--primary);
}

@media (max-width: 430px) {
  .filter-dropdown-layer,
  .brand-dropdown-layer {
    padding-top: 98px;
  }
  .filter-dropdown-panel,
  .brand-dropdown-panel {
    width: calc(100% - 24px);
    max-height: min(44vh, 330px);
  }
  .option-dropdown-panel .option-list,
  .brand-dropdown-panel {
    max-height: min(44vh, 330px);
  }
}

@media (max-width: 380px) {
  .list-screen .sort-bar {
    gap: 4px;
  }
  .list-screen .sort-bar button {
    padding: 0 5px;
    font-size: 12px;
  }
  .filter-dropdown-layer,
  .brand-dropdown-layer {
    padding-top: 96px;
  }
}

/* Sticky filter toolbar and scroll lock */
body.filter-lock {
  overflow: hidden;
  overscroll-behavior: none;
}
.app.filter-open {
  max-height: 100vh;
  overflow: hidden;
}
.list-screen {
  display: block;
  padding-top: 0;
}
.car-toolbar {
  position: sticky;
  top: 0;
  z-index: 12;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px 8px;
  margin: 0 -12px;
  padding: 8px 12px 8px;
  background: rgba(245, 248, 252, .96);
  border-bottom: 1px solid #dbe5ef;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
  backdrop-filter: blur(10px);
}
.car-toolbar .top {
  display: contents;
}
.car-toolbar .top h1 {
  display: none;
}
.car-toolbar .top .link {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  white-space: nowrap;
  margin: 0;
  color: var(--primary);
  font-size: 11px;
  font-weight: 900;
}
.car-toolbar > .search {
  grid-column: 1;
  grid-row: 1;
  min-height: 34px;
  margin: 0;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff;
}
.car-toolbar > .active-brand,
.car-toolbar > .sort-bar,
.car-toolbar > .filters {
  grid-column: 1 / -1;
}
.car-toolbar > .sort-bar {
  margin: 0;
}
.car-toolbar > .filters {
  padding-bottom: 0;
}
.list-screen > .result-panel {
  margin-top: 10px;
}
.filter-dropdown-layer,
.brand-dropdown-layer {
  z-index: 11;
  padding-top: 118px;
  touch-action: none;
  overscroll-behavior: contain;
}
.filter-dropdown-panel,
.brand-dropdown-panel,
.option-dropdown-panel .option-list {
  touch-action: pan-y;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 430px) {
  .car-toolbar {
    margin: 0 -12px;
    padding: 8px 12px;
  }
  .filter-dropdown-layer,
  .brand-dropdown-layer {
    padding-top: 116px;
  }
}

@media (max-width: 380px) {
  .car-toolbar {
    gap: 6px;
  }
  .car-toolbar .top .link {
    font-size: 10px;
  }
  .car-toolbar > .search {
    min-height: 32px;
    padding: 5px 9px;
  }
  .filter-dropdown-layer,
  .brand-dropdown-layer {
    padding-top: 112px;
  }
}

/* Final alignment for sticky filter dropdowns */
.car-toolbar {
  z-index: 40;
}
.filter-dropdown-layer,
.brand-dropdown-layer {
  z-index: 35;
  padding-top: 146px !important;
  background: linear-gradient(
    180deg,
    rgba(245, 248, 252, 0) 0,
    rgba(245, 248, 252, 0) 132px,
    rgba(15, 23, 42, .18) 132px,
    rgba(15, 23, 42, .18) 100%
  ) !important;
}
.filter-dropdown-panel,
.brand-dropdown-panel {
  width: min(496px, calc(100% - 24px)) !important;
  max-height: min(42vh, 330px) !important;
  margin: 0 auto !important;
  border-radius: 10px !important;
  background: #fff !important;
  overflow: hidden !important;
}
.option-dropdown-panel .option-list {
  max-height: min(42vh, 330px) !important;
  background: #fff !important;
}
.brand-dropdown-panel {
  overflow-y: auto !important;
}

@media (max-width: 430px) {
  .filter-dropdown-layer,
  .brand-dropdown-layer {
    padding-top: 144px !important;
    background: linear-gradient(
      180deg,
      rgba(245, 248, 252, 0) 0,
      rgba(245, 248, 252, 0) 130px,
      rgba(15, 23, 42, .18) 130px,
      rgba(15, 23, 42, .18) 100%
    ) !important;
  }
}

@media (max-width: 380px) {
  .filter-dropdown-layer,
  .brand-dropdown-layer {
    padding-top: 140px !important;
    background: linear-gradient(
      180deg,
      rgba(245, 248, 252, 0) 0,
      rgba(245, 248, 252, 0) 126px,
      rgba(15, 23, 42, .18) 126px,
      rgba(15, 23, 42, .18) 100%
    ) !important;
  }
}

/* Compact active filters under category chips */
.car-toolbar > .active-brand {
  grid-column: 1 / -1;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 6px;
  margin: -2px 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  font-size: 11px;
  font-weight: 700;
}
.car-toolbar > .active-brand span {
  max-width: 180px;
  padding: 3px 7px;
  border: 1px solid #d8e7f4;
  border-radius: 999px;
  background: #f7fbff;
  color: #50627a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.car-toolbar > .active-brand button {
  min-height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  background: #f8fafc;
  color: #667085;
  font-size: 11px;
  font-weight: 800;
}
.car-toolbar > .active-brand button:last-child {
  margin-left: auto;
  background: transparent;
  color: var(--primary);
}
.app:has(.car-toolbar > .active-brand) .filter-dropdown-layer,
.app:has(.car-toolbar > .active-brand) .brand-dropdown-layer {
  padding-top: 168px !important;
}
.app.has-active-filters .filter-dropdown-layer,
.app.has-active-filters .brand-dropdown-layer {
  padding-top: 168px !important;
}

@media (max-width: 430px) {
  .app:has(.car-toolbar > .active-brand) .filter-dropdown-layer,
  .app:has(.car-toolbar > .active-brand) .brand-dropdown-layer {
    padding-top: 164px !important;
  }
  .app.has-active-filters .filter-dropdown-layer,
  .app.has-active-filters .brand-dropdown-layer {
    padding-top: 164px !important;
  }
}

@media (max-width: 380px) {
  .app:has(.car-toolbar > .active-brand) .filter-dropdown-layer,
  .app:has(.car-toolbar > .active-brand) .brand-dropdown-layer {
    padding-top: 160px !important;
  }
  .app.has-active-filters .filter-dropdown-layer,
  .app.has-active-filters .brand-dropdown-layer {
    padding-top: 160px !important;
  }
}

/* Android edge-to-edge safe-area compatibility */
html.capacitor-android,
html.capacitor-android body {
  width: 100%;
  min-height: 100%;
  background: var(--page);
}

html.capacitor-android .app {
  min-height: 100dvh;
  padding-top: calc(var(--app-safe-top) + var(--app-top-buffer));
  padding-bottom: calc(78px + var(--app-safe-bottom)) !important;
}

html.capacitor-android .screen {
  min-height: calc(100dvh - var(--app-safe-top) - var(--app-top-buffer) - var(--app-safe-bottom) - 78px);
}

html.capacitor-android .bottom {
  height: calc(72px + var(--app-safe-bottom)) !important;
  padding-bottom: var(--app-safe-bottom) !important;
}

html.capacitor-android .car-toolbar {
  top: calc(var(--app-safe-top) + var(--app-top-buffer));
}

html.capacitor-android .filter-dropdown-layer {
  padding-top: calc(118px + var(--app-safe-top) + var(--app-top-buffer)) !important;
}

html.capacitor-android .brand-dropdown-layer {
  padding-top: calc(146px + var(--app-safe-top) + var(--app-top-buffer)) !important;
}

html.capacitor-android .app.has-active-filters .filter-dropdown-layer,
html.capacitor-android .app.has-active-filters .brand-dropdown-layer {
  padding-top: calc(168px + var(--app-safe-top) + var(--app-top-buffer)) !important;
}

@media (max-width: 430px) {
  html.capacitor-android .filter-dropdown-layer {
    padding-top: calc(116px + var(--app-safe-top) + var(--app-top-buffer)) !important;
  }
  html.capacitor-android .brand-dropdown-layer {
    padding-top: calc(144px + var(--app-safe-top) + var(--app-top-buffer)) !important;
  }
  html.capacitor-android .app.has-active-filters .filter-dropdown-layer,
  html.capacitor-android .app.has-active-filters .brand-dropdown-layer {
    padding-top: calc(164px + var(--app-safe-top) + var(--app-top-buffer)) !important;
  }
}

/* Android full-screen refinement: keep the top compact and prevent sticky-toolbar overlap. */
html.capacitor-android .app {
  padding-top: calc(var(--app-safe-top) + 8px) !important;
}

html.capacitor-android .screen {
  min-height: calc(100dvh - var(--app-safe-top) - 8px - var(--app-safe-bottom) - 78px);
}

html.capacitor-android .car-toolbar {
  top: 0 !important;
  margin-top: 0;
}

html.capacitor-android .list-screen > .result-panel {
  position: relative;
  z-index: 1;
  margin-top: 14px;
}

html.capacitor-android .filter-dropdown-layer {
  padding-top: var(--filter-dropdown-top) !important;
}

html.capacitor-android .brand-dropdown-layer {
  padding-top: var(--filter-dropdown-top) !important;
}

html.capacitor-android .app.has-active-filters .filter-dropdown-layer,
html.capacitor-android .app.has-active-filters .brand-dropdown-layer {
  padding-top: 174px !important;
}

@media (max-width: 430px) {
  html.capacitor-android .app {
    padding-top: calc(var(--app-safe-top) + 6px) !important;
  }
  html.capacitor-android .screen {
    min-height: calc(100dvh - var(--app-safe-top) - 6px - var(--app-safe-bottom) - 78px);
  }
  html.capacitor-android .filter-dropdown-layer {
    padding-top: 122px !important;
  }
  html.capacitor-android .brand-dropdown-layer {
    padding-top: 148px !important;
  }
  html.capacitor-android .app.has-active-filters .filter-dropdown-layer,
  html.capacitor-android .app.has-active-filters .brand-dropdown-layer {
    padding-top: 170px !important;
  }
}

@media (max-width: 380px) {
  html.capacitor-android .app {
    padding-top: calc(var(--app-safe-top) + 4px) !important;
  }
  html.capacitor-android .screen {
    min-height: calc(100dvh - var(--app-safe-top) - 4px - var(--app-safe-bottom) - 78px);
  }
  html.capacitor-android .filter-dropdown-layer {
    padding-top: 118px !important;
  }
  html.capacitor-android .brand-dropdown-layer {
    padding-top: 144px !important;
  }
  html.capacitor-android .app.has-active-filters .filter-dropdown-layer,
  html.capacitor-android .app.has-active-filters .brand-dropdown-layer {
    padding-top: 166px !important;
  }
}

@media (max-width: 380px) {
  html.capacitor-android .filter-dropdown-layer {
    padding-top: calc(112px + var(--app-safe-top) + var(--app-top-buffer)) !important;
  }
  html.capacitor-android .brand-dropdown-layer {
    padding-top: calc(140px + var(--app-safe-top) + var(--app-top-buffer)) !important;
  }
  html.capacitor-android .app.has-active-filters .filter-dropdown-layer,
  html.capacitor-android .app.has-active-filters .brand-dropdown-layer {
    padding-top: calc(160px + var(--app-safe-top) + var(--app-top-buffer)) !important;
  }
}

/* Full-width dropdown final */
.filter-dropdown-panel,
.brand-dropdown-panel {
  width: min(520px, 100%) !important;
  max-height: calc(100vh - 150px - 78px) !important;
  margin: 0 auto !important;
  border-left: 0 !important;
  border-right: 0 !important;
  border-radius: 0 !important;
  box-shadow: 0 16px 32px rgba(15, 23, 42, .14) !important;
}
.option-dropdown-panel .option-list {
  max-height: calc(100vh - 150px - 78px) !important;
  padding: 6px 12px 10px !important;
}
.option-dropdown-panel .option-list button {
  min-height: 54px !important;
  padding: 9px 42px 9px 10px !important;
  border-radius: 0 !important;
  border-bottom: 1px solid #eef2f7 !important;
  background: #fff !important;
  box-shadow: none !important;
}
.option-dropdown-panel .option-list button.active {
  background: #eef7ff !important;
  box-shadow: none !important;
}
.option-dropdown-panel .option-list button.active::after {
  right: 16px !important;
}
.brand-dropdown-panel {
  max-height: calc(100vh - 150px - 78px) !important;
}
.brand-all-row.active,
.brand-list-item.active {
  background: #eef7ff !important;
  box-shadow: none !important;
}

@media (max-width: 430px) {
  .filter-dropdown-panel,
  .brand-dropdown-panel,
  .option-dropdown-panel .option-list {
    max-height: calc(100vh - 148px - 78px) !important;
  }
}

@media (max-width: 380px) {
  .filter-dropdown-panel,
  .brand-dropdown-panel,
  .option-dropdown-panel .option-list {
    max-height: calc(100vh - 144px - 78px) !important;
  }
}

/* Fixed-height dropdown lists and brand index */
.filter-dropdown-panel,
.brand-dropdown-panel {
  height: 320px !important;
  max-height: 320px !important;
}
.option-dropdown-panel .option-list {
  height: 320px !important;
  max-height: 320px !important;
  overflow-y: auto !important;
}
.brand-dropdown-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  overflow: hidden !important;
}
.brand-scroll {
  min-height: 0;
  height: 320px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: #c9d5e4 transparent;
}
.brand-scroll::-webkit-scrollbar {
  width: 4px;
}
.brand-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #c9d5e4;
}
.brand-index {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 1px;
  padding: 6px 3px;
  border-left: 1px solid #eef2f7;
  background: #fbfdff;
}
.brand-index button {
  width: 20px;
  height: 18px;
  border-radius: 999px;
  background: transparent;
  color: var(--primary);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}
.brand-index button:active {
  background: #eef7ff;
}

@media (max-width: 430px) {
  .filter-dropdown-panel,
  .brand-dropdown-panel,
  .option-dropdown-panel .option-list,
  .brand-scroll {
    height: 300px !important;
    max-height: 300px !important;
  }
}

@media (max-width: 380px) {
  .filter-dropdown-panel,
  .brand-dropdown-panel,
  .option-dropdown-panel .option-list,
  .brand-scroll {
    height: 280px !important;
    max-height: 280px !important;
  }
  .brand-dropdown-panel {
    grid-template-columns: minmax(0, 1fr) 26px;
  }
  .brand-index button {
    width: 18px;
    height: 17px;
    font-size: 9px;
  }
}

/* Final Android safe-area overrides. Kept last so older compact/dropdown rules cannot win. */
.app .filter-dropdown-layer,
.app .brand-dropdown-layer {
  padding-top: var(--filter-dropdown-top) !important;
}

.app .filter-dropdown-panel,
.app .brand-dropdown-panel,
.app .option-dropdown-panel .option-list,
.app .brand-scroll {
  max-height: min(var(--filter-dropdown-max-height), calc(100dvh - var(--filter-dropdown-top) - 78px)) !important;
}

html.capacitor-android .app {
  padding-top: calc(var(--app-safe-top) + 8px) !important;
}

html.capacitor-android .screen {
  min-height: calc(100dvh - var(--app-safe-top) - 8px - var(--app-safe-bottom) - 78px);
}

html.capacitor-android .car-toolbar {
  top: 0 !important;
}

html.capacitor-android .list-screen > .result-panel {
  position: relative;
  z-index: 1;
  margin-top: 14px;
}

html.capacitor-android .filter-dropdown-layer {
  padding-top: 126px !important;
}

html.capacitor-android .brand-dropdown-layer {
  padding-top: 152px !important;
}

html.capacitor-android .filter-dropdown-panel,
html.capacitor-android .brand-dropdown-panel,
html.capacitor-android .option-dropdown-panel .option-list,
html.capacitor-android .brand-scroll {
  max-height: min(var(--filter-dropdown-max-height), calc(100dvh - var(--filter-dropdown-top) - 78px)) !important;
}

html.capacitor-android .app.has-active-filters .filter-dropdown-layer,
html.capacitor-android .app.has-active-filters .brand-dropdown-layer {
  padding-top: var(--filter-dropdown-top) !important;
}

@media (max-width: 430px) {
  html.capacitor-android .app {
    padding-top: calc(var(--app-safe-top) + 6px) !important;
  }
  html.capacitor-android .screen {
    min-height: calc(100dvh - var(--app-safe-top) - 6px - var(--app-safe-bottom) - 78px);
  }
  html.capacitor-android .filter-dropdown-layer {
    padding-top: var(--filter-dropdown-top) !important;
  }
  html.capacitor-android .brand-dropdown-layer {
    padding-top: var(--filter-dropdown-top) !important;
  }
  html.capacitor-android .filter-dropdown-panel,
  html.capacitor-android .brand-dropdown-panel,
  html.capacitor-android .option-dropdown-panel .option-list,
  html.capacitor-android .brand-scroll {
    max-height: min(var(--filter-dropdown-max-height), calc(100dvh - var(--filter-dropdown-top) - 78px)) !important;
  }
  html.capacitor-android .app.has-active-filters .filter-dropdown-layer,
  html.capacitor-android .app.has-active-filters .brand-dropdown-layer {
    padding-top: var(--filter-dropdown-top) !important;
  }
}

@media (max-width: 380px) {
  html.capacitor-android .app {
    padding-top: calc(var(--app-safe-top) + 4px) !important;
  }
  html.capacitor-android .screen {
    min-height: calc(100dvh - var(--app-safe-top) - 4px - var(--app-safe-bottom) - 78px);
  }
  html.capacitor-android .filter-dropdown-layer {
    padding-top: var(--filter-dropdown-top) !important;
  }
  html.capacitor-android .brand-dropdown-layer {
    padding-top: var(--filter-dropdown-top) !important;
  }
  html.capacitor-android .filter-dropdown-panel,
  html.capacitor-android .brand-dropdown-panel,
  html.capacitor-android .option-dropdown-panel .option-list,
  html.capacitor-android .brand-scroll {
    max-height: min(var(--filter-dropdown-max-height), calc(100dvh - var(--filter-dropdown-top) - 78px)) !important;
  }
  html.capacitor-android .app.has-active-filters .filter-dropdown-layer,
  html.capacitor-android .app.has-active-filters .brand-dropdown-layer {
    padding-top: var(--filter-dropdown-top) !important;
  }
}
