/* Конструктор кухни «7 ВИТРИН» — стиль сайта vsemkuhni.ru (site/static/css/site.css):
   бумага + графит, красный — только главное действие, Onest / JB Mono, почти прямые углы.
   05.10.2026 v0.8 — переписан целиком, имена классов прежние (их строит main.js / aikit.js). */
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 400 600; font-display: swap; src: url(../fonts/Onest-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 400 600; font-display: swap; src: url(../fonts/Onest-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+20BD, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'JB Mono'; font-style: normal; font-weight: 400 500; font-display: swap; src: url(../fonts/JBMono-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'JB Mono'; font-style: normal; font-weight: 400 500; font-display: swap; src: url(../fonts/JBMono-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+20BD, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --paper: #F2EEE7; --paper-2: #E9E3D8; --surface: #FBF9F5; --panel: #FFFFFF;
  --ink: #1A1917; --ink-2: #45423C; --mute: #736D63; --line: rgba(26, 25, 23, .14); --line-2: rgba(26, 25, 23, .08);
  --red: #D6261E; --red-d: #B51E17; --ok: #2F6B4F;
  --warn: #8A5A12; --warn-bg: #F6EBD6; --bad: #A3231B; --bad-bg: #F8E3E0;
  --acc: var(--ink); --acc-2: var(--paper-2);                 /* прежние имена — для aikit/старых правил */
  --sans: "Onest", "Helvetica Neue", Arial, sans-serif; --mono: "JB Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --r: 2px; --top: 60px; --foot: 28px; --lw: 272px; --rw: 340px;
  --sh: 0 1px 2px rgba(26, 25, 23, .06), 0 4px 14px rgba(26, 25, 23, .06);
  font: 14px/1.45 var(--sans); color: var(--ink);
  font-variant-numeric: tabular-nums;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--paper); overflow: hidden; -webkit-font-smoothing: antialiased; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ─── элементы управления ─── */
button { font: inherit; font-size: 13.5px; cursor: pointer; border: 1px solid var(--line); background: var(--panel); color: var(--ink);
  border-radius: var(--r); padding: 0 12px; min-height: 34px; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  transition: border-color .15s, background .15s, color .15s; white-space: nowrap; }
button:hover { border-color: var(--ink); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
button.primary, a.btn.primary { background: var(--red); border-color: var(--red); color: #fff; font-weight: 500; }
button.primary:hover, a.btn.primary:hover { background: var(--red-d); border-color: var(--red-d); }
button.ghost { background: transparent; }
button.danger { color: var(--bad); }
button.ic { width: 34px; padding: 0; }
button:disabled { opacity: .4; cursor: default; }
button:disabled:hover { border-color: var(--line); }
a.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; text-decoration: none; padding: 0 14px; border-radius: var(--r);
  border: 1px solid var(--line); color: var(--ink); font-size: 13.5px; }
select, input[type=number], input[type=text], input[type=search], input[type=tel], textarea {
  font: inherit; font-size: 13.5px; width: 100%; min-height: 34px; padding: 6px 9px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--panel); color: var(--ink); }
select { padding-right: 26px; appearance: none; -webkit-appearance: none;
  background: var(--panel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%23736D63' stroke-width='1.4'/%3E%3C/svg%3E") no-repeat right 8px center / 12px; }
select:hover, input:hover, textarea:hover { border-color: rgba(26, 25, 23, .32); }
textarea { resize: vertical; min-height: 64px; }
input[type=checkbox] { accent-color: var(--ink); width: 15px; height: 15px; }
input[type=range] { accent-color: var(--ink); }
.note { color: var(--mute); font-size: 12.5px; line-height: 1.45; }
.note.warn-note { color: #9a3b2b; } .note.warn-note .chip { margin: 2px 2px 0 0; }   /* v0.14: нестандартная ширина сушки — подсказка с кнопками ширины */
.mt { margin-top: 18px !important; }
/* надпись-раздел, как .eyebrow на сайте */
.eb, .panel h3 { font: 500 10.5px/1.2 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mute); margin: 4px 0 10px; }

/* ─── шапка ─── */
.top > * { flex-shrink: 0; }
.top { position: fixed; inset: 0 0 auto 0; height: var(--top); display: flex; align-items: center; gap: 16px;
  padding: 0 14px 0 18px; background: var(--surface); border-bottom: 1px solid var(--line); z-index: 6; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--mute); text-decoration: none; white-space: nowrap; font-size: 13px; }
.back:hover { color: var(--ink); }
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; color: var(--ink); }
.logo-mark { width: 34px; height: 27px; flex: none; }
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-text b { font: 700 18px/1 var(--sans); letter-spacing: .08em; }
.logo-text small { font: 500 7.6px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--mute); margin-top: 4px; }
.app-name { display: flex; flex-direction: column; line-height: 1.2; padding-left: 14px; margin-left: 4px; border-left: 1px solid var(--line); min-width: 0; }
.app-name b { font-weight: 500; font-size: 14px; white-space: nowrap; }
.app-name small { font: 400 11px/1.3 var(--mono); color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.hist { display: flex; gap: 4px; }
.hist button { border-color: transparent; background: transparent; }
.hist button:hover:not(:disabled) { border-color: var(--line); background: var(--panel); }
.total { margin-left: auto; display: flex; align-items: baseline; gap: 9px; white-space: nowrap; }
.total span { font: 500 10.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.total b { font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
.total small { color: var(--mute); font-size: 12.5px; }
.viewas { display: flex; align-items: center; gap: 8px; padding-left: 16px; border-left: 1px solid var(--line); }
.viewas > span { font: 500 10.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.actions { display: flex; gap: 6px; align-items: center; }
.actions button .md, .actions button .sm { display: none; }

/* сегменты (режим просмотра, простой/расширенный, виды) */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); padding: 2px; gap: 2px; }
.seg button { border: 0; min-height: 28px; padding: 0 10px; background: transparent; color: var(--ink-2); font-size: 12.5px; }
.seg button:hover { background: var(--paper); }
.seg button.on { background: var(--ink); color: var(--paper); }

/* ─── панели ─── */
.panel { position: fixed; top: var(--top); bottom: var(--foot); background: var(--surface); overflow: auto; z-index: 4; padding: 16px 18px 22px;
  scrollbar-width: thin; scrollbar-color: rgba(26,25,23,.2) transparent; }
.panel.left { left: 0; width: var(--lw); border-right: 1px solid var(--line); }
.panel.right { right: 0; width: var(--rw); border-left: 1px solid var(--line); }
body.simple { --lw: 316px; }
body:not(.simple) #simpleBox { display: none; }
body.simple #catalog .adv, body.simple #catalogList, body.simple #projectBox { display: none; }

/* каталог */
.cat-h { position: sticky; top: -16px; margin: -16px -18px 8px; padding: 16px 18px 10px; background: var(--surface); z-index: 1; }
.cat-h h3 { margin-top: 0; }
.search { position: relative; display: block; }
.search svg { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--mute); }
.search input { padding-left: 30px; background: var(--panel); }
.catg { font: 500 10px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mute); margin: 14px 0 6px; display: flex; gap: 8px; align-items: center; }
.catg::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.catg:first-child { margin-top: 2px; }
.card { display: grid; grid-template-columns: 52px 1fr; gap: 11px; align-items: center; padding: 7px 8px 7px 6px; border: 1px solid transparent;
  border-radius: var(--r); cursor: pointer; margin-bottom: 2px; }
.card:hover { background: var(--panel); border-color: var(--line); }
.card .th { width: 52px; height: 52px; display: grid; place-items: center; background: var(--paper); border-radius: var(--r); overflow: hidden; }
.card .th img { width: 100%; height: 100%; object-fit: contain; }
.card .th svg { width: 40px; height: 40px; opacity: .85; }
.card b { display: block; font-size: 13px; font-weight: 500; line-height: 1.3; }
.card small { display: block; color: var(--mute); font-size: 11.5px; margin-top: 2px; }
.card small .pr { color: var(--ink-2); white-space: nowrap; }
.card .mono { font-family: var(--mono); font-size: 10.5px; }
.ndr { display: flex; gap: 3px; align-items: center; margin-top: 5px; font-size: 11px; color: var(--mute); }
.ndr .chip { min-height: 20px; min-width: 22px; padding: 0 5px; font-size: 11px; border-radius: var(--r); }
.cat-empty { color: var(--mute); font-size: 13px; padding: 12px 4px; }

/* правая панель: свойства */
.empty { color: var(--ink); }
.ph { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 2px; }
.ph b { font-size: 16px; font-weight: 600; }
.ph small { font: 400 11px/1 var(--mono); color: var(--mute); letter-spacing: .04em; }
.price-big { font-size: 26px; font-weight: 600; letter-spacing: -.01em; margin: 6px 0 2px; }
.sec { border-top: 1px solid var(--line-2); margin-top: 14px; padding-top: 12px; }
.sec > .eb { margin: 0 0 8px; }
.row { margin: 9px 0; }
.row > label { display: block; font-size: 12px; color: var(--ink-2); margin-bottom: 5px; }
.row > label .note { font-size: 11.5px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.split.s3 { grid-template-columns: 1fr 1fr 1fr; }
.split .row { margin: 6px 0; }
.dimrow { display: grid; grid-template-columns: 18px 1fr 76px; gap: 10px; align-items: center; margin: 5px 0; }
.dimrow span { font: 500 11px/1 var(--mono); color: var(--mute); }
.dimrow input[type=range] { width: 100%; }
.dimrow input[type=number] { font-family: var(--mono); font-size: 12.5px; text-align: right; }
.hpres { display: flex; gap: 4px; margin: 0 0 6px 28px; flex-wrap: wrap; align-items: center; }
.chip { font: inherit; font-size: 12.5px; min-height: 28px; padding: 0 11px; border: 1px solid var(--line); border-radius: 40px; background: var(--panel);
  cursor: pointer; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.chip:hover { border-color: var(--ink); }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.hpres .chip { min-height: 24px; padding: 0 9px; font-family: var(--mono); font-size: 11.5px; }
.brk { width: 100%; border-collapse: collapse; font-size: 12.5px; margin: 10px 0 4px; }
.brk td { padding: 4px 0; border-bottom: 1px solid var(--line-2); color: var(--ink-2); }
.brk td:last-child { text-align: right; font-family: var(--mono); font-size: 12px; color: var(--ink); }
.brk tr.t td { border-bottom: 0; font-weight: 600; padding-top: 7px; color: var(--ink); }
.warn { display: flex; gap: 8px; background: var(--warn-bg); color: var(--warn); border-left: 2px solid currentColor; padding: 7px 10px; font-size: 12.5px; margin: 8px 0; line-height: 1.4; }
.warn.bad { background: var(--bad-bg); color: var(--bad); }
.warn svg.i { width: 15px; height: 15px; margin-top: 1px; }
.btns { display: flex; gap: 6px; margin-top: 14px; flex-wrap: wrap; }
.color { display: flex; gap: 8px; align-items: center; }
.color input { width: 44px; height: 32px; padding: 0; border: 1px solid var(--line); border-radius: var(--r); }
.chk { display: flex; gap: 9px; align-items: center; font-size: 13px; margin: 9px 0; cursor: pointer; }
.chk input { margin: 0; flex: none; }
.chks { display: flex; flex-direction: column; margin: 2px 0 6px; } .chks .chk { margin: 5px 0; }   /* v0.10: подсветка — флажки видов */
.swatches { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.sw { width: 24px; height: 24px; min-height: 0; padding: 0; border-radius: var(--r); border: 1px solid rgba(26,25,23,.18); }
.sw:hover { border-color: var(--ink); }
.sw.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--ink); }
.swatches input[type=color] { width: 30px; height: 24px; padding: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.lays { display: flex; gap: 6px; flex-wrap: wrap; }
.lay { flex-direction: column; gap: 3px; padding: 6px; width: 92px; min-height: 0; }
.lay small { font-size: 10.5px; color: var(--mute); text-align: center; line-height: 1.15; white-space: normal; }
.lay.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink) inset; }
.shelfbar { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.shelfbar button { width: 30px; min-height: 28px; padding: 0; }
.shelfbar b { min-width: 16px; text-align: center; }

/* сводка проекта (правая панель без выделения) */
.sum > span { font: 500 10.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mute); display: block; }
.sum > b { font-size: 30px; font-weight: 600; letter-spacing: -.015em; display: block; margin: 8px 0 2px; }
.sum > small { color: var(--mute); font-size: 12.5px; }
.sum ul { list-style: none; padding: 0; margin: 16px 0; border-top: 1px solid var(--line-2); }
.sum li { padding: 8px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; line-height: 1.4; display: grid; grid-template-columns: 92px 1fr; gap: 10px; }
.sum li i { font: normal 500 10px/1.6 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--mute); }
.sum .btns button { flex: 1; }
.hint-list { margin: 14px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line-2); font-size: 12.5px; color: var(--mute); }
.hint-list p { margin: 0 0 6px; }

