:root {
  color-scheme: dark;
  --bg: #080d18;
  --panel: #0e1625;
  --panel-2: #111d2e;
  --panel-3: #142338;
  --line: rgba(150, 178, 210, .13);
  --line-strong: rgba(150, 178, 210, .22);
  --text: #e8eef7;
  --muted: #8d9bb0;
  --muted-2: #65748b;
  --cyan: #61d8e7;
  --orange: #ff9b61;
  --violet: #b9a4ff;
  --green: #8be0b3;
  --radius: 12px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { margin: 0; min-width: 320px; min-height: 100vh; color: var(--text); background: radial-gradient(ellipse at 42% -18%, rgba(39, 70, 108, .26), transparent 52%), var(--bg); }
button, input { font: inherit; }
button { color: inherit; }
.app-shell { max-width: 1800px; margin: 0 auto; padding: 0 28px 20px; }
.topbar { height: 66px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand-lockup { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 27px; height: 27px; position: relative; display: flex; align-items: flex-end; justify-content: center; gap: 2px; padding: 4px 3px; border: 1px solid rgba(97,216,231,.4); border-radius: 8px; background: rgba(97,216,231,.06); overflow: hidden; }
.brand-mark span { width: 4px; border-radius: 3px 3px 1px 1px; background: var(--cyan); box-shadow: 0 0 10px rgba(97,216,231,.4); }
.brand-mark span:nth-child(1) { height: 9px; opacity: .65; }
.brand-mark span:nth-child(2) { height: 16px; }
.brand-mark span:nth-child(3) { height: 12px; opacity: .8; }
.eyebrow, .section-kicker { color: #8da3bb; font-size: 9px; font-weight: 800; letter-spacing: .18em; }
.eyebrow span { color: var(--cyan); padding: 0 4px; }
.brand-sub { color: #63748b; font-size: 8px; font-weight: 700; letter-spacing: .16em; margin-top: 3px; }
.topbar-right { display: flex; align-items: center; gap: 18px; }
.live-indicator { display: flex; align-items: center; gap: 8px; color: #9db0c4; font-size: 9px; font-weight: 800; letter-spacing: .13em; }
.live-dot, .mode-pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 11px rgba(139,224,179,.75); }
.seed-chip { border: 1px solid var(--line-strong); border-radius: 6px; padding: 6px 9px; color: #778ba4; font-size: 8px; letter-spacing: .12em; }
.seed-chip strong { color: #c7d4e4; margin-left: 5px; font-size: 9px; }
.main-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; align-items: start; padding-top: 20px; }
.exhibit-column { min-width: 0; }
.title-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 0 2px 14px; }
.title-row h1 { margin: 6px 0 2px; font-size: clamp(22px, 2.3vw, 30px); line-height: 1.12; letter-spacing: -.045em; font-weight: 680; }
.subtitle { margin: 0; color: var(--muted); font-size: 12px; }
.mode-pill { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; border: 1px solid rgba(97,216,231,.2); background: rgba(97,216,231,.055); border-radius: 20px; padding: 8px 11px; color: #9adce3; font-size: 8px; font-weight: 800; letter-spacing: .13em; }
.mode-pulse { background: var(--cyan); box-shadow: 0 0 10px rgba(97,216,231,.8); }
.scene-frame { height: clamp(410px, 48vw, 600px); min-height: 410px; position: relative; overflow: hidden; border: 1px solid rgba(116, 151, 186, .18); border-radius: 14px; background: radial-gradient(ellipse at 50% 55%, #14283a 0%, #0c1727 55%, #08111e 100%); box-shadow: 0 22px 70px rgba(0,0,0,.24), inset 0 1px rgba(255,255,255,.025); }
.scene-host { position: absolute; inset: 0; z-index: 1; }
.scene-host canvas { width: 100%; height: 100%; display: block; outline: none; }
.scene-topline { position: absolute; z-index: 4; top: 15px; left: 16px; right: 16px; display: flex; align-items: center; justify-content: space-between; pointer-events: none; }
.scene-chip { display: flex; align-items: center; gap: 8px; color: #b4c7d9; background: rgba(7,15,26,.65); border: 1px solid rgba(161,190,218,.14); border-radius: 5px; padding: 7px 9px; font-size: 8px; font-weight: 800; letter-spacing: .14em; backdrop-filter: blur(10px); }
.chip-square { width: 6px; height: 6px; border: 1px solid var(--cyan); background: rgba(97,216,231,.3); box-shadow: 0 0 8px rgba(97,216,231,.45); }
.scene-topright { display: flex; align-items: center; gap: 10px; color: #71849b; font-size: 8px; font-weight: 800; letter-spacing: .12em; text-shadow: 0 1px 4px #07101c; }
.separator { height: 10px; width: 1px; background: rgba(150,178,210,.25); }
.scene-vignette { position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(180deg, rgba(6,12,22,.24), transparent 18%, transparent 78%, rgba(5,11,20,.48)); }
.scene-annotations { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.annotation { position: absolute; display: flex; align-items: center; gap: 7px; color: rgba(188,211,227,.8); font-size: 8px; font-weight: 800; letter-spacing: .12em; text-shadow: 0 1px 6px #08111c; white-space: nowrap; opacity: 0; transition: opacity .25s ease; }
.annotation.visible { opacity: 1; }
.annotation-line { display: block; width: 24px; height: 1px; background: linear-gradient(90deg, var(--cyan), transparent); }
.scene-legend { position: absolute; z-index: 4; bottom: 16px; left: 17px; display: flex; flex-wrap: wrap; gap: 14px; color: #879bb0; font-size: 7px; font-weight: 800; letter-spacing: .1em; pointer-events: none; }
.scene-legend span { display: flex; align-items: center; gap: 6px; }
.legend-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.legend-dot.magma { background: #ff8955; box-shadow: 0 0 8px #ff8955; }
.legend-dot.seismic { background: #62d8e7; box-shadow: 0 0 8px #62d8e7; }
.legend-dot.rock { background: #857a70; }
.scene-controls-hint { position: absolute; z-index: 4; bottom: 17px; right: 17px; color: #687d94; font-size: 7px; font-weight: 800; letter-spacing: .1em; pointer-events: none; }
.scene-controls-hint span { color: #3e6079; padding: 0 4px; }
.mouse-icon { font-size: 11px; color: #87b7c4; margin-right: 4px; }
.webgl-message { position: absolute; z-index: 8; inset: auto 18px 54px; padding: 10px 12px; border: 1px solid rgba(255,155,97,.3); border-radius: 8px; background: rgba(42,23,18,.88); color: #ffd0b1; font-size: 11px; line-height: 1.5; }
.telemetry-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.telemetry-card { min-width: 0; padding: 12px 12px 10px; border: 1px solid var(--line); border-radius: 9px; background: linear-gradient(145deg, rgba(17,29,46,.94), rgba(11,20,33,.95)); }
.telemetry-label { min-height: 20px; color: #8fa1b7; font-size: 7px; line-height: 1.4; font-weight: 800; letter-spacing: .1em; }
.unit-tag { margin-left: 4px; color: #5c7188; font-size: 6px; border: 1px solid rgba(140,163,190,.16); border-radius: 3px; padding: 2px 3px; vertical-align: 1px; }
.telemetry-value { display: flex; align-items: baseline; gap: 5px; margin-top: 7px; font-variant-numeric: tabular-nums; }
.telemetry-value span { color: #e2ebf6; font-size: clamp(18px, 2vw, 24px); font-weight: 650; letter-spacing: -.045em; }
.telemetry-value small { color: #7f93aa; font-size: 9px; font-weight: 600; }
.telemetry-foot { margin-top: 5px; color: #65778d; font-size: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.accent-cyan .telemetry-value span { color: var(--cyan); }
.accent-orange .telemetry-value span { color: var(--orange); }
.accent-violet .telemetry-value span { color: var(--violet); }
.accent-green .telemetry-value span { color: var(--green); }
.validation-panel { margin-top: 12px; padding: 15px 17px 13px; border: 1px solid var(--line); border-radius: 10px; background: rgba(13,22,36,.82); }
.validation-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.validation-heading h2 { margin: 5px 0 0; font-size: 14px; letter-spacing: -.02em; font-weight: 630; }
.validation-status { display: flex; align-items: center; gap: 6px; color: #8bcfb0; font-size: 7px; font-weight: 800; letter-spacing: .12em; border: 1px solid rgba(139,224,179,.18); border-radius: 4px; padding: 6px 7px; }
.status-check { font-size: 10px; }
.validation-values { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-top: 13px; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.validation-values > div { display: flex; flex-direction: column; gap: 6px; }
.validation-label { color: #75879e; font-size: 7px; font-weight: 800; letter-spacing: .11em; }
.validation-values strong { font-size: 16px; font-weight: 650; font-variant-numeric: tabular-nums; }
.validation-values strong small { color: #8498af; font-size: 9px; font-weight: 500; }
.diff-value { color: var(--green); }
.validation-note { color: #73869c; font-size: 9px; line-height: 1.55; margin: 10px 0 0; }
.validation-note em { color: #b8c9d9; }
.science-panel { margin-top: 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(13,22,36,.78); overflow: hidden; }
.science-panel summary { min-height: 58px; display: flex; align-items: center; gap: 11px; padding: 11px 15px; cursor: pointer; list-style: none; }
.science-panel summary::-webkit-details-marker { display: none; }
.science-icon { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 7px; color: var(--cyan); border: 1px solid rgba(97,216,231,.22); background: rgba(97,216,231,.06); font-size: 17px; }
.science-panel summary strong { display: block; font-size: 11px; font-weight: 650; }
.science-panel summary small { display: block; color: #74869b; font-size: 8px; margin-top: 3px; }
.summary-chevron { margin-left: auto; color: #8195ab; font-size: 17px; transition: transform .2s ease; }
.science-panel[open] .summary-chevron { transform: rotate(180deg); }
.science-content { border-top: 1px solid var(--line); padding: 14px 15px 16px; }
.science-block { margin-bottom: 15px; }
.science-block h3 { margin: 0 0 7px; color: #b5c8db; font-size: 10px; font-weight: 750; letter-spacing: .04em; }
.equation { padding: 10px 12px; border: 1px solid rgba(97,216,231,.12); border-radius: 6px; background: rgba(97,216,231,.035); color: #a9e3e9; font-family: Georgia, "Times New Roman", serif; font-size: 14px; letter-spacing: .015em; }
.science-block p { color: #8293a8; font-size: 9px; line-height: 1.6; margin: 7px 0 0; }
.science-block p strong { color: #c5d4e3; font-weight: 600; }
.science-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.science-notes > div { display: flex; flex-direction: column; gap: 4px; }
.science-notes b { color: #657c94; font-size: 7px; letter-spacing: .13em; }
.science-notes span { color: #a1b2c4; font-size: 8px; line-height: 1.45; }
.science-disclaimer { color: #64788f; font-size: 8px; margin: 13px 0 0; }
.control-panel { position: sticky; top: 12px; min-width: 0; border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(160deg, rgba(16,27,43,.98), rgba(10,18,30,.98)); box-shadow: 0 18px 55px rgba(0,0,0,.17); overflow: hidden; }
.panel-header { display: flex; align-items: center; justify-content: space-between; padding: 17px 17px 13px; border-bottom: 1px solid var(--line); }
.panel-header h2 { margin: 5px 0 0; font-size: 16px; letter-spacing: -.025em; font-weight: 650; }
.panel-icon { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 8px; color: var(--cyan); background: rgba(97,216,231,.07); border: 1px solid rgba(97,216,231,.16); font-size: 20px; }
.transport-row { display: grid; grid-template-columns: 1.15fr .9fr .9fr; gap: 6px; padding: 12px 13px; border-bottom: 1px solid var(--line); }
.transport-btn { display: flex; align-items: center; justify-content: center; gap: 6px; height: 34px; border: 1px solid rgba(148,174,204,.16); border-radius: 6px; background: rgba(27,43,63,.72); color: #a9b9cb; font-size: 8px; font-weight: 800; letter-spacing: .09em; cursor: pointer; transition: background .18s ease, border-color .18s ease, transform .18s ease; }
.transport-btn:hover, .utility-btn:hover { background: rgba(47,71,97,.65); border-color: rgba(97,216,231,.35); }
.transport-btn:active, .preset-btn:active, .utility-btn:active, .export-btn:active { transform: translateY(1px); }
.transport-btn.primary { color: #07141d; border-color: transparent; background: linear-gradient(100deg, #7be2e8, #78c8df); box-shadow: 0 4px 16px rgba(97,216,231,.12); }
.transport-btn.primary:hover { background: linear-gradient(100deg, #a0eff0, #91d9eb); }
.play-icon { font-size: 12px; }
.transport-btn span:last-child { color: #7e99b3; font-size: 13px; }
.control-section { padding: 13px 16px 14px; border-bottom: 1px solid var(--line); }
.control-section-title { display: flex; align-items: center; gap: 8px; margin-bottom: 13px; color: #9db0c5; font-size: 8px; font-weight: 800; letter-spacing: .13em; }
.control-section-title span { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; color: #6fcbd8; background: rgba(97,216,231,.07); font-size: 7px; }
.range-control { margin-top: 11px; }
.range-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.range-head label { color: #bdc9d7; font-size: 9px; font-weight: 550; }
.range-head output { color: #7edce5; font-size: 9px; font-weight: 700; font-variant-numeric: tabular-nums; }
input[type="range"] { appearance: none; -webkit-appearance: none; width: 100%; height: 16px; margin: 7px 0 0; background: transparent; cursor: pointer; touch-action: pan-y; }
input[type="range"]::-webkit-slider-runnable-track { height: 3px; border-radius: 5px; background: linear-gradient(90deg, rgba(97,216,231,.65), rgba(97,216,231,.17)); }
input[type="range"]::-moz-range-track { height: 3px; border-radius: 5px; background: linear-gradient(90deg, rgba(97,216,231,.65), rgba(97,216,231,.17)); }
input[type="range"]::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 11px; height: 11px; margin-top: -4px; border-radius: 50%; background: #a6eff0; border: 2px solid #153443; box-shadow: 0 0 0 2px rgba(97,216,231,.15), 0 0 10px rgba(97,216,231,.35); }
input[type="range"]::-moz-range-thumb { width: 9px; height: 9px; border-radius: 50%; background: #a6eff0; border: 2px solid #153443; box-shadow: 0 0 0 2px rgba(97,216,231,.15); }
input[type="range"]:focus-visible { outline: 1px solid var(--cyan); outline-offset: 4px; border-radius: 5px; }
.range-scale { display: flex; justify-content: space-between; color: #5d7188; font-size: 7px; margin-top: -1px; }
.presets-section { padding-bottom: 12px; }
.preset-grid { display: grid; gap: 6px; }
.preset-btn { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 9px; text-align: left; border: 1px solid rgba(144,170,198,.13); border-radius: 7px; background: rgba(20,34,52,.62); cursor: pointer; transition: border-color .18s ease, background .18s ease; }
.preset-btn:hover { border-color: rgba(97,216,231,.32); }
.preset-btn.active { border-color: rgba(97,216,231,.38); background: rgba(54,106,121,.14); box-shadow: inset 2px 0 var(--cyan); }
.preset-swatch { width: 8px; height: 25px; border-radius: 4px; flex: 0 0 auto; }
.preset-swatch.quiet { background: linear-gradient(#7a9cae, #354b61); }
.preset-swatch.resonant { background: linear-gradient(#ffc27b, #ef6d45); box-shadow: 0 0 9px rgba(255,146,86,.25); }
.preset-swatch.gasrich { background: linear-gradient(#9a8be2, #4f8caa); }
.preset-btn b { display: block; color: #c6d3e1; font-size: 9px; font-weight: 650; }
.preset-btn small { display: block; margin-top: 3px; color: #73879e; font-size: 7px; }
.panel-footer-controls { padding: 13px 15px 15px; background: rgba(7,14,24,.25); }
.speed-control { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 8px; }
.speed-control label { color: #8396ac; font-size: 7px; font-weight: 800; letter-spacing: .12em; }
.speed-control output { color: #b9c9d8; font-size: 9px; font-weight: 700; }
.speed-control input { grid-column: 1 / -1; }
.utility-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.utility-btn { display: flex; justify-content: center; align-items: center; gap: 5px; height: 30px; border: 1px solid rgba(148,174,204,.15); border-radius: 6px; background: rgba(27,43,63,.5); color: #8ea2b8; font-size: 7px; font-weight: 800; letter-spacing: .06em; cursor: pointer; transition: background .18s ease, border-color .18s ease; }
.utility-btn span { color: var(--cyan); font-size: 11px; }
.export-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 34px; margin-top: 7px; border: 1px solid rgba(97,216,231,.22); border-radius: 6px; background: rgba(97,216,231,.07); color: #a5dfe4; font-size: 8px; font-weight: 800; letter-spacing: .12em; cursor: pointer; transition: background .18s ease, border-color .18s ease; }
.export-btn:hover { background: rgba(97,216,231,.13); border-color: rgba(97,216,231,.42); }
.export-btn span { font-size: 14px; }
.footer-bar { display: flex; flex-wrap: wrap; gap: 10px 23px; align-items: center; margin-top: 16px; padding: 11px 2px 0; border-top: 1px solid var(--line); color: #5f7288; font-size: 7px; font-weight: 750; letter-spacing: .1em; }
.footer-bar b { color: #8fa2b8; margin-left: 4px; font-weight: 800; }
.footer-right { margin-left: auto; color: #637a8d; }
button:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
@media (max-width: 1120px) {
  .app-shell { padding: 0 18px 18px; }
  .main-layout { grid-template-columns: minmax(0,1fr) 300px; gap: 12px; }
  .telemetry-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .scene-frame { height: 480px; }
}
@media (max-width: 850px) {
  .main-layout { grid-template-columns: minmax(0,1fr); }
  .control-panel { position: static; }
  .scene-frame { height: min(66vw, 540px); min-height: 380px; }
  .control-panel { display: grid; grid-template-columns: 1fr 1fr; }
  .panel-header, .transport-row, .panel-footer-controls { grid-column: 1 / -1; }
  .control-section { border-right: 1px solid var(--line); }
  .control-section:nth-of-type(4) { border-right: 0; }
  .presets-section { grid-column: 1 / -1; border-right: 0; }
  .preset-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .preset-btn { min-height: 55px; }
}
@media (max-width: 560px) {
  .app-shell { padding: 0 10px 14px; }
  .topbar { height: 58px; }
  .topbar-right { gap: 8px; }
  .brand-sub { font-size: 7px; }
  .seed-chip { padding: 5px 6px; font-size: 7px; }
  .live-indicator { font-size: 7px; }
  .main-layout { padding-top: 13px; gap: 11px; }
  .title-row { align-items: flex-start; padding-bottom: 10px; }
  .title-row h1 { font-size: 22px; }
  .subtitle { font-size: 10px; }
  .mode-pill { margin-top: 14px; padding: 7px 8px; font-size: 6px; gap: 6px; }
  .mode-pulse { width: 5px; height: 5px; }
  .scene-frame { height: 410px; min-height: 410px; border-radius: 10px; }
  .scene-topline { top: 10px; left: 10px; right: 10px; }
  .scene-chip { font-size: 7px; padding: 6px 7px; }
  .scene-topright { font-size: 6px; gap: 6px; }
  .scale-label { display: none; }
  .scene-legend { left: 10px; bottom: 11px; gap: 9px; font-size: 6px; }
  .scene-controls-hint { right: 10px; bottom: 11px; font-size: 6px; }
  .telemetry-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 6px; margin-top: 7px; }
  .telemetry-card { padding: 10px 9px 8px; }
  .telemetry-label { font-size: 6px; }
  .telemetry-value span { font-size: 21px; }
  .telemetry-foot { font-size: 7px; }
  .validation-panel { padding: 12px 11px; }
  .validation-heading { align-items: flex-start; }
  .validation-heading h2 { font-size: 12px; }
  .validation-status { font-size: 6px; padding: 5px; }
  .validation-values { gap: 5px; }
  .validation-label { font-size: 6px; line-height: 1.4; }
  .validation-values strong { font-size: 13px; }
  .validation-note { font-size: 8px; }
  .control-panel { display: block; border-radius: 10px; }
  .panel-header { padding: 14px 13px 11px; }
  .transport-row { padding: 10px 11px; }
  .control-section { padding: 12px 13px 13px; border-right: 0; }
  .presets-section { padding-bottom: 12px; }
  .preset-grid { grid-template-columns: 1fr; }
  .preset-btn { min-height: 44px; }
  .panel-footer-controls { padding: 12px 12px 13px; }
  .footer-bar { gap: 8px 13px; font-size: 6px; }
  .footer-right { margin-left: 0; width: 100%; }
  .science-notes { grid-template-columns: 1fr; }
  .annotation { font-size: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
.embed-mode .topbar, .embed-mode .footer-bar { display: none; }
.embed-mode .app-shell { padding-top: 8px; }
.embed-mode .main-layout { padding-top: 8px; }
