/* Home exhibit: one framed black stage (the live 3D scene) beside the chapters, projected labels, the detail sheet.
   The stage is the only dark area besides the header and the banner. Red is the only colour: live, burn and focus. No inline styles. */

/* ---- the stage frame ---- */
.scene-stage{display:flex;flex-direction:column;height:100%;background:var(--black);overflow:hidden}
.stage-top{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px;padding:0 0 0 14px;border-bottom:1px solid var(--stage-hair);font-family:var(--mono);font-size:12px;letter-spacing:.1em;text-transform:uppercase;color:var(--stage-muted)}
.stage-top>span{display:flex;align-items:center;gap:10px;white-space:nowrap}.stage-top .led-sq{background:var(--stage-red)}
.stage-top .scene-counter{margin-left:auto;padding-right:8px;color:var(--stage-text)}
.scene-counter .name{margin-left:8px;color:var(--stage-muted)}
.stage-view{position:relative;flex:1 1 auto;min-height:0;background:var(--black)}
.scene-poster{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;opacity:1;transition:opacity .4s ease;pointer-events:none}
html[data-scene-ready] .scene-poster{opacity:0;transition-delay:.4s}
.scene-canvas{position:absolute;inset:0;display:block;width:100%;height:100%;opacity:0;transition:opacity .4s ease;touch-action:pan-y}
/* the canvas fades in on the first drawn frame (data-scene-ready), not on the state change: no empty black fade before the bundle is up */
html[data-scene-ready][data-scene="live"] .scene-canvas,html[data-scene-ready][data-scene="still"] .scene-canvas{opacity:1}
.scene-stage .stage-bar{border-top:1px solid var(--stage-hair)}
.hud-button{display:inline-flex;align-items:center;gap:10px;min-height:44px;padding:0 14px;background:transparent;border:0;border-left:1px solid var(--stage-hair);color:var(--stage-text);font-family:var(--mono);font-size:12px;letter-spacing:.1em;text-transform:uppercase;cursor:pointer;white-space:nowrap}
.hud-button:hover{background:#15130f}.hud-button .gi{margin:0;width:14px;height:14px}
.hud-button:focus-visible{outline:2px solid var(--stage-text);outline-offset:-4px}

/* ---- projected labels (an enhancement over the tables): mono caps, cream on black, a 1px hairline ---- */
.scene-labels{position:absolute;inset:0;overflow:hidden;pointer-events:none;contain:layout paint}
.tag{position:absolute;left:0;top:0;transform:translate(-9999px,-9999px);display:flex;flex-direction:column;gap:2px;padding:5px 9px 6px;background:rgba(0,0,0,.82);border:1px solid var(--stage-hair);color:var(--stage-text);white-space:nowrap;max-width:220px;transition:opacity .22s ease;font-family:var(--mono);text-transform:uppercase;letter-spacing:.08em}
.tag[data-anchor="right"],.tag[data-anchor="left"]{padding:1px 8px;line-height:1.35;flex-direction:row;align-items:baseline;gap:8px;max-width:none}
.tag .short{display:none}
.tag[data-mode="short"]{padding:3px 8px 4px}
.tag[data-mode="short"] .long{display:none}
.tag[data-mode="short"] .short{display:inline}
.tag[data-mode="short"][data-compact] .tag-value,.tag[data-mode="short"][data-compact] .tag-note{display:none}
.tag.is-off{opacity:0;visibility:hidden}
.tag-name{font-size:12px;line-height:1.4;color:var(--stage-muted);white-space:normal}
.tag-value{font-size:12px;line-height:1.35;font-variant-numeric:tabular-nums;color:var(--stage-text)}
.tag-note{font-size:12px;line-height:1.35;color:var(--stage-muted)}
.tag[data-anchor="right"] .tag-name{color:var(--stage-text)}
.tag[data-anchor="right"] .tag-value{color:var(--stage-muted)}

/* ---- detail sheet: non-modal dialog (cream, over the page) ---- */
.sheet{position:fixed;z-index:40;right:var(--gutter);bottom:24px;width:min(390px,calc(100vw - 32px));max-height:min(60svh,520px);overflow:auto;padding:16px 20px 20px;background:var(--paper);border:1px solid var(--line);border-top-color:var(--ink)}
.sheet-head{display:flex;justify-content:space-between;align-items:baseline;gap:16px}
.sheet-head h3{font-size:22px}
.sheet .text-button{min-height:44px;font-size:14px}
.sheet-body p{margin-top:10px;font-size:14px;line-height:1.55;max-width:none;font-variant-numeric:tabular-nums}
.sheet-body .sheet-note{color:var(--muted);font-size:14px}

@media(max-width:899px){
  .stage-top{min-height:44px}
  .stage-top>span:first-child{display:none}.stage-top{padding-left:12px}.stage-top .scene-counter{margin-left:0;padding-right:0;flex:1}
  .scene-stage .stage-bar{min-height:30px;padding:4px 12px}
  .tag{max-width:170px}
  .sheet{left:0;right:0;bottom:0;width:auto;max-height:56svh;border-width:1px 0 0;padding:16px 20px calc(20px + env(safe-area-inset-bottom))}
}
@media(forced-colors:active){
  .tag,.sheet,.hud-button{border:1px solid CanvasText}
  .scene-canvas{forced-color-adjust:none}
}
@media(prefers-contrast:more){.tag,.sheet{border-color:var(--ink)}.tag{border-color:var(--stage-text)}}

/* Treat each station as a plate with an engraved key and registration corners. */
.scene-stage .stage-bar{justify-content:space-between;gap:8px;padding-block:0}
.stage-index-link{display:inline-flex;align-items:center;gap:8px;min-height:44px;margin-left:auto;padding-inline:6px;color:var(--stage-text)}
.stage-index-link:focus-visible{outline:2px solid var(--stage-text);outline-offset:-3px}
.stage-top .stage-index-link .scene-counter{margin:0;padding:0}
.view-switch{min-height:44px}
.view-switch::before{content:"";width:9px;height:9px;border:1px solid currentColor}
.view-switch[aria-pressed="true"]::before{background:var(--stage-text);box-shadow:inset 0 0 0 2px var(--black)}
.stage-view::after{content:"";position:absolute;inset:8px;pointer-events:none;--tick:var(--stage-muted);--mark:linear-gradient(var(--tick),var(--tick));background:var(--mark) left top / 9px 1px,var(--mark) left top / 1px 9px,var(--mark) right top / 9px 1px,var(--mark) right top / 1px 9px,var(--mark) left bottom / 9px 1px,var(--mark) left bottom / 1px 9px,var(--mark) right bottom / 9px 1px,var(--mark) right bottom / 1px 9px;background-repeat:no-repeat;opacity:.56}
.scene-counter .name{color:var(--stage-text)}
.tag{border-left-color:var(--stage-muted)}
@media(max-width:899px){.scene-stage .stage-bar{font-size:12px;letter-spacing:.01em;padding-inline:10px 0}.stage-index-link{margin:0;padding:0}.view-switch{font-size:12px;padding:0 10px;letter-spacing:0;gap:6px}.stage-top .hud-button{margin-left:auto}.stage-top{padding-left:10px}.stage-view::after{inset:5px}}
