/* ============================================================
   PARSER XONIX — «монохромная галерея»
   ------------------------------------------------------------
   Вещь подаётся как экспонат, а не как товар. Отсюда решения:

   · цвета нет вообще — акцент даёт только яркость, шкала идёт
     от чёрного зала до кости;
   · сетка держится на волосяных швах в один пиксель, по которым
     медленно проходит свет и на долю секунды поджигает узлы;
   · серифом (Playfair Display) сказано только то, что важно: заголовки
     и цифры мерок. Гротеск 9–15px несёт всю служебную часть;
   · ни одного скругления и ни одной декоративной тени. Углы
     плашек срезаются, а не скругляются.

   Каталог живёт чужими фотографиями: любой собственный цвет
   интерфейса с ними дерётся, монохром — нет. Это и есть причина,
   по которой смоляной потёк из прошлой итерации снят целиком.

   Тёмная тема основная. Светлая — тот же зал при дневном свете.
   ============================================================ */

/* ---------------------------------------------------------- палитра
   Тёмный зал 2a. Он же значение по умолчанию: если Telegram
   не сказал, какая у него тема, показываем чёрное. */

:root {
  --hall:      #000000;   /* пол и стены зала */
  --hall-2:    #0a0a0a;   /* поверхность на тон выше */
  --plate:     #1c1c1c;   /* плашки, поля ввода */
  --plate-2:   #262626;   /* плашка под курсором */
  --edge:      #3a3a3a;   /* граница, которую видно */
  --hair:      #1c1c1c;   /* волосяной шов сетки */
  --hair-lit:  #595855;   /* шов, который несёт смысл */

  --mute:      #595855;   /* служебный текст и линии */
  --mute-2:    #6f6f6f;
  --dim:       #808080;   /* подписи, капс с трекингом */
  --text:      #c4c3b6;   /* основной текст */
  --text-lit:  #e7e5e4;   /* то, что важно */
  --flare:     #ffffff;   /* вспышка узла, блик по шву */

  --scrim:     rgba(0, 0, 0, .55);   /* шторка под шапкой на фото */

  /* Заставка. В тёмном зале полотно висит во весь экран, в светлом —
     полосой сверху, и низ уходит в путти-канвас. Разница не в цвете,
     а в раскладке, поэтому она живёт переменными. */
  --splash-art-h: 100%;
  --splash-ink: #ffffff;
  --splash-ink-2: #a9a89c;
  --splash-line: rgba(255, 255, 255, .5);
  --splash-veil: linear-gradient(0deg, rgba(0, 0, 0, .82) 0,
                                 rgba(0, 0, 0, .35) 220px,
                                 rgba(0, 0, 0, 0) 420px);

  --gap: 1px;
  --pad: 20px;
  --notch: 14px;           /* срез угла у плашек вместо скругления */

  /* Оба шрифта — с кириллицей. У прежних (Bodoni Moda, Archivo) её не
     было: русские буквы брались из запасного шрифта, латинские — из
     основного, и в «Худи Bape» буквы были разного роста и рисунка. */
  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-ui: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --ease: cubic-bezier(.16, .84, .44, 1);
  --slow: 520ms;

  color-scheme: dark;
}

/* Зал один — тёмный. Светлая тема была и выглядела плохо: фото вещей
   на путти-фоне терялись. Тема Telegram на витрину не влияет. */

/* ---------------------------------------------------------- основа */

* { box-sizing: border-box; }

html, body {
  /* цифры одного роста: у Playfair по умолчанию «старинные», пляшущие */
  font-variant-numeric: lining-nums;
  margin: 0;
  padding: 0;
  background: var(--hall);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Цифры мерок и цен — табличные всегда и везде. Это функция:
   колонка «112 / 84 / 275» должна читаться сверху вниз без усилий. */
b, input[type="number"], .obj-price, .obj-spec, .stamp b,
.measure-row input, .spec-table td, .count-row b {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 var(--pad) 132px;
}

.hidden { display: none !important; }

/* ---------------------------------------------------------- волосяной шов
   Заменил собой смоляной потёк прошлой итерации. Это просто линия
   в один пиксель, по которой раз в одиннадцать секунд проходит свет.
   Держится только на крупных поверхностях: шапка, панель условий,
   кромка фотографии в карточке. На каждой карточке каталога такой
   же шов положил бы прокрутку. */

.seam {
  display: block;
  position: relative;
  height: 1px;
  background: var(--hair-lit);
  overflow: hidden;
}

.seam--thin { background: var(--hair); }

.seam::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 160px;
  height: 1px;
  background: linear-gradient(90deg,
    rgba(255, 255, 255, 0), var(--flare), rgba(255, 255, 255, 0));
  animation: runH 11s linear infinite;
}

@keyframes runH {
  0%           { transform: translateX(-160px); opacity: 0 }
  5%           { opacity: .9 }
  26%          { transform: translateX(min(100vw, 1080px)); opacity: .9 }
  31%, 100%    { transform: translateX(min(100vw, 1080px)); opacity: 0 }
}

/* ---------------------------------------------------------- шапка */

.head {
  padding: 22px 0 0;
  position: relative;
}

/* Шапка — фриз: полоса того же полотна, что на заставке, приглушённая
   до полутьмы. Раньше оно сидело в значке 64px и читалось как пятно.
   Затемнение гуще по краям — там буква и счётчики. */
.head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 104px;
  padding: 0 18px;
  margin-bottom: 18px;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .74) 0, rgba(0, 0, 0, .5) 38%,
                           rgba(0, 0, 0, .5) 55%, rgba(0, 0, 0, .8) 100%),
    url("../img/head-frieze.webp") center 30% / cover no-repeat var(--hall-2);
  outline: 1px solid var(--hair);
}

/* Буква — та самая, что в логотипе, картинкой: Playfair похож, но не она. */
.wordmark { margin: 0; line-height: 0 }
.wordmark img { display: block; width: auto; height: 52px }

.wordmark em {
  display: block;
  font-style: normal;
  font-weight: 400;
  color: var(--mute);
}

.stamp {
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: right;
  font-size: 9px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--text);       /* на полотне серый --dim не читался */
}

.stamp b {
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--flare);
}

/* Заметка на полях — как надпись карандашом на обороте паспарту.
   На телефоне её нет: там нет полей. */
.margin-note {
  position: fixed;
  left: 10px;
  top: 50%;
  transform: rotate(180deg) translateY(50%);
  writing-mode: vertical-rl;
  font-size: 9px;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--mute);
  pointer-events: none;
  z-index: 2;
}
@media (max-width: 1180px) { .margin-note { display: none } }

/* ---------------------------------------------------------- иконки
   Phosphor, толщина light: тонкая линия того же веса, что швы сетки.
   Цвет берут у текста — яркость, а не цвет, по-прежнему несёт смысл. */

.sprite { display: none }

.ic {
  flex: none;
  width: 18px;
  height: 18px;
  fill: currentColor;
  vertical-align: -4px;
}

/* ---------------------------------------------------------- запрос */

.query {
  display: flex;
  gap: var(--gap);
  background: var(--hair);
  border: 1px solid var(--hair);
  margin-bottom: 14px;
}

.query-field {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 14px;
  background: var(--hall-2);
  color: var(--dim);
  transition: background var(--slow) var(--ease);
}
.query-field:focus-within { background: var(--plate) }

.query input {
  flex: 1;
  min-width: 0;
  min-height: 52px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-lit);
  font-family: var(--font-ui);
  font-size: 15px;
}
.query input::placeholder { color: var(--mute); }
.query input:focus { outline: 0 }
.query input::-webkit-search-cancel-button { display: none }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 48px;
  border: 0;
  background: none;
  color: var(--text);
  cursor: pointer;
  transition: color var(--slow) var(--ease);
}
.icon-btn:hover { color: var(--text-lit) }
.icon-btn .ic { width: 22px; height: 22px }

.query button.solid {
  min-height: 52px;
  padding: 0 20px;
  border: 0;
  background: var(--text-lit);
  color: var(--hall);
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--slow) var(--ease);
}
.query button.solid:hover { background: var(--flare) }

/* ---------------------------------------------------------- ленты */

/* Ленты — ровные колонки, иконка над подписью: на телефоне все
   четыре видны сразу, ничего не уезжает за край. */
.tabs {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  border-bottom: 1px solid var(--hair);
  margin-bottom: 14px;
}
.tabs::-webkit-scrollbar { display: none }

.tabs button {
  position: relative;
  flex: 1 0 auto;
  min-width: 64px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 58px;
  padding: 0 4px 8px;
  border: 0;
  background: none;
  color: var(--dim);
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--slow) var(--ease);
}
.tabs .ic { width: 20px; height: 20px; vertical-align: 0 }
.tabs button[aria-selected="true"] { color: var(--text-lit) }

.tabs button[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: -1px;
  height: 2px;
  background: var(--flare);
}

/* Редкие ленты — за «ещё»; выбранная видна всегда */
.tabs .tab-extra { display: none }
.tabs.all .tab-extra,
.tabs .tab-extra[aria-selected="true"] { display: inline-flex }
.tabs .tab-more { flex: 0 0 auto; min-width: 52px; color: var(--mute) }

/* Раскрытые ленты — в два ряда по четыре: восемь колонок в один ряд
   на телефоне не помещались, и «меньше» уезжало за край. */
.tabs.all { flex-wrap: wrap; overflow-x: visible }
.tabs.all button,
.tabs.all .tab-more { flex: 1 0 25%; min-width: 0 }

.tabs .badge {
  margin-left: 2px;
  font-size: 9px;
  letter-spacing: .04em;
  color: var(--dim);
}

/* ---------------------------------------------------------- управление */

.controls {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-bottom: 10px;
}

.ghost {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--edge);
  background: none;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color var(--slow) var(--ease), color var(--slow) var(--ease);
}
.ghost:hover { border-color: var(--hair-lit); color: var(--text-lit) }
.ghost.on { border-color: var(--text-lit); color: var(--text-lit) }

.with-ic { display: inline-flex; align-items: center; gap: 8px }

/* Число включённых фильтров: видно, что выдача сужена */
.counter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  background: var(--text-lit);
  color: var(--hall);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
}
.counter[hidden] { display: none }

/* Порядок — кнопка со своим списком: слово стоит по центру рамки,
   список открывается под ней во всю её ширину и ничем не обрезан */
.sort-wrap { position: relative; display: flex; }
.sort { justify-content: center; min-width: 112px; }
.sort-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 30;
  min-width: 100%;
  border: 1px solid var(--edge);
  background: var(--hall-2);
}
.sort-menu[hidden] { display: none; }
.sort-menu button {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-top: 1px solid var(--hair);
  background: none;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}
.sort-menu button:first-child { border-top: 0; }
.sort-menu button:hover { background: var(--plate); color: var(--text-lit); }
.sort-menu button[aria-selected="true"] { background: var(--text-lit); color: var(--hall); }

.icon-only {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  padding: 0;
}
.icon-only .ic { width: 20px; height: 20px }

/* Включённые фильтры — плашками под кнопками: видно, что действует,
   и каждый снимается крестиком, не заходя в панель. */
.active {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 12px;
}
.active[hidden] { display: none }

.active-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 6px 0 11px;
  border: 1px solid var(--text-lit);
  background: none;
  color: var(--text-lit);
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
}
.active-chip .ic { width: 16px; height: 16px; color: var(--dim) }
/* снимок, по которому идёт поиск: миниатюра прямо в плашке */
.active-photo { padding-left: 3px; gap: 8px }
.active-photo img { width: 28px; height: 28px; object-fit: cover; display: block }
/* снимок сохранённого поиска — в строке «Избранного», перед названием */
.alert-photo { width: 44px; height: 44px; object-fit: cover; vertical-align: middle; margin-right: 12px }
.active-chip:hover .ic { color: var(--text-lit) }

.active-clear,
.active-hint {
  min-height: 34px;
  padding: 0 8px;
  border: 0;
  background: none;
  color: var(--dim);
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}
.active-hint { padding-left: 0; text-align: left; line-height: 1.5 }
.active-clear:hover, .active-hint:hover { color: var(--text-lit) }

