/* Шрифты лежат на нашем сервере (/fonts/): Comfortaa (для заголовков, в файле — «Arigano Head») и Nunito. */
@font-face { font-family: "Arigano Head"; src: url("/fonts/arigano-head-v1.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("/fonts/nunito-v1.woff2") format("woff2"); font-weight: 400 800; font-style: normal; font-display: swap; }
:root {
  --bg: #FAF9F7;
  --scene: #F1EEEA;
  --card: #FFFFFF;
  --text: #1B1A1F;
  --muted: #6E6A65;
  --line: #E6E2DC;
  --tip-bg: #F1EDFF;
  --tip: #4B3BB3;
  --ok-bg: #E7F8F1;
  --ok: #17795D;
  --err-bg: #FFF0EA;
  --err: #A3402A;
  --prism: linear-gradient(100deg, #6533D6 0%, #9838CC 26%, #CC3DA3 52%, #E84A84 76%, #EE6170 100%);
  --head: "Arigano Head", ui-rounded, system-ui, sans-serif;
  --body: "Nunito", ui-rounded, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bar-h: 92px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom));
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--tip); outline-offset: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }

/* ---------- Верх ---------- */
.top {
  max-width: 1040px;
  margin: 0 auto;
  padding: 14px 16px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo img { display: block; width: 128px; height: auto; }
.contact-btn {
  height: 40px;
  padding: 0 16px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--card);
  font-weight: 700;
  font-size: 15px;
}

/* ---------- Раскладка ---------- */
.app {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 16px;
}
.stage { position: relative; }

.kinds {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  background: var(--scene);
  border-radius: 16px;
  margin-bottom: 8px;
}
.kind {
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  font-weight: 700;
  font-size: 15px;
  color: var(--muted);
}
.kind { white-space: nowrap; }
.kind small { font-weight: 600; font-size: 12px; opacity: .8; }
.kind.is-on { background: var(--card); color: var(--text); box-shadow: 0 1px 2px rgba(27,26,31,.08); }
.kind:disabled { cursor: default; }

.scene {
  background: var(--scene);
  border-radius: 28px;
  height: 300px;
  overflow: hidden;
  transition: height .3s ease;
}
.scene.is-compact { height: 230px; }
.scene svg { display: block; width: 100%; height: 100%; }

.steps-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 30px;
  margin: 6px 4px 0;
}
.progress {
  flex: 1;
  display: flex;
  gap: 4px;
  height: 4px;
}
.link.restart { flex: none; margin-left: auto; padding: 4px 0; font-size: 14px; }
.link.restart[hidden] { display: block; visibility: hidden; }
.progress i { flex: 1; border-radius: 2px; background: var(--line); }
.progress i.is-done { background: var(--text); }
.progress.is-hidden { visibility: hidden; }

/* ---------- Шаг ---------- */
.panel { padding: 18px 0 24px; }
.step-head { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.back {
  width: 40px; height: 40px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  display: grid; place-items: center;
}
.back svg { width: 18px; height: 18px; }
.step-head h2 {
  margin: 0;
  font: 700 22px/1.3 var(--head);
  letter-spacing: -.01em;
}
.hint { margin: -6px 0 14px; color: var(--muted); font-size: 15px; }

/* Выбор формы */
.shapes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.shape {
  position: relative;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 18px;
  padding: 12px 6px 10px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 700;
}
.shape svg { width: 44px; height: 44px; }
.shape svg path { fill: var(--scene); stroke: var(--text); stroke-width: 1.6; }

/* Выбранный вариант — призма по контуру */
.is-picked {
  border-color: transparent !important;
  background:
    linear-gradient(var(--card), var(--card)) padding-box,
    var(--prism) border-box !important;
  border-width: 2px !important;
}
.shape.is-picked { padding: 11px 5px 9px; }

/* Карточки вариантов */
.opts { display: grid; gap: 8px; }
.opt {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 18px;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 4px 14px;
  align-items: center;
}
.opt.is-picked { padding: 13px 15px; }
.opt-pic { grid-row: span 2; width: 52px; height: 52px; border-radius: 14px; overflow: hidden; background: var(--scene); }
.opt-pic svg { display: block; width: 100%; height: 100%; }
.opt-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.opt-title { font-weight: 800; }
.opt-delta { font-weight: 700; font-size: 15px; white-space: nowrap; color: var(--muted); }
.opt-text { grid-column: 2 / 4; color: var(--muted); font-size: 15px; line-height: 1.4; }
.opt-nopic { grid-template-columns: 1fr auto; }
.opt-nopic .opt-text { grid-column: 1 / 3; }
.tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 10px;
  background: var(--tip-bg);
  color: var(--tip);
  font-size: 12px; font-weight: 700;
  vertical-align: 2px;
}

