:root {
  color-scheme: dark;
  --bg: #081315;
  --panel: #0e1b1d;
  --panel-2: #122224;
  --line: rgba(177, 208, 200, .13);
  --line-strong: rgba(177, 208, 200, .23);
  --text: #e7efeb;
  --muted: #91a7a2;
  --dim: #617773;
  --teal: #6ed4c4;
  --aqua: #8be2d6;
  --gold: #d7b779;
  --lime: #b5d68e;
  --blue: #80b9da;
  --radius: 12px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body { min-width: 320px; background-image: radial-gradient(ellipse at 15% -10%, rgba(34, 91, 84, .2), transparent 36%), linear-gradient(145deg, #091517, #071012 72%); }
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
.app-shell { max-width: 1680px; margin: 0 auto; min-height: 100vh; padding: 0 28px 18px; }
.topbar { height: 72px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); gap: 18px; }
.brand-lockup { display: flex; align-items: center; gap: 12px; min-width: 260px; }
.brand-mark { width: 34px; height: 34px; position: relative; border: 1px solid rgba(110,212,196,.45); border-radius: 9px; transform: rotate(-8deg); display: flex; align-items: end; justify-content: center; gap: 3px; padding: 7px; background: linear-gradient(145deg, rgba(110,212,196,.12), rgba(110,212,196,.02)); }
.brand-mark span { width: 4px; border-radius: 4px 4px 1px 1px; background: var(--teal); display: block; }
.brand-mark span:nth-child(1) { height: 8px; opacity: .65; }
.brand-mark span:nth-child(2) { height: 14px; }
.brand-mark span:nth-child(3) { height: 11px; opacity: .8; }
.eyebrow { color: #79918b; font-size: 9px; font-weight: 800; letter-spacing: .19em; line-height: 1.4; }
.brand-title { margin-top: 3px; font-size: 12px; letter-spacing: .1em; font-weight: 800; }
.brand-title span { color: var(--teal); font-size: 10px; margin-left: 7px; }
.topbar-center { color: #7f9993; font-size: 9px; font-weight: 700; letter-spacing: .17em; display: flex; align-items: center; gap: 9px; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: #71d6bd; box-shadow: 0 0 12px rgba(113,214,189,.65); }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.icon-button { width: 31px; height: 31px; border: 1px solid var(--line); background: rgba(255,255,255,.025); color: #a8beb7; border-radius: 8px; font-size: 17px; cursor: pointer; transition: .2s ease; }
.icon-button:hover { border-color: rgba(110,212,196,.5); color: var(--teal); background: rgba(110,212,196,.07); }
.seed-chip { margin-left: 7px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; color: #718781; font-size: 9px; letter-spacing: .15em; }
.seed-chip b { color: #c5d4cf; margin-left: 5px; font-variant-numeric: tabular-nums; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; padding-top: 22px; align-items: start; }
.stage-column { min-width: 0; }
.stage-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 0 0 15px; }
.stage-heading h1 { margin: 4px 0 4px; font-size: clamp(25px, 2.2vw, 33px); letter-spacing: -.045em; line-height: 1.08; font-weight: 650; }
.stage-heading p { margin: 0; color: #90a69f; font-size: 12px; letter-spacing: .01em; }
.stage-badges { display: flex; gap: 7px; padding-bottom: 3px; white-space: nowrap; }
.status-pill, .mode-pill { border: 1px solid var(--line); border-radius: 5px; padding: 6px 8px; color: #91aaa2; font-size: 8px; font-weight: 800; letter-spacing: .13em; }
.status-pill { color: #9bc7b7; background: rgba(73,147,123,.08); }
.status-pill i { display: inline-block; width: 5px; height: 5px; background: #78d1ad; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.mode-pill { color: #83b9b0; }
.scene-frame { height: clamp(410px, 47vw, 590px); min-height: 410px; position: relative; overflow: hidden; border: 1px solid rgba(148, 192, 180, .2); border-radius: 13px; background: radial-gradient(ellipse at 48% 47%, #244747 0%, #142d30 37%, #0a1b1f 72%, #091416 100%); isolation: isolate; }
.scene-host { position: absolute; inset: 0; z-index: 1; }
.scene-host canvas { width: 100%; height: 100%; display: block; outline: none; }
.scene-grid { position: absolute; inset: 0; z-index: 0; opacity: .15; background-image: linear-gradient(rgba(155,205,190,.14) 1px, transparent 1px), linear-gradient(90deg, rgba(155,205,190,.14) 1px, transparent 1px); background-size: 44px 44px; mask-image: linear-gradient(180deg, transparent 0%, black 28%, black 78%, transparent 100%); }
.scene-vignette { position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(180deg, rgba(3,12,14,.3), transparent 20%, transparent 72%, rgba(3,12,14,.5)), linear-gradient(90deg, rgba(3,12,14,.16), transparent 28%, transparent 75%, rgba(3,12,14,.18)); }
.scene-topline, .scene-bottomline { z-index: 4; position: absolute; left: 18px; right: 18px; display: flex; justify-content: space-between; align-items: center; pointer-events: none; }
.scene-topline { top: 16px; color: #8ca8a0; font-size: 8px; font-weight: 800; letter-spacing: .17em; }
.scene-topline b { color: var(--teal); }
.scene-coordinates { color: #7e9b92; }
.scene-coordinates i { color: #58746d; font-style: normal; margin-left: 5px; }
.scene-bottomline { bottom: 15px; color: #9bb3ab; font-size: 8px; font-weight: 800; letter-spacing: .13em; }
.scene-hint { display: flex; align-items: center; gap: 8px; }
.mouse-glyph { width: 16px; height: 16px; display: inline-grid; place-items: center; border: 1px solid rgba(151,197,183,.35); border-radius: 5px; font-size: 12px; color: var(--teal); }
.hint-separator { color: #45615a; }
.scene-time b { color: #d9e9e2; margin-left: 7px; font-variant-numeric: tabular-nums; }
.scene-legend { position: absolute; z-index: 4; right: 18px; bottom: 46px; display: flex; gap: 13px; color: #91a9a2; font-size: 7px; font-weight: 800; letter-spacing: .12em; pointer-events: none; }
.scene-legend span { display: flex; align-items: center; gap: 5px; }
.scene-legend i { display: inline-block; width: 6px; height: 6px; border-radius: 2px; }
.legend-water { background: #58b9b8; }.legend-stone { background: #d7d0b8; }.legend-gas { background: #c8e5db; box-shadow: 0 0 7px #c8e5db; }
.annotation { position: absolute; z-index: 3; display: flex; align-items: center; gap: 6px; color: #d3e1db; font-size: 9px; font-weight: 650; letter-spacing: .02em; pointer-events: none; text-shadow: 0 1px 7px #061011; opacity: .9; }
.annotation-index { display: grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; color: #071515; background: #8cd9c9; font-size: 8px; font-weight: 900; box-shadow: 0 0 0 4px rgba(140,217,201,.13); }
.annotation-a { top: 23%; left: 22%; }.annotation-b { top: 48%; right: 18%; }.annotation-c { bottom: 29%; left: 38%; }
.renderer-message { position: absolute; z-index: 8; inset: auto 20px 72px; max-width: 390px; margin: auto; padding: 14px 16px; border: 1px solid rgba(220,187,125,.35); border-radius: 10px; background: rgba(8,20,22,.94); box-shadow: 0 18px 45px rgba(0,0,0,.35); }
.renderer-message strong { display: block; color: #e4c58d; font-size: 12px; margin-bottom: 4px; }
.renderer-message span { color: #9eafa8; font-size: 10px; line-height: 1.5; }
.context-message { position: absolute; z-index: 9; top: 50%; left: 50%; transform: translate(-50%,-50%); padding: 12px 16px; border-radius: 8px; background: rgba(7,17,18,.92); color: #d9c28e; font-size: 11px; }
.transport-bar { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 9px 12px; margin-top: 10px; border: 1px solid var(--line); border-radius: 10px; background: linear-gradient(90deg, rgba(19,39,39,.85), rgba(12,26,28,.92)); }
.transport-left, .transport-right { display: flex; align-items: center; gap: 6px; }
.transport-button { border: 1px solid var(--line); background: rgba(255,255,255,.025); border-radius: 6px; height: 31px; padding: 0 10px; color: #a6bbb4; font-size: 8px; font-weight: 850; letter-spacing: .12em; cursor: pointer; transition: .2s ease; }
.transport-button:hover { border-color: rgba(110,212,196,.45); color: #d8f4eb; }
.transport-button.primary { background: #b4e0d2; border-color: #b4e0d2; color: #09201d; min-width: 86px; }
.transport-button.primary:hover { background: #d1f1e7; }
.play-icon { font-size: 11px; margin-right: 6px; }
.transport-middle { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 115px; max-width: 220px; }
.transport-middle .eyebrow { white-space: nowrap; font-size: 8px; }
.transport-middle input { min-width: 35px; flex: 1; }
.transport-middle b { color: #d1e0d9; font-size: 10px; min-width: 32px; text-align: right; font-variant-numeric: tabular-nums; }
input[type="range"] { appearance: none; -webkit-appearance: none; height: 3px; border-radius: 10px; background: linear-gradient(90deg, #63bcae, #3d6d68); cursor: pointer; accent-color: var(--teal); }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 11px; height: 11px; border: 2px solid #0d2625; border-radius: 50%; background: #a6e1d3; box-shadow: 0 0 0 2px rgba(110,212,196,.22); }
input[type="range"]::-moz-range-thumb { width: 8px; height: 8px; border: 2px solid #0d2625; border-radius: 50%; background: #a6e1d3; box-shadow: 0 0 0 2px rgba(110,212,196,.22); }
.quality-button { height: 27px; padding: 0 8px; border: 1px solid transparent; background: transparent; color: #718b83; font-size: 8px; font-weight: 850; letter-spacing: .1em; border-radius: 5px; cursor: pointer; }
.quality-button.active { color: #c9e3d9; border-color: rgba(117,177,157,.28); background: rgba(117,177,157,.1); }
.export-button { white-space: nowrap; }
.readout-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin-top: 10px; }
.readout-card { min-width: 0; padding: 13px 14px 11px; border: 1px solid var(--line); border-radius: 9px; background: linear-gradient(145deg, rgba(18,37,38,.84), rgba(12,26,28,.78)); }
.readout-label { display: flex; justify-content: space-between; align-items: center; gap: 5px; color: #809891; font-size: 8px; font-weight: 800; letter-spacing: .12em; white-space: nowrap; }
.readout-dot { width: 5px; height: 5px; border-radius: 50%; flex: 0 0 auto; }.readout-dot.teal { background: var(--teal); }.readout-dot.gold { background: var(--gold); }.readout-dot.blue { background: var(--blue); }.readout-dot.lime { background: var(--lime); }
.readout-value { margin-top: 9px; color: #e2eee8; font-size: clamp(20px, 2vw, 27px); font-weight: 620; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.readout-value small { color: #809891; font-size: 9px; letter-spacing: .01em; font-weight: 600; margin-left: 3px; }
.readout-foot { margin-top: 9px; color: #637d76; font-size: 7px; font-weight: 800; letter-spacing: .12em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.disclaimer-line { color: #536a64; font-size: 8px; margin: 10px 2px 0; letter-spacing: .02em; }
.control-column { min-width: 0; border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(180deg, rgba(17,34,35,.96), rgba(10,24,26,.96)); overflow: hidden; }
.panel-header { display: flex; align-items: center; justify-content: space-between; padding: 17px 17px 14px; border-bottom: 1px solid var(--line); }
.panel-header h2 { margin: 4px 0 0; font-size: 17px; letter-spacing: -.03em; font-weight: 650; }
.panel-index { color: #5f7771; font-size: 8px; font-weight: 800; letter-spacing: .13em; }
.preset-section, .control-section { padding: 14px 17px 15px; border-bottom: 1px solid var(--line); }
.section-label { display: flex; justify-content: space-between; gap: 10px; color: #9ab1a8; font-size: 8px; font-weight: 850; letter-spacing: .13em; margin-bottom: 10px; }
.section-label span { color: #5c756e; font-size: 7px; font-weight: 700; white-space: nowrap; }
.preset-list { display: grid; gap: 6px; }
.preset-card { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 44px; padding: 7px 9px; text-align: left; border: 1px solid rgba(153,189,174,.1); border-radius: 7px; background: rgba(255,255,255,.018); cursor: pointer; transition: .18s ease; }
.preset-card:hover { border-color: rgba(110,212,196,.32); background: rgba(110,212,196,.04); }
.preset-card.selected { border-color: rgba(110,212,196,.38); background: rgba(77,154,135,.09); }
.preset-swatch { width: 27px; height: 27px; flex: 0 0 auto; border-radius: 6px; background: linear-gradient(135deg,#a8c9bd,#477d78 52%,#193d3b); position: relative; overflow: hidden; }
.preset-swatch::before, .preset-swatch::after { content: ''; position: absolute; left: -5px; right: -5px; height: 10px; border: 1px solid rgba(240,255,245,.55); border-radius: 50%; transform: rotate(-12deg); }
.preset-swatch::before { top: 6px; }.preset-swatch::after { top: 13px; opacity: .6; }
.preset-swatch.rapid { background: linear-gradient(135deg,#d9c28b,#8c7550 54%,#3a4d3d); }.preset-swatch.cool { background: linear-gradient(135deg,#9dcbd5,#457e8c 54%,#17343d); }
.preset-copy { display: grid; gap: 3px; min-width: 0; }.preset-copy b { color: #d4e2dc; font-size: 10px; font-weight: 700; }.preset-copy small { color: #6f8981; font-size: 8px; }
.preset-check { margin-left: auto; color: var(--teal); opacity: 0; font-size: 12px; }.preset-card.selected .preset-check { opacity: 1; }
.control-section { padding-top: 14px; padding-bottom: 12px; }
.slider-control { margin-bottom: 13px; }.slider-control.last-slider { margin-bottom: 0; }
.slider-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.slider-head label { color: #c0d0c9; font-size: 9px; font-weight: 600; }
.slider-head output { color: #9bd7c9; font-size: 9px; font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }
.slider-control input { width: 100%; display: block; }
.slider-scale { display: flex; justify-content: space-between; margin-top: 5px; color: #5e7770; font-size: 7px; letter-spacing: .04em; }
.growth-card { margin: 13px 17px; padding: 12px 13px 11px; border: 1px solid rgba(204,185,135,.2); border-radius: 8px; background: linear-gradient(135deg, rgba(104,91,60,.15), rgba(33,48,42,.22)); }
.growth-top, .growth-caption { display: flex; justify-content: space-between; align-items: center; color: #a8b5a1; font-size: 7px; font-weight: 850; letter-spacing: .13em; }
.growth-tag { padding: 3px 5px; border-radius: 3px; background: rgba(210,184,121,.12); color: #d5bd86; }
.growth-value { margin: 8px 0; display: flex; align-items: baseline; gap: 5px; }.growth-value b { color: #e7ddc0; font-size: 25px; font-weight: 620; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }.growth-value span { color: #a99a75; font-size: 9px; }
.growth-track { height: 4px; border-radius: 5px; background: rgba(207,194,153,.13); overflow: hidden; }.growth-track span { display: block; width: 0%; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#8ab9a4,#e1ca8b); transition: width .25s ease; }
.growth-caption { margin-top: 7px; color: #74857a; font-size: 6px; }
.science-panel { margin: 0 17px 14px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.015); }
.science-panel summary { min-height: 53px; padding: 9px 10px; display: flex; align-items: center; gap: 9px; cursor: pointer; list-style: none; }.science-panel summary::-webkit-details-marker { display: none; }
.science-icon { display: grid; place-items: center; width: 27px; height: 27px; border: 1px solid rgba(110,212,196,.24); border-radius: 6px; color: var(--teal); font-size: 14px; }
.science-panel summary span:nth-child(2) { display: grid; gap: 3px; }.science-panel summary b { color: #d2e0d9; font-size: 10px; }.science-panel summary small { color: #6d867e; font-size: 8px; }
.chevron { margin-left: auto; color: #769088; font-size: 17px; transition: transform .2s ease; }.science-panel[open] .chevron { transform: rotate(180deg); }
.science-content { padding: 0 11px 12px; border-top: 1px solid var(--line); }.science-content h3 { color: #a9c2b7; font-size: 8px; letter-spacing: .12em; margin: 12px 0 7px; }.science-content p { color: #839991; font-size: 8px; line-height: 1.55; margin: 6px 0 9px; }
.equation { padding: 8px 9px; border-radius: 5px; background: rgba(0,0,0,.18); border: 1px solid rgba(255,255,255,.045); color: #d2e7dc; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; letter-spacing: .01em; }
.science-note { margin-top: 11px; padding: 9px; border-left: 2px solid #b79d66; background: rgba(183,157,102,.07); color: #87968b; font-size: 8px; line-height: 1.55; }.science-note b { color: #cdb77f; font-size: 7px; letter-spacing: .12em; }
.validation-box { margin-top: 11px; padding: 10px; border: 1px solid rgba(110,212,196,.19); border-radius: 6px; background: rgba(44,104,89,.07); }.validation-head { display: flex; justify-content: space-between; color: #8fb5a8; font-size: 7px; font-weight: 850; letter-spacing: .12em; }.textbook-tag { color: #b7d5a1; }.validation-box > b { display: block; margin-top: 7px; color: #d0e1d9; font-size: 9px; }.validation-box p { margin: 4px 0 8px; }.validation-values { display: flex; justify-content: space-between; gap: 8px; color: #6e8980; font-size: 6px; letter-spacing: .08em; }.validation-values b { display: block; margin-top: 3px; color: #c3d8ce; font-size: 9px; font-variant-numeric: tabular-nums; }.validation-diff { margin-top: 8px; padding-top: 7px; border-top: 1px solid rgba(110,212,196,.12); color: #6e8980; font-size: 6px; letter-spacing: .1em; }.validation-diff b { float: right; color: #b8d5a3; font-size: 9px; }
.panel-footer { display: flex; justify-content: space-between; gap: 6px; padding: 10px 17px; border-top: 1px solid var(--line); color: #526a64; font-size: 6px; font-weight: 800; letter-spacing: .12em; }
.footerbar { display: flex; justify-content: space-between; align-items: center; padding: 14px 2px 0; color: #526b64; font-size: 7px; font-weight: 800; letter-spacing: .15em; }.footerbar b { color: var(--teal); margin-left: 4px; }
body.embed .app-shell { padding: 0 12px 12px; }.embed .topbar, .embed .footerbar { display: none; }.embed .workspace { padding-top: 12px; }.embed .stage-heading { margin-bottom: 9px; }
@media (max-width: 1120px) {
  .app-shell { padding-left: 18px; padding-right: 18px; }
  .workspace { grid-template-columns: minmax(0,1fr) 315px; gap: 14px; }
  .readout-card { padding: 11px 10px; }.readout-label { font-size: 7px; }.readout-foot { font-size: 6px; }
  .transport-bar { gap: 8px; }.transport-button { padding: 0 8px; }.transport-middle { max-width: 165px; }
}
@media (max-width: 900px) {
  .workspace { grid-template-columns: 1fr; }
  .control-column { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
  .panel-header { grid-column: 1 / -1; }
  .preset-section { border-right: 1px solid var(--line); }
  .control-section { grid-row: span 2; }
  .growth-card, .science-panel, .panel-footer { grid-column: 1 / -1; }
  .science-panel { margin-top: 0; }
}
@media (max-width: 620px) {
  .app-shell { padding: 0 12px 14px; }
  .topbar { height: 58px; }.brand-lockup { min-width: 0; gap: 8px; }.brand-mark { width: 29px; height: 29px; }.brand-title { font-size: 10px; }.brand-title span { font-size: 8px; margin-left: 3px; }.topbar-center { display: none; }.topbar-actions { gap: 5px; }.icon-button { width: 28px; height: 28px; }.seed-chip { font-size: 7px; padding: 7px 6px; margin-left: 2px; }
  .workspace { padding-top: 14px; gap: 12px; }.stage-heading { align-items: start; }.stage-heading h1 { font-size: 25px; }.stage-heading p { font-size: 10px; max-width: 230px; line-height: 1.4; }.stage-badges { flex-direction: column; align-items: end; gap: 4px; }.status-pill, .mode-pill { font-size: 7px; padding: 5px 6px; }
  .scene-frame { height: min(116vw, 465px); min-height: 340px; border-radius: 10px; }.scene-topline { left: 11px; right: 11px; top: 12px; font-size: 7px; }.scene-coordinates { font-size: 6px; }.scene-coordinates i { display: none; }.scene-bottomline { left: 11px; right: 11px; bottom: 11px; font-size: 6px; }.scene-legend { right: 11px; bottom: 37px; gap: 8px; font-size: 6px; }.annotation { font-size: 7px; }.annotation-a { left: 10%; top: 28%; }.annotation-b { right: 7%; top: 50%; }.annotation-c { left: 28%; bottom: 30%; }
  .transport-bar { flex-wrap: wrap; padding: 8px; gap: 7px; }.transport-left { order: 1; }.transport-middle { order: 3; flex-basis: 100%; max-width: none; }.transport-right { order: 2; margin-left: auto; }.transport-button { height: 29px; font-size: 7px; }.transport-button.primary { min-width: 78px; }.quality-button { padding: 0 5px; font-size: 7px; }.export-button { padding: 0 7px; }
  .readout-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 7px; }.readout-card { padding: 11px 10px 9px; }.readout-label { font-size: 7px; }.readout-value { font-size: 23px; }.readout-foot { margin-top: 7px; }
  .control-column { display: block; }.preset-section { border-right: 0; }.control-section { border-top: 0; }.panel-header { padding: 14px; }.preset-section, .control-section { padding-left: 14px; padding-right: 14px; }.growth-card { margin: 12px 14px; }.science-panel { margin: 0 14px 12px; }.panel-footer { padding: 10px 14px; }
  .footerbar { font-size: 6px; letter-spacing: .09em; }.footerbar span:nth-child(2) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
