:root {
  color-scheme: dark;
  --bg: #071319;
  --panel: #0b1b21;
  --panel-2: #10252b;
  --line: rgba(169, 206, 202, 0.12);
  --line-strong: rgba(169, 206, 202, 0.22);
  --text: #e7f0ec;
  --muted: #8da5a2;
  --faint: #58716f;
  --teal: #67d2c6;
  --teal-soft: #9ee0d5;
  --sand: #d5c7a2;
  --amber: #d7a86b;
  --danger: #e39c79;
  --radius: 12px;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; color: var(--text); font-family: var(--sans); background: radial-gradient(ellipse at 44% -20%, rgba(40, 101, 101, .2), transparent 50%), var(--bg); font-size: 13px; }
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
.topbar { height: 66px; flex: 0 0 66px; display: grid; grid-template-columns: 220px 1fr 220px; align-items: center; gap: 18px; padding: 0 24px; border-bottom: 1px solid var(--line); background: rgba(5, 16, 21, .84); backdrop-filter: blur(16px); z-index: 5; }
.brand-lockup { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand-mark { width: 29px; height: 29px; border: 1px solid rgba(103, 210, 198, .42); border-radius: 8px; display: flex; align-items: end; justify-content: center; gap: 3px; padding: 6px 5px; transform: rotate(-4deg); }
.brand-mark span { display: block; width: 4px; border-radius: 5px 5px 1px 1px; background: linear-gradient(180deg, #a3e4d6, #3e9f9c); }
.brand-mark span:nth-child(1) { height: 8px; }.brand-mark span:nth-child(2) { height: 14px; }.brand-mark span:nth-child(3) { height: 10px; }
.brand-name { font-size: 13px; font-weight: 800; letter-spacing: .16em; line-height: 1.1; }.brand-name span { color: var(--teal); }
.brand-sub, .eyebrow { color: var(--muted); font-family: var(--mono); font-size: 9px; letter-spacing: .14em; line-height: 1.4; }
.top-title { min-width: 0; text-align: center; }.top-title h1 { margin: 2px 0 0; font-size: 18px; line-height: 1.1; font-weight: 560; letter-spacing: -.025em; }
.top-right { display: flex; justify-content: end; align-items: center; gap: 10px; }
.live-pill { display: inline-flex; align-items: center; gap: 7px; border: 1px solid rgba(103, 210, 198, .2); border-radius: 99px; padding: 7px 10px; color: var(--teal-soft); font: 9px var(--mono); letter-spacing: .1em; }
.live-pill i, .status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 10px rgba(103,210,198,.75); }
.icon-button { width: 29px; height: 29px; border: 1px solid var(--line-strong); border-radius: 50%; background: transparent; color: var(--teal-soft); font: 13px var(--mono); cursor: pointer; }
.workspace { width: 100%; max-width: 1800px; margin: 0 auto; padding: 16px 20px 12px; display: grid; grid-template-columns: minmax(0, 1fr) 348px; gap: 16px; flex: 1; min-height: 0; }
.stage-column { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.stage-heading { min-height: 38px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.stage-subtitle { margin-top: 3px; font-size: 12px; color: #c2d0ca; letter-spacing: .005em; }
.stage-tools { display: flex; align-items: center; gap: 12px; }
.scale-tag { color: #b3c5bb; font: 9px var(--mono); letter-spacing: .08em; border: 1px solid var(--line); padding: 7px 9px; border-radius: 5px; white-space: nowrap; }
.mini-button { background: rgba(16, 37, 43, .78); border: 1px solid var(--line-strong); border-radius: 6px; padding: 7px 10px; color: #c6d7d0; font-size: 11px; cursor: pointer; white-space: nowrap; transition: border-color .2s, background .2s; }
.mini-button:hover { border-color: rgba(103,210,198,.5); background: #163138; }.button-icon { color: var(--teal); margin-right: 5px; font-size: 15px; }
.viewport-wrap { position: relative; border: 1px solid rgba(133, 180, 173, .18); border-radius: 12px; overflow: hidden; background: #071519; box-shadow: 0 18px 55px rgba(0,0,0,.28), inset 0 0 0 1px rgba(255,255,255,.02); flex: 1; min-height: 400px; display: flex; flex-direction: column; }
.viewport { position: relative; min-height: 0; flex: 1; overflow: hidden; background: radial-gradient(ellipse at 48% 45%, #163238, #08171c 66%); }
.scene-canvas { display: block; width: 100%; height: 100%; touch-action: pan-y; outline: none; }
.scene-topline { position: absolute; z-index: 2; top: 14px; left: 16px; right: 16px; display: flex; justify-content: space-between; pointer-events: none; color: rgba(210, 230, 221, .68); font: 9px var(--mono); letter-spacing: .12em; }
.drag-hint { color: rgba(190, 219, 211, .62); }.drag-hint b { color: var(--teal); margin: 0 5px; }.mouse-glyph { color: var(--teal); font-size: 13px; margin-right: 5px; }
.scene-annotation { position: absolute; z-index: 2; display: flex; align-items: center; gap: 7px; color: rgba(221, 237, 226, .78); font: 8px var(--mono); letter-spacing: .12em; text-shadow: 0 1px 7px rgba(0,0,0,.8); pointer-events: none; }
.annotation-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 9px rgba(103,210,198,.9); }
.annotation-source { left: 6%; top: 23%; }.annotation-degas { right: 7%; top: 43%; }.annotation-rim { left: 11%; bottom: 23%; }
.scene-caption { position: absolute; z-index: 2; left: 17px; bottom: 16px; display: flex; flex-direction: column; gap: 4px; pointer-events: none; text-shadow: 0 2px 10px #000; }.scene-caption strong { font: 9px var(--mono); letter-spacing: .16em; color: #d9eee3; }.scene-caption span { font-size: 11px; color: rgba(206, 226, 218, .68); }
.viewport-watermark { position: absolute; right: 16px; bottom: 17px; color: rgba(200, 224, 213, .32); font: 8px var(--mono); letter-spacing: .16em; pointer-events: none; }
.webgl-fallback { position: absolute; inset: 0; z-index: 6; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px; text-align: center; background: radial-gradient(ellipse at center, #163238, #071319 70%); }.webgl-fallback[hidden] { display: none; }.fallback-icon { color: var(--teal); font-size: 35px; margin-bottom: 10px; }.webgl-fallback strong { font-size: 16px; }.webgl-fallback p { max-width: 440px; color: var(--muted); line-height: 1.6; font-size: 12px; }.webgl-fallback code { color: var(--teal-soft); font: 10px var(--mono); }
.stage-statusbar { flex: 0 0 30px; display: flex; align-items: center; justify-content: space-between; padding: 0 13px; background: rgba(9, 24, 29, .97); border-top: 1px solid var(--line); color: #839b97; font: 8px var(--mono); letter-spacing: .1em; }
.status-left, .status-right { display: flex; align-items: center; gap: 8px; }.status-divider { width: 1px; height: 11px; background: var(--line-strong); margin: 0 3px; }.status-dot.paused { background: var(--amber); box-shadow: 0 0 8px rgba(215,168,107,.65); }
.transport-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; background: rgba(10, 27, 33, .88); min-height: 53px; }
.transport-main, .transport-end { display: flex; align-items: center; gap: 7px; }.transport-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 32px; border: 1px solid var(--line-strong); border-radius: 6px; background: #10252b; color: #c7d8d2; padding: 0 11px; font-size: 11px; cursor: pointer; transition: background .2s, border-color .2s; white-space: nowrap; }.transport-button:hover { background: #17343a; border-color: rgba(103,210,198,.42); }.transport-button.primary { color: #071b1c; background: var(--teal); border-color: var(--teal); font-weight: 700; min-width: 91px; }.transport-button.primary:hover { background: #8ce2d6; }.play-icon { font-size: 14px; line-height: 1; }.export-button { color: var(--teal-soft); }
.speed-control { display: flex; align-items: center; gap: 9px; min-width: 170px; flex: 1; max-width: 240px; }.speed-control label { color: var(--muted); font: 8px var(--mono); letter-spacing: .1em; white-space: nowrap; }.speed-control input { min-width: 40px; flex: 1; }.speed-control output { min-width: 37px; text-align: right; color: var(--teal-soft); font: 10px var(--mono); }
input[type="range"] { appearance: none; height: 3px; border-radius: 8px; background: linear-gradient(90deg, #4cb7ac, #264b4d); outline: none; cursor: pointer; accent-color: var(--teal); }.speed-control input[type="range"] { height: 3px; }.slider-row input[type="range"] { width: 100%; }.slider-row input[type="range"]::-webkit-slider-thumb, .speed-control input[type="range"]::-webkit-slider-thumb { appearance: none; width: 12px; height: 12px; border-radius: 50%; background: #9ae1d5; border: 2px solid #123a3d; box-shadow: 0 0 0 2px rgba(103,210,198,.12); }.slider-row input[type="range"]::-moz-range-thumb, .speed-control input[type="range"]::-moz-range-thumb { width: 9px; height: 9px; border-radius: 50%; background: #9ae1d5; border: 2px solid #123a3d; }
.quality-toggle { display: flex; border: 1px solid var(--line-strong); border-radius: 6px; overflow: hidden; }.quality-button { border: 0; background: transparent; padding: 7px 8px; color: #829b96; font: 8px var(--mono); letter-spacing: .08em; cursor: pointer; }.quality-button.active { background: #1b3c40; color: var(--teal-soft); }
.process-strip { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; background: rgba(9, 25, 30, .68); }.process-step { display: flex; align-items: center; gap: 8px; min-width: 0; }.process-number { color: var(--teal); font: 10px var(--mono); }.process-step strong { display: block; color: #d1e1da; font: 8px var(--mono); letter-spacing: .08em; white-space: nowrap; }.process-step small { display: block; margin-top: 3px; color: #809894; font-size: 9px; white-space: nowrap; }.process-arrow { color: #5d8e88; font-size: 15px; }
.control-panel { min-width: 0; height: 100%; max-height: calc(100vh - 118px); overflow: auto; overscroll-behavior: contain; border: 1px solid var(--line); border-radius: 11px; background: linear-gradient(180deg, rgba(14,34,40,.96), rgba(8,24,29,.98)); scrollbar-width: thin; scrollbar-color: #315354 transparent; }.panel-section { padding: 15px 15px 14px; border-bottom: 1px solid var(--line); }.panel-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }.panel-section-heading h2 { margin: 3px 0 0; font-size: 14px; font-weight: 570; letter-spacing: -.015em; }.data-chip, .control-count { color: #93c8bc; border: 1px solid rgba(103,210,198,.19); background: rgba(49,116,108,.12); border-radius: 4px; padding: 5px 6px; font: 8px var(--mono); letter-spacing: .07em; white-space: nowrap; }
.metrics-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 7px; }.metric-card { min-height: 70px; padding: 9px 10px 8px; border: 1px solid rgba(150,190,180,.11); border-radius: 7px; background: linear-gradient(135deg, rgba(24,51,55,.7), rgba(12,31,36,.68)); }.metric-label { color: #88a29d; font: 8px var(--mono); letter-spacing: .1em; }.metric-value { margin-top: 4px; color: #e1eee7; font: 22px/1.05 var(--mono); letter-spacing: -.07em; }.metric-foot { margin-top: 4px; color: #718985; font-size: 9px; }.saturation-track { margin-top: 12px; }.track-copy { display: flex; justify-content: space-between; gap: 10px; color: #8aa29d; font: 8px var(--mono); letter-spacing: .1em; }.track-copy strong { color: var(--teal-soft); font-weight: 600; }.track-rail { position: relative; height: 4px; margin-top: 7px; border-radius: 8px; background: linear-gradient(90deg, #c27b62 0%, #9eac83 45%, #5cc4b5 100%); }.track-rail span { display: block; position: absolute; inset: 0 auto 0 0; width: 64%; background: rgba(224,244,227,.52); border-radius: 8px; mix-blend-mode: screen; }.track-rail i { position: absolute; left: 50%; top: -3px; width: 2px; height: 10px; background: #d8e7d7; box-shadow: 0 0 5px rgba(255,255,255,.6); }.track-ends { display: flex; justify-content: space-between; margin-top: 6px; color: #718984; font: 7px var(--mono); letter-spacing: .035em; }
.preset-grid { display: grid; grid-template-columns: 1fr; gap: 6px; }.preset-button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 9px; text-align: left; border: 1px solid var(--line); border-radius: 7px; background: rgba(12,30,35,.65); cursor: pointer; transition: border-color .2s, background .2s; }.preset-button:hover { border-color: rgba(103,210,198,.35); }.preset-button.active { border-color: rgba(103,210,198,.55); background: rgba(34,79,76,.34); box-shadow: inset 2px 0 0 var(--teal); }.preset-icon { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; background: rgba(89,168,156,.12); color: var(--teal); font-size: 17px; }.preset-button strong { display: block; color: #d7e4de; font-size: 10px; font-weight: 600; }.preset-button small { display: block; margin-top: 2px; color: #809a94; font-size: 9px; }
.slider-list { display: flex; flex-direction: column; gap: 14px; }.slider-row { min-width: 0; }.slider-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }.slider-top label { color: #c5d5ce; font-size: 10px; }.slider-top output { color: var(--teal-soft); font: 10px var(--mono); white-space: nowrap; }.range-ends { display: flex; justify-content: space-between; margin-top: 5px; color: #6f8883; font: 8px var(--mono); }
.science-panel { border-bottom: 1px solid var(--line); }.science-panel summary { display: flex; justify-content: space-between; align-items: center; list-style: none; padding: 14px 15px; cursor: pointer; color: #dce9e2; font-size: 12px; font-weight: 600; }.science-panel summary::-webkit-details-marker { display: none; }.science-panel summary > span:first-child { display: flex; align-items: center; gap: 9px; }.science-icon { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: rgba(103,210,198,.12); color: var(--teal); font: 15px var(--mono); }.summary-chevron { color: var(--teal); font-size: 16px; transition: transform .2s; }.science-panel[open] .summary-chevron { transform: rotate(180deg); }.science-content { padding: 0 14px 14px; }.science-intro { color: #9db4ae; font-size: 10px; line-height: 1.55; margin-bottom: 12px; }.equation-block { padding: 10px; margin-top: 7px; border: 1px solid var(--line); border-radius: 7px; background: rgba(5,18,22,.38); }.equation-label { color: #79b9ad; font: 8px var(--mono); letter-spacing: .1em; margin-bottom: 6px; }.equation-block code { color: #d8e8dd; font: 11px var(--mono); }.equation-block p { margin: 6px 0; }.equation-block small { display: block; color: #839c96; font-size: 9px; line-height: 1.5; }.validation-card { margin-top: 10px; padding: 10px; border: 1px solid rgba(103,210,198,.23); border-radius: 7px; background: rgba(28,73,67,.16); }.validation-heading { display: flex; justify-content: space-between; align-items: center; color: #a9c9bf; font: 8px var(--mono); letter-spacing: .08em; margin-bottom: 8px; }.validation-heading span { color: #83d5b5; border: 1px solid rgba(131,213,181,.24); border-radius: 3px; padding: 3px 5px; }.validation-line { display: flex; justify-content: space-between; gap: 8px; margin-top: 5px; color: #819a94; font-size: 9px; }.validation-line strong { color: #d8e8df; font: 10px var(--mono); }.science-notes { margin-top: 12px; color: #819b95; font-size: 9px; line-height: 1.5; }.science-notes strong { color: #a7c4b9; font: 8px var(--mono); letter-spacing: .1em; }.science-notes ul { padding-left: 15px; margin: 7px 0 0; }.science-notes li { margin: 5px 0; }.panel-footnote { padding: 11px 15px; color: #6e8882; font: 7px var(--mono); letter-spacing: .09em; }
.footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 22px 10px; color: #536c68; font: 8px var(--mono); letter-spacing: .065em; }.footer span:nth-child(2) { color: #6d8580; letter-spacing: 0; font-family: var(--sans); font-size: 9px; text-align: center; }
.embed-mode .topbar, .embed-mode .footer { display: none; }.embed-mode .workspace { padding: 10px; min-height: 100vh; }.embed-mode .control-panel { max-height: calc(100vh - 20px); }
@media (min-width: 1450px) { .workspace { grid-template-columns: minmax(0,1fr) 370px; gap: 18px; padding-left: 24px; padding-right: 24px; }.viewport-wrap { min-height: 520px; } }
@media (max-width: 1050px) { .workspace { grid-template-columns: minmax(0,1fr) 320px; padding-left: 12px; padding-right: 12px; gap: 10px; }.topbar { padding: 0 14px; grid-template-columns: 170px 1fr 150px; }.scale-tag { display: none; }.process-step small { font-size: 8px; }.transport-button { padding: 0 8px; } }
@media (max-width: 820px) {
  .topbar { height: 58px; flex-basis: 58px; grid-template-columns: 1fr auto; padding: 0 14px; }.top-title { display: none; }.top-right { grid-column: 2; }.workspace { display: flex; flex-direction: column; padding: 10px 10px 14px; gap: 12px; }.stage-column { gap: 8px; }.viewport-wrap { min-height: 430px; height: 52vh; flex: none; }.control-panel { height: auto; max-height: none; overflow: visible; }.panel-section { padding: 14px; }.metrics-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }.preset-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }.preset-button { align-items: flex-start; min-height: 62px; padding: 8px 7px; gap: 7px; }.preset-icon { flex: 0 0 23px; width: 23px; height: 23px; }.preset-button strong { font-size: 9px; }.preset-button small { font-size: 8px; }.slider-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 18px; row-gap: 16px; }.science-content { padding-left: 14px; padding-right: 14px; }.footer { padding: 0 12px 10px; }.footer span:first-child, .footer span:last-child { display: none; }.footer span:nth-child(2) { width: 100%; }
}
@media (max-width: 520px) {
  .topbar { height: 54px; flex-basis: 54px; }.brand-mark { width: 26px; height: 26px; }.brand-name { font-size: 12px; }.brand-sub { font-size: 8px; }.live-pill { padding: 6px 8px; font-size: 8px; }.workspace { padding: 8px 8px 12px; }.stage-heading { min-height: 34px; }.stage-subtitle { font-size: 10px; }.mini-button { font-size: 10px; padding: 6px 8px; }.viewport-wrap { height: 410px; min-height: 410px; }.scene-topline { left: 10px; right: 10px; top: 10px; font-size: 7px; }.drag-hint { font-size: 7px; }.scene-annotation { font-size: 7px; }.annotation-source { top: 21%; }.annotation-degas { top: 42%; }.annotation-rim { bottom: 25%; }.scene-caption { left: 11px; bottom: 11px; }.scene-caption strong { font-size: 8px; }.scene-caption span { max-width: 230px; font-size: 9px; }.viewport-watermark { right: 10px; bottom: 12px; font-size: 7px; }.stage-statusbar { padding: 0 8px; font-size: 7px; }.status-left, .status-right { gap: 5px; }.status-right span:first-child { display: none; }.transport-bar { flex-wrap: wrap; gap: 8px; padding: 8px; }.transport-main { flex: 1; }.transport-button { min-height: 31px; font-size: 10px; gap: 5px; }.transport-button.primary { min-width: 82px; }.speed-control { order: 3; flex-basis: 100%; max-width: none; padding: 2px 3px 0; }.transport-end { margin-left: auto; }.quality-button { padding: 7px 6px; font-size: 7px; }.export-button { padding: 0 8px; }.process-strip { padding: 8px 7px; gap: 4px; }.process-step { gap: 5px; }.process-number { font-size: 9px; }.process-step strong { font-size: 7px; letter-spacing: .03em; }.process-step small { display: none; }.process-arrow { font-size: 12px; }.metrics-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }.metric-card { min-height: 66px; }.metric-value { font-size: 21px; }.preset-grid { grid-template-columns: 1fr; }.preset-button { min-height: 48px; align-items: center; padding: 7px 9px; }.preset-button strong { font-size: 10px; }.preset-button small { font-size: 9px; }.slider-list { grid-template-columns: 1fr; row-gap: 14px; }.panel-section-heading h2 { font-size: 13px; }.footer { padding: 0 8px 8px; }.embed-mode .workspace { padding: 6px; }.embed-mode .viewport-wrap { height: 47vh; min-height: 330px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
.app-toast { position: fixed; z-index: 20; left: 50%; bottom: 22px; transform: translate(-50%, 12px); opacity: 0; pointer-events: none; padding: 10px 14px; border: 1px solid rgba(103,210,198,.3); border-radius: 7px; background: rgba(9,27,31,.96); color: #cde7dc; font-size: 11px; box-shadow: 0 12px 32px rgba(0,0,0,.35); transition: opacity .18s, transform .18s; }
.app-toast.visible { opacity: 1; transform: translate(-50%, 0); }
