/* Автоподбор PRO 2.0 — визуальная система нового интерфейса.
   Язык: графит и сталь, один тёплый акцент (латунь) и один холодный (бирюза) для «ниже рынка».
   Стекло — только там, где оно лежит поверх кадра и оправдано глубиной. */

@font-face {
  font-family: "InterVar";
  src: url("/fonts/InterVariable.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #08090b;
  --bg-2: #0b0d10;
  --panel: #101215;
  --panel-2: #15181d;
  --line: rgba(255, 255, 255, .085);
  --line-2: rgba(255, 255, 255, .16);
  --ink: #f3f5f8;
  --muted: #98a0ab;
  --dim: #6d747e;
  --brass: #f2b01e;
  --brass-dim: #8a6512;
  --teal: #21dcbd;
  --danger: #ff6a3d;
  --r-s: 10px;
  --r-m: 16px;
  --r-l: 24px;
  --ease: cubic-bezier(.2, .75, .2, 1);
  --pad: clamp(16px, 4vw, 56px);
  --shadow-1: 0 1px 0 rgba(255, 255, 255, .04), 0 18px 40px -24px rgba(0, 0, 0, .9);
  --shadow-2: 0 30px 80px -40px rgba(0, 0, 0, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "InterVar", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* тонкая фактура: без неё плоский графит выглядит дёшево */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(120% 60% at 12% -10%, rgba(242, 176, 30, .07), transparent 60%),
    radial-gradient(90% 50% at 100% 0%, rgba(33, 220, 189, .05), transparent 55%);
  opacity: 1;
}
/* фактура отдельным слоем и мягко: иначе серая крошка выбеливает графит */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: url("/grain.png");
  background-size: 180px 180px;
  opacity: .16;
  mix-blend-mode: soft-light;
}
main, .topbar, .foot { position: relative; z-index: 1; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.skip {
  position: absolute; left: -999px; top: 0; z-index: 99; padding: 10px 16px;
  background: var(--brass); color: #14100a; border-radius: 0 0 var(--r-s) 0;
}
.skip:focus { left: 0; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; border-radius: 6px; }

/* полоса прокрутки страницы */
.scrollbar { position: fixed; inset: 0 0 auto; height: 2px; background: rgba(255, 255, 255, .06); z-index: 50; }
.scrollbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brass-dim), var(--brass)); }

/* ---------- верхняя панель */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 18px;
  padding: 12px var(--pad);
  backdrop-filter: blur(10px) saturate(1.15);
  background: linear-gradient(180deg, rgba(8, 9, 11, .97), rgba(8, 9, 11, .88));
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 9px; font-weight: 800; font-size: 13px; letter-spacing: .04em;
  color: #17130a; background: linear-gradient(150deg, #ffd467, var(--brass) 55%, #a97a10);
  box-shadow: 0 6px 18px -8px rgba(242, 176, 30, .8);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.05; font-size: 13px; }
.brand-text b { letter-spacing: .01em; }
.brand-text i { font-style: normal; color: var(--brass); letter-spacing: .22em; font-size: 10px; }
.topstat { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.topstat b { color: var(--ink); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 0 rgba(33, 220, 189, .6); animation: pulse 2.6s var(--ease) infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(33, 220, 189, .5); } 70% { box-shadow: 0 0 0 12px rgba(33, 220, 189, 0); } 100% { box-shadow: 0 0 0 0 rgba(33, 220, 189, 0); } }
.topnav { margin-left: auto; display: flex; align-items: center; gap: 20px; font-size: 13.5px; color: var(--muted); }
.topnav a { position: relative; padding: 4px 0; transition: color .25s var(--ease); }
.topnav a:hover { color: var(--ink); }
.topnav a:not(.pill)::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 0;
  background: var(--brass); transition: width .3s var(--ease);
}
.topnav a:not(.pill):hover::after { width: 100%; }
.pill {
  padding: 7px 14px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--ink);
  transition: background .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}
.pill:hover { background: rgba(242, 176, 30, .12); border-color: var(--brass); transform: translateY(-1px); }

/* ---------- 1. мастхед */
.masthead {
  display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
  gap: clamp(20px, 3vw, 48px);
  padding: clamp(34px, 6vh, 72px) var(--pad) clamp(26px, 5vh, 56px);
  align-items: center;
}
.mast-copy { max-width: 640px; }
.eyebrow {
  margin: 0 0 16px; font-size: 12px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--brass); display: flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--brass-dim); }
.masthead h1 {
  margin: 0 0 18px; font-size: clamp(34px, 5.2vw, 62px); line-height: 1.03;
  font-weight: 800; letter-spacing: -.035em; text-wrap: balance;
}
.masthead h1 em { font-style: normal; color: var(--brass); position: relative; white-space: nowrap; }
.masthead h1 em::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .06em; height: .09em;
  background: linear-gradient(90deg, var(--brass), transparent); transform: scaleX(0); transform-origin: left;
  animation: underline 1s .5s var(--ease) forwards;
}
@keyframes underline { to { transform: scaleX(1); } }
.lead { margin: 0 0 26px; color: var(--muted); font-size: clamp(14.5px, 1.15vw, 17px); max-width: 58ch; }

.searchbar { position: relative; display: flex; gap: 10px; }
.field {
  flex: 1; display: flex; align-items: center; gap: 10px; min-height: 52px;
  padding: 0 14px; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-m); position: relative; overflow: hidden;
  transition: border-color .25s var(--ease), background .25s var(--ease), box-shadow .25s var(--ease);
}
.field:focus-within { border-color: var(--line-2); background: var(--panel-2); box-shadow: var(--shadow-1); }
/* подсветка под курсором: живой отклик поля на мышь */
.field::after {
  content: ""; position: absolute; inset: -1px; pointer-events: none; opacity: 0;
  background: radial-gradient(220px 120px at var(--mx, 50%) var(--my, 50%), rgba(242, 176, 30, .16), transparent 70%);
  transition: opacity .3s var(--ease);
}
.field:hover::after, .field:focus-within::after { opacity: 1; }
.field input {
  flex: 1; background: none; border: 0; outline: none; min-width: 0; font-size: 15.5px;
}
.field input::placeholder { color: var(--dim); }
.field.big { min-height: 58px; }
.field-ico {
  width: 17px; height: 17px; flex: 0 0 17px; border: 1.6px solid var(--dim); border-radius: 50%; position: relative;
}
.field-ico::after { content: ""; position: absolute; right: -6px; bottom: -3px; width: 8px; height: 1.6px; background: var(--dim); transform: rotate(45deg); }
.field:focus-within .field-ico { border-color: var(--brass); }
.field:focus-within .field-ico::after { background: var(--brass); }
/* поле поиска: свой крестик уже есть — нативный не показываем, иначе их два */
.field input[type="search"]::-webkit-search-cancel-button,
.field input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; appearance: none; display: none; }

.clear {
  border: 0; background: none; color: var(--dim); font-size: 20px; line-height: 1; cursor: pointer; padding: 4px 2px;
  opacity: 0; transition: opacity .2s var(--ease), color .2s var(--ease);
}
.field.has-value .clear { opacity: 1; }
.clear:hover { color: var(--ink); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 22px; border-radius: var(--r-m); border: 1px solid var(--line-2);
  background: var(--panel); cursor: pointer; font-weight: 600; font-size: 14.5px;
  transition: transform .2s var(--ease), background .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.99); }
