:root {
  color-scheme: dark;
  --bg: #071018;
  --panel: #0d1822;
  --panel-2: #101f2b;
  --line: rgba(154, 190, 210, .13);
  --line-strong: rgba(154, 190, 210, .22);
  --text: #e7f1f5;
  --muted: #8398a5;
  --dim: #536875;
  --cyan: #63dce8;
  --cyan-2: #2da9bd;
  --amber: #e8b46e;
  --violet: #b3a0f5;
  --green: #79d7b0;
  --radius: 12px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; background: var(--bg); color: var(--text); }
body { background: radial-gradient(ellipse at 53% 43%, #10222d 0%, #08131c 48%, #060e15 100%); }
button, input { font: inherit; }
button { color: inherit; }
.app-shell { height: 100%; display: flex; flex-direction: column; min-height: 0; }
.topbar { height: 66px; flex: 0 0 66px; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; border-bottom: 1px solid var(--line); background: rgba(7, 16, 24, .88); z-index: 5; }
.brand-lockup { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 29px; height: 29px; border: 1px solid rgba(99,220,232,.5); border-radius: 50%; display: flex; align-items: center; justify-content: center; gap: 2px; transform: rotate(-22deg); }
.brand-mark span { display: block; width: 3px; border-radius: 3px; background: var(--cyan); }
.brand-mark span:nth-child(1) { height: 8px; opacity: .5; }.brand-mark span:nth-child(2) { height: 15px; }.brand-mark span:nth-child(3) { height: 10px; opacity: .7; }
.eyebrow { font-size: 9px; font-weight: 750; letter-spacing: .16em; color: #78909d; line-height: 1.4; }
.eyebrow span { color: #405966; padding: 0 3px; }
.brand-title { font-size: 12px; font-weight: 800; letter-spacing: .12em; margin-top: 2px; }
.topbar-meta { display: flex; align-items: center; gap: 15px; color: var(--muted); font-size: 9px; letter-spacing: .14em; font-weight: 700; }
.live-indicator { display: inline-flex; align-items: center; gap: 7px; color: #a9c4cb; }
.live-indicator i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px rgba(121,215,176,.7); }
.live-indicator.paused i { background: var(--amber); box-shadow: 0 0 8px rgba(232,180,110,.55); }
.topbar-separator { width: 1px; height: 15px; background: var(--line-strong); }
.meta-code { color: #5f7582; white-space: nowrap; }
.workspace { flex: 1; min-height: 0; display: grid; grid-template-columns: 258px minmax(420px, 1fr) 278px; gap: 12px; padding: 12px; }
.panel { background: linear-gradient(155deg, rgba(15, 29, 40, .96), rgba(10, 21, 30, .96)); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 34px rgba(0,0,0,.13); }
.control-panel, .insight-panel { min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #29404d transparent; }
.control-panel { padding: 17px 15px 14px; }
.panel-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 16px; }
.panel-heading h2, .validation-head h2 { font-size: 14px; line-height: 1.25; margin: 5px 0 0; font-weight: 650; letter-spacing: -.02em; }
.panel-index { font-size: 9px; color: #526c79; letter-spacing: .12em; border: 1px solid var(--line); border-radius: 5px; padding: 4px 6px; }
.section-label { font-size: 9px; letter-spacing: .14em; font-weight: 750; color: #718793; margin-bottom: 8px; }
.preset-block { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.preset-grid { display: grid; gap: 5px; }
.preset-button { width: 100%; min-height: 42px; display: flex; align-items: center; gap: 9px; text-align: left; padding: 7px 9px; border: 1px solid transparent; border-radius: 8px; background: rgba(255,255,255,.025); cursor: pointer; transition: border-color .2s, background .2s, transform .2s; }
.preset-button:hover { border-color: var(--line-strong); background: rgba(255,255,255,.045); }
.preset-button:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.preset-button.active { background: rgba(99,220,232,.075); border-color: rgba(99,220,232,.28); }
.preset-button b { display: block; font-size: 10px; font-weight: 700; line-height: 1.2; }
.preset-button small { display: block; color: var(--muted); font-size: 9px; margin-top: 3px; }
.preset-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 7px; }
.dot-cyan { background: var(--cyan); box-shadow: 0 0 8px rgba(99,220,232,.5); }.dot-amber { background: var(--amber); }.dot-violet { background: var(--violet); }
.control-list { padding-top: 13px; }
.control-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; margin-bottom: 12px; }
.control-row label, .speed-head label { color: #c6d4da; font-size: 10px; font-weight: 600; }
.unit { color: #708691; font-size: 8px; font-weight: 500; margin-left: 3px; }
.control-row output, .speed-head output { color: var(--cyan); font-size: 10px; font-variant-numeric: tabular-nums; font-weight: 700; }
input[type="range"] { appearance: none; -webkit-appearance: none; grid-column: 1 / -1; width: 100%; height: 14px; margin: 0; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 3px; border-radius: 5px; background: linear-gradient(90deg, #328f9c, #1c3d4b); }
input[type="range"]::-moz-range-track { height: 3px; border-radius: 5px; background: linear-gradient(90deg, #328f9c, #1c3d4b); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 11px; height: 11px; border-radius: 50%; background: #a4f0f3; border: 2px solid #15313b; margin-top: -4px; box-shadow: 0 0 0 3px rgba(99,220,232,.12); }
input[type="range"]::-moz-range-thumb { width: 9px; height: 9px; border-radius: 50%; background: #a4f0f3; border: 2px solid #15313b; box-shadow: 0 0 0 3px rgba(99,220,232,.12); }
.range-ends { grid-column: 1 / -1; display: flex; justify-content: space-between; color: #536a77; font-size: 8px; font-variant-numeric: tabular-nums; margin-top: -2px; }
.speed-control { padding-top: 11px; border-top: 1px solid var(--line); }
.speed-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.control-footnote { display: flex; gap: 7px; color: #6f8490; font-size: 9px; line-height: 1.45; margin-top: 13px; }
.info-icon { display: inline-flex; flex: 0 0 13px; width: 13px; height: 13px; align-items: center; justify-content: center; border: 1px solid #496371; border-radius: 50%; font-size: 8px; color: #9cb0b9; }
.scene-panel { 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(155deg, rgba(13,26,36,.97), rgba(7,17,25,.98)); box-shadow: 0 12px 34px rgba(0,0,0,.15); }
.scene-topline { flex: 0 0 auto; min-height: 77px; display: flex; justify-content: space-between; align-items: center; padding: 13px 18px 11px; border-bottom: 1px solid var(--line); }
.scene-title-block h1 { font-size: 20px; line-height: 1.1; margin: 4px 0 3px; font-weight: 650; letter-spacing: -.045em; }
.scene-title-block h1 em { font-family: Georgia, serif; color: var(--amber); font-weight: 400; }
.scene-title-block p { margin: 0; color: #7e929d; font-size: 10px; }
.scene-actions { display: flex; align-items: center; gap: 9px; }
.icon-button { width: 32px; height: 30px; border: 1px solid var(--line-strong); background: rgba(255,255,255,.025); border-radius: 7px; cursor: pointer; color: #a8bec7; font-size: 16px; }
.icon-button:hover, .transport-button:hover, .export-button:hover { border-color: rgba(99,220,232,.45); color: #eaffff; }
.camera-icon { display: inline-block; transform: rotate(0deg); }
.quality-switch { display: flex; padding: 3px; gap: 2px; background: #09141d; border: 1px solid var(--line); border-radius: 7px; }
.quality-button { border: 0; border-radius: 4px; padding: 5px 7px; background: transparent; color: #627985; font-size: 8px; letter-spacing: .1em; font-weight: 800; cursor: pointer; }
.quality-button.active { color: #c9f5f7; background: rgba(99,220,232,.14); }
.scene-viewport { flex: 1 1 auto; min-height: 300px; position: relative; overflow: hidden; background: radial-gradient(ellipse at 52% 48%, #142a35 0%, #0b1923 52%, #08131c 100%); }
.scene-viewport canvas { display: block; width: 100%; height: 100%; outline: none; }
.scene-grid-glow { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 57%, rgba(60,139,152,.10), transparent 52%), linear-gradient(0deg, rgba(3,10,15,.18), transparent 40%); z-index: 1; }
.scene-labels { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.scene-label { position: absolute; display: flex; align-items: center; gap: 6px; white-space: nowrap; color: rgba(190,220,226,.72); font-size: 8px; font-weight: 750; letter-spacing: .12em; text-shadow: 0 1px 8px #071018; transform: translate(-50%, -50%); }
.scene-label i { display: block; width: 5px; height: 5px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 9px var(--cyan); }
.label-band i { background: var(--amber); box-shadow: 0 0 9px var(--amber); }
.scene-loading, .scene-error { position: absolute; inset: 0; z-index: 6; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: rgba(7,16,24,.88); color: #91aab5; font-size: 9px; font-weight: 750; letter-spacing: .16em; text-align: center; padding: 25px; }
.scene-loading[hidden], .scene-error[hidden] { display: none; }
.loading-ring { width: 30px; height: 30px; border: 1px solid rgba(99,220,232,.2); border-top-color: var(--cyan); border-radius: 50%; animation: spin 1.1s linear infinite; }
.scene-error { color: #d4e1e6; letter-spacing: .02em; line-height: 1.5; font-size: 12px; }
.scene-error span { max-width: 340px; color: #91a6b0; font-size: 10px; font-weight: 450; }
@keyframes spin { to { transform: rotate(360deg); } }
.scene-hud { position: absolute; z-index: 2; display: flex; align-items: center; gap: 8px; color: rgba(162,190,200,.7); font-size: 8px; letter-spacing: .13em; font-weight: 750; pointer-events: none; text-shadow: 0 1px 5px #071018; }
.scene-hud-top { top: 13px; left: 15px; }.scene-hud-bottom-left { bottom: 47px; left: 15px; }
.hud-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green); box-shadow: 0 0 7px var(--green); }
.hud-divider { width: 1px; height: 10px; background: rgba(154,190,210,.25); }
.scene-scale { position: absolute; z-index: 2; right: 17px; bottom: 48px; display: flex; flex-direction: column; gap: 4px; align-items: center; color: #8ca3ad; font-size: 8px; letter-spacing: .08em; pointer-events: none; }
.scene-scale span { width: 48px; height: 5px; border-left: 1px solid #91aab5; border-right: 1px solid #91aab5; border-bottom: 1px solid #91aab5; }
.scene-caption { position: absolute; z-index: 2; bottom: 10px; left: 50%; transform: translateX(-50%); white-space: nowrap; color: #6e8793; font-size: 8px; letter-spacing: .035em; pointer-events: none; }
.scene-caption b { color: #a9c0c8; font-size: 7px; letter-spacing: .11em; }.scene-caption span { color: var(--amber); padding: 0 5px; }
.transport-bar { min-height: 58px; flex: 0 0 58px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 15px; border-top: 1px solid var(--line); background: rgba(8,18,26,.8); }
.transport-controls { display: flex; gap: 6px; }
.transport-button { height: 31px; min-width: 34px; border: 1px solid var(--line-strong); border-radius: 7px; background: rgba(255,255,255,.025); color: #a9c0c9; cursor: pointer; font-size: 12px; }
.transport-button.primary { min-width: 38px; background: rgba(99,220,232,.12); border-color: rgba(99,220,232,.32); color: #bdf4f4; font-weight: 800; }
.timeline-readout { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.timeline-label { color: #667e8b; font-size: 7px; font-weight: 800; letter-spacing: .14em; }
.timeline-readout strong { color: #e2f0f3; font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; }
.timeline-readout small { color: #8da5af; font-size: 9px; font-weight: 500; }
.transport-export { display: flex; align-items: center; gap: 10px; }
.keyboard-hint { color: #4f6875; font-size: 8px; letter-spacing: .12em; }.keyboard-hint i { color: #8197a2; font-style: normal; }
.export-button { height: 31px; padding: 0 10px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line-strong); border-radius: 7px; background: rgba(255,255,255,.025); color: #9bb1bb; font-size: 8px; letter-spacing: .1em; font-weight: 800; cursor: pointer; }
.export-button span { font-size: 14px; color: var(--cyan); }
.insight-panel { display: flex; flex-direction: column; gap: 9px; }
.readout-panel, .profile-panel, .validation-panel { padding: 13px 13px 12px; }
.panel-heading.compact { margin-bottom: 11px; }.panel-heading.compact h2 { font-size: 13px; }
.readout-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.readout-card { min-height: 77px; border: 1px solid rgba(154,190,210,.10); border-radius: 8px; background: rgba(255,255,255,.022); padding: 9px 8px 7px; }
.readout-label { display: block; color: #728894; font-size: 7px; font-weight: 800; letter-spacing: .12em; line-height: 1.3; }
.readout-card strong { display: block; margin-top: 6px; color: #e5f2f4; font-size: 19px; line-height: 1; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.04em; white-space: nowrap; }
.readout-card strong small { color: #8ba3ad; font-size: 9px; font-weight: 500; letter-spacing: 0; }
.readout-note { display: block; margin-top: 5px; color: #617985; font-size: 8px; line-height: 1.25; }
.profile-heading { margin-bottom: 2px !important; }.profile-unit { color: #627b87; font-size: 7px; letter-spacing: .12em; font-weight: 800; }
#profile-chart { display: block; width: 100%; height: 104px; overflow: visible; }
#profile-chart text { fill: #607985; font-size: 7px; letter-spacing: .1em; }
.chart-gridline { fill: none; stroke: rgba(154,190,210,.10); stroke-width: 1; stroke-dasharray: 2 4; }
.chart-axis { fill: none; stroke: rgba(154,190,210,.23); stroke-width: 1; }
.chart-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-line-a { stroke: #59d3e2; }.chart-line-p { stroke: #e4b16d; stroke-width: 1.6; }
.chart-fill { fill: url(#profile-fill); stroke: none; }
.chart-legend { display: flex; gap: 13px; color: #728995; font-size: 8px; }
.chart-legend span { display: flex; align-items: center; gap: 5px; }.chart-legend i { width: 6px; height: 6px; border-radius: 50%; }.legend-a { background: var(--cyan); }.legend-p { background: var(--amber); }
.validation-panel { padding-bottom: 10px; }
.validation-head { display: flex; align-items: center; justify-content: space-between; }
.validation-head h2 { font-size: 12px; }
.validation-check { width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: var(--green); background: rgba(121,215,176,.1); border: 1px solid rgba(121,215,176,.25); font-size: 11px; }
.validation-desc { color: #778e99; font-size: 8px; line-height: 1.4; margin: 7px 0 9px; }
.validation-values { display: grid; grid-template-columns: repeat(3,1fr); gap: 5px; }
.validation-values div { padding: 6px 5px; background: rgba(255,255,255,.025); border: 1px solid rgba(154,190,210,.09); border-radius: 6px; }
.validation-values span { display: block; color: #657d89; font-size: 6px; letter-spacing: .11em; font-weight: 800; }
.validation-values b { display: block; color: #c9e0e5; font-size: 11px; margin-top: 4px; font-weight: 700; font-variant-numeric: tabular-nums; }
.validation-values div:last-child b { color: var(--green); }
.validation-foot { color: #607985; font-size: 7px; letter-spacing: .09em; margin-top: 8px; }
.science-panel { padding: 0 13px; }
.science-panel summary { min-height: 48px; list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.science-panel summary::-webkit-details-marker { display: none; }
.science-panel summary span:first-child { display: flex; flex-direction: column; gap: 2px; }
.science-panel summary b { font-size: 12px; font-weight: 650; }
.details-chevron { color: #7f98a4; font-size: 18px; transition: transform .2s; }.science-panel[open] .details-chevron { transform: rotate(180deg); }
.science-content { border-top: 1px solid var(--line); padding: 11px 0 12px; }
.science-kicker { color: #7e98a3; font-size: 7px; font-weight: 800; letter-spacing: .14em; margin: 9px 0 5px; }
.equation { color: #c5e6e9; font-family: Georgia, serif; font-size: 12px; line-height: 1.45; padding: 7px 8px; background: rgba(99,220,232,.055); border-left: 2px solid rgba(99,220,232,.35); border-radius: 0 5px 5px 0; }
.science-content p, .science-content li { color: #8096a0; font-size: 9px; line-height: 1.5; }
.science-content p { margin: 6px 0; }.science-content ul { padding-left: 15px; margin: 5px 0 9px; }.science-content li { margin: 3px 0; }
.science-disclaimer { color: #9ab4bd !important; border-top: 1px solid var(--line); padding-top: 8px; }
.panel-note { padding: 1px 3px 5px; color: #5f7682; font-size: 7px; letter-spacing: .1em; line-height: 1.4; }.panel-note b { color: #9db0b8; }
.embed-mode .topbar { display: none; }.embed-mode .workspace { padding: 0; gap: 0; }.embed-mode .scene-panel { border-radius: 0; border: 0; }
.embed-mode .control-panel, .embed-mode .insight-panel { border-radius: 0; }
@media (max-width: 1180px) {
  .workspace { grid-template-columns: 235px minmax(360px,1fr) 255px; gap: 9px; padding: 9px; }
  .control-panel { padding: 14px 12px; }.readout-panel, .profile-panel, .validation-panel { padding-left: 10px; padding-right: 10px; }
  .scene-caption { font-size: 7px; }
}
@media (max-width: 920px) {
  html, body { overflow: auto; min-height: 100%; height: auto; }
  .app-shell { min-height: 100vh; height: auto; }
  .topbar { height: 58px; flex-basis: 58px; padding: 0 14px; }
  .workspace { display: flex; flex-direction: column; min-height: 0; padding: 8px; gap: 8px; }
  .scene-panel { order: 0; min-height: 480px; height: 58vh; flex: 0 0 auto; }
  .control-panel { order: 1; overflow: visible; }.insight-panel { order: 2; overflow: visible; display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
  .science-panel, .panel-note { grid-column: 1 / -1; }
  .control-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 18px; }
  .control-footnote { margin-top: 10px; }
}
@media (max-width: 560px) {
  .topbar { padding: 0 11px; }.brand-mark { width: 25px; height: 25px; }.brand-title { font-size: 10px; }.eyebrow { font-size: 8px; }.topbar-meta { gap: 8px; }.meta-code { font-size: 7px; }
  .workspace { padding: 6px; gap: 7px; }
  .scene-panel { height: 53vh; min-height: 390px; }
  .scene-topline { min-height: 66px; padding: 10px 11px; }.scene-title-block h1 { font-size: 18px; }.scene-title-block p { font-size: 9px; }
  .scene-actions { gap: 5px; }.icon-button { width: 29px; height: 28px; }.quality-button { padding: 5px 6px; font-size: 7px; }
  .scene-caption { white-space: normal; width: calc(100% - 24px); text-align: center; line-height: 1.5; bottom: 8px; }.scene-hud-bottom-left { bottom: 48px; }.scene-scale { bottom: 49px; right: 12px; }
  .transport-bar { min-height: 55px; padding: 7px 9px; gap: 6px; }.keyboard-hint { display: none; }.export-button { padding: 0 7px; font-size: 7px; }.timeline-readout strong { font-size: 12px; }.timeline-label { font-size: 6px; }
  .control-panel { padding: 13px 11px; }.control-list { grid-template-columns: 1fr; column-gap: 0; }.control-row { margin-bottom: 10px; }
  .insight-panel { grid-template-columns: 1fr; }.science-panel, .panel-note { grid-column: auto; }
  .readout-grid { gap: 7px; }.readout-card { min-height: 72px; }.profile-panel { padding-bottom: 12px; }
  .scene-label { font-size: 7px; }.scene-error span { max-width: 280px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