.readout {
  flex: 1 1 200px;
  font-size: 11px;
  color: var(--dim);
  padding-left: 6px;
}
.readout b { color: var(--text); font-weight: 400 }
/* Чем пришлось поступиться, чтобы выдача не была пустой. Тише разбора,
   но заметно: человек должен понять, почему нашлось не совсем то. */
.relaxed {
  display: inline-block;
  margin-top: 2px;
  font-style: italic;
  opacity: 0.85;
}

/* ---------------------------------------------------------- фильтры
   Отдельный экран-слой (.sheet#filters). Основное наверху,
   остальное за «Расширенными». */

.field-set { padding-bottom: 18px }

.legend {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--hair);
  margin-bottom: 12px;
  font-size: 9px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--dim);
}
.legend span {
  letter-spacing: .04em;
  text-transform: none;
  color: var(--mute);
}

.tokens, .chips { display: flex; flex-wrap: wrap; gap: var(--gap) }

.token {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--hair);
  background: none;
  color: var(--mute-2);
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color var(--slow) var(--ease), color var(--slow) var(--ease);
}
.token:hover { color: var(--text) }

.token[aria-pressed="true"] {
  border-color: var(--text-lit);
  color: var(--text-lit);
}

/* Единственное место, где цвет остаётся: это цвет самой вещи,
   то есть данные, а не украшение. Поэтому плашки квадратные
   и мелкие — они читаются как образцы, а не как акцент. */
.chip-color {
  width: 30px;
  height: 30px;
  border: 1px solid var(--hair);
  cursor: pointer;
  padding: 0;
  transition: outline-color var(--slow) var(--ease);
  outline: 1px solid transparent;
  outline-offset: 2px;
}
.chip-color[aria-pressed="true"] { outline-color: var(--text-lit) }

/* ---------------------------------------------------------- мерки
   Ядро продукта. Девять строк, у каждой «от» и «до». */

.measures { display: block }

.measure-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 74px 74px;
  gap: var(--gap);
  border-bottom: 1px solid var(--hair);
}

.measure-row > * { min-height: 44px }

.measure-row label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text);
}

.measure-row .unit {
  font-size: 9px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--mute);
}

.measure-row input {
  border: 0;
  background: none;
  color: var(--text-lit);
  font-family: var(--font-display);
  font-size: 16px;
  text-align: center;
  transition: background var(--slow) var(--ease);
}
.measure-row input::placeholder {
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--mute);
}
.measure-row input:focus { outline: 0; background: var(--plate) }

/* Заполненная мерка подсвечивается плашкой: видно, чем ты сузил
   выдачу, не открывая панель заново. */
.measure-row input:not(:placeholder-shown) { background: var(--plate) }

.measure-row input::-webkit-outer-spin-button,
.measure-row input::-webkit-inner-spin-button {
  appearance: none;
  margin: 0;
}

.row-inline { display: flex; gap: var(--gap); flex-wrap: wrap }

.row-inline input {
  flex: 1 1 120px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--hair);
  background: none;
  color: var(--text-lit);
  font-family: var(--font-ui);
  font-size: 13px;
}
.row-inline #f-size { flex-basis: 100% }
.row-inline #f-pmin, .row-inline #f-pmax { flex: 1 1 0; min-width: 0 }
.row-inline input::placeholder { color: var(--mute) }
.row-inline input:focus { outline: 0; border-color: var(--hair-lit) }

.advanced-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 60px;
  margin: 4px 0 18px;
  padding: 0 14px;
  border: 1px solid var(--edge);
  background: var(--hall-2);
  color: var(--text-lit);
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
}
.advanced-toggle small {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--dim);
}
.advanced-toggle .ic { transition: transform var(--slow) var(--ease) }
.advanced-toggle[aria-expanded="true"] .ic { transform: rotate(180deg) }
.advanced[hidden] { display: none }

/* ---------------------------------------------------------- выбор бренда
   Раскрывается на месте, в потоке панели: ничего не перекрывает и
   не выезжает за экран. Кнопка — та же, что у «Расширенных»; список —
   её продолжение, без зазора. */
.picker-toggle { min-height: 48px; margin: 0 }
.picker-toggle[aria-expanded="true"] { border-bottom-color: var(--hair) }
.picked { margin: 0 0 10px }

.picker {
  border: 1px solid var(--edge);
  border-top: 0;
  background: var(--hall-2);
}
.picker[hidden] { display: none }

.picker-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border-bottom: 1px solid var(--hair);
  color: var(--dim);
}
.picker-search input {
  flex: 1;
  min-width: 0;
  min-height: 46px;
  border: 0;
  background: none;
  color: var(--text-lit);
  font-family: var(--font-ui);
  font-size: 16px;      /* меньше 16 — iOS приближает страницу при вводе */
}
.picker-search input::placeholder { color: var(--mute); font-size: 13px }
.picker-search input:focus { outline: 0 }
.picker-search input::-webkit-search-cancel-button { filter: invert(1); opacity: .5 }

.picker-list {
  max-height: 264px;    /* шесть строк: видно, что список длиннее */
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--edge) transparent;
}
.picker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-bottom: 1px solid var(--hair);
  background: none;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.picker-row:last-child { border-bottom: 0 }
.picker-row:hover { background: var(--plate) }
.picker-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.picker-row i {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-style: normal;
  font-size: 11px;
  color: var(--mute-2);
  font-variant-numeric: tabular-nums;
}
.picker-row .ic { width: 18px; height: 18px; color: var(--text-lit); display: none }
.picker-row[aria-selected="true"] { color: var(--text-lit) }
.picker-row[aria-selected="true"] .ic { display: block }
.picker-empty { padding: 16px 14px; font-size: 12px; color: var(--dim) }

/* ---------------------------------------------------------- счётчик */

.count-side { display: inline-flex; align-items: center; gap: 12px }
.refresh {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--dim);
  font: inherit;
  letter-spacing: .16em;
  text-transform: uppercase;
  cursor: pointer;
}
.refresh[hidden] { display: none }
.refresh .ic { width: 16px; height: 16px }
.refresh:hover { color: var(--text-lit) }

.count-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 0 12px;
  font-size: 9px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--dim);
}
.count-row b {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--text-lit);
}

/* ---------------------------------------------------------- объекты
   Сетка держится на волосяных швах: карточки разделены не
   отступом, а линией в один пиксель. */

.objects {
  display: grid;
  /* Два столбца — с самого узкого окна: витрина в Telegram на компьютере
     открывается шириной ~570px, и по ширине карточки там влезал один. */
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--gap);
  padding: 1px;   /* место под внешний контур карточек */
}

@media (min-width: 760px) {
  .objects { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)) }
}

/* Швы сетки — контур каждой карточки: пустая ячейка в конце ряда
   остаётся пустой, а не серым прямоугольником. */
.obj {
  outline: 1px solid var(--hair);
  display: flex;
  flex-direction: column;
  background: var(--hall-2);
  cursor: pointer;
  animation: rise var(--slow) var(--ease) both;
  transition: background var(--slow) var(--ease);
}
.obj:hover { background: var(--plate) }

@keyframes rise {
  from { opacity: 0; transform: translateY(12px) }
  to   { opacity: 1; transform: none }
}

@media (prefers-reduced-motion: reduce) {
  .obj { animation: none }
  .seam::after { animation: none; opacity: 0 }
}

.obj-figure-wrap { position: relative }

.obj-figure {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--plate);
}

.obj-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity var(--slow) var(--ease);
}

.obj-figure.blank .ic { width: 32px; height: 32px; color: var(--mute) }
.obj-figure.blank {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--mute);
}

/* Кромка фотографии. Свет по ней не бежит: на длинной ленте это
   двадцать анимаций разом. Здесь шов просто отделяет вещь от текста. */
.obj-seam {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--hair-lit);
  opacity: .5;
}

/* Всё, что лежит поверх фото, — на чёрной плашке размером под текст.
   Белые буквы и контур без подложки на светлом фото пропадали: «паль»
   на белом фоне было не прочесть. Плашка читается на любом снимке и
   не трогает сам снимок, как тронуло бы затемнение по краю. */
.obj-no,
.obj-flag {
  position: absolute;
  top: 10px;
  z-index: 2;
  padding: 4px 8px;
  border: 1px solid var(--edge);
  background: var(--hall);
  color: var(--text-lit);
  font-size: 9px;
  text-transform: uppercase;
}
.obj-no { left: 0; border-left: 0; letter-spacing: .2em }
.obj-flag { right: 0; border-right: 0; letter-spacing: .16em }

/* «Ушло» не цвет, а приглушение: карточка гаснет целиком, и метка
   вместе с ней. */
.obj-flag.sold { color: var(--text) }
.obj:has(.obj-flag.sold) .obj-figure img { opacity: .38 }

.obj-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  flex: 1;
}

.obj-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.obj-house {
  font-size: 9px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--dim);
}

.obj-price {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-lit);
  white-space: nowrap;
}
.obj-price s {
  margin-right: 7px;
  font-size: 11px;
  color: var(--mute);
  text-decoration-thickness: 1px;
}

.obj-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--text);
}

/* Строка мерок. Цифры здесь важнее слов, поэтому серифом
   и на тон ярче подписей. */
.obj-spec {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--mute-2);
}
.obj-spec.sizes { color: var(--text) }

.obj-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 8px;
  font-size: 9px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--mute);
}

/* Статус несёт слово и яркость, не цвет. */
.state.in-stock { color: var(--text-lit) }
.state.preorder { color: var(--text) }
.state.sold     { color: var(--mute) }

.tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 38px;
  border: 1px solid var(--hair);
  background: none;
  color: var(--mute);
  font-family: var(--font-ui);
  font-size: 11px;
  cursor: pointer;
  transition: border-color var(--slow) var(--ease), color var(--slow) var(--ease);
}
.tool:hover { color: var(--text) }
.tool[aria-pressed="true"] { border-color: var(--text-lit); color: var(--text-lit) }

/* Подписки и отложенное — списки, а не витрина: там нечего
   рассматривать, там надо читать условия. */
.objects.objects--list { grid-template-columns: minmax(0, 1fr) }


/* ---------------------------------------------------------- заставка
   Два экрана из всей витрины показывают живопись: этот и пустой
   ответ. Больше её нигде нет и быть не должно — каталог живёт
   чужими фотографиями, и своя картинка с ними дерётся.

   Под каждым полотном лежит его же пятно 18×39 в строке base64:
   пока идёт webp, экран уже покрашен в нужную гамму и не мигает
   серым. Это дешевле любого спиннера. */

.splash {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--hall);
  overflow: hidden;
}
.splash[hidden] { display: none }

.splash-art {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: var(--splash-art-h);
  background-color: var(--hall);
}

/* Шторка: без неё белая шапка пропадает в светлых местах полотна. */
.splash-scrim {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: var(--splash-art-h);
  background:
    linear-gradient(180deg, var(--scrim) 0, rgba(0, 0, 0, .08) 150px, rgba(0, 0, 0, 0) 260px),
    var(--splash-veil);
}

.splash-top,
.splash-foot,
.splash-plate {
  position: relative;
  z-index: 2;
}

.splash-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--pad);
}

.monogram {
  display: block;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, .85);
  border-radius: 50%;
  object-fit: cover;
}

.splash-about {
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: #fff;
  font-family: var(--font-ui);
  font-size: 12px;
  cursor: pointer;
}

/* Плашка со срезанными углами — тот же приём, что у кнопки поста. */
.plate {
  margin: 0 30px;
  padding: 26px 24px 20px;
  background: #000;
  color: var(--text);
  clip-path: polygon(16px 0, 100% 0, 100% calc(100% - 16px),
                     calc(100% - 16px) 100%, 0 100%, 0 16px);
}

.plate-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -.012em;
  color: #fff;
}

.plate-text {
  margin: 16px 0 0;
  max-width: 260px;
  font-size: 12.5px;
  line-height: 1.55;
  color: #c4c3b6;
}

.splash-plate.about { max-height: 62vh; overflow-y: auto }
.splash-plate.about .plate-text { max-width: none }

.splash-foot {
  padding: 0 var(--pad) calc(26px + env(safe-area-inset-bottom, 0px));
}

.splash-mark {
  font-family: var(--font-display);
  font-size: 76px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: .02em;
  color: var(--splash-ink);
}

