@font-face {
  font-family: "Russo One";
  src: url("/static/fonts/RussoOne-Regular.woff") format("woff"),
       url("/static/fonts/RussoOne-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  --bg: #070709;
  --bg-2: #0c0c0f;
  --surface: #111115;
  --surface-2: #17171c;
  --surface-3: #202027;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .13);
  --text: #f6f6f7;
  --text-2: #a4a4ae;
  --text-3: #6d6d77;
  --red: #d42a31;
  --red-2: #ef3b43;
  --red-deep: #8e161b;
  --red-soft: rgba(212, 42, 49, .14);
  --ok: #34d399;
  --warn: #fbbf24;
  --info: #60a5fa;
  --mute: #a1a1aa;
  --r-xl: 24px;
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;
  --pad: 16px;
  --display: "Russo One", "Arial Black", system-ui, sans-serif;
  --safe-bottom: max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px));
  --safe-top: calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px));
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(90% 40% at 100% 0%, rgba(212, 42, 49, .16), transparent 70%),
    radial-gradient(60% 30% at 0% 0%, rgba(255, 255, 255, .04), transparent 70%),
    var(--bg);
  background-repeat: no-repeat;
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.ic { width: 20px; height: 20px; flex: none; display: block; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

#app { max-width: 1120px; margin: 0 auto; padding: calc(8px + var(--safe-top)) var(--pad) 0; }
.view { padding-bottom: calc(40px + var(--safe-bottom)); }
.view-car { padding-bottom: calc(110px + var(--safe-bottom)); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 18px; border-radius: var(--r-md); border: 1px solid transparent;
  font-weight: 700; white-space: nowrap; user-select: none; text-decoration: none; color: inherit;
  transition: transform .12s, background .15s, border-color .15s, opacity .15s, box-shadow .15s;
}
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: default; }
.btn-primary {
  color: #fff;
  background: linear-gradient(180deg, #e3343b, #bf2229);
  box-shadow: 0 10px 24px -12px rgba(212, 42, 49, .9), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.btn-dark { background: var(--surface-2); border-color: var(--line-2); }
.btn-ghost { background: transparent; border-color: var(--line-2); }
.btn-block { width: 100%; }
.btn.done { background: #0f5132; border-color: transparent; box-shadow: none; color: #d1fae5; }
.spin {
  width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.round-btn {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, .14); color: #fff;
  background: rgba(7, 7, 9, .55); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 0; background: var(--surface-2); display: grid; place-items: center; }
.link-btn { border: 0; background: none; color: var(--red-2); font-weight: 700; padding: 8px; }

/* ---------- Шапка ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0 4px; }
.brandmark { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mark { width: 42px; height: 26px; flex: none; }
.brandmark-text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brandmark-text b { font-family: var(--display); font-weight: 400; font-size: 15px; letter-spacing: .08em; white-space: nowrap; }
.brandmark-text span { color: var(--text-3); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; margin-top: 3px; }
.topbar-count {
  flex: none; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-2);
  font-size: 13px; font-weight: 700; color: var(--text-2); font-variant-numeric: tabular-nums;
}
.hero-title { padding: 18px 0 14px; }
.hero-title h1 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 30px; line-height: 1.05; letter-spacing: -.005em; text-transform: uppercase; }
.hero-title h1 span { display: block; margin-top: 6px; font-size: 15px; color: var(--text-2); letter-spacing: .06em; }
.hero-title h1::after { content: ""; display: block; width: 56px; height: 4px; margin-top: 14px; border-radius: 2px; background: var(--red); transform: skewX(-24deg); }

/* ---------- Поиск ---------- */
.searchbar {
  position: sticky; top: 0; z-index: 15; display: flex; gap: 8px;
  margin: 0 calc(-1 * var(--pad)); padding: calc(8px + var(--safe-top)) var(--pad) 8px;
  background: linear-gradient(var(--bg) 70%, rgba(7, 7, 9, 0));
}
.search {
  flex: 1; min-width: 0; height: 52px; display: flex; align-items: center; gap: 10px;
  padding: 0 6px 0 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line-2);
  transition: border-color .15s, box-shadow .15s;
}
.search:focus-within { border-color: rgba(212, 42, 49, .7); box-shadow: 0 0 0 4px var(--red-soft); }
.search .ic { color: var(--text-3); }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font-size: 16px; }
.search input::placeholder { color: var(--text-3); }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-clear { width: 38px; height: 38px; border: 0; border-radius: 12px; background: var(--surface-3); color: var(--text-2); display: grid; place-items: center; }
.search-clear .ic { width: 15px; height: 15px; }
.filter-btn {
  position: relative; flex: none; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center;
  color: #fff; border: 0; background: linear-gradient(180deg, #e3343b, #bf2229);
  box-shadow: 0 10px 24px -12px rgba(212, 42, 49, .9);
}
.filter-badge {
  position: absolute; top: -5px; right: -5px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px;
  background: #fff; color: var(--bg); font-size: 12px; font-weight: 800; line-height: 22px; text-align: center;
}

/* ---------- Статусы и марки ---------- */
.tabs, .brands, .active-filters {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  margin: 0 calc(-1 * var(--pad)); padding: 4px var(--pad);
}
.tabs::-webkit-scrollbar, .brands::-webkit-scrollbar, .active-filters::-webkit-scrollbar { display: none; }
.tab {
  flex: none; display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2);
  font-weight: 700; font-size: 14px; white-space: nowrap; transition: background .15s, color .15s, border-color .15s;
}
.tab .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.tab em { font-style: normal; font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.tab[aria-selected="true"] { background: #f6f6f7; border-color: #f6f6f7; color: var(--bg); }
.tab[aria-selected="true"] em { color: #5c5c66; }
.brands { padding-top: 8px; }
.brand-chip {
  flex: none; display: inline-flex; align-items: baseline; gap: 6px; height: 36px; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--text);
  font-family: var(--display); font-size: 12.5px; letter-spacing: .06em; line-height: 34px; white-space: nowrap;
  transition: background .15s, border-color .15s, opacity .15s;
}
.brand-chip em { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; font-style: normal; font-size: 12px; color: var(--text-3); letter-spacing: 0; }
.brand-chip[aria-pressed="true"] { background: var(--red); border-color: var(--red); }
.brand-chip[aria-pressed="true"] em { color: rgba(255, 255, 255, .75); }
.brand-chip.empty { opacity: .4; }
.active-filters { padding-top: 10px; }
.af-chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 8px 0 12px;
  border-radius: 999px; border: 1px solid rgba(212, 42, 49, .45); background: var(--red-soft);
  color: #ffd9db; font-size: 13px; font-weight: 600; white-space: nowrap;
}
.af-chip .ic { width: 14px; height: 14px; opacity: .8; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0 12px; }
.count { color: var(--text-2); font-size: 14px; font-weight: 600; }
.sort { position: relative; display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 13px; font-weight: 700; }
.sort .ic { width: 16px; height: 16px; }
.sort select { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 16px; }

/* ---------- Сетка карточек ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
@media (max-width: 360px) { .grid { grid-template-columns: 1fr; } }
.car {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  border-radius: var(--r-xl); border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-2) 100%);
  transition: transform .15s, border-color .15s;
  content-visibility: auto; contain-intrinsic-size: auto 360px;
}
.car:active { transform: scale(.99); }
@media (hover: hover) { .car:hover { border-color: var(--line-2); } .car:hover .car-media img { transform: scale(1.03); } }
.car:has(.car-link:focus-visible) { outline: 2px solid var(--red-2); outline-offset: 2px; }
.car-media { position: relative; aspect-ratio: 16 / 10; background: var(--surface-2); overflow: hidden; display: grid; place-items: center; color: var(--text-3); }
.car-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.car-media > .ic { width: 48px; height: 48px; }
.car-media::after {
  content: ""; position: absolute; inset: 40% 0 0 0; pointer-events: none;
  background: linear-gradient(to top, rgba(7, 7, 9, .92), rgba(7, 7, 9, 0));
}
.pill {
  display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; white-space: nowrap;
  background: rgba(7, 7, 9, .62); border: 1px solid rgba(255, 255, 255, .12); color: #fff;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; }
.s-in_stock .dot, .tab.s-in_stock .dot { background: var(--ok); }
.s-in_transit .dot, .tab.s-in_transit .dot { background: var(--warn); }
.s-on_order .dot, .tab.s-on_order .dot { background: var(--info); }
.s-reserved .dot, .tab.s-reserved .dot, .s-sold .dot { background: var(--mute); }
.tab.s-in_stock { color: #b9f5dc; }
.tab.s-in_transit { color: #fde7a8; }
.tab.s-on_order { color: #cfe2ff; }
.media-top { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; justify-content: space-between; gap: 8px; z-index: 1; }
.media-price { position: absolute; left: 16px; right: 16px; bottom: 12px; z-index: 1; color: #fff; }
.media-price b { display: block; font-family: var(--display); font-weight: 400; font-size: 25px; line-height: 1.1; letter-spacing: .01em; text-shadow: 0 2px 12px rgba(0, 0, 0, .5); white-space: nowrap; }
.media-price small { display: block; margin-top: 3px; color: rgba(255, 255, 255, .72); font-size: 12px; font-weight: 600; }
.media-price b.ask { font-size: 18px; }
.car-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.car-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.car-brand { color: var(--red-2); font-size: 11px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.car-name { display: block; margin-top: 4px; font-family: var(--display); font-weight: 400; font-size: 19px; line-height: 1.15; color: var(--text); text-decoration: none; overflow-wrap: anywhere; outline: 0; }
.car-link::after { content: ""; position: absolute; inset: 0; z-index: 2; }
.car-actions { position: relative; z-index: 3; display: flex; gap: 8px; flex: none; }
.act {
  height: 42px; min-width: 42px; padding: 0 12px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); font-weight: 800; font-size: 14px;
  transition: transform .12s, background .15s;
}
.act:active { transform: scale(.94); }
.act-card { padding: 0; width: 42px; }
.act-kp { border: 0; color: #fff; background: linear-gradient(180deg, #e3343b, #bf2229); }
.act.done { background: #0f5132; color: #d1fae5; border-color: transparent; }
.act .ic { width: 18px; height: 18px; }
.act .spin { width: 14px; height: 14px; }
.specs { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.specs li {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 9px;
  background: rgba(255, 255, 255, .045); color: var(--text-2); font-size: 12.5px; font-weight: 600; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.specs .ic { width: 14px; height: 14px; color: var(--text-3); }

/* ---------- Состояния ---------- */
.state { text-align: center; padding: 56px 16px; color: var(--text-2); }
.state-ic { width: 52px; height: 52px; margin: 0 auto 14px; color: var(--text-3); }
.state-title { color: var(--text); font-family: var(--display); font-size: 18px; text-transform: uppercase; }
.state-text { margin: 8px 0 20px; }
.skeleton { pointer-events: none; }
.sk { background: linear-gradient(90deg, var(--surface-2) 0%, var(--surface-3) 50%, var(--surface-2) 100%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Фильтры (нижняя панель) ---------- */
.sheet { position: fixed; inset: 0; z-index: 40; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); opacity: 0; transition: opacity .22s; }
.sheet-panel {
  position: absolute; left: 0; right: 0; bottom: 0; max-width: 640px; margin: 0 auto; max-height: 90vh;
  display: flex; flex-direction: column; border-radius: 26px 26px 0 0;
  background: var(--bg-2); border: 1px solid var(--line-2); border-bottom: 0;
  transform: translateY(100%); transition: transform .26s cubic-bezier(.2, .8, .2, 1);
}
.sheet.open .sheet-backdrop { opacity: 1; }
.sheet.open .sheet-panel { transform: translateY(0); }
.sheet-grab { width: 44px; height: 5px; border-radius: 3px; background: var(--surface-3); margin: 10px auto 0; flex: none; }
.sheet-head { display: flex; align-items: center; gap: 8px; padding: 10px 16px 6px 20px; flex: none; }
.sheet-head h2 { margin: 0; flex: 1; font-family: var(--display); font-weight: 400; font-size: 20px; text-transform: uppercase; }
.sheet-body { overflow-y: auto; padding: 6px 20px 16px; overscroll-behavior: contain; }
.sheet-foot { padding: 12px 20px calc(12px + var(--safe-bottom)); border-top: 1px solid var(--line); flex: none; }
.fgroup { padding: 14px 0; border-bottom: 1px solid var(--line); }
.fgroup:last-child { border-bottom: 0; }
.flabel { margin-bottom: 10px; color: var(--text-2); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.inp, .select select {
  width: 100%; height: 48px; border-radius: var(--r-md); border: 1px solid var(--line-2);
  background: var(--surface); outline: 0; padding: 0 14px; font-size: 16px; transition: border-color .15s;
  font-variant-numeric: tabular-nums;
}
.inp::placeholder { color: var(--text-3); }
.inp:focus, .select select:focus { border-color: rgba(212, 42, 49, .7); }
.select { position: relative; display: block; }
.select select { appearance: none; -webkit-appearance: none; padding-right: 36px; text-overflow: ellipsis; }
.select::after {
  content: ""; position: absolute; right: 16px; top: 50%; width: 8px; height: 8px; margin-top: -6px; pointer-events: none;
  border-right: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3); transform: rotate(45deg);
}
.select select.is-set, .inp.is-set { border-color: rgba(212, 42, 49, .6); }
.quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.quick button, .fchip {
  height: 34px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: transparent;
  color: var(--text-2); font-size: 13px; font-weight: 700; white-space: nowrap; transition: background .15s, color .15s, border-color .15s;
}
.quick button.on, .fchip[aria-pressed="true"] { background: var(--red); border-color: var(--red); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Карточка авто ---------- */
.hero { position: relative; margin: calc(-8px - var(--safe-top)) calc(-1 * var(--pad)) 0; background: var(--surface); }
@media (min-width: 720px) { .hero { margin: 12px 0 0; border-radius: var(--r-xl); overflow: hidden; } }
.hero-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.hero-track::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; aspect-ratio: 4 / 3; scroll-snap-align: center; scroll-snap-stop: always; background: var(--surface-2); }
@media (min-width: 720px) { .slide { aspect-ratio: 16 / 9; max-height: min(60vh, 560px); } }
.slide img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.slide.empty { display: grid; place-items: center; color: var(--text-3); }
.slide.empty .ic { width: 64px; height: 64px; }
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 90px; pointer-events: none; background: linear-gradient(to top, var(--bg), rgba(7, 7, 9, 0)); }
.hero-bar { position: absolute; top: calc(12px + var(--safe-top)); left: 12px; right: 12px; display: flex; justify-content: space-between; z-index: 2; pointer-events: none; }
.hero-bar > * { pointer-events: auto; }
.hero-count { position: absolute; right: 16px; bottom: 34px; z-index: 2; }
.hero-arrow { position: absolute; top: 50%; margin-top: -21px; z-index: 2; display: none; }
.hero-arrow.prev { left: 14px; }
.hero-arrow.next { right: 14px; }
.hero-arrow.next .ic { transform: scaleX(-1); }
@media (hover: hover) and (min-width: 720px) { .hero-arrow { display: grid; } }

.d-body { position: relative; margin-top: -18px; z-index: 3; }
.d-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.d-title { margin: 6px 0 0; font-family: var(--display); font-weight: 400; font-size: 28px; line-height: 1.08; overflow-wrap: anywhere; }
.d-sub { margin-top: 8px; color: var(--text-2); font-size: 14px; }
.d-price {
  position: relative; margin-top: 18px; padding: 16px 18px 16px 22px; border-radius: var(--r-lg);
  background: linear-gradient(135deg, rgba(212, 42, 49, .18), rgba(212, 42, 49, .03) 55%), var(--surface);
  border: 1px solid rgba(212, 42, 49, .25); overflow: hidden;
}
.d-price::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px; border-radius: 0 3px 3px 0; background: var(--red); }
.d-price b { display: block; font-family: var(--display); font-weight: 400; font-size: 32px; line-height: 1.05; letter-spacing: .01em; }
.d-price b.ask { font-size: 22px; }
.d-price small { display: block; margin-top: 6px; color: var(--text-2); font-size: 13px; font-weight: 600; }
.d-terms { display: flex; gap: 12px; margin-top: 10px; padding: 14px 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.d-terms .ic { color: var(--red-2); margin-top: 1px; }
.d-terms b { display: block; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); }
.d-terms p { margin: 4px 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 10px; }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
.tile { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.tile .ic { color: var(--red-2); }
.tile span { display: block; color: var(--text-3); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.tile b { display: block; margin-top: 2px; font-size: 14px; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }

.block { margin-top: 26px; }
.block h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-family: var(--display); font-weight: 400; font-size: 17px; text-transform: uppercase; letter-spacing: .02em; }
.block h2::before { content: ""; width: 14px; height: 4px; border-radius: 2px; background: var(--red); transform: skewX(-24deg); }
.promo {
  display: flex; gap: 16px; padding: 14px; border-radius: var(--r-lg); border: 1px solid var(--line-2);
  background: linear-gradient(120deg, var(--surface-2), var(--surface));
}
.promo-thumb { flex: none; width: 96px; aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden; border: 1px solid var(--line-2); background: var(--surface-3); padding: 0; cursor: zoom-in; }
.promo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.promo-info { display: flex; flex-direction: column; gap: 10px; min-width: 0; justify-content: center; }
.promo-info p { margin: 0; color: var(--text-2); font-size: 14px; }
.promo-info .btn { height: 42px; align-self: flex-start; }
.kv { margin: 0; padding: 4px 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.kv div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.kv div:last-child { border-bottom: 0; }
.kv dt { color: var(--text-2); flex: none; max-width: 50%; }
.kv dd { margin: 0; text-align: right; font-weight: 600; overflow-wrap: anywhere; min-width: 0; }
.kv dd.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; letter-spacing: .03em; }
.group { margin-top: 8px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.group summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 16px; cursor: pointer; font-weight: 700; }
.group summary::-webkit-details-marker { display: none; }
.group summary .meta { display: inline-flex; align-items: center; gap: 8px; color: var(--text-3); font-weight: 600; font-size: 13px; }
.group summary .ic { width: 18px; height: 18px; transition: transform .2s; }
.group[open] summary .ic { transform: rotate(180deg); }
.group ul { margin: 0; padding: 0 16px 14px; list-style: none; display: grid; gap: 8px; }
.group li { position: relative; padding-left: 18px; color: var(--text-2); }
.group li::before { content: ""; position: absolute; left: 0; top: .55em; width: 8px; height: 3px; border-radius: 2px; background: var(--red); transform: skewX(-24deg); }
.group .kv { border: 0; border-radius: 0; background: none; padding-top: 0; }
.desc { padding: 14px 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); color: var(--text-2); white-space: pre-line; overflow-wrap: anywhere; }
.contact { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
.contact .btn { background: var(--surface); border-color: var(--line-2); }

.actionbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; gap: 10px; justify-content: center;
  padding: 12px var(--pad) calc(12px + var(--safe-bottom));
  background: linear-gradient(rgba(7, 7, 9, 0), rgba(7, 7, 9, .92) 30%);
}
.actionbar .btn { flex: 1; max-width: 360px; height: 54px; font-size: 16px; }

