.stage {
  position: relative;
  width: min(100vw, calc(100dvh * 9 / 16));
  height: min(100dvh, calc(100vw * 16 / 9));
  aspect-ratio: 9 / 16;
  overflow: hidden;
  isolation: isolate;
  background: var(--ink-900);
  box-shadow: var(--shadow-deep);
}

.stage::before,
.stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 45;
  pointer-events: none;
}

.stage::before {
  opacity: 0.08;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.72' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: screen;
}

.stage::after {
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.48), inset 0 0 4px rgba(231, 198, 142, 0.16);
}

.scene {
  position: absolute;
  inset: 0;
  z-index: var(--z-scene);
  display: none;
  overflow: hidden;
  opacity: 0;
  background: var(--ink-900);
  transition: opacity var(--duration-normal) ease;
}

.scene.is-active {
  display: flex;
  opacity: 1;
}

.scene.is-entering {
  animation: scene-enter var(--duration-normal) var(--ease-out) both;
}

.scene-atmosphere {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

@keyframes scene-enter {
  from { opacity: 0; filter: blur(4px); transform: scale(1.012); }
  to { opacity: 1; filter: blur(0); transform: scale(1); }
}