.splash-stats {
  display: flex;
  justify-content: space-between;
  padding: 10px 0 20px;
  font-size: 9px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--splash-ink-2);
}
.splash-stats b {
  color: var(--splash-ink);
  font-weight: 500;
  letter-spacing: .04em;
}

.splash-cta {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--splash-line);
  background: none;
  color: var(--splash-ink);
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--slow) var(--ease);
}
.splash-cta:hover { background: rgba(128, 128, 128, .16) }

/* ---------------------------------------------------------- онбординг
   Живописи здесь нет намеренно: картину человек только что видел
   на заставке, второй раз подряд она перестаёт быть событием.
   Здесь работа — девять строк таблицы и ничего вокруг. */

.onboard {
  position: fixed;
  inset: 0;
  z-index: 88;
  display: flex;
  flex-direction: column;
  background: var(--hall);
  overflow: hidden;
}
.onboard[hidden] { display: none }

.onboard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--pad);
  border-bottom: 1px solid var(--hair);
  font-size: 9px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--dim);
}

.onboard-skip {
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--mute);
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  cursor: pointer;
}
.onboard-skip:hover { color: var(--text) }

.onboard-body {
  flex: 1;
  overflow-y: auto;
  padding: 30px var(--pad) 20px;
}

.onboard-title {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -.012em;
  color: var(--text-lit);
}

.onboard-text {
  margin: 0 0 26px;
  max-width: 320px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--mute-2);
}

.onboard-hint {
  margin: 18px 0 0;
  font-size: 11px;
  color: var(--mute);
}

.onboard-foot {
  padding: 14px var(--pad) calc(20px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--hair);
}

.onboard-cta {
  width: 100%;
  min-height: 52px;
  border: 0;
  background: var(--text-lit);
  color: var(--hall);
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  cursor: pointer;
  clip-path: polygon(var(--notch) 0, 100% 0, 100% calc(100% - var(--notch)),
                     calc(100% - var(--notch)) 100%, 0 100%, 0 var(--notch));
}
.onboard-cta:hover { background: var(--flare) }

/* ---------------------------------------------------------- пусто по меркам
   Обычный пустой ответ — просто плашка. Но если человек задал мерки
   и не нашёл ничего, это отдельный экран: он должен не извиняться,
   а показать, какую мерку ослабить. */

.void-gallery {
  grid-column: 1 / -1;
  position: relative;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 30px 0;
  overflow: hidden;
  background-color: var(--hall);
  background-image: url("/static/img/painting-empty.webp"),
                    url("data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDABQODxIPDRQSEBIXFRQYHjIhHhwcHj0sLiQySUBMS0dARkVQWnNiUFVtVkVGZIhlbXd7gYKBTmCNl4x9lnN+gXz/2wBDARUXFx4aHjshITt8U0ZTfHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHz/wAARCAAnABIDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDTVM04KRwadHjzMd+1P29zWVy7Ee2ipMCii4rFZJEL8MfrUxmSMfNIg+prIWUhc4JqjK8U0zEjJ9M0ijpPOjPPmJ+dFcyZADgKMCilYZQMxZeWPHalW4VAMjJooqrEh9sP90UUUUcqC5//2Q==");
  background-size: cover, cover;
  background-position: center, center;
}
.void-gallery::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .3), rgba(0, 0, 0, .55));
}
.void-gallery > * { position: relative; z-index: 2 }

.relax {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .16);
  font-size: 12.5px;
  color: #c4c3b6;
}
.relax b { color: #fff; font-weight: 500 }
.relax i { font-style: normal; color: #a9a89c }

.void-actions {
  display: flex;
  gap: var(--gap);
  padding-top: 22px;
}
.void-actions button {
  flex: 1;
  min-height: 46px;
  border: 1px solid rgba(255, 255, 255, .4);
  background: none;
  color: #fff;
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  cursor: pointer;
}
.void-actions button.solid { background: #fff; color: #000; border-color: #fff }

/* Подписка — не карточка вещи: смотреть нечего, читать есть что. */
.obj.alert { cursor: default }
.obj.alert:hover { background: var(--hall-2) }

/* «Избранное»: вещи и поиски — две вкладки одного раздела */
.seg {
  display: flex;
  gap: var(--gap);
  margin: 0 0 14px;
}
.seg button {
  flex: 1;
  min-height: 44px;
  border: 1px solid var(--hair);
  background: none;
  color: var(--dim);
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
}
.seg button[aria-selected="true"] { border-color: var(--text-lit); color: var(--text-lit) }

/* Раздел PRO. Вкладка построена на одной картине — «Pollice Verso»
   Жерома: вся сцена в шапке, трибуна в блоке «остальные узнают позже»,
   шлем победителя у цены. Картина цветная, как фриз в общей шапке,
   но приглушена и уходит в темноту зала: свет стоит на гладиаторе. */
body[data-view="pro"] .head { display: none }
.pro { padding-top: 0 }

.pro-hero-txt span, .pro-now > span, .pro-duel span, .pro-title span,
.pro-deal-over, .pro-deal-per {
  display: block;
  font-size: 9px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--dim);
}

.pro-hero {
  position: relative;
  height: min(116vw, 500px);
  margin: 0 calc(var(--pad) * -1);
  overflow: hidden;
  background: var(--hall);
}
.pro-hero-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 22%;
  filter: saturate(.82) contrast(1.04) brightness(.92);
  transform-origin: 46% 42%;
  will-change: transform, opacity;
  animation: proReveal 1.8s var(--ease) backwards;   /* дальше картиной управляет прокрутка */
}
/* свет стоит на гладиаторе, края и низ уходят в чёрный */
.pro-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 78% 58% at 47% 40%, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, .62) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, .5) 0, rgba(0, 0, 0, 0) 20%,
                    rgba(0, 0, 0, 0) 48%, rgba(0, 0, 0, .86) 80%, #000 100%);
  pointer-events: none;
}
.pro-plaque {
  position: absolute;
  z-index: 1;
  top: 16px;
  right: var(--pad);
  font-size: 8.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .62);
}
.pro-hero-txt {
  position: absolute;
  z-index: 1;
  left: var(--pad);
  right: var(--pad);
  bottom: 18px;
  animation: proRise 1.2s .25s var(--ease) both;
}
.pro-hero-txt span { color: rgba(255, 255, 255, .62) }
.pro-hero-txt h2 {
  margin: 10px 0 8px;
  font-family: var(--font-display);
  font-size: 58px;
  font-weight: 500;
  line-height: .95;
  letter-spacing: -.015em;
  color: var(--flare);
}
.pro-hero-txt h2 i { font-weight: 400 }
.pro-hero-txt p {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 19px;
  color: var(--text-lit);
}
@keyframes proReveal {
  0%   { opacity: 0; transform: scale(1.1) }
  100% { opacity: 1; transform: scale(1) }
}
@keyframes proRise {
  0%   { opacity: 0; transform: translateY(14px) }
  100% { opacity: 1; transform: none }
}
.is-still .pro-hero-art, .is-still .pro-hero-txt { animation: none }
@media (prefers-reduced-motion: reduce) {
  .pro-hero-art, .pro-hero-txt { animation: none }
}

.pro-status {
  margin: 0 0 18px;
  padding: 14px;
  border: 1px solid var(--hair);
  background: var(--hall-2);
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
}
.pro-status b { display: block; margin-bottom: 2px; color: var(--text-lit); font-weight: 600 }

/* Что у меня сейчас: строка на бесплатном тарифе, плашка — когда PRO есть */
.pro-free { margin: 0 0 22px; font-size: 12px; line-height: 1.6; color: var(--dim); text-align: center }
.pro-free b { font-weight: 500; color: var(--text-lit) }
.pro-now {
  margin: 18px 0 0;
  padding: 16px 16px 18px;
  background: var(--hall-2);
  border: 1px solid var(--hair-lit);
  clip-path: polygon(var(--notch) 0, 100% 0, 100% calc(100% - var(--notch)),
                     calc(100% - var(--notch)) 100%, 0 100%, 0 var(--notch));
}
.pro-now > b {
  display: block;
  margin: 8px 0 6px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.15;
  color: var(--text-lit);
}
.pro-now p { margin: 0; font-size: 12.5px; line-height: 1.6; color: var(--text) }
.pro-term { height: 1px; margin-top: 14px; background: var(--edge) }
.pro-term i { display: block; height: 1px; background: var(--flare) }
.pro-auto { width: 100%; margin-top: 14px }

/* Трибуна: те, кто узнаёт позже. Кадр идёт вдоль неё при прокрутке */
.pro-tribune { margin: 26px calc(var(--pad) * -1) 26px; padding: 0 }
.pro-tribune-art {
  position: relative;
  height: 150px;
  background: var(--hall-2) url("/static/img/pro-tribune.webp") 0% 40% / auto 128% no-repeat;
  filter: saturate(.8) brightness(.9);
}
.pro-tribune-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #000 0, rgba(0, 0, 0, 0) 22%,
                              rgba(0, 0, 0, 0) 50%, #000 100%);
}
.pro-tribune figcaption {
  position: relative;
  margin-top: -34px;
  padding: 0 var(--pad);
  text-align: center;
}
.pro-tribune figcaption b {
  display: block;
  margin: 0 auto 20px;
  max-width: 300px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--text-lit);
}
.pro-tribune figcaption p { margin: 12px 0 0; font-size: 11.5px; color: var(--dim) }
/* два времени рядом: у PRO — яркое, у бесплатного — в полутьме */
.pro-duel { display: grid; grid-template-columns: 1fr 1fr; align-items: end }
.pro-duel em {
  display: block;
  margin-top: 6px;
  font-family: var(--font-display);
  font-style: normal;
  font-size: 34px;
  font-weight: 500;
  line-height: 1.05;
  color: var(--mute-2);
}
.pro-duel-on span { color: var(--text-lit) }
.pro-duel-on em { font-size: 44px; color: var(--flare) }
/* дорожка под ними: точка PRO слева вспыхивает сразу, свет идёт к правой */
.pro-track { position: relative; height: 1px; margin: 16px 25% 0; background: var(--hair-lit) }
.pro-track::before, .pro-track::after {
  content: "";
  position: absolute;
  top: -3px;
  width: 7px;
  height: 7px;
}
.pro-track::before { left: -3px; background: var(--flare); animation: proPing 5s var(--ease) infinite }
.pro-track::after { right: -3px; background: var(--mute) }
.pro-track i {
  position: absolute;
  top: 0;
  left: 0;
  width: 44px;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), var(--flare));
  animation: proWait 5s linear infinite;
}
@keyframes proPing {
  0%, 100%  { box-shadow: 0 0 0 0 rgba(255, 255, 255, .0) }
  6%        { box-shadow: 0 0 0 7px rgba(255, 255, 255, .28) }
  22%       { box-shadow: 0 0 0 12px rgba(255, 255, 255, 0) }
}
@keyframes proWait {
  0%   { left: 0; opacity: 0 }
  8%   { opacity: .9 }
  88%  { left: calc(100% - 44px); opacity: .9 }
  100% { left: calc(100% - 44px); opacity: 0 }
}
@media (prefers-reduced-motion: reduce) {
  .pro-track i, .pro-track::before, .tg-star-shine { animation: none }
  .pro-track i { opacity: 0 }
}

/* Звезда Telegram: ростом со строчную букву, у цены — с цифру */
.tg-star {
  color: var(--flare);          /* белая звезда — белая в любом тексте */
  display: inline-block;
  width: 1.05em;
  height: 1.05em;
  vertical-align: -.16em;
  overflow: visible;
}
.tg-star--big {
  width: .82em;
  height: .82em;
  margin-left: .12em;
  vertical-align: -.04em;
  filter: drop-shadow(0 0 16px rgba(255, 170, 30, .3));
  animation: starBreath 4.5s ease-in-out infinite;
}
.tg-star-shine { transform: skewX(-20deg); animation: starShine 4.5s ease-in-out infinite }
@keyframes starShine {
  0%, 55% { transform: translateX(0) skewX(-20deg) }
  85%, 100% { transform: translateX(46px) skewX(-20deg) }
}
@keyframes starBreath {
  0%, 55%, 100% { transform: scale(1) rotate(0) }
  70%           { transform: scale(1.08) rotate(-6deg) }
  85%           { transform: scale(1) rotate(0) }
}
@media (prefers-reduced-motion: reduce) { .tg-star--big { animation: none } }

