/* Casa Alicante — editorial UI. Cormorant Garamond (заголовки, крупные цифры) + Geist (интерфейс) + Geist Mono (суммы в таблицах). Все три с кириллицей. */
:root {
  --bg: #f3efe7; --bg2: #ebe5da; --paper: #fbf9f5; --ink: #16140f; --ink2: #57514a; --ink3: #8f877c; --rule: #ddd5c8; --rule2: #c9bfb0;
  --acc: #b4532a; --acc-soft: #f1ddd0; --olive: #5d6a3a; --sea: #2c6e8f; --sea-soft: #dbe9f0; --ok: #3f7a4c; --ok-soft: #dcebdf; --warn: #a3711c; --warn-soft: #f4e8d0; --bad: #9e3a2a;
  --serif: 'Cormorant Garamond', 'Times New Roman', serif; --sans: 'Geist', system-ui, 'Segoe UI', sans-serif; --mono: 'Geist Mono', ui-monospace, Consolas, monospace;
  --r: 14px; --pad: clamp(16px, 3.2vw, 40px); --top-h: 64px;
  font-size: 15px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
button { font: inherit; cursor: pointer; color: inherit; }
a { color: var(--sea); text-decoration: none; text-underline-offset: 3px; } a:hover { text-decoration: underline; }
b { font-weight: 600; }
::selection { background: var(--acc-soft); }
.serif-num { font-family: var(--serif); font-variant-numeric: lining-nums tabular-nums; }

/* ---------- header ---------- */
.top { position: relative; z-index: 20; background: rgba(243, 239, 231, .9); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--rule); padding: 12px var(--pad); display: grid; grid-template-columns: auto 1fr; gap: 10px 28px; align-items: center; }
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.mark { width: 38px; height: 38px; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-family: var(--serif); font-weight: 600; font-size: 17px; letter-spacing: .5px; flex: none; }
.brand h1 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 27px; letter-spacing: -.2px; line-height: 1; }
.brand p { margin: 3px 0 0; color: var(--ink3); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.controls { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; justify-content: flex-end; }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--bg2); flex: none; }
.seg button { border: 0; background: transparent; padding: 7px 13px; border-radius: 999px; color: var(--ink2); font-size: 13px; font-weight: 500; white-space: nowrap; transition: background .15s, color .15s; }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--ink); color: var(--paper); }
.seg.small button { font-size: 12.5px; padding: 6px 11px; }
.seg.small button.on { background: var(--acc); }
.seg.mini { background: transparent; box-shadow: inset 0 0 0 1px var(--rule); }
.seg.mini button { font-size: 12px; padding: 5px 11px; }
/* переключатели вместо системных чекбоксов */
.chk, .switch, .toolbar label { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink2); user-select: none; cursor: pointer; white-space: nowrap; flex: none; }
.chk input, .switch input, .toolbar label input { appearance: none; -webkit-appearance: none; width: 34px; height: 20px; border-radius: 999px; background: var(--rule2); position: relative; margin: 0; cursor: pointer; transition: background .18s; flex: none; }
.chk input::after, .switch input::after, .toolbar label input::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .18s; }
.chk input:checked, .switch input:checked, .toolbar label input:checked { background: var(--ok); }
.chk input:checked::after, .switch input:checked::after, .toolbar label input:checked::after { transform: translateX(14px); }
.chk input:focus-visible, .switch input:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.switch i { display: none; }
.field { display: inline-flex; flex-direction: column; gap: 5px; font-size: 11px; color: var(--ink3); text-transform: uppercase; letter-spacing: .7px; }
.field input, select, input[type=search] { font: inherit; font-size: 14px; color: var(--ink); background: var(--paper); border: 1px solid var(--rule); border-radius: 10px; padding: 9px 12px; text-transform: none; letter-spacing: 0; }
.field input:focus, select:focus, input[type=search]:focus { outline: none; border-color: var(--ink3); }
select { appearance: none; -webkit-appearance: none; padding-right: 30px; background-image: linear-gradient(45deg, transparent 50%, var(--ink2) 50%), linear-gradient(135deg, var(--ink2) 50%, transparent 50%); background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }

/* ---------- hero + KPI ---------- */
.hero { position: relative; margin: 18px var(--pad) 0; border-radius: 22px; overflow: hidden; height: clamp(260px, 36vw, 460px); background: #ccc; }
.hero img { width: 100%; height: 100%; object-fit: cover; object-position: center 62%; display: block; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(14,12,9,.74) 0%, rgba(14,12,9,.3) 50%, rgba(14,12,9,0) 76%); }
.hero-txt { position: absolute; left: clamp(20px, 4vw, 52px); bottom: clamp(20px, 4vw, 48px); z-index: 1; color: #fff; max-width: 640px; }
.hero-txt span { font-size: 11.5px; letter-spacing: 1.8px; text-transform: uppercase; color: #f0d8c6; }
.hero-txt h2 { margin: 10px 0 10px; font-family: var(--serif); font-weight: 500; font-size: clamp(32px, 4.6vw, 60px); line-height: 1; letter-spacing: -.5px; }
.hero-txt p { margin: 0; color: #ebe4d9; font-size: 15px; line-height: 1.5; max-width: 520px; }
.kpis { display: grid; grid-template-columns: repeat(6, 1fr); margin: 26px var(--pad) 6px; border-top: 1px solid var(--ink); }
.kpi { padding: 14px 18px 16px 0; border-right: 1px solid var(--rule); min-width: 0; }
.kpi + .kpi { padding-left: 18px; }
.kpi:last-child { border-right: 0; }
.kpi .l { color: var(--ink3); font-size: 11px; text-transform: uppercase; letter-spacing: .7px; line-height: 1.35; min-height: 30px; }
.kpi .v { font-family: var(--serif); font-weight: 500; font-size: clamp(32px, 2.8vw, 44px); line-height: 1; margin-top: 8px; letter-spacing: -.3px; font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }
.kpi .s { color: var(--ink2); font-size: 12.5px; margin-top: 6px; line-height: 1.4; }
.kpi.main .v { color: var(--acc); }

/* ---------- tabs ---------- */
.tabs { position: sticky; top: 0; z-index: 15; display: flex; gap: 2px; padding: 0 var(--pad); margin-top: 14px; border-bottom: 1px solid var(--rule); background: rgba(243, 239, 231, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { border: 0; background: transparent; padding: 14px 12px 13px; color: var(--ink3); font-weight: 500; font-size: 14px; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .15s; }
.tabs button:hover { color: var(--ink); }
.tabs button.on { color: var(--ink); border-bottom-color: var(--acc); }
main { padding: 26px var(--pad) 80px; }
.tab { display: none; } .tab.on { display: block; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
#tab-plan.on, #tab-3d.on { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 26px; }

/* ---------- plan / 3D ---------- */
.stage { position: relative; border-radius: var(--r); overflow: hidden; background: var(--paper); box-shadow: 0 0 0 1px var(--rule); }
.toolbar { display: flex; align-items: center; gap: 8px 12px; padding: 10px 12px; flex-wrap: wrap; border-bottom: 1px solid var(--rule); background: var(--paper); }
.toolbar button { border: 1px solid var(--rule); background: var(--paper); border-radius: 999px; padding: 6px 12px; font-size: 13px; color: var(--ink); min-width: 34px; white-space: nowrap; flex: none; }
.toolbar button:hover { border-color: var(--ink3); }
.toolbar .seg button { border: 0; }
.toolbar .accent-btn { background: var(--ink); color: var(--paper); border-color: var(--ink); font-weight: 500; }
.toolbar .accent-btn:hover { background: var(--acc); border-color: var(--acc); }
.toolbar .sep { width: 1px; height: 20px; background: var(--rule); flex: none; }
.svgwrap, .glwrap { height: calc(100vh - 230px); min-height: 520px; position: relative; }
.svgwrap svg { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.svgwrap svg.drag { cursor: grabbing; }
.glwrap canvas { display: block; touch-action: none; }
.hint { position: absolute; left: 12px; bottom: 10px; font-size: 11.5px; color: var(--ink3); background: rgba(251,249,245,.88); padding: 4px 10px; border-radius: 999px; pointer-events: none; }
.side { padding: 2px; max-height: calc(100vh - 150px); overflow: auto; position: sticky; top: 114px; align-self: start; }
.side h3 { margin: 0 0 6px; font-family: var(--serif); font-weight: 600; font-size: 27px; line-height: 1.05; letter-spacing: -.2px; }
.muted, .side .muted { color: var(--ink3); font-size: 12.5px; line-height: 1.5; }
.side .big { font-family: var(--serif); font-weight: 500; font-size: 42px; margin: 10px 0 2px; font-variant-numeric: lining-nums tabular-nums; letter-spacing: -.3px; }
.side table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 12px; }
.side td { padding: 8px 0; border-bottom: 1px solid var(--rule); vertical-align: top; line-height: 1.45; }
.side td.n { text-align: right; white-space: nowrap; font-family: var(--mono); font-size: 12.5px; padding-left: 10px; }
.side p button { border: 1px solid var(--rule); background: var(--paper); border-radius: 999px; padding: 7px 13px; font-size: 13px; }
.side .chip { margin: 6px 10px 0 0; }
.legend { display: grid; gap: 0; margin-top: 14px; font-size: 13px; border-top: 1px solid var(--ink); }
.legend div { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 8px 4px; border-bottom: 1px solid var(--rule); }
.legend div:hover { background: var(--bg2); }
.legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.legend span.n { margin-left: auto; font-family: var(--mono); font-size: 12.5px; color: var(--ink2); }
.pl-label { font-size: .34px; fill: var(--ink2); pointer-events: none; font-family: var(--sans); }
.pl-label.room { font-size: .36px; fill: var(--ink); font-weight: 600; }
.pl-label.area { font-size: .28px; fill: var(--ink3); }
.pl-dim { font-size: .3px; fill: var(--ink2); font-family: var(--mono); pointer-events: none; }
.hot { cursor: pointer; transition: opacity .15s; } .hot:hover { opacity: .82; }
.sel { stroke: var(--acc) !important; stroke-width: .12 !important; }

table.zon td:first-child { padding-left: 24px; position: relative; }
.zmark { position: absolute; left: 0; top: 7px; width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; color: #fff; background: var(--ok); }
table.zon tr.no .zmark { background: var(--bad); } table.zon tr.no td.n { color: var(--bad); font-weight: 600; }

/* ---------- build player ---------- */
.bp { position: absolute; right: 14px; top: 62px; bottom: 14px; width: min(410px, calc(100% - 28px)); display: flex; flex-direction: column; gap: 10px; pointer-events: none; z-index: 5; }
.bp[hidden] { display: none; }
.bp-bar, .bp-card { pointer-events: auto; background: rgba(251,249,245,.95); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-radius: 18px; box-shadow: 0 12px 40px rgba(20,16,10,.18), 0 0 0 1px rgba(0,0,0,.05); }
.bp-bar { display: flex; align-items: center; gap: 8px; padding: 8px 10px; }
.bp-btn { border: 0; width: 36px; height: 36px; border-radius: 50%; background: var(--bg2); font-size: 18px; line-height: 1; display: grid; place-items: center; flex: none; }
.bp-btn:hover { background: var(--rule); }
.bp-play { background: var(--acc); color: #fff; font-size: 13px; } .bp-play:hover { background: var(--ink); }
.bp-close { background: transparent; }
.bp-range { flex: 1; accent-color: var(--acc); min-width: 60px; }
.bp-count { font-family: var(--mono); font-size: 12px; color: var(--ink3); }
.bp-card { padding: 18px 20px 20px; overflow: auto; flex: 1; overscroll-behavior: contain; }
.bp-card h3 { font-family: var(--serif); font-weight: 600; font-size: 30px; line-height: 1.02; margin: 10px 0 8px; letter-spacing: -.2px; }
.bp-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.chip { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; text-transform: uppercase; letter-spacing: .7px; color: var(--ink2); }
.chip::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--acc)); }
.bp-meta { font-size: 13px; color: var(--ink2); line-height: 1.5; }
.bp-who { font-size: 13px; color: var(--ink3); margin: 4px 0 14px; line-height: 1.45; }
.bp-text { font-size: 15px; line-height: 1.62; margin: 14px 0; }
.bp-list { padding-left: 20px; margin: 12px 0; font-size: 13.5px; line-height: 1.55; } .bp-list li { margin: 5px 0; } .bp-list li::marker { color: var(--ink3); font-family: var(--mono); font-size: 12px; }
.bp-sub { font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: var(--ink3); margin: 18px 0 4px; }
.tip { font-size: 13px; line-height: 1.5; padding: 7px 0 7px 22px; position: relative; border-bottom: 1px solid var(--rule); }
.tip:last-child { border-bottom: 0; }
.tip::before { content: '€'; position: absolute; left: 3px; top: 6px; font-family: var(--serif); font-weight: 600; color: var(--ok); font-size: 16px; }
.bp-norms { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--rule); font-size: 12.5px; color: var(--ink3); line-height: 1.7; }
.bp-norms a, .bp-norms span { font-family: var(--mono); font-size: 11.5px; }
sup.fn { font-family: var(--mono); font-size: 10px; color: var(--sea); margin-left: 2px; }

/* ---------- editorial typography ---------- */
.prose { max-width: 980px; line-height: 1.6; }
.prose.wide { max-width: none; }
.eyebrow { font-size: 11.5px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--acc); margin-bottom: 10px; font-weight: 500; }
.display, .prose h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(32px, 3.8vw, 50px); line-height: 1.02; letter-spacing: -.4px; margin: 0 0 14px; }
.prose h2 { font-size: clamp(28px, 3vw, 38px); margin-top: 40px; } .prose h2:first-child { margin-top: 0; }
.prose h3 { font-family: var(--serif); font-weight: 600; font-size: 24px; margin: 28px 0 8px; }
.section { font-family: var(--serif); font-weight: 600; font-size: 31px; letter-spacing: -.2px; margin: 48px 0 8px; line-height: 1.05; }
.lede, .prose p { color: var(--ink2); font-size: 15px; line-height: 1.65; max-width: 900px; }
.prose li { color: var(--ink2); margin: 4px 0; }
.callout { border-left: 2px solid var(--acc); background: var(--acc-soft); padding: 14px 18px; border-radius: 0 12px 12px 0; margin: 18px 0 24px; font-size: 14px; line-height: 1.6; max-width: 980px; }
.nowrap { white-space: nowrap; }

/* ---------- таблицы: одна линейка, без карточек внутри ---------- */
table { font-variant-numeric: tabular-nums; }
.ltab, .matrix, table.lt { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ltab th, .matrix th, table.lt th { text-align: left; font-weight: 500; color: var(--ink3); font-size: 11px; text-transform: uppercase; letter-spacing: .7px; padding: 10px 14px 10px 0; border-bottom: 1px solid var(--ink); background: var(--bg); }
.ltab td, .matrix td, table.lt td { padding: 12px 14px 12px 0; border-bottom: 1px solid var(--rule); vertical-align: top; line-height: 1.5; }
.ltab .n, .matrix td, .matrix th, table.lt th.n, table.lt td.n { text-align: right; }
.matrix td:first-child, .matrix th:first-child, .ltab th:first-child { text-align: left; }
.ltab td.n, .matrix td, table.lt td.n { font-family: var(--mono); font-size: 12.5px; white-space: nowrap; }
.matrix td:first-child { font-family: var(--sans); font-size: 13.5px; white-space: normal; }
.ltab tr.tot td, .matrix tr.tot td { font-weight: 600; border-top: 1px solid var(--ink); border-bottom: 0; color: var(--ink); }
.ltab tr.is-crit td:first-child { box-shadow: inset 2px 0 0 var(--ink); padding-left: 12px; }
.ltab tbody tr:hover td, table.lt tbody tr:hover td { background: rgba(235, 229, 218, .45); }
.matrix td.min { color: var(--ok); font-weight: 600; }
.ctab td { text-align: left !important; } .ctab td:nth-child(n+2) { font-family: var(--sans); font-size: 13px; white-space: normal; }
.ctab .src div { margin: 2px 0; }
.tablewrap { overflow-x: auto; }

/* ---------- смета ---------- */
.est-head { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.est-head input[type=search] { flex: 1; min-width: 220px; border-radius: 999px; padding-left: 16px; }
.est-head button { border: 1px solid var(--rule); background: var(--paper); border-radius: 999px; padding: 8px 14px; font-size: 13px; }
.est-head button:hover { border-color: var(--ink3); }
.chap { border-bottom: 1px solid var(--rule); }
.chap > header { display: grid; grid-template-columns: 18px minmax(0, 1fr) repeat(5, 118px); gap: 8px; align-items: baseline; padding: 15px 0; cursor: pointer; }
.chap > header:hover .t { color: var(--acc); }
.chap > header .t { font-family: var(--serif); font-weight: 600; font-size: 22px; letter-spacing: -.1px; transition: color .15s; line-height: 1.15; }
.chap > header .t small { font-family: var(--sans); font-weight: 400; color: var(--ink3); font-size: 11px; margin-left: 8px; text-transform: uppercase; letter-spacing: .6px; }
.chap > header .n { text-align: right; font-family: var(--mono); font-size: 12.5px; color: var(--ink3); }
.chap > header .n.cur { color: var(--ink); font-weight: 600; }
.chap .lines { display: none; padding-bottom: 16px; } .chap.open .lines { display: block; }
.chap .caret { color: var(--ink3); transition: transform .15s; font-size: 12px; } .chap.open .caret { transform: rotate(90deg); }
table.lt td.cur { font-weight: 600; background: rgba(180, 83, 42, .05); }
table.lt tr.gap td:first-child { box-shadow: inset 2px 0 0 var(--acc); padding-left: 10px; }
table.lt tr.fixed td:first-child { box-shadow: inset 2px 0 0 var(--warn); padding-left: 10px; }
.src { color: var(--ink3); font-size: 12px; margin-top: 3px; line-height: 1.45; }
.src a { word-break: break-word; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 500; letter-spacing: .2px; vertical-align: 1px; white-space: nowrap; }
.b-confirmed, .b-found { background: var(--ok-soft); color: var(--ok); } .b-derived { background: var(--sea-soft); color: var(--sea); } .b-estimate, .b-blocked, .b-challenge { background: var(--warn-soft); color: var(--warn); }
.b-gap, .b-gone { background: var(--acc-soft); color: var(--acc); } .b-fix { background: var(--warn-soft); color: var(--warn); } .b-nf { background: var(--bg2); color: var(--ink2); }

/* ---------- сравнение / дыры / карточки-колонки ---------- */
.cards, .delta { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); border-top: 1px solid var(--ink); margin-bottom: 20px; }
.card { padding: 16px 18px 18px 0; border-bottom: 1px solid var(--rule); min-width: 0; }
.card + .card { padding-left: 18px; border-left: 1px solid var(--rule); }
.card h3 { margin: 0 0 10px; font-size: 11.5px; font-weight: 500; text-transform: uppercase; letter-spacing: .7px; color: var(--ink3); }
.card .big { font-family: var(--serif); font-weight: 500; font-size: clamp(30px, 2.8vw, 42px); letter-spacing: -.3px; font-variant-numeric: lining-nums tabular-nums; line-height: 1.02; }
.card p { color: var(--ink2); font-size: 13px; line-height: 1.55; margin: 8px 0 0; }
.chart { margin-top: 38px; }
.chart h3 { font-family: var(--serif); font-weight: 600; font-size: 28px; margin: 0 0 14px; letter-spacing: -.2px; }
.bars { display: grid; gap: 12px; }
.bar { display: grid; grid-template-columns: 210px 1fr 110px; gap: 14px; align-items: center; font-size: 13px; }
.bar .track { height: 16px; background: var(--bg2); border-radius: 999px; overflow: hidden; display: flex; }
.bar .track i { display: block; height: 100%; }
.bar .n { text-align: right; font-family: var(--mono); font-size: 12.5px; }
.legend-row { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 14px 0; font-size: 12.5px; color: var(--ink2); }
.legend-row span { display: inline-flex; align-items: center; gap: 7px; } .legend-row i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.legend-row i.hatch { border-radius: 2px; background: repeating-linear-gradient(45deg, var(--rule2) 0 2px, transparent 2px 4px); box-shadow: inset 0 0 0 1px var(--rule2); }
.gapcard { padding: 16px 0 16px 18px; border-left: 2px solid var(--acc); border-bottom: 1px solid var(--rule); }
.gapcard.fix { border-left-color: var(--warn); }
.gapcard h4 { margin: 0 0 6px; font-size: 15px; font-weight: 600; display: flex; justify-content: space-between; gap: 14px; }
.gapcard h4 .n { font-family: var(--mono); font-size: 13px; color: var(--acc); white-space: nowrap; font-weight: 500; }
.gapcard p { margin: 0; color: var(--ink2); font-size: 13.5px; line-height: 1.6; }

/* ---------- календарь ---------- */
.cal-head { display: flex; justify-content: space-between; gap: 24px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 22px; }
.cal-head > div:first-child { flex: 1 1 560px; }
.cal-ctrl { display: flex; gap: 18px; align-items: flex-end; flex-wrap: wrap; padding-bottom: 14px; }
.gantt { border-top: 1px solid var(--ink); overflow-x: auto; -webkit-overflow-scrolling: touch; }
.g-months { position: relative; height: 32px; margin-left: 300px; min-width: 760px; border-bottom: 1px solid var(--rule); }
.g-months div { position: absolute; top: 0; height: 100%; font-size: 11px; color: var(--ink3); text-transform: uppercase; letter-spacing: .5px; padding: 9px 6px; border-left: 1px solid var(--rule); white-space: nowrap; overflow: hidden; }
.g-body { position: relative; min-width: 1060px; }
.g-off { position: absolute; top: 0; bottom: 0; background: rgba(160,148,132,.16); pointer-events: none; }
.g-offwrap { position: absolute; top: 0; bottom: 0; left: 300px; right: 0; pointer-events: none; }
.g-row { display: grid; grid-template-columns: 300px 1fr; border-bottom: 1px solid var(--rule); min-height: 46px; }
.g-row:hover { background: rgba(235, 229, 218, .4); }
.g-label { padding: 9px 14px 9px 0; font-size: 13px; line-height: 1.3; } .g-label b { font-weight: 500; } .g-label span { display: block; color: var(--ink3); font-size: 11.5px; margin-top: 2px; }
.g-track { position: relative; }
.g-bar { position: absolute; top: 15px; height: 16px; border-radius: 999px; }
.g-bar.office { opacity: .5; }
.g-bar.crit { box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.5px var(--ink); }
.flow { display: flex; align-items: flex-end; gap: 6px; height: 230px; border-bottom: 1px solid var(--ink); padding-top: 24px; overflow-x: auto; }
.f-col { flex: 1; min-width: 36px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.f-bar { width: 100%; background: var(--acc); border-radius: 4px 4px 0 0; position: relative; min-height: 2px; }
.f-bar span { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-family: var(--mono); font-size: 10.5px; color: var(--ink2); white-space: nowrap; }
.f-lab { font-size: 10.5px; color: var(--ink3); text-align: center; padding: 6px 0; line-height: 1.2; }

/* ---------- галерея ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); gap: 24px 20px; }
.gallery figure { margin: 0; cursor: zoom-in; }
.gallery img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; border-radius: var(--r); transition: transform .5s, filter .3s; }
.gallery figure[data-id="plan"] img { object-fit: contain; background: #2b2a27; }
.gallery figure:hover img { transform: scale(1.01); filter: saturate(1.08); }
.gallery figcaption { padding: 10px 2px 0; font-size: 13.5px; color: var(--ink2); line-height: 1.45; }
.hint2 { color: var(--ink3); font-size: 12.5px; margin-top: 18px; }
.lightbox { position: fixed; inset: 0; background: rgba(12,11,9,.95); display: none; align-items: center; justify-content: center; z-index: 50; overflow: hidden; }
.lightbox.on { display: flex; }
.lightbox img { max-width: 94vw; max-height: 86vh; cursor: grab; user-select: none; touch-action: none; }
.lightbox button { position: absolute; top: 12px; right: 18px; font-size: 32px; color: #fff; background: none; border: 0; z-index: 2; }
.lbcap { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; color: #d8d2c8; font-size: 13px; padding: 0 16px; }

/* ---------- адаптив ---------- */
@media (max-width: 1280px) {
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .kpi:nth-child(3) { border-right: 0; } .kpi:nth-child(4) { padding-left: 0; } .kpi:nth-child(n+4) { border-top: 1px solid var(--rule); }
}
@media (max-width: 1100px) {
  :root { --top-h: 108px; }
  .top { grid-template-columns: 1fr; }
  .controls { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--pad) * -1); padding: 0 var(--pad) 2px; }
  .controls::-webkit-scrollbar { display: none; }
  #tab-plan.on, #tab-3d.on { grid-template-columns: 1fr; }
  .side { position: static; max-height: none; }
}
@media (max-width: 720px) {
  :root { font-size: 14px; --top-h: 104px; }
  .brand h1 { font-size: 24px; } .brand p { font-size: 11.5px; }
  .hero { margin-top: 12px; border-radius: 16px; height: 300px; }
  .hero-txt p { display: none; }
  .kpis { grid-template-columns: 1fr 1fr; margin-top: 18px; }
  .kpi, .kpi + .kpi { padding: 12px 10px 12px 0; border-right: 0; border-top: 0; }
  .kpi .l { min-height: 0; }
  .kpi:nth-child(n) { border-top: 1px solid var(--rule); }
  .kpi:nth-child(1), .kpi:nth-child(2) { border-top: 0; }
  .kpi:nth-child(odd) { border-right: 1px solid var(--rule); } .kpi:nth-child(even) { padding-left: 12px; }
  .kpi .v { font-size: 34px; }
  main { padding-top: 20px; }
  .svgwrap, .glwrap { height: 64vh; min-height: 380px; }
  .toolbar { gap: 6px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } .toolbar::-webkit-scrollbar { display: none; }
  .toolbar label { font-size: 12px; }
  .bp { position: fixed; left: 8px; right: 8px; top: auto; bottom: 8px; width: auto; max-height: 56vh; z-index: 40; }
  .bp-card { max-height: calc(56vh - 64px); }
  .bp-card h3 { font-size: 26px; }
  .chap > header { grid-template-columns: 14px minmax(0, 1fr) auto; }
  .chap > header .n { display: none; } .chap > header .n.cur { display: block; }
  .chap > header .t { font-size: 19px; }
  .chap .lines { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table.lt { min-width: 760px; }
  .ltab, .matrix { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .ltab td { min-width: 140px; } .ltab td.n, .ltab td.nowrap { min-width: 0; }
  .bar { grid-template-columns: 1fr auto; gap: 4px 12px; } .bar .track { grid-column: 1 / -1; grid-row: 2; }
  .cards, .delta { grid-template-columns: 1fr 1fr; }
  .card, .card + .card { padding: 14px 10px 14px 0; border-left: 0; }
  .card:nth-child(even) { padding-left: 12px; border-left: 1px solid var(--rule); }
  .g-months { margin-left: 170px; } .g-row { grid-template-columns: 170px 1fr; } .g-offwrap { left: 170px; }
  .g-label { font-size: 12px; }
  .display { font-size: 32px; } .section { font-size: 26px; margin-top: 36px; }
  .gallery { grid-template-columns: 1fr; }
}

/* ---------- гайд стройки ---------- */
.guide { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 40px; align-items: start; }
.gnav { position: sticky; top: 114px; max-height: calc(100vh - 140px); display: flex; flex-direction: column; border-top: 1px solid var(--ink); }
.gnav-h { padding: 12px 0 8px; } .gnav-h .eyebrow { margin: 0; } .gsel { display: none; width: 100%; margin-top: 8px; }
.gnav-l { overflow: auto; flex: 1; scrollbar-width: thin; }
.gnav-i { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; text-align: left; padding: 8px 6px; font-size: 13px; color: var(--ink2); border-bottom: 1px solid var(--rule); line-height: 1.3; }
.gnav-i:hover { background: var(--bg2); color: var(--ink); }
.gnav-i.on { color: var(--ink); font-weight: 600; background: var(--paper); box-shadow: inset 2px 0 0 var(--acc); }
.gnav-i i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.gnav-i span { flex: 1; }
.gnav-i em { font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--ok); }
.gnav-i em.wip { color: var(--ink3); font-family: var(--sans); }
.gnav-f { display: flex; gap: 6px; padding: 10px 0; flex-wrap: wrap; }
.gnav-f button, .g-pn button { border: 1px solid var(--rule); background: var(--paper); border-radius: 999px; padding: 7px 12px; font-size: 12.5px; }
.gnav-f button:hover, .g-pn button:hover { border-color: var(--ink3); }
.gbody { max-width: 980px; min-width: 0; scroll-margin-top: 120px; }
.g-head .display { margin-bottom: 10px; }
.g-meta { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 13.5px; color: var(--ink2); padding: 12px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin-bottom: 20px; }
.g-meta b { font-weight: 500; color: var(--ink3); text-transform: uppercase; font-size: 11px; letter-spacing: .6px; margin-right: 4px; }
.g-shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 14px; margin: 6px 0 22px; }
.g-shots figure { margin: 0; } .g-shots img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 12px; display: block; cursor: zoom-in; }
.g-shots figcaption { font-size: 12.5px; color: var(--ink3); padding: 6px 2px 0; }
.g-sum { font-size: 17px; color: var(--ink); line-height: 1.6; }
.g-steps { border-top: 1px solid var(--ink); }
.g-step { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 4px 14px; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.g-n { font-family: var(--serif); font-weight: 600; font-size: 38px; line-height: .9; color: var(--acc); font-variant-numeric: lining-nums; }
.g-step h4 { margin: 2px 0 6px; font-size: 16px; font-weight: 600; }
.g-step p { margin: 6px 0; color: var(--ink2); font-size: 14px; line-height: 1.62; }
.g-see { background: var(--sea-soft); color: var(--ink) !important; padding: 8px 12px; border-radius: 10px; }
.g-sub { font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: var(--ink3); margin: 12px 0 2px; }
.g-norm { margin-top: 8px; font-family: var(--mono); font-size: 11.5px; color: var(--ink3); }
.gchk { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; font-size: 13.5px; line-height: 1.5; cursor: pointer; border-bottom: 1px dashed var(--rule); }
.gchk:last-child { border-bottom: 0; }
.gchk input { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; border: 1.5px solid var(--rule2); border-radius: 5px; flex: none; margin: 1px 0 0; background: var(--paper); cursor: pointer; display: grid; place-items: center; transition: background .15s, border-color .15s; }
.gchk input:checked { background: var(--ok); border-color: var(--ok); }
.gchk input:checked::after { content: ''; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.gchk input:checked + span { color: var(--ink3); text-decoration: line-through; text-decoration-color: rgba(0,0,0,.25); }
.g-acc td:first-child { min-width: 180px; } .g-acc .gchk { border: 0; padding: 0; }
.g-cheats { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); border-top: 1px solid var(--bad); }
.g-cheat { padding: 14px 16px 14px 0; border-bottom: 1px solid var(--rule); }
.g-cheat h4 { margin: 0 0 6px; font-size: 14.5px; color: var(--bad); font-weight: 600; }
.g-cheat p { margin: 4px 0; font-size: 13px; color: var(--ink2); line-height: 1.55; }
.g-list li, .g-seq li, .g-steps-s li { margin: 6px 0; color: var(--ink2); font-size: 14px; line-height: 1.55; }
.g-src { font-size: 12.5px; } .g-src a { word-break: break-word; }
.g-pn { display: flex; justify-content: space-between; gap: 12px; margin: 40px 0 10px; padding-top: 18px; border-top: 1px solid var(--ink); }
.bp-guide { margin-top: 14px; width: 100%; border: 0; background: var(--ink); color: var(--paper); border-radius: 12px; padding: 11px 14px; font-size: 13px; text-align: left; }
.bp-guide:hover { background: var(--acc); }
@media (max-width: 1100px) {
  .guide { grid-template-columns: 1fr; gap: 10px; }
  .gnav { position: sticky; top: 98px; z-index: 6; background: var(--bg); max-height: none; border-top: 0; }
  .gnav-l, .gnav-f { display: none; } .gsel { display: block; }
}
@media (max-width: 720px) {
  .g-step { grid-template-columns: 34px minmax(0, 1fr); } .g-n { font-size: 28px; }
  .g-sum { font-size: 15.5px; }
  .g-acc td:first-child { min-width: 150px; }
}
@media print {
  .top, .tabs, .hero, .kpis, .gnav, .g-pn, #vstats { display: none !important; }
  .guide { display: block; } main { padding: 0; } .tab { display: none !important; } #tab-guide { display: block !important; }
  .g-step, .g-cheat, tr { break-inside: avoid; }
}

/* ---------- интерьер ---------- */
.i-concept { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 36px; align-items: end; margin-bottom: 30px; }
.i-pal { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0; border-top: 1px solid var(--ink); }
.i-sw { display: flex; flex-direction: column; gap: 2px; padding: 12px 12px 12px 0; border-bottom: 1px solid var(--rule); color: var(--ink); font-size: 12px; text-decoration: none !important; }
.i-sw i { height: 54px; border-radius: 10px; margin-bottom: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.i-sw b { font-weight: 600; font-size: 13px; } .i-sw span { font-family: var(--mono); font-size: 11px; color: var(--ink2); }
.i-sw span.muted { font-family: var(--sans); color: var(--ink3); }
.i-tour { scroll-margin-top: 110px; }
.i-rooms { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 4px; background: var(--ink); border-radius: 999px; margin-bottom: 16px; }
.i-rooms::-webkit-scrollbar { display: none; }
.i-rooms button { border: 0; background: transparent; color: #cfc7bb; padding: 8px 14px; border-radius: 999px; font-size: 13px; white-space: nowrap; flex: none; }
.i-rooms button:hover { color: #fff; } .i-rooms button.on { background: var(--paper); color: var(--ink); font-weight: 500; }
.i-main { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 24px; align-items: start; }
.i-view { margin: 0; position: relative; } .i-view img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 18px; display: block; cursor: zoom-in; }
.i-ph { aspect-ratio: 16/9; border-radius: 18px; background: repeating-linear-gradient(45deg, var(--bg2) 0 12px, var(--bg) 12px 24px); display: grid; place-items: center; color: var(--ink3); }
.i-view figcaption { font-size: 13px; color: var(--ink3); padding: 8px 2px; }
.i-dots { position: absolute; left: 50%; bottom: 46px; transform: translateX(-50%); display: flex; gap: 6px; background: rgba(0,0,0,.35); padding: 6px 8px; border-radius: 999px; }
.i-dots button { width: 9px; height: 9px; border-radius: 50%; border: 0; background: rgba(255,255,255,.55); padding: 0; } .i-dots button.on { background: #fff; }
.i-side { max-height: calc(100vh - 150px); overflow: auto; position: sticky; top: 114px; }
.i-side h3 { font-family: var(--serif); font-weight: 600; font-size: 30px; margin: 0 0 6px; line-height: 1.05; }
.i-total { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); margin: 12px 0; font-size: 12px; color: var(--ink3); text-transform: uppercase; letter-spacing: .6px; }
.i-total b { font-family: var(--serif); font-size: 30px; color: var(--acc); font-weight: 500; letter-spacing: 0; text-transform: none; }
.i-fin { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-bottom: 8px; } .i-fin td { padding: 6px 0; border-bottom: 1px solid var(--rule); vertical-align: top; color: var(--ink2); } .i-fin td:first-child { color: var(--ink3); width: 74px; }
.i-it { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: 13px; }
.i-it > i { width: 14px; height: 14px; border-radius: 50%; margin-top: 3px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); }
.i-it a { color: var(--ink); } .i-it a:hover { color: var(--acc); }
.i-it .n { font-family: var(--mono); font-size: 12.5px; white-space: nowrap; }
.i-up { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 7px 0; border-bottom: 1px solid var(--rule); } .i-up b { font-family: var(--mono); font-weight: 500; font-size: 12.5px; white-space: nowrap; }
.linkish { border: 0; background: none; padding: 0; color: var(--sea); font-size: inherit; text-align: left; }
@media (max-width: 1100px) { .i-concept, .i-main { grid-template-columns: 1fr; } .i-side { position: static; max-height: none; } }
@media (max-width: 720px) { .i-rooms { border-radius: 14px; } .i-view img, .i-ph { border-radius: 12px; } }
.bp-shots { display: flex; gap: 6px; overflow-x: auto; margin: 4px 0 10px; scrollbar-width: thin; }
.bp-shots img { height: 120px; aspect-ratio: 16/9; object-fit: cover; border-radius: 10px; cursor: zoom-in; flex: none; }
.bp-shots img:only-child { width: 100%; height: auto; }

/* ---------- навигация: разделы + подвкладки ---------- */
.tabs button { font-size: 15px; padding: 15px 14px 14px; }
.subtabs { position: sticky; top: 50px; z-index: 14; display: flex; gap: 6px; padding: 10px var(--pad); background: rgba(243,239,231,.94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--rule); overflow-x: auto; scrollbar-width: none; }
.subtabs[hidden] { display: none; } .subtabs::-webkit-scrollbar { display: none; }
.subtabs button { border: 1px solid var(--rule); background: var(--paper); border-radius: 999px; padding: 7px 14px; font-size: 13px; color: var(--ink2); white-space: nowrap; flex: none; }
.subtabs button:hover { color: var(--ink); border-color: var(--ink3); }
.subtabs button.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.hdr-total { display: inline-flex; align-items: baseline; gap: 8px; padding-left: 12px; border-left: 1px solid var(--rule); white-space: nowrap; flex: none; }
.hdr-total span { font-size: 11px; color: var(--ink3); text-transform: uppercase; letter-spacing: .6px; }
.hdr-total b { font-family: var(--serif); font-size: 24px; font-weight: 600; color: var(--acc); }
#tab-overview .hero { margin: 0; } #tab-overview .kpis { margin: 26px 0 6px; }
.ov-cards .card .big { color: var(--ink); } .ov-cards .card:first-child .big { color: var(--acc); }
.ov-steps { counter-reset: s; list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--ink); }
.ov-steps li { counter-increment: s; position: relative; padding: 16px 0 16px 56px; border-bottom: 1px solid var(--rule); font-size: 14.5px; line-height: 1.6; color: var(--ink2); }
.ov-steps li::before { content: counter(s); position: absolute; left: 0; top: 10px; font-family: var(--serif); font-weight: 600; font-size: 36px; color: var(--acc); line-height: 1; }
.ov-steps b { color: var(--ink); } .ov-steps .linkish { margin-left: 6px; }
.ov-map { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); border-top: 1px solid var(--ink); }
.ov-map > div { padding: 16px 18px 18px 0; border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.ov-map > div + div { padding-left: 18px; border-left: 1px solid var(--rule); }
.ov-map h4 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 24px; } .ov-map p { margin: 0 0 4px; color: var(--ink3); font-size: 13px; }
.ov-map .linkish { font-size: 14px; }
.ld-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); border-top: 1px solid var(--ink); margin-bottom: 10px; }
.ld-card { padding: 14px 16px 16px 0; border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.ld-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; } .ld-top b { font-size: 15px; }
.ld-price { font-family: var(--serif); font-size: 32px; font-weight: 500; line-height: 1.05; }
.ld-meta { color: var(--ink3); font-size: 12.5px; } .ld-sum { margin-top: 4px; color: var(--ink2); } .ld-sum b { color: var(--ink); }
@media (max-width: 1100px) { .hdr-total { border-left: 0; padding-left: 0; } }
@media (max-width: 720px) { .tabs button { font-size: 14px; padding: 13px 10px 12px; } .ov-map > div + div { border-left: 0; padding-left: 0; } .ov-steps li { padding-left: 42px; } .ov-steps li::before { font-size: 28px; } }

