/* Stage styles, shared by the player and the standalone stage page. */
.pi-stage {
  position: relative; aspect-ratio: 16 / 9; background: #12202A; overflow: hidden;
  container-type: inline-size; color: #F4F3EE;
}
.pi-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.pi-hud { position: absolute; left: 3.2cqw; top: 2.6cqw; width: 66cqw; pointer-events: none; }
.pi-kicker {
  margin: 0; font: 500 1.15cqw/1.2 "IBM Plex Mono", ui-monospace, monospace;
  letter-spacing: 0.14em; text-transform: uppercase; color: #F86102;
}
.pi-caption {
  margin: 0.5cqw 0 0; font: 800 3.1cqw/1.02 "Sofia Sans Extra Condensed", "IBM Plex Sans", sans-serif;
  letter-spacing: 0.01em; text-wrap: balance; color: #F4F3EE; opacity: 0;
}
.pi-caption.pi-in { animation: pi-in 500ms cubic-bezier(0.22, 1, 0.36, 1) forwards; }
@keyframes pi-in { from { opacity: 0; transform: translateY(0.6cqw); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .pi-caption.pi-in { animation: none; opacity: 1; } }
/* a frozen frame (screenshots, review): show the caption settled, not mid-entrance */
.pi-freeze .pi-caption.pi-in { animation: none; opacity: 1; }

/* look: 'lit' scenes: the corners fall away so the middle of the frame reads as lit */
.pi-stage::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 400ms cubic-bezier(0.22, 1, 0.36, 1);
  background: radial-gradient(115% 95% at 50% 46%, rgba(98, 192, 246, 0.045) 0%, transparent 42%, rgba(3, 8, 12, 0.6) 100%);
}
.pi-stage.pi-lit::after { opacity: 1; }
.pi-hud { z-index: 1; }

/* a 3D scene (three: true): a lit diorama on paper, so the title and caption turn to ink */
.pi-stage.pi-three { background: #F4F3EE; color: #12202A; }
.pi-stage.pi-three .pi-caption { color: #12202A; }
/* a paper halo, in case a model's edge strays under the words */
.pi-stage.pi-three .pi-hud { text-shadow: 0 0 0.35cqw #F4F3EE, 0 0 0.7cqw #F4F3EE, 0 0 1.2cqw #F4F3EE; }
.pi-stage canvas[hidden] { display: none; }