/* Что ещё даёт PRO: заголовок по центру и плитки. В плитке крупно —
   то, что получает PRO; что на бесплатном — мелкой строкой внизу. */
.pro-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 4px 0 14px;
}
.pro-title::before, .pro-title::after { content: ""; flex: 1; height: 1px; background: var(--hair-lit) }
.pro-title span { color: var(--text-lit) }
.pro-tiles {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  margin: 0 0 26px;
  padding: 0;
  background: var(--hair);
  border: 1px solid var(--hair);
}
.pro-tiles li {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 8px 14px;
  background: var(--hall);
  text-align: center;
}
.pro-tiles li:last-child:nth-child(odd) { grid-column: 1 / -1 }
.pro-tiles .ic { width: 20px; height: 20px; color: var(--dim) }
.pro-tiles em {
  margin: 8px 0 4px;
  font-family: var(--font-display);
  font-style: normal;
  font-size: 36px;
  font-weight: 500;
  line-height: 1;
  color: var(--flare);
  font-variant-numeric: lining-nums;
}
/* знак бесконечности в Playfair мелкий — поднимаем до роста цифр */
.pro-tiles em.pro-inf { font-size: 60px; line-height: 36px }
.pro-tiles b { font-size: 12.5px; font-weight: 400; line-height: 1.3; color: var(--text-lit) }
.pro-tiles s { margin-top: 8px; font-size: 10.5px; text-decoration: none; color: var(--mute-2) }

/* Цена и кнопки: одна карточка, всё по центру */
.pro-deal {
  margin: 0 0 22px;
  padding: 22px 18px 18px;
  border: 1px solid var(--hair-lit);
  background: var(--hall-2);
  text-align: center;
}
.pro-deal img {
  display: block;
  width: 76px;
  height: 76px;
  margin: 0 auto 16px;
  object-fit: cover;
  border: 1px solid var(--hair-lit);
  filter: saturate(.85);
}
.pro-price {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 8px 0 6px;
  font-family: var(--font-display);
  font-size: 76px;
  font-weight: 500;
  line-height: 1;
  color: var(--flare);
}
.pro-deal-per { color: var(--text) }
.pro-terms { margin: 16px 0 18px; font-size: 12.5px; line-height: 1.6; color: var(--text) }
.pro-under { margin: 12px 0 0; font-size: 11px; line-height: 1.55; color: var(--mute-2) }
.pro-pay-2 { width: 100%; min-height: 48px; margin-top: 10px; color: var(--text-lit) }
.pro .cta:disabled { opacity: .5; cursor: default }

/* Вопросы */
.pro-faq { margin-bottom: 8px; border-top: 1px solid var(--hair) }
.pro-faq details { border-bottom: 1px solid var(--hair) }
.pro-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 48px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}
.pro-faq summary::-webkit-details-marker { display: none }
.pro-faq summary .ic { flex: none; width: 14px; height: 14px; color: var(--dim); transition: transform var(--slow) var(--ease) }
.pro-faq details[open] summary { color: var(--text-lit) }
.pro-faq details[open] summary .ic { transform: rotate(180deg) }
.pro-faq p { margin: 0 0 16px; font-size: 12.5px; line-height: 1.65; color: var(--text) }

.void .void-pro { margin-top: 18px }
.grid-note--pro { cursor: pointer }
.grid-note--pro u { text-decoration: none; border-bottom: 1px solid var(--hair-lit); color: var(--text-lit) }
.watch-pro[role="button"] { cursor: pointer; border-bottom: 1px solid var(--hair-lit); display: inline-block }

.watch-foot {
  padding: 20px 0 0;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--mute-2);
}
.watch-foot p { margin: 0 0 8px }

.watch-pro {
  color: var(--text-lit);
  letter-spacing: .04em;
}

/* ---------------------------------------------------------- пустой ответ */

.void {
  grid-column: 1 / -1;
  background: var(--hall-2);
  padding: 46px var(--pad);
  text-align: center;
}

.void-no {
  font-size: 9px;
  letter-spacing: .3em;
  color: var(--mute);
}

.void h3 {
  margin: 14px 0 8px;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  line-height: 1.1;
  color: var(--text-lit);
}

.void p {
  margin: 0 auto;
  max-width: 380px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--mute-2);
}

/* Пока идёт запрос, на месте карточек стоят пустые плашки той же
   пропорции: сетка не должна прыгать, когда придут данные. */
.ghost-card {
  outline: 1px solid var(--hair);
  position: relative;
  aspect-ratio: 3 / 4.6;
  background: var(--hall-2);
  overflow: hidden;
}

.ghost-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    transparent, rgba(255, 255, 255, .045), transparent);
  animation: sweep 1.5s linear infinite;
}

@keyframes sweep {
  from { transform: translateX(-100%) }
  to   { transform: translateX(100%) }
}

/* Разделитель в сетке: дальше идут вещи без распознанного размера */
.grid-note {
  grid-column: 1 / -1;
  padding: 22px 14px 14px;
  background: var(--hall);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--dim);
}
.grid-note b { display: block; margin-bottom: 6px; font-weight: 500; color: var(--text-lit) }
.more.unsized { min-height: 64px; padding: 10px 14px; line-height: 1.6; color: var(--text-lit) }
.more.unsized small { display: block; letter-spacing: .12em; color: var(--dim) }

.more {
  display: block;
  width: 100%;
  min-height: 52px;
  margin-top: var(--gap);
  border: 1px solid var(--hair);
  background: none;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color var(--slow) var(--ease);
}
.more:hover { border-color: var(--hair-lit) }

/* ---------------------------------------------------------- нижняя панель */

.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  background: var(--hall);
  border-top: 1px solid var(--hair);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.dock button {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 60px;
  border: 0;
  background: none;
  color: var(--dim);
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color var(--slow) var(--ease);
}
.dock .ic { width: 22px; height: 22px }
.dock button[aria-selected="true"] { color: var(--text-lit) }
/* «Каталог» нажат в каталоге: значок крутится, пока лента загружается
   заново, и коротко «щёлкает», когда готово */
.dock button.reloading .ic { animation: dockSpin .7s cubic-bezier(.5, .1, .3, 1) infinite }
.dock button.reloaded .ic { animation: dockPop .4s var(--ease) }
@keyframes dockSpin {
  0%   { transform: rotate(0) scale(1) }
  50%  { transform: rotate(180deg) scale(.82) }
  100% { transform: rotate(360deg) scale(1) }
}
@keyframes dockPop {
  0%   { transform: scale(.8) }
  55%  { transform: scale(1.18) }
  100% { transform: scale(1) }
}
@media (prefers-reduced-motion: reduce) {
  .dock button.reloading .ic { animation: dockFade .7s ease-in-out infinite }
  .dock button.reloaded .ic { animation: none }
}
@keyframes dockFade { 50% { opacity: .35 } }

/* ---------------------------------------------------------- уведомление */

.note {
  position: fixed;
  left: 50%;
  bottom: 96px;
  /* выше любого слоя: раньше сообщение пряталось под открытой карточкой
     или кабинетом, и «заявка отправлена» никто не видел */
  z-index: 97;
  transform: translate(-50%, 14px);
  max-width: min(92vw, 420px);
  padding: 13px 18px;
  background: var(--text-lit);
  color: var(--hall);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--slow) var(--ease), transform var(--slow) var(--ease);
  clip-path: polygon(var(--notch) 0, 100% 0, 100% calc(100% - var(--notch)),
                     calc(100% - var(--notch)) 100%, 0 100%, 0 var(--notch));
}
.note.show { opacity: 1; transform: translate(-50%, 0) }

/* ---------------------------------------------------------- карточка вещи */

.sheet {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: var(--hall);
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform var(--slow) var(--ease);
  overscroll-behavior: contain;
  /* колонка: полоса действия прижата к низу, даже когда слой короткий */
  display: flex;
  flex-direction: column;
}
.sheet.open { transform: none }
/* карточку тянут пальцем вниз (sheetSwipe): идёт за ним без перехода */
.sheet.dragging { transition: none; overflow: hidden }
/* полоска-подсказка: карточку вещи можно смахнуть */
#sheet .sheet-head::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 50%;
  width: 36px;
  height: 3px;
  margin-left: -18px;
  background: var(--edge);
}
.sheet > .sheet-body { flex: 1 0 auto }

.sheet-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px var(--pad);
  background: var(--hall);
  border-bottom: 1px solid var(--hair);
  font-size: 9px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--dim);
}

.sheet-head > span { flex: 1; text-align: center }

/* «Назад» — слева и хорошо видно: там его ищет палец */
.sheet-head .back,
.sheet-head .reset {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 12px 0 0;
  border: 0;
  background: none;
  color: var(--text-lit);
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
}
.sheet-head .reset { padding: 0 0 0 12px; color: var(--dim) }
.sheet-head .reset:hover { color: var(--text-lit) }
.sheet-head .icon-btn { min-width: 44px; min-height: 44px }
.sheet-head .icon-btn:last-child { margin-right: -12px }
.sheet-head .icon-btn[aria-pressed="true"] { color: var(--text-lit) }

/* В Telegram «Назад» и главное действие — его собственные кнопки,
   свои дублировать незачем. Место под «Назад» остаётся пустым,
   чтобы заголовок не прыгал. */
body.tg .sheet-head .back { visibility: hidden }
body.tg .cta-bar { display: none }

/* Главное действие слоя — яркая полоса внизу, всегда под пальцем */
.cta-bar {
  position: sticky;
  bottom: 0;
  z-index: 2;
  padding: 12px var(--pad) calc(12px + env(safe-area-inset-bottom, 0));
  background: var(--hall);
  border-top: 1px solid var(--hair);
}
.cta-bar[hidden] { display: none }

.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  border: 0;
  background: var(--text-lit);
  color: var(--hall);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  clip-path: polygon(var(--notch) 0, 100% 0, 100% calc(100% - var(--notch)),
                     calc(100% - var(--notch)) 100%, 0 100%, 0 var(--notch));
}
.cta:hover { background: var(--flare) }
.cta .ic { width: 20px; height: 20px }

.sheet-body { padding: 18px var(--pad) 28px }

/* Галерея: кадр прилипает к краю, следующий выглядывает справа —
   видно, что фото несколько. Стрелки и счётчик лежат поверх. */
.gallery {
  position: relative;
  margin: 0 calc(var(--pad) * -1) 20px;
}
.sheet-gallery {
  display: flex;
  gap: var(--gap);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--pad);
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
  scrollbar-width: none;
  padding: 0 var(--pad);
  cursor: grab;
  outline: none;
}
.sheet-gallery::-webkit-scrollbar { display: none }
.sheet-gallery.dragging { scroll-snap-type: none; cursor: grabbing }
.sheet-gallery img {
  flex: 0 0 auto;
  width: 78%;
  max-width: 420px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: var(--plate);
  scroll-snap-align: start;
  user-select: none;
  -webkit-user-drag: none;
}
.gallery--single .sheet-gallery { cursor: default }
.gallery--single .sheet-gallery img { width: 100% }
.gallery--single .gal-nav,
.gallery--single .gal-count { display: none }

.gal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--hair);
  background: color-mix(in srgb, var(--hall) 78%, transparent);
  color: var(--text-lit);
  cursor: pointer;
  transition: opacity var(--slow) var(--ease);
}
.gal-prev { left: 8px }
.gal-next { right: 8px }
.gal-next .ic { transform: scaleX(-1) }
.gal-nav:disabled { opacity: 0; pointer-events: none }
.gal-nav:hover { background: var(--hall) }

.gal-count {
  position: absolute;
  left: var(--pad);
  bottom: 0;
  padding: 6px 10px;
  background: color-mix(in srgb, var(--hall) 78%, transparent);
  color: var(--text-lit);
  font-size: 11px;
  letter-spacing: .14em;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

.sheet-title {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -.012em;
  color: var(--text-lit);
}

.sheet-price {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 500;
  color: var(--text-lit);
  padding-bottom: 18px;
}

/* Таблица замеров — то, ради чего человек открыл карточку. */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0 26px;
}

