:root{--pine:#10362b;--pine2:#1d5a42;--gold:#d8b375;--cream:#f9faf7;--ink:#193c2d;--muted:#6f8175;--line:#dce5dd;--pale:#edf3ec;--orange:#a85d2e;font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink)}*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:#eaf0e8;overflow-x:hidden}button,select,input{font:inherit}button{cursor:pointer;touch-action:manipulation}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #d5a764;outline-offset:2px}[hidden]{display:none!important}.app{min-height:100dvh}.header{height:70px;background:#0d2c24;color:white;display:flex;align-items:center;justify-content:space-between;gap:15px;padding:0 clamp(16px,2.8vw,42px)}.brand{display:flex;align-items:center;gap:13px;min-width:0}.brand-mark{width:43px;height:43px;border:1.5px solid #6a9176;border-radius:13px;display:grid;place-items:center;color:#e6c98c;font-size:27px}.brand strong{display:block;font-size:clamp(18px,2vw,24px);letter-spacing:.035em}.brand em{font-style:normal;color:var(--gold)}.brand small{display:block;color:#b7cbc0;letter-spacing:.17em;font-size:9px;font-weight:650;margin-top:5px}.header-right{display:flex;align-items:center;gap:8px}.header-btn{border:1px solid #5e8173;color:white;background:transparent;border-radius:11px;padding:10px 14px;font-size:12px;font-weight:650;min-height:41px}.header-btn:hover{background:#214e3f}.build-note{color:#aebfb5;font-size:11px;margin-right:10px;white-space:nowrap}.subheader{background:#fbfcfa;display:flex;align-items:center;justify-content:space-between;padding:12px clamp(15px,2.5vw,36px);gap:14px;border-bottom:1px solid var(--line);min-height:67px}.product{display:flex;align-items:baseline;gap:13px;min-width:0}.product strong{font-size:15px;white-space:nowrap}.product span{color:var(--muted);font-size:11px}.segmented{display:flex;background:#e9f0e8;border-radius:13px;padding:4px;gap:3px;max-width:100%;overflow:auto}.segmented button{border:0;background:transparent;padding:10px 13px;border-radius:9px;color:#51675a;font-size:12px;font-weight:700;white-space:nowrap;min-height:40px}.segmented button.active{background:#194f3b;color:white;box-shadow:0 2px 7px #14341e25}.layout{display:grid;grid-template-columns:minmax(0,1fr) 325px;gap:13px;padding:13px clamp(12px,2vw,28px);max-width:1800px;margin:auto;align-items:start}.stage,.inspector{border-radius:18px;background:white;border:1px solid #d8e3d7;box-shadow:0 8px 26px #27462a10;overflow:hidden}.stage{min-width:0}.viewport{position:relative;background:#e3eae1;height:clamp(475px,calc(100dvh - 250px),850px);min-height:390px;overflow:hidden}#canvas3d{width:100%;height:100%;display:block;touch-action:none;cursor:grab}#canvas3d:active{cursor:grabbing}.render-overlay,.dimension-overlay,.measurement-svg{position:absolute;inset:0;pointer-events:none;width:100%;height:100%}.measurement-svg{overflow:visible;z-index:5}.dimension-overlay{z-index:4}.dimension-label{position:absolute;transform:translate(-50%,-50%);font-size:11px;font-weight:750;white-space:nowrap;color:#24402c;border:1px solid #d9c79a;background:#fffceeeb;border-radius:7px;padding:4px 7px;box-shadow:0 2px 6px #172b1d2c}.scene-top{position:absolute;top:17px;left:18px;display:flex;align-items:center;gap:7px;pointer-events:none;z-index:3}.scene-pill{background:#194934e8;color:white;border-radius:9px;padding:9px 11px;font-size:12px;font-weight:750}.state-pill{background:#f6f8f4e7;color:#476653;border:1px solid #dde7da;padding:8px 10px;border-radius:9px;font-size:11px}.state-pill[data-state="error"]{background:#fff1e4;color:#8c461d;border-color:#e5b68d}.toolbar{position:absolute;bottom:13px;left:13px;z-index:7;display:flex;gap:6px;max-width:calc(100% - 26px);overflow-x:auto;padding-bottom:1px}.toolbar button{background:#fffefaed;color:#29513a;font-weight:700;font-size:12px;padding:9px 12px;border-radius:9px;border:1px solid #dce5d6;white-space:nowrap;min-height:43px;box-shadow:0 3px 7px #12251f18}.toolbar button.active{background:var(--pine2);color:white}.toolbar button:hover{background:#e9f5e9}.toolbar button.active:hover{background:var(--pine2)}.cameras{display:flex;gap:6px;overflow-x:auto;scrollbar-width:thin;padding:10px 12px;border-top:1px solid var(--line)}.cameras button{padding:9px 12px;border:1px solid #dbe7db;color:#446451;background:#fafcf9;border-radius:9px;font-size:11px;white-space:nowrap;min-height:38px}.cameras button.active{background:#dceadf;border-color:#82ae95;color:#174530;font-weight:750}.stage-help{padding:0 14px 12px;font-size:11px;color:#89968b}.level-strip{display:flex;align-items:center;gap:8px;padding:9px 12px;background:#e9f3e9;border-top:1px solid #d8e8d8;flex-wrap:wrap}.level-strip span{font-size:10px;letter-spacing:.09em;color:#637e6b;font-weight:800;margin-right:5px}.level-strip button{border:1px solid #d0e0d0;background:#fff;border-radius:8px;padding:9px 13px;font-size:12px;min-height:40px}.level-strip button.active{background:var(--pine2);color:#fff}.inspector{max-height:calc(100dvh - 184px);overflow:auto}.sheet-handle{display:none}.panel-head{display:flex;align-items:center;justify-content:space-between;padding:20px 19px 14px;border-bottom:1px solid var(--line)}.panel-head small,.section-title{font-size:10px;font-weight:800;letter-spacing:.13em;color:#75947e}.panel-head h2{font-size:17px;line-height:1.3;margin:5px 0 0}.panel-head button{display:none;background:#edf4ed;border:0;border-radius:50%;width:33px;height:33px}.item-info{padding:15px 19px;border-bottom:1px solid var(--line)}.info-status{display:inline-flex;border-radius:100px;padding:5px 10px;background:#eaf2e9;color:#52725a;font-size:10px;font-weight:700}.item-info dl{margin:14px 0}.item-info dl div{display:flex;justify-content:space-between;gap:9px;margin:10px 0;font-size:11px}.item-info dt{color:#77907e;flex:0 0 34%}.item-info dd{margin:0;text-align:right;font-weight:650;overflow-wrap:anywhere}.item-info p{background:#f2f6ef;border-left:3px solid #8da891;padding:11px;font-size:11px;line-height:1.55;color:#5b725e;margin:0}.section{padding:17px 19px;border-bottom:1px solid var(--line)}.section-title{margin-bottom:13px}.switch-grid{display:grid;gap:12px}.switch-grid label{display:flex;align-items:center;gap:10px;font-size:12px;cursor:pointer}.switch-grid input{accent-color:#256b4f;width:18px;height:18px;flex-shrink:0}.select-label{display:block;font-size:12px;color:#53745d;margin:6px 0 7px}.section select,.section input[type=search]{border:1px solid #cddfd0;border-radius:10px;background:#fff;color:#245339;padding:11px 12px;width:100%;min-height:44px;font-size:13px}.help-small{font-size:11px;line-height:1.55;color:#7b8d7c;margin:10px 0 0;overflow-wrap:anywhere}.item-list{display:flex;gap:6px;flex-wrap:wrap;max-height:178px;overflow:auto;margin-top:10px}.item-list button{border:1px solid #d9e6da;border-radius:8px;background:#f7fbf7;color:#42634a;padding:8px 9px;font-size:11px;min-height:32px}.item-list button.active{background:#255d45;color:#fff}.exports button{width:100%;margin-bottom:8px;border:1px solid #b8d0bc;background:#f4f9f3;color:#285b3e;padding:10px;border-radius:9px;font-weight:650;font-size:12px;min-height:43px}.footer{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px clamp(16px,2vw,28px) 15px;font-size:10px;color:#7c9281}.loading{position:absolute;inset:0;z-index:10;display:grid;place-content:center;justify-items:center;gap:9px;background:#eaf0e8ef;color:#355a3c;font-size:13px}.loading small{font-size:11px;color:#819486}.spinner{width:31px;height:31px;border:3px solid #c6d4cb;border-top-color:#256747;border-radius:50%;animation:spin .85s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.plan{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:10px;background:#e7eee5}.plan svg{height:min(83%,680px);max-width:95%;filter:drop-shadow(0 6px 12px #284f291e)}.plan-title{color:#315c43;font-size:12px;letter-spacing:.07em;font-weight:850}.plan-message{text-align:center;font-size:11px;color:#698270;max-width:320px;padding:0 12px}.plan [data-item]{cursor:pointer}.plan [data-item]:hover{stroke:#f8e0a1;stroke-width:3}.measure-panel{position:absolute;right:16px;top:64px;z-index:7;background:#fffdf5f2;border:1px solid #dec7aa;border-radius:12px;box-shadow:0 8px 22px #334b3033;padding:12px;width:min(310px,calc(100% - 32px))}.measure-header{display:flex;align-items:center;justify-content:space-between;gap:10px}.measure-header strong{font-size:13px}.measure-header button{border:0;background:#e8f0e4;border-radius:8px;padding:7px;font-size:11px;color:#37563b}.measure-panel p{font-size:12px;line-height:1.5;margin:8px 0;color:#263e2c}.measure-panel small{color:#87957f;font-size:10px}.tour-panel{position:absolute;z-index:8;right:16px;top:64px;background:#fffcf4f5;border:1px solid #b4c8b1;border-radius:14px;width:min(340px,calc(100% - 32px));padding:14px;box-shadow:0 14px 30px #2b423b40;max-height:calc(100% - 137px);overflow:auto}.tour-heading{display:flex;justify-content:space-between;align-items:center;font-size:11px;color:#6c866f;font-weight:800;letter-spacing:.09em;margin-bottom:6px}.tour-heading button{border:0;background:#e9f1e6;border-radius:7px;width:31px;height:31px}.tour-panel>strong{font-size:16px;display:block}.tour-panel p{font-size:12px;color:#4e6754;line-height:1.55;margin:8px 0 13px}.tour-actions{display:flex;justify-content:space-between;gap:12px}.tour-actions button{border:1px solid #bfd1bd;padding:10px 16px;border-radius:9px;background:#fff;color:#305641;font-size:12px;min-height:41px}.primary,.tour-actions .primary{background:#1c5a43;color:white;border:1px solid #1c5a43;border-radius:9px;padding:10px 15px;min-height:42px}.scrim{position:fixed;inset:0;background:#0e2d2160;z-index:29}.toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);background:#183e30;color:white;padding:12px 17px;border-radius:10px;z-index:50;max-width:min(90vw,480px);font-size:12px;box-shadow:0 7px 18px #142f234a}dialog{border:1px solid #cddaca;border-radius:17px;box-shadow:0 18px 50px #172d2660;padding:20px;max-width:min(530px,94vw);width:100%}dialog::backdrop{background:#102b2455}.dialog-head{display:flex;justify-content:space-between;align-items:center}.dialog-head button{border:0;background:#edf3eb;border-radius:8px;width:35px;height:35px}.dialog-head strong{font-size:17px}dialog pre{background:#eef4ee;padding:15px;white-space:pre-wrap;word-break:break-word;color:#375e48;font-size:12px;line-height:1.7;border-radius:10px}
@media(max-width:1250px){.build-note{display:none}.layout{grid-template-columns:minmax(0,1fr) 290px}}
@media(max-width:1000px){.layout{grid-template-columns:minmax(0,1fr)}.viewport{height:min(68dvh,720px)}.inspector{max-height:none}.subheader{gap:10px}.product{flex-direction:column;gap:2px}}
@media(max-width:680px){.header{height:59px;padding:8px 10px}.brand-mark{width:34px;height:34px;font-size:20px}.brand strong{font-size:16px}.brand small{font-size:8px;letter-spacing:.09em}.header-btn{padding:8px 10px;font-size:11px;min-height:38px}.header-right{gap:5px}.header-right .header-btn:nth-child(3){display:none}.header-right #btnHealth span{display:none}.subheader{padding:9px 8px 8px;display:block;min-height:0}.product{flex-direction:row;justify-content:center;flex-wrap:wrap;gap:6px;margin-bottom:7px}.product strong{font-size:12px}.product span{font-size:10px}.segmented{width:100%;justify-content:space-between}.segmented button{font-size:10px;padding:9px 6px;flex:1;min-width:0}.layout{padding:0;gap:0}.stage{border-radius:0;border:0}.viewport{height:calc(100dvh - 205px);min-height:390px;max-height:780px}.scene-top{left:9px;top:9px;gap:5px}.scene-pill,.state-pill{font-size:10px;padding:7px}.toolbar{left:7px;bottom:8px;max-width:calc(100% - 14px);gap:4px}.toolbar button{font-size:11px;padding:8px 10px;min-height:44px}.cameras{padding:7px;gap:4px}.cameras button{min-height:42px;padding:9px 11px;font-size:11px}.stage-help{display:none}.level-strip{padding:7px;gap:5px}.level-strip span{display:none}.level-strip button{flex:1;padding:9px 5px;min-width:75px}.tour-panel{right:8px;top:49px;width:min(325px,calc(100% - 16px));max-height:calc(100% - 110px)}.measure-panel{right:8px;top:49px;max-width:calc(100% - 16px)}.inspector{position:fixed;bottom:0;left:0;right:0;z-index:30;max-height:82dvh;overflow:auto;border-radius:19px 19px 0 0;transform:translateY(105%);transition:transform .2s ease;box-shadow:0 -15px 45px #1935233b;padding-bottom:env(safe-area-inset-bottom)}.inspector.open{transform:translateY(0)}.sheet-handle{display:block;margin:9px auto 0;width:45px;height:5px;background:#bfd1bd;border-radius:4px}.panel-head{padding:12px 17px}.panel-head button{display:block}.footer{font-size:9px;display:block;line-height:1.5;padding:10px}.footer span+span{display:block;margin-top:3px}.dimension-label{font-size:9px;padding:3px 5px}}
@media(prefers-reduced-motion:reduce){.inspector{transition:none}.spinner{animation:none}}

/* 2D title gets its own space: never overlap the renderer status badges. */
.viewport.is-2d .scene-top{display:none}
.viewport.is-2d .plan{padding-top:48px}
.viewport.is-2d .plan-title{position:absolute;top:14px;left:0;right:0;text-align:center;z-index:2}
@media(max-width:680px){.viewport.is-2d .plan{padding-top:52px}.viewport.is-2d .plan-title{top:18px}}

#projectPicker{max-width:240px;background:#f4f8f3;border:1px solid #c9dccc;border-radius:8px;padding:7px;color:#1c513b;font-size:12px}
