/* ===== Токены ===== */
:root {
  --bg: #f2f1ee;
  --surface: #fbfaf8;
  --surface-2: #e9e7e2;
  --ink: #1c1a19;
  --ink-soft: #46423f;
  --muted: #6d6763;
  --line: #dbd7d1;
  --accent: #8b3a4a;
  --accent-ink: #712d3b;
  --accent-soft: #f4e9eb;
  --danger: #a8402f;
  --dark: #1b1a1c;
  --radius: 4px;
  --radius-lg: 8px;
  --wrap: 1200px;
}

[data-theme="dark"] {
  --bg: #171516;
  --surface: #201d1e;
  --surface-2: #2a2627;
  --ink: #f3efee;
  --ink-soft: #d7d0ce;
  --muted: #a29a98;
  --line: #383233;
  --accent: #c9697c;
  --accent-ink: #dd8b9b;
  --accent-soft: #2c2124;
  --danger: #e2836f;
  --dark: #131213;
}

*, *::before, *::after { box-sizing: border-box; }

/* Атрибут hidden должен побеждать любые display из авторских стилей */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.6 "Onest", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

h1, h2, h3 {
  font-family: "Unbounded", system-ui, sans-serif;
  font-weight: 600;
  line-height: 1.1;
  margin: 0;
  letter-spacing: -0.02em;
}

p { margin: 0; }
ul, ol, dl { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 16px; background: var(--accent); color: #fff;
  border-radius: var(--radius); text-decoration: none;
  transition: top 0.2s ease;
}
.skip:focus { top: 12px; }

.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.wrap--narrow { width: min(100% - 40px, 820px); }

/* ===== Кнопки ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 14px 26px;
  border: 1px solid transparent; border-radius: var(--radius);
  font: 600 0.94rem/1 "Onest", sans-serif;
  text-decoration: none; cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-ink); }
[data-theme="dark"] .btn--primary { color: #17090d; }

.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent-ink); }
.btn--wide { width: 100%; }
.btn[disabled] { opacity: 0.4; pointer-events: none; }

/* ===== Шапка ===== */
.header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header__inner { display: flex; align-items: center; gap: 24px; min-height: 72px; }

.logo { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; flex-shrink: 0; }
.logo__word {
  font-family: "Unbounded", sans-serif;
  font-size: 1.05rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
}
/* Единственная деталь знака — квадратная точка акцентом на базовой линии */
.logo__mark {
  width: 7px; height: 7px; background: var(--accent);
  align-self: flex-end; margin-bottom: 4px;
}

