/* ── Уместно · пошаговый конфигуратор (визард) ───────────────────────
   Мобайл-first редизайн /configure/. Включается флагом (?v=2 или cookie
   umestno_wiz=1) — см. boot-скрипт в configure/index.html. Старая форма
   (.u-calc) остаётся дефолтом и не трогается.

   Принцип: разметка визарда содержит ТЕ ЖЕ хуки, что ждёт calc.js
   (.u-calc__choice, [data-dim], [data-items], .u-calc__pri-btn,
   .u-calc__cta, [data-promo-block], #u-consent-oferta), поэтому промокоды,
   fit_partial, сабмит и prefill работают без изменения JS. wizard.css лишь
   переопределяет внешний вид этих хуков внутри scope .u-wiz, а wizard-nav.js
   добавляет навигацию по шагам + модалки.

   Токены берём из landing_design/styles.css (--u-*). Локально доопределяем
   только то, чего там нет (focus-ring terracotta). */

/* По умолчанию визард скрыт: атрибут [hidden] должен побеждать .u-wiz{
   display:flex}, иначе при каждой загрузке /configure/ (в т.ч. без флага)
   визард на миг перекрывал бы рабочую форму, пока внизу страницы не
   отработает boot-скрипт. Boot снимает [hidden] (флаг вкл) либо удаляет
   узел целиком (флаг выкл). */
.u-wiz[hidden] { display: none !important; }

.u-wiz {
  --wz-accent-soft: #F6E7DC;   /* terracotta focus-ring (нет в общих токенах) */
  --wz-sage-soft:   #EAEFE4;   /* шалфейный фон выбора / превью-кнопки */
  --wz-pad: clamp(16px, 4.5vw, 22px);
  /* Десктоп: ширина = размеры из оригинального макета (wizard.jsx WShell):
     форма 600 + панель 340 + gap 56 + padding 56×2 ≈ 1120px. */
  --wz-deskmax: 1120px;

  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--u-bg);
  font-family: var(--f-sans, 'Manrope', system-ui, sans-serif);
  color: var(--u-ink);
  z-index: 1;
  overflow: hidden;
}

/* ── Топбар: лого + «Конфигуратор» слева · бургер справа ───── */
.u-wiz__topbar {
  flex: 0 0 auto;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 var(--wz-pad);
  background: var(--u-card);
  border-bottom: 1px solid var(--u-line);
}
/* Бургер-меню — дизайн взят из старого конфигуратора (.u-burger):
   44×44, gap 5, линии 24×2. Прижат к правому краю через margin-left:auto. */
.u-wiz__menu {
  width: 44px; height: 44px;
  flex: 0 0 auto; padding: 0;
  margin-left: auto;
  border: 0; background: transparent;
  border-radius: 8px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px;
}
.u-wiz__menu span {
  display: block; width: 24px; height: 2px;
  background: var(--u-ink); border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease;
}
body.u-nav-open .u-wiz__menu span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.u-nav-open .u-wiz__menu span:nth-child(2) { opacity: 0; }
body.u-nav-open .u-wiz__menu span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
/* Штатная мобильная nav сайта (#u-mobile-nav) переносится в body и
   позиционируется fixed под топбаром визарда (height 56). z-index ниже
   модалок (9998), но выше топбара (.u-wiz z:1). Стили самих ссылок и фон
   берутся из landing.css (.u-mobile-nav) — то же меню, что в старом
   конфигураторе. */
body.u-wiz-active #u-mobile-nav:not([hidden]) {
  position: fixed; top: 56px; left: 0; right: 0;
  z-index: 9000;
  max-height: calc(100vh - 56px); overflow-y: auto;
  animation: u-wiz-menu-down .26s cubic-bezier(.2,.7,.3,1);
}
@keyframes u-wiz-menu-down { from { transform: translateY(-12px); opacity: 0; } to { transform: none; opacity: 1; } }
/* Лого в топбаре (моб/планшет) — отдельный знак logo-mark.svg (квадрат
   710×710), без слова «уместно». Раньше обрезали wordmark по 18px, но
   знак в нём не укладывался в расчётные «первые 57px» — вылезало слово. */
.u-wiz__brand {
  display: flex; align-items: center; flex: 0 0 auto;
  text-decoration: none;
}
.u-wiz__brand-crop {
  display: inline-flex;
  width: 26px; height: 26px;
}
.u-wiz__brand-crop img { height: 26px; width: 26px; display: block; }
/* Лейбл «Конфигуратор» — рядом с лого, отделён лёгким разделителем
   (вертикальная палочка, как в editorial-стиле). */
.u-wiz__topbar-label {
  flex: 0 0 auto;
  padding-left: 12px;
  border-left: 1px solid var(--u-line-2);
  font-family: var(--f-sans, sans-serif);
  font-size: 14px; font-weight: 600;
  color: var(--u-ink);
}

/* ── Прогресс-бар ───────────────────────────────────────────── */
.u-wiz__progress {
  flex: 0 0 auto;
  padding: 10px var(--wz-pad) 2px;
}
.u-wiz__progress-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 6px;
}
.u-wiz__progress-head .s {
  font-family: var(--f-mono, monospace);
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--u-ink-3);
}
/* Лейбл шага — тем же моношрифтом, что и «Шаг X из 3» рядом (была sans —
   разнобой на одной строке). Тот же регистр/трекинг, но темнее и жирнее,
   чтобы читался как активный шаг. */
.u-wiz__progress-head .l {
  font-family: var(--f-mono, monospace);
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--u-ink);
}
.u-wiz__bar {
  height: 6px; border-radius: 99px;
  background: var(--u-line);
  overflow: hidden;
}
.u-wiz__bar i {
  display: block; height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--u-accent), var(--u-accent-d));
  transition: width .32s cubic-bezier(.2,.7,.3,1);
}

/* ── Область шага: fit-to-screen (как Screen в макете) ───────────
   Не прокрутка, а flex-колонка: активный шаг заполняет высоту экрана,
   а распорки .u-wiz__grow/.u-wiz__spacer распределяют контент так, чтобы
   всё уместилось на один экран без скролла (overflow-y:auto — только
   страховка для очень низких экранов). */
.u-wiz__scroll {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 6px var(--wz-pad) 0;
}
.u-wiz__step { display: none; }
.u-wiz__step.is-on {
  display: flex; flex-direction: column;
  flex: 1 1 auto; min-height: 0;
  animation: u-wiz-fade .26s ease;
}
@keyframes u-wiz-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
/* Распорки fit-to-screen (Grow = гибкая, Spacer = фикс.; высоты задаются
   инлайн, как в макете). На десктопе (карточный поток) — выключены. */
.u-wiz__grow { flex: 1 1 0; min-height: 0; }
.u-wiz__spacer { flex: 0 0 auto; }

/* ── Типографика шага ───────────────────────────────────────── */
/* Title — display 28 (как Title size=28 в макете) */
.u-wiz__title {
  font-family: var(--f-display, 'Cormorant Garamond', Georgia, serif);
  font-weight: 500;
  font-size: clamp(27px, 7.8vw, 32px);
  line-height: 1.04; letter-spacing: -0.01em;
  margin: 0 0 6px;
  overflow-wrap: break-word;
}
.u-wiz__title em { font-style: italic; color: var(--u-accent); font-weight: 500; }
/* Lead — sans 12.5 */
.u-wiz__lead {
  font-size: clamp(12.5px, 3.5vw, 14px); line-height: 1.5;
  color: var(--u-ink-2); margin: 0 0 8px; max-width: 42ch;
}
/* Per-step mb из макета: A1 mb=8 (дефолт), A2 mb=14, A5 mb=13. */
.u-wiz__step[data-wiz-step="2"] .u-wiz__lead { margin-bottom: 14px; }
.u-wiz__step[data-wiz-step="3"] .u-wiz__lead { margin-bottom: 13px; }
/* Kicker — mono 10.5; отступ СВЕРХУ задаётся распоркой Spacer/Grow, поэтому
   margin-top:0 (как в макете) */
