:root {
  color-scheme: dark;
  --bg: #080d12;
  --panel: #0d151c;
  --panel-2: #101b23;
  --panel-3: #13212a;
  --line: rgba(155, 183, 193, .13);
  --line-strong: rgba(155, 183, 193, .22);
  --text: #e8f0f1;
  --muted: #8da0a7;
  --dim: #60747d;
  --accent: #70e2d4;
  --accent-soft: rgba(112, 226, 212, .12);
  --accent-line: rgba(112, 226, 212, .36);
  --janus: #70e2d4;
  --epim: #c6d9d8;
  --radius: 14px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-width: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body { overflow-x: hidden; }
button, input { font: inherit; }
button { color: inherit; }
.app-shell { min-height: 100vh; display: flex; flex-direction: column; background: radial-gradient(ellipse at 34% 18%, rgba(24, 47, 56, .18), transparent 46%), var(--bg); }
body.embed-mode { height: 100vh; height: 100dvh; overflow: hidden; }
body.embed-mode .app-shell { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; }
.topbar { height: 68px; flex: 0 0 68px; display: flex; align-items: center; gap: 14px; padding: 0 22px; border-bottom: 1px solid var(--line); background: rgba(8, 13, 18, .94); position: relative; z-index: 2; }
.brand-mark { width: 30px; height: 30px; position: relative; display: flex; align-items: center; justify-content: center; border: 1px solid var(--accent-line); border-radius: 50%; transform: rotate(-28deg); }
.brand-mark span { position: absolute; width: 25px; height: 8px; border: 1px solid var(--accent); border-radius: 50%; opacity: .8; }
.brand-mark span:nth-child(2) { width: 19px; height: 19px; border-color: rgba(112,226,212,.4); }
.brand-mark span:nth-child(3) { width: 5px; height: 5px; border: 0; background: var(--accent); border-radius: 50%; }
.brand-copy { min-width: 0; }
.eyebrow { color: var(--muted); font-size: 9px; letter-spacing: .2em; font-weight: 700; line-height: 1.2; }
.eyebrow-dot { display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); margin: 0 7px 1px; }
h1 { margin: 4px 0 0; font-size: 16px; line-height: 1; letter-spacing: .13em; font-weight: 650; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 9px; }
.epoch-tag, .frame-tag { display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 5px; padding: 7px 9px; font-size: 9px; letter-spacing: .12em; color: #c1d0d2; white-space: nowrap; }
.epoch-tag small { color: var(--accent); font-size: 8px; letter-spacing: .09em; }
.tiny-dot, .live-indicator { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px rgba(112,226,212,.7); }
.frame-tag { color: var(--muted); }
.workspace { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 366px; gap: 14px; padding: 14px; }
.stage-card { min-width: 0; min-height: 0; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: linear-gradient(160deg, rgba(17, 29, 37, .95), rgba(9, 15, 21, .98)); box-shadow: 0 18px 55px rgba(0,0,0,.18); }
.stage-topline { height: 42px; flex: 0 0 42px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: rgba(11, 19, 25, .7); }
.stage-kicker { display: flex; align-items: center; gap: 8px; color: var(--accent); font-size: 9px; letter-spacing: .17em; font-weight: 700; }
.live-indicator { width: 5px; height: 5px; }
.live-indicator.paused { background: #84949a; box-shadow: none; }
.stage-topline-right { display: flex; gap: 15px; }
.micro-label { display: flex; align-items: center; gap: 6px; font-size: 8px; color: var(--muted); letter-spacing: .13em; }
.key-dot { width: 6px; height: 6px; display: inline-block; border-radius: 50%; background: var(--accent); }
.epim-key { background: var(--epim); }
.canvas-wrap { position: relative; flex: 1 1 auto; min-height: 280px; overflow: hidden; background: radial-gradient(ellipse at 50% 46%, rgba(25, 48, 57, .34), rgba(8, 14, 20, .15) 43%, rgba(6, 11, 16, .9) 100%); }
#spaceCanvas { display: block; width: 100%; height: 100%; outline: none; touch-action: pan-y; }
#spaceCanvas:focus-visible { outline: 1px solid var(--accent); outline-offset: -3px; }
.canvas-corner { position: absolute; top: 15px; display: flex; align-items: center; gap: 7px; color: rgba(160, 184, 190, .55); font-size: 8px; letter-spacing: .16em; pointer-events: none; }
.canvas-corner-left { left: 16px; }
.canvas-corner-right { right: 16px; flex-direction: column; align-items: flex-end; gap: 3px; font-variant-numeric: tabular-nums; }
.canvas-corner-right small { color: #5e737b; font-size: 6px; letter-spacing: .13em; }
.corner-rule { display: inline-block; width: 15px; height: 1px; background: var(--accent); opacity: .75; }
.scene-telemetry { position: absolute; top: 42px; right: 14px; width: 164px; padding: 8px 9px; display: flex; flex-direction: column; gap: 7px; border: 1px solid rgba(155,183,193,.15); border-radius: 7px; background: rgba(8, 16, 21, .72); backdrop-filter: blur(7px); pointer-events: none; }
.scene-telemetry div { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.scene-telemetry span { color: #81969b; font-size: 6px; letter-spacing: .1em; white-space: nowrap; }
.scene-telemetry i { display: block; margin-top: 2px; color: #536970; font-size: 5px; font-style: normal; letter-spacing: .07em; }
.scene-telemetry b { color: #d7e5e4; font-size: 9px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.scene-caption { position: absolute; left: 16px; bottom: 16px; max-width: min(440px, calc(100% - 145px)); display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid rgba(112,226,212,.2); border-radius: 8px; background: rgba(8, 16, 21, .78); backdrop-filter: blur(8px); pointer-events: none; }
.caption-index { color: var(--accent); font-size: 9px; letter-spacing: .12em; font-weight: 700; padding-top: 2px; }
.caption-copy { color: #d5e2e2; font-size: 11px; line-height: 1.45; }
.scale-ruler { position: absolute; right: 16px; bottom: 18px; width: 105px; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; pointer-events: none; }
.scale-ruler span { display: block; height: 3px; width: 74px; border-left: 1px solid var(--accent); border-right: 1px solid var(--accent); border-bottom: 1px solid var(--accent); }
.scale-ruler b { font-size: 9px; font-weight: 600; color: #b6c8ca; }
.scale-ruler small { font-size: 7px; color: var(--dim); letter-spacing: .13em; }
.stage-footer { min-height: 44px; flex: 0 0 auto; padding: 8px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); background: rgba(10, 17, 23, .9); }
.scale-explainer { display: flex; align-items: center; gap: 8px; color: #9db1b6; font-size: 9px; line-height: 1.35; min-width: 0; }
.scale-symbol { color: var(--accent); font-size: 13px; }
.stage-footer-right { flex: 0 0 auto; display: flex; align-items: center; gap: 9px; }
.footer-status { color: var(--dim); font-size: 7px; letter-spacing: .12em; white-space: nowrap; }
.footer-divider { width: 1px; height: 10px; background: var(--line-strong); }
.control-rail { min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 2px 2px 8px 0; scrollbar-width: thin; scrollbar-color: #2b4149 transparent; }
.rail-section { padding: 12px 12px 14px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 11px; background: linear-gradient(155deg, rgba(16, 27, 35, .94), rgba(11, 18, 24, .96)); }
.section-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; color: var(--accent); font-size: 8px; letter-spacing: .17em; font-weight: 750; }
.section-line { height: 1px; flex: 1; background: var(--line); }
.preset-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.preset-button { min-width: 0; min-height: 48px; display: flex; align-items: center; gap: 8px; padding: 8px; text-align: left; border: 1px solid var(--line); border-radius: 7px; background: rgba(7, 13, 18, .5); cursor: pointer; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.preset-button:hover { border-color: var(--accent-line); transform: translateY(-1px); }
.preset-button.active { border-color: var(--accent-line); background: var(--accent-soft); }
.preset-dot { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 9px rgba(112,226,212,.35); }
.preset-dot-outline { background: transparent; border: 1px solid var(--accent); box-shadow: none; }
.preset-button b { display: block; font-size: 9px; font-weight: 650; color: #dce8e8; white-space: nowrap; }
.preset-button small { display: block; margin-top: 3px; color: var(--muted); font-size: 7px; white-space: nowrap; }
.slider-control { margin-top: 10px; }
.slider-control:first-of-type { margin-top: 0; }
.slider-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.slider-head label { color: #d3dfdf; font-size: 10px; font-weight: 550; }
.slider-head output { color: var(--accent); font-size: 10px; font-variant-numeric: tabular-nums; font-weight: 650; white-space: nowrap; }
.info { display: inline-flex; align-items: center; justify-content: center; width: 12px; height: 12px; margin-left: 3px; border: 1px solid rgba(141,160,167,.55); border-radius: 50%; color: var(--muted); font-size: 8px; font-style: normal; cursor: help; }
input[type="range"] { width: 100%; height: 14px; margin: 0; appearance: none; background: transparent; cursor: pointer; accent-color: var(--accent); }
input[type="range"]::-webkit-slider-runnable-track { height: 3px; border-radius: 4px; background: linear-gradient(90deg, rgba(112,226,212,.75), rgba(112,226,212,.15)); }
input[type="range"]::-moz-range-track { height: 3px; border-radius: 4px; background: linear-gradient(90deg, rgba(112,226,212,.75), rgba(112,226,212,.15)); }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 11px; height: 11px; margin-top: -4px; border: 2px solid #081015; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 1px var(--accent-line), 0 0 10px rgba(112,226,212,.2); }
input[type="range"]::-moz-range-thumb { width: 8px; height: 8px; border: 2px solid #081015; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 1px var(--accent-line); }
input[type="range"]:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
.range-meta { display: flex; align-items: center; justify-content: space-between; color: var(--dim); font-size: 7px; font-variant-numeric: tabular-nums; }
.source-tag { color: #83999d; font-size: 6px; letter-spacing: .11em; }
.compact-slider { margin-top: 0; margin-bottom: 10px; }
.view-row { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); }
.switch-label { min-width: 0; display: flex; flex-direction: column; gap: 2px; color: #d3dfdf; font-size: 9px; font-weight: 550; }
.switch-label small { color: var(--muted); font-size: 7px; font-weight: 400; }
.switch-input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch { width: 29px; height: 16px; display: flex; align-items: center; padding: 2px; border: 1px solid var(--line-strong); border-radius: 12px; background: #1a2931; cursor: pointer; transition: background .18s ease, border-color .18s ease; }
.switch span { width: 10px; height: 10px; border-radius: 50%; background: #8ca0a5; transition: transform .18s ease, background .18s ease; }
.switch-input:checked + .switch { border-color: var(--accent-line); background: rgba(112,226,212,.22); }
.switch-input:checked + .switch span { transform: translateX(12px); background: var(--accent); }
.switch-input:focus-visible + .switch { outline: 1px solid var(--accent); outline-offset: 3px; }
.segmented { display: flex; align-items: center; padding: 2px; border: 1px solid var(--line); border-radius: 6px; background: rgba(5, 10, 14, .65); }
.segment { min-width: 38px; padding: 4px 7px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); font-size: 8px; cursor: pointer; transition: background .18s ease, color .18s ease; }
.segment.active { color: var(--accent); background: rgba(112,226,212,.12); }
.segment:focus-visible, button:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }
.transport-row { display: grid; grid-template-columns: 1.2fr .8fr .8fr; gap: 6px; margin-top: 10px; }
.transport-button { height: 32px; display: flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line-strong); border-radius: 6px; background: rgba(5, 10, 14, .55); color: #b9c9cb; font-size: 8px; letter-spacing: .12em; font-weight: 700; cursor: pointer; transition: border-color .18s ease, background .18s ease, color .18s ease; }
.transport-button:hover { border-color: var(--accent-line); color: var(--accent); }
.transport-button.primary { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent); }
.transport-button span { font-size: 12px; line-height: 1; }
.play-icon { font-size: 11px !important; }
.screenshot-button { width: 100%; height: 28px; margin-top: 6px; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: #8da2a7; font-size: 8px; letter-spacing: .14em; cursor: pointer; transition: color .18s ease, border-color .18s ease, background .18s ease; }
.screenshot-button:hover { color: var(--accent); border-color: var(--accent-line); background: rgba(112,226,212,.06); }
.camera-icon { margin-right: 7px; font-size: 12px; color: var(--accent); }
.readouts-section { padding-bottom: 11px; }
.readout-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.readout-card { min-width: 0; padding: 8px 9px 7px; border: 1px solid var(--line); border-radius: 7px; background: rgba(5, 11, 15, .45); }
.readout-wide { grid-column: 1 / -1; }
.readout-label { display: flex; align-items: center; justify-content: space-between; gap: 6px; color: var(--muted); font-size: 7px; letter-spacing: .12em; font-weight: 700; }
.readout-label i { color: #657b80; font-size: 6px; font-style: normal; letter-spacing: .08em; }
.readout-value { margin-top: 4px; color: #e4eeee; font-size: 17px; line-height: 1.1; font-weight: 560; letter-spacing: -.03em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.readout-value small { color: var(--muted); font-size: 9px; font-weight: 450; letter-spacing: 0; }
.readout-foot { margin-top: 4px; color: var(--dim); font-size: 7px; line-height: 1.2; }
.check-card { margin: 0 0 8px; padding: 11px 12px; border: 1px solid rgba(112,226,212,.2); border-radius: 10px; background: linear-gradient(140deg, rgba(112,226,212,.07), rgba(12, 21, 27, .96) 55%); }
.check-heading { display: flex; align-items: center; gap: 7px; color: var(--accent); font-size: 8px; letter-spacing: .14em; font-weight: 750; }
.check-mark { display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 14px; border: 1px solid var(--accent-line); border-radius: 50%; font-size: 9px; }
.check-tag { margin-left: auto; color: #82999d; font-size: 6px; letter-spacing: .1em; }
.check-values { display: flex; align-items: center; gap: 12px; margin-top: 9px; }
.check-values div:not(.check-versus) { display: flex; flex-direction: column; gap: 3px; }
.check-values small { color: var(--dim); font-size: 6px; letter-spacing: .14em; }
.check-values b { color: #e1eeee; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.check-values em { color: var(--muted); font-size: 9px; font-style: normal; font-weight: 450; }
.check-versus { color: var(--dim); font-size: 8px; }
.check-result { margin-top: 7px; color: #9cb0b3; font-size: 8px; line-height: 1.35; }
.check-progress { height: 2px; margin-top: 8px; border-radius: 3px; overflow: hidden; background: rgba(112,226,212,.12); }
.check-progress span { display: block; width: 0; height: 100%; background: var(--accent); transition: width .15s linear; }
.science-panel { margin-bottom: 8px; border: 1px solid var(--line); border-radius: 10px; background: rgba(12, 20, 26, .96); }
.science-panel summary { display: flex; align-items: center; justify-content: space-between; padding: 12px; color: #c5d6d7; font-size: 8px; letter-spacing: .16em; font-weight: 750; cursor: pointer; list-style: none; }
.science-panel summary::-webkit-details-marker { display: none; }
.summary-plus { color: var(--accent); font-size: 15px; font-weight: 300; transition: transform .2s ease; }
.science-panel[open] .summary-plus { transform: rotate(45deg); }
.science-content { padding: 0 12px 13px; color: #9fb2b6; font-size: 9px; line-height: 1.55; }
.science-content h3 { margin: 12px 0 4px; color: #d8e5e5; font-size: 9px; font-weight: 650; }
.science-content p { margin: 4px 0 8px; }
.science-content .equation { padding: 8px; border-left: 2px solid var(--accent); background: rgba(112,226,212,.05); color: #c5e1de; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 9px; }
.science-content .disclaimer { margin-top: 12px; color: var(--accent); font-size: 8px; }
.science-content .source-note { color: var(--dim); font-size: 7px; }
.keyboard-note { padding: 3px 8px 4px; color: var(--dim); font-size: 7px; letter-spacing: .1em; text-align: center; }
kbd { margin: 0 3px 0 6px; padding: 2px 4px; border: 1px solid var(--line-strong); border-radius: 3px; color: #9db0b3; font: inherit; font-size: 7px; }
button:active { transform: translateY(1px); }
@media (max-width: 1050px) {
  .workspace { grid-template-columns: minmax(0, 1fr) 338px; gap: 10px; padding: 10px; }
  .topbar { padding: 0 16px; }
  .rail-section { padding-left: 10px; padding-right: 10px; }
}
@media (max-width: 820px) {
  .topbar { height: 58px; flex-basis: 58px; padding: 0 12px; }
  .brand-mark { width: 26px; height: 26px; }
  h1 { font-size: 13px; }
  .eyebrow { font-size: 7px; }
  .topbar-right { gap: 5px; }
  .epoch-tag { padding: 6px 7px; font-size: 8px; }
  .epoch-tag small { display: none; }
  .frame-tag { display: none; }
  .workspace { display: flex; flex-direction: column; gap: 9px; padding: 9px; overflow: auto; }
  body.embed-mode .workspace { flex: 1 1 auto; overflow: hidden; }
  .stage-card { flex: 0 0 47vh; min-height: 320px; }
  body.embed-mode .stage-card { flex: 0 0 42%; min-height: 270px; }
  .canvas-wrap { min-height: 0; }
  .control-rail { flex: 1 1 auto; min-height: 0; overflow: visible; padding: 0 0 8px; }
  body.embed-mode .control-rail { overflow-y: auto; overscroll-behavior: contain; }
  .rail-section { margin-bottom: 7px; }
}
@media (max-width: 480px) {
  .topbar { gap: 9px; }
  .brand-mark { width: 24px; height: 24px; }
  .eyebrow { letter-spacing: .14em; }
  h1 { font-size: 12px; letter-spacing: .1em; }
  .topbar-right { margin-left: auto; }
  .epoch-tag { font-size: 7px; padding: 6px; }
  .workspace { padding: 7px; gap: 7px; }
  .stage-card { flex-basis: 43vh; min-height: 285px; }
  body.embed-mode .stage-card { flex-basis: 40%; min-height: 260px; }
  .stage-topline { height: 34px; flex-basis: 34px; padding: 0 10px; }
  .stage-kicker { font-size: 7px; }
  .stage-topline-right { gap: 8px; }
  .micro-label { font-size: 7px; }
  .canvas-corner { top: 10px; font-size: 7px; }
  .canvas-corner-left { left: 10px; }
  .canvas-corner-right { right: 10px; }
  .scene-caption { left: 9px; bottom: 9px; max-width: calc(100% - 115px); padding: 7px 8px; gap: 7px; }
  .caption-copy { font-size: 9px; }
  .caption-index { font-size: 8px; }
  .scene-telemetry { display: none; }
  .scale-ruler { right: 9px; bottom: 10px; width: 92px; }
  .scale-ruler span { width: 58px; }
  .scale-ruler b { font-size: 8px; }
  .stage-footer { padding: 7px 9px; align-items: flex-start; }
  .scale-explainer { font-size: 8px; }
  .stage-footer-right { display: none; }
  .rail-section { padding: 10px; }
  .section-heading { margin-bottom: 10px; }
  .preset-button { min-height: 45px; padding: 7px 6px; gap: 6px; }
  .preset-button b { font-size: 8px; }
  .preset-button small { font-size: 6px; }
  .slider-head label { font-size: 9px; }
  .slider-head output { font-size: 9px; }
  .range-meta { font-size: 6px; }
  .readout-value { font-size: 15px; }
  .check-values b { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
