:root {
  --bg: #F8F4F1;
  --card: #FFFFFF;
  --peach: #F9E3DA;
  --line: #E6DDD7;
  --ink: #0A0A0A;
  --ink-2: #636363;
  --accent: #F63C04;
  --accent-hi: #FF5A26;
  --font: 'Geist', 'Onest', system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --r: clamp(14px, 1.6vw, 22px);
  --shadow: 0 1px 2px rgba(60, 20, 0, .06), 0 14px 34px -22px rgba(60, 20, 0, .28);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1rem/1.5 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul, ol, dl, dd, fieldset, figure { margin: 0; padding: 0; }
h1, h2, h3 { text-wrap: balance; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
svg { flex: none; }
symbol, .btn svg, .cards svg, summary svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
[hidden] { display: none !important; }
.wrap { max-width: 1360px; margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: 16px; top: -80px; z-index: 60; padding: 12px 18px; border-radius: 12px; background: var(--ink); color: #fff; font-weight: 600; }
.skip:focus { top: 16px; }

/* Типографика: заглавные заголовки средней жирности, подписи со звёздочкой */
h1 { font-weight: 600; font-size: clamp(1.75rem, 4vw, 3.5rem); line-height: 1.05; letter-spacing: -.03em; text-transform: uppercase; }
h2 { font-weight: 600; font-size: clamp(1.5rem, 3.2vw, 2.75rem); line-height: 1.08; letter-spacing: -.03em; text-transform: uppercase; }
h2 em, h1 em { font-style: normal; color: var(--ink-2); }
h3 { font-weight: 600; font-size: 1.125rem; letter-spacing: -.02em; }
.lead { max-width: 50ch; font-size: clamp(1rem, 1.3vw, 1.125rem); color: rgba(255, 255, 255, .92); }
.lead--dark { color: var(--ink-2); }
.mark { display: inline-flex; align-items: center; gap: 8px; font-size: .875rem; font-weight: 500; }
.mark::before { content: '✳'; color: var(--accent); font-size: .8em; }

/* Кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 48px; padding: 0 20px; border-radius: 12px; font-weight: 600; font-size: .9375rem; transition: translate .4s var(--ease), background-color .2s, color .2s, border-color .2s; }
.btn svg { width: 16px; height: 16px; }
.btn i { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; background: var(--accent); color: #fff; transition: rotate .4s var(--ease); }
.btn:hover { translate: 0 -2px; }
.btn:hover i { rotate: 45deg; }
.btn--dark { background: var(--ink); color: #fff; }
.btn--white { background: #fff; color: var(--ink); padding-right: 8px; box-shadow: var(--shadow); }
.btn--accent { background: var(--accent); color: #fff; padding-right: 8px; }
.btn--accent i { background: #fff; color: var(--accent); }
.btn--accent:hover { background: var(--accent-hi); }
.btn--line { border: 1px solid var(--line); background: var(--card); }
.btn--line:hover { border-color: var(--ink); }
.btn--s { min-height: 44px; padding: 0 16px; font-size: .875rem; }
.btn--l { min-height: 60px; padding: 0 12px 0 26px; font-size: 1rem; border-radius: 16px; }
.btn--l i { width: 40px; height: 40px; border-radius: 10px; }
.btn--full { width: 100%; justify-content: space-between; }
.row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Шапка */
.top { position: sticky; top: 0; z-index: 30; background: rgba(248, 244, 241, .88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.top__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { font-weight: 700; font-size: 1.25rem; letter-spacing: -.04em; text-transform: uppercase; }
.brand sup { font-size: .5em; color: var(--accent); margin-left: 2px; }
.top__nav { display: flex; gap: 4px; }
.top__nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 10px; font-size: .875rem; font-weight: 500; color: var(--ink-2); transition: color .2s, background-color .2s; }
.top__nav a:hover { color: var(--ink); background: #fff; }

/* Первый экран: оранжевый блок с огромным приглушённым словом */
.hero { position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); align-items: end; gap: 24px clamp(24px, 5vw, 72px); min-height: min(78vh, 720px); padding: clamp(22px, 4vw, 56px); border-radius: clamp(18px, 2vw, 30px); background: radial-gradient(120% 90% at 100% 0, #FF8A4D 0%, var(--accent) 46%, #C92B00 100%); color: #fff; }
.hero__mega { position: absolute; z-index: -1; left: 50%; top: -.06em; translate: -50% 0; font-weight: 700; font-size: clamp(6rem, 25vw, 23rem); line-height: .8; letter-spacing: -.05em; color: rgba(255, 255, 255, .13); white-space: nowrap; pointer-events: none; }
.hero__copy { display: flex; flex-direction: column; align-items: flex-start; gap: clamp(14px, 1.8vw, 24px); }
.hero .mark { color: #fff; }
.hero .mark::before { color: #fff; }
.hero__cards { display: flex; flex-direction: column; gap: 8px; }
.hero__cards li { display: grid; grid-template-columns: auto 1fr; gap: 0 14px; align-items: baseline; padding: 14px 18px; border-radius: 14px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .28); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.hero__cards li:last-child { background: #fff; color: var(--ink); }
.hero__cards small { grid-row: span 2; font-size: .75rem; opacity: .8; }
.hero__cards b { font-weight: 600; font-size: 1.125rem; text-transform: uppercase; letter-spacing: -.02em; }
.hero__cards span { font-size: .8125rem; opacity: .85; }

/* Секции */
.sec { padding-block: clamp(56px, 8vw, 112px); }
.sec--peach { background: linear-gradient(180deg, var(--bg), var(--peach)); }
section[id] { scroll-margin-top: calc(68px + 20px - clamp(56px, 8vw, 112px)); }
.head { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .6fr); align-items: end; gap: 12px clamp(24px, 5vw, 72px); margin-bottom: clamp(22px, 3.2vw, 44px); }
.head .mark { grid-column: 1 / -1; }
.head__note { font-size: .875rem; color: var(--ink-2); max-width: 44ch; text-transform: uppercase; letter-spacing: .01em; }

/* Конструктор */
.tool { display: grid; grid-template-columns: 300px minmax(0, 1fr) 290px; gap: 12px; align-items: start; }
.panel, .stage, .sum { border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); }
.panel { display: flex; flex-direction: column; gap: 22px; padding: 20px; }
legend { margin-bottom: 10px; font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); }
.nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.nums label { display: flex; flex-direction: column; gap: 6px; font-size: .75rem; color: var(--ink-2); }
.nums input { width: 100%; min-height: 46px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); font-weight: 600; font-size: 1rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.nums input:focus { outline: none; border-color: var(--accent); background: #fff; }
.range { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; font-size: .875rem; }
.range span { display: flex; justify-content: space-between; }
.range b { font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.range input { width: 100%; min-height: 28px; accent-color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips + .chips { margin-top: 8px; }
.chips label { position: relative; cursor: pointer; }
.chips input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.chips span { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); font-size: .875rem; font-weight: 500; transition: background-color .2s, color .2s, border-color .2s; }
.chips span i { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .25); }
.chips label:hover span { border-color: var(--ink); }
.chips input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.chips input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
.check { display: flex; align-items: center; gap: 10px; margin-top: 12px; min-height: 44px; font-size: .875rem; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); }
.warn { padding: 12px 14px; border-radius: 12px; background: #FFE9D6; border: 1px solid #F4B183; font-size: .875rem; color: #7A2E00; }

.stage { display: flex; flex-direction: column; gap: 14px; padding: 16px; min-width: 0; }
.tabs { display: inline-flex; align-self: flex-start; gap: 4px; padding: 4px; border-radius: 12px; background: var(--bg); }
.tabs button { min-height: 40px; padding: 0 18px; border-radius: 9px; font-size: .875rem; font-weight: 600; color: var(--ink-2); transition: background-color .2s, color .2s; }
.tabs button[aria-selected="true"] { background: var(--ink); color: #fff; }
.sheet { border-radius: 12px; border: 1px solid var(--line); background: #fff; overflow: hidden; }
.sheet svg { display: block; width: 100%; height: auto; max-height: 68vh; }
.tablewrap { overflow-x: auto; border-radius: 12px; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: .9375rem; font-variant-numeric: tabular-nums; }
caption { padding: 14px 16px; text-align: left; font-weight: 600; text-transform: uppercase; letter-spacing: -.01em; }
th, td { padding: 12px 16px; text-align: left; border-top: 1px solid var(--line); white-space: nowrap; }
thead th { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); background: var(--bg); }
tbody th { font-weight: 600; }
.cuts { display: grid; gap: 14px; }
.cuts figcaption { margin-bottom: 8px; font-size: .8125rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); }
.cuts svg { display: block; width: 100%; height: auto; border-radius: 8px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }

.sum { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 12px; padding: 20px; background: var(--ink); color: #fff; }
.sum .mark { color: #C9C9C9; }
.sum__price { font-weight: 600; font-size: clamp(1.75rem, 2.4vw, 2.25rem); line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.sum__note { font-size: .8125rem; color: #A8A8A8; }
.sum dl { display: flex; flex-direction: column; border-top: 1px solid rgba(255, 255, 255, .16); }
.sum dl div { display: flex; justify-content: space-between; gap: 14px; padding: 11px 0; border-bottom: 1px solid rgba(255, 255, 255, .16); font-size: .875rem; }
.sum dt { color: #BDBDBD; }
.sum dd { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Что получите, шаги */
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.cards li { display: flex; flex-direction: column; gap: 12px; min-height: 250px; padding: 22px; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); transition: translate .45s var(--ease); }
.cards li:hover { translate: 0 -6px; }
.cards i { width: 36px; height: 36px; margin-bottom: auto; display: flex; align-items: center; justify-content: center; border-radius: 9px; background: var(--accent); color: #fff; }
.cards i svg { width: 18px; height: 18px; }
.cards h3 { text-transform: uppercase; }
.cards p { font-size: .9375rem; color: var(--ink-2); }
.cards .is-dark { background: var(--ink); color: #fff; }
.cards .is-dark p { color: #BDBDBD; }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.steps li { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 26px 22px 0 0; }
.steps li + li { padding-left: 22px; border-left: 1px solid var(--line); }
.steps li::before { content: ''; position: absolute; left: 0; top: -3px; width: 44px; height: 5px; border-radius: 5px; background: var(--accent); }
.steps li + li::before { left: 22px; }
.steps span { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); }
.steps h3 { text-transform: uppercase; }
.steps p { font-size: .9375rem; color: var(--ink-2); }

/* Вопросы */
.faq { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(20px, 5vw, 72px); align-items: start; }
.faq .head { display: flex; flex-direction: column; align-items: flex-start; margin: 0; }
.faq__list { display: flex; flex-direction: column; gap: 8px; }
details { border-radius: 14px; background: var(--card); box-shadow: var(--shadow); }
summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; cursor: pointer; list-style: none; font-weight: 600; }
summary::-webkit-details-marker { display: none; }
summary svg { width: 18px; height: 18px; padding: 5px; box-sizing: content-box; border-radius: 8px; background: var(--bg); transition: rotate .4s var(--ease), background-color .2s, color .2s; }
details[open] summary svg { rotate: 45deg; background: var(--accent); color: #fff; }
details p { padding: 0 20px 20px; max-width: 64ch; color: var(--ink-2); }

/* Заказ */
.order { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(24px, 5vw, 72px); align-items: start; }
.order__copy { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.form { position: relative; display: flex; flex-direction: column; gap: 14px; padding: clamp(18px, 2.6vw, 30px); border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); }
.line { display: flex; flex-direction: column; gap: 6px; font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.line input { width: 100%; min-height: 52px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); font-size: 1rem; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--ink); }
.line input:focus { outline: none; border-color: var(--accent); background: #fff; }
.line input[readonly] { color: var(--ink-2); font-size: .875rem; }
.line [aria-invalid="true"] { border-color: #C0341D; }
.line em { font-style: normal; font-weight: 500; letter-spacing: 0; text-transform: none; color: #A8200B; }
.note { font-size: .75rem; color: var(--ink-2); }
.form__done { display: flex; flex-direction: column; gap: 10px; padding-block: 20px; }

.foot { border-top: 1px solid var(--line); }
.foot__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 32px; padding-block: 26px 34px; font-size: .8125rem; color: var(--ink-2); }
.foot .brand { color: var(--ink); }

@media (max-width: 1180px) {
  .tool { grid-template-columns: 290px minmax(0, 1fr); }
  .sum { grid-column: 1 / -1; position: static; }
  .sum dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 20px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .top__nav { display: none; }
  .hero, .head, .tool, .faq, .order { grid-template-columns: 1fr; }
  .hero__cards { flex-direction: row; flex-wrap: wrap; }
  .hero__cards li { flex: 1 1 160px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps li:nth-child(3) { padding-left: 0; border-left: 0; }
  .steps li:nth-child(3)::before { left: 0; }
  .steps li:nth-child(n+3) { margin-top: 26px; }
}
@media (max-width: 560px) {
  .cards, .steps { grid-template-columns: 1fr; }
  .cards li { min-height: 0; }
  .steps li + li { padding-left: 0; border-left: 0; margin-top: 22px; }
  .steps li + li::before { left: 0; }
  .sum dl { grid-template-columns: 1fr; }
  .actions .btn { flex: 1 1 100%; }
  .btn--l { width: 100%; justify-content: space-between; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}
@media print {
  .top, .hero, .panel, .tabs, .actions, .sum .btn, .sec--peach, #how, #order, .foot, .skip, .head { display: none !important; }
  body { background: #fff; }
  .sec { padding: 0; }
  .tool { display: block; }
  .stage, .sum { box-shadow: none; padding: 0; }
  .sum { background: none; color: #000; margin-top: 12pt; }
  .sum dt, .sum__note, .sum .mark { color: #333; }
  .sum dl div { border-color: #999; }
  .view { margin-bottom: 14pt; break-inside: avoid; }
  .sheet svg { max-height: none; }
}

/* Блок редактора «Кульман» */
.btn--ghost { border: 1px solid rgba(255, 255, 255, .55); color: #fff; padding: 0 26px; }
.btn--ghost:hover { background: rgba(255, 255, 255, .14); }
.kulman { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(22px, 4vw, 56px); padding: clamp(22px, 4vw, 56px); border-radius: clamp(18px, 2vw, 30px); background: var(--ink); color: #fff; }
.kulman__copy { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.kulman .mark { color: #C9C9C9; }
.kulman h2 em { color: #8E8E8E; }
.kulman .lead { color: #C9C9C9; }
.kulman .btn { margin-top: auto; }
.kulman__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(16px, 2.4vw, 32px); align-content: start; }
.kulman__list li { display: flex; flex-direction: column; gap: 4px; padding: 16px 0; border-top: 1px solid rgba(255, 255, 255, .16); }
.kulman__list b { font-weight: 600; text-transform: uppercase; letter-spacing: -.01em; }
.kulman__list span { font-size: .875rem; color: #A8A8A8; }
@media (max-width: 900px) { .kulman { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .kulman__list { grid-template-columns: 1fr; } }
@media print { #editor { display: none !important; } }

/* В меню добавились служебные разделы — не даём пунктам переноситься */
.top__nav a, .top .btn { white-space: nowrap; }
@media (max-width: 1080px) { .top__nav { display: none; } }
.foot a { text-decoration: underline; text-underline-offset: 3px; }
.foot a.brand { text-decoration: none; }

/* Рабочие разделы — ссылки сразу под первым экраном, видны на любой ширине */
.work { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.work a { display: grid; gap: 4px; padding: 18px 22px; border-radius: var(--r); background: var(--ink); color: #fff; transition: background-color .2s, translate .4s var(--ease); }
.work a:hover { background: var(--accent); translate: 0 -2px; }
.work b { font-size: 1.125rem; font-weight: 600; letter-spacing: -.02em; }
.work b::after { content: " →"; }
.work span { font-size: .875rem; color: #D6D0CB; }
.work a:hover span { color: #fff; }
@media (max-width: 640px) { .work { grid-template-columns: 1fr; } }
@media print { .work { display: none; } }

/* ---------- Ползунки, как в настройках персонажа: подпись, число, дорожка с заливкой ---------- */
.slide { display: grid; grid-template-columns: minmax(0, 1fr) 76px; align-items: center; gap: 6px 10px; margin-bottom: 14px; }
.slide:last-child { margin-bottom: 0; }
.slide label { font-size: .875rem; font-weight: 500; }
.slide__num { width: 100%; min-height: 36px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); font-weight: 700; font-size: .9375rem; text-align: right; color: var(--accent); font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield; }
.slide__num::-webkit-outer-spin-button, .slide__num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.slide__num:focus { outline: none; border-color: var(--accent); background: #fff; }
.slide input[type=range] { grid-column: 1 / -1; -webkit-appearance: none; appearance: none; width: 100%; height: 28px; margin: 0; background: transparent; cursor: pointer; --fill: 50%; }
.slide input[type=range]::-webkit-slider-runnable-track { height: 8px; border-radius: 999px; background: linear-gradient(90deg, var(--accent) var(--fill), var(--line) var(--fill)); }
.slide input[type=range]::-moz-range-track { height: 8px; border-radius: 999px; background: var(--line); }
.slide input[type=range]::-moz-range-progress { height: 8px; border-radius: 999px; background: var(--accent); }
.slide input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -8px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); box-shadow: 0 2px 6px rgba(60, 20, 0, .25); transition: scale .15s; }
.slide input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); box-shadow: 0 2px 6px rgba(60, 20, 0, .25); }
.slide input[type=range]:active::-webkit-slider-thumb { scale: 1.15; }
.slide input[type=range]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 999px; }

/* ---------- Трёхмерный вид ---------- */
.scene { position: relative; height: clamp(380px, 62vh, 640px); border-radius: 12px; border: 1px solid var(--line); overflow: hidden; background: radial-gradient(120% 90% at 50% 20%, #FFFFFF 0%, #F6EFEA 55%, #EBDDD3 100%); }
.scene canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; outline-offset: -3px; }
.scene canvas:active { cursor: grabbing; }
.scene__size { position: absolute; left: 14px; top: 12px; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .86); font-size: .8125rem; font-weight: 600; font-variant-numeric: tabular-nums; pointer-events: none; }
.scene__cams { position: absolute; left: 50%; bottom: 12px; translate: -50% 0; display: flex; gap: 2px; padding: 4px; border-radius: 12px; background: rgba(255, 255, 255, .9); box-shadow: var(--shadow); max-width: calc(100% - 24px); }
.scene__cams button { min-height: 36px; padding: 0 12px; border-radius: 8px; font-size: .8125rem; font-weight: 600; color: var(--ink-2); white-space: nowrap; transition: background-color .2s, color .2s; }
.scene__cams button:hover { color: var(--ink); }
.scene__cams button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.scene__cams [data-spin] { margin-left: 6px; }
.scene__cams [data-spin][aria-pressed="true"] { background: var(--accent); }
.scene__hint { position: absolute; right: 14px; top: 14px; font-size: .75rem; color: var(--ink-2); pointer-events: none; transition: opacity .4s; }
.scene.is-touched .scene__hint { opacity: 0; }
.scene__off { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; text-align: center; color: var(--ink-2); }
.scene.is-off canvas, .scene.is-off .scene__cams, .scene.is-off .scene__hint { display: none; }
@media (max-width: 640px) {
  .scene { height: 420px; }
  .scene__hint { display: none; }
  .scene__cams button { padding: 0 9px; font-size: .75rem; }
}
@media print { .scene { display: none; } }
@media (max-width: 640px) {
  .scene__cams { flex-wrap: wrap; justify-content: center; width: calc(100% - 24px); }
  .scene__cams [data-spin] { margin-left: 0; }
}

/* ---------- Конструктор: слева сцена, справа настройки ---------- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.presets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.presets button { min-height: 44px; padding: 0 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); font-size: .875rem; font-weight: 600; transition: background-color .2s, color .2s, border-color .2s; }
.presets button:hover { border-color: var(--ink); }
.presets button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.sws { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; }
.sws label { position: relative; display: block; aspect-ratio: 1; cursor: pointer; }
.sws input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.sws span { display: block; width: 100%; height: 100%; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .18); transition: scale .15s, box-shadow .15s; }
.sws label:hover span { scale: 1.08; }
.sws input:checked + span { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--accent); }
.sws input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 5px; }
.decor { margin: 10px 0 12px; font-size: .875rem; font-weight: 500; color: var(--ink-2); }
.hint { font-size: .8125rem; color: var(--ink-2); margin-bottom: 10px; }
.pick { display: grid; gap: 6px; margin-top: 12px; font-size: .8125rem; font-weight: 500; color: var(--ink-2); }
.pick select, .pick input, .pick textarea { width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); font: inherit; font-size: .9375rem; font-weight: 500; color: var(--ink); }
.pick textarea { padding: 10px 12px; resize: vertical; line-height: 1.45; }
.pick select:focus, .pick input:focus, .pick textarea:focus { outline: none; border-color: var(--accent); background: #fff; }
.panel .check { margin-top: 4px; }
.panel .chips + .slide, .panel .chips + .only-base, .panel .check + .chips, .panel .slide + .pick { margin-top: 14px; }
.panel .only-base .slide { margin-top: 14px; }
.panel.no-base .only-base, .panel.no-fronts .only-fronts .sws, .panel.no-fronts .only-fronts .decor { display: none; }
.panel:not(.no-fronts) .only-nofronts { display: none; }
.panel .warn { margin-top: 16px; }

.scene { height: clamp(400px, 66vh, 700px); background: #E9E8E6; }
.scene__tools { position: absolute; left: 12px; top: 52px; display: grid; gap: 8px; }
.scene__tools button { width: 46px; height: 46px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: rgba(255, 255, 255, .92); box-shadow: var(--shadow); color: var(--ink); transition: background-color .2s, color .2s; }
.scene__tools svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.scene__tools button:hover { background: #fff; }
.scene__tools button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.scene__tools button:disabled { opacity: .45; cursor: default; }
.scene__cams { left: 12px; translate: none; }
@media (max-width: 640px) {
  .scene { height: 440px; }
  .sws { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; }
}

/* Панель настроек стала длиннее: группы разделены отступом, как раньше */
.tool > .panel { position: static; }
.panel .warn { margin-top: 0; }
.sws { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; }

/* В студии фон сцены совпадает с бумагой стены */
.scene.is-room { background: #F6EEE7; }

/* ---------- Кухни ---------- */
.sec--first { padding-top: clamp(28px, 4vw, 56px); }
.h1-s { font-size: clamp(1.5rem, 3.2vw, 2.75rem); }
.shapes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.shapes label { position: relative; cursor: pointer; }
.shapes input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.shapes span { display: grid; justify-items: center; gap: 6px; padding: 12px 6px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); font-size: .8125rem; font-weight: 600; transition: background-color .2s, color .2s, border-color .2s; }
.shapes svg { width: 48px; height: 36px; fill: currentColor; opacity: .85; }
.shapes label:hover span { border-color: var(--ink); }
.shapes input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.shapes input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
.panel[data-shape="i"] .only-b, .panel[data-shape="i"] .only-c, .panel[data-shape="i"] .only-i,
.panel[data-shape="l"] .only-c, .panel[data-shape="l"] .only-i, .panel[data-shape="u"] .only-i,
.panel[data-shape="isl"] .only-b, .panel[data-shape="isl"] .only-c, .panel.no-up .only-up { display: none; }
.mods select { min-height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); font: inherit; font-size: .875rem; }
.mods .grp th { background: var(--bg); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.view > .hint { margin-bottom: 10px; }
.presets__link { display: block; margin-top: 8px; padding: 12px 14px; border-radius: 10px; background: var(--peach); color: var(--accent); font-size: .875rem; font-weight: 600; transition: background-color .2s, color .2s; }
.presets__link:hover { background: var(--accent); color: #fff; }

.tabs { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tabs button { white-space: nowrap; }

/* Расширенные настройки */
.more-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 48px; margin-top: 4px; border-radius: 12px; border: 1px dashed var(--line); background: var(--bg); font-size: .9375rem; font-weight: 600; transition: border-color .2s, background-color .2s, color .2s; }
.more-btn::before { content: '+'; font-size: 1.25rem; font-weight: 500; line-height: 1; color: var(--accent); transition: rotate .3s var(--ease); }
.more-btn:hover { border-color: var(--ink); border-style: solid; }
.more-btn[aria-expanded="true"] { background: var(--ink); border-color: var(--ink); border-style: solid; color: #fff; }
.more-btn[aria-expanded="true"]::before { rotate: 45deg; color: #fff; }
.more { display: flex; flex-direction: column; gap: 22px; }

/* Настройки листаются внутри своей колонки: высоту ряда задаёт сцена, панель её не растягивает — модель всегда перед глазами */
@media (min-width: 901px) {
  .tool { align-items: stretch; }
  .tool > .panel { height: 0; min-height: 100%; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
  .tool > .sum { position: static; align-self: start; }
}
/* На телефоне сцена прилипает к верху экрана, настройки листаются под ней */
@media (max-width: 900px) {
  .tool > .stage { order: -1; position: sticky; top: 68px; z-index: 6; gap: 8px; padding: 10px; }
  .tool > .stage .scene { height: 36vh; min-height: 230px; }
  .tool > .stage .actions { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .tool > .stage .actions .btn { flex: none; }
  .tool > .stage .scene__cams { bottom: 8px; }
  .tool > .stage .scene__tools { top: 46px; }
  .tool > .stage .scene__tools button { width: 40px; height: 40px; }
}

/* ---------- Ниши: переключатель разделов и калькуляторы подрядчиков ---------- */
.niches { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.niches a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font-size: .9375rem; font-weight: 600; transition: border-color .2s, background-color .2s, color .2s; }
.niches a:hover { border-color: var(--ink); }
.niches a[aria-current] { background: var(--ink); border-color: var(--ink); color: #fff; }
.panel .grp { margin-bottom: 14px; }
.panel .grp legend { margin-bottom: 8px; font-size: .875rem; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--ink); }
.panel > fieldset > .check { margin-top: 2px; }
.calc-table { min-width: 560px; }
.calc-table td, .calc-table th { white-space: normal; }
.calc-table td:nth-child(n+3) { white-space: nowrap; text-align: right; }
.calc-table thead th:nth-child(n+3) { text-align: right; }
.calc-table tfoot th, .calc-table tfoot td { border-top: 2px solid var(--ink); font-weight: 700; }
.calc-brand { align-self: flex-start; padding: 6px 12px; border-radius: 999px; background: var(--bg); font-weight: 700; font-size: .875rem; }
.calc-badge { position: absolute; right: 16px; top: 16px; padding: 5px 11px; border-radius: 999px; background: rgba(10, 10, 10, .78); color: #fff; font-size: .6875rem; font-weight: 600; }
.stage { position: relative; }
.sum dl:empty { display: none; }
@media (max-width: 640px) { .niches { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); } .niches a { flex: none; } }
/* Вставка калькулятора на сайт клиента: без шапки и подвала */
.is-embed .top, .is-embed .foot, .is-embed .head, .is-embed .niches, .is-embed .order__copy, .is-embed .skip { display: none; }
.is-embed { background: var(--card); }
.is-embed .sec { padding-block: 12px; }
.is-embed .wrap { padding-inline: 12px; }
.is-embed .order { grid-template-columns: minmax(0, 1fr); }
.is-embed .panel, .is-embed .stage, .is-embed .form { box-shadow: none; border: 1px solid var(--line); }
@media print { .niches { display: none; } }

/* Сцена держит высоту, даже когда схема низкая (забор): панель настроек равняется по ней */
@media (min-width: 901px) { .tool > .stage { min-height: min(640px, 78vh); } }