.spec-table th, .spec-table td {
  padding: 13px 0;
  border-bottom: 1px solid var(--hair);
  text-align: left;
  vertical-align: baseline;
}

.spec-table th {
  width: 46%;
  font-weight: 400;
  font-size: 12.5px;
  color: var(--text);
}

.spec-table td {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--text-lit);
}

/* ---------------------------------------------------------- широкий экран
   Витрина живёт в телеграме, то есть на телефоне, но открывают её
   и в браузере — при разработке и по ссылке. Растянутая на весь
   монитор заставка выглядит сломанной, поэтому на широком экране
   она собирается в колонку. Живопись при этом остаётся во всю
   ширину: это фон зала, а не карточка. */

@media (min-width: 720px) {
  .splash-top,
  .splash-plate,
  .splash-foot,
  .onboard-head,
  .onboard-body,
  .onboard-foot {
    width: 100%;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ---------------------------------------------------------- телефон */

@media (max-width: 560px) {
  :root { --pad: 16px }
  .wordmark { font-size: 28px }
  .objects { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) }
  .obj-body { padding: 11px }
  .obj-title { font-size: 13.5px }
  .obj-price { font-size: 13.5px }
  .sheet-title { font-size: 22px }
}

/* ---------------------------------------------------------- «для тебя»
   Полоса над лентой: чем она собрана и как поправить. Новому человеку
   вместо подписи — приглашение собрать ленту, и кнопка светится. */

.taste {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 2px 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--hair);
  background: var(--hall-2);
}
.taste[hidden] { display: none }

.taste-text { min-width: 0; font-size: 12px; line-height: 1.45; color: var(--dim) }
.taste-text small {
  display: block;
  font-size: 9px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--mute);
}
.taste-text b {
  display: block;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  color: var(--text-lit);
}
.taste-text span { display: block; margin-top: 2px }
.taste .ghost { flex: none; white-space: nowrap }

/* Экран «Твой стиль»: плитки-коллажи из настоящих вещей каталога */
.styles-intro { margin: 0 0 16px; font-size: 13px; line-height: 1.55; color: var(--dim) }

.style-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--gap);
  background: var(--hair);
  border: 1px solid var(--hair);
}

.style-tile {
  display: flex;
  flex-direction: column;
  padding: 0;
  border: 0;
  background: var(--hall-2);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: background var(--slow) var(--ease);
}

.style-covers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  aspect-ratio: 1 / 1;
  background: var(--plate);
  overflow: hidden;
}
.style-covers.n1 { grid-template-columns: 1fr }
.style-covers img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(.35);
  transition: filter var(--slow) var(--ease), opacity var(--slow) var(--ease);
}
.style-covers.n1 img { grid-row: span 2 }

.style-name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 46px;
  padding: 0 12px;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.style-name .ic { opacity: 0; color: var(--text-lit); transition: opacity var(--slow) var(--ease) }

.style-tile[aria-pressed="true"] { background: var(--plate) }
.style-tile[aria-pressed="true"] .style-name { color: var(--text-lit) }
.style-tile[aria-pressed="true"] .style-name .ic { opacity: 1 }
.style-tile[aria-pressed="true"] .style-covers img { filter: none }
.style-grid:has([aria-pressed="true"]) .style-tile[aria-pressed="false"] img { opacity: .55 }

.style-wait {
  grid-column: 1 / -1;
  padding: 40px 16px;
  background: var(--hall-2);
  text-align: center;
  font-size: 12px;
  color: var(--dim);
}

.head-spacer { min-width: 44px }
/* новому человеку «Выбрать» — главное действие экрана */
.taste .ghost.on { background: var(--text-lit); border-color: var(--text-lit); color: var(--hall) }

/* Закрытый канал: почему пост может не открыться и что с этим делать */
.sheet-note {
  margin: 16px 0 0;
  font-size: 14px;
  line-height: 1.45;
  opacity: .75;
}
.sheet-note a {
  display: inline-block;
  margin: 8px 16px 0 0;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.sheet-note-links { display: block; }

/* «Все виды вещей» в фильтре: кнопка-раскрытие, а не ещё один выбор */
.token.token-more {
  border-style: dashed;
  color: var(--text-lit, inherit);
}

/* Продавец из списка проверенных: метка-ссылка на пост о нём в списке */
.seller-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 2px;
  padding: 9px 12px;
  border: 1px solid currentColor;
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: none;
  color: #e7e5e4;
}
.seller-badge.green { color: #9ac48a; }
.seller-badge span { color: inherit; }
/* Убран из списка или скам. Красный в каталоге — только здесь: это
   предупреждение о деньгах, и оно должно выбиваться из серого зала. */
.seller-badge.bad { color: #e5484d; }
.seller-badge.bad .ic { flex: none; }
.price-hint.bad { color: #e5484d; }
.obj-flag.scam { background: #e5484d; border-color: #e5484d; color: #fff; }
/* вещь скам-продавца в избранном: блёклая, как проданная */
.obj:has(.obj-flag.scam) .obj-figure img { filter: grayscale(1); opacity: .35; }

/* Кнопка стилей в верхнем ряду: на телефоне — только значок, иначе
   колокольчик подписки уезжает за край */
@media (max-width: 520px) {
  #btn-styles { padding-inline: 12px; }
  #btn-styles span { display: none; }
}

/* ---------------------------------------------------------- цены (блок B)
   «Без пали» — переключатель у правого края, рядом с колокольчиком:
   ручка слева — показывается всё, справа — паль скрыта. */
.switch {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 2px 0 6px;
  border: 0;
  background: none;
  color: var(--dim);
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--slow) var(--ease);
}
.switch-track {
  position: relative;
  flex: none;
  width: 40px;
  height: 22px;
  border: 1px solid var(--edge);
  transition: background var(--slow) var(--ease), border-color var(--slow) var(--ease);
}
.switch-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  background: var(--mute-2);
  transition: transform var(--slow) var(--ease), background var(--slow) var(--ease);
}
.switch[aria-checked="true"] { color: var(--text-lit); }
.switch[aria-checked="true"] .switch-track { background: var(--text-lit); border-color: var(--text-lit); }
.switch[aria-checked="true"] .switch-knob { transform: translateX(18px); background: var(--hall); }
.controls .icon-only { margin-left: 0; }

/* Два переключателя один под другим на месте одного: «без пали» и
   «в наличии». Ручки меньше, подпись слева от каждой — и на телефоне тоже. */
.switches {
  margin-left: auto;
  display: flex; flex: none; flex-direction: column; justify-content: center; gap: 2px;
}
.switches .switch {
  margin: 0; min-height: 22px; padding: 0 2px 0 4px;
  flex-direction: row; justify-content: flex-end; gap: 8px;
  font-size: 9.5px; letter-spacing: .12em;
}
.switches .switch[hidden] { display: none; }
.switches .switch-track { width: 30px; height: 16px; }
.switches .switch-knob { top: 2px; left: 2px; width: 10px; height: 10px; }
.switches .switch[aria-checked="true"] .switch-knob { transform: translateX(14px); }
/* На телефоне пара должна занять столько же, сколько занимал один
   переключатель с подписью под ним: иначе колокольчик уезжает за край. */
@media (max-width: 520px) {
  .switches .switch { gap: 5px; padding: 0; font-size: 8.5px; letter-spacing: .04em; }
  .switches .switch-label { font-size: 8.5px; letter-spacing: .04em; }
  .switches .switch-track { width: 24px; }
  .switches .switch[aria-checked="true"] .switch-knob { transform: translateX(8px); }
  /* место под вторую подпись берём у соседних кнопок */
  .controls .ghost:not(.icon-only):not(#btn-styles) { padding-inline: 8px; }
  .controls .sort { min-width: 68px; }
}

/* ---------------------------------------------------------- исключённые бренды
   Одна и та же тихая строка в двух местах: «исключить бренды» в фильтрах
   и «никогда не показывать» в стилях. Без рамки и заливки — запрет не
   должен спорить с выбором. Выбранное видно всегда, зачёркнутыми плашками;
   список раскрывается под строкой. */
.ban { margin-top: 14px; }
.ban-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--dim);
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
  transition: color var(--slow) var(--ease);
}
.ban-toggle:hover, .ban-toggle[aria-expanded="true"], .ban[data-filled="true"] .ban-toggle {
  color: var(--text-lit);
}
.ban-toggle > .ic { flex: none; }
.ban-title { min-width: 0; }
.ban-count { color: var(--mute); letter-spacing: .08em; white-space: nowrap; }
.ban-caret { margin-left: auto; transition: transform var(--slow) var(--ease); }
.ban-toggle[aria-expanded="true"] .ban-caret { transform: rotate(180deg); }

.ban-picked { display: flex; flex-wrap: wrap; gap: 6px; }
.ban-picked:not(:empty) { margin: 2px 0 12px; }
.ban-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 6px 0 11px;
  border: 1px solid var(--edge);
  background: none;
  color: var(--dim);
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  animation: ban-in 320ms var(--ease);
}
.ban-chip span { text-decoration: line-through; text-decoration-thickness: 1px; }
.ban-chip .ic { width: 16px; height: 16px; color: var(--mute); }
.ban-chip:hover { border-color: var(--text-lit); color: var(--text-lit); }
@keyframes ban-in { from { opacity: 0; transform: translateY(4px); } }

.ban-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 380ms var(--ease);
}
.ban[data-open="true"] .ban-body { grid-template-rows: 1fr; }
.ban-body-in { min-height: 0; overflow: hidden; }
.ban .picker { border-top: 1px solid var(--edge); }
/* в списке запрета отмеченный бренд зачёркнут, а не подсвечен */
.ban .picker-row[aria-selected="true"] { color: var(--dim); }
.ban .picker-row[aria-selected="true"] span { text-decoration: line-through; }
.ban .picker-row[aria-selected="true"] .ic { color: var(--dim); }

.never { margin-top: 34px; }
.never .ban { margin-top: 0; }
.never-hint { margin: 10px 0 0; font-size: 12px; line-height: 1.55; color: var(--mute); }
@media (prefers-reduced-motion: reduce) {
  .ban-body, .ban-chip { transition: none; animation: none; }
}

/* ---------------------------------------------------------- коллаборация
   Живёт внутри раскрытого списка брендов: переключатель, а под ним два окна.
   Окна выезжают из середины и расходятся в стороны, знак «×» проворачивается
   между ними — видно, что одно поле стало двумя. */
.collab { border-bottom: 1px solid var(--hair); }
.switch.collab-switch {
  margin: 0;
  padding: 0 14px;
  width: 100%;
  min-height: 46px;
  flex-direction: row;
  justify-content: flex-start;
  gap: 12px;
}
.switch.collab-switch .switch-label { font-size: 11px; letter-spacing: .12em; }
.collab-slots {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 420ms var(--ease);
}
.collab[data-on="true"] .collab-slots { grid-template-rows: 1fr; }
.collab-slots-in {
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0;
  padding: 0 14px;
}
.collab[data-on="true"] .collab-slots-in { padding-bottom: 14px; }
.collab-slot {
  min-width: 0;
  min-height: 52px;
  padding: 6px 10px;
  border: 1px solid var(--edge);
  background: var(--hall);
  color: var(--mute);
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  opacity: 0;
  transition: transform 520ms var(--ease), opacity 360ms var(--ease),
              border-color var(--slow) var(--ease), color var(--slow) var(--ease);
}
/* в покое оба окна стоят в середине, одно на другом, — и разъезжаются */
.collab-slot[data-slot="0"] { transform: translateX(52%) scaleX(.6); }
.collab-slot[data-slot="1"] { transform: translateX(-52%) scaleX(.6); }
.collab[data-on="true"] .collab-slot { transform: none; opacity: 1; transition-delay: 90ms; }
.collab-slot[data-filled="true"] { color: var(--text-lit); }
.collab-slot[aria-pressed="true"] { border-color: var(--text-lit); }
.collab-slot small {
  display: block;
  margin-bottom: 3px;
  font-size: 9px;
  letter-spacing: .14em;
  color: var(--mute);
}
.collab-x {
  width: 34px;
  text-align: center;
  font-family: var(--font-display, serif);
  font-size: 22px;
  color: var(--text-lit);
  opacity: 0;
  transform: rotate(-180deg) scale(.2);
  transition: transform 620ms var(--ease) 140ms, opacity 300ms var(--ease) 140ms;
}
.collab[data-on="true"] .collab-x { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .collab-slots, .collab-slot, .collab-x { transition: none; }
}

