:root {
  color-scheme: dark;
  --bg: #07111b;
  --panel: #0c1925;
  --panel-2: #101f2c;
  --line: rgba(166, 194, 211, .12);
  --line-strong: rgba(166, 194, 211, .2);
  --text: #e8f1f5;
  --muted: #8195a4;
  --subtle: #526879;
  --cyan: #63d6df;
  --cyan-dim: #2d9aa8;
  --amber: #f2b66c;
  --green: #7dd6ad;
  --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; min-width: 320px; 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 { outline: 2px solid var(--cyan); outline-offset: 3px; }
.app-shell { height: 100vh; min-height: 560px; display: flex; flex-direction: column; background: radial-gradient(ellipse at 18% 0%, rgba(30, 71, 86, .18), transparent 38%), var(--bg); }
.topbar { height: 66px; flex: 0 0 66px; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; border-bottom: 1px solid var(--line); background: rgba(7, 17, 27, .94); position: relative; z-index: 5; }
.brand-lockup { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 28px; height: 28px; display: flex; align-items: end; gap: 3px; padding: 5px; border: 1px solid rgba(99,214,223,.35); border-radius: 8px; background: rgba(99,214,223,.08); }
.brand-mark span { display: block; width: 4px; border-radius: 4px; background: var(--cyan); transform: skewY(-24deg); }
.brand-mark span:nth-child(1) { height: 8px; opacity: .55; }.brand-mark span:nth-child(2) { height: 13px; opacity: .8; }.brand-mark span:nth-child(3) { height: 17px; }
.eyebrow { color: #6e8a9d; font-size: 9px; font-weight: 750; letter-spacing: .17em; line-height: 1.5; }
.brand-title { color: #e1ebf0; font-size: 13px; font-weight: 650; letter-spacing: .01em; }
.topbar-meta { display: flex; align-items: center; gap: 20px; color: #7c92a2; font-size: 9px; font-weight: 700; letter-spacing: .13em; }
.live-indicator { display: inline-flex; align-items: center; gap: 7px; color: #9bc8bb; }.live-indicator i { width: 6px; height: 6px; border-radius: 50%; background: #68d6a8; box-shadow: 0 0 10px rgba(104,214,168,.65); }
.seed-label b { color: #b4c5ce; font-weight: 700; }.version-label { color: #516879; }
.workspace { min-height: 0; flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 0; padding: 14px 16px 12px; }
.stage-panel { min-width: 0; min-height: 0; display: flex; flex-direction: column; padding-right: 14px; }
.scene-root { flex: 1; min-height: 300px; position: relative; overflow: hidden; border: 1px solid rgba(125,165,185,.17); border-radius: 14px; background: radial-gradient(ellipse at 50% 46%, #153044 0%, #0b1b2a 54%, #07131f 100%); isolation: isolate; }
.scene-root canvas { display: block; width: 100%; height: 100%; position: absolute; inset: 0; z-index: 1; }
.scene-vignette { position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(180deg, rgba(4,13,21,.34), transparent 25%, transparent 68%, rgba(4,13,21,.48)); }
.stage-topline, .stage-bottomline, .scene-annotation, .stage-tools, .webgl-error { position: absolute; z-index: 3; }
.stage-topline { top: 16px; left: 18px; right: 18px; display: flex; align-items: center; justify-content: space-between; pointer-events: none; }
.phenomenon-chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid rgba(111,174,190,.2); border-radius: 20px; background: rgba(5,18,29,.62); color: #a5c2cd; font-size: 9px; font-weight: 750; letter-spacing: .13em; backdrop-filter: blur(8px); }
.chip-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 9px rgba(99,214,223,.6); }
.stage-coordinate { color: rgba(186,209,219,.55); font-size: 9px; font-weight: 700; letter-spacing: .12em; }.stage-coordinate span { padding: 0 5px; color: var(--cyan); }
.scene-annotation { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 6px; background: rgba(6,17,26,.68); border: 1px solid rgba(151,184,199,.12); color: #a8c1cd; font-size: 8px; font-weight: 800; letter-spacing: .12em; backdrop-filter: blur(7px); pointer-events: none; }
.scene-annotation b { color: var(--amber); font-size: 8px; letter-spacing: .1em; }.annotation-upstream { top: 26%; left: 5%; }.annotation-flow { top: 42%; right: 5%; }.annotation-flow b { color: var(--cyan); }
.annotation-line { width: 17px; height: 1px; background: var(--amber); opacity: .8; }.annotation-flow .annotation-line { background: var(--cyan); }
.stage-bottomline { left: 18px; right: 18px; bottom: 16px; display: flex; justify-content: space-between; align-items: end; pointer-events: none; }
.stage-caption { display: flex; flex-direction: column; gap: 5px; max-width: 340px; color: #a6bac5; font-size: 10px; line-height: 1.5; text-shadow: 0 1px 8px #07111b; }.caption-kicker { color: var(--cyan); font-size: 8px; font-weight: 800; letter-spacing: .16em; }
.stage-scale { display: flex; align-items: center; gap: 8px; color: #7891a1; font-size: 7px; font-weight: 750; letter-spacing: .12em; }.scale-track { width: 90px; height: 1px; background: linear-gradient(90deg, var(--amber), var(--cyan)); position: relative; }.scale-track i { position: absolute; width: 5px; height: 5px; top: -2px; left: 50%; border-radius: 50%; background: #e6f4f6; box-shadow: 0 0 6px #fff; }
.stage-tools { top: 66px; right: 16px; display: flex; flex-direction: column; gap: 7px; }.icon-button { width: 32px; height: 32px; border: 1px solid rgba(151,184,199,.19); border-radius: 8px; background: rgba(5,17,27,.7); color: #a8c0cb; cursor: pointer; backdrop-filter: blur(8px); transition: .18s ease; }.icon-button:hover { color: var(--cyan); border-color: rgba(99,214,223,.5); background: rgba(14,39,52,.88); }.camera-glyph { font-size: 17px; }
.scene-loading { position: absolute; z-index: 4; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 13px; color: #8ea8b7; font-size: 9px; font-weight: 750; letter-spacing: .16em; background: #0b1b29; transition: opacity .4s ease; }.scene-loading.loaded { opacity: 0; pointer-events: none; }.loading-mark { width: 30px; height: 30px; border: 2px solid rgba(99,214,223,.15); border-top-color: var(--cyan); border-radius: 50%; animation: spin 1s linear infinite; }@keyframes spin { to { transform: rotate(360deg); } }
.webgl-error { inset: auto 18px 72px; padding: 14px; border: 1px solid rgba(242,182,108,.35); border-radius: 9px; background: rgba(29,24,20,.9); display: flex; flex-direction: column; gap: 5px; color: #f2c58e; font-size: 11px; }.webgl-error span { color: #c3a98a; font-size: 10px; }
.stage-footer { height: 34px; flex: 0 0 34px; display: flex; align-items: center; gap: 17px; padding: 0 5px; color: #758b9b; font-size: 8px; font-weight: 750; letter-spacing: .11em; }.legend-item { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }.legend-item i { width: 7px; height: 7px; border-radius: 2px; display: inline-block; }.legend-water { background: #4cc7d5; }.legend-bed { background: #b98a59; }.legend-grain { background: #e5bd83; border-radius: 50% !important; }.legend-spacer { flex: 1; }.drag-hint { color: #526b7d; font-size: 8px; white-space: nowrap; }.drag-hint b { padding: 0 4px; color: #7892a2; }
.control-panel { min-height: 0; overflow: auto; padding: 5px 3px 16px 14px; scrollbar-width: thin; scrollbar-color: #29404f transparent; }.control-panel::-webkit-scrollbar { width: 5px; }.control-panel::-webkit-scrollbar-thumb { background: #29404f; border-radius: 8px; }
.panel-heading { padding: 1px 3px 14px; border-bottom: 1px solid var(--line); }.panel-heading h1 { margin: 3px 0 0; font-size: 28px; line-height: 1.15; letter-spacing: -.04em; font-weight: 650; }.panel-subtitle { margin: 5px 0 11px; color: #92a6b3; font-size: 11px; }.status-row { display: flex; align-items: center; justify-content: space-between; }.status-pill { padding: 5px 8px; border: 1px solid rgba(99,214,223,.22); border-radius: 4px; color: #8adce0; background: rgba(51,147,156,.1); font-size: 8px; font-weight: 800; letter-spacing: .13em; }.status-pill.subcritical { color: #f2bc7c; border-color: rgba(242,182,108,.25); background: rgba(174,111,47,.1); }.time-readout { color: #647e90; font-size: 9px; font-weight: 700; letter-spacing: .12em; }.time-readout b { color: #c3d3da; font-variant-numeric: tabular-nums; }
.panel-section { padding: 13px 3px 14px; border-bottom: 1px solid var(--line); }.section-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }.section-heading h2 { margin: 0; color: #a8bbc5; font-size: 9px; font-weight: 800; letter-spacing: .14em; }.section-note { color: #526c7e; font-size: 8px; font-weight: 750; letter-spacing: .11em; }
.preset-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; }.preset-button { display: flex; align-items: center; gap: 7px; min-width: 0; padding: 8px 7px; border: 1px solid var(--line); border-radius: 8px; background: #0d1b28; text-align: left; cursor: pointer; transition: .18s ease; }.preset-button:hover { border-color: rgba(99,214,223,.4); }.preset-button.active { border-color: rgba(99,214,223,.55); background: rgba(43,112,125,.18); box-shadow: inset 0 0 0 1px rgba(99,214,223,.08); }.preset-symbol { width: 20px; height: 24px; display: grid; place-items: center; color: var(--cyan); font-size: 19px; }.preset-button:nth-child(2) .preset-symbol { color: #e7bd7c; }.preset-button:nth-child(3) .preset-symbol { color: #a8b9c5; }.preset-button b { display: block; color: #cbd8de; font-size: 9px; font-weight: 700; }.preset-button small { display: block; margin-top: 3px; color: #6e8493; font-size: 8px; }
.controls-section { padding-bottom: 12px; }.control-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 13px; }.range-control { display: grid; grid-template-columns: 1fr auto; gap: 6px 4px; min-width: 0; }.control-name { color: #91a5b1; font-size: 9px; }.control-name em { color: #b6c7cf; font-style: italic; }.control-value { color: #d0e1e7; font-size: 9px; font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }.range-control input { grid-column: 1 / -1; width: 100%; height: 12px; margin: 0; appearance: none; background: transparent; cursor: pointer; }.range-control input::-webkit-slider-runnable-track { height: 3px; border-radius: 5px; background: linear-gradient(90deg, #3a9ba7, #28414f); }.range-control input::-moz-range-track { height: 3px; border-radius: 5px; background: #28414f; }.range-control input::-webkit-slider-thumb { appearance: none; width: 10px; height: 10px; margin-top: -3.5px; border: 2px solid #07111b; border-radius: 50%; background: #78dbe1; box-shadow: 0 0 0 1px rgba(120,219,225,.55); }.range-control input::-moz-range-thumb { width: 8px; height: 8px; border: 2px solid #07111b; border-radius: 50%; background: #78dbe1; box-shadow: 0 0 0 1px rgba(120,219,225,.55); }.range-ends { grid-column: 1 / -1; display: flex; justify-content: space-between; color: #536a79; font-size: 7px; font-style: normal; }.range-ends i { font-style: normal; }
.transport-section { padding: 13px 3px 14px; border-bottom: 1px solid var(--line); }.transport-buttons { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 7px; }.primary-control, .secondary-control { height: 32px; display: flex; align-items: center; justify-content: center; gap: 7px; border-radius: 7px; cursor: pointer; font-size: 8px; font-weight: 800; letter-spacing: .1em; transition: .18s ease; }.primary-control { border: 1px solid rgba(99,214,223,.4); color: #06171d; background: linear-gradient(135deg, #7ce0e2, #46b7c3); }.primary-control:hover { filter: brightness(1.08); }.primary-control span { font-size: 12px; }.secondary-control { border: 1px solid var(--line-strong); color: #a9bdc7; background: #112230; }.secondary-control:hover { border-color: rgba(99,214,223,.4); color: var(--cyan); }.secondary-control span { color: var(--cyan); font-size: 13px; }
.speed-control { margin-top: 13px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px; color: #708696; font-size: 8px; font-weight: 800; letter-spacing: .11em; }.speed-control b { color: #c9dbe1; font-size: 9px; }.speed-control input { grid-column: 1 / -1; width: 100%; height: 12px; margin: 0; accent-color: var(--cyan); cursor: pointer; }.quality-row { display: flex; align-items: center; justify-content: space-between; margin-top: 9px; color: #708696; font-size: 8px; font-weight: 800; letter-spacing: .1em; }.quality-switch { display: flex; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 6px; background: #091722; }.quality-button { border: 0; border-radius: 4px; padding: 4px 8px; background: transparent; color: #647c8b; font-size: 7px; font-weight: 800; letter-spacing: .1em; cursor: pointer; }.quality-button.active { background: #1a3443; color: #b9d9df; }
.readouts-section { padding-top: 13px; }.readout-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }.readout-card { min-height: 65px; padding: 9px 10px 8px; border: 1px solid var(--line); border-radius: 8px; background: linear-gradient(135deg, rgba(17,37,51,.8), rgba(10,25,37,.9)); }.readout-card > span { display: block; color: #6d8797; font-size: 7px; font-weight: 800; letter-spacing: .12em; }.readout-card > b { display: block; margin-top: 5px; color: #e0eef1; font-size: 18px; line-height: 1; font-weight: 620; font-variant-numeric: tabular-nums; letter-spacing: -.04em; }.readout-card > b i { color: #8eabb7; font-size: 9px; font-style: normal; font-weight: 600; letter-spacing: 0; }.readout-card > small { display: block; margin-top: 5px; color: #587182; font-size: 7px; font-weight: 700; letter-spacing: .09em; }.wide-readout { grid-column: 1 / -1; min-height: 58px; display: grid; grid-template-columns: 1fr auto; align-items: center; }.wide-readout > b { grid-column: 2; grid-row: 1 / span 2; margin: 0; }.wide-readout > small { margin-top: 3px; }
.validation-card { margin: 12px 3px 0; padding: 11px; border: 1px solid rgba(125,214,173,.18); border-radius: 9px; background: linear-gradient(120deg, rgba(37,91,76,.13), rgba(13,31,40,.72)); }.validation-head { display: flex; align-items: center; gap: 8px; }.validation-icon { width: 21px; height: 21px; display: grid; place-items: center; border-radius: 50%; color: #7dd6ad; background: rgba(125,214,173,.12); font-size: 12px; }.validation-head b { display: block; color: #bad5cc; font-size: 8px; letter-spacing: .12em; }.validation-head small { display: block; margin-top: 3px; color: #6b8e83; font-size: 7px; letter-spacing: .1em; }.validation-tag { margin-left: auto; padding: 4px 6px; border-radius: 4px; color: #85c5a8; background: rgba(125,214,173,.1); font-size: 7px; font-weight: 800; letter-spacing: .1em; }.validation-values { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; margin-top: 11px; }.validation-values small { display: block; color: #648477; font-size: 7px; font-weight: 750; letter-spacing: .1em; }.validation-values b { display: block; margin-top: 4px; color: #cde3d9; font-size: 11px; font-variant-numeric: tabular-nums; }.validation-card p { margin: 9px 0 0; color: #6f8d83; font-size: 8px; line-height: 1.45; }
.science-panel { margin: 12px 3px 0; border: 1px solid var(--line); border-radius: 9px; background: rgba(12,28,40,.75); }.science-panel summary { display: flex; justify-content: space-between; align-items: center; padding: 12px; color: #a8bbc5; font-size: 9px; font-weight: 800; letter-spacing: .12em; cursor: pointer; list-style: none; }.science-panel summary::-webkit-details-marker { display: none; }.summary-meta { color: #607889; font-size: 7px; }.summary-meta i { padding-left: 8px; color: var(--cyan); font-size: 13px; font-style: normal; }.science-panel[open] .summary-meta i { display: inline-block; transform: rotate(45deg); }.science-content { padding: 0 12px 13px; }.science-content h3 { margin: 13px 0 6px; color: #91b4c0; font-size: 8px; letter-spacing: .12em; }.science-content p { margin: 6px 0 0; color: #849ba8; font-size: 9px; line-height: 1.55; }.equation { margin: 5px 0; padding: 8px 9px; border-left: 2px solid rgba(99,214,223,.45); border-radius: 0 5px 5px 0; background: rgba(4,16,25,.65); color: #c5dce1; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 9px; overflow-wrap: anywhere; }.science-note { margin-top: 12px; padding: 9px; border: 1px solid rgba(242,182,108,.16); border-radius: 6px; color: #8e9f9d; background: rgba(105,73,35,.08); font-size: 8px; line-height: 1.5; }.science-note b { color: #d1ac79; font-size: 7px; letter-spacing: .1em; }
.footer { height: 28px; flex: 0 0 28px; display: flex; justify-content: space-between; align-items: center; padding: 0 22px; border-top: 1px solid var(--line); color: #536a7a; font-size: 7px; font-weight: 750; letter-spacing: .09em; }.footer i { padding: 0 5px; color: #7895a5; font-style: normal; }
body.embed .topbar, body.embed .footer { display: none; }body.embed .workspace { padding: 0; grid-template-columns: minmax(0,1fr) 340px; }body.embed .stage-panel { padding: 0; }body.embed .scene-root { border-radius: 0; }body.embed .control-panel { padding-top: 14px; }
@media (max-width: 1050px) { .workspace { grid-template-columns: minmax(0,1fr) 340px; padding-left: 10px; padding-right: 10px; }.control-panel { padding-left: 10px; }.stage-panel { padding-right: 10px; }.stage-scale { display: none; }.topbar { padding: 0 16px; } }
@media (max-width: 760px) {
  body { overflow: auto; }.app-shell { min-height: 100svh; height: auto; }.topbar { height: 56px; flex-basis: 56px; padding: 0 12px; }.brand-mark { width: 25px; height: 25px; }.brand-title { font-size: 12px; }.topbar-meta { gap: 10px; font-size: 8px; }.version-label { display: none; }
  .workspace { display: flex; flex-direction: column; gap: 0; padding: 8px 8px 0; min-height: 0; }.stage-panel { flex: 0 0 auto; height: 43svh; min-height: 300px; max-height: 430px; padding: 0; }.scene-root { min-height: 0; border-radius: 11px; }.stage-topline { top: 11px; left: 11px; right: 11px; }.phenomenon-chip { font-size: 7px; padding: 6px 8px; }.stage-coordinate { font-size: 7px; }.annotation-upstream { top: 29%; left: 3%; }.annotation-flow { top: 48%; right: 3%; }.scene-annotation { padding: 6px 7px; gap: 5px; font-size: 6px; }.scene-annotation b { font-size: 6px; }.annotation-line { width: 9px; }.stage-bottomline { left: 11px; right: 11px; bottom: 11px; }.stage-caption { max-width: 240px; font-size: 8px; }.stage-tools { top: 52px; right: 10px; }.icon-button { width: 29px; height: 29px; }.stage-footer { height: 28px; flex-basis: 28px; gap: 11px; font-size: 7px; }.drag-hint { display: none; }
  .control-panel { overflow: visible; padding: 10px 3px 22px; }.panel-heading { padding-bottom: 11px; }.panel-heading h1 { font-size: 25px; }.panel-subtitle { font-size: 10px; }.panel-section { padding-top: 12px; padding-bottom: 12px; }.control-list { gap: 13px 16px; }.control-name, .control-value { font-size: 9px; }.range-ends { font-size: 7px; }.transport-section { padding-top: 12px; }.readout-card { min-height: 67px; }.footer { height: auto; min-height: 28px; padding: 8px 12px; line-height: 1.5; gap: 8px; flex-wrap: wrap; }.footer span:last-child { display: none; }
  body.embed .workspace { display: flex; padding: 0; }body.embed .stage-panel { height: 48svh; }.control-panel { padding-left: 3px; padding-right: 3px; }
}
@media (max-width: 390px) { .topbar-meta .seed-label { display: none; }.stage-coordinate { display: none; }.control-list { gap: 12px 10px; }.preset-button { gap: 4px; padding: 7px 5px; }.preset-symbol { width: 17px; }.readout-card > b { font-size: 16px; }.validation-values b { font-size: 10px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; } }
