:root {
  color-scheme: dark;
  --bg: #0b1118;
  --panel: #111b25;
  --panel-2: #14212c;
  --panel-3: #0f1922;
  --line: rgba(160, 184, 203, .13);
  --line-strong: rgba(160, 184, 203, .22);
  --text: #e7edf2;
  --muted: #8fa0ae;
  --soft: #627584;
  --accent: #e8a84e;
  --accent-bright: #ffc66d;
  --cyan: #66c6d1;
  --green: #8cc8a4;
  --danger: #e18472;
  --radius: 12px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; min-height: 100%; background: var(--bg); color: var(--text); }
body { overflow-x: hidden; }
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 3px; }
.app-shell { min-height: 100vh; display: flex; flex-direction: column; background: radial-gradient(ellipse at 38% -30%, rgba(40, 76, 94, .22), transparent 56%), var(--bg); }
.topbar { height: 62px; flex: 0 0 62px; display: flex; align-items: center; justify-content: space-between; padding: 0 26px; border-bottom: 1px solid var(--line); background: rgba(9, 15, 22, .92); }
.brand-lockup { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 27px; height: 27px; border: 1px solid rgba(232,168,78,.5); border-radius: 7px; display: flex; align-items: flex-end; justify-content: center; gap: 3px; padding: 6px 5px; transform: rotate(-3deg); }
.brand-mark span { display: block; width: 3px; border-radius: 2px; background: var(--accent); }
.brand-mark span:nth-child(1) { height: 8px; opacity: .65; }
.brand-mark span:nth-child(2) { height: 14px; }
.brand-mark span:nth-child(3) { height: 10px; opacity: .8; }
.eyebrow, .kicker, .section-label, .metric-label, .caption-label, .corner, .unit-note, .status-pill, .micro-tag, .metric-foot, .footer-line, .check-heading, .check-values small, .progress-top, .progress-ends, .time-readout > span { letter-spacing: .12em; font-size: 9px; font-weight: 750; }
.eyebrow { color: #c4d0d9; }
.eyebrow-dot { display: inline-block; width: 3px; height: 3px; margin: 0 6px 2px; border-radius: 50%; background: var(--accent); }
.brand-sub { color: var(--soft); font-size: 10px; margin-top: 2px; letter-spacing: .02em; }
.topbar-right { display: flex; align-items: center; gap: 18px; }
.status-pill { color: #b5c2cc; border: 1px solid var(--line-strong); padding: 7px 10px; border-radius: 20px; display: flex; align-items: center; gap: 7px; font-size: 8px; }
.status-light, .live-indicator i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px rgba(140,200,164,.6); }
.unit-note { color: var(--soft); font-size: 8px; }
.unit-note span { color: var(--accent); padding: 0 4px; }
.workspace { width: 100%; max-width: 1680px; margin: 0 auto; padding: 18px 22px 16px; display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; flex: 1 0 auto; align-items: start; }
.stage-column { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.stage-heading { min-height: 70px; display: flex; justify-content: space-between; align-items: flex-end; padding: 0 2px 1px; }
.kicker { color: var(--accent); font-size: 8px; margin-bottom: 5px; }
h1 { font-size: clamp(20px, 2.1vw, 28px); line-height: 1.08; margin: 0; font-weight: 640; letter-spacing: -.035em; }
.stage-subtitle { color: var(--muted); font-size: 11px; margin: 6px 0 0; }
.stage-meta { display: flex; gap: 6px; padding-bottom: 3px; }
.meta-chip { border: 1px solid var(--line); color: #8295a4; border-radius: 4px; padding: 6px 8px; font-size: 7px; font-weight: 750; letter-spacing: .09em; white-space: nowrap; }
.stage-card { background: linear-gradient(145deg, rgba(22,34,45,.98), rgba(13,22,31,.98)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: 0 14px 38px rgba(0,0,0,.18); }
.stage-toolbar { height: 44px; display: flex; justify-content: space-between; align-items: center; padding: 0 12px; border-bottom: 1px solid var(--line); background: rgba(6,12,18,.24); }
.view-tabs, .stage-actions { display: flex; align-items: center; gap: 5px; }
.view-tab, .icon-button { background: transparent; border: 1px solid transparent; color: var(--muted); border-radius: 6px; padding: 7px 10px; font-size: 9px; font-weight: 650; cursor: pointer; transition: color .18s ease, background .18s ease, border-color .18s ease; }
.view-tab:hover, .icon-button:hover { color: var(--text); background: rgba(255,255,255,.04); }
.view-tab.active { color: var(--accent-bright); background: rgba(232,168,78,.09); border-color: rgba(232,168,78,.22); }
.icon-button { border-color: var(--line); font-size: 8px; letter-spacing: .08em; display: inline-flex; align-items: center; gap: 7px; }
.quality-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green); }
.camera-icon { width: 12px; height: 9px; border: 1px solid currentColor; border-radius: 2px; display: inline-block; position: relative; }
.camera-icon::before { content: ""; position: absolute; left: 3px; top: -3px; width: 4px; height: 2px; border: 1px solid currentColor; border-bottom: 0; border-radius: 2px 2px 0 0; }
.camera-icon::after { content: ""; position: absolute; left: 3px; top: 2px; width: 4px; height: 4px; border: 1px solid currentColor; border-radius: 50%; }
.canvas-wrap { height: clamp(330px, 47vh, 520px); min-height: 300px; position: relative; overflow: hidden; background: #0d1821; }
#machineCanvas { width: 100%; height: 100%; display: block; touch-action: pan-y; }
.canvas-corner { position: absolute; bottom: 12px; color: #718593; font-size: 7px; font-weight: 750; letter-spacing: .12em; pointer-events: none; }
.canvas-corner-left { left: 15px; display: flex; align-items: center; gap: 7px; }
.canvas-corner-right { right: 15px; }
.corner-dot { width: 5px; height: 5px; background: var(--accent); border-radius: 50%; }
.canvas-scale { position: absolute; top: 13px; right: 15px; color: rgba(151,172,187,.58); font-size: 7px; letter-spacing: .1em; display: flex; gap: 7px; align-items: center; pointer-events: none; }
.scale-line { width: 24px; height: 1px; background: rgba(232,168,78,.65); position: relative; }
.scale-line::before, .scale-line::after { content: ""; position: absolute; top: -3px; height: 7px; width: 1px; background: rgba(232,168,78,.65); }
.scale-line::before { left: 0; } .scale-line::after { right: 0; }
.stage-caption { min-height: 62px; display: flex; align-items: center; gap: 12px; padding: 10px 15px 11px; border-top: 1px solid var(--line); background: rgba(7,13,19,.35); }
.caption-icon { width: 25px; height: 25px; flex: 0 0 25px; border: 1px solid rgba(232,168,78,.3); border-radius: 7px; display: grid; place-items: center; }
.caption-icon span { width: 8px; height: 8px; border: 1px solid var(--accent); transform: rotate(45deg); }
.caption-label { color: var(--accent); font-size: 7px; margin-bottom: 3px; }
.stage-caption p { margin: 0; color: #b4c1ca; font-size: 10px; line-height: 1.45; }
.transport-bar { display: grid; grid-template-columns: auto minmax(120px,1fr) 75px; gap: 16px; align-items: center; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; background: rgba(16,26,36,.72); }
.transport-controls { display: flex; gap: 6px; }
.transport-button { height: 30px; padding: 0 10px; display: inline-flex; gap: 7px; align-items: center; justify-content: center; border: 1px solid var(--line-strong); border-radius: 6px; background: rgba(255,255,255,.025); color: #aab8c2; font-size: 8px; font-weight: 750; letter-spacing: .09em; cursor: pointer; transition: all .18s ease; white-space: nowrap; }
.transport-button:hover { border-color: rgba(232,168,78,.42); color: var(--text); }
.transport-button.primary { color: #1b1c1b; border-color: var(--accent); background: var(--accent); min-width: 82px; }
.transport-button.primary:hover { background: var(--accent-bright); }
.pause-symbol { width: 8px; height: 10px; border-left: 2px solid currentColor; border-right: 2px solid currentColor; }
.play-symbol { width: 0; height: 0; border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-left: 8px solid currentColor; margin-left: 2px; }
.step-small { color: inherit; opacity: .62; font-size: 7px; letter-spacing: 0; }
.reset-symbol { font-size: 14px; line-height: 1; }
.stroke-progress { min-width: 0; }
.progress-top { display: flex; justify-content: space-between; color: var(--soft); font-size: 7px; margin-bottom: 5px; }
.progress-top strong { color: var(--accent-bright); font-size: 9px; }
.progress-track { height: 4px; background: rgba(145,164,179,.16); border-radius: 4px; position: relative; overflow: hidden; }
.progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #b97931, var(--accent-bright)); border-radius: 4px; transition: width .08s linear; }
.progress-marker { position: absolute; left: 0; top: -1px; width: 1px; height: 6px; background: rgba(255,255,255,.65); }
.progress-ends { display: flex; justify-content: space-between; color: #566b7a; font-size: 6px; margin-top: 4px; }
.time-readout { text-align: right; }
.time-readout > span { display: block; color: var(--soft); font-size: 7px; }
.time-readout strong { color: #d7e1e8; font-size: 15px; font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.science-panel { border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: rgba(15,24,33,.72); }
.science-toggle { width: 100%; display: flex; align-items: center; gap: 11px; padding: 11px 13px; background: transparent; border: 0; text-align: left; cursor: pointer; }
.science-icon { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 6px; border: 1px solid rgba(102,198,209,.24); color: var(--cyan); font-family: Georgia, serif; font-size: 14px; }
.science-toggle strong { display: block; font-size: 10px; font-weight: 650; }
.science-toggle small { display: block; margin-top: 2px; font-size: 8px; color: var(--soft); }
.chevron { margin-left: auto; color: var(--muted); font-size: 17px; transition: transform .2s ease; }
.science-toggle[aria-expanded="true"] .chevron { transform: rotate(180deg); }
.science-content { border-top: 1px solid var(--line); padding: 12px; }
.equation-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.equation-card { padding: 10px; border: 1px solid var(--line); border-radius: 7px; background: rgba(255,255,255,.018); }
.equation-label { color: var(--cyan); font-size: 7px; letter-spacing: .12em; font-weight: 750; }
.equation { color: #f0c27b; font-family: Georgia, "Times New Roman", serif; font-size: 15px; margin: 8px 0 6px; white-space: normal; }
.equation sub { font-size: 9px; }
.equation-card p, .science-note p, .science-note li { color: #9aabb8; font-size: 9px; line-height: 1.55; margin: 0; }
.science-bottom-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.science-note { padding: 10px; border: 1px solid var(--line); border-radius: 7px; }
.science-note h3 { color: #d6e0e7; font-size: 9px; margin: 0 0 7px; }
.science-note ul { padding-left: 14px; margin: 0; }
.science-note li + li { margin-top: 4px; }
.source-note p + p { margin-top: 6px; }
.source-citation { color: #718493 !important; font-size: 8px !important; }
.model-disclaimer { color: #738693; font-size: 8px; margin: 10px 0 0; }
.control-column { min-width: 0; }
.control-panel { border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(150deg, rgba(20,31,42,.98), rgba(13,21,29,.98)); padding: 15px 15px 13px; box-shadow: 0 14px 38px rgba(0,0,0,.14); }
.panel-header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.panel-header .kicker { margin-bottom: 4px; }
h2 { font-size: 16px; margin: 0; font-weight: 630; letter-spacing: -.02em; }
.panel-glyph { width: 31px; height: 31px; border: 1px solid rgba(232,168,78,.25); border-radius: 8px; display: grid; place-items: center; color: var(--accent); font-size: 17px; }
.preset-block { padding: 12px 0 11px; border-bottom: 1px solid var(--line); }
.section-label-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.section-label { color: #9babb7; font-size: 7px; }
.micro-tag { color: #718391; font-size: 6px; padding: 3px 5px; border: 1px solid var(--line); border-radius: 3px; white-space: nowrap; }
.illustrative-tag { color: #c69a60; border-color: rgba(232,168,78,.17); }
.textbook-tag { color: var(--cyan); border-color: rgba(102,198,209,.22); }
.preset-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.preset-button { min-width: 0; display: flex; align-items: center; gap: 7px; padding: 8px 7px; text-align: left; border: 1px solid var(--line); border-radius: 7px; background: rgba(255,255,255,.02); cursor: pointer; transition: all .18s ease; }
.preset-button:hover { border-color: var(--line-strong); background: rgba(255,255,255,.04); }
.preset-button.active { border-color: rgba(232,168,78,.45); background: rgba(232,168,78,.07); }
.preset-index { color: var(--accent); font-size: 8px; font-weight: 800; align-self: flex-start; padding-top: 2px; }
.preset-button b { display: block; font-size: 9px; font-weight: 700; }
.preset-button small { display: block; color: var(--soft); font-size: 7px; margin-top: 2px; white-space: nowrap; }
.preset-arrow { margin-left: auto; color: #738594; font-size: 12px; }
.preset-note { margin: 7px 0 0; color: #8294a2; font-size: 8px; line-height: 1.45; min-height: 24px; }
.control-section { padding: 11px 0 8px; border-bottom: 1px solid var(--line); }
.control-section .section-label-row { margin-bottom: 10px; }
.slider-row { margin: 0 0 10px; }
.slider-row:last-child { margin-bottom: 2px; }
.slider-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 5px; }
.slider-heading label { color: #c4d0d8; font-size: 9px; font-weight: 560; }
.slider-heading output { color: var(--accent-bright); font-size: 9px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
input[type="range"] { display: block; width: 100%; height: 12px; margin: 0; appearance: none; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 3px; background: linear-gradient(90deg, rgba(232,168,78,.55), rgba(113,134,150,.26)); border-radius: 4px; }
input[type="range"]::-moz-range-track { height: 3px; background: linear-gradient(90deg, rgba(232,168,78,.55), rgba(113,134,150,.26)); border-radius: 4px; }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 11px; height: 11px; margin-top: -4px; border-radius: 50%; background: var(--accent-bright); border: 2px solid #2a3035; box-shadow: 0 0 0 1px rgba(232,168,78,.45); }
input[type="range"]::-moz-range-thumb { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-bright); border: 2px solid #2a3035; box-shadow: 0 0 0 1px rgba(232,168,78,.45); }
.slider-scale { display: flex; justify-content: space-between; color: #5d7180; font-size: 6px; margin-top: 1px; }
.compact-slider { margin-bottom: 9px; }
.live-section { padding: 12px 0 10px; border-bottom: 1px solid var(--line); }
.live-indicator { display: flex; align-items: center; gap: 5px; color: #7fae91; font-size: 6px; letter-spacing: .1em; font-weight: 800; }
.live-indicator i { width: 5px; height: 5px; }
.metric-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.metric-card { min-height: 59px; border: 1px solid var(--line); border-radius: 6px; padding: 8px 8px 6px; background: rgba(255,255,255,.018); min-width: 0; }
.metric-primary { border-color: rgba(232,168,78,.25); background: rgba(232,168,78,.045); }
.metric-label { display: block; color: #8294a2; font-size: 6px; white-space: nowrap; }
.metric-card strong { display: block; margin: 4px 0 2px; color: #e8edf0; font-size: 17px; line-height: 1; font-weight: 640; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.metric-primary strong { color: var(--accent-bright); }
.metric-card strong small { font-size: 8px; color: #93a4b0; font-weight: 550; letter-spacing: 0; }
.metric-foot { color: #627583; font-size: 5px; letter-spacing: .09em; }
.reserve-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; margin-top: 9px; color: #8194a2; font-size: 7px; letter-spacing: .09em; font-weight: 750; }
.reserve-row strong { color: var(--green); font-size: 9px; font-variant-numeric: tabular-nums; }
.reserve-track { grid-column: 1 / -1; height: 3px; border-radius: 4px; background: rgba(150,170,185,.13); overflow: hidden; }
.reserve-track span { display: block; width: 66%; height: 100%; background: var(--green); border-radius: 4px; transition: width .2s ease; }
.status-line { display: flex; align-items: center; gap: 7px; margin-top: 9px; color: #9fb4a7; font-size: 8px; }
.status-mark { width: 5px; height: 5px; flex: 0 0 5px; border-radius: 50%; background: var(--green); box-shadow: 0 0 7px rgba(140,200,164,.35); }
.status-line.warning { color: #e0b27a; }
.status-line.warning .status-mark { background: var(--accent); box-shadow: 0 0 7px rgba(232,168,78,.35); }
.status-line.danger { color: #e29a8c; }
.status-line.danger .status-mark { background: var(--danger); box-shadow: 0 0 7px rgba(225,132,114,.35); }
.reference-check { padding: 11px 0 0; }
.check-heading { display: flex; align-items: center; gap: 6px; color: #a7b5bf; font-size: 7px; }
.check-heading .micro-tag { margin-left: auto; }
.check-icon { width: 14px; height: 14px; border: 1px solid rgba(102,198,209,.35); border-radius: 50%; display: grid; place-items: center; color: var(--cyan); font-size: 9px; letter-spacing: 0; }
.check-values { display: grid; grid-template-columns: 1fr 20px 1fr; align-items: center; margin-top: 9px; }
.check-values small { display: block; color: #667c8b; font-size: 5px; margin-bottom: 3px; }
.check-values strong { display: block; color: #dbe4e9; font-size: 14px; font-variant-numeric: tabular-nums; }
.check-values > div:last-child { text-align: right; }
.check-divider { text-align: center; color: #536775; font-size: 8px; }
.check-foot { display: flex; justify-content: space-between; margin-top: 7px; color: #8195a2; font-size: 7px; }
.check-foot span:first-child { color: var(--cyan); }
.check-bar { height: 3px; border-radius: 4px; margin-top: 6px; background: rgba(102,198,209,.12); overflow: hidden; }
.check-bar span { display: block; width: 100%; height: 100%; background: var(--cyan); border-radius: 4px; }
.footer-line { display: flex; justify-content: space-between; gap: 10px; padding: 0 25px 11px; color: #4f6473; font-size: 6px; }
.footer-line i { display: inline-block; width: 3px; height: 3px; margin: 0 5px 1px; background: var(--accent); border-radius: 50%; }
body.embed-mode { height: 100vh; height: 100dvh; overflow: hidden; }
body.embed-mode .app-shell { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; }
body.embed-mode .workspace { min-height: 0; flex: 1 1 auto; }
body.embed-mode .stage-column { min-height: 0; }
body.embed-mode .control-column { min-height: 0; }
body.embed-mode .control-panel { max-height: calc(100dvh - 100px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: #344957 transparent; }
body.embed-mode .canvas-wrap { height: clamp(290px, 48vh, 510px); }
@media (min-width: 1500px) {
  .workspace { grid-template-columns: minmax(0,1fr) 390px; gap: 22px; padding: 22px 30px 18px; }
  .canvas-wrap { height: min(53vh, 590px); }
  .control-panel { padding: 17px; }
}
@media (max-width: 1050px) {
  .workspace { grid-template-columns: minmax(0,1fr) 330px; padding: 14px; gap: 12px; }
  .canvas-wrap { height: 42vh; min-height: 300px; }
  .stage-meta { display: none; }
  .control-panel { padding: 12px; }
  .slider-row { margin-bottom: 8px; }
}
@media (max-width: 760px) {
  .topbar { height: 50px; flex-basis: 50px; padding: 0 12px; }
  .brand-mark { width: 24px; height: 24px; }
  .eyebrow { font-size: 7px; }
  .brand-sub { font-size: 8px; }
  .topbar-right { gap: 0; }
  .unit-note { display: none; }
  .status-pill { font-size: 6px; padding: 6px 8px; }
  .workspace { display: flex; flex-direction: column; padding: 10px 10px 14px; gap: 10px; }
  .stage-column { width: 100%; gap: 8px; }
  .stage-heading { min-height: auto; align-items: flex-start; padding: 1px 2px 2px; }
  .stage-heading .kicker { font-size: 7px; margin-bottom: 4px; }
  h1 { font-size: 19px; }
  .stage-subtitle { font-size: 9px; margin-top: 4px; }
  .stage-card { border-radius: 9px; }
  .stage-toolbar { height: 38px; padding: 0 7px; }
  .view-tab { padding: 6px 7px; font-size: 8px; }
  .icon-button { padding: 6px 7px; font-size: 7px; }
  .canvas-wrap { height: 34vh; min-height: 230px; max-height: 330px; }
  .canvas-corner { bottom: 8px; font-size: 6px; }
  .canvas-corner-left { left: 9px; }
  .canvas-corner-right { right: 9px; }
  .canvas-scale { top: 8px; right: 9px; font-size: 5px; }
  .stage-caption { min-height: 54px; padding: 8px 9px; gap: 8px; }
  .caption-icon { width: 21px; height: 21px; flex-basis: 21px; }
  .caption-label { font-size: 6px; }
  .stage-caption p { font-size: 8px; }
  .transport-bar { grid-template-columns: auto minmax(60px,1fr) 48px; gap: 8px; padding: 7px; }
  .transport-controls { gap: 4px; }
  .transport-button { height: 28px; padding: 0 7px; font-size: 7px; gap: 5px; }
  .transport-button.primary { min-width: 68px; }
  .step-small { display: none; }
  .time-readout strong { font-size: 12px; }
  .progress-top { font-size: 6px; }
  .progress-ends { font-size: 5px; }
  .science-toggle { padding: 9px 10px; }
  .science-toggle small { font-size: 7px; }
  .control-column { width: 100%; }
  .control-panel { padding: 12px; }
  .panel-header { padding-bottom: 9px; }
  h2 { font-size: 14px; }
  .preset-block { padding: 10px 0; }
  .preset-note { font-size: 7px; }
  .control-section { padding: 9px 0 7px; }
  .slider-row { margin-bottom: 9px; }
  .slider-heading label, .slider-heading output { font-size: 8px; }
  .metric-card { min-height: 55px; }
  .footer-line { padding: 0 12px 9px; font-size: 5px; }
  .footer-line span:last-child { display: none; }
  body.embed-mode .workspace { flex: 1 1 auto; min-height: 0; overflow: hidden; }
  body.embed-mode .stage-column { flex: 0 0 auto; }
  body.embed-mode .canvas-wrap { height: 32dvh; min-height: 220px; max-height: 300px; }
  body.embed-mode .control-column { flex: 1 1 0; min-height: 0; overflow: hidden; }
  body.embed-mode .control-panel { height: 100%; max-height: none; overflow-y: auto; overscroll-behavior: contain; }
  body.embed-mode .footer-line { display: none; }
  body.embed-mode .science-panel { flex: 0 0 auto; }
}
@media (max-width: 420px) {
  .workspace { padding: 8px; }
  h1 { font-size: 17px; }
  .stage-subtitle { font-size: 8px; }
  .view-tab { padding: 6px 6px; }
  .screenshot-button { font-size: 0; gap: 0; width: 29px; justify-content: center; }
  .screenshot-button .camera-icon { width: 13px; height: 10px; }
  .transport-bar { grid-template-columns: auto minmax(45px,1fr) 43px; }
  .transport-button { padding: 0 6px; }
  .transport-button.primary { min-width: 63px; }
  .preset-button { gap: 5px; padding: 7px 5px; }
  .preset-button small { font-size: 6px; }
  .equation-grid, .science-bottom-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
.exact-foot { margin-top: 4px; color: #6d8290; font-size: 6px; }
.exact-foot span:last-child { color: var(--cyan); font-variant-numeric: tabular-nums; }
@media (min-width: 761px) {
  body.embed-mode .canvas-wrap { height: min(39vh, 300px); min-height: 260px; }
}
@media (min-width: 761px) {
  body.embed-mode .workspace { padding: 10px 22px 10px; }
  body.embed-mode .stage-column { gap: 8px; }
  body.embed-mode .stage-heading { min-height: 58px; }
  body.embed-mode .stage-toolbar { height: 40px; }
  body.embed-mode .canvas-wrap { height: 380px; min-height: 340px; }
  body.embed-mode .stage-caption { min-height: 54px; }
  body.embed-mode .transport-bar { padding: 7px 10px; }
  body.embed-mode .control-panel { height: calc(100dvh - 100px); max-height: calc(100dvh - 100px); overflow-y: auto; }
  body.embed-mode .science-panel { margin-top: 12px; }
}
@media (max-width: 760px) {
  .science-panel { margin-top: 12px; }
}

.time-readout > span { font-size: 6px; letter-spacing: .08em; }
@media (max-width: 760px) { .time-readout > span { font-size: 5px; } }