.btn.primary {
  color: #17130a; border-color: transparent;
  background: linear-gradient(150deg, #ffd467, var(--brass) 60%, #cf8f10);
  box-shadow: 0 14px 30px -16px rgba(242, 176, 30, .9);
}
.btn.primary:hover { box-shadow: 0 20px 40px -18px rgba(242, 176, 30, 1); }
.btn.ghost { background: transparent; color: var(--muted); min-height: 46px; }
.btn.ghost:hover { color: var(--ink); border-color: var(--line-2); background: var(--panel); }
.btn.wide { width: 100%; }

/* подсказки поиска */
.sugg {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 20;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-m);
  box-shadow: var(--shadow-2); overflow: hidden;
}
.sugg button {
  display: flex; width: 100%; gap: 10px; align-items: baseline; padding: 10px 14px; border: 0; background: none;
  cursor: pointer; text-align: left; border-bottom: 1px solid var(--line);
}
.sugg button:last-child { border-bottom: 0; }
.sugg button:hover, .sugg button.on { background: var(--panel-2); }
.sugg .s-n { color: var(--dim); margin-left: auto; font-size: 12.5px; }
.sugg .s-k { color: var(--brass); font-size: 12px; }

.quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip {
  padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02);
  font-size: 13px; color: var(--muted); cursor: pointer;
  transition: color .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease), transform .2s var(--ease);
}
.chip:hover { color: var(--ink); border-color: var(--line-2); transform: translateY(-1px); }
.chip.on { color: #17130a; background: var(--brass); border-color: var(--brass); font-weight: 600; }
.chip .n { opacity: .6; margin-left: 6px; font-size: 11.5px; }

/* кадр справа — уходит за край экрана */
.mast-art { position: relative; min-height: clamp(300px, 42vw, 520px); border-radius: var(--r-l) 0 0 var(--r-l); overflow: hidden; }
/* плита под кадром: пока нет реального фото объявления — просто графит, без выдуманных машин */
.art-plate {
  position: absolute; inset: 0;
  background:
    radial-gradient(90% 70% at 20% 15%, rgba(242, 176, 30, .12), transparent 60%),
    radial-gradient(70% 60% at 85% 80%, rgba(33, 220, 189, .1), transparent 60%),
    linear-gradient(160deg, #14171c, #0a0c0e 70%);
}
.art-plate::after {
  content: ""; position: absolute; inset: 0; opacity: .35;
  background-image: repeating-linear-gradient(115deg, rgba(255, 255, 255, .045) 0 1px, transparent 1px 22px);
}
.art-plate::before {
  content: "АВТОПОДБОР\\A PRO";
  white-space: pre; position: absolute; right: clamp(12px, 3vw, 34px); bottom: clamp(96px, 14vh, 140px);
  font-size: clamp(38px, 7vw, 86px); font-weight: 800; letter-spacing: .02em; line-height: .92;
  color: rgba(255, 255, 255, .055); text-align: right;
}
.mast-art > img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  object-position: 50% 32%;
  /* кадр из объявления: мягкое размытие — видно настоящую машину, но не читаются номерные знаки */
  filter: blur(2.4px) saturate(.92) contrast(1.04) brightness(.58);
  animation: kb 22s var(--ease) infinite alternate;
}
@keyframes kb { from { transform: scale(1.05); } to { transform: scale(1.12); } }
.art-veil {
  position: absolute; inset: 0; border-radius: var(--r-l) 0 0 var(--r-l);
  background: linear-gradient(90deg, var(--bg) 2%, rgba(8, 9, 11, .55) 32%, transparent 62%),
              linear-gradient(0deg, rgba(8, 9, 11, .75), transparent 55%);
}
.art-cap[hidden] { display: none; }

.art-cap {
  position: absolute; left: 16px; top: 14px; z-index: 2;
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .5);
  background: rgba(8, 9, 11, .55); border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px;
  backdrop-filter: blur(6px);
}
.float-card {
  position: absolute; left: clamp(12px, 3vw, 28px); bottom: clamp(14px, 3vw, 30px); right: clamp(12px, 3vw, 28px);
  max-width: 330px; padding: 16px 18px; border-radius: var(--r-m);
  background: rgba(12, 14, 17, .58); border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(12px) saturate(1.25); box-shadow: var(--shadow-2); contain: paint;
}
.fc-label { margin: 0 0 6px; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--brass); }
.fc-price { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -.03em; }
.fc-title { margin: 4px 0 0; font-size: 13.5px; color: var(--muted); }
.fc-delta { margin: 8px 0 0; font-size: 13px; font-weight: 600; }
.fc-delta.down { color: var(--teal); }
.fc-delta.up { color: var(--danger); }
.skeleton-text { color: var(--dim); letter-spacing: .1em; }

/* ---------- 2. лента */
.ticker {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(242, 176, 30, .05), transparent 30%, transparent 70%, rgba(33, 220, 189, .05));
  overflow: hidden; padding: 12px 0; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.ticker-row { display: flex; gap: 26px; white-space: nowrap; width: max-content; animation: slide 60s linear infinite; font-size: 13.5px; }
.ticker:hover .ticker-row { animation-play-state: paused; }
@keyframes slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.tk { display: inline-flex; align-items: baseline; gap: 9px; color: var(--muted); }
.tk b { color: var(--ink); font-weight: 600; }
.tk .t-p { color: var(--brass); font-weight: 600; }
.tk .t-d { color: var(--teal); }

/* ---------- общее для секций */
section { padding: clamp(38px, 7vh, 84px) var(--pad); }
.sec-head { margin-bottom: clamp(18px, 3vh, 30px); }
.sec-head h2 {
  margin: 0 0 8px; font-size: clamp(24px, 3vw, 38px); font-weight: 750; letter-spacing: -.03em; line-height: 1.08;
  text-wrap: balance;
}
.hint { margin: 0; color: var(--dim); font-size: 13.5px; }

/* ---------- 3. поиск и выдача */
.explore { border-top: 1px solid var(--line); background: var(--bg); }
.explore-grid { display: grid; grid-template-columns: 268px minmax(0, 1fr); gap: clamp(16px, 2.4vw, 32px); align-items: start; }
.filters { position: sticky; top: 74px; display: grid; gap: 20px; }
.f-block { display: grid; gap: 9px; }
.f-title { margin: 0; font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }
.chips { display: flex; flex-wrap: wrap; gap: 7px; max-height: 168px; overflow-y: auto; padding-right: 4px; }
.chips::-webkit-scrollbar { width: 4px; }
.chips::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 4px; }
/* выбор марки и города списком с поиском внутри */
.pick { position: relative; }
.pick-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 44px;
  padding: 0 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-s);
  color: var(--ink); font: inherit; text-align: left; cursor: pointer;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.pick-btn:hover { border-color: var(--line-2); }
