:root {
  color-scheme: dark;
  --bg: #07131c;
  --panel: #0d1d28;
  --panel-2: #102431;
  --panel-3: #142c39;
  --line: rgba(145, 183, 198, .13);
  --line-strong: rgba(145, 183, 198, .22);
  --text: #e8f1f2;
  --muted: #8ca5ae;
  --dim: #607b86;
  --cyan: #58d8d1;
  --cyan-2: #8df0e5;
  --amber: #d88b55;
  --amber-2: #f0b57a;
  --violet: #a69aff;
  --radius: 13px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body { background-image: radial-gradient(ellipse at 50% -30%, rgba(38, 100, 116, .22), transparent 55%), linear-gradient(180deg, #081721 0%, #07131c 100%); }
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.app-shell { max-width: 1920px; margin: 0 auto; min-height: 100vh; padding: 0 22px 12px; }
.topbar { height: 92px; display: grid; grid-template-columns: 260px minmax(280px, 1fr) 260px; align-items: center; border-bottom: 1px solid var(--line); gap: 22px; }
.brand-lockup { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 35px; height: 35px; border: 1px solid rgba(88,216,209,.45); border-radius: 50%; position: relative; display: flex; align-items: center; justify-content: center; gap: 3px; box-shadow: 0 0 24px rgba(88,216,209,.08); }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; border: 1px solid rgba(88,216,209,.26); border-radius: 50%; inset: 5px; }
.brand-mark::after { inset: 10px; }
.brand-mark span { width: 3px; height: 3px; border-radius: 50%; background: var(--cyan); position: relative; z-index: 1; }
.eyebrow { color: #6f929e; font-size: 9px; font-weight: 750; letter-spacing: .16em; }
.brand-name { margin-top: 4px; font-size: 10px; letter-spacing: .13em; font-weight: 800; color: #c1d5d9; }
.title-lockup { text-align: center; }
.title-lockup h1 { font-size: 22px; letter-spacing: -.035em; margin: 0; font-weight: 670; }
.title-lockup p { color: var(--muted); font-size: 11px; margin: 5px 0 0; letter-spacing: .025em; }
.top-actions { display: flex; justify-content: flex-end; align-items: center; gap: 14px; }
.live-status { display: flex; gap: 7px; align-items: center; color: #7fa1a9; font-size: 9px; letter-spacing: .1em; font-weight: 700; }
.live-status i, .stage-live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px rgba(88,216,209,.7); display: inline-block; }
.icon-button { border: 1px solid var(--line-strong); background: rgba(20,44,57,.7); padding: 9px 13px; border-radius: 7px; font-size: 9px; letter-spacing: .1em; font-weight: 750; display: flex; align-items: center; gap: 8px; cursor: pointer; transition: .2s ease; }
.icon-button:hover { border-color: rgba(88,216,209,.55); background: #16313d; }
.button-icon { font-size: 15px; color: var(--cyan); line-height: 10px; }
.workspace { display: grid; grid-template-columns: 274px minmax(420px, 1fr) 306px; gap: 14px; padding-top: 14px; align-items: stretch; height: calc(100vh - 130px); min-height: 540px; }
.panel { background: linear-gradient(160deg, rgba(15,34,46,.96), rgba(10,25,35,.96)); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 16px 50px rgba(0,0,0,.12); }
.control-panel, .insight-panel { padding: 18px 16px 15px; min-width: 0; max-height: 100%; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #284753 transparent; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 19px; }
.panel-head h2 { font-size: 15px; margin: 5px 0 0; letter-spacing: -.02em; font-weight: 650; }
.panel-index { font-size: 9px; letter-spacing: .1em; color: #557480; border: 1px solid var(--line); border-radius: 5px; padding: 5px 7px; }
.section-label { font-size: 9px; color: #7895a0; letter-spacing: .14em; font-weight: 800; margin-bottom: 10px; }
.preset-section { margin-bottom: 19px; }
.preset-grid { display: grid; grid-template-columns: 1fr; gap: 6px; }
.preset { display: flex; align-items: center; text-align: left; gap: 9px; width: 100%; background: rgba(20,43,55,.48); border: 1px solid var(--line); border-radius: 8px; padding: 8px 9px; cursor: pointer; transition: .2s ease; }
.preset:hover { border-color: var(--line-strong); background: rgba(25,55,68,.72); }
.preset.active { border-color: rgba(88,216,209,.45); background: rgba(43,103,108,.13); box-shadow: inset 2px 0 0 var(--cyan); }
.preset-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; }
.dot-cyan { background: var(--cyan); box-shadow: 0 0 10px rgba(88,216,209,.6); }
.dot-orange { background: var(--amber); box-shadow: 0 0 10px rgba(216,139,85,.45); }
.dot-violet { background: var(--violet); box-shadow: 0 0 10px rgba(166,154,255,.45); }
.preset b { display: block; font-size: 10px; font-weight: 700; }
.preset small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.controls-section { display: grid; gap: 13px; }
.control-row label, .speed-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 10px; color: #c6d8db; }
.control-row label span { font-weight: 600; }
.control-row em { font-style: normal; color: var(--cyan); font-weight: 650; margin-left: 3px; }
.control-row output, .speed-row output { color: var(--cyan-2); font-variant-numeric: tabular-nums; font-size: 9px; font-weight: 750; white-space: nowrap; }
input[type="range"] { appearance: none; -webkit-appearance: none; width: 100%; height: 3px; margin: 10px 0 6px; border-radius: 10px; background: linear-gradient(90deg, #3caaa8, #264451); cursor: pointer; display: block; }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 12px; height: 12px; border-radius: 50%; background: #b1f5e9; border: 2px solid #1a5056; box-shadow: 0 0 0 3px rgba(88,216,209,.12), 0 0 12px rgba(88,216,209,.4); }
input[type="range"]::-moz-range-thumb { width: 9px; height: 9px; border-radius: 50%; background: #b1f5e9; border: 2px solid #1a5056; box-shadow: 0 0 0 3px rgba(88,216,209,.12); }
.range-ends { display: flex; justify-content: space-between; color: #5f7c86; font-size: 8px; font-variant-numeric: tabular-nums; }
.panel-divider { height: 1px; background: var(--line); margin: 17px 0 15px; }
.transport-section .section-label { margin-bottom: 10px; }
.speed-row { font-size: 10px; }
.transport-buttons { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 6px; margin-top: 13px; }
.primary-button, .secondary-button { border-radius: 7px; min-height: 34px; cursor: pointer; font-size: 9px; font-weight: 800; letter-spacing: .08em; transition: .18s ease; }
.primary-button { background: linear-gradient(135deg, #63d9cf, #36a9a8); color: #062027; border: 0; box-shadow: 0 5px 18px rgba(56,183,177,.16); }
.primary-button:hover { filter: brightness(1.1); transform: translateY(-1px); }
.secondary-button { background: #142b37; color: #b5c9cd; border: 1px solid var(--line-strong); }
.secondary-button:hover { border-color: rgba(88,216,209,.45); color: var(--text); }
.play-symbol { margin-right: 5px; }
.quality-row { display: flex; align-items: center; justify-content: space-between; margin-top: 15px; color: #78939d; font-size: 8px; font-weight: 800; letter-spacing: .11em; }
.segmented { display: flex; border: 1px solid var(--line-strong); padding: 2px; border-radius: 6px; background: #091923; }
.segmented button { border: 0; background: transparent; color: #6f8993; border-radius: 4px; padding: 5px 8px; font-size: 8px; font-weight: 800; cursor: pointer; }
.segmented button.selected { color: #b8f2e9; background: #1b4149; }
.camera-button { width: 100%; margin-top: 9px; border: 1px solid var(--line); background: transparent; color: #8ca5ae; border-radius: 6px; padding: 8px; font-size: 8px; letter-spacing: .11em; font-weight: 800; cursor: pointer; }
.camera-button:hover { color: var(--cyan-2); border-color: rgba(88,216,209,.4); }
.camera-button span { font-size: 13px; margin-right: 5px; vertical-align: -1px; }
.control-footnote { margin-top: 15px; padding-top: 11px; border-top: 1px solid var(--line); color: #718b94; font-size: 9px; line-height: 1.5; display: flex; gap: 7px; }
.info-mark { border: 1px solid #52727e; color: #8aa8b0; border-radius: 50%; width: 13px; height: 13px; display: inline-flex; align-items: center; justify-content: center; font-size: 8px; flex: 0 0 auto; }
.stage-panel { min-width: 0; min-height: 0; height: 100%; display: flex; flex-direction: column; background: linear-gradient(160deg, rgba(10,26,37,.95), rgba(7,20,29,.98)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: 0 16px 50px rgba(0,0,0,.16); }
.stage-toolbar { min-height: 46px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; border-bottom: 1px solid var(--line); gap: 12px; }
.stage-title { display: flex; align-items: center; gap: 8px; color: #adc4c9; font-size: 9px; font-weight: 800; letter-spacing: .12em; white-space: nowrap; }
.stage-tools { display: flex; align-items: center; gap: 13px; }
.axis-key { color: #78929b; font-size: 8px; white-space: nowrap; display: flex; align-items: center; gap: 5px; }
.axis-key i { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.key-ag { background: var(--cyan); box-shadow: 0 0 7px rgba(88,216,209,.5); }
.key-solid { background: var(--amber); box-shadow: 0 0 7px rgba(216,139,85,.5); }
.stage-dim { font-size: 8px; color: #5e7983; letter-spacing: .08em; border-left: 1px solid var(--line); padding-left: 12px; white-space: nowrap; }
.viewport-wrap { position: relative; flex: 1; min-height: 420px; overflow: hidden; background: radial-gradient(ellipse at 51% 47%, rgba(24,70,80,.34), rgba(8,25,35,.12) 42%, rgba(5,17,26,.45) 78%), linear-gradient(180deg, #0b202c 0%, #081722 100%); }
.viewport-wrap::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .14; background-image: linear-gradient(rgba(120,170,183,.15) 1px, transparent 1px), linear-gradient(90deg, rgba(120,170,183,.15) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(ellipse at center, black, transparent 80%); }
.scene-host { position: absolute; inset: 0; z-index: 1; }
.scene-host canvas { display: block; width: 100%; height: 100%; outline: none; }
.scene-overlay { position: absolute; z-index: 3; left: 15px; right: 15px; display: flex; justify-content: space-between; align-items: center; pointer-events: none; }
.scene-overlay-top { top: 14px; }
.scene-overlay-bottom { bottom: 14px; }
.overlay-chip { border: 1px solid rgba(88,216,209,.22); border-radius: 30px; background: rgba(8,24,33,.65); padding: 7px 10px; color: #9dc2c5; font-size: 8px; letter-spacing: .11em; font-weight: 800; backdrop-filter: blur(8px); }
.chip-dot { width: 5px; height: 5px; background: var(--cyan); border-radius: 50%; display: inline-block; margin-right: 6px; box-shadow: 0 0 8px var(--cyan); }
.overlay-coordinate { font-size: 8px; letter-spacing: .1em; color: #6f929b; background: rgba(8,24,33,.55); padding: 7px 9px; border-radius: 5px; }
.overlay-coordinate b { color: #b5d5d5; margin-left: 5px; font-variant-numeric: tabular-nums; }
.scene-annotation { position: absolute; z-index: 2; left: 15px; display: flex; align-items: center; gap: 6px; color: rgba(154,187,194,.62); font-size: 8px; letter-spacing: .04em; pointer-events: none; }
.annotation-line { width: 22px; height: 1px; background: rgba(88,216,209,.42); }
.annotation-top { top: 26%; }
.annotation-mid { top: 52%; }
.annotation-mid .annotation-line { background: rgba(216,139,85,.55); }
.annotation-bottom { bottom: 22%; }
.annotation-bottom .annotation-line { background: rgba(112,160,170,.4); }
.drag-hint { color: #6c8992; font-size: 8px; letter-spacing: .1em; background: rgba(7,21,30,.6); padding: 7px 9px; border-radius: 5px; }
.drag-hint span { color: var(--cyan); font-size: 13px; vertical-align: -1px; margin-right: 5px; }
.drag-hint b { color: #36535e; padding: 0 4px; }
.scale-indicator { display: flex; flex-direction: column; align-items: center; gap: 4px; color: #73919a; font-size: 8px; }
.scale-indicator span { display: block; width: 36px; height: 4px; border-left: 1px solid #8caeb4; border-right: 1px solid #8caeb4; border-bottom: 1px solid #8caeb4; }
.scene-error { position: absolute; z-index: 5; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 28px; text-align: center; background: rgba(5,16,24,.93); }
.scene-error[hidden], .context-message[hidden] { display: none; }
.error-glyph { color: var(--cyan); font-size: 35px; }
.scene-error h3 { margin: 9px 0 5px; font-size: 15px; }
.scene-error p { max-width: 340px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.context-message { position: absolute; z-index: 6; bottom: 55px; left: 50%; transform: translateX(-50%); background: #321f1a; border: 1px solid rgba(216,139,85,.45); color: #f2c49c; padding: 9px 13px; border-radius: 6px; font-size: 10px; white-space: nowrap; }
.timeline-bar { min-height: 77px; border-top: 1px solid var(--line); padding: 12px 16px 10px; display: grid; grid-template-columns: 130px minmax(90px,1fr) 120px; grid-template-rows: 14px 8px 12px; align-items: center; column-gap: 15px; }
.timeline-time { grid-row: 1 / 4; display: flex; flex-direction: column; gap: 5px; }
.timeline-time span { color: #6d8992; font-size: 8px; letter-spacing: .11em; }
.timeline-time strong { font-size: 15px; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.timeline-track { grid-column: 2 / 4; grid-row: 2; height: 3px; border-radius: 5px; background: #1d3945; position: relative; }
.timeline-fill { height: 100%; background: linear-gradient(90deg, #2f8e94, #64ddd0); border-radius: 5px; position: relative; }
.timeline-marker { position: absolute; top: -3px; width: 9px; height: 9px; border-radius: 50%; background: #c3fff2; border: 2px solid #2a8d8e; box-shadow: 0 0 10px rgba(88,216,209,.6); transform: translateX(-50%); }
.timeline-endpoints { grid-column: 2 / 4; grid-row: 3; display: flex; justify-content: space-between; color: #5c7882; font-size: 8px; }
.timeline-caption { grid-column: 2 / 4; grid-row: 1; justify-self: end; color: #7c9aa2; font-size: 8px; }
.insight-head { margin-bottom: 15px; }
.readout-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.readout-card { border: 1px solid var(--line); background: linear-gradient(145deg, rgba(20,44,57,.65), rgba(11,29,40,.7)); border-radius: 8px; padding: 10px 10px 9px; min-width: 0; }
.readout-wide { grid-column: span 2; }
.readout-label { font-size: 8px; letter-spacing: .12em; color: #83a0a8; font-weight: 800; }
.readout-label span { float: right; color: var(--cyan); font-size: 7px; }
.readout-value { font-size: 22px; font-weight: 680; letter-spacing: -.045em; font-variant-numeric: tabular-nums; margin-top: 7px; color: #e5f1ef; }
.readout-value small { color: #86a5aa; font-size: 10px; font-weight: 600; letter-spacing: 0; }
.readout-note { color: #6c8790; font-size: 8px; margin-top: 3px; line-height: 1.4; }
.mini-meter { height: 3px; background: #203d48; margin-top: 9px; border-radius: 5px; overflow: hidden; }
.mini-meter i { display: block; height: 100%; background: linear-gradient(90deg, #328e94, #6ce0d3); border-radius: 5px; }
.profile-card { margin-top: 12px; padding: 12px 10px 9px; border: 1px solid var(--line); border-radius: 8px; background: rgba(9,25,35,.55); }
.profile-head { display: flex; justify-content: space-between; align-items: flex-start; }
.profile-head .section-label { margin-bottom: 3px; font-size: 8px; }
.profile-title { font-size: 11px; font-weight: 650; }
.profile-unit { color: #5f7c86; font-size: 7px; letter-spacing: .1em; margin-top: 2px; }
#profileChart { width: 100%; height: auto; margin-top: 5px; overflow: visible; }
#profileChart text { fill: #68838d; font-size: 7px; font-family: inherit; }
.chart-grid { stroke: rgba(135,169,179,.12); stroke-width: 1; stroke-dasharray: 2 3; }
.chart-axis { stroke: rgba(135,169,179,.3); stroke-width: 1; fill: none; }
.profile-area { fill: url(#profileFill); }
.profile-line { fill: none; stroke: #65dcd1; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.profile-legend { display: flex; justify-content: space-between; align-items: center; color: #6f8b94; font-size: 7px; margin-top: 1px; }
.profile-legend i { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); display: inline-block; margin-right: 5px; }
.science-panel { margin-top: 12px; border: 1px solid var(--line); border-radius: 8px; background: rgba(9,25,35,.55); overflow: hidden; }
.science-panel summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; padding: 11px 10px; font-size: 9px; letter-spacing: .1em; font-weight: 800; color: #bdd1d3; }
.science-panel summary::-webkit-details-marker { display: none; }
.science-icon { color: var(--cyan); font-size: 14px; vertical-align: -2px; margin-right: 6px; }
.chevron { color: #6c8992; font-size: 15px; transition: transform .2s; }
.science-panel[open] .chevron { transform: rotate(180deg); }
.science-content { border-top: 1px solid var(--line); padding: 10px; }
.science-intro { color: #91aab0; font-size: 9px; line-height: 1.55; margin-bottom: 10px; }
.equation-block { padding: 8px 0; border-top: 1px solid rgba(145,183,198,.08); }
.equation-label { color: #6d8c96; font-size: 7px; letter-spacing: .13em; font-weight: 800; }
.equation { font-family: Georgia, "Times New Roman", serif; color: #d3e9e6; font-size: 13px; margin: 5px 0 3px; white-space: nowrap; }
.equation sub { font-size: 8px; }
.equation-block small { color: #728d96; font-size: 8px; }
.science-facts { display: grid; gap: 7px; padding: 9px 0; border-top: 1px solid rgba(145,183,198,.08); }
.science-facts div { display: grid; grid-template-columns: 78px 1fr; gap: 7px; align-items: start; }
.science-facts b { color: #83cfc6; font-size: 7px; letter-spacing: .07em; }
.science-facts span { color: #849da4; font-size: 8px; line-height: 1.45; }
.limitations { border-top: 1px solid rgba(145,183,198,.08); padding-top: 9px; }
.limitations b { color: #c18d68; font-size: 7px; letter-spacing: .1em; }
.limitations p { margin: 5px 0 0; color: #7d969d; font-size: 8px; line-height: 1.5; }
.validation-card { margin-top: 11px; border: 1px solid rgba(88,216,209,.18); background: linear-gradient(145deg, rgba(22,62,67,.28), rgba(10,28,37,.72)); border-radius: 8px; padding: 10px; }
.validation-head { display: flex; align-items: center; gap: 7px; }
.validation-check { width: 17px; height: 17px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(88,216,209,.14); color: var(--cyan); font-size: 10px; }
.validation-head b { display: block; font-size: 8px; letter-spacing: .1em; }
.validation-head small { display: block; color: #77929a; font-size: 7px; margin-top: 2px; }
.textbook-tag { margin-left: auto; color: #81c8bd; border: 1px solid rgba(88,216,209,.2); border-radius: 4px; padding: 3px 5px; font-size: 6px; letter-spacing: .08em; }
.validation-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.validation-grid div { background: rgba(5,18,26,.5); border-radius: 5px; padding: 7px; }
.validation-grid small { display: block; color: #67858e; font-size: 7px; letter-spacing: .1em; }
.validation-grid b { display: block; color: #d4e8e5; font-size: 11px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.validation-diff { display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 8px; margin-top: 8px; color: #78939b; font-size: 7px; letter-spacing: .1em; }
.validation-diff b { color: var(--cyan-2); font-size: 10px; }
.validation-card p { color: #6d8790; font-size: 7px; line-height: 1.45; margin: 7px 0 0; }
.footer { min-height: 26px; display: flex; justify-content: space-between; align-items: center; color: #4e6973; font-size: 7px; letter-spacing: .1em; padding: 7px 4px 0; }

@media (max-width: 1380px) {
  .workspace { grid-template-columns: 250px minmax(380px, 1fr) 285px; gap: 10px; }
  .app-shell { padding-left: 14px; padding-right: 14px; }
  .control-panel, .insight-panel { padding-left: 13px; padding-right: 13px; }
  .stage-tools { gap: 8px; }
}
@media (max-width: 1120px) {
  .workspace { grid-template-columns: 250px minmax(0,1fr); height: auto; min-height: 0; }
  .control-panel, .insight-panel { max-height: none; overflow: visible; }
  .insight-panel { grid-column: 1 / -1; display: grid; grid-template-columns: 180px 1fr 1fr; gap: 12px; align-items: start; }
  .insight-head { margin: 0; }
  .readout-grid { grid-column: 2; }
  .profile-card { grid-column: 3; margin-top: 0; }
  .science-panel, .validation-card { grid-column: 1 / -1; }
  .viewport-wrap { min-height: 530px; }
}
@media (max-width: 760px) {
  .app-shell { padding: 0 10px 10px; }
  .topbar { height: auto; min-height: 76px; grid-template-columns: 1fr auto; gap: 8px; padding: 12px 2px; }
  .brand-lockup { gap: 8px; }
  .brand-mark { width: 30px; height: 30px; }
  .brand-name { font-size: 8px; }
  .title-lockup { grid-column: 1 / -1; grid-row: 2; text-align: left; padding-left: 39px; }
  .title-lockup h1 { font-size: 18px; }
  .title-lockup p { font-size: 10px; margin-top: 2px; }
  .top-actions { grid-column: 2; grid-row: 1; gap: 8px; }
  .live-status { font-size: 7px; }
  .icon-button { padding: 8px 9px; font-size: 8px; }
  .workspace { display: flex; flex-direction: column; gap: 10px; padding-top: 10px; height: auto; min-height: 0; }
  .control-panel, .insight-panel { max-height: none; overflow: visible; }
  .stage-panel { order: 0; }
  .viewport-wrap { min-height: 430px; height: min(62vh, 520px); flex: none; }
  .stage-toolbar { min-height: 40px; padding: 0 10px; }
  .stage-tools .axis-key { display: none; }
  .stage-dim { font-size: 7px; }
  .timeline-bar { grid-template-columns: 105px minmax(70px,1fr) 70px; padding: 10px; column-gap: 9px; }
  .timeline-time strong { font-size: 13px; }
  .timeline-caption { font-size: 7px; }
  .control-panel { order: 1; }
  .insight-panel { order: 2; display: block; }
  .insight-head { margin-bottom: 13px; }
  .readout-grid { grid-template-columns: 1fr 1fr; }
  .profile-card { margin-top: 10px; }
  .science-panel, .validation-card { margin-top: 10px; }
  .control-panel, .insight-panel { padding: 14px; }
  .preset-grid { grid-template-columns: 1fr 1fr 1fr; gap: 5px; }
  .preset { padding: 8px 6px; align-items: flex-start; gap: 5px; }
  .preset b { font-size: 8px; }
  .preset small { font-size: 7px; line-height: 1.25; }
  .preset-dot { margin-top: 3px; width: 6px; height: 6px; }
  .controls-section { grid-template-columns: 1fr 1fr; column-gap: 14px; }
  .controls-section .section-label { grid-column: 1 / -1; }
  .control-row { min-width: 0; }
  .control-row label { align-items: flex-start; flex-direction: column; gap: 3px; }
  .control-row output { align-self: flex-start; }
  .scene-annotation { font-size: 7px; left: 8px; }
  .scene-overlay { left: 9px; right: 9px; }
  .overlay-chip, .overlay-coordinate { font-size: 7px; }
  .annotation-line { width: 14px; }
  .footer { font-size: 6px; gap: 10px; line-height: 1.4; }
}
@media (max-width: 390px) {
  .viewport-wrap { min-height: 390px; }
  .controls-section { column-gap: 10px; }
  .stage-dim { display: none; }
  .timeline-bar { grid-template-columns: 95px minmax(60px,1fr) 45px; }
  .timeline-caption { display: none; }
  .footer { flex-direction: column; align-items: flex-start; }
}
@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-mode .app-shell { padding: 0; }
body.embed-mode .topbar, body.embed-mode .footer { display: none !important; }
body.embed-mode .workspace { padding: 0; gap: 0; }
@media (max-width: 760px) {
  body.embed-mode .viewport-wrap { min-height: 100vh; height: 100vh; }
  body.embed-mode .timeline-bar { min-height: 64px; }
}
.variable-key { display: grid; gap: 4px; padding: 8px 0 9px; border-top: 1px solid rgba(145,183,198,.08); }
.variable-key b { color: #83cfc6; font-size: 7px; letter-spacing: .1em; }
.variable-key span { color: #849da4; font-size: 8px; line-height: 1.45; }
.variable-key i { color: #d6e9e5; font-style: normal; font-family: Georgia, "Times New Roman", serif; }
.illustrative-tag { display: inline-block; vertical-align: 2px; margin-left: 4px; padding: 3px 5px; border: 1px solid rgba(216,139,85,.25); border-radius: 4px; color: #d8a476; font-size: 6px; letter-spacing: .09em; font-weight: 800; }