.u-wiz__kicker {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--f-mono, monospace);
  font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--u-ink-3);
  margin: 0 0 8px;
}
.u-wiz__kicker::before {
  content: ""; width: 14px; height: 2px; border-radius: 2px;
  background: var(--u-accent); flex: 0 0 auto;
}
.u-wiz__help {
  margin-left: 4px; width: 16px; height: 16px;
  border-radius: 50%; border: 1.5px solid var(--u-taupe);
  background: transparent; color: var(--u-ink-3);
  font-size: 10px; font-weight: 700; line-height: 1;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}

/* ── Превью-кнопка «как будет выглядеть результат» (PreviewBanner) ─
   В макете PreviewBanner имеет marginBottom: 13 — нижний отступ ВНУТРИ
   самой кнопки. Без него после баннера остаётся только Spacer h=14, и
   баннер визуально слипается с блоком «Тип пространства» (выглядит как
   нарушение вертикального ритма). */
.u-wiz__preview {
  width: 100%; height: 44px; margin: 0 0 13px;
  border-radius: 12px; cursor: pointer;
  border: 1.5px solid var(--wz-sage-soft);
  background: var(--wz-sage-soft);
  color: var(--u-sage-dd);
  font-family: inherit; font-size: 13px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.u-wiz__preview svg { flex: 0 0 auto; }
/* На шаге 3 — это PreviewBtn (а не PreviewBanner): без margin-bottom,
   отступ задаёт следующий Grow min=12 (см. HTML). */
.u-wiz__step[data-wiz-step="3"] .u-wiz__preview { margin-bottom: 0; }

/* ── Подсказка-рулетка над размерами ────────────────────────── */
.u-wiz__measure {
  width: 100%; text-align: left; cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  padding: 0; margin-bottom: 10px;
  border: none; background: transparent;
  font-family: inherit; font-size: 12px; line-height: 1.3; color: var(--u-ink-3);
}
.u-wiz__measure img { width: 20px; height: 20px; flex: 0 0 auto; display: block; }
.u-wiz__measure b { font-weight: 700; color: var(--u-ink-2); }
.u-wiz__measure .more {
  margin-left: auto; flex: 0 0 auto;
  font-weight: 600; color: var(--u-sage-d);
  border-bottom: 1px solid var(--u-sage);
}

/* ── Чипы (тип пространства / что храните) — переопределяем
      старый .u-calc__choice (card) под компактный чип ────────── */
.u-wiz .u-calc__choices {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.u-wiz .u-calc__choice {
  height: auto !important;
  width: auto;
  flex: 0 0 auto;
  flex-direction: row;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1.5px solid var(--u-line-2);
  background: var(--u-card);
  color: var(--u-ink-2);
  font-size: 12.5px; font-weight: 600;
  box-shadow: var(--sh-card, 0 1px 3px rgba(80,70,55,0.05));
}
/* В макете (Chip) у чипов НЕТ иконки категории — только текст, галочка на
   выбранном и «скоро» у недоступных. Иконки из старой формы делали чипы
   шире, 3 не помещались в строку и переносились (+~80px высоты → скролл). */
.u-wiz .u-calc__choice .u-calc__choice-ic { display: none; }
.u-wiz .u-calc__choice.is-on {
  border-color: var(--u-sage-d);
  background: var(--wz-sage-soft);
  color: var(--u-sage-dd);
}
/* галочка на выбранном чипе (как Check в Chip) */
.u-wiz .u-calc__choice.is-on::before {
  content: ""; width: 13px; height: 13px; flex: 0 0 auto;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M2.5 7.5 6 11 11.5 3.5' fill='none' stroke='%237D8C72' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 13px no-repeat;
}
.u-wiz .u-calc__choice.is-soon { opacity: 0.55; border-style: dashed; }
.u-wiz .u-calc__choice-soon {
  position: static; top: auto; right: auto; padding: 0; margin-left: 2px;
  font-family: var(--f-mono, monospace); font-size: 8.5px; background: none; border: none; color: var(--u-ink-3);
}

/* ── Размеры ─────────────────────────────────────────────────── */
.u-wiz .u-calc__sizes { display: flex; gap: 8px; }
.u-wiz .u-calc__sz {
  flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0;
}
.u-wiz .u-calc__sz > span {
  font-family: var(--f-mono, monospace); font-size: 9px;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--u-ink-3);
  text-align: center;
}
.u-wiz .u-calc__sz input {
  height: 48px; width: 100%; box-sizing: border-box;
  border: 1.5px solid var(--u-line-2); border-radius: 12px;
  background: var(--u-card);
  text-align: center;
  font-family: var(--f-display, serif); font-size: 24px; font-weight: 600; color: var(--u-ink);
  transition: border-color .15s, box-shadow .15s;
}
.u-wiz .u-calc__sz input:focus {
  outline: none; border-color: var(--u-accent);
  box-shadow: 0 0 0 3px var(--wz-accent-soft);
}
.u-wiz.is-dim-warn .u-calc__sz input { color: var(--u-taupe); }

/* В макете SizePresets — ОДНА flex-строка с gap:13, где «Частые» и каждый
   из трёх пресетов — равноправные дети. У нас HTML двухуровневый
   (preset-row > preset-label + presets > buttons), поэтому делаем
   внутренний контейнер прозрачным через display:contents — кнопки
   «подмешиваются» в родительский flex и встают в одну строку. */
.u-wiz .u-calc__preset-row {
  display: flex; flex-direction: row; align-items: baseline;
  gap: 13px; flex-wrap: wrap; margin-top: 10px;
}
.u-wiz .u-calc__presets { display: contents; }
.u-wiz .u-calc__preset-label {
  font-family: var(--f-mono, monospace); font-size: 9px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--u-ink-3);
}
.u-wiz .u-calc__presets { display: flex; gap: 13px; flex-wrap: wrap; }
.u-wiz .u-calc__preset {
  background: none !important; border: none !important; border-radius: 0 !important;
  padding: 0 0 1px !important;
  font-family: var(--f-mono, monospace); font-size: 11.5px; font-weight: 500;
  color: var(--u-ink-3) !important; cursor: pointer;
  border-bottom: 1.5px solid transparent !important;
}
.u-wiz .u-calc__preset.is-on {
  color: var(--u-ink) !important;
  border-bottom-color: var(--u-taupe) !important;
}