/* На телефоне в ряду пять элементов: подписанные кнопки остаются без
   значков, а подпись переключателя уходит под него — иначе не помещается */
@media (max-width: 520px) {
  .controls { gap: 6px; }
  .controls .ghost { padding-inline: 10px; letter-spacing: .08em; }
  #btn-panel > .ic, .controls .sort > .ic { display: none; }
  .sort { min-width: 84px; }
  .controls .icon-only, #btn-styles { flex: none; width: 44px; padding: 0; justify-content: center; }
  .switch { flex-direction: column-reverse; justify-content: center; gap: 5px; padding: 0 2px; }
  .switch-label { font-size: 9px; letter-spacing: .1em; }
}

.sheet-price:has(+ .price-hint), .sheet-price:has(+ #sheet-market:not(:empty)) { padding-bottom: 6px; }
.price-hint { margin: 0 0 10px; font-size: 13px; line-height: 1.5; color: var(--dim); }
#sheet-market:empty { display: none; }
.market-verdict {
  margin: 0 0 14px;
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text);
}
.market-verdict.low { color: var(--text-lit); font-weight: 600; }
.market-verdict span {
  display: block;
  margin-top: 4px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--dim);
}
.sheet-cheaper { width: 100%; justify-content: center; margin: 0 0 18px; }
.obj-spec.saving { color: var(--text-lit); }

.price-box { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--edge); }
.price-box h3 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0 0 10px;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-lit);
}
.price-box h3 small { font-size: 10px; font-weight: 400; color: var(--dim); }
.box-text { margin: 0 0 12px; font-size: 14px; line-height: 1.55; color: var(--text); }
.box-text b { font-family: var(--font-display); font-size: 17px; font-weight: 500; color: var(--text-lit); }
.box-more { margin: 10px 0 0; font-size: 12px; color: var(--dim); }

/* Цена поста во времени: одна линия ступеньками, без сетки и осей */
.price-chart { display: block; width: 100%; height: auto; margin-bottom: 6px; overflow: visible; }
.price-chart .line { fill: none; stroke: var(--text-lit); stroke-width: 2; stroke-linejoin: round; }
.price-chart .base { stroke: var(--edge); stroke-width: 1; }
.price-chart .dot { fill: var(--text-lit); stroke: var(--hall); stroke-width: 2; }
.price-chart .hit { fill: transparent; }
.price-chart .pt:hover .dot { r: 6px; }
.price-chart text { font-family: var(--font-ui); font-size: 11px; fill: var(--text-lit); }
.price-chart text.axis { font-size: 10px; fill: var(--dim); }
.price-chart text.end { text-anchor: end; }

.price-log { list-style: none; margin: 0; padding: 0; }
.price-log li {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px dashed var(--edge);
  font-size: 13px;
  color: var(--text);
}
.price-log li span, .price-log li i { color: var(--dim); font-style: normal; }
.price-log li b { font-weight: 500; color: var(--text-lit); }

/* Где цена этой вещи среди таких же: столбик на вещь, от дешёвых к дорогим.
   Полоса с двумя точками читалась как заглушка; столбики — те самые вещи
   из списка ниже, и нажатие на столбик показывает его строку. */
.bars { position: relative; height: 132px; margin-top: 26px; }
.bars-row { position: absolute; inset: 0; display: flex; justify-content: space-between; gap: 4px; }
.bar {
  position: relative; flex: 1; min-width: 0; max-width: 34px; height: 100%;
  display: flex; align-items: flex-end;
  padding: 0; border: 0; background: none; cursor: pointer;
}
.bar i {
  display: block; width: 100%; height: var(--h); box-sizing: border-box;
  background: var(--mute);
  transition: background var(--slow) var(--ease), opacity var(--slow) var(--ease);
}
.bar:hover i { background: var(--dim); }
.bar.sold i { background: none; border: 1px solid var(--mute); }      /* продано: цена была, вещи нет */
.bar.own i { background: var(--text-lit); }
.bar.sel i { background: var(--flare); box-shadow: 0 0 0 2px var(--hall), 0 0 0 3px var(--flare); }
.bar.sold.sel i { background: none; border-color: var(--flare); }
.bars.picked .bar:not(.sel):not(.own) i { opacity: .45; }
.bar span {
  position: absolute; left: 50%; bottom: calc(var(--h) + 6px); transform: translateX(-50%);
  font-size: 9px; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; color: var(--text-lit);
}
.bars-mid {
  position: absolute; left: 0; right: 0; z-index: 1; pointer-events: none;
  border-top: 1px dashed var(--dim);
}
.bars-mid span {
  position: absolute; left: 0; bottom: 5px;
  font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim);
}
.bars-pick { min-height: 18px; margin: 8px 0 0; font-size: 12px; color: var(--dim); }
.bars-pick b { font-weight: 400; color: var(--text-lit); }
.twin.lit { background: var(--plate); box-shadow: -8px 0 0 var(--plate), 8px 0 0 var(--plate); }
.range-ends { display: flex; justify-content: space-between; margin-top: 6px; font-size: 12px; color: var(--dim); }

.twins { margin-top: 14px; }
.twin {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 8px 0;
  border: 0;
  border-top: 1px dashed var(--edge);
  background: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.twin img, .twin-blank { width: 52px; height: 52px; object-fit: cover; background: var(--plate); display: block; }
.twin-text { min-width: 0; }
.twin-text b {
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 13px; font-weight: 500; color: var(--text-lit);
}
.twin-text i { display: block; margin-top: 3px; font-size: 11px; font-style: normal; color: var(--dim); }
.twin-price {
  font-family: var(--font-display); font-size: 15px; color: var(--text-lit);
  text-align: right; white-space: nowrap;
}
.twin-price.sold { color: var(--dim); }
.twin-price i {
  display: block; font-family: var(--font-ui); font-size: 10px; font-style: normal;
  letter-spacing: .1em; text-transform: uppercase;
}

/* Спрятанная кнопка ряда остаётся спрятанной: .with-ic задаёт display */
.ghost[hidden] { display: none; }

/* ============================================================
   Блок D: профиль, размеры, приглашения, жалоба, обучение
   ============================================================ */

/* ---------------------------------------------------------- первый экран
   Картина, название и одна кнопка. Слова ушли в обучение и в профиль. */
.splash { justify-content: flex-end; }
.splash-cta {
  margin-top: 22px;
  min-height: 60px;
  border: 0;
  background: var(--splash-ink);
  color: #000;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .2em;
  clip-path: polygon(var(--notch) 0, 100% 0, 100% calc(100% - var(--notch)),
                     calc(100% - var(--notch)) 100%, 0 100%, 0 var(--notch));
}
.splash-cta:hover { background: #e7e5e4; }

/* ---------------------------------------------------------- размеры
   Те же плашки, что в фильтрах: три ряда и поле стельки. */
.size-group { padding-bottom: 18px; }
.size-group .token { min-width: 48px; padding: 0 10px; }
.size-insole { margin-top: var(--gap); }
.size-insole input { flex-basis: 100%; }
.onboard .advanced-toggle { margin-top: 8px; }
.obj-spec .fit { font-weight: 500; color: var(--text-lit); }

/* ---------------------------------------------------------- профиль */
.me {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 6px 0 22px;
}
.me-avatar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: var(--plate);
  color: var(--text-lit);
  font-family: var(--font-display);
  font-size: 28px;
  overflow: hidden;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px),
                     calc(100% - 10px) 100%, 0 100%, 0 10px);
}
.me-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.me-who { min-width: 0; }
.me-who h2 {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  line-height: 1.15;
  color: var(--text-lit);
}
.me-who span { font-size: 12.5px; color: var(--dim); }

/* Тариф одной плашкой: что сейчас и сколько осталось; нажатие ведёт в PRO */
.me-plan {
  display: block;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--hair);
  background: var(--hall-2);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 13px;
  line-height: 1.55;
  text-align: left;
  cursor: pointer;
  transition: border-color var(--slow) var(--ease);
}
.me-plan:hover { border-color: var(--hair-lit); }
.me-plan b { display: block; margin-bottom: 2px; color: var(--text-lit); font-weight: 600; }
.me-plan i { display: block; margin-top: 6px; font-style: normal; color: var(--text-lit); }
.me-plan-more {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dim);
}
.me-plan-more .ic { width: 12px; height: 12px; }

#fit-tabs { margin-bottom: 18px; }
.legend #fit-saved { color: var(--text-lit); }
.me-hint, .me-text { margin: 0; font-size: 12px; line-height: 1.6; color: var(--mute-2); }
.me-hint { margin-top: 12px; }
.me-text { margin-bottom: 14px; font-size: 13px; color: var(--text); }

/* Приглашение: ссылка, две кнопки и четыре числа */
.ref-link { display: flex; gap: var(--gap); margin-bottom: 10px; }
.ref-link input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--hair);
  background: none;
  color: var(--text-lit);
  font-family: var(--font-ui);
  font-size: 12.5px;
  text-overflow: ellipsis;
}
.ref-link input:focus { outline: 0; border-color: var(--hair-lit); }
.ref-link .ghost { flex: none; }
.ref-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap);
  margin-top: 14px;
}
.ref-stats div {
  padding: 12px 6px 10px;
  border: 1px solid var(--hair);
  font-size: 9px;
  line-height: 1.35;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-align: center;
  color: var(--dim);
}
.ref-stats b {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--text-lit);
}

/* Строка настроек и помощи: подпись слева, переключатель или стрелка справа */
.me-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  min-height: 58px;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--hair);
  background: none;
  color: var(--text-lit);
  font-family: var(--font-ui);
  font-size: 13.5px;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}
.me-row small {
  display: block;
  margin-top: 3px;
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--dim);
}
.me-row > .ic { flex: none; color: var(--dim); transition: transform var(--slow) var(--ease); }
.me-row[aria-expanded="true"] > .ic { transform: rotate(180deg); }
.me-row[aria-checked="true"] .switch-track { background: var(--text-lit); border-color: var(--text-lit); }
.me-row[aria-checked="true"] .switch-knob { transform: translateX(18px); background: var(--hall); }
.me-about { padding: 14px 0 0; }
.me-about[hidden] { display: none; }
.me-about p { margin: 0 0 10px; font-size: 12.5px; line-height: 1.6; color: var(--mute-2); }
.me-about b { color: var(--text-lit); font-weight: 500; }

/* ---------------------------------------------------------- шапка карточки
   Значков стало четыре: поделиться, ошибка, «не то», отложить. */
#sheet > .sheet-head { gap: 0; }
#sheet > .sheet-head .icon-btn { min-width: 42px; }
#sheet > .sheet-head #sheet-save { margin-right: -12px; }
#sheet-no { min-width: 0; overflow: hidden; white-space: nowrap; }

/* Подсказка-облачко под шестиугольником */
.bubble {
  position: absolute;
  top: calc(100% + 4px);
  z-index: 3;
  max-width: min(250px, 70vw);
  padding: 10px 12px;
  border: 0;
  background: var(--text-lit);
  color: var(--hall);
  font-family: var(--font-ui);
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: none;
  text-align: left;
  cursor: pointer;
  animation: bubble-in var(--slow) var(--ease);
}
.bubble[hidden] { display: none; }
.bubble::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 16px;
  border: 6px solid transparent;
  border-top: 0;
  border-bottom-color: var(--text-lit);
}
@keyframes bubble-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

/* ---------------------------------------------------------- ошибка в объявлении */
#report .head-spacer { min-width: 84px; }
#report .styles-intro b { color: var(--text-lit); font-weight: 500; }
.report-text {
  display: block;
  width: 100%;
  min-height: 96px;
  padding: 12px;
  border: 1px solid var(--hair);
  background: none;
  color: var(--text-lit);
  font-family: var(--font-ui);
  font-size: 13.5px;
  line-height: 1.5;
  resize: vertical;
}
.report-text::placeholder { color: var(--mute); }
.report-text:focus { outline: 0; border-color: var(--hair-lit); }