/* ---------- прогулка 360° ---------- */
#i-walk { margin-bottom: 34px; scroll-margin-top: 110px; }
.pano-view { position: relative; height: min(72vh, 760px); min-height: 380px; border-radius: 18px; overflow: hidden; background: #1b1a17; user-select: none; }
.pano-view canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; } .pano-view canvas:active { cursor: grabbing; }
.pano-view:fullscreen { border-radius: 0; height: 100vh; }
.pano-hot { position: absolute; inset: 0; pointer-events: none; }
.pano-arrow { position: absolute; left: 0; top: 0; pointer-events: auto; border: 0; background: rgba(251,249,245,.92); color: var(--ink); border-radius: 999px; padding: 6px 12px 6px 6px; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; box-shadow: 0 6px 22px rgba(0,0,0,.25); white-space: nowrap; }
.pano-arrow i { width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-style: normal; font-size: 13px; transform: rotate(-90deg); }
.pano-arrow:hover { background: #fff; } .pano-arrow:hover i { background: var(--acc); }
.pano-fade { position: absolute; inset: 0; background: #1b1a17; opacity: 0; transition: opacity .25s; pointer-events: none; } .pano-fade.on { opacity: .85; transition: none; }
.pano-title { position: absolute; left: 16px; top: 14px; background: rgba(22,20,15,.6); color: #fff; padding: 8px 14px; border-radius: 999px; font-size: 14px; backdrop-filter: blur(8px); }
.pano-title b { font-family: var(--serif); font-weight: 600; font-size: 20px; }
.pano-help { position: absolute; left: 16px; bottom: 14px; color: rgba(255,255,255,.8); font-size: 12px; background: rgba(22,20,15,.45); padding: 5px 10px; border-radius: 999px; }
.pano-fs { position: absolute; right: 14px; top: 14px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(251,249,245,.9); font-size: 17px; }
.pano-map { position: absolute; right: 14px; bottom: 14px; width: min(300px, 42%); background: rgba(251,249,245,.12); border-radius: 12px; }
.pano-map .pm-n { fill: #fff; stroke: #16140f; stroke-width: .1; cursor: pointer; } .pano-map .pm-n:hover { fill: var(--acc-soft); } .pano-map .pm-n.on { fill: var(--acc); }
@media (max-width: 720px) { .pano-view { height: 62vh; border-radius: 12px; } .pano-help { display: none; } .pano-map { width: 46%; } .pano-arrow span { display: none; } .pano-arrow { padding: 6px; } }

/* ---------- выбор комнаты: план + зоны ---------- */
.ip { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 22px; align-items: start; margin-bottom: 18px; padding: 16px; background: var(--paper); border-radius: 18px; box-shadow: 0 0 0 1px var(--rule); }
.ip-plan { width: 100%; display: block; }
.ip-house { fill: none; stroke: var(--ink); stroke-width: .22; }
.ip-room rect { fill: #f3efe7; stroke: #c9bfb0; stroke-width: .05; transition: fill .15s; }
.ip-room text { fill: var(--ink2); font-family: var(--sans); pointer-events: none; }
.ip-room:not(.off) { cursor: pointer; }
.ip-room:not(.off):hover rect { fill: var(--acc-soft); }
.ip-room.on rect { fill: var(--acc); stroke: var(--acc); } .ip-room.on text { fill: #fff; font-weight: 600; }
.ip-room.off rect { fill: #ebe5da; } .ip-room.off text { fill: var(--ink3); }
.ip-side { font-size: .3px; fill: var(--ink3); font-family: var(--sans); letter-spacing: .02px; }
.ip-list { display: grid; gap: 12px; max-height: 360px; overflow: auto; padding-right: 4px; }
.ip-zt { font-size: 10.5px; text-transform: uppercase; letter-spacing: .8px; color: var(--ink3); margin-bottom: 4px; }
.ip-zone { display: flex; flex-wrap: wrap; gap: 6px; }
.ip-btn { border: 1px solid var(--rule); background: var(--bg); border-radius: 12px; padding: 7px 11px; display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left; transition: border-color .15s, background .15s; }
.ip-btn span { font-size: 13px; font-weight: 500; color: var(--ink); }
.ip-btn em { font-style: normal; font-size: 11px; color: var(--ink3); font-family: var(--mono); }
.ip-btn:hover { border-color: var(--ink3); background: var(--paper); }
.ip-btn.on { background: var(--ink); border-color: var(--ink); } .ip-btn.on span { color: var(--paper); } .ip-btn.on em { color: #cfc7bb; }
@media (max-width: 1100px) { .ip { grid-template-columns: 1fr; } .ip-list { max-height: none; } }
@media (max-width: 720px) { .ip { padding: 10px; border-radius: 14px; } .ip-zone { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } .ip-btn { flex: none; } }
.sys-toggles { display: inline-flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.sys-toggles label i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
/* режим инженерной системы на плане: план приглушён, система на первом плане */
#planwrap.sys-mode svg > g > g:not([display]) , #planwrap.sys-mode .hot { opacity: 1; }
#planwrap.sys-mode svg > g > g:nth-child(-n+4) { opacity: .4; filter: grayscale(.7); } /* участок, мощение, двор, дом */
#planwrap.sys-mode svg > g > g:nth-child(5), #planwrap.sys-mode svg > g > g:nth-child(6) { display: none; } /* мебель, СЭС */
.sys-seg button { display: inline-flex; align-items: center; gap: 6px; }
.sys-seg button i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.sys-line { opacity: .95; } .sys-node { cursor: help; }
.sys-node:hover { filter: drop-shadow(0 0 .08px #000); }
table.sys-legend { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 10px; }
table.sys-legend td { padding: 6px 4px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
table.sys-legend td:first-child { width: 34px; } table.sys-legend td.n { text-align: right; font-family: var(--mono); font-size: 12px; white-space: nowrap; }
table.sys-legend td.mono { font-family: var(--mono); font-size: 12px; width: 40px; }
.sys-h { font-size: 11px; text-transform: uppercase; letter-spacing: .7px; color: var(--ink3); margin: 18px 0 2px; font-weight: 500; }
/* закупки */
table.pu td.pu-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 10px; min-width: 300px; }
.pu-links a, .pu-links .pu-none { font-size: 12px; line-height: 1.35; display: flex; gap: 6px; align-items: baseline; color: var(--sea); word-break: break-word; }
.pu-links a.on { font-weight: 700; color: var(--ink); }
.pu-links em { font-style: normal; font-family: var(--mono); font-size: 10px; color: var(--ink3); min-width: 26px; text-transform: uppercase; }
.pu-links .pu-none { color: var(--ink3); }
@media (max-width: 720px) { table.pu td.pu-links { grid-template-columns: 1fr; min-width: 200px; } }

/* ---------- Разбор цены ---------- */
.bd-tree { border-top: 1px solid var(--ink); margin-top: 6px; }
.bd-g > header, .bd-ch > header { display: grid; grid-template-columns: 18px 1fr 160px 48px 96px 120px; align-items: center; gap: 10px; padding: 13px 4px; border-bottom: 1px solid var(--rule); cursor: pointer; }
.bd-g > header:hover, .bd-ch > header:hover, .bd-line:hover, .bd-dch:hover { background: var(--paper); }
.bd-g > header .t { font-family: var(--serif, inherit); font-size: 19px; }
.bd-g header small, .bd-ch header small { margin-left: 10px; color: var(--ink3); font-size: 12px; font-family: var(--sans, inherit); }
.bd-ch > header { grid-template-columns: 18px 1fr 120px; padding: 9px 4px 9px 28px; font-size: 14px; background: rgba(255,255,255,.25); }
.bd-ch .dot { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 8px; }
.caret { display: inline-block; color: var(--ink3); transition: transform .15s; font-size: 11px; }
.bd-g.open > header .caret, .bd-ch.open > header .caret, .bd-line.open .caret, .bd-dch.open .caret { transform: rotate(90deg); }
.bd-bar { height: 8px; background: var(--bg2); border-radius: 4px; overflow: hidden; }
.bd-bar i { display: block; height: 100%; background: var(--acc); border-radius: 4px; }
.bd-lt { margin: 0 0 6px 46px; width: calc(100% - 46px); }
.bd-line { cursor: pointer; }
.bd-line td { padding: 8px 6px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.bd-detail { margin: 10px 0 4px 18px; padding: 12px 14px; background: var(--paper); border-left: 3px solid var(--acc); border-radius: 0 8px 8px 0; font-size: 13.5px; line-height: 1.55; cursor: default; }
.bd-detail .src { margin-top: 5px; }
.bd-total { display: flex; justify-content: space-between; padding: 14px 4px; border-top: 2px solid var(--ink); font-size: 18px; }
table.bd-sw tr.sec td { padding-top: 18px; font-size: 11px; letter-spacing: .8px; text-transform: uppercase; color: var(--ink3); border-bottom: 1px solid var(--rule2); }
table.bd-sw tr.cur td { background: var(--acc-soft); }
table.bd-sw td .src { max-width: 640px; }
.up { color: var(--bad); } .down { color: var(--ok); }
button.mini { border: 1px solid var(--rule2); background: var(--paper); border-radius: 999px; padding: 4px 11px; font-size: 12px; color: var(--ink2); cursor: pointer; white-space: nowrap; }
button.mini:hover { border-color: var(--ink); color: var(--ink); }
.bd-cmpbar { display: grid; grid-template-columns: 1fr 1.4fr; gap: 16px; margin: 10px 0 16px; }
.bd-side { background: var(--paper); border: 1px solid var(--rule); border-radius: 12px; padding: 16px 18px; }
.bd-side .big { font-size: 28px; margin: 8px 0; font-family: var(--serif, inherit); }
.bd-side .big span { font-size: 16px; margin-left: 8px; font-family: var(--sans, inherit); }
.bd-sel { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.bd-sel select { font: inherit; font-size: 13px; text-transform: none; letter-spacing: 0; padding: 6px 8px; border: 1px solid var(--rule2); border-radius: 8px; background: #fff; color: var(--ink); max-width: 230px; }
.bd-diff .bd-dch { cursor: pointer; background: rgba(255,255,255,.35); }
.bd-diff .bd-dl td:first-child { padding-left: 34px; }
.chk.dis { opacity: .45; }
@media (max-width: 760px) {
  .bd-g > header { grid-template-columns: 16px 1fr 90px; } .bd-g > header .bd-bar, .bd-g > header .n:nth-of-type(2), .bd-g > header .n:nth-of-type(3) { display: none; }
  .bd-cmpbar { grid-template-columns: 1fr; } .bd-lt { margin-left: 8px; width: calc(100% - 8px); }
}
#crew .seg-l { align-self: center; padding: 0 6px 0 10px; font-size: 12px; color: var(--ink3); }
#crew button[disabled] { opacity: .35; cursor: not-allowed; }

/* ---------- Построить или купить ---------- */
.bb-ctrl { display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: flex-end; margin: 14px 0 18px; padding: 14px 16px; background: var(--paper); border: 1px solid var(--rule); border-radius: 12px; }
.bb-ctrl select, .bb-ctrl input[type=number] { font: inherit; font-size: 13px; text-transform: none; letter-spacing: 0; padding: 6px 8px; border: 1px solid var(--rule2); border-radius: 8px; background: #fff; color: var(--ink); max-width: 420px; }
.bb-ctrl input[type=number] { width: 130px; }
.bb-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.bb-col { border: 1px solid var(--rule); border-radius: 12px; padding: 16px 18px; background: rgba(255,255,255,.35); }
.bb-col.win { border-color: var(--ok); box-shadow: inset 0 3px 0 var(--ok); }
.bb-col h3 { margin: 0 0 8px; font-family: var(--serif, inherit); font-size: 22px; font-weight: 500; }
.bb-all tr { cursor: pointer; } .bb-all tr.cur td { background: var(--acc-soft); }
@media (max-width: 760px) { .bb-cols { grid-template-columns: 1fr; } }
.bb-upg { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 8px 14px; margin: 8px 0 18px; }
.bb-upg label { display: grid; grid-template-columns: 20px 1fr auto; gap: 10px; align-items: start; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 10px; background: var(--paper); cursor: pointer; }
.bb-upg label.dis { opacity: .5; cursor: default; }
.bb-upg small { display: block; color: var(--ink3); font-size: 12px; margin-top: 2px; }
.bb-upg em { font-style: normal; font-weight: 600; white-space: nowrap; }
.bb-upg-tot { grid-column: 1 / -1; text-align: right; font-size: 15px; }
.bb-tricks { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px 16px; margin: 8px 0 18px; }
.bb-tricks > div { padding: 12px 14px; border-left: 3px solid var(--acc); background: var(--paper); border-radius: 0 10px 10px 0; }
.bb-tricks b { display: block; margin-bottom: 4px; }
.bb-tricks p { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--ink2); }
.bd-eco details { margin: 4px 0 10px; }
.bd-eco summary { cursor: pointer; color: var(--acc); font-weight: 600; padding: 6px 0; }
.bd-eco table { margin-top: 8px; }
/* участки: карточки без наезда бейджа и без горизонтальной прокрутки; кнопка «Рассчитать» */
.ld-card { min-width: 0; padding-right: 16px; }
.ld-top { flex-wrap: wrap; justify-content: flex-start; align-items: center; gap: 4px 10px; }
.ld-top b { min-width: 0; overflow-wrap: anywhere; }
.ld-top .badge { white-space: nowrap; }
.ld-link, .ld-card a { overflow-wrap: anywhere; word-break: break-word; }
.ld-calc { align-self: flex-start; margin-top: 6px; border: 1px solid var(--acc); background: var(--paper); color: var(--acc); border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 600; cursor: pointer; }
.ld-calc:hover { background: var(--acc); color: #fff; }
td .ld-calc { display: block; margin: 6px auto 0; font-size: 12px; padding: 4px 10px; }
/* «Ваш расчёт» */
.bb-basket { border: 1px solid var(--ink); border-radius: 14px; padding: 16px 18px; margin: 14px 0 18px; background: var(--paper); }
.bb-basket h3 { margin: 0 0 10px; font-family: var(--serif, inherit); font-weight: 500; font-size: 22px; }
.bb-plot { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 10px 0 12px; border-bottom: 1px solid var(--rule); }
.bb-plot .ok { color: var(--ok); } .bb-plot .bad { color: var(--bad); }
.bb-sel { display: flex; flex-wrap: wrap; gap: 12px 16px; padding: 12px 0; }
.bb-sel select { font: inherit; font-size: 13px; text-transform: none; letter-spacing: 0; padding: 6px 8px; border: 1px solid var(--rule2); border-radius: 8px; background: #fff; color: var(--ink); }
.bb-sum { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding-top: 10px; border-top: 1px solid var(--rule); font-size: 14px; }
.bb-sum b { text-align: right; } .bb-sum .t { font-size: 17px; padding-top: 4px; border-top: 1px solid var(--ink); }
@media (max-width: 760px) { .bb-plot { flex-direction: column; } .bb-sel { flex-direction: column; } .bb-sel .field, .bb-sel select { width: 100%; } td .ld-calc { min-height: 40px; } .ld-calc { min-height: 44px; } }
@media (min-width: 761px) {
  #land table.matrix td:last-child, #land table.matrix th:last-child { max-width: 300px; overflow-wrap: anywhere; }
  #land table.matrix { display: block; max-width: 100%; overflow-x: auto; }
}
/* ---------- Девелопер ---------- */
.dv-pl tr.sec td { padding-top: 16px; font-size: 11px; letter-spacing: .8px; text-transform: uppercase; color: var(--ink3); border-bottom: 1px solid var(--rule2); }
.dv-pl tr.tot td { font-weight: 700; border-top: 1px solid var(--ink); }
.dv-sens td.neg { color: var(--bad); font-weight: 700; }
.callout.warn { border-left-color: var(--warn); background: var(--warn-soft); }
.dv-checks { list-style: none; padding: 0; margin: 4px 0 16px; display: grid; gap: 6px; }
.dv-checks li { padding: 8px 12px; border-radius: 10px; background: var(--paper); border: 1px solid var(--rule); font-size: 14px; }
.dv-checks li.ok b { color: var(--ok); } .dv-checks li.no { border-color: var(--bad); } .dv-checks li.no b { color: var(--bad); }