/* Чипы */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip {
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  font-weight: 700; font-size: 15px;
}
.chip.is-picked { padding: 0 13px; }
.chip:disabled { opacity: .35; cursor: default; }
/* Как повесить — картинки в один ряд (арка, полукруг, капсула, облако) */
.chips.poses { margin: 0 0 14px; flex-wrap: nowrap; }
.chip-pose { width: 56px; height: 52px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 16px; }
.chip-pose.is-picked { padding: 0; }
.chip-pose svg { width: 36px; height: 36px; }
.chip-pose svg path { fill: var(--scene); stroke: var(--text); stroke-width: 1.4; stroke-linejoin: round; }
.sub { margin: 18px 0 8px; font-weight: 800; }
/* Эскиз клиента: файлы списком, кнопка «Прикрепить эскиз» (06.11) */
.sk-box { margin-top: 12px; }
.sk-file { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; padding: 0 6px 0 16px; margin-top: 8px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); font-weight: 700; }
.sk-file.is-busy { color: var(--muted); }
.sk-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.sk-file .icon-btn { flex: none; }
.sk-add { margin-top: 8px; cursor: pointer; }
.sk-link { display: inline-flex; align-items: center; color: var(--text); text-decoration: none; }

/* Поля */
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fields.is-one { grid-template-columns: 1fr; max-width: 50%; }
.field label { display: block; font-size: 14px; color: var(--muted); margin: 0 0 6px 4px; }
.input {
  width: 100%;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  padding: 0 16px;
  font-size: 17px; font-weight: 700;
}
.input:focus { border-color: var(--tip); outline: none; box-shadow: 0 0 0 3px var(--tip-bg); }
.input.is-bad { border-color: var(--err); }
.msg { margin-top: 12px; padding: 10px 14px; border-radius: 14px; font-size: 15px; }
.msg-err { background: var(--err-bg); color: var(--err); }
.msg-tip { background: var(--tip-bg); color: var(--tip); }
/* Подсказки адреса — списком прямо под полем, чтобы клавиатура телефона их не закрывала */
.sugs { margin-top: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.sugs[hidden] { display: none; }
.sug {
  display: block; width: 100%; min-height: 48px; padding: 12px 16px;
  border: 0; border-top: 1px solid var(--line); background: none;
  font: inherit; font-size: 16px; color: var(--text); text-align: left; cursor: pointer;
}
.sug:first-child { border-top: 0; }
.sug:hover, .sug.is-on { background: var(--tip-bg); }

/* Этаж */
.floor-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.stepper { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.stepper button { width: 48px; height: 50px; border: 0; background: none; font-size: 22px; font-weight: 700; }
.stepper button:disabled { opacity: .3; cursor: default; }
.stepper output { min-width: 34px; text-align: center; font-weight: 800; }
/* Панно: деление под полями размера — кнопки во всю ширину поля */
.fields-split { margin-top: 16px; }
.field .stepper { justify-content: space-between; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; min-height: 52px; padding: 0 4px; }
.switch { position: relative; width: 52px; height: 32px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 16px; background: var(--line); transition: background .2s; pointer-events: none; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(27,26,31,.25); transition: transform .2s; }
.switch input:checked + span { background: var(--text); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 3px solid var(--tip); outline-offset: 2px; }

/* Итог */
.sum-item { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 16px; margin-bottom: 10px; }
.sum-title { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.sum-title b { font-weight: 800; }
.sum-spec { color: var(--muted); font-size: 15px; margin: 2px 0 10px; }
.sum-line { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.sum-line span:last-child { font-weight: 700; white-space: nowrap; }
.sum-actions { display: flex; gap: 16px; margin-top: 8px; }
.link { border: 0; background: none; padding: 6px 0; font-weight: 700; color: var(--tip); font-size: 15px; }
.sum-total { display: flex; justify-content: space-between; align-items: baseline; margin: 16px 4px 4px; }
.sum-total b { font: 700 28px/1.2 var(--head); }
.sum-incl { margin: 2px 4px 0; font-size: 15px; line-height: 1.45; }
.sum-receive { margin: 0 4px; }
.facts { margin: 14px 4px 0; padding: 0; list-style: none; color: var(--muted); font-size: 15px; }
.facts li { padding: 3px 0; }
/* Прошлый расчёт и «Начать заново» */
.prev-offer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 14px; }
.prev-offer .nw { white-space: nowrap; }
.prev-offer .link { flex: none; padding: 4px 0; text-decoration: underline; text-underline-offset: 3px; }
.reset-link { display: block; margin: 10px auto 0; color: var(--muted); }

/* Список изделий заказа (нижнее окно) */
.ord-item { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; margin-bottom: 8px; }
.ord-item.is-cur { border-color: var(--tip); }
.ord-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.ord-top b { font-weight: 800; }
.ord-top span { font-weight: 700; white-space: nowrap; }
.ord-now { font-size: 14px; color: var(--tip); margin-top: 2px; }
.ord-total { display: flex; justify-content: space-between; align-items: baseline; margin: 12px 4px 0; }
.ord-total b { font: 700 24px/1.2 var(--head); }
.ord-note { font-size: 13px; color: var(--muted); margin: 2px 4px 0; }

/* «Изделие убрано · Вернуть» */
.undo {
  position: fixed; z-index: 30;
  left: 50%; transform: translateX(-50%);
  bottom: calc(var(--bar-h) + 12px + env(safe-area-inset-bottom));
  width: max-content; max-width: calc(100% - 32px);
  display: flex; align-items: center; gap: 16px;
  padding: 10px 18px; border-radius: 16px;
  background: var(--text); color: #fff; font-size: 15px;
  box-shadow: 0 6px 20px rgba(27,26,31,.18);
  animation: undo-up .2s ease;
}
@keyframes undo-up { from { transform: translate(-50%, 20px); opacity: 0; } }
.undo[hidden] { display: none; }
.undo .link { color: #fff; padding: 4px 0; text-decoration: underline; text-underline-offset: 3px; }
.btn {
  display: flex; align-items: center; justify-content: center;
  height: 52px;
  padding: 0 22px;
  border-radius: 16px;
  border: 0;
  font-weight: 800; font-size: 17px;
  text-decoration: none;
}
.btn-main { background: var(--prism); color: #fff; }
.btn-main:disabled { background: var(--line); color: var(--muted); cursor: default; }
.btn-alt { width: 100%; margin-top: 12px; background: var(--card); border: 1px solid var(--line); font-weight: 700; }

/* ---------- Нижняя панель с ценой ---------- */
.bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(250, 249, 247, .94);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
.bar-price { min-width: 0; }
.price { font: 700 30px/1.15 var(--head); letter-spacing: -.02em; white-space: nowrap; }
.price.is-text { font-size: 20px; }
.price-note { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.price-order {
  display: block; max-width: 100%;
  border: 0; background: none; padding: 2px 0 0; text-align: left;
  font-size: 13px; font-weight: 700; color: var(--tip);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-decoration: underline; text-decoration-color: rgba(75,59,179,.35); text-underline-offset: 3px;
}
.price-order[hidden] { display: none; }
.bar .btn { flex: none; }
.bar.is-final .bar-price { display: none; }
.bar.is-final .btn { flex: 1; }
@media (max-width: 374px) {
  .shape { font-size: 12.5px; }
  .price { font-size: 26px; }
  .kind { font-size: 14px; }
  .kind small { font-size: 11px; }
  .price-note { font-size: 12px; }
}
@media (max-width: 899px) and (max-height: 760px) {
  .scene { height: 250px; }
  .scene.is-compact { height: 200px; }
}

/* ---------- Нижние окна ---------- */
.sheet { position: fixed; inset: 0; z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
.sheet[hidden] { display: none; }
.sheet-back { position: absolute; inset: 0; background: rgba(27,26,31,.35); }
.sheet-body {
  position: relative;
  width: 100%; max-width: 480px;
  background: var(--bg);
  border-radius: 24px 24px 0 0;
  padding: 18px 16px calc(20px + env(safe-area-inset-bottom));
  animation: up .25s ease;
  max-height: 92vh;
  overflow-y: auto;
}
.sheet-body p { color: var(--muted); margin: 0 0 8px; }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.sheet-head h2 { margin: 0; font: 700 22px/1.3 var(--head); }
.icon-btn { width: 40px; height: 40px; border: 0; border-radius: 20px; background: var(--scene); font-size: 16px; }
.row-link {
  display: flex; justify-content: space-between; align-items: center;
  min-height: 56px; padding: 0 16px; margin-top: 8px;
  border-radius: 16px; background: var(--card); border: 1px solid var(--line);
  color: var(--text); text-decoration: none; font-weight: 700;
}

/* ---------- Зеркало на сцене ---------- */
.dim { font: 700 13px var(--body); fill: var(--muted); }
.dim-line { stroke: #B9B3AC; stroke-width: 1; }
.glint { transform-box: fill-box; animation: glint .9s cubic-bezier(.2,.7,.3,1); }
@keyframes glint { from { transform: translateX(-160%); } to { transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .glint, .sheet-body, .undo { animation: none; }
  .scene { transition: none; }
}

/* ---------- Компьютер ---------- */
@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .app {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    column-gap: 40px;
    align-items: start;
  }
  .stage { grid-row: 1 / 3; position: sticky; top: 16px; }
  .scene, .scene.is-compact { height: min(560px, calc(100vh - 150px)); }
  .panel { grid-column: 2; padding-top: 8px; }
  .bar {
    grid-column: 2;
    position: sticky;
    bottom: 0;
    padding: 16px 0 20px;
    background: var(--bg);
  }
}

/* ---------- Главная под конструктором ---------- */
.bar.is-away.is-final .bar-price { display: block; }
.bar.is-away.is-final .btn { flex: none; }
body.no-scroll { overflow: hidden; }
.home { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.blk { padding: 72px 0 0; }
.blk[hidden] { display: none; }
.blk-title {
  margin: 0 0 24px;
  font: 700 28px/1.2 var(--head);
  letter-spacing: -.02em;
}
.blk-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.blk-head .blk-title { margin: 0; }
.rating { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: 15px; }
.rating b { color: var(--text); font: 700 17px var(--head); margin-right: 4px; }
/* Доверие у итога (12.11): звёзды мягко-чёрные, как у отзывов */
.sum-trust { margin: 10px 0 0; font-size: 15px; color: var(--muted); line-height: 1.45; }
.sum-trust .stars { color: var(--text); font: 15px/1 system-ui, -apple-system, sans-serif; letter-spacing: 1px; margin-right: 6px; }
.rating .stars { font: 15px/1 system-ui, -apple-system, sans-serif; letter-spacing: 1px; margin-right: 6px; }

/* Лента, которая листается пальцем: край следующей карточки виден — понятно, что дальше есть ещё */
.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 82%;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 16px;
  margin: 0 -16px;
  padding: 0 16px 4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }

/* Работы */
.work { margin: 0; }
.work-pic {
  display: block; width: 100%; padding: 0; border: 0;
  aspect-ratio: 4 / 5;
  border-radius: 24px; overflow: hidden;
  background: var(--scene);
}
.work-pic img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.work-pic:hover img { transform: scale(1.02); }
.work figcaption { padding: 12px 4px 0; display: grid; gap: 2px; }
.work figcaption .muted { font-size: 15px; line-height: 1.4; }
.work-calc {
  margin-top: 10px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  height: 48px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 16px; background: var(--card);
  font-weight: 800; font-size: 15px;
}
.work-calc span:last-child { font: 700 16px var(--head); }
.work-calc .wc-price { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; }
.work-calc .wc-price small { font: 600 12px var(--body); color: var(--muted); }

/* Как это происходит */
.how { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.how li {
  display: grid;
  grid-template-columns: 44px 1fr;
  column-gap: 14px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.how li:last-child { border-bottom: 1px solid var(--line); }
.how-n {
  grid-row: span 2;
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--scene);
  font: 700 15px var(--head);
}
.how b { font-weight: 800; font-size: 18px; }
.how li > span:last-child { color: var(--muted); font-size: 16px; }

/* Отзывы */
.rail-reviews { grid-auto-columns: 86%; }
.review {
  margin: 0;
  display: flex; flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 22px 20px 20px;
}
.review blockquote {
  margin: 0 0 auto;
  font-size: 17px; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden;
}
.review blockquote::before { content: "«"; }
.review blockquote::after { content: "»"; }
.review.is-open blockquote { -webkit-line-clamp: unset; display: block; }
.review-more { align-self: flex-start; border: 0; background: none; padding: 6px 0 0; color: var(--tip); font-weight: 700; font-size: 15px; }
.review-more[hidden] { display: none; }
.review figcaption { margin-top: 18px; display: grid; gap: 0; font-size: 15px; }
.more-links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 18px; }
.more-links a { color: var(--text); font-weight: 700; font-size: 15px; text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.more-links a::after { content: " →"; }

/* Гарантия */
.promise { background: var(--scene); border-radius: 28px; padding: 28px 20px 20px; }
.promise .blk-title { margin-bottom: 18px; }
.promise-list { margin: 0; display: grid; }
.promise-list > div { display: grid; grid-template-columns: 92px 1fr; gap: 12px; padding: 16px 0; border-top: 1px solid rgba(27,26,31,.08); }
.promise-list > div[hidden] { display: none; }
.promise-list dt { color: var(--muted); font-size: 15px; padding-top: 3px; }
.promise-list dd { margin: 0; display: grid; }
.promise-list dd b { font: 700 20px/1.3 var(--head); letter-spacing: -.01em; }
.promise-list dd span { color: var(--muted); font-size: 15px; }
/* Узкий телефон: подпись над значением — «Наша ответственность» в две колонки не помещалась и раздвигала страницу (12.11) */
@media (max-width: 389px) {
  .promise-list > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}
.fold { border-top: 1px solid rgba(27,26,31,.08); }
.fold summary, .faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  min-height: 56px; font-weight: 800;
}
.fold summary::-webkit-details-marker, .faq summary::-webkit-details-marker { display: none; }
.fold summary::after, .faq summary::after {
  content: ""; flex: none; width: 12px; height: 12px;
  background: linear-gradient(currentColor, currentColor) center / 12px 2px no-repeat, linear-gradient(currentColor, currentColor) center / 2px 12px no-repeat;
  transition: transform .2s ease;
}
.fold[open] summary::after, .faq details[open] summary::after { transform: rotate(45deg); }
.fold p { margin: 0 0 12px; color: var(--muted); font-size: 15px; }
.fold p b { color: var(--text); }

/* Вопросы */
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { min-height: 64px; font-size: 17px; }
.faq p { margin: 0 0 18px; color: var(--muted); max-width: 640px; }

/* Связаться */
.blk-contact { text-align: left; }
.big-phone { display: inline-block; font: 700 32px/1.2 var(--head); letter-spacing: -.02em; color: var(--text); text-decoration: none; }
.blk-contact p { margin: 6px 0 18px; }
.blk-contact .addr { margin: 10px 0 0; color: var(--text); }
.blk-contact .addr + p { margin-top: 2px; }
.msgs { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-link {
  display: inline-flex; align-items: center; height: 44px; padding: 0 18px;
  border-radius: 22px; border: 1px solid var(--line); background: var(--card);
  color: var(--text); font-weight: 700; font-size: 15px; text-decoration: none;
}
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px 20px; margin-top: 72px; padding: 22px 0 28px; border-top: 1px solid var(--line); font-size: 14px; }
.foot img { margin-top: 3px; flex: none; }
.foot-info { display: grid; gap: 2px; text-align: right; }
@media (max-width: 599px) {
  .foot { flex-direction: column; }
  .foot-info { text-align: left; }
}
.foot img { display: block; height: auto; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.foot-nav a { color: var(--muted); text-decoration: none; }
.foot-nav a:hover, .foot-nav a[aria-current] { color: var(--text); }
/* Реквизиты и юридические ссылки — отдельной строкой во всю ширину (12.11) */
.foot-legal { flex-basis: 100%; display: grid; gap: 4px; font-size: 13px; }
.foot-legal span:last-child { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.foot-legal a { color: var(--muted); }
.foot-legal a:hover { color: var(--text); }

/* Коротко об изделии — на страницах /zerkala, /fartuki, /steklo */
.about p { margin: 0 0 14px; max-width: 640px; color: var(--muted); }
.about p b { color: var(--text); font-weight: 700; }

/* Фото на весь экран */
.viewer { position: fixed; inset: 0; z-index: 30; background: rgba(27,26,31,.94); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 64px 16px calc(20px + env(safe-area-inset-bottom)); }
.viewer[hidden] { display: none; }
.viewer img { max-width: 100%; max-height: calc(100% - 110px); object-fit: contain; border-radius: 12px; }
.viewer-close { position: absolute; top: 14px; right: 16px; background: rgba(255,255,255,.14); color: #fff; }
.viewer-cap { color: #fff; margin-top: 16px; display: grid; gap: 12px; justify-items: center; text-align: center; }
.viewer-cap .btn { min-width: 260px; }

@media (prefers-reduced-motion: reduce) { .work-pic img { transition: none; } }

@media (min-width: 700px) {
  /* На широком экране не листаем вбок — всё видно сеткой по три */
  .rail, .rail-reviews { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-columns: auto; gap: 32px 12px; overflow: visible; margin: 0; padding: 0; }
  .rail-reviews { gap: 12px; }
  .how { grid-template-columns: repeat(4, 1fr); gap: 24px; }
  .how li, .how li:last-child { grid-template-columns: 1fr; align-content: start; border: 0; border-top: 1px solid var(--line); padding: 20px 0 0; }
  .how-n { grid-row: auto; margin-bottom: 14px; }
  .promise { padding: 40px 40px 28px; }
  .promise-list { grid-template-columns: repeat(3, 1fr); column-gap: 32px; }
  .promise-list > div { grid-template-columns: 1fr; gap: 6px; }
}
@media (min-width: 900px) {
  .blk { padding-top: 112px; }
  .blk-title { font-size: 40px; margin-bottom: 32px; }
  .blk-head { margin-bottom: 32px; }
  .big-phone { font-size: 48px; }
  .faq { max-width: 760px; }
}

/* Вариант, который сейчас не подходит (например, полка великовата для кронштейнов) */
.opt.is-off { opacity: .55; cursor: default; }
.opt.is-off .opt-text { color: var(--text); }
/* Цвет крепежа */
.chip-hw { display: inline-flex; align-items: center; gap: 8px; }
.hw-dot { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid; flex: none; }
/* Фартук из частей (10.11): заголовок части с «Убрать», кнопка «Добавить часть» */
.apart-head { display: flex; align-items: center; justify-content: space-between; margin: 16px 4px 6px; }
.apart-head .link { padding: 4px 0; }
.add-part { display: block; width: 100%; min-height: 52px; margin-top: 14px; border: 1.5px dashed var(--line); border-radius: 16px; background: none; font: inherit; font-size: 16px; font-weight: 800; color: var(--text); cursor: pointer; }
.add-part:hover { border-color: var(--tip); color: var(--tip); }
