:root {
  color-scheme: dark;
  --bg: #07131f;
  --panel: #0b1b29;
  --panel-2: #0e2231;
  --line: rgba(148, 187, 204, .14);
  --line-strong: rgba(148, 187, 204, .24);
  --text: #e6f1f4;
  --muted: #8ba3b0;
  --dim: #5f7887;
  --teal: #64e2d3;
  --cyan: #55b8d6;
  --blue: #2b6f94;
  --gold: #e3bd78;
  --danger: #ef927d;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body { min-height: 100vh; overflow-x: hidden; }
button, input { font: inherit; }
button { color: inherit; }
.app-shell { min-height: 100vh; display: flex; flex-direction: column; background: radial-gradient(ellipse at 24% 12%, rgba(27, 83, 103, .15), transparent 42%), var(--bg); }
.topbar { height: 72px; flex: 0 0 72px; padding: 0 22px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: rgba(5, 16, 26, .92); z-index: 5; }
.brand-lockup { display: flex; align-items: center; gap: 13px; min-width: 0; }
.brand-mark { width: 31px; height: 31px; border: 1px solid rgba(100, 226, 211, .42); border-radius: 9px; display: flex; align-items: center; justify-content: center; gap: 2px; transform: rotate(-8deg); }
.brand-mark span { display: block; width: 3px; border-radius: 3px; background: var(--teal); }
.brand-mark span:nth-child(1) { height: 9px; opacity: .55; }
.brand-mark span:nth-child(2) { height: 16px; }
.brand-mark span:nth-child(3) { height: 12px; opacity: .75; }
.eyebrow, .scene-kicker, .section-kicker { color: #6f9aaa; font-size: 9px; letter-spacing: .17em; font-weight: 800; }
.eyebrow-sep { color: #345565; padding: 0 5px; }
h1 { margin: 3px 0 0; font-size: 18px; line-height: 1.2; letter-spacing: -.035em; font-weight: 650; }
.topbar-meta { display: flex; align-items: center; gap: 12px; }
.live-indicator, .model-tag { border: 1px solid var(--line); border-radius: 20px; padding: 7px 10px; font-size: 9px; letter-spacing: .12em; color: #a9c3cb; font-weight: 750; white-space: nowrap; }
.live-indicator { display: flex; align-items: center; gap: 7px; color: #8ce4d4; }
.live-indicator i, .context-dot { width: 6px; height: 6px; display: inline-block; border-radius: 50%; background: #60dfc7; box-shadow: 0 0 10px rgba(96, 223, 199, .7); }
.model-tag { color: #9ab1bc; }
.icon-button { border: 1px solid var(--line-strong); border-radius: 50%; width: 28px; height: 28px; background: transparent; color: #b7cbd2; cursor: pointer; font-size: 13px; }
.icon-button:hover { border-color: var(--teal); color: var(--teal); }
.workspace { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 378px; gap: 12px; padding: 12px; }
.scene-panel { min-width: 0; min-height: 620px; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: linear-gradient(145deg, rgba(16, 43, 58, .7), rgba(5, 16, 26, .96)); box-shadow: 0 18px 60px rgba(0,0,0,.18); }
.scene-heading { min-height: 60px; padding: 13px 17px 10px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.scene-kicker { font-size: 8px; }
.scene-kicker span { color: var(--teal); padding: 0 4px; }
.scene-subtitle { margin-top: 5px; font-size: 12px; color: #c3d5da; letter-spacing: -.01em; }
.scene-scale { align-self: flex-start; margin-top: 8px; font-size: 8px; letter-spacing: .12em; color: #7894a1; white-space: nowrap; }
.scene-scale b { color: #b8d4dc; margin-left: 5px; font-size: 10px; }
.viewport-wrap { flex: 1; min-height: 460px; position: relative; overflow: hidden; background: radial-gradient(ellipse at 50% 48%, #0d3342 0%, #092333 42%, #061521 100%); }
.viewport { position: absolute; inset: 0; }
.viewport canvas { width: 100%; height: 100%; display: block; outline: none; }
.scene-vignette { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(5,16,26,.2), transparent 24%, transparent 78%, rgba(4,13,21,.36)), linear-gradient(90deg, rgba(4,13,21,.22), transparent 15%, transparent 84%, rgba(4,13,21,.22)); }
.scene-coordinate { position: absolute; top: 15px; left: 16px; font-size: 8px; letter-spacing: .14em; color: rgba(177, 207, 214, .52); pointer-events: none; }
.scene-label { position: absolute; z-index: 2; display: flex; flex-direction: column; gap: 2px; padding-left: 10px; border-left: 1px solid rgba(108, 224, 210, .7); pointer-events: none; text-shadow: 0 2px 10px rgba(0,0,0,.8); transition: opacity .2s ease; }
.scene-label i { position: absolute; left: -3px; top: 1px; width: 5px; height: 5px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 10px var(--teal); }
.scene-label span { font-size: 8px; font-weight: 800; letter-spacing: .12em; color: #c8e5e7; }
.scene-label small { font-size: 9px; color: #87aab6; }
.label-upper { top: 21%; left: 13%; }
.label-interface { top: 53%; left: 60%; }
.label-lower { bottom: 20%; left: 12%; border-color: rgba(91, 155, 201, .65); }
.label-lower i { background: #67a9d2; box-shadow: 0 0 10px #67a9d2; }
.label-wave { top: 39%; left: 39%; border-color: rgba(100, 226, 211, .9); }
.context-chip { position: absolute; right: 15px; top: 14px; padding: 7px 10px; border: 1px solid rgba(121, 193, 194, .19); border-radius: 20px; background: rgba(5, 20, 30, .55); display: flex; gap: 7px; align-items: center; color: #9ac7c8; font-size: 8px; letter-spacing: .1em; pointer-events: none; }
.context-dot { width: 5px; height: 5px; }
.scene-controls-hint { position: absolute; bottom: 14px; right: 16px; color: rgba(157, 190, 200, .58); font-size: 8px; letter-spacing: .12em; pointer-events: none; }
.scene-controls-hint span { padding: 0 5px; color: #426c7d; }
.mouse-glyph { font-size: 13px; }
.scene-footer { min-height: 38px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); background: rgba(6, 18, 28, .75); }
.legend { display: flex; flex-wrap: wrap; gap: 12px; }
.legend span { display: flex; align-items: center; gap: 5px; color: #7793a0; font-size: 7px; letter-spacing: .1em; font-weight: 700; }
.legend i { display: inline-block; width: 6px; height: 6px; border-radius: 2px; }
.legend-light { background: #4d9fb5; }.legend-interface { background: var(--teal); }.legend-dark { background: #1e587a; }.legend-particle { background: #e2c28b; }
.seed-note { font-size: 8px; color: #637e8b; letter-spacing: .1em; white-space: nowrap; }.seed-note b { color: #a7c1c9; }.seed-note span { padding: 0 4px; }
.control-panel { min-width: 0; display: flex; flex-direction: column; gap: 9px; padding: 13px; border: 1px solid var(--line); border-radius: 15px; background: linear-gradient(180deg, rgba(13, 32, 46, .98), rgba(7, 22, 33, .98)); overflow-y: auto; scrollbar-width: thin; scrollbar-color: #284655 transparent; }
.panel-section { border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.section-kicker { font-size: 8px; }
.section-head h2 { margin: 3px 0 0; font-size: 16px; font-weight: 650; letter-spacing: -.035em; }
.state-pill { border: 1px solid rgba(87, 218, 190, .25); border-radius: 20px; color: #73d8c3; padding: 5px 8px; font-size: 8px; font-weight: 800; letter-spacing: .1em; }
.transport-row { display: grid; grid-template-columns: 1.45fr repeat(3, .72fr); gap: 6px; margin-top: 11px; }
.transport-primary, .transport-button { min-height: 40px; border-radius: 8px; cursor: pointer; transition: background .18s ease, border-color .18s ease, transform .18s ease; }
.transport-primary { border: 1px solid rgba(87, 220, 196, .45); background: linear-gradient(135deg, rgba(43, 139, 133, .34), rgba(22, 78, 88, .42)); color: #c3fff0; display: flex; align-items: center; justify-content: center; gap: 9px; font-size: 11px; }
.transport-primary span { font-size: 13px; }.transport-primary b { font-size: 10px; }
.transport-button { border: 1px solid var(--line-strong); background: rgba(20, 45, 60, .55); color: #b4cbd2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; font-size: 16px; line-height: 16px; }
.transport-button small { font-size: 7px; letter-spacing: .08em; color: #7794a0; }
button:hover { filter: brightness(1.15); }button:active { transform: translateY(1px); }button:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.time-row { display: flex; align-items: center; gap: 6px; margin: 10px 0 6px; color: #6f8997; font-size: 7px; letter-spacing: .12em; }
.time-row b { color: #c3d8dd; font-size: 10px; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.time-scale-label { margin-left: auto; }
.range-line { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 8px; row-gap: 5px; min-width: 0; }
.range-line label { color: #a9c0c8; font-size: 9px; font-weight: 600; }
.range-line label em { color: #6d96a5; font-style: normal; margin-left: 3px; font-size: 9px; }
.range-line output { color: #c8e8e5; font-size: 9px; font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }
.range-line input[type=range] { grid-column: 1 / -1; width: 100%; margin: 0; accent-color: var(--teal); height: 14px; cursor: pointer; background: transparent; }
.range-line input[type=range]::-webkit-slider-runnable-track { height: 3px; border-radius: 10px; background: linear-gradient(90deg, #2b777b, #386e89); }
.range-line input[type=range]::-webkit-slider-thumb { margin-top: -5px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #d5fff5; background: #5bd8c9; box-shadow: 0 0 0 3px rgba(91,216,201,.13); -webkit-appearance: none; }
.range-line input[type=range]::-moz-range-track { height: 3px; border-radius: 10px; background: #2c6877; }
.range-line input[type=range]::-moz-range-thumb { width: 10px; height: 10px; border-radius: 50%; border: 2px solid #d5fff5; background: #5bd8c9; }
.speed-line { grid-template-columns: 1fr auto; }
.speed-line label { font-size: 8px; color: #7793a0; }.speed-line output { font-size: 8px; }
.section-title-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 8px; }
.section-title-row h3 { margin: 0; color: #8ba9b4; font-size: 8px; letter-spacing: .15em; font-weight: 850; }
.section-title-row > span { color: #5f7d8b; font-size: 7px; letter-spacing: .1em; }
.preset-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.preset-button { min-width: 0; min-height: 60px; padding: 7px 6px; border: 1px solid var(--line); border-radius: 8px; background: rgba(17, 43, 57, .5); text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 3px; }
.preset-button.active { border-color: rgba(94, 216, 197, .5); background: linear-gradient(145deg, rgba(44, 117, 116, .24), rgba(18, 54, 68, .5)); box-shadow: inset 0 0 0 1px rgba(94, 216, 197, .08); }
.preset-icon { color: var(--teal); font-size: 13px; line-height: 13px; }
.preset-button b { color: #bfd4d9; font-size: 8px; font-weight: 700; line-height: 1.2; }
.preset-button small { color: #718d99; font-size: 7px; line-height: 1.2; }
.parameter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.parameter-grid .range-line { padding: 1px 0; }
.range-ends { grid-column: 1 / -1; display: flex; justify-content: space-between; margin-top: -5px; color: #587483; font-size: 7px; }
.readout-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.readout-card { padding: 8px 9px 7px; min-height: 59px; border: 1px solid rgba(132, 181, 197, .12); border-radius: 8px; background: linear-gradient(145deg, rgba(20, 49, 64, .7), rgba(9, 28, 41, .7)); }
.readout-card span { display: block; color: #7895a2; font-size: 7px; letter-spacing: .1em; font-weight: 750; }
.readout-card strong { display: block; margin-top: 4px; color: #d6f3ef; font-size: 16px; letter-spacing: -.04em; font-weight: 700; font-variant-numeric: tabular-nums; }
.readout-card strong small { font-size: 8px; color: #83b8b6; letter-spacing: 0; font-weight: 600; }
.readout-card i { display: block; margin-top: 1px; color: #617e8a; font-size: 7px; font-style: normal; }
.textbook-tag { color: #8fbbad !important; border: 1px solid rgba(102, 194, 160, .18); border-radius: 12px; padding: 4px 6px; }
.regime-note { display: flex; align-items: center; gap: 7px; margin-top: 8px; color: #8da9ad; font-size: 8px; }
.regime-dot { width: 6px; height: 6px; border-radius: 50%; background: #71d5b8; box-shadow: 0 0 8px rgba(113,213,184,.5); }
.regime-note b { color: #bad7d1; font-weight: 650; }
.verified-tag { color: #73d7b6 !important; }
.validation-title { margin: 0 0 7px; color: #a9c1c8; font-size: 9px; }
.validation-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.validation-grid > div { padding: 7px 7px 6px; border-radius: 6px; background: rgba(20, 47, 60, .55); border: 1px solid rgba(132,181,197,.09); }
.validation-grid small { display: block; color: #688794; font-size: 6px; letter-spacing: .08em; }
.validation-grid b { display: block; margin-top: 4px; color: #cce5df; font-size: 9px; font-variant-numeric: tabular-nums; }
.validation-grid > div:last-child b { color: #81d9b9; }
.validation-foot { margin-top: 6px; color: #607d8a; font-size: 7px; }
.science-section { padding-bottom: 0; border: 0; }
.science-section details { border: 1px solid var(--line); border-radius: 8px; background: rgba(11, 31, 44, .62); }
.science-section summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; padding: 9px 10px; }
.science-section summary::-webkit-details-marker { display: none; }
.science-section summary b { display: block; color: #b6cbd0; font-size: 8px; letter-spacing: .13em; }
.science-section summary small { display: block; margin-top: 3px; color: #6c8996; font-size: 8px; }
.science-section summary i { color: var(--teal); font-size: 15px; font-style: normal; transition: transform .2s ease; }
.science-section details[open] summary i { transform: rotate(45deg); }
.science-content { padding: 0 10px 11px; }
.science-lead { margin: 0 0 9px; color: #9fb7bf; font-size: 9px; line-height: 1.55; }
.equation-card { margin: 7px 0; padding: 8px; border-radius: 6px; background: rgba(4, 17, 27, .62); border: 1px solid rgba(100, 226, 211, .11); }
.equation-card span, .variable-list > b, .assumption-note > b { display: block; margin-bottom: 6px; color: #6fa6a8; font-size: 7px; letter-spacing: .12em; }
.equation-card code { display: block; color: #c7e6df; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 9px; line-height: 1.65; white-space: normal; }
.variable-list, .assumption-note { margin-top: 9px; }
.variable-list p, .assumption-note p { margin: 0; color: #8ba4ad; font-size: 8px; line-height: 1.55; }
.variable-list i { color: #c5e5dc; font-style: italic; }
.source-note { margin-top: 9px; padding-top: 7px; border-top: 1px solid var(--line); color: #66828f; font-size: 7px; line-height: 1.5; }
.panel-bottom { margin-top: auto; padding-top: 5px; }
.quality-row { display: flex; justify-content: space-between; align-items: center; color: #688592; font-size: 7px; letter-spacing: .13em; }
.quality-toggle { display: flex; gap: 2px; padding: 2px; border-radius: 6px; background: rgba(4, 17, 27, .7); }
.quality-toggle button { border: 0; border-radius: 4px; padding: 4px 8px; color: #688592; background: transparent; font-size: 7px; letter-spacing: .08em; cursor: pointer; }
.quality-toggle button.selected { color: #c6e6df; background: rgba(58, 122, 125, .45); }
.export-row { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.export-row button { border: 0; padding: 0; background: transparent; color: #9ac9c4; font-size: 9px; cursor: pointer; }
.export-row button span { text-decoration: underline; text-decoration-color: rgba(154,201,196,.35); text-underline-offset: 3px; }
.export-row > span { color: #526f7d; font-size: 7px; letter-spacing: .08em; }
.export-row > span i { font-style: normal; padding: 0 3px; color: #3c6774; }
.disclaimer { padding: 0 17px 10px; text-align: center; color: #58717e; font-size: 8px; letter-spacing: .03em; }
.webgl-fallback { position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; background: radial-gradient(ellipse, rgba(9,36,49,.96), rgba(4,14,24,.98)); }
.webgl-fallback[hidden], .context-lost[hidden] { display: none; }
.fallback-icon { font-size: 36px; color: var(--teal); margin-bottom: 10px; }
.webgl-fallback strong { font-size: 15px; }.webgl-fallback p { max-width: 360px; color: #8eaab4; font-size: 11px; line-height: 1.6; }
.context-lost { position: absolute; z-index: 6; left: 50%; top: 50%; transform: translate(-50%,-50%); padding: 12px 16px; border: 1px solid rgba(227,189,120,.4); border-radius: 8px; background: rgba(17,27,35,.95); color: #efd4a6; font-size: 11px; text-align: center; }
.shortcut-popover { position: fixed; z-index: 20; top: 60px; right: 18px; width: 250px; padding: 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: #102838; box-shadow: 0 20px 55px rgba(0,0,0,.45); }
.shortcut-popover[hidden] { display: none; }
.shortcut-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; color: #b9d3d9; font-size: 8px; letter-spacing: .12em; }
.shortcut-head button { border: 0; background: transparent; color: #9db9c2; font-size: 17px; cursor: pointer; }
.shortcut-popover > div:not(.shortcut-head) { display: flex; align-items: center; gap: 10px; margin: 7px 0; color: #91aab3; font-size: 9px; }
kbd { min-width: 37px; padding: 4px 5px; border: 1px solid rgba(154,188,199,.2); border-radius: 4px; background: rgba(5,18,28,.6); color: #d2e5e8; text-align: center; font: 8px ui-monospace, monospace; }
.embed .topbar, .embed .disclaimer { display: none; }.embed .workspace { padding: 0; gap: 0; }.embed .scene-panel { border-radius: 0; }.embed .control-panel { border-radius: 0; }
@media (min-width: 1500px) { .workspace { grid-template-columns: minmax(0,1fr) 410px; } .control-panel { padding: 16px; gap: 11px; } .viewport-wrap { min-height: 580px; } }
@media (max-width: 1080px) { .workspace { grid-template-columns: minmax(0,1fr) 350px; }.parameter-grid { gap: 9px 10px; }.scene-panel { min-height: 590px; } }
@media (max-width: 850px) { .workspace { grid-template-columns: 1fr; }.scene-panel { min-height: 540px; }.viewport-wrap { min-height: 420px; }.control-panel { overflow: visible; }.panel-bottom { margin-top: 0; } }
@media (max-width: 520px) {
  .topbar { height: 62px; flex-basis: 62px; padding: 0 13px; }.brand-mark { width: 27px; height: 27px; }.eyebrow { font-size: 7px; }h1 { font-size: 15px; }.topbar-meta { gap: 6px; }.model-tag { display: none; }.live-indicator { padding: 6px 8px; font-size: 7px; }.icon-button { width: 25px; height: 25px; }
  .workspace { padding: 8px; gap: 8px; }.scene-panel { min-height: 0; border-radius: 11px; }.scene-heading { min-height: 52px; padding: 10px 11px 8px; }.scene-subtitle { max-width: 245px; font-size: 10px; line-height: 1.35; }.scene-scale { font-size: 6px; }.scene-scale b { font-size: 8px; }.viewport-wrap { height: 390px; min-height: 390px; flex: none; }.scene-coordinate { top: 10px; left: 10px; font-size: 6px; }.context-chip { right: 8px; top: 8px; font-size: 6px; padding: 6px 7px; }.scene-label span { font-size: 6px; }.scene-label small { font-size: 7px; }.label-upper { top: 20%; left: 7%; }.label-interface { top: 53%; left: 57%; }.label-lower { bottom: 17%; left: 7%; }.label-wave { top: 38%; left: 35%; }.scene-controls-hint { bottom: 9px; right: 9px; font-size: 6px; }.scene-footer { min-height: 35px; padding: 0 9px; }.legend { gap: 7px; }.legend span { font-size: 6px; gap: 3px; }.legend span:nth-child(4) { display: none; }.seed-note { font-size: 6px; }
  .control-panel { padding: 11px; border-radius: 11px; gap: 9px; }.section-head h2 { font-size: 15px; }.transport-row { gap: 5px; }.transport-primary, .transport-button { min-height: 38px; }.parameter-grid { gap: 12px 12px; }.range-line label { font-size: 9px; }.preset-button { min-height: 58px; }.readout-card { min-height: 58px; }.disclaimer { padding-bottom: 9px; 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; } }