.nav { display: flex; gap: 26px; margin-left: auto; font-size: 0.92rem; font-weight: 500; }
.nav a {
  text-decoration: none; color: var(--ink-soft);
  padding: 4px 0; border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.nav a:hover { color: var(--accent-ink); border-color: var(--accent); }

.header__side { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.nav + .header__side { margin-left: 0; }

.theme {
  width: 38px; height: 38px; flex-shrink: 0;
  display: grid; place-items: center;
  background: transparent; border: 1px solid var(--line);
  border-radius: var(--radius); cursor: pointer; color: var(--ink);
  transition: border-color 0.2s ease, color 0.2s ease;
}
.theme:hover { border-color: var(--accent); color: var(--accent-ink); }
.theme__sun, .theme__core, .theme__moon {
  fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}
.theme__moon { opacity: 0; }
[data-theme="dark"] .theme__sun, [data-theme="dark"] .theme__core { opacity: 0; }
[data-theme="dark"] .theme__moon { opacity: 1; }

.header__phone { padding: 10px 18px; font-size: 0.88rem; }

.burger {
  display: none; width: 40px; height: 38px;
  flex-direction: column; justify-content: center; gap: 5px;
  background: transparent; border: 1px solid var(--line);
  border-radius: var(--radius); cursor: pointer;
}
.burger span {
  display: block; height: 2px; width: 18px; margin-inline: auto;
  background: var(--ink); transition: transform 0.2s ease, opacity 0.2s ease;
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  display: flex; flex-direction: column;
  padding: 8px 20px 20px;
  border-top: 1px solid var(--line); background: var(--surface);
}
.mobile-nav a { padding: 13px 0; text-decoration: none; border-bottom: 1px solid var(--line); font-weight: 500; }
.mobile-nav a:last-child { border-bottom: 0; color: var(--accent-ink); }

/* ===== Хиро ===== */
.hero { padding: clamp(32px, 4vw, 52px) 0 clamp(48px, 6vw, 80px); }
.hero__title {
  font-size: clamp(2rem, 4.8vw, 3.7rem);
  max-width: 21ch;
  margin-bottom: clamp(24px, 3vw, 34px);
}

/* Фото во всю ширину экрана: секция без бокового ограничителя */
.hero__media { position: relative; }
/* Пропорцию задаёт кадрирующая обёртка: aspect-ratio на самом img не работает,
   когда у картинки есть атрибуты width/height — высота берётся из атрибута */
.hero__frame {
  position: relative; aspect-ratio: 4 / 3;
  overflow: hidden;
}
.hero__frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Панель наложена на фото на широких экранах и уходит под него на узких */
.hero__panel {
  background: var(--surface);
  padding: clamp(20px, 3vw, 30px);
  border-radius: var(--radius-lg);
}
/* На узких экранах панель идёт под фото и держится общей сетки */
.hero__overlay { padding-top: 20px; }
.hero__lead { color: var(--ink-soft); font-size: 1.02rem; max-width: 44ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

.hero__ticker {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  margin-top: clamp(28px, 4vw, 40px);
  padding-top: clamp(24px, 3vw, 32px);
  border-top: 1px solid var(--line);
}
.hero__ticker li { display: flex; flex-direction: column; gap: 2px; }
.hero__ticker b {
  font-family: "Unbounded", sans-serif;
  font-size: 1.3rem; font-weight: 600; color: var(--accent-ink);
}
.hero__ticker span { font-size: 0.86rem; color: var(--muted); }

/* ===== Секции ===== */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section--tint { background: var(--surface-2); }
.section--dark {
  background: var(--dark);
  /* Токены переопределяются целиком: иначе поля и рамки возьмут светлые значения */
  --bg: #1b1a1c;
  --surface: #262425;
  --ink: #f4f1f0;
  --ink-soft: #ddd6d4;
  --muted: #a49b99;
  --line: #3b3536;
  --accent: #c9697c;
  --accent-ink: #dd8b9b;
  color: var(--ink);
}

.section__head { max-width: 680px; margin-bottom: clamp(28px, 4vw, 48px); }
.section__title { font-size: clamp(1.7rem, 3.8vw, 2.9rem); margin-bottom: 14px; }
.section__lead { color: var(--muted); font-size: 1.01rem; }

/* ===== Поля ===== */
.field { display: block; }
.field__label { display: block; font-size: 0.84rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 7px; }

.input, .select {
  width: 100%; padding: 13px 14px;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius);
  font: 400 0.97rem/1.4 "Onest", sans-serif;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.input::placeholder { color: var(--muted); opacity: 1; }
.input:hover, .select:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.input:focus, .select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}

/* Своя стрелка: нативный select иначе не читается как выпадающий список */
.select {
  appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%236d6763' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 12px 8px;
}
[data-theme="dark"] .select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%23a29a98' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.input.is-error, .select.is-error { border-color: var(--danger); }
.field__error { margin-top: 6px; font-size: 0.83rem; color: var(--danger); }

/* ===== Стили кухонь ===== */
/* Пропорцию держит контейнер, картинка растянута внутри: aspect-ratio на самом
   img не работает, когда у него заданы атрибуты width/height */
.styles__stage {
  position: relative; aspect-ratio: 16 / 10;
  border-radius: var(--radius-lg); overflow: hidden;
}
.styles__stage img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  transition: opacity 0.3s ease;
}
.styles__stage.is-swapping img { opacity: 0; }

.styles__caption {
  position: absolute; inset: auto 0 0 0;
  padding: clamp(24px, 5vw, 44px) clamp(18px, 3vw, 34px) clamp(18px, 3vw, 30px);
  background: linear-gradient(to top, rgba(12, 11, 12, 0.92), rgba(12, 11, 12, 0.55) 55%, transparent);
  color: #f6f2f1;
}
.styles__name { font-size: clamp(1.25rem, 2.6vw, 1.9rem); margin-bottom: 6px; }
.styles__desc { font-size: 0.95rem; color: #ddd5d3; max-width: 54ch; }
.styles__price { margin-top: 10px; font-weight: 600; color: #f0b9c4; }

.styles__strip {
  display: grid; gap: 10px; margin-top: 12px;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}
.styles__tab {
  padding: 13px 14px; text-align: left;
  background: transparent; color: var(--ink-soft);
  border: 1px solid var(--line); border-radius: var(--radius);
  font: 600 0.86rem/1.3 "Onest", sans-serif; cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}
.styles__tab:hover { border-color: var(--accent); color: var(--ink); }
.styles__tab[aria-selected="true"] {
  background: var(--accent); border-color: var(--accent); color: #fff;
}

/* ===== Квиз ===== */
.quiz {
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(20px, 3vw, 34px);
}
.quiz__top { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.quiz__progress { flex: 1; min-width: 200px; }
.quiz__bar { height: 3px; background: var(--line); border-radius: 3px; overflow: hidden; }
.quiz__bar span {
  display: block; height: 100%; width: 20%;
  background: var(--accent);
  transition: width 0.34s cubic-bezier(0.4, 0, 0.2, 1);
}
.quiz__count { margin-top: 8px; font-size: 0.83rem; color: var(--muted); }

.quiz__dots { display: flex; gap: 6px; }
.quiz__dots li {
  width: 26px; height: 3px; border-radius: 3px;
  background: var(--line); transition: background-color 0.24s ease;
}
.quiz__dots li[aria-current="step"] { background: var(--accent); }
.quiz__dots li.is-done { background: color-mix(in srgb, var(--accent) 45%, var(--line)); }

.quiz__body { margin-top: clamp(22px, 3vw, 32px); }
.quiz__question { font-size: clamp(1.15rem, 2.4vw, 1.55rem); margin-bottom: 8px; }
.quiz__hint { font-size: 0.9rem; color: var(--muted); margin-bottom: 20px; }

/* Две колонки, а не auto-fit: иначе четыре варианта ложатся 3 + 1 */
.quiz__options { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 620px) { .quiz__options { grid-template-columns: repeat(2, 1fr); } }
.quiz__option {
  display: flex; flex-direction: column; gap: 4px;
  padding: 16px 18px; text-align: left;
  background: transparent; color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius);
  font: inherit; cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.quiz__option:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.quiz__option[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.quiz__option b { font-weight: 600; font-size: 0.98rem; }
.quiz__option span { font-size: 0.84rem; color: var(--muted); }

/* Шаг с диапазоном занимает всю ширину — вариантов там нет */
.quiz__range { grid-column: 1 / -1; }
.quiz__range-out {
  font-family: "Unbounded", sans-serif;
  font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 600; color: var(--accent-ink);
}
.range {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 4px; margin: 16px 0 6px;
  background: var(--line); border-radius: 4px; cursor: pointer;
}
.range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); border: 3px solid var(--surface);
}
.range::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); border: 3px solid var(--surface);
}
.range__scale { display: flex; justify-content: space-between; font-size: 0.78rem; color: var(--muted); }

.quiz__error { margin-top: 14px; font-size: 0.86rem; color: var(--danger); }

.quiz__nav {
  display: flex; justify-content: space-between; gap: 12px;
  margin-top: clamp(22px, 3vw, 30px);
  padding-top: 20px; border-top: 1px solid var(--line);
}

.quiz__result { margin-top: 8px; }
.quiz__result-label { font-size: 0.85rem; color: var(--muted); }
.quiz__result-price {
  font-family: "Unbounded", sans-serif;
  font-size: clamp(1.9rem, 5vw, 3rem); font-weight: 600;
  color: var(--accent-ink); line-height: 1.08; margin: 6px 0 24px;
}
.quiz__summary { display: grid; gap: 11px; }
.quiz__summary > div {
  display: flex; justify-content: space-between; gap: 16px;
  padding-bottom: 10px; border-bottom: 1px solid var(--line); font-size: 0.94rem;
}
.quiz__summary dt { color: var(--muted); }
.quiz__summary dd { margin: 0; font-weight: 600; text-align: right; }
.quiz__note { margin-top: 18px; font-size: 0.85rem; color: var(--muted); }
.quiz__result-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

/* ===== Конфигуратор ===== */
.config { display: grid; gap: 24px; grid-template-columns: 1fr; align-items: start; }
.config__panels { display: grid; gap: 22px; }

.config__group {
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 20px;
}
.config__group-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 14px; margin-bottom: 14px;
}
.config__group-title { font-size: 1.05rem; }
.config__group-value { font-size: 0.86rem; color: var(--muted); }