/* «Не знаю размеры» чекбокс */
.u-wiz .u-calc__check {
  display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; cursor: pointer;
}
.u-wiz .u-calc__check input { position: absolute; opacity: 0; pointer-events: none; }
.u-wiz .u-calc__check .box {
  width: 20px; height: 20px; flex: 0 0 auto; margin-top: 1px;
  border: 1.5px solid var(--u-taupe); border-radius: 6px;
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.u-wiz .u-calc__check input:checked + .box { background: var(--u-sage-d); border-color: var(--u-sage-d); }
.u-wiz .u-calc__check-txt { font-size: 12px; line-height: 1.4; color: var(--u-ink-2); }
.u-wiz .u-calc__check-txt .t { font-weight: 600; color: var(--u-ink); display: block; }
.u-wiz .u-calc__check-txt .h { color: var(--u-ink-3); }

/* ── Шаг 2: категории ───────────────────────────────────────── */
.u-wiz__itemhead {
  /* по A2: padding 0 2px 1px, gap 7, и третий «пустой» span шириной
     trash-кнопки — выравнивает заголовки колонок ровно над контентом строк */
  display: flex; gap: 7px; padding: 0 2px 1px;
}
.u-wiz__itemhead span {
  font-family: var(--f-mono, monospace); font-size: 9.5px;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--u-ink-3);
}
.u-wiz__itemhead span:nth-child(1) { flex: 1.2 1 0; }
.u-wiz__itemhead span:nth-child(2) { flex: 1 1 0; }
.u-wiz__itemhead span:nth-child(3) { width: 38px; flex: 0 0 auto; }
.u-wiz .u-calc__items { display: flex; flex-direction: column; gap: 8px; }
.u-wiz .u-calc__item-row { display: flex; gap: 7px; align-items: center; }
.u-wiz .u-calc__field { flex: 1 1 0; min-width: 0; }
.u-wiz .u-calc__field:nth-child(1) { flex: 1.2 1 0; }
/* per-row подписи прячем — есть общий ItemHead сверху */
.u-wiz .u-calc__field-lbl { display: none; }
.u-wiz .u-calc__select-wrap { position: relative; }
.u-wiz .u-calc__select-wrap select {
  width: 100%; height: 44px; box-sizing: border-box;
  appearance: none; -webkit-appearance: none;
  /* по A2 SelectMini — border solid var(--u-line) (не --u-line-2) */
  border: 1.5px solid var(--u-line); border-radius: 11px;
  background: var(--u-card); color: var(--u-ink);
  font-family: inherit; font-size: 12px; font-weight: 600;
  padding: 0 28px 0 11px;
  text-overflow: ellipsis;
}
.u-wiz .u-calc__select-wrap select:disabled { color: var(--u-ink-3); }
.u-wiz .u-calc__select-wrap svg {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  color: var(--u-ink-3); pointer-events: none;
}
.u-wiz .u-calc__item-rm {
  width: 38px; height: 44px; flex: 0 0 auto;
  /* padding:0 — браузерный дефолт <button> 1px 6px + box-sizing:border-box
     сжимали content area до ~23px и поджимали SVG. */
  padding: 0;
  border: 1.5px solid var(--u-line-2); border-radius: 11px;
  background: var(--u-card); color: var(--u-ink-3);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
/* Иконка корзины — крупнее без увеличения самой кнопки.
   SVG из calc.js рендерится с width="14" height="14" атрибутами;
   !important чтобы наверняка перебить и кэш-варианты. */
.u-wiz .u-calc__item-rm svg {
  width: 24px !important; height: 24px !important;
  display: block; stroke-width: 1.8;
}
.u-wiz .u-calc__dup-hint { font-size: 11px; color: var(--u-accent-d); margin: 8px 2px 0; line-height: 1.4; }
/* AddCat (как в A2): обёртка с кнопкой + подписью под ней. На кнопке
   справа абсолютный счётчик N/4. При is-full (count >= max-1, т.е. 3+)
   рамка/счётчик переходят на accent — визуальный сигнал «лимит почти
   достигнут». Когда строк = max, calc.js скрывает саму кнопку через
   display:none — подпись остаётся видимой и сообщает «лимит». */
.u-wiz__addcat { display: flex; flex-direction: column; gap: 7px; }
.u-wiz .u-calc__add {
  position: relative;
  width: 100%; height: 42px; padding: 0;
  border: 1.5px dashed var(--u-line); border-radius: 12px;
  background: transparent; color: var(--u-ink-3);
  font-family: inherit; font-size: 12.5px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 7px; cursor: pointer;
}
.u-wiz .u-calc__add .plus { font-size: 15px; margin-top: -1px; line-height: 1; }
.u-wiz .u-calc__add .count {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  font-family: var(--f-mono, monospace); font-size: 11px; font-weight: 600;
  color: var(--u-ink-3);
}
.u-wiz .u-calc__add.is-full { border-color: var(--wz-accent-soft); color: var(--u-accent-d); }
.u-wiz .u-calc__add.is-full .count { color: var(--u-accent); }
.u-wiz__addcat-sub {
  font-size: 11px; color: var(--u-ink-3); text-align: center;
}

/* ── Приоритет — компактный Segmented control (как в A2) ─────────
   Три опции 38px высоты в одной пилюле background:line-2, padding:3, gap:4.
   Выбранная — белый фон с accent-границей, accentD-цветом текста и
   галочкой. Подзаголовки .sub скрыты (на мобиле они не показываются —
   они есть в попапе «Что значит важнее»). */
.u-wiz .u-calc__priority {
  display: flex; flex-direction: row; gap: 4px;
  padding: 3px; background: var(--u-line-2); border-radius: 13px;
}
.u-wiz .u-calc__pri-btn {
  flex: 1 1 0; min-width: 0;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  height: 38px; padding: 0;
  background: transparent;
  border: 1.5px solid transparent; border-radius: 10px;
  color: var(--u-ink-3);
  font-family: inherit; font-size: 12.5px; font-weight: 600;
  cursor: pointer;
}
.u-wiz .u-calc__pri-btn.is-on {
  background: var(--u-card);
  border-color: var(--u-accent);
  color: var(--u-accent-d);
  box-shadow: 0 1px 3px rgba(80,70,55,0.05);
}
.u-wiz .u-calc__pri-check {
  width: 13px; height: 13px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--u-accent-d);
}
.u-wiz .u-calc__pri-check svg { width: 13px; height: 13px; }
.u-wiz .u-calc__pri-body { display: contents; }
.u-wiz .u-calc__pri-body .ttl {
  font-family: inherit; font-size: 12.5px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.u-wiz .u-calc__pri-btn.is-on .u-calc__pri-body .ttl { color: var(--u-accent-d); }
.u-wiz .u-calc__pri-body .sub { display: none; }

/* ── Шаг 3: сводка ──────────────────────────────────────────────
   В макете A5: border 1.5px var(--u-line), radius 16, padding "2px 14px",
   marginBottom 11. Отступ СВЕРХУ — задаёт Grow min=12 перед карточкой,
   собственный margin-top = 0 (иначе двойной зазор). */
.u-wiz__summary {
  border: 1.5px solid var(--u-line); border-radius: 16px;
  background: var(--u-card); padding: 2px 14px; margin: 0 0 11px;
  box-shadow: var(--sh-card, 0 1px 3px rgba(80,70,55,0.05));
}
.u-wiz__sumrow {
  display: flex; align-items: center; gap: 10px; padding: 11px 0;
  border-bottom: 1px solid var(--u-line-2);
}
.u-wiz__sumrow:last-child { border-bottom: none; }
.u-wiz__sumrow .k {
  font-family: var(--f-mono, monospace); font-size: 10px;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--u-ink-3);
  width: 78px; flex: 0 0 auto;
}
.u-wiz__sumrow .v { font-size: 13px; font-weight: 600; color: var(--u-ink); flex: 1 1 auto; min-width: 0; }
.u-wiz__sumrow .edit {
  display: flex; align-items: center; gap: 4px; flex: 0 0 auto;
  font-size: 11px; font-weight: 600; color: var(--u-ink-3); background: none; border: none; cursor: pointer;
}

/* промокод и оферта внутри визарда — мягкая адаптация существующих блоков */
/* PromoRow по A5: dashed-карточка вместо текстовой ссылки с пунктирным
   подчёркиванием. Toggle превращаем в полный блок-кнопку: рамка dashed
   var(--u-line), background var(--u-card), padding 11/13, radius 12, gap 10.
   «Есть промокод?» 600 ink-2 слева, «Ввести» 600 accent справа (через ::after,
   потому что SVG-«иконка билета» в HTML здесь не нужна по макету). При
   открытой панели — «Ввести» меняем на крестик, скрываем подпись.
   ВАЖНО: переопределяем поверх calc.css, не трогая calc.js. */
.u-wiz .u-promo { margin: 0 0 10px; }
.u-wiz .u-promo__toggle {
  width: 100%;
  display: flex; align-items: center; gap: 10px;
  padding: 11px 13px;
  border-radius: 12px;
  border: 1.5px dashed var(--u-line); background: var(--u-card);
  text-decoration: none; cursor: pointer;
  font-family: inherit; font-size: 13px; font-weight: 600;
  color: var(--u-ink-2);
}
.u-wiz .u-promo__toggle:hover { color: var(--u-ink-2); }
.u-wiz .u-promo__toggle svg { display: none; }
.u-wiz .u-promo__toggle::after {
  content: "Ввести";
  margin-left: auto;
  font-size: 12px; font-weight: 600; color: var(--u-accent);
}
.u-wiz .u-promo__toggle[aria-expanded="true"]::after { content: "Закрыть"; }
.u-wiz .u-consent { display: flex; gap: 10px; align-items: flex-start; padding: 2px 0; }
.u-wiz .u-consent label { font-size: 11.5px; line-height: 1.45; color: var(--u-ink-2); cursor: pointer; }
.u-wiz .u-consent label a { color: var(--u-accent); font-weight: 600; text-decoration: none; }
/* Кастомный чекбокс 20×20 (как CheckRow в макете) — таupe-рамка по умолчанию,
   sage-фон с белой галочкой при checked. */
