:root {
  color-scheme: dark;
  --bg: #080d14;
  --panel: #0d1520;
  --panel-2: #111c29;
  --line: rgba(164, 190, 211, .12);
  --line-strong: rgba(164, 190, 211, .2);
  --text: #e8f0f5;
  --muted: #93a3b1;
  --soft: #647584;
  --accent: #72e1ce;
  --accent-dim: rgba(114, 225, 206, .12);
  --accent-line: rgba(114, 225, 206, .38);
  --radius: 14px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; min-width: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body { overflow: hidden; }
body.embed-mode { height: 100vh; height: 100dvh; overflow: hidden; }
button, input { font: inherit; }
button { color: inherit; }
.app-shell { width: 100%; height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; background: radial-gradient(ellipse at 12% 0%, rgba(34, 73, 87, .16), transparent 34%), var(--bg); }
.topbar { height: 68px; flex: 0 0 68px; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; border-bottom: 1px solid var(--line); background: rgba(8, 13, 20, .94); z-index: 2; }
.brand-lockup { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark { width: 34px; height: 34px; border: 1px solid var(--accent-line); border-radius: 50%; position: relative; display: grid; place-items: center; flex: 0 0 auto; }
.brand-mark span { width: 13px; height: 13px; border: 1.5px solid var(--accent); border-radius: 50%; }
.brand-mark i { position: absolute; width: 28px; height: 9px; border: 1px solid var(--accent); border-radius: 50%; transform: rotate(-28deg); }
.eyebrow, .section-label, .caption-kicker { color: var(--soft); font-size: 9px; font-weight: 750; letter-spacing: .16em; line-height: 1.3; }
h1 { margin: 2px 0 0; font-size: 17px; line-height: 1.2; letter-spacing: -.025em; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-meta { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .12em; white-space: nowrap; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px rgba(114,225,206,.65); }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 356px; min-height: 0; flex: 1 1 auto; overflow: hidden; }
.stage { position: relative; min-width: 0; min-height: 0; overflow: hidden; border-right: 1px solid var(--line); background: #08111a; }
#orbitCanvas { display: block; width: 100%; height: 100%; }
.stage-topline { position: absolute; top: 18px; left: 20px; right: 20px; display: flex; justify-content: space-between; align-items: center; pointer-events: none; }
.stage-chip, .stage-frame { font-size: 9px; letter-spacing: .14em; font-weight: 750; color: #9baebb; }
.stage-chip { border: 1px solid rgba(164,190,211,.18); background: rgba(7,14,22,.62); border-radius: 999px; padding: 7px 10px; }
.stage-frame { color: var(--accent); }
.stage-legend { position: absolute; left: 20px; top: 62px; display: flex; flex-direction: column; gap: 8px; color: #9aabb8; font-size: 10px; pointer-events: none; }
.stage-legend span { display: flex; align-items: center; gap: 7px; }
.stage-legend i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.legend-sun { background: #d9d2b9; box-shadow: 0 0 9px rgba(217,210,185,.4); }
.legend-planet { background: #8798a8; }
.legend-asteroid { background: var(--accent); box-shadow: 0 0 8px rgba(114,225,206,.55); }
.stage-caption { position: absolute; bottom: 18px; left: 20px; max-width: min(480px, 65%); padding: 12px 14px; border: 1px solid rgba(164,190,211,.13); border-radius: 11px; background: rgba(7, 14, 22, .78); backdrop-filter: blur(10px); pointer-events: none; }
.stage-caption p { margin: 5px 0 0; color: #c4d1d9; font-size: 11px; line-height: 1.5; }
.stage-time { position: absolute; bottom: 22px; right: 20px; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; pointer-events: none; }
.stage-time span { color: var(--soft); font-size: 8px; letter-spacing: .14em; font-weight: 750; }
.stage-time strong { color: var(--text); font-size: 15px; font-variant-numeric: tabular-nums; }
.control-panel { min-width: 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 18px 16px 16px; background: linear-gradient(180deg, #0d1520, #0a121b); scrollbar-width: thin; scrollbar-color: #31404d transparent; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.panel-heading h2 { margin: 4px 0 0; font-size: 19px; font-weight: 650; letter-spacing: -.035em; }
.model-tag { border: 1px solid var(--line-strong); border-radius: 6px; padding: 5px 7px; color: var(--muted); font-size: 9px; letter-spacing: .12em; font-weight: 750; }
.section-label { margin-bottom: 9px; }
.preset-section { margin-bottom: 19px; }
.preset-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.preset-button { min-width: 0; display: flex; align-items: center; gap: 9px; padding: 10px 9px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.018); text-align: left; cursor: pointer; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.preset-button:hover { border-color: rgba(114,225,206,.42); background: rgba(114,225,206,.045); }
.preset-button:active { transform: translateY(1px); }
.preset-button.active { border-color: var(--accent-line); background: var(--accent-dim); }
.preset-button strong { display: block; font-size: 11px; font-weight: 700; }
.preset-button small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.preset-glyph { width: 27px; height: 27px; flex: 0 0 auto; display: inline-block; position: relative; }
.horseshoe-glyph:before { content: ""; position: absolute; inset: 2px; border: 1.5px solid var(--accent); border-bottom-color: transparent; border-radius: 50%; transform: rotate(180deg); }
.horseshoe-glyph:after { content: ""; position: absolute; width: 5px; height: 5px; right: 2px; top: 5px; border-radius: 50%; background: var(--accent); }
.tadpole-glyph:before { content: ""; position: absolute; width: 19px; height: 19px; left: 3px; top: 3px; border: 1.5px dashed var(--accent); border-radius: 50%; }
.tadpole-glyph:after { content: ""; position: absolute; width: 5px; height: 5px; left: 17px; top: 4px; border-radius: 50%; background: var(--accent); }
.controls-section { display: flex; flex-direction: column; gap: 15px; padding: 14px 0 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.control-row { min-width: 0; }
.control-label-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.control-label-line label { color: #d8e2e8; font-size: 11px; font-weight: 600; }
.control-label-line label em { margin-left: 4px; color: #657a88; font-size: 7px; font-style: normal; font-weight: 800; letter-spacing: .08em; vertical-align: 1px; }
.control-label-line output { color: var(--accent); font-size: 10px; font-weight: 700; font-variant-numeric: tabular-nums; }
input[type="range"] { width: 100%; height: 4px; display: block; margin: 0; accent-color: var(--accent); cursor: pointer; background: #263543; border-radius: 999px; }
input[type="range"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.range-ends { display: flex; justify-content: space-between; margin-top: 6px; color: #647584; font-size: 8px; font-variant-numeric: tabular-nums; }
.action-section { padding: 15px 0 16px; border-bottom: 1px solid var(--line); }
.transport-row { display: grid; grid-template-columns: 1.25fr .8fr .8fr; gap: 7px; }
.primary-action, .secondary-action, .utility-button { min-height: 34px; border-radius: 8px; border: 1px solid var(--line-strong); background: rgba(255,255,255,.025); cursor: pointer; font-size: 10px; font-weight: 700; transition: background .16s ease, border-color .16s ease, transform .16s ease; }
.primary-action { display: flex; align-items: center; justify-content: center; gap: 8px; color: #071511; background: var(--accent); border-color: var(--accent); }
.primary-action:hover { background: #8aebdc; }
.secondary-action:hover, .utility-button:hover { border-color: var(--accent-line); background: rgba(114,225,206,.07); }
.primary-action:active, .secondary-action:active, .utility-button:active { transform: translateY(1px); }
.pause-icon { width: 8px; height: 10px; border-left: 2px solid #071511; border-right: 2px solid #071511; }
.play-icon { width: 0; height: 0; border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-left: 9px solid #071511; }
.utility-row { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 8px; }
.utility-button { min-height: 30px; color: #9fb0bc; font-size: 9px; }
.utility-button.active { color: var(--accent); border-color: var(--accent-line); background: rgba(114,225,206,.065); }
.screenshot-button { color: #d4dfe6; }
.screenshot-button span { color: var(--accent); font-size: 12px; }
.readout-section { padding: 16px 0 15px; border-bottom: 1px solid var(--line); }
.readout-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.readout-card { min-width: 0; padding: 10px 10px 9px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.018); }
.readout-name { display: block; color: var(--muted); font-size: 9px; }
.readout-card strong { display: block; margin-top: 5px; color: #e6f0f4; font-size: 16px; font-weight: 650; letter-spacing: -.025em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.readout-card small { display: block; margin-top: 3px; color: #657685; font-size: 8px; }
.check-card { margin-top: 14px; padding: 12px; border: 1px solid rgba(114,225,206,.22); border-radius: 10px; background: linear-gradient(135deg, rgba(114,225,206,.065), rgba(255,255,255,.015)); }
.check-heading { display: flex; justify-content: space-between; align-items: center; }
.check-heading .section-label { margin: 0; }
.check-heading h3 { margin: 4px 0 0; font-size: 12px; font-weight: 650; }
.check-mark { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; color: var(--accent); background: rgba(114,225,206,.12); font-size: 12px; }
.check-values { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.check-values div { min-width: 0; }
.check-values span, .check-footer span { display: block; color: var(--muted); font-size: 8px; }
.check-values strong { display: block; margin-top: 4px; color: #dfe9ee; font-size: 12px; font-variant-numeric: tabular-nums; }
.check-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--line); }
.check-footer strong { color: var(--accent); font-size: 11px; font-variant-numeric: tabular-nums; }
.check-card p { margin: 8px 0 0; color: #7e909d; font-size: 9px; line-height: 1.45; }
.science-panel { margin-top: 13px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.018); overflow: hidden; }
.science-panel summary { min-height: 43px; display: flex; align-items: center; gap: 9px; padding: 0 11px; color: #dce6eb; cursor: pointer; list-style: none; font-size: 11px; font-weight: 650; }
.science-panel summary::-webkit-details-marker { display: none; }
.science-icon { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 6px; color: var(--accent); background: var(--accent-dim); font-size: 13px; }
.chevron { margin-left: auto; color: var(--muted); font-size: 15px; transition: transform .18s ease; }
.science-panel[open] .chevron { transform: rotate(180deg); }
.science-content { padding: 0 12px 12px; border-top: 1px solid var(--line); }
.science-content h3 { margin: 12px 0 6px; color: #dbe6eb; font-size: 10px; letter-spacing: .02em; }
.science-content p { margin: 6px 0; color: #91a2ae; font-size: 9px; line-height: 1.55; }
.equation { margin: 7px 0; padding: 8px 9px; border: 1px solid rgba(164,190,211,.11); border-radius: 7px; background: rgba(0,0,0,.18); color: #c8d8df; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 9px; line-height: 1.55; overflow-wrap: anywhere; }
.science-content .science-note { color: #a2b4be; }
.science-content .disclaimer { margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--line); color: #b8c8d1; font-style: italic; }
.panel-footnote { padding: 12px 0 3px; color: #526372; font-size: 8px; font-weight: 700; letter-spacing: .13em; text-align: center; }
button:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (max-width: 820px) {
  .topbar { padding: 0 16px; }
  .workspace { grid-template-columns: minmax(0, 1fr) 326px; }
  .control-panel { padding: 15px 13px; }
}
@media (max-width: 700px) {
  body { overflow: hidden; }
  .topbar { height: 58px; flex-basis: 58px; padding: 0 13px; }
  .brand-mark { width: 30px; height: 30px; }
  .brand-mark i { width: 24px; height: 8px; }
  h1 { font-size: 14px; }
  .topbar-meta { font-size: 8px; letter-spacing: .08em; }
  .workspace { display: grid; grid-template-columns: minmax(0,1fr); grid-template-rows: minmax(270px, 43dvh) minmax(0,1fr); }
  .stage { border-right: 0; border-bottom: 1px solid var(--line); }
  .stage-topline { top: 11px; left: 12px; right: 12px; }
  .stage-chip { padding: 6px 8px; font-size: 8px; }
  .stage-frame { font-size: 8px; }
  .stage-legend { top: 48px; left: 13px; gap: 6px; font-size: 8px; }
  .stage-caption { bottom: 10px; left: 11px; max-width: calc(100% - 110px); padding: 8px 9px; }
  .stage-caption p { font-size: 9px; line-height: 1.35; }
  .caption-kicker { font-size: 7px; }
  .stage-time { bottom: 15px; right: 12px; }
  .stage-time span { font-size: 7px; }
  .stage-time strong { font-size: 12px; }
  .control-panel { padding: 13px 13px calc(16px + env(safe-area-inset-bottom)); }
  .panel-heading { margin-bottom: 13px; }
  .panel-heading h2 { font-size: 17px; }
  .preset-section { margin-bottom: 14px; }
  .controls-section { gap: 12px; padding: 12px 0; }
  .action-section { padding: 12px 0; }
  .readout-section { padding: 13px 0; }
}
@media (max-width: 380px) {
  .topbar-meta { display: none; }
  .stage-caption { max-width: calc(100% - 98px); }
  .readout-card { padding: 8px; }
  .readout-card strong { 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; }
}
