:root {
  /* Земля и поверхности — холодный серый камень, разделение тоном, без рамок и теней */
  --ground: #e8eae6;
  --ground-2: #dfe2dd;
  --surface: #f8f9f6;
  --card: #f8f9f6;
  --ink: #141615;
  --text: #141615;
  --muted: #535955;
  --line: #cfd3cc;

  /* Акцент — цвет оранжевого филамента, только для главного действия и цены */
  --accent: #f37321;
  --accent-hover: #f5884a;
  --accent-ink: #141615;
  --accent-soft: #fde3d1;
  --accent-text: #a04508;

  /* Стол принтера */
  --stage: #1d201f;
  --stage-2: #2a2e2c;
  --stage-3: #363b38;
  --stage-ink: #eef0ec;
  --stage-muted: #a3aaa4;

  --ok: #1d7a3e;
  --err: #b8261b;
  --warn-bg: #fff0c2;
  --warn-text: #5e4100;

  --pill: 999px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 16px/1.5 var(--font);
  font-feature-settings: "tnum" 1;
  caret-color: var(--accent);
}

::selection { background: var(--accent); color: var(--accent-ink); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

a { color: inherit; text-underline-offset: 3px; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }

/* ---------- Шапка ---------- */

.top { background: var(--ground); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; letter-spacing: -0.01em; text-decoration: none; }
.logo-mark { width: 28px; height: 28px; color: var(--accent); flex: none; }
.logo-img { height: 26px; width: auto; display: block; flex: none; }
.nav { display: flex; gap: 24px; font-weight: 500; }
.nav a { text-decoration: none; color: var(--muted); transition: color .15s; }
.nav a:hover { color: var(--ink); }
.nav { align-items: center; }
.nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.nav .nav-cta { color: var(--accent-ink); text-decoration: none; }
.menu-btn { display: none; border: 0; background: var(--ground-2); color: var(--ink); font: inherit; font-weight: 600; border-radius: var(--pill); padding: 8px 16px; cursor: pointer; }
.tag { color: var(--muted); font-size: 15px; }

.intro { padding-top: 28px; padding-bottom: 28px; }
.intro h1 { margin: 0; font-size: 2.75rem; line-height: 1.05; letter-spacing: -0.035em; font-weight: 700; max-width: 16ch; text-wrap: balance; }
.intro p { margin: 12px 0 0; font-size: 18px; color: var(--muted); max-width: 52ch; }

/* ---------- Рабочая область ---------- */

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  padding-bottom: 96px;
}
.col-left { min-width: 0; }
.col-right { position: sticky; top: 16px; min-width: 0; }
.stage.over { outline: 3px solid var(--accent); outline-offset: -3px; }

.stage {
  position: relative;
  height: min(68vh, 620px);
  min-height: 420px;
  background-color: var(--stage);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14'%3E%3Ccircle cx='1.5' cy='1.5' r='1.1' fill='%23ffffff' fill-opacity='.07'/%3E%3C/svg%3E");
  color: var(--stage-ink);
  overflow: hidden;
}
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