/* ---------------------------------------------------------- обучение
   Затемнение — тень вокруг «окна»: окно переезжает от шага к шагу,
   и свет едет вместе с ним. */
.tour { position: fixed; inset: 0; z-index: 95; }
.tour[hidden] { display: none; }
.tour-hole {
  position: fixed;
  border: 1px solid var(--text-lit);
  box-shadow: 0 0 0 200vmax rgba(0, 0, 0, .82);
  pointer-events: none;
  transition: top var(--slow) var(--ease), left var(--slow) var(--ease),
              width var(--slow) var(--ease), height var(--slow) var(--ease);
}
.tour-card {
  position: fixed;
  left: 16px;
  right: 16px;
  max-width: 420px;
  margin: 0 auto;
  padding: 16px 18px 14px;
  background: var(--text-lit);
  color: var(--hall);
  transition: top var(--slow) var(--ease);
  clip-path: polygon(var(--notch) 0, 100% 0, 100% calc(100% - var(--notch)),
                     calc(100% - var(--notch)) 100%, 0 100%, 0 var(--notch));
}
.tour-step {
  font-size: 9px;
  letter-spacing: .22em;
  color: #6f6f6f;
}
.tour-card h3 {
  margin: 6px 0 6px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.15;
}
.tour-card p { margin: 0; font-size: 13px; line-height: 1.5; color: #262626; }
.tour-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}
.tour-actions button {
  min-height: 44px;
  border: 0;
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  cursor: pointer;
}
.tour-skip { padding: 0 4px; background: none; color: #595855; }
.tour-actions .solid { padding: 0 22px; background: var(--hall); color: var(--text-lit); font-weight: 600; }

@media (max-width: 360px) {
  .dock button { font-size: 9px; letter-spacing: .1em; }
  .ref-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .tour-hole, .tour-card { transition: none; }
  .bubble { animation: none; }
}

/* ---------------------------------------------------------- первый экран: «Пряхи»
   Полотно во весь экран и неподвижно. Для телефона из него вырезан
   вертикальный фрагмент: пряха со скрытым лицом ровно по центру, над ней —
   сцена с гобеленом. Низ уходит в чёрное, и на нём стоят табличка, название,
   кнопка и согласие. Движение — только одно, при появлении: полотно
   проступает, подписи поднимаются. */
:root { --splash-art-h: 100%; }
.splash { justify-content: flex-end; }
/* Полотно чуть выше экрана и прижато к низу: сверху уходит карниз занавеса,
   а пряха поднимается выше подписей — её лицо на 38 % высоты экрана */
.splash-art {
  background: #120e0b url("/static/img/splash-hilanderas-tall.webp")
              center bottom / auto 112% no-repeat;
}
/* Окно шире фрагмента — заполняем его целиком */
@media (min-aspect-ratio: 7/10) {
  .splash-art { background-size: cover; background-position: center 35%; }
}
/* Совсем широкое: вертикальный фрагмент растянулся бы — там полотно целиком */
@media (min-aspect-ratio: 1/1) {
  .splash-art {
    background-image: url("/static/img/splash-hilanderas.webp");
    background-position: 55% 30%;
  }
}
.splash-scrim {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .38) 0, rgba(0, 0, 0, 0) 14%),
    linear-gradient(0deg, #000 0, #000 17%, rgba(0, 0, 0, .86) 27%, rgba(0, 0, 0, .5) 37%,
                    rgba(0, 0, 0, .14) 47%, rgba(0, 0, 0, 0) 57%);
}
.splash-foot { padding: 0 24px calc(26px + env(safe-area-inset-bottom, 0px)); }

/* Табличка, как под картиной в музее */
.splash-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 9px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .62);
}
.splash-label span + span::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 1px;
  margin-right: 10px;
  vertical-align: middle;
  background: rgba(255, 255, 255, .4);
}
.splash-mark {
  font-size: clamp(64px, 21vw, 92px);
  line-height: .92;
  letter-spacing: .03em;
  margin-left: -3px;
}

/* Кнопка: пока согласия нет — тонкий контур, с согласием — белая плашка */
.splash-cta {
  margin-top: 28px;
  min-height: 58px;
  clip-path: none;
  border: 1px solid #fff;
  background: #fff;
  color: #000;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .24em;
  transition: background var(--slow) var(--ease), color var(--slow) var(--ease),
              border-color var(--slow) var(--ease);
}
.splash-cta:hover { background: #e7e5e4; }
.splash-cta[aria-disabled="true"] {
  border-color: rgba(255, 255, 255, .34);
  background: rgba(0, 0, 0, .25);
  color: rgba(255, 255, 255, .5);
}

/* Согласие: одна тихая строка под кнопкой, условия — ссылкой в тексте */
.consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 16px;
  cursor: pointer;
}
.consent[hidden] { display: none; }
.consent input { position: absolute; opacity: 0; pointer-events: none; }
.consent-box {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border: 1px solid rgba(255, 255, 255, .55);
  color: transparent;
  transition: background var(--slow) var(--ease), border-color var(--slow) var(--ease),
              color var(--slow) var(--ease);
}
.consent-box .ic { width: 14px; height: 14px; stroke: currentColor; stroke-width: 12; }
.consent input:checked + .consent-box { background: #fff; border-color: #fff; color: #000; }
.consent input:focus-visible + .consent-box { outline: 1px solid #fff; outline-offset: 2px; }
.consent-text { font-size: 12px; line-height: 1.5; color: rgba(255, 255, 255, .66); }
.consent-text a {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, .45);
  text-underline-offset: 3px;
}
.consent.nudge .consent-box { border-color: #fff; animation: consent-nudge 480ms var(--ease); }
.consent.nudge .consent-text { color: #fff; }
@keyframes consent-nudge {
  0%, 100% { transform: none; }
  25% { transform: translateX(-5px); }
  60% { transform: translateX(4px); }
}

/* Появление — один раз: полотно проступает, подписи поднимаются по очереди */
.splash:not([hidden]) .splash-art { animation: splash-art-in 1.6s var(--ease) both; }
.splash:not([hidden]) .splash-foot > * { animation: splash-rise .9s var(--ease) both; }
.splash:not([hidden]) .splash-foot > :nth-child(1) { animation-delay: .35s; }
.splash:not([hidden]) .splash-foot > :nth-child(2) { animation-delay: .45s; }
.splash:not([hidden]) .splash-foot > :nth-child(3) { animation-delay: .6s; }
.splash:not([hidden]) .splash-foot > :nth-child(4) { animation-delay: .7s; }
@keyframes splash-art-in {
  from { opacity: 0; transform: scale(1.05); }
  to { opacity: 1; transform: none; }
}
@keyframes splash-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .splash:not([hidden]) .splash-art,
  .splash:not([hidden]) .splash-foot > * { animation: none; }
}

/* Текст условий: читается как документ, а не как интерфейс */
#terms { z-index: 93; }
#terms .head-spacer { min-width: 84px; }
.terms-body { width: 100%; max-width: 640px; margin: 0 auto; }
.terms-body h2 {
  margin: 4px 0 6px;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  line-height: 1.15;
  color: var(--text-lit);
}
.terms-date {
  margin: 0 0 18px;
  font-size: 9px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--dim);
}
.terms-lead {
  margin: 0 0 8px;
  padding: 14px;
  border: 1px solid var(--edge);
  background: var(--hall-2);
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-lit);
}
.terms-body h3 {
  margin: 26px 0 8px;
  padding-top: 16px;
  border-top: 1px solid var(--hair);
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-lit);
}
.terms-body p, .terms-body li { font-size: 13px; line-height: 1.62; color: var(--text); }
.terms-body p { margin: 0 0 10px; }
.terms-body ul { margin: 0 0 10px; padding-left: 18px; }
.terms-body li { margin-bottom: 6px; }
.terms-body li::marker { color: var(--mute); }
.terms-body b { font-weight: 600; color: var(--text-lit); }
.terms-body a { color: var(--text-lit); text-underline-offset: 3px; }

/* ---------------------------------------------------------- канал и продавцы (блок E) */

/* Канал в списке фильтра: название и тихий ник рядом */
.picker-row span small { margin-left: 6px; font-size: 11px; color: var(--mute-2); }

/* Чьё наличие на экране: канал выбран в фильтре или открыт по ссылке */
.shopbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--hair-lit);
  background: var(--hall-2);
}
.shopbar[hidden] { display: none; }
.shopbar { flex-wrap: wrap; }
.shopbar-text { flex: 1; }
.shopbar-wide {
  flex: 0 0 100%;
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid var(--hair);
  font-size: 12px;
  line-height: 1.6;
  color: var(--mute-2);
}
.shopbar-wide b { color: var(--text-lit); font-weight: 500; }
.shopbar-wide button {
  display: block;
  margin-top: 6px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--hair-lit);
  background: none;
  color: var(--text-lit);
  font: inherit;
  cursor: pointer;
}
.shopbar-text { min-width: 0; }
.shopbar-text small {
  display: block;
  font-size: 9px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--dim);
}
.shopbar-text b {
  display: block;
  margin: 3px 0 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 500;
  color: var(--text-lit);
}
.shopbar-text span { font-size: 11.5px; color: var(--mute-2); }
.shopbar-tools { display: flex; flex: none; flex-direction: column; gap: var(--gap); }
/* «Под заказ» в наличии канала — своей строкой во всю ширину полосы: между
   названием и кнопками на телефоне ему тесно, название канала обрезалось
   до «Archive T…». */
.switch.shopbar-order {
  flex: 1 1 100%; flex-direction: row; align-items: center; justify-content: space-between;
  margin: 0; padding: 10px 0 0; min-height: 36px;
  border-top: 1px dashed var(--edge);
}
.shopbar-order .switch-label { white-space: nowrap; }
.shopbar-order .switch-label i { margin-left: 6px; font-style: normal; letter-spacing: 0; color: var(--mute-2); }
.shopbar-tools .ghost { min-height: 34px; padding: 0 12px; font-size: 10px; white-space: nowrap; }

/* «Продвижение» — контуром, как «паль»: метка честная, но не кричит */
.obj-flag.promo { color: var(--text) }

.sheet-channel { width: 100%; justify-content: center; margin: 14px 0 4px; }
.sheet-channel span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Кабинет продавца */
.seller-body .field-set { padding-bottom: 26px; }
/* Форма под строкой «Добавить ещё канал»: заголовок уже есть в самой строке */
#sl-add-box { padding-top: 16px; }
#sl-add-box .field-set { padding-bottom: 0; }
.sl-title {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  color: var(--text-lit);
}
.sl-switch { margin-bottom: 20px; }
.sl-form { display: flex; flex-direction: column; gap: var(--gap); }
.sl-form input, .sl-search input, .sl-fix input {
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--hair);
  background: none;
  color: var(--text-lit);
  font-family: var(--font-ui);
  font-size: 14px;
}
.sl-form input::placeholder, .ref-link input::placeholder { color: var(--mute); }
.sl-form input:focus { outline: 0; border-color: var(--hair-lit); }
.sl-form .cta { margin-top: 8px; }
.me-hint b { color: var(--text-lit); font-weight: 500; }

.sl-claim {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--hair);
  font-size: 13.5px;
  color: var(--text-lit);
}
.sl-claim b { font-weight: 500; }
.sl-claim small { display: block; margin-top: 3px; font-size: 11.5px; color: var(--dim); }
.sl-claim-tools { display: flex; flex: none; flex-direction: column; gap: var(--gap); }
.sl-claim-tools .ghost { min-height: 32px; padding: 0 10px; font-size: 10px; white-space: nowrap; }

/* Четыре числа и как они изменились против прошлого периода */
.sl-stats { margin-top: 0; }
.sl-stats i {
  display: block;
  margin-top: 4px;
  font-style: normal;
  letter-spacing: .04em;
  color: var(--mute-2);
}
.sl-stats i.up { color: #9ac48a; }

/* Показы по дням: столбик — показы, светлая часть снизу — открытия */
.sl-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 64px;
  margin: 14px 0 0;
  padding-top: 4px;
  border-bottom: 1px solid var(--hair-lit);
}
.sl-bars span {
  position: relative;
  flex: 1;
  height: max(2px, var(--h));
  background: var(--edge);
}
.sl-bars i {
  position: absolute;
  inset: auto 0 0 0;
  height: var(--h);
  background: var(--text-lit);
}
.sl-top-legend { margin-top: 20px; }

