:root {
  color-scheme: dark;
  --bg: #07111b;
  --panel: #0c1925;
  --panel-2: #102130;
  --line: rgba(155, 190, 205, .13);
  --line-strong: rgba(155, 190, 205, .22);
  --text: #e7f1f3;
  --muted: #91a6b0;
  --faint: #607681;
  --accent: #6be1d0;
  --accent-soft: rgba(107, 225, 208, .12);
  --accent-glow: rgba(107, 225, 208, .24);
  --warn: #d6c18c;
  --radius: 14px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; background: var(--bg); color: var(--text); }
body { overflow: hidden; }
button, input { font: inherit; }
button { color: inherit; }
.app-shell { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; background: radial-gradient(ellipse at 10% 0%, rgba(30, 74, 89, .18), transparent 38%), var(--bg); }
body.embed-mode { height: 100vh; height: 100dvh; overflow: hidden; }
.topbar { height: 68px; flex: 0 0 68px; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; border-bottom: 1px solid var(--line); background: rgba(7, 17, 27, .94); }
.brand-lockup { display: flex; align-items: center; gap: 13px; min-width: 0; }
.brand-mark { width: 36px; height: 36px; border: 1px solid rgba(107,225,208,.38); border-radius: 50%; position: relative; display: grid; place-items: center; box-shadow: 0 0 24px rgba(107,225,208,.08), inset 0 0 16px rgba(107,225,208,.07); }
.brand-mark:before, .brand-mark:after { content: ""; position: absolute; border: 1px solid rgba(107,225,208,.45); border-radius: 50%; transform: rotate(-28deg); width: 28px; height: 10px; }
.brand-mark:after { transform: rotate(48deg); width: 26px; height: 8px; opacity: .6; }
.brand-mark span { width: 7px; height: 7px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 12px var(--accent); z-index: 1; }
.brand-mark i { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #e7fffb; transform: translate(11px,-8px); z-index: 2; }
.eyebrow { color: #7f9aa5; font-size: 9px; letter-spacing: .19em; font-weight: 700; line-height: 1.5; }
.eyebrow-dot { display: inline-block; width: 3px; height: 3px; margin: 0 5px 2px; background: var(--accent); border-radius: 50%; }
h1 { margin: 1px 0 0; font-size: 20px; font-weight: 550; letter-spacing: -.045em; line-height: 1.1; white-space: nowrap; }
h1 em { color: var(--accent); font-style: normal; font-weight: 450; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.model-tag { color: #a9c3c9; border: 1px solid rgba(107,225,208,.2); background: rgba(107,225,208,.055); border-radius: 20px; padding: 7px 10px; font-size: 9px; letter-spacing: .12em; font-weight: 700; display: inline-flex; align-items: center; gap: 7px; }
.live-dot, .caption-pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent-glow); }
.icon-button { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; border: 1px solid var(--line); background: transparent; cursor: pointer; color: #9db3bc; transition: background .2s, color .2s, border-color .2s; }
.icon-button:hover { background: var(--accent-soft); color: var(--accent); border-color: rgba(107,225,208,.3); }
.icon-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.workspace { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.58fr) minmax(340px, .82fr); gap: 14px; padding: 14px; }
.visual-column { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.stage { position: relative; flex: 1; min-height: 260px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: radial-gradient(ellipse at 50% 36%, #0d202d 0%, #091722 58%, #07111b 100%); box-shadow: inset 0 0 60px rgba(0,0,0,.17); }
.stage:before { content: ""; pointer-events: none; position: absolute; inset: 0; background-image: linear-gradient(rgba(127,169,181,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(127,169,181,.025) 1px, transparent 1px); background-size: 32px 32px; mask-image: linear-gradient(to bottom, rgba(0,0,0,.5), transparent 82%); }
#scene { display: block; width: 100%; height: 100%; position: relative; z-index: 1; }
.stage-corner { position: absolute; z-index: 2; top: 14px; color: #8da5af; font-size: 8px; letter-spacing: .16em; font-weight: 750; pointer-events: none; }
.stage-corner-left { left: 16px; display: flex; align-items: center; gap: 7px; }
.stage-corner-right { right: 16px; color: #66818d; }
.corner-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 9px var(--accent); }
.muted-sep { color: #4b6570; }
.scaled-label { color: #64828c; }
.stage-bottom-note { position: absolute; z-index: 2; bottom: 10px; left: 15px; color: #78909b; font-size: 9px; letter-spacing: .015em; pointer-events: none; }
.readouts { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; flex: 0 0 76px; }
.readout-card { min-width: 0; padding: 10px 12px 8px; border: 1px solid var(--line); border-radius: 11px; background: linear-gradient(145deg, rgba(16,33,47,.96), rgba(10,23,34,.94)); }
.readout-highlight { border-color: rgba(107,225,208,.24); background: linear-gradient(145deg, rgba(16,45,52,.72), rgba(10,27,38,.94)); }
.readout-label { display: flex; align-items: center; justify-content: space-between; gap: 4px; color: #8099a3; font-size: 8px; letter-spacing: .12em; font-weight: 750; white-space: nowrap; }
.readout-label span { color: #617e87; font-size: 6px; letter-spacing: .09em; font-weight: 700; }
.readout-value { margin-top: 4px; color: #e8f4f2; font-size: 21px; font-weight: 520; letter-spacing: -.05em; line-height: 1; white-space: nowrap; }
.readout-value small { font-size: 10px; color: #9db5bd; letter-spacing: 0; font-weight: 500; }
.readout-foot { margin-top: 5px; color: #647c86; font-size: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.control-panel { min-width: 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(160deg, rgba(13,27,40,.98), rgba(9,21,32,.98)); padding: 17px 17px 12px; scrollbar-width: thin; scrollbar-color: #28414c transparent; }
.panel-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.panel-heading h2 { margin: 3px 0 0; font-size: 18px; letter-spacing: -.04em; font-weight: 550; }
.input-tag { color: #71929a; border: 1px solid rgba(107,225,208,.16); background: rgba(107,225,208,.045); border-radius: 5px; padding: 5px 7px; font-size: 7px; letter-spacing: .11em; font-weight: 750; white-space: nowrap; }
.preset-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.preset-button { min-width: 0; display: flex; align-items: center; gap: 8px; text-align: left; padding: 9px 9px; border: 1px solid var(--line); border-radius: 10px; background: rgba(15,32,45,.72); cursor: pointer; transition: .18s ease; }
.preset-button:hover { border-color: rgba(107,225,208,.32); background: rgba(18,42,53,.9); }
.preset-button.active { border-color: rgba(107,225,208,.48); background: linear-gradient(120deg, rgba(31,78,81,.34), rgba(16,35,48,.86)); box-shadow: inset 0 0 0 1px rgba(107,225,208,.05); }
.preset-icon { flex: 0 0 26px; width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid rgba(107,225,208,.25); border-radius: 8px; color: var(--accent); font-size: 17px; }
.soft-icon { color: #b4c4c4; border-color: rgba(180,196,196,.24); }
.preset-button b { display: block; color: #d7e5e7; font-size: 10px; font-weight: 650; line-height: 1.25; }
.preset-button small { display: block; margin-top: 3px; color: #718994; font-size: 8px; line-height: 1.2; }
.control-section { padding: 12px 0 10px; border-top: 1px solid var(--line); }
.section-title { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; color: #9db4bc; font-size: 9px; letter-spacing: .13em; font-weight: 750; }
.section-title span { color: var(--accent); font-size: 8px; letter-spacing: .04em; }
.range-control { margin: 0 0 11px; }
.range-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 5px; }
.range-head label { color: #c1d0d4; font-size: 10px; font-weight: 520; }
.range-head output { color: var(--accent); font-variant-numeric: tabular-nums; font-size: 10px; font-weight: 650; white-space: nowrap; }
input[type="range"] { width: 100%; display: block; height: 12px; margin: 0; background: transparent; cursor: pointer; accent-color: var(--accent); }
input[type="range"]::-webkit-slider-runnable-track { height: 3px; background: linear-gradient(90deg, rgba(107,225,208,.5), rgba(107,225,208,.12)); border-radius: 10px; }
input[type="range"]::-moz-range-track { height: 3px; background: rgba(107,225,208,.2); border-radius: 10px; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 11px; height: 11px; margin-top: -4px; border-radius: 50%; background: #b9fff3; border: 2px solid #3f9f96; box-shadow: 0 0 0 3px rgba(107,225,208,.1), 0 0 9px rgba(107,225,208,.4); }
input[type="range"]::-moz-range-thumb { width: 9px; height: 9px; border-radius: 50%; background: #b9fff3; border: 2px solid #3f9f96; box-shadow: 0 0 0 3px rgba(107,225,208,.1); }
.range-limits { display: flex; justify-content: space-between; color: #536d77; font-size: 7px; margin-top: 1px; }
.playback-section { padding-bottom: 12px; }
.transport-row { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 7px; margin-bottom: 12px; }
.transport-button { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 34px; border: 1px solid var(--line-strong); border-radius: 8px; background: rgba(17,36,49,.78); color: #a9bec4; font-size: 13px; cursor: pointer; transition: .16s ease; }
.transport-button b { font-size: 9px; font-weight: 650; }
.transport-button:hover { border-color: rgba(107,225,208,.38); color: var(--accent); }
.transport-button.primary { color: #dffbf6; border-color: rgba(107,225,208,.35); background: rgba(31,83,82,.32); }
.time-control { margin-bottom: 8px; }
.display-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.toggle-button, .screenshot-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 30px; padding: 0 9px; border: 1px solid var(--line-strong); border-radius: 7px; background: rgba(15,32,45,.72); color: #8da5ae; font-size: 9px; cursor: pointer; transition: .16s ease; }
.toggle-button.is-on { color: var(--accent); border-color: rgba(107,225,208,.3); background: rgba(107,225,208,.07); }
.toggle-indicator { width: 6px; height: 6px; border-radius: 50%; background: #58717a; }
.toggle-button.is-on .toggle-indicator { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.quality-toggle { display: inline-flex; padding: 2px; border: 1px solid var(--line); border-radius: 7px; background: #091722; }
.quality-toggle button { border: 0; border-radius: 5px; padding: 5px 8px; color: #708893; background: transparent; font-size: 8px; cursor: pointer; }
.quality-toggle button.selected { color: #d8f7f1; background: rgba(107,225,208,.14); }
.screenshot-button { margin-left: auto; color: #b9cecf; }
.screenshot-button:hover { color: var(--accent); border-color: rgba(107,225,208,.32); }
.screenshot-button svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
.caption-card { padding: 11px 12px 10px; margin: 1px 0 11px; border: 1px solid rgba(107,225,208,.16); border-radius: 10px; background: linear-gradient(105deg, rgba(23,58,61,.35), rgba(13,30,42,.65)); }
.caption-kicker { display: flex; align-items: center; gap: 7px; color: #84a9a8; font-size: 7px; font-weight: 750; letter-spacing: .15em; }
.caption-pulse { width: 5px; height: 5px; }
.caption-card p { margin: 6px 0 0; color: #b5c9cb; font-size: 10px; line-height: 1.45; }
.science-panel { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.science-panel summary { list-style: none; display: flex; align-items: center; gap: 9px; padding: 11px 0; cursor: pointer; user-select: none; }
.science-panel summary::-webkit-details-marker { display: none; }
.science-symbol { width: 25px; height: 25px; display: grid; place-items: center; color: var(--accent); background: var(--accent-soft); border: 1px solid rgba(107,225,208,.18); border-radius: 7px; font-size: 15px; }
.science-panel summary b { display: block; color: #c9d9dc; font-size: 10px; font-weight: 650; }
.science-panel summary small { display: block; margin-top: 2px; color: #6f8791; font-size: 8px; }
.summary-chevron { margin-left: auto; color: #78919b; font-size: 15px; transition: transform .2s; }
.science-panel[open] .summary-chevron { transform: rotate(180deg); }
.science-content { padding: 0 0 13px; color: #91a8b0; font-size: 9px; line-height: 1.55; }
.science-content h3 { margin: 11px 0 5px; color: #c5d8db; font-size: 10px; font-weight: 700; }
.science-content p { margin: 5px 0 7px; }
.science-content ul { margin: 5px 0 10px; padding-left: 15px; }
.science-content li { margin: 4px 0; }
.equation { padding: 8px 9px; margin: 6px 0; border: 1px solid rgba(107,225,208,.12); border-radius: 7px; background: rgba(5,17,26,.62); color: #c7e9e4; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px; overflow-wrap: anywhere; }
.equation-small { font-size: 9px; }
.check-card { padding: 9px; margin: 9px 0; border: 1px solid rgba(107,225,208,.18); border-radius: 8px; background: rgba(18,48,51,.22); }
.check-head { display: flex; align-items: center; justify-content: space-between; gap: 7px; color: #80a29f; font-size: 7px; font-weight: 750; letter-spacing: .12em; }
.check-status { color: #668c86; font-size: 6px; }
.check-result { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; margin-top: 8px; padding-top: 7px; border-top: 1px solid rgba(107,225,208,.1); font-size: 8px; }
.check-result b { color: var(--accent); font-variant-numeric: tabular-nums; font-weight: 650; }
.scale-note { padding: 9px; border-left: 2px solid rgba(107,225,208,.55); background: rgba(107,225,208,.045); }
.scale-note b { color: #a6c9c5; font-size: 7px; letter-spacing: .12em; }
.scale-note p { margin-bottom: 0; }
.disclaimer { color: #718892; font-style: italic; font-size: 8px; }
.panel-footer { display: flex; justify-content: space-between; gap: 8px; padding-top: 10px; color: #526b75; font-size: 7px; letter-spacing: .13em; font-weight: 700; }
button:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (max-width: 900px) and (min-width: 701px) {
  .workspace { grid-template-columns: minmax(0,1.3fr) minmax(310px,.9fr); gap: 10px; padding: 10px; }
  .control-panel { padding: 14px 13px 10px; }
  .readout-card { padding: 9px 8px 7px; }
  .readout-label { font-size: 7px; }
  .readout-label span { display: none; }
  .readout-value { font-size: 19px; }
}
@media (max-width: 700px) {
  .app-shell { height: 100vh; height: 100dvh; }
  .topbar { height: 58px; flex-basis: 58px; padding: 0 12px; }
  .brand-mark { width: 30px; height: 30px; }
  .brand-mark:before { width: 23px; height: 8px; }
  .brand-mark:after { width: 21px; height: 7px; }
  .brand-lockup { gap: 9px; }
  .eyebrow { font-size: 7px; letter-spacing: .14em; }
  h1 { font-size: 17px; }
  .model-tag { font-size: 7px; padding: 6px 7px; }
  .topbar-right { gap: 7px; }
  .icon-button { width: 29px; height: 29px; }
  .workspace { display: grid; grid-template-columns: minmax(0,1fr); grid-template-rows: minmax(0, 44vh) minmax(0,1fr); gap: 8px; padding: 8px; }
  .visual-column { grid-row: 1; gap: 6px; }
  .stage { min-height: 0; border-radius: 11px; }
  .readouts { flex-basis: 54px; gap: 5px; }
  .readout-card { padding: 6px 7px 5px; border-radius: 8px; }
  .readout-label { display: block; font-size: 6px; letter-spacing: .08em; white-space: normal; line-height: 1.1; }
  .readout-label span { display: none; }
  .readout-value { margin-top: 3px; font-size: 16px; }
  .readout-value small { font-size: 8px; }
  .readout-foot { display: none; }
  .control-panel { grid-row: 2; padding: 12px 12px 10px; border-radius: 11px; }
  .panel-heading { margin-bottom: 10px; }
  .panel-heading h2 { font-size: 16px; }
  .preset-row { margin-bottom: 10px; }
  .preset-button { padding: 7px; gap: 6px; }
  .preset-icon { width: 23px; height: 23px; flex-basis: 23px; }
  .preset-button b { font-size: 9px; }
  .preset-button small { font-size: 7px; }
  .control-section { padding: 9px 0 7px; }
  .range-control { margin-bottom: 8px; }
  .range-head label, .range-head output { font-size: 9px; }
  .section-title { margin-bottom: 9px; }
  .range-limits { font-size: 6px; }
  .caption-card { padding: 9px 10px; margin-bottom: 8px; }
  .caption-card p { font-size: 9px; }
  .transport-row { margin-bottom: 8px; }
  .transport-button { min-height: 31px; }
  .science-panel summary { padding: 9px 0; }
  .panel-footer { padding-bottom: 2px; }
  .stage-corner { top: 10px; font-size: 7px; }
  .stage-corner-left { left: 10px; }
  .stage-corner-right { right: 10px; }
  .stage-bottom-note { bottom: 6px; left: 10px; right: 10px; font-size: 7px; }
}
@media (max-width: 370px) {
  .model-tag { display: none; }
  .readout-label { font-size: 5.5px; }
  .readout-value { font-size: 14px; }
  .preset-button small { display: none; }
  .display-row { gap: 5px; }
  .screenshot-button { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