.u-wiz #u-consent-oferta {
  appearance: none; -webkit-appearance: none;
  width: 20px; height: 20px; flex: 0 0 auto; margin: 1px 0 0;
  border: 1.5px solid var(--u-taupe); border-radius: 6px;
  background: transparent; cursor: pointer;
  position: relative; transition: background .12s, border-color .12s;
}
.u-wiz #u-consent-oferta:checked {
  background: var(--u-sage-d); border-color: var(--u-sage-d);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M2.5 7.5 6 11 11.5 3.5' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: center; background-repeat: no-repeat; background-size: 13px;
}

/* ── Footer (липкий CTA-док) ────────────────────────────────────
   Симметрия по вертикали: 16 разделитель → кнопка → подпись → низ.
   safe-area-inset-bottom УБРАН — он добавлял на iPhone до 34px к низу
   и ломал визуальное равенство. row-gap флекса = 0, чтобы вертикальный
   отступ задавался ТОЛЬКО padding-top и margin-top подписи. */
.u-wiz__footer {
  flex: 0 0 auto;
  padding: 16px var(--wz-pad);
  background: rgba(255,253,249,0.92);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-top: 1px solid var(--u-line);
  display: flex; flex-wrap: wrap; gap: 0 10px; align-items: center;
}
/* «Назад» — компактная кнопка-стрелка слева от «Далее» (на мобиле и
   десктопе). На шаге 1 скрывается через [disabled]. */
/* «Назад» — квадратная outline-иконка-кнопка со стрелкой «‹». Размер
   привязан к высоте CTA, чтобы выглядеть равной кнопке «Далее». */
.u-wiz__back-d {
  flex: 0 0 auto;
  width: 52px; height: 52px; padding: 0;
  border-radius: 15px; cursor: pointer;
  border: 1.5px solid var(--u-line); background: var(--u-card); color: var(--u-ink-2);
  font-family: inherit; font-size: 22px; font-weight: 500; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
}
.u-wiz__back-d[disabled] { display: none; }
.u-wiz__next {
  flex: 1 1 auto;
  height: 52px; border: none; border-radius: 15px; cursor: pointer;
  background: linear-gradient(180deg, var(--u-sage-d), var(--u-sage-dd)); color: #fff;
  font-family: inherit; font-size: 15px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  box-shadow: 0 8px 22px -8px rgba(105,120,95,0.6);
}
.u-wiz__next[disabled] { background: var(--u-line-2); color: var(--u-ink-3); box-shadow: none; cursor: not-allowed; }
/* [hidden] не скрывает элементы с явным display (display:flex перебивает
   UA-правило [hidden]{display:none}). next-кнопка и финальный CTA имеют
   display:flex, поэтому глушим их через явное правило — иначе на каждом
   шаге показались бы обе кнопки разом. */
.u-wiz__next[hidden],
.u-wiz__footer .u-calc__actions[hidden] { display: none !important; }
/* финальный CTA (calc.js) на шаге 3 — растягиваем под футер */
.u-wiz__footer .u-calc__actions { margin: 0; }
.u-wiz__footer .u-calc__cta {
  width: 100%; height: 52px; box-sizing: border-box;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  border-radius: 15px; font-size: 15px;
  /* Тот же премиум-градиент и тень, что у кнопки «Далее» (.u-wiz__next),
     чтобы главный CTA не выглядел плоским/дешевле второстепенной кнопки.
     Раньше цвет был захардкожен инлайном в HTML (флэт sage). */
  background: linear-gradient(180deg, var(--u-sage-d), var(--u-sage-dd));
  box-shadow: 0 8px 22px -8px rgba(105,120,95,0.6);
}
/* Подпись — отдельной строкой ниже кнопок (flex-basis:100%), отступ сверху
   16px = padding-top футера = padding-bottom (без safe-area). Симметрия. */
.u-wiz__note {
  flex-basis: 100%; margin: 16px 2px 0;
  font-size: 10.5px; line-height: 1.45; color: var(--u-ink-3); text-align: center;
}
/* Адаптивная компактизация футера на коротких экранах:
   - базово (iPhone-class, ≥720px высоты): 16/16/16, кнопка 52
   - ≤720px (большинство Android, iPhone SE 2/3): 8/8/8, кнопка 48
   - ≤600px (iPhone SE 1, бюджетные Android 360×640 и ниже): 5/5/5, кнопка 44
   Симметрия сохраняется на всех брейкпоинтах. */
@media (max-height: 720px) {
  .u-wiz__footer { padding: 8px var(--wz-pad); }
  .u-wiz__note { margin-top: 8px; }
  .u-wiz__next, .u-wiz__back-d, .u-wiz__footer .u-calc__cta { height: 48px; }
  .u-wiz__back-d { width: 48px; }
}
@media (max-height: 600px) {
  .u-wiz__footer { padding: 5px var(--wz-pad); }
  .u-wiz__note { margin-top: 5px; }
  .u-wiz__next, .u-wiz__back-d, .u-wiz__footer .u-calc__cta { height: 44px; }
  .u-wiz__back-d { width: 44px; }
}
[data-cta-price-old] { text-decoration: line-through; opacity: 0.6; margin-right: 6px; font-weight: 400; }

/* ══ Модалки — точный порт PreviewPopup / MeasurePopup / PrioHelpPopup ══
   Бэкдроп общий, лист — нижний sheet (left:0, right:0, bottom:0). КАЖДЫЙ
   попап имеет свой набор padding-ов / margin-ов прямо в .u-wiz-mp--*,
   потому что в макете три структуры разные:
   - preview: трёхсекционный flex с CTA-overlap -20px;
   - measure: единый padding 12/18/22, поток с marginBottom;
   - prio:    единый padding 10/18/(18+safe), поток с marginBottom.
   Никаких универсальных «head/body/footer» секций нет. */
.u-wiz-modal {
  position: fixed; inset: 0; z-index: 9998;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(40,32,26,0.5);
  -webkit-backdrop-filter: blur(1.5px); backdrop-filter: blur(1.5px);
  font-family: var(--f-sans, sans-serif);
  animation: u-wiz-mfade .2s ease;
}
@keyframes u-wiz-mfade { from { opacity: 0; } to { opacity: 1; } }
@keyframes u-wiz-mup { from { transform: translateY(30px); } to { transform: none; } }
/* Внешний контейнер sheet — нужен только для центрирования и max-width;
   на узких устройствах фактически растягивается на всю ширину. */
