:root {
  color-scheme: dark;
  --bg: #06131d;
  --panel: #0b1b27;
  --panel-2: #102432;
  --line: rgba(155, 194, 207, .13);
  --muted: #7895a3;
  --text: #e8f4f4;
  --cyan: #5ce0d1;
  --cyan-dim: #2b9d9d;
  --blue: #69a8d7;
  --gold: #d8b47c;
  --radius: 13px;
  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%; min-height: 100%; background: var(--bg); color: var(--text); }
body { overflow: hidden; }
button, input { font: inherit; }
button { color: inherit; }
.app-shell { width: 100%; height: 100dvh; min-height: 600px; display: flex; flex-direction: column; background: radial-gradient(ellipse at 35% 10%, #0c2531 0, #06131d 52%); }
.topbar { height: 62px; flex: 0 0 62px; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: rgba(5, 16, 24, .72); z-index: 5; }
.brand-lockup, .topbar-right { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 30px; height: 30px; border: 1px solid rgba(92,224,209,.42); border-radius: 9px; display: flex; align-items: center; justify-content: center; gap: 2px; transform: rotate(-5deg); }
.brand-mark span { display: block; width: 3px; border-radius: 4px; background: var(--cyan); transform: skewY(-24deg); }
.brand-mark span:nth-child(1) { height: 9px; opacity: .55; }
.brand-mark span:nth-child(2) { height: 16px; }
.brand-mark span:nth-child(3) { height: 12px; opacity: .72; }
.brand-name { font-size: 10px; font-weight: 800; letter-spacing: .17em; color: #eaf8f7; }
.brand-name span { color: #7895a3; font-weight: 600; }
.brand-sub { margin-top: 3px; color: #587785; font-size: 8px; font-weight: 700; letter-spacing: .18em; }
.live-indicator { display: flex; align-items: center; gap: 8px; color: #8bb4b7; font-size: 9px; font-weight: 800; letter-spacing: .13em; }
.pulse-dot, .live-tag span { width: 6px; height: 6px; display: inline-block; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px rgba(92,224,209,.8); }
.icon-button { width: 32px; height: 32px; display: grid; place-items: center; background: #102431; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; transition: .2s ease; }
.icon-button:hover { border-color: rgba(92,224,209,.5); background: #163442; }
.icon-button svg { width: 17px; height: 17px; fill: none; stroke: #a7c9cb; stroke-width: 1.5; }
.main-layout { min-height: 0; flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 386px; gap: 0; }
.visual-column { min-width: 0; min-height: 0; position: relative; display: flex; flex-direction: column; padding: 22px 22px 14px 26px; }
.scene-heading { flex: 0 0 auto; padding: 0 0 13px 2px; z-index: 2; pointer-events: none; }
.eyebrow, .section-kicker { color: #6e9aa5; font-size: 8px; font-weight: 800; letter-spacing: .18em; }
.eyebrow span { color: var(--cyan); margin: 0 4px; }
.scene-heading h1 { margin: 6px 0 4px; color: #eff8f7; font-size: clamp(27px, 3vw, 39px); font-weight: 650; letter-spacing: -.045em; line-height: 1.04; }
.scene-heading h1 em { color: var(--cyan); font-style: normal; font-weight: 450; }
.scene-heading p { margin: 0; color: #88a6b1; font-size: 11px; letter-spacing: .01em; }
.scene-root { position: relative; min-height: 0; flex: 1; overflow: hidden; border: 1px solid rgba(100, 173, 180, .16); border-radius: 16px; background: radial-gradient(ellipse at 50% 40%, #123f4a 0%, #092b39 38%, #041723 100%); box-shadow: 0 18px 55px rgba(0,0,0,.22), inset 0 0 70px rgba(42,141,150,.08); }
.scene-root canvas { display: block; width: 100%; height: 100%; outline: none; }
.scene-loading, .scene-error { position: absolute; z-index: 8; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: rgba(3, 18, 27, .92); color: #8db8bd; font-size: 11px; letter-spacing: .06em; }
.loading-orbit { width: 36px; height: 36px; border: 1px solid rgba(92,224,209,.22); border-top-color: var(--cyan); border-radius: 50%; animation: spin 1.2s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.scene-error { color: #e5c9a0; text-align: center; padding: 28px; }
.scene-error strong { color: #f0e0c8; font-size: 14px; }
.scene-error span { max-width: 360px; line-height: 1.6; color: #9cb1b7; }
.hidden { display: none !important; }
.scene-label { position: absolute; z-index: 3; pointer-events: none; display: flex; flex-direction: column; gap: 3px; text-shadow: 0 1px 12px rgba(0,0,0,.8); }
.scene-label b { font-size: 8px; color: #d2eeea; letter-spacing: .16em; font-weight: 800; }
.scene-label small { color: #83aab2; font-size: 9px; letter-spacing: .02em; }
.label-wind { top: 18%; left: 7%; }
.label-line { display: block; width: 32px; height: 1px; margin-bottom: 4px; background: linear-gradient(90deg, var(--gold), transparent); }
.label-streak { top: 32%; right: 6%; }
.label-roll { bottom: 25%; left: 6%; }
.label-dot { width: 5px; height: 5px; margin-bottom: 4px; border-radius: 50%; background: #e4f2dc; box-shadow: 0 0 9px #e4f2dc; }
.label-dot.cyan { background: var(--cyan); box-shadow: 0 0 9px var(--cyan); }
.scene-caption { position: absolute; left: 15px; right: 15px; bottom: 12px; display: flex; justify-content: space-between; color: rgba(149,190,195,.55); font-size: 7px; font-weight: 800; letter-spacing: .15em; pointer-events: none; }
.caption-key { color: rgba(92,224,209,.7); }
.compass { position: absolute; top: 16px; right: 17px; width: 31px; height: 39px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: rgba(183,221,218,.55); font-size: 8px; pointer-events: none; }
.compass-n { font-size: 7px; font-weight: 800; }
.compass-arrow { font-size: 17px; line-height: 15px; color: rgba(92,224,209,.75); }
.compass-e { font-size: 7px; }
.scene-scale { position: absolute; right: 18px; bottom: 42px; display: flex; align-items: center; gap: 6px; color: rgba(164,201,201,.6); font-size: 8px; pointer-events: none; }
.scene-scale i { display: block; width: 34px; height: 1px; background: rgba(164,201,201,.65); }
.scene-footer { height: 35px; flex: 0 0 35px; display: flex; align-items: end; justify-content: space-between; color: #678692; font-size: 9px; }
.footer-note { display: flex; align-items: center; gap: 7px; }
.mini-wave { color: var(--cyan); font-size: 18px; line-height: 0; }
.camera-tools { display: flex; align-items: center; gap: 12px; }
.text-button { border: 0; background: none; color: #7f9ca7; font-size: 9px; cursor: pointer; padding: 4px 2px; transition: color .18s ease; }
.text-button:hover { color: var(--cyan); }
.text-button span { color: var(--cyan); font-size: 13px; vertical-align: -1px; }
.footer-separator { width: 1px; height: 12px; background: var(--line); }
.quality-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 7px var(--cyan); }
.control-panel { min-height: 0; background: linear-gradient(180deg, rgba(11,28,40,.98), rgba(8,23,34,.98)); border-left: 1px solid var(--line); box-shadow: -14px 0 36px rgba(0,0,0,.13); }
.panel-scroll { height: 100%; overflow-y: auto; padding: 22px 20px 18px; scrollbar-width: thin; scrollbar-color: #24414d transparent; }
.panel-section { padding-bottom: 19px; border-bottom: 1px solid var(--line); margin-bottom: 17px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; }
.section-heading h2 { margin: 4px 0 0; color: #e4f0ef; font-size: 16px; letter-spacing: -.02em; font-weight: 620; }
.section-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; border: 1px solid rgba(92,224,209,.2); color: var(--cyan); font-size: 19px; }
.preset-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-bottom: 17px; }
.preset-button { min-height: 29px; border: 1px solid rgba(130,171,182,.14); border-radius: 7px; background: rgba(20,44,58,.62); color: #7695a1; font-size: 8px; font-weight: 700; cursor: pointer; transition: .18s ease; }
.preset-button:hover { border-color: rgba(92,224,209,.42); color: #c3e8e3; }
.preset-button.active { color: #baf5eb; border-color: rgba(92,224,209,.43); background: rgba(44,132,131,.19); box-shadow: inset 0 0 16px rgba(92,224,209,.06); }
.control-list { display: flex; flex-direction: column; gap: 13px; }
.range-control { display: block; }
.range-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #b7cbd0; font-size: 10px; font-weight: 550; }
.range-top output { color: #e5f4f1; font-size: 10px; font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }
.range-top output i { color: #71919d; font-style: normal; font-size: 9px; font-weight: 500; }
input[type="range"] { display: block; width: 100%; height: 15px; margin: 6px 0 1px; padding: 0; appearance: none; background: transparent; cursor: pointer; accent-color: var(--cyan); }
input[type="range"]::-webkit-slider-runnable-track { height: 3px; border-radius: 10px; background: linear-gradient(90deg, #3dbab0, #285967); }
input[type="range"]::-moz-range-track { height: 3px; border-radius: 10px; background: linear-gradient(90deg, #3dbab0, #285967); }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 11px; height: 11px; margin-top: -4px; border: 2px solid #c8fff4; border-radius: 50%; background: #39cbbd; box-shadow: 0 0 0 3px rgba(57,203,189,.14), 0 0 10px rgba(57,203,189,.3); }
input[type="range"]::-moz-range-thumb { width: 8px; height: 8px; border: 2px solid #c8fff4; border-radius: 50%; background: #39cbbd; box-shadow: 0 0 0 3px rgba(57,203,189,.14); }
input[type="range"]:focus-visible { outline: 1px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }
.range-limits { display: flex; justify-content: space-between; color: #557482; font-size: 7px; letter-spacing: .1em; }
.compact-heading { margin-bottom: 12px; }
.time-readout { color: #88b9b8; font-size: 9px; font-weight: 700; font-variant-numeric: tabular-nums; }
.playback-buttons { display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: 6px; margin-bottom: 13px; }
.play-button, .secondary-button { min-height: 34px; border-radius: 8px; cursor: pointer; font-size: 9px; font-weight: 750; transition: .18s ease; }
.play-button { display: flex; align-items: center; justify-content: center; gap: 8px; color: #06252b; background: linear-gradient(135deg, #71e6d3, #3ab9b4); border: 1px solid rgba(130,255,235,.35); box-shadow: 0 4px 14px rgba(51,190,180,.12); }
.play-button:hover { filter: brightness(1.08); transform: translateY(-1px); }
.play-icon { font-size: 12px; }
.secondary-button { border: 1px solid rgba(130,171,182,.17); color: #9db7bf; background: #112a38; }
.secondary-button:hover { color: #e5f5f1; border-color: rgba(92,224,209,.35); }
.secondary-button span { color: var(--cyan); margin-left: 4px; }
.speed-control { padding-top: 2px; }
.live-tag { display: flex; align-items: center; gap: 6px; color: #80aaa9; font-size: 7px; font-weight: 800; letter-spacing: .13em; }
.live-tag span { width: 5px; height: 5px; }
.readout-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.readout-card { min-height: 74px; padding: 10px 10px 8px; border: 1px solid rgba(131,177,186,.12); border-radius: 9px; background: linear-gradient(145deg, rgba(18,45,58,.86), rgba(12,32,45,.7)); }
.readout-card > span { display: block; color: #6f98a4; font-size: 7px; font-weight: 800; letter-spacing: .12em; }
.readout-card strong { display: block; margin: 6px 0 3px; color: #d9f4ed; font-size: 19px; font-weight: 650; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.readout-card strong small { color: #83a8ae; font-size: 9px; font-weight: 550; letter-spacing: 0; }
.readout-card i { display: block; color: #668895; font-size: 8px; font-style: normal; }
.validation-card { margin: 0 0 16px; padding: 13px 13px 11px; border: 1px solid rgba(216,180,124,.19); border-radius: 10px; background: linear-gradient(135deg, rgba(73,57,38,.22), rgba(22,37,45,.65)); }
.validation-top { display: flex; align-items: center; justify-content: space-between; }
.validation-top .section-kicker { color: #b99c70; }
.validation-status { padding: 3px 6px; border-radius: 4px; color: #c6e5d7; background: rgba(78,160,129,.13); font-size: 7px; font-weight: 800; letter-spacing: .1em; }
.validation-card h3 { margin: 8px 0 4px; color: #e5e9df; font-size: 12px; font-weight: 650; }
.validation-card p { margin: 0; color: #849da3; font-size: 8px; line-height: 1.5; }
.validation-values { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 11px; }
.validation-values > div { padding: 7px 8px; border-radius: 6px; background: rgba(2,13,19,.25); }
.validation-values small { display: block; color: #77929a; font-size: 7px; letter-spacing: .12em; }
.validation-values strong { display: block; margin-top: 4px; color: #e4eee8; font-size: 12px; font-variant-numeric: tabular-nums; }
.validation-values i { color: #829ba0; font-size: 8px; font-style: normal; font-weight: 500; }
.validation-bottom { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 9px; color: #779099; font-size: 7px; letter-spacing: .08em; }
.validation-bottom b { color: #b9a47e; font-weight: 750; }
.validation-bottom strong { color: #d8c39c; font-size: 9px; letter-spacing: 0; white-space: nowrap; }
.science-panel { margin: 0 0 14px; border: 1px solid rgba(130,171,182,.14); border-radius: 10px; background: rgba(14,34,46,.55); overflow: hidden; }
.science-panel summary { display: flex; justify-content: space-between; align-items: center; padding: 11px 12px; cursor: pointer; list-style: none; }
.science-panel summary::-webkit-details-marker { display: none; }
.science-panel summary > span:first-child { display: flex; flex-direction: column; gap: 4px; }
.science-panel summary b { color: #cfe2df; font-size: 11px; font-weight: 650; }
.details-chevron { color: var(--cyan); font-size: 17px; transition: transform .2s ease; }
.science-panel[open] .details-chevron { transform: rotate(180deg); }
.science-content { padding: 0 12px 13px; color: #8aa5ac; font-size: 8px; line-height: 1.6; }
.science-content h4 { margin: 12px 0 4px; color: #c4dcd9; font-size: 9px; font-weight: 750; }
.science-content p { margin: 0 0 7px; }
.science-content b { color: #b5d9d3; }
.equation { margin: 6px 0; padding: 8px; border-left: 2px solid rgba(92,224,209,.55); border-radius: 0 5px 5px 0; background: rgba(1,14,22,.35); color: #c6f1e7; font-family: Georgia, serif; font-size: 11px; letter-spacing: .02em; }
.science-content ul { padding-left: 14px; margin: 4px 0 10px; }
.science-content li { margin-bottom: 4px; }
.legend-row { display: flex; align-items: center; gap: 7px; margin: 5px 0; }
.legend-dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; }
.legend-dot.foam { background: #e4f2df; box-shadow: 0 0 6px #e4f2df; }
.legend-dot.roll { background: #57d5cc; box-shadow: 0 0 6px #57d5cc; }
.legend-dot.tracer { background: #72aee1; box-shadow: 0 0 6px #72aee1; }
.source-note { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); color: #637f8a; font-size: 7px; }
.panel-footnote { color: #4f6e7a; font-size: 7px; font-weight: 750; letter-spacing: .13em; text-align: center; }
.panel-footnote span { color: var(--cyan); margin: 0 4px; }
.toast { position: fixed; z-index: 20; left: 50%; bottom: 22px; transform: translate(-50%, 12px); opacity: 0; pointer-events: none; padding: 9px 14px; border: 1px solid rgba(92,224,209,.3); border-radius: 8px; background: #102a36; color: #c8f0e9; font-size: 10px; box-shadow: 0 8px 25px rgba(0,0,0,.3); transition: .22s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
button:focus-visible, summary:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

@media (max-width: 1100px) {
  .main-layout { grid-template-columns: minmax(0, 1fr) 350px; }
  .visual-column { padding-left: 18px; padding-right: 16px; }
  .panel-scroll { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 820px) {
  body { overflow: auto; }
  .app-shell { height: auto; min-height: 100dvh; }
  .topbar { height: 54px; flex-basis: 54px; padding: 0 14px; }
  .main-layout { display: flex; flex-direction: column; }
  .visual-column { height: 57dvh; min-height: 390px; padding: 16px 12px 8px; }
  .scene-heading { padding-bottom: 10px; }
  .scene-heading h1 { font-size: 30px; }
  .scene-heading p { max-width: 340px; font-size: 10px; }
  .scene-label b { font-size: 7px; }
  .scene-label small { font-size: 8px; }
  .scene-caption { font-size: 6px; }
  .scene-footer { height: 29px; flex-basis: 29px; font-size: 8px; }
  .control-panel { border-left: 0; border-top: 1px solid var(--line); min-height: 0; }
  .panel-scroll { height: auto; overflow: visible; padding: 18px 14px 24px; }
  .control-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 15px; row-gap: 13px; }
  .control-section { padding-bottom: 17px; }
  .playback-section { padding-bottom: 16px; }
  .readout-card { min-height: 70px; }
  .validation-bottom { font-size: 6px; }
}
@media (max-width: 460px) {
  .brand-name { font-size: 9px; }
  .brand-sub { font-size: 7px; }
  .topbar-right { gap: 9px; }
  .live-indicator { font-size: 8px; }
  .visual-column { height: 55dvh; min-height: 390px; padding: 14px 9px 7px; }
  .scene-heading h1 { font-size: 27px; }
  .scene-heading p { font-size: 9px; }
  .label-wind { top: 19%; left: 5%; }
  .label-streak { top: 35%; right: 4%; }
  .label-roll { bottom: 27%; left: 5%; }
  .scene-label b { font-size: 6px; letter-spacing: .12em; }
  .scene-label small { font-size: 7px; }
  .scene-caption { left: 9px; right: 9px; bottom: 8px; letter-spacing: .09em; }
  .scene-scale { bottom: 31px; right: 10px; }
  .compass { right: 10px; top: 9px; }
  .scene-footer { font-size: 7px; }
  .camera-tools { gap: 7px; }
  .text-button { font-size: 8px; }
  .footer-note { max-width: 52%; }
  .panel-scroll { padding: 16px 12px 22px; }
  .control-list { column-gap: 12px; }
  .range-top { font-size: 9px; }
  .range-top output { font-size: 9px; }
  .range-limits { font-size: 6px; }
  .readout-card { padding: 9px 8px 7px; }
  .readout-card strong { font-size: 17px; }
  .validation-bottom { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
body.embed .topbar, body.embed .scene-heading, body.embed .scene-footer { display: none; }
body.embed .visual-column { padding: 0; }
body.embed .scene-root { border: 0; border-radius: 0; }
body.embed .main-layout { grid-template-columns: minmax(0, 1fr) 340px; }
@media (max-width: 820px) { body.embed .main-layout { display: flex; } body.embed .visual-column { height: 54dvh; } }
