:root {
  color-scheme: light;
  --ink: #2c2924;
  --muted: #726b60;
  --paper: #f5f0e7;
  --panel: #fffdf8;
  --line: #ded4c4;
  --accent: #9b633b;
  --accent-dark: #68442d;
  --soft: #e9dfce;
  --shadow: 0 14px 36px rgba(59, 42, 25, .12);
  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(--paper); color: var(--ink); }
body { min-height: 100vh; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.brand-header { height: 70px; padding: 10px 22px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); background: #fbf8f1; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; color: #fff9ed; background: var(--accent-dark); font-family: Georgia, serif; font-size: 22px; }
.brand-header h1 { margin: 0; font: 600 19px/1.15 Georgia, serif; letter-spacing: .01em; }
.eyebrow { margin: 0 0 4px; font-size: 9px; line-height: 1.2; letter-spacing: .16em; font-weight: 800; color: var(--accent); }
.header-meta { margin-left: auto; color: var(--muted); font-size: 12px; }
.header-meta span { padding: 0 7px; color: #b29a7c; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; height: calc(100vh - 70px); min-height: 0; }
.stage-column { min-width: 0; min-height: 0; padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.stage-topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stage-topline h2 { margin: 0; font: 500 22px/1.2 Georgia, serif; }
.stage-status { padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: rgba(255,253,248,.78); font-size: 10px; white-space: nowrap; }
.stage { position: relative; min-height: 0; flex: 1; overflow: hidden; border: 1px solid #d6c7b2; border-radius: 16px; background: linear-gradient(180deg, #d8e0d9 0%, #e8d9bf 55%, #bda07b 100%); box-shadow: var(--shadow); }
#scene { display: block; width: 100%; height: 100%; min-height: 0; touch-action: none; outline: none; }
.hotspot-layer { position: absolute; inset: 0; pointer-events: none; }
.hotspot { position: absolute; width: 29px; height: 29px; padding: 0; border: 2px solid #fff9ed; border-radius: 50%; background: #75492f; color: #fff; box-shadow: 0 2px 9px rgba(33,24,16,.35); font-size: 9px; font-weight: 800; transform: translate(-50%,-50%); pointer-events: auto; }
.hotspot:hover, .hotspot:focus-visible { background: #b06f3c; outline: 3px solid rgba(255,255,255,.85); outline-offset: 2px; }
.stage-caption { position: absolute; bottom: 12px; left: 14px; display: flex; flex-wrap: wrap; gap: 6px; pointer-events: none; }
.stage-caption span { padding: 6px 9px; border: 1px solid rgba(255,255,255,.55); border-radius: 999px; background: rgba(250,246,236,.83); color: #51473a; font-size: 9px; font-weight: 600; backdrop-filter: blur(6px); }
.camera-bar { display: flex; flex-wrap: wrap; gap: 7px; }
.button { min-height: 34px; padding: 7px 11px; border-radius: 8px; border: 1px solid var(--line); font-size: 11px; font-weight: 700; transition: background .15s ease, transform .15s ease; }
.button:hover { transform: translateY(-1px); }
.button:focus-visible, select:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid #d4a16e; outline-offset: 2px; }
.button-light { background: #fffdf8; color: #54483b; }
.button-dark { border-color: var(--accent-dark); background: var(--accent-dark); color: #fffaf1; }
.control-panel { min-height: 0; padding: 8px 18px 18px; border-left: 1px solid var(--line); background: #fbf8f1; overflow-y: auto; }
.panel-section { padding: 17px 0 16px; border-bottom: 1px solid var(--line); }
.section-heading { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; }
.section-number { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: #eee3d2; color: var(--accent-dark); font-size: 9px; font-weight: 800; }
.section-heading h2 { margin: 0; font: 600 15px/1.2 Georgia, serif; }
.muted { margin: 0 0 10px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.hotspot-info { min-height: 108px; padding: 12px; border: 1px solid #e2d4c2; border-radius: 10px; background: #fffdf8; }
.hotspot-info h3 { margin: 3px 0 6px; font: 600 16px/1.25 Georgia, serif; }
.hotspot-info p:last-child { margin: 0; color: #61594e; font-size: 11px; line-height: 1.5; }
.info-kicker { margin: 0; color: var(--accent); font-size: 8px; font-weight: 800; letter-spacing: .15em; }
.control-label { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 11px 0 6px; color: #4c453c; font-size: 10px; font-weight: 750; }
.control-label output { color: var(--accent-dark); font-variant-numeric: tabular-nums; }
input[type="range"] { width: 100%; height: 18px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.range-ends { display: flex; justify-content: space-between; color: #8b8174; font-size: 9px; }
select { width: 100%; min-height: 34px; padding: 6px 9px; border: 1px solid #d8cbb9; border-radius: 8px; background: #fffdf8; color: var(--ink); font-size: 11px; }
.small-note { margin: 7px 0 0; color: #83786b; font-size: 9px; line-height: 1.45; }
.readouts { display: grid; grid-template-columns: 1fr; gap: 6px; margin-top: 12px; }
.readout { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 9px; border-radius: 8px; background: #efe7da; }
.readout span { color: #62584c; font-size: 10px; }
.readout strong { color: #3f352a; font-size: 12px; font-variant-numeric: tabular-nums; }
.check-row { display: flex; justify-content: space-between; gap: 8px; padding: 9px 2px 0; color: #6d6255; font-size: 9px; }
.check-row strong { color: #3f352a; font-size: 10px; font-variant-numeric: tabular-nums; }
.science-panel { margin-top: 16px; border: 1px solid var(--line); border-radius: 10px; background: #fffdf8; }
.science-panel summary { padding: 12px; color: #473a2d; font: 600 14px Georgia, serif; cursor: pointer; }
.science-content { padding: 0 13px 13px; color: #5d554a; font-size: 10px; line-height: 1.55; }
.science-content h3 { margin: 14px 0 5px; color: #3f352a; font: 600 12px Georgia, serif; }
.science-content p { margin: 5px 0; }
.science-content ul, .science-content ol { margin: 5px 0; padding-left: 18px; }
.science-content li { margin: 4px 0; }
.science-content a { color: #83512f; overflow-wrap: anywhere; }
.science-content code { padding: 2px 4px; border-radius: 4px; background: #f0e7d9; color: #4d3929; }
.educational-line { margin-top: 13px !important; padding: 9px; border-left: 3px solid var(--accent); background: #f3eadc; color: #493b2d; font-weight: 700; }
.panel-footer { padding: 13px 2px 4px; color: #8a7e70; font-size: 9px; line-height: 1.45; }
body.embed-mode { height: 100vh; height: 100dvh; overflow: hidden; }
body.embed-mode .brand-header { display: none; }
body.embed-mode .layout { height: 100vh; height: 100dvh; min-height: 0; }
body.embed-mode .stage-column { min-height: 0; }
body.embed-mode .stage { min-height: 0; }
body.embed-mode #scene { min-height: 0; }
@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr) 320px; }
  .stage-column { padding: 14px; }
  .control-panel { padding-left: 14px; padding-right: 14px; }
}
@media (max-width: 700px) {
  .brand-header { height: 58px; padding: 8px 13px; }
  .brand-mark { width: 32px; height: 32px; }
  .brand-header h1 { font-size: 16px; }
  .header-meta { font-size: 10px; }
  .layout { display: flex; flex-direction: column; height: auto; min-height: calc(100vh - 58px); }
  .stage-column { padding: 12px 10px 10px; gap: 9px; }
  .stage-topline h2 { font-size: 18px; }
  .stage-status { font-size: 9px; padding: 6px 8px; }
  .stage { height: 50vh; min-height: 300px; flex: none; border-radius: 12px; }
  #scene { height: 100%; min-height: 300px; }
  .stage-caption { bottom: 8px; left: 8px; gap: 4px; }
  .stage-caption span { padding: 5px 7px; font-size: 8px; }
  .camera-bar { gap: 5px; }
  .button { min-height: 32px; padding: 6px 8px; font-size: 10px; }
  .control-panel { border-left: 0; border-top: 1px solid var(--line); padding: 0 14px 18px; overflow: visible; }
  .panel-section { padding: 14px 0; }
  .readouts { grid-template-columns: 1fr 1fr; }
  .readout:last-child { grid-column: 1 / -1; }
  body.embed-mode .layout { display: flex; flex-direction: column; height: 100dvh; }
  body.embed-mode .stage-column { height: 49dvh; min-height: 0; flex: none; padding: 8px 8px 5px; }
  body.embed-mode .stage-topline { display: none; }
  body.embed-mode .stage { height: 100%; min-height: 0; flex: 1; }
  body.embed-mode #scene { min-height: 0; }
  body.embed-mode .stage-caption { display: none; }
  body.embed-mode .camera-bar { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 3px; }
  body.embed-mode .control-panel { height: 51dvh; min-height: 0; overflow-y: auto; padding: 0 12px 12px; }
  body.embed-mode .panel-section { padding: 10px 0; }
  body.embed-mode .selected-info { padding-top: 10px; }
  body.embed-mode .hotspot-info { min-height: 78px; }
  body.embed-mode .science-panel { margin-top: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
