:root{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;color:#242d37;background:#f5f6f8;font-synthesis:none;--accent:#d9562e;--line:#e4e7ea;--muted:#74808b;--soft:#f3f5f7;--ink:#242d37}*{box-sizing:border-box}body{margin:0;font-size:16px}button,input,select,textarea{font:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{opacity:.35;cursor:default}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,a:focus-visible{outline:3px solid #edaa83;outline-offset:3px}button{transition:background .15s,color .15s,border-color .15s}button:hover:not(:disabled){filter:brightness(.97)}.topbar{height:84px;display:flex;align-items:center;gap:34px;padding:0 28px;border-bottom:1px solid var(--line);background:white;position:relative;z-index:4}.brand{display:flex;gap:12px;align-items:center;color:var(--ink);text-decoration:none;white-space:nowrap}.brand-mark{display:grid;place-items:center;width:38px;height:38px;background:var(--accent);color:white;font-size:28px;font-weight:600;border-radius:10px;line-height:1}.brand strong{font-size:21px;letter-spacing:.04em}.brand strong span{font-size:14px;font-weight:400;letter-spacing:0;color:var(--muted)}.project-name{border-left:1px solid var(--line);padding-left:28px;min-width:110px;display:flex;flex-direction:column;gap:4px;flex:1}.project-name input{border:0;background:transparent;padding:0;width:100%;max-width:260px;font-size:15px;font-weight:600;color:var(--ink)}.project-name span{font-size:12px;color:var(--muted)}.header-actions{display:flex;gap:8px;align-items:center}.button{border:1px solid transparent;border-radius:9px;padding:11px 16px;font-size:14px;font-weight:600;display:inline-flex;justify-content:center;align-items:center;gap:16px;white-space:nowrap}.primary{background:var(--accent);color:white}.secondary{background:white;border-color:var(--line);color:var(--ink)}.icon-button{border:1px solid var(--line);border-radius:9px;width:38px;height:38px;background:white;font-size:23px;color:#5b6571}.workspace{display:grid;grid-template-columns:326px minmax(0,1fr);height:calc(100dvh - 84px);min-height:560px}.sidebar{background:white;border-right:1px solid var(--line);display:flex;flex-direction:column;min-height:0;z-index:3}.sidebar-heading{padding:25px 24px 20px;display:flex;justify-content:space-between;align-items:center}.eyebrow{font-size:11px;font-weight:650;letter-spacing:.13em;color:#808a94}.units{font-size:12px;background:var(--soft);padding:3px 7px;border-radius:4px;color:var(--muted)}.tabs{display:flex;margin:0 20px 4px;border-bottom:1px solid var(--line)}.tabs button{font-size:14px;font-weight:500;background:none;border:0;color:var(--muted);padding:14px 8px;flex:1;border-bottom:2px solid transparent;white-space:nowrap}.tabs button.active{color:var(--accent);border-bottom-color:var(--accent)}.panel{padding:22px 24px;overflow:auto;flex:1;scrollbar-width:thin}.group{margin-bottom:26px}.group h2{font-size:16px;font-weight:600;margin:0 0 17px}.group h3{font-size:14px;font-weight:600;margin:18px 0 10px}.field{display:block;margin:0 0 15px;font-size:14px;color:#606d79}.field>span{display:block;margin-bottom:7px}.input-wrap{position:relative}.input-wrap input{width:100%;border:1px solid #dce1e6;border-radius:7px;padding:10px 36px 10px 12px;color:var(--ink);background:white;font-size:15px;font-variant-numeric:tabular-nums}.input-wrap em{position:absolute;right:12px;top:12px;color:#8e98a2;font-size:12px;font-style:normal;pointer-events:none}.field input[type=range]{width:100%;accent-color:var(--accent);margin:10px 0 0}.fields-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}.fields-row .input-wrap input{padding-right:25px}.fields-row .input-wrap em{right:8px}.field select,textarea{width:100%;border:1px solid #dce1e6;border-radius:7px;padding:10px 11px;background:white;color:var(--ink);font-size:14px}.hint{font-size:13px;line-height:1.6;color:#7b8590;margin:9px 0}.segment{display:flex;background:var(--soft);padding:4px;border-radius:8px;gap:3px}.segment button{border:0;background:transparent;border-radius:6px;color:#7c8792;font-size:13px;padding:8px 6px;flex:1}.segment button.active{background:white;color:var(--ink);box-shadow:0 1px 4px #1e2a3520}.swatches{display:flex;gap:8px;margin:0 0 8px}.swatch{width:43px;height:43px;border:3px solid white;outline:1px solid #dee2e5;border-radius:9px;position:relative}.swatch.active{outline:2px solid var(--accent)}.swatch.active:after{content:'✓';position:absolute;bottom:0;right:1px;color:white;font-size:11px;background:var(--accent);width:15px;height:15px;border-radius:4px}.material-name{font-size:13px;color:var(--muted)}.divider{height:1px;background:var(--line);margin:24px 0}.sidebar-bottom{display:flex;justify-content:space-between;align-items:center;padding:13px 24px;border-top:1px solid var(--line)}.text-button{background:transparent;border:0;color:#687583;font-size:13px;padding:6px 0}.viewport{position:relative;overflow:hidden;min-width:0;background:#eef1f5}#scene{position:absolute;inset:0}#scene canvas{display:block;touch-action:none;width:100%;height:100%;outline:none}.viewport-top{position:absolute;left:32px;right:28px;top:28px;display:flex;align-items:start;justify-content:space-between;pointer-events:none}.viewport h1{font-size:22px;font-weight:500;letter-spacing:-.025em;margin:8px 0 0;color:#37434f}.live-tag{font-size:12px;color:#71808e;padding:7px 10px;border:1px solid #dce2e8;border-radius:6px}.viewbar{position:absolute;left:32px;top:112px;display:flex;padding:4px;gap:3px;border:1px solid #dde3e8;background:#ffffffec;box-shadow:0 3px 8px #2c394506;border-radius:9px}.viewbar button{border:0;border-radius:6px;background:transparent;padding:8px 12px;color:#798693;font-size:13px}.viewbar button.active{background:#344450;color:white}.scene-tools{position:absolute;right:28px;top:112px;display:flex;flex-direction:column;gap:7px}.tool-button{display:flex;gap:10px;align-items:center;border:1px solid #dce2e8;background:#ffffffed;border-radius:8px;padding:10px 12px;font-size:19px;color:#7b8791;box-shadow:0 3px 8px #2c394506}.tool-button span{font-size:12px}.tool-button.active{color:#344450}.selection-card{position:absolute;left:32px;bottom:72px;background:#fffffff0;border:1px solid #e1e5ea;border-radius:11px;padding:17px 20px;box-shadow:0 7px 24px #34445008;pointer-events:none}.selection-card #size-summary{font-size:24px;letter-spacing:-.025em;margin:9px 0 7px;font-variant-numeric:tabular-nums;font-weight:500}.selection-card small{font-size:12px;color:var(--muted);font-weight:400}.selection-card #count-summary{font-size:12px;color:#7c8895}.viewport-bottom{position:absolute;bottom:0;left:0;right:0;display:flex;justify-content:space-between;align-items:center;padding:17px 28px;border-top:1px solid #dfe5eb;color:#88929d;font-size:12px;background:#f5f7f9b0;pointer-events:none}.axis-key{display:flex;gap:12px;font-size:12px}.axis-key b:nth-child(1){color:#c38172}.axis-key b:nth-child(2){color:#80a08d}.axis-key b:nth-child(3){color:#829cc3}.touch-help{display:none}.section-buttons{display:flex;gap:6px;flex-wrap:wrap}.section-buttons button{flex:1;min-width:36px;border:1px solid var(--line);padding:10px 6px;background:white;border-radius:7px;color:var(--muted);font-size:14px}.section-buttons button.active{border-color:var(--accent);color:var(--accent);background:#fff7f2}.section-title{display:flex;justify-content:space-between;align-items:center;margin:21px 0 12px}.section-title h2{margin:0}.section-title small{color:var(--muted);font-size:12px}.stepper{display:flex;justify-content:space-between;align-items:center;margin:16px 0;font-size:14px;color:#606d79}.stepper>div{display:flex;align-items:center;gap:15px}.stepper button{width:31px;height:31px;background:white;border:1px solid var(--line);border-radius:6px;color:#586574}.stepper output{color:var(--ink);min-width:12px;text-align:center}.check-row{display:flex;align-items:center;justify-content:space-between;font-size:14px;color:#606d79;margin:19px 0}.check-row input{appearance:none;width:36px;height:21px;border-radius:16px;background:#dce1e6;position:relative;cursor:pointer;flex-shrink:0}.check-row input:before{content:'';width:15px;height:15px;position:absolute;background:white;border-radius:50%;left:3px;top:3px;box-shadow:0 1px 3px #0002;transition:transform .15s}.check-row input:checked{background:var(--accent)}.check-row input:checked:before{transform:translateX(15px)}.preset-list{display:grid;gap:7px}.preset{border:1px solid var(--line);border-radius:7px;background:white;text-align:left;padding:11px 12px;font-size:14px;display:flex;gap:12px;align-items:center;color:#53616d}.preset b{font-size:21px;font-weight:400;color:#9ba4ac}.note-box{font-size:13px;line-height:1.6;padding:12px;background:#f4f6f8;border-radius:7px;color:#6f7c88}.warning{font-size:13px;line-height:1.6;padding:12px;background:#fff6e9;border-left:2px solid #dba047;margin-bottom:8px;color:#876630}.section-add{display:flex;gap:8px;margin-top:12px}.section-add button{flex:1;font-size:13px;padding:9px 5px}#toast{position:fixed;bottom:26px;left:50%;transform:translateX(-50%) translateY(20px);z-index:15;background:#2e3b46;color:white;padding:13px 20px;border-radius:9px;font-size:14px;box-shadow:0 6px 30px #0002;opacity:0;pointer-events:none;transition:.2s;max-width:90vw}#toast.visible{opacity:1;transform:translateX(-50%) translateY(0)}#scene-error{position:absolute;inset:35% 20%;padding:24px;background:white;border:1px solid var(--line);border-radius:12px;font-size:16px;line-height:1.6;z-index:2}dialog{width:min(850px,94vw);max-height:90dvh;border:1px solid var(--line);border-radius:16px;padding:28px;color:var(--ink);box-shadow:0 25px 80px #15202f40}dialog::backdrop{background:#1e2a3d65;backdrop-filter:blur(4px)}.dialog-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px}.dialog-top h2{font-size:24px;letter-spacing:-.025em;margin:7px 0 0}.dialog-footer{display:flex;justify-content:flex-end;gap:10px;margin-top:24px}.brief-sheet{font-size:14px;line-height:1.6}.brief-sheet h3{font-size:16px;margin:24px 0 12px}.brief-sheet .brief-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.brief-sheet .brief-grid>div{padding:14px 16px;background:#f4f6f8;border-radius:8px}.brief-sheet p{margin:5px 0}.brief-sheet .hero-shot{width:100%;height:300px;object-fit:contain;background:#eef1f5;border-radius:9px}.brief-sheet table{border-collapse:collapse;width:100%;font-size:13px}.brief-sheet td,.brief-sheet th{padding:10px 9px;border-bottom:1px solid var(--line);text-align:left}.brief-sheet th{background:#f4f6f8;font-weight:500;color:#65717d}.brief-sheet ul{padding-left:20px}.brief-sheet .technical-note{color:#707c87;font-size:13px;border-top:1px solid var(--line);padding-top:15px;margin-top:20px}textarea{resize:vertical;min-height:90px;line-height:1.5}#print-area{display:none}.table-scroll{overflow:auto}#reset-dialog{max-width:440px}#reset-dialog p{font-size:15px;color:var(--muted);line-height:1.6}@media(min-width:1600px){.workspace{grid-template-columns:360px minmax(0,1fr)}.panel{padding:26px 28px}.viewport h1{font-size:26px}.scene-tools{right:32px}}@media(max-width:1100px){.topbar{gap:18px;padding:0 20px}.brand strong span{display:none}.project-name{padding-left:18px}.header-actions{gap:6px}.button{padding:10px 12px}.workspace{grid-template-columns:300px minmax(0,1fr)}.panel{padding:20px}.viewport-top{left:22px}.viewport h1{font-size:20px}.live-tag{display:none}.viewbar{left:22px}.scene-tools{right:16px;top:170px}.scene-tools span{display:none}.selection-card{left:22px}.mouse-help{max-width:70%;line-height:1.5}}@media(max-width:760px){.topbar{height:70px;padding:0 14px;gap:12px}.brand strong{font-size:18px}.brand-mark{width:31px;height:33px;font-size:24px}.brand{gap:7px}.project-name{display:none}.header-actions{margin-left:auto}.header-actions .icon-button{display:none}.header-actions .button{font-size:12px;padding:10px}.workspace{height:auto;min-height:0;display:flex;flex-direction:column}.viewport{height:56dvh;min-height:390px;order:0}.sidebar{order:1;min-height:430px;border:0;border-top:1px solid var(--line)}.sidebar-heading{padding:18px 20px 0}.tabs{margin-top:3px}.panel{overflow:visible}.group{max-width:620px;margin-left:auto;margin-right:auto}.viewport-top{top:18px;left:18px}.viewport-top h1{font-size:18px}.viewbar{top:80px;left:18px}.viewbar button{padding:7px 10px;font-size:12px}.scene-tools{top:80px;right:13px;gap:5px}.tool-button{padding:8px;font-size:17px}.selection-card{left:16px;bottom:48px;padding:10px 12px}.selection-card .eyebrow{font-size:10px}.selection-card #size-summary{font-size:18px;margin:5px 0}.selection-card #count-summary{font-size:11px}.viewport-bottom{padding:11px 16px;font-size:10px}.mouse-help{display:none}.touch-help{display:block}.sidebar-bottom{padding:12px 22px}.brief-sheet .brief-grid{grid-template-columns:1fr}.brief-sheet .hero-shot{height:230px}dialog{padding:20px}.dialog-footer{flex-wrap:wrap}.dialog-top h2{font-size:21px}#scene-error{inset:36% 15%;font-size:14px;padding:16px}}@media(prefers-reduced-motion:reduce){*{transition:none!important}}@media print{body{background:white}#app>*{display:none!important}#app>#print-area{display:block!important}#print-area{font-size:12px;color:black;padding:0}.brief-sheet .hero-shot{height:240px}.brief-sheet h3{break-after:avoid}.brief-sheet tr,.brief-grid{break-inside:avoid}.brief-sheet table{font-size:11px}.brief-sheet .technical-note{font-size:11px}.brief-sheet h1{font-size:26px}@page{size:A4;margin:15mm}}
/* Additional editing controls retain the existing workbench layout. */
.tabs{display:grid;grid-template-columns:1fr 1fr;gap:0 8px}.tabs button{padding:10px 6px;text-align:left}.tabs button.active{border-bottom-color:var(--accent)}.apartment-map{width:100%;max-height:230px;background:#f7f8fa;border:1px solid #dde3e8;border-radius:8px;margin:0 0 14px}.apartment-map polygon{fill:#e9edf0;stroke:white;stroke-width:55;transition:fill .15s}.apartment-map g{cursor:pointer}.apartment-map g:hover polygon,.apartment-map g:focus polygon{fill:#ffdcc9}.apartment-map g.selected polygon{fill:#efb79d}.apartment-map text{fill:#40525f;pointer-events:none}.room-placement-map{display:block;width:100%;max-height:260px;background:#f4f6f8;border:1px solid #dce2e8;border-radius:8px;cursor:crosshair}.room-placement-map .room-shape{fill:white;stroke:#71808d;stroke-width:18}.room-placement-map text{fill:#7b8c99;pointer-events:none}.cabinet-footprint{fill:#edd6c1;stroke:#d9562e;stroke-width:18}.cabinet-footprint.invalid{fill:#ffd9d9;stroke:#cf4545}.placement-warning{position:absolute;left:32px;bottom:200px;max-width:310px;border:1px solid #edc1b1;background:#fff4efee;color:#aa472f;padding:12px 15px;border-radius:9px;font-size:13px;line-height:1.5}.placement-warning[hidden]{display:none}.material-preview{height:115px;border:1px solid #dce1e6;border-radius:9px;background-size:180px;margin-bottom:14px}.upload-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.color-field{display:grid;grid-template-columns:1fr auto;align-items:center;gap:6px 12px}.color-field>span{grid-column:1/-1}.color-field input{width:100%;height:40px;border:1px solid #dce1e6;border-radius:7px;background:white;padding:4px}.color-field code{font-size:12px;color:#687682}.hint a{color:#657989}.scene-tools{gap:5px}.tool-button{padding:8px 11px}.tool-button#render-mode.active{color:#b14d2a;border-color:#dbac98;background:#fff2e9}#render-dialog{max-width:490px}#brief-dialog{width:min(1150px,96vw)}#brief-content .brief-sheet>h1{font-size:21px}.drawing-page{border:1px solid #dce2e8;margin:14px 0}.drawing-spec .brief-sheet{font-size:13px}.drawing-spec .brief-sheet td,.drawing-spec .brief-sheet th{font-size:11px}.drawing-spec .brief-sheet table{table-layout:auto}.drawing-spec .brief-grid{gap:10px}.dialog-footer{position:sticky;bottom:-28px;background:white;padding:16px 0 2px;border-top:1px solid var(--line)}#polygon-points{font-family:ui-monospace,monospace;font-size:13px}.field input[type=range]{min-height:22px}.group .button{white-space:normal}@media(max-width:1100px){.viewbar button{padding:8px 9px}.scene-tools{top:170px}.placement-warning{left:22px;bottom:195px;max-width:240px}}@media(max-width:760px){.tabs{display:flex;margin-top:10px;gap:0;overflow:auto}.tabs button{text-align:center;flex:1;font-size:13px;padding:12px 7px}.scene-tools{right:10px;top:127px;display:grid;grid-template-columns:1fr 1fr;gap:5px}.tool-button{padding:7px 8px}.tool-button:last-child{grid-column:2}.viewbar{top:78px;left:15px}.viewbar button{padding:7px 8px}.viewport{min-height:430px}.placement-warning{left:16px;bottom:152px;max-width:230px;padding:9px 12px;font-size:12px}.dialog-footer{bottom:-20px}.drawing-controls{padding:10px;gap:7px}.drawing-controls .button{font-size:12px;padding:8px}.drawing-spec{padding:4mm}.drawing-spec .brief-grid{grid-template-columns:1fr}.apartment-map{max-height:280px}.room-placement-map{max-height:300px}}@media print{#app>#print-area{padding:0!important}.drawing-page{border:0!important}.drawing-spec .brief-sheet{font-size:11px}.drawing-spec .brief-sheet .hint{font-size:10px}.drawing-spec .brief-sheet .technical-note{font-size:10px}.drawing-spec .table-scroll{overflow:visible}.dialog-footer{display:none!important}}

.storage-warning{padding:12px 20px;font-size:12px;line-height:1.5;background:#fff4e4;color:#94632d;border-top:1px solid #efd4ae}.storage-warning[hidden]{display:none}

/* Independent parts and room furniture reuse the workbench controls. */
.tabs{display:grid;grid-template-columns:repeat(3,1fr);gap:0;margin:0 18px 4px}.tabs button{padding:10px 4px;font-size:12px}.add-parts,.catalog-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin:15px 0}.add-parts button:first-child{grid-column:1/-1}.catalog-grid .button,.add-parts .button{padding:10px 6px;font-size:13px;gap:4px}.part-list{margin:10px 0;max-height:310px;overflow:auto;border:1px solid var(--line);border-radius:9px}.part-row{display:flex;align-items:center;justify-content:space-between;width:100%;padding:11px 12px;border:0;border-bottom:1px solid var(--line);background:white;font-size:12px;color:var(--muted);text-align:left}.part-row:last-child{border-bottom:0}.part-row b{font-size:13px;color:var(--ink)}.part-row small{display:block;font-size:10px;margin-top:3px}.part-row.active{background:#fff3e9;box-shadow:inset 3px 0 var(--accent)}.part-editor{padding:14px;background:#f6f7f8;border-radius:10px;margin:14px 0}.part-editor h3{margin:0 0 15px}.mini-actions{display:flex;gap:8px;justify-content:space-between;flex-wrap:wrap}.mini-actions button{font-size:12px;padding:6px 0}.danger{color:#b84635}.empty-fill{padding:25px 12px;text-align:center;border:1px dashed #cfd5da;border-radius:10px;margin:14px 0;font-size:14px;color:var(--ink)}.empty-fill span{display:block;font-size:12px;line-height:1.6;color:var(--muted);margin-top:6px}details summary{cursor:pointer;font-size:14px;font-weight:600;margin:12px 0}.section-add .button{padding:10px;font-size:12px}.scene-tools{max-height:calc(100% - 240px);overflow:auto;scrollbar-width:thin}.mouse-help{font-size:11px}.room-placement-map text{pointer-events:none} 
@media(max-width:700px){.tabs{grid-template-columns:repeat(5,1fr);margin:0 10px}.tabs button{font-size:11px}.scene-tools{max-height:calc(100% - 170px)}}
