:root {
  color-scheme: dark;
  --bg: #08121c;
  --panel: #0d1b27;
  --panel-2: #102230;
  --panel-3: #142a37;
  --line: rgba(163, 193, 204, .13);
  --line-strong: rgba(163, 193, 204, .23);
  --text: #e7f0ee;
  --muted: #91a7ac;
  --soft: #617980;
  --accent: #e4bd79;
  --accent-2: #8dd4c7;
  --accent-glow: rgba(228, 189, 121, .2);
  --radius: 16px;
  --space: 8px;
  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 { overflow-x: hidden; }
button, input { font: inherit; }
button { color: inherit; }
.app-shell { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: radial-gradient(ellipse at 12% 0%, rgba(42, 83, 93, .16), transparent 36%), var(--bg); }
.topbar { min-height: 86px; padding: 16px 28px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); background: rgba(8, 18, 28, .9); }
.identity { display: flex; align-items: center; gap: 14px; min-width: 0; }
.mark { width: 46px; height: 46px; display: grid; place-items: center; color: var(--accent); flex: 0 0 auto; }
.mark svg { width: 44px; height: 44px; }
.identity-copy { min-width: 0; }
.eyebrow, .section-kicker, .micro-label, .readout-label, .quality-title, .caption-heading, .check-heading, .equation-label, .footer-note { font-size: 9px; letter-spacing: .17em; font-weight: 750; color: var(--muted); }
.eyebrow { display: flex; align-items: center; gap: 9px; margin-bottom: 4px; }
.eyebrow-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--accent); }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(20px, 2.1vw, 26px); letter-spacing: -.045em; line-height: 1.05; font-weight: 650; }
.identity-copy p { margin-top: 5px; font-size: 11px; color: var(--muted); }
.top-meta { display: flex; align-items: center; gap: 14px; flex: 0 0 auto; font-size: 9px; letter-spacing: .13em; font-weight: 750; color: #8fa5a9; }
.live-indicator { display: flex; align-items: center; gap: 7px; color: #a9d7c8; }
.live-indicator i, .footer-note i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #8bd2b8; box-shadow: 0 0 12px rgba(139, 210, 184, .65); }
.meta-divider { width: 1px; height: 17px; background: var(--line-strong); }
.workspace { width: 100%; max-width: 1720px; margin: 0 auto; padding: 20px 28px 18px; display: grid; grid-template-columns: minmax(0, 1.72fr) minmax(320px, .92fr); gap: 22px; flex: 1; min-height: 0; }
.stage-column { min-width: 0; display: grid; grid-template-rows: auto minmax(255px, 1fr) auto auto; gap: 12px; min-height: 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 14px; min-height: 42px; }
.section-kicker { display: block; margin-bottom: 5px; }
h2 { font-size: 16px; line-height: 1.15; letter-spacing: -.025em; font-weight: 620; }
.legend { display: flex; align-items: center; gap: 15px; padding-bottom: 2px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.legend-ion { background: #85d2c6; box-shadow: 0 0 8px rgba(133, 210, 198, .5); }
.legend-band { background: var(--accent); box-shadow: 0 0 8px rgba(228, 189, 121, .5); }
.canvas-frame { position: relative; min-height: 255px; overflow: hidden; border: 1px solid rgba(155, 190, 199, .18); border-radius: 17px; background: #091722; box-shadow: 0 18px 45px rgba(0, 0, 0, .24), inset 0 1px 0 rgba(255,255,255,.03); isolation: isolate; }
#scene { display: block; width: 100%; height: 100%; min-height: 255px; outline: none; }
.canvas-label { position: absolute; z-index: 2; pointer-events: none; }
.canvas-label-top { top: 14px; left: 16px; display: flex; align-items: center; gap: 10px; }
.canvas-label-top .micro-label { color: #82989d; font-size: 8px; }
.chamber-state { padding: 4px 7px; border: 1px solid rgba(141, 212, 199, .22); border-radius: 5px; background: rgba(11, 37, 43, .65); color: #a3d6c9; font-size: 8px; letter-spacing: .12em; font-weight: 750; }
.canvas-label-bottom-left { bottom: 14px; left: 16px; display: flex; align-items: center; gap: 7px; color: #a0b2b1; font-size: 9px; letter-spacing: .03em; }
.front-dot { width: 6px; height: 6px; border-radius: 50%; background: #8dd4c7; box-shadow: 0 0 10px #8dd4c7; }
.canvas-label-bottom-right { right: 13px; bottom: 12px; pointer-events: auto; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 31px; padding: 0 10px; border: 1px solid rgba(168, 197, 202, .2); border-radius: 7px; background: rgba(9, 24, 34, .78); color: #b9c9c8; font-size: 9px; cursor: pointer; transition: border-color .18s, background .18s, color .18s; }
.icon-button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.icon-button:hover { border-color: rgba(228, 189, 121, .5); color: var(--accent); background: rgba(24, 39, 47, .95); }
.timeline-card { padding: 12px 14px 10px; border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(130deg, rgba(17, 35, 47, .92), rgba(12, 27, 38, .92)); }
.timeline-topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.timeline-topline > div:first-child { display: flex; align-items: baseline; gap: 10px; }
.micro-label { font-size: 8px; }
.unit-note { color: var(--soft); letter-spacing: .08em; }
.timeline-topline strong { font-size: 15px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.transport { display: flex; align-items: center; gap: 6px; }
.transport button { min-height: 30px; padding: 0 9px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 7px; cursor: pointer; font-size: 9px; font-weight: 650; transition: background .16s, border-color .16s, color .16s; }
.transport svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.transport-primary { border: 1px solid rgba(228, 189, 121, .38); background: rgba(228, 189, 121, .13); color: #f0d6a7; }
.transport-primary:hover { background: rgba(228, 189, 121, .22); }
.transport-secondary { border: 1px solid var(--line-strong); background: rgba(16, 34, 46, .8); color: #a9bdbe; }
.transport-secondary:hover { border-color: rgba(141, 212, 199, .42); color: var(--accent-2); }
.time-track { position: relative; height: 4px; overflow: hidden; border-radius: 9px; background: rgba(130, 162, 168, .15); }
.time-track-fill { width: 0%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #5da99f, #e4bd79); transition: width .15s linear; }
.time-track-marker { position: absolute; top: 50%; left: 0%; width: 8px; height: 8px; border: 2px solid #e4bd79; border-radius: 50%; background: #142632; transform: translate(-50%, -50%); box-shadow: 0 0 8px rgba(228, 189, 121, .55); }
.timeline-scale { display: flex; justify-content: space-between; margin-top: 6px; color: #71878d; font-size: 8px; font-variant-numeric: tabular-nums; }
.readout-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.readout-card { min-width: 0; min-height: 77px; padding: 10px 11px 8px; border: 1px solid var(--line); border-radius: 10px; background: rgba(13, 28, 39, .82); }
.readout-label { display: block; font-size: 7px; letter-spacing: .14em; white-space: nowrap; }
.readout-card strong { display: block; margin-top: 5px; font-size: 21px; line-height: 1; letter-spacing: -.04em; font-weight: 630; font-variant-numeric: tabular-nums; }
.readout-unit { display: block; margin-top: 5px; color: #8fa5a9; font-size: 8px; }
.readout-unit b { color: #6f858b; font-weight: 500; }
.control-column { min-width: 0; min-height: 0; overflow: hidden; }
.control-panel { height: 100%; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(141, 173, 179, .26) transparent; padding: 17px 17px 15px; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(150deg, rgba(15, 31, 43, .98), rgba(10, 23, 33, .98)); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.panel-heading h2 { font-size: 17px; }
.adjust-badge { padding: 5px 7px; border: 1px solid rgba(141, 212, 199, .2); border-radius: 5px; color: #9bcfc4; background: rgba(51, 113, 107, .12); font-size: 7px; letter-spacing: .13em; font-weight: 800; white-space: nowrap; }
.panel-intro { margin-top: 9px; color: #8fa5a9; font-size: 10px; line-height: 1.5; max-width: 440px; }
.preset-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 13px; }
.preset-button { display: flex; align-items: center; gap: 9px; min-width: 0; min-height: 48px; padding: 7px 9px; text-align: left; border: 1px solid var(--line); border-radius: 9px; background: rgba(9, 22, 32, .75); cursor: pointer; transition: border-color .18s, background .18s; }
.preset-button:hover { border-color: rgba(228, 189, 121, .35); }
.preset-button.preset-active { border-color: rgba(228, 189, 121, .44); background: rgba(92, 72, 43, .15); }
.preset-swatch { width: 22px; height: 22px; flex: 0 0 auto; border-radius: 7px; border: 1px solid rgba(255,255,255,.1); }
.rings-swatch { background: repeating-linear-gradient(0deg, #3b4541 0 3px, #c7a36d 3px 5px, #263d3d 5px 8px); }
.quiet-swatch { background: linear-gradient(145deg, #24414a, #122b38); }
.preset-button b { display: block; font-size: 9px; font-weight: 700; color: #dce8e4; }
.preset-button small { display: block; margin-top: 3px; color: #7f969b; font-size: 8px; }
.control-list { margin-top: 13px; }
.control-group { padding: 10px 0 9px; border-top: 1px solid rgba(156, 188, 194, .09); }
.control-label-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.control-label-row label { color: #d5e1dd; font-size: 10px; font-weight: 600; }
.symbol { margin-left: 4px; color: #91bcb2; font-size: 10px; font-family: Georgia, serif; }
.control-label-row output { color: var(--accent); font-size: 10px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
input[type="range"] { display: block; width: 100%; height: 15px; margin: 7px 0 0; padding: 0; appearance: none; -webkit-appearance: none; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 3px; border-radius: 5px; background: linear-gradient(90deg, rgba(141, 212, 199, .62), rgba(141, 212, 199, .15)); }
input[type="range"]::-moz-range-track { height: 3px; border-radius: 5px; background: linear-gradient(90deg, rgba(141, 212, 199, .62), rgba(141, 212, 199, .15)); }
input[type="range"]::-webkit-slider-thumb { width: 12px; height: 12px; margin-top: -4.5px; appearance: none; -webkit-appearance: none; border: 2px solid #d8eee4; border-radius: 50%; background: #6daea2; box-shadow: 0 0 0 3px rgba(109, 174, 162, .13); }
input[type="range"]::-moz-range-thumb { width: 9px; height: 9px; border: 2px solid #d8eee4; border-radius: 50%; background: #6daea2; box-shadow: 0 0 0 3px rgba(109, 174, 162, .13); }
input[type="range"]:focus-visible { outline: 2px solid rgba(228, 189, 121, .75); outline-offset: 4px; border-radius: 5px; }
.range-hints { display: flex; align-items: center; justify-content: space-between; margin-top: 1px; color: #617980; font-size: 8px; font-variant-numeric: tabular-nums; }
.range-tag { color: #708b8e; font-size: 7px; letter-spacing: .12em; }
.control-group p { margin-top: 5px; color: #81979c; font-size: 8px; line-height: 1.35; }
.control-group-last { padding-bottom: 12px; }
.quality-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid rgba(156, 188, 194, .09); border-bottom: 1px solid rgba(156, 188, 194, .09); }
.quality-title { display: block; font-size: 8px; }
.quality-row small { display: block; margin-top: 3px; color: #72888d; font-size: 8px; }
.quality-toggle { display: flex; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 7px; background: rgba(5, 16, 24, .65); }
.quality-toggle button { padding: 5px 9px; border: 0; border-radius: 5px; background: transparent; color: #7f969b; font-size: 8px; cursor: pointer; }
.quality-toggle button.quality-selected { background: #1b3943; color: #b6e2d7; box-shadow: inset 0 0 0 1px rgba(141, 212, 199, .18); }
.caption-card { margin-top: 11px; padding: 11px 12px 12px; border: 1px solid rgba(141, 212, 199, .16); border-radius: 10px; background: linear-gradient(110deg, rgba(25, 65, 67, .23), rgba(13, 33, 43, .42)); }
.caption-heading { display: flex; align-items: center; gap: 7px; color: #a4cfc3; font-size: 8px; }
.caption-pulse { width: 5px; height: 5px; border-radius: 50%; background: #8dd4c7; box-shadow: 0 0 8px rgba(141, 212, 199, .6); }
.caption-card p { margin-top: 7px; color: #b3c6c2; font-size: 9px; line-height: 1.5; }
.check-card { margin-top: 9px; padding: 11px 12px 10px; border: 1px solid rgba(228, 189, 121, .17); border-radius: 10px; background: rgba(48, 39, 27, .18); }
.check-heading { display: flex; align-items: center; justify-content: space-between; color: #bca47b; font-size: 7px; }
.check-mark { padding: 3px 5px; border: 1px solid rgba(228, 189, 121, .2); border-radius: 4px; color: #d7bd8d; font-size: 7px; letter-spacing: .1em; }
.check-values { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 9px; }
.check-values div { min-width: 0; }
.check-values span, .check-result span { display: block; color: #8d9991; font-size: 8px; }
.check-values strong { display: block; margin-top: 4px; color: #e4e8d9; font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; }
.check-result { display: flex; align-items: center; justify-content: space-between; margin-top: 9px; padding-top: 8px; border-top: 1px solid rgba(228, 189, 121, .12); }
.check-result strong { color: var(--accent); font-size: 11px; font-variant-numeric: tabular-nums; }
.check-card > p { margin-top: 7px; color: #788a86; font-size: 8px; line-height: 1.4; }
.science-panel { margin-top: 9px; border: 1px solid var(--line); border-radius: 10px; background: rgba(6, 17, 25, .42); }
.science-panel summary { display: flex; align-items: center; justify-content: space-between; padding: 11px 12px; color: #b8c8c3; font-size: 8px; font-weight: 750; letter-spacing: .15em; cursor: pointer; list-style: none; }
.science-panel summary::-webkit-details-marker { display: none; }
.science-plus { color: var(--accent); font-size: 16px; line-height: 10px; font-weight: 400; transition: transform .2s; }
.science-panel[open] .science-plus { transform: rotate(45deg); }
.science-content { padding: 0 12px 12px; color: #a4b7b1; font-size: 9px; line-height: 1.5; }
.science-lead { margin-bottom: 10px; color: #c2d0ca; }
.equation-block { margin: 8px 0; padding: 8px 9px; border-left: 2px solid rgba(141, 212, 199, .4); background: rgba(17, 40, 49, .48); }
.equation-label { display: block; margin-bottom: 4px; color: #87b8ad; font-size: 7px; }
.equation { color: #e6d3ac; font-family: Georgia, "Times New Roman", serif; font-size: 13px; letter-spacing: .01em; }
.equation-block p { margin-top: 4px; color: #91a49f; font-size: 8px; }
.model-notes { margin-top: 10px; }
.model-notes b { color: #c5d3cd; font-size: 9px; }
.model-notes ul { margin: 6px 0 8px; padding-left: 15px; }
.model-notes li { margin: 2px 0; color: #aebbb3; }
.model-notes em { color: #7f9c96; font-style: normal; }
.model-notes p { margin-top: 7px; color: #8b9e99; font-size: 8px; line-height: 1.5; }
.disclaimer { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); color: #9cb4ad; font-size: 8px; }
.footer-note { min-height: 28px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 28px 9px; color: #60777e; font-size: 7px; letter-spacing: .13em; }
.footer-note span:last-child { display: flex; align-items: center; gap: 8px; }
.footer-note i { width: 4px; height: 4px; }
button:focus-visible, summary:focus-visible { outline: 2px solid rgba(228, 189, 121, .8); outline-offset: 3px; }
body.embed-mode { height: 100vh; height: 100dvh; overflow: hidden; }
body.embed-mode .app-shell { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; }
body.embed-mode .workspace { min-height: 0; overflow: hidden; }
@media (max-width: 760px) { body.embed-mode .workspace { overflow-y: auto; overscroll-behavior: contain; } }
@media (max-width: 1040px) {
  .workspace { grid-template-columns: minmax(0, 1.35fr) minmax(300px, .95fr); gap: 14px; padding-left: 18px; padding-right: 18px; }
  .readout-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .readout-card { min-height: 64px; }
  .readout-card strong { font-size: 18px; }
  .control-panel { padding: 14px; }
  .footer-note { padding-left: 18px; padding-right: 18px; }
}
@media (max-width: 760px) {
  .topbar { min-height: 70px; padding: 11px 14px; }
  .mark { width: 38px; height: 38px; }
  .mark svg { width: 37px; height: 37px; }
  .eyebrow { font-size: 7px; }
  h1 { font-size: 21px; }
  .identity-copy p { font-size: 9px; }
  .top-meta { gap: 8px; font-size: 7px; }
  .meta-kind { display: none; }
  .meta-divider { display: none; }
  .workspace { display: flex; flex-direction: column; gap: 14px; padding: 14px 12px 18px; overflow: visible; }
  .stage-column { display: grid; flex: 0 0 auto; min-height: 0; grid-template-rows: auto minmax(260px, 39vh) auto auto; gap: 9px; }
  .section-head { min-height: 36px; }
  .section-head h2 { font-size: 15px; }
  .legend { gap: 9px; font-size: 8px; }
  .legend i { width: 6px; height: 6px; }
  .canvas-frame, #scene { min-height: 260px; }
  .timeline-card { padding: 10px 11px 9px; }
  .timeline-topline { margin-bottom: 8px; }
  .timeline-topline strong { font-size: 14px; }
  .transport { gap: 4px; }
  .transport button { min-height: 29px; padding: 0 7px; font-size: 8px; }
  .transport svg { width: 12px; height: 12px; }
  .readout-grid { gap: 6px; }
  .readout-card { min-height: 63px; padding: 8px 9px 7px; }
  .readout-label { font-size: 7px; }
  .readout-card strong { margin-top: 4px; font-size: 17px; }
  .readout-unit { margin-top: 4px; font-size: 7px; }
  .control-column { flex: 0 0 auto; overflow: visible; }
  .control-panel { height: auto; overflow: visible; padding: 14px 13px; }
  .panel-heading h2 { font-size: 16px; }
  .panel-intro { font-size: 9px; }
  .control-group { padding: 9px 0 8px; }
  .footer-note { padding: 0 13px 9px; font-size: 6px; }
}
@media (max-width: 420px) {
  .top-meta { display: none; }
  .workspace { padding-left: 9px; padding-right: 9px; }
  .legend { font-size: 7px; gap: 7px; }
  .canvas-frame, #scene { min-height: 250px; }
  .stage-column { grid-template-rows: auto minmax(250px, 36vh) auto auto; }
  .canvas-label-top { top: 10px; left: 10px; }
  .canvas-label-bottom-left { left: 10px; bottom: 10px; font-size: 8px; }
  .canvas-label-bottom-right { right: 8px; bottom: 8px; }
  .screenshot-button { min-height: 27px; padding: 0 7px; }
  .screenshot-button span { font-size: 8px; }
  .timeline-topline { align-items: flex-start; }
  .timeline-topline > div:first-child { display: flex; flex-direction: column; gap: 3px; }
  .transport button { gap: 4px; padding: 0 6px; }
  .readout-card strong { font-size: 16px; }
  .footer-note { flex-wrap: wrap; row-gap: 5px; padding-top: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
