/* Велосклад Расула — Mini App. Палитра: крем #f6f7e0, тёмно-синий #0d2e68, винный #5f0a41, коралл #fc5838. Шрифт Geist. */

@font-face { font-family: "Geist"; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url(../fonts/geist-cyr.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url(../fonts/geist-latext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+A720-A7FF; }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url(../fonts/geist-lat.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  color-scheme: light;
  /* палитра */
  --cream: #f6f7e0;
  --navy: #0d2e68;
  --wine: #5f0a41;
  --coral: #fc5838;
  --ink-rgb: 13, 46, 104;
  --paper-rgb: 246, 247, 224;
  --wine-rgb: 95, 10, 65;
  --coral-rgb: 252, 88, 56;
  --shade-rgb: 13, 46, 104;      /* затемнение поверх фото */
  --on-shade-rgb: 246, 247, 224; /* текст поверх фото */
  --splash-bg: var(--wine);
  --splash-ink-rgb: 246, 247, 224;
  --feature-bg: var(--navy);
  --feature-ink-rgb: 246, 247, 224;
  --feature-icon: var(--coral);
  --primary-icon: var(--coral);
  --primary-hover: #12397f;
  --primary-glow: rgba(13, 46, 104, 0.22);
  --note-icon: var(--coral);
  /* роли */
  --bg: var(--cream);
  --surface: #fcfdf2;
  --surface-2: #ebedd1;
  --surface-3: #dfe2c2;
  --line: rgba(var(--ink-rgb), 0.1);
  --line-strong: rgba(var(--ink-rgb), 0.2);
  --text: var(--navy);
  --text-2: #405a82;
  --text-3: #546a8b;
  --primary: var(--navy);
  --primary-press: #0a2453;
  --on-primary: var(--cream);
  --accent: var(--coral);
  --accent-soft: rgba(var(--coral-rgb), 0.13);
  --accent-ink: #a8341a;
  --link: var(--wine);
  --wine-soft: rgba(var(--wine-rgb), 0.09);
  --ok: #23744a;
  --ok-soft: rgba(35, 116, 74, 0.11);
  --danger: #b42318;
  --danger-soft: rgba(180, 35, 24, 0.09);
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --shadow-1: 0 1px 2px rgba(var(--ink-rgb), 0.07), 0 8px 22px rgba(var(--ink-rgb), 0.07);
  --shadow-2: 0 2px 8px rgba(var(--ink-rgb), 0.1), 0 28px 64px rgba(var(--ink-rgb), 0.2);
  --font: "Geist", -apple-system, "Segoe UI", Roboto, sans-serif;
  --tight: -0.035em;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --gutter: 16px;
  --safe-bottom: max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px));
  --tabbar-h: 84px;
  --z-sticky: 10;
  --z-tabbar: 20;
  --z-actionbar: 25;
  --z-sheet: 40;
  --z-viewer: 60;
  --z-toast: 80;
  --z-splash: 100;
}

/* Тёмная тема: глубокий синий #0c2232, светло-серый #e1e1e1, золото #bc9b5a */
:root[data-theme="dark"] {
  color-scheme: dark;
  --cream: #0c2232;
  --navy: #e1e1e1;
  --wine: #bc9b5a;
  --coral: #bc9b5a;
  --ink-rgb: 225, 225, 225;
  --paper-rgb: 12, 34, 50;
  --wine-rgb: 188, 155, 90;
  --coral-rgb: 188, 155, 90;
  --shade-rgb: 7, 22, 33;
  --on-shade-rgb: 225, 225, 225;
  --splash-bg: #0c2232;
  --splash-ink-rgb: 225, 225, 225;
  --feature-bg: #bc9b5a;
  --feature-ink-rgb: 12, 34, 50;
  --feature-icon: #bc9b5a;
  --primary: #bc9b5a;
  --primary-press: #a8894e;
  --primary-hover: #c9aa6c;
  --on-primary: #0c2232;
  --primary-icon: #0c2232;
  --primary-glow: rgba(0, 0, 0, 0.3);
  --note-icon: #0c2232;
  --surface: #112b3f;
  --surface-2: #173650;
  --surface-3: #21425e;
  --text-2: #b7c0c9;
  --text-3: #96a1ac;
  --accent-ink: #d9bc82;
  --ok: #7cc79a;
  --ok-soft: rgba(124, 199, 154, 0.14);
  --danger: #f0877d;
  --danger-soft: rgba(240, 135, 125, 0.14);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 22px rgba(0, 0, 0, 0.22);
  --shadow-2: 0 2px 8px rgba(0, 0, 0, 0.35), 0 28px 64px rgba(0, 0, 0, 0.45);
}
/* На момент смены темы переходы выключены, чтобы цвета не «ползли» с разной скоростью */
.theme-switching, .theme-switching *, .theme-switching *::before, .theme-switching *::after { transition: none !important; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
::selection { background: rgba(var(--coral-rgb), 0.28); color: var(--navy); }
img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--link); text-decoration: none; }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; border-radius: 6px; }
input, textarea, select { caret-color: var(--coral); }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; inset-inline-start: 8px; top: -60px; padding: 10px 14px; background: var(--navy); color: var(--cream); border-radius: var(--radius-sm); z-index: var(--z-toast); }
.skip-link:focus { top: 8px; }

.icon { width: 20px; height: 20px; flex: none; stroke-width: 1.9; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 24px; height: 24px; }

