:root {
  color-scheme: dark;
  --bg: #07131b;
  --panel: #0b1a24;
  --panel-2: #0e202b;
  --line: rgba(153, 194, 207, .13);
  --line-strong: rgba(153, 194, 207, .23);
  --text: #e8f1f2;
  --muted: #8ba2a9;
  --subtle: #617982;
  --cyan: #61d5d7;
  --cyan-soft: rgba(97, 213, 215, .13);
  --amber: #e8b77a;
  --sand: #d8aa72;
  --violet: #b9a4f7;
  --radius: 13px;
  --space: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; color: var(--text); background: radial-gradient(ellipse at 18% -8%, rgba(30, 86, 93, .18), transparent 38%), var(--bg); }
button, input { font: inherit; }
button { color: inherit; }
.app-shell { width: min(1600px, 100%); margin: 0 auto; padding: 0 28px 18px; }
.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: 29px; height: 29px; border: 1px solid rgba(97,213,215,.35); border-radius: 9px; display: flex; align-items: center; justify-content: center; gap: 2px; transform: rotate(-7deg); }
.brand-mark span { width: 3px; border-radius: 4px; background: var(--cyan); display: block; transform: skew(-15deg); }
.brand-mark span:nth-child(1) { height: 9px; opacity: .6; }
.brand-mark span:nth-child(2) { height: 16px; }
.brand-mark span:nth-child(3) { height: 12px; opacity: .8; }
.brand-name { font-size: 11px; font-weight: 800; letter-spacing: .16em; color: #e5f2f1; }
.brand-name span { color: #77939b; font-weight: 600; }
.brand-subtitle { font-size: 8px; color: #66828b; letter-spacing: .2em; margin-top: 3px; }
.topbar-right { display: flex; align-items: center; gap: 22px; color: var(--muted); font-size: 9px; letter-spacing: .12em; }
.live-indicator { display: inline-flex; align-items: center; gap: 7px; }
.live-indicator i, .footer-led { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #6bd5b4; box-shadow: 0 0 12px rgba(107,213,180,.7); }
.seed-label b { color: #d6e4e6; font-weight: 700; margin-left: 4px; }
.main-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 20px; padding-top: 22px; }
.stage-column { min-width: 0; }
.title-row { display: flex; align-items: end; justify-content: space-between; min-height: 72px; margin-bottom: 14px; }
.eyebrow { color: #78a4aa; font-size: 9px; font-weight: 700; letter-spacing: .17em; display: flex; align-items: center; gap: 8px; }
.eyebrow-line { width: 18px; height: 1px; background: var(--cyan); display: inline-block; }
.eyebrow-dot { color: #d3ad75; }
h1 { font-size: clamp(31px, 3.2vw, 43px); line-height: 1; letter-spacing: -.055em; margin: 9px 0 5px; font-weight: 650; }
.title-period { color: var(--cyan); }
.dek { margin: 0; color: #91a9ae; font-size: 12px; letter-spacing: .01em; }
.regime-chip { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; margin-bottom: 6px; border: 1px solid rgba(97,213,215,.22); border-radius: 100px; background: rgba(97,213,215,.06); color: #8bd8d7; font-size: 8px; font-weight: 800; letter-spacing: .13em; white-space: nowrap; }
.regime-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.scene-frame { position: relative; height: clamp(360px, 32vw, 460px); min-height: 360px; border: 1px solid rgba(114,168,177,.19); border-radius: 15px; overflow: hidden; background: radial-gradient(ellipse at 50% 45%, #183c46 0%, #0b202b 52%, #07151e 100%); box-shadow: 0 18px 52px rgba(0,0,0,.22), inset 0 1px rgba(255,255,255,.035); isolation: isolate; }
#sceneCanvas { width: 100%; height: 100%; display: block; outline: none; touch-action: pan-y; }
.scene-vignette { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(5,15,21,.22), transparent 18%, transparent 75%, rgba(5,15,21,.35)); z-index: 1; }
.scene-topline, .scene-bottomline { position: absolute; left: 17px; right: 17px; display: flex; align-items: center; justify-content: space-between; z-index: 3; pointer-events: none; }
.scene-topline { top: 15px; }
.scene-bottomline { bottom: 14px; }
.scene-tag { font-size: 8px; letter-spacing: .13em; font-weight: 800; color: #a6c0c3; background: rgba(5,18,25,.62); border: 1px solid rgba(165,208,211,.14); padding: 8px 10px; border-radius: 7px; backdrop-filter: blur(10px); }
.tag-icon { color: var(--cyan); margin-right: 5px; }
.tag-separator { color: #5b7780; margin: 0 5px; }
#sceneFr { color: #e6c08d; }
.scene-actions { display: flex; gap: 6px; pointer-events: auto; }
.icon-button { height: 30px; min-width: 31px; border-radius: 7px; border: 1px solid rgba(165,208,211,.18); background: rgba(5,18,25,.68); color: #b9d2d4; font-size: 11px; font-weight: 800; cursor: pointer; backdrop-filter: blur(8px); transition: .18s ease; }
.icon-button:hover { border-color: rgba(97,213,215,.6); color: white; background: rgba(20,55,64,.9); }
.scene-annotations { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.annotation { position: absolute; display: flex; align-items: center; gap: 7px; font-size: 7px; letter-spacing: .12em; color: rgba(199,222,221,.74); text-shadow: 0 2px 8px #06121a; }
.annotation b { color: #d9ece7; font-size: 8px; margin-left: 4px; }
.annotation-line { width: 20px; height: 1px; background: rgba(97,213,215,.75); }
.annotation-flow { top: 27%; left: 5%; }
.annotation-bed { bottom: 24%; right: 5%; }
.annotation-bed .annotation-line { background: #e6b77c; }
.annotation-wave { top: 34%; right: 8%; }
.annotation-wave .annotation-line { background: #8ab8f3; }
.scene-scale { display: flex; align-items: center; gap: 8px; color: #76939a; font-size: 7px; letter-spacing: .12em; }
.scene-scale i { width: 65px; height: 1px; display: block; background: linear-gradient(90deg, rgba(97,213,215,.15), rgba(97,213,215,.8), rgba(97,213,215,.15)); }
.scene-hint { color: #78939a; font-size: 7px; letter-spacing: .13em; }
.scene-hint span { color: #b1c6c7; margin: 0 5px; }
.mouse-icon { font-size: 13px; }
.webgl-message { position: absolute; inset: 70px 18px 50px; z-index: 5; display: grid; align-content: center; justify-items: center; text-align: center; background: rgba(5,16,23,.84); border: 1px solid rgba(232,183,122,.25); border-radius: 12px; padding: 22px; }
.webgl-message[hidden], .context-message[hidden] { display: none; }
.webgl-message-icon { color: var(--amber); font-size: 30px; margin-bottom: 12px; }
.webgl-message strong { font-size: 15px; }
.webgl-message p { max-width: 420px; color: #91a7ad; font-size: 11px; line-height: 1.7; }
.webgl-message code { color: #d7bb91; }
.context-message { position: absolute; z-index: 5; bottom: 52px; left: 50%; transform: translateX(-50%); padding: 9px 14px; background: rgba(5,16,23,.9); border: 1px solid var(--line-strong); border-radius: 8px; color: #d5e4e4; font-size: 10px; white-space: nowrap; }
.transport-bar { min-height: 52px; display: flex; justify-content: space-between; align-items: center; padding: 9px 2px 12px; border-bottom: 1px solid var(--line); }
.transport-left, .transport-right { display: flex; align-items: center; gap: 9px; }
.primary-control, .transport-button { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 11px; border-radius: 7px; cursor: pointer; font-size: 8px; font-weight: 800; letter-spacing: .12em; transition: .18s ease; }
.primary-control { border: 1px solid rgba(97,213,215,.38); background: rgba(97,213,215,.13); color: #a4eeee; }
.primary-control:hover { background: rgba(97,213,215,.22); }
.play-glyph { font-size: 12px; }
.transport-button { border: 1px solid var(--line-strong); background: rgba(255,255,255,.025); color: #9cb0b5; }
.transport-button:hover { border-color: rgba(97,213,215,.4); color: #dceced; }
.transport-button span { color: var(--cyan); font-size: 12px; }
.transport-caption { font-size: 7px; letter-spacing: .14em; color: #66818a; }
#simTime { font-size: 11px; font-variant-numeric: tabular-nums; color: #d6e5e5; min-width: 52px; }
.transport-divider { height: 18px; width: 1px; background: var(--line-strong); margin: 0 3px; }
.speed-control { display: flex; flex-direction: column; gap: 2px; font-size: 7px; letter-spacing: .1em; color: #718d95; }
.speed-control b { color: #c6dcdd; font-size: 10px; }
.mini-range { width: 72px; accent-color: var(--cyan); height: 3px; cursor: pointer; }
.readout-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 9px; padding-top: 12px; }
.readout-card { min-width: 0; border: 1px solid var(--line); background: linear-gradient(145deg, rgba(16,36,47,.92), rgba(9,24,33,.92)); border-radius: 10px; padding: 11px 12px 10px; }
.readout-card.accent-card { border-color: rgba(185,164,247,.24); background: linear-gradient(145deg, rgba(39,34,61,.55), rgba(13,25,36,.95)); }
.readout-label { display: flex; justify-content: space-between; gap: 5px; align-items: center; color: #819ca2; font-size: 7px; font-weight: 800; letter-spacing: .11em; white-space: nowrap; }
.readout-kind { color: #57747c; font-size: 6px; font-weight: 700; letter-spacing: .06em; }
.readout-value { margin-top: 7px; color: #e7f2f0; font-size: clamp(18px, 2vw, 23px); font-weight: 650; letter-spacing: -.045em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.readout-value small { font-size: 9px; color: #8ba6aa; letter-spacing: 0; font-weight: 550; }
.readout-foot { display: flex; align-items: center; gap: 6px; color: #779198; font-size: 8px; margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status-dot { width: 5px; height: 5px; flex: 0 0 5px; border-radius: 50%; background: var(--cyan); }
.status-dot.amber { background: var(--amber); }.status-dot.sand { background: var(--sand); }.status-dot.violet { background: var(--violet); }
.control-column { min-width: 0; align-self: stretch; border: 1px solid var(--line); border-radius: 13px; background: linear-gradient(160deg, rgba(13,31,42,.94), rgba(8,21,29,.94)); padding: 17px 16px 12px; display: flex; flex-direction: column; }
.panel-heading { display: flex; justify-content: space-between; align-items: start; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.panel-heading h2 { font-size: 17px; letter-spacing: -.035em; margin: 5px 0 0; font-weight: 620; }
.panel-index { color: #617d86; font-size: 8px; letter-spacing: .12em; padding-top: 4px; }
.section-label { display: flex; justify-content: space-between; color: #a2b7b9; font-size: 8px; font-weight: 800; letter-spacing: .12em; margin: 14px 0 9px; }
.section-label span { color: #617e85; font-size: 7px; }
.preset-grid { display: grid; grid-template-columns: 1fr; gap: 6px; }
.preset-button { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; padding: 7px 9px; border: 1px solid var(--line); background: rgba(255,255,255,.018); border-radius: 8px; cursor: pointer; transition: .18s ease; }
.preset-button:hover { border-color: rgba(97,213,215,.3); background: rgba(97,213,215,.04); }
.preset-button.active { border-color: rgba(97,213,215,.42); background: linear-gradient(90deg, rgba(97,213,215,.12), rgba(97,213,215,.035)); box-shadow: inset 2px 0 var(--cyan); }
.preset-symbol { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 6px; color: var(--cyan); background: rgba(97,213,215,.1); font-size: 17px; }
.preset-button:nth-child(2) .preset-symbol { color: var(--amber); background: rgba(232,183,122,.1); }
.preset-button:nth-child(3) .preset-symbol { color: var(--sand); background: rgba(216,170,114,.1); }
.preset-button b { display: block; color: #d7e5e5; font-size: 9px; font-weight: 700; }
.preset-button small { display: block; color: #789198; font-size: 7px; margin-top: 2px; }
.control-list { display: flex; flex-direction: column; gap: 11px; padding-top: 15px; }
.control-item { min-width: 0; }
.control-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.control-heading label { color: #b9cccd; font-size: 9px; font-weight: 600; }
.control-heading output { color: #e0eceb; font-size: 10px; font-weight: 700; font-variant-numeric: tabular-nums; }
.control-heading output small { color: #7f9aa0; font-size: 8px; font-weight: 500; }
.range-input { appearance: none; -webkit-appearance: none; display: block; width: 100%; height: 3px; border-radius: 10px; outline: none; background: linear-gradient(90deg, var(--cyan) 0%, rgba(97,213,215,.22) 0%); cursor: pointer; }
.range-input::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 11px; height: 11px; border-radius: 50%; background: #d6ffff; border: 2px solid #4ab9bc; box-shadow: 0 0 0 3px rgba(97,213,215,.1), 0 0 9px rgba(97,213,215,.35); }
.range-input::-moz-range-thumb { width: 9px; height: 9px; border-radius: 50%; background: #d6ffff; border: 2px solid #4ab9bc; box-shadow: 0 0 0 3px rgba(97,213,215,.1); }
.range-ends { display: flex; justify-content: space-between; margin-top: 5px; color: #58737c; font-size: 7px; letter-spacing: .02em; }
.physics-status { display: flex; gap: 10px; align-items: flex-start; margin-top: auto; padding: 10px 10px; border: 1px solid rgba(97,213,215,.17); background: rgba(97,213,215,.055); border-radius: 8px; }
.physics-status-icon { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 6px; color: var(--cyan); background: rgba(97,213,215,.11); font-size: 14px; flex: 0 0 23px; }
.physics-status b { display: block; color: #c8e6e2; font-size: 9px; }
.physics-status p { margin: 3px 0 0; color: #7f9da1; font-size: 8px; line-height: 1.45; }
.panel-footer { display: flex; align-items: center; gap: 7px; padding-top: 11px; margin-top: 10px; border-top: 1px solid var(--line); color: #59757d; font-size: 7px; letter-spacing: .12em; }
.panel-footer .footer-led { width: 5px; height: 5px; }
.footer-separator { color: #9b7f5d; }
.validation-section { display: grid; grid-template-columns: minmax(230px, .8fr) minmax(0, 1.2fr); align-items: center; gap: 26px; margin-top: 21px; padding: 17px 19px; border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(110deg, rgba(14,33,44,.9), rgba(9,23,32,.9)); }
.validation-copy h2 { margin: 6px 0 5px; font-size: 15px; letter-spacing: -.025em; }
.validation-copy p { margin: 0; max-width: 380px; color: #80989e; font-size: 9px; line-height: 1.6; }
.validation-result { display: grid; grid-template-columns: 1fr 1fr 1.1fr; gap: 10px; align-items: center; }
.validation-metric { border-right: 1px solid var(--line); padding-right: 10px; }
.validation-metric span, .validation-difference span { display: block; color: #718b91; font-size: 7px; letter-spacing: .1em; font-weight: 700; }
.validation-metric b { display: block; color: #e1eeec; font-size: 19px; font-weight: 650; margin-top: 5px; letter-spacing: -.04em; }
.validation-metric small { color: #819ba0; font-size: 9px; font-weight: 500; }
.validation-difference { position: relative; }
.validation-difference b { display: inline-block; margin-top: 5px; color: var(--cyan); font-size: 19px; letter-spacing: -.04em; }
.validation-difference i { display: inline-block; margin-left: 8px; vertical-align: 3px; color: #82d8b7; font-style: normal; font-size: 7px; font-weight: 800; letter-spacing: .1em; border: 1px solid rgba(130,216,183,.25); border-radius: 4px; padding: 3px 5px; }
.science-panel { margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(10,25,34,.75); overflow: hidden; }
.science-panel summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 11px; padding: 13px 16px; }
.science-panel summary::-webkit-details-marker { display: none; }
.science-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 7px; color: var(--amber); background: rgba(232,183,122,.1); font-size: 17px; }
.science-panel summary b { display: block; color: #d6e4e4; font-size: 10px; }
.science-panel summary small { display: block; margin-top: 2px; color: #718c93; font-size: 8px; }
.science-chevron { margin-left: auto; color: #8ca6a9; transition: transform .2s ease; }
.science-panel[open] .science-chevron { transform: rotate(180deg); }
.science-content { border-top: 1px solid var(--line); padding: 14px 16px 16px; }
.equation-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 9px; }
.equation-card { border: 1px solid var(--line); background: rgba(255,255,255,.018); border-radius: 8px; padding: 11px; }
.equation-card > span { color: #75969b; font-size: 7px; font-weight: 800; letter-spacing: .1em; }
.equation { color: #dce9e6; font-family: Georgia, "Times New Roman", serif; font-size: 14px; margin: 9px 0 7px; white-space: nowrap; }
.equation-card p { color: #80999d; font-size: 8px; line-height: 1.55; margin: 0; }
.science-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.science-notes > div { padding: 11px 12px; border-left: 2px solid rgba(97,213,215,.4); background: rgba(97,213,215,.035); }
.science-notes b { color: #b9d2d2; font-size: 9px; }
.science-notes p { color: #80999d; font-size: 8px; line-height: 1.6; margin: 5px 0 0; }
.science-notes .science-symbols { grid-column: 1 / -1; border-left-color: rgba(232,183,122,.45); background: rgba(232,183,122,.035); }
.app-footer { display: flex; justify-content: space-between; gap: 12px; padding: 14px 2px 4px; color: #526c75; font-size: 7px; letter-spacing: .09em; }
.app-footer span:nth-child(2) { text-align: center; letter-spacing: .02em; text-transform: none; }
button:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
body.embed-mode .topbar, body.embed-mode .app-footer { display: none; }
body.embed-mode .app-shell { padding-top: 10px; }
body.embed-mode .main-layout { padding-top: 0; }
body.embed-mode .title-row { min-height: 58px; }
@media (min-width: 1500px) { .main-layout { grid-template-columns: minmax(0,1fr) 360px; gap: 24px; } .scene-frame { height: 510px; } }
@media (max-width: 1100px) { .app-shell { padding: 0 18px 16px; } .main-layout { grid-template-columns: minmax(0,1fr) 300px; gap: 14px; } .control-column { padding: 14px 12px 10px; } .readout-label { font-size: 6px; } .readout-kind { display: none; } .readout-value { font-size: 19px; } .annotation { font-size: 6px; } }
@media (max-width: 850px) { .main-layout { grid-template-columns: 1fr; } .control-column { display: block; } .preset-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } .preset-button { padding: 8px 7px; } .control-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 18px; row-gap: 14px; } .physics-status { margin-top: 15px; } .scene-frame { height: min(58vw, 480px); min-height: 340px; } .validation-section { grid-template-columns: 1fr; gap: 14px; } .equation-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 560px) { .app-shell { padding: 0 12px 14px; } .topbar { height: 54px; } .brand-mark { width: 25px; height: 25px; } .brand-name { font-size: 9px; } .brand-subtitle { font-size: 7px; } .topbar-right { gap: 10px; font-size: 7px; } .live-indicator { display: none; } .main-layout { padding-top: 15px; } .title-row { min-height: 66px; margin-bottom: 10px; } h1 { font-size: 34px; } .dek { font-size: 10px; } .eyebrow { font-size: 7px; } .regime-chip { font-size: 7px; padding: 7px 8px; } .scene-frame { height: 54vh; min-height: 330px; max-height: 470px; border-radius: 11px; } .scene-topline, .scene-bottomline { left: 10px; right: 10px; } .scene-tag { font-size: 6px; padding: 7px 8px; } .annotation { font-size: 5px; gap: 4px; } .annotation b { font-size: 6px; } .annotation-line { width: 12px; } .annotation-flow { left: 3%; top: 28%; } .annotation-bed { right: 3%; bottom: 22%; } .annotation-wave { right: 4%; top: 35%; } .scene-hint { font-size: 6px; } .scene-scale { font-size: 6px; } .scene-scale i { width: 40px; } .transport-bar { align-items: flex-start; gap: 10px; flex-direction: column; padding: 9px 1px 11px; } .transport-left { gap: 6px; } .transport-right { width: 100%; justify-content: flex-end; } .transport-caption { margin-right: auto; } .readout-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; padding-top: 9px; } .readout-card { padding: 10px; } .readout-label { font-size: 6px; } .readout-kind { display: inline; font-size: 5px; } .readout-value { font-size: 21px; } .readout-foot { font-size: 7px; } .control-column { padding: 14px 12px 11px; } .preset-button { gap: 6px; flex-direction: column; align-items: flex-start; min-height: 66px; } .preset-symbol { width: 22px; height: 22px; font-size: 14px; } .preset-button b { font-size: 8px; } .preset-button small { font-size: 6px; } .control-list { gap: 14px 12px; } .control-heading label { font-size: 8px; } .control-heading output { font-size: 9px; } .range-ends { font-size: 6px; } .validation-section { padding: 13px 12px; margin-top: 14px; } .validation-result { gap: 7px; } .validation-metric { padding-right: 6px; } .validation-metric span, .validation-difference span { font-size: 6px; } .validation-metric b, .validation-difference b { font-size: 16px; } .validation-metric small { font-size: 7px; } .validation-difference i { margin-left: 2px; font-size: 6px; } .science-content { padding: 10px; } .equation-grid { gap: 6px; } .equation-card { padding: 8px; } .equation { font-size: 12px; } .equation-card p, .science-notes p { font-size: 7px; } .science-notes { grid-template-columns: 1fr; gap: 7px; } .science-notes .science-symbols { grid-column: auto; } .app-footer { flex-wrap: wrap; font-size: 6px; } .app-footer span:nth-child(2) { order: 3; width: 100%; text-align: left; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; } }