/* ---------- Просмотр фото ---------- */
.viewer { position: fixed; inset: 0; z-index: 60; background: #000; animation: fade .18s ease-out; }
@keyframes fade { from { opacity: 0; } }
.viewer-track { height: 100%; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.viewer-track::-webkit-scrollbar { display: none; }
.viewer-track div { flex: 0 0 100%; height: 100%; scroll-snap-align: center; scroll-snap-stop: always; display: grid; place-items: center; }
.viewer-track img { max-width: 100%; max-height: 100%; object-fit: contain; }
.viewer-top {
  position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between;
  padding: calc(12px + var(--safe-top)) 14px 12px 20px; background: linear-gradient(rgba(0, 0, 0, .7), transparent);
}
.viewer-count { font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- Тост ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(96px + var(--safe-bottom)); z-index: 70; width: min(calc(100% - 32px), 460px);
  transform: translateX(-50%); display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 16px;
  border-radius: 16px; background: #f6f6f7; color: var(--bg); font-weight: 600;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .5); animation: toast-in .2s ease-out;
}
.toast.error { background: #3b1114; color: #ffd4d6; border: 1px solid rgba(212, 42, 49, .5); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }
.toast-text { flex: 1; }
.toast-action { flex: none; border: 0; border-radius: 10px; padding: 9px 12px; background: var(--bg); color: #fff; font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