/* ---------- заставка: «технический» текст в духе React Bits ---------- */
.splash {
  position: fixed; inset: 0; z-index: var(--z-splash);
  display: grid; place-content: center; justify-items: center; gap: 26px;
  background: var(--splash-bg); color: rgb(var(--splash-ink-rgb));
  transition: opacity 0.4s var(--ease), visibility 0.4s;
}
.splash.is-hidden { opacity: 0; visibility: hidden; }
.splash-word { font-weight: 800; font-size: clamp(44px, 15vw, 72px); line-height: 1; letter-spacing: -0.04em; white-space: nowrap; }
.splash-sel { position: relative; display: inline-block; color: transparent; -webkit-text-stroke: 1.5px rgb(var(--splash-ink-rgb)); }
.splash-sel::before { content: ""; position: absolute; inset: -6px -3px -4px; border: 1px dashed rgba(var(--splash-ink-rgb), 0.7);
  animation: sel-in 0.5s 0.35s var(--ease) backwards; }
.splash-sel i { position: absolute; width: 7px; height: 7px; background: rgb(var(--splash-ink-rgb)); border: 1px solid var(--splash-bg); animation: sel-in 0.4s 0.5s var(--ease) backwards; }
.splash-sel i:nth-child(1) { top: -9px; left: -6px; } .splash-sel i:nth-child(2) { top: -9px; right: -6px; }
.splash-sel i:nth-child(3) { bottom: -7px; left: -6px; } .splash-sel i:nth-child(4) { bottom: -7px; right: -6px; }
.splash-sel b { position: absolute; bottom: calc(100% + 10px); left: -6px; font: 500 11px/1 var(--font); letter-spacing: 0.02em; color: rgba(var(--splash-ink-rgb), 0.75);
  -webkit-text-stroke: 0; white-space: nowrap; animation: sel-in 0.4s 0.65s var(--ease) backwards; }
.splash-sub { font-weight: 600; font-size: 14px; letter-spacing: 0.01em; color: rgba(var(--splash-ink-rgb), 0.82); display: flex; align-items: center; gap: 10px; }
.splash-sub::before { content: ""; width: 22px; height: 3px; border-radius: 2px; background: var(--coral); }
.splash-road { width: 150px; height: 3px; border-radius: 2px; background: rgba(var(--splash-ink-rgb), 0.18); overflow: hidden; }
.splash-road::after { content: ""; display: block; width: 40%; height: 100%; background: var(--coral); animation: road 0.9s var(--ease) infinite alternate; }
/* только масштаб: если анимации не запустятся, рамка всё равно видна */
@keyframes sel-in { from { transform: scale(0.8); } }
@keyframes road { from { transform: translateX(0); } to { transform: translateX(150%); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- каркас ---------- */
.app { max-width: 560px; margin: 0 auto; min-height: 100dvh; position: relative; }
.page { padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 24px); }
.page--detail { padding-bottom: calc(84px + var(--safe-bottom)); }
.section { padding-inline: var(--gutter); }

.brandbar { display: flex; align-items: center; gap: 10px; padding: 14px var(--gutter) 12px; }
.brandmark { width: 32px; height: 32px; border-radius: 10px; background: var(--wine); color: var(--cream); display: grid; place-items: center; flex: none; }
.brandmark .icon { width: 19px; height: 19px; stroke-width: 2.2; }
.brandbar-name { font-weight: 800; font-size: 17px; white-space: nowrap; line-height: 1.1; letter-spacing: var(--tight); }
.brandbar-sub { font-size: 12px; color: var(--text-3); font-weight: 500; }
.brandbar-actions { margin-inline-start: auto; display: flex; gap: 8px; }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 18px; border: 0; border-radius: 13px;
  font-weight: 700; font-size: 15px; line-height: 1.2; letter-spacing: -0.01em; text-align: center;
  transition: background-color 0.15s var(--ease), transform 0.12s var(--ease), color 0.15s, box-shadow 0.15s;
  user-select: none;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; pointer-events: none; }
.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: 0 1px 0 rgba(255,255,255,0.12) inset, 0 6px 16px var(--primary-glow); }
.btn-primary .icon { color: var(--primary-icon); }
.btn-primary:active { background: var(--primary-press); }
.btn-secondary { background: var(--surface-2); color: var(--navy); }
.btn-secondary:active { background: var(--surface-3); }
.btn-ghost { background: transparent; color: var(--text-2); min-height: 44px; padding: 0 12px; font-weight: 600; }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-block { width: 100%; }
.btn-sm { min-height: 40px; padding: 0 13px; font-size: 14px; border-radius: 11px; font-weight: 600; }
@media (hover: hover) {
  .btn-primary:hover { background: var(--primary-hover); }
  .btn-secondary:hover { background: var(--surface-3); }
  .btn-ghost:hover { color: var(--navy); }
}
.icon-btn {
  width: 44px; height: 44px; display: grid; place-items: center; flex: none;
  border: 1px solid var(--line); border-radius: 13px; background: var(--surface); color: var(--navy);
  position: relative; transition: background-color 0.15s, transform 0.12s var(--ease);
}
.icon-btn:active { transform: scale(0.94); background: var(--surface-2); }
.icon-btn--float { background: rgba(var(--paper-rgb), 0.9); border-color: transparent; }
.icon-btn .dot { position: absolute; top: -5px; inset-inline-end: -5px; min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: 10px; background: var(--wine); color: var(--cream); font-size: 11px; font-weight: 700; line-height: 19px; text-align: center; box-shadow: 0 0 0 2px var(--bg); }
.link-btn { background: none; border: 0; padding: 6px 0; color: var(--link); font-weight: 700; text-decoration: underline; text-decoration-color: rgba(var(--wine-rgb), 0.35); text-underline-offset: 3px; }

