@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700;800&display=swap');

:root {
 --bg:#eef2f5; --surface:#fff; --ink:#19333f; --muted:#526575;
 --border:#dce5e9; --teal:#08736f; --teal-light:#e7f4f0;
 --purple:#766292; --amber:#a97923; --font:'Be Vietnam Pro',system-ui,-apple-system,'Segoe UI',sans-serif;
 --shadow:0 6px 24px #19333f06,0 1px 3px #19333f04;
 color-scheme:light;
}
*{box-sizing:border-box}
[hidden]{display:none!important}
body{margin:0;background:var(--bg);color:var(--ink);font:16px/1.6 var(--font);-webkit-font-smoothing:antialiased}
button,input,select,textarea{font:inherit;color:inherit}
button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}
button{border:0;background:none;cursor:pointer}
button:disabled{opacity:.45;cursor:default}
a{color:inherit;text-decoration:none}
button,a,input,select,textarea{outline-offset:4px}
:focus-visible{outline:3px solid #249b90;outline-offset:4px}
svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
h1,h2,h3,p{margin-top:0}
.icon-defs{position:absolute;width:0;height:0;overflow:hidden}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* Application shell */
.site-header{height:82px;padding:0 clamp(20px,3vw,52px);display:flex;align-items:center;justify-content:space-between;gap:24px;background:#ffffffed;border-bottom:1px solid var(--border)}
.brand{display:flex;align-items:center;gap:12px;font-size:26px;font-weight:750;letter-spacing:-1.2px;line-height:1.15;flex-shrink:0}
.brand-mark{width:44px;height:46px;border-radius:14px;display:grid;place-items:center;background:var(--teal);color:#fff;box-shadow:0 4px 10px #08736f20,inset 0 1px 0 #ffffff40;transform:rotate(-4deg)}
.brand-mark svg{width:29px;height:29px;transform:rotate(4deg)}
.brand-light{color:var(--teal);font-weight:500}
.brand small{display:block;margin-top:6px;font-size:10px;font-weight:550;letter-spacing:1.25px;color:var(--muted)}
.main-nav{display:flex;align-items:center;gap:6px;padding:5px;background:#f0f4f6;border:1px solid #e8eef0;border-radius:13px}
.nav-link{display:flex;align-items:center;gap:8px;padding:10px 13px;border-radius:9px;font-size:14px;font-weight:500;white-space:nowrap;color:var(--muted);transition:background .2s,color .2s}
.nav-link svg{width:17px;height:17px}
.nav-link.active{background:#fff;color:var(--teal);box-shadow:0 2px 6px #19333f0b}
.nav-link:hover{color:var(--teal)}
.count{padding:0 6px;border-radius:6px;background:var(--teal-light);color:var(--teal);font-size:12px}
.button{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:10px 16px;min-height:42px;border-radius:10px;font-size:14px;font-weight:600;line-height:1.4;transition:background .2s,box-shadow .2s,transform .2s;white-space:nowrap}
.button svg{width:17px;height:17px}
.button:hover{transform:translateY(-1px)}
.button:active{transform:translateY(0)}
.primary{color:#fff;background:var(--teal);box-shadow:0 3px 8px #08736f1a,inset 0 1px 0 #ffffff20}
.primary:hover{background:#065e5b;box-shadow:0 5px 12px #08736f24}
.secondary,.subtle{color:#34515d;background:#fff;border:1px solid #d4e1e4}
.secondary:hover,.subtle:hover{background:#f1f8f6;border-color:#b6d4cd}
.icon-button{display:grid;place-items:center;flex-shrink:0;width:36px;height:36px;border-radius:9px;color:var(--muted);transition:background .2s,color .2s}
.icon-button svg{width:18px;height:18px}
.icon-button:hover,.icon-button.active{background:var(--teal-light);color:var(--teal)}
main{max-width:1540px;padding:26px clamp(16px,3vw,48px) 0;margin:auto}
.lab-layout,.workspace{display:block;min-width:0;width:100%}
.panel{background:var(--surface);border:1px solid var(--border);border-radius:16px;box-shadow:var(--shadow)}

/* Modelling workspace: a single inspector and an open canvas. */
.scene-panel{display:grid;grid-template-columns:320px minmax(0,1fr);grid-template-rows:auto auto auto;overflow:hidden;border-radius:20px;box-shadow:0 12px 40px #19333f07,0 1px 4px #19333f05}
.scene-header{grid-column:1/-1;grid-row:1;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 24px;border-bottom:1px solid var(--border);background:#fff}
.scene-title{display:flex;align-items:center;gap:12px}
.scene-title h2{margin:0;font-size:17px;font-weight:650;letter-spacing:-.3px}
.scene-heading-icon{display:grid;place-items:center;width:34px;height:34px;background:#f0f6f5;border:1px solid #e2edeb;border-radius:10px;color:var(--teal)}
.live-label{display:flex;align-items:center;gap:7px;padding:5px 10px;border:1px solid #d3e7df;border-radius:20px;background:#f1f9f4;color:#35634d;font-size:12px;font-weight:550;white-space:nowrap}
.live-dot{display:block;width:6px;height:6px;border-radius:50%;background:#39866d;box-shadow:0 0 0 3px #39866d10}
.toolbox{grid-column:1;grid-row:2/4;display:flex;flex-direction:column;min-height:0;min-width:0;border-right:1px solid var(--border);background:#f7fafb;overflow:hidden}
.toolbox-header{display:flex;align-items:center;flex-wrap:wrap;gap:12px;padding:19px 18px 15px}
.toolbox-header h3{display:flex;align-items:center;gap:8px;font-size:15px;font-weight:650;margin:0;order:0}
.toolbox-header h3 svg{width:18px;height:18px;color:var(--teal)}
.toolbox-collapse{order:1;margin-left:auto;font-size:12px;color:var(--muted);padding:5px 7px;border-radius:6px}
.toolbox-collapse:hover{background:#e7efef;color:var(--teal)}
.toolbox-interaction{order:2;display:flex;width:100%;padding:4px;gap:4px;background:#eaf0f2;border:1px solid #e2e9ec;border-radius:11px}
.toolbox-interaction button{display:flex;align-items:center;justify-content:center;gap:7px;flex:1;padding:8px;border-radius:8px;font-size:14px;font-weight:500;color:var(--muted)}
.toolbox-interaction button svg{width:16px;height:16px}
.toolbox-interaction button.active{background:#fff;color:var(--teal);box-shadow:0 2px 5px #19333f0c}
.toolbox-view-controls{order:3;width:100%;display:flex;align-items:center;justify-content:space-between;gap:4px}
.toolbox-view-controls .icon-button{width:34px;height:34px;font-size:21px;background:#fff;border:1px solid #dde6e9}
.toolbox-view-controls .icon-button:hover,.toolbox-view-controls .icon-button.active{background:#e7f4f0;border-color:#b3d5cb;color:var(--teal)}
.toolbox-view-controls>span{width:1px;height:20px;background:var(--border);margin:0 2px}
.toolbox-tabs{display:grid;grid-template-columns:1fr 1fr;gap:5px;padding:0 18px 16px;border-bottom:1px solid var(--border)}
.toolbox-tab{display:flex;align-items:center;justify-content:flex-start;gap:9px;min-height:40px;padding:9px 12px;border:1px solid transparent;border-radius:9px;font-size:14px;font-weight:500;color:var(--muted);transition:background .2s,color .2s,border-color .2s}
.toolbox-tab svg{width:17px;height:17px}
.toolbox-tab:hover{background:#edf3f4;color:var(--teal)}
.toolbox-tab.active{background:#e3f2ed;color:#075f58;border-color:#c5e1d7;font-weight:650}
.toolbox-panels{padding:18px;flex:1;min-height:0;overflow-y:auto}
.toolbox-pane{margin:0;padding:0;min-width:0;border:0}
.roof-tools{display:grid;gap:13px}
.range-field{padding:15px 14px;background:#fff;border:1px solid #dce6e9;border-radius:12px;box-shadow:0 2px 3px #19333f02;min-width:0;transition:border-color .2s,box-shadow .2s}
.range-field label{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:18px;color:#405b66;font-size:14px;font-weight:500;line-height:1.5}
.input-value{display:flex;align-items:center;gap:5px;flex-shrink:0;padding:5px 7px;border:1px solid #d7e3e5;border-radius:7px;background:#f7fafb;min-width:0;max-width:54%}
.input-value:focus-within{border-color:var(--teal);box-shadow:0 0 0 3px #08736f12;background:#fff}
.input-value input{min-width:0;width:7ch;padding:0;background:transparent;border:0;outline:0;text-align:right;font-size:16px;font-weight:600;font-variant-numeric:tabular-nums;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}
.input-value input::-webkit-inner-spin-button{-webkit-appearance:none;appearance:none}
.input-value small{font-size:12px;font-weight:400;color:var(--muted)}
input[type=range]{display:block;width:100%;height:5px;margin:10px 0 12px;border:0;border-radius:6px;-webkit-appearance:none;appearance:none;cursor:pointer;accent-color:var(--teal);background:#e8eeed}
input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:17px;height:17px;border-radius:50%;border:3px solid #fff;background:var(--teal);box-shadow:0 0 0 1px #08736f,0 2px 5px #19333f20;transition:box-shadow .2s}
input[type=range]::-moz-range-thumb{width:12px;height:12px;border-radius:50%;border:3px solid #fff;background:var(--teal);box-shadow:0 0 0 1px #08736f,0 2px 5px #19333f20}
input[type=range]:hover::-webkit-slider-thumb{box-shadow:0 0 0 4px #08736f18,0 2px 5px #19333f20}
input[type=range].sun-range::-webkit-slider-thumb{background:#b28432;box-shadow:0 0 0 1px #b28432,0 2px 5px #19333f20}
input[type=range].sun-range::-moz-range-thumb{background:#b28432;box-shadow:0 0 0 1px #b28432}
.range-ends{display:flex;align-items:center;justify-content:space-between;gap:5px;color:var(--muted);font-size:12px;font-variant-numeric:tabular-nums}
.roof-tools .position-label,.roof-tools .two-inputs{display:none}
.range-field.is-changing{border-color:#73b8a8;box-shadow:0 0 0 3px #08736f0c}
.is-changing .input-value{background:#edf8f3;border-color:#83beae}
.is-changing>label{color:var(--teal)}
.is-roof-resizing .scene [data-roof-surface]{stroke:var(--teal);stroke-width:2.3;filter:drop-shadow(0 0 3px #08736f50)}

/* Forms and specialised tools */
.text-input,select,.sun-fields input{width:100%;min-width:0;padding:10px 12px;border:1px solid #cfdde2;border-radius:9px;background:#fff;font-size:16px;color:var(--ink);resize:vertical}
.text-input:focus,.sun-fields input:focus{border-color:var(--teal)}
.text-input::placeholder{color:#687f8a;opacity:1}
select{-webkit-appearance:none;appearance:none;padding-right:32px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23526575' stroke-width='1.7'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 10px center}
.target-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px 12px;align-items:end}
.target-form-grid label,.form-label{display:block;font-size:14px;font-weight:500;color:#405b66}
.target-form-grid .text-input{margin-top:6px}
.target-form-grid .button{width:100%;align-self:end}
.furniture-actions{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin-top:18px}
.furniture-actions>.button{width:100%;justify-content:flex-start}
.furniture-actions>label{display:flex;align-items:center;gap:10px;font-size:14px;color:var(--muted)}
.furniture-actions select{width:auto;font-size:14px;padding:7px 30px 7px 10px}
.toolbox-note,.sun-footnote{font-size:12px;line-height:1.8;color:var(--muted);margin:13px 0 0}
.sun-tools{display:grid;gap:16px}
.sun-mode-tabs{display:flex;gap:4px;padding:4px;background:#e8eef0;border-radius:10px}
.sun-mode-tabs button{flex:1;padding:8px;border-radius:7px;color:var(--muted);font-size:14px;font-weight:500}
.sun-mode-tabs button.active{color:var(--teal);background:#fff;box-shadow:0 2px 4px #19333f0b}
.time-controls{padding:14px;background:#fffcf4;border:1px solid #e8dfc9;border-radius:12px}
.time-controls>label{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:14px;color:#665631}
.time-controls .model-label{display:block;margin-bottom:16px}
.model-label select{display:block;margin-top:7px;font-size:14px;background-color:#fff;border-color:#ded6c2}
.time-controls strong{font-size:18px;color:#805b1d;font-variant-numeric:tabular-nums}
.time-controls .range-ends{font-size:10px;color:#705f3a}
.sun-fields{display:grid;gap:12px;margin-top:15px}
.sun-fields label{font-size:14px;color:#665631}
.sun-fields input{display:block;margin-top:5px}
.sun-explainer{font-size:13px;line-height:1.8;color:#77571d;margin:12px 0 0}
.angle-presets{display:flex;gap:7px}
.angle-presets button{flex:1;min-height:36px;background:#fffaf0;border:1px solid #e4d9bd;border-radius:8px;color:#805b1d;font-size:14px}
.angle-presets button:hover,.angle-presets button.active{background:#f8e9bd;border-color:#bb9344;color:#6b4b18}
.display-tools{display:grid;gap:12px}
.mode-switch{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px;padding:4px;background:#eaf0f2;border-radius:10px}
.mode-switch button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;padding:9px 3px;border-radius:7px;font-size:12px;line-height:1.4;color:var(--muted)}
.mode-switch button svg{width:17px;height:17px}
.mode-switch button.active{color:var(--teal);background:#fff;box-shadow:0 2px 4px #19333f0a}
.toggle-row{display:flex;align-items:center;justify-content:space-between;gap:10px;position:relative;cursor:pointer;padding:12px 0;border-bottom:1px solid #e3eaed}
.toggle-row>span:first-child{display:flex;align-items:center;gap:8px;font-size:14px;color:#405b66}
.toggle-row svg{width:16px;height:16px}
.toggle-row input{position:absolute;right:0;width:36px;height:26px;opacity:0;cursor:pointer}
.switch{width:34px;height:20px;flex-shrink:0;border-radius:20px;background:#cddadd;pointer-events:none;transition:background .2s}
.switch:after{content:'';display:block;width:14px;height:14px;margin:3px;background:#fff;border-radius:50%;box-shadow:0 1px 3px #19333f16;transition:transform .2s}
.toggle-row input:checked+.switch{background:var(--teal)}
.toggle-row input:checked+.switch:after{transform:translateX(14px)}
.toggle-row input:focus-visible+.switch{outline:3px solid #249b90;outline-offset:3px}
.line-key{width:16px;border-top:2px dashed;flex-shrink:0}
.amber-line{color:#b58a3c}.purple-line{color:#9480ae}.teal-line{color:#408b78}
.model-entrance-button{justify-self:start;margin-top:6px;font-size:13px;padding:10px}

/* Model canvas */
.scene{grid-column:2;grid-row:2;position:relative;min-width:0;width:100%;height:clamp(510px,65vh,690px);overflow:hidden;touch-action:none;cursor:grab;background-color:#fafdfe;background-image:radial-gradient(#bed1d548 .7px,transparent .7px),radial-gradient(ellipse at 50% 42%,#fff 10%,#f1f7f8 100%);background-size:22px 22px,100% 100%}
.scene:active{cursor:grabbing}
.scene>svg{display:block;width:100%;height:100%;stroke:none;font-family:var(--font);stroke-linejoin:round;-webkit-user-select:none;user-select:none}
#world{transform-origin:50% 65%}
[data-entrance-layer]{transform-box:view-box;transform-origin:50% 65%}
.scene-badge{position:absolute;left:20px;top:20px;display:flex;align-items:center;gap:11px;max-width:calc(100% - 40px);padding:11px 14px;background:#fffffff0;-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);border:1px solid #dce7e9;border-radius:13px;box-shadow:0 4px 14px #19333f06;font-size:12px;color:var(--muted);pointer-events:none}
.badge-sun{display:grid;place-items:center;width:36px;height:36px;border-radius:11px;background:#fff1d0;color:#926820}
.badge-sun svg{width:22px;height:22px}
.scene-badge strong{display:block;margin-top:1px;font-size:12px;font-weight:550;color:#725b2d;line-height:1.7}
.scene-badge i{font-style:normal;padding:0 3px}
.scene-footer{grid-column:2;grid-row:3;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;padding:15px 20px;border-top:1px solid var(--border);background:#fff}
.legend{display:flex;align-items:center;gap:20px;font-size:12px;color:#405b66}
.legend>span{display:flex;align-items:center;gap:7px}
.legend i{width:10px;height:10px;border-radius:3px}
.roof-key{background:#afa0c3}.shadow-key{background:#e7ca86}.target-key{background:#cce3d7;border:1px dashed #468a70}
.scene-hint{display:flex;align-items:center;gap:5px;font-size:12px;color:var(--muted)}
.scene-hint svg{width:15px;height:15px}
.scene-hint i{font-style:normal;margin:0 2px}
.scene text{paint-order:stroke;stroke:#fcfdfd;stroke-width:3px;stroke-linejoin:round}
.scene .point-label{font-size:12px;fill:#6b5581;font-weight:600}
.scene .dimension-label{font-size:11px;fill:#635371}
.scene .ground-label{font-size:10px;fill:#356957;letter-spacing:.4px}
.scene .axis-label{font-size:10px;fill:#58695f}
.scene [data-object]{cursor:move}
.scene [data-object="roof"]{cursor:grab}
.scene svg line,.scene svg text{pointer-events:none}
.scene .move-handle{pointer-events:all}
.scene .move-handle path{pointer-events:none}
.scene .move-handle circle{filter:drop-shadow(0 3px 4px #08736f25)}
.scene .move-handle:hover circle{fill:#eaf5ed;stroke-width:3}
.layout-editor{grid-column:1/-1;grid-row:4;padding:20px 24px;border-top:1px solid var(--border);background:#f7fafb}
.layout-instruction{font-size:14px;color:var(--muted);margin-bottom:15px}
.layout-editor>svg{display:block;width:100%;height:400px;stroke:none;touch-action:none;cursor:crosshair;background:#fff;border:1px solid var(--border);border-radius:12px}
.layout-editor [data-object]:not([data-object=""]){cursor:move}
.layout-editor text{font-family:var(--font);pointer-events:none}
.layout-status{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin-top:12px;font-size:13px;color:var(--muted)}
.layout-status strong{color:var(--teal);font-weight:600}
.layout-status>span:last-child{margin-left:auto}

/* Measurable results */
.results{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-top:20px}
.metric{position:relative;padding:20px 22px;overflow:hidden;transition:border-color .2s,box-shadow .2s}
.metric:hover{border-color:#bed1d6;box-shadow:0 8px 24px #19333f09}
.metric-label{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:14px;font-weight:500;color:#405b66}
.metric-icon{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;flex-shrink:0}
.metric-icon svg{width:18px;height:18px}
.purple-bg{background:#eeeaf6;color:#705b8c}.amber-bg{background:#fff1d2;color:#926923}.teal-bg{background:#e4f3ed;color:#29775f}
.metric-value{display:flex;align-items:baseline;gap:7px;font-size:36px;font-weight:650;letter-spacing:-1.3px;line-height:1.4;margin-top:10px;font-variant-numeric:tabular-nums}
.metric-value small{font-size:16px;font-weight:400;color:var(--muted);letter-spacing:0}
.metric p{font-size:12px;color:var(--muted);margin:6px 0 0}
.coverage-metric{background:#0b615d;border-color:#0b615d;color:#fff;box-shadow:0 5px 14px #0b615d16}
.coverage-metric:hover{border-color:#0b615d}
.coverage-metric .metric-label,.coverage-metric .metric-value small{color:#e0f2ec}
.coverage-metric .metric-icon{background:#ffffff16;color:#e0f2ec}
.progress-track{height:6px;margin-top:17px;border-radius:8px;background:#dce9e4;overflow:hidden}
.progress-track>span{display:block;height:100%;width:90%;background:var(--teal);border-radius:8px}
.coverage-metric .progress-track{background:#ffffff25}
.coverage-metric .progress-track>span{background:#a9e3c5}
.insights-grid{display:grid;grid-template-columns:1.05fr 1fr;gap:20px;margin-top:20px}
.geometry-card,.assessment-card{padding:24px}
.card-kicker{display:flex;align-items:center;gap:9px;font-size:12px;letter-spacing:1px;font-weight:600;color:var(--muted);margin-bottom:18px}
.small-icon{display:grid;place-items:center;width:28px;height:28px;border-radius:8px}
.small-icon svg{width:15px;height:15px}
.geometry-card h2,.assessment-card h2{font-size:17px;line-height:1.5;font-weight:650;letter-spacing:-.3px;margin:0 0 8px}
.geometry-card p,.assessment-card>p{font-size:14px;color:var(--muted);line-height:1.8;margin:0}
.formula-row{display:flex;align-items:center;justify-content:space-between;gap:18px}
.formula{display:flex;align-items:center;gap:13px;margin-top:18px;color:#66517d;font:24px Georgia,serif;white-space:nowrap}
.fraction{display:inline-flex;flex-direction:column;align-items:center;font-size:20px;line-height:1.4}
.fraction>span:first-child{width:100%;text-align:center;border-bottom:1px solid #a69bb8}
.formula-equals{color:var(--muted);font-size:17px}
.formula-equals strong{font-size:25px;font-weight:500;color:#66517d}
.triangle-diagram{width:160px;height:112px;flex-shrink:1;stroke:none;font:11px var(--font);fill:#665574}
.diagram-small{font-size:10px;fill:#746781}
.text-button{display:inline-flex;align-items:center;gap:7px;padding:0;font-size:14px;font-weight:550;line-height:1.7;color:var(--teal)}
.text-button:hover{text-decoration:underline;text-underline-offset:4px}
.text-button svg{width:16px;height:16px}
.geometry-card>.text-button{width:100%;border-top:1px solid #e9e4ee;padding-top:16px;margin-top:20px;color:#6a527e}
.assessment-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:8px}
.assessment-heading h2{margin:0}
.status-pill{display:inline-block;flex-shrink:0;padding:4px 8px;border-radius:6px;background:#fbefcf;color:#795719;font-size:12px;font-weight:500;white-space:nowrap}
.status-pill.met{background:#e0f1e8;color:#245d45}
.constraint-row{display:flex;align-items:center;gap:14px;padding:13px 0;border-bottom:1px solid var(--border);font-size:14px;color:var(--muted)}
.constraint-row strong{font-weight:550;color:#34515d;margin-left:auto}
.constraint-row .text-button{font-size:13px}
.assessment-card>.text-button{margin-top:16px}
.page-footer{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:26px 2px;color:var(--muted);font-size:12px}
.page-footer>span:first-child{display:flex;align-items:center;gap:8px}
.page-footer i{font-style:normal;color:#8da4ad}
.footer-dot{width:5px;height:5px;border-radius:50%;background:#568e7b}

/* Dialogs and saved experiments */
dialog{width:min(640px,calc(100vw - 32px));max-height:88vh;padding:30px;border:1px solid #d8e5e6;border-radius:20px;background:#fff;color:var(--ink);overflow-y:auto;box-shadow:0 30px 120px #14332f30}
dialog::backdrop{background:#102d3a66;-webkit-backdrop-filter:blur(7px);backdrop-filter:blur(7px)}
.dialog-header{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}
.dialog-header h2{font-size:23px;font-weight:650;letter-spacing:-.7px;line-height:1.45;margin:0}
.eyebrow{display:block;margin-bottom:10px;font-size:12px;font-weight:600;color:var(--teal);letter-spacing:1.2px}
.dialog-intro{font-size:15px;color:var(--muted);line-height:1.8;margin:14px 0 24px}
.guide-steps article{display:flex;gap:16px;margin:23px 0}
.guide-steps article>span{display:grid;place-items:center;width:34px;height:34px;flex-shrink:0;border-radius:9px;background:var(--teal-light);color:var(--teal);font-size:13px;font-weight:600}
.guide-steps h3{font-size:16px;font-weight:600;margin:0 0 6px}
.guide-steps p{font-size:14px;color:var(--muted);line-height:1.85;margin:0}
.guide-note{display:flex;gap:12px;padding:16px;background:#edf5f2;border-radius:11px;color:#3b6156;font-size:14px;line-height:1.8;margin:22px 0}
.guide-note svg{width:20px;height:20px;margin-top:2px}
.guide-note p{margin:0}
.form-label{margin:18px 0 7px}
.form-label span{font-size:12px;color:var(--muted);font-weight:400}
.storage-note{font-size:12px;color:var(--muted);line-height:1.8;margin:16px 0}
.dialog-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:24px}
.wide-dialog{width:min(880px,calc(100vw - 32px))}
.empty-state{padding:40px 20px;text-align:center;border:1px dashed #bdcfd0;border-radius:13px;background:#f9fcfb}
.empty-state svg{width:34px;height:34px;color:#5d9d88}
.empty-state h3{font-size:18px;margin:12px 0 8px}
.empty-state p{font-size:14px;color:var(--muted);margin:0}
.design-card{border:1px solid var(--border);border-radius:12px;padding:20px;margin:14px 0}
.design-card h3{font-size:17px;font-weight:600;margin:0;overflow-wrap:anywhere}
.design-top{display:flex;align-items:center;justify-content:space-between;gap:12px}
.design-date{font-size:12px;color:var(--muted)}
.design-note{font-size:14px;color:var(--muted);margin:10px 0;overflow-wrap:anywhere;white-space:pre-wrap}
.design-summary{display:flex;gap:18px;flex-wrap:wrap;font-size:14px;color:var(--muted);margin:12px 0}
.design-summary strong{color:var(--teal);font-weight:600}
.design-actions{display:flex;align-items:center;gap:18px;margin-top:16px}
.delete-design{color:#a4493f}
.table-wrap{overflow:auto}
.conditions-table{width:100%;border-collapse:collapse;font-size:14px;white-space:nowrap}
.conditions-table th{padding:12px 10px;border-bottom:1px solid var(--border);font-size:12px;font-weight:500;text-align:left;color:var(--muted)}
.conditions-table td{padding:18px 10px;border-bottom:1px solid #e7edef}
.import-label{cursor:pointer}
.toast{position:fixed;bottom:24px;left:50%;z-index:100;max-width:calc(100vw - 32px);padding:13px 20px;border:1px solid #ffffff20;border-radius:12px;background:#183f39;color:#fff;font-size:14px;box-shadow:0 8px 24px #173b3225;opacity:0;transform:translate(-50%,12px);pointer-events:none;transition:opacity .2s,transform .2s}
.toast.visible{opacity:1;transform:translate(-50%,0)}

/* Responsive layouts preserve the full width of the model. */
@media(min-width:1500px){.scene-panel{grid-template-columns:336px minmax(0,1fr)}.toolbox-panels{padding:20px}.toolbox-header{padding:20px}.toolbox-tabs{padding-left:20px;padding-right:20px}}
@media(max-width:1200px){.site-header{gap:15px;padding:0 24px}.brand small{display:none}.main-nav{gap:2px}.nav-link{font-size:13px;padding:9px}.scene-panel{grid-template-columns:300px minmax(0,1fr)}.toolbox-header{padding:16px 14px 14px}.toolbox-tabs{padding:0 14px 14px}.toolbox-panels{padding:14px}.scene-hint{display:none}.metric{padding:17px}.metric-value{font-size:32px}.metric-icon{width:30px;height:30px}.metric-label{font-size:13px}.scene-badge{left:16px;top:16px;padding:9px 11px}.geometry-card,.assessment-card{padding:20px}.triangle-diagram{width:120px}.formula{gap:9px}}
@media(max-width:960px){
 .site-header{height:auto;min-height:78px;flex-wrap:wrap;padding:15px 20px;gap:14px}.main-nav{order:3;width:100%;justify-content:center}.nav-link{flex:1;justify-content:center}.site-header>.button{margin-left:auto}
 main{padding:20px 20px 0}.scene-panel{display:flex;flex-direction:column}.scene-header{order:0}.scene{order:1;height:clamp(390px,55vw,560px)}.scene-footer{order:2}.toolbox{order:3;border-right:0;border-top:1px solid var(--border)}.layout-editor{order:4}
 .toolbox-header{padding:15px 18px;gap:12px}.toolbox-header h3{order:0}.toolbox-interaction{order:1;width:auto;flex:0 0 220px;margin-left:auto}.toolbox-view-controls{order:3;flex:1;width:auto;max-width:310px}.toolbox-collapse{order:2;margin-left:0}.toolbox-tabs{grid-template-columns:repeat(4,minmax(0,1fr));padding:0 18px 14px}.toolbox-tab{justify-content:center}.toolbox-panels{padding:18px;overflow:visible}.roof-tools{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.range-field{padding:14px 12px}.range-field label{display:block}.input-value{width:100%;max-width:none;justify-content:flex-end;margin-top:9px}.input-value input{width:100%}
 .furniture-tools .target-form-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.furniture-actions>.button{width:auto}.sun-tools{grid-template-columns:1fr 1fr;align-items:start}.sun-mode-tabs{grid-column:1/-1;max-width:280px}.time-controls{grid-row:2/5}.sun-tools .angle-control{grid-column:2;grid-row:2}.sun-tools .angle-presets{grid-column:2;grid-row:3}.sun-tools .direction-field{grid-column:2;grid-row:4}.display-tools{grid-template-columns:1fr 1fr;gap:12px 24px}.display-tools .mode-switch,.model-entrance-button{grid-column:1/-1;justify-self:start}.mode-switch{min-width:280px}.mode-switch button{flex-direction:row;padding:10px;font-size:14px}.display-tools .model-entrance-button{font-size:14px}
 .results{grid-template-columns:repeat(2,minmax(0,1fr))}.metric-label{font-size:14px}.metric-value{font-size:36px}.insights-grid{grid-template-columns:1fr}.formula-row{justify-content:flex-start;gap:30px}.triangle-diagram{width:160px}.scene-panel:is(:fullscreen,.is-fullscreen) .scene{min-height:260px}
}
@media(max-width:600px){
 .site-header{padding:13px 14px;gap:12px}.brand{font-size:24px;gap:9px}.brand-mark{width:38px;height:40px;border-radius:11px}.brand-mark svg{width:26px;height:26px}.site-header>.button{font-size:13px;padding:10px 12px;gap:6px}.site-header>.button svg{width:15px;height:15px}.main-nav{gap:2px;padding:4px;border-radius:10px;overflow-x:auto;justify-content:flex-start}.nav-link{gap:6px;padding:9px 6px;font-size:12px}.nav-link svg{width:15px;height:15px}.nav-link[data-nav="guide"] svg{display:none}
 main{padding:14px 12px 0}.scene-panel{border-radius:15px}.scene-header{padding:14px 16px;gap:8px}.scene-title{gap:9px}.scene-title h2{font-size:15px}.scene-heading-icon{width:30px;height:30px;border-radius:9px}.live-label{font-size:10px;padding:4px 7px;gap:6px}.scene{height:370px}.scene-badge{top:12px;left:12px;padding:8px 10px;gap:8px;max-width:calc(100% - 24px);font-size:11px;border-radius:10px}.scene-badge strong{font-size:11px}.badge-sun{width:30px;height:30px;border-radius:9px}.badge-sun svg{width:19px;height:19px}.scene-footer{padding:12px 14px}.legend{gap:14px;font-size:11px}
 .toolbox-header{padding:14px;gap:11px}.toolbox-header h3{order:0;font-size:14px}.toolbox-collapse{order:1;margin-left:auto}.toolbox-interaction{order:2;width:100%;flex:auto;margin-left:0}.toolbox-view-controls{order:3;max-width:none;width:100%;justify-content:space-between}.toolbox-view-controls .icon-button{width:36px;height:36px}.toolbox-tabs{gap:4px;padding:0 10px 13px}.toolbox-tab{flex-direction:column;gap:4px;font-size:12px;padding:8px 4px;min-height:58px}.toolbox-tab svg{width:17px;height:17px}.toolbox-panels{padding:14px}.roof-tools{grid-template-columns:1fr;gap:12px}.range-field{padding:14px 16px}.range-field label{display:flex;margin-bottom:16px}.input-value{width:auto;max-width:54%;margin:0}.input-value input{width:7ch}.furniture-tools .target-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.target-form-grid label{font-size:14px}.furniture-actions>.button{width:100%}.sun-tools{grid-template-columns:1fr;gap:15px}.sun-mode-tabs{max-width:none}.time-controls,.sun-tools .angle-control,.sun-tools .angle-presets,.sun-tools .direction-field{grid-column:auto;grid-row:auto}.sun-tools .range-field label{display:flex}.display-tools{grid-template-columns:1fr;gap:8px}.display-tools .mode-switch{justify-self:stretch;min-width:0}.mode-switch button{font-size:13px;padding:10px 5px}.toggle-row>span:first-child{font-size:14px}.layout-editor{padding:16px}.layout-editor>svg{height:310px}.layout-status{font-size:12px}.layout-status>span:last-child{margin-left:0}
 .results{gap:10px;margin-top:14px}.metric{padding:15px 13px;border-radius:12px}.metric-label{font-size:12px;align-items:flex-start;line-height:1.5;gap:6px}.metric-icon{width:26px;height:26px;border-radius:7px}.metric-icon svg{width:15px;height:15px}.metric-value{font-size:29px;gap:5px;margin-top:12px}.metric-value small{font-size:14px}.metric p{font-size:11px}.progress-track{margin-top:14px}.insights-grid{gap:14px;margin-top:14px}.geometry-card,.assessment-card{padding:19px 17px;border-radius:14px}.card-kicker{font-size:11px;letter-spacing:.7px;margin-bottom:16px}.geometry-card h2,.assessment-card h2{font-size:16px}.formula-row{gap:10px}.triangle-diagram{width:100px;min-width:80px}.formula{gap:10px;font-size:22px}.fraction{font-size:18px}.formula-equals{font-size:15px}.formula-equals strong{font-size:23px}.geometry-card>.text-button{font-size:13px}.assessment-heading{flex-wrap:wrap}.constraint-row{flex-wrap:wrap;font-size:13px;gap:10px}.constraint-row .text-button{font-size:13px}.assessment-card>.text-button{font-size:13px}.page-footer{padding:22px 3px;font-size:11px}.page-footer>span:last-child{display:none}
 dialog{padding:22px 18px;border-radius:16px}.dialog-header h2{font-size:21px}.dialog-intro{font-size:14px}.guide-steps article{gap:12px}.guide-steps h3{font-size:15px}.guide-steps article>span{width:28px;height:28px;font-size:12px}.guide-steps p{font-size:14px}.design-top{flex-wrap:wrap}.design-summary{gap:10px;font-size:13px}.design-card{padding:16px}.toast{width:max-content;max-width:calc(100vw - 24px);bottom:14px;font-size:13px}
}
.scene-panel:is(:fullscreen,.is-fullscreen){width:100%;height:100%;max-width:none;border-radius:0;grid-template-rows:auto minmax(0,1fr) auto;background:#fff}
.scene-panel:is(:fullscreen,.is-fullscreen) .scene{height:100%;min-height:200px}
.scene-panel:is(:fullscreen,.is-fullscreen) .toolbox-panels{overflow-y:auto}
.scene-panel:is(:fullscreen,.is-fullscreen) .layout-editor{max-height:40vh;overflow-y:auto}
@media(max-width:960px){.scene-panel:is(:fullscreen,.is-fullscreen) .scene{flex:1;min-height:180px}.scene-panel:is(:fullscreen,.is-fullscreen) .toolbox-panels{max-height:35vh;overflow-y:auto}}
@media(prefers-reduced-motion:no-preference){
 .metric{animation:card-appear .45s cubic-bezier(.22,1,.36,1) both}
 .metric:nth-child(2){animation-delay:40ms}.metric:nth-child(3){animation-delay:80ms}.metric:nth-child(4){animation-delay:120ms}
 .toolbox-pane:not([hidden]){animation:controls-appear .18s ease-out}
 dialog[open]{animation:dialog-appear .2s cubic-bezier(.22,1,.36,1)}
 dialog[open]::backdrop{animation:controls-appear .16s ease-out}
 @keyframes card-appear{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
 @keyframes controls-appear{from{opacity:0}to{opacity:1}}
 @keyframes dialog-appear{from{opacity:0;transform:translateY(6px) scale(.99)}to{opacity:1;transform:translateY(0) scale(1)}}
}
@media(prefers-reduced-motion:reduce){
 *,*::before,*::after{scroll-behavior:auto!important;transition:none!important}
 .is-roof-resizing .scene [data-roof-surface]{filter:none}
}

/* Keep camera actions together above the model, in their familiar order. */
.scene-header-actions{display:flex;align-items:center;gap:20px}
.scene-view-controls{display:flex;align-items:center;gap:8px;flex-shrink:0}
.scene-view-controls .icon-button{width:44px;height:44px;border:1px solid #d6e3e8;border-radius:12px;background:#fff;color:#526575;font-size:24px;font-weight:600}
.scene-view-controls .icon-button svg{width:23px;height:23px;stroke-width:1.7}
.scene-view-controls .icon-button:hover{background:#e7f4f0;border-color:#94c9bc;color:var(--teal)}
.toolbox-view-controls{justify-content:flex-start;gap:8px;flex:none}
.toolbox-view-controls>.view-controls-label{width:auto;height:auto;margin:0 auto 0 0;background:none;font-size:14px;color:var(--muted)}
@media(max-width:850px){
 .scene-header{flex-wrap:wrap}
 .scene-title{order:0;flex:1}
 .scene-header-actions{display:contents}
 .scene-header .live-label{order:1;margin-left:auto}
 .scene-view-controls{order:2;width:100%;justify-content:flex-end;padding-top:4px}
}
@media(max-width:600px){
 .scene-view-controls .icon-button{width:42px;height:42px}
 .toolbox-view-controls{justify-content:flex-start}
}

/* Presentation controls stay available while the inspector is hidden. */
.presentation-toggle{margin-left:auto;font-size:14px;min-height:40px}
.scene-panel:is(:fullscreen,.is-fullscreen) .scene-hint{display:none}
.scene-panel:is(:fullscreen,.is-fullscreen).tools-hidden{grid-template-columns:minmax(0,1fr)}
.scene-panel:is(:fullscreen,.is-fullscreen).tools-hidden .scene,.scene-panel:is(:fullscreen,.is-fullscreen).tools-hidden .scene-footer{grid-column:1}
.scene-panel:is(:fullscreen,.is-fullscreen).tools-hidden .layout-editor{display:none}
@media(max-width:600px){.presentation-toggle{font-size:13px;padding:9px 12px}}

/* Place the hide action immediately after the toolbox fields. */
.scene-panel:is(:fullscreen,.is-fullscreen):not(.tools-hidden) .toolbox-panels{flex:0 1 auto}
.toolbox>.presentation-toggle{align-self:stretch;flex-shrink:0;margin:0 18px 18px;min-height:44px}
.scene>.presentation-toggle{position:absolute;right:18px;bottom:18px;z-index:2;margin:0;background:#fffffff2;box-shadow:0 4px 16px #19333f12}
@media(max-width:600px){.toolbox>.presentation-toggle{margin:0 14px 14px}.scene>.presentation-toggle{right:12px;bottom:12px}}

/* A starting size preset alongside direct, unrestricted numeric input. */
.roof-size-choice{grid-column:1/-1;display:block;color:#405b66;font-size:14px;font-weight:500}
.roof-size-choice select{display:block;margin-top:7px;font-size:14px;padding-top:11px;padding-bottom:11px}

.roof-problem-trigger{grid-column:1/-1;justify-self:start;font-size:14px;margin:0 0 3px}
.problem-read-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}
.problem-review{margin-top:24px;padding-top:22px;border-top:1px solid var(--border)}
.problem-review h3{font-size:17px;font-weight:600;margin:0}
.problem-review-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.problem-review-grid label{font-size:14px;font-weight:500;color:#405b66}
.problem-review-grid input{display:block;margin-top:7px}
.problem-error{font-size:14px;color:#a1382c;margin:14px 0}
.problem-review input[aria-invalid="true"]{border-color:#b84435}
@media(max-width:420px){.problem-review-grid{grid-template-columns:1fr}}

/* A short assembly sequence with a restrained light bloom behind the model. */
.scene{isolation:isolate}
#world{position:relative;z-index:1}
.model-intro-glow{position:absolute;inset:0;z-index:0;pointer-events:none;opacity:0;background:radial-gradient(ellipse at 50% 55%,#75c9bd55 0%,#cae6dc20 38%,transparent 70%);transform-origin:50% 55%}
.scene-badge{z-index:3}
[data-entrance-column]{transform-box:view-box}
@media(prefers-reduced-motion:reduce){.model-intro-glow{display:none}}

/* Mobile: a larger model, thumb-size controls, and safe-area aware presentation. */
.mobile-label{display:none}
.move-hit-target{pointer-events:all}
.scene .move-handle:hover .move-hit-target{fill:transparent;stroke:none;filter:none}
body.presentation-open{overflow:hidden}
.scene-panel.is-fullscreen{position:fixed;inset:0;z-index:80;width:100%;height:100vh;height:100dvh;margin:0;border-radius:0}
@media(max-width:600px){
 .desktop-label{display:none}.mobile-label{display:inline}
 .site-header{min-height:0;gap:8px;padding:10px max(12px,env(safe-area-inset-right)) 10px max(12px,env(safe-area-inset-left));padding-top:max(10px,env(safe-area-inset-top))}
 .brand{font-size:22px;gap:8px}.brand-mark{width:34px;height:36px}.brand-mark svg{width:25px;height:25px}
 .site-header>.button{min-height:44px;padding:10px 14px;font-size:14px}
 .main-nav{gap:2px;padding:3px;overflow:visible}.nav-link{min-width:0;min-height:44px;flex:1;padding:8px 5px;font-size:13px;gap:5px}
 main{padding:10px max(8px,env(safe-area-inset-right)) 0 max(8px,env(safe-area-inset-left))}
 .scene-header{padding:12px;gap:8px}.scene-title h2{font-size:14px}.scene-title{gap:8px}.live-label{font-size:12px}
 .scene-view-controls{justify-content:space-between;gap:6px;padding-top:2px}.scene-view-controls .icon-button{width:44px;height:44px}
 .scene{height:auto;aspect-ratio:1;min-height:300px;max-height:430px;overscroll-behavior:contain}
 .scene-badge{padding:7px 9px;left:10px;top:10px;gap:7px}.scene-badge>span:last-child{min-width:0}.scene-badge strong{font-size:11px}
 .scene-footer{padding:12px}.legend{justify-content:space-between;width:100%;gap:8px;font-size:12px}
 .toolbox-header{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;padding:12px;flex-shrink:0}
 .toolbox-header h3{grid-column:1;grid-row:1;order:initial;font-size:15px;min-width:0}
 .toolbox-collapse{grid-column:2;grid-row:1;order:initial;margin:0;min-height:44px;font-size:13px}
 .toolbox-interaction{grid-column:1;grid-row:2;order:initial;min-width:0;width:auto;flex:initial;padding:3px}
 .toolbox-interaction button{min-height:44px;padding:7px 4px;gap:4px;font-size:13px;white-space:nowrap}
 .toolbox-interaction button svg{width:15px;height:15px}
 .toolbox-view-controls{grid-column:2;grid-row:2;order:initial;width:auto;max-width:none;gap:5px;flex:initial;justify-content:flex-end}
 .toolbox-view-controls>.view-controls-label{display:none}.toolbox-view-controls .icon-button{width:44px;height:44px}
 .toolbox-tabs{gap:4px;padding:0 8px 10px;flex-shrink:0}.toolbox-tab{min-width:0;min-height:52px;font-size:13px;padding:6px 3px;gap:3px}
 .toolbox-panels{padding:12px;scroll-padding:12px;overscroll-behavior:contain}
 .range-field{padding:13px 14px}.range-field label{font-size:14px;margin-bottom:4px;gap:6px}
 .input-value{min-height:44px;max-width:52%;padding:6px 8px}.input-value input{font-size:16px;min-height:28px;width:7ch}
 input[type=range]{height:44px;margin:0;padding:19px 0;background-clip:content-box;background-origin:content-box;border-radius:0}
 input[type=range]::-webkit-slider-thumb{width:24px;height:24px}
 input[type=range]::-moz-range-thumb{width:18px;height:18px}
 .range-ends{font-size:12px}.text-input,select,.sun-fields input,.roof-size-choice select,.model-label select,.furniture-actions select{font-size:16px;min-height:44px}
 .target-form-grid label,.toggle-row>span:first-child{font-size:14px}.toggle-row{min-height:48px}
 .furniture-actions .button,.angle-presets button,.sun-mode-tabs button,.mode-switch button,.text-button{min-height:44px;font-size:14px}
 .button,.icon-button,.nav-link,.toolbox-tab,.toolbox-collapse{touch-action:manipulation}
 .icon-button{min-width:44px;min-height:44px}.problem-read-actions .button{flex:1}
 dialog{width:calc(100vw - 20px);max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));padding:20px 16px;overscroll-behavior:contain;scroll-padding-bottom:20px}
 .dialog-header .icon-button{margin-top:-4px}.dialog-header h2{font-size:20px}.dialog-actions .button{flex:1}
 .metric-label{font-size:13px}.metric-value{font-size:28px}.metric p{font-size:12px}.card-kicker{font-size:12px;letter-spacing:.4px}
 .formula-row{flex-wrap:wrap}.formula-row>div{min-width:0;flex:1}.triangle-diagram{width:90px;min-width:70px}
 .formula{font-size:20px;gap:8px}.formula-equals{font-size:14px}.formula-equals strong{font-size:21px}
 .page-footer{padding-bottom:max(20px,env(safe-area-inset-bottom))}
 .toast{bottom:max(14px,env(safe-area-inset-bottom))}
 .scene-panel:is(:fullscreen,.is-fullscreen){height:100vh;height:100dvh;overflow:hidden}
 .scene-panel:is(:fullscreen,.is-fullscreen) .scene{height:auto;min-height:0;max-height:none;aspect-ratio:auto;flex:1}
 .scene-panel:is(:fullscreen,.is-fullscreen) .scene-header{flex-shrink:0;padding-top:max(10px,env(safe-area-inset-top))}
 .scene-panel:is(:fullscreen,.is-fullscreen) .scene-footer{flex-shrink:0;padding-bottom:max(10px,env(safe-area-inset-bottom))}
 .scene-panel:is(:fullscreen,.is-fullscreen) .toolbox{max-height:48vh;max-height:48dvh;flex:0 1 auto;min-height:0}
 .scene-panel:is(:fullscreen,.is-fullscreen):not(.tools-hidden) .toolbox-panels{flex:1 1 auto;max-height:none;overflow-y:auto;min-height:0}
 .toolbox>.presentation-toggle{flex-shrink:0;min-height:44px;margin:0 12px 12px;font-size:14px}
}
@media(max-width:960px) and (max-height:520px) and (orientation:landscape){
 .scene{height:300px;min-height:0}
 .scene-panel:is(:fullscreen,.is-fullscreen){display:grid;grid-template-columns:280px minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto}
 .scene-panel:is(:fullscreen,.is-fullscreen) .scene{grid-column:2;grid-row:2;height:100%;min-height:0}
 .scene-panel:is(:fullscreen,.is-fullscreen) .scene-footer{grid-column:2;grid-row:3}
 .scene-panel:is(:fullscreen,.is-fullscreen) .toolbox{grid-column:1;grid-row:2/4;border-right:1px solid var(--border);max-height:none;min-height:0}
 .scene-panel:is(:fullscreen,.is-fullscreen) .toolbox-panels{overflow-y:auto;min-height:0}
 .scene-panel:is(:fullscreen,.is-fullscreen).tools-hidden{grid-template-columns:minmax(0,1fr)}
 .scene-panel:is(:fullscreen,.is-fullscreen).tools-hidden .scene,.scene-panel:is(:fullscreen,.is-fullscreen).tools-hidden .scene-footer{grid-column:1}
}

@media(max-width:960px) and (max-height:520px) and (orientation:landscape){
 .scene-panel:is(:fullscreen,.is-fullscreen) .scene-header{flex-wrap:nowrap;padding:8px 14px;gap:10px}
 .scene-panel:is(:fullscreen,.is-fullscreen) .scene-header-actions{display:flex;gap:12px}
 .scene-panel:is(:fullscreen,.is-fullscreen) .scene-view-controls{width:auto;padding:0;order:initial}
 .scene-panel:is(:fullscreen,.is-fullscreen) .live-label{margin:0;order:initial}
 .scene-panel:is(:fullscreen,.is-fullscreen) .toolbox{display:block;overflow-y:auto;overscroll-behavior:contain}
 .scene-panel:is(:fullscreen,.is-fullscreen) .toolbox-header{display:flex;gap:8px;padding:10px}
 .scene-panel:is(:fullscreen,.is-fullscreen) .toolbox-header h3{font-size:14px}
 .scene-panel:is(:fullscreen,.is-fullscreen) .toolbox-interaction{flex:0 0 100%;order:2;margin:0}
 .scene-panel:is(:fullscreen,.is-fullscreen) .toolbox-collapse{order:1;margin-left:auto;min-height:40px}
 .scene-panel:is(:fullscreen,.is-fullscreen) .toolbox-view-controls{order:3;flex:none;width:100%;max-width:none}
 .scene-panel:is(:fullscreen,.is-fullscreen) .toolbox-tabs{grid-template-columns:1fr 1fr;padding:0 10px 10px;gap:4px}
 .scene-panel:is(:fullscreen,.is-fullscreen) .toolbox-tab{min-height:44px;padding:8px;font-size:13px;flex-direction:row}
 .scene-panel:is(:fullscreen,.is-fullscreen):not(.tools-hidden) .toolbox-panels{max-height:none;overflow:visible;padding:12px}
 .scene-panel:is(:fullscreen,.is-fullscreen) .roof-tools,.scene-panel:is(:fullscreen,.is-fullscreen) .sun-tools,.scene-panel:is(:fullscreen,.is-fullscreen) .display-tools{grid-template-columns:1fr}
 .scene-panel:is(:fullscreen,.is-fullscreen) .sun-tools>*{grid-column:auto;grid-row:auto}
 .scene-panel:is(:fullscreen,.is-fullscreen) .target-form-grid{grid-template-columns:1fr 1fr}
 .scene-panel:is(:fullscreen,.is-fullscreen) .mode-switch{min-width:0}
}
@media(max-width:600px){
 .nav-link{position:relative;font-size:14px}
 .nav-link .count{position:absolute;right:2px;top:1px;min-width:16px;padding:0 3px;font-size:10px;line-height:16px}
 .metric-label{font-size:14px}
 .metric-value{font-size:clamp(1.375rem,6.5vw,1.75rem);flex-wrap:wrap;row-gap:0;letter-spacing:-.7px}
 .metric-value>span{min-width:0;overflow-wrap:anywhere}
 .formula{flex-wrap:wrap;white-space:normal}.formula-equals{overflow-wrap:anywhere;white-space:normal}
 .time-controls .range-ends{font-size:11px}
}
@media(max-width:960px) and (max-height:520px) and (orientation:landscape){
 .scene-panel:is(:fullscreen,.is-fullscreen) .live-label,.scene-panel:is(:fullscreen,.is-fullscreen) .scene-heading-icon{display:none}
}

@media(max-width:600px){
 .scene-badge{top:auto;bottom:10px;max-width:calc(100% - 20px)}
 .scene-badge>span:last-child{font-size:0;line-height:0}
 .scene-badge strong{margin-top:0;line-height:1.7}
 .badge-sun{width:24px;height:24px}.badge-sun svg{width:16px;height:16px}
 .scene-footer>.presentation-toggle{margin-left:auto;min-height:44px;font-size:14px}
}
