:root {
  color-scheme: dark;
  --bg: #08110f;
  --panel: #0e1916;
  --panel-2: #12211c;
  --line: rgba(182, 213, 194, .12);
  --line-strong: rgba(182, 213, 194, .22);
  --text: #e5eee6;
  --muted: #8fa79a;
  --muted-2: #60796b;
  --mint: #9bd7bd;
  --mint-bright: #b9f0d4;
  --gold: #e9c58b;
  --cyan: #7fe8e1;
  --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 { min-width: 320px; background: var(--bg); scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: radial-gradient(ellipse at 18% -12%, rgba(50, 94, 72, .18), transparent 42%), var(--bg); color: var(--text); }
button, input, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--mint-bright); outline-offset: 3px; }
.app-shell { max-width: 1720px; margin: 0 auto; padding: 0 26px 12px; }
.topbar { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.brand-lockup { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand-mark { width: 34px; height: 34px; border: 1px solid rgba(155,215,189,.38); border-radius: 50%; display: flex; align-items: center; justify-content: center; gap: 3px; transform: rotate(-25deg); flex: 0 0 auto; }
.brand-mark span { display: block; width: 3px; border-radius: 5px; background: var(--mint); }
.brand-mark span:nth-child(1) { height: 10px; opacity: .6; }
.brand-mark span:nth-child(2) { height: 17px; }
.brand-mark span:nth-child(3) { height: 12px; opacity: .75; }
.eyebrow, .panel-kicker, .scene-kicker, .section-label, .readout-label, .footer, .scene-hint, .scene-status, .speed-row label { font-size: 9px; letter-spacing: .16em; font-weight: 700; color: var(--muted-2); }
.eyebrow { margin-bottom: 4px; }
.eyebrow-dot { display: inline-block; width: 4px; height: 4px; margin: 0 6px 1px; border-radius: 50%; background: var(--gold); }
h1 { margin: 0; font-size: 17px; line-height: 1.25; letter-spacing: -.025em; font-weight: 650; }
h1 span { color: #91a89a; font-weight: 450; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.live-indicator { display: flex; align-items: center; gap: 8px; color: var(--mint); font-size: 9px; letter-spacing: .14em; font-weight: 700; white-space: nowrap; }
.live-indicator i, .status-pulse { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #83d8ae; box-shadow: 0 0 12px rgba(131,216,174,.8); }
.icon-button { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 10px; background: rgba(255,255,255,.025); color: #c0d5c7; cursor: pointer; font-size: 17px; transition: background .18s, border-color .18s, transform .18s; }
.icon-button:hover { background: rgba(155,215,189,.1); border-color: rgba(155,215,189,.4); transform: translateY(-1px); }
.info-icon { width: 16px; height: 16px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-size: 10px; font-family: Georgia, serif; font-style: italic; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 354px; gap: 18px; padding: 18px 0 16px; align-items: stretch; }
.scene-column { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.scene-frame { position: relative; height: clamp(440px, calc(100vh - 330px), 670px); min-height: 440px; overflow: hidden; border: 1px solid rgba(178,211,191,.17); border-radius: 16px; background: radial-gradient(ellipse at 50% 38%, #243a30 0%, #0c1914 70%); isolation: isolate; }
.scene-mount { position: absolute; inset: 0; z-index: 0; background: #0b1713; }
.scene-mount canvas { width: 100%; height: 100%; display: block; touch-action: none; }
.scene-vignette { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, rgba(4,12,10,.78) 0%, rgba(4,12,10,.12) 26%, transparent 55%, rgba(4,12,10,.42) 100%), linear-gradient(90deg, rgba(4,12,10,.12), transparent 38%, transparent 75%, rgba(4,12,10,.1)); }
.scene-heading { position: absolute; z-index: 2; top: 23px; left: 25px; max-width: 490px; pointer-events: none; }
.scene-kicker { color: #a7c4b2; font-size: 8px; }
.scene-title { margin-top: 9px; font-size: clamp(19px, 2.2vw, 28px); font-weight: 580; letter-spacing: -.045em; line-height: 1.12; text-shadow: 0 2px 18px rgba(0,0,0,.3); }
.scene-subtitle { max-width: 410px; margin-top: 8px; color: #a7b9ad; font-size: 11px; line-height: 1.55; }
.scene-legend { position: absolute; z-index: 2; left: 25px; bottom: 24px; display: flex; flex-wrap: wrap; gap: 14px; color: #b3c5b9; font-size: 9px; letter-spacing: .015em; pointer-events: none; }
.scene-legend span { display: flex; align-items: center; gap: 6px; }
.legend-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.legend-dot.sun { background: #ffd17b; box-shadow: 0 0 8px #ffd17b; }
.legend-dot.focus { background: #ffb76c; box-shadow: 0 0 8px #ffb76c; }
.legend-dot.return { background: #7fe8e1; box-shadow: 0 0 8px #7fe8e1; }
.specimen-tag { position: absolute; z-index: 2; right: 24px; top: 45%; display: flex; align-items: center; gap: 9px; pointer-events: none; }
.tag-line { display: block; width: 25px; height: 1px; background: rgba(233,197,139,.8); box-shadow: 0 0 6px rgba(233,197,139,.5); }
.specimen-tag b { display: block; font-size: 8px; letter-spacing: .14em; color: #e8d1a5; }
.specimen-tag small { display: block; margin-top: 4px; color: #a4b0a6; font-size: 8px; }
.scene-status { position: absolute; z-index: 3; right: 22px; bottom: 24px; display: flex; align-items: center; gap: 8px; color: rgba(191,213,197,.76); font-size: 8px; }
.scene-status .status-pulse { width: 5px; height: 5px; }
.scene-controls { position: absolute; z-index: 3; right: 18px; top: 18px; display: flex; gap: 6px; }
.scene-control { min-width: 31px; height: 31px; padding: 0 9px; border: 1px solid rgba(194,221,203,.24); border-radius: 8px; background: rgba(8,17,15,.58); color: #d3e3d7; cursor: pointer; font-size: 8px; letter-spacing: .1em; backdrop-filter: blur(10px); transition: background .18s, border-color .18s; }
.scene-control:hover { background: rgba(155,215,189,.14); border-color: rgba(155,215,189,.5); }
.camera-glyph { font-size: 19px; line-height: 1; }
.focus-glyph { font-size: 17px; line-height: 1; }
.scene-hint { position: absolute; z-index: 2; left: 25px; bottom: 9px; color: rgba(171,193,179,.46); font-size: 7px; letter-spacing: .14em; pointer-events: none; }
.scene-hint span { margin: 0 5px; color: #b1c5b7; }
.scene-error { position: absolute; z-index: 5; inset: auto 20px 70px 20px; max-width: 420px; margin: auto; padding: 16px 18px; border: 1px solid rgba(233,197,139,.35); border-radius: 12px; background: rgba(11,22,18,.94); box-shadow: 0 15px 50px rgba(0,0,0,.4); }
.scene-error b, .scene-error span { display: block; }
.scene-error b { color: #f1d8ae; font-size: 13px; margin-bottom: 6px; }
.scene-error span { color: #aabbb0; font-size: 11px; line-height: 1.5; }
.scene-error code { color: var(--mint); font-size: 10px; }
.cause-strip { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 17px; border: 1px solid var(--line); border-radius: 12px; background: rgba(17,31,25,.58); }
.cause-step { display: flex; align-items: center; gap: 9px; min-width: 0; }
.step-no { color: var(--gold); font-size: 10px; font-weight: 700; letter-spacing: .05em; }
.cause-step b { display: block; color: #c2d3c7; font-size: 8px; letter-spacing: .14em; }
.cause-step small { display: block; margin-top: 3px; color: #7f998a; font-size: 9px; white-space: nowrap; }
.cause-arrow { color: #668473; font-size: 16px; }
.readout-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.readout-card { min-height: 83px; padding: 12px 13px 10px; border: 1px solid var(--line); border-radius: 11px; background: linear-gradient(135deg, rgba(18,34,27,.86), rgba(12,23,19,.86)); min-width: 0; }
.readout-label { display: flex; justify-content: space-between; gap: 4px; color: #8da798; font-size: 7px; letter-spacing: .12em; white-space: nowrap; }
.readout-label span { color: #5f7c6b; font-size: 7px; }
.readout-value { margin-top: 9px; color: #e5f1e8; font-size: 22px; font-weight: 570; letter-spacing: -.045em; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.readout-value small { color: #9db7a7; font-size: 10px; font-weight: 500; letter-spacing: 0; }
.readout-foot { margin-top: 6px; color: #718a7b; font-size: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.accent-readout { border-color: rgba(155,215,189,.22); background: linear-gradient(135deg, rgba(23,55,41,.72), rgba(13,29,23,.9)); }
.accent-readout .readout-value { color: var(--mint-bright); }
.control-column { min-width: 0; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 15px; background: linear-gradient(160deg, rgba(17,31,25,.98), rgba(11,22,18,.98)); overflow: hidden; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 18px 18px 15px; border-bottom: 1px solid var(--line); }
.panel-kicker { color: #759080; font-size: 8px; }
.panel-heading h2, .science-header h2 { margin: 5px 0 0; font-size: 19px; font-weight: 570; letter-spacing: -.04em; }
.model-chip { padding: 5px 7px; border: 1px solid rgba(155,215,189,.2); border-radius: 5px; color: #94c4a9; font-size: 7px; font-weight: 700; letter-spacing: .1em; white-space: nowrap; }
.preset-block { padding: 14px 16px 13px; border-bottom: 1px solid var(--line); }
.section-label { color: #809889; font-size: 8px; letter-spacing: .13em; }
.preset-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 10px; }
.preset-button { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; padding: 9px 9px 8px; border: 1px solid rgba(176,207,187,.12); border-radius: 9px; background: rgba(255,255,255,.018); text-align: left; cursor: pointer; transition: border-color .18s, background .18s, transform .18s; }
.preset-button:hover { transform: translateY(-1px); border-color: rgba(155,215,189,.35); }
.preset-button.active { border-color: rgba(155,215,189,.48); background: rgba(105,163,126,.12); box-shadow: inset 0 0 0 1px rgba(155,215,189,.07); }
.preset-icon { width: 19px; height: 19px; display: grid; place-items: center; margin-bottom: 2px; border-radius: 6px; background: rgba(233,197,139,.1); color: var(--gold); font-size: 13px; }
.preset-icon.dry { background: rgba(172,188,174,.09); color: #9cae9e; }
.preset-icon.defocus { background: rgba(127,232,225,.09); color: var(--cyan); }
.preset-button b { font-size: 9px; font-weight: 620; color: #d1dfd5; white-space: nowrap; }
.preset-button small { color: #789082; font-size: 8px; white-space: nowrap; }
.controls-scroll { padding: 14px 17px 5px; flex: 1 1 auto; }
.control-section-label { display: flex; justify-content: space-between; margin-bottom: 12px; }
.control-section-label span { color: #536e5f; font-size: 7px; }
.control-item { margin-bottom: 15px; }
.control-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.control-top label { color: #c3d4c8; font-size: 10px; font-weight: 520; }
.control-top output { color: var(--mint); font-size: 10px; font-weight: 650; font-variant-numeric: tabular-nums; }
input[type="range"] { width: 100%; height: 16px; margin: 7px 0 0; appearance: none; background: transparent; cursor: pointer; accent-color: #9bd7bd; }
input[type="range"]::-webkit-slider-runnable-track { height: 3px; border-radius: 4px; background: linear-gradient(90deg, #496b58, #9bd7bd); }
input[type="range"]::-moz-range-track { height: 3px; border-radius: 4px; background: linear-gradient(90deg, #496b58, #9bd7bd); }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 12px; height: 12px; margin-top: -4.5px; border: 2px solid #d6f4e1; border-radius: 50%; background: #76b99a; box-shadow: 0 0 0 3px rgba(118,185,154,.14); }
input[type="range"]::-moz-range-thumb { width: 9px; height: 9px; border: 2px solid #d6f4e1; border-radius: 50%; background: #76b99a; box-shadow: 0 0 0 3px rgba(118,185,154,.14); }
.range-meta { display: flex; justify-content: space-between; color: #627c6d; font-size: 7px; margin-top: 1px; }
.transport-block { padding: 12px 16px 12px; border-top: 1px solid var(--line); background: rgba(5,13,10,.18); }
.transport-row { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 7px; }
.transport-button { height: 34px; display: flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line-strong); border-radius: 8px; background: rgba(255,255,255,.025); color: #b4c8ba; cursor: pointer; transition: background .18s, border-color .18s; }
.transport-button:hover { border-color: rgba(155,215,189,.4); background: rgba(155,215,189,.08); }
.transport-button span { font-size: 12px; }
.transport-button b { font-size: 8px; letter-spacing: .11em; }
.transport-button.primary { border-color: rgba(155,215,189,.42); background: rgba(99,159,120,.16); color: #c7ead3; }
.speed-row { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.speed-row label { color: #6f897a; font-size: 7px; }
.speed-row select { min-width: 82px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; background: #12221b; color: #c4d8ca; font-size: 9px; }
.science-link { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 17px; border: 0; border-top: 1px solid var(--line); background: rgba(155,215,189,.045); text-align: left; cursor: pointer; transition: background .18s; }
.science-link:hover { background: rgba(155,215,189,.09); }
.science-symbol { width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid rgba(155,215,189,.25); border-radius: 7px; color: var(--mint); font-size: 15px; }
.science-link b { display: block; color: #cce1d2; font-size: 10px; font-weight: 600; }
.science-link small { display: block; margin-top: 3px; color: #728d7d; font-size: 8px; }
.chevron { margin-left: auto; color: #8ba595; font-size: 17px; }
.science-panel { margin: 0 0 15px; padding: 20px; border: 1px solid var(--line-strong); border-radius: 14px; background: linear-gradient(135deg, rgba(17,33,26,.98), rgba(10,20,16,.98)); animation: panelIn .24s ease-out; }
.science-panel[hidden] { display: none; }
@keyframes panelIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.science-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 17px; }
.close-button { width: 30px; height: 30px; border: 1px solid var(--line-strong); border-radius: 8px; background: transparent; color: #a8c0b0; font-size: 20px; cursor: pointer; }
.science-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 10px; }
.science-card { padding: 15px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.018); min-width: 0; }
.mechanism-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0; margin: 13px 0 0; list-style: none; counter-reset: mechanism; }
.mechanism-list li { position: relative; padding-left: 23px; counter-increment: mechanism; }
.mechanism-list li::before { content: "0" counter(mechanism); position: absolute; left: 0; top: 0; color: var(--gold); font-size: 9px; font-weight: 700; }
.mechanism-list b { display: block; margin-bottom: 4px; color: #d4e3d8; font-size: 10px; }
.mechanism-list span { display: block; color: #8fa699; font-size: 9px; line-height: 1.55; }
.equation { margin-top: 12px; padding: 8px 10px; border-left: 2px solid rgba(155,215,189,.45); background: rgba(155,215,189,.045); color: #d9e9de; font-family: Georgia, "Times New Roman", serif; font-size: 15px; }
.equation small { display: block; margin-top: 5px; color: #7f9989; font-family: inherit; font-size: 9px; }
.variable-note { margin-top: 11px; color: #8fa699; font-size: 9px; line-height: 1.6; }
.variable-note b { color: var(--mint); }
.validation-title { margin-top: 11px; color: #d2e2d6; font-size: 11px; }
.validation-values { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; margin-top: 12px; }
.validation-values div { min-width: 0; padding: 9px 8px; border: 1px solid var(--line); border-radius: 7px; background: rgba(0,0,0,.12); }
.validation-values small { display: block; color: #718b7c; font-size: 7px; letter-spacing: .08em; line-height: 1.4; }
.validation-values b { display: block; margin-top: 7px; color: #cfe5d6; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.validation-status { display: flex; align-items: center; gap: 8px; margin-top: 11px; color: #a9c5b4; font-size: 9px; line-height: 1.45; }
.checkmark { display: grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: rgba(120,194,151,.15); color: var(--mint); flex: 0 0 auto; }
.micro-note { margin: 9px 0 0; color: #718b7c; font-size: 8px; line-height: 1.55; }
.assumptions-card ul { padding-left: 15px; margin: 12px 0 0; color: #8fa699; font-size: 9px; line-height: 1.55; }
.assumptions-card li { margin: 0 0 6px; }
.footer { min-height: 32px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); color: #526b5d; font-size: 7px; letter-spacing: .12em; }
.embed-mode .topbar, .embed-mode .footer { display: none; }
.embed-mode .app-shell { padding: 0; }
.embed-mode .workspace { padding: 0; }
.embed-mode .scene-frame { border-radius: 0; border-left: 0; border-right: 0; }

@media (min-width: 1500px) {
  .workspace { grid-template-columns: minmax(0, 1fr) 390px; }
  .scene-frame { height: min(68vh, 760px); }
}
@media (max-width: 1080px) {
  .app-shell { padding-left: 18px; padding-right: 18px; }
  .workspace { grid-template-columns: minmax(0, 1fr) 320px; gap: 12px; }
  .scene-frame { min-height: 410px; height: clamp(410px, calc(100vh - 335px), 610px); }
  .cause-strip { padding: 10px 12px; }
  .cause-step small { font-size: 8px; }
  .readout-card { padding: 10px 9px; }
  .readout-value { font-size: 20px; }
}
@media (max-width: 820px) {
  .workspace { grid-template-columns: 1fr; }
  .scene-frame { height: min(64vh, 570px); min-height: 390px; }
  .control-column { display: grid; grid-template-columns: 1fr 1fr; }
  .panel-heading { grid-column: 1 / -1; }
  .preset-block { border-right: 1px solid var(--line); border-bottom: 0; }
  .controls-scroll { padding: 14px 16px 0; }
  .transport-block, .science-link { grid-column: 1 / -1; }
  .science-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .app-shell { padding: 0 10px 10px; }
  .topbar { min-height: 66px; gap: 8px; }
  .brand-lockup { gap: 9px; }
  .brand-mark { width: 29px; height: 29px; }
  .eyebrow { font-size: 7px; }
  h1 { font-size: 13px; }
  h1 span { display: block; margin-top: 1px; font-size: 10px; }
  .live-indicator { font-size: 7px; gap: 5px; }
  .top-actions { gap: 6px; }
  .icon-button { width: 30px; height: 30px; border-radius: 8px; }
  .workspace { padding-top: 10px; gap: 10px; }
  .scene-column { gap: 9px; }
  .scene-frame { height: 54vh; min-height: 390px; max-height: 500px; border-radius: 12px; }
  .scene-heading { top: 16px; left: 15px; max-width: 74%; }
  .scene-kicker { font-size: 7px; }
  .scene-title { font-size: 19px; margin-top: 7px; }
  .scene-subtitle { font-size: 9px; line-height: 1.45; margin-top: 5px; }
  .scene-controls { top: 12px; right: 10px; gap: 4px; }
  .scene-control { min-width: 28px; height: 28px; padding: 0 6px; font-size: 7px; }
  .specimen-tag { top: auto; bottom: 82px; right: 13px; gap: 6px; }
  .specimen-tag b { font-size: 7px; }
  .specimen-tag small { font-size: 7px; }
  .tag-line { width: 15px; }
  .scene-legend { left: 14px; bottom: 27px; gap: 9px; font-size: 7px; }
  .scene-status { right: 13px; bottom: 9px; font-size: 6px; }
  .scene-hint { display: none; }
  .cause-strip { gap: 5px; padding: 9px 8px; }
  .cause-step { gap: 5px; }
  .step-no { font-size: 8px; }
  .cause-step b { font-size: 6px; }
  .cause-step small { max-width: 84px; font-size: 7px; white-space: normal; line-height: 1.25; }
  .cause-arrow { font-size: 12px; }
  .readout-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 7px; }
  .readout-card { min-height: 73px; padding: 9px 10px 8px; }
  .readout-label { font-size: 7px; }
  .readout-value { margin-top: 7px; font-size: 21px; }
  .readout-foot { margin-top: 4px; font-size: 7px; }
  .control-column { display: flex; }
  .panel-heading { padding: 14px 14px 12px; }
  .panel-heading h2 { font-size: 18px; }
  .preset-block { border-right: 0; border-bottom: 1px solid var(--line); padding: 12px 13px; }
  .preset-button { padding: 8px 7px; }
  .preset-button b { font-size: 8px; }
  .preset-button small { font-size: 7px; }
  .controls-scroll { padding: 13px 14px 0; }
  .control-item { margin-bottom: 14px; }
  .control-top label, .control-top output { font-size: 10px; }
  .transport-block { padding: 11px 13px; }
  .science-link { padding: 11px 14px; }
  .science-grid { grid-template-columns: 1fr; }
  .science-panel { padding: 14px; }
  .mechanism-list { grid-template-columns: 1fr 1fr; }
  .footer { flex-wrap: wrap; justify-content: center; text-align: center; padding: 9px 0; line-height: 1.4; }
  .footer span:nth-child(2) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
