/* ВудСтрой — конструктор дома. Опирается на общие стили конструктора окна (tools.css: .cfg, .fs, .seg, .range). */
.hc__fail{padding:40px;background:var(--snow);border-radius:var(--r-img);font-size:18px}
.hc__grid{grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:48px}
.hc__grid>*{min-width:0}
.hc__form{grid-template-columns:minmax(0,1fr)}
.hc__form>*{min-width:0}
.hc__stage{top:92px}

/* ---------- объёмная модель ---------- */
.hc__view{position:relative;border-radius:var(--r-img);overflow:hidden;aspect-ratio:4/3;max-height:62vh;width:100%;
  background:linear-gradient(180deg,#c9dae3 0%,#e6ecea 36%,#f2f1ea 52%,#ebece2 72%,#e2e5d7 100%)}
.hc__canvas{position:absolute;inset:0}
.hc__canvas canvas{display:block;width:100%;height:100%;cursor:grab;touch-action:pan-y;outline:none}
.hc__canvas canvas:active{cursor:grabbing}
.hc__loading{position:absolute;inset:0;display:grid;place-items:center;margin:0;padding:24px;text-align:center;font:400 13px var(--f-mono);letter-spacing:.04em;color:var(--ink-2)}
.hc__view.is-ready .hc__loading{display:none}
.hc__view.is-failed{aspect-ratio:auto;min-height:120px}
.hc__view.is-failed .hc__bar{display:none}
.hc__bar{position:absolute;left:12px;right:12px;display:flex;justify-content:space-between;gap:8px;pointer-events:none}
.hc__bar--top{top:12px}
.hc__bar--bottom{bottom:12px}
.hc__chips{display:flex;flex-wrap:wrap;gap:4px;pointer-events:auto}
.hc__chips button{height:34px;padding:0 13px;border-radius:999px;border:1px solid rgba(19,32,26,.18);background:rgba(251,250,246,.86);backdrop-filter:blur(6px);
  font:400 13px/1 var(--f-sans);cursor:pointer;transition:background .2s,color .2s,border-color .2s}
.hc__chips button:hover{background:var(--snow);border-color:var(--ink)}
.hc__chips button.is-on{background:var(--ink);color:var(--snow);border-color:var(--ink)}
.hc__chips button[data-zoom]{width:34px;padding:0;font-size:18px}
.hc__chipgap{display:inline-flex;gap:4px;margin-left:6px}.hc__chipgap[hidden],.hc__chips button[hidden]{display:none}
.hc__chips button[data-furn]{margin-left:6px}
.hc__chips--form{margin:0 0 14px}
.hc__chips--form button{height:40px;padding:0 16px;font-size:14px;background:transparent;border-color:var(--rule-strong);backdrop-filter:none}
.hc__chips--form button:hover{background:var(--lichen)}
.hc__chips--form button.is-on{background:var(--ink)}
.hc__chips .hc__link,.hc__link{border:0!important;background:none!important;padding:0 6px!important;height:auto;color:var(--pine);font-size:14px;cursor:pointer;
  text-decoration:underline;text-underline-offset:3px;border-radius:0}
.hc__chips--form .hc__link{align-self:center;margin-left:6px}

/* ---------- подсказки конструктора ---------- */
.hc__notes{display:grid;gap:8px}
.hc__notes:empty{display:none}
.hc__note{margin:0;padding:12px 16px;border-radius:12px;background:var(--snow);border-left:3px solid var(--resin);font-size:14px;line-height:1.45}
.hc__note b{display:block;font:500 10px/1 var(--f-mono);letter-spacing:.08em;text-transform:uppercase;color:var(--pine);margin-bottom:6px}
.hc__note--fix{border-left-color:var(--pine);background:var(--lichen)}

/* ---------- форма ---------- */
.hc__form .fs legend{margin-bottom:16px}
.hc__lbl{font:400 11px/1.3 var(--f-mono);letter-spacing:.1em;text-transform:uppercase;color:var(--ink-2);margin:20px 0 10px}
.fs legend+.hc__lbl{margin-top:0}
.hc__gap{margin-top:20px}
.hc__lvl{margin:0 0 12px}
.hc__sw{grid-template-columns:repeat(2,1fr)}
.hc__sw .sw{min-height:46px;padding:6px 10px 6px 6px}
.hc__sw .sw__dot{width:30px;height:30px}
.hc__sw .sw__t{font-size:13px}
.hc__tg{display:flex!important;margin-top:8px!important;align-items:flex-start;padding-top:9px}
.hc__tg small{display:block;font-size:12.5px;color:var(--mute);line-height:1.35}
.hc__incs{display:grid;grid-template-columns:1fr 1fr;gap:0 24px}
.hc__always{margin:0 0 6px;font-size:14px;color:var(--ink-2)}
.hc__form [hidden]{display:none!important}
.hc__form .range label{display:flex;justify-content:space-between;align-items:baseline;gap:10px;flex-wrap:wrap}
.hc__form .range label b{font:500 13px/1 var(--f-mono);letter-spacing:0;text-transform:none;white-space:nowrap}
.hc__draw{background:var(--plinth);border-radius:var(--r-card);padding:10px;margin:0 0 14px;touch-action:none;user-select:none}
.hc__draw svg{display:block;width:100%;height:auto;max-height:440px}
.hc__draw--elev svg{max-height:360px}
.hc-iw:hover rect:first-child,.hc-op:hover rect:nth-child(2){filter:brightness(.9)}
.hc__edit{background:var(--snow);border-radius:var(--r-card);padding:18px 20px}
.hc__edit-h{display:flex;align-items:baseline;gap:12px;margin-bottom:14px}
.hc__edit-h b{font-weight:500;font-size:17px}
.hc__edit-h span{font:400 12px var(--f-mono);color:var(--mute);flex:1}
.hc__del{border:0;background:none;color:#a34a2a;font-size:14px;cursor:pointer;text-decoration:underline;text-underline-offset:3px;padding:0}
.hc__tip{margin:0;font-size:13.5px;line-height:1.5;color:var(--ink-2)}
.hc__edit .inp--sel select{width:100%;height:44px;padding:0 36px 0 12px;font-size:16px}
.hc__edit .inp label{margin-bottom:0}

/* ---------- смета ---------- */
.hc__est{margin-top:96px;scroll-margin-top:96px}
.hc__est-head{display:grid;grid-template-columns:1fr 1fr;gap:48px;align-items:end;margin-bottom:28px}
.hc__est-head .h2{margin:14px 0 0}
.hc__est-head p{margin:0;color:var(--ink-2)}
.hc__tbl-wrap{overflow-x:auto;background:var(--snow);border-radius:var(--r-img);padding:8px 28px 12px}
.hc__tbl{width:100%;border-collapse:collapse;font-size:15px}
.hc__tbl th,.hc__tbl td{padding:12px 0 12px 20px;text-align:right;vertical-align:top;border-bottom:1px solid var(--rule);white-space:nowrap}
.hc__tbl th:first-child,.hc__tbl td:first-child{text-align:left;padding-left:0;white-space:normal;min-width:260px}
.hc__tbl thead th{font:400 11px/1 var(--f-mono);letter-spacing:.1em;text-transform:uppercase;color:var(--mute);border-bottom-color:var(--ink)}
.hc__tbl td{font-family:var(--f-mono);font-size:14px}
.hc__tbl td:first-child{font-family:var(--f-sans);font-size:15px}
.hc__tbl td small{display:block;font-size:12.5px;color:var(--mute);margin-top:2px}
.hc__sec th{padding-top:24px;font:500 17px/1.2 var(--f-sans);border-bottom-color:var(--ink)}
.hc__sec th:last-child{font:500 15px var(--f-mono)}
.hc__tbl tfoot th{border-bottom:0;padding-top:22px;font:500 19px/1.2 var(--f-sans)}
.hc__tbl tfoot th:last-child{font-family:var(--f-mono)}
.hc__est-foot{display:grid;grid-template-columns:1fr auto;gap:40px;align-items:start;margin-top:32px}
.hc__small{margin:12px 0 0;font-size:13.5px;line-height:1.5;color:var(--ink-2);max-width:64ch}
.hc__est-act{display:grid;gap:10px;min-width:300px}
.hc__est-act .btn{justify-content:center}
.hc__est-act .hc__link{justify-self:center;margin-top:4px}
.hc__print{display:none}
.hc__qs{display:grid;grid-template-columns:1fr 1fr;gap:20px 24px}
.hc__q select{width:100%;height:44px;padding:0 36px 0 12px;font-size:16px}
.hc__q input[type=text],.hc__q textarea{width:100%;border:1px solid var(--rule-strong);border-radius:10px;background:var(--snow);padding:10px 12px;font-size:15px}
.hc__q input[type=text]{height:44px}
.hc__q textarea{min-height:84px}
.hc__q input:focus,.hc__q textarea:focus{border-color:var(--pine);box-shadow:0 0 0 1px var(--pine)}

/* готовые проекты: карточки и панель проекта */
.hc__pcards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:14px}
.hc__pcard{min-width:0;display:flex;flex-direction:column;text-align:left;padding:0;border:1px solid var(--rule);border-radius:var(--r-card);background:var(--snow);overflow:hidden;cursor:pointer;font:inherit;color:inherit;transition:border-color .2s var(--ease),transform .2s var(--ease)}
.hc__pcard:hover{border-color:var(--ink);transform:translateY(-2px)}
.hc__pcard.is-on{border-color:var(--pine);box-shadow:0 0 0 2px var(--pine)}
.hc__pcard:focus-visible{outline:2px solid var(--pine);outline-offset:2px}
.hc__pimg{display:block;aspect-ratio:16/10;background:var(--plinth) center/cover}
.hc__pimg img{display:block;width:100%;height:100%;object-fit:cover}
.hc__pbody{display:flex;flex-direction:column;gap:4px;padding:12px 14px 14px;font-size:13px;color:var(--ink-2)}
.hc__pbody b{font:500 17px/1.2 var(--f-sans);color:var(--ink)}
.hc__ptags{display:flex;flex-wrap:wrap;gap:4px;margin-top:4px}
.hc__ptags i{font:400 10px/1 var(--f-mono);font-style:normal;letter-spacing:.06em;text-transform:uppercase;padding:5px 7px;border-radius:999px;background:var(--plinth);color:var(--ink-2)}
.hc__pprice{margin-top:6px;font:500 13px/1.3 var(--f-sans);color:var(--pine);display:block}
.hc__pprice svg{width:15px;height:15px;vertical-align:-3px;margin-left:4px}
.hc__pcard--own{background:var(--plinth);justify-content:center;min-height:100%}
.hc__pcard--own .hc__pbody{padding:18px 16px}
.hc__plead{margin:0 0 14px;font-size:15px;color:var(--ink-2)}
.hc__pfacts{display:grid;grid-template-columns:1fr 1fr;gap:0 18px;margin:0 0 16px}
.hc__pfacts div{display:flex;flex-direction:column;padding:8px 0;border-top:1px solid var(--rule)}
.hc__pfacts dt{font:400 11px/1.3 var(--f-mono);letter-spacing:.08em;text-transform:uppercase;color:var(--mute)}
.hc__pfacts dd{margin:2px 0 0;font-size:15px}
.hc__draw--plan svg{max-height:520px}
.hc__tbl.hc__rooms{font-size:14px}
.hc__tbl.hc__rooms th,.hc__tbl.hc__rooms td{padding:8px 0 8px 14px}
.hc__tbl.hc__rooms th:first-child,.hc__tbl.hc__rooms td:first-child{min-width:0;width:2.5em}
.hc__tbl.hc__rooms td:nth-child(2){text-align:left;white-space:normal;padding-left:10px}
.hc__tbl.hc__rooms th:nth-child(2){text-align:left;padding-left:10px}
.hc__rooms small{display:block;font-size:11px;color:var(--mute)}
.hc__rooms tr.is-out td{color:var(--mute)}
@media (max-width:1200px){.hc__grid{gap:32px}.hc__incs{grid-template-columns:1fr}}
@media (max-width:1024px){
  .hc__grid{grid-template-columns:minmax(0,1fr)}
  .hc__view{max-height:none}
  .hc__est{margin-top:64px}
  .hc__est-head,.hc__est-foot{grid-template-columns:1fr;gap:20px}
  .hc__incs{grid-template-columns:1fr 1fr}
}
@media (max-width:720px){
  .hc__view{aspect-ratio:1/1;border-radius:20px}
  .hc__bar{left:8px;right:8px}
  .hc__bar--top{top:8px}.hc__bar--bottom{bottom:8px}
  .hc__chips button{height:32px;padding:0 10px;font-size:12px}
  .hc__sw,.hc__incs,.hc__qs{grid-template-columns:1fr}
  .hc__form .fs__two{grid-template-columns:1fr;gap:16px}
  .hc__tbl-wrap{padding:4px 16px 8px;border-radius:20px}
  .hc__tbl th:first-child,.hc__tbl td:first-child{min-width:190px}
  .hc__est-act{min-width:0}
  .hc__edit{padding:16px}
  .hc__pcards{gap:8px}
  .hc__pbody{padding:10px 11px 12px}
  .hc__pbody b{font-size:15px}
  .hc__pfacts{grid-template-columns:1fr}
}
@media (max-width:720px){body.has-bar .cfg-bar[data-hc-bar]{display:flex}}
/* смета на телефоне: строка — карточка без прокрутки вбок: позиция и пояснение, ниже «количество × цена» и сумма */
@media screen and (max-width:720px){
  .hc__est-wrap{overflow:visible;padding:2px 16px 6px}
  .hc__est-tbl,.hc__est-tbl tbody,.hc__est-tbl tfoot{display:block}
  .hc__est-tbl thead{display:none}
  .hc__est-tbl tr{display:flex;flex-wrap:wrap;align-items:baseline;column-gap:6px;padding:12px 0;border-bottom:1px solid var(--rule)}
  .hc__est-tbl th,.hc__est-tbl td{display:block;padding:0;border:0;min-width:0;text-align:left;white-space:nowrap}
  .hc__est-tbl td:first-child{flex:1 0 100%;min-width:0;white-space:normal;margin-bottom:6px;font-size:15px;line-height:1.35}
  .hc__est-tbl td small{font-size:12.5px;line-height:1.35}
  .hc__est-tbl td:nth-child(2),.hc__est-tbl td:nth-child(3){font-size:13px;color:var(--ink-2)}
  .hc__est-tbl td:nth-child(3)::before{content:"× ";color:var(--mute)}
  .hc__est-tbl td:last-child{margin-left:auto;padding-left:12px;font-size:14.5px;font-weight:500;color:var(--ink)}
  .hc__est-tbl .hc__sec{padding:22px 0 10px;border-bottom-color:var(--ink);flex-wrap:nowrap}
  .hc__est-tbl .hc__sec th:first-child{flex:1 1 auto;min-width:0;white-space:normal;font-size:16px;padding:0}
  .hc__est-tbl .hc__sec th:last-child{margin-left:auto;padding-left:12px;font-size:14.5px}
  .hc__est-tbl tfoot tr{border-bottom:0;padding-top:18px;flex-wrap:nowrap}
  .hc__est-tbl tfoot th:first-child{flex:1 1 auto;min-width:0;white-space:normal;font-size:17px}
  .hc__est-tbl tfoot th:last-child{margin-left:auto;padding-left:12px;font-size:17px}
}

@media print{
  header,footer,.fab,.cfg-bar,.strip,dialog,.hc__grid,.hc__est-act,.demo-note,main>*:not(.hc-sec),.offer{display:none!important}
  body{background:#fff}
  .hc__est{margin:0}
  .hc__tbl-wrap{background:none;padding:0}
  .hc__print{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-bottom:16px;font-size:12px}
  .hc__print img{width:100%;border-radius:8px}
  .hc__print p{margin:0 0 4px}
  .hc__tbl{font-size:12px}.hc__tbl th,.hc__tbl td{padding:5px 0 5px 12px}
}

/* кадр для превью готового проекта (?project=…&shot=1): модель на весь экран, без кнопок */
.hc-shot .hc__view{position:fixed;inset:0;z-index:2147483000;max-height:none;aspect-ratio:auto;border-radius:0}
.hc-shot .hc__bar,.hc-shot .hc__loading{display:none}
.hc-shot body *{visibility:hidden!important}
.hc-shot .hc__view,.hc-shot .hc__view *{visibility:visible!important}
/* скрытые у проекта карточка с ценой, смета и кнопки: display у .btn и блоков перебивает атрибут hidden */
.cfg__sum[hidden],.hc__est[hidden],.cfg__actions [hidden],.cfg-bar [hidden]{display:none!important}

/* ---------- 3D на телефоне: жесты, на весь экран, подсказка ---------- */
.hc__chips button[data-full]{width:34px;padding:0;font-size:17px}
.hc__view.is-full{position:fixed;inset:0;z-index:300;width:100vw;height:100vh;height:100dvh;max-height:none;aspect-ratio:auto;border-radius:0}
.hc__view.is-full .hc__canvas canvas{touch-action:none}
.hc__view.is-full .hc__bar--top{top:max(12px,env(safe-area-inset-top))}
.hc__view.is-full .hc__bar--bottom{bottom:max(12px,env(safe-area-inset-bottom))}
.hc__view.is-full .hc__chips button[data-full]{background:var(--ink);color:var(--snow);border-color:var(--ink)}
html.hc-lock,html.hc-lock body{overflow:hidden;overscroll-behavior:none}
.hc__touchhint{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);margin:0;display:grid;gap:6px;width:min(300px,84%);
  padding:14px 16px;border-radius:16px;background:rgba(19,32,26,.82);color:#f4f2ea;font:400 13px/1.4 var(--f-sans);text-align:left;
  pointer-events:none;box-shadow:0 16px 40px -18px rgba(0,0,0,.5);animation:hc-hint .35s var(--ease)}
.hc__touchhint[hidden]{display:none}
@keyframes hc-hint{from{opacity:0;transform:translate(-50%,-44%)}to{opacity:1;transform:translate(-50%,-50%)}}
.hc__hint-touch{display:none}
@media (pointer:coarse){.hc__hint-mouse{display:none}.hc__hint-touch{display:inline}}
@media (max-width:720px){.hc__chips button[data-full]{width:32px}}
/* на весь экран: крестик — в правом верхнем углу, крупный; кнопки ракурсов не заходят под него */
.hc__view.is-full .hc__chips button[data-full]{position:fixed;top:max(10px,env(safe-area-inset-top));right:10px;width:44px;height:44px;font-size:20px;z-index:2}
.hc__view.is-full .hc__bar--top{right:62px}
