:root {
  color-scheme: dark;
  --bg: #11191e;
  --panel: rgba(17, 25, 29, 0.88);
  --panel-strong: rgba(15, 22, 26, 0.95);
  --line: rgba(224, 204, 170, 0.15);
  --line-strong: rgba(224, 204, 170, 0.28);
  --text: #f0e9dd;
  --muted: #a79f91;
  --faint: #6e7775;
  --sand: #d9b783;
  --gold: #e0b878;
  --teal: #74c0ba;
  --blue: #6daeb4;
  --danger: #e18d74;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; background: var(--bg); color: var(--text); }
body { min-width: 320px; }
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, summary:focus-visible { outline: 2px solid rgba(116,192,186,.78); outline-offset: 3px; }
.app-shell { position: relative; width: 100%; height: 100%; min-height: 560px; overflow: hidden; isolation: isolate; background: #182126; }
#world { position: absolute; inset: 0; width: 100%; height: 100%; display: block; outline: none; touch-action: none; }
.scene-vignette { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(10,15,18,.46), transparent 25%, transparent 68%, rgba(10,15,18,.45)); z-index: 1; }
.glass-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 14px 44px rgba(0,0,0,.24), inset 0 1px rgba(255,255,255,.035); backdrop-filter: blur(18px) saturate(120%); -webkit-backdrop-filter: blur(18px) saturate(120%); }
.topbar { position: absolute; z-index: 5; top: 0; left: 0; right: 0; height: 70px; padding: 0 22px; display: grid; grid-template-columns: 240px minmax(300px,1fr) 150px; align-items: center; gap: 20px; border-bottom: 1px solid rgba(255,255,255,.08); background: linear-gradient(180deg, rgba(12,18,21,.9), rgba(12,18,21,.48)); }
.brand-lockup { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand-mark { width: 30px; height: 30px; position: relative; border: 1px solid rgba(222,188,133,.65); border-radius: 50%; transform: rotate(-18deg); }
.brand-mark span { position: absolute; display: block; border: 1px solid rgba(222,188,133,.65); border-radius: 50%; width: 17px; height: 25px; top: 2px; left: 6px; transform: rotate(50deg); }
.brand-mark span:nth-child(2) { transform: rotate(-50deg); }
.brand-mark span:nth-child(3) { width: 5px; height: 5px; border: 0; background: var(--gold); top: 12px; left: 12px; }
.brand-name { font-size: 10px; font-weight: 800; letter-spacing: .16em; color: #f1e6d5; white-space: nowrap; }
.brand-name span { color: #9d9589; font-weight: 500; }
.brand-sub { margin-top: 4px; font-size: 8px; letter-spacing: .22em; color: #8d958f; }
.top-title { min-width: 0; }
.eyebrow { font-size: 8px; line-height: 1.4; font-weight: 800; letter-spacing: .17em; color: #a7a99d; }
.top-title .eyebrow span { color: var(--gold); margin-left: 7px; }
h1 { margin: 3px 0 0; font-size: 16px; font-weight: 600; letter-spacing: -.025em; color: #f1e7d9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
h1 span { color: var(--gold); padding: 0 4px; }
.top-status { justify-self: end; display: flex; align-items: center; gap: 8px; font-size: 8px; letter-spacing: .16em; color: #b7c1b6; }
.top-status i, .live-dot { width: 6px; height: 6px; border-radius: 50%; background: #79c5ad; box-shadow: 0 0 12px rgba(121,197,173,.8); }
.top-status b { margin-left: 4px; border: 1px solid rgba(219,188,139,.4); border-radius: 4px; padding: 4px 6px; color: var(--gold); font-size: 8px; }
.control-panel, .data-panel { position: absolute; z-index: 4; top: 88px; width: 292px; max-height: calc(100% - 188px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(216,190,149,.3) transparent; }
.control-panel { left: 20px; padding: 17px 17px 13px; }
.data-panel { right: 20px; width: 266px; padding: 17px 16px 14px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; }
.panel-heading h2 { margin: 4px 0 0; font-size: 16px; letter-spacing: -.02em; font-weight: 650; }
.panel-intro { margin: 10px 0 15px; color: #a6a69b; font-size: 10px; line-height: 1.55; }
.control-group { margin: 0 0 14px; }
.control-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 7px; }
.control-head label { font-size: 10px; color: #d8d1c5; letter-spacing: .015em; }
.control-head output { font-size: 10px; color: var(--gold); font-variant-numeric: tabular-nums; white-space: nowrap; }
input[type="range"] { width: 100%; height: 13px; margin: 0; background: transparent; cursor: pointer; accent-color: var(--gold); }
input[type="range"]::-webkit-slider-runnable-track { height: 3px; border-radius: 4px; background: linear-gradient(90deg, #d2aa71, #6f928d); }
input[type="range"]::-moz-range-track { height: 3px; border-radius: 4px; background: linear-gradient(90deg, #d2aa71, #6f928d); }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 11px; height: 11px; margin-top: -4px; border-radius: 50%; border: 2px solid #f4e5c9; background: #b88c54; box-shadow: 0 0 0 3px rgba(218,181,126,.16); }
input[type="range"]::-moz-range-thumb { width: 9px; height: 9px; border-radius: 50%; border: 2px solid #f4e5c9; background: #b88c54; box-shadow: 0 0 0 3px rgba(218,181,126,.16); }
input[type="range"]:focus-visible { outline: 2px solid rgba(116,192,186,.7); outline-offset: 5px; border-radius: 4px; }
.range-ends { display: flex; justify-content: space-between; color: #727e7b; font-size: 8px; margin-top: 1px; }
.compact-control { margin-bottom: 12px; }
.panel-footnote { display: flex; align-items: center; gap: 7px; border-top: 1px solid var(--line); padding-top: 11px; color: #838b85; font-size: 8px; line-height: 1.45; }
.legend-dot { width: 5px; height: 5px; flex: 0 0 5px; background: var(--teal); border-radius: 50%; }
.data-heading { margin-bottom: 14px; }
.unit-tag { font-size: 8px; letter-spacing: .13em; color: #8ec8bc; border: 1px solid rgba(116,192,186,.27); padding: 4px 6px; border-radius: 4px; }
.readout-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.readout { min-height: 77px; padding: 9px 9px 7px; border: 1px solid rgba(224,204,170,.1); border-radius: 8px; background: rgba(255,255,255,.025); }
.readout-label { display: block; color: #9ba39a; font-size: 8px; letter-spacing: .02em; }
.readout strong { display: block; margin-top: 7px; color: #f2e5d1; font-size: 17px; line-height: 1; font-weight: 620; letter-spacing: -.04em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.readout strong small { font-size: 8px; font-weight: 500; color: #9d9e93; letter-spacing: 0; }
.readout-note { display: block; margin-top: 6px; color: #727f79; font-size: 7px; white-space: nowrap; }
#omegaState { color: #d9b77d; }
.chemistry-strip { margin-top: 13px; padding: 10px 0 11px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.strip-title { display: flex; justify-content: space-between; font-size: 7px; font-weight: 800; letter-spacing: .14em; color: #a8a99b; }
.strip-title span { font-size: 6px; color: #6f827e; letter-spacing: .08em; }
.pathway { display: flex; align-items: center; justify-content: space-between; gap: 4px; margin-top: 8px; color: #e1d5c1; font-size: 8px; }
.pathway i { font-style: normal; color: var(--gold); font-size: 12px; }
.validation-card { margin-top: 12px; border: 1px solid rgba(116,192,186,.2); border-radius: 8px; background: rgba(76,133,127,.075); padding: 9px 10px 8px; }
.validation-top { display: flex; justify-content: space-between; color: #8ebdb2; font-size: 7px; font-weight: 800; letter-spacing: .13em; }
.validation-top b { color: #9bd0b7; font-size: 7px; }
.validation-main { display: flex; align-items: baseline; gap: 7px; margin-top: 7px; }
.validation-main strong { font-size: 18px; font-weight: 620; letter-spacing: -.04em; color: #f0e6d4; font-variant-numeric: tabular-nums; }
.validation-main span { color: #788e88; font-size: 8px; }
.validation-main small { color: #8a9b94; font-size: 8px; }
.validation-foot { margin-top: 4px; color: #8a9a92; font-size: 7px; line-height: 1.45; }
.validation-foot b { color: #d5c49f; }
.scene-labels { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.scene-label { position: absolute; padding: 6px 8px; border-left: 1px solid rgba(230,207,167,.55); background: linear-gradient(90deg, rgba(15,22,25,.56), transparent); text-shadow: 0 2px 9px rgba(0,0,0,.7); }
.scene-label span { display: inline-block; color: var(--gold); font-size: 7px; margin-right: 6px; font-weight: 800; }
.scene-label b { color: #eee1cb; font-size: 8px; letter-spacing: .12em; }
.scene-label small { display: block; margin: 3px 0 0 19px; color: #c0b9a8; font-size: 7px; }
.label-crystal { top: 29%; left: 42%; }
.label-vapour { top: 20%; left: 59%; }
.label-soil { bottom: 23%; left: 43%; }
.scene-bottom-hint { position: absolute; z-index: 2; left: 50%; bottom: 95px; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; color: rgba(245,233,212,.72); font-size: 7px; font-weight: 700; letter-spacing: .15em; white-space: nowrap; text-shadow: 0 2px 6px #000; pointer-events: none; }
.scene-bottom-hint i { color: var(--gold); font-style: normal; }
.mouse-icon { width: 10px; height: 14px; border: 1px solid rgba(240,224,197,.8); border-radius: 6px; position: relative; }
.mouse-icon:after { content: ''; position: absolute; width: 1px; height: 3px; background: var(--gold); top: 2px; left: 4px; }
.transport { position: absolute; z-index: 6; bottom: 16px; left: 50%; transform: translateX(-50%); width: min(960px, calc(100% - 40px)); min-height: 64px; padding: 9px 12px; display: flex; align-items: center; gap: 14px; }
.preset-group, .playback-controls, .utility-controls { display: flex; align-items: center; gap: 5px; }
.preset-btn { display: flex; align-items: center; gap: 6px; border: 1px solid transparent; background: transparent; border-radius: 7px; padding: 8px 9px; color: #9ea39a; font-size: 9px; cursor: pointer; transition: background .2s,border-color .2s,color .2s; white-space: nowrap; }
.preset-btn:hover { background: rgba(255,255,255,.06); color: #f1e7d9; }
.preset-btn.active { border-color: rgba(216,181,127,.3); background: rgba(216,181,127,.11); color: #e6d3b4; }
.preset-icon { font-size: 11px; color: var(--gold); }
.mist-icon { color: var(--teal); }
.drop-icon { color: #8fc4ca; font-size: 8px; }
.transport-divider { width: 1px; height: 32px; background: var(--line-strong); flex: 0 0 1px; }
.playback-controls button, .utility-btn { border: 1px solid rgba(230,215,190,.17); border-radius: 7px; background: rgba(255,255,255,.035); cursor: pointer; transition: .18s ease; }
.playback-controls button:hover, .utility-btn:hover { border-color: rgba(226,190,134,.5); background: rgba(226,190,134,.1); }
.primary-control { width: 35px; height: 35px; color: #f0d6ad; font-size: 15px; }
.icon-control { height: 35px; min-width: 35px; padding: 0 8px; color: #b9b9ac; font-size: 10px; }
.speed-control { display: grid; grid-template-columns: auto minmax(72px,1fr) auto; align-items: center; gap: 9px; flex: 1; min-width: 110px; }
.speed-control label { color: #8f9990; font-size: 7px; font-weight: 800; letter-spacing: .14em; white-space: nowrap; }
.speed-control output { color: var(--gold); font-size: 8px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.speed-control input { min-width: 55px; }
.utility-controls { gap: 6px; }
.quality-toggle { display: flex; border: 1px solid rgba(230,215,190,.15); border-radius: 6px; padding: 2px; }
.quality-btn { border: 0; border-radius: 4px; background: transparent; color: #77837c; padding: 6px 7px; font-size: 7px; font-weight: 800; letter-spacing: .1em; cursor: pointer; }
.quality-btn.active { color: #d7c49f; background: rgba(216,181,127,.15); }
.utility-btn { width: 31px; height: 31px; color: #d3c4aa; font-size: 15px; }
.science-panel { position: absolute; z-index: 8; right: 20px; bottom: 94px; width: 390px; max-height: min(76vh, 640px); overflow: hidden; }
.science-panel summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; }
.science-panel summary::-webkit-details-marker { display: none; }
.science-icon { width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid rgba(116,192,186,.28); border-radius: 7px; color: var(--teal); font-size: 15px; }
.science-panel summary b { display: block; font-size: 10px; font-weight: 700; }
.science-panel summary small { display: block; margin-top: 2px; color: #8d9991; font-size: 8px; }
.summary-chevron { margin-left: auto; color: #aab0a5; transition: transform .2s; }
.science-panel[open] .summary-chevron { transform: rotate(180deg); }
.science-content { max-height: calc(min(76vh, 640px) - 54px); overflow: auto; padding: 0 15px 14px; scrollbar-width: thin; scrollbar-color: rgba(216,190,149,.3) transparent; }
.science-section { padding: 12px 0; border-top: 1px solid var(--line); }
.science-section h3 { margin: 5px 0 6px; font-size: 12px; font-weight: 620; }
.science-section p { margin: 5px 0; color: #aeb2a8; font-size: 9px; line-height: 1.55; }
.equation { margin: 8px 0 5px; padding: 9px 10px; border-radius: 6px; border: 1px solid rgba(116,192,186,.15); background: rgba(116,192,186,.055); color: #d9e3d6; font-family: ui-serif, Georgia, serif; font-size: 14px; text-align: center; }
.equation-note { color: #85928a !important; font-size: 8px !important; }
.limitations ul { padding-left: 16px; margin: 7px 0 0; color: #aeb2a8; font-size: 8px; line-height: 1.6; }
.limitations li { margin-bottom: 4px; }
.science-source { padding-top: 10px; border-top: 1px solid var(--line); color: #7d8983; font-size: 8px; line-height: 1.5; }
.toast { position: absolute; z-index: 10; bottom: 94px; left: 50%; transform: translate(-50%, 12px); opacity: 0; pointer-events: none; padding: 8px 12px; border: 1px solid rgba(116,192,186,.25); border-radius: 7px; background: rgba(13,22,25,.94); color: #d6e0d4; font-size: 9px; transition: opacity .22s, transform .22s; }
.toast.show { opacity: 1; transform: translate(-50%,0); }
.webgl-fallback { position: absolute; z-index: 12; inset: 70px 0 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; background: rgba(12,18,21,.94); }
.webgl-fallback[hidden] { display: none; }
.fallback-mark { color: var(--gold); font-size: 42px; }
.webgl-fallback h2 { font-size: 18px; }
.webgl-fallback p { max-width: 360px; color: #aab0a7; font-size: 11px; line-height: 1.6; }
.legal-footer { position: absolute; z-index: 3; right: 22px; bottom: 3px; color: rgba(225,218,203,.42); font-size: 7px; pointer-events: none; }

@media (max-width: 1050px) {
  .topbar { grid-template-columns: 190px minmax(260px,1fr) 105px; gap: 12px; padding: 0 16px; }
  .control-panel { width: 260px; left: 14px; }
  .data-panel { width: 238px; right: 14px; }
  .transport { width: calc(100% - 28px); gap: 8px; }
  .preset-btn { padding: 7px 6px; }
  .science-panel { right: 14px; }
}
@media (max-width: 760px) {
  .app-shell { min-height: 620px; }
  .topbar { height: 58px; grid-template-columns: 1fr auto; padding: 0 12px; gap: 8px; }
  .brand-mark { width: 25px; height: 25px; }
  .brand-mark span { transform-origin: center; width: 14px; height: 20px; left: 5px; top: 2px; }
  .brand-mark span:nth-child(3) { width: 4px; height: 4px; left: 10px; top: 10px; }
  .brand-name { font-size: 8px; }
  .brand-sub { font-size: 7px; }
  .top-title { display: none; }
  .top-status { font-size: 7px; }
  .control-panel { top: 68px; left: 9px; width: min(228px, 59vw); max-height: 34vh; padding: 11px 11px 9px; border-radius: 10px; }
  .control-panel .panel-heading h2 { font-size: 13px; }
  .panel-intro { font-size: 8px; margin: 7px 0 10px; }
  .control-group { margin-bottom: 9px; }
  .control-head { margin-bottom: 3px; }
  .control-head label, .control-head output { font-size: 8px; }
  .range-ends { font-size: 7px; }
  .panel-footnote { font-size: 7px; padding-top: 7px; }
  .data-panel { top: auto; right: 9px; bottom: 94px; width: min(144px, 38vw); max-height: 37vh; padding: 10px 9px; border-radius: 10px; }
  .data-heading { margin-bottom: 8px; }
  .data-heading h2 { font-size: 12px; }
  .unit-tag { font-size: 6px; padding: 3px 4px; }
  .readout-grid { grid-template-columns: 1fr 1fr; gap: 4px; }
  .readout { min-height: 56px; padding: 6px 5px 5px; }
  .readout-label { font-size: 6px; }
  .readout strong { font-size: 12px; margin-top: 5px; }
  .readout strong small { font-size: 6px; }
  .readout-note { display: none; }
  .chemistry-strip { display: none; }
  .validation-card { margin-top: 7px; padding: 6px; }
  .validation-top { font-size: 6px; }
  .validation-top b { font-size: 6px; }
  .validation-main { gap: 4px; margin-top: 4px; }
  .validation-main strong { font-size: 12px; }
  .validation-main small, .validation-main span { font-size: 6px; }
  .validation-foot { font-size: 6px; }
  .scene-labels { display: none; }
  .scene-bottom-hint { bottom: 79px; font-size: 6px; letter-spacing: .1em; }
  .transport { bottom: 8px; left: 8px; transform: none; width: calc(100% - 16px); min-height: 68px; padding: 6px 7px; gap: 6px; flex-wrap: wrap; border-radius: 10px; }
  .preset-group { order: 1; width: 100%; justify-content: space-between; gap: 3px; }
  .preset-btn { flex: 1; justify-content: center; padding: 4px 3px; font-size: 7px; gap: 4px; }
  .preset-icon { font-size: 9px; }
  .transport-divider { display: none; }
  .playback-controls { order: 2; gap: 4px; }
  .primary-control { width: 28px; height: 27px; font-size: 12px; }
  .icon-control { height: 27px; min-width: 28px; padding: 0 5px; font-size: 8px; }
  .speed-control { order: 3; min-width: 75px; flex: 1; grid-template-columns: auto minmax(28px,1fr) auto; gap: 4px; }
  .speed-control label { font-size: 6px; }
  .speed-control output { font-size: 7px; }
  .utility-controls { order: 4; gap: 3px; }
  .quality-btn { font-size: 6px; padding: 5px 4px; }
  .utility-btn { width: 26px; height: 26px; font-size: 12px; }
  .science-panel { right: 9px; bottom: 178px; width: calc(100% - 18px); max-height: 55vh; }
  .science-content { max-height: calc(55vh - 54px); }
  .science-panel summary { padding: 9px 11px; }
  .science-panel summary b { font-size: 9px; }
  .science-panel summary small { font-size: 7px; }
  .science-section h3 { font-size: 11px; }
  .science-section p, .limitations ul { font-size: 8px; }
  .equation { font-size: 12px; }
  .legal-footer { display: none; }
  .toast { bottom: 178px; font-size: 8px; }
  .webgl-fallback { inset: 58px 0 0; }
}
@media (max-width: 390px) {
  .control-panel { width: 222px; max-height: 33vh; }
  .data-panel { width: 139px; }
  .transport { min-height: 66px; }
  .preset-btn { font-size: 6.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; }
}
body.embed .topbar { height: 54px; }
body.embed .brand-sub, body.embed .legal-footer { display: none; }
body.embed .control-panel { top: 64px; }
body.embed .data-panel { top: 64px; }
body.embed .transport { bottom: 10px; }