.pick-btn:focus-visible { outline: 2px solid var(--brass); outline-offset: 1px; }
.pick-btn svg { width: 16px; height: 16px; fill: none; stroke: var(--dim); stroke-width: 2; stroke-linecap: round; flex: none; transition: transform .2s var(--ease); }
.pick-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-btn span.on { color: var(--brass-ink, var(--brass)); font-weight: 600; }
.pick-btn.off { opacity: .55; cursor: default; }
.pick-btn.off span { color: var(--dim); }
.pick:not(.closed) .pick-btn svg { transform: rotate(180deg); }
.pick-pane {
  position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; right: 0;
  display: grid; gap: 8px; padding: 10px; background: var(--panel-2, var(--panel));
  border: 1px solid var(--line-2); border-radius: var(--r-s); box-shadow: 0 18px 40px rgba(0,0,0,.45);
}
.pick.closed .pick-pane { display: none; }
.pick-q {
  width: 100%; min-height: 40px; padding: 0 12px; background: var(--bg, #0f1115); border: 1px solid var(--line);
  border-radius: var(--r-s); color: var(--ink); font: inherit; outline: none;
}
.pick-q:focus { border-color: var(--brass); }
.pick-q::-webkit-search-cancel-button { filter: invert(.6); }
.pick-list { display: grid; gap: 2px; max-height: 288px; overflow-y: auto; overscroll-behavior: contain; }
.pick-list::-webkit-scrollbar { width: 5px; }
.pick-list::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 4px; }
.pick-i {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px; width: 100%;
  padding: 9px 10px; background: none; border: 0; border-radius: 7px; color: var(--ink); font: inherit;
  text-align: left; cursor: pointer;
}
.pick-i em { font-style: normal; font-size: 12px; color: var(--dim); flex: none; }
.pick-i:hover { background: var(--line); }
.pick-i.on { background: color-mix(in srgb, var(--brass) 16%, transparent); color: var(--brass-ink, var(--brass)); font-weight: 600; }
.pick-empty { margin: 4px 0 2px; font-size: 13px; color: var(--dim); }
.range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.range input {
  width: 100%; min-width: 0; min-height: 44px; padding: 0 12px; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-s); outline: none; transition: border-color .2s var(--ease);
}
.range input:focus { border-color: var(--brass); }
.range input::-webkit-outer-spin-button, .range input::-webkit-inner-spin-button { -webkit-appearance: none; }

.res-bar { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.res-total { margin: 0; font-size: 14px; color: var(--muted); }
.res-total b { color: var(--ink); font-size: 17px; }
.seg { margin-left: auto; display: flex; padding: 3px; gap: 3px; border: 1px solid var(--line); border-radius: 999px; }
.seg-b { border: 0; background: none; color: var(--dim); padding: 6px 13px; border-radius: 999px; cursor: pointer; font-size: 12.5px; transition: color .2s var(--ease), background .2s var(--ease); }
.seg-b.on { background: var(--panel-2); color: var(--ink); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); gap: 14px; }
.cards.rows { grid-template-columns: 1fr; }
.card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-m);
  transition: transform .26s var(--ease), opacity .26s var(--ease), border-color .2s var(--ease), box-shadow .26s var(--ease);
}
/* скрываем карточку только при живом скрипте: без него выдача обязана быть видна */
/* Карточка видна ВСЕГДА: появление — анимация, а не условие показа.
   Наблюдатель мог не сработать (переход, скрытая вкладка) — и выдача выглядела пустой. */
html.anim .card { animation: cardIn .42s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 40ms); }
@keyframes cardIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.card:hover { border-color: var(--line-2); box-shadow: var(--shadow-1); }
.card-img { position: relative; aspect-ratio: 4 / 3; background: var(--panel-2); overflow: hidden; }
.card-img img:not(.src-logo) { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease), filter .3s var(--ease); filter: saturate(.9); }
.card:hover .card-img img:not(.src-logo) { transform: scale(1.045); filter: saturate(1.05); }
/* у большинства объявлений фото нет — вместо пустоты собираем типографскую плиту */
.card-plate {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between;
  padding: 13px 14px; background:
    radial-gradient(120% 90% at 12% 0%, rgba(242, 176, 30, .13), transparent 58%),
    linear-gradient(155deg, #171a20, #0d0f12 72%);
}
.card-plate::after {
  content: ""; position: absolute; inset: 0; opacity: .4;
  background-image: repeating-linear-gradient(115deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 20px);
}
.plate-brand {
  position: relative; font-size: 20px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: rgba(255, 255, 255, .18); line-height: 1.05; word-break: break-word;
}
.plate-spec { position: relative; display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 12px; color: var(--muted); }
.plate-spec b { color: rgba(255, 255, 255, .72); font-weight: 600; }
.badge {
  position: absolute; left: 10px; top: 10px; padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 650;
  background: rgba(8, 9, 11, .9); border: 1px solid var(--line-2);
}
.badge.down { color: var(--teal); border-color: rgba(33, 220, 189, .45); }
.badge.up { color: var(--danger); border-color: rgba(255, 106, 61, .4); }
.badge.flat { color: var(--muted); }
.src { position: absolute; right: 10px; top: 10px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: rgba(8, 9, 11, .7); padding: 4px 8px; border-radius: 6px; }
.card-body { padding: 13px 14px 15px; display: grid; gap: 7px; }
.card-title { margin: 0; font-size: 15.5px; font-weight: 650; letter-spacing: -.01em; }
.card-meta { margin: 0; color: var(--muted); font-size: 12.8px; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.card-price { margin: 2px 0 0; font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.card-price s { color: var(--dim); font-weight: 500; font-size: 13px; margin-left: 8px; }
.card-foot { display: flex; align-items: center; gap: 10px; margin-top: 2px; }
.card-link { font-size: 12.8px; color: var(--brass); border-bottom: 1px solid transparent; transition: border-color .2s var(--ease); }
.card-link:hover { border-color: var(--brass); }
.cards.rows .card { flex-direction: row; }
.cards.rows .card-img { width: 210px; aspect-ratio: auto; flex: 0 0 210px; }
.cards.rows .card-body { align-content: center; }

/* скелеты и состояния */
.sk { background: linear-gradient(100deg, var(--panel) 20%, var(--panel-2) 40%, var(--panel) 60%); background-size: 220% 100%; animation: shimmer 1.4s linear infinite; border-radius: var(--r-m); height: 268px; }
@keyframes shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }
.state { grid-column: 1 / -1; padding: 40px 24px; text-align: center; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--r-m); }
.state b { color: var(--ink); display: block; margin-bottom: 6px; font-size: 16px; }
.more-wrap { margin-top: 16px; display: flex; justify-content: center; }

/* ---------- 4. цена модели */
.radar { border-top: 1px solid var(--line); background: linear-gradient(180deg, rgba(255, 255, 255, .014), transparent 40%); }
.radar-grid { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: clamp(18px, 3vw, 44px); align-items: start; }
.radar-pick { display: grid; gap: 16px; }
.stat-row { display: flex; flex-wrap: wrap; gap: 10px; }
.stat {
  flex: 1 1 120px; padding: 13px 14px; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--panel);
}
.stat i { display: block; font-style: normal; font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); margin-bottom: 5px; }
.stat b { font-size: 21px; font-weight: 750; letter-spacing: -.02em; }
.stat span { color: var(--muted); font-size: 12.5px; }
.verdict { margin: 0; padding: 14px 16px; border-radius: var(--r-s); font-size: 14.5px; border: 1px solid var(--line); background: var(--panel); }
.verdict.down { border-color: rgba(33, 220, 189, .35); color: #bff5ea; }
.verdict.up { border-color: rgba(255, 106, 61, .32); color: #ffd9cb; }
.radar-art { margin: 0; border: 1px solid var(--line); border-radius: var(--r-m); padding: 18px; background: var(--panel); }
#rchart { width: 100%; height: auto; }
#rchart .grid line { stroke: rgba(255, 255, 255, .07); }
#rchart .axis { fill: var(--dim); font-size: 11px; }
#rchart .area { fill: url(#g1); opacity: 0; transition: opacity .5s var(--ease); }
#rchart .area.on { opacity: 1; }
#rchart .line { fill: none; stroke: var(--brass); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
#rchart .pt { fill: var(--bg); stroke: var(--brass); stroke-width: 2; opacity: 0; transition: opacity .3s var(--ease); }
#rchart .pt.on { opacity: 1; }
.quart { margin-top: 16px; }
.quart-scale { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--dim); letter-spacing: .08em; text-transform: uppercase; }
.quart-track { position: relative; height: 8px; margin-top: 8px; border-radius: 999px; background: rgba(255, 255, 255, .07); }
.quart-track i { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: linear-gradient(90deg, rgba(33, 220, 189, .55), rgba(242, 176, 30, .75)); width: 0; transition: left .5s var(--ease), width .5s var(--ease); }
.quart-track b { position: absolute; top: -5px; width: 3px; height: 18px; border-radius: 2px; background: var(--ink); left: 0; transition: left .5s var(--ease); }

/* ---------- 5. инструменты */
.tools { border-top: 1px solid var(--line); background: var(--bg); }
.tools-rail { list-style: none; margin: 0; padding: 0 0 6px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; }
.tools-rail::-webkit-scrollbar { height: 6px; }
.tools-rail::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 6px; }
.tool {
  scroll-snap-align: start; position: relative; padding: 20px 18px 22px; border: 1px solid var(--line); border-radius: var(--r-m);
  background: linear-gradient(180deg, var(--panel-2), var(--panel)); overflow: hidden;
  transition: transform .3s var(--ease), border-color .3s var(--ease);
}
.tool:hover { transform: translateY(-4px); border-color: var(--line-2); }
.tool::after {
  content: ""; position: absolute; inset: auto -30% -60% auto; width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(242, 176, 30, .13), transparent 65%); opacity: 0; transition: opacity .4s var(--ease);
}
.tool:hover::after { opacity: 1; }
.tool-num { font-size: 12px; color: var(--brass); letter-spacing: .18em; }
.tool h3 { margin: 10px 0 8px; font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.tool p { margin: 0; color: var(--muted); font-size: 13.5px; }
.tool a { display: inline-block; margin-top: 12px; font-size: 13px; color: var(--ink); border-bottom: 1px solid var(--line-2); }

/* ---------- подвал */
.foot {
  display: flex; flex-wrap: wrap; gap: 22px; align-items: flex-end; justify-content: space-between;
  padding: clamp(30px, 5vh, 56px) var(--pad); border-top: 1px solid var(--line);
  background: linear-gradient(0deg, rgba(242, 176, 30, .04), transparent 70%);
}
.foot-claim { margin: 0 0 8px; font-size: 15px; max-width: 46ch; }
.foot-note { margin: 0; color: var(--dim); font-size: 12.5px; max-width: 60ch; }
.foot-links { display: flex; flex-wrap: wrap; gap: 18px; font-size: 13.5px; color: var(--muted); }
.foot-links a:hover { color: var(--brass); }

/* появление блоков на прокрутке */
/* появление включается только если скрипт успел поставить маркер anim на <html>:
   без скрипта контент остаётся видимым, а не пропадает */
html.anim .reveal { animation: cardIn .42s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 45ms); }

