.molecule-view{border:1px solid var(--line);border-radius:14px;background:#fff;overflow:hidden;min-width:0}
.molecule-view-heading{display:flex;align-items:center;gap:16px;padding:16px 20px;background:#f7fafc}.molecule-view-heading>div{margin-right:auto}.molecule-view-heading h2{font-size:1.1rem;margin:4px 0 0}.molecule-view-heading .eyebrow{font-size:.65rem}.molecule-view-heading .formula{font-size:.9rem}.molecule-view-heading button{font-size:.8rem}
.molecule-view-stage{position:relative;height:430px;background:radial-gradient(ellipse at 48% 38%,#243548,#111c28 78%);isolation:isolate}.molecule-view-stage canvas{display:block;width:100%;height:100%;touch-action:none;cursor:grab}.molecule-view-overlay{position:absolute;inset:18px 20px auto;display:flex;justify-content:space-between;color:#b9ccd6;font-size:.7rem;pointer-events:none}.molecule-view-error{position:absolute;inset:45% 20px;color:white}
.molecule-view .structure-controls{padding:14px 18px;background:#f7fafc;border-top:1px solid var(--line)}.structure-actions{display:flex;align-items:center;flex-wrap:wrap;gap:10px;font-size:.85rem}.structure-actions button{font-size:.8rem}.structure-actions button[aria-pressed=true]{background:#dff1ec;border-color:#84b8ac;color:#075854}.structure-camera{display:flex;margin-left:auto;gap:4px}.structure-camera button{min-width:34px;padding:6px;font-size:1.1rem}
.structure-controls details{margin-top:12px}.structure-controls p{font-size:.8rem;color:var(--muted);margin-top:12px;line-height:1.5}.structure-controls .structure-hint{font-size:.75rem;margin:10px 0 0}.structure-controls summary{font-size:.85rem}.structure-display{display:flex;flex-wrap:wrap;gap:14px;align-items:center;margin-top:16px;font-size:.8rem}.structure-display select{margin-left:6px;padding:7px;font-size:.8rem}.structure-force-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:18px 0}.structure-force-grid label{display:block;font-size:.8rem}.structure-force-grid output{float:right;font-size:.75rem;color:var(--muted)}.structure-force-grid input{display:block;width:100%;margin-top:7px}
.molecule-view:fullscreen,.molecule-view.window-fullscreen{overflow:auto;background:white}.molecule-view:is(:fullscreen,.window-fullscreen) .molecule-view-stage{height:calc(100dvh - 210px);min-height:260px}
@media(max-width:750px){.molecule-view-stage{height:360px}.molecule-view-heading{padding:14px;gap:8px}.molecule-view-heading .formula{display:none}.molecule-view .structure-controls{padding:12px}.structure-actions{gap:8px}.molecule-view-overlay{inset:14px}.structure-hint{line-height:1.6}}
@media(max-width:480px){.structure-force-grid{grid-template-columns:1fr}.structure-camera{width:100%;justify-content:flex-end}}

.vat-view{border:1px solid var(--line);border-radius:14px;overflow:hidden;background:#fff}.vat-heading{display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding:16px 20px;margin:0;background:#f7fafc}.vat-heading>div:first-child{margin-right:auto}.vat-heading h1,.vat-heading h2{font-size:1.1rem;margin:3px 0}.vat-heading button{font-size:.8rem}.vat-heading .eyebrow{font-size:.65rem;margin:0}
.vat-controls{display:flex;gap:14px;flex-wrap:wrap;align-items:center;padding:12px 18px;background:#f7fafc;border-top:1px solid var(--line)}.vat-controls .check{font-size:.8rem}.vat-controls .segmented button{font-size:.8rem}
.vat-view .stage-wrap{margin:0;border-radius:0;box-shadow:none;background:#142b3e}.vat-view .vat-stage{display:block;width:100%;height:480px;background:#142b3e}.vat-view .stage-status{position:absolute;inset:12px 16px auto;padding:0;pointer-events:none;font-size:.7rem}.vat-view .stage-wrap{position:relative}
.vat-view .vat-legend{display:flex;align-items:center;flex-wrap:wrap;gap:14px;background:#142b3e;color:#bfd0dd;padding:12px 18px;margin:0;font-size:.72rem}.vat-view .vat-help{padding:10px 18px;margin:0;border-top:1px solid #314659;background:#142b3e;color:#bfd0dd;font-size:.8rem}.vat-help summary{margin:0;font-size:.75rem}.vat-help p{padding:12px 0 4px;font-size:.8rem;line-height:1.6}
.vat-view .transport,.vat-view .reaction-playback{padding:14px 18px;margin:0;background:#f7fafc}.vat-view .status{padding:12px 18px;margin:0;background:#f1f6fa;min-height:0}.vat-view .geometry-panel{margin:0;border:0;border-top:1px solid var(--line);border-radius:0;padding:12px 18px}.vat-view .geometry-tools{padding:0}
.focus-panel{padding:0}.focus-panel #inspectorRoot{margin:0;border:0;border-radius:14px 14px 0 0}
@media(max-width:750px){.vat-heading{padding:14px}.vat-view .vat-stage{height:370px}.vat-controls{padding:10px 12px;gap:10px}.vat-heading>div:first-child{width:100%}}

.motion-presets{display:flex;gap:6px;margin-top:14px}.motion-presets:before{content:"Rörelser";font-size:.8rem;align-self:center;margin-right:6px}.motion-presets button{font-size:.8rem;padding:7px 13px;min-height:34px}.structure-rotation{display:block;font-size:.8rem;margin:18px 0}.structure-rotation output{float:right}.structure-rotation input{display:block;width:100%;margin-top:8px}

.vat-motion-controls{padding:0 18px 14px;background:#f7fafc;border-top:1px solid var(--line)}.vat-motion-controls details{font-size:.8rem}.vat-motion-controls .structure-force-grid{max-width:800px}

/* Shared reaction workspace: the vat, replay and 3D viewer share one column. */
.reaction-inspection{display:block;margin:24px 0 0}
.molecule-picker{display:flex;gap:16px;align-items:center;padding:12px 20px;background:#f7fafc;border-top:1px solid var(--line);font-size:.875rem}.molecule-picker select{min-width:0;flex:1;max-width:430px}
.vat-actions{position:absolute;left:14px;bottom:14px;display:flex;flex-wrap:wrap;gap:6px;z-index:3;padding:6px;border:1px solid #456273;background:#142b3eeb;border-radius:11px}
.vat-actions button,.reaction-page .vat-actions .primary{background:#233d50;color:#edf5fa;border:1px solid #4b6475;padding:8px 12px;min-height:36px;font-size:.875rem;box-shadow:none}
.vat-actions button:hover:not(:disabled){background:#33566c}.vat-actions button:disabled{opacity:.4}.vat-actions #startReaction{background:#1e706d;border-color:#519b94}
.vat-view .vat-help{padding:12px 18px}.vat-help summary{font-size:.875rem}.vat-help .legend-title{font-size:.875rem;font-weight:600}.vat-help .vat-legend{padding:12px 0;background:none;font-size:.875rem}.vat-help p{font-size:.875rem}
.motion-settings{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:12px;align-items:center}.motion-settings .motion-presets{margin:0}.advanced-motion{justify-self:end;font-size:.875rem;padding:8px 12px}.motion-advanced{grid-column:1/-1;margin:0!important}.motion-advanced summary[hidden]{display:none!important}
.structure-controls .motion-settings{margin-top:14px}.vat-motion-controls{padding:14px 18px}.motion-presets button{font-size:.875rem}
.reaction-playback{font-size:.875rem;border-top:1px solid var(--line)}.reaction-playback #cancelReaction{margin-right:auto}
#reactionViewer{width:100%}.reaction-setup input[type=number]{width:100%}
.reaction-heading h1{font-size:1.55rem}.reaction-heading select{max-width:360px}
@media(max-width:750px){.reaction-inspection{margin:20px 0 0}.molecule-picker{align-items:flex-start;flex-direction:column;gap:8px}.molecule-picker select{width:100%;max-width:none}.vat-actions{left:8px;bottom:8px;gap:4px}.vat-actions button{padding:7px 9px;font-size:.8rem}.motion-settings{gap:8px}.motion-presets:before{display:none}.motion-presets button{padding:7px 9px}.advanced-motion{padding:7px 9px}}

.vibration-modes{padding:12px 0;font-size:.875rem}.vibration-modes label{display:flex;align-items:center;gap:12px}.vibration-modes select{min-width:0}.vibration-modes p{margin:8px 0 0!important}.lab-notes{margin-top:20px;font-size:.875rem}.lab-notes label{display:block;margin:12px 0}.lab-notes textarea{display:block;width:100%;margin-top:8px}.lab-notes button{margin:5px 5px 0 0;font-size:.875rem}
.vibration-modes label{white-space:nowrap}.vibration-modes select{flex:1}
.teacher .reaction-workspace{grid-template-columns:minmax(0,1fr) 280px}
/* Keep the actual lab controls available while giving the experiment more room. */
.teacher .reaction-setup{display:flex;flex-wrap:wrap;align-items:center;gap:12px 20px;grid-column:1;grid-row:1;padding:16px 20px}
.teacher .reaction-setup>.eyebrow{display:none}
.teacher .reaction-setup h2{flex-basis:100%;margin:0;font-size:1rem}
.teacher .reaction-setup>div{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0}
.teacher .reaction-setup .condition-check,.teacher .reaction-setup .reaction-explainer{margin:0}
.teacher .reaction-setup select{width:auto;max-width:100%}
.teacher .reaction-setup input[type=number]{width:64px}
.teacher .reaction-setup .reaction-explainer[open]{flex-basis:100%}
.teacher .reaction-setup small{flex-basis:100%}
.teacher .reaction-experiment{grid-column:1;grid-row:2;min-width:0}
.teacher .reaction-guide{grid-column:2;grid-row:1/3;min-width:0}
.teacher .reaction-guide p{font-size:1rem}
.teacher .reaction-vat-host .stage-wrap{width:100%;max-width:none}
#guideSpeak{font-size:.8rem;margin-top:8px}
@media(max-width:900px){.teacher .reaction-workspace{grid-template-columns:1fr}.teacher .reaction-guide{grid-column:1;grid-row:3}}