/* ---------- чипы ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px var(--gutter); scroll-padding-inline: var(--gutter); }
.chips::-webkit-scrollbar { display: none; }
.chips--wrap { flex-wrap: wrap; overflow: visible; padding: 0; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: transparent; color: var(--navy); font-size: 14px; font-weight: 600; white-space: nowrap;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s, transform 0.12s var(--ease);
}
.chip:active { transform: scale(0.96); }
.chip.is-on { background: var(--navy); border-color: var(--navy); color: var(--cream); }
.chip .count { font-size: 12px; color: var(--text-3); font-weight: 500; }
.chip.is-on .count { color: rgba(var(--paper-rgb), 0.72); }
.chip--accent.is-on { background: var(--wine); border-color: var(--wine); color: var(--cream); }

/* ---------- герой со «ScrollExpand» ---------- */
.hero { padding: 0 0 18px; }
.hero-frame {
  position: relative; display: block; width: 100%; height: min(48vh, 400px); min-height: 280px;
  border: 0; padding: 0; background: rgb(var(--shade-rgb)); color: rgb(var(--on-shade-rgb)); text-align: start;
  overflow: hidden; contain: paint;
  clip-path: inset(0 var(--gutter) 0 var(--gutter) round var(--radius-lg));
  will-change: clip-path;
}
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform-origin: 50% 60%; will-change: transform; }
.hero-scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(var(--shade-rgb), 0) 32%, rgba(var(--shade-rgb), 0.55) 60%, rgba(var(--shade-rgb), 0.94) 100%); }
.hero-copy { position: absolute; inset-inline: calc(var(--gutter) + 18px); bottom: 20px; display: grid; gap: 7px; }
.hero-tag { justify-self: start; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 8px; border-radius: 8px;
  background: var(--cream); color: var(--wine); font-size: 12px; font-weight: 800; letter-spacing: 0.01em; }
.hero-tag .icon { color: var(--coral); fill: var(--coral); }
.hero-title { font-weight: 800; font-size: 23px; line-height: 1.1; letter-spacing: var(--tight); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hero-meta { display: flex; align-items: center; gap: 10px; color: rgba(var(--on-shade-rgb), 0.86); font-size: 14px; font-weight: 500; }
.hero-price { color: rgb(var(--on-shade-rgb)); font-weight: 800; font-size: 18px; letter-spacing: -0.02em; }
.hero-hint { display: flex; align-items: center; justify-content: center; gap: 6px; padding-top: 10px; color: var(--text-3); font-size: 12px; font-weight: 500; }
.hero-hint .icon { width: 14px; height: 14px; animation: nudge 1.8s var(--ease) infinite; }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(3px); } }

/* ---------- панель поиска ---------- */
.toolbar { position: sticky; top: 0; z-index: var(--z-sticky); background: var(--bg); padding-top: 10px; padding-bottom: 10px; box-shadow: 0 1px 0 var(--line); }
.toolbar-row { display: flex; gap: 8px; padding: 0 var(--gutter) 10px; }
.search { flex: 1; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border-radius: 13px; background: var(--surface); border: 1px solid var(--line); color: var(--text-3); }
.search:focus-within { border-color: var(--navy); }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 16px; color: var(--navy); }
.search input::placeholder { color: var(--text-3); }
.search-clear { border: 0; background: none; color: var(--text-3); padding: 6px; margin-inline-end: -6px; display: grid; }