.u-wiz-modal__sheet {
  width: 100%; max-width: 420px;
  background: transparent; box-shadow: none;
  border-radius: 0;
  animation: u-wiz-mup .26s cubic-bezier(.2,.7,.3,1);
  display: flex; flex-direction: column; align-items: stretch;
}
/* Общие примитивы шапки попапа (одинаковы во всех трёх). */
.u-wiz-mp__grip { width: 40px; height: 4px; border-radius: 99px; background: var(--u-taupe); margin: 0 auto; }
.u-wiz-mp__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.u-wiz-mp__title {
  font-family: var(--f-display, serif); font-weight: 500; font-size: 23px;
  line-height: 1.05; margin: 0; color: var(--u-ink);
}
.u-wiz-mp__title em { font-style: italic; color: var(--u-accent); }
.u-wiz-mp__close {
  width: 30px; height: 30px; flex: 0 0 auto; border-radius: 50%;
  border: 1px solid var(--u-line); background: var(--u-card); color: var(--u-ink-2);
  font-size: 15px; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.u-wiz-mp__cta {
  width: 100%; height: 52px; border: none; border-radius: 15px; cursor: pointer;
  background: linear-gradient(180deg, var(--u-sage-d), var(--u-sage-dd)); color: #fff;
  font-family: inherit; font-size: 15px; font-weight: 600;
  box-shadow: 0 8px 22px -8px rgba(105,120,95,0.6);
}

/* ── PreviewPopup — трёхсекционная структура с overlap -20px ──
   Лист: display:flex, flexDirection:column, maxHeight: calc(100% - 8px),
   borderRadius: 24/24/0/0. Три секции внутри:
     .__top     flex:0 0, padding 10/18/8       — grip + head
     .__pvbody  flex:0 1, padding 0/18, z:1     — превью-карточка
     .__pvfoot  flex:0 0, marginTop:-20, z:2,   — CTA НАЕЗЖАЕТ на 20px
                padding 10/18/(14+safe),
                borderTop, background:bg
   Превью-карточка внутри body:
     background:#FFFBF5, border, borderRadius:16/16/0/0,
     paddingBottom:26, overflow:hidden, img width:100%
*/
.u-wiz-mp--preview {
  display: flex; flex-direction: column; overflow: hidden;
  max-height: calc(100% - 8px);
  background: var(--u-bg);
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -24px 60px rgba(0,0,0,0.3);
}
.u-wiz-mp--preview .u-wiz-mp__top {
  flex: 0 0 auto; padding: 10px 18px 8px;
}
.u-wiz-mp--preview .u-wiz-mp__grip { margin: 0 auto 10px; }
.u-wiz-mp__pvbody {
  flex: 0 1 auto; min-height: 0;
  padding: 0 18px; position: relative; z-index: 1;
  display: flex;
}
.u-wiz-mp__pvcard {
  flex: 0 0 auto; width: 100%;
  background: #FFFBF5;
  border: 1.5px solid var(--u-line);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 1px 3px rgba(80,70,55,0.05);
  padding-bottom: 26px;
  overflow: hidden;
  display: flex; align-items: flex-start; justify-content: center;
}
.u-wiz-mp__pvcard img { width: 100%; height: auto; display: block; }
.u-wiz-mp__pvfoot {
  flex: 0 0 auto; margin-top: -20px; position: relative; z-index: 2;
  padding: 10px 18px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--u-line);
  background: var(--u-bg);
}

/* ── Оферта-модалка ──────────────────────────────────────────
   Структура как у preview, но вместо картинки — iframe с /oferta/.
   Открывается из чекбокса согласия на шаге 3 — пользователь видит оферту
   не уходя из визарда (форма остаётся заполненной). */
.u-wiz-mp--oferta {
  display: flex; flex-direction: column; overflow: hidden;
  height: 70vh;
  background: var(--u-bg);
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -24px 60px rgba(0,0,0,0.3);
}
.u-wiz-mp--oferta .u-wiz-mp__top {
  flex: 0 0 auto; padding: 10px 18px 8px;
  border-bottom: 1px solid var(--u-line);
}
.u-wiz-mp--oferta .u-wiz-mp__grip { margin: 0 auto 10px; }
.u-wiz-mp__oframe {
  flex: 1 1 auto; min-height: 0;
  background: var(--u-card);
  position: relative; z-index: 1;
  overflow: hidden;
}
.u-wiz-mp__oframe iframe {
  width: 100%; height: 100%;
  border: 0; display: block;
}
.u-wiz-mp--oferta .u-wiz-mp__pvfoot {
  margin-top: 0; border-top: 1px solid var(--u-line);
}

/* ── MeasurePopup — единый padding 12/18/22, всё потоком ──
   В макете: padding:'12px 18px 22px' на листе, БЕЗ safe-area.
   grip mb=16, head mb=8, lead mb=16, row1 mb=14, row2 mb=0,
   Spacer 14, статья mb=12, CTA. */
.u-wiz-mp--measure {
  background: var(--u-bg);
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -24px 60px rgba(0,0,0,0.3);
  padding: 12px 18px 22px;
}
.u-wiz-mp--measure .u-wiz-mp__grip { margin: 0 auto 16px; }
.u-wiz-mp--measure .u-wiz-mp__head { margin-bottom: 8px; }
.u-wiz-mp__lead {
  display: flex; align-items: center; gap: 9px; margin-bottom: 16px;
}
.u-wiz-mp__lead img { width: 22px; height: 22px; flex: 0 0 auto; display: block; }
.u-wiz-mp__lead p { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--u-ink-2); }
.u-wiz-mp__lead b { font-weight: 700; color: var(--u-ink); }
.u-wiz-mp__row {
  display: flex; align-items: center; gap: 4px; margin-bottom: 14px;
}
.u-wiz-mp__row--last { margin-bottom: 0; }
.u-wiz-mp__dia { width: 100px; height: 72px; flex: 0 0 auto; display: block; }
.u-wiz-mp__rowtxt { min-width: 0; }
.u-wiz-mp__rowtxt .t { font-size: 13.5px; font-weight: 700; color: var(--u-ink); margin-bottom: 3px; }
.u-wiz-mp__rowtxt .d { font-size: 11.5px; line-height: 1.5; color: var(--u-ink-2); }
.u-wiz-mp__rowtxt .d b { font-weight: 600; color: var(--u-ink); }
.u-wiz-mp__article {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; margin-top: 14px; margin-bottom: 12px;
  border-radius: 14px;
  border: 1px solid var(--wz-sage-soft); background: var(--wz-sage-soft);
  text-decoration: none;
}
.u-wiz-mp__article-ic {
  width: 42px; height: 42px; flex: 0 0 auto; border-radius: 11px;
  background: var(--u-card); border: 1px solid var(--wz-sage-soft);
  display: flex; align-items: center; justify-content: center;
}
.u-wiz-mp__article-tx { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.u-wiz-mp__article-tx .eyebrow {
  font-family: var(--f-mono, monospace); font-size: 9px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--u-sage-dd); margin-bottom: 2px;
}
.u-wiz-mp__article-tx .ttl { font-size: 13.5px; font-weight: 700; color: var(--u-ink); line-height: 1.2; margin-bottom: 3px; }
.u-wiz-mp__article-tx .meta { font-size: 11px; color: var(--u-ink-3); }
.u-wiz-mp__article .arr { flex: 0 0 auto; color: var(--u-sage-dd); font-size: 15px; }

/* ── PrioHelpPopup — единый padding 10/18/(18+safe), всё потоком ──
   grip mb=14, head mb=6, intro mb=16, список (gap:12), Spacer 18, CTA. */
