/* The editor uses floating panels, leaving the complete viewport to the room. */
:root{--accent:#2b9ef0;--green:#166ba6;--line:#d8d8d8;--ink:#444;--soft:#f8f8f8}
body{font:14px Arial,Helvetica,sans-serif;background:#eee}
main{position:fixed;inset:0;height:auto;display:block}
#workspace{position:absolute;inset:0;width:100%;height:100%}
#viewport{position:absolute;inset:0}
header{position:fixed;top:10px;left:10px;right:10px;height:36px;padding:0 9px;z-index:12;border:0;border-radius:3px;gap:6px;background:#fff;color:#444;box-shadow:0 1px 5px #0002;pointer-events:auto}
header .brand{color:#303030;font-size:18px;letter-spacing:-.7px;white-space:nowrap}
header .brand span{font-size:11px;background:#2b9ef0;color:#fff;padding:3px;margin-left:5px}
header input{color:#444;font-size:12px}#project-name{width:145px}
header .divider{margin:0 3px;background:#ddd}
header button{min-height:30px;background:#fff;color:#444;border:0;padding:5px 8px;font-weight:400}
header button:hover{background:#f0f0f0}header button.primary,header button.primary:hover{background:#2b9ef0;color:#fff;border:0;border-radius:0;height:36px;margin-right:-9px;padding:5px 18px}
.save-state{font-size:10px;color:#888!important}
.toolbar{position:fixed;top:54px;left:480px;right:10px;height:32px;z-index:13;border:0;background:transparent;padding:0;gap:8px;justify-content:flex-end;pointer-events:none}
.toolbar .tools{pointer-events:auto;background:#fff;border-radius:3px;box-shadow:0 1px 5px #0002;gap:0;padding:0 3px}
.toolbar .tools button{min-height:30px;padding:5px 7px;font-size:11px}
.toolbar .tools:first-child{position:fixed;left:194px;top:12px;box-shadow:none;border-radius:0}
header .divider,header #project-name,header .save-state{display:none}
.toolbar .tools span{margin:0 3px}
nav{position:absolute;left:10px;top:60px;bottom:auto;max-height:calc(100dvh - 90px);width:200px;padding:0;z-index:9;border:0;border-radius:3px;background:#fff;box-shadow:0 1px 5px #0002;overflow:auto}
nav button{width:100%;min-height:35px;height:auto;display:flex;flex-direction:row;justify-content:flex-start;gap:8px;text-align:left;font-size:14px;line-height:1.2;padding:7px 9px;border-radius:0;color:#444}
nav button svg{width:21px;height:21px;flex-shrink:0}nav button.active{background:#f5f5f5;color:#166ba6}
#library{position:absolute;left:210px;top:60px;bottom:30px;width:260px;z-index:9;background:#fafafa;border:0;border-left:1px solid #ddd;box-shadow:2px 1px 5px #0002;border-radius:0 3px 3px 0}
.panel-title{padding:7px 10px;min-height:35px;height:35px;background:#fff;border:0}.panel-title h2{font-size:12px;font-weight:400}.panel-title button{font-size:22px;color:#999}
#collapse{display:block}#library-content{padding:8px 7px}.cards{gap:8px 4px}.card,.source-card .card{border:0;background:#fff;border-radius:3px;min-height:145px;height:145px}
.card-art{height:116px;background:#fff}.card-art img{max-height:116px}.card b{padding:5px 2px;font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%;display:block}
.source-card select{border:1px solid #ccc;border-radius:2px;padding:2px 3px;margin:0;min-height:23px;height:23px;font-size:11px}
.search{min-height:25px;height:25px;border-radius:2px;padding:3px 6px;font-size:12px;margin:10px 0 12px}
.breadcrumbs{display:flex;align-items:center;flex-wrap:wrap;gap:4px;font-size:11px;padding:4px 1px}.breadcrumbs button{border:0;padding:0;min-height:20px;background:transparent;color:#166ba6;text-decoration:underline;border-radius:0;font-size:11px}
.catalog-folders{margin:3px 0 10px}.catalog-folders button{display:flex;width:100%;justify-content:space-between;align-items:center;border:0;border-radius:0;padding:8px 5px;background:transparent;text-align:left;font-size:13px}.catalog-folders button:hover{background:#eee}.catalog-folders button span{font-size:18px;color:#999}
#inspector{display:none;position:absolute;right:10px;top:96px;bottom:30px;width:265px;z-index:10;border:0;border-radius:3px;box-shadow:0 1px 7px #0003;background:#fafafa}
.has-selection #inspector{display:block}#inspector-content{padding:12px}#inspector .panel-title{justify-content:flex-start;gap:8px}#inspector .unit{margin-left:auto}.field{margin-bottom:10px;gap:4px}.field input,.field select{min-height:28px;padding:4px 5px;font-size:12px;border-color:#ccc}.field label{font-size:11px}.section-label{margin:14px 0 8px;font-size:10px}.primary{background:#2b9ef0;color:#fff;border-color:#2b9ef0}.primary:hover{background:#168ce0}
.scene-top{top:auto;bottom:50px;left:auto;right:16px;z-index:7}.view-switch{box-shadow:0 1px 5px #0002}.view-switch button.active{background:#2b9ef0;color:#fff}.scene-bottom{bottom:20px;left:auto;right:16px;gap:8px;z-index:7}.scene-bottom #room-badge{display:none}#scene-hint,#empty-state{display:none!important}
footer{position:fixed;bottom:0;left:0;right:0;height:24px;padding:0 10px;z-index:11;background:#ffffffdd;border:0;gap:8px;font-size:10px}footer button{min-height:20px;font-size:10px;background:transparent}footer #total{border:0}.status-dot{width:5px;height:5px;background:#2b9ef0}
.dimension{background:#ffffffaa;border:0;color:#222;font:11px Arial;border-radius:0;padding:2px 4px}
#toast{bottom:35px}.library-collapsed #library{display:none}
@media(max-width:1100px){.toolbar{left:480px}.toolbar .tools:last-child{max-width:calc(100vw - 490px);overflow-x:auto;white-space:nowrap}.toolbar .tools:first-child{left:185px}header #help{margin-left:auto}.toolbar #focus{display:none}}
@media(max-width:780px){header .brand{font-size:15px}.toolbar .tools:first-child{left:160px}.toolbar .tools:first-child #duplicate,.toolbar .tools:first-child #remove{display:none}header #save{font-size:0}header #save:after{content:'↓';font-size:18px}nav{width:165px}nav button{font-size:12px;padding:7px 6px}#library{left:175px;width:245px}.toolbar{left:430px}.toolbar .tools:last-child{max-width:calc(100vw - 440px)}#inspector{top:96px;width:240px}.has-selection #library{bottom:40%}#status{max-width:30vw;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}}
@media(max-width:600px){header{left:5px;right:5px;top:5px}.toolbar .tools:first-child{top:7px;left:145px}.toolbar #new,.toolbar #open{display:none}.toolbar{top:46px;left:auto;right:5px}.toolbar .tools:last-child{max-width:calc(100vw - 175px)}nav{left:5px;top:85px;width:150px;max-height:calc(100dvh - 115px)}#library{left:155px;top:85px;width:calc(100vw - 165px);bottom:30px}#inspector{top:auto;bottom:30px;right:5px;max-height:55dvh;width:min(280px,calc(100vw - 15px))}.has-selection #library{bottom:57dvh}.scene-top{bottom:35px;right:10px}.scene-bottom{display:none}footer #count{display:none}header #estimate{font-size:11px;padding:5px 8px}header #help{display:none}}
@media print{header,.toolbar,main,footer{display:none!important}dialog[open]{display:block}}
.has-selection:not(.inspector-open) #inspector{display:none}
#object-actions{position:absolute;z-index:14;display:none;grid-template-columns:repeat(3,31px);gap:4px;transform:translateX(-50%);padding:4px;pointer-events:auto}
.has-selection #object-actions{display:grid}
#object-actions button{height:31px;width:31px;min-height:31px;border-radius:50%;border:1px solid #ddd;padding:6px;background:#fff;box-shadow:0 1px 4px #0002}
#object-actions button:hover{background:#e6f2fc}
#object-actions svg{width:18px;height:18px;fill:none;stroke:#666;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round}
.machining-toggle{display:flex;align-items:center;gap:7px;font-size:12px;margin:15px 0}.machining-toggle input{min-height:16px;width:16px}
.room-tabs{display:flex;flex-wrap:wrap;gap:3px;margin-bottom:16px}.room-tabs button{border:0;min-height:28px;padding:5px;font-size:12px;background:transparent}.room-tabs button.active{background:#e7f2fc;color:#166ba6}.material-swatch.chosen{outline:2px solid #2b9ef0;outline-offset:-2px}.material-swatch .card-art img{width:100%;height:116px;object-fit:cover}
nav button.nav-child{min-height:27px;padding-top:5px;padding-bottom:5px;font-size:12px}.nav-child.active{background:#f5f5f5;color:#166ba6}
.server-project-card{border-bottom:1px solid #ddd;padding:12px 1px}.server-project-card b,.server-project-card small{display:block}.server-project-card small{font-size:10px;color:#888;margin:5px 0}.server-project-actions{display:flex;gap:3px;flex-wrap:wrap}.server-project-actions button,.server-history button{font-size:11px;min-height:27px;padding:4px 6px}.server-history:empty{display:none}

.scene-dimension-svg{position:absolute;inset:0;overflow:visible;pointer-events:none}.scene-dimension-svg path{fill:none;stroke:#111;stroke-width:.65}.scene-dimension-svg .dimension-extension{stroke:#333;stroke-width:.5;stroke-dasharray:2 2}.scene-dimension-svg polygon{fill:#111}.scene-dimension-svg text{font:12px Arial,Helvetica,sans-serif;fill:#111}

.facade-selection{display:flex;align-items:center;gap:10px;padding:10px 4px;border-bottom:1px solid #ddd;min-height:95px}.facade-selection>img{width:64px;height:80px;object-fit:contain}.facade-selection>div{min-width:0}.facade-selection small{display:block;font-size:10px;color:#666;margin-bottom:4px}.facade-selection b{display:block;font-size:13px}.selected-decor{display:flex;align-items:center;gap:7px;margin-top:8px;font-size:12px}.selected-decor img,.selected-decor>span:first-child{width:30px;height:30px;object-fit:cover;flex-shrink:0;border:1px solid #bbb}.facade-tabs{display:flex;gap:5px;margin:12px 0}.facade-tabs button{flex:1;font-size:12px}.facade-tabs [aria-selected=true]{background:#e5f2fc;border-color:#2b9ef0;color:#166ba6}.facade-gallery{display:grid;grid-template-columns:1fr 1fr;gap:8px}.facade-swatch{padding:5px;display:flex;flex-direction:column;gap:6px;text-align:left;font-size:12px;min-width:0;overflow-wrap:anywhere}.facade-swatch-art{display:block;width:100%;height:85px;border:1px solid #e2e2e2}.facade-swatch-art img{display:block;width:100%;height:100%;object-fit:contain}.facade-swatch.chosen{outline:2px solid #2b9ef0;outline-offset:-2px}.facade-swatch:focus-visible{outline:3px solid #166ba6}.facade-pages{display:flex;justify-content:space-between;align-items:center;gap:6px;margin-top:10px;font-size:12px}.facade-apply-bar{position:sticky;bottom:-10px;background:#fff;padding:8px 0;border-top:1px solid #ddd;margin-top:12px}.facade-apply-bar small{display:block;margin-top:6px;font-size:11px;color:#666}#facade-error{font-size:12px;color:#a33;margin:0 0 6px}
