.lab-common-controls{display:flex;justify-content:flex-end;margin:-4px 0 14px;min-height:35px}.lab-common-controls label{display:flex;align-items:center;gap:9px;font-size:12px;color:#60725c}.lab-rate-range{width:150px;accent-color:#377f50}.lab-rate-number{width:62px;border:1px solid #dbe5d6;border-radius:6px;padding:6px;background:white}.series-legend{display:flex;gap:7px;flex-wrap:wrap;margin:12px 0 3px}.series-legend button,.energy-legend button{display:inline-flex;align-items:center;gap:7px;padding:8px 12px;border:1px solid #dfe7dc;border-radius:7px;background:white;font-size:12px;color:#61715c}.series-legend button:before{content:"";width:18px;height:3px;background:var(--series-color);border-radius:2px}.series-legend button[aria-pressed=true]{background:#eaf3e5;border-color:#88ad92;color:#2f7146}.series-muted{display:none!important}.hint,.wave-model-note,.wave-relations,.spectrum-source,.subnote,.observation-note,.data-note,.formula-list,.empty-selection,.wire-description,#device-note,#magnetic-note,#chart-unit,#data-note{display:none!important}.data-head>.key,.key,.data-head>#wave-key,.data-head>#particle-key{display:none!important}.lab-common-controls~.lab-layout .playback select#speed{display:none}.series-legend:empty{display:none}.laboratory-help{border:0;background:none;color:#6c8264}.apparatus-3d{display:block;width:100%;height:100%;touch-action:none;cursor:grab}.apparatus-3d:active{cursor:grabbing}@media(max-width:600px){.lab-common-controls{justify-content:flex-start}.lab-rate-range{width:140px}.series-legend button{font-size:11px;padding:7px 9px}}
.lab-common-controls label{white-space:nowrap}.lab-common-controls .lab-rate-range{flex:0 0 150px;width:150px;min-width:0;max-width:150px}.lab-common-controls .lab-rate-number{flex:0 0 62px;width:62px;min-width:0;max-width:62px}

/* Keep legends clear of the plot and playback controls, including the scene plot. */
.series-legend{gap:10px 12px;margin:18px 0 12px;padding:4px 0;align-items:center}
.wave-scene-wrap:has(>.series-legend){aspect-ratio:auto;padding-bottom:8px}
.wave-scene-wrap:has(>.series-legend)>svg{height:auto;aspect-ratio:5/3}
.wave-scene-wrap>.series-legend{margin:14px 18px 10px}
.series-legend button{min-height:36px;padding:9px 14px;line-height:1.35}

.circuit-preset-bar{display:flex;align-items:center;gap:12px;padding:14px 18px;margin-bottom:16px;flex-wrap:wrap}.circuit-preset-bar[hidden]{display:none}.circuit-preset-bar label{font-size:12px;color:#6e8068}.circuit-preset-bar select{min-width:240px;flex:0 1 300px;max-width:100%;border:1px solid #dce5d6;border-radius:7px;background:#fff;padding:9px 12px;font:inherit;font-size:12px}

#speaker-audio-state{display:block;margin:8px 0 14px;font-size:11px;line-height:1.6;color:#61808a}#speaker-volume{accent-color:#44816c;width:100%}

.em-equation math{font-family:"Cambria Math","STIX Two Math",math;font-size:1em;font-style:normal;line-height:normal;max-width:100%;overflow-x:auto;padding:8px 2px}.em-equation math mtext{font-family:"Pretendard Variable",Pretendard,sans-serif;font-size:.75em}.em-equation{overflow:auto}.science-stage-label{font-size:13px;fill:#718591}.periodic-grid{display:grid;grid-template-columns:repeat(18,minmax(25px,1fr));gap:3px}.periodic-element{border:1px solid #dbe4e9;border-radius:5px;padding:5px 1px;background:#f9fbfc;min-width:0;cursor:pointer}.periodic-element[aria-pressed=true]{background:#e3f2e5;border-color:#5a9771}.periodic-element:disabled{opacity:.3;cursor:default}.periodic-element small{display:block;font-size:8px}.periodic-picker{margin-top:16px}.periodic-picker>button{margin-top:10px}.spectrum-element-dialog{width:min(960px,96vw);border:1px solid #c8d8dc;border-radius:12px;padding:22px}.spectrum-element-dialog::backdrop{background:#19364066}.spectrum-element-dialog header{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px}.process-legend{display:flex;flex-wrap:wrap;gap:20px;margin-top:14px;font-size:12px}.stage-scene text{font-family:"Pretendard Variable",Pretendard,sans-serif}.stage-scene .math-symbol{font-family:"Times New Roman",serif;font-style:italic}

.math-equation{padding:12px 0;color:#314e57;overflow:auto;font-size:21px}.math-equation math{font-family:"Cambria Math","STIX Two Math",math;font-style:normal;line-height:normal;margin:8px 0;max-width:100%;overflow:auto}.math-equation mtext{font-family:"Pretendard Variable",Pretendard,sans-serif;font-size:.75em}

.em-equation,.math-equation{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:18px 28px;overflow:visible;min-width:0}.em-equation math,.math-equation math{display:block;overflow:visible;max-width:none;margin:0;padding:5px 0;font-size:clamp(16px,1.65vw,22px);line-height:normal}.em-equation math:focus,.math-equation math:focus{outline:none}

/* Each relationship is an independent, vertically centered item. */
.em-equation,.math-equation{align-items:stretch;gap:12px 18px}.equation-item{display:flex;align-items:center;justify-content:center;min-height:64px;max-width:100%;box-sizing:border-box;padding:10px 16px;border:1px solid #dae4e8;border-radius:6px;background:#f8fafb}.equation-item math{margin:0}.mode-control[hidden]{display:none}

/* ───────── One frame for every laboratory page ─────────
   Heading row, tab row, three-column layout, bench header, run buttons,
   measurement list and graph panels share the values below on all 12 pages. */
body main{max-width:1640px;padding:28px 3% 35px}
body main>h1,body .title-row,body .advanced-heading,body .page-heading{display:flex;align-items:center;justify-content:flex-start;flex-wrap:wrap;gap:12px 18px;min-height:42px;margin:0 0 16px}
body main h1{font-size:28px;font-weight:750;letter-spacing:-.7px;line-height:1.2}
body main :is(.title-row,.advanced-heading,.page-heading) h1{margin:0}
body .title-row>:not(h1),body .advanced-heading>:not(h1):not(.back-button),body .page-heading>:not(h1){margin-left:auto;margin-top:0}
body .lab-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 17px}
body .lab-tabs>a,body .lab-tabs>button{display:inline-flex;align-items:center;border:1px solid var(--line);border-radius:9px;background:#fff;padding:11px 17px;font-size:13px;font-weight:600;line-height:1.2;color:#3f5444}
body .lab-tabs>a:hover,body .lab-tabs>button:hover{border-color:#b9cfb8;background:#f4f8f1}
body .lab-tabs>button.active,body .lab-tabs>a.active{border-color:#8bb294;background:#eaf3e5;color:#2c7044}
body .lab-common-controls{margin:-4px 0 14px}
@media(min-width:1151px){body .lab-layout,body .advanced-layout,body main>.layout{grid-template-columns:230px minmax(0,1fr) 280px;gap:16px}}
body .settings,body .inspector,body .advanced-layout .settings,body .advanced-inspector{padding:18px 16px}
body .settings>h2,body .inspector>h2,body .advanced-layout .settings>h2,body .advanced-inspector>h2{font-size:15px;font-weight:700;margin:0 0 15px}
body .advanced-layout .field{margin:13px 0 0;font-size:12px;color:#60735a}
body .advanced-layout .field small{font-size:10px;color:#8a9a82}
body .advanced-layout .control{margin-top:6px;height:auto}
body .advanced-layout .check{margin:15px 0 0}
body .advanced-actions{margin-top:15px}
body .advanced-actions .button{font-size:12px;padding:9px 12px}

/* Bench header: state on the left, clock on the right. */
body .bench-head,body .advanced-bench .bench-head,body .workbench>.bench-top{display:flex;justify-content:space-between;align-items:center;gap:10px;height:48px;padding:0 16px;border-bottom:1px solid var(--line);font-size:12px;color:#65795e}
body .bench-head>strong,body .workbench .bench-name{font-size:12px;font-weight:600}
body .bench-head>span:last-child,body .workbench .time{font-size:12px;color:#65795e;font-variant-numeric:tabular-nums}
body .workbench .time small{font-size:12px;color:inherit}

/* Run buttons: start / step / reset grouped on the left, directly under the header. */
body .bench .playback,body .advanced-bench .playback,body .workbench>.playback{display:flex;justify-content:flex-start;align-items:center;gap:7px;flex-wrap:wrap;padding:13px 16px;border-top:0;border-bottom:1px solid var(--line);background:#fff}
body .playback>.buttons{gap:7px}
body .playback>.buttons~*{margin-left:auto}
body .playback .button,body .playback .button.primary{min-width:0;padding:9px 12px;font-size:12px}
body .workbench{display:flex;flex-direction:column}
body .workbench>*{order:2}
body .workbench>.bench-top{order:0}
body .workbench>.playback{order:1}

/* Measured values: one list form. */
body .metric-grid,body #advanced-metrics,body #science-metrics{display:block;margin:0}
body .metric,body .advanced-metric{padding:11px 0!important;margin:0;background:none;border:0;border-bottom:1px solid #e8eee2;border-radius:0;min-width:0;overflow-wrap:anywhere}
body .metric:first-child,body .advanced-metric:first-child{padding-top:0!important}
body .metric:last-child,body .advanced-metric:last-child{border-bottom:0;padding-bottom:2px!important}
body .metric>span,body .advanced-metric>span{display:block;font-size:11px;line-height:1.5;color:#7a8d71;margin:0 0 5px}
body .metric strong,body .advanced-metric strong{display:block;font-size:16px!important;font-weight:600;line-height:1.4;margin:0;color:#283c31;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
body .metric strong small,body .advanced-metric strong small{font-size:inherit;font-weight:inherit;color:inherit;margin-left:.3em}
body .metric strong small:empty,body .advanced-metric strong small:empty{display:none}
@media(max-width:850px){body .inspector .metric-grid,body .advanced-inspector #advanced-metrics,body .advanced-inspector #science-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 18px}}

/* Graph panels: full width, drawn 1:1 so axis text is 12px everywhere. */
body .advanced-graphs,body .advanced-graphs.single{display:block;margin:0}
body .data-panel,body .advanced-graph,body .science-extra{padding:19px 20px;margin-top:17px}
body .data-head{margin-bottom:15px}
body .data-panel h2,body .advanced-graph h2,body .science-extra h2{font-size:15px;font-weight:700;margin:0 0 15px}
body .data-head h2{margin:0}
body svg.lab-chart,body svg.trace,body #wave-chart,body #particle-chart{display:block;width:100%;min-height:0;border:1px solid #e4ebdf;border-radius:10px;overflow:hidden}
body svg.lab-chart text,body svg.trace text{font-size:12px!important;font-variant-numeric:tabular-nums}
body .advanced-graph .series-legend,body .series-legend{margin:18px 0 0;min-height:0}

body .workbench>*{flex:none}
