/* The scene stays central; object properties live in slide-out panels. */
#workspace{display:block;position:relative;height:850px;overflow:hidden;--drawer-top:168px;--drawer-bottom:178px}
#scene-panel{height:100%;width:100%}
#sources-panel,#investigation-panel{position:absolute;top:var(--drawer-top);bottom:var(--drawer-bottom);height:auto;max-height:none;width:304px;z-index:9;border-radius:12px;box-shadow:0 12px 38px #081b3233;transition:transform .2s ease,opacity .2s ease,visibility .2s}
#sources-panel{left:12px;display:flex;flex-direction:column}
#investigation-panel{right:12px;width:326px;overflow-y:auto;overscroll-behavior:contain;background:var(--panel)}
body.sources-closed #sources-panel{display:flex;transform:translateX(calc(-100% - 20px));opacity:0;visibility:hidden;pointer-events:none}
body.inspector-closed #investigation-panel{display:block;transform:translateX(calc(100% + 20px));opacity:0;visibility:hidden;pointer-events:none}
.scene-header-actions .immersive-control{display:inline-flex;align-items:center;justify-content:center;width:auto;height:35px;min-height:35px;padding:7px 11px;border:1px solid #466078;border-radius:6px;background:#1c3449;color:#cde5e7;font:11px 'Segoe UI',sans-serif}
.scene-header-actions .immersive-control[aria-pressed=true]{background:#2b5048;border-color:#638f80;color:#d7ffeb}
.drawer-close{width:32px;height:32px;min-height:32px;background:transparent;border:1px solid var(--line);border-radius:6px;color:var(--muted);font:21px/1 'Segoe UI',sans-serif}
.builder-tabs{display:flex;gap:7px;padding:10px 13px;border-bottom:1px solid var(--line);background:var(--panel)}
.builder-tabs button{flex:1;min-height:37px;border:1px solid transparent;background:transparent;border-radius:6px;color:var(--muted);font-size:12px}
.builder-tabs button[aria-selected=true]{background:var(--purple-light);border-color:var(--line);color:var(--purple);font-weight:650}
.edit-toolbar{display:flex;align-items:center;gap:13px;flex-wrap:wrap;min-height:47px;padding:7px 14px;border-bottom:1px solid #42587355;background:#122339;color:#c4d7e6;z-index:6}
.tool-segment{display:flex;gap:3px;background:#091a2a;border:1px solid #3a536b;border-radius:6px;padding:2px}
.edit-toolbar button{min-height:31px;padding:5px 9px;border:1px solid #3e5b71;border-radius:5px;background:#1e354a;color:#c8dfe9;font:11px 'Segoe UI',sans-serif;white-space:nowrap}
.tool-segment button{border-color:transparent;background:transparent}
.tool-segment button[aria-pressed=true]{background:#a5dfca;color:#153e32;border-color:#a5dfca;font-weight:650}
.object-picker{display:flex;align-items:center;gap:5px;flex:1;min-width:170px;max-width:365px}
.object-picker select{min-height:32px;width:100%;min-width:0;padding:5px 8px;background:#142b40;border-color:#3e5b71;color:#d5e9f3;font-size:11px}
.object-picker #delete-selected{font-size:17px;padding:2px 8px;color:#f0b8bb}
.scene-transport{display:flex;gap:5px;margin-left:auto}
.scene-transport button:first-child{min-width:74px;background:#283d50}
.edit-toolbar button:hover:not(:disabled){border-color:#9cccb9;filter:brightness(1.08)}
.object-properties{border-top:1px solid var(--line);padding:0;margin-top:14px}
.object-properties>summary{cursor:pointer;min-height:40px;padding:12px 0;font-size:12px;font-weight:650;color:var(--purple)}
.object-properties .subtle{font-size:11px;line-height:1.75;margin:4px 0 12px}
.object-number-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:9px 0}
.object-number-grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}
.object-number-grid label{font-size:11px;color:var(--muted);line-height:1.7}
.object-number-grid input{display:block;width:100%;min-width:0;min-height:37px;border:1px solid var(--line);border-radius:5px;padding:7px 5px;color:var(--ink);background:var(--panel);font:12px Consolas,monospace}
#sheet-material{width:100%;margin-top:6px}
#sheet-count{float:right;font:10px Consolas,monospace;color:var(--muted)}
.sheet-response{border-left:3px solid #90b6a4;background:#bcd5c51a;border-radius:0 6px 6px 0;padding:9px 10px;margin:12px 0}
.sheet-response strong{font-size:11px;font-weight:650;color:var(--purple);text-transform:capitalize}
.sheet-response p{font-size:11px;line-height:1.7;color:var(--muted);margin:6px 0 0}
.pulse-controls{display:flex;gap:7px}.pulse-controls .button{padding:8px 10px;font-size:12px;min-height:38px}
.eddy-readings{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;padding:10px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);font:11px Consolas,monospace;color:var(--muted)}
.eddy-readings b{display:block;font-size:12px;font-weight:500;color:var(--purple);margin-top:7px;overflow-wrap:anywhere}
.creator-credit{font-size:10px;color:#adc6ce;white-space:nowrap}
.latex-workbench{margin:24px 0;padding:23px;border:1px solid var(--line);border-radius:13px;background:var(--panel)}
.latex-workbench>p{font-size:12px;line-height:1.8;color:var(--muted)}
.latex-workbench>label{display:block;font-size:12px;font-weight:600;margin:14px 0 7px}
.latex-workbench>select{min-height:40px;max-width:100%;width:330px}
#latex-input{display:block;width:100%;min-height:112px;resize:vertical;padding:12px;border:1px solid var(--line);border-radius:7px;font:13px/1.7 Consolas,monospace;background:#f4f6f8;color:#25394b;margin-bottom:12px}
.latex-preview{min-height:100px;padding:20px;border:1px solid #c4dace;background:#f4faf6;border-radius:8px;margin-top:15px;overflow-x:auto;max-width:100%;color:#224a3c}
.latex-preview[data-latex-error=true]{color:#983c50;border-color:#dcabb5;background:#fcf4f5;font:13px/1.7 'Segoe UI',sans-serif}
.lab-tex-display{display:block;overflow-x:auto;max-width:100%;padding:6px 0}
.lab-tex-error{font:11px/1.7 Consolas,monospace;color:#9c4154;overflow-wrap:anywhere}
.lab-tex mjx-container{max-width:100%}.lab-tex mjx-container[jax=SVG]{font-size:103%!important}
.lab-immersive #workspace{height:100dvh;--drawer-top:169px;--drawer-bottom:178px}
.lab-immersive #sources-panel{left:13px;width:304px}.lab-immersive #investigation-panel{right:13px;width:326px}
.lab-immersive .builder-tabs{background:#1b3045}.lab-immersive .builder-tabs button[aria-selected=true]{background:#36534f;color:#caffeb;border-color:#598072}
.lab-immersive .object-number-grid input{background:#132b41;color:#e1edf7;border-color:#4a627b}
.lab-immersive .drawer-close{border-color:#51677d;color:#c0d7e6}.lab-immersive .latex-workbench{display:none}
@media(min-width:761px){.lab-immersive .scene-header-actions .immersive-control{font-size:11px;padding:7px 10px}body:not(.inspector-closed) .camera-views{right:350px}body:not(.inspector-closed) .zoom-buttons{right:350px}}
@media(max-width:1050px){#workspace{height:850px}#sources-panel{width:285px}#investigation-panel{width:305px}}
@media(max-width:760px){#workspace{height:820px;--drawer-top:211px;--drawer-bottom:194px}.scene-header{padding:9px 11px;min-height:61px}.scene-header h2{display:none}.scene-header-actions{width:100%;justify-content:space-between;gap:4px}.scene-header-actions .immersive-control{font-size:11px;padding:7px 9px;min-height:37px;height:37px}.scene-header-actions #snapshot,.scene-header-actions #fullscreen{display:none}.scene-header-actions #reset-view{width:29px}.scene-header-actions .immersive-toggle{min-width:78px;font-size:10px;padding:7px 8px;margin-right:0}.edit-toolbar{display:grid;grid-template-columns:1fr 1fr;gap:6px;padding:6px 11px;min-height:84px}.tool-segment{justify-self:start}.edit-toolbar button{min-height:32px;font-size:10px;padding:5px 8px}.scene-transport{justify-self:end;gap:3px;margin-left:0}.scene-transport button:first-child{min-width:68px}.object-picker{grid-column:1/-1;grid-row:2;max-width:none;width:100%;min-width:0}.object-picker select{font-size:11px}.object-picker #delete-selected{min-width:36px}#sources-panel,#investigation-panel,.lab-immersive #sources-panel,.lab-immersive #investigation-panel{left:12px;right:12px;top:var(--drawer-top);bottom:var(--drawer-bottom);width:auto;max-width:none;z-index:9}.lab-immersive #workspace{--drawer-top:211px;--drawer-bottom:198px}.source-body{padding:13px}.builder-tabs{padding:8px 12px}.builder-tabs button{min-height:40px;font-size:13px}.object-properties>summary{font-size:13px;min-height:43px}.object-properties .subtle,.sheet-response p{font-size:12px}.object-number-grid label{font-size:12px}.object-number-grid input{min-height:42px;font-size:13px}.creator-credit{display:none}.scene-footer{font-size:9px;padding:8px 12px}.latex-workbench{padding:18px}.latex-workbench .library-heading{flex-wrap:wrap;gap:12px}.latex-workbench>select{width:100%}.latex-preview{padding:12px;min-height:85px}.lab-immersive .scene-header-actions .immersive-control{padding:7px 9px}.lab-immersive .scene-header-actions .immersive-toggle{min-width:102px;font-size:10px}.mode-simple.lab-immersive #sources-panel,.mode-simple.lab-immersive #investigation-panel{bottom:var(--drawer-bottom)}}
@media(max-width:380px){.scene-header-actions #reset-view{display:none}.lab-immersive .scene-header-actions #reset-view{display:none}.scene-header-actions .immersive-control{font-size:10px}.scene-transport button{padding:5px 7px}.edit-toolbar{gap:6px 3px}}
@media(prefers-reduced-motion:reduce){#sources-panel,#investigation-panel{transition:none}}
