:root {
  color-scheme: dark;
  --bg: #080d16;
  --panel: #0d1420;
  --panel-2: #111b29;
  --line: rgba(159, 181, 204, .13);
  --line-strong: rgba(159, 181, 204, .23);
  --text: #edf4fb;
  --muted: #8a9aab;
  --quiet: #627387;
  --accent: #85d6df;
  --accent-dim: rgba(133, 214, 223, .14);
  --accent-line: rgba(133, 214, 223, .36);
  --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-height: 100vh; overflow-x: hidden; }
body.embed-mode { height: 100vh; height: 100dvh; overflow: hidden; }
button, input { font: inherit; }
button { color: inherit; }
.app-shell { height: 100vh; height: 100dvh; display: grid; grid-template-rows: 64px minmax(0, 1fr); overflow: hidden; background: radial-gradient(ellipse at 18% 0%, rgba(35, 67, 89, .18), transparent 35%), var(--bg); }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 0 24px; border-bottom: 1px solid var(--line); background: rgba(8, 13, 22, .92); min-width: 0; }
.brand-lockup { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand-mark { width: 34px; height: 34px; border: 1px solid var(--accent-line); border-radius: 50%; position: relative; display: grid; place-items: center; flex: 0 0 auto; transform: rotate(-24deg); }
.brand-mark span { position: absolute; width: 25px; height: 9px; border: 1px solid var(--accent); border-radius: 50%; transform: rotate(24deg); opacity: .8; }
.brand-mark span:nth-child(2) { width: 30px; height: 12px; opacity: .35; }
.brand-mark span:nth-child(3) { width: 5px; height: 5px; border: 0; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.eyebrow, .section-kicker, .caption-label { font-size: 9px; font-weight: 800; letter-spacing: .16em; color: var(--muted); }
.eyebrow { margin-bottom: 3px; }
.eyebrow-dot { display: inline-block; width: 3px; height: 3px; margin: 0 6px 2px; border-radius: 50%; background: var(--accent); }
h1 { margin: 0; font-size: 17px; line-height: 1.15; letter-spacing: -.035em; font-weight: 720; }
.title-light { color: #a9bac9; font-weight: 450; }
.top-meta { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 9px; letter-spacing: .11em; white-space: nowrap; }
.live-indicator { display: flex; align-items: center; gap: 7px; color: #c0d1dc; font-weight: 800; }
.live-indicator i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px rgba(133,214,223,.7); }
.meta-divider { height: 17px; width: 1px; background: var(--line-strong); }
.seed-label b { color: var(--text); font-weight: 700; margin: 0 4px; }
.seed-label em { color: var(--quiet); font-size: 8px; font-style: normal; }
.workspace { min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 376px; gap: 0; }
.visual-column { min-width: 0; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; padding: 18px 18px 16px 20px; gap: 12px; }
.canvas-wrap { min-height: 0; position: relative; overflow: hidden; border: 1px solid rgba(141, 176, 198, .16); border-radius: 15px; background: radial-gradient(ellipse at 50% 43%, rgba(22, 49, 68, .36), rgba(9, 16, 27, .97) 65%); box-shadow: inset 0 1px 0 rgba(255,255,255,.025), 0 20px 55px rgba(0,0,0,.18); }
#simulation { display: block; width: 100%; height: 100%; }
.canvas-topline { position: absolute; left: 18px; right: 18px; top: 15px; display: flex; justify-content: space-between; align-items: center; pointer-events: none; }
.scene-tag, .scene-right-tag { font-size: 8px; letter-spacing: .15em; font-weight: 800; color: #b4c5d2; text-shadow: 0 1px 8px #080d16; }
.tag-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); margin-right: 7px; vertical-align: 1px; }
.tag-separator { color: var(--quiet); padding: 0 6px; }
.scene-right-tag { color: var(--accent); font-variant-numeric: tabular-nums; }
.scene-right-tag span { color: var(--quiet); font-size: 7px; margin-left: 5px; }
.canvas-legend { position: absolute; left: 18px; top: 42px; bottom: auto; display: flex; flex-direction: column; gap: 8px; pointer-events: none; font-size: 9px; color: #a4b4c2; text-shadow: 0 1px 6px #080d16; }
.canvas-legend span { display: flex; align-items: center; gap: 8px; }
.legend-ring { width: 13px; height: 3px; border-radius: 2px; background: var(--accent); box-shadow: 0 0 9px rgba(133,214,223,.45); }
.legend-body { width: 9px; height: 9px; border-radius: 50%; background: #c5d1dc; box-shadow: 0 0 8px rgba(197,209,220,.35); }
.legend-star { color: var(--accent); font-style: normal; font-size: 14px; line-height: 8px; width: 13px; text-align: center; }
.canvas-footer-note span { color: #526474; margin-left: 4px; }
.caption-strip { display: flex; align-items: center; gap: 13px; min-height: 66px; padding: 12px 15px; border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(100deg, rgba(15, 27, 41, .96), rgba(11, 18, 29, .96)); }
.caption-icon { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 auto; border-radius: 10px; border: 1px solid var(--accent-line); color: var(--accent); background: var(--accent-dim); font-size: 17px; }
.caption-copy { min-width: 0; flex: 1; }
.caption-label { font-size: 8px; margin-bottom: 4px; }
.caption-copy p { margin: 0; color: #bdcbd6; font-size: 11px; line-height: 1.45; }
.caption-state { border: 1px solid var(--line-strong); border-radius: 20px; padding: 6px 9px; color: var(--accent); font-size: 8px; letter-spacing: .11em; white-space: nowrap; }
.control-panel { min-width: 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 18px 18px 12px; border-left: 1px solid var(--line); background: linear-gradient(180deg, rgba(14, 22, 34, .98), rgba(10, 16, 26, .98)); scrollbar-width: thin; scrollbar-color: #2b4052 transparent; }
.control-panel::-webkit-scrollbar { width: 6px; }
.control-panel::-webkit-scrollbar-thumb { background: #2b4052; border-radius: 5px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.section-kicker { font-size: 8px; letter-spacing: .16em; }
h2 { margin: 5px 0 0; font-size: 17px; font-weight: 680; letter-spacing: -.035em; }
.quality-control { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: #09111c; }
.quality-btn { border: 0; border-radius: 5px; padding: 5px 7px; color: var(--quiet); background: transparent; font-size: 8px; font-weight: 800; letter-spacing: .1em; cursor: pointer; }
.quality-btn.active { color: var(--accent); background: var(--accent-dim); box-shadow: inset 0 0 0 1px rgba(133,214,223,.15); }
.preset-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 15px; }
.preset-btn { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 9px 9px; text-align: left; border: 1px solid var(--line); border-radius: 9px; background: rgba(16, 26, 40, .75); cursor: pointer; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.preset-btn:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.preset-btn.selected { border-color: var(--accent-line); background: linear-gradient(110deg, rgba(133,214,223,.1), rgba(18,31,45,.8)); }
.preset-icon { color: var(--accent); font-size: 17px; line-height: 1; }
.preset-btn b { display: block; font-size: 9px; font-weight: 700; color: #d9e4eb; }
.preset-btn small { display: block; margin-top: 3px; color: var(--quiet); font-size: 8px; }
.control-group { padding: 9px 0 8px; border-top: 1px solid rgba(159,181,204,.08); }
.control-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.control-head label { color: #d4e0e9; font-size: 10px; font-weight: 620; }
.number-tag { color: #657b8c; font-size: 7px; letter-spacing: .11em; font-weight: 800; white-space: nowrap; }
.slider-line { display: grid; grid-template-columns: minmax(0, 1fr) 80px; align-items: center; gap: 11px; }
.slider-line output { color: var(--accent); font-size: 10px; font-weight: 750; text-align: right; font-variant-numeric: tabular-nums; }
input[type="range"] { width: 100%; height: 4px; margin: 7px 0; appearance: none; -webkit-appearance: none; border-radius: 6px; background: linear-gradient(90deg, rgba(133,214,223,.72), rgba(133,214,223,.18)); cursor: pointer; outline: none; }
input[type="range"]::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 13px; height: 13px; border: 2px solid #09131c; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 1px var(--accent-line), 0 0 12px rgba(133,214,223,.3); }
input[type="range"]::-moz-range-thumb { width: 10px; height: 10px; border: 2px solid #09131c; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 1px var(--accent-line), 0 0 12px rgba(133,214,223,.3); }
input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px rgba(133,214,223,.22); }
.range-ends { display: flex; justify-content: space-between; color: #627487; font-size: 7px; letter-spacing: .015em; }
.compact-group { padding-bottom: 10px; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-top: 1px solid rgba(159,181,204,.08); border-bottom: 1px solid rgba(159,181,204,.08); }
.toggle-row b { display: block; color: #d4e0e9; font-size: 10px; font-weight: 650; }
.toggle-row small { display: block; margin-top: 3px; color: var(--quiet); font-size: 8px; }
.switch { width: 34px; height: 19px; padding: 2px; border: 1px solid #334454; border-radius: 12px; background: #1b2937; cursor: pointer; transition: background .18s ease, border-color .18s ease; }
.switch span { display: block; width: 13px; height: 13px; border-radius: 50%; background: #8595a4; transition: transform .18s ease, background .18s ease; }
.switch.is-on { background: rgba(133,214,223,.2); border-color: var(--accent-line); }
.switch.is-on span { transform: translateX(14px); background: var(--accent); }
.transport-row { display: grid; grid-template-columns: 1.2fr .9fr 1fr; gap: 7px; margin-top: 11px; }
.transport, .action-btn { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 33px; border: 1px solid var(--line-strong); border-radius: 8px; background: rgba(17,28,42,.8); color: #bdcbd6; font-size: 9px; font-weight: 650; cursor: pointer; transition: background .16s ease, border-color .16s ease, transform .16s ease; }
.transport:hover, .action-btn:hover { border-color: var(--accent-line); background: rgba(133,214,223,.08); }
.transport:active, .action-btn:active { transform: translateY(1px); }
.transport.primary { color: #081219; border-color: transparent; background: var(--accent); font-weight: 800; }
.transport.primary:hover { background: #a0e6ec; }
#playIcon { font-size: 12px; }
.action-row { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.action-btn { min-height: 29px; padding: 0 11px; font-size: 8px; background: transparent; }
.action-btn span { color: var(--accent); font-size: 12px; }
.keyboard-hint { color: #5f7182; font-size: 7px; letter-spacing: .06em; }
.keyboard-hint i { color: var(--accent); font-style: normal; margin: 0 4px; }
.readout-section { margin-top: 15px; padding-top: 13px; border-top: 1px solid var(--line); }
.readout-section > .section-kicker { display: flex; justify-content: space-between; align-items: center; margin-bottom: 9px; }
.readout-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.readout-card { min-width: 0; padding: 9px 10px 8px; border: 1px solid rgba(159,181,204,.1); border-radius: 8px; background: linear-gradient(145deg, rgba(19,31,46,.88), rgba(12,20,31,.88)); }
.readout-label { color: #8597a8; font-size: 8px; }
.readout-value { margin-top: 5px; color: #edf6fa; font-size: 19px; font-weight: 650; letter-spacing: -.045em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.readout-value span { color: var(--accent); font-size: 10px; margin-left: 3px; font-weight: 600; letter-spacing: 0; }
.readout-foot { margin-top: 3px; color: #627487; font-size: 7px; }
.check-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 8px 9px; border: 1px solid rgba(133,214,223,.16); border-radius: 8px; background: rgba(133,214,223,.045); }
.check-mark { display: grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; color: #081219; background: var(--accent); font-size: 10px; font-weight: 900; flex: 0 0 auto; }
.check-copy { min-width: 0; flex: 1; }
.check-copy b { display: block; color: #cfe0e8; font-size: 8px; }
.check-copy span { display: block; margin-top: 3px; color: #8398a8; font-size: 7px; line-height: 1.35; font-variant-numeric: tabular-nums; }
.science-panel { margin-top: 13px; border: 1px solid var(--line); border-radius: 9px; background: rgba(11,19,30,.7); }
.science-panel summary { display: flex; align-items: center; gap: 9px; padding: 11px 12px; list-style: none; cursor: pointer; }
.science-panel summary::-webkit-details-marker { display: none; }
.science-icon { display: grid; place-items: center; width: 26px; height: 26px; border: 1px solid var(--accent-line); border-radius: 7px; color: var(--accent); background: var(--accent-dim); font-size: 15px; }
.science-panel summary b { display: block; font-size: 10px; color: #dce7ed; }
.science-panel summary small { display: block; margin-top: 3px; color: var(--quiet); font-size: 8px; }
.summary-chevron { margin-left: auto; color: var(--muted); font-size: 16px; transition: transform .2s ease; }
.science-panel[open] .summary-chevron { transform: rotate(180deg); }
.science-content { padding: 0 12px 12px; }
.science-intro, .science-note { margin: 0 0 10px; color: #aabac6; font-size: 9px; line-height: 1.55; }
.equation-block { margin: 9px 0; padding: 9px 10px; border: 1px solid rgba(133,214,223,.12); border-radius: 7px; background: rgba(133,214,223,.035); }
.equation-title { margin-bottom: 7px; color: #7993a5; font-size: 7px; letter-spacing: .14em; font-weight: 800; }
.equation { margin: 4px 0; color: #e1edf2; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }
.equation-note { margin-top: 6px; color: #71879a; font-size: 8px; line-height: 1.45; }
.fact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 10px 0; }
.fact-grid > div { padding: 7px; border-radius: 6px; background: rgba(255,255,255,.025); }
.fact-grid b { display: block; color: #dce9ef; font-size: 11px; font-variant-numeric: tabular-nums; }
.fact-grid span { display: block; margin-top: 3px; color: #6f8495; font-size: 6px; letter-spacing: .07em; }
.science-note b { color: #d6e4eb; }
.seed-note { padding-top: 8px; border-top: 1px solid var(--line); }
.affiliation-note { margin: 10px 0 0; padding-top: 9px; border-top: 1px solid var(--line); color: #728697; font-size: 8px; font-style: italic; line-height: 1.4; }
.panel-bottomline { display: flex; justify-content: space-between; gap: 8px; padding: 12px 1px 2px; color: #536679; font-size: 7px; letter-spacing: .1em; }
.panel-bottomline i { color: var(--accent); font-style: normal; padding: 0 3px; }
button:focus-visible, summary:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (max-width: 1050px) and (min-width: 701px) {
  .workspace { grid-template-columns: minmax(0, 1fr) 340px; }
  .visual-column { padding-left: 14px; padding-right: 14px; }
  .control-panel { padding-left: 14px; padding-right: 14px; }
  .canvas-legend { bottom: 43%; }
}
@media (max-width: 700px) {
  .app-shell { grid-template-rows: 56px minmax(0, 1fr); }
  .topbar { padding: 0 12px; }
  .brand-mark { width: 29px; height: 29px; }
  .brand-mark span:nth-child(1) { width: 22px; }
  .brand-mark span:nth-child(2) { width: 26px; }
  .eyebrow { font-size: 7px; letter-spacing: .12em; }
  h1 { font-size: 14px; }
  .top-meta { gap: 7px; font-size: 7px; }
  .live-indicator { gap: 5px; }
  .meta-divider { height: 13px; }
  .seed-label em { display: none; }
  .workspace { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(250px, 43dvh) minmax(0, 1fr); }
  .visual-column { padding: 9px 9px 8px; gap: 7px; grid-template-rows: minmax(0,1fr) auto; }
  .canvas-wrap { border-radius: 11px; }
  .canvas-topline { left: 11px; right: 11px; top: 10px; }
  .scene-tag, .scene-right-tag { font-size: 7px; }
  .scene-right-tag span { display: none; }
  .canvas-legend { left: 11px; top: 37px; bottom: auto; gap: 5px; font-size: 7px; }
    .caption-strip { min-height: 55px; padding: 8px 9px; gap: 8px; border-radius: 9px; }
  .caption-icon { width: 28px; height: 28px; border-radius: 8px; font-size: 14px; }
  .caption-label { font-size: 7px; margin-bottom: 3px; }
  .caption-copy p { font-size: 9px; line-height: 1.35; }
  .caption-state { padding: 5px 6px; font-size: 6px; }
  .control-panel { padding: 12px 13px 14px; border-left: 0; border-top: 1px solid var(--line); }
  .panel-heading { margin-bottom: 10px; }
  h2 { font-size: 15px; }
  .preset-row { margin-bottom: 9px; }
  .preset-btn { padding: 7px; gap: 6px; }
  .preset-btn b { font-size: 8px; }
  .preset-btn small { font-size: 7px; }
  .control-group { padding: 7px 0 6px; }
  .control-head { margin-bottom: 4px; }
  .control-head label { font-size: 9px; }
  .range-ends { font-size: 6px; }
  .slider-line { grid-template-columns: minmax(0,1fr) 74px; }
  .toggle-row { padding: 8px 0; }
  .transport-row { margin-top: 8px; }
  .transport { min-height: 31px; }
  .readout-section { margin-top: 12px; padding-top: 10px; }
  .readout-value { font-size: 17px; }
  .panel-bottomline { font-size: 6px; }
}
@media (max-width: 380px) {
  .top-meta .live-indicator { display: none; }
  .top-meta .meta-divider { display: none; }
  .caption-state { display: none; }
  .workspace { grid-template-rows: minmax(235px, 40dvh) minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
