:root {
  color-scheme: dark;
  --bg: #0c151e;
  --panel: #111e29;
  --panel-2: #14232f;
  --line: rgba(177, 205, 215, .12);
  --line-strong: rgba(177, 205, 215, .2);
  --text: #edf2ef;
  --muted: #8e9da3;
  --dim: #64747d;
  --sand: #d6a86d;
  --sand-bright: #f0c78e;
  --cyan: #78d3d8;
  --green: #91c8a2;
  --danger: #e5a16e;
  --radius: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; min-height: 100%; background: var(--bg); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body { min-height: 100vh; overflow-x: hidden; font-size: 13px; letter-spacing: .005em; }
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; display: flex; flex-direction: column; background: radial-gradient(ellipse at 52% -30%, rgba(72, 103, 114, .16), transparent 54%), var(--bg); }
.topbar { height: 64px; flex: 0 0 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; border-bottom: 1px solid var(--line); background: rgba(12, 21, 30, .96); position: relative; z-index: 5; }
.brand-lockup { display: flex; align-items: center; gap: 12px; min-width: 260px; }
.brand-mark { width: 31px; height: 31px; position: relative; display: flex; align-items: flex-end; gap: 2px; padding: 4px 3px; border: 1px solid rgba(214,168,109,.36); border-radius: 8px; background: rgba(214,168,109,.08); overflow: hidden; }
.brand-mark span { display: block; width: 7px; border-radius: 8px 8px 2px 2px; background: linear-gradient(180deg, #f0c78e, #9d7145); transform: skewY(-18deg); }
.brand-mark span:nth-child(1) { height: 9px; opacity: .72; }
.brand-mark span:nth-child(2) { height: 17px; }
.brand-mark span:nth-child(3) { height: 12px; opacity: .82; }
.eyebrow { font-size: 9px; letter-spacing: .16em; font-weight: 750; color: #82939b; line-height: 1.5; }
.eyebrow-dot { color: var(--sand); padding: 0 4px; }
.brand-title { font-size: 14px; line-height: 1.3; font-weight: 650; letter-spacing: -.025em; }
.topbar-center { display: flex; align-items: center; gap: 17px; color: var(--muted); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.live-status { display: flex; align-items: center; gap: 8px; text-transform: none; letter-spacing: .015em; font-size: 11px; color: #b4c3c4; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #8bc99f; box-shadow: 0 0 0 4px rgba(139,201,159,.1), 0 0 12px rgba(139,201,159,.45); }
.status-dot.paused { background: #d4a96f; box-shadow: 0 0 0 4px rgba(212,169,111,.1); }
.status-dot.warning { background: #df906a; box-shadow: 0 0 0 4px rgba(223,144,106,.1); }
.topbar-divider { width: 1px; height: 19px; background: var(--line-strong); }
.mode-tag { color: var(--cyan); border: 1px solid rgba(120,211,216,.23); padding: 3px 6px; border-radius: 4px; margin-left: 5px; font-size: 8px; }
.topbar-actions { display: flex; align-items: center; gap: 9px; min-width: 260px; justify-content: flex-end; }
.icon-button { width: 29px; height: 29px; border: 1px solid var(--line-strong); background: rgba(255,255,255,.025); border-radius: 7px; color: #a8b8bc; display: inline-grid; place-items: center; font-size: 14px; transition: background .2s, border-color .2s; }
.icon-button:hover, .utility-button:hover { background: rgba(255,255,255,.07); border-color: rgba(120,211,216,.38); }
.utility-button { height: 31px; display: flex; align-items: center; gap: 7px; border: 1px solid var(--line-strong); background: rgba(255,255,255,.025); border-radius: 7px; padding: 0 11px; color: #d0dbd9; font-size: 11px; transition: background .2s, border-color .2s; }
.utility-glyph { color: var(--cyan); font-size: 16px; }
.embed-chip { font-size: 8px; letter-spacing: .13em; color: var(--cyan); border: 1px solid rgba(120,211,216,.28); padding: 5px 7px; border-radius: 4px; }
.workspace { flex: 1 1 auto; min-height: 485px; display: grid; grid-template-columns: minmax(0, 1fr) 342px; gap: 1px; background: var(--line); }
.visual-column { min-width: 0; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) 53px; background: #111d27; }
.scene-wrap { position: relative; min-height: 0; overflow: hidden; background: linear-gradient(180deg, #172633, #28333a 60%, #8a6847); isolation: isolate; }
.scene-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
.scene-wrap::after { content: ""; pointer-events: none; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(7,15,22,.42), transparent 24%, transparent 66%, rgba(7,15,22,.28)); }
.scene-topline { position: absolute; z-index: 2; top: 18px; left: 20px; right: 20px; display: flex; align-items: center; justify-content: space-between; pointer-events: none; }
.scene-kicker { color: rgba(231,240,236,.86); font-size: 9px; font-weight: 750; letter-spacing: .16em; display: flex; align-items: center; gap: 8px; text-shadow: 0 1px 5px rgba(0,0,0,.5); }
.tiny-pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.scene-coordinate { color: rgba(226,235,229,.55); font-size: 8px; letter-spacing: .13em; text-shadow: 0 1px 5px rgba(0,0,0,.5); }
.scene-coordinate span { color: var(--sand-bright); padding: 0 4px; }
.scene-caption { position: absolute; z-index: 2; left: 22px; bottom: 21px; display: flex; align-items: flex-start; gap: 12px; pointer-events: none; }
.caption-index { font-size: 10px; color: var(--sand-bright); letter-spacing: .08em; padding-top: 2px; font-weight: 750; }
.caption-index span { color: rgba(255,255,255,.35); padding: 0 2px; }
.caption-copy { display: flex; flex-direction: column; gap: 4px; text-shadow: 0 1px 7px rgba(0,0,0,.6); }
.caption-copy strong { font-size: 12px; font-weight: 650; }
.caption-copy span { color: rgba(238,242,235,.65); font-size: 10px; }
.scene-scale { position: absolute; z-index: 2; right: 22px; bottom: 26px; display: flex; align-items: center; gap: 7px; color: rgba(255,255,255,.6); font-size: 9px; pointer-events: none; }
.scene-scale i { display: block; width: 55px; height: 1px; background: rgba(255,255,255,.65); position: relative; }
.scene-scale i::before, .scene-scale i::after { content: ""; position: absolute; top: -3px; height: 7px; width: 1px; background: rgba(255,255,255,.65); }
.scene-scale i::before { left: 0; } .scene-scale i::after { right: 0; }
.scene-watermark { position: absolute; z-index: 2; right: 21px; top: 20px; font-size: 8px; color: rgba(236,240,233,.43); letter-spacing: .16em; pointer-events: none; }
.watermark-mark { color: var(--sand-bright); font-size: 13px; vertical-align: -1px; margin-right: 5px; }
.watermark-sep { color: rgba(255,255,255,.3); padding: 0 4px; }
.annotation { position: absolute; z-index: 2; transform: translate(8px,-50%); padding: 5px 7px; background: rgba(10,20,28,.72); border: 1px solid rgba(228,210,180,.26); border-radius: 4px; color: #f0d0a2; font-size: 8px; letter-spacing: .14em; font-weight: 750; pointer-events: none; white-space: nowrap; box-shadow: 0 4px 12px rgba(0,0,0,.16); }
.annotation::before { content: ""; display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: currentColor; margin: 0 6px 1px 0; }
.annotation.cyan { color: #9de7e7; border-color: rgba(120,211,216,.3); }
.transport-bar { display: flex; align-items: center; justify-content: space-between; padding: 0 17px; background: #111d27; border-top: 1px solid var(--line); gap: 12px; }
.transport-left, .transport-right { display: flex; align-items: center; gap: 8px; min-width: 0; }
.primary-control { height: 32px; border: 1px solid rgba(214,168,109,.5); background: linear-gradient(180deg, #d9ad75, #b9844d); color: #17212a; border-radius: 6px; padding: 0 13px; display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 750; box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.primary-control:hover { filter: brightness(1.08); }
.button-icon { font-size: 12px; }
.transport-control { width: 31px; height: 31px; border: 1px solid var(--line-strong); background: rgba(255,255,255,.025); color: #bdc8c7; border-radius: 6px; font-size: 14px; }
.transport-control:hover, .quality-control:hover, .text-control:hover { border-color: rgba(120,211,216,.38); color: var(--text); }
.transport-divider { height: 22px; width: 1px; background: var(--line-strong); margin: 0 5px; }
.speed-control { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 8px; letter-spacing: .12em; }
.speed-control input { width: 78px; }
.speed-control strong { color: #dce5e1; font-size: 10px; letter-spacing: 0; min-width: 38px; }
.text-control, .quality-control { height: 30px; padding: 0 9px; border: 1px solid transparent; background: transparent; color: #9baab0; border-radius: 6px; font-size: 10px; white-space: nowrap; }
.text-control span { color: var(--cyan); font-size: 15px; vertical-align: -1px; margin-right: 4px; }
.quality-control { border-color: var(--line); background: rgba(255,255,255,.02); color: #aebbc0; }
.export-control { height: 30px; padding: 0 10px; border: 1px solid rgba(120,211,216,.24); background: rgba(120,211,216,.07); color: #b9e3e1; border-radius: 6px; font-size: 10px; white-space: nowrap; }
.export-control:hover { background: rgba(120,211,216,.14); }
.export-control span { font-size: 14px; margin-right: 4px; }
.control-panel { min-height: 0; overflow-y: auto; background: linear-gradient(180deg, #14222d, #111d27); padding: 19px 18px 14px; scrollbar-width: thin; scrollbar-color: #3a4c56 transparent; }
.panel-heading { display: flex; align-items: flex-end; justify-content: space-between; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.panel-heading h1 { font-size: 20px; letter-spacing: -.045em; margin: 3px 0 0; font-weight: 640; }
.panel-number { color: #6f8188; font-size: 9px; letter-spacing: .14em; padding-bottom: 3px; }
.preset-section, .control-section { padding: 14px 0 13px; border-bottom: 1px solid var(--line); }
.section-label { display: flex; justify-content: space-between; align-items: center; color: #b6c2c0; font-size: 9px; font-weight: 760; letter-spacing: .12em; margin-bottom: 10px; }
.section-note { color: #657780; font-size: 8px; font-weight: 600; }
.preset-grid { display: grid; grid-template-columns: 1fr; gap: 5px; }
.preset-button { width: 100%; min-height: 38px; display: flex; align-items: center; gap: 9px; padding: 5px 8px; text-align: left; border: 1px solid rgba(170,194,198,.11); background: rgba(255,255,255,.018); border-radius: 6px; transition: background .18s, border-color .18s; }
.preset-button:hover { background: rgba(255,255,255,.045); border-color: rgba(170,194,198,.24); }
.preset-button.selected { background: rgba(214,168,109,.085); border-color: rgba(214,168,109,.43); box-shadow: inset 2px 0 #d6a86d; }
.preset-symbol { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 5px; background: rgba(214,168,109,.12); color: var(--sand-bright); font-size: 16px; }
.quiet-symbol { color: #8dc9d2; background: rgba(120,211,216,.1); }
.gust-symbol { color: #e5a77b; background: rgba(229,161,110,.1); }
.preset-button strong { display: block; font-size: 10px; line-height: 1.25; font-weight: 650; color: #e0e8e3; }
.preset-button small { display: block; font-size: 8px; color: #7f9096; line-height: 1.3; margin-top: 2px; }
.preset-description { font-size: 9px; color: #7f9198; line-height: 1.5; margin: 8px 1px 0; min-height: 27px; }
.slider-control { margin: 0 0 12px; }
.slider-control:last-child { margin-bottom: 0; }
.slider-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; gap: 8px; }
.slider-heading label { color: #c4ceca; font-size: 10px; }
.slider-heading output { color: var(--sand-bright); font-size: 10px; font-weight: 650; font-variant-numeric: tabular-nums; }
input[type="range"] { appearance: none; -webkit-appearance: none; width: 100%; height: 4px; background: linear-gradient(90deg, rgba(214,168,109,.72), rgba(120,211,216,.42)); border-radius: 5px; display: block; cursor: pointer; }
input[type="range"]::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #17232d; background: #e9c18d; box-shadow: 0 0 0 1px rgba(233,193,141,.72), 0 1px 5px rgba(0,0,0,.4); }
input[type="range"]::-moz-range-thumb { width: 9px; height: 9px; border-radius: 50%; border: 2px solid #17232d; background: #e9c18d; box-shadow: 0 0 0 1px rgba(233,193,141,.72); }
.range-hints { display: flex; justify-content: space-between; margin-top: 5px; color: #657780; font-size: 8px; }
.compact-controls { padding-bottom: 12px; }
.compact-controls .slider-control { margin-bottom: 10px; }
.panel-bottom { padding-top: 13px; }
.state-line { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.state-pill { padding: 4px 7px; border: 1px solid rgba(214,168,109,.24); color: #c6a578; background: rgba(214,168,109,.06); border-radius: 4px; font-size: 8px; font-weight: 750; letter-spacing: .09em; }
.state-pill.active { border-color: rgba(145,200,162,.3); color: #9ed0ad; background: rgba(145,200,162,.07); }
.model-tag { font-size: 8px; color: #78cbd0; border: 1px solid rgba(120,211,216,.2); border-radius: 4px; padding: 3px 6px; letter-spacing: .1em; }
.mini-bar-row { display: flex; align-items: center; justify-content: space-between; color: #83959a; font-size: 9px; margin-bottom: 5px; }
.mini-bar-row strong { color: #d8e1dc; font-size: 9px; font-variant-numeric: tabular-nums; }
.mini-track { height: 3px; background: rgba(255,255,255,.08); border-radius: 5px; overflow: hidden; margin-bottom: 9px; }
.mini-track i { display: block; width: 0; height: 100%; background: linear-gradient(90deg, #c28e58, #81d0d3); border-radius: inherit; transition: width .2s; }
.disclaimer-mini { color: #64757d; font-size: 8px; line-height: 1.5; margin-top: 10px; }
.metrics-strip { flex: 0 0 102px; display: grid; grid-template-columns: minmax(180px, 1.2fr) repeat(4, minmax(130px, 1fr)); background: #0f1a24; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 0 24px; }
.metrics-intro, .metric-card { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.metrics-intro { gap: 4px; }
.metrics-intro strong { font-size: 12px; font-weight: 650; }
.metrics-intro > span { color: #6e8088; font-size: 9px; }
.metric-card { padding: 0 18px; border-left: 1px solid var(--line); gap: 4px; }
.metric-label { color: #82939a; font-size: 8px; letter-spacing: .1em; font-weight: 750; white-space: nowrap; }
.metric-label span { color: #6d8f91; font-size: 7px; margin-left: 3px; }
.metric-value { font-size: 21px; font-weight: 620; letter-spacing: -.04em; font-variant-numeric: tabular-nums; line-height: 1.15; color: #e8ede7; }
.metric-value small { font-size: 10px; color: #8fa0a3; font-weight: 500; letter-spacing: 0; }
.metric-foot { color: #667780; font-size: 8px; }
.footer-bar { min-height: 25px; flex: 0 0 25px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 24px; color: #60717a; font-size: 8px; background: #0b141c; }
.footer-bar b { color: #8d9b9e; font-weight: 750; font-size: 7px; letter-spacing: .07em; }
.footer-bar i { font-style: normal; padding: 0 4px; color: #41545e; }
.webgl-fallback { position: absolute; z-index: 5; inset: 20% 15%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 25px; border: 1px solid rgba(120,211,216,.22); border-radius: 12px; background: rgba(9,18,26,.88); box-shadow: 0 15px 55px rgba(0,0,0,.35); }
.webgl-fallback[hidden] { display: none; }
.fallback-icon { font-size: 30px; color: var(--cyan); margin-bottom: 12px; }
.webgl-fallback strong { font-size: 15px; }
.webgl-fallback p { max-width: 360px; color: #8fa0a5; font-size: 11px; line-height: 1.6; }
.no-webgl canvas { display: none; }
.keyboard-help { display: none; position: absolute; z-index: 5; top: 53px; right: 18px; width: 210px; padding: 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: rgba(11,20,28,.94); box-shadow: 0 12px 30px rgba(0,0,0,.35); }
.keyboard-help.visible { display: flex; flex-direction: column; gap: 8px; }
.keyboard-help strong { font-size: 10px; margin-bottom: 2px; }
.keyboard-help span { display: flex; align-items: center; justify-content: space-between; color: #94a5a9; font-size: 9px; }
kbd { padding: 2px 5px; border: 1px solid #42545c; border-radius: 4px; color: #d3dfd9; background: #182732; font-size: 8px; }
.science-panel { position: fixed; z-index: 20; top: 0; right: 0; bottom: 0; width: min(460px, 94vw); background: #101d27; border-left: 1px solid rgba(120,211,216,.18); box-shadow: -24px 0 80px rgba(0,0,0,.45); transform: translateX(102%); transition: transform .28s cubic-bezier(.2,.75,.25,1); display: flex; flex-direction: column; }
.science-panel.open { transform: translateX(0); }
.science-header { display: flex; align-items: flex-start; justify-content: space-between; padding: 23px 24px 18px; border-bottom: 1px solid var(--line); }
.science-header h2 { margin: 5px 0 0; font-size: 20px; letter-spacing: -.04em; font-weight: 640; }
.close-button { font-size: 21px; }
.science-scroll { overflow-y: auto; padding: 0 24px 28px; scrollbar-width: thin; scrollbar-color: #3a4c56 transparent; }
.science-lede { display: flex; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.science-index { color: var(--sand); font-size: 10px; font-weight: 750; padding-top: 2px; }
.science-lede p { margin: 0; color: #b4c1bf; font-size: 11px; line-height: 1.7; }
.cause-chain { display: grid; grid-template-columns: 1fr 14px 1fr 14px 1fr; align-items: center; gap: 4px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.cause-chain div { display: flex; flex-direction: column; gap: 5px; }
.cause-chain span { font-size: 7px; color: #7f9298; letter-spacing: .12em; font-weight: 750; }
.cause-chain strong { font-size: 9px; line-height: 1.4; color: #dbe4de; font-weight: 600; }
.cause-chain i { color: var(--cyan); font-style: normal; font-size: 13px; text-align: center; }
.science-section { padding: 17px 0; border-bottom: 1px solid var(--line); }
.science-section-title { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.science-section-title > span:first-child { color: var(--sand); font-size: 9px; font-weight: 750; }
.science-section-title h3 { margin: 0; font-size: 13px; font-weight: 650; }
.science-section p { color: #91a3a7; font-size: 10px; line-height: 1.65; margin: 0 0 11px; }
.equation { padding: 9px 11px; margin: 7px 0; border-left: 2px solid rgba(120,211,216,.48); background: rgba(120,211,216,.045); color: #dce8e3; font-family: ui-serif, Georgia, serif; font-size: 13px; letter-spacing: .02em; }
.science-section dl { display: grid; grid-template-columns: 38px 1fr; gap: 5px 9px; margin: 11px 0 0; font-size: 9px; }
.science-section dt { color: var(--sand-bright); font-family: ui-serif, Georgia, serif; }
.science-section dd { margin: 0; color: #84969c; }
.textbook-badge { margin-left: auto; padding: 3px 6px; border: 1px solid rgba(145,200,162,.3); color: #9bc8a8; border-radius: 4px; font-size: 7px; letter-spacing: .1em; }
.validation-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.validation-grid div { padding: 9px; border: 1px solid var(--line); border-radius: 6px; background: rgba(255,255,255,.018); min-width: 0; }
.validation-grid span { display: block; color: #73868d; font-size: 7px; letter-spacing: .1em; margin-bottom: 5px; }
.validation-grid strong { display: block; color: #dbe5df; font-size: 12px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.limitations { margin: 0; padding-left: 16px; color: #87999e; font-size: 9px; line-height: 1.7; }
.limitations li { padding-left: 3px; margin: 5px 0; }
.limitations li::marker { color: var(--sand); }
.science-bottom-note { padding: 14px 0 0; color: #70858b; font-size: 9px; line-height: 1.6; }

@media (min-width: 1500px) {
  .workspace { grid-template-columns: minmax(0, 1fr) 370px; }
  .control-panel { padding-left: 21px; padding-right: 21px; }
  .scene-caption { bottom: 25px; }
}
@media (max-width: 1050px) {
  .workspace { grid-template-columns: minmax(0, 1fr) 310px; }
  .topbar { padding: 0 16px; }
  .brand-lockup, .topbar-actions { min-width: 210px; }
  .metrics-strip { padding: 0 14px; grid-template-columns: minmax(145px, 1fr) repeat(4, minmax(105px, 1fr)); }
  .metric-card { padding: 0 10px; }
  .transport-bar { padding: 0 10px; }
  .text-control { display: none; }
}
@media (max-width: 760px) {
  body { font-size: 12px; }
  .topbar { height: 56px; flex-basis: 56px; padding: 0 13px; }
  .brand-lockup { min-width: 0; gap: 9px; }
  .brand-mark { width: 28px; height: 28px; }
  .brand-title { font-size: 13px; }
  .eyebrow { font-size: 8px; }
  .topbar-center { display: none; }
  .topbar-actions { min-width: 0; gap: 6px; }
  .utility-button { height: 29px; padding: 0 8px; font-size: 10px; }
  .icon-button { width: 28px; height: 28px; }
  .workspace { display: flex; flex-direction: column; min-height: 0; gap: 0; }
  .visual-column { flex: 0 0 auto; display: grid; grid-template-rows: minmax(270px, 42vh) 50px; }
  .scene-wrap { min-height: 270px; }
  .scene-topline { top: 12px; left: 12px; right: 12px; }
  .scene-watermark { top: 12px; right: 12px; font-size: 7px; }
  .scene-coordinate { display: none; }
  .scene-caption { left: 13px; bottom: 14px; gap: 8px; }
  .caption-copy strong { font-size: 10px; }
  .caption-copy span { font-size: 8px; }
  .scene-scale { right: 13px; bottom: 18px; }
  .annotation { font-size: 7px; padding: 4px 5px; }
  .transport-bar { padding: 0 9px; gap: 4px; }
  .transport-left, .transport-right { gap: 5px; }
  .primary-control { height: 30px; padding: 0 9px; font-size: 10px; }
  .transport-control { width: 29px; height: 29px; }
  .transport-divider { margin: 0 2px; }
  .speed-control { gap: 5px; font-size: 7px; }
  .speed-control input { width: 48px; }
  .speed-control strong { font-size: 9px; min-width: 31px; }
  .quality-control { display: none; }
  .export-control { height: 29px; padding: 0 7px; font-size: 9px; }
  .control-panel { overflow: visible; padding: 15px 14px 18px; }
  .panel-heading { padding-bottom: 11px; }
  .panel-heading h1 { font-size: 18px; }
  .preset-section { padding: 12px 0 10px; }
  .preset-grid { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 5px; }
  .preset-button { min-height: 64px; padding: 7px 6px; flex-direction: column; align-items: flex-start; gap: 5px; }
  .preset-symbol { width: 22px; height: 20px; font-size: 13px; }
  .preset-button strong { font-size: 9px; }
  .preset-button small { font-size: 7px; }
  .preset-description { min-height: 0; font-size: 8px; }
  .control-section { padding: 12px 0; }
  .slider-control { margin-bottom: 12px; }
  .compact-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 11px 14px; }
  .compact-controls .section-label { grid-column: 1 / -1; margin-bottom: 0; }
  .compact-controls .slider-control { margin: 0; }
  .panel-bottom { padding-top: 12px; }
  .metrics-strip { flex: 0 0 auto; padding: 11px 13px 12px; grid-template-columns: 1fr 1fr; gap: 0; }
  .metrics-intro { grid-column: 1 / -1; padding: 0 0 9px; border-bottom: 1px solid var(--line); margin-bottom: 5px; }
  .metrics-intro strong { font-size: 11px; }
  .metrics-intro > span { font-size: 8px; }
  .metric-card { min-height: 68px; padding: 8px 8px 7px 10px; border-left: 0; border-bottom: 1px solid var(--line); }
  .metric-card:nth-child(odd) { border-left: 1px solid var(--line); }
  .metric-card:nth-last-child(-n+2) { border-bottom: 0; }
  .metric-label { font-size: 7px; white-space: normal; }
  .metric-label span { font-size: 6px; }
  .metric-value { font-size: 19px; }
  .metric-foot { font-size: 7px; }
  .footer-bar { min-height: 35px; flex-basis: auto; padding: 7px 13px; align-items: flex-start; flex-direction: column; gap: 3px; font-size: 7px; }
  .science-panel { width: 100%; }
  .science-header { padding: 18px 17px 14px; }
  .science-header h2 { font-size: 18px; }
  .science-scroll { padding: 0 17px 25px; }
  .cause-chain { gap: 2px; }
  .cause-chain strong { font-size: 8px; }
  .keyboard-help { top: 45px; right: 10px; }
}
@media (max-width: 380px) {
  .utility-button { font-size: 0; width: 30px; justify-content: center; padding: 0; }
  .utility-glyph { font-size: 17px; }
  .speed-control input { width: 40px; }
  .text-control { display: none; }
  .export-control { font-size: 8px; }
  .compact-controls { gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
body.embed .topbar, body.embed .footer-bar { display: none; }
body.embed .workspace { min-height: 100vh; }
body.embed .metrics-strip { flex-basis: 90px; }
.waveform-card { margin-top: 11px; padding: 8px 9px 5px; border: 1px solid rgba(177,205,215,.1); border-radius: 6px; background: rgba(255,255,255,.018); }
.waveform-card .mini-bar-row { margin-bottom: 1px; }
.waveform-card .mini-bar-row strong { color: #7f9b9e; font-size: 7px; letter-spacing: .1em; }
.waveform-svg { display: block; width: 100%; height: 33px; overflow: visible; }
body.embed .workspace { min-height: calc(100vh - 90px); }
