.beyond { background: #04070f; }
.beyond .camera-stage { pointer-events: none; }
.beyond .reading-shade { z-index: 7; opacity: 0.3; background: linear-gradient(0deg, rgb(4 7 15 / 72%) 0%, rgb(4 7 15 / 18%) 28%, transparent 52%); }
.beyond .film-grain { z-index: 8; }

/* Everything beyond the sky waits behind it, and is only uncovered as the sky
   itself gives way. */
.bd-outside {
  position: absolute;
  z-index: 0;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  /* What is on the other side of the sky: not a lamp, a cold open space with
     the last of the moonlight hanging in it. */
  background:
    radial-gradient(ellipse 132% 68% at 50% 0%, rgb(216 228 248 / 54%) 0%, transparent 70%),
    radial-gradient(ellipse 84% 50% at 50% 30%, rgb(178 196 226 / 32%) 0%, transparent 74%),
    radial-gradient(ellipse 100% 26% at 50% 104%, rgb(224 212 186 / 24%) 0%, transparent 74%),
    linear-gradient(180deg, #1e2a3c 0%, #111a29 48%, #05070e 100%);
}
.bd-sky { position: absolute; z-index: 1; inset: 0; transform-origin: 50% 38%; will-change: opacity, transform; }
.bd-quiet { position: absolute; z-index: 2; inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(circle at var(--bd-lx, 50%) var(--bd-ly, 36%), transparent 16%, rgb(4 7 15 / 40%) 56%, #04070f 94%); }
/* The light the fracture lets through: the moon's own break becomes a small,
   hot source that keeps burning as the sky gives way. */
.bd-core {
  position: absolute;
  z-index: 4;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(circle at var(--bd-lx, 50%) var(--bd-ly, 36%),
    rgb(255 253 246 / 96%) 0%,
    rgb(255 246 220 / 68%) 3%,
    rgb(255 231 186 / 38%) 7%,
    rgb(246 214 164 / 18%) 12%,
    rgb(208 180 138 / 7%) 20%,
    transparent 31%);
}
.bd-moon { z-index: 2; opacity: 1; }
.bd-moon-scale { position: absolute; inset: 0; transform-origin: 50% 50%; will-change: transform; }
.beyond .cloud-texture { animation: bd-cloud-drift 190s ease-in-out infinite alternate; }
@keyframes bd-cloud-drift {
  from { transform: translate3d(-1.2%, 0.6%, 0); }
  to { transform: translate3d(1.4%, -0.9%, 0); }
}

.bd-comet { position: absolute; z-index: 3; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.bd-flash {
  position: absolute;
  z-index: 4;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(circle at var(--bd-lx, 50%) var(--bd-ly, 36%), rgb(255 252 246 / 92%) 0%, rgb(240 228 204 / 48%) 8%, rgb(224 208 178 / 16%) 18%, transparent 34%);
}
.bd-crack {
  position: absolute;
  z-index: 5;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  filter: drop-shadow(0 0 3px rgb(255 236 198 / 50%)) drop-shadow(0 0 11px rgb(255 224 172 / 20%));
}
.bd-crack path {
  fill: none;
  stroke: rgb(255 249 232 / 78%);
  stroke-width: 1.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.bd-crack path.bd-crack-branch { stroke-width: 0.55; stroke: rgb(252 242 222 / 42%); }
.bd-crack path.bd-crack-shadow { stroke: rgb(3 6 12 / 62%); stroke-width: 2.8; }
.bd-crack path.bd-crack-branch.bd-crack-shadow { stroke-width: 1.9; }
.bd-calm {
  position: absolute;
  z-index: 6;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(circle at var(--bd-lx, 50%) var(--bd-ly, 36%), rgb(6 9 16 / 10%) 0%, rgb(5 8 15 / 56%) 48%, #04060d 94%);
}

.bd-scroll { position: absolute; z-index: 9; inset: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y pinch-zoom; scrollbar-width: none; }
.bd-scroll::-webkit-scrollbar { display: none; }
.bd-scroll:focus-visible { outline-offset: -10px; }
.bd-track { height: calc(var(--scene-track) * var(--scene-tempo-beyond)); }
.bd-frame { position: sticky; top: 0; height: 100svh; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  .beyond .cloud-texture { animation: none; }
  .bd-sky, .bd-moon-scale { will-change: auto; }
}