.u-wiz-mp--prio {
  background: var(--u-bg);
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -24px 60px rgba(0,0,0,0.3);
  padding: 10px 18px calc(18px + env(safe-area-inset-bottom));
}
.u-wiz-mp--prio .u-wiz-mp__grip { margin: 0 auto 14px; }
.u-wiz-mp--prio .u-wiz-mp__head { margin-bottom: 6px; }
.u-wiz-mp__intro { margin: 0 0 16px; font-size: 12.5px; line-height: 1.5; color: var(--u-ink-2); }
.u-wiz-mp__priolist { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.u-wiz-mp__priorow { display: flex; gap: 12px; align-items: flex-start; }
.u-wiz-mp__prion {
  width: 30px; height: 30px; flex: 0 0 auto; border-radius: 50%;
  background: var(--u-line-2); color: var(--u-ink-3);
  font-family: var(--f-display, serif); font-size: 15px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.u-wiz-mp__prion.is-on { background: var(--wz-sage-soft); color: var(--u-sage-d); }
.u-wiz-mp__priotx { display: flex; flex-direction: column; min-width: 0; }
.u-wiz-mp__priotx .t { font-size: 14px; font-weight: 700; color: var(--u-ink); margin-bottom: 1px; }
.u-wiz-mp__priotx .d { font-size: 12px; line-height: 1.45; color: var(--u-ink-2); }

/* ── Вложенность main/col (нужна для двухколоночника на десктопе).
      На мобиле .u-wiz__main и .u-wiz__col — прозрачные flex-обёртки, чтобы
      внутренний скролл (.u-wiz__scroll) и липкий футер работали как раньше.
      Правая панель и десктопные элементы скрыты до брейкпоинта. ───────── */
.u-wiz__main { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.u-wiz__left { display: contents; }
.u-wiz__col  { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.u-wiz__rail { display: none; }
/* На мобиле плашка про ЮКассу не нужна — там consent на шаге 3 уже
   повторяет это сообщение. Показываем её только на десктопе. */
.u-wiz__secure { display: none; }
/* Мобильный fixed-визард со своим топбаром перекрывает шапку сайта —
   на мобиле прячем .u-header. На десктопе шапка сайта возвращается
   (см. @media 960+ ниже). */
body.u-wiz-active .u-header { display: none; }
/* «Назад» в футере (.u-wiz__back-d) — теперь показывается на всех ширинах
   (на шаге 1 скрывается через [disabled] ниже). Лейбл «Конфигуратор»
   справа в топбаре — тоже на всех ширинах. */

/* ── Правая панель ценности (offer / отзыв До-После / secure).
      Стили определяем всегда, видимость включает десктоп-брейкпоинт. ──── */
.u-wiz__offer {
  background: var(--u-card); border: 1.5px solid var(--u-line-2); border-radius: 18px;
  box-shadow: 0 14px 40px rgba(80,70,55,0.07);
  padding: 20px; display: flex; flex-direction: column; gap: 14px;
}
.u-wiz__offer-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.u-wiz__offer-head .lbl {
  font-family: var(--f-mono, monospace); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--u-ink-3); max-width: 18ch; line-height: 1.4;
}
.u-wiz__offer-head .price {
  font-family: var(--f-display, serif); font-size: 34px; font-weight: 600;
  color: var(--u-ink); line-height: 0.9; white-space: nowrap;
}
.u-wiz__offer-div { height: 1px; background: var(--u-line); }
.u-wiz__offer-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.u-wiz__offer-list li {
  position: relative; padding-left: 27px; font-size: 12.5px; line-height: 1.4; color: var(--u-ink-2);
}
.u-wiz__offer-list li::before {
  content: ""; position: absolute; left: 0; top: 0; width: 18px; height: 18px; border-radius: 50%;
  background: var(--wz-sage-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M2.5 7.5 6 11 11.5 3.5' fill='none' stroke='%237D8C72' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 10px no-repeat;
}
.u-wiz__review {
  background: var(--u-card); border: 1.5px solid var(--u-line-2); border-radius: 18px;
  padding: 16px 18px; display: flex; flex-direction: column; gap: 13px;
}
.u-wiz__review-top { display: flex; align-items: center; justify-content: space-between; }
.u-wiz__review-top .hist {
  font-family: var(--f-mono, monospace); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--u-ink-3);
}
.u-wiz__review-quote {
  font-family: var(--f-display, serif); font-style: italic; font-size: 18px;
  line-height: 1.32; color: var(--u-ink); margin: 0;
}
.u-wiz__review-pair { display: block; }
/* Compare-слайдер «До / После» с вертикальной линией-разделителем.
   Одна рамка, два слоя по одним координатам:
     ─ нижний (.u-wiz__compare-img[data-review-after]) — «После», на весь frame;
     ─ верхний (.u-wiz__compare-clip с картинкой «До») обрезается clip-path
       по --x: inset(0 calc(100% - var(--x)) 0 0) → слева видно «До», справа
       «После». Ручку двигает wizard-nav.js (меняет --x).
   Один кадр вместо двух — экономит высоту. */
.u-wiz__compare-frame {
  --x: 50%;
  position: relative;
  aspect-ratio: 1448 / 1024;
  border-radius: 12px;
  overflow: hidden;
  background: var(--u-line-2);
  touch-action: none;
  user-select: none; -webkit-user-select: none;
}
.u-wiz__compare-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.u-wiz__compare-clip {
  position: absolute; inset: 0;
  clip-path: inset(0 calc(100% - var(--x)) 0 0);
  -webkit-clip-path: inset(0 calc(100% - var(--x)) 0 0);
}
.u-wiz__compare-cap {
  position: absolute; top: 8px; z-index: 2;
  font-family: var(--f-mono, monospace); font-size: 9px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: #fff;
  border-radius: 20px; padding: 3px 9px;
  pointer-events: none;
}
/* «До» — слева (привычное чтение слева направо), «После» — справа. */
.u-wiz__compare-cap.is-before { left: 8px;  background: rgba(46,46,46,0.82); }
.u-wiz__compare-cap.is-after  { right: 8px; background: var(--u-sage-d); }
.u-wiz__compare-handle {
  position: absolute; top: 0; bottom: 0;
  left: var(--x); transform: translateX(-50%);
  width: 32px; padding: 0; margin: 0;
  border: 0; background: transparent; cursor: ew-resize;
  display: flex; align-items: center; justify-content: center;
  z-index: 3;
}
.u-wiz__compare-handle:focus-visible { outline: none; }
.u-wiz__compare-handle:focus-visible .u-wiz__compare-knob {
  box-shadow: 0 0 0 3px rgba(125,140,114,0.35), 0 6px 18px rgba(0,0,0,0.25);
}
.u-wiz__compare-bar {
  position: absolute; top: 0; bottom: 0; left: 50%;
  width: 2px; background: rgba(255,255,255,0.92);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.15), 0 2px 8px rgba(0,0,0,0.18);
  transform: translateX(-1px);
}
.u-wiz__compare-knob {
  position: relative; z-index: 1;
  width: 32px; height: 32px; border-radius: 50%;
  background: #fff; color: var(--u-sage-d);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25), 0 0 0 1px rgba(0,0,0,0.06);
  transition: box-shadow .15s ease;
}
/* Нижний ряд под compare-картинкой: 3 колонки —
   слева аватар+имя, в центре точки, справа стрелки переключения. */
.u-wiz__review-author {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 10px;
}
.u-wiz__review-author-l {
  display: flex; align-items: center; gap: 8px; min-width: 0;
  justify-self: start;
}
.u-wiz__review-author .av {
  width: 30px; height: 30px; flex: 0 0 auto; border-radius: 50%;
  background: var(--wz-sage-soft); color: var(--u-sage-dd);
  font-family: var(--f-display, serif); font-size: 15px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.u-wiz__review-author .who { display: flex; flex-direction: column; min-width: 0; }
.u-wiz__review-author .who b { font-size: 12.5px; color: var(--u-ink); line-height: 1.1; }
.u-wiz__review-author .who span { font-size: 10.5px; color: var(--u-ink-3); }
.u-wiz__review-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.u-wiz__review-arrs {
  display: inline-flex; gap: 6px; flex: 0 0 auto;
  justify-self: end;
}
.u-wiz__review-arr {
  width: 32px; height: 32px; padding: 0; border-radius: 50%;
  background: var(--wz-sage-soft); border: 1.5px solid var(--u-sage-d);
  color: var(--u-sage-dd); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .1s ease;
}
.u-wiz__review-arr:hover { background: var(--u-sage-d); border-color: var(--u-sage-d); color: #fff; }
.u-wiz__review-arr:active { transform: scale(0.94); }
.u-wiz__review-arr:focus-visible { outline: 2px solid var(--u-accent); outline-offset: 2px; }
.u-wiz__review-author .dots {
  display: flex; gap: 5px; align-items: center;
  justify-self: center;
}
.u-wiz__review-author .dots button,
.u-wiz__review-author .dots i {
  width: 6px; height: 6px; padding: 0; border-radius: 99px;
  background: var(--u-taupe); border: 0; cursor: pointer; display: block;
  transition: width .2s ease, background .2s ease;
}
.u-wiz__review-author .dots button.on,
.u-wiz__review-author .dots i.on { width: 16px; background: var(--u-accent); }
.u-wiz__review-author .dots button:focus-visible { outline: 2px solid var(--u-accent); outline-offset: 2px; }
.u-wiz__secure { gap: 10px; align-items: flex-start; padding: 12px 14px; background: var(--u-warm); border-radius: 12px; }
.u-wiz__secure svg { flex: 0 0 auto; margin-top: 1px; }
.u-wiz__secure span { font-size: 11.5px; line-height: 1.45; color: var(--u-ink-2); }

/* ── Планшет 600–959: один столбец, но центрированный (без растягивания) ─ */
@media (min-width: 600px) and (max-width: 959px) {
  .u-wiz__topbar, .u-wiz__progress, .u-wiz__scroll, .u-wiz__footer {
    padding-left: max(var(--wz-pad), calc((100vw - 560px) / 2));
    padding-right: max(var(--wz-pad), calc((100vw - 560px) / 2));
  }
}

/* ── Десктоп ≥960: двухколоночник (форма слева + панель ценности справа) ─
   Шкала: один font-size на .u-wiz управляет ВСЕМ визардом (всё внутри
   в em). Корень считается по ДВУМ ограничениям, берётся меньшее:
     ① по ширине  — clamp(15px, 12px + 0.3125vw, 18px)  → UX-диапазон
     ② по высоте  — clamp(13px, 2.15vh, 18px)           → не дать карточке
                                                          выйти за экран
   На 1280×800+ → 16px (макет 1-в-1). На 1920×1080+ → 18px. На 1280×700
   → 15px (с запасом по высоте). На 1280×600 → 13px (минимум читаемости).
*/
@media (min-width: 960px) {
  .u-wiz {
    position: static; inset: auto; height: auto; min-height: 100vh;
    overflow: visible; display: block;
    font-size: min(
      clamp(15px, calc(14px + 0.156vw), 18px),
      clamp(13px, 1.85vh, 18px)
    );
  }
  /* На десктопе возвращаем шапку сайта (.u-header — sticky, навигация,
     бургер) и прячем внутренний топбар визарда — он там лишний. */
  body.u-wiz-active .u-header { display: block; }
  .u-wiz__topbar { display: none; }
  /* Контейнер: max-width как у шапки сайта (резинка по vw, не em). */
  .u-wiz__main {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 2.5em;
    align-items: stretch;
    max-width: var(--container); margin: 0 auto;
    padding: 2.5em var(--gutter);
  }
  /* Левая колонка: форма в карточке + плашка ЮКассы под ней. */
  .u-wiz__left {
    display: flex; flex-direction: column; gap: 1em;
    min-width: 0;
  }
  .u-wiz__secure { display: flex; flex: 0 0 auto; padding: 0.75em 0.875em; gap: 0.625em; }
  .u-wiz__secure span { font-size: 0.719em; }
  /* Карточка-форма (.u-calc__form-card аналог). */
  .u-wiz__col {
    min-width: 0; display: flex; flex-direction: column;
    background: var(--u-card); border: 1px solid var(--u-line);
    border-radius: 20px; box-shadow: var(--sh-card);
    padding: 1.5em 1.75em 1.5em;
  }
  /* Правая колонка. */
  .u-wiz__rail {
    display: flex; flex-direction: column; gap: 1em;
    min-width: 0;
    justify-content: space-between;
  }
  .u-wiz__offer  { flex: 0 0 auto; padding: 1.25em; gap: 0.875em; }
  .u-wiz__review { flex: 0 0 auto; padding: 1em 1.125em; gap: 0.813em; }
  /* Карточка тянется до высоты правой панели (align-items:stretch). Чтобы
     не было дыры внизу — гибкие распорки .u-wiz__grow распределяют лишний
     воздух равномерно между секциями (как mobile fit-to-screen, но мягко:
     min-height = заданная в макете высота, а flex:1 добирает остаток). */
  .u-wiz__progress { padding: 0 0 1em; flex: 0 0 auto; }
  .u-wiz__scroll { display: flex; flex-direction: column; flex: 1 1 auto; overflow: visible; padding: 0; }
  .u-wiz__step.is-on { display: flex; flex-direction: column; flex: 1 1 auto; animation: none; }
  .u-wiz__spacer { display: block; flex: 0 0 auto; height: calc(var(--dh, 0) * 1em / 16px); }
  .u-wiz__grow   { display: block; flex: 1 1 0; min-height: calc(var(--dh, 0) * 1em / 16px); height: auto; }
  /* Футер (Далее/Назад/CTA) — прижат к низу карточки. */
  .u-wiz__footer { flex: 0 0 auto; }
  /* ══ ТИПОГРАФИЧЕСКАЯ ШКАЛА — 5 УРОВНЕЙ НА ВСЮ СТРАНИЦУ ══════════════
     Все размеры текста сведены к фиксированному набору, чтобы шкала
     была читаемой иерархией, а не хаосом из 15 близких полутонов.

       Display  2.125em (~34px)  — title, price
       Lead     1.125em (~18px)  — цитата в отзыве
       Body     0.875em (~14px)  — основной текст, кнопки, чипы, списки
       Small    0.75em  (~12px)  — подзаголовки, подписи, secondary
       Caps     0.688em (~11px)  — mono uppercase eyebrow-метки (с полом 11)

     Спец-уровень: Number 1.375em (~22px) — цифры в полях ширина/глубина/высота. */

  /* Display ─────────────────────────────────────────────────── */
  .u-wiz__title,
  .u-wiz__offer-head .price { font-size: 2.125em; }
  .u-wiz__title { margin-top: 0; text-wrap: balance; }

  /* Lead ────────────────────────────────────────────────────── */
  .u-wiz__review-quote { font-size: 1.125em; }

  /* Body ────────────────────────────────────────────────────── */
  .u-wiz__lead,
  .u-wiz__preview,
  .u-wiz__measure,
  .u-wiz__next,
  .u-wiz__footer .u-calc__cta,
  .u-wiz__offer-list li,
  .u-wiz__review-author .who b,
  .u-wiz__sumrow .v,
  .u-wiz .u-promo__input,
  .u-wiz .u-calc__add,
  .u-wiz .u-calc__pri-btn .ttl,
  .u-wiz .u-promo__toggle { font-size: 0.875em; }
  /* Chip и pri-btn — родители 1em (от корня), чтобы дети 0.875em давали
     ровно Body (14 на base 16), а не наследовались от 12.5px default. */
  .u-wiz .u-calc__choice,
  .u-wiz .u-calc__pri-btn { font-size: 1em; }
  /* Текст внутри чипа наследует Body 0.875em от корня */
  .u-wiz .u-calc__choice-t { font-size: 0.875em; }

  /* Small ───────────────────────────────────────────────────── */
  .u-wiz__measure .more,
  .u-wiz .u-calc__preset,
  .u-wiz .u-calc__check-txt,
  .u-wiz__addcat .count,
  .u-wiz__addcat-sub,
  .u-wiz .u-calc__dup-hint,
  .u-wiz__sumrow .edit,
  .u-wiz .u-promo__msg,
  .u-wiz .u-consent label,
  .u-wiz__secure span,
  .u-wiz__review-author .who span,
  .u-wiz__note,
  .u-wiz__progress-head .l { font-size: 0.75em; }

  /* Caps eyebrow (mono uppercase, с полом 11px чтобы caps оставались
     читаемыми даже на сжатии до base 13-14px на коротком экране) ─ */
  .u-wiz__kicker,
  .u-wiz__progress-head .s,
  .u-wiz__offer-head .lbl,
  .u-wiz__review-top .hist,
  .u-wiz .u-calc__preset-label,
  .u-wiz .u-calc__sz > span,
  .u-wiz__itemhead > span,
  .u-wiz__sumrow .k { font-size: max(11px, 0.688em); }

  /* Number (спец) — крупные цифры в полях ширина/глубина/высота ─ */
  .u-wiz .u-calc__sz input { font-size: 1.375em; }

  /* ── Прочие размеры (не font-size) — отступы, gaps, max-width ─ */
  .u-wiz__step[data-wiz-step="1"] .u-wiz__lead { margin-bottom: 1.375em; }
  .u-wiz__kicker { margin-bottom: 0.6875em; }
  .u-wiz__preview { height: 2.75em; }
  .u-wiz .u-calc__choice { padding: 0.5em 0.625em; }
  .u-wiz .u-calc__sz input { height: 2.5em; }
  .u-wiz__offer-head .lbl { max-width: none; }
  .u-wiz .u-calc__choices { gap: 0.5em; }
  .u-wiz .u-calc__items { gap: 0.563em; }
  .u-wiz__measure { gap: 0.5em; padding: 0; width: auto; }
  .u-wiz__measure .more { margin-left: 0.5em; }
  .u-wiz__measure img { width: 1.25em; height: 1.25em; }
  .u-wiz .u-calc__presets { gap: 0.813em; }
  .u-wiz .u-calc__add .plus { font-size: 1.25em; }
  /* maxWidth-капы — теперь в em, чтобы расти со шрифтом, но не быть шире
     родителя. width: min(...) удобнее, чем max-width (специфичность). */
  .u-wiz__preview { width: min(22.5em, 100%); }
  .u-wiz__measure { width: min(27.5em, 100%); }
  .u-wiz .u-calc__sizes { width: min(27.5em, 100%); }
  .u-wiz__summary { width: min(30em, 100%); }
  .u-wiz .u-promo { width: min(30em, 100%); }
  /* ── Футер: инлайн-ряд кнопок ─────────────────────────────── */
  .u-wiz__footer {
    position: static; background: none;
    -webkit-backdrop-filter: none; backdrop-filter: none;
    border-top: none; padding: 1.25em 0 0;
    display: flex; flex-wrap: wrap; align-items: center; gap: 0.75em;
  }
  /* Высоты back-d / next / CTA одинаковые. Чтобы высота не «плыла»
     от собственного font-size кнопки (em считается от своего шрифта,
     поэтому при font:1.25em + height:3.25em квадрат раздувается), —
     задаю одинаковый font-size 0.875em (Body) на все три кнопки, а
     стрелку Back увеличиваю через child span. */
  .u-wiz__back-d {
    width: 3.25em; height: 3.25em; padding: 0;
    border-radius: 14px; font-size: 0.875em;
    display: inline-flex; align-items: center; justify-content: center;
  }
  .u-wiz__back-d > span { font-size: 1.5em; line-height: 1; }
  .u-wiz__next { flex: 0 0 auto; width: auto; height: 3.25em; padding: 0 2em; }
  .u-wiz__next::after { content: "›"; font-size: 1.25em; margin-top: -2px; }
  .u-wiz__footer .u-calc__actions { width: auto; flex: 0 0 auto; }
  .u-wiz__footer .u-calc__cta { width: auto; min-width: 0; height: 3.25em; padding: 0 2em; }
  .u-wiz__note { flex-basis: 100%; text-align: left; margin: 0.5em 0 0; max-width: 52ch; }
  .u-wiz .u-consent label { font-size: 0.719em; }

  /* ── Десктоп-попапы: центрированные диалоги вместо bottom-sheet.
     Макет (DModalShell): align-center, padding 48, bg rgba(40,32,26,.55) +
     blur 2px, sheet radius:22, shadow 0 40px 110px rgba(0,0,0,.42). ─── */
  .u-wiz-modal {
    align-items: center;
    padding: 48px;
    background: rgba(40,32,26,0.55);
    -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  }
  .u-wiz-modal__sheet {
    width: auto; max-width: 100%; max-height: 100%;
    animation: u-wiz-mfade .22s ease;
  }
  .u-wiz-mp__grip { display: none; }
  .u-wiz-mp--preview,
  .u-wiz-mp--measure,
  .u-wiz-mp--prio,
  .u-wiz-mp--oferta {
    border-radius: 22px;
    box-shadow: 0 40px 110px rgba(0,0,0,0.42);
    max-height: calc(100vh - 96px);
  }
  .u-wiz-mp--preview { width: 920px; max-width: calc(100vw - 96px); }
  .u-wiz-mp--measure { width: 720px; max-width: calc(100vw - 96px); }
  .u-wiz-mp--prio    { width: 560px; max-width: calc(100vw - 96px); }
  .u-wiz-mp--oferta  { width: 920px; max-width: calc(100vw - 96px); height: 80vh; }

  /* PreviewPopup — top/body/footer без overlap, картинка на #FFFBF5 */
  .u-wiz-mp--preview .u-wiz-mp__top { padding: 22px 30px; border-bottom: 1px solid var(--u-line); }
  .u-wiz-mp__pvbody {
    padding: 24px 30px; background: #FFFBF5;
    align-items: center; justify-content: center;
  }
  .u-wiz-mp__pvcard {
    width: auto; max-width: 100%;
    border-radius: 14px; padding-bottom: 0;
    box-shadow: 0 14px 40px rgba(80,70,55,0.07);
  }
  .u-wiz-mp__pvcard img {
    width: auto; max-width: 100%; max-height: calc(100vh - 320px);
  }
  .u-wiz-mp__pvfoot {
    margin-top: 0; padding: 18px 30px;
    border-top: 1px solid var(--u-line);
    display: flex; align-items: center; gap: 16px; justify-content: flex-end;
  }
  .u-wiz-mp__cta { width: auto; flex: 0 0 auto; padding: 0 28px; height: 48px; }

  /* MeasurePopup — две карточки в строку, поток внутри листа */
  .u-wiz-mp--measure {
    padding: 26px 30px;
    display: flex; flex-direction: column;
  }
  .u-wiz-mp--measure .u-wiz-mp__head { margin-bottom: 14px; }
  .u-wiz-mp--measure .u-wiz-mp__lead { margin-bottom: 18px; }
  .u-wiz-mp__rows {
    display: flex; flex-direction: row; gap: 16px;
    margin-bottom: 14px;
  }
  .u-wiz-mp--measure .u-wiz-mp__row {
    flex: 1 1 0; min-width: 0; margin-bottom: 0;
    background: var(--u-card); border: 1px solid var(--u-line-2);
    border-radius: 16px; padding: 16px 18px; gap: 14px;
  }

  /* PrioHelpPopup — центрированный, padding потоком */
  .u-wiz-mp--prio { padding: 26px 30px; }

  /* OfertaPopup — iframe внутри центрированного диалога */
  .u-wiz-mp--oferta .u-wiz-mp__top { padding: 22px 30px; border-bottom: 1px solid var(--u-line); }
}

/* ── Телефоны ≤599: чиним обрезку текста в узких контролах ──────────
   На планшете (560px колонка) и десктопе места хватает — поэтому
   правки скоупим только на телефон. */
@media (max-width: 599px) {
  /* Объём: «Средне (9–16 пар)» не влезал и резался. Даём колонке объёма
     больше места (тип короче — «Носки»/«Трусы»), чуть мельче шрифт и уже
     внутренние отступы. */
  .u-wiz .u-calc__field:nth-child(1) { flex: 1 1 0; }
  .u-wiz .u-calc__field:nth-child(2) { flex: 1.3 1 0; }
  .u-wiz .u-calc__select-wrap select { font-size: 11.5px; padding: 0 22px 0 9px; }
  .u-wiz .u-calc__select-wrap svg { right: 7px; }

  /* Приоритет: «Вместительно» резалось в равных колонках. Мельче шрифт,
     уже отступы и кружок — три слова встают целиком. */
  .u-wiz .u-calc__priority { gap: 3px; padding: 3px; }
  .u-wiz .u-calc__pri-btn { gap: 3px; font-size: 11.5px; }
  .u-wiz .u-calc__pri-body .ttl { font-size: 11.5px; }
  .u-wiz .u-calc__pri-check { width: 11px; height: 11px; }
  .u-wiz .u-calc__pri-check svg { width: 11px; height: 11px; }

  /* Чипы (тип/что хранить): на узком экране «Одежда/Детское/Текстиль»
     переносились на 2 строки и съедали высоту. Делаем 3 равные колонки
     в один ряд (без переноса) — короче и аккуратнее. Поджимаем padding
     и «скоро», чтобы длинные слова влезли. */
  .u-wiz .u-calc__choices { flex-wrap: nowrap; gap: 5px; }
  .u-wiz .u-calc__choice {
    flex: 1 1 0; min-width: 0; justify-content: center;
    padding: 8px 5px; gap: 3px; font-size: 12px;
  }
  .u-wiz .u-calc__choice-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .u-wiz .u-calc__choice-soon { flex: 0 0 auto; font-size: 8px; margin-left: 0; }
}

/* ── Мобайл/планшет ≤959: ограничить раздувание распорок ────────────
   На высоком экране fit-to-screen раздувал .u-wiz__grow до огромных
   зазоров (приоритет на шаге 2 оттягивало почти к низу). Кап на
   промежуточные распорки даёт ХОРОШИЙ, но умеренный отступ; последняя
   распорка шага остаётся гибкой и собирает остаток пространства внизу
   (над липкой кнопкой) — контент группируется вверху. Десктоп (≥960)
   распределяет воздух как раньше и сюда не попадает. */
@media (max-width: 959px) {
  .u-wiz__grow { max-height: 40px; }
  .u-wiz__step .u-wiz__grow:last-child { max-height: none; }
}