/* ─── сцена, панель инструментов, варианты, виды ─── */
#scene { position: fixed; inset: var(--top) 0 var(--foot) 0; }
#scene canvas { display: block; }
#dims { position: fixed; inset: 0; pointer-events: none; z-index: 3; }
.dim { position: absolute; transform: translate(-50%, -50%); background: var(--ink); color: var(--paper);
  padding: 2px 6px; border-radius: var(--r); font: 500 11px/1.3 var(--mono); white-space: nowrap; }
.dim.row { background: var(--ink-2); }
.dim.conf { background: var(--red); padding: 2px 7px; box-shadow: 0 0 0 2px #fff; }

.toolbar { position: fixed; top: calc(var(--top) + 12px); z-index: 5; display: flex; gap: 8px; align-items: center; }
.toolbar > button, .tgroup, .toolbar .seg, .more > button { box-shadow: var(--sh); }
.toolbar button { font-size: 13px; }
.tgroup { display: flex; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.tgroup button { border: 0; border-radius: 0; background: transparent; }
.tgroup button + button { border-left: 1px solid var(--line-2); }
.tgroup button:hover { background: var(--paper); }
.tgroup button.on { background: var(--ink); color: var(--paper); }
.toolbar .sm { display: none; }
.toolbar .conf { background: var(--red); color: #fff; border-color: var(--red); font-weight: 500; }
.toolbar .conf .lg { font-weight: 400; }
.toolbar.tight #btnOpenAll .lg, .toolbar.tight #btnDims .lg { display: none; }
.toolbar.tighter .tgroup .lg, .toolbar.tighter .tgroup #btnAiPhoto .lg, .toolbar.tighter .tgroup .sm { display: none; }
.toolbar.tightest .conf .lg { display: none; }
.more { position: relative; }
.menu { position: absolute; top: calc(100% + 6px); left: 0; min-width: 200px; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: 0 8px 28px rgba(26,25,23,.14); padding: 4px; display: flex; flex-direction: column; z-index: 8; }
.menu button { border: 0; justify-content: flex-start; background: transparent; min-height: 32px; }
.menu button:hover { background: var(--paper); }
.menu button.danger { border-top: 1px solid var(--line-2); border-radius: 0; margin-top: 4px; }

.presets { position: fixed; bottom: calc(var(--foot) + 14px); transform: translateX(-50%); z-index: 4; display: flex;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh); padding: 3px; gap: 3px; }
.preset { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; min-width: 132px; min-height: 0; padding: 6px 12px;
  border: 0; background: transparent; text-align: left; }
.preset span { font: 500 10px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.preset b { font-size: 15px; font-weight: 600; }
.preset small { display: none; }
.preset:hover { background: var(--paper); }
.preset.on { background: var(--ink); color: var(--paper); }
.preset.on span { color: rgba(242,238,231,.7); }

.views { position: fixed; bottom: calc(var(--foot) + 14px); right: calc(var(--rw) + 14px); z-index: 4; display: flex; flex-direction: column; gap: 2px; padding: 2px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh); }
.views button { border: 0; min-height: 30px; min-width: 52px; padding: 0 8px; background: transparent; font: 500 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.views button.ic { width: auto; padding: 0; }
.views button.ic svg { width: 16px; height: 16px; }
.views button:hover { background: var(--paper); }
.views button.on { background: var(--ink); color: var(--paper); }
.views > span { height: 1px; background: var(--line); margin: 2px 4px; }

/* ─── подвал ─── */
.foot { position: fixed; inset: auto 0 0 0; height: var(--foot); display: flex; align-items: center; gap: 18px;
  padding: 0 18px; font: 400 11px/1 var(--mono); color: var(--mute); background: var(--surface); border-top: 1px solid var(--line); z-index: 5; white-space: nowrap; overflow: hidden; }
.foot .sp { flex: 1; }
.foot button { min-height: 20px; padding: 0 6px; border: 0; background: transparent; font: inherit; color: var(--mute); }
.foot button:hover { color: var(--ink); }

/* ─── диалоги ─── */
.modal { position: fixed; inset: 0; background: rgba(26, 25, 23, .42); display: flex; align-items: center; justify-content: center; z-index: 20; }
.dlg { background: var(--surface); border-radius: var(--r); width: min(560px, 94vw); max-height: 90vh; display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(26,25,23,.25); }
.dlg.wide { width: min(1180px, 96vw); }
.dlg.narrow { width: min(440px, 94vw); }
.dlg-h { display: flex; align-items: center; gap: 8px; padding: 14px 16px 14px 20px; border-bottom: 1px solid var(--line); }
.dlg-h > b { font-size: 16px; font-weight: 600; }
.dlg-h .sp { flex: 1; }
.dlg-h .x { border-color: transparent; background: transparent; }
.dlg-h .x:hover { border-color: var(--line); }
.dlg-b { padding: 16px 20px 22px; overflow: auto; }
.dlg-b .row > label { font-size: 12.5px; }
.set-grid { display: grid; grid-template-columns: 1fr 120px; gap: 8px 14px; align-items: center; }
.set-grid label { font-size: 13px; }
.set-grid h4 { grid-column: 1 / -1; margin: 14px 0 0; font: 500 10.5px/1.2 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.keys { display: grid; grid-template-columns: 150px 1fr; gap: 10px 16px; margin: 0; font-size: 13px; }
.keys dt { font: 500 11px/1.5 var(--mono); color: var(--ink); }
.keys dd { margin: 0; color: var(--ink-2); }
.linkrow { display: flex; gap: 8px; } .linkrow input { flex: 1; min-width: 0; font-family: var(--mono); font-size: 12px; }
.socs { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.soc { text-decoration: none; color: var(--ink); padding: 0 14px; min-height: 34px; display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--r); font-size: 13.5px; }
.soc:hover { border-color: var(--ink); }
.rem-mod { font-weight: 600; margin: 6px 0; }
.rem-img { width: 100%; border: 1px solid var(--line); max-height: 220px; object-fit: cover; }
.toast { position: fixed; left: 50%; bottom: calc(var(--foot) + 76px); transform: translateX(-50%); z-index: 30; max-width: calc(100vw - 24px);
  background: var(--ink); color: var(--paper); padding: 11px 16px; border-radius: var(--r); box-shadow: 0 6px 24px rgba(26,25,23,.25); font-size: 13.5px; }
.toast a { color: #fff; margin-left: 4px; white-space: nowrap; text-underline-offset: 3px; }

/* спецификация */
.spec { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-bottom: 14px; }
.spec th { text-align: left; font: 500 10px/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--mute);
  border-bottom: 1px solid var(--ink); padding: 8px 8px 7px; position: sticky; top: -16px; background: var(--surface); }
.spec th.n { text-align: right; }
.spec td { border-bottom: 1px solid var(--line-2); padding: 6px 8px; vertical-align: top; }
.spec td.n { text-align: right; white-space: nowrap; font-family: var(--mono); font-size: 12px; }
.spec td.c { font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); white-space: nowrap; }
.spec tr.g td { background: var(--paper); font-weight: 600; }
.spec tr.sum td { font-weight: 600; border-top: 1px solid var(--ink); border-bottom: 0; padding-top: 9px; font-size: 13.5px; }
.spec tr.sum td.n { font-size: 13.5px; }
.spec .why { color: var(--mute); font-size: 11.5px; }
.spec-h { display: flex; align-items: baseline; gap: 10px; margin: 18px 0 6px; flex-wrap: wrap; }
.spec-h b { font-size: 14.5px; font-weight: 600; }
.spec-meta { display: flex; gap: 24px; flex-wrap: wrap; margin: 0 0 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.spec-meta div { display: flex; flex-direction: column; gap: 4px; }
.spec-meta span { font: 500 10px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.spec-meta b { font-size: 15px; font-weight: 600; }
details { border-bottom: 1px solid var(--line-2); padding: 2px 0 8px; }
details > summary { cursor: pointer; font-size: 13px; color: var(--ink-2); padding: 4px 0; }
details > summary:hover { color: var(--ink); }

/* «Визуализация» — трассировка лучей */
.photo-b { display: flex; flex-direction: column; gap: 8px; }
.photo-wrap canvas { width: 100%; height: auto; display: block; background: var(--paper); }
.photo-bar { height: 3px; background: var(--line); overflow: hidden; }
.photo-bar i { display: block; height: 100%; width: 0; background: var(--ink); transition: width .2s; }
.photo-bar i.run { width: 35%; animation: airun 1.4s ease-in-out infinite; }
@keyframes airun { 0% { margin-left: -35%; } 100% { margin-left: 100%; } }

/* ─── простой режим: мастер ─── */
.wiz .step { border-bottom: 1px solid var(--line-2); padding: 12px 0 14px; }
.wiz .step:first-child { padding-top: 0; }
.wiz .step:last-child { border-bottom: 0; }
.wiz h4 { margin: 0 0 10px; display: flex; align-items: center; gap: 10px; font: 500 10.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.wiz h4 i { font-style: normal; display: inline-grid; place-items: center; min-width: 26px; height: 18px; padding: 0 4px; border: 1px solid currentColor; color: var(--ink); font-size: 10px; letter-spacing: .04em; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips .chip.dis { color: var(--mute); background: var(--paper); cursor: default; }
.chips .dot { display: inline-block; width: 11px; height: 11px; border-radius: 1px; box-shadow: 0 0 0 1px rgba(0,0,0,.2); }
.shapes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.shape { flex-direction: column; gap: 4px; padding: 8px 2px 6px; min-height: 0; }
.shape svg { width: 36px; height: 32px; }
.shape small { font-size: 10.5px; color: var(--ink-2); line-height: 1.15; white-space: nowrap; text-align: center; }
.shape.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink) inset; }
.pchips { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.pchip { flex-direction: column; align-items: flex-start; gap: 2px; padding: 7px 9px; min-height: 0; }
.pchip b { font: 500 10px/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--mute); }
.pchip small { font-size: 13px; font-weight: 600; color: var(--ink); }
.pchip.on { background: var(--ink); border-color: var(--ink); }
.pchip.on b { color: rgba(242,238,231,.7); } .pchip.on small { color: var(--paper); }
.wiz .swatches { margin-top: 10px; }
.wiz .fin-p { display: flex; align-items: baseline; justify-content: space-between; }
.wiz .fin-p span { font: 500 10.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.wiz .fin-p b { font-size: 22px; font-weight: 600; }
.wiz .other { font-size: 12.5px; color: var(--mute); }
.wiz .other a { color: var(--ink-2); text-underline-offset: 3px; }
.aistep { padding-top: 0 !important; }
.aibtn { width: 100%; display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 10px; padding: 10px 12px; text-align: left; min-height: 0;
  background: var(--panel); white-space: normal; }
.aibtn > svg.i { width: 34px; height: 34px; padding: 7px; background: var(--paper); border-radius: var(--r); }
.aibtn span { display: flex; flex-direction: column; gap: 2px; }
.aibtn b { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.aibtn small { color: var(--mute); font-size: 12px; line-height: 1.35; }
.gen .row { margin: 6px 0; } .gen textarea { min-height: 44px; font-size: 13px; }
button.wide { width: 100%; margin-top: 8px; }

/* ИИ: по фото, варианты */
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 150px; border: 1px dashed rgba(26,25,23,.35);
  cursor: pointer; background: var(--paper) center / cover no-repeat; text-align: center; padding: 10px; position: relative; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop.over { border-color: var(--ink); background-color: var(--paper-2); }
.drop.has span, .drop.has small { background: rgba(251,249,245,.92); padding: 2px 8px; }
.drop small { color: var(--mute); }
.aiwait { display: flex; gap: 14px; align-items: center; } .aiwait img { width: 140px; height: 105px; object-fit: cover; }
.aiwait > div { flex: 1; }
.aires { display: grid; grid-template-columns: 170px 1fr; gap: 16px; }
.aires img { width: 170px; object-fit: cover; max-height: 240px; }
.aires h4 { margin: 4px 0 6px; font: 500 10.5px/1.2 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.aires ul { margin: 4px 0 10px; padding-left: 18px; font-size: 13px; line-height: 1.5; }
.aisum { margin: 0 0 8px; color: var(--ink-2); font-size: 13.5px; }
.aiprice { background: var(--paper); padding: 10px 12px; }
.aiprice span { display: block; color: var(--mute); font-size: 12px; } .aiprice b { font-size: 22px; font-weight: 600; }
.aiprice small { display: block; color: var(--mute); font-size: 11.5px; }
.aicard { display: flex; gap: 10px; align-items: flex-start; background: var(--paper); padding: 8px; margin: 0 0 14px; text-align: left; }
.aicard img { width: 74px; height: 74px; object-fit: cover; flex: none; }
.aicard b { font-size: 13px; color: var(--ink); } .aicard ul { margin: 3px 0 2px; padding-left: 15px; font-size: 11.5px; line-height: 1.35; color: var(--ink-2); }
.linkbtn { border: 0; background: none; padding: 0; min-height: 0; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; font-size: 12px; }
.gcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.gcard { border: 1px solid var(--line); background: var(--panel); padding: 12px 14px; display: flex; flex-direction: column; gap: 7px; }
.gcard .gh { display: flex; align-items: center; gap: 8px; } .gcard .gh b { flex: 1; font-size: 14.5px; font-weight: 600; }
.badge { font: 500 10px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; padding: 4px 7px; background: var(--paper); color: var(--ink-2); }
.badge.ai { background: var(--ink); color: var(--paper); }
.gcard .plan { width: 100%; height: auto; max-height: 160px; background: var(--paper); }
.gcard .note { margin: 0; } .gi { font-size: 12px; color: var(--ink-2); }
.gp { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 4px; }
.gp b { font-size: 18px; font-weight: 600; }

/* режимы и роли */
body[data-mode="client"] #btnSettings, body[data-mode="client"] #btnClear { display: none; }
body.site[data-mode="client"] #btnClear { display: flex; }
body.embed .top, body.embed .panel, body.embed .toolbar, body.embed .presets, body.embed .foot, body.embed .views, body.embed #dims { display: none !important; }
body.embed #scene { inset: 0 !important; }

/* ширина 1440 и уже: прячем подписи у второстепенных кнопок */
@media (max-width: 1500px) {
  .actions #btnSpec .lg, .actions #btnShare .lg { display: none; }
  .actions #btnSpec, .actions #btnShare { width: 34px; padding: 0; }
  .app-name small { max-width: 200px; }
}
/* менеджер на сайте: «На сайт» + «Сохранить» + «Отправить» — шапка теснее */
@media (max-width: 1640px) {
  body.site:not(.lite) .app-name { display: none; }
  body.site:not(.lite) .actions #btnCab .lg { display: none; } body.site:not(.lite) .actions #btnCab .md { display: inline; }
  body.site:not(.lite) .total span { display: none; }
}
/* 1280–1400: свободная область сцены ~670 px — у инструментов остаются иконки (подписи — в подсказках) */
@media (min-width: 901px) and (max-width: 1400px) {
  .toolbar .tgroup .lg { display: none; }
  .toolbar .tgroup #btnAiPhoto .lg { display: inline; }
  body.site:not(.lite) .logo-text small, body.site:not(.lite) .viewas > span { display: none; }
  body.site:not(.lite) #btnKp .lg { display: none; } body.site:not(.lite) #btnKp .sm { display: inline; }
  body.site:not(.lite) #btnOrder .lg { display: none; } body.site:not(.lite) #btnOrder .md { display: inline; }
}
@media (max-width: 1250px) {
  .logo-text small { display: none; }
  .viewas > span, .total span { display: none; }
  .toolbar .tgroup .lg { display: none; }
  .actions #btnCab .lg { display: none; } .actions #btnCab .md { display: inline; }
}

/* ─── телефон ─── */
@media (max-width: 900px) {
  :root { --lw: 0px; --rw: 100vw; --foot: 0px; --top: 52px; }
  .foot, .panel.left, .hist, .viewas > span, .app-name, .logo-text { display: none !important; }
  .top { gap: 6px; padding: 0 8px; overflow-x: auto; scrollbar-width: none; }
  .top > * { flex-shrink: 0; }
  .brand { display: none; }
  body:not(.site) .brand { display: flex; } .logo-mark { width: 26px; height: 21px; }
  .viewas { padding-left: 0; border-left: 0; }
  .total { margin-left: auto; } .total span, .total small { display: none; }
  .total b { font-size: 17px; }
  .seg button { padding: 0 7px; font-size: 11.5px; min-height: 26px; }
  .actions { gap: 4px; }
  .actions button { min-height: 32px; padding: 0 9px; font-size: 13px; }
  .actions button.ic, .actions #btnShare, .actions #btnSpec { width: 32px; padding: 0; }
  .actions #btnSpec { display: none; }
  .actions button .lg { display: none; }
  .actions button .sm { display: inline; }
  .actions #btnCab .md { display: none; }
  body.solo .actions button .sm { display: none; }
  body.solo .actions button .md { display: inline; }
  .back span { display: none; }
  .panel.right { top: auto; height: 46vh; left: 0; right: 0; width: auto; bottom: 0; border-left: 0; border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(26,25,23,.08); padding: 14px 14px 22px; }
  #scene { bottom: 46vh; }
  .toolbar { top: calc(var(--top) + 8px); left: 8px !important; right: 8px; flex-wrap: wrap; gap: 6px; }
  .toolbar .lg { display: none; } .toolbar .sm { display: inline; }
  .toolbar #btnDims { display: none; }
  .toolbar .conf .lg { display: none; }
  .seg.ui button { padding: 0 8px; font-size: 12px; }
  .presets { bottom: calc(46vh + 8px); left: 8px !important; transform: none; }
  .preset { min-width: 0; padding: 4px 8px; } .preset b { font-size: 12.5px; white-space: nowrap; } .preset span { font-size: 9px; }
  body.simple .presets { display: none; }
  .views { right: 8px; bottom: calc(46vh + 8px); flex-direction: row; }
  .views button { min-width: 0; }
  .toolbar #btnOpenAll { display: none; }
  .toolbar .tgroup:has(#btnOpenAll) { display: none; }
  .views [data-zoom], .views > span, .views [data-view="front"] { display: none; }
  .toast { bottom: calc(46vh + 56px); font-size: 13px; }
  .aires { grid-template-columns: 1fr; } .aires img { width: 100%; max-height: 200px; }
  .aiwait img { width: 96px; height: 72px; }
  .keys { grid-template-columns: 1fr; gap: 2px 0; } .keys dd { margin-bottom: 8px; }
  .mob { margin-top: 4px; }
}
/* v0.13: короба и трубы в комнате */
.objs { margin: 6px 0 10px; }
.obj { border-top: 1px solid var(--line); padding: 8px 0 2px; }
.obj .oh { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }

/* v0.21: тип проекта — кухня / шкаф / тумба / стол */
.kinds { margin: 0 0 14px; }
.kinds .seg { display: flex; width: 100%; }
.kinds .seg button { flex: 1; min-height: 32px; font-size: 13px; }
.mob .kinds, #propsEmpty > .kinds, #simpleMob > .kinds { margin-bottom: 12px; }
body:not([data-kind="kitchen"]) .presets small { display: none; }
