:root {
  color-scheme: dark;
  --bg: #07111f;
  --panel: #0b1727;
  --panel-2: #0e1c2e;
  --line: rgba(138, 179, 212, 0.13);
  --line-strong: rgba(138, 179, 212, 0.22);
  --text: #e7f1fa;
  --muted: #8299ae;
  --dim: #5e7388;
  --cyan: #68d8f2;
  --blue: #5898e8;
  --violet: #9d8cff;
  --amber: #f0b56d;
  --green: #63d6b1;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; min-width: 320px; min-height: 100%; background: var(--bg); color: var(--text); }
body { min-height: 100vh; overflow: hidden; }
button, input { font: inherit; }
button { color: inherit; }
.app-shell { height: 100vh; min-height: 640px; display: flex; flex-direction: column; background: radial-gradient(ellipse at 42% 42%, rgba(16, 43, 69, 0.28), transparent 54%), var(--bg); }
.topbar { height: 64px; flex: 0 0 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 26px; border-bottom: 1px solid var(--line); background: rgba(6, 15, 27, 0.88); }
.brand-lockup { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 30px; height: 30px; position: relative; border: 1px solid rgba(104, 216, 242, 0.5); border-radius: 50%; display: flex; align-items: center; justify-content: center; gap: 3px; transform: rotate(-28deg); }
.brand-mark span { display: block; width: 2px; border-radius: 4px; background: var(--cyan); }
.brand-mark span:nth-child(1) { height: 10px; opacity: .45; }
.brand-mark span:nth-child(2) { height: 18px; }
.brand-mark span:nth-child(3) { height: 13px; opacity: .7; }
.eyebrow, .section-kicker { color: #6c91ad; font-size: 9px; letter-spacing: .17em; font-weight: 750; }
.brand-title { margin-top: 2px; font-size: 13px; font-weight: 650; letter-spacing: .01em; }
.topbar-meta { display: flex; align-items: center; gap: 10px; color: #9bb0c3; font-size: 9px; letter-spacing: .14em; font-weight: 700; }
.live-dot, .status-pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px rgba(99,214,177,.8); }
.meta-divider { height: 13px; width: 1px; background: var(--line-strong); margin: 0 3px; }
.seed-label { color: #5f7b94; }
.workspace { min-height: 0; flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 390px; }
.stage-column { min-width: 0; min-height: 0; padding: 21px 22px 16px 26px; display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.stage-heading { min-height: 70px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.stage-heading h1 { margin: 4px 0 2px; font-size: clamp(22px, 2.1vw, 29px); font-weight: 620; letter-spacing: -.04em; }
.stage-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.stage-status { margin-top: 8px; display: inline-flex; align-items: center; gap: 8px; color: #8ca8ba; font-size: 9px; font-weight: 750; letter-spacing: .14em; }
.status-pulse { width: 5px; height: 5px; }
.status-pulse.paused { background: var(--amber); box-shadow: 0 0 8px rgba(240,181,109,.6); }
.scene-frame { position: relative; flex: 1; min-height: 340px; overflow: hidden; border: 1px solid rgba(102, 159, 194, .18); border-radius: 11px; background: radial-gradient(ellipse at 50% 48%, #10253c 0%, #081421 60%, #050c16 100%); box-shadow: 0 16px 55px rgba(0,0,0,.25), inset 0 0 0 1px rgba(255,255,255,.015); }
.scene-host { position: absolute; inset: 0; z-index: 1; }
.three-canvas { display: block; width: 100%; height: 100%; outline: none; touch-action: pan-y; }
.scene-vignette { position: absolute; inset: 0; pointer-events: none; z-index: 2; background: linear-gradient(180deg, rgba(3,10,18,.34), transparent 22%, transparent 76%, rgba(3,10,18,.45)), radial-gradient(ellipse at center, transparent 55%, rgba(2,8,15,.24)); }
.scene-topline, .scene-bottomline { position: absolute; z-index: 3; left: 17px; right: 17px; display: flex; align-items: center; justify-content: space-between; pointer-events: none; }
.scene-topline { top: 15px; }
.scene-chip { padding: 7px 10px; border: 1px solid rgba(116,177,211,.2); border-radius: 4px; background: rgba(5,17,30,.7); backdrop-filter: blur(10px); color: #b2d6e9; font-size: 8px; letter-spacing: .13em; font-weight: 750; }
.chip-icon { color: var(--cyan); margin-right: 5px; font-size: 13px; }
.scene-chip-muted { color: #7592a9; border-color: rgba(116,177,211,.12); }
.scene-annotation { position: absolute; z-index: 3; display: flex; align-items: center; gap: 7px; color: rgba(166,207,228,.72); font-size: 8px; letter-spacing: .14em; font-weight: 750; pointer-events: none; }
.annotation-left { top: 38%; left: 5%; }
.annotation-right { top: 62%; right: 5%; flex-direction: row-reverse; }
.annotation-line { display: block; width: 28px; height: 1px; background: linear-gradient(90deg, transparent, rgba(104,216,242,.7)); }
.annotation-right .annotation-line { background: linear-gradient(90deg, rgba(240,181,109,.75), transparent); }
.scene-bottomline { bottom: 15px; align-items: flex-end; }
.legend-block { width: 160px; }
.legend-title, .legend-labels { color: #7894a9; font-size: 7px; letter-spacing: .12em; font-weight: 750; }
.legend-gradient { height: 5px; margin: 6px 0 4px; border-radius: 10px; background: linear-gradient(90deg, #06324b, #00899e, #56d7ee, #9d91ff, #ffad62); }
.legend-labels { display: flex; justify-content: space-between; font-size: 7px; }
.scene-hint { color: #6e879c; font-size: 8px; letter-spacing: .1em; font-weight: 700; }
.mouse-icon { color: var(--cyan); font-size: 13px; margin-right: 4px; }
.context-loss { position: absolute; z-index: 6; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; background: rgba(5,13,23,.9); color: #dceaf4; text-align: center; font-size: 12px; }
.context-loss[hidden] { display: none; }
.context-loss span { color: var(--muted); font-size: 11px; }
.loading-cover { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 17px; background: #071321; color: #80a9c2; font-size: 9px; letter-spacing: .17em; font-weight: 750; transition: opacity .4s ease, visibility .4s ease; }
.loading-cover.loaded { opacity: 0; visibility: hidden; }
.loader-orbit { width: 32px; height: 32px; border: 1px solid rgba(104,216,242,.2); border-top-color: var(--cyan); border-radius: 50%; animation: spin 1.1s linear infinite; box-shadow: 0 0 18px rgba(104,216,242,.1); }
.load-error { color: #f0b56d; letter-spacing: .03em; }
@keyframes spin { to { transform: rotate(360deg); } }
.transport-bar { min-height: 55px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 2px 8px; border-bottom: 1px solid var(--line); }
.transport-main, .transport-secondary { display: flex; align-items: center; gap: 7px; min-width: 0; }
.transport-button { height: 31px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 5px; background: rgba(15,31,49,.74); color: #a9bdce; font-size: 8px; font-weight: 800; letter-spacing: .12em; cursor: pointer; transition: background .18s ease, border-color .18s ease, color .18s ease; }
.transport-button:hover, .icon-button:hover { border-color: rgba(104,216,242,.55); color: #e8faff; background: rgba(25,55,78,.85); }
.transport-button.primary { display: inline-flex; align-items: center; gap: 7px; background: #12334a; border-color: rgba(104,216,242,.42); color: #a8ecfb; padding: 0 13px; }
.transport-button.primary.paused { background: #1e3040; color: #e7c28e; border-color: rgba(240,181,109,.4); }
.play-icon { font-size: 11px; }
.step-symbol { font-size: 16px; line-height: 0; }
.transport-divider { height: 22px; width: 1px; background: var(--line-strong); margin: 0 4px; }
.speed-control { display: grid; grid-template-columns: auto 82px auto; align-items: center; gap: 8px; }
.speed-control label { color: #7892a7; font-size: 8px; letter-spacing: .12em; font-weight: 800; }
.speed-control output { color: #b6d4e7; font-size: 9px; font-variant-numeric: tabular-nums; }
input[type="range"] { accent-color: var(--cyan); cursor: pointer; }
.speed-control input { width: 82px; height: 3px; }
.icon-button { width: 31px; height: 31px; border: 1px solid var(--line-strong); border-radius: 5px; background: rgba(15,31,49,.74); color: #9eb6c9; cursor: pointer; font-size: 17px; }
.quality-toggle { display: flex; height: 27px; border: 1px solid var(--line-strong); border-radius: 5px; padding: 2px; background: rgba(8,19,31,.75); }
.quality-button { border: 0; border-radius: 3px; padding: 0 7px; background: transparent; color: #60798f; font-size: 7px; font-weight: 800; letter-spacing: .1em; cursor: pointer; }
.quality-button.active { color: #c3effa; background: #17364c; }
.readout-strip { display: grid; grid-template-columns: repeat(3, 1fr); padding: 13px 2px 0; gap: 14px; }
.readout-item { display: flex; flex-direction: column; min-width: 0; gap: 3px; }
.readout-label { color: #6e899f; font-size: 8px; letter-spacing: .13em; font-weight: 800; }
.readout-item strong { color: #e0eff8; font-size: 19px; font-weight: 560; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.readout-item strong small { color: #89a6bb; font-size: 10px; font-weight: 500; }
.readout-unit { color: #536d82; font-size: 7px; letter-spacing: .1em; }
.control-column { min-height: 0; overflow-y: auto; padding: 22px 21px 18px; background: linear-gradient(180deg, rgba(13,27,44,.96), rgba(8,19,32,.98)); scrollbar-width: thin; scrollbar-color: #26435c transparent; }
.panel-header { display: flex; align-items: flex-start; justify-content: space-between; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.panel-header h2 { margin: 4px 0 0; font-size: 18px; letter-spacing: -.035em; font-weight: 600; }
.panel-number { color: #5c7890; font-size: 8px; letter-spacing: .12em; font-weight: 800; padding-top: 4px; }
.preset-section, .parameter-section, .telemetry-section { padding: 15px 0; border-bottom: 1px solid var(--line); }
.subsection-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.subsection-heading h3, .validation-heading h3 { margin: 0; color: #d7e7f2; font-size: 11px; font-weight: 650; }
.subsection-heading > span { color: #5f7d94; font-size: 7px; letter-spacing: .12em; font-weight: 800; }
.preset-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.preset-card { min-width: 0; min-height: 74px; padding: 8px 7px 7px; border: 1px solid var(--line); border-radius: 6px; background: rgba(7,19,32,.55); text-align: left; cursor: pointer; transition: border-color .18s ease, background .18s ease; }
.preset-card:hover { border-color: rgba(104,216,242,.35); }
.preset-card.active { border-color: rgba(104,216,242,.55); background: linear-gradient(145deg, rgba(21,59,78,.58), rgba(8,24,39,.78)); box-shadow: inset 0 0 0 1px rgba(104,216,242,.06); }
.preset-glyph { height: 17px; display: flex; align-items: center; gap: 3px; margin-bottom: 5px; }
.preset-glyph i { display: block; width: 15px; height: 4px; border-radius: 10px; transform: rotate(-18deg); background: #5aa7bd; box-shadow: 0 0 9px rgba(90,167,189,.35); }
.quiet-glyph i { width: 19px; opacity: .55; }
.active-glyph i:nth-child(2) { width: 9px; background: #74d8eb; }
.severe-glyph i { background: #a58df7; box-shadow: 0 0 9px rgba(165,141,247,.45); }
.severe-glyph i:nth-child(2) { width: 10px; }
.severe-glyph i:nth-child(3) { width: 6px; }
.preset-name, .preset-caption { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.preset-name { color: #c7dbe9; font-size: 9px; font-weight: 650; }
.preset-caption { margin-top: 3px; color: #6d8499; font-size: 7px; }
.parameter-list { display: flex; flex-direction: column; gap: 11px; }
.parameter-row { min-width: 0; }
.parameter-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.parameter-top label { color: #9fb5c7; font-size: 9px; font-weight: 560; }
.parameter-top output { color: #b7e6f1; font-size: 9px; font-variant-numeric: tabular-nums; }
.parameter-range { display: block; width: 100%; height: 3px; margin: 0; appearance: none; -webkit-appearance: none; background: linear-gradient(90deg, #287d9a, #35577b); border-radius: 9px; outline: none; }
.parameter-range::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 10px; height: 10px; border-radius: 50%; background: #a6effb; border: 2px solid #153e53; box-shadow: 0 0 0 2px rgba(104,216,242,.14); }
.parameter-range::-moz-range-thumb { width: 8px; height: 8px; border-radius: 50%; background: #a6effb; border: 2px solid #153e53; box-shadow: 0 0 0 2px rgba(104,216,242,.14); }
.range-ends { display: flex; justify-content: space-between; margin-top: 4px; color: #536d83; font-size: 7px; letter-spacing: .04em; }
.telemetry-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; }
.telemetry-card { min-width: 0; padding: 9px 9px 8px; border: 1px solid rgba(125,164,194,.12); border-radius: 5px; background: rgba(7,18,30,.55); }
.telemetry-card > span { display: block; color: #6f8ba1; font-size: 7px; letter-spacing: .11em; font-weight: 800; white-space: nowrap; }
.telemetry-card strong { display: block; margin-top: 5px; color: #e1f1fa; font-size: 17px; line-height: 1.1; font-weight: 560; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.telemetry-card strong small { color: #8da8bb; font-size: 8px; font-weight: 500; letter-spacing: 0; }
.telemetry-foot { display: flex; align-items: center; gap: 5px; margin-top: 6px; color: #5c7488; font-size: 7px; }
.telemetry-dot { width: 5px; height: 5px; border-radius: 50%; }
.telemetry-dot.cyan { background: var(--cyan); }.telemetry-dot.violet { background: var(--violet); }.telemetry-dot.blue { background: var(--blue); }.telemetry-dot.amber { background: var(--amber); }
.validation-section { margin-top: 14px; padding: 12px 12px 11px; border: 1px solid rgba(99,214,177,.18); border-radius: 6px; background: linear-gradient(135deg, rgba(12,40,45,.38), rgba(8,21,34,.62)); }
.validation-heading { display: flex; justify-content: space-between; align-items: center; }
.validation-heading h3 { margin-top: 3px; }
.validation-tag { padding: 4px 6px; border-radius: 3px; background: rgba(99,214,177,.1); color: #79dcb9; font-size: 7px; letter-spacing: .1em; font-weight: 800; }
.validation-equation { margin: 9px 0; color: #c1dfe7; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }
.validation-values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.validation-values div { display: flex; flex-direction: column; gap: 4px; }
.validation-values span { color: #68869a; font-size: 7px; letter-spacing: .1em; }
.validation-values strong { color: #cce7e7; font-size: 10px; font-variant-numeric: tabular-nums; }
.validation-note { margin: 8px 0 0; color: #6f8999; font-size: 8px; line-height: 1.5; }
.science-panel { margin-top: 12px; border: 1px solid var(--line); border-radius: 6px; background: rgba(7,18,30,.5); }
.science-panel summary { display: flex; align-items: center; gap: 9px; padding: 11px 10px; cursor: pointer; list-style: none; }
.science-panel summary::-webkit-details-marker { display: none; }
.science-icon { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 5px; background: rgba(104,216,242,.1); color: var(--cyan); font-size: 14px; }
.science-panel summary strong, .science-panel summary small { display: block; }
.science-panel summary strong { color: #c9dce9; font-size: 9px; font-weight: 650; }
.science-panel summary small { margin-top: 2px; color: #6d8498; font-size: 7px; }
.details-chevron { margin-left: auto; color: #7f9bb0; transition: transform .2s ease; }
.science-panel[open] .details-chevron { transform: rotate(180deg); }
.science-content { padding: 0 11px 12px; border-top: 1px solid var(--line); }
.science-content h4 { margin: 12px 0 6px; color: #b9d3e2; font-size: 9px; }
.equation-block { padding: 8px; border-radius: 4px; background: rgba(22,47,66,.58); color: #9ed9e9; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; }
.science-content p, .science-content li { color: #8097a9; font-size: 8px; line-height: 1.55; }
.science-content p { margin: 6px 0; }
.science-content ul { padding-left: 15px; margin: 6px 0 0; }
.science-content li { margin: 4px 0; }
.disclaimer { margin-top: 11px; color: #4f687d; font-size: 7px; line-height: 1.5; }
.embed-mode .topbar, .embed-mode .stage-heading, .embed-mode .readout-strip, .embed-mode .control-column { display: none; }
.embed-mode .workspace { display: block; }
.embed-mode .stage-column { height: 100vh; padding: 0; border: 0; }
.embed-mode .scene-frame { border: 0; border-radius: 0; }
.embed-mode .transport-bar { padding: 8px 14px; background: #081522; }
:focus-visible { outline: 2px solid #80e4f4; outline-offset: 3px; }

@media (max-width: 1120px) and (min-width: 761px) {
  .workspace { grid-template-columns: minmax(0, 1fr) 350px; }
  .stage-column { padding-left: 18px; padding-right: 16px; }
  .control-column { padding-left: 16px; padding-right: 16px; }
  .transport-button { padding: 0 8px; }
  .speed-control { grid-template-columns: auto 60px auto; gap: 5px; }
  .speed-control input { width: 60px; }
}
@media (max-width: 760px) {
  body { overflow: auto; }
  .app-shell { height: auto; min-height: 100svh; }
  .topbar { height: 54px; flex-basis: 54px; padding: 0 15px; }
  .brand-mark { width: 26px; height: 26px; }
  .brand-title { font-size: 12px; }
  .topbar-meta { gap: 7px; font-size: 7px; }
  .topbar-meta .meta-divider, .topbar-meta .seed-label { display: none; }
  .workspace { display: flex; flex-direction: column; }
  .stage-column { padding: 15px 12px 12px; border-right: 0; }
  .stage-heading { min-height: 64px; }
  .stage-heading h1 { font-size: 23px; }
  .stage-heading p { font-size: 10px; }
  .stage-status { font-size: 8px; }
  .scene-frame { flex: none; height: min(54svh, 430px); min-height: 315px; border-radius: 8px; }
  .scene-topline { left: 9px; right: 9px; top: 9px; }
  .scene-chip { padding: 6px 7px; font-size: 7px; }
  .scene-chip-muted { display: none; }
  .scene-annotation { font-size: 6px; }
  .annotation-left { left: 3%; top: 36%; }
  .annotation-right { right: 3%; top: 64%; }
  .scene-bottomline { left: 10px; right: 10px; bottom: 10px; }
  .scene-hint { font-size: 6px; }
  .legend-block { width: 125px; }
  .legend-title, .legend-labels { font-size: 6px; }
  .transport-bar { flex-wrap: wrap; padding: 9px 0 8px; gap: 8px; }
  .transport-main { flex: 1 1 auto; gap: 5px; }
  .transport-secondary { gap: 5px; }
  .transport-button { height: 30px; padding: 0 8px; font-size: 7px; }
  .transport-button.primary { padding: 0 9px; }
  .transport-divider { margin: 0 1px; }
  .speed-control { grid-template-columns: auto 58px auto; gap: 5px; }
  .speed-control label { font-size: 7px; }
  .speed-control input { width: 58px; }
  .speed-control output { font-size: 8px; }
  .icon-button { width: 29px; height: 29px; }
  .quality-toggle { height: 25px; }
  .quality-button { padding: 0 5px; font-size: 6px; }
  .readout-strip { gap: 8px; padding: 11px 1px 4px; }
  .readout-label { font-size: 6px; letter-spacing: .08em; }
  .readout-item strong { font-size: 16px; }
  .readout-item strong small { font-size: 8px; }
  .readout-unit { font-size: 6px; }
  .control-column { overflow: visible; padding: 17px 14px 24px; border-top: 1px solid var(--line); }
  .panel-header h2 { font-size: 17px; }
  .preset-card { min-height: 75px; }
  .parameter-list { gap: 13px; }
  .parameter-top label, .parameter-top output { font-size: 10px; }
  .range-ends { font-size: 7px; }
  .telemetry-card { padding: 10px; }
  .telemetry-card > span { font-size: 7px; }
  .telemetry-card strong { font-size: 18px; }
  .telemetry-foot { font-size: 7px; }
  .validation-section { padding: 13px; }
  .science-content p, .science-content li { font-size: 9px; }
  .disclaimer { font-size: 8px; }
  .embed-mode .stage-column { height: 100svh; }
  .embed-mode .scene-frame { height: calc(100svh - 48px); }
}
@media (max-width: 390px) {
  .stage-column { padding-left: 9px; padding-right: 9px; }
  .stage-heading h1 { font-size: 21px; }
  .stage-heading p { max-width: 235px; }
  .transport-main { gap: 4px; }
  .transport-button { padding: 0 6px; font-size: 6px; }
  .speed-control { grid-template-columns: auto 45px auto; gap: 4px; }
  .speed-control input { width: 45px; }
  .transport-secondary { gap: 4px; }
  .icon-button { width: 27px; height: 27px; }
  .quality-button { padding: 0 4px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
