:root{color-scheme:light;--ink:#21342b;--green:#315947;--forest:#203d31;--muted:#5d6a62;--border:#dcded6;--paper:#f8f8f3;--white:#fff;--sage:#e4ece2;--sans:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font:15px/1.45 var(--sans)}button,input,select{font:inherit}button,a,input,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer;color:inherit}button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible{outline:3px solid #8c6535;outline-offset:2px}button:disabled{opacity:.45;cursor:default}[hidden]{display:none!important}a{color:var(--green)}svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.55;stroke-linecap:round;stroke-linejoin:round;vertical-align:middle;flex:none}h1,h2,p{margin:0}h2{font-size:17px;letter-spacing:-.02em}
.masthead{min-height:93px;background:var(--forest);color:#faf8ee;display:flex;justify-content:space-between;align-items:center;padding:17px clamp(18px,3vw,48px);gap:18px}.brand,.header-tools{display:flex;align-items:center;gap:13px}.brand-icon{width:47px;height:47px;border:1px solid #c6d2ba69;border-radius:12px;display:grid;place-items:center;color:#e6d9b4}.brand-icon svg{width:25px;height:25px}.brand h1{font-family:Georgia,serif;font-weight:normal;letter-spacing:-.025em;font-size:clamp(25px,3vw,35px);line-height:1.08}.brand h1 span{color:#d1dcca}.brand p{font-size:13px;color:#d6e1d4;margin-top:4px}.header-tools{gap:8px}#save-status{font-size:13px;color:#d6e1d4;margin-right:9px}.button{display:inline-flex;align-items:center;justify-content:center;gap:7px;border:1px solid transparent;border-radius:8px;padding:8px 12px;background:none;text-decoration:none;font-size:14px;font-weight:600;white-space:nowrap;cursor:pointer;min-height:38px}.button svg{width:17px;height:17px}.light{color:#f9faf2;background:#ffffff0d;border-color:#ffffff2c}.light:hover{background:#ffffff23}.outline{border-color:var(--border);background:#fff;color:var(--forest)}.outline:hover,.subtle:hover{background:var(--sage)}.primary{background:var(--green);color:#fff}.primary:hover{background:var(--forest)}.subtle{color:var(--green);padding:5px 8px;min-height:32px}
main{display:grid;grid-template-columns:minmax(0,1fr) minmax(304px,354px);gap:16px;padding:19px clamp(13px,2.5vw,38px) 22px;max-width:1920px;margin:auto}.workspace,.sidebar{border:1px solid var(--border);border-radius:13px;background:#fff;overflow:hidden;min-width:0}.workspace{display:flex;flex-direction:column}.toolbar,.view-footer{display:flex;justify-content:space-between;align-items:center;gap:7px;padding:10px 12px}.toolbar{border-bottom:1px solid var(--border);flex-wrap:wrap}.segmented{display:flex;padding:3px;gap:3px;border-radius:9px;background:#eef0e9}.segmented button,.aside-tabs button{border:0;background:transparent;font-size:14px;font-weight:650;display:flex;align-items:center;gap:6px;justify-content:center;padding:8px 11px;border-radius:7px;white-space:nowrap}.segmented button[aria-pressed=true]{background:#fff;color:var(--forest);box-shadow:0 1px 4px #253e3421}.segmented svg,.aside-tabs svg{width:17px;height:17px}.viewport{position:relative;isolation:isolate;min-height:480px;height:calc(100dvh - 230px);max-height:1050px;overflow:hidden;background:radial-gradient(ellipse at 49% 45%,#f3f2ea,#e9e9e1);touch-action:none}.viewport.walk{background:#e1e9e6}.viewport canvas,#render,#labels{position:absolute;inset:0;width:100%;height:100%;display:block}#labels{pointer-events:none}.room-label{position:absolute;transform:translate(-50%,-50%);pointer-events:auto;border:1px solid #fcfbf5e0;background:#fffdf1ed;color:#303d33;border-radius:5px;box-shadow:0 2px 6px #201e1828;padding:3px 7px;font-size:12px;font-weight:650;white-space:nowrap}.room-label.active{background:var(--forest);color:white;border-color:#496b59}.scene-heading{pointer-events:none;position:absolute;top:17px;left:18px;display:grid;gap:2px;text-shadow:0 1px 3px #fff}.scene-heading strong{font-size:16px}.scene-heading span{font-size:13px;color:#47574b}.walk .scene-heading{background:#fffef1e9;padding:7px 10px;border-radius:7px;text-shadow:none}.zoom{position:absolute;right:13px;bottom:15px;display:grid;border:1px solid #c9cec2;border-radius:8px;overflow:hidden;box-shadow:0 2px 8px #29463812}.zoom button,#compass,#walk-controls button{background:#fbfbf5;color:var(--forest);border:0;width:37px;height:37px;font-size:22px;line-height:1}.zoom button+button{border-top:1px solid var(--border)}.zoom button:hover,#compass:hover,#walk-controls button:hover{background:var(--sage)}#compass{height:auto;width:53px;position:absolute;bottom:14px;left:15px;border:1px solid #c9cec2;border-radius:7px;padding:4px 0;display:grid;justify-items:center;gap:2px}#compass small{font-size:10px;line-height:1.4}#walk-controls{position:absolute;bottom:14px;left:12px;text-align:center;display:grid;gap:3px;justify-items:center}#walk-controls button{border:1px solid var(--border);border-radius:6px;touch-action:none}#graphics-message{position:absolute;bottom:65px;left:12px;background:#fff;padding:8px;border-radius:5px;max-width:300px}.view-footer{min-height:50px;color:var(--muted);font-size:13px;flex-wrap:wrap}.view-footer>div{display:flex;align-items:center;gap:7px;flex-wrap:wrap}input[type=checkbox]{accent-color:var(--green);vertical-align:middle}
.sidebar{display:flex;flex-direction:column;max-height:calc(100dvh - 135px);min-height:595px}.aside-tabs{display:flex;padding:6px;gap:5px;background:#f5f6f0;border-bottom:1px solid var(--border)}.aside-tabs button{flex:1}.aside-tabs button[aria-pressed=true]{background:var(--sage);color:#244d3b}.side-body{padding:15px 14px;overflow:auto}.room-select{display:grid;gap:5px;margin-bottom:17px;font-weight:650}.room-select select,form input:not([type=color]){width:100%;min-width:0;border:1px solid #cfd5ca;border-radius:7px;padding:8px;background:#fff;color:var(--ink);min-height:38px}.section-title{display:flex;align-items:baseline;justify-content:space-between;gap:6px;margin:0 0 9px}.section-title span,.muted,.piece small,.placed-item small{color:var(--muted);font-size:13px}.filters{display:flex;gap:5px;flex-wrap:wrap;margin-bottom:11px}.filters button{border:1px solid var(--border);border-radius:25px;background:#fff;padding:4px 9px;font-size:13px}.filters button[aria-pressed=true]{background:var(--green);color:#fff;border-color:var(--green)}.catalog{display:grid;grid-template-columns:1fr 1fr;gap:7px}.piece{border:1px solid var(--border);border-radius:8px;text-align:left;display:grid;grid-template-columns:32px 1fr;gap:6px;align-items:center;padding:7px;background:#fbfbf7;min-height:59px}.piece:hover{border-color:#8fa691;background:var(--sage)}.piece svg{width:27px;height:27px}.piece strong,.placed-item strong{display:block;font-size:13px;line-height:1.2}.piece small,.placed-item small{display:block;font-size:12px;margin-top:3px}.placed-title{margin-top:16px}.placed-item,.room-row{display:flex;justify-content:space-between;align-items:center;width:100%;background:none;border:0;border-bottom:1px solid #eceee7;border-radius:0;padding:9px 3px;text-align:left;gap:7px}.placed-item:hover,.room-row:hover{background:#f0f4ec}.room-row.active{font-weight:650;color:#244f3b}.room-row small{color:var(--muted);white-space:nowrap}.selected{background:#f1f5ed;border:1px solid #d3ded0;border-radius:9px;padding:9px;margin-bottom:16px}.selected h2{margin-bottom:6px}.selected label,#size-form label{display:grid;gap:3px;font-size:13px;font-weight:600}.fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:7px 0}.fields.two{grid-template-columns:repeat(2,minmax(0,1fr))}.piece-actions,.dialog-actions{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}.piece-actions .button{font-size:13px;padding:5px 7px;min-height:31px}.selected input[type=color]{width:100%;height:38px;border:1px solid #cfd5ca;border-radius:7px;background:#fff}.selected .muted{margin:4px 0}#size-form{background:#f4f6ef;padding:10px;border:1px solid #dbe0d2;border-radius:9px;margin:12px 0 8px}.measurement{display:grid;grid-template-columns:1fr 1fr;gap:4px}.measurement input{padding:6px!important}#size-form output{display:block;margin-top:6px;color:#815124;font-size:13px}dialog{border:1px solid var(--border);border-radius:15px;color:var(--ink);width:min(740px,calc(100% - 26px));padding:20px;box-shadow:0 16px 80px #182b2851}dialog::backdrop{background:#162a2388}#backup-dialog{max-width:440px}.dialog-head{display:flex;justify-content:space-between;align-items:start;gap:10px;margin-bottom:8px}.dialog-head h2{font:26px Georgia,serif}.close{background:#f1f4ed;border:0;border-radius:7px;font-size:24px;width:34px;height:34px;line-height:1}.reference-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin:16px 0}.reference-grid a{color:var(--ink);border:1px solid var(--border);border-radius:8px;overflow:hidden;text-decoration:none;background:#f7f7f1}.reference-grid img{width:100%;aspect-ratio:1.45;object-fit:cover;display:block}.reference-grid strong{display:block;padding:7px;font-size:14px}#toast{position:fixed;z-index:5;bottom:17px;left:50%;transform:translateX(-50%);max-width:95%;padding:10px 16px;border-radius:8px;background:#263e31;color:#fff;box-shadow:0 2px 10px #20282155}
@media(max-width:900px){main{grid-template-columns:minmax(0,1fr) 287px;gap:10px}.sidebar{min-height:540px}.viewport{min-height:430px}.catalog{gap:5px}.piece{grid-template-columns:25px 1fr;padding:5px}.piece svg{width:23px}.toolbar{padding:7px}.segmented button{padding:7px 8px}}
@media(max-width:700px){.masthead{min-height:77px;padding:12px;flex-wrap:wrap;gap:8px}.brand-icon{width:36px;height:36px}.header-tools #save-status{display:none}.header-tools .button{min-height:33px;padding:4px 7px}.header-tools .button svg{display:none}main{grid-template-columns:1fr;padding:9px}.viewport{height:58vh;min-height:325px}.sidebar{max-height:none;min-height:0}.catalog{grid-template-columns:repeat(3,minmax(0,1fr))}.segmented button{font-size:13px}.view-footer{padding:7px}.room-label{font-size:10px;padding:2px 4px}.scene-heading{top:8px;left:9px}.scene-heading strong{font-size:14px}.scene-heading span{font-size:11px}}
@media(max-width:400px){.segmented button svg,#reset-camera span:last-child{display:none}.catalog{grid-template-columns:repeat(2,1fr)}}