/* ---------- адаптив */
@media (max-width: 1080px) {
  .masthead { grid-template-columns: 1fr; }
  .mast-art { min-height: 236px; order: -1; border-radius: var(--r-l); }
  .float-card { max-width: none; }
  .fc-price { font-size: 24px; }
  .art-veil { border-radius: var(--r-l); background: linear-gradient(0deg, rgba(8, 9, 11, .8), transparent 60%); }
  .explore-grid { grid-template-columns: 1fr; }
  .filters { position: static; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
  .radar-grid { grid-template-columns: 1fr; }
  .cards.rows .card-img { width: 150px; flex-basis: 150px; }
}
@media (max-width: 720px) {
  .topnav { gap: 12px; font-size: 12.5px; }
  .topnav a:not(.pill) { display: none; }
  .topstat { display: none; }
  .cards { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
  .card-title { font-size: 14px; }
  .card-price { font-size: 17px; }
  .cards.rows .card { flex-direction: column; }
  .cards.rows .card-img { width: 100%; flex-basis: auto; aspect-ratio: 16 / 10; }
  .masthead h1 { font-size: clamp(30px, 9vw, 42px); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .card, html.anim .reveal { opacity: 1; transform: none; }
  .ticker-row { animation: none; }
}

/* ---------- телефон: те же блоки, но под палец ---- */
@media (max-width: 720px) {
  :root { --pad: 14px; }
  .topbar { gap: 10px; padding: 10px var(--pad); padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right)); }
  .brand-text { font-size: 12px; }
  .brand-text i { font-size: 9px; letter-spacing: .16em; }
  .brand-mark { width: 30px; height: 30px; font-size: 12px; }
  /* ссылки разделов не прячем: едут лентой по горизонтали */
  .topnav { gap: 14px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .topnav::-webkit-scrollbar { display: none; }
  .topnav a:not(.pill) { display: inline-block; flex: 0 0 auto; padding: 9px 0; white-space: nowrap; }
  .topnav a.pill { flex: 0 0 auto; padding: 8px 12px; }
  .masthead { gap: 18px; }
  .masthead h1 { font-size: clamp(27px, 8.4vw, 34px); letter-spacing: -.02em; }
  .masthead h1 em { white-space: normal; }
  .lead { font-size: 14.5px; }
  .mast-art { min-height: 208px; border-radius: var(--r-m); }
  .float-card { left: 10px; right: 10px; bottom: 10px; padding: 13px 14px; border-radius: var(--r-m); }
  .fc-label { margin-bottom: 4px; font-size: 10px; }
  .fc-price { font-size: 25px; }
  .fc-title { font-size: 12.5px; }
  .fc-delta { font-size: 12.5px; margin-top: 6px; }
  /* поиск: поле на всю ширину, кнопка под ним */
  .searchbar { flex-direction: column; gap: 8px; }
  .searchbar .field { min-height: 50px; }
  .searchbar input { font-size: 16px; }
  .searchbar .btn.primary { min-height: 50px; width: 100%; justify-content: center; font-size: 15px; }
  .kicker { font-size: 10.5px; letter-spacing: .12em; }
  .ticker-row { font-size: 12.5px; gap: 18px; }
  /* фильтры: чипсы лентой, без высокого ящика */
  .filters { gap: 14px; }
  .f-title { font-size: 10.5px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; max-height: none; padding-bottom: 4px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chips > * { flex: 0 0 auto; }
  .chip, .filters button, .filters input { min-height: 38px; }
  /* карточка: крупнее под палец, ссылка на всю ширину */
  .card-title { font-size: 14.5px; line-height: 1.25; }
  .card-meta { font-size: 12px; }
  .card-price { font-size: 18px; }
  .card-link { display: block; padding: 11px 0; }
  .tool, .radar-pick, .radar-stat { padding: 16px; }
  .tools-rail { grid-auto-columns: minmax(78vw, 1fr); }
  .more-wrap button { width: 100%; min-height: 48px; }
  .foot { font-size: 12px; }
  .foot-main { gap: 8px; }
  .foot-links { flex-wrap: wrap; gap: 10px 16px; }
}
@media (max-width: 430px) {
  .masthead h1 { font-size: clamp(25px, 8.8vw, 30px); }
  .mast-art { min-height: 184px; }
  .fc-price { font-size: 23px; }
  .cards { grid-template-columns: 1fr; }        /* узкий экран: одна карточка в строку, читаемая цена */
  .cards .card-img { aspect-ratio: 16 / 10; }
}

/* ============ окна, лента сравнения, палитра, всплывашки ============
   Приёмы — из открытых наработок: нативный <dialog> + showModal (доступность,
   возврат фокуса, Esc, top-layer — как в GoogleChrome/modern-web-guidance),
   морф карточка→окно через WAAPI-FLIP (приём auto-animate/formkit),
   View Transitions API для перекладки выдачи, палитра Ctrl+K (приём cmdk). */
:root { --ease-spring: cubic-bezier(.2, .9, .25, 1); }

/* кнопка-палитра в шапке */
.pal-btn {
  display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto;
  padding: 6px 10px; font: inherit; font-size: 12.5px; color: var(--muted);
  background: rgba(255, 255, 255, .03); border: 1px solid var(--line); border-radius: 9px;
  cursor: pointer; transition: color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.pal-btn:hover { color: var(--ink); border-color: var(--line-2); transform: translateY(-1px); }
.pal-btn kbd {
  font: inherit; font-size: 10px; line-height: 1; padding: 3px 5px; color: var(--muted);
  background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 5px;
}
.pal-ico { width: 12px; height: 12px; border: 1.6px solid currentColor; border-radius: 50%; position: relative; }
.pal-ico::after { content: ""; position: absolute; right: -5px; bottom: -4px; width: 6px; height: 1.6px; background: currentColor; transform: rotate(45deg); }

/* ---------- окно */
.win {
  width: min(880px, calc(100vw - 32px)); max-height: min(88vh, 900px); padding: 0;
  color: var(--ink); background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r-l);
  box-shadow: 0 40px 120px -40px #000, 0 0 0 1px rgba(255, 255, 255, .02) inset;
  overflow: hidden; opacity: 0; transform: translateY(14px) scale(.97);
  transition: opacity .18s var(--ease-spring), transform .18s var(--ease-spring),
              overlay .18s allow-discrete, display .18s allow-discrete;
}
.win[open] { opacity: 1; transform: none; }
@starting-style { .win[open] { opacity: 0; transform: translateY(14px) scale(.97); } }
.win::backdrop {
  /* без размытия подложки: оно съедало больше половины кадров при открытии окна.
     Плотная затемнённая подложка выглядит так же, но рисуется в разы дешевле — важно для телефонов. */
  background: radial-gradient(120% 90% at 50% 0%, rgba(8, 9, 11, .84), rgba(4, 5, 6, .95));
  opacity: 0; transition: opacity .18s var(--ease), overlay .18s allow-discrete, display .18s allow-discrete;
}
.win[open]::backdrop { opacity: 1; }
@starting-style { .win[open]::backdrop { opacity: 0; } }
.win-wide { width: min(1080px, calc(100vw - 24px)); }
.win-pal { width: min(620px, calc(100vw - 24px)); max-height: 76vh; }

.win-head {
  display: flex; align-items: flex-start; gap: 14px; padding: 20px 22px 14px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, .03), transparent);
}
.win-head h3 { margin: 0; font-size: 19px; letter-spacing: -.01em; }
.win-head p { margin: 5px 0 0; font-size: 12.5px; color: var(--muted); }
.win-x {
  margin-left: auto; width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center;
  font-size: 18px; line-height: 1; color: var(--muted); background: transparent;
  border: 1px solid var(--line); border-radius: 50%; cursor: pointer;
  transition: color .2s var(--ease), border-color .2s var(--ease), transform .3s var(--ease-spring);
}
.win-x:hover { color: var(--ink); border-color: var(--line-2); transform: rotate(90deg); }
.win-body { padding: 20px 22px 22px; overflow-y: auto; max-height: calc(min(88vh, 900px) - 92px); scrollbar-width: thin; }
.win-body::-webkit-scrollbar { width: 8px; }
.win-body::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 8px; }

