:root {
  color-scheme: dark;
  --bg: #08111a;
  --panel: #101d28;
  --panel-2: #142431;
  --panel-3: #1a2c39;
  --line: rgba(155, 190, 207, 0.14);
  --line-strong: rgba(155, 190, 207, 0.24);
  --text: #e9f2f5;
  --muted: #92a8b5;
  --dim: #627b8a;
  --cyan: #74d5ee;
  --blue: #4eafd7;
  --green: #9acda9;
  --amber: #e5bb7b;
  --radius: 12px;
  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.01em; }
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.app-shell { height: 100%; display: grid; grid-template-rows: 58px minmax(0, 1fr) 26px; background: radial-gradient(ellipse at 38% 48%, rgba(25, 56, 73, 0.18), transparent 55%), var(--bg); }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 20px; border-bottom: 1px solid var(--line); background: rgba(9, 20, 29, 0.94); z-index: 5; }
.brand-lockup { display: flex; align-items: center; gap: 11px; min-width: 260px; }
.brand-mark { width: 27px; height: 27px; position: relative; display: flex; align-items: center; justify-content: center; gap: 3px; border: 1px solid rgba(116, 213, 238, .42); border-radius: 8px; background: linear-gradient(145deg, rgba(85, 186, 220, .18), rgba(22, 48, 63, .25)); }
.brand-mark span { display: block; width: 3px; border-radius: 4px; background: var(--cyan); box-shadow: 0 0 9px rgba(116,213,238,.38); }
.brand-mark span:nth-child(1) { height: 8px; opacity: .65; }
.brand-mark span:nth-child(2) { height: 15px; }
.brand-mark span:nth-child(3) { height: 11px; opacity: .8; }
.brand-name { font-size: 11px; font-weight: 800; letter-spacing: .14em; line-height: 1.2; }
.brand-name span { color: var(--cyan); font-weight: 600; }
.brand-subtitle { color: var(--dim); font-size: 8px; letter-spacing: .17em; margin-top: 4px; }
.topbar-center { color: #7994a4; font-size: 9px; letter-spacing: .16em; font-weight: 700; white-space: nowrap; }
.topbar-dot { display: inline-block; width: 6px; height: 6px; margin: 0 8px 1px 0; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.topbar-divider { color: #3c5667; margin: 0 8px; }
.topbar-actions { display: flex; align-items: center; gap: 9px; min-width: 260px; justify-content: flex-end; }
.icon-button, .export-button { border: 1px solid var(--line-strong); background: #12222e; border-radius: 8px; height: 32px; cursor: pointer; transition: background .18s ease, border-color .18s ease, transform .18s ease; }
.icon-button:hover, .export-button:hover { background: #1a3544; border-color: rgba(116,213,238,.5); }
.icon-button { width: 34px; font-size: 17px; color: var(--cyan); }
.camera-glyph { display: inline-block; transform: rotate(-20deg); }
.export-button { padding: 0 12px; font-size: 9px; font-weight: 800; letter-spacing: .11em; color: #d9edf3; }
.export-button span { color: var(--cyan); margin-right: 5px; font-size: 14px; vertical-align: -1px; }

.workspace { min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 354px; gap: 12px; padding: 12px; }
.stage-column { min-width: 0; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) 92px; gap: 10px; }
.scene-stage { position: relative; min-height: 0; overflow: hidden; border: 1px solid rgba(119, 171, 195, .18); border-radius: 14px; background: #09141e; box-shadow: 0 16px 44px rgba(0,0,0,.22), inset 0 0 0 1px rgba(255,255,255,.018); isolation: isolate; }
#scene-canvas { display: block; width: 100%; height: 100%; outline: none; touch-action: none; }
.scene-vignette { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(5,13,20,.58), transparent 48%, rgba(5,13,20,.16)), linear-gradient(0deg, rgba(4,12,19,.55), transparent 30%, rgba(4,12,19,.18)); z-index: 1; }
.scene-heading { position: absolute; left: 24px; top: 22px; z-index: 2; pointer-events: none; }
.eyebrow { color: #89a7b8; font-size: 9px; font-weight: 800; letter-spacing: .18em; display: flex; align-items: center; gap: 8px; }
.eyebrow-line { display: inline-block; width: 19px; height: 1px; background: var(--cyan); box-shadow: 0 0 8px rgba(116,213,238,.6); }
.eyebrow-separator { color: #486575; }
.scene-heading h1 { margin: 10px 0 2px; font-size: clamp(24px, 2.5vw, 35px); line-height: 1.08; font-weight: 650; letter-spacing: -.045em; text-shadow: 0 2px 16px rgba(0,0,0,.5); }
.scene-heading h1 em { font-style: normal; color: #9ee5f5; }
.scene-heading p { margin: 6px 0 0; color: #9ab0bd; font-size: 11px; letter-spacing: .03em; }
.scene-badges { position: absolute; top: 22px; right: 20px; display: flex; flex-direction: column; align-items: flex-end; gap: 7px; z-index: 2; pointer-events: none; }
.scene-badge { height: 25px; padding: 0 9px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid rgba(116,213,238,.25); border-radius: 5px; background: rgba(10,28,39,.76); color: #b7d7e2; font-size: 8px; font-weight: 800; letter-spacing: .12em; backdrop-filter: blur(10px); }
.badge-pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(154,205,169,.12), 0 0 8px var(--green); }
.scene-badge.muted-badge { color: #7893a1; border-color: rgba(155,190,207,.13); background: rgba(10,23,32,.64); }
.badge-separator { color: #4f6b7b; }
.annotation { position: absolute; z-index: 2; display: flex; align-items: center; gap: 6px; padding: 6px 8px; border: 1px solid rgba(139,201,220,.2); border-radius: 5px; background: rgba(7,22,31,.78); color: #b8d4df; font-size: 8px; font-weight: 800; letter-spacing: .1em; pointer-events: none; backdrop-filter: blur(8px); box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.annotation-index { color: var(--cyan); font-size: 9px; }
.annotation b { color: #e5f5fa; font-size: 9px; font-variant-numeric: tabular-nums; margin-left: 3px; }
.annotation-front { right: 18%; top: 43%; }
.annotation-lens { left: 42%; top: 62%; }
.annotation-flow { left: 12%; bottom: 28%; }
.scene-bottom-left { position: absolute; left: 22px; bottom: 18px; z-index: 2; width: 235px; pointer-events: none; }
.scene-legend-title { color: #9cb4c1; font-size: 8px; letter-spacing: .16em; font-weight: 800; }
.scene-legend-title span { color: #688291; font-weight: 600; margin-left: 6px; }
.thermal-legend { margin-top: 8px; display: flex; align-items: center; gap: 7px; color: #7894a3; font-size: 7px; letter-spacing: .1em; font-weight: 800; }
.thermal-gradient { height: 5px; flex: 1; border-radius: 10px; background: linear-gradient(90deg, #2d8ac0, #a8d8df 52%, #c8753e); box-shadow: 0 0 10px rgba(78,175,215,.14); }
.scene-caption { margin-top: 8px; max-width: 235px; color: #89a0ad; font-size: 9px; line-height: 1.5; text-shadow: 0 1px 5px #06111a; }
.scene-bottom-right { position: absolute; right: 20px; bottom: 19px; z-index: 2; display: flex; align-items: center; gap: 7px; color: #d1e7ed; font-size: 10px; font-weight: 700; letter-spacing: .04em; padding: 7px 10px; background: rgba(9,24,34,.76); border: 1px solid rgba(116,213,238,.18); border-radius: 6px; backdrop-filter: blur(8px); }
.uplift-icon { font-size: 17px; line-height: 10px; color: var(--cyan); }
.scene-hint { position: absolute; top: 50%; right: 16px; z-index: 2; transform: translateY(-50%) rotate(90deg) translateX(50%); transform-origin: right center; color: rgba(163,190,202,.55); font-size: 7px; font-weight: 800; letter-spacing: .15em; pointer-events: none; }
.scene-hint span { margin: 0 7px; color: #547284; }
.mouse-icon { color: var(--cyan); font-size: 12px; vertical-align: -1px; }
.context-overlay { position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; background: rgba(5,13,20,.84); backdrop-filter: blur(8px); }
.context-overlay[hidden] { display: none; }
.context-card { display: flex; flex-direction: column; align-items: center; gap: 9px; padding: 24px 30px; border: 1px solid var(--line-strong); border-radius: 12px; background: #10202b; color: var(--text); text-align: center; }
.context-card span { color: var(--muted); font-size: 11px; }
.context-spinner { width: 24px; height: 24px; border: 2px solid rgba(116,213,238,.18); border-top-color: var(--cyan); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.metrics-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; min-width: 0; }
.metric-card { min-width: 0; border: 1px solid var(--line); border-radius: 9px; background: linear-gradient(145deg, rgba(18,34,46,.92), rgba(12,25,35,.92)); padding: 11px 12px 8px; overflow: hidden; }
.metric-label { color: #7893a2; font-size: 8px; font-weight: 800; letter-spacing: .13em; white-space: nowrap; }
.metric-value { margin-top: 7px; color: #e7f4f7; font-size: clamp(14px, 1.35vw, 19px); line-height: 1; font-weight: 650; letter-spacing: -.035em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.metric-front .metric-value, .metric-uplift .metric-value { color: #a8e4f2; }
.metric-foot { margin-top: 6px; color: #5f7887; font-size: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.control-panel { min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: linear-gradient(180deg, rgba(17,31,42,.98), rgba(13,26,36,.98)); box-shadow: 0 12px 34px rgba(0,0,0,.18); }
.panel-header { display: flex; align-items: center; justify-content: space-between; padding: 17px 17px 14px; border-bottom: 1px solid var(--line); }
.panel-kicker { color: #6f8a99; font-size: 8px; font-weight: 800; letter-spacing: .17em; }
.panel-header h2 { margin: 5px 0 0; font-size: 18px; font-weight: 650; letter-spacing: -.035em; }
.live-indicator { display: flex; align-items: center; gap: 6px; color: #8dbca3; font-size: 8px; font-weight: 800; letter-spacing: .11em; }
.live-indicator span { width: 6px; height: 6px; border-radius: 50%; background: #8dc7a3; box-shadow: 0 0 8px rgba(141,199,163,.65); }
.panel-scroll { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #345060 transparent; padding: 0 16px 16px; }
.panel-scroll::-webkit-scrollbar { width: 5px; }
.panel-scroll::-webkit-scrollbar-thumb { background: #345060; border-radius: 5px; }
.control-section { padding: 14px 0 15px; border-bottom: 1px solid var(--line); }
.section-title-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.section-title-row h3, .display-head h3 { margin: 0; color: #8ba4b2; font-size: 8px; font-weight: 850; letter-spacing: .15em; }
.section-count, .section-icon, .time-readout { color: #597789; font-size: 9px; font-weight: 700; letter-spacing: .08em; }
.preset-list { display: grid; gap: 6px; }
.preset-button { display: grid; grid-template-columns: 25px minmax(0, 1fr) 16px; align-items: center; gap: 9px; width: 100%; padding: 8px 9px; border: 1px solid rgba(149,184,201,.12); border-radius: 8px; background: rgba(18,35,47,.68); text-align: left; cursor: pointer; transition: border-color .16s ease, background .16s ease; }
.preset-button:hover { border-color: rgba(116,213,238,.38); background: rgba(25,50,64,.7); }
.preset-button.selected { border-color: rgba(116,213,238,.48); background: linear-gradient(100deg, rgba(45,111,136,.2), rgba(19,39,52,.82)); box-shadow: inset 2px 0 0 var(--cyan); }
.preset-swatch { width: 23px; height: 23px; border-radius: 6px; border: 1px solid rgba(255,255,255,.13); }
.swatch-loam { background: linear-gradient(135deg, #9a7659, #564638 55%, #b4dfe6 56%, #69a9c0); }
.swatch-sand { background: linear-gradient(135deg, #d0aa75, #876a4b 58%, #d5e9e7 59%, #6c9eb0); }
.swatch-wet { background: linear-gradient(135deg, #655a4c, #3f4645 55%, #b8edf3 56%, #3f91ad); }
.preset-button strong { display: block; color: #d8e7eb; font-size: 10px; font-weight: 700; }
.preset-button small { display: block; margin-top: 3px; color: #718b99; font-size: 8px; }
.preset-check { color: transparent; font-size: 12px; text-align: center; }
.preset-button.selected .preset-check { color: var(--cyan); }
.preset-note { margin-top: 8px; color: #6d8795; font-size: 8px; line-height: 1.4; }

.slider-control { margin-top: 12px; }
.slider-control:first-of-type { margin-top: 0; }
.slider-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.slider-head label { color: #c1d2d9; font-size: 10px; font-weight: 550; }
.slider-head output { color: #9dddec; font-size: 9px; font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }
input[type="range"] { appearance: none; -webkit-appearance: none; display: block; width: 100%; height: 4px; margin: 0; border-radius: 6px; background: linear-gradient(90deg, #4da9cb, #2d5267); cursor: pointer; }
input[type="range"]::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 13px; height: 13px; border: 2px solid #d9f5fa; border-radius: 50%; background: #5dbbd9; box-shadow: 0 0 0 3px rgba(93,187,217,.14), 0 1px 6px rgba(0,0,0,.3); }
input[type="range"]::-moz-range-thumb { width: 10px; height: 10px; border: 2px solid #d9f5fa; border-radius: 50%; background: #5dbbd9; box-shadow: 0 0 0 3px rgba(93,187,217,.14); }
.range-ends { display: flex; justify-content: space-between; margin-top: 6px; color: #607987; font-size: 7px; letter-spacing: .02em; }
.simulation-section { padding-bottom: 13px; }
.compact-slider { margin-top: 3px; }
.transport-controls { display: grid; grid-template-columns: 1.15fr .9fr .9fr; gap: 6px; margin-top: 14px; }
.primary-control, .secondary-control { display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; height: 34px; border-radius: 7px; cursor: pointer; font-size: 9px; font-weight: 800; letter-spacing: .04em; transition: background .16s ease, border-color .16s ease, transform .16s ease; }
.primary-control { border: 1px solid rgba(116,213,238,.5); background: linear-gradient(135deg, #24677f, #17475d); color: #e7f7fa; box-shadow: 0 4px 14px rgba(38,123,154,.15); }
.primary-control:hover { background: linear-gradient(135deg, #2d7d98, #1d5a70); }
.secondary-control { border: 1px solid var(--line-strong); background: #192d3a; color: #c0d1d9; }
.secondary-control:hover { border-color: rgba(116,213,238,.4); background: #213b4a; }
.button-icon { font-size: 14px; line-height: 1; color: #a6e8f4; }
.transport-status { display: flex; align-items: center; gap: 8px; margin-top: 9px; color: #718b99; font-size: 8px; }
.play-status { color: #b2a17f; font-size: 7px; font-weight: 850; letter-spacing: .12em; }
.play-status.is-running { color: #8ec9a4; }
.status-spacer { flex: 1; }
.keyboard-hint { color: #526b7b; font-size: 7px; letter-spacing: .08em; }
.display-section { padding: 13px 0; border-bottom: 1px solid var(--line); }
.display-head { display: flex; align-items: center; justify-content: space-between; }
.display-head small { display: block; margin-top: 4px; color: #607987; font-size: 8px; }
.quality-toggle { min-width: 50px; height: 25px; border: 1px solid rgba(116,213,238,.3); border-radius: 6px; background: rgba(47,106,129,.2); color: #a8e3f0; font-size: 8px; font-weight: 850; letter-spacing: .1em; cursor: pointer; }
.quality-toggle:hover { background: rgba(47,106,129,.38); }
.science-panel { margin-top: 12px; border: 1px solid rgba(116,213,238,.16); border-radius: 9px; background: rgba(14,31,42,.72); overflow: hidden; }
.science-panel summary { display: flex; align-items: center; gap: 9px; padding: 11px 10px; cursor: pointer; list-style: none; }
.science-panel summary::-webkit-details-marker { display: none; }
.science-symbol { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 6px; background: rgba(81,169,199,.15); color: var(--cyan); font-size: 15px; }
.science-panel summary strong { display: block; color: #b9d4de; font-size: 9px; letter-spacing: .12em; }
.science-panel summary small { display: block; margin-top: 3px; color: #66808f; font-size: 8px; }
.summary-chevron { margin-left: auto; color: #79a0b2; font-size: 17px; transition: transform .18s ease; }
.science-panel[open] .summary-chevron { transform: rotate(180deg); }
.science-content { padding: 0 10px 12px; border-top: 1px solid rgba(155,190,207,.1); }
.science-step { display: grid; grid-template-columns: 22px minmax(0,1fr); gap: 7px; padding: 10px 0; border-bottom: 1px solid rgba(155,190,207,.09); }
.science-step > span { color: #5f8b9d; font-size: 8px; font-weight: 800; padding-top: 2px; }
.science-step strong { display: block; color: #c8dce3; font-size: 9px; }
.science-step code { display: block; margin-top: 5px; padding: 5px 7px; border: 1px solid rgba(116,213,238,.13); border-radius: 5px; background: rgba(8,21,30,.68); color: #9fe3f2; font-size: 9px; white-space: normal; }
.science-step p { margin: 5px 0 0; color: #718b99; font-size: 8px; line-height: 1.55; }
.science-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 10px; padding: 8px; border: 1px solid rgba(116,213,238,.13); border-radius: 6px; background: rgba(7,20,29,.55); color: #a9cbd6; font-size: 7px; }
.science-flow span { color: #5e91a4; font-size: 6px; font-weight: 900; letter-spacing: .1em; }
.science-flow b { color: #c8e0e7; font-size: 7px; font-weight: 700; }
.science-flow i { color: var(--cyan); font-style: normal; }
.variable-notes { padding-bottom: 3px; }
.variable-notes p { margin: 6px 0 0; color: #718b99; font-size: 8px; line-height: 1.55; }
.validation-card { margin-top: 11px; padding: 10px; border: 1px solid rgba(116,213,238,.18); border-radius: 7px; background: rgba(19,43,55,.65); }
.validation-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.validation-kicker { display: block; color: #6795a7; font-size: 7px; letter-spacing: .13em; font-weight: 850; margin-bottom: 4px; }
.validation-head strong { color: #d2e6eb; font-size: 9px; }
.validation-status { padding: 3px 6px; border-radius: 4px; font-size: 7px; font-weight: 900; letter-spacing: .1em; }
.status-pass { color: #a8d7b5; border: 1px solid rgba(129,198,151,.28); background: rgba(78,147,98,.12); }
.status-warn { color: #e4bb7c; border: 1px solid rgba(228,187,124,.3); background: rgba(155,104,44,.14); }
.validation-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 5px; margin-top: 10px; }
.validation-grid small { display: block; color: #688493; font-size: 7px; letter-spacing: .1em; }
.validation-grid b { display: block; margin-top: 4px; color: #d6edf2; font-size: 9px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.validation-card p { margin: 9px 0 0; color: #728d9b; font-size: 8px; line-height: 1.5; }
.science-notes { margin-top: 12px; }
.science-notes strong { color: #c5d9e0; font-size: 9px; }
.science-notes ul { margin: 7px 0 0; padding-left: 15px; color: #718b99; font-size: 8px; line-height: 1.6; }
.science-legend { display: flex; gap: 5px; margin-top: 10px; }
.legend-tag { padding: 3px 5px; border-radius: 4px; font-size: 6px; font-weight: 900; letter-spacing: .1em; }
.legend-tag.textbook { color: #9ddded; background: rgba(72,160,188,.13); }
.legend-tag.illustrative { color: #e5c18c; background: rgba(184,133,67,.14); }
.legend-tag.scaled { color: #b3c1c8; background: rgba(124,146,158,.14); }
.motion-note { padding: 8px; margin-top: 10px; border-radius: 6px; background: rgba(116,213,238,.08); color: #89b7c5; font-size: 8px; line-height: 1.4; }
.motion-note[hidden] { display: none; }

.footerbar { display: flex; align-items: center; gap: 7px; padding: 0 18px; border-top: 1px solid var(--line); color: #536d7b; font-size: 7px; font-weight: 750; letter-spacing: .12em; white-space: nowrap; }
.footer-separator { color: #365061; }
.footer-spacer { flex: 1; }
.footerbar span:last-child { color: #6f8793; font-weight: 500; letter-spacing: .02em; }
.embed-mode .topbar, .embed-mode .footerbar { display: none; }
.embed-mode .app-shell { grid-template-rows: minmax(0,1fr); }
.embed-mode .workspace { padding: 8px; }

@media (max-width: 1120px) {
  .workspace { grid-template-columns: minmax(0, 1fr) 326px; gap: 9px; padding: 9px; }
  .topbar { padding: 0 14px; }
  .topbar-center { font-size: 8px; }
  .stage-column { grid-template-rows: minmax(0,1fr) 86px; }
  .metric-card { padding: 10px 9px 7px; }
  .metric-label { font-size: 7px; }
  .metric-foot { font-size: 7px; }
  .panel-scroll { padding: 0 13px 13px; }
}

@media (max-width: 820px) {
  html, body { height: auto; min-height: 100%; overflow: auto; }
  .app-shell { min-height: 100vh; height: auto; grid-template-rows: 58px auto 28px; }
  .topbar-center { display: none; }
  .workspace { display: flex; flex-direction: column; padding: 9px; gap: 9px; }
  .stage-column { display: grid; grid-template-rows: minmax(420px, 52vh) auto; gap: 8px; }
  .metrics-grid { grid-template-columns: repeat(3, minmax(0,1fr)); grid-auto-rows: 77px; }
  .metric-card { padding: 10px; }
  .metric-value { font-size: 17px; }
  .control-panel { max-height: none; overflow: visible; }
  .panel-scroll { overflow: visible; }
  .footerbar { white-space: normal; min-height: 28px; padding: 6px 12px; flex-wrap: wrap; line-height: 1.4; }
  .footer-spacer { display: none; }
  .scene-heading { left: 17px; top: 17px; }
  .scene-heading h1 { font-size: 27px; }
  .scene-badges { right: 12px; top: 14px; }
  .annotation-front { right: 8%; top: 43%; }
  .annotation-lens { left: 34%; top: 62%; }
  .annotation-flow { left: 8%; bottom: 28%; }
  .scene-bottom-left { left: 15px; bottom: 13px; width: 205px; }
  .scene-caption { max-width: 200px; font-size: 8px; }
  .scene-bottom-right { right: 12px; bottom: 13px; }
  .scene-hint { display: none; }
}

@media (max-width: 480px) {
  .app-shell { grid-template-rows: 56px auto 34px; }
  .topbar { padding: 0 10px; gap: 8px; }
  .brand-lockup { min-width: 0; gap: 8px; }
  .brand-mark { width: 25px; height: 25px; }
  .brand-name { font-size: 10px; }
  .brand-subtitle { font-size: 7px; letter-spacing: .12em; }
  .topbar-actions { min-width: 0; gap: 6px; }
  .icon-button { width: 30px; height: 30px; }
  .export-button { height: 30px; padding: 0 8px; font-size: 7px; }
  .workspace { padding: 7px; gap: 8px; }
  .stage-column { grid-template-rows: minmax(390px, 50vh) auto; }
  .scene-stage { border-radius: 10px; }
  .scene-heading { left: 13px; top: 14px; }
  .scene-heading h1 { font-size: 24px; margin-top: 8px; }
  .scene-heading p { font-size: 9px; }
  .eyebrow { font-size: 7px; }
  .scene-badges { top: 13px; right: 9px; gap: 5px; }
  .scene-badge { height: 21px; padding: 0 6px; font-size: 6px; letter-spacing: .08em; }
  .annotation { font-size: 6px; padding: 5px 6px; gap: 4px; }
  .annotation-index, .annotation b { font-size: 7px; }
  .annotation-front { top: 42%; right: 5%; }
  .annotation-lens { top: 61%; left: 31%; }
  .annotation-flow { bottom: 29%; left: 5%; }
  .scene-bottom-left { left: 11px; bottom: 11px; width: 180px; }
  .scene-legend-title { font-size: 7px; }
  .thermal-legend { font-size: 6px; gap: 5px; }
  .scene-caption { max-width: 176px; font-size: 7px; line-height: 1.35; margin-top: 6px; }
  .scene-bottom-right { right: 8px; bottom: 11px; padding: 6px 7px; font-size: 8px; }
  .metrics-grid { grid-template-columns: repeat(2, minmax(0,1fr)); grid-auto-rows: 72px; gap: 6px; }
  .metric-card { padding: 9px 10px 7px; }
  .metric-label { font-size: 7px; }
  .metric-value { font-size: 16px; margin-top: 6px; }
  .metric-foot { font-size: 7px; margin-top: 5px; }
  .metric-uplift { grid-column: span 2; }
  .panel-header { padding: 14px 13px 12px; }
  .panel-header h2 { font-size: 17px; }
  .panel-scroll { padding: 0 13px 13px; }
  .footerbar { gap: 5px; font-size: 6px; }
  .footerbar span:last-child { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
