:root {
  color-scheme: dark;
  --bg: #080d16;
  --panel: #0d1522;
  --panel-2: #101b2a;
  --line: rgba(171, 194, 215, .13);
  --line-strong: rgba(171, 194, 215, .22);
  --text: #edf3f7;
  --muted: #93a4b6;
  --dim: #627386;
  --accent: #8de0d1;
  --accent-strong: #b2f2e7;
  --accent-soft: rgba(141, 224, 209, .12);
  --amber: #d6b27e;
  --io: #e8d7b7;
  --europa: #c7d4df;
  --ganymede: #aeb7c2;
  --radius: 13px;
  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 { width: 100%; height: 100%; margin: 0; }
body { background: var(--bg); color: var(--text); overflow: hidden; }
body.embed-mode { height: 100vh; height: 100dvh; overflow: hidden; }
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.app-shell { height: 100vh; height: 100dvh; min-height: 0; display: grid; grid-template-rows: 64px minmax(0, 1fr) 34px; overflow: hidden; background: radial-gradient(ellipse at 27% 4%, rgba(35, 61, 81, .22), transparent 40%), var(--bg); }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 0 20px; border-bottom: 1px solid var(--line); background: rgba(8, 13, 22, .88); }
.brand-lockup { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark { position: relative; width: 34px; height: 34px; flex: 0 0 auto; border: 1px solid rgba(141,224,209,.32); border-radius: 50%; display: grid; place-items: center; transform: rotate(-28deg); }
.brand-mark::before { content: ""; width: 22px; height: 10px; border: 1.4px solid var(--accent); border-radius: 50%; transform: rotate(34deg); }
.brand-mark span { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px rgba(141,224,209,.8); }
.brand-mark i { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: var(--amber); transform: translate(12px,-8px); }
.brand-copy { min-width: 0; }
.eyebrow, .section-kicker { color: var(--dim); font-size: 9px; font-weight: 750; letter-spacing: .16em; line-height: 1.3; }
h1 { margin: 2px 0 0; font-size: 17px; font-weight: 640; letter-spacing: -.035em; white-space: nowrap; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.quiet-button, .accent-button { min-height: 35px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 8px; cursor: pointer; font-size: 11px; font-weight: 650; transition: background .18s ease, border-color .18s ease, transform .18s ease; }
.quiet-button { background: rgba(255,255,255,.025); border: 1px solid var(--line-strong); color: #bdc9d4; }
.quiet-button:hover { background: rgba(255,255,255,.06); border-color: rgba(141,224,209,.4); }
.accent-button { border: 1px solid rgba(141,224,209,.55); color: #061311; background: var(--accent); }
.accent-button:hover { background: var(--accent-strong); transform: translateY(-1px); }
.button-glyph { display: inline-block; width: 14px; height: 10px; border: 1.3px solid currentColor; border-radius: 50%; position: relative; transform: rotate(-20deg); }
.button-glyph::after { content: ""; position: absolute; width: 3px; height: 3px; background: var(--accent); border-radius: 50%; right: 1px; top: 2px; }
.camera-glyph { width: 13px; height: 10px; border: 1.4px solid currentColor; border-radius: 2px; display: inline-block; position: relative; }
.camera-glyph::before { content: ""; position: absolute; width: 5px; height: 3px; border: 1.2px solid currentColor; border-bottom: 0; left: 2.5px; top: -4px; border-radius: 2px 2px 0 0; }
.camera-glyph::after { content: ""; position: absolute; width: 4px; height: 4px; border: 1.1px solid currentColor; border-radius: 50%; left: 3.3px; top: 1.5px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 356px; gap: 10px; min-height: 0; padding: 10px 12px; }
.scene-panel, .control-panel { min-width: 0; min-height: 0; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(155deg, rgba(17, 28, 43, .96), rgba(10, 17, 29, .97)); overflow: hidden; }
.scene-panel { display: flex; flex-direction: column; }
.scene-heading { min-height: 58px; padding: 11px 16px 9px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); }
.scene-title { margin-top: 3px; font-size: 14px; font-weight: 620; letter-spacing: -.02em; }
.scene-key { display: flex; align-items: center; gap: 13px; color: #aab7c4; font-size: 10px; white-space: nowrap; }
.scene-key span { display: inline-flex; align-items: center; gap: 6px; }
.key-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.key-dot.io { background: var(--io); }.key-dot.europa { background: var(--europa); }.key-dot.ganymede { background: var(--ganymede); }
.canvas-wrap { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; background: radial-gradient(ellipse at 50% 52%, rgba(28, 48, 67, .18), transparent 57%), #080f1a; }
#orbitCanvas { display: block; width: 100%; height: 100%; touch-action: pan-y; }
.canvas-hud { position: absolute; z-index: 2; color: rgba(174,194,208,.62); font-size: 8px; letter-spacing: .13em; font-weight: 700; pointer-events: none; }
.hud-top-left { left: 15px; top: 14px; display: flex; align-items: center; gap: 8px; }
.hud-dot { width: 5px; height: 5px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 9px rgba(141,224,209,.65); }
.hud-divider { color: rgba(174,194,208,.25); }
.hud-bottom-left { left: 15px; bottom: 13px; }
.hud-bottom-right { right: 15px; bottom: 13px; }
.scene-caption { min-height: 62px; display: flex; align-items: center; gap: 11px; padding: 10px 15px; border-top: 1px solid var(--line); background: rgba(9, 15, 25, .8); }
.caption-mark { width: 25px; height: 25px; flex: 0 0 auto; display: grid; place-items: center; color: var(--accent); border: 1px solid rgba(141,224,209,.22); border-radius: 8px; font-size: 13px; }
.scene-caption p { flex: 1; margin: 0; color: #aebbc8; font-size: 10.5px; line-height: 1.5; }
.sim-clock { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; min-width: 70px; padding-left: 10px; border-left: 1px solid var(--line); }
.sim-clock span { color: var(--dim); font-size: 7px; letter-spacing: .15em; font-weight: 800; }
.sim-clock strong { font-size: 14px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.sim-clock small { color: var(--dim); font-size: 8px; }
.control-panel { display: flex; flex-direction: column; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(141,224,209,.25) transparent; }
.readout-section, .controls-section { padding: 14px 14px 13px; border-bottom: 1px solid var(--line); }
.panel-heading, .section-heading-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
h2 { margin: 3px 0 0; font-size: 13px; font-weight: 650; letter-spacing: -.02em; }
.live-pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 99px; border: 1px solid rgba(141,224,209,.2); color: var(--accent); font-size: 7px; font-weight: 800; letter-spacing: .12em; }
.live-pill i, .footer-status i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px rgba(141,224,209,.7); }
.readout-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 12px; }
.readout-card { min-width: 0; padding: 9px 9px 8px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.022); }
.primary-readout { border-color: rgba(141,224,209,.28); background: linear-gradient(135deg, rgba(141,224,209,.085), rgba(255,255,255,.018)); }
.readout-label { color: #8294a7; font-size: 7.5px; font-weight: 800; letter-spacing: .105em; white-space: nowrap; }
.info-dot { display: inline-grid; place-items: center; width: 11px; height: 11px; margin-left: 2px; border: 1px solid rgba(147,164,182,.5); border-radius: 50%; color: #9aabba; font-size: 7px; font-style: normal; letter-spacing: 0; cursor: help; }
.readout-value { margin-top: 5px; color: var(--text); font-size: 22px; font-weight: 570; letter-spacing: -.055em; line-height: 1.05; font-variant-numeric: tabular-nums; white-space: nowrap; }
.primary-readout .readout-value { color: var(--accent-strong); }
.readout-value span { font-size: 11px; font-weight: 550; letter-spacing: -.01em; color: #a2b1be; }
.readout-foot { display: flex; align-items: center; justify-content: space-between; gap: 4px; margin-top: 7px; color: #65778a; font-size: 7px; white-space: nowrap; }
.value-tag { padding: 2px 4px; border-radius: 3px; text-transform: uppercase; font-size: 6px; font-weight: 800; letter-spacing: .08em; }
.illustrative-tag { color: #a7b6c4; background: rgba(147,164,182,.12); }
.step-note { color: #788a9c; font-size: 8px; white-space: nowrap; }
.step-note em { color: #627386; font-size: 7px; font-style: normal; text-transform: uppercase; }
.time-control { margin-top: 14px; }
.control-label-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #b8c4ce; font-size: 10px; font-weight: 620; }
.control-label-row output { color: var(--accent); font-size: 9px; font-variant-numeric: tabular-nums; }
input[type="range"] { width: 100%; height: 18px; margin: 8px 0 0; appearance: none; background: transparent; cursor: pointer; accent-color: var(--accent); }
input[type="range"]::-webkit-slider-runnable-track { height: 3px; border-radius: 99px; background: linear-gradient(90deg, rgba(141,224,209,.8), rgba(141,224,209,.17)); }
input[type="range"]::-moz-range-track { height: 3px; border-radius: 99px; background: rgba(141,224,209,.3); }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 12px; height: 12px; margin-top: -4.5px; border-radius: 50%; border: 2px solid #d5fff7; background: var(--accent); box-shadow: 0 0 0 4px rgba(141,224,209,.12); }
input[type="range"]::-moz-range-thumb { width: 10px; height: 10px; border-radius: 50%; border: 2px solid #d5fff7; background: var(--accent); box-shadow: 0 0 0 4px rgba(141,224,209,.12); }
.range-ends { display: flex; justify-content: space-between; color: #627386; font-size: 7px; margin-top: -1px; }
.preset-control { margin-top: 13px; }
.mini-tag { color: #65788b; font-size: 7px; font-weight: 600; }
.preset-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 7px; }
.preset-button { min-width: 0; min-height: 48px; padding: 7px 8px; display: flex; align-items: center; gap: 8px; text-align: left; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.02); cursor: pointer; transition: border-color .18s ease, background .18s ease; }
.preset-button:hover { border-color: rgba(141,224,209,.3); }
.preset-button.active { border-color: rgba(141,224,209,.55); background: var(--accent-soft); }
.preset-button b { display: block; color: #d9e2e9; font-size: 9px; font-weight: 650; }
.preset-button small { display: block; margin-top: 3px; color: #748699; font-size: 7px; }
.preset-icon { width: 21px; height: 21px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid rgba(141,224,209,.2); border-radius: 6px; color: var(--accent); }
.lock-icon::before { content: ""; width: 8px; height: 7px; border: 1.2px solid currentColor; border-radius: 2px; margin-top: 4px; }
.lock-icon::after { content: ""; position: absolute; width: 5px; height: 5px; border: 1.2px solid currentColor; border-bottom: 0; border-radius: 5px 5px 0 0; transform: translateY(-4px); }
.drift-icon::before { content: "↗"; font-size: 15px; line-height: 1; }
.transport-row { display: flex; align-items: center; gap: 6px; margin-top: 13px; }
.transport-main, .transport-button, .quality-button { min-height: 33px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 9px; border-radius: 7px; border: 1px solid var(--line-strong); background: rgba(255,255,255,.03); color: #bdc9d4; font-size: 9px; font-weight: 650; cursor: pointer; transition: background .18s ease, border-color .18s ease; }
.transport-main { min-width: 84px; border-color: rgba(141,224,209,.42); background: rgba(141,224,209,.12); color: var(--accent-strong); }
.transport-main:hover, .transport-button:hover, .quality-button:hover { border-color: rgba(141,224,209,.5); background: rgba(141,224,209,.1); }
.transport-button { flex: 1; }
.quality-button { min-width: 42px; padding: 0 7px; color: var(--accent); font-size: 7px; letter-spacing: .1em; }
.pause-symbol { width: 9px; height: 10px; border-left: 2px solid currentColor; border-right: 2px solid currentColor; }
.play-symbol { width: 0; height: 0; border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-left: 8px solid currentColor; }
.step-symbol { width: 10px; height: 10px; position: relative; border-left: 1.5px solid currentColor; }
.step-symbol::after { content: ""; position: absolute; left: 2px; top: 1px; border-top: 4px solid transparent; border-bottom: 4px solid transparent; border-left: 6px solid currentColor; }
.reset-symbol { width: 10px; height: 10px; border: 1.5px solid currentColor; border-right-color: transparent; border-radius: 50%; position: relative; }
.reset-symbol::after { content: ""; position: absolute; right: -2px; top: -2px; border-left: 4px solid currentColor; border-top: 3px solid transparent; border-bottom: 3px solid transparent; transform: rotate(-25deg); }
.keyboard-hint { margin-top: 9px; color: #5f7184; font-size: 7px; letter-spacing: .06em; }
kbd { margin-left: 4px; padding: 2px 4px; border: 1px solid rgba(147,164,182,.18); border-radius: 3px; color: #8b9cac; font: inherit; letter-spacing: 0; }
.science-panel { margin: 0 14px 13px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.018); }
.science-panel summary { min-height: 48px; display: flex; align-items: center; gap: 9px; padding: 8px 10px; cursor: pointer; list-style: none; }
.science-panel summary::-webkit-details-marker { display: none; }
.science-icon { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 7px; background: rgba(141,224,209,.1); color: var(--accent); font-size: 14px; }
.science-panel summary b { display: block; color: #cbd6df; font-size: 9px; font-weight: 650; }
.science-panel summary small { display: block; margin-top: 2px; color: #728497; font-size: 7px; }
.chevron { width: 7px; height: 7px; margin-left: auto; border-right: 1.5px solid #7c8d9f; border-bottom: 1.5px solid #7c8d9f; transform: rotate(45deg) translateY(-2px); transition: transform .2s ease; }
.science-panel[open] .chevron { transform: rotate(225deg) translateY(-1px); }
.science-content { padding: 0 11px 12px; border-top: 1px solid var(--line); color: #8fa0b0; font-size: 9px; line-height: 1.55; }
.science-content h3 { margin: 12px 0 6px; color: #cbd6df; font-size: 9px; font-weight: 700; letter-spacing: .02em; }
.science-content p { margin: 6px 0 8px; }
.equation { padding: 7px 8px; border: 1px solid rgba(141,224,209,.14); border-radius: 6px; background: rgba(141,224,209,.045); color: #c5e7e1; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 8px; line-height: 1.6; overflow-wrap: anywhere; }
.check-card { padding: 9px; border: 1px solid var(--line); border-radius: 7px; background: rgba(255,255,255,.025); }
.check-title { color: #aebdca; font-size: 8px; font-weight: 650; }
.check-values { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 8px; }
.check-values span { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.check-values small { color: #738699; font-size: 6px; font-weight: 800; letter-spacing: .08em; }
.check-values small em { color: #53687b; font-style: normal; font-weight: 600; }
.check-values b { color: #e1eaf0; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.check-values > i { color: #627487; font-size: 8px; font-style: normal; }
.check-result { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; padding-top: 7px; border-top: 1px solid var(--line); color: #748699; font-size: 7px; }
.check-result strong { color: var(--accent); font-size: 10px; font-variant-numeric: tabular-nums; }
.check-explain { color: #718396; font-size: 8px; }
.science-list { margin: 5px 0 8px; padding-left: 14px; }
.science-list li { margin: 4px 0; }
.science-list b { color: #b8c6d2; }
.disclaimer { margin-top: 10px !important; padding-top: 8px; border-top: 1px solid var(--line); color: #6e8092; font-size: 7px; }
.footer-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 17px; border-top: 1px solid var(--line); color: #647588; font-size: 7px; font-weight: 750; letter-spacing: .12em; }
.footer-bar > span { display: inline-flex; align-items: center; gap: 7px; }
.footer-orbit { width: 10px; height: 6px; border: 1px solid var(--accent); border-radius: 50%; transform: rotate(-25deg); }
.footer-status { color: #8da0af; }
.footer-status i { width: 5px; height: 5px; }
@media (max-width: 760px) {
  .app-shell { grid-template-rows: 54px minmax(0, 1fr) 27px; }
  .topbar { padding: 0 10px; gap: 8px; }
  .brand-mark { width: 29px; height: 29px; }
  .brand-mark::before { width: 19px; height: 8px; }
  .eyebrow { font-size: 7px; letter-spacing: .12em; }
  h1 { font-size: 14px; }
  .top-actions { gap: 5px; }
  .quiet-button, .accent-button { min-height: 31px; padding: 0 8px; gap: 6px; font-size: 8px; }
  .layout { grid-template-columns: minmax(0,1fr); grid-template-rows: minmax(235px, 44dvh) minmax(0,1fr); gap: 7px; padding: 7px; }
  .scene-heading { min-height: 43px; padding: 7px 10px; }
  .scene-title { font-size: 11px; }
  .scene-key { gap: 8px; font-size: 8px; }
  .scene-key span { gap: 4px; }
  .key-dot { width: 5px; height: 5px; }
  .canvas-hud { font-size: 6px; }
  .hud-top-left { left: 9px; top: 8px; gap: 5px; }
  .hud-bottom-left { left: 9px; bottom: 8px; }
  .hud-bottom-right { right: 9px; bottom: 8px; }
  .scene-caption { min-height: 46px; padding: 6px 9px; gap: 7px; }
  .caption-mark { width: 20px; height: 20px; font-size: 10px; }
  .scene-caption p { font-size: 8px; line-height: 1.35; }
  .sim-clock { min-width: 57px; padding-left: 7px; }
  .sim-clock strong { font-size: 11px; }
  .sim-clock span { font-size: 6px; }
  .control-panel { border-radius: 10px; }
  .readout-section, .controls-section { padding: 9px 10px; }
  .panel-heading .section-kicker, .section-heading-row .section-kicker { font-size: 7px; }
  h2 { font-size: 11px; }
  .readout-grid { margin-top: 7px; gap: 5px; }
  .readout-card { padding: 6px 7px; }
  .readout-label { font-size: 6px; }
  .readout-value { margin-top: 3px; font-size: 17px; }
  .readout-value span { font-size: 9px; }
  .readout-foot { margin-top: 4px; font-size: 6px; }
  .value-tag { font-size: 5px; }
  .live-pill { font-size: 6px; padding: 3px 5px; }
  .time-control { margin-top: 9px; }
  .control-label-row { font-size: 8px; }
  .control-label-row output { font-size: 8px; }
  input[type="range"] { margin-top: 5px; height: 14px; }
  .range-ends { font-size: 6px; }
  .preset-control { margin-top: 8px; }
  .mini-tag { font-size: 6px; }
  .preset-buttons { margin-top: 5px; gap: 5px; }
  .preset-button { min-height: 37px; padding: 5px 6px; gap: 6px; }
  .preset-icon { width: 18px; height: 18px; }
  .preset-button b { font-size: 8px; }
  .preset-button small { font-size: 6px; margin-top: 1px; }
  .transport-row { margin-top: 8px; gap: 5px; }
  .transport-main, .transport-button, .quality-button { min-height: 28px; font-size: 8px; padding: 0 7px; }
  .transport-main { min-width: 69px; }
  .quality-button { min-width: 36px; font-size: 6px; }
  .keyboard-hint { margin-top: 6px; font-size: 6px; }
  kbd { padding: 1px 3px; }
  .science-panel { margin: 0 10px 9px; }
  .science-panel summary { min-height: 39px; padding: 6px 8px; }
  .science-icon { width: 21px; height: 21px; }
  .science-panel summary b { font-size: 8px; }
  .science-panel summary small { font-size: 6px; }
  .footer-bar { padding: 0 9px; font-size: 5.5px; letter-spacing: .08em; }
  .footer-bar > span:nth-child(2) { display: none; }
}
@media (max-width: 370px) {
  .topbar { padding: 0 7px; }
  h1 { font-size: 12px; }
  .quiet-button, .accent-button { padding: 0 6px; font-size: 7px; }
  .scene-key { gap: 6px; font-size: 7px; }
  .readout-label { font-size: 5.6px; }
  .readout-value { font-size: 15px; }
  .keyboard-hint { letter-spacing: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