.config__swatches { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.config__swatch {
  padding: 0; overflow: hidden; text-align: left;
  background: transparent; color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius);
  font: inherit; cursor: pointer;
  transition: border-color 0.2s ease;
}
.config__swatch:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.config__swatch[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }

.config__chip { display: block; height: 54px; background-size: cover; background-position: center; }
.config__swatch-body { display: block; padding: 10px 12px; }
.config__swatch-name { display: block; font-weight: 600; font-size: 0.89rem; }
.config__swatch-price { display: block; font-size: 0.8rem; color: var(--muted); margin-top: 2px; }

.config__side {
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 20px;
  position: sticky; top: 96px;
}
.config__preview {
  position: relative; aspect-ratio: 3 / 2;
  border-radius: var(--radius); overflow: hidden; margin-bottom: 18px;
}
.config__preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.config__preview-label {
  position: absolute; left: 10px; bottom: 10px;
  padding: 6px 11px; border-radius: var(--radius);
  background: var(--accent); color: #fff;
  font-size: 0.76rem; font-weight: 600;
}
[data-theme="dark"] .config__preview-label { color: #17090d; }

.config__total-label { font-size: 0.83rem; color: var(--muted); }
.config__total {
  font-family: "Unbounded", sans-serif;
  font-size: clamp(1.6rem, 3.4vw, 2.1rem); font-weight: 600;
  color: var(--accent-ink); margin: 4px 0 18px;
}
.config__breakdown { display: grid; gap: 9px; padding-top: 16px; border-top: 1px solid var(--line); }
.config__breakdown li { display: flex; justify-content: space-between; gap: 14px; font-size: 0.9rem; }
.config__breakdown span { color: var(--muted); }
.config__breakdown b { font-weight: 600; }
.config__note { margin-top: 16px; font-size: 0.82rem; color: var(--muted); }

/* ===== Производство ===== */
.shop { display: grid; gap: 16px; grid-template-columns: 1fr; }
.shop__item { margin: 0; position: relative; border-radius: var(--radius-lg); overflow: hidden; }
.shop__item img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.shop__item figcaption {
  position: absolute; inset: auto 0 0 0;
  padding: 30px 18px 16px;
  background: linear-gradient(to top, rgba(12, 11, 12, 0.88), transparent);
  color: #f6f2f1; font-size: 0.9rem; font-weight: 500;
}

/* ===== Шкала 30 дней ===== */
.track { position: relative; }
.track__line {
  position: absolute; left: 0; right: 0; top: 13px; height: 2px;
  background: var(--line);
}
.track__done { display: block; height: 100%; width: 100%; background: var(--accent); }
.track__list {
  display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  position: relative;
}
.track__item { position: relative; padding-top: 34px; }
.track__item::before {
  content: ""; position: absolute; left: 0; top: 7px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent); border: 3px solid var(--bg);
}
.track__day {
  font-family: "Unbounded", sans-serif;
  font-size: 0.82rem; font-weight: 600; color: var(--accent-ink);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.track__name { font-size: 1rem; font-weight: 600; margin-top: 4px; }
.track__text { font-size: 0.87rem; color: var(--muted); margin-top: 4px; }

/* ===== Отзывы ===== */
.reviews { display: grid; gap: 18px; grid-template-columns: 1fr; }
.review {
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 24px;
  display: flex; flex-direction: column;
}
.review__text { color: var(--ink-soft); font-size: 0.96rem; }
.review__meta {
  display: flex; align-items: center; gap: 12px;
  /* auto прижимает подпись к низу: иначе при разной длине отзыва
     подписи висят на разной высоте и ряд выглядит рваным */
  margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line);
}
.review__text { margin-bottom: 20px; }
.review__avatar {
  width: 40px; height: 40px; flex-shrink: 0;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-ink);
  font-family: "Unbounded", sans-serif; font-weight: 600; font-size: 0.9rem;
}
.review__who { display: flex; flex-direction: column; }
.review__name { font-weight: 600; font-size: 0.93rem; }
.review__spec { font-size: 0.82rem; color: var(--muted); }

