:root {
  --ink: #17352f;
  --green: #1f7a5c;
  --green-dark: #145841;
  --mint: #dff2e7;
  --paper: #fff;
  --line: #dfe6e2;
  --muted: #6f7e79;
  --canvas: #f3f6f3;
  --shadow: 0 22px 70px rgba(20, 52, 44, .09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: radial-gradient(circle at 80% 0, #e2f1e8, transparent 32%), var(--canvas);
  color: var(--ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(31, 122, 92, .25);
  outline-offset: 2px;
}
[hidden] { display: none !important; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 70px;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 max(24px, 5vw);
  background: rgba(255, 255, 255, .92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.brand strong { display: flex; flex-direction: column; align-items: flex-start; font-size: 14px; line-height: 1.05; letter-spacing: -.025em; white-space: nowrap; }
.brand strong small { margin-top: 4px; color: var(--green); font-size: 10px; letter-spacing: .04em; text-transform: uppercase; }
.brand em { color: var(--green); font-style: normal; }
.logo-mark { width: 34px; height: 34px; display: flex; align-items: flex-end; gap: 3px; padding: 5px; border-radius: 10px; background: var(--ink); }
.logo-mark i { flex: 1; height: 55%; background: #fff; }
.logo-mark i:nth-child(2) { height: 82%; background: #8ad1af; }
.logo-mark i:nth-child(3) { height: 68%; }
.header-note { display: flex; flex-direction: column; padding-left: 22px; border-left: 1px solid var(--line); }
.header-note strong { font-size: 12px; }
.header-note small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.ghost-button { margin-left: auto; padding: 10px 15px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 12px; font-weight: 800; cursor: pointer; }
.ghost-button:hover { border-color: var(--green); color: var(--green); }

.page-shell { max-width: 1280px; margin: auto; padding: 34px 20px 120px; }
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.hero p, .modal > section > p { margin: 0; color: var(--green); font-size: 12px; font-weight: 850; text-transform: uppercase; letter-spacing: .15em; }
.hero h1 { margin: 6px 0; font-size: clamp(34px, 5vw, 50px); line-height: 1; letter-spacing: -.045em; }
.hero span { color: var(--muted); font-size: 15px; }
.hero > small { padding: 9px 12px; border-radius: 9px; background: #e5f3eb; color: var(--green-dark); font-weight: 700; white-space: nowrap; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); margin: 26px 0 18px; scroll-margin-top: 84px; }
.steps button { position: relative; display: flex; min-width: 0; align-items: center; gap: 10px; padding: 0; border: 0; background: transparent; color: #94a19d; font-size: 13px; font-weight: 800; cursor: pointer; }
.steps button:not(:last-child)::after { content: ""; flex: 1 1 auto; min-width: 10px; height: 1px; margin: 0 14px 0 2px; background: var(--line); }
.steps b { z-index: 1; display: grid; flex: 0 0 30px; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #e1e7e4; }
.steps button span { flex: 0 0 auto; }
.steps .active { color: var(--ink); }
.steps .active b { background: var(--green); color: #fff; box-shadow: 0 5px 15px rgba(31, 122, 92, .25); }
.steps .done { color: var(--green); }
.steps .done b { background: var(--mint); color: var(--green); }

.calculator { display: grid; grid-template-columns: minmax(460px, .92fr) minmax(480px, 1.08fr); overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); box-shadow: var(--shadow); }
.panel { min-width: 0; padding: 34px; }
.step-panel { animation: panel-in .24s ease; }
@keyframes panel-in { from { opacity: .2; transform: translateY(5px); } }
.section-title { display: flex; gap: 14px; align-items: flex-start; }
.section-title > b { flex: 0 0 auto; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: var(--ink); color: #fff; font-size: 12px; }
.section-title h2 { margin: 0; font-size: 21px; letter-spacing: -.02em; }
.section-title p { margin: 5px 0; color: var(--muted); font-size: 14px; }

.dimensions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 30px; }
.dimensions label { min-width: 0; font-size: 13px; font-weight: 800; }
.dimensions label > span { height: 52px; display: flex; align-items: center; margin-top: 8px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfb; }
.dimensions label > span:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(31, 122, 92, .1); }
.dimensions button { width: 30px; height: 100%; flex: 0 0 auto; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.dimensions button:hover { background: var(--mint); color: var(--green); }
.dimensions input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; padding: 0 2px; text-align: center; font-weight: 850; appearance: textfield; }
.dimensions input::-webkit-inner-spin-button { appearance: none; }
.dimensions em { color: var(--muted); font-size: 11px; font-style: normal; }
.dimensions small { display: block; margin-top: 6px; color: #84928e; font-size: 11px; }

fieldset { min-width: 0; margin: 25px 0 0; padding: 20px 0 0; border: 0; border-top: 1px solid var(--line); }
legend { padding: 0 10px 0 0; font-size: 13px; font-weight: 850; }
.type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px; }
.type-grid label, .materials label, .profiles label, .swatches label { cursor: pointer; }
.type-grid input, .materials input, .profiles input, .swatches input { position: absolute; opacity: 0; pointer-events: none; }
.type-grid label > span { position: relative; min-height: 78px; display: grid; grid-template-columns: 42px 1fr 20px; align-items: center; gap: 10px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; }
.type-grid input:checked + span, .materials input:checked + span, .profiles input:checked + span { border-color: var(--green); background: #f1faf5; box-shadow: inset 0 0 0 1px var(--green); }
.type-grid span > b, .materials span > b { display: flex; flex-direction: column; min-width: 0; }
.type-grid small, .materials small { margin-top: 3px; color: var(--muted); font-size: 11px; font-weight: 500; }
.type-grid span > em { display: none; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--green); color: #fff; font-size: 10px; font-style: normal; }
.type-grid input:checked + span > em { display: grid; }
.type-icon { height: 43px; display: flex; align-items: flex-end; gap: 3px; padding: 5px; border: 2px solid #9eaeaa; border-bottom-width: 4px; }
.type-icon u { flex: 1; height: 70%; border: 1px solid #9eaeaa; text-decoration: none; }
.built-icon { border-top: 0; border-left-style: dashed; border-right-style: dashed; }
.built-icon u { height: 100%; }
.side-panel-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 9px; }
.side-panel-options label { min-width: 0; display: grid; grid-template-columns: 18px 1fr; align-items: center; gap: 8px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfb; cursor: pointer; }
.side-panel-options input { accent-color: var(--green); }
.side-panel-options span { min-width: 0; display: flex; flex-direction: column; }
.side-panel-options b { font-size: 10px; }
.side-panel-options small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.side-panel-options label:has(input:checked) { border-color: rgba(31, 122, 92, .45); background: #f1faf5; }

.layout-fieldset { padding-top: 17px; }
.layout-presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 9px; }
.layout-presets button { min-width: 0; display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--ink); text-align: left; cursor: pointer; }
.layout-presets button:hover { border-color: rgba(31, 122, 92, .55); background: #f7fcf9; }
.layout-presets button.active { border-color: var(--green); background: #f1faf5; box-shadow: inset 0 0 0 1px var(--green); }
.layout-presets span, .layout-presets strong, .layout-presets small { display: block; }
.layout-presets strong { font-size: 10px; line-height: 1.25; }
.layout-presets small { margin-top: 3px; color: var(--muted); font-size: 8px; line-height: 1.25; }
.layout-icon { width: 42px; height: 39px; display: grid; grid-template-columns: repeat(2, 1fr); grid-template-rows: 13px 1fr; gap: 2px; padding: 3px; border: 2px solid #95a49f; background: #f8faf9; }
.layout-icon u { min-width: 0; min-height: 0; border: 1px solid #9eaeaa; background: rgba(185, 155, 114, .16); text-decoration: none; }
.layout-none { grid-template-rows: 1fr; }
.layout-one u:first-child { grid-column: 1 / -1; }
.layout-matching u:nth-child(-n + 2) { background: rgba(31, 122, 92, .15); }
.layout-presets button.active .layout-icon { border-color: var(--green); }
.upper-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.upper-controls[hidden] { display: none; }
.upper-controls > label, .upper-controls > div { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: #f7faf8; }
.upper-controls > label > span:first-child, .upper-controls > div > span { display: flex; flex-direction: column; }
.upper-controls strong { font-size: 11px; }
.upper-controls small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.number-control { flex: 0 0 auto; height: 38px; display: flex; align-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.number-control button { width: 27px; height: 100%; border: 0; background: transparent; color: var(--green); font-size: 16px; cursor: pointer; }
.number-control input { width: 31px; padding: 0; border: 0; outline: 0; background: transparent; text-align: center; font-size: 11px; font-weight: 850; appearance: textfield; }
.number-control input::-webkit-inner-spin-button { appearance: none; }
.number-control em { color: var(--muted); font-size: 8px; font-style: normal; }

.count-row, .editor-row, .toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 22px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfb; }
.count-row > span, .toggle-row > span { display: flex; flex-direction: column; }
.count-row small, .toggle-row small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.inline-reset { align-self: flex-start; margin-top: 5px; padding: 0; border: 0; border-bottom: 1px dashed var(--green); background: transparent; color: var(--green); font-size: 9px; font-weight: 750; cursor: pointer; }
.geometry-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.geometry-summary span { min-width: 0; display: flex; flex-direction: column; gap: 4px; padding: 10px 11px; border-radius: 9px; background: #eef6f1; color: var(--muted); font-size: 10px; }
.geometry-summary b { color: var(--ink); font-size: 12px; white-space: nowrap; }
.counter { flex: 0 0 auto; height: 40px; display: flex; align-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.counter button { width: 40px; height: 100%; border: 0; background: transparent; color: var(--green); font-size: 18px; cursor: pointer; }
.counter button:hover { background: var(--mint); }
.counter button:disabled { background: #f1f3f2; color: #b8c1be; cursor: not-allowed; }
.counter b { min-width: 30px; text-align: center; font-size: 13px; }
.hint { display: flex; gap: 10px; margin: 22px 0 0; padding: 13px; border: 1px solid #f2ddc7; border-radius: 12px; background: #fff8ef; color: #6d594a; font-size: 12px; line-height: 1.45; }
.hint > b { flex: 0 0 auto; display: grid; place-items: center; width: 20px; height: 20px; border: 1px solid #d59b6c; border-radius: 50%; }
.hint span { display: flex; flex-direction: column; }
.hint.green { border-color: #c9e7d6; background: #f1faf5; color: var(--green-dark); }
.hint.green > b { border: 0; background: var(--green); color: #fff; }

.presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 26px; }
.presets button { min-width: 0; padding: 12px 8px; border: 1px solid var(--line); border-radius: 12px; background: #fff; text-align: left; cursor: pointer; }
.presets button:hover { border-color: var(--green); background: #f7fcf9; }
.presets strong, .presets small { display: block; }
.presets strong { margin-top: 8px; font-size: 12px; }
.presets small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.preset-visual { height: 45px; display: block; border: 3px solid #9eaeaa; background: repeating-linear-gradient(to bottom, transparent 0 10px, #9eaeaa 10px 12px); }
.preset-visual.wardrobe-preset { background: linear-gradient(90deg, transparent 48%, #9eaeaa 48% 52%, transparent 52%), linear-gradient(#9eaeaa 4px, transparent 4px); }
.preset-visual.storage { background: repeating-linear-gradient(to bottom, transparent 0 6px, #9eaeaa 6px 8px); }
.divider { height: 1px; margin: 24px 0 16px; background: var(--line); }
.section-tabs { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 3px; }
.section-tabs button { flex: 0 0 auto; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--muted); font-size: 11px; font-weight: 800; cursor: pointer; }
.section-tabs button.active { border-color: var(--green); background: var(--green); color: #fff; }
.section-editor { margin-top: 10px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.section-editor .editor-row, .section-editor .toggle-row { margin: 0; border: 0; border-radius: 0; }
.section-editor > * + * { border-top: 1px solid var(--line); }
.section-select-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 16px; background: #fbfcfb; }
.section-select-row > span, .editor-row > span { display: flex; flex-direction: column; }
.section-select-row strong, .editor-row strong { font-size: 11px; }
.section-select-row small, .editor-row small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.section-select-row select { min-width: 190px; max-width: 58%; min-height: 36px; padding: 7px 28px 7px 9px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font-size: 9px; font-weight: 750; }
.section-select-row select:disabled { color: #98a5a1; background: #f0f3f1; }
.capacity-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 12px 16px; background: #eef6f1; color: var(--muted); font-size: 11px; }
.capacity-row > span:first-child { display: flex; flex-direction: column; gap: 3px; }
.capacity-row strong { color: var(--ink); font-size: 11px; }
.capacity-row small { color: var(--muted); font-size: 8px; }
.section-width-control input { width: 39px; }
.capacity-note { margin: 9px 2px 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.editor-row > span { font-size: 12px; font-weight: 800; }
.shelf-placement-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 16px; background: #fbfcfb; }
.shelf-placement-row > span { display: flex; flex-direction: column; }
.shelf-placement-row strong { font-size: 11px; }
.shelf-placement-row small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.shelf-placement { flex: 0 0 auto; display: flex; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.shelf-placement button { min-height: 34px; padding: 0 10px; border: 0; background: transparent; color: var(--muted); font-size: 9px; font-weight: 800; cursor: pointer; }
.shelf-placement button + button { border-left: 1px solid var(--line); }
.shelf-placement button.active { background: var(--green); color: #fff; }
.toggle-row { cursor: pointer; }
.toggle-row input { position: absolute; opacity: 0; }
.toggle-row > i { position: relative; flex: 0 0 auto; width: 42px; height: 24px; border-radius: 99px; background: #cdd6d2; transition: .2s ease; }
.toggle-row > i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .15); transition: .2s ease; }
.toggle-row input:checked + i { background: var(--green); }
.toggle-row input:checked + i::after { transform: translateX(18px); }
.toggle-row:has(input:disabled) { opacity: .62; cursor: not-allowed; }

.door-count { margin-top: 26px; }
.door-material-note { margin: 2px 0 10px; color: var(--muted); font-size: 11px; }
.door-tabs { display: flex; gap: 7px; overflow-x: auto; padding: 2px 1px 5px; }
.door-tabs button { flex: 0 0 auto; min-width: 94px; display: flex; align-items: center; gap: 7px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); text-align: left; cursor: pointer; }
.door-tabs button > b { display: grid; place-items: center; width: 22px; height: 29px; border: 2px solid #9eaeaa; color: #61736d; font-size: 9px; }
.door-tabs button > span { display: flex; flex-direction: column; font-size: 9px; font-weight: 800; }
.door-tabs button small { margin-top: 2px; color: var(--muted); font-size: 7px; font-weight: 500; }
.door-tabs button.active { border-color: var(--green); background: #f1faf5; box-shadow: inset 0 0 0 1px var(--green); }
.door-tabs button.active > b { border-color: var(--green); color: var(--green); }
.materials { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.materials label > span { min-height: 66px; display: grid; grid-template-columns: 38px 1fr; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 11px; }
.materials span > i { width: 36px; height: 40px; border: 2px solid #a4afac; background: #b99b72; }
.materials .mat-mirror span > i, .door-panel.mat-mirror { background: linear-gradient(135deg, #d9e5e5, #fff 48%, #bacdce 50%, #edf5f5); }
.materials .mat-oracal span > i, .door-panel.mat-oracal { background: linear-gradient(135deg, #cadde0, #8eafb3); }
.materials .mat-photo span > i, .door-panel.mat-photo { background: linear-gradient(140deg, #254f45 0 35%, #d8a061 36% 60%, #e8d5ac 61%); }
.apply-all { width: 100%; margin-top: 9px; padding: 9px 12px; border: 1px dashed rgba(31, 122, 92, .45); border-radius: 9px; background: #f7fcf9; color: var(--green); font-size: 10px; font-weight: 800; cursor: pointer; }
.apply-all:hover { border-style: solid; background: var(--mint); }
.select-field { display: flex; flex-direction: column; gap: 7px; color: var(--muted); font-size: 10px; font-weight: 750; }
.select-field select, .select-extra select { width: 100%; min-height: 39px; padding: 8px 30px 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfb; color: var(--ink); font-size: 10px; font-weight: 700; outline: none; }
.select-field select:focus, .select-extra select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(31, 122, 92, .1); }
.pricing-options { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 9px; }
.check-option { display: grid; grid-template-columns: 18px 1fr; align-items: center; gap: 5px 8px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfb; color: var(--ink); font-size: 10px; font-weight: 750; cursor: pointer; }
.check-option input { grid-row: 1 / 3; accent-color: var(--green); }
.check-option small { color: var(--green); font-size: 8px; }
.swatches { display: flex; align-items: center; gap: 11px; margin-top: 10px; }
.swatches label > i { display: block; width: 29px; height: 29px; border: 2px solid #fff; border-radius: 50%; background: var(--swatch); box-shadow: 0 0 0 1px var(--line); }
.swatches input:checked + i { box-shadow: 0 0 0 2px var(--green); }
.swatches > span { margin-left: 4px; color: var(--muted); font-size: 11px; }
.profiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.profiles label > span { display: flex; align-items: center; gap: 7px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; font-size: 11px; font-weight: 750; }
.profiles span > i { width: 5px; height: 25px; border-radius: 2px; background: var(--profile); }
.profiles span > b { min-width: 0; display: flex; flex-direction: column; font-size: 10px; }
.profiles span > b small { margin-top: 2px; color: var(--muted); font-size: 7px; font-weight: 500; }
.extras { display: grid; gap: 8px; margin-top: 20px; }
.extras label { display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: 8px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; font-size: 12px; cursor: pointer; }
.extras label:has(input:disabled) { opacity: .55; cursor: not-allowed; }
.extras input { accent-color: var(--green); }
.extras small { color: var(--green); font-weight: 800; }
.door-extras { margin-top: 4px; }
.extras .select-extra { grid-template-columns: 1fr; align-items: stretch; }
.extras .select-extra > span { font-size: 10px; font-weight: 750; }

.preview { min-width: 0; display: flex; flex-direction: column; background: #e9eeeb; border-left: 1px solid var(--line); }
.preview > header { min-height: 64px; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 18px 12px 22px; color: #557068; font-size: 11px; }
.preview-tools { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.preview-tools > small { color: #7c8f89; font-size: 9px; white-space: nowrap; }
.preview > header button { min-width: 30px; height: 30px; padding: 0 8px; border: 1px solid rgba(85, 112, 104, .2); border-radius: 8px; background: rgba(255, 255, 255, .68); color: #37564d; font-size: 10px; font-weight: 750; cursor: pointer; }
.preview > header button:hover { border-color: rgba(31, 122, 92, .45); background: #fff; }
.preview > header #dimension-toggle.active { border-color: rgba(31, 122, 92, .55); background: #e7f4ec; color: var(--green); }
.stage { position: relative; min-height: 470px; display: grid; place-items: center; padding: 58px 76px 66px; overflow: hidden; perspective: 1200px; perspective-origin: 50% 43%; background: radial-gradient(circle at 50% 28%, rgba(255, 255, 255, .95), rgba(255, 255, 255, .18) 47%, transparent 68%), linear-gradient(180deg, #eef2f0 0 69%, #dce3df 69% 100%); }
.stage::before { content: ""; position: absolute; z-index: 0; left: 12%; right: 12%; bottom: 8%; height: 25%; border-radius: 50%; background: radial-gradient(ellipse, rgba(25, 48, 41, .25), rgba(25, 48, 41, .08) 43%, transparent 72%); filter: blur(5px); transform: rotateX(67deg); pointer-events: none; }
.stage::after { content: ""; position: absolute; z-index: 0; left: 0; right: 0; top: 69%; height: 1px; background: rgba(79, 105, 97, .13); pointer-events: none; }
.wardrobe { --wardrobe-ratio: .92; --wardrobe-target-width: 315px; --wardrobe-frame: 7px; --partition-size: 5px; --scene-depth: 36px; --rotate-x: -3deg; --rotate-y: -13deg; --cabinet-color: #b99b72; position: relative; z-index: 2; width: min(86%, var(--wardrobe-target-width)); max-width: 500px; height: auto; display: flex; flex-direction: column; border: var(--wardrobe-frame) solid var(--cabinet-color); border-bottom-width: calc(var(--wardrobe-frame) + 4px); background: linear-gradient(135deg, rgba(255, 255, 255, .84), rgba(226, 228, 222, .82)); box-shadow: 12px 18px 31px rgba(32, 45, 40, .25), inset 0 0 28px rgba(255, 255, 255, .72); transform: rotateX(var(--rotate-x)) rotateY(var(--rotate-y)); transform-origin: 50% 58%; transform-style: preserve-3d; transition: width .25s ease, border-color .2s ease, aspect-ratio .25s ease, transform .28s cubic-bezier(.2, .75, .25, 1); will-change: transform; cursor: grab; touch-action: none; user-select: none; }
.wardrobe::before, .wardrobe::after { content: ""; position: absolute; display: block; background: linear-gradient(120deg, rgba(255, 255, 255, .19), rgba(20, 24, 22, .19)), var(--cabinet-color); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16), inset -12px -8px 20px rgba(0, 0, 0, .1); backface-visibility: hidden; pointer-events: none; transition: opacity .2s ease; }
.wardrobe::before { top: calc(0px - var(--wardrobe-frame)); right: calc(0px - var(--scene-depth)); bottom: calc(-4px - var(--wardrobe-frame)); width: var(--scene-depth); transform: rotateY(90deg); transform-origin: left center; }
.wardrobe::after { top: calc(0px - var(--scene-depth) - var(--wardrobe-frame)); left: calc(0px - var(--wardrobe-frame)); right: calc(0px - var(--wardrobe-frame)); height: var(--scene-depth); transform: rotateX(90deg); transform-origin: center bottom; }
.wardrobe:focus-visible { outline: 3px solid rgba(31, 122, 92, .38); outline-offset: 8px; }
.wardrobe.is-dragging { cursor: grabbing; transition: width .25s ease, border-color .2s ease, aspect-ratio .25s ease; }
.wardrobe.front-view { cursor: default; }
.wardrobe.front-view::before, .wardrobe.front-view::after { opacity: 0; }
.wardrobe.built-in { border-top-width: 3px; border-left-width: 3px; border-right-width: 3px; box-shadow: 7px 15px 26px rgba(32, 45, 40, .15), inset 0 0 30px rgba(255, 255, 255, .62); }
.wardrobe.built-in::before, .wardrobe.built-in::after { opacity: .5; }
.wardrobe.built-in.front-view::before, .wardrobe.built-in.front-view::after { opacity: 0; }
.wardrobe.without-left-side { border-left-width: 1px; border-left-color: rgba(88, 108, 101, .28) !important; }
.wardrobe.without-right-side { border-right-width: 1px; border-right-color: rgba(88, 108, 101, .28) !important; }
.wardrobe.without-right-side::before { opacity: 0; }
.wardrobe-row { position: relative; min-height: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; transform-style: preserve-3d; }
.wardrobe-row.main-row { flex: 1 1 auto; }
.wardrobe-row.upper-row { flex: 0 0 var(--upper-row-height); border-bottom: var(--partition-size) solid var(--cabinet-color); background: rgba(255, 255, 255, .14); }
.wardrobe-section, .upper-section { position: relative; min-width: 0; border-right: var(--partition-size) solid var(--cabinet-color); background: linear-gradient(108deg, rgba(255, 255, 255, .38), rgba(168, 174, 168, .09)); box-shadow: inset 8px 0 13px rgba(41, 49, 45, .055), inset 0 -8px 13px rgba(41, 49, 45, .045); transform: translateZ(1px); transform-style: preserve-3d; }
.wardrobe-section:last-child, .upper-section:last-child { border-right: 0; }
.upper-row::after, .main-row.has-height-tag::after { content: "↕"; position: absolute; z-index: 5; right: -15px; top: 50%; transform: translateY(-50%); color: #6f817b; font-size: 14px; line-height: 1; }
.upper-height-tag, .main-height-tag { position: absolute; z-index: 5; right: -20px; top: 50%; transform: translate(100%, -50%) translateZ(14px); padding: 3px 5px; border-radius: 4px; background: rgba(255, 255, 255, .94); color: #526a62; box-shadow: 0 2px 6px rgba(30, 49, 42, .1); font-size: 7px; font-style: normal; font-weight: 800; white-space: nowrap; }
.wardrobe-section.active-preview { background: rgba(31, 122, 92, .08); box-shadow: inset 0 0 0 2px rgba(31, 122, 92, .35); }
.section-size, .door-size { position: absolute; z-index: 4; top: 5px; left: 50%; max-width: calc(100% - 8px); transform: translateX(-50%) translateZ(10px); padding: 3px 5px; border: 1px solid rgba(74, 99, 91, .12); border-radius: 4px; background: rgba(255, 255, 255, .88); color: #38574e; box-shadow: 0 2px 7px rgba(30, 49, 42, .08); font-size: 8px; font-weight: 800; line-height: 1.05; overflow-wrap: anywhere; text-align: center; white-space: normal; font-style: normal; }
.custom-shelf { position: absolute; left: 5px; right: 5px; height: 5px; transform: translateY(-50%) translateZ(7px); box-shadow: 0 3px 5px rgba(32, 38, 35, .18), inset 0 1px rgba(255, 255, 255, .32); }
.shelf-gap { position: absolute; z-index: 5; left: 50%; transform: translate(-50%, -50%) translateZ(12px); padding: 1px 3px; border-radius: 3px; background: rgba(255, 255, 255, .88); color: #526a62; box-shadow: 0 1px 4px rgba(30, 49, 42, .08); font-size: 6px; font-weight: 800; white-space: nowrap; }
.free-space-tag { position: absolute; z-index: 6; left: 50%; transform: translate(-50%, -50%) translateZ(14px); padding: 2px 4px; border: 1px solid rgba(31, 122, 92, .18); border-radius: 4px; background: rgba(241, 250, 245, .94); color: var(--green-dark); box-shadow: 0 2px 6px rgba(30, 49, 42, .08); font-size: 7px; font-weight: 850; white-space: nowrap; }
.free-space-tag.with-rail { left: 6px; padding: 3px 2px; writing-mode: vertical-rl; transform: translateY(-50%) rotate(180deg) translateZ(14px); }
.rail { position: absolute; left: 9%; right: 9%; top: 31%; height: 3px; border-radius: 3px; background: linear-gradient(#eef2f1, #73817d 45%, #c9d1cf); box-shadow: 0 2px 4px rgba(31, 42, 38, .24); transform: translateZ(10px); }
.rail::before, .rail::after { content: ""; position: absolute; top: -3px; width: 6px; height: 8px; border-radius: 50%; background: linear-gradient(90deg, #dbe2e0, #6d7a76); }
.rail::before { left: -2px; } .rail::after { right: -2px; }
.rail.pullout { left: 46%; right: 9%; height: 4px; background: linear-gradient(90deg, #778681, #dfe6e4); }
.garment { position: absolute; top: 33%; width: 25%; height: 30%; border-radius: 1px 1px 6px 6px; clip-path: polygon(23% 0, 77% 0, 100% 15%, 87% 100%, 13% 100%, 0 15%); opacity: .88; filter: drop-shadow(2px 3px 2px rgba(35, 44, 40, .18)); }
.garment.one { left: 21%; background: linear-gradient(110deg, #607a75, #9aafa9 55%, #657f79); transform: skew(-2deg) translateZ(9px); }
.garment.two { right: 21%; background: linear-gradient(110deg, #956b51, #c49a7a 55%, #8b6048); transform: skew(2deg) translateZ(8px); }
.drawer-stack { position: absolute; left: 9%; right: 9%; bottom: 6%; display: flex; flex-direction: column; border: 3px solid; background: linear-gradient(110deg, rgba(255, 255, 255, .52), rgba(188, 191, 185, .32)); box-shadow: 0 5px 8px rgba(36, 43, 40, .15); transform: translateZ(8px); }
.drawer-stack i { position: relative; flex: 1; min-height: 12px; border-bottom: 2px solid; box-shadow: inset 0 -3px 6px rgba(39, 45, 42, .06); }
.drawer-stack i::after { content: ""; position: absolute; left: 42%; right: 42%; top: 3px; height: 2px; border-radius: 2px; background: rgba(43, 52, 48, .5); }
.drawer-size { position: absolute; z-index: 3; right: 2px; top: 50%; transform: translateY(-50%); padding: 1px 2px; border-radius: 2px; background: rgba(255, 255, 255, .82); color: #61736d; font-size: 5px; font-weight: 800; }
.drawer-stack i:last-child { border-bottom: 0; }
.doors-view { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0; border-width: 5px; background: transparent; }
.facade-upper-line { position: absolute; z-index: 6; left: 0; right: 0; height: 2px; border-top: 1px solid rgba(255, 255, 255, .48); background: var(--cabinet-color); box-shadow: 0 2px 4px rgba(24, 31, 28, .24); transform: translateZ(8px); pointer-events: none; }
.door-panel { position: relative; min-width: 0; border: 5px solid; border-right-width: 2px; border-left-width: 2px; background: #b99b72; box-shadow: inset 0 0 20px rgba(0, 0, 0, .12), inset 0 1px rgba(255, 255, 255, .3); transform: translateZ(3px); }
.door-panel.active-door-preview { box-shadow: inset 0 0 0 3px rgba(31, 122, 92, .72), inset 0 0 20px rgba(0, 0, 0, .12), 0 0 13px rgba(31, 122, 92, .25); }
.door-panel .door-size { top: auto; bottom: 6px; }
.door-handle { position: absolute; top: 7%; bottom: 7%; right: 3px; width: 3px; border-radius: 2px; box-shadow: 1px 0 2px rgba(0, 0, 0, .25); }
.doors-view .mat-mirror { background: linear-gradient(122deg, #aebfc1, #edf5f4 32%, #fff 42%, #b9cbcc 44%, #e8f0ef 75%, #a8babb); }
.doors-view .mat-oracal { background: linear-gradient(130deg, rgba(255, 255, 255, .48), transparent 38%), linear-gradient(135deg, #91b0b3, #c2d3d4 54%, #789a9e); }
.doors-view .mat-photo { background: linear-gradient(145deg, rgba(255, 255, 255, .12), transparent 42%), linear-gradient(140deg, #193f38 0 35%, #bd8150 36% 60%, #d6bd91 61%); }
.height-label, .width-label, .depth-visual-label { position: absolute; z-index: 4; padding: 4px 7px; border-radius: 5px; background: rgba(239, 243, 241, .78); color: #476159; font-size: 10px; font-weight: 800; pointer-events: none; }
.height-label { left: 27px; writing-mode: vertical-rl; transform: rotate(180deg); }
.height-label::before, .width-label::before { content: "↔"; margin-bottom: 5px; color: #869993; }
.width-label { bottom: 26px; }
.depth-visual-label { top: 24px; right: 24px; }
.depth-visual-label::before { content: "↗"; margin-right: 5px; color: #869993; }
.preview.dimensions-hidden .height-label, .preview.dimensions-hidden .width-label, .preview.dimensions-hidden .depth-visual-label, .preview.dimensions-hidden .section-size, .preview.dimensions-hidden .door-size, .preview.dimensions-hidden .upper-height-tag, .preview.dimensions-hidden .main-height-tag, .preview.dimensions-hidden .shelf-gap, .preview.dimensions-hidden .free-space-tag, .preview.dimensions-hidden .drawer-size { display: none; }
.preview.dimensions-hidden .upper-row::after, .preview.dimensions-hidden .main-row::after { content: none; }
.preview > footer { min-height: 68px; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid rgba(118, 144, 134, .24); }
.preview > footer span { display: flex; flex-direction: column; gap: 4px; padding: 15px; color: var(--muted); font-size: 10px; }
.preview > footer span + span { border-left: 1px solid rgba(118, 144, 134, .2); }
.preview > footer b { color: var(--ink); font-size: 13px; }
.preview.expanded { position: fixed; inset: 20px; z-index: 50; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 20px 80px rgba(12, 35, 29, .3); }
.preview.expanded .stage { min-height: 0; flex: 1; }
.preview.expanded .wardrobe { width: min(75vw, var(--wardrobe-target-width)); max-width: 720px; }

.estimate-list { display: grid; gap: 0; margin-top: 25px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.estimate-list > div { display: flex; justify-content: space-between; gap: 20px; padding: 12px 14px; background: #fff; font-size: 12px; }
.estimate-list > div:nth-child(even) { background: #f8faf9; }
.estimate-list span { color: var(--muted); }
.estimate-list strong { text-align: right; white-space: nowrap; }
.estimate-list > div.estimate-total { padding: 16px 14px; background: var(--ink); color: #fff; font-size: 13px; }
.estimate-list > div.estimate-total span { color: #d5e2dd; }
.estimate-list > div.estimate-total strong { color: #fff; font-size: 17px; }
.estimate-list .estimate-warning { align-items: flex-start; background: #fff8ef; color: #765b45; font-size: 10px; line-height: 1.45; }
.estimate-list .estimate-warning::before { content: "!"; flex: 0 0 auto; display: grid; place-items: center; width: 17px; height: 17px; border: 1px solid #d59b6c; border-radius: 50%; font-weight: 900; }
.estimate-list .estimate-warning span { color: inherit; }
.offer-card { margin-top: 18px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #f7faf8; }
.offer-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.offer-card h3 { margin: 0 0 4px; font-size: 15px; }
.offer-card header small { display: block; max-width: 370px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.offer-card button { flex: 0 0 auto; min-height: 36px; padding: 0 14px; border: 0; border-radius: 9px; background: var(--green); color: #fff; font-size: 11px; font-weight: 850; cursor: pointer; }
.offer-card button:hover { background: var(--green-dark); }
.offer-card textarea { width: 100%; min-height: 360px; margin-top: 13px; padding: 13px 14px; resize: vertical; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); font-family: inherit; font-size: 11px; line-height: 1.55; outline: none; }
.offer-card textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(33, 133, 104, .1); }
.pricebar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; min-height: 76px; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 11px max(24px, 5vw); background: rgba(255, 255, 255, .95); border-top: 1px solid var(--line); box-shadow: 0 -12px 40px rgba(25, 55, 47, .08); backdrop-filter: blur(16px); }
.price-summary { display: flex; align-items: center; gap: 11px; }
.price-summary > i { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--mint); color: var(--green); font-size: 17px; font-style: normal; font-weight: 900; }
.price-summary > span { display: flex; flex-direction: column; }
.price-summary small, .footer-actions > small { color: var(--muted); font-size: 10px; }
.price-summary strong { font-size: 23px; line-height: 1; }
.price-summary button { border: 0; border-bottom: 1px dashed var(--green); background: transparent; color: var(--green); font-size: 11px; cursor: pointer; }
.footer-actions { display: flex; align-items: center; gap: 9px; }
.footer-actions button { min-height: 46px; padding: 0 18px; border-radius: 10px; font-size: 12px; font-weight: 850; cursor: pointer; }
.footer-actions .back { border: 1px solid var(--line); background: #fff; }
.footer-actions .next { border: 0; background: var(--green); color: #fff; }
.footer-actions .next:hover { background: var(--green-dark); }

.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(11, 30, 25, .56); backdrop-filter: blur(5px); }
.modal > section { position: relative; width: min(500px, 100%); max-height: calc(100vh - 40px); overflow: auto; padding: 30px; border-radius: 17px; background: #fff; box-shadow: 0 25px 80px rgba(0, 0, 0, .25); }
.modal h2 { margin: 6px 0 0; }
.modal .close { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font-size: 20px; cursor: pointer; }
.modal > section > small { display: block; margin-top: 14px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.toast { position: fixed; z-index: 110; top: 85px; right: 20px; padding: 13px 17px; border-radius: 10px; background: var(--ink); color: #fff; box-shadow: var(--shadow); font-size: 11px; font-weight: 750; animation: toast-in .2s ease; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }

@media (max-width: 980px) {
  .calculator { grid-template-columns: 1fr; }
  .preview { border-top: 1px solid var(--line); border-left: 0; }
  .stage { min-height: 440px; }
  .hero > small { display: none; }
}
@media (max-width: 700px) {
  .topbar { height: 62px; padding: 0 15px; }
  .header-note { display: none; }
  .ghost-button { padding: 8px 10px; }
  .page-shell { padding: 24px 12px 105px; }
  .hero h1 { font-size: 34px; }
  .hero span { display: block; font-size: 12px; line-height: 1.5; }
  .steps { margin-top: 22px; }
  .steps button, .steps button span { font-size: 0; }
  .steps button:not(:last-child)::after { margin-right: 9px; }
  .calculator { border-radius: 14px; }
  .panel { padding: 23px 17px; }
  .dimensions { grid-template-columns: 1fr; }
  .side-panel-options { grid-template-columns: 1fr; }
  .dimensions small { display: none; }
  .type-grid, .materials { grid-template-columns: 1fr; }
  .layout-presets { grid-template-columns: 1fr 1fr; }
  .layout-presets button { flex-direction: row; align-items: center; }
  .upper-controls { grid-template-columns: 1fr; }
  .presets { grid-template-columns: 1fr 1fr 1fr; }
  .presets small { display: none; }
  .profiles { grid-template-columns: 1fr; }
  .pricing-options { grid-template-columns: 1fr; }
  .section-select-row { align-items: flex-start; flex-direction: column; }
  .section-select-row select { width: 100%; max-width: none; min-width: 0; }
  .preview > header { align-items: flex-start; padding: 11px 13px; }
  .preview-tools { flex-wrap: wrap; }
  .preview-tools > small { width: 100%; text-align: right; }
  .stage { min-height: 340px; padding: 52px 48px 56px; perspective: 900px; }
  .geometry-summary { grid-template-columns: 1fr 1fr; }
  .geometry-summary span:last-child { grid-column: 1 / -1; }
  .wardrobe { max-width: 100%; }
  .section-size, .door-size { font-size: 7px; }
  .preview > footer { grid-template-columns: 1fr 1fr; }
  .preview > footer span:nth-child(3) { border-left: 0; border-top: 1px solid rgba(118, 144, 134, .2); }
  .preview > footer span:nth-child(4) { border-top: 1px solid rgba(118, 144, 134, .2); }
  .depth-visual-label { top: 16px; right: 14px; }
  .pricebar { min-height: 70px; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px; padding: 8px 12px; }
  .price-summary { min-width: 92px; justify-content: flex-start; }
  .price-summary > i, .price-summary button { display: none; }
  .price-summary > span > small { display: none; }
  .price-summary strong { font-size: 18px; white-space: nowrap; }
  .footer-actions { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); }
  .footer-actions > small { display: none; }
  .footer-actions button { min-height: 46px; padding: 0 12px; }
  .footer-actions .next { grid-column: 2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .footer-actions .back[hidden] + .next { grid-column: 1 / -1; }
  .modal > section { padding: 24px 18px; }
}
@media (max-width: 420px) {
  .brand strong { font-size: 11px; }
  .brand strong small { font-size: 8px; }
  .ghost-button { font-size: 9px; }
  .hero h1 { font-size: 30px; }
  .section-title h2 { font-size: 19px; }
  .section-title > b { width: 36px; height: 36px; }
  .presets strong { font-size: 8px; }
  .count-row { align-items: flex-start; }
  .layout-presets button { padding: 8px; }
  .layout-presets small { display: none; }
  .preview-tools > small { display: none; }
  .preview > header button { min-width: 28px; height: 28px; padding: 0 6px; font-size: 9px; }
  .stage { min-height: 300px; padding: 48px 42px 54px; }
  .height-label, .width-label, .depth-visual-label { font-size: 8px; }
  .preview > footer span { padding: 12px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