/* фото + цена в окне объявления */
.win-shot { position: relative; border-radius: var(--r-m); overflow: hidden; background: var(--panel-2); aspect-ratio: 16 / 9; }
.win-shot img { width: 100%; height: 100%; object-fit: cover; animation: shotIn .45s var(--ease) both; }
@keyframes shotIn { from { transform: scale(1.06); opacity: .3; } }
.win-shot .card-plate { position: absolute; inset: 0; }
.win-price { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 16px 0 4px; }
.win-price b { font-size: 30px; font-weight: 800; letter-spacing: -.03em; }
.win-price s { color: var(--muted); font-size: 13px; }
.win-bar { position: relative; height: 8px; margin: 14px 0 6px; border-radius: 99px; background: linear-gradient(90deg, rgba(33, 220, 189, .22), rgba(255, 255, 255, .08) 50%, rgba(255, 111, 97, .22)); }
.win-bar i {
  position: absolute; top: -4px; width: 4px; height: 16px; border-radius: 3px; background: var(--ink);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, .07); transition: left .6s var(--ease-spring);
}
.win-bar i.down { background: var(--teal); box-shadow: 0 0 0 4px rgba(33, 220, 189, .16); }
.win-bar i.up { background: var(--danger); box-shadow: 0 0 0 4px rgba(255, 111, 97, .16); }
.win-bar-cap { font-size: 12px; color: var(--muted); }
.spec-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 18px 0 4px; }
.spec { padding: 11px 13px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r-s); }
.spec span { display: block; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.spec b { display: block; margin-top: 4px; font-size: 14.5px; }
.win-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.win-acts .btn { min-height: 44px; }
.win-note { margin: 16px 0 0; font-size: 11.5px; color: var(--muted); }
.win-nav { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.win-nav button {
  width: 34px; height: 34px; display: grid; place-items: center; color: var(--muted);
  background: transparent; border: 1px solid var(--line); border-radius: 50%; cursor: pointer;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.win-nav button:hover { color: var(--ink); border-color: var(--brass); }

/* ---------- сравнение */
.cmp-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.cmp-table th, .cmp-table td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.cmp-table thead th { font-size: 12px; color: var(--muted); font-weight: 600; }
.cmp-table tbody th { color: var(--muted); font-weight: 500; white-space: nowrap; }
.cmp-table td.best { color: var(--teal); font-weight: 700; }
.cmp-table td.bad { color: var(--danger); }
.cmp-thumb { width: 74px; height: 52px; border-radius: 8px; object-fit: cover; background: var(--panel-2); display: block; }
.cmp-row-in { animation: rowIn .32s var(--ease-spring) both; animation-delay: calc(var(--i, 0) * 30ms); }
@keyframes rowIn { from { opacity: 0; transform: translateY(10px); } }

/* ---------- палитра */
.pal-top { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.pal-top input {
  flex: 1; min-height: 34px; font: inherit; font-size: 17px; color: var(--ink);
  background: transparent; border: 0; outline: none;
}
.pal-top input::placeholder { color: var(--muted); }
.pal-list { list-style: none; margin: 0; padding: 8px; overflow-y: auto; max-height: 54vh; }
.pal-list li button {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 11px 12px;
  font: inherit; font-size: 14px; color: var(--ink); text-align: left;
  background: transparent; border: 0; border-radius: var(--r-s); cursor: pointer;
  transition: background .18s var(--ease), transform .18s var(--ease);
}
.pal-list li button .k { margin-left: auto; font-size: 11px; color: var(--muted); }
.pal-list li.on button { background: rgba(242, 176, 30, .1); transform: translateX(3px); }
.pal-list li button .dot-i { width: 6px; height: 6px; border-radius: 50%; background: var(--brass); flex: 0 0 auto; }
.pal-empty { padding: 18px 20px; color: var(--muted); font-size: 13px; }
.pal-grp { padding: 12px 20px 4px; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.pal-foot { display: flex; gap: 14px; padding: 10px 18px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--muted); }

/* ---------- лента сравнения снизу */
.dock {
  position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 45;
  display: flex; align-items: center; gap: 14px; padding: 10px 12px 10px 14px;
  width: min(720px, calc(100vw - 24px)); transform: translate(-50%, 130%);
  background: rgba(18, 20, 24, .92); border: 1px solid var(--line-2); border-radius: 16px;
  box-shadow: 0 24px 60px -24px #000; backdrop-filter: blur(10px);
  transition: transform .28s var(--ease);
}
.dock[hidden] { display: none; }
.dock.on { transform: translate(-50%, 0); }
.dock-items { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.dock-items::-webkit-scrollbar { display: none; }
.dock-chip {
  display: flex; align-items: center; gap: 9px; flex: 0 0 auto; padding: 5px 10px 5px 5px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; font-size: 12px;
}
.dock-chip img { width: 38px; height: 28px; border-radius: 999px; object-fit: cover; }
.dock-chip b { font-weight: 600; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dock-chip button { color: var(--muted); background: none; border: 0; cursor: pointer; font-size: 15px; line-height: 1;
  width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; transition: color .18s var(--ease), background .18s var(--ease); }
.dock-chip button:hover { background: rgba(255,255,255,.06); }
.dock-chip button:hover { color: var(--danger); }
.dock-acts { margin-left: auto; display: flex; gap: 8px; flex: 0 0 auto; }
.dock-acts .btn { min-height: 40px; }

/* ---------- всплывашки */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: grid; gap: 10px; justify-items: end; }
.toast {
  position: relative; overflow: hidden; padding: 12px 16px 13px; max-width: min(340px, calc(100vw - 32px));
  font-size: 13px; color: var(--ink); background: rgba(20, 22, 26, .95); border: 1px solid var(--line-2);
  border-radius: 12px; box-shadow: 0 20px 50px -24px #000; backdrop-filter: blur(8px);
  animation: toastIn .26s var(--ease-spring) both;
}
.toast.out { animation: toastOut .2s var(--ease) both; }
.toast::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%;
  background: var(--brass); transform-origin: left; animation: toastBar 4s linear forwards;
}
.toast.good::after { background: var(--teal); }
.toast.bad::after { background: var(--danger); }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(24px) scale(.97); } }
@keyframes toastBar { to { transform: scaleX(0); } }

/* скелетон выдачи, пока считаем */
.cards.loading { opacity: .45; filter: saturate(.5); transition: opacity .3s var(--ease); }

/* перекладка выдачи (View Transitions) — если браузер умеет */
::view-transition-old(cards), ::view-transition-new(cards) { animation-duration: .42s; animation-timing-function: var(--ease-spring); }

@media (max-width: 720px) {
  .win { width: calc(100vw - 16px); max-height: 92vh; border-radius: var(--r-m); }
  .win-body { padding: 16px; max-height: calc(92vh - 84px); }
  .win-head { padding: 16px 16px 12px; }
  .win-price b { font-size: 24px; }
  .win-shot { aspect-ratio: 4 / 3; }
  .dock { flex-wrap: wrap; gap: 10px; padding: 10px; }
  .dock-items { order: 1; width: 100%; }
  .dock-acts { order: 2; width: 100%; }
  .dock-acts .btn { flex: 1; }
  .toasts { left: 12px; right: 12px; bottom: 12px; justify-items: stretch; }
  .toast { max-width: none; }
  .cmp-table { font-size: 12.5px; }
  .cmp-table th, .cmp-table td { padding: 9px 8px; }
  .pal-btn { padding: 6px 9px; font-size: 12px; }
  .pal-btn kbd { display: none; }
}

/* пустая плита в окне без фото — не занимаем пол-экрана */
.win-shot.empty { aspect-ratio: auto; min-height: 118px; display: grid; place-items: center; }
.win-shot.empty .card-plate { position: static; width: 100%; }
@media (max-width: 720px) {
  .win-acts { flex-direction: column; }
  .win-acts .btn { width: 100%; }
}

/* ---------- переходы между состояниями: короткие, но с мягким выбегом ---------- */
::view-transition-group(root) { animation-duration: .2s; animation-timing-function: cubic-bezier(.22, 1, .36, 1); }
::view-transition-old(root) { animation: vtOut .16s cubic-bezier(.4, 0, 1, 1) both; }
::view-transition-new(root) { animation: vtIn .22s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes vtOut { to { opacity: .2; } }
@keyframes vtIn { from { opacity: 0; transform: translateY(6px); } }
#cards { view-transition-name: cards; }
::view-transition-group(cards) { animation-duration: .22s; animation-timing-function: cubic-bezier(.22, 1, .36, 1); z-index: 2; }
.win[open] .win-body { animation: bodyIn .18s var(--ease) both; }
@keyframes bodyIn { from { opacity: 0; } }
.win, .dock, .card { backface-visibility: hidden; }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(root), ::view-transition-group(cards), ::view-transition-old(root), ::view-transition-new(root) { animation: none !important; }
  .win[open] .win-body { animation: none; }
}

/* карточки — отдельные слои отрисовки: прокрутка и анимации не пересчитывают весь список */
.cards > .card { contain: paint; }
@media (prefers-reduced-motion: reduce) {
  .card, .card-img img, .badge, .topbar, .float-card { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ---------- конец файла: мобильные размеры целей перебивают всё выше ---------- */
@media (max-width: 720px) {
  .dock-chip button { width: 36px; height: 36px; font-size: 17px; border-radius: 50%; }
  .dock-chip { padding: 4px 6px 4px 4px; }
  .dock-chip b { max-width: 118px; }
  .clear { width: 36px; height: 36px; margin-right: -8px; }
  .seg-b { min-height: 36px; padding-block: 7px; }
  .card-link { min-height: 36px; display: inline-flex; align-items: center; }
  .toasts { left: 12px; right: 12px; bottom: calc(88px + env(safe-area-inset-bottom)); justify-items: stretch; }
  .toast { max-width: none; }
  .brand { min-height: 36px; display: inline-flex; align-items: center; }
}
@media (max-width: 720px) {
  .win-nav button { width: 38px; height: 38px; }
  .tool a { min-height: 36px; display: inline-flex; align-items: center; }
}
@media (max-width: 720px) {
  .win-x { width: 40px; height: 40px; font-size: 18px; }
  .win-foot a, footer a { padding-block: 10px; }
}

/* ================= ТЕЛЕФОН: отдельный редизайн =================
   Нижнее меню, фильтры шторкой снизу, крупные карточки, компактный верх.
   Всё ниже — только на узких экранах; на ПК разметка спрятана. */
.mnav, .sheet-veil, .sheet-head, .sheet-apply { display: none; }

@media (max-width: 720px) {
  body { padding-bottom: calc(82px + env(safe-area-inset-bottom)); }

  /* ---- нижнее меню в зоне большого пальца ---- */
  .mnav {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; z-index: 46;
    left: 0; right: 0; bottom: 0; padding: 5px 6px calc(5px + env(safe-area-inset-bottom));
    background: rgba(11, 12, 15, .95); border-top: 1px solid var(--line);
    box-shadow: 0 -20px 40px -30px #000;
  }
  .mnav a, .mnav button {
    position: relative; display: grid; justify-items: center; gap: 2px; min-height: 54px;
    padding: 7px 2px 5px; color: var(--dim); background: none; border: 0; font: inherit;
    font-size: 10.5px; letter-spacing: .01em; text-decoration: none; cursor: pointer;
    transition: color .18s var(--ease);
  }
  .mnav a.on, .mnav button.on, .mnav a:active, .mnav button:active { color: var(--ink); }
  .mnav a.on::after, .mnav button.on::after {
    content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 22px; height: 2px; border-radius: 2px; background: var(--brass);
  }
  .mnav svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; }
  .mcnt {
    position: absolute; top: 3px; left: 50%; margin-left: 6px; min-width: 17px; height: 17px;
    padding: 0 4px; border-radius: 999px; background: var(--brass); color: #17130a;
    font-size: 10.5px; font-weight: 700; display: grid; place-items: center;
  }
  .mcnt[hidden] { display: none; }

  /* ---- фильтры шторкой снизу ---- */
  .filters {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 48;
    margin: 0; padding: 0 16px calc(18px + env(safe-area-inset-bottom));
    max-height: 88vh; overflow-y: auto; overscroll-behavior: contain;
    background: var(--panel); border-top: 1px solid var(--line-2);
    border-radius: 22px 22px 0 0; box-shadow: 0 -40px 70px -40px #000;
    transform: translateY(104%); visibility: hidden;
    transition: transform .3s var(--ease), visibility .3s var(--ease);
  }
  .filters.on { transform: none; visibility: visible; }
  .sheet-head {
    display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0;
    margin: 0 -16px; padding: 12px 16px 10px; background: var(--panel); z-index: 2;
    font-size: 15px; font-weight: 600;
  }
  .sheet-x {
    width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line);
    background: none; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer;
  }
  .sheet-apply { display: block; position: sticky; bottom: 0; margin: 14px 0 0; }
  .sheet-veil {
    display: block; position: fixed; inset: 0; z-index: 47; background: rgba(4, 5, 7, .7);
    opacity: 0; pointer-events: none; transition: opacity .25s var(--ease);
  }
  .sheet-veil.on { opacity: 1; pointer-events: auto; }
  .filters .chips { max-height: none; }
  .filters .f-block:first-of-type { margin-top: 4px; }

  /* ---- лента сравнения и всплывашки над меню ---- */
  .dock { bottom: calc(84px + env(safe-area-inset-bottom)); width: calc(100vw - 20px); }
  .toasts { bottom: calc(152px + env(safe-area-inset-bottom)); }

  /* ---- верх страницы: компактно, но с кадром ---- */
  .masthead { padding-top: 8px; }
  .masthead h1 { font-size: clamp(27px, 8.4vw, 34px); line-height: 1.06; letter-spacing: -.02em; }
  .mast-copy p.lead, .mast-copy .lead { font-size: 13.5px; }
  .mast-art { max-height: 168px; border-radius: 16px; }
  .float-card { padding: 10px 12px; }
  .searchbar input { height: 52px; font-size: 15px; }

  /* ---- карточки: крупнее и читаемее ---- */
  .cards { grid-template-columns: 1fr; gap: 12px; }
  .card { border-radius: 18px; }
  .card-img { aspect-ratio: 16 / 10; }
  .card-title { font-size: 16.5px; line-height: 1.25; }
  .card-price { font-size: 21px; }
  .card-meta { font-size: 12.5px; }
  .card-link { font-size: 13px; }
  .badge { font-size: 10.5px; padding: 4px 8px; }

  /* ---- окна на телефоне: снизу, как листы ---- */
  .win { border-radius: 20px 20px 0 0; max-height: 92vh; }
  .win-wrap, .win-inner { padding-bottom: env(safe-area-inset-bottom); }
  .res-bar { position: sticky; top: 0; z-index: 20; padding-block: 8px; background: var(--bg); }
  .seg { display: none; }
}
@media (max-width: 720px) {
  /* верх: без правого меню и без коллажа — они дублируют нижнее меню и мешают заголовку */
  .topnav { display: none; }
  .topbar { justify-content: space-between; }
  .topstat { margin-left: auto; font-size: 11.5px; }
  .mast-art { display: none; }
  .masthead { padding-bottom: 4px; }
  .mast-copy { max-width: none; }
  .ticker-row { border-top: 1px solid var(--line); }
}
@media (max-width: 720px) {
  .card-title {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    font-size: 15.5px;
  }
  .res-bar { position: static; }
}
@media (max-width: 720px) {
  .filters { padding-bottom: calc(30px + env(safe-area-inset-bottom)); }
  .sheet-apply { margin-bottom: calc(8px + env(safe-area-inset-bottom)); }
  .quick { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .quick::-webkit-scrollbar { display: none; }
  .quick > * { flex: 0 0 auto; }
}
@media (max-width: 720px) {
  /* затемнение — тенью от самой шторки: не зависит от контекста наложения и слоёв */
  .filters.on {
    box-shadow: 0 -30px 80px -40px #000, 0 0 0 100vmax rgba(4, 5, 7, .72);
    clip-path: inset(-100vmax -100vmax 0 -100vmax);
  }
  .sheet-veil { display: none !important; }
}
@media (max-width: 720px) {
  /* шторка сидит НАД нижним меню, а не под ним */
  .filters { bottom: calc(60px + env(safe-area-inset-bottom)); max-height: 78vh; }
  .filters.on { clip-path: inset(-100vmax -100vmax 0 -100vmax); }
  .filters { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
  .filters::-webkit-scrollbar { width: 6px; }
  .filters::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 6px; }
  /* ползущие вбок ряды чипов: мягкий край вместо резкого обреза */
  .chips, .quick {
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
  }
}
@media (max-width: 720px) {
  /* 1fr даёт минимум по содержимому — длинный заголовок растягивал колонку и страницу */
  .masthead { grid-template-columns: minmax(0, 1fr); }
  .mast-copy { min-width: 0; max-width: none; }
  .masthead h1 { white-space: normal; overflow-wrap: break-word; }
  .masthead h1 em { white-space: normal; }
  .lead, .searchbar, .searchbar .field { min-width: 0; }
  .ticker-row { max-width: none; }
  .masthead > * { min-width: 0; }
}
.card-meta:empty { display: none; }
@media (max-width: 720px) {
  /* лента сравнения висит над нижним меню — последней карточке нужен отступ */
  body:has(.dock:not([hidden])) .explore-grid { padding-bottom: 118px; }
}
@media (max-width: 720px) {
  /* шторка должна быть непрозрачной и перекрывать ленту сравнения */
  .filters { background: #0b0e12; backdrop-filter: none; }
  .filters .sheet-head { background: #0b0e12; }
  body:has(.filters.on) .dock { display: none; }
  body:has(.filters.on) .filters { border-color: rgba(255,255,255,.10); }
}
@media (max-width: 720px) {
  /* ряды чипов листаются — справа мягкое затухание, чтобы обрез не выглядел поломкой */
  .filters .chips { mask-image: linear-gradient(90deg, #000 86%, transparent 100%); -webkit-mask-image: linear-gradient(90deg, #000 86%, transparent 100%); }
  .filters::-webkit-scrollbar { width: 6px; }
  .filters::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 999px; }
  .filters::-webkit-scrollbar-track { background: transparent; }
}
html { scrollbar-color: rgba(255,255,255,.16) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.16); border-radius: 999px; }
::-webkit-scrollbar-track { background: transparent; }
@media (max-width: 720px) {
  /* в шторке поля цены и года упирались в правый край */
  .filters .range { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .filters .range input { font-size: 15px; padding: 0 10px; }
  .filters { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.14) transparent; }
}
/* ♥ избранное: живёт в браузере, аккаунт не нужен */
.card-img .fav {
  position: absolute; right: 8px; bottom: 8px; width: 40px; height: 40px; padding: 0;
  display: grid; place-items: center; cursor: pointer; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.2); background: rgba(8,9,11,.82); color: #fff;
  transition: transform .16s var(--ease), background .2s var(--ease), border-color .2s var(--ease);
}
.card-img .fav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.card-img .fav:hover { transform: scale(1.06); border-color: rgba(255,255,255,.45); }
.card-img .fav.on { background: var(--brass); border-color: transparent; color: #14100a; }
.card-img .fav.on svg { fill: currentColor; stroke: none; }
.favcnt { margin-left: 6px; padding: 1px 6px; border-radius: 999px; background: var(--brass); color: #16120a; font-size: 11px; font-weight: 800; }
.favcnt[hidden] { display: none; }
.mnav button.has { color: var(--ink); }

@media (max-width: 720px) {
  /* первый экран: заголовок короче, ввод в две строки — до первой карточки ближе */
  .masthead h1 { font-size: clamp(25px, 7.4vw, 34px); line-height: 1.07; margin-bottom: 14px; }
  .mast-copy .lead { display: none; }
  .quick { mask-image: linear-gradient(90deg, #000 88%, transparent 100%); -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent 100%); }
  .res-bar { padding-block: 6px; }
  .res-total { font-size: 12.5px; }
  .card-img .fav { width: 42px; height: 42px; }
}
/* короткая шпаргалка процесса — только на телефоне, где места мало */
.flowline { display: none; }
@media (max-width: 720px) {
  .flowline {
    display: block; margin: 16px 0 2px; color: var(--dim); font-size: 12px; line-height: 1.5;
    border-left: 2px solid rgba(226, 170, 63, .5); padding-left: 10px;
  }
  .explore { padding-top: 26px; }
  .explore .sec-head { margin-bottom: 12px; }
  .quick { margin-bottom: 2px; }
}
.filters[hidden] { display: none !important; }
.res-total { white-space: nowrap; }

/* ---------- профиль и вход через Telegram */
.acc {
  display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .03);
  color: var(--ink); font: inherit; font-size: 13.5px; cursor: pointer;
  transition: border-color .2s var(--ease), color .2s var(--ease), background .2s var(--ease);
}
.acc::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--dim); transition: background .2s var(--ease); }
.acc:hover { border-color: var(--brass); }
.acc.on { border-color: rgba(242, 176, 30, .5); }
.acc.on::before { background: var(--brass); box-shadow: 0 0 0 3px rgba(242, 176, 30, .16); }

.acc-body { display: grid; gap: 14px; }
.acc-lead { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.acc-hero { display: flex; align-items: center; gap: 13px; }
.acc-hero b { display: block; font-size: 16.5px; }
.acc-hero span { color: var(--muted); font-size: 13px; }
.acc-ava {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: linear-gradient(150deg, #ffd467, var(--brass) 60%, #cf8f10); color: #17130a;
  font-weight: 800; font-size: 16px;
}
.acc-rows { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; }
.acc-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; background: var(--panel); font-size: 13.5px; }
.acc-row span { color: var(--muted); }
.acc-row b { font-weight: 650; }
.acc-row b.good { color: var(--teal); }
.acc-row b.bad { color: var(--danger); }
.acc-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); cursor: pointer; }
.acc-consent input { margin-top: 2px; width: 18px; height: 18px; flex: none; accent-color: var(--brass); }
.acc-consent a, .acc-hint a { color: var(--brass); }
.acc-hint { margin: 0; color: var(--muted); font-size: 12.8px; line-height: 1.5; }
.acc-code { margin: 10px 0 0; color: var(--dim); font-size: 12.5px; }
.acc-code code { background: var(--bg-2); padding: 3px 8px; border-radius: 6px; color: var(--brass); letter-spacing: .12em; }
.acc-list { display: grid; gap: 6px; }
.acc-dev {
  display: flex; justify-content: space-between; gap: 10px; padding: 11px 13px;
  border: 1px solid var(--line); border-radius: var(--r-s); background: rgba(255, 255, 255, .02); font-size: 13px;
}
.acc-dev b { color: var(--muted); font-weight: 600; }
#accwin .btn[disabled] { opacity: .45; cursor: not-allowed; }
#accwin[open] .acc-body { animation: accIn .28s var(--ease) both; }
@keyframes accIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* телефон: под палец, поля в столбец */
@media (max-width: 720px) {
  .acc { min-height: 36px; padding: 0 11px; font-size: 12.5px; }
  .acc-row { padding: 11px 12px; }
  #accwin .win-acts { display: grid; grid-template-columns: 1fr; }
  #accwin .btn { min-height: 48px; }
}

/* телефон: выбор марки и города — списком на всю ширину панели */
@media (max-width: 720px) {
  .pick-pane { position: static; margin-top: 8px; box-shadow: none; padding: 8px; }
  .pick-list { max-height: min(46vh, 340px); }
  .pick-btn { min-height: 48px; }
  .pick-q { min-height: 44px; font-size: 16px; }   /* 16px: iOS не зумит поле при фокусе */
  .pick-i { padding: 11px 10px; }
}


/* ---------- режим «Избранное»: только список, прочие разделы убраны (23.11.2026) */
body.favview .masthead,
body.favview .ticker,
body.favview .radar,
body.favview .tools,
body.favview .foot,
body.favview #dock { display: none !important; }
body.favview .explore { border-top: 0; }
.card-del {
  margin-left: auto; padding: 8px 12px; border-radius: 10px; cursor: pointer;
  background: rgba(248, 81, 73, .12); border: 1px solid rgba(248, 81, 73, .45);
  color: #ff9a92; font: inherit; font-size: 13px; font-weight: 600;
}
.card-del:hover { background: rgba(248, 81, 73, .2); color: #ffb4ad; }
.card-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Значки марок: чипы быстрого выбора и список марок в фильтре (28.11.2026) */
/* Значки марок: логотипы приходят тёмными (Toyota RGB 39, Nissan чёрный, VW тёмно-синий)
   и на тёмном фоне сайта пропадают — поэтому каждый значок кладём на светлый диск. */
.chip-logo { width: 20px; height: 20px; object-fit: contain; margin-right: 6px; vertical-align: -5px; flex: none;
  background: #eef1f5; border-radius: 50%; padding: 2px; box-sizing: border-box; }
.pick-logo { width: 24px; height: 24px; object-fit: contain; flex: none; margin-right: 4px;
  background: #eef1f5; border-radius: 50%; padding: 2px; box-sizing: border-box; }
.pick-i { display: flex; align-items: center; gap: 8px; }
.pick-i > span { flex: 1 1 auto; min-width: 0; text-align: left; }
@media (max-width: 720px) {
  .chip-logo { width: 16px; height: 16px; margin-right: 5px; }
  .pick-logo { width: 20px; height: 20px; }
}

/* Чип марки — строка: значок, имя, счётчик (28.11.2026) */
.chip { display: inline-flex; align-items: center; white-space: nowrap; }

/* Значок площадки в углу карточки (28.11.2026) */
.card-img .src-logo { width: 18px; height: 18px; object-fit: contain; display: block;
  border-radius: 4px; background: rgba(0,0,0,.35); padding: 2px; }
.src:has(.src-logo) { padding: 2px; }
