:root {
  color-scheme: dark;
  --bg: #07131e;
  --panel: #0b1b28;
  --panel-2: #102433;
  --panel-3: #132b3b;
  --line: rgba(153, 201, 219, .13);
  --line-strong: rgba(153, 201, 219, .24);
  --text: #e7f3f7;
  --muted: #91a9b5;
  --muted-2: #6f8997;
  --cyan: #78d8e8;
  --cyan-2: #42adc5;
  --ice: #bfeaf1;
  --mint: #8ce3ca;
  --amber: #f0bd78;
  --danger: #f38f86;
  --radius: 14px;
  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; min-height: 100%; background: var(--bg); color: var(--text); }
body { min-width: 320px; overflow: hidden; }
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.app-shell { min-height: 100vh; height: 100vh; display: flex; flex-direction: column; background: radial-gradient(ellipse at 25% -10%, rgba(39, 105, 133, .17), transparent 42%), var(--bg); }
.topbar { height: 78px; min-height: 78px; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: rgba(7, 19, 30, .92); position: relative; z-index: 3; }
.brand-lockup { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand-mark { width: 34px; height: 34px; border: 1px solid rgba(120,216,232,.35); border-radius: 10px; display: flex; align-items: center; justify-content: center; gap: 3px; background: linear-gradient(145deg, rgba(120,216,232,.14), rgba(120,216,232,.02)); flex: 0 0 auto; }
.brand-mark span { width: 3px; border-radius: 4px; background: var(--cyan); transform: skewY(-22deg); }
.brand-mark span:nth-child(1) { height: 10px; opacity: .55; }
.brand-mark span:nth-child(2) { height: 18px; }
.brand-mark span:nth-child(3) { height: 13px; opacity: .75; }
.eyebrow, .panel-kicker, .section-label, .hud-kicker, .telemetry-label, .footer-bar, .clock-row > span:first-child { font-size: 9px; letter-spacing: .15em; font-weight: 750; color: var(--muted-2); }
.eyebrow { margin-bottom: 4px; }
.eyebrow-dot { display: inline-block; width: 3px; height: 3px; margin: 0 6px 2px; border-radius: 50%; background: var(--cyan); }
h1 { margin: 0; font-size: 17px; line-height: 1.2; font-weight: 620; letter-spacing: -.025em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
h1 span { color: var(--muted-2); font-weight: 400; }
.topbar-meta { display: flex; align-items: center; gap: 16px; flex: 0 0 auto; }
.live-indicator { display: inline-flex; align-items: center; gap: 7px; color: #9dddcf; font-size: 9px; font-weight: 750; letter-spacing: .12em; }
.live-indicator i, .state-pill i { width: 6px; height: 6px; display: inline-block; border-radius: 50%; background: #75dbbd; box-shadow: 0 0 12px rgba(117,219,189,.7); }
.model-chip { border: 1px solid var(--line-strong); color: #a6c2ce; border-radius: 999px; padding: 6px 9px; font-size: 9px; letter-spacing: .1em; font-weight: 700; }
.workspace { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 390px; }
.stage-column { min-width: 0; min-height: 0; display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.stage-wrap { position: relative; flex: 1; min-height: 360px; overflow: hidden; background: radial-gradient(ellipse at 48% 52%, #123b50 0%, #092536 40%, #061522 100%); }
.webgl-host { position: absolute; inset: 0; z-index: 0; }
.webgl-host canvas { display: block; width: 100%; height: 100%; outline: none; }
.stage-vignette { position: absolute; inset: 0; pointer-events: none; z-index: 1; background: linear-gradient(180deg, rgba(4,13,22,.4), transparent 22%, transparent 74%, rgba(4,13,22,.65)), radial-gradient(ellipse at center, transparent 50%, rgba(3,12,19,.26) 100%); }
.stage-hud { position: absolute; z-index: 2; pointer-events: none; }
.hud-top-left { left: 24px; top: 22px; }
.hud-kicker { color: #82b9c9; font-size: 8px; }
.hud-title { margin-top: 6px; font-size: 15px; font-weight: 620; letter-spacing: -.02em; }
.hud-subtitle { margin-top: 4px; color: rgba(192,220,228,.62); font-size: 10px; }
.hud-top-right { top: 22px; right: 24px; display: flex; align-items: flex-start; gap: 16px; }
.compass { display: flex; flex-direction: column; align-items: center; gap: 3px; color: rgba(192,220,228,.7); font-size: 8px; font-weight: 700; }
.compass i { display: block; width: 16px; height: 16px; border: 1px solid rgba(192,220,228,.45); border-radius: 50%; position: relative; }
.compass i::before { content: ""; position: absolute; top: 2px; left: 6px; width: 3px; height: 7px; background: var(--cyan); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.depth-readout { padding-left: 12px; border-left: 1px solid var(--line-strong); display: flex; flex-direction: column; gap: 3px; }
.depth-readout span { font-size: 8px; letter-spacing: .12em; color: var(--muted); }
.depth-readout strong { font-size: 20px; font-weight: 550; letter-spacing: -.04em; }
.depth-readout small { font-size: 10px; color: var(--muted); }
.scene-legend { position: absolute; z-index: 2; left: 24px; bottom: 72px; display: flex; flex-wrap: wrap; gap: 13px; color: rgba(206,229,236,.76); font-size: 9px; pointer-events: none; }
.scene-legend span { display: flex; align-items: center; gap: 6px; }
.scene-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 3px; }
.legend-ice { background: #bcebf0; box-shadow: 0 0 9px rgba(188,235,240,.55); }
.legend-brine { background: #3b9dc3; }
.legend-plume { background: #78d8e8; opacity: .6; }
.stage-bottom-hud { position: absolute; z-index: 2; bottom: 0; left: 0; right: 0; padding: 14px 20px 15px 24px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-top: 1px solid rgba(149,207,222,.12); background: linear-gradient(0deg, rgba(4,14,22,.88), rgba(4,14,22,.55)); }
.process-track { display: flex; align-items: center; min-width: 0; gap: 10px; }
.process-step { display: flex; align-items: center; gap: 6px; white-space: nowrap; color: rgba(190,218,227,.75); font-size: 9px; }
.process-step b { color: var(--cyan); font-size: 8px; letter-spacing: .05em; }
.process-line { width: clamp(10px, 3vw, 42px); height: 1px; background: linear-gradient(90deg, rgba(120,216,232,.55), rgba(120,216,232,.12)); }
.stage-actions { display: flex; gap: 7px; flex: 0 0 auto; }
.icon-button { width: 30px; height: 30px; border: 1px solid rgba(169,210,222,.2); border-radius: 8px; background: rgba(16,39,53,.72); display: grid; place-items: center; cursor: pointer; transition: background .2s, border-color .2s, transform .2s; }
.icon-button:hover { background: rgba(48,103,125,.45); border-color: rgba(120,216,232,.55); transform: translateY(-1px); }
.icon-button svg { width: 15px; height: 15px; fill: none; stroke: #c3e3ea; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.telemetry-strip { min-height: 91px; display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); border-top: 1px solid var(--line); background: #091925; }
.telemetry-cell { padding: 15px 16px 12px 20px; min-width: 0; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 5px; }
.telemetry-cell:last-child { border-right: 0; }
.telemetry-label { font-size: 8px; letter-spacing: .11em; white-space: nowrap; }
.telemetry-label em { font-style: normal; color: #648c9a; font-size: 7px; margin-left: 3px; }
.telemetry-cell strong { font-size: 21px; line-height: 1; font-weight: 560; letter-spacing: -.045em; color: #e2f4f7; white-space: nowrap; }
.telemetry-cell strong small { font-size: 10px; font-weight: 500; letter-spacing: 0; color: #9db8c2; }
.telemetry-foot { font-size: 9px; color: #718e9b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.control-panel { min-height: 0; overflow-y: auto; overscroll-behavior: contain; background: linear-gradient(180deg, #0c1d2a, #091925 80%); padding: 20px 20px 14px; scrollbar-width: thin; scrollbar-color: #294859 transparent; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.panel-kicker { font-size: 8px; margin-bottom: 5px; }
.panel-heading h2 { margin: 0; font-size: 18px; letter-spacing: -.03em; font-weight: 620; }
.state-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border: 1px solid rgba(117,219,189,.22); background: rgba(117,219,189,.06); border-radius: 999px; color: #9dddcf; font-size: 8px; letter-spacing: .1em; font-weight: 750; }
.state-pill.paused { color: #f0bd78; border-color: rgba(240,189,120,.24); background: rgba(240,189,120,.06); }
.state-pill.paused i { background: #f0bd78; box-shadow: none; }
.preset-block { padding: 15px 0 14px; border-bottom: 1px solid var(--line); }
.section-label { font-size: 8px; letter-spacing: .13em; }
.preset-grid { display: grid; grid-template-columns: 1fr; gap: 6px; margin-top: 9px; }
.preset-button { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: rgba(16,36,51,.62); cursor: pointer; transition: border-color .2s, background .2s, transform .2s; }
.preset-button:hover { border-color: rgba(120,216,232,.38); transform: translateY(-1px); }
.preset-button.active { border-color: rgba(120,216,232,.55); background: linear-gradient(90deg, rgba(58,132,153,.2), rgba(16,36,51,.75)); box-shadow: inset 2px 0 0 var(--cyan-2); }
.preset-icon { width: 25px; height: 25px; flex: 0 0 auto; border-radius: 7px; display: grid; place-items: center; color: var(--cyan); background: rgba(120,216,232,.1); font-size: 15px; }
.preset-icon.pulse { color: #a3d9f2; }
.preset-icon.strat { color: #a6c6d0; }
.preset-button b { display: block; font-size: 10px; font-weight: 650; }
.preset-button small { display: block; color: var(--muted-2); font-size: 9px; margin-top: 2px; }
.control-section { padding: 14px 0 13px; border-bottom: 1px solid var(--line); }
.range-control { margin-top: 11px; }
.range-control:first-of-type { margin-top: 9px; }
.range-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.range-head label { color: #c3d7de; font-size: 10px; font-weight: 520; }
.range-head output { color: #9bd9e4; font-size: 10px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
input[type="range"] { width: 100%; display: block; height: 14px; margin: 5px 0 0; background: transparent; appearance: none; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 3px; border-radius: 10px; background: linear-gradient(90deg, #3b95a9, #244b5c); }
input[type="range"]::-moz-range-track { height: 3px; border-radius: 10px; background: linear-gradient(90deg, #3b95a9, #244b5c); }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 11px; height: 11px; margin-top: -4px; border-radius: 50%; border: 2px solid #c8f3f4; background: #4aaec0; box-shadow: 0 0 0 3px rgba(74,174,192,.14); }
input[type="range"]::-moz-range-thumb { width: 8px; height: 8px; border-radius: 50%; border: 2px solid #c8f3f4; background: #4aaec0; box-shadow: 0 0 0 3px rgba(74,174,192,.14); }
.range-scale { display: flex; justify-content: space-between; color: #597987; font-size: 8px; margin-top: 1px; }
.compact-section { padding-bottom: 14px; }
.simulation-controls { padding: 14px 0 12px; border-bottom: 1px solid var(--line); }
.transport-row { display: grid; grid-template-columns: 1.35fr 1fr .8fr; gap: 6px; }
.transport-button { min-height: 34px; padding: 0 9px; border-radius: 8px; border: 1px solid var(--line-strong); background: #122b3b; color: #c5dce3; font-size: 10px; font-weight: 620; cursor: pointer; transition: background .2s, border-color .2s; }
.transport-button:hover { border-color: rgba(120,216,232,.5); background: #17384a; }
.transport-button.primary { border-color: rgba(120,216,232,.45); background: linear-gradient(135deg, #276d82, #174457); color: #e7fbff; }
.transport-button.primary:hover { background: linear-gradient(135deg, #34859b, #20586b); }
.transport-button span { color: #88bdca; font-size: 8px; margin-left: 3px; }
.transport-button .pause-symbol { font-size: 12px; margin: 0 5px 0 0; color: #d8f6f8; }
.speed-control { margin-top: 14px; }
.quality-row { margin-top: 13px; display: flex; align-items: center; justify-content: space-between; }
.segmented { padding: 2px; display: flex; border: 1px solid var(--line); background: #071722; border-radius: 7px; gap: 2px; }
.segmented button { border: 0; padding: 5px 10px; border-radius: 5px; color: #7895a1; background: transparent; font-size: 9px; cursor: pointer; }
.segmented button.selected { color: #c9f2f5; background: #1b4556; box-shadow: inset 0 0 0 1px rgba(120,216,232,.17); }
.clock-row { display: flex; align-items: baseline; gap: 8px; margin-top: 13px; }
.clock-row strong { font-size: 12px; font-weight: 620; letter-spacing: .04em; font-variant-numeric: tabular-nums; color: #c8e7ed; }
.clock-note { margin-left: auto; font-size: 8px; color: #617f8d; }
.science-panel { margin-top: 13px; border: 1px solid var(--line); border-radius: 10px; background: rgba(16,36,51,.5); overflow: hidden; }
.science-panel summary { display: flex; align-items: center; gap: 9px; padding: 11px 12px; cursor: pointer; list-style: none; }
.science-panel summary::-webkit-details-marker { display: none; }
.science-icon { width: 25px; height: 25px; border-radius: 7px; display: grid; place-items: center; color: var(--cyan); background: rgba(120,216,232,.1); font-size: 14px; }
.science-panel summary b { display: block; font-size: 10px; font-weight: 650; }
.science-panel summary small { display: block; color: #718e9b; font-size: 8px; margin-top: 2px; }
.chevron { margin-left: auto; color: #8aa8b3; font-size: 16px; transition: transform .2s; }
.science-panel[open] .chevron { transform: rotate(180deg); }
.science-content { padding: 0 12px 13px; border-top: 1px solid var(--line); }
.science-content h3 { margin: 13px 0 6px; font-size: 10px; color: #c8e5eb; font-weight: 650; }
.science-content p, .science-content li { color: #8ba6b2; font-size: 9px; line-height: 1.55; }
.science-content p { margin: 5px 0; }
.science-content ul { padding-left: 16px; margin: 7px 0 0; }
.science-content li { margin: 4px 0; }
.equation { padding: 8px 9px; margin: 7px 0 5px; border: 1px solid rgba(120,216,232,.14); border-radius: 7px; background: rgba(5,17,26,.5); color: #a7e0e9; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px; overflow-wrap: anywhere; }
.science-content .equation-note { color: #688a98; font-size: 8px; }
.validation-card { margin-top: 12px; padding: 10px; border-radius: 8px; border: 1px solid rgba(140,227,202,.18); background: rgba(69,146,127,.06); }
.validation-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 7px; color: #7faeaa; font-size: 7px; font-weight: 750; letter-spacing: .1em; }
.validation-status { color: #8ce3ca; border: 1px solid rgba(140,227,202,.2); border-radius: 4px; padding: 2px 4px; }
.validation-card > b { font-size: 9px; color: #c8e8df; }
.validation-values { display: grid; grid-template-columns: repeat(3,1fr); gap: 5px; margin-top: 9px; }
.validation-values span { color: #70938c; font-size: 7px; letter-spacing: .08em; }
.validation-values strong { display: block; margin-top: 3px; color: #b6e4d8; font-size: 9px; letter-spacing: 0; }
.disclaimer { padding: 11px 1px 0; color: #577482; font-size: 8px; line-height: 1.5; }
.footer-bar { min-height: 25px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); background: #07131e; font-size: 7px; letter-spacing: .13em; }
.footer-bar b { color: #84c7d2; font-weight: 750; }
.webgl-fallback { position: absolute; z-index: 4; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; text-align: center; background: radial-gradient(ellipse at center, #123b50, #061522 78%); }
.webgl-fallback[hidden] { display: none; }
.fallback-icon { color: var(--cyan); font-size: 42px; margin-bottom: 8px; }
.webgl-fallback strong { font-size: 15px; }
.webgl-fallback p { max-width: 320px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.app-shell.embed .topbar, .app-shell.embed .footer-bar { display: none; }
.app-shell.embed .workspace { grid-template-columns: minmax(0, 1fr) 360px; }
@media (max-width: 1100px) {
  .workspace { grid-template-columns: minmax(0, 1fr) 350px; }
  .control-panel { padding-left: 16px; padding-right: 16px; }
  .telemetry-cell { padding-left: 12px; padding-right: 8px; }
  .telemetry-cell strong { font-size: 18px; }
  .telemetry-label { font-size: 7px; }
}
@media (max-width: 820px) {
  body { overflow: auto; }
  .app-shell { height: auto; min-height: 100vh; }
  .topbar { min-height: 70px; height: auto; padding: 12px 15px; }
  h1 { font-size: 14px; max-width: 56vw; }
  .topbar-meta { gap: 8px; }
  .model-chip { display: none; }
  .workspace { display: flex; flex-direction: column; min-height: 0; }
  .stage-column { border-right: 0; }
  .stage-wrap { flex: none; height: min(57vh, 520px); min-height: 340px; }
  .telemetry-strip { min-height: 0; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .telemetry-cell { min-height: 76px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .telemetry-cell:nth-child(2) { border-right: 0; }
  .telemetry-cell strong { font-size: 20px; }
  .control-panel { overflow: visible; padding: 18px 16px 24px; }
  .preset-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .preset-button { align-items: flex-start; flex-direction: column; gap: 6px; padding: 8px; min-height: 83px; }
  .preset-button small { line-height: 1.3; }
  .footer-bar { min-height: 30px; padding: 0 12px; font-size: 6px; }
  .app-shell.embed .workspace { display: flex; }
}
@media (max-width: 480px) {
  .topbar { padding: 11px 12px; }
  .brand-mark { width: 30px; height: 30px; }
  .brand-lockup { gap: 9px; }
  .eyebrow { font-size: 7px; }
  h1 { font-size: 12px; max-width: 57vw; }
  .live-indicator { font-size: 7px; gap: 5px; }
  .stage-wrap { height: 52vh; min-height: 310px; }
  .hud-top-left { left: 13px; top: 14px; }
  .hud-top-right { right: 13px; top: 14px; }
  .hud-title { font-size: 12px; }
  .hud-subtitle { font-size: 8px; }
  .depth-readout strong { font-size: 17px; }
  .scene-legend { left: 13px; bottom: 67px; gap: 9px; font-size: 8px; }
  .stage-bottom-hud { padding: 11px 12px; }
  .process-track { gap: 6px; }
  .process-step { gap: 4px; font-size: 7px; }
  .process-step b { font-size: 7px; }
  .process-line { width: 9px; }
  .icon-button { width: 28px; height: 28px; }
  .telemetry-cell { padding: 10px 11px; min-height: 72px; }
  .telemetry-label { font-size: 6.5px; letter-spacing: .08em; }
  .telemetry-label em { font-size: 6px; }
  .telemetry-cell strong { font-size: 18px; }
  .telemetry-cell strong small { font-size: 8px; }
  .telemetry-foot { font-size: 8px; }
  .control-panel { padding: 16px 13px 22px; }
  .preset-button b { font-size: 9px; }
  .preset-button small { font-size: 7px; }
  .preset-icon { width: 23px; height: 23px; }
  .footer-bar span:last-child { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
.scene-annotation { position: absolute; z-index: 2; top: 0; left: 0; pointer-events: none; padding: 5px 7px 5px 9px; border-left: 1px solid rgba(145,222,235,.65); background: rgba(5,19,29,.58); color: rgba(205,237,243,.88); font-size: 7px; letter-spacing: .12em; font-weight: 760; white-space: nowrap; text-shadow: 0 1px 5px rgba(0,0,0,.5); backdrop-filter: blur(4px); }
.scene-annotation::before { content: ""; position: absolute; top: 50%; left: -18px; width: 17px; height: 1px; background: rgba(145,222,235,.5); }
.annotation-ice { border-left-color: #d8f7fa; }
.annotation-tube { border-left-color: #a9e8f1; }
.annotation-plume { border-left-color: #52b5d0; color: #a9dce8; }
