:root {
  color-scheme: dark;
  --bg: #0b1118;
  --panel: rgba(19, 29, 39, 0.94);
  --panel-2: #17222d;
  --line: rgba(177, 198, 211, 0.13);
  --line-strong: rgba(177, 198, 211, 0.22);
  --text: #e7edf0;
  --muted: #93a4ad;
  --soft: #6f818c;
  --sand: #d8b37d;
  --sand-bright: #f0d3a1;
  --cyan: #8ccbd8;
  --green: #9bc6a9;
  --radius: 13px;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; background: var(--bg); color: var(--text); }
body { font-size: 13px; letter-spacing: 0.005em; }
button, input, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.app-shell { height: 100%; display: grid; grid-template-rows: 62px minmax(0, 1fr); background: radial-gradient(ellipse at 72% 40%, rgba(36, 57, 68, 0.2), transparent 48%), var(--bg); }
.topbar { min-width: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; border-bottom: 1px solid var(--line); background: rgba(10, 16, 23, 0.9); position: relative; z-index: 5; }
.brand { display: flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; min-width: 255px; }
.brand-mark { width: 31px; height: 31px; border: 1px solid rgba(216, 179, 125, 0.5); border-radius: 9px; color: var(--sand-bright); display: grid; place-items: center; font-size: 25px; line-height: 1; transform: rotate(-14deg); }
.brand-kicker { display: block; font-size: 8px; letter-spacing: 0.19em; color: var(--sand); font-weight: 700; margin-bottom: 3px; }
.brand strong { display: block; font-size: 10px; letter-spacing: 0.13em; font-weight: 750; }
.topbar-meta { display: flex; align-items: center; gap: 9px; color: #8fa0aa; font-size: 9px; letter-spacing: 0.13em; font-weight: 700; }
.live-dot, .scene-label-dot { width: 6px; height: 6px; border-radius: 50%; background: #89c5a1; box-shadow: 0 0 10px rgba(137, 197, 161, 0.65); display: inline-block; }
.meta-divider { height: 12px; width: 1px; background: var(--line-strong); margin: 0 5px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; min-width: 255px; justify-content: flex-end; }
.seed-chip { border: 1px solid var(--line-strong); padding: 6px 9px; border-radius: 6px; color: #9aabb4; font-size: 9px; letter-spacing: 0.12em; font-variant-numeric: tabular-nums; }
.icon-button { width: 30px; height: 30px; border: 1px solid var(--line-strong); background: rgba(255,255,255,0.035); border-radius: 7px; color: var(--sand-bright); font-size: 17px; cursor: pointer; transition: background .18s, border-color .18s; }
.icon-button:hover { background: rgba(216,179,125,.12); border-color: rgba(216,179,125,.45); }
.workspace { min-height: 0; display: grid; grid-template-columns: 310px minmax(0, 1fr); gap: 13px; padding: 13px 15px 14px; overflow: hidden; }
.control-rail { min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 9px; padding-right: 2px; scrollbar-width: thin; scrollbar-color: #34434e transparent; }
.panel { background: linear-gradient(145deg, rgba(23, 34, 45, 0.97), rgba(16, 25, 34, 0.97)); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 5px 18px rgba(0,0,0,.12); }
.intro-panel { padding: 15px 16px 13px; }
.eyebrow { display: flex; align-items: center; gap: 8px; color: #aeb9bd; font-size: 8px; letter-spacing: .18em; font-weight: 750; }
.eyebrow-line { width: 16px; height: 1px; background: var(--sand); }
h1 { font-size: 27px; line-height: 1.05; letter-spacing: -.045em; margin: 11px 0 8px; font-weight: 730; }
h1 em { color: var(--sand-bright); font-style: normal; }
.intro-copy { color: #a3b0b7; line-height: 1.55; font-size: 11px; margin: 0 0 11px; max-width: 275px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 7px; letter-spacing: .13em; color: #d6bd96; border: 1px solid rgba(216,179,125,.24); background: rgba(216,179,125,.055); padding: 5px 7px; border-radius: 4px; font-weight: 700; }
.tag-muted { color: #91a3ad; border-color: var(--line); background: rgba(255,255,255,.025); }
.control-panel, .preset-panel, .playback-panel { padding: 13px 15px 12px; }
.section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 11px; }
.section-head > div { display: flex; align-items: center; gap: 8px; }
.section-index { color: var(--sand); font-size: 9px; letter-spacing: .12em; font-weight: 800; font-variant-numeric: tabular-nums; }
h2 { margin: 0; font-size: 11px; letter-spacing: .025em; font-weight: 700; }
.section-unit { color: #738590; font-size: 7px; letter-spacing: .15em; font-weight: 750; }
.slider-control { margin: 0 0 10px; }
.slider-control.last-slider { margin-bottom: 1px; }
.slider-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 5px; }
.slider-head label { color: #c7d0d4; font-size: 10px; font-weight: 600; }
.slider-head output { color: var(--sand-bright); font-size: 10px; font-weight: 700; font-variant-numeric: tabular-nums; }
input[type="range"] { appearance: none; width: 100%; height: 4px; border-radius: 20px; background: linear-gradient(90deg, #b68d5c, #d4b37e); display: block; margin: 0; cursor: pointer; }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #f2dfbe; background: #8d6841; box-shadow: 0 0 0 3px rgba(216,179,125,.12); }
input[type="range"]::-moz-range-thumb { width: 9px; height: 9px; border-radius: 50%; border: 2px solid #f2dfbe; background: #8d6841; box-shadow: 0 0 0 3px rgba(216,179,125,.12); }
.range-labels { display: flex; justify-content: space-between; color: #71818b; font-size: 8px; margin-top: 4px; }
.preset-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.preset-button { min-width: 0; display: flex; align-items: center; gap: 5px; padding: 8px 6px; border: 1px solid var(--line); border-radius: 7px; background: rgba(255,255,255,.025); text-align: left; cursor: pointer; transition: .18s ease; }
.preset-button:hover { border-color: rgba(216,179,125,.45); background: rgba(216,179,125,.06); }
.preset-button.selected { border-color: rgba(216,179,125,.55); background: rgba(216,179,125,.10); }
.preset-icon { color: var(--sand-bright); font-size: 16px; flex: 0 0 auto; }
.preset-button b { display: block; font-size: 8px; font-weight: 700; white-space: nowrap; }
.preset-button small { display: block; color: #81919a; font-size: 7px; margin-top: 3px; white-space: nowrap; }
.preset-note { color: #8999a2; font-size: 9px; line-height: 1.45; margin: 8px 1px 0; min-height: 26px; }
.playback-row { display: grid; grid-template-columns: 1.25fr 1fr 35px; gap: 6px; }
.primary-button, .secondary-button { border-radius: 7px; min-height: 31px; padding: 0 9px; font-size: 10px; font-weight: 700; cursor: pointer; transition: .18s ease; }
.primary-button { border: 1px solid #d9b984; color: #211a12; background: linear-gradient(135deg, #e1c08d, #c89c62); box-shadow: 0 3px 12px rgba(200,156,98,.13); }
.primary-button:hover { filter: brightness(1.08); }
.secondary-button { border: 1px solid var(--line-strong); background: rgba(255,255,255,.045); color: #c7d2d7; }
.secondary-button:hover { border-color: rgba(216,179,125,.4); background: rgba(216,179,125,.08); }
.reset-button { font-size: 16px; color: var(--sand-bright); }
.playback-options { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; color: #8999a2; font-size: 8px; letter-spacing: .12em; font-weight: 700; }
select { background: #101a23; border: 1px solid var(--line-strong); color: #d9e0e2; border-radius: 5px; padding: 4px 7px; font-size: 9px; min-width: 75px; }
.quality-row { margin-top: 8px; }
input[type="checkbox"] { accent-color: #d4b37e; width: 14px; height: 14px; cursor: pointer; }
.utility-row { display: flex; align-items: center; justify-content: space-between; margin-top: 9px; border-top: 1px solid var(--line); padding-top: 8px; }
.text-button { border: 0; background: none; padding: 0; color: #a9b7bd; font-size: 9px; cursor: pointer; }
.text-button:hover { color: var(--sand-bright); }
.key-hint { color: #687985; font-size: 7px; letter-spacing: .1em; }
.science-panel { padding: 0; overflow: hidden; }
.science-panel summary { list-style: none; padding: 12px 15px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; color: #dce3e5; font-size: 10px; font-weight: 700; }
.science-panel summary::-webkit-details-marker { display: none; }
.science-panel summary > span:first-child { display: flex; align-items: center; gap: 8px; }
.chevron { color: var(--sand); font-size: 15px; transition: transform .2s; }
.science-panel[open] .chevron { transform: rotate(180deg); }
.science-content { padding: 0 15px 14px; color: #a6b3ba; font-size: 9px; line-height: 1.5; }
.science-content h3 { color: #e0e6e8; font-size: 9px; margin: 12px 0 5px; }
.science-content p { margin: 4px 0 8px; }
.equation { background: rgba(7,13,18,.45); border: 1px solid var(--line); padding: 7px 8px; border-radius: 5px; color: var(--sand-bright); font-family: Georgia, serif; font-size: 12px; text-align: center; }
.science-note { border-left: 2px solid #b28a59; background: rgba(216,179,125,.055); padding: 8px 9px; margin-top: 11px; color: #9eacb2; font-size: 8px; }
.science-note b { color: var(--sand); font-size: 7px; letter-spacing: .13em; }
.validation-box { margin-top: 11px; border: 1px solid rgba(140,203,216,.2); border-radius: 7px; padding: 9px; background: rgba(140,203,216,.035); }
.validation-title { display: flex; justify-content: space-between; color: #b5c7cc; font-size: 7px; letter-spacing: .11em; font-weight: 800; }
.validation-title span { color: var(--cyan); }
.validation-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; margin-top: 9px; }
.validation-grid small { display: block; color: #758995; font-size: 7px; letter-spacing: .08em; }
.validation-grid b { display: block; color: #d9e7e9; font-size: 9px; margin-top: 3px; font-variant-numeric: tabular-nums; }
.validation-footnote { color: #71838c; font-size: 7px; margin: 8px 0 0 !important; }
.scene-column { min-width: 0; min-height: 0; display: grid; grid-template-rows: 29px minmax(250px, 1fr) 88px 28px 20px; gap: 8px; }
.scene-topline { display: flex; justify-content: space-between; align-items: center; min-width: 0; }
.scene-label { display: flex; align-items: center; gap: 8px; color: #b4c0c5; font-size: 8px; letter-spacing: .15em; font-weight: 800; white-space: nowrap; }
.scene-coord { color: #657984; font-weight: 600; margin-left: 5px; }
.scene-status { display: flex; gap: 7px; align-items: center; }
.scene-status span { font-size: 7px; letter-spacing: .11em; font-weight: 800; border: 1px solid var(--line); border-radius: 4px; padding: 5px 7px; color: #9cb1b9; white-space: nowrap; }
.scene-status span:first-child { color: #9bc6a9; border-color: rgba(155,198,169,.22); background: rgba(155,198,169,.045); }
.scene-host { min-height: 0; position: relative; overflow: hidden; border: 1px solid rgba(190,204,210,.17); border-radius: 12px; background: radial-gradient(ellipse at 50% 45%, #293743 0%, #131e29 62%, #0e171f 100%); box-shadow: var(--shadow); isolation: isolate; }
#world { display: block; width: 100%; height: 100%; touch-action: pan-y; outline: none; }
.scene-vignette { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(7,12,17,.2), transparent 24%, transparent 70%, rgba(7,12,17,.45)); z-index: 1; }
.scene-annotations { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.scene-annotation { position: absolute; transform: translate(-50%,-50%); padding: 5px 7px; border: 1px solid rgba(226,202,161,.3); border-radius: 4px; color: #e3d0ad; background: rgba(9,16,22,.68); font-size: 7px; letter-spacing: .13em; white-space: nowrap; backdrop-filter: blur(4px); }
.scene-annotation span { color: var(--sand); font-weight: 800; margin-right: 5px; }
.wind-legend { position: absolute; left: 17px; top: 16px; z-index: 3; display: flex; align-items: center; gap: 7px; color: #b2d4db; font-size: 7px; letter-spacing: .15em; font-weight: 800; }
.wind-arrow { color: #a9dce5; font-size: 22px; line-height: 10px; }
.scale-legend { position: absolute; right: 18px; bottom: 43px; z-index: 3; display: flex; align-items: center; gap: 7px; color: #b8c4c7; font-size: 8px; }
.scale-line { width: 43px; height: 1px; background: #d2c2a5; position: relative; }
.scale-line::before, .scale-line::after { content: ''; position: absolute; top: -3px; height: 7px; width: 1px; background: #d2c2a5; }
.scale-line::before { left: 0; } .scale-line::after { right: 0; }
.scene-bottom-left { position: absolute; left: 17px; bottom: 15px; z-index: 3; display: flex; flex-direction: column; gap: 3px; }
.tiny-label { color: #82949d; font-size: 7px; letter-spacing: .16em; font-weight: 800; }
.scene-bottom-left b { color: #d3dcde; font-size: 9px; font-weight: 600; }
.scene-bottom-right { position: absolute; right: 18px; bottom: 15px; z-index: 3; }
.orbit-hint { color: #82949d; font-size: 7px; letter-spacing: .11em; }
.context-overlay { position: absolute; inset: 0; z-index: 8; display: grid; place-items: center; background: rgba(6,12,18,.82); backdrop-filter: blur(8px); }
.context-overlay[hidden] { display: none; }
.context-card { max-width: 290px; padding: 18px; border: 1px solid var(--line-strong); border-radius: 10px; background: #15212b; text-align: center; }
.context-card b { color: var(--sand-bright); }
.context-card p { color: #9baab1; font-size: 10px; line-height: 1.5; }
.toast { position: absolute; left: 50%; bottom: 16px; z-index: 9; transform: translate(-50%, 10px); opacity: 0; pointer-events: none; background: rgba(15,25,33,.92); border: 1px solid var(--line-strong); border-radius: 6px; padding: 8px 12px; color: #dce5e7; font-size: 9px; transition: opacity .2s, transform .2s; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.readout-strip { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; }
.readout-card { min-width: 0; background: linear-gradient(145deg, rgba(22,33,43,.94), rgba(15,24,33,.96)); border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px 8px; }
.readout-label { display: flex; justify-content: space-between; color: #91a1a9; font-size: 7px; letter-spacing: .14em; font-weight: 800; white-space: nowrap; }
.readout-label i { color: #6f818a; font-style: normal; }
.readout-card b { display: block; color: #e4e9e9; font-size: 17px; line-height: 1.25; margin-top: 6px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.readout-card:nth-child(2) b { color: #d8bd91; }
.readout-card:nth-child(3) b { color: #a6d1d9; }
.readout-card small { display: block; color: #748690; font-size: 8px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.secondary-readouts { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 0 5px; color: #83949d; font-size: 8px; letter-spacing: .09em; white-space: nowrap; overflow: hidden; }
.secondary-readouts b { color: #c4d0d4; font-weight: 650; margin-left: 4px; font-variant-numeric: tabular-nums; }
.scaled-label { color: var(--sand); font-size: 7px; letter-spacing: .14em; font-weight: 800; }
.scene-footer { display: flex; align-items: center; justify-content: space-between; color: #667985; font-size: 7px; letter-spacing: .06em; }
.scene-footer span:last-child { color: #8fa0a7; font-weight: 700; letter-spacing: .12em; }

@media (max-width: 1050px) {
  .workspace { grid-template-columns: 285px minmax(0,1fr); gap: 9px; padding: 10px; }
  .scene-column { grid-template-rows: 27px minmax(230px,1fr) 80px 25px 18px; gap: 6px; }
  .readout-card { padding: 8px 9px 7px; }
  .readout-card b { font-size: 15px; }
  .scene-coord { display: none; }
}
@media (max-width: 760px) {
  html, body { overflow: auto; height: auto; min-height: 100%; }
  .app-shell { min-height: 100dvh; height: auto; grid-template-rows: 54px auto; }
  .topbar { padding: 0 12px; }
  .brand { min-width: 0; gap: 8px; }
  .brand-mark { width: 28px; height: 28px; }
  .brand-kicker { font-size: 7px; }
  .brand strong { font-size: 8px; letter-spacing: .09em; }
  .topbar-meta { display: none; }
  .topbar-actions { min-width: 0; gap: 7px; }
  .seed-chip { font-size: 8px; padding: 5px 6px; }
  .icon-button { width: 29px; height: 29px; }
  .workspace { display: flex; flex-direction: column; gap: 10px; padding: 9px; overflow: visible; }
  .scene-column { order: 0; display: grid; grid-template-rows: 25px minmax(300px, 44dvh) auto auto 18px; gap: 7px; }
  .control-rail { order: 1; overflow: visible; display: grid; grid-template-columns: 1fr; gap: 9px; padding: 0; }
  .scene-label { font-size: 7px; gap: 6px; }
  .scene-status span { font-size: 6px; padding: 4px 5px; }
  .scene-host { min-height: 300px; border-radius: 10px; }
  .scene-annotation { font-size: 6px; padding: 4px 5px; }
  .readout-strip { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
  .readout-card { min-height: 71px; padding: 8px 10px; }
  .readout-card b { font-size: 16px; margin-top: 5px; }
  .secondary-readouts { flex-wrap: wrap; justify-content: flex-start; white-space: normal; row-gap: 6px; padding: 7px 4px; font-size: 7px; }
  .scaled-label { margin-left: auto; }
  .scene-footer { font-size: 6px; gap: 8px; }
  .scene-footer span:first-child { max-width: 75%; line-height: 1.35; }
  .intro-panel { padding: 14px 15px; }
  h1 { font-size: 25px; }
  .intro-copy { max-width: 100%; }
  .control-panel, .preset-panel, .playback-panel { padding: 13px 14px; }
  .slider-control { margin-bottom: 13px; }
  .preset-button { padding: 9px 7px; }
  .preset-button b { font-size: 9px; }
  .preset-button small { font-size: 7px; }
  .science-panel summary { padding: 13px 14px; }
  .science-content { padding: 0 14px 14px; }
  .scene-bottom-right { display: none; }
}
@media (max-width: 390px) {
  .scene-column { grid-template-rows: 25px minmax(285px, 42dvh) auto auto 18px; }
  .scene-status span:last-child { display: none; }
  .scene-label { letter-spacing: .1em; }
  .preset-grid { gap: 4px; }
  .preset-button { gap: 3px; padding: 7px 4px; }
  .preset-icon { font-size: 14px; }
  .preset-button b { font-size: 8px; }
  .readout-card b { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Host embed mode: compact museum widget without the outer brand bar. */
.embed-mode .app-shell { grid-template-rows: minmax(0, 1fr); }
.embed-mode .topbar { display: none; }
.embed-mode .workspace { padding: 8px; gap: 8px; }
@media (max-width: 760px) {
  .embed-mode .workspace { padding: 6px; }
  .embed-mode .scene-column { grid-template-rows: 22px minmax(280px, 48dvh) auto auto 16px; }
}