/* ===== Заявка ===== */
.lead {
  display: grid; gap: 30px; grid-template-columns: 1fr;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 46px);
}
.lead__facts { display: flex; gap: 32px; flex-wrap: wrap; margin-top: 26px; }
.lead__facts li { display: flex; flex-direction: column; }
.lead__facts strong {
  font-family: "Unbounded", sans-serif;
  font-size: 1.4rem; font-weight: 600; color: var(--accent-ink);
}
.lead__facts span { font-size: 0.84rem; color: var(--muted); }
.lead__form { display: grid; gap: 16px; align-content: start; }
.lead__legal { font-size: 0.78rem; color: var(--muted); }

/* ===== Подвал ===== */
.footer {
  background: var(--surface-2);
  border-top: 1px solid var(--line);
  padding: clamp(40px, 6vw, 64px) 0 28px;
}
.footer__inner { display: grid; gap: 30px; grid-template-columns: 1fr; }
.footer__brand p { margin-top: 12px; color: var(--muted); font-size: 0.9rem; max-width: 34ch; }
.footer__col { display: flex; flex-direction: column; gap: 9px; font-size: 0.9rem; }
.footer__col h3 {
  font-family: "Onest", sans-serif; font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); margin-bottom: 4px;
}
.footer__col a { text-decoration: none; color: var(--ink-soft); }
.footer__col a:hover { color: var(--accent-ink); }
.footer__col p { color: var(--muted); }
.footer__bottom {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--line);
  font-size: 0.81rem; color: var(--muted);
}

