:root {
  color-scheme: dark;
  --bg: #07101a;
  --panel: #0c1722;
  --panel-2: #101e2a;
  --line: rgba(158, 190, 203, .14);
  --line-strong: rgba(158, 190, 203, .25);
  --text: #e8f0f2;
  --muted: #91a5ad;
  --quiet: #607580;
  --cyan: #70dce9;
  --amber: #d88a5a;
  --mint: #8fc2b4;
  --radius: 14px;
  --gap: 16px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}
* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: radial-gradient(ellipse at 44% 5%, rgba(30, 62, 76, .25), transparent 43%), var(--bg); }
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, summary:focus-visible, a:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.app-shell { max-width: 1760px; margin: 0 auto; padding: 0 28px 18px; }
.topbar { height: 64px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; gap: 10px; align-items: center; color: var(--text); text-decoration: none; }
.brand-mark { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid rgba(112,220,233,.5); border-radius: 8px; color: var(--cyan); font-size: 13px; font-weight: 800; letter-spacing: -.05em; }
.brand-name { font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.brand-name span { color: var(--muted); font-size: 9px; font-weight: 600; margin-left: 6px; letter-spacing: .16em; }
.top-meta { display: flex; align-items: center; gap: 18px; }
.eyebrow, .kicker, .micro-label { color: #7d99a4; font-size: 9px; font-weight: 750; letter-spacing: .16em; }
.seed-chip { color: var(--quiet); font-size: 9px; letter-spacing: .12em; border: 1px solid var(--line); padding: 7px 10px; border-radius: 999px; }
.seed-chip b { color: #c2d4d9; margin-left: 5px; font-weight: 700; }
.main-layout { display: grid; grid-template-columns: minmax(0, 1fr) 368px; gap: 22px; padding-top: 20px; align-items: start; }
.visual-column { min-width: 0; }
.exhibit-heading { display: flex; justify-content: space-between; align-items: flex-end; margin: 2px 2px 14px; }
.kicker { margin: 0 0 8px; }
h1 { margin: 0; font-size: clamp(27px, 3vw, 40px); line-height: 1; letter-spacing: -.055em; font-weight: 650; }
.subtitle { margin: 7px 0 0; color: #9bb0b7; font-size: 13px; letter-spacing: .01em; }
.model-tag { display: inline-flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid rgba(112,220,233,.25); color: #9bc6ce; border-radius: 999px; font-size: 9px; font-weight: 700; letter-spacing: .14em; white-space: nowrap; }
.model-tag i, .live-dot { width: 6px; height: 6px; display: inline-block; border-radius: 50%; background: #72dce8; box-shadow: 0 0 12px rgba(112,220,233,.8); }
.stage-frame { position: relative; overflow: hidden; border: 1px solid var(--line-strong); border-radius: var(--radius); background: radial-gradient(ellipse at 52% 44%, #142b36 0%, #0b1823 48%, #07111a 100%); box-shadow: 0 24px 60px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.035); }
.stage-topline { height: 38px; position: absolute; inset: 0 0 auto; z-index: 4; display: flex; align-items: center; justify-content: space-between; padding: 0 15px; border-bottom: 1px solid rgba(166,196,207,.1); background: linear-gradient(180deg, rgba(6,15,23,.7), rgba(6,15,23,.14)); pointer-events: none; }
.scene-label, .scene-scale { color: #87a2ac; font-size: 8px; font-weight: 750; letter-spacing: .14em; }
.scene-label { display: inline-flex; gap: 8px; align-items: center; }
.live-dot { width: 5px; height: 5px; }
.viewport { height: clamp(420px, 54vh, 610px); position: relative; overflow: hidden; }
.scene-canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.loading-state { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 14px; color: #9bb3bc; background: #091620; font-size: 11px; letter-spacing: .04em; transition: opacity .35s ease; }
.loading-state.hidden { opacity: 0; pointer-events: none; }
.loader-ring { width: 34px; height: 34px; border: 2px solid rgba(112,220,233,.18); border-top-color: var(--cyan); border-radius: 50%; animation: spin 1.1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.webgl-fallback { position: absolute; z-index: 5; inset: 30% 12%; padding: 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; border: 1px solid rgba(112,220,233,.22); border-radius: 14px; background: rgba(8,19,28,.94); color: var(--muted); font-size: 12px; line-height: 1.6; }
.webgl-fallback strong { color: var(--text); font-size: 16px; }
.hidden { display: none !important; }
.annotation { position: absolute; z-index: 2; display: flex; align-items: center; gap: 7px; color: rgba(174,204,210,.78); font-size: 8px; line-height: 1.55; letter-spacing: .1em; pointer-events: none; text-shadow: 0 1px 5px #07101a; }
.annotation b { color: #d7e6e8; font-size: 9px; font-weight: 650; letter-spacing: .02em; }
.annotation-line { display: block; width: 26px; height: 1px; background: rgba(112,220,233,.7); box-shadow: 0 0 7px rgba(112,220,233,.45); }
.annotation-top { top: 19%; left: 7%; }
.annotation-mid { top: 52%; right: 5%; flex-direction: row-reverse; text-align: right; }
.annotation-mid .annotation-line { background: rgba(216,138,90,.8); }
.annotation-bottom { bottom: 13%; left: 7%; }
.stage-footer { height: 42px; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 0 14px; border-top: 1px solid rgba(166,196,207,.1); background: rgba(5,13,20,.65); }
.legend { display: flex; align-items: center; gap: 18px; color: #8197a0; font-size: 9px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.legend i { width: 7px; height: 7px; display: inline-block; border-radius: 50%; }
.legend-a { background: #62cbdc; box-shadow: 0 0 8px #62cbdc; }
.legend-b { background: #c97a4d; box-shadow: 0 0 8px #c97a4d; }
.legend-c { background: #8db7a7; }
.icon-button, .utility-button { border: 1px solid var(--line-strong); border-radius: 8px; background: rgba(19,34,45,.8); color: #a8bdc3; cursor: pointer; transition: background .2s ease, border-color .2s ease, color .2s ease; }
.icon-button { padding: 6px 9px; font-size: 9px; white-space: nowrap; }
.icon-button span { color: var(--cyan); font-size: 15px; vertical-align: -1px; margin-right: 4px; }
.icon-button:hover, .utility-button:hover { color: var(--text); border-color: rgba(112,220,233,.42); background: #142634; }
.transport-bar { display: grid; grid-template-columns: auto auto minmax(120px,1fr); align-items: center; gap: 20px; padding: 14px 2px 15px; border-bottom: 1px solid var(--line); }
.transport-main { display: flex; gap: 7px; align-items: center; }
.primary-button, .secondary-button { height: 36px; border-radius: 8px; cursor: pointer; font-size: 10px; font-weight: 700; transition: transform .16s ease, background .16s ease, border-color .16s ease; }
.primary-button { min-width: 94px; padding: 0 12px; background: #8cc8c4; border: 1px solid #8cc8c4; color: #09202a; box-shadow: 0 4px 18px rgba(112,220,233,.1); }
.primary-button:hover { background: #a8dfd9; transform: translateY(-1px); }
.primary-button .play-icon { margin-right: 6px; font-size: 11px; }
.secondary-button { padding: 0 11px; border: 1px solid var(--line-strong); background: #0d1a25; color: #b4c6cb; }
.secondary-button:hover { background: #172a37; border-color: rgba(112,220,233,.35); }
.transport-time { min-width: 64px; padding-left: 1px; }
.transport-time .micro-label { display: block; font-size: 8px; }
.transport-time strong { display: block; margin-top: 4px; font-size: 16px; font-weight: 650; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.transport-speed { min-width: 0; }
.transport-speed label { display: flex; justify-content: space-between; color: #8399a2; font-size: 8px; font-weight: 750; letter-spacing: .13em; margin-bottom: 6px; }
.transport-speed label b { color: #c2d9dd; font-size: 9px; letter-spacing: 0; }
input[type="range"] { width: 100%; height: 4px; appearance: none; border-radius: 99px; background: linear-gradient(90deg, #5aaebc, #324c59); outline: none; cursor: pointer; }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 12px; height: 12px; border-radius: 50%; background: #b8e4e4; border: 2px solid #254d59; box-shadow: 0 0 0 3px rgba(112,220,233,.1); }
input[type="range"]::-moz-range-thumb { width: 10px; height: 10px; border-radius: 50%; background: #b8e4e4; border: 2px solid #254d59; box-shadow: 0 0 0 3px rgba(112,220,233,.1); }
.readout-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; padding-top: 12px; }
.readout-card { min-height: 83px; padding: 11px 12px 10px; border: 1px solid var(--line); border-radius: 10px; background: linear-gradient(145deg, rgba(17,32,44,.9), rgba(10,22,32,.75)); }
.readout-label { display: flex; flex-direction: column; gap: 3px; color: #91a7ae; font-size: 8px; font-weight: 750; letter-spacing: .12em; white-space: nowrap; }
.readout-label small { color: #617d88; font-size: 7px; letter-spacing: .14em; }
.readout-card strong { display: inline-block; margin-top: 7px; color: #e5f1f2; font-size: 21px; line-height: 1; font-weight: 620; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.readout-unit { display: block; margin-top: 4px; color: #70858d; font-size: 8px; }
.control-column { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(160deg, rgba(14,27,39,.98), rgba(9,19,29,.98)); box-shadow: 0 18px 50px rgba(0,0,0,.16); overflow: hidden; }
.panel-section { padding: 17px 17px 18px; border-bottom: 1px solid var(--line); }
.section-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.section-heading .kicker { margin-bottom: 5px; font-size: 8px; }
h2 { margin: 0; font-size: 15px; font-weight: 630; letter-spacing: -.025em; }
.section-index { color: #47606b; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.preset-grid { display: grid; grid-template-columns: 1fr; gap: 7px; }
.preset-button { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 48px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px; background: rgba(17,33,45,.64); text-align: left; cursor: pointer; transition: .18s ease; }
.preset-button:hover { border-color: rgba(112,220,233,.3); background: rgba(22,43,56,.82); }
.preset-button.active { border-color: rgba(112,220,233,.45); background: linear-gradient(100deg, rgba(40,85,94,.34), rgba(17,35,47,.8)); box-shadow: inset 2px 0 0 #72dce8; }
.preset-icon { width: 28px; height: 28px; display: grid; place-items: center; flex: 0 0 28px; border-radius: 7px; background: #142a37; font-size: 17px; }
.quiet-icon { color: #82b9c6; }.classic-icon { color: #d58a5b; }.fast-icon { color: #9bc9b4; }
.preset-button b { display: block; color: #d7e5e8; font-size: 10px; font-weight: 650; }
.preset-button small { display: block; margin-top: 3px; color: #8298a1; font-size: 8px; }
.control-list { display: grid; gap: 14px; }
.control-row { min-width: 0; }
.control-label { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.control-label label { color: #bdcdd1; font-size: 10px; font-weight: 560; }
.control-label output { color: #91d1d6; font-size: 10px; font-weight: 700; font-variant-numeric: tabular-nums; }
.range-ends { display: flex; justify-content: space-between; margin-top: 5px; color: #617983; font-size: 8px; font-variant-numeric: tabular-nums; }
.parameter-note { display: flex; align-items: center; gap: 7px; margin: 14px 0 0; color: #7e949d; font-size: 8px; line-height: 1.5; }
.note-dot { width: 5px; height: 5px; border-radius: 50%; background: #d39a65; box-shadow: 0 0 7px rgba(211,154,101,.5); flex: 0 0 5px; }
.textbook-tag { padding: 5px 7px; border: 1px solid rgba(112,220,233,.24); border-radius: 5px; color: #83cbd2; font-size: 7px; font-weight: 800; letter-spacing: .13em; }
.validation-copy { margin: -3px 0 12px; color: #8da3aa; font-size: 9px; line-height: 1.55; }
.validation-values { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 7px; }
.validation-values div { min-width: 0; padding: 8px 7px; border: 1px solid var(--line); border-radius: 7px; background: rgba(7,17,26,.65); }
.validation-values span { display: block; color: #6f8993; font-size: 7px; font-weight: 750; letter-spacing: .13em; }
.validation-values strong { display: block; margin-top: 5px; color: #dcebed; font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.validation-foot { margin-top: 8px; color: #6e858e; font-size: 8px; }
.science-panel { border-bottom: 1px solid var(--line); }
.science-panel summary { display: flex; align-items: center; justify-content: space-between; padding: 16px 17px; cursor: pointer; list-style: none; }
.science-panel summary::-webkit-details-marker { display: none; }
.science-panel summary .kicker { margin-bottom: 4px; font-size: 8px; }
.science-panel summary b { color: #d9e7e9; font-size: 13px; font-weight: 620; }
.chevron { color: #7fa0aa; font-size: 19px; transition: transform .2s ease; }
.science-panel[open] .chevron { transform: rotate(180deg); }
.science-content { padding: 0 17px 17px; color: #9bb0b7; font-size: 9px; line-height: 1.65; }
.science-content h3 { margin: 12px 0 6px; color: #cbdde0; font-size: 10px; font-weight: 700; }
.science-content h3:first-child { margin-top: 0; }
.science-content p { margin: 0 0 9px; }
.science-content ul { margin: 5px 0 10px; padding-left: 16px; }
.science-content li { margin: 4px 0; }
.science-content li b { color: #d0e1e3; }
.equation-block { padding: 8px 10px; margin: 7px 0; border-left: 2px solid rgba(112,220,233,.55); background: rgba(15,35,46,.72); }
.equation-block span { display: block; margin-bottom: 3px; color: #7c9ba5; font-size: 8px; }
.equation-block code { color: #c8e4e6; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 9px; white-space: normal; }
.disclaimer { margin-top: 13px !important; padding-top: 9px; border-top: 1px solid var(--line); color: #6f8790; font-size: 8px; }
.utility-row { display: flex; gap: 8px; padding: 14px 17px 10px; }
.utility-button { flex: 1; min-height: 32px; padding: 0 8px; font-size: 9px; }
.keyboard-hint { margin: 0; padding: 0 17px 15px; color: #5f7781; font-size: 7px; letter-spacing: .09em; line-height: 2; }
kbd { display: inline-block; min-width: 18px; margin-left: 4px; padding: 1px 4px; border: 1px solid rgba(142,173,184,.24); border-radius: 4px; color: #a6bbc1; font-family: inherit; font-size: 7px; text-align: center; }
.app-footer { display: flex; justify-content: space-between; gap: 12px; padding: 16px 2px 0; color: #506773; font-size: 7px; font-weight: 700; letter-spacing: .14em; }
.embed-mode .app-shell { padding: 0 12px 12px; }
.embed-mode .topbar, .embed-mode .app-footer, .embed-mode .exhibit-heading { display: none; }
.embed-mode .main-layout { padding-top: 0; grid-template-columns: minmax(0,1fr) 340px; gap: 12px; }
.embed-mode .viewport { height: min(68vh, 620px); }
.reduced-motion *, .reduced-motion *::before, .reduced-motion *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; transition-duration: .001ms !important; }

@media (max-width: 1120px) {
  .app-shell { padding-left: 18px; padding-right: 18px; }
  .main-layout { grid-template-columns: minmax(0,1fr) 340px; gap: 14px; }
  .transport-bar { grid-template-columns: 1fr auto; row-gap: 12px; }
  .transport-speed { grid-column: 1 / -1; }
  .readout-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .preset-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .main-layout, .embed-mode .main-layout { grid-template-columns: minmax(0,1fr); }
  .control-column { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); align-items: start; }
  .presets-section, .parameter-section { grid-column: span 1; }
  .validation-section, .science-panel, .utility-row, .keyboard-hint { grid-column: 1 / -1; }
  .science-panel { border-top: 1px solid var(--line); }
  .viewport { height: min(58vh, 570px); min-height: 390px; }
  .embed-mode .viewport { height: min(60vh, 540px); }
  .preset-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .app-shell { padding: 0 10px 14px; }
  .topbar { height: 52px; }
  .top-meta { gap: 8px; }
  .top-meta .eyebrow { display: none; }
  .brand-name { font-size: 9px; }
  .brand-name span { font-size: 7px; }
  .seed-chip { padding: 6px 8px; font-size: 8px; }
  .main-layout { padding-top: 14px; gap: 12px; }
  .exhibit-heading { margin: 0 2px 11px; }
  h1 { font-size: 29px; }
  .subtitle { font-size: 11px; }
  .model-tag { padding: 6px 8px; font-size: 7px; }
  .viewport { height: 440px; min-height: 390px; }
  .stage-topline { height: 34px; padding: 0 10px; }
  .scene-label, .scene-scale { font-size: 7px; }
  .annotation { font-size: 7px; }
  .annotation b { font-size: 8px; }
  .annotation-line { width: 16px; }
  .annotation-top { left: 4%; top: 17%; }
  .annotation-mid { right: 3%; top: 51%; }
  .annotation-bottom { left: 4%; bottom: 12%; }
  .stage-footer { height: auto; min-height: 40px; padding: 7px 8px; }
  .legend { flex-wrap: wrap; gap: 7px 10px; font-size: 7px; }
  .legend span { gap: 4px; }
  .legend i { width: 6px; height: 6px; }
  .icon-button { padding: 5px 7px; font-size: 8px; }
  .transport-bar { grid-template-columns: minmax(0,1fr) auto; gap: 10px; padding: 11px 0 12px; }
  .transport-main { gap: 5px; }
  .primary-button, .secondary-button { height: 34px; font-size: 9px; }
  .primary-button { min-width: 78px; padding: 0 8px; }
  .secondary-button { padding: 0 8px; }
  .transport-time strong { font-size: 14px; }
  .transport-speed { grid-column: 1 / -1; }
  .readout-grid { gap: 6px; padding-top: 9px; }
  .readout-card { min-height: 77px; padding: 9px 10px; }
  .readout-label { font-size: 7px; }
  .readout-label small { font-size: 6px; }
  .readout-card strong { font-size: 19px; }
  .readout-unit { font-size: 7px; }
  .control-column { display: block; }
  .panel-section { padding: 15px 14px; }
  .preset-grid { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 5px; }
  .preset-button { min-height: 68px; flex-direction: column; justify-content: center; align-items: flex-start; gap: 5px; padding: 7px; }
  .preset-icon { width: 23px; height: 23px; flex-basis: 23px; font-size: 14px; }
  .preset-button b { font-size: 8px; }
  .preset-button small { font-size: 7px; line-height: 1.3; }
  .control-list { gap: 16px; }
  .validation-values strong { font-size: 11px; }
  .app-footer { flex-direction: column; font-size: 6px; gap: 5px; }
  .embed-mode .app-shell { padding: 0 8px 10px; }
  .embed-mode .main-layout { padding-top: 0; }
}