.sl-pair { display: flex; gap: var(--gap); }
.sl-pair .cta { flex: 1.3; }
.sl-pair .ghost { flex: 1; justify-content: center; min-height: 52px; }
.sl-united { margin-top: 24px; }
.sl-name { margin-top: 14px; }

.sl-states button { font-size: 9.5px; letter-spacing: .08em; padding: 0 2px; }
.sl-search {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
  padding: 0 12px;
  border: 1px solid var(--hair);
  color: var(--dim);
}
.sl-search input { flex: 1; min-width: 0; padding: 0; border: 0; }
.sl-search input:focus { outline: 0; }

/* Своя вещь строкой: кадр, название, что с ней */
.sl-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--hair);
  background: none;
  color: var(--text-lit);
  font-family: var(--font-ui);
  text-align: left;
  cursor: pointer;
}
.sl-item > .ic { flex: none; width: 16px; height: 16px; color: var(--mute); }
.sl-thumb {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 64px;
  overflow: hidden;
  background: var(--plate);
  color: var(--mute);
}
.sl-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sl-thumb--big { width: 84px; height: 104px; }
.sl-item-text { flex: 1; min-width: 0; }
.sl-item-text b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13.5px;
  font-weight: 500;
}
.sl-item-text small { display: block; margin-top: 4px; font-size: 11.5px; line-height: 1.4; color: var(--dim); }

.sl-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 14px; }
.sl-head .sheet-title { margin-top: 0; }
.sl-fix { margin-top: 26px; }
.sl-fix .ref-link { margin-bottom: var(--gap); }
.sl-kind { padding: 14px 0 4px; }
.sl-kind .token small { font-size: inherit; color: var(--mute-2); }
.sl-kind .report-text { margin: 12px 0 10px; }
.sl-open { width: 100%; justify-content: center; margin-top: 8px; }

/* Вход в кабинет продавца — в шапке профиля */
.me-who { flex: 1; }
.me-seller-top { flex: none; min-height: 40px; padding: 0 12px; font-size: 10px; }
.me-seller-top .ic { width: 18px; height: 18px; }

/* Код подтверждения канала: нажать — скопировать */
.sl-code { margin: 10px 0 14px; }
.sl-code-copy {
  padding: 3px 8px;
  border: 1px solid var(--hair-lit);
  background: none;
  color: var(--text-lit);
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12.5px;
  letter-spacing: .06em;
  cursor: pointer;
}

/* Крупное подтверждение: белый круг с галочкой */
.done {
  position: fixed;
  inset: 0;
  z-index: 98;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--pad);
  background: rgba(0, 0, 0, .94);
  opacity: 0;
  transition: opacity 220ms var(--ease);
}
.done[hidden] { display: none; }
.done.show { opacity: 1; }
.done-in { max-width: 320px; text-align: center; }
.done-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: var(--text-lit);
  color: var(--hall);
  transform: scale(.7);
  transition: transform 420ms var(--ease);
}
.done.show .done-mark { transform: none; }
.done-mark .ic { width: 56px; height: 56px; }
.done h3 {
  margin: 26px 0 10px;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  color: var(--text-lit);
}
.done p { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--text); }

/* ---------------------------------------------------------- дорога назад
   «Похожее дешевле» заменяет выдачу. Полоса над ней показывает, с какой
   вещью сравниваем, и возвращает к её карточке; та же кнопка стоит
   в конце найденного и под «дешевле не нашлось». */

.cheaper-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 2px 0 6px -6px;         /* у .readout свой отступ слева — полоса встаёт по сетке */
  width: calc(100% + 6px);
  padding: 8px 12px 8px 8px;
  border: 1px solid var(--edge);
  background: var(--hall-2);
  color: var(--text);
  font-family: var(--font-ui);
  text-align: left;
}
button.cheaper-bar { cursor: pointer; transition: border-color var(--slow) var(--ease) }
button.cheaper-bar:hover { border-color: var(--hair-lit) }
.cheaper-bar img, .cheaper-bar-blank {
  flex: none;
  width: 44px;
  height: 56px;
  object-fit: cover;
  background: var(--plate);
  display: block;
}
.cheaper-bar-text { flex: 1; min-width: 0; font-size: 12px; line-height: 1.35 }
.cheaper-bar-text i {
  display: block;
  font-style: normal;
  font-size: 9px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--dim);
}
.cheaper-bar-text b {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 400;
  color: var(--text-lit);
}
.cheaper-bar-text em { font-style: normal; color: var(--dim) }
.cheaper-bar-go {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-lit);
}
.cheaper-bar-go .ic { width: 16px; height: 16px }

.back-btn { justify-content: center; margin-top: 20px }
.back-btn .ic { width: 16px; height: 16px }
.grid-end { padding: 30px 14px 26px; text-align: center }
.grid-end b { margin-bottom: 0 }
.grid-end .back-btn { margin-top: 16px }

.more.to-top { display: flex; align-items: center; justify-content: center; gap: 8px }
.more.to-top.hidden { display: none }

/* Крестик в строке поиска: сбросить запрос с фильтрами и вернуться в «для тебя».
   Камера рядом — узкая пара, а не две кнопки по 48 пикселей. */
.icon-btn[hidden] { display: none }
.query-clear { min-width: 36px; margin-right: -10px }
.query-clear .ic { width: 18px; height: 18px }

/* Пока выдача грузится, на месте числа — слово и три точки по очереди:
   старое число над новой выдачей принимали за ответ. */
.count-wait { display: inline-flex; align-items: baseline; gap: 4px; line-height: 20px }
.count-wait i {
  width: 3px;
  height: 3px;
  background: var(--text-lit);
  opacity: .2;
  animation: count-wait 1s infinite;
}
.count-wait i:first-of-type { margin-left: 4px }
.count-wait i:nth-of-type(2) { animation-delay: .18s }
.count-wait i:nth-of-type(3) { animation-delay: .36s }
@keyframes count-wait {
  0%, 60%, 100% { opacity: .2 }
  30% { opacity: 1 }
}
@media (prefers-reduced-motion: reduce) { .count-wait i { animation: none; opacity: .6 } }

/* ---------------------------------------------------------- админ-панель
   Слой для владельца и помощников (webapp/js/admin.js). Собран из тех же
   деталей, что профиль и кабинет продавца: плашки, строки, тонкие линии. */

.me-tops { flex: none; display: flex; flex-direction: column; gap: 6px; margin-left: auto; }
.me-tops .me-seller-top { justify-content: flex-start; }

.adm-tabs {
  display: flex; gap: 2px; margin: -4px calc(var(--pad) * -1) 22px; padding: 0 var(--pad);
  overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--hair);
}
.adm-tabs::-webkit-scrollbar { display: none; }
.adm-tabs button {
  flex: none; min-height: 44px; padding: 0 12px; border: 0; border-bottom: 1px solid transparent;
  margin-bottom: -1px; background: none; color: var(--dim); cursor: pointer;
  font-family: var(--font-ui); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase;
}
.adm-tabs button[aria-selected="true"] { color: var(--text-lit); border-bottom-color: var(--text-lit); }
.adm-tabs button i {
  margin-left: 7px; padding: 2px 6px; background: var(--text-lit); color: var(--hall);
  font-style: normal; font-size: 10px; letter-spacing: 0;
}

.adm-num { font-family: var(--font-display); font-size: 22px; font-weight: 500; color: var(--mute-2); }
.adm-num.hot { color: var(--text-lit); }

.adm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 1px; padding: 1px; }
/* линии — обводкой ячеек: у сетки с фоном пустая последняя ячейка была серой */
.adm-cell { padding: 14px 12px; outline: 1px solid var(--hair); }
.adm-cell b { display: block; font-family: var(--font-display); font-size: 24px; font-weight: 500; color: var(--text-lit); }
.adm-cell span { display: block; margin-top: 4px; font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.adm-cell i { display: block; margin-top: 6px; font-style: normal; font-size: 11.5px; color: var(--mute-2); }

.adm-card { padding: 16px 0; border-top: 1px solid var(--hair); }
.adm-card h4 { margin: 0 0 6px; font-family: var(--font-display); font-size: 19px; font-weight: 500; color: var(--text-lit); }
.adm-card h4 small { display: block; margin-top: 4px; font-family: var(--font-ui); font-size: 11.5px; font-weight: 400; color: var(--dim); }
.adm-card p { margin: 0 0 8px; font-size: 13px; line-height: 1.5; color: var(--text); }
.adm-card p b { color: var(--text-lit); font-weight: 500; }
.adm-quote { font-style: italic; }
.adm-mark { padding-left: 10px; border-left: 2px solid var(--edge); font-size: 12px !important; color: var(--mute-2) !important; }
.adm-mark.ok { border-left-color: var(--text-lit); color: var(--text-lit) !important; }

.adm-actions { display: flex; flex-wrap: wrap; gap: var(--gap); margin: 12px 0 4px; }
.adm-actions button { flex: 1 1 130px; min-height: 44px; }
.adm-actions .solid {
  border: 1px solid var(--text-lit); background: var(--text-lit); color: var(--hall); cursor: pointer;
  font-family: var(--font-ui); font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
}
.adm-actions button:disabled, .me-row:disabled { opacity: .45; cursor: default; }
.adm-bad { border-color: #7a2a2d !important; color: #e5484d !important; }
.adm-danger { margin-top: 10px; padding-top: 18px; border-top: 1px solid #7a2a2d; }
.adm-danger .legend { color: #e5484d; }

.adm-input {
  flex: 1; min-width: 0; width: 100%; min-height: 44px; padding: 0 12px;
  border: 1px solid var(--hair); background: none; color: var(--text-lit);
  font-family: var(--font-ui); font-size: 14px;
}
.adm-input::placeholder { color: var(--mute); }
.adm-input:focus { outline: 0; border-color: var(--hair-lit); }
.adm-card .adm-input { margin: 4px 0 2px; }
.adm-find { display: flex; gap: var(--gap); margin-bottom: 10px; }
.adm-find .ghost { flex: none; }
.adm-chips { margin-bottom: 12px; }

.adm-list { border-top: 1px solid var(--hair); }
.adm-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; min-height: 56px; padding: 10px 0; border: 0; border-bottom: 1px solid var(--hair);
  background: none; color: var(--text); text-align: left; cursor: pointer;
  font-family: var(--font-ui); font-size: 13px; line-height: 1.4;
}
.adm-row--static { cursor: default; }
.adm-row > span { min-width: 0; }
.adm-row b { color: var(--text-lit); font-weight: 500; }
.adm-row small { display: block; margin: 2px 0 4px; font-size: 11.5px; color: var(--dim); }
.adm-row em { flex: none; font-style: normal; font-size: 12px; color: var(--mute-2); white-space: nowrap; }
.adm-tag {
  display: inline-block; margin: 2px 6px 0 0; padding: 2px 6px; border: 1px solid var(--edge);
  font-style: normal; font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim);
}
.adm-tag.ok { border-color: var(--hair-lit); color: var(--text-lit); }
.adm-tag.bad { border-color: #7a2a2d; color: #e5484d; }
.adm-tag.off { color: var(--mute-2); }
.adm-link {
  flex: none; padding: 6px 0; border: 0; background: none; color: var(--text-lit); cursor: pointer;
  font-family: var(--font-ui); font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  text-decoration: underline; text-underline-offset: 4px;
}
.adm-sub { margin: -6px 0 10px; font-size: 12.5px; color: var(--dim); }
.adm-flags { margin: 0 0 6px; }
.adm-flags:empty { display: none; }

/* быстрые правки вещи в её карточке */
.adm-item {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  margin: 0 0 18px; padding: 10px; border: 1px dashed var(--edge);
}
.adm-item small { width: 100%; font-size: 9px; letter-spacing: .18em; text-transform: uppercase; color: var(--mute-2); }
.adm-item .token { min-height: 34px; padding: 0 10px; font-size: 10px; }
.adm-item .adm-find { width: 100%; margin: 4px 0 0; }
.adm-item .adm-find[hidden] { display: none; }
#sheet-admin:empty { display: none; }
