:root {
  color-scheme: dark;
  --bg: #07111a;
  --panel: #0d1a24;
  --panel-2: #101f2a;
  --panel-3: #142632;
  --line: rgba(151, 184, 198, .13);
  --line-strong: rgba(151, 184, 198, .22);
  --text: #e5eff1;
  --muted: #8da4ad;
  --subtle: #5f7782;
  --aqua: #55c6d6;
  --blue: #4badd5;
  --amber: #e8b06c;
  --green: #76c7a0;
  --red: #e58c6c;
  --radius: 12px;
  --shadow: 0 16px 40px rgba(0,0,0,.22);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { width: 100%; min-width: 320px; min-height: 100%; margin: 0; background: var(--bg); color: var(--text); }
body { overflow: hidden; font-size: 12px; letter-spacing: .01em; }
button, input { font: inherit; }
button { color: inherit; }
.app-shell { height: 100dvh; min-height: 620px; display: flex; flex-direction: column; padding: 14px 16px 10px; gap: 10px; background: radial-gradient(ellipse at 48% 12%, rgba(31,73,87,.18), transparent 44%), var(--bg); }
.topbar { height: 56px; flex: 0 0 56px; display: flex; align-items: center; justify-content: space-between; padding: 0 5px; }
.brand-lockup { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark { width: 34px; height: 34px; border: 1px solid rgba(84,195,210,.36); border-radius: 10px; display: flex; align-items: center; justify-content: center; gap: 3px; background: linear-gradient(145deg, rgba(44,129,145,.24), rgba(10,27,37,.75)); box-shadow: inset 0 0 18px rgba(52,185,200,.08); }
.brand-mark span { width: 3px; border-radius: 4px; background: #6dd2d9; transform: skew(-24deg); }
.brand-mark span:nth-child(1) { height: 11px; opacity: .6; }
.brand-mark span:nth-child(2) { height: 19px; }
.brand-mark span:nth-child(3) { height: 14px; opacity: .8; }
.eyebrow, .section-label, .stage-kicker { color: #75939e; font-size: 9px; font-weight: 750; letter-spacing: .15em; line-height: 1.35; }
h1, h2, h3, p { margin: 0; }
h1 { margin-top: 2px; font-size: 16px; line-height: 1; letter-spacing: .12em; font-weight: 800; }
h1 span { color: var(--aqua); font-weight: 650; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.live-pill, .seed-chip { display: inline-flex; align-items: center; gap: 7px; height: 28px; border: 1px solid var(--line); border-radius: 30px; padding: 0 10px; color: #91a9b2; font-size: 9px; letter-spacing: .1em; font-weight: 750; background: rgba(16,31,42,.62); }
.live-pill i { width: 6px; height: 6px; border-radius: 50%; background: #7b929a; box-shadow: 0 0 0 3px rgba(123,146,154,.12); }
.live-pill.is-live i { background: #68d4a3; box-shadow: 0 0 0 3px rgba(104,212,163,.13), 0 0 10px #68d4a3; animation: pulse 1.4s ease-in-out infinite; }
.seed-chip b { color: #d9e8eb; font-variant-numeric: tabular-nums; }
.icon-button { width: 30px; height: 30px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: rgba(17,33,44,.72); color: #a6c2c9; cursor: pointer; font-size: 15px; transition: background .18s ease, border-color .18s ease, transform .18s ease; }
.icon-button:hover, .square-button:hover { border-color: rgba(89,203,215,.55); background: #173340; }
.icon-button:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid #6bd2df; outline-offset: 2px; }
.icon-button.small { width: 28px; height: 28px; font-size: 17px; }
.workspace { display: grid; grid-template-columns: 252px minmax(0, 1fr) 238px; gap: 10px; flex: 1; min-height: 0; }
.panel { background: linear-gradient(165deg, rgba(16,31,42,.98), rgba(10,23,32,.98)); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.control-rail, .telemetry-rail { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.control-rail { padding: 16px 14px 12px; }
.telemetry-rail { padding: 16px 13px 12px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #2a4754 transparent; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; }
.panel-heading h2 { margin-top: 4px; font-size: 14px; letter-spacing: -.02em; font-weight: 680; }
.panel-index { color: #4f6a75; font-size: 10px; font-weight: 750; letter-spacing: .1em; }
.preset-block { padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.preset-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-top: 9px; }
.preset-button { min-width: 0; height: 58px; padding: 7px 6px 6px; border: 1px solid var(--line); border-radius: 8px; background: rgba(10,24,33,.7); display: flex; flex-direction: column; align-items: flex-start; gap: 3px; cursor: pointer; text-align: left; transition: .18s ease; }
.preset-button:hover { border-color: rgba(88,193,207,.4); background: rgba(24,52,64,.72); }
.preset-button.active { border-color: rgba(86,199,211,.65); background: linear-gradient(140deg, rgba(34,94,104,.34), rgba(14,33,43,.85)); box-shadow: inset 0 0 0 1px rgba(86,199,211,.1); }
.preset-button b { font-size: 10px; font-weight: 720; }
.preset-button small { font-size: 8px; color: #8299a2; white-space: nowrap; }
.preset-dot { width: 6px; height: 6px; border-radius: 50%; margin-bottom: 1px; }
.preset-dot.aqua { background: #63cbd4; box-shadow: 0 0 8px rgba(99,203,212,.7); }
.preset-dot.amber { background: #e8b06c; }
.preset-dot.violet { background: #ad9ce2; }
.control-list { padding-top: 12px; display: flex; flex-direction: column; gap: 13px; }
.control-row { min-width: 0; }
.control-meta { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-bottom: 7px; }
.control-meta label { color: #c5d5d9; font-size: 10px; font-weight: 600; }
.control-meta output { color: #72d0d8; font-size: 10px; font-weight: 720; font-variant-numeric: tabular-nums; white-space: nowrap; }
input[type="range"] { display: block; width: 100%; height: 4px; margin: 0; appearance: none; -webkit-appearance: none; border-radius: 20px; background: linear-gradient(90deg, #398d9c, #274451); cursor: pointer; }
input[type="range"]::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 12px; height: 12px; border: 2px solid #d6f1f1; border-radius: 50%; background: #4ab9c6; box-shadow: 0 0 0 3px rgba(74,185,198,.16); }
input[type="range"]::-moz-range-thumb { width: 9px; height: 9px; border: 2px solid #d6f1f1; border-radius: 50%; background: #4ab9c6; box-shadow: 0 0 0 3px rgba(74,185,198,.16); }
.range-hint { display: flex; justify-content: space-between; margin-top: 5px; color: #59727c; font-size: 8px; }
.control-footer { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.run-controls { display: grid; grid-template-columns: 1fr 32px 32px; gap: 6px; }
.primary-button { height: 34px; border: 1px solid rgba(91,204,215,.5); border-radius: 8px; background: linear-gradient(110deg, #1e6b78, #174d5a); color: #e7fbfc; display: flex; justify-content: center; align-items: center; gap: 8px; font-size: 10px; font-weight: 750; cursor: pointer; box-shadow: 0 5px 14px rgba(10,91,105,.16); transition: .18s ease; }
.primary-button:hover { background: linear-gradient(110deg, #287f8c, #1a5d6b); transform: translateY(-1px); }
.primary-button.is-running { border-color: rgba(232,176,108,.55); background: linear-gradient(110deg, #79552f, #503e2d); }
.play-icon { font-size: 10px; }
.square-button { width: 32px; height: 34px; border: 1px solid var(--line-strong); border-radius: 8px; background: #142632; color: #a8c4cc; cursor: pointer; font-size: 18px; transition: .18s ease; }
.utility-controls { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.text-button, .quality-button { border: 0; background: transparent; color: #8099a2; cursor: pointer; font-size: 9px; padding: 3px 0; }
.text-button:hover { color: #c4e2e6; }
.quality-button { border: 1px solid var(--line); border-radius: 5px; padding: 4px 6px; font-size: 8px; letter-spacing: .08em; color: #75bfc8; }
.keyboard-hint { margin-top: 9px; color: #526b76; font-size: 8px; letter-spacing: .02em; }
kbd { display: inline-block; padding: 1px 4px; margin-left: 2px; border: 1px solid rgba(128,156,166,.25); border-radius: 3px; color: #8da7af; font: inherit; }
.stage { display: flex; flex-direction: column; overflow: hidden; position: relative; min-height: 0; }
.stage-toolbar { height: 47px; flex: 0 0 47px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; border-bottom: 1px solid var(--line); background: rgba(14,28,38,.72); }
.stage-title { display: flex; flex-direction: column; gap: 2px; }
.stage-title b { font-size: 10px; letter-spacing: .09em; font-weight: 740; }
.stage-tools { display: flex; align-items: center; gap: 9px; }
.orientation-chip { color: #80a0ab; font-size: 9px; font-weight: 750; border: 1px solid var(--line); border-radius: 5px; padding: 5px 7px; }
.viewport { position: relative; flex: 1; min-height: 280px; overflow: hidden; background: radial-gradient(ellipse at 50% 48%, #142e3a, #08131c 76%); }
.scene-mount { position: absolute; inset: 0; }
.scene-mount canvas { display: block; width: 100%; height: 100%; outline: none; }
.scene-vignette { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(5,13,20,.26), transparent 24%, transparent 76%, rgba(5,13,20,.48)), radial-gradient(ellipse at center, transparent 46%, rgba(4,11,17,.28)); }
.scene-label { position: absolute; z-index: 2; pointer-events: none; display: flex; flex-direction: column; gap: 3px; padding: 6px 8px; border: 1px solid rgba(140,180,193,.2); border-radius: 6px; background: rgba(7,20,28,.76); backdrop-filter: blur(8px); transform: translate3d(-50%,-50%,0); transition: opacity .16s ease; white-space: nowrap; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.scene-label b { font-size: 8px; letter-spacing: .1em; color: #d5e7e9; }
.scene-label small { font-size: 7px; color: #80a0aa; letter-spacing: .12em; }
.label-dot { position: absolute; width: 5px; height: 5px; border-radius: 50%; left: -3px; top: -3px; }
.west-dot { background: #5bd3df; box-shadow: 0 0 8px #5bd3df; }
.east-dot { background: #8ab6e8; box-shadow: 0 0 8px #8ab6e8; }
.label-divide { border-color: rgba(232,176,108,.36); }
.label-line { position: absolute; left: -4px; top: 50%; width: 4px; height: 1px; background: var(--amber); }
.label-headcut { border-color: rgba(255,166,98,.45); }
.label-pulse { position: absolute; left: -4px; top: -4px; width: 8px; height: 8px; border: 1px solid #ffae69; border-radius: 50%; box-shadow: 0 0 12px rgba(255,140,72,.75); }
.captured-label { border-color: rgba(118,199,160,.6); }
.scene-legend { position: absolute; right: 12px; bottom: 12px; z-index: 3; display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; border: 1px solid rgba(130,166,177,.16); border-radius: 7px; background: rgba(6,17,25,.76); color: #91aab2; font-size: 8px; backdrop-filter: blur(8px); }
.scene-legend div { display: flex; align-items: center; gap: 7px; }
.legend-line { display: inline-block; width: 17px; height: 3px; border-radius: 4px; }
.west-line { background: #54c7e5; }
.east-line { background: #8ab7e8; }
.legend-dash { display: inline-block; width: 17px; border-top: 1px dashed #e8b06c; }
.scene-bottom-left, .scene-bottom-right { position: absolute; z-index: 3; bottom: 13px; left: 13px; display: flex; align-items: center; gap: 9px; pointer-events: none; }
.scene-bottom-right { left: auto; right: 12px; bottom: 92px; }
.coord-readout, .vertical-chip, .orbit-hint { color: #77929d; font-size: 7px; letter-spacing: .12em; font-weight: 700; }
.vertical-chip { padding-left: 8px; border-left: 1px solid rgba(134,165,176,.28); }
.orbit-hint { color: #6d8791; }
.webgl-fallback, .context-overlay { position: absolute; z-index: 8; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; padding: 24px; background: rgba(5,14,21,.94); text-align: center; }
.webgl-fallback[hidden], .context-overlay[hidden] { display: none; }
.fallback-icon { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid rgba(89,199,213,.3); border-radius: 14px; color: var(--aqua); font-size: 24px; }
.webgl-fallback b, .context-overlay b { font-size: 13px; }
.webgl-fallback p, .context-overlay span { max-width: 330px; color: #8ba4ad; line-height: 1.6; font-size: 10px; }
.stage-footer { flex: 0 0 62px; padding: 10px 14px 8px; background: rgba(11,24,33,.9); border-top: 1px solid var(--line); }
.timeline-head, .timeline-foot { display: flex; align-items: center; justify-content: space-between; color: #75909a; font-size: 8px; letter-spacing: .1em; font-weight: 700; }
.timeline-head b { color: #6bd0d9; font-size: 10px; font-variant-numeric: tabular-nums; }
.timeline-track { position: relative; height: 4px; margin: 8px 0 6px; border-radius: 6px; background: #243a44; }
.timeline-fill { height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #298d9b, #76d6dc, #eab477); box-shadow: 0 0 10px rgba(94,204,211,.22); transition: width .18s linear; }
.timeline-marker { position: absolute; top: 50%; left: 0; width: 9px; height: 9px; border: 2px solid #c8f4ef; border-radius: 50%; background: #46b9c6; transform: translate(-50%,-50%); box-shadow: 0 0 0 3px rgba(74,185,198,.16); }
.timeline-foot { color: #526d77; font-size: 7px; font-weight: 650; }
.telemetry-rail .panel-heading { margin-bottom: 11px; }
.year-card { padding: 10px 11px 9px; border: 1px solid rgba(104,169,181,.18); border-radius: 9px; background: linear-gradient(135deg, rgba(23,57,67,.58), rgba(13,29,39,.8)); }
.metric-label { color: #829ba4; font-size: 8px; letter-spacing: .12em; font-weight: 760; }
.year-value { display: flex; align-items: baseline; gap: 7px; margin-top: 2px; }
.year-value strong { font-size: 26px; line-height: 1.1; font-weight: 720; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.year-value span { color: #8aa5ae; font-size: 10px; }
.year-subline { display: flex; align-items: center; gap: 6px; margin-top: 6px; color: #6ebda6; font-size: 8px; letter-spacing: .09em; font-weight: 750; }
.status-dot { width: 5px; height: 5px; border-radius: 50%; background: #69c9a0; box-shadow: 0 0 7px rgba(105,201,160,.7); }
.captured-text { color: #8fdaa9 !important; }
.metric-stack { display: flex; flex-direction: column; gap: 7px; margin-top: 9px; }
.metric-card { padding: 9px 10px 8px; border: 1px solid var(--line); border-radius: 8px; background: rgba(13,27,37,.7); }
.metric-top { display: flex; align-items: center; justify-content: space-between; gap: 5px; }
.metric-tag { font-size: 7px; letter-spacing: .1em; font-weight: 800; }
.metric-tag.scaled { color: #8bb5c2; }
.metric-tag.illustrative { color: #d7b47c; }
.metric-tag.textbook { color: #91c7a7; }
.metric-value { display: flex; align-items: baseline; gap: 6px; margin: 3px 0 6px; }
.metric-value strong { font-size: 20px; line-height: 1.1; font-weight: 720; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.metric-value span { color: #8da5ad; font-size: 9px; }
.metric-track { height: 3px; border-radius: 8px; background: #243b45; overflow: hidden; }
.metric-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #378b9a, #68c9d0); transition: width .25s ease; }
.metric-card:nth-child(2) .metric-track i { background: linear-gradient(90deg, #a47b49, #e3b36f); }
.metric-card:nth-child(3) .metric-track i { background: linear-gradient(90deg, #7b8792, #a9c2ca); }
.metric-card:nth-child(4) .metric-track i { background: linear-gradient(90deg, #438d79, #8bd3a8); }
.metric-card small { display: block; margin-top: 6px; color: #627d87; font-size: 8px; }
.validation-card { margin-top: 9px; padding: 9px 10px; border: 1px solid rgba(108,190,150,.2); border-radius: 8px; background: linear-gradient(140deg, rgba(22,53,49,.38), rgba(13,27,37,.78)); }
.validation-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 5px; }
.validation-state { color: #7bd0a0; font-size: 8px; letter-spacing: .1em; font-weight: 850; }
.validation-state.warn { color: #e9b56e; }
.validation-card > b { display: block; margin-bottom: 7px; font-size: 9px; font-weight: 720; }
.validation-row { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; color: #809aa3; font-size: 8px; }
.validation-row strong { color: #c6d9dc; font-size: 9px; font-weight: 700; font-variant-numeric: tabular-nums; }
.validation-row.error-row strong { color: #8bd3a8; }
.validation-card > small { display: block; margin-top: 7px; color: #5d7b80; font-size: 7px; letter-spacing: .08em; }
.science-open { display: flex; justify-content: space-between; align-items: center; width: 100%; margin-top: auto; padding: 10px 1px 2px; border: 0; background: transparent; color: #76cbd2; font-size: 9px; font-weight: 700; cursor: pointer; text-align: left; }
.science-open:hover { color: #c1f1f1; }
.science-open b { font-size: 14px; font-weight: 500; }
.app-footer { text-transform: uppercase; flex: 0 0 15px; display: flex; justify-content: space-between; align-items: center; padding: 0 4px; color: #4f6873; font-size: 7px; letter-spacing: .09em; }
.science-backdrop { position: fixed; inset: 0; z-index: 20; background: rgba(2,8,12,.66); backdrop-filter: blur(3px); }
.science-backdrop[hidden] { display: none; }
.science-drawer { position: fixed; z-index: 21; top: 0; right: 0; width: min(470px, 94vw); height: 100dvh; display: flex; flex-direction: column; background: #0c1b25; border-left: 1px solid rgba(132,177,189,.2); box-shadow: -22px 0 55px rgba(0,0,0,.35); transform: translateX(102%); transition: transform .28s cubic-bezier(.2,.8,.2,1); }
.science-drawer.open { transform: translateX(0); }
.drawer-head { flex: 0 0 70px; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin-top: 4px; font-size: 20px; letter-spacing: -.03em; }
.drawer-content { overflow-y: auto; padding: 20px 22px 28px; scrollbar-width: thin; scrollbar-color: #2b4b57 transparent; }
.science-intro { display: flex; gap: 13px; padding: 14px; border: 1px solid rgba(82,190,202,.22); border-radius: 10px; background: rgba(27,76,84,.2); }
.science-icon { flex: 0 0 35px; width: 35px; height: 35px; display: grid; place-items: center; border-radius: 9px; background: rgba(67,166,177,.14); color: #76d6dd; font-size: 24px; }
.science-intro p { color: #b3c7cb; font-size: 11px; line-height: 1.65; }
.science-section { padding: 19px 0 16px; border-bottom: 1px solid var(--line); }
.science-section h3 { margin: 5px 0 7px; font-size: 14px; font-weight: 720; }
.science-section p, .science-section li { color: #92aab1; font-size: 10px; line-height: 1.72; }
.equation { margin: 10px 0; padding: 12px 13px; border: 1px solid rgba(100,164,177,.18); border-radius: 7px; background: rgba(7,20,29,.8); color: #a9e0e2; font: 15px Georgia, serif; text-align: center; }
.equation sup, .equation sub { font-size: 9px; }
.assumptions ul { margin: 9px 0 0; padding-left: 17px; }
.assumptions li { padding-left: 3px; margin: 5px 0; }
.science-footnote { margin-top: 17px; padding: 11px; border-left: 2px solid #d5a56b; background: rgba(164,112,52,.08); color: #9b927f; font-size: 8px; line-height: 1.6; letter-spacing: .05em; }
@keyframes pulse { 50% { opacity: .5; } }

@media (max-width: 1120px) {
  .workspace { grid-template-columns: 228px minmax(0,1fr) 218px; gap: 8px; }
  .control-rail { padding-inline: 11px; }
  .telemetry-rail { padding-inline: 10px; }
  .app-shell { padding-inline: 10px; }
}
@media (max-width: 900px) {
  body { overflow: auto; }
  .app-shell { height: auto; min-height: 100dvh; overflow: visible; }
  .workspace { grid-template-columns: minmax(0,1fr) 220px; grid-template-rows: minmax(470px, 58vh) auto; }
  .stage { grid-column: 1 / -1; grid-row: 1; }
  .control-rail { grid-column: 1; grid-row: 2; min-height: 500px; }
  .telemetry-rail { grid-column: 2; grid-row: 2; min-height: 500px; }
  .app-footer { padding: 5px 3px; }
}
@media (max-width: 620px) {
  .app-shell { padding: 8px; gap: 8px; }
  .topbar { height: 48px; flex-basis: 48px; padding: 0 2px; }
  .brand-mark { width: 30px; height: 30px; }
  h1 { font-size: 14px; }
  .eyebrow { font-size: 8px; }
  .topbar-right { gap: 5px; }
  .live-pill { height: 25px; padding: 0 7px; font-size: 7px; }
  .seed-chip { display: none; }
  .workspace { display: flex; flex-direction: column; gap: 8px; }
  .stage { order: 0; height: 520px; flex: 0 0 520px; }
  .control-rail { order: 1; min-height: 0; padding: 14px 12px; }
  .telemetry-rail { order: 2; min-height: 0; overflow: visible; padding: 14px 12px; }
  .stage-toolbar { height: 43px; flex-basis: 43px; padding-inline: 11px; }
  .stage-title b { font-size: 9px; }
  .viewport { min-height: 0; }
  .stage-footer { flex-basis: 58px; padding-inline: 11px; }
  .scene-legend { right: 7px; bottom: 7px; padding: 6px 7px; font-size: 7px; }
  .scene-bottom-left { left: 8px; bottom: 8px; gap: 5px; }
  .scene-bottom-right { display: none; }
  .coord-readout, .vertical-chip { font-size: 6px; }
  .scene-label { padding: 5px 6px; }
  .scene-label b { font-size: 7px; }
  .scene-label small { font-size: 6px; }
  .preset-grid { gap: 7px; }
  .preset-button { height: 62px; padding: 8px; }
  .preset-button b { font-size: 11px; }
  .preset-button small { font-size: 9px; }
  .control-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 14px; row-gap: 15px; }
  .control-meta label, .control-meta output { font-size: 9px; }
  .control-footer { margin-top: 16px; }
  .telemetry-rail .panel-heading { margin-bottom: 12px; }
  .metric-stack { display: grid; grid-template-columns: 1fr 1fr; }
  .year-card { padding: 12px; }
  .validation-card { margin-top: 10px; }
  .science-open { margin-top: 12px; }
  .app-footer { min-height: 26px; height: auto; flex-basis: auto; gap: 8px; flex-wrap: wrap; font-size: 6px; line-height: 1.4; }
}
@media (max-width: 390px) {
  .stage { height: 490px; flex-basis: 490px; }
  .scene-legend { bottom: 5px; right: 5px; }
  .scene-bottom-left { max-width: 55%; }
  .vertical-chip { display: none; }
  .control-list { column-gap: 10px; }
  .metric-value strong { font-size: 18px; }
  .panel-heading h2 { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
body.embed-mode .app-shell { padding: 6px; gap: 6px; }
body.embed-mode .topbar { height: 42px; flex-basis: 42px; }
body.embed-mode .app-footer { display: none; }
body.embed-mode .workspace { grid-template-columns: 220px minmax(0,1fr) 210px; }
body.embed-mode .topbar .eyebrow { display: none; }
body.embed-mode .science-drawer { max-width: 92vw; }
@media (max-width: 900px) {
  body.embed-mode .workspace { grid-template-columns: minmax(0,1fr) 210px; }
}
@media (max-width: 620px) {
  body.embed-mode .workspace { display: flex; }
  body.embed-mode .stage { height: 480px; flex-basis: 480px; }
  body.embed-mode .topbar-right .live-pill { display: none; }
}