.results-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px var(--gutter) 10px; }
.results-count { font-size: 14px; color: var(--text-3); font-weight: 500; }
.sort-select { appearance: none; border: 0; background: none; color: var(--navy); font-size: 14px; font-weight: 600; padding: 6px 22px 6px 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%230d2e68' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 2px center; }

/* ---------- карточки ---------- */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; padding: 0 var(--gutter); }
.card { position: relative; display: flex; flex-direction: column; min-width: 0; }
.card-link { position: absolute; inset: 0; z-index: 1; border-radius: var(--radius); }
.card-media { position: relative; aspect-ratio: 4 / 3.3; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-media::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(var(--ink-rgb), 0.1); pointer-events: none; }
.card.is-sold .card-media img { filter: grayscale(0.9); opacity: 0.6; }
.card-fav { position: absolute; top: 4px; inset-inline-end: 4px; z-index: 2; width: 44px; height: 44px; border: 0; background: none; display: grid; place-items: center; color: var(--navy); }
.card-fav span { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: rgba(var(--paper-rgb), 0.9); }
.card-fav .icon { width: 17px; height: 17px; }
.card-fav.is-on .icon, .fav-inline.is-on .icon { fill: var(--coral); stroke: var(--coral); }
.card-body { padding: 10px 2px 0; display: grid; gap: 3px; }
.card-price { font-weight: 800; font-size: 17px; letter-spacing: -0.025em; }
.card-price.is-ask { font-size: 15px; font-weight: 700; color: var(--wine); letter-spacing: -0.01em; }
.card-old { margin-inline-start: 6px; font-size: 13px; font-weight: 500; color: var(--text-3); text-decoration: line-through; }
.card-title { font-size: 14px; line-height: 1.35; font-weight: 500; color: var(--navy); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { font-size: 13px; color: var(--text-3); }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
@media (hover: hover) { .card:hover .card-media { box-shadow: var(--shadow-1); } }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 7px; font-size: 12px; font-weight: 700; line-height: 1.4; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--plain::before { display: none; }
.badge-in_stock { background: var(--ok-soft); color: var(--ok); }
.badge-on_order { background: var(--wine-soft); color: var(--wine); }
.badge-in_transit { background: rgba(var(--ink-rgb), 0.09); color: var(--navy); }
.badge-reserved { background: var(--accent-soft); color: var(--accent-ink); }
.badge-sold { background: rgba(var(--ink-rgb), 0.08); color: var(--text-2); }
.badge-fit { background: var(--ok-soft); color: var(--ok); }
.badge-fit::before { display: none; }
.card-media .badge { position: absolute; top: 10px; inset-inline-start: 10px; background: rgba(var(--paper-rgb), 0.94); }

/* ---------- пусто / ошибка ---------- */
.empty { padding: 48px var(--gutter); display: grid; justify-items: center; gap: 10px; text-align: center; }
.empty-icon { width: 56px; height: 56px; border-radius: 16px; background: var(--surface-2); display: grid; place-items: center; color: var(--wine); margin-bottom: 6px; }
.empty h3 { font-size: 19px; font-weight: 800; letter-spacing: var(--tight); }
.empty p { color: var(--text-2); max-width: 32ch; }
.empty .btn { margin-top: 10px; }

.skeleton { background: linear-gradient(90deg, var(--surface-2) 0%, var(--surface) 50%, var(--surface-2) 100%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; border-radius: var(--radius); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- нижняя навигация ---------- */
/* Док: плавающая панель с переезжающей подсветкой и увеличением под пальцем */
.dock-wrap { position: fixed; inset-inline: 0; bottom: 0; z-index: var(--z-tabbar); display: flex; justify-content: center;
  padding: 0 12px calc(10px + var(--safe-bottom)); pointer-events: none; }
.dock { pointer-events: auto; position: relative; display: flex; width: 100%; max-width: 440px; padding: 6px; border-radius: 24px;
  background: rgba(var(--paper-rgb), 0.92); border: 1px solid var(--line); box-shadow: var(--shadow-2);
  touch-action: none; user-select: none; -webkit-user-select: none; }
.dock-pill { position: absolute; top: 6px; bottom: 6px; left: 0; border-radius: 18px; background: rgba(var(--ink-rgb), 0.08);
  transition: transform 0.38s cubic-bezier(0.34, 1.4, 0.64, 1), width 0.38s cubic-bezier(0.34, 1.4, 0.64, 1); }
.dock.is-scrubbing .dock-pill { transition-duration: 0.2s; }
.dock-item { position: relative; z-index: 1; flex: 1; min-width: 0; min-height: 54px; display: grid; place-content: center; justify-items: center; gap: 3px;
  padding: 0; border: 0; background: none; color: var(--text-3); font-size: 11px; font-weight: 600; }
.dock-icon { position: relative; display: grid; place-items: center; width: 28px; height: 26px; transform-origin: 50% 100%;
  transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1); }
.dock.is-scrubbing .dock-icon { transition-duration: 0.08s; }
.dock-icon .icon { width: 22px; height: 22px; }
.dock-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color 0.2s; }
.dock-item.is-lit { color: var(--navy); }
.dock-item.is-lit .dock-label { font-weight: 700; }
.dock-item.is-lit .icon { color: var(--coral); }
.dock-item .dot { position: absolute; top: -4px; inset-inline-start: 18px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  background: var(--wine); color: var(--cream); font-size: 10px; line-height: 16px; font-weight: 700; }
/* Смена разделов */
.page-anim.from-right { animation: page-in-right 0.26s var(--ease); }
.page-anim.from-left { animation: page-in-left 0.26s var(--ease); }
@keyframes page-in-right { from { opacity: 0.4; transform: translateX(18px); } }
@keyframes page-in-left { from { opacity: 0.4; transform: translateX(-18px); } }

/* ---------- страница объявления ---------- */
.gallery { position: relative; background: var(--surface-2); }
.gallery-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; aspect-ratio: 4 / 3.2; }
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-slide { flex: 0 0 100%; scroll-snap-align: center; border: 0; padding: 0; background: var(--surface-2); }
.gallery-slide img { width: 100%; height: 100%; object-fit: cover; }
.gallery-count { position: absolute; bottom: 12px; inset-inline-end: 12px; padding: 4px 10px; border-radius: 8px; background: rgba(var(--shade-rgb), 0.82); color: rgb(var(--on-shade-rgb)); font-size: 13px; font-weight: 700; }
.gallery-thumbs { display: flex; gap: 6px; padding: 10px var(--gutter) 0; overflow-x: auto; scrollbar-width: none; }
.gallery-thumbs::-webkit-scrollbar { display: none; }
.gallery-thumb { flex: none; width: 56px; height: 44px; padding: 0; border: 0; border-radius: 8px; overflow: hidden; opacity: 0.55; transition: opacity 0.15s; background: var(--surface-2); }
.gallery-thumb.is-on { opacity: 1; box-shadow: 0 0 0 2px var(--navy); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

.detail-head { padding: 18px var(--gutter) 0; display: grid; gap: 8px; }
.detail-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.detail-price strong { font-weight: 800; font-size: 30px; line-height: 1.05; letter-spacing: -0.04em; }
.detail-price s { color: var(--text-3); font-size: 15px; }
.detail-title { font-size: 20px; font-weight: 700; line-height: 1.25; letter-spacing: -0.02em; }
.detail-badges { display: flex; flex-wrap: wrap; gap: 8px; }

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 18px var(--gutter) 0; }
.fact { padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); display: grid; gap: 2px; }
.fact-label { font-size: 12px; color: var(--text-3); font-weight: 500; }
.fact-value { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }

.fitline { margin: 14px var(--gutter) 0; display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.fitline .icon { color: var(--text-3); }
.fitline--ok { background: var(--ok-soft); border-color: transparent; } .fitline--ok .icon { color: var(--ok); }
.fitline--near { background: var(--accent-soft); border-color: transparent; } .fitline--near .icon { color: var(--accent-ink); }
.fitline--no { background: var(--wine-soft); border-color: transparent; } .fitline--no .icon { color: var(--wine); }
.fitline p { font-size: 14px; color: var(--text-2); }
.fitline strong { display: block; color: var(--navy); font-size: 15px; font-weight: 700; }
.fitline .link-btn { margin-inline-start: auto; white-space: nowrap; }

.block { padding: 30px var(--gutter) 0; }
.block-title { font-size: 19px; font-weight: 800; letter-spacing: var(--tight); margin-bottom: 12px; }
.prose { color: var(--text-2); white-space: pre-line; line-height: 1.6; max-width: 70ch; }
.prose.is-clamped { display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden; }
.specs { display: grid; margin: 0; }
.spec { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.spec:last-child { border-bottom: 0; }
.spec dt { color: var(--text-3); }
.spec dd { margin: 0; color: var(--navy); font-weight: 500; }
.equip { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.equip li { display: grid; gap: 2px; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.equip b { font-size: 12px; color: var(--wine); font-weight: 700; }
.equip span { font-size: 14px; color: var(--navy); }
.condition { display: grid; gap: 10px; }
.condition-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--text-2); font-weight: 500; }
.stars { display: inline-flex; gap: 2px; color: var(--surface-3); }
.stars .icon { width: 16px; height: 16px; fill: currentColor; stroke: none; }
.stars .on { color: var(--coral); }

.hscroll { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; padding: 0 var(--gutter); scroll-snap-type: x proximity; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll .card { flex: 0 0 44%; scroll-snap-align: start; }

.actionbar { position: fixed; inset-inline: 0; bottom: 0; z-index: var(--z-actionbar); display: flex; justify-content: center;
  background: rgba(var(--paper-rgb), 0.97); box-shadow: 0 -1px 0 var(--line); padding: 10px var(--gutter) calc(10px + var(--safe-bottom)); }
.actionbar-inner { display: flex; gap: 10px; width: 100%; max-width: calc(560px - 2 * var(--gutter)); }
.actionbar .btn { flex: 1; }
.actionbar .btn-primary { flex: 1.35; }

/* ---------- шторка снизу ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: var(--z-sheet); background: rgba(var(--ink-rgb), 0.38); opacity: 0; transition: opacity 0.25s var(--ease); }
.sheet-backdrop.is-open { opacity: 1; }
.sheet {
  position: fixed; inset-inline: 0; bottom: 0; z-index: calc(var(--z-sheet) + 1);
  max-width: 560px; margin: 0 auto; max-height: 92dvh; display: flex; flex-direction: column;
  background: var(--bg); border-radius: var(--radius-lg) var(--radius-lg) 0 0; box-shadow: var(--shadow-2);
  transform: translateY(100%); transition: transform 0.32s var(--ease);
}
.sheet.is-open { transform: translateY(0); }
.sheet.is-closing { transition: transform 0.2s var(--ease-in); }
.sheet-handle { width: 40px; height: 4px; border-radius: 2px; background: var(--line-strong); margin: 10px auto 0; flex: none; }
.sheet-head { display: flex; align-items: center; gap: 12px; padding: 10px var(--gutter) 6px; flex: none; }
.sheet-head h2 { flex: 1; font-size: 21px; font-weight: 800; letter-spacing: var(--tight); }
.sheet-head .icon-btn { background: var(--surface-2); border: 0; width: 40px; height: 40px; border-radius: 50%; }
.sheet-body { overflow-y: auto; padding: 6px var(--gutter) 18px; overscroll-behavior: contain; flex: 1; }
.sheet-foot { flex: none; display: flex; gap: 10px; align-items: center; padding: 12px var(--gutter) calc(12px + var(--safe-bottom)); box-shadow: 0 -1px 0 var(--line); }
.sheet-foot .btn-primary { flex: 1; }

.fgroup { padding: 16px 0; border-bottom: 1px solid var(--line); }
.fgroup:last-child { border-bottom: 0; }
.fgroup h3 { font-size: 15px; font-weight: 700; color: var(--navy); margin-bottom: 12px; letter-spacing: -0.01em; }

/* ---------- формы ---------- */
.field { display: grid; gap: 7px; margin-bottom: 16px; }
.field-label { font-size: 13px; font-weight: 700; color: var(--navy); }
.field-hint { font-size: 12px; color: var(--text-3); }
.input, .textarea, .select {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--navy); font-size: 16px; outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:focus, .textarea:focus, .select:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(var(--ink-rgb), 0.12); }
.textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.select { appearance: none; padding-inline-end: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%230d2e68' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }

.slider-field { display: grid; gap: 10px; margin-bottom: 20px; }
.slider-top { display: flex; align-items: baseline; justify-content: space-between; }
.slider-value { font-weight: 800; font-size: 28px; line-height: 1; letter-spacing: -0.04em; }
.slider-value small { font-weight: 600; font-size: 13px; color: var(--text-3); margin-inline-start: 4px; letter-spacing: 0; }
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 30px; background: transparent; }
.range::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--coral) var(--p, 50%), var(--surface-3) var(--p, 50%)); }
.range::-moz-range-track { height: 6px; border-radius: 3px; background: var(--surface-3); }
.range::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--coral); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: -11px; border-radius: 50%; background: var(--navy); border: 3px solid var(--cream); box-shadow: 0 2px 8px rgba(var(--ink-rgb), 0.35); }
.range::-moz-range-thumb { width: 26px; height: 26px; border: 3px solid var(--cream); border-radius: 50%; background: var(--navy); }

