:root {
  color-scheme: dark;
  --bg: #07111b;
  --panel: #0d1a26;
  --panel-2: #101f2c;
  --line: rgba(145, 183, 202, .15);
  --line-strong: rgba(145, 183, 202, .25);
  --text: #eaf4f8;
  --muted: #8da5b2;
  --subtle: #5e7786;
  --ice: #7bdcf7;
  --ice-bright: #b4efff;
  --ice-deep: #2c91b4;
  --amber: #c5a77a;
  --radius: 12px;
  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; width: 100%; min-height: 100%; background: var(--bg); color: var(--text); }
body { overflow: hidden; }
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, summary:focus-visible, a:focus-visible { outline: 2px solid var(--ice); outline-offset: 3px; }
.app-shell { min-height: 100vh; display: grid; grid-template-rows: 62px minmax(0, 1fr) 64px; background: radial-gradient(ellipse at 28% 0%, rgba(31, 73, 94, .19), transparent 42%), var(--bg); }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 0 24px; border-bottom: 1px solid var(--line); background: rgba(7, 17, 27, .88); z-index: 5; }
.brand { display: flex; gap: 11px; align-items: center; text-decoration: none; color: var(--text); min-width: 220px; }
.brand-mark { width: 31px; height: 31px; display: grid; place-items: center; border: 1px solid rgba(123, 220, 247, .38); color: var(--ice); border-radius: 9px; font-size: 21px; background: rgba(67, 156, 190, .1); }
.brand-copy { display: flex; flex-direction: column; gap: 2px; line-height: 1; }
.brand-copy strong { font-size: 11px; letter-spacing: 2.4px; font-weight: 750; }
.brand-copy small { color: var(--muted); font-size: 8px; letter-spacing: 1.8px; }
.topbar-center { display: flex; align-items: center; gap: 9px; font-size: 9px; letter-spacing: 1.4px; color: #a9c2ce; }
.live-dot, .scene-status-dot { width: 6px; height: 6px; border-radius: 50%; background: #69d6c3; box-shadow: 0 0 11px rgba(105,214,195,.75); }
.topbar-divider { height: 14px; width: 1px; background: var(--line-strong); margin: 0 5px; }
.classification { color: #d4b78b; }
.topbar-actions { display: flex; align-items: center; gap: 16px; min-width: 220px; justify-content: flex-end; }
.seed-label { color: var(--subtle); font-size: 9px; letter-spacing: 1.5px; }.seed-label b { color: #b7ccd6; font-weight: 600; margin-left: 4px; }
.icon-button { width: 27px; height: 27px; border-radius: 50%; border: 1px solid var(--line-strong); background: transparent; color: var(--muted); cursor: pointer; font-weight: 600; }
.workspace { min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 366px; gap: 16px; padding: 16px 18px 14px; }
.visual-column { min-width: 0; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) 88px; gap: 12px; }
.scene-wrap { position: relative; min-height: 0; overflow: hidden; border-radius: 15px; border: 1px solid rgba(130, 177, 199, .2); background: #0b1a27; isolation: isolate; box-shadow: 0 20px 65px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.025); }
.scene-viewport { position: absolute; inset: 0; z-index: 0; }
.three-canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.scene-vignette { position: absolute; inset: 0; pointer-events: none; z-index: 1; background: linear-gradient(90deg, rgba(5,14,23,.5), transparent 48%), linear-gradient(0deg, rgba(5,14,23,.38), transparent 32%, rgba(5,14,23,.15)); }
.scene-heading { position: absolute; z-index: 2; top: 25px; left: 28px; pointer-events: none; }
.eyebrow { color: #80b9ce; font-size: 9px; font-weight: 650; letter-spacing: 2px; }.eyebrow span { color: #d5b98d; padding: 0 5px; }
.scene-heading h1 { margin: 8px 0 5px; font-size: clamp(29px, 3.3vw, 43px); letter-spacing: -1.9px; line-height: 1.02; font-weight: 650; text-shadow: 0 3px 20px rgba(0,0,0,.25); }
.title-period { color: var(--ice); }.scene-heading p { color: #a9c2cf; margin: 0; font-size: 12px; letter-spacing: .15px; }
.scene-controls-hint { position: absolute; z-index: 2; top: 27px; right: 25px; color: #91aebb; font-size: 8px; letter-spacing: 1.35px; display: flex; align-items: center; gap: 8px; pointer-events: none; }.scene-controls-hint i { width: 3px; height: 3px; background: #6a8c9c; border-radius: 50%; }.mouse-glyph { font-size: 16px; color: var(--ice); }
.scene-top-right { position: absolute; top: 68px; right: 25px; z-index: 2; display: flex; align-items: center; gap: 7px; font-size: 8px; letter-spacing: 1.5px; color: #9ab7c4; pointer-events: none; }
.scene-status-dot { width: 5px; height: 5px; background: var(--ice); box-shadow: 0 0 9px rgba(123,220,247,.65); }
.scene-bottom-left { position: absolute; z-index: 2; bottom: 18px; left: 20px; pointer-events: none; }.cause-chain { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid rgba(151,195,214,.2); background: rgba(7,19,29,.72); border-radius: 8px; backdrop-filter: blur(9px); }.cause-chain span { color: #7897a7; font-size: 7px; letter-spacing: 1.2px; }.cause-chain b { color: #d5e8ef; font-size: 8px; letter-spacing: .8px; font-weight: 650; }.cause-chain i { color: #64c6e5; font-style: normal; font-size: 12px; }.scale-note { margin: 7px 0 0 3px; color: #718d9b; font-size: 8px; letter-spacing: 1.2px; }
.scene-bottom-right { position: absolute; z-index: 2; bottom: 19px; right: 20px; display: flex; gap: 7px; }.scene-tool { border: 1px solid rgba(150,190,207,.22); background: rgba(7,19,29,.76); backdrop-filter: blur(8px); color: #aac4d0; border-radius: 7px; padding: 8px 10px; display: flex; gap: 7px; align-items: center; cursor: pointer; font-size: 8px; letter-spacing: 1px; }.scene-tool span { color: var(--ice); font-size: 14px; }.scene-tool b { font-size: 8px; font-weight: 650; }.scene-tool:hover { border-color: rgba(123,220,247,.6); color: white; }
.context-overlay { position: absolute; inset: 0; z-index: 4; background: rgba(5,14,22,.84); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; }.context-overlay[hidden] { display: none; }.context-overlay strong { color: #e5f4f8; font-size: 15px; }.context-overlay span { color: var(--muted); font-size: 11px; }
.readout-strip { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); border: 1px solid var(--line); border-radius: 11px; background: linear-gradient(105deg, rgba(17,34,47,.96), rgba(10,24,36,.98)); overflow: hidden; }
.readout { padding: 13px 13px 10px; border-right: 1px solid var(--line); min-width: 0; display: flex; flex-direction: column; gap: 3px; justify-content: center; }.readout:last-child { border-right: 0; }.readout-label { color: #7794a3; font-size: 8px; letter-spacing: 1.35px; white-space: nowrap; }.readout strong { color: #e4f5fb; font-size: 19px; letter-spacing: -.5px; font-weight: 620; white-space: nowrap; }.readout small { color: #6d8795; font-size: 9px; white-space: nowrap; }.heave-readout strong { color: var(--ice); }
.control-column { min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #294354 transparent; display: flex; flex-direction: column; gap: 12px; padding-right: 1px; }.panel-card { background: linear-gradient(150deg, rgba(15,31,44,.98), rgba(10,23,34,.98)); border: 1px solid var(--line); border-radius: 12px; padding: 17px 16px; }.experiment-card { flex: 0 0 auto; }.panel-heading { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }.panel-heading h2 { font-size: 17px; letter-spacing: -.4px; margin: 5px 0 0; font-weight: 620; }.panel-index { color: #668493; font-size: 8px; letter-spacing: 1.2px; padding-top: 4px; }.preset-label { color: #819ca9; font-size: 8px; letter-spacing: 1.5px; margin-bottom: 8px; }.preset-grid { display: grid; grid-template-columns: 1fr; gap: 6px; }.preset-button { width: 100%; min-height: 42px; border-radius: 8px; border: 1px solid rgba(139,178,195,.14); background: rgba(5,17,27,.36); display: flex; align-items: center; text-align: left; padding: 7px 9px; gap: 9px; cursor: pointer; transition: border-color .18s, background .18s; }.preset-button:hover { border-color: rgba(123,220,247,.4); }.preset-button.active { border-color: rgba(123,220,247,.48); background: rgba(53,129,157,.12); }.preset-icon { color: var(--ice); font-size: 17px; width: 22px; text-align: center; }.preset-button span:last-child { display: flex; flex-direction: column; gap: 2px; }.preset-button b { font-size: 10px; font-weight: 630; color: #dcebf0; }.preset-button small { font-size: 8px; color: #7893a1; }
.control-divider { height: 1px; background: var(--line); margin: 14px 0 13px; }.control-list { display: flex; flex-direction: column; gap: 14px; }.control-row { display: flex; flex-direction: column; gap: 6px; }.control-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }.control-head label { color: #bfd0d8; font-size: 10px; font-weight: 550; }.control-head output { color: var(--ice-bright); font-size: 10px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.range { appearance: none; -webkit-appearance: none; width: 100%; height: 4px; margin: 5px 0 1px; border-radius: 5px; background: linear-gradient(90deg, #347f9d, #79d9f2); outline: none; cursor: pointer; }.range::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 13px; height: 13px; border-radius: 50%; background: #d9f7ff; border: 3px solid #388aaa; box-shadow: 0 0 0 3px rgba(91,196,228,.12); }.range::-moz-range-thumb { width: 9px; height: 9px; border-radius: 50%; background: #d9f7ff; border: 3px solid #388aaa; box-shadow: 0 0 0 3px rgba(91,196,228,.12); }.range-ends { display: flex; justify-content: space-between; color: #647e8d; font-size: 8px; }.speed-range { background: linear-gradient(90deg, #a18a66, #e3c38f); }.speed-range::-webkit-slider-thumb { border-color: #ad9165; }.speed-range::-moz-range-thumb { border-color: #ad9165; }
.time-control { display: flex; flex-direction: column; gap: 6px; }.transport-controls { display: grid; grid-template-columns: 1.45fr 1fr 1fr; gap: 7px; margin-top: 15px; }.primary-button, .transport-button { height: 39px; border-radius: 8px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 7px; }.primary-button { border: 1px solid rgba(121,220,245,.44); background: linear-gradient(110deg, #216985, #1a5870); color: #f0fbff; font-size: 10px; font-weight: 650; box-shadow: 0 4px 16px rgba(28,111,145,.14); }.primary-button:hover { filter: brightness(1.14); }.play-icon { font-size: 12px; }.transport-button { background: rgba(7,18,28,.48); border: 1px solid var(--line-strong); color: #9cb5c1; flex-direction: column; gap: 1px; }.transport-button span { font-size: 14px; line-height: 1; color: #bdeeff; }.transport-button b { font-size: 7px; letter-spacing: 1px; }.transport-button:hover { border-color: rgba(123,220,247,.5); color: #e9f8fd; }.elapsed-row { display: flex; align-items: center; gap: 7px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); color: #6f8a98; font-size: 8px; letter-spacing: 1.1px; }.elapsed-row strong { color: #c8e6f0; font-size: 10px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: .3px; }.elapsed-state { margin-left: auto; color: #6fd1c0; font-size: 8px; }
.science-card { padding: 0; }.science-card details { width: 100%; }.science-card summary { list-style: none; cursor: pointer; padding: 14px 15px; display: flex; align-items: center; gap: 10px; }.science-card summary::-webkit-details-marker { display: none; }.science-icon { width: 29px; height: 29px; display: grid; place-items: center; border: 1px solid rgba(123,220,247,.28); border-radius: 8px; color: var(--ice); font-size: 16px; }.science-card summary span:nth-child(2) { display: flex; flex-direction: column; gap: 3px; }.science-card summary b { color: #d8eaf0; font-size: 10px; }.science-card summary small { color: #718c9a; font-size: 8px; }.chevron { margin-left: auto; color: #84a2b1; font-size: 15px; transition: transform .2s; }.science-card details[open] .chevron { transform: rotate(180deg); }.science-content { border-top: 1px solid var(--line); padding: 5px 15px 15px; }.equation-block { padding: 10px 0; border-bottom: 1px solid rgba(145,183,202,.09); }.equation-block span, .science-footnote b { display: block; color: #6f94a6; font-size: 7px; letter-spacing: 1.3px; margin-bottom: 5px; }.equation-block code { color: #c8f0ff; font-size: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }.equation-block p, .science-footnote p { margin: 5px 0 0; color: #819ba8; font-size: 9px; line-height: 1.45; }.science-footnote { padding-top: 11px; }
.footer-bar { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 0 22px; border-top: 1px solid var(--line); background: rgba(8,19,29,.96); }.validation-block { display: flex; align-items: center; gap: 8px; min-width: 280px; }.validation-mark { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: rgba(86,193,166,.12); color: #73d7bc; font-size: 13px; }.validation-block div { display: flex; flex-direction: column; gap: 3px; }.validation-block b { color: #b8d3dd; font-size: 8px; letter-spacing: 1px; }.validation-block small { color: #6c8795; font-size: 8px; }.validation-block strong { margin-left: 5px; color: #80dfc6; font-size: 12px; font-variant-numeric: tabular-nums; }.validation-diff-label { color: #688493; font-size: 7px; letter-spacing: 1px; }.footer-center { display: flex; align-items: center; gap: 8px; color: #6f8997; font-size: 8px; }.footer-center span { color: #7895a4; letter-spacing: 1.1px; margin-right: 3px; }.footer-center b { color: #a9c1cc; font-weight: 550; }.footer-center i { color: #4d6b7b; font-style: normal; }.quality-control { display: flex; align-items: center; gap: 4px; min-width: 155px; justify-content: flex-end; }.quality-control > span { color: #718b98; font-size: 8px; letter-spacing: 1.1px; margin-right: 5px; }.quality-button { border: 1px solid transparent; background: transparent; color: #77919e; font-size: 8px; letter-spacing: .8px; border-radius: 5px; padding: 6px 8px; cursor: pointer; }.quality-button.active { color: #d7f4fb; border-color: rgba(123,220,247,.28); background: rgba(62,148,178,.12); }
.toast { position: fixed; left: 50%; bottom: 82px; transform: translate(-50%, 12px); padding: 9px 14px; border-radius: 8px; background: #153548; border: 1px solid rgba(123,220,247,.3); color: #dff6fd; font-size: 10px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 20; }.toast.show { opacity: 1; transform: translate(-50%,0); }
.help-dialog { width: min(360px, calc(100vw - 32px)); background: #102231; border: 1px solid var(--line-strong); border-radius: 12px; color: var(--text); padding: 17px; box-shadow: 0 20px 70px rgba(0,0,0,.5); }.help-dialog::backdrop { background: rgba(2,8,13,.72); backdrop-filter: blur(4px); }.help-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; }.help-head b { font-size: 13px; }.help-head button { border: 0; background: transparent; color: var(--muted); font-size: 20px; cursor: pointer; }.help-row { display: flex; align-items: center; gap: 12px; margin: 8px 0; color: #a9c1cc; font-size: 11px; }.help-row kbd { min-width: 48px; text-align: center; border: 1px solid var(--line-strong); border-radius: 5px; padding: 4px; color: var(--ice-bright); background: rgba(3,14,23,.5); }.help-dialog p { color: #7893a2; font-size: 9px; margin: 15px 0 0; }.disclaimer { position: fixed; right: 12px; bottom: 2px; color: rgba(118,145,158,.45); font-size: 7px; letter-spacing: .3px; pointer-events: none; }
/* Local SVG fallback is only used when the host-provided Three.js bundle is unavailable. */
.fallback-scene { position: absolute; inset: 0; background: #0a1925; }.fallback-svg-host, .fallback-svg-host svg { width: 100%; height: 100%; display: block; }.fallback-chip { position: absolute; z-index: 1; right: 18px; top: 96px; color: #8eb8ca; font-size: 7px; letter-spacing: 1.2px; padding: 5px 8px; border: 1px solid rgba(123,220,247,.22); border-radius: 5px; background: rgba(7,18,28,.6); }.fallback-note { position: absolute; right: 18px; bottom: 84px; color: rgba(146,178,192,.56); font-size: 7px; letter-spacing: .8px; }
.embed .app-shell { grid-template-rows: minmax(0,1fr); min-height: 100vh; }.embed .topbar, .embed .footer-bar { display: none; }.embed .workspace { padding: 0; grid-template-columns: minmax(0,1fr) 330px; gap: 0; }.embed .visual-column { grid-template-rows: minmax(0,1fr) 76px; gap: 0; }.embed .scene-wrap { border-radius: 0; }.embed .readout-strip { border-radius: 0; }.embed .control-column { border-left: 1px solid var(--line); border-radius: 0; padding: 10px; }.embed .disclaimer { display: none; }
@media (max-width: 1120px) { .workspace { grid-template-columns: minmax(0,1fr) 340px; gap: 10px; padding: 12px; }.readout { padding: 10px 9px; }.readout strong { font-size: 16px; }.footer-center { display: none; }.topbar { padding: 0 16px; } }
@media (max-width: 820px) { body { overflow: auto; }.app-shell { min-height: 100vh; height: auto; grid-template-rows: 54px auto 58px; }.topbar { position: sticky; top: 0; }.topbar-center { display: none; }.brand, .topbar-actions { min-width: 0; }.workspace { display: flex; flex-direction: column; padding: 10px; gap: 10px; }.visual-column { display: grid; grid-template-rows: minmax(400px, 56vh) auto; gap: 8px; }.readout-strip { min-height: 78px; }.readout { padding: 9px 7px; }.readout-label { font-size: 7px; letter-spacing: .8px; }.readout strong { font-size: 15px; }.readout small { font-size: 8px; white-space: normal; }.control-column { overflow: visible; display: grid; grid-template-columns: minmax(0,1fr); }.panel-card { padding: 15px; }.preset-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }.preset-button { min-height: 65px; flex-direction: column; align-items: flex-start; gap: 4px; }.preset-button b { font-size: 9px; }.preset-button small { font-size: 7px; }.footer-bar { padding: 0 12px; }.validation-block { min-width: 0; }.validation-block small { max-width: 150px; }.quality-control { min-width: 130px; }.scene-heading { left: 18px; top: 19px; }.scene-heading h1 { font-size: 34px; }.scene-controls-hint { display: none; }.scene-bottom-left { left: 12px; bottom: 12px; }.scene-bottom-right { right: 12px; bottom: 12px; }.cause-chain { gap: 5px; padding: 7px 8px; }.cause-chain span { font-size: 6px; }.cause-chain b { font-size: 7px; }.cause-chain i { font-size: 10px; }.scale-note { font-size: 7px; }.scene-tool { padding: 7px 8px; }.scene-tool b { display: none; }.scene-top-right { right: 15px; top: 20px; }.fallback-chip { top: 50px; }.fallback-note { display: none; } }
@media (max-width: 480px) { .app-shell { grid-template-rows: 52px auto 54px; }.brand-mark { width: 28px; height: 28px; }.brand-copy strong { font-size: 10px; }.brand-copy small { font-size: 7px; }.seed-label { font-size: 8px; }.icon-button { width: 25px; height: 25px; }.workspace { padding: 7px; gap: 8px; }.visual-column { grid-template-rows: minmax(365px, 49vh) auto; }.readout-strip { grid-template-columns: repeat(3, minmax(0,1fr)); }.readout { min-height: 66px; border-bottom: 1px solid var(--line); }.readout:nth-child(3) { border-right: 0; }.readout:nth-child(4), .readout:nth-child(5) { border-bottom: 0; }.readout:nth-child(4) { grid-column: 1 / 2; }.readout:nth-child(5) { grid-column: 2 / 4; border-right: 0; }.readout strong { font-size: 16px; }.readout small { font-size: 8px; }.scene-heading h1 { font-size: 31px; }.scene-heading p { font-size: 10px; }.eyebrow { font-size: 8px; }.scene-bottom-left { bottom: 10px; }.cause-chain { max-width: calc(100vw - 150px); flex-wrap: wrap; gap: 4px 6px; }.cause-chain span { display: none; }.scale-note { margin-top: 5px; }.scene-bottom-right { gap: 4px; }.scene-tool { padding: 7px; }.scene-tool span { font-size: 12px; }.panel-heading h2 { font-size: 16px; }.preset-button { min-height: 70px; padding: 7px 5px; }.preset-icon { font-size: 15px; }.preset-button b { font-size: 8px; line-height: 1.25; }.preset-button small { font-size: 7px; }.footer-bar { gap: 7px; }.validation-mark { width: 21px; height: 21px; }.validation-block { gap: 5px; }.validation-block b { font-size: 7px; }.validation-block small { font-size: 7px; max-width: 130px; }.validation-block strong { font-size: 10px; margin-left: 0; }.validation-diff-label { display: none; }.quality-control { min-width: 105px; gap: 1px; }.quality-control > span { display: none; }.quality-button { padding: 5px 6px; font-size: 7px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; } }
