
:root{--lab-blue:#185abd;--lab-ink:#19324f;--lab-line:#d8e2ee}
body{font-family:"Segoe UI",Arial,sans-serif!important}button,input,select{font-family:inherit}button,a,input{touch-action:manipulation}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid #d68200;outline-offset:3px}
.lab-bar{position:fixed;bottom:0;left:0;right:0;z-index:2147483000;display:flex;align-items:center;gap:10px;min-height:40px;padding:5px 14px;background:#fff;border-top:1px solid var(--lab-line);color:var(--lab-ink);font:12px "Segoe UI",sans-serif;box-shadow:0 -2px 12px #17365d12}.lab-bar a,.lab-bar button{border:1px solid var(--lab-line);border-radius:6px;padding:5px 9px;background:#f2f6fc;color:var(--lab-ink);text-decoration:none;font:inherit;cursor:pointer}.lab-bar span{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.lab-info{max-width:700px;width:90vw;max-height:80dvh;border:1px solid var(--lab-line);border-radius:14px;padding:24px;color:var(--lab-ink);font:15px/1.6 "Segoe UI",sans-serif}.lab-info::backdrop{background:#10233a99}.lab-info button{padding:8px 16px;cursor:pointer}
body.lab-shared{padding-bottom:44px}.lab-shared .top{height:auto;min-height:58px;padding:10px 18px;gap:12px}.lab-shared .brand{font-size:15px;letter-spacing:.02em}.lab-shared .app{height:calc(100dvh - 102px);grid-template-columns:310px minmax(0,1fr)}.lab-shared .wrap{min-height:calc(100dvh - 102px);grid-template-columns:310px minmax(0,1fr)}.lab-shared .control label,.lab-shared .ctrl label{font-size:13px;gap:10px;line-height:1.5}.lab-shared input[type=range]{accent-color:var(--lab-blue);min-height:28px}.lab-shared button{min-height:34px}.lab-shared .formula{font-size:14px;overflow-wrap:anywhere}.lab-shared .scene{min-height:0}.lab-shared #cv{height:clamp(400px,64dvh,720px);min-height:0}.lab-shared .readout{font-variant-numeric:tabular-nums}.lab-shared .badge{max-width:60%;bottom:10px}.lab-shared .apparatus-overlay{display:none}.lab-shared .footer{max-width:35%;text-align:right}.lab-shared .apparatus-tag{max-width:45%}
@media(max-width:900px){.lab-shared .app,.lab-shared .wrap{height:auto;display:flex;flex-direction:column}.lab-shared .stage,.lab-shared .main{order:-1}.lab-shared .stage{height:56dvh;min-height:340px}.lab-shared #cv{height:360px}.lab-shared aside,.lab-shared .panel{overflow:visible}.lab-shared .panel{border-right:0}.lab-shared .main{padding:10px}.lab-shared .top{position:static}.lab-shared .badge{display:none}.lab-shared .readout{font-size:13px}.lab-shared .lab-tools{grid-template-columns:repeat(3,1fr)}.lab-bar{gap:5px;padding:5px 8px}.lab-bar span{font-size:10px}.lab-shared h1{font-size:18px}.lab-shared .metric{min-width:0;overflow-wrap:anywhere}}
@media print{.lab-bar{display:none}}

@media(max-width:700px){body:not(.lab-shared) #ui-container{width:calc(100vw - 20px)!important;max-height:calc(100dvh - 70px)!important;overflow:auto}body:not(.lab-shared) #app.container{width:100%;max-width:100%;min-width:0}body:not(.lab-shared) #app .canvas-wrapper{display:flex;flex-wrap:wrap;min-width:0}body:not(.lab-shared) #app canvas{max-width:100%;height:auto}body:not(.lab-shared) .header-buttons{flex-wrap:wrap}body:not(.lab-shared) header{flex-wrap:wrap;max-width:100vw}}

.lab-bar,.lab-bar *,body:not(.lab-shared) #ui-container{box-sizing:border-box}@media(max-width:700px){body:not(.lab-shared){max-width:100vw}body:not(.lab-shared) #ui-container{left:10px!important;right:auto!important;bottom:50px}body:not(.lab-shared) main{min-width:0;max-width:100vw}body:not(.lab-shared) .w-full{max-width:100%}}
.lab-warning{padding:10px;background:#fff7e8;border:1px solid #e4c280;border-radius:8px;font-size:12px;line-height:1.5;color:#704e10}
@media(max-width:700px){body:has(> #ui-container){display:flex!important;flex-direction:column;height:auto!important;overflow-y:auto!important;padding-bottom:48px}body:has(> #ui-container) #scene-container{height:360px;min-height:360px;width:100%;flex-shrink:0}body:has(> #ui-container) #chart-container{height:240px;min-height:240px;width:100%;box-sizing:border-box}body:has(> #ui-container) #ui-container{width:100%!important;max-height:none!important;position:static!important;overflow:visible}body:not(.lab-shared) .container{min-width:0}body:not(.lab-shared) .control-group{min-width:0}}

@media(max-width:700px){body:not(.lab-shared) canvas{max-width:100%!important}body:not(.lab-shared) .controls-grid{grid-template-columns:minmax(0,1fr)!important}body:not(.lab-shared) #slider-left,body:not(.lab-shared) #slider-right{min-width:0;max-width:100%}body:has(> #viewport){display:block;height:auto;overflow-y:auto;padding-bottom:48px}body:has(> #viewport) #viewport{height:440px;min-width:0;width:100%}body:has(> #viewport) #sidebar{width:100%;box-sizing:border-box;height:auto;overflow:visible}body:has(#gui-panel){overflow-y:auto!important;height:auto!important;padding-bottom:48px}body:has(#gui-panel) #main-container{display:block!important;height:auto}body:has(#gui-panel) #canvas-container{height:420px;min-width:0;width:100%}body:has(#gui-panel) #gui-panel{width:100%;height:auto;box-sizing:border-box}body:has(#gui-panel) .gui-section{box-sizing:border-box}}
