:root {
  color-scheme: dark;
  --bg: #07131b;
  --panel: #0b1a24;
  --panel-2: #0e202b;
  --panel-3: #102632;
  --line: rgba(150, 190, 205, .14);
  --line-strong: rgba(150, 190, 205, .23);
  --text: #e8f2f5;
  --muted: #8ca4ae;
  --dim: #617a85;
  --accent: #65d8e6;
  --accent-soft: rgba(101, 216, 230, .13);
  --accent-glow: rgba(101, 216, 230, .22);
  --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; width: 100%; min-height: 100%; background: var(--bg); color: var(--text); }
body { min-height: 100dvh; overflow-x: hidden; }
body.embed-mode { height: 100vh; height: 100dvh; overflow: hidden; }
body.embed-mode .app-shell { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; }
button, input { font: inherit; }
button { color: inherit; }
.app-shell { min-height: 100dvh; display: flex; flex-direction: column; background: radial-gradient(ellipse at 48% -28%, rgba(29, 79, 94, .24), transparent 56%), var(--bg); }
.topbar { height: 58px; flex: 0 0 58px; display: flex; align-items: center; justify-content: space-between; padding: 0 25px; border-bottom: 1px solid var(--line); background: rgba(6, 17, 24, .88); }
.brand-lockup { display: flex; align-items: center; gap: 11px; }
.brand-mark { position: relative; width: 27px; height: 27px; border: 1px solid rgba(101,216,230,.62); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 0 18px rgba(101,216,230,.12); }
.brand-mark:before { content: ""; position: absolute; width: 17px; height: 7px; border: 1px solid var(--accent); border-radius: 50%; transform: rotate(-34deg); }
.brand-mark i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.brand-mark b { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: var(--text); right: 3px; top: 4px; }
.brand-name { font-size: 10px; font-weight: 800; letter-spacing: .16em; color: #dbe9ed; line-height: 1.25; }
.brand-name span { color: var(--accent); }
.brand-sub { margin-top: 3px; color: var(--dim); font-size: 8px; font-weight: 700; letter-spacing: .19em; }
.topbar-status { display: flex; align-items: center; gap: 9px; color: #79939e; font-size: 8px; font-weight: 750; letter-spacing: .15em; }
.status-dot, .mini-dot { width: 6px; height: 6px; display: inline-block; border-radius: 50%; background: var(--accent); box-shadow: 0 0 9px var(--accent-glow); }
.status-divider { width: 1px; height: 12px; background: var(--line-strong); margin: 0 5px; }
.workspace { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 376px; gap: 0; }
.stage-panel { min-width: 0; min-height: 0; display: flex; flex-direction: column; padding: 23px 25px 16px; border-right: 1px solid var(--line); }
.stage-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; padding: 0 2px 16px; }
.eyebrow { color: var(--accent); font-size: 8px; font-weight: 800; letter-spacing: .18em; }
.eyebrow span { color: #526e79; padding: 0 5px; }
h1 { margin: 7px 0 4px; font-size: clamp(23px, 2.35vw, 32px); line-height: 1.12; font-weight: 640; letter-spacing: -.045em; }
.subtitle { margin: 0; color: #9bb0b8; font-size: 12px; letter-spacing: .005em; }
.stage-tags { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; padding-bottom: 3px; }
.tag { padding: 7px 9px; border: 1px solid var(--line); border-radius: 5px; color: #91aab4; background: rgba(12,29,39,.65); font-size: 8px; font-weight: 750; letter-spacing: .09em; white-space: nowrap; }
.tag-accent { color: var(--accent); border-color: rgba(101,216,230,.25); background: var(--accent-soft); }
.viewport { position: relative; flex: 1; min-height: 230px; overflow: hidden; border: 1px solid rgba(117,170,188,.19); border-radius: 10px; background: #07131c; box-shadow: inset 0 0 80px rgba(1,8,13,.65), 0 16px 50px rgba(0,0,0,.18); }
.viewport:before { content: ""; pointer-events: none; position: absolute; z-index: 1; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(190,230,239,.025), inset 0 -80px 100px rgba(4,13,20,.16); }
#sceneCanvas { display: block; width: 100%; height: 100%; }
.viewport-topline, .viewport-bottomline { position: absolute; z-index: 2; left: 14px; right: 14px; display: flex; align-items: center; justify-content: space-between; color: rgba(165,194,204,.66); font-size: 8px; font-weight: 750; letter-spacing: .13em; pointer-events: none; text-shadow: 0 1px 8px #06121a; }
.viewport-topline { top: 13px; }
.viewport-bottomline { bottom: 12px; }
.viewport-topline em { color: #6e8792; font-style: normal; }
.mini-dot { width: 5px; height: 5px; margin-right: 5px; vertical-align: 1px; }
.canvas-crosshair { position: absolute; left: 50%; top: 50%; width: 20px; height: 20px; opacity: .24; pointer-events: none; transform: translate(-50%,-50%); }
.canvas-crosshair span, .canvas-crosshair i { position: absolute; background: rgba(151,203,216,.5); }
.canvas-crosshair span { width: 1px; height: 20px; left: 9px; }
.canvas-crosshair i { height: 1px; width: 20px; top: 9px; }
.stage-foot { min-height: 47px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 2px 0; }
.stage-foot p { max-width: 620px; margin: 0; color: #9db1b9; font-size: 10px; line-height: 1.45; }
.legend { display: flex; gap: 13px; flex: 0 0 auto; color: #708993; font-size: 7px; font-weight: 750; letter-spacing: .1em; }
.legend span { white-space: nowrap; display: flex; align-items: center; gap: 5px; }
.legend-sphere { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 6px var(--accent-glow); }
.legend-trace { width: 13px; border-top: 1px dashed var(--accent); opacity: .8; }
.control-panel { min-width: 0; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #29424d transparent; padding: 21px 19px 16px; background: linear-gradient(180deg, rgba(13,30,40,.92), rgba(8,22,31,.96)); }
.panel-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.panel-top h2 { margin: 5px 0 0; font-size: 18px; font-weight: 620; letter-spacing: -.03em; }
.model-chip { padding: 5px 7px; border-radius: 4px; border: 1px solid rgba(101,216,230,.2); color: #7ebbc4; background: rgba(101,216,230,.06); font-size: 7px; font-weight: 800; letter-spacing: .1em; white-space: nowrap; }
.preset-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 15px 0 13px; }
.preset-button { height: 31px; border: 1px solid var(--line-strong); border-radius: 5px; background: rgba(8,23,31,.65); color: #91a6af; font-size: 9px; font-weight: 700; cursor: pointer; transition: border-color .18s ease, background .18s ease, color .18s ease; }
.preset-button:hover { border-color: rgba(101,216,230,.45); color: var(--text); }
.preset-button.active { border-color: rgba(101,216,230,.46); color: var(--accent); background: rgba(101,216,230,.09); }
.controls-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.control-card { min-width: 0; padding: 9px 10px 8px; border: 1px solid rgba(142,180,192,.12); border-radius: 7px; background: rgba(13,33,44,.68); }
.control-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.control-head label { color: #d6e4e8; font-size: 10px; font-weight: 680; }
.control-head label span { margin-left: 4px; color: #708b96; font-size: 8px; font-weight: 600; }
.control-value { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; min-width: 0; }
.control-head output { color: var(--accent); font-size: 10px; font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }
.control-value small { color: #607e88; font-size: 5px; font-weight: 800; letter-spacing: .1em; white-space: nowrap; }
input[type="range"] { display: block; width: 100%; height: 13px; margin: 0; appearance: none; -webkit-appearance: none; background: transparent; cursor: pointer; accent-color: var(--accent); }
input[type="range"]::-webkit-slider-runnable-track { height: 3px; border-radius: 4px; background: linear-gradient(90deg, rgba(101,216,230,.7), rgba(101,216,230,.18)); }
input[type="range"]::-moz-range-track { height: 3px; border-radius: 4px; background: linear-gradient(90deg, rgba(101,216,230,.7), rgba(101,216,230,.18)); }
input[type="range"]::-webkit-slider-thumb { width: 11px; height: 11px; margin-top: -4px; appearance: none; -webkit-appearance: none; border: 2px solid #dffaff; border-radius: 50%; background: #42bdcc; box-shadow: 0 0 0 3px rgba(101,216,230,.13), 0 0 10px rgba(101,216,230,.38); }
input[type="range"]::-moz-range-thumb { width: 8px; height: 8px; border: 2px solid #dffaff; border-radius: 50%; background: #42bdcc; box-shadow: 0 0 0 3px rgba(101,216,230,.13); }
input[type="range"]:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
.range-ends { display: flex; justify-content: space-between; margin-top: 4px; color: #607985; font-size: 7px; letter-spacing: .06em; }
.readout-section { margin-top: 15px; }
.section-label { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 8px; color: #a9bdc4; font-size: 8px; font-weight: 800; letter-spacing: .12em; }
.section-label span { color: #637e88; font-size: 7px; }
.readout-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 6px; }
.readout-card { min-width: 0; padding: 8px 8px 7px; border: 1px solid rgba(141,180,191,.13); border-radius: 6px; background: rgba(5,18,26,.62); }
.readout-name { min-height: 22px; color: #a9bdc5; font-size: 8px; font-weight: 650; line-height: 1.3; }
.readout-name small { display: block; color: #607e88; font-size: 6px; font-weight: 800; letter-spacing: .1em; }
.readout-value { margin-top: 3px; color: #eaf7f9; font-size: 19px; line-height: 1; font-weight: 620; letter-spacing: -.045em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.readout-value span { color: var(--accent); font-size: 11px; letter-spacing: 0; }
.readout-note { margin-top: 5px; color: #607985; font-size: 7px; white-space: nowrap; }
.check-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; padding: 6px 8px; border: 1px solid rgba(101,216,230,.14); border-radius: 5px; background: rgba(101,216,230,.045); color: #6e8b95; font-size: 7px; letter-spacing: .08em; }
.check-row span { flex: 0 0 auto; color: var(--accent); font-weight: 800; }
.check-row b { color: #a9c0c7; font-size: 7px; font-weight: 650; letter-spacing: .01em; text-align: right; font-variant-numeric: tabular-nums; }
.transport-row { display: flex; align-items: center; justify-content: space-between; gap: 7px; margin-top: 13px; }
.transport-buttons { display: flex; gap: 5px; min-width: 0; }
.transport-button, .screenshot-button { height: 31px; padding: 0 9px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line-strong); border-radius: 5px; background: rgba(7,21,29,.72); color: #9eb3bb; font-size: 8px; font-weight: 800; letter-spacing: .06em; cursor: pointer; transition: .18s ease; }
.transport-button:hover, .screenshot-button:hover { color: var(--text); border-color: rgba(101,216,230,.45); }
.transport-button.primary { min-width: 83px; color: #06151b; border-color: var(--accent); background: var(--accent); }
.transport-button.primary:hover { background: #8ce8f0; }
.play-icon { width: 0; height: 0; border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-left: 7px solid currentColor; }
.play-icon.paused { width: 8px; height: 10px; border: 0; border-left: 2px solid currentColor; border-right: 2px solid currentColor; }
.screenshot-button { color: #7e9aa4; font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
.screenshot-button span { color: var(--accent); font-size: 13px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; padding: 8px 1px 9px; border-bottom: 1px solid var(--line); }
.switch-label { display: inline-flex; align-items: center; gap: 8px; color: #9db2ba; font-size: 9px; font-weight: 650; cursor: pointer; }
.switch { position: relative; width: 27px; height: 15px; display: inline-block; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch i { position: absolute; inset: 0; border: 1px solid #3b5662; border-radius: 20px; background: #152b36; transition: .18s ease; }
.switch i:after { content: ""; position: absolute; width: 9px; height: 9px; left: 2px; top: 2px; border-radius: 50%; background: #77909a; transition: .18s ease; }
.switch input:checked + i { border-color: rgba(101,216,230,.65); background: rgba(101,216,230,.18); }
.switch input:checked + i:after { left: 14px; background: var(--accent); box-shadow: 0 0 7px var(--accent-glow); }
.switch input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 3px; }
.quality-toggle { padding: 5px 7px; border: 1px solid var(--line); border-radius: 4px; background: rgba(6,19,27,.65); color: #718b96; font-size: 7px; font-weight: 800; letter-spacing: .1em; cursor: pointer; }
.quality-toggle b { margin-left: 5px; color: var(--accent); }
.real-values-note { display: flex; gap: 8px; margin-top: 10px; padding: 9px 9px 8px; border: 1px solid rgba(101,216,230,.14); border-radius: 6px; background: rgba(101,216,230,.045); }
.note-icon { flex: 0 0 14px; width: 14px; height: 14px; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(101,216,230,.55); border-radius: 50%; color: var(--accent); font-size: 9px; font-family: Georgia,serif; font-style: italic; }
.real-values-note p { margin: 0; color: #819aa4; font-size: 8px; line-height: 1.45; }
.real-values-note strong { color: #b7cbd1; font-weight: 750; }
.real-values-note b { color: #83a6b0; font-size: 7px; font-weight: 750; }
.science-panel { margin-top: 10px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.science-panel summary { min-height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 10px; list-style: none; cursor: pointer; color: #d5e3e7; font-size: 10px; font-weight: 700; }
.science-panel summary::-webkit-details-marker { display: none; }
.science-panel summary:after { content: "+"; color: var(--accent); font-size: 16px; font-weight: 400; }
.science-panel[open] summary:after { content: "−"; }
.summary-hint { margin-left: auto; color: #607a85; font-size: 7px; font-weight: 800; letter-spacing: .1em; }
.science-content { padding: 0 1px 10px; }
.science-content p { margin: 7px 0; color: #91a8b1; font-size: 8px; line-height: 1.5; }
.science-content p b { color: #c6d8dd; }
.science-content code { color: var(--accent); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 8px; }
.science-content .science-check { padding: 7px 8px; border-left: 2px solid var(--accent); background: rgba(101,216,230,.055); }
.science-content .disclaimer { color: #6d8791; font-style: italic; }
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (min-width: 1500px) { .workspace { grid-template-columns: minmax(0,1fr) 405px; } .stage-panel { padding-left: 32px; padding-right: 32px; } .control-panel { padding-left: 23px; padding-right: 23px; } }
@media (max-width: 1000px) and (min-width: 701px) { .workspace { grid-template-columns: minmax(0,1fr) 330px; } .stage-panel { padding: 18px 17px 13px; } .control-panel { padding: 17px 14px 12px; } .stage-tags { max-width: 150px; } .tag { font-size: 7px; } }
@media (max-width: 700px) {
  body.embed-mode { height: 100vh; height: 100dvh; overflow: hidden; }
  body.embed-mode .app-shell { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; }
  .topbar { height: 47px; flex-basis: 47px; padding: 0 14px; }
  .brand-mark { width: 23px; height: 23px; }
  .brand-name { font-size: 9px; }
  .brand-sub { font-size: 7px; }
  .topbar-status { font-size: 7px; gap: 6px; letter-spacing: .08em; }
  .topbar-status .status-divider, .topbar-status span:last-child { display: none; }
  .workspace { display: flex; flex-direction: column; min-height: 0; flex: 1; }
  .stage-panel { flex: 1 1 auto; min-height: 220px; padding: 12px 12px 7px; border-right: 0; border-bottom: 1px solid var(--line); }
  .stage-heading { align-items: flex-start; padding: 0 1px 9px; gap: 7px; }
  .eyebrow { font-size: 7px; letter-spacing: .14em; }
  h1 { margin: 5px 0 3px; font-size: clamp(19px, 5.3vw, 24px); }
  .subtitle { max-width: 245px; font-size: 9px; line-height: 1.35; }
  .stage-tags { max-width: 106px; gap: 4px; padding-top: 1px; }
  .tag { padding: 5px 6px; font-size: 6px; letter-spacing: .05em; }
  .viewport { flex: 1; min-height: 155px; border-radius: 7px; }
  .viewport-topline, .viewport-bottomline { left: 8px; right: 8px; font-size: 6px; letter-spacing: .08em; }
  .viewport-topline { top: 8px; }
  .viewport-bottomline { bottom: 7px; }
  .stage-foot { min-height: 36px; padding-top: 7px; gap: 6px; }
  .stage-foot p { font-size: 8px; line-height: 1.35; }
  .legend { display: none; }
  .control-panel { flex: 0 0 auto; max-height: 350px; overflow-y: auto; padding: 10px 12px 11px; }
  .panel-top h2 { font-size: 14px; margin-top: 3px; }
  .model-chip { font-size: 6px; padding: 4px 5px; }
  .preset-row { margin: 8px 0 8px; gap: 5px; }
  .preset-button { height: 27px; font-size: 8px; }
  .controls-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
  .control-card { padding: 7px 8px 6px; }
  .control-head { margin-bottom: 5px; }
  .control-head label { font-size: 8px; }
  .control-head label span { font-size: 7px; }
  .control-head output { font-size: 8px; }
  .control-value small { font-size: 5px; }
  .range-ends { font-size: 6px; margin-top: 2px; }
  .readout-section { margin-top: 9px; }
  .section-label { margin-bottom: 5px; font-size: 7px; }
  .section-label span { font-size: 6px; }
  .readout-grid { gap: 5px; }
  .readout-card { padding: 6px 6px 5px; }
  .readout-name { min-height: 18px; font-size: 7px; }
  .readout-name small { font-size: 5px; }
  .readout-value { font-size: 16px; }
  .readout-value span { font-size: 9px; }
  .readout-note { font-size: 6px; margin-top: 3px; }
  .check-row { margin-top: 5px; padding: 5px 6px; font-size: 6px; }
  .check-row b { font-size: 6px; }
  .transport-row { margin-top: 8px; }
  .transport-button, .screenshot-button { height: 27px; padding: 0 7px; font-size: 7px; }
  .transport-button.primary { min-width: 69px; }
  .screenshot-button { font-size: 7px; }
  .switch-row { margin-top: 6px; padding: 6px 1px; }
  .switch-label { font-size: 8px; }
  .real-values-note { margin-top: 7px; padding: 7px; }
  .real-values-note p { font-size: 7px; }
  .real-values-note b { font-size: 6px; }
  .science-panel { margin-top: 7px; }
  .science-panel summary { min-height: 31px; font-size: 9px; }
  .summary-hint { font-size: 6px; }
}
@media (max-width: 370px) {
  .topbar-status { display: none; }
  .stage-tags { max-width: 91px; }
  .tag { font-size: 5px; }
  .stage-foot p { font-size: 7px; }
  .control-panel { max-height: 365px; }
  .transport-button, .screenshot-button { padding: 0 5px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