.seg { display: flex; padding: 4px; gap: 4px; border-radius: 13px; background: var(--surface-2); }
.seg button { flex: 1; min-height: 40px; border: 0; border-radius: 10px; background: none; color: var(--text-2); font-weight: 700; font-size: 14px; transition: background-color 0.15s, color 0.15s; }
.seg button.is-on { background: var(--navy); color: var(--cream); }

.options { display: grid; gap: 8px; }
.option { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); text-align: start; color: var(--navy); transition: border-color 0.15s, background-color 0.15s; }
.option.is-on { border-color: var(--navy); background: rgba(var(--ink-rgb), 0.05); box-shadow: inset 0 0 0 1px var(--navy); }
.option-radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--text-3); flex: none; display: grid; place-items: center; }
.option.is-on .option-radio { border-color: var(--navy); }
.option.is-on .option-radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--coral); }
.option-text { flex: 1; font-size: 15px; font-weight: 500; }
.option-note { font-size: 12px; font-weight: 700; color: var(--ok); }

.steps { display: flex; gap: 6px; padding: 4px var(--gutter) 6px; }
.steps i { flex: 1; height: 4px; border-radius: 2px; background: var(--surface-3); transition: background-color 0.25s; }
.steps i.is-on { background: var(--coral); }

.summary { display: grid; gap: 0; padding: 4px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.preview-msg { padding: 12px 14px; border-radius: 16px 16px 16px 4px; background: var(--surface); border: 1px solid var(--line); color: var(--text-2); font-size: 14px; white-space: pre-line; line-height: 1.5; }
.preview-label { font-size: 12px; font-weight: 700; color: var(--text-3); margin: 14px 0 8px; }

.done { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 26px 0 8px; }
.done-mark { width: 68px; height: 68px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; }
.done-mark .icon { width: 34px; height: 34px; stroke-width: 2.4; }
.done-mark .icon path { stroke-dasharray: 30; stroke-dashoffset: 0; animation: check-draw 0.5s 0.1s var(--ease) backwards; }
@keyframes check-draw { from { stroke-dashoffset: 30; } }
.done h3 { font-size: 21px; font-weight: 800; letter-spacing: var(--tight); }
.done p { color: var(--text-2); max-width: 34ch; }

/* ---------- полноэкранный просмотр фото ---------- */
.viewer { position: fixed; inset: 0; z-index: var(--z-viewer); background: rgb(var(--shade-rgb)); display: flex; flex-direction: column; }
.viewer-track { flex: 1; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.viewer-track::-webkit-scrollbar { display: none; }
.viewer-slide { flex: 0 0 100%; scroll-snap-align: center; display: grid; place-items: center; overflow: hidden; }
.viewer-slide img { max-width: 100%; max-height: 100%; object-fit: contain; transition: transform 0.25s var(--ease); }
.viewer-slide img.is-zoomed { transform: scale(2.2); }
.viewer-top { position: absolute; top: 0; inset-inline: 0; display: flex; justify-content: space-between; align-items: center; padding: 12px var(--gutter); z-index: 1; }
.viewer-count { font-weight: 700; color: rgb(var(--on-shade-rgb)); }

/* ---------- заголовки страниц, отзывы ---------- */
.page-head { padding: 20px var(--gutter) 14px; display: grid; gap: 6px; }
.page-head h1 { font-weight: 800; font-size: 32px; line-height: 1.05; letter-spacing: -0.04em; }
.page-head p { color: var(--text-2); font-size: 14px; }
.reviews { display: grid; gap: 14px; padding: 0 var(--gutter); }
.review { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.review-photos { display: flex; gap: 4px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.review-photos::-webkit-scrollbar { display: none; }
.review-photos button { flex: 0 0 100%; aspect-ratio: 4 / 3.4; padding: 0; border: 0; background: var(--surface-2); scroll-snap-align: start; }
.review-photos.is-multi button { flex-basis: 82%; }
.review-photos img { width: 100%; height: 100%; object-fit: cover; }
.review-body { padding: 14px 16px 16px; display: grid; gap: 10px; }
.review-head { display: flex; align-items: center; gap: 10px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--wine); display: grid; place-items: center; font-weight: 800; font-size: 15px; color: var(--cream); flex: none; }
.review-author { font-weight: 700; font-size: 15px; }
.review-date { font-size: 12px; color: var(--text-3); }
.review-text { color: var(--text-2); white-space: pre-line; font-size: 14px; line-height: 1.55; }
.review-text.is-clamped { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.review-actions { display: flex; gap: 10px; }
.review-actions .btn { flex: 1; }

/* ---------- подбор размера ---------- */
.card-panel { margin: 0 var(--gutter); padding: 18px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
.result { margin: 14px var(--gutter) 0; padding: 18px; border-radius: var(--radius-lg); background: var(--feature-bg); color: rgb(var(--feature-ink-rgb)); display: grid; gap: 14px; }
.result-main { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.result-main strong { font-weight: 800; font-size: 44px; line-height: 1; letter-spacing: -0.04em; color: rgb(var(--feature-ink-rgb)); }
.result-main span { color: rgba(var(--feature-ink-rgb), 0.82); font-weight: 600; }
.result .spec { padding: 9px 0; border-color: rgba(var(--feature-ink-rgb), 0.14); }
.result .spec dt { color: rgba(var(--feature-ink-rgb), 0.72); }
.result .spec dd { color: rgb(var(--feature-ink-rgb)); }
.result .btn-primary { background: rgb(var(--feature-ink-rgb)); color: var(--feature-bg); box-shadow: none; }
.result .btn-primary .icon { color: var(--feature-icon); }
.result .btn-secondary { background: rgba(var(--feature-ink-rgb), 0.12); color: rgb(var(--feature-ink-rgb)); }

/* ---------- админка ---------- */
.admin-list { display: grid; gap: 8px; padding: 0 var(--gutter); }
.admin-item { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--navy); text-align: start; width: 100%; }
.admin-item .icon { color: var(--wine); }
.admin-item-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.admin-item-title { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-item-sub { font-size: 13px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-item img { width: 56px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--surface-2); flex: none; }
.admin-item.is-dim { opacity: 0.55; }
.statline { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 0 var(--gutter) 18px; color: var(--text-3); font-size: 14px; }
.statline b { color: var(--navy); font-weight: 800; }
.form { padding: 0 var(--gutter); }
.form-section { padding: 18px 0 4px; border-top: 1px solid var(--line); }
.form-section:first-child { border-top: 0; padding-top: 4px; }
.form-section h3 { font-size: 16px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 14px; }
.photos-edit { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.photo-edit { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.photo-edit img { width: 100%; height: 100%; object-fit: cover; }
.photo-edit-tools { position: absolute; inset-inline: 0; bottom: 0; display: flex; justify-content: space-between; padding: 4px; background: linear-gradient(0deg, rgba(var(--shade-rgb), 0.7), transparent); }
.photo-edit-tools button { width: 32px; height: 32px; border: 0; border-radius: 8px; background: rgba(var(--paper-rgb), 0.92); color: var(--navy); display: grid; place-items: center; }
.photo-edit-tools .icon { width: 16px; height: 16px; }
.photo-edit .main-tag { position: absolute; top: 6px; inset-inline-start: 6px; font-size: 11px; font-weight: 800; padding: 2px 6px; border-radius: 6px; background: var(--wine); color: var(--cream); }
.photo-add { aspect-ratio: 1; border-radius: 10px; border: 1.5px dashed var(--line-strong); background: none; color: var(--text-2); display: grid; place-content: center; justify-items: center; gap: 4px; font-size: 12px; font-weight: 600; }
.pairs { display: grid; gap: 8px; margin-bottom: 10px; }
.pair { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr) 40px; gap: 6px; align-items: center; }
.pair .input { min-height: 42px; padding: 8px 10px; font-size: 14px; }
.pair .icon-btn { width: 40px; height: 40px; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 6px 0; font-weight: 600; }
.toggle-text { display: grid; gap: 2px; }
.toggle-text span { font-size: 13px; color: var(--text-3); font-weight: 400; }
.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch i { position: absolute; inset: 0; border-radius: 15px; background: var(--surface-3); transition: background-color 0.2s; pointer-events: none; }
.switch i::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(var(--ink-rgb), 0.3); transition: transform 0.2s var(--ease); }
.switch input:checked + i { background: var(--primary); }
.switch input:checked + i::after { transform: translateX(20px); }
.switch input:focus-visible + i { outline: 2px solid var(--navy); outline-offset: 2px; }
.savebar { position: fixed; inset-inline: 0; bottom: 0; z-index: var(--z-actionbar); display: flex; justify-content: center; gap: 10px;
  padding: 10px var(--gutter) calc(10px + var(--safe-bottom)); background: rgba(var(--paper-rgb), 0.97); box-shadow: 0 -1px 0 var(--line); }
.savebar .btn-primary { flex: 1; max-width: 420px; }
.lead { padding: 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); display: grid; gap: 8px; }
.lead-head { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--text-3); }
.lead-title { font-weight: 700; }
.lead-data { font-size: 14px; color: var(--text-2); white-space: pre-line; }
.lead-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.note { margin: 0 var(--gutter) 16px; padding: 14px 16px; border-radius: 14px; background: var(--wine); color: rgba(var(--paper-rgb), 0.9); font-size: 14px; display: flex; gap: 12px; }
.note .icon { color: var(--note-icon); margin-top: 1px; }
.note .link-btn { color: var(--cream); text-decoration-color: rgba(var(--paper-rgb), 0.5); }

/* ---------- уведомление ---------- */
.toast { position: fixed; inset-inline: var(--gutter); bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 16px); z-index: var(--z-toast);
  max-width: 420px; margin: 0 auto; padding: 13px 16px; border-radius: 12px; background: var(--navy); color: var(--cream); font-weight: 600; font-size: 14px;
  box-shadow: var(--shadow-2); animation: toast-in 0.25s var(--ease); }
.toast--error { background: var(--danger); color: #fff; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .hero-img { transform: none !important; }
}

/* ---------- переключатель темы: велосипедист ---------- */
/* Кнопка темы: круглая «мультяшная» таблетка — приподнимается и бликует при наведении (идея CartoonButton с 21st.dev) */
.rider { position: relative; flex: 0 1 148px; min-width: 124px; height: 52px; margin-inline-start: auto; padding: 0 6px 0 10px;
  display: flex; align-items: center; gap: 4px; overflow: hidden; color: inherit; cursor: pointer;
  border: 2px solid var(--navy); border-radius: 999px; background: var(--surface);
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease); }
.rider:active { transform: translateY(0); box-shadow: none; }
@media (hover: hover) { .rider:hover { transform: translateY(-3px); box-shadow: 0 4px 0 0 var(--navy); } }
.rider-shine { position: absolute; top: 50%; left: -60%; width: 34px; height: 90px; background: rgba(255, 255, 255, 0.55);
  transform: translateY(-50%) rotate(14deg); transition: left 0.6s ease-in-out; pointer-events: none; }
:root[data-theme="dark"] .rider-shine { background: rgba(225, 225, 225, 0.18); }
@media (hover: hover) { .rider:hover .rider-shine { left: 160%; } }
.rider:active .rider-shine { left: 160%; transition-duration: 0.45s; }
.rider-mode { position: relative; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--surface-2); color: var(--navy); }
.rider-sun, .rider-moon { position: absolute; inset: 0; display: grid; place-items: center;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s; }
.rider-sun .icon, .rider-moon .icon { width: 18px; height: 18px; }
.rider-sun { color: var(--coral); }
.rider-moon { transform: scale(0.5) translateY(18px); opacity: 0; color: var(--coral); }
.rider.is-dark .rider-sun { transform: scale(0.5) translateY(18px); opacity: 0; }
.rider.is-dark .rider-moon { transform: none; opacity: 1; }
.rider-svg { display: block; flex: 1; min-width: 0; overflow: visible; margin-top: 4px; }
.rider-road { stroke: var(--line-strong); stroke-width: 1; stroke-dasharray: 3 4; }
.rider-wheel { fill: none; stroke: var(--navy); stroke-width: 2; }
.rider-spokes { fill: none; stroke: var(--text-3); stroke-width: 0.6; }
.rider-frame { fill: none; stroke: var(--coral); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.rider-bar, .rider-crank { fill: none; stroke: var(--navy); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.rider-torso { fill: none; stroke: var(--wine); stroke-width: 4.4; stroke-linecap: round; }
.rider-arm { fill: none; stroke: var(--wine); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.rider-leg, .rider-leg-far { fill: none; stroke: var(--navy); stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
.rider-leg-far { opacity: 0.45; }
.rider-head { fill: #efc8a0; }
.rider-helmet { fill: var(--coral); }
.rider-skid { fill: none; stroke: var(--navy); stroke-width: 1.4; stroke-linecap: round; }
.rider-smoke { fill: var(--text-3); }
@media (hover: hover) { .rider:hover .rider-road { stroke: var(--text-3); } }
:root[data-theme="dark"] .sort-select, :root[data-theme="dark"] .select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23e1e1e1' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

/* ---------- видео в объявлениях ---------- */
.gallery-slide video, .viewer-slide video { width: 100%; height: 100%; object-fit: contain; background: rgb(var(--shade-rgb)); }
.media-video { position: relative; display: block; width: 100%; height: 100%; }
.media-video video { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.media-play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; }
.media-play .icon { width: 18px; height: 18px; fill: #fff; filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5)); }
.media-flag { position: absolute; bottom: 8px; inset-inline-start: 8px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px;
  border-radius: 7px; background: rgba(var(--shade-rgb), 0.82); color: rgb(var(--on-shade-rgb)); font-size: 12px; font-weight: 700; }
.media-flag .icon { fill: currentColor; }
.steps-list { margin: 0 0 14px; padding-inline-start: 20px; display: grid; gap: 8px; color: var(--text-2); font-size: 14px; }
.code-box { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 10px 10px 14px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line-strong); }
.code-box code { font: 600 15px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--navy); word-break: break-all; }

/* Иконка фильтров: ползунки разъезжаются при наведении или нажатии */
.filter-icon .fi-l { transform-box: fill-box; transform-origin: left center; }
.filter-icon .fi-r { transform-box: fill-box; transform-origin: right center; }
@media (hover: hover) {
  .filter-btn:hover .fi-1 .fi-k, .filter-btn:hover .fi-3 .fi-k { animation: fi-knob-right 0.7s var(--ease); }
  .filter-btn:hover .fi-2 .fi-k { animation: fi-knob-left 0.7s var(--ease); }
  .filter-btn:hover .fi-1 .fi-l, .filter-btn:hover .fi-3 .fi-l { animation: fi-grow 0.7s var(--ease); }
  .filter-btn:hover .fi-1 .fi-r, .filter-btn:hover .fi-3 .fi-r { animation: fi-shrink 0.7s var(--ease); }
  .filter-btn:hover .fi-2 .fi-l { animation: fi-shrink-l 0.7s var(--ease); }
  .filter-btn:hover .fi-2 .fi-r { animation: fi-grow-r 0.7s var(--ease); }
}
.filter-btn:active .fi-1 .fi-k, .filter-btn:active .fi-3 .fi-k { animation: fi-knob-right 0.5s var(--ease); }
.filter-btn:active .fi-2 .fi-k { animation: fi-knob-left 0.5s var(--ease); }
@keyframes fi-knob-right { 40% { transform: translateX(3px); } 75% { transform: translateX(-1px); } }
@keyframes fi-knob-left { 40% { transform: translateX(-3px); } 75% { transform: translateX(1px); } }
@keyframes fi-grow { 40% { transform: scaleX(1.4); } 75% { transform: scaleX(0.9); } }
@keyframes fi-shrink { 40% { transform: scaleX(0.6); } 75% { transform: scaleX(1.1); } }
@keyframes fi-shrink-l { 40% { transform: scaleX(0.3); } 75% { transform: scaleX(1.2); } }
@keyframes fi-grow-r { 40% { transform: scaleX(1.25); } 75% { transform: scaleX(0.95); } }