/* ===== Тост ===== */
.toast {
  position: fixed; left: 50%; bottom: 26px; z-index: 60;
  transform: translate(-50%, 16px);
  padding: 14px 22px; max-width: calc(100% - 32px);
  background: var(--accent); color: #fff;
  border-radius: var(--radius); font-weight: 600; font-size: 0.92rem;
  box-shadow: 0 14px 34px -18px rgba(0, 0, 0, 0.7);
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
[data-theme="dark"] .toast { color: #17090d; }

/* ===== Окно менеджера ===== */
.manager-modal[hidden] { display: none; }
.manager-modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 18px; }
.manager-modal__backdrop { position: absolute; inset: 0; border: 0; background: rgba(18, 15, 16, 0.68); cursor: pointer; }
.manager-card {
  position: relative; width: min(520px, 100%); max-height: min(720px, calc(100vh - 36px));
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: 0 30px 80px -26px rgba(0, 0, 0, 0.72);
}
.manager-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 20px; border-bottom: 1px solid var(--line); }
.manager-card__head div { display: grid; gap: 3px; }
.manager-card__head strong { font-family: "Unbounded", sans-serif; font-size: 0.94rem; }
.manager-card__head span { color: var(--muted); font-size: 0.8rem; }
.manager-card__close { width: 36px; height: 36px; flex: 0 0 36px; border: 1px solid var(--line); border-radius: 50%; background: var(--bg); color: var(--ink); font-size: 1.25rem; cursor: pointer; }
.manager-chat { min-height: 250px; max-height: 340px; overflow: auto; padding: 20px; display: grid; align-content: start; gap: 10px; background: var(--bg); }
.manager-bubble { max-width: 86%; padding: 12px 14px; border-radius: 6px 16px 16px 16px; background: var(--surface); border: 1px solid var(--line); font-size: 0.9rem; }
.manager-bubble--user { justify-self: end; border-radius: 16px 6px 16px 16px; background: var(--accent); color: #fff; border-color: transparent; }
[data-theme="dark"] .manager-bubble--user { color: #17090d; }
.manager-compose { display: grid; grid-template-columns: 1fr auto; gap: 9px; padding: 14px; border-top: 1px solid var(--line); }
.manager-compose .btn { padding-inline: 18px; }
.manager-channels { padding: 0 14px 16px; display: grid; gap: 8px; }
.manager-channels small { color: var(--muted); font-size: 0.75rem; }
body.has-modal { overflow: hidden; }

/* ===== Появление ===== */
.reveal {
  opacity: 0; transform: translateY(22px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ===== Адаптив ===== */
@media (min-width: 720px) {
  .shop { grid-template-columns: repeat(2, 1fr); }
  .shop__item--tall { grid-row: span 2; }
  .shop__item--tall img { aspect-ratio: auto; height: 100%; }
  .reviews { grid-template-columns: repeat(2, 1fr); }
  .footer__inner { grid-template-columns: 1.4fr 1fr 1fr; }
}

@media (min-width: 1024px) {
  /* Высота задаётся напрямую, а не через max-height: вместе с aspect-ratio
     ограничение высоты ужимало и ширину, и фото переставало быть во всю ширину.
     Значение подобрано так, чтобы панель с кнопками попадала в первый экран. */
  .hero__frame { aspect-ratio: auto; height: min(56vh, 620px); min-height: 360px; }
  /* Панель наезжает на фото только там, где хватает места */
  .hero__overlay {
    position: absolute; left: 50%; transform: translateX(-50%);
    bottom: 28px; padding-top: 0;
  }
  .hero__panel {
    max-width: 560px;
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    backdrop-filter: blur(10px);
  }
  .config { grid-template-columns: 1.25fr 0.75fr; }
  .lead { grid-template-columns: 1fr 1fr; gap: 44px; }
  .reviews { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 1023px) {
  .nav { display: none; }
  /* Тот же селектор, что и базовое правило: иначе .nav + .header__side
     перебивает по специфичности и группа прижимается влево */
  .nav + .header__side { margin-left: auto; }
  .burger { display: flex; }
  .config__side { position: static; }
}

@media (min-width: 1024px) {
  .mobile-nav { display: none !important; }
}

@media (max-width: 560px) {
  .header__phone { display: none; }
  .quiz__nav { flex-direction: column-reverse; }
  .quiz__nav .btn { width: 100%; }
  .manager-modal { padding: 8px; align-items: end; }
  .manager-card { max-height: calc(100vh - 16px); border-radius: 18px; }
  .manager-compose { grid-template-columns: 1fr; }
  .manager-compose .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