.drop {
  position: absolute; inset: 0;
  display: grid; place-items: center; text-align: center;
  padding: 24px;
  cursor: pointer;
  transition: background-color .2s var(--ease-out);
}
.drop.over { background-color: var(--stage-2); }
.drop.over .drop-icon { transform: translateY(-6px); color: var(--accent); }
.drop-icon { width: 48px; height: 48px; color: var(--stage-muted); margin: 0 auto 18px; transition: transform .25s var(--ease-out), color .2s; }
.drop-title { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.drop-or { color: var(--stage-muted); margin: 10px 0 16px; }
.drop-note { color: var(--stage-muted); font-size: 14px; margin-top: 22px; max-width: 34ch; margin-left: auto; margin-right: auto; }

.stage-bar {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 16px;
  padding: 16px 20px;
  pointer-events: none;
  background: linear-gradient(to top, rgba(29,32,31,.85), rgba(29,32,31,0));
}
.bed-label { font-size: 14px; color: var(--stage-muted); }
.bed-label b { color: var(--stage-ink); font-weight: 500; }
.stage-price { text-align: right; }
.stage-price b { display: block; font-size: 28px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.stage-price span { font-size: 14px; color: var(--stage-muted); }

.stage-actions { position: absolute; top: 14px; right: 14px; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* Шкала углов нависания — это шкала данных, поэтому здесь градиент уместен */
.legend { position: absolute; top: 16px; left: 18px; width: 150px; font-size: 13px; color: var(--stage-muted); pointer-events: none; }
.legend i { display: block; height: 8px; margin: 6px 0 4px; border-radius: var(--pill); background: linear-gradient(to right, #ffd23f, #f37321 45%, #d7263d); }
.legend-scale { display: flex; justify-content: space-between; }

.loading {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(29,32,31,.72); font-weight: 500; color: var(--stage-ink);
}

.facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px 20px;
  margin: 0; padding: 18px 0 0;
}
.facts div { min-width: 0; }
.facts dt { font-size: 13px; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.facts select { margin-top: 2px; }
.fit { margin: 12px 0 0; font-size: 15px; color: var(--muted); }
.fit b { color: var(--ink); font-weight: 600; }

.warn {
  margin-top: 14px; padding: 12px 16px;
  background: var(--warn-bg); color: var(--warn-text); font-size: 15px;
}

/* ---------- Панель параметров ---------- */

.panel { background: var(--surface); padding: 28px; }
.panel h2, .card h2 { margin: 0 0 22px; font-size: 20px; line-height: 1.25; letter-spacing: -0.01em; font-weight: 600; }

.field { margin-bottom: 24px; }
.field:last-child { margin-bottom: 0; }
.field-label { display: flex; justify-content: space-between; align-items: baseline; font-weight: 600; margin-bottom: 10px; }
.field-label output { font-weight: 500; color: var(--muted); }
.field small, .hint-line { display: block; color: var(--muted); margin-top: 8px; font-size: 14px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 0; background: var(--ground); color: var(--ink);
  border-radius: var(--pill); padding: 9px 16px; min-height: 40px;
  font: inherit; font-size: 15px; font-weight: 500; cursor: pointer;
  transition: background-color .15s, color .15s, transform .12s var(--ease-out);
}
.chip:hover { background: var(--ground-2); }
.chip:active { transform: scale(.96); }
.chip.active { background: var(--ink); color: var(--surface); }

.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.seg-2 { grid-template-columns: repeat(2, 1fr); }
.seg .chip { border-radius: 14px; padding: 10px 8px; line-height: 1.25; }
.seg .chip small { display: block; margin: 2px 0 0; font-size: 13px; font-weight: 400; color: var(--muted); }
.seg .chip.active small { color: #b9bfba; }

.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch {
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer; padding: 0;
  border: 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,.14);
  outline: 2px solid transparent; outline-offset: 3px;
  transition: outline-color .15s, transform .12s var(--ease-out);
}
.swatch:active { transform: scale(.92); }
.swatch.active { outline-color: var(--ink); }

input[type=range] { width: 100%; accent-color: var(--ink); height: 28px; }

.row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.qty { display: inline-flex; align-items: center; background: var(--ground); border-radius: var(--pill); }
.qty button {
  width: 42px; height: 42px; border: 0; background: none; border-radius: 50%;
  font: inherit; font-size: 20px; cursor: pointer; color: var(--ink);
  transition: background-color .15s, transform .12s var(--ease-out);
}
.qty button:hover { background: var(--ground-2); }
.qty button:active { transform: scale(.9); }
.qty input { width: 52px; height: 42px; border: 0; background: none; text-align: center; font: inherit; font-weight: 600; color: var(--ink); -moz-appearance: textfield; }
.qty input::-webkit-inner-spin-button, .qty input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; }
.check input { width: 20px; height: 20px; accent-color: var(--ink); margin: 0; }

select {
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; width: 100%;
}

/* ---------- Цена и заказ — тёмное поле, как стол ---------- */

/* ---------- Настройки выбранного файла ---------- */

.part-panel { margin-top: 20px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.panel-head h2 { margin: 0; overflow-wrap: anywhere; min-width: 0; }
.mode { width: 260px; max-width: 100%; }
.mode .chip { padding: 8px 10px; min-height: 38px; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.settings-grid .field { margin-bottom: 24px; }
.settings-grid .wide { grid-column: 1 / -1; }
.seg-4 { grid-template-columns: repeat(4, 1fr); }
.steppers { display: flex; flex-wrap: wrap; gap: 14px 18px; }
.stepper-field { display: grid; gap: 6px; font-weight: 600; font-size: 15px; }
.panel-foot { display: flex; justify-content: flex-end; }
.debug {
  margin: 18px 0 0; padding: 12px 14px; font-size: 13px; line-height: 1.6;
  background: var(--warn-bg); color: var(--warn-text);
}

/* ---------- Список файлов ---------- */

.files-panel .panel-head { margin-bottom: 14px; }
.count { color: var(--muted); font-size: 15px; }
.file-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.file-item {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px;
  background: var(--ground); padding: 6px 6px 6px 0;
  transition: background-color .15s;
}
.file-item:hover { background: var(--ground-2); }
.file-item.active { background: var(--ink); color: var(--surface); }
.file-main {
  display: flex; align-items: center; gap: 10px; min-width: 0; text-align: left;
  border: 0; background: none; color: inherit; font: inherit; padding: 6px 4px 6px 12px; cursor: pointer;
}
.dot { width: 14px; height: 14px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.18); }
.file-text { display: grid; min-width: 0; }
.file-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-meta { font-size: 13px; color: var(--muted); line-height: 1.35; }
.file-item.active .file-meta { color: #b9bfba; }
.small-qty { background: var(--surface); }
.small-qty button { width: 32px; height: 32px; font-size: 16px; }
.small-qty input { width: 38px; height: 32px; font-size: 14px; }
.file-item.active .small-qty { background: var(--stage-3); }
.file-item.active .small-qty button, .file-item.active .small-qty input { color: var(--stage-ink); }
.file-item .del { border: 0; background: none; color: inherit; opacity: .55; font-size: 20px; width: 32px; height: 32px; cursor: pointer; border-radius: 50%; }
.file-item .del:hover { opacity: 1; }
.empty-files { color: var(--muted); margin: 0 0 14px; font-size: 15px; }
.add-files { width: 100%; margin-top: 12px; }

.tier-hint { display: block; color: var(--stage-muted); font-size: 14px; margin-top: 8px; }
.urgency-field { margin: 22px 0 0; }
.on-dark-seg .chip { background: var(--stage-2); color: var(--stage-ink); }
.on-dark-seg .chip:hover { background: var(--stage-3); }
.on-dark-seg .chip.active { background: var(--stage-ink); color: var(--ink); }
.on-dark-seg .chip small { color: var(--stage-muted); }
.on-dark-seg .chip.active small { color: var(--muted); }

.price-card { background: var(--stage); color: var(--stage-ink); padding: 28px; margin-top: 20px; }
.price-label { color: var(--stage-muted); font-size: 15px; }
.price { font-size: 3.25rem; font-weight: 700; line-height: 1.05; letter-spacing: -0.035em; margin: 6px 0 4px; }
.range { color: var(--stage-muted); font-size: 15px; min-height: 22px; }

.hint { color: var(--stage-muted); font-size: 14px; margin: 14px 0 0; }

.order { margin-top: 28px; padding-top: 28px; display: grid; gap: 10px; background: none; position: relative; }
.order h3 { margin: 0 0 4px; font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.order input, .order textarea {
  font: inherit; color: var(--stage-ink); background: var(--stage-2);
  border: 1px solid transparent; border-radius: 12px; padding: 12px 14px; width: 100%;
  transition: border-color .15s, background-color .15s;
}
.order input::placeholder, .order textarea::placeholder, .dark-input::placeholder { color: #9ba29c; }
.order input:hover, .order textarea:hover { background: var(--stage-3); }
.order input:focus, .order textarea:focus { outline: none; border-color: var(--accent); }
.order textarea { resize: vertical; min-height: 84px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }

.status { font-size: 15px; color: #8fdca6; min-height: 22px; }
.status.error { color: #ff9b8c; }
.progress { height: 6px; border-radius: var(--pill); background: var(--stage-2); overflow: hidden; }
.progress div { height: 100%; width: 0; background: var(--accent); transition: width .2s; }

/* ---------- Кнопки ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: var(--pill); padding: 12px 22px; min-height: 46px;
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
  background: var(--accent); color: var(--accent-ink);
  transition: background-color .15s, transform .12s var(--ease-out), opacity .15s;
}
.btn:hover { background: var(--accent-hover); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: progress; transform: none; }
.ghost { background: var(--ground); color: var(--ink); }
.ghost:hover { background: var(--ground-2); }
.btn.on-dark.ghost { background: var(--stage-2); color: var(--stage-ink); }
.btn.on-dark.ghost:hover { background: var(--stage-3); }
.small { padding: 8px 14px; min-height: 36px; font-size: 14px; }

.foot { background: var(--ink); color: var(--stage-ink); }
.foot .wrap { padding-top: 72px; padding-bottom: 40px; }
.foot-name { font-size: clamp(3.5rem, 11vw, 9rem); font-weight: 700; letter-spacing: -0.045em; line-height: .9; margin: 0; display: flex; align-items: center; gap: .25em; flex-wrap: wrap; }
.foot-mark { height: .62em; width: auto; flex: none; }
.foot-line { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 28px; color: var(--stage-muted); font-size: 15px; }
.foot-line a { color: var(--stage-ink); }
.foot-cols { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px 48px; margin-top: 36px; color: var(--stage-muted); font-size: 15px; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 10px 28px; }
.foot-nav a, .foot-tg { color: var(--stage-ink); text-decoration: none; }
.foot-nav a:hover, .foot-tg:hover { text-decoration: underline; }
.foot-contact { display: grid; gap: 8px; max-width: 46ch; }

/* ---------- Страницы сайта ---------- */

.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 40px; align-items: center; padding-top: 40px; padding-bottom: 96px; }
.hero h1 { margin: 0; font-size: clamp(2.4rem, 5.2vw, 4.4rem); line-height: 1.02; letter-spacing: -0.04em; font-weight: 700; max-width: 12ch; text-wrap: balance; }
.hero-lead { margin: 22px 0 0; font-size: 19px; max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.nowrap { white-space: nowrap; }
.hero .btn.ghost, .page-head .btn.ghost { background: var(--ground-2); }
.hero .btn.ghost:hover, .page-head .btn.ghost:hover { background: #d3d7d1; }
.hero-facts { list-style: none; margin: 36px 0 0; padding: 0; display: grid; gap: 10px; font-size: 16px; color: var(--muted); }
.hero-facts b { color: var(--ink); font-weight: 600; }
.hero-art { height: auto; min-height: 0; aspect-ratio: 1 / 1; }
.hero-3d { position: absolute; inset: 0; }
/* Вертикальный жест на логотипе прокручивает страницу, горизонтальный — вращает модель */
.hero-3d canvas { touch-action: pan-y; cursor: grab; animation: hero-in .8s var(--ease-out) both; }
.hero-3d canvas:active { cursor: grabbing; }
.hero-3d-fallback { position: absolute; left: 15%; top: 50%; width: 70%; height: auto; transform: translateY(-50%); }
.hero-3d.ready .hero-3d-fallback { display: none; }
@keyframes hero-in { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }

.band { background: var(--surface); }
.band > .wrap { padding-top: 96px; padding-bottom: 96px; }
.section-title { margin: 0 0 32px; font-size: clamp(1.9rem, 3.4vw, 2.75rem); line-height: 1.08; letter-spacing: -0.03em; font-weight: 700; max-width: 18ch; }
.section-lead { margin: -14px 0 0; font-size: 18px; max-width: 44ch; }
.section-lead.min-order { margin-top: 14px; font-size: 16px; font-weight: 600; }

.services { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 0; }
.service { padding: 28px 28px 30px 0; display: grid; align-content: start; gap: 12px; }
.service + .service { padding-left: 28px; box-shadow: inset 8px 0 0 var(--ground); }
.service:first-child h3 { font-size: 30px; }
.service h3 { margin: 0; font-size: 24px; line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; }
.service p { margin: 0; font-size: 17px; }
.service-link { font-weight: 600; color: var(--accent-text); text-decoration: none; margin-top: 4px; }
.service-link:hover { text-decoration: underline; }

.how-block { padding-top: 96px; padding-bottom: 96px; }
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.steps li { font-size: 17px; padding-top: 18px; border-top: 6px solid var(--ink); }
.steps li:last-child { border-top-color: var(--accent); }
.steps b { display: block; font-size: 19px; margin-bottom: 6px; }

.materials-block { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 40px; }
.materials { margin: 0; display: grid; gap: 4px; }
.material { display: grid; grid-template-columns: 140px 1fr; gap: 20px; padding: 16px 0; background: none; }
.material + .material { box-shadow: 0 -4px 0 var(--ground); }
.material dt { font-weight: 700; font-size: 19px; }
.material dd { margin: 0; font-size: 16px; }

.faq-block { padding-top: 96px; padding-bottom: 96px; }
.faq { display: grid; gap: 8px; max-width: 820px; }
.faq details { background: var(--surface); padding: 0 22px; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 18px; padding: 18px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 400; font-size: 24px; line-height: 1; color: var(--accent-text); transition: transform .2s var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 20px; font-size: 16px; max-width: 64ch; }

.cta-band { background: var(--stage); color: var(--stage-ink); }
.cta-inner { padding-top: 88px; padding-bottom: 88px; display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 24px; }
.cta-inner h2 { margin: 0; font-size: clamp(1.9rem, 3.6vw, 3rem); line-height: 1.05; letter-spacing: -0.03em; max-width: 16ch; }
.cta-inner .hero-actions { margin-top: 0; }

/* Страница сканирования и заявки */
.page-head { padding-top: 40px; padding-bottom: 56px; max-width: 880px; }
.page-head h1 { margin: 0; font-size: clamp(2.3rem, 4.6vw, 3.8rem); line-height: 1.04; letter-spacing: -0.04em; font-weight: 700; text-wrap: balance; }
.page-head p { margin: 18px 0 0; font-size: 19px; max-width: 52ch; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; }
.uses { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.uses li { font-size: 17px; }
.uses b { display: block; font-size: 20px; margin-bottom: 4px; }
.note-box { background: var(--warn-bg); color: var(--warn-text); padding: 20px 22px; font-size: 16px; }

.request-wrap { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: 32px; align-items: start; padding-bottom: 96px; }
.request-form { background: var(--surface); padding: 32px; display: grid; gap: 22px; }
.request-form .field { margin: 0; }
.request-form input[type=text], .request-form textarea, .light-input {
  font: inherit; color: var(--ink); background: var(--ground); border: 1px solid transparent; border-radius: 12px;
  padding: 12px 14px; width: 100%;
}
.request-form input:focus, .request-form textarea:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.request-form textarea { min-height: 120px; resize: vertical; }
.request-form ::placeholder { color: #5c625d; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.media-drop {
  display: grid; place-items: center; text-align: center; gap: 6px; padding: 28px 18px; cursor: pointer;
  background: var(--ground); border-radius: 14px; transition: background-color .15s;
}
.media-drop:hover, .media-drop.over { background: var(--ground-2); }
.media-drop b { font-size: 17px; }
.media-drop span { color: var(--muted); font-size: 14px; }
.media-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); gap: 10px; }
.media-item { position: relative; background: var(--ground); border-radius: 12px; overflow: hidden; aspect-ratio: 1; }
.media-item img, .media-item video { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-item .media-name { position: absolute; left: 0; right: 0; bottom: 0; padding: 4px 8px; font-size: 12px; color: #fff; background: rgba(20,22,21,.72); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-item .media-file { display: grid; place-items: center; height: 100%; font-weight: 700; color: var(--muted); }
.media-item .media-del { position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(20,22,21,.75); color: #fff; font-size: 18px; cursor: pointer; }
.media-item.too-big { outline: 3px solid var(--err); outline-offset: -3px; }
.media-total { font-size: 14px; color: var(--muted); margin-top: 8px; }
.form-status { font-size: 15px; min-height: 22px; color: var(--ok); }
.form-status.error { color: var(--err); }
.request-aside { display: grid; gap: 16px; position: sticky; top: 16px; }
.request-aside .panel { padding: 24px; }
.request-aside h2 { font-size: 20px; margin: 0 0 10px; }
.request-aside p, .request-aside li { font-size: 15px; }
.request-aside ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.request-done { background: var(--surface); padding: 32px; display: grid; gap: 12px; justify-items: start; }
.request-done h2 { margin: 0; }
.request-done .done-mark { background: var(--accent); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.order-how.light { color: var(--muted); }

.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--stage-muted); cursor: pointer; line-height: 1.45; }
.consent input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--accent); }
.consent a { color: var(--stage-ink); }
.consent.light { color: var(--muted); }
.consent.light a { color: var(--accent-text); }
.company-box { display: grid; gap: 10px; padding: 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.04); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
.company-note { font-size: 13px; color: var(--stage-muted); }
.company-note.error { color: #ff9b8a; }
.turnstile-box:empty { display: none; }

.legal { max-width: 820px; padding-top: 40px; padding-bottom: 96px; }
.legal h1 { margin: 0; font-size: clamp(2.1rem, 4vw, 3rem); letter-spacing: -0.035em; line-height: 1.08; }
.legal-meta { color: var(--muted); margin: 10px 0 32px; }
.legal h2 { font-size: 21px; margin: 36px 0 10px; letter-spacing: -0.01em; }
.legal p, .legal li { font-size: 17px; max-width: 70ch; }
.legal ul { padding-left: 22px; display: grid; gap: 6px; }
.todo { background: var(--warn-bg); color: var(--warn-text); padding: 0 6px; border-radius: 4px; font-weight: 600; }

.foot-legal { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 32px; font-size: 14px; color: var(--stage-muted); }
.foot-legal a { color: var(--stage-muted); }
.foot-legal a:hover { color: var(--stage-ink); }
.light-progress { background: var(--ground); }

/* ---------- Фотографии ---------- */
.credits { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 12px; }
.credits li { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; align-items: center; background: var(--surface); padding: 12px; font-size: 15px; overflow-wrap: anywhere; }
.credits img { display: block; width: 120px; height: 80px; object-fit: cover; }
.service-photo { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; margin-bottom: 8px; background: var(--ground); }

.wrap.gallery-block { padding-top: 96px; padding-bottom: 72px; }
.gallery { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.tile { margin: 0; grid-column: span 2; background: var(--surface); display: grid; grid-template-rows: auto 1fr; }
.tile-wide { grid-column: span 3; }
.tile img { display: block; width: 100%; height: 300px; object-fit: cover; background: var(--ground); }
.tile figcaption { padding: 16px 20px 20px; font-size: 16px; }
.tile figcaption b { display: block; font-size: 19px; margin-bottom: 4px; }
.photo-note { margin: 16px 0 0; font-size: 14px; color: var(--muted); }
.photo-note a { color: inherit; }

.photo-band { position: relative; background: var(--stage); color: var(--stage-ink); overflow: hidden; }
.photo-band-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.5; }
.photo-band::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--stage) 0%, rgba(29, 32, 31, 0.75) 45%, rgba(29, 32, 31, 0.1) 100%); }
.wrap.photo-band-inner { position: relative; z-index: 1; padding-top: 112px; padding-bottom: 112px; display: grid; gap: 18px; justify-items: start; }
.photo-band-inner h2 { margin: 0; font-size: clamp(2.2rem, 4.6vw, 3.6rem); line-height: 1.02; letter-spacing: -0.04em; }
.photo-band-inner p { margin: 0; font-size: 18px; max-width: 44ch; }

.wrap.biz-teaser { padding-top: 96px; padding-bottom: 32px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.biz-teaser img, .wide-photo { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; background: var(--ground); }
.biz-teaser .section-lead { margin-top: -14px; }

.page-photo { display: block; width: 100%; height: auto; aspect-ratio: 16 / 7; object-fit: cover; background: var(--ground); }
.split-photo { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; background: var(--ground); }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.card { background: var(--surface); padding: 24px; }
.card h3 { margin: 0 0 8px; font-size: 20px; letter-spacing: -0.01em; }
.card p { margin: 0; font-size: 16px; }
.tiers-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tiers-list li { background: var(--surface); padding: 24px; border-top: 6px solid var(--ink); }
.tiers-list li:last-child { border-top-color: var(--accent); }
.tiers-list b { display: block; font-size: 22px; margin-bottom: 6px; }

@media (max-width: 900px) {
  .wrap.gallery-block { padding-top: 64px; padding-bottom: 48px; }
  .gallery { grid-template-columns: 1fr; }
  .tile, .tile-wide { grid-column: auto; }
  .tile img { height: auto; aspect-ratio: 3 / 2; }
  .wrap.photo-band-inner { padding-top: 72px; padding-bottom: 72px; }
  .photo-band::after { background: linear-gradient(0deg, var(--stage) 10%, rgba(29, 32, 31, 0.7) 100%); }
  .wrap.biz-teaser { grid-template-columns: 1fr; gap: 24px; padding-top: 64px; }
  .page-photo { aspect-ratio: 4 / 3; }
  .cards, .tiers-list { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 16px; padding-bottom: 64px; gap: 28px; }
  .hero-art { order: -1; aspect-ratio: 4 / 3; }
  .hero-lead { font-size: 17px; }
  .band > .wrap, .how-block, .faq-block { padding-top: 64px; padding-bottom: 64px; }
  .services { grid-template-columns: 1fr; }
  .service, .service + .service { padding: 22px 0; box-shadow: none; }
  .service + .service { box-shadow: 0 -6px 0 var(--ground); }
  .service:first-child h3 { font-size: 26px; }
  .steps { grid-template-columns: 1fr; gap: 20px; }
  .materials-block, .split, .request-wrap { grid-template-columns: 1fr; gap: 28px; }
  .material { grid-template-columns: 1fr; gap: 4px; }
  .request-form { padding: 20px; }
  .two-col { grid-template-columns: 1fr; }
  .request-aside { position: static; }
  .cta-inner { padding-top: 64px; padding-bottom: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-3d canvas { animation: none; }
}

/* ---------- Калькулятор: статусы, доставка, заявка ---------- */

.part-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; flex: 1 1 260px; }
.file-icon { width: 22px; height: 22px; flex: none; color: var(--ink); }
.file-item.active .file-icon { color: var(--surface); }
.file-icon-doc { display: grid; place-items: center; border-radius: 6px; background: var(--warn-bg); color: var(--warn-text); font-weight: 700; font-size: 13px; }
.file-meta { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.file-status { color: var(--warn-text); font-weight: 500; }
.file-item.active .file-status { color: #ffd88a; }
div.file-main { cursor: default; }
.chip-more { background: none; box-shadow: inset 0 0 0 1px var(--line); }
.swatch-more {
  width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer; padding: 0;
  background: var(--ground); color: var(--ink); font: inherit; font-size: 13px; font-weight: 600;
}
.swatch-more:hover { background: var(--ground-2); }
.panel-foot { align-items: center; gap: 12px; flex-wrap: wrap; }
.apply-note { margin: 0; font-size: 14px; color: var(--muted); }
.link-btn { border: 0; background: none; padding: 0; font: inherit; font-weight: 600; color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.stage-hint { display: block; font-size: 12px; color: var(--stage-muted); margin-top: 2px; }

.price-lines { margin: 14px 0 0; display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; font-size: 15px; }
.price-lines dt { color: var(--stage-muted); }
.price-lines dd { margin: 0; text-align: right; }
.manual-note { margin: 10px 0 0; font-size: 14px; color: #ffd88a; }

.delivery-field { margin: 22px 0 0; }
.cdek-box { display: grid; gap: 10px; margin-top: 10px; }
.dark-input {
  font: inherit; color: var(--stage-ink); background: var(--stage-2);
  border: 1px solid transparent; border-radius: 12px; padding: 11px 14px; width: 100%;
}
.dark-input:hover { background: var(--stage-3); }
.dark-input:focus { outline: none; border-color: var(--accent); }
select.dark-input { appearance: auto; }
.combo { position: relative; }
.suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 5;
  list-style: none; margin: 0; padding: 6px; background: var(--stage-3); border-radius: 12px;
  box-shadow: 0 12px 28px rgba(0,0,0,.35); max-height: 260px; overflow: auto;
}
.suggest li { padding: 9px 10px; border-radius: 8px; cursor: pointer; font-size: 15px; }
.suggest li:hover, .suggest li.active { background: var(--stage-2); }
.suggest li.empty { color: var(--stage-muted); cursor: default; }
.tariffs { grid-template-columns: repeat(2, 1fr); }
.tariffs:empty { display: none; }
.sub-field { display: grid; gap: 6px; font-size: 14px; color: var(--stage-muted); }
.delivery-note { color: var(--stage-muted); font-size: 14px; min-height: 0; }
.delivery-note:empty { display: none; }

.order-how { margin: 0; font-size: 14px; color: var(--stage-muted); }
.order-done { margin-top: 28px; display: grid; gap: 10px; justify-items: start; }
.order-done:focus { outline: none; }
.order-done h3 { margin: 0; font-size: 22px; }
.order-done p { margin: 0; color: var(--stage-muted); }
.done-mark { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); }

/* ---------- Нижняя панель на телефоне ---------- */

.mobile-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: none; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: var(--stage); color: var(--stage-ink);
  transform: translateY(110%); transition: transform .3s var(--ease-out);
}
.mobile-bar.show { transform: none; }
.mobile-bar b { font-size: 22px; letter-spacing: -0.02em; display: block; line-height: 1.1; }
.mobile-bar span { font-size: 13px; color: var(--stage-muted); }

/* ---------- Карточки страницы настроек ---------- */

.card { background: var(--surface); padding: 24px; }

[hidden] { display: none !important; }

@media (max-width: 900px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .workspace { grid-template-columns: 1fr; gap: 16px; padding-bottom: 72px; }
  /* На телефоне колонки «рассыпаются» в один поток: стол → файлы → настройки → заказ */
  .col-left, .col-right { display: contents; }
  .workspace .stage { order: 1; }
  .files-panel { order: 2; }
  .info, #warn { order: 3; }
  .part-panel { order: 4; margin-top: 0; }
  .price-card { order: 5; }
  .settings-grid { grid-template-columns: 1fr; }
  .seg-4 { grid-template-columns: repeat(2, 1fr); }
  .mode { width: 100%; }
  .workspace .stage { height: 360px; min-height: 0; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stage-bar { padding: 12px 14px; }
  .legend { top: 60px; left: 14px; }
  .bed-label { font-size: 13px; max-width: 55%; }
  .intro h1 { font-size: 2.1rem; }
  .intro p { font-size: 16px; }
  .panel, .price-card { padding: 20px; }
  .price-card { margin-top: 0; }
  .price { font-size: 2.6rem; }
  .mobile-bar { display: flex; }
  .nav .hide-sm { display: none; }
  .stage-price b { font-size: 22px; }
  .drop-title { font-size: 22px; }

  /* Меню: на узком экране — кнопка «Меню», разделы списком под шапкой */
  .menu-btn { display: inline-block; }
  .top-row { position: relative; }
  .top .nav { display: none; }
  .top.open .nav {
    display: grid; gap: 4px; position: absolute; top: 100%; left: 0; right: 0; z-index: 20;
    background: var(--surface); padding: 12px 16px 16px; box-shadow: 0 14px 30px rgba(0,0,0,.12);
  }
  .top.open .nav a { padding: 10px 0; font-size: 17px; color: var(--ink); }
  .top.open .nav .nav-cta { justify-self: start; padding: 12px 22px; margin-top: 6px; }

  /* Пальцу нужны цели покрупнее */
  .small-qty button { width: 40px; height: 40px; }
  .small-qty input { height: 40px; }
  .file-item .del { width: 40px; height: 40px; }
  .file-item { grid-template-columns: minmax(0, 1fr) auto auto; }
  .tariffs { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
  .mobile-bar { transition: none; }
}
