* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #2b1730;
}

/* ---------------- backdrop ---------------- */

.scene {
  position: fixed;
  inset: 0;
  background: linear-gradient(#b0afe8, #f5dbe3);
}

.backdrop {
  display: block;
  width: 100%;
  height: 100%;
}

/* an out-of-focus pocket in the garden behind the swarm */
.haze {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  -webkit-backdrop-filter: blur(9px) saturate(0.94);
  backdrop-filter: blur(9px) saturate(0.94);
  background: radial-gradient(
    ellipse 46% 56% at 50% 52%,
    rgba(30, 18, 32, 0.22) 0%,
    rgba(30, 18, 32, 0.1) 45%,
    rgba(30, 18, 32, 0) 72%
  );
  -webkit-mask-image: radial-gradient(
    ellipse 48% 60% at 50% 52%,
    #000 20%,
    rgba(0, 0, 0, 0.7) 50%,
    transparent 76%
  );
  mask-image: radial-gradient(
    ellipse 48% 60% at 50% 52%,
    #000 20%,
    rgba(0, 0, 0, 0.7) 50%,
    transparent 76%
  );
}

.glow {
  position: fixed;
  left: 50%;
  top: 53%;
  width: min(96vh, 82vw);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(circle at 50% 43%, rgba(228, 246, 150, 0.3), rgba(183, 209, 79, 0.13) 30%, rgba(214, 90, 160, 0.1) 56%, rgba(214, 90, 160, 0) 72%);
  filter: blur(10px);
  pointer-events: none;
}

.stage-canvas,
.fx-canvas {
  position: fixed;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.stage-canvas {
  z-index: 2;
  cursor: none;
  touch-action: none;
}

.fx-canvas {
  z-index: 3;
  pointer-events: none;
}

/* grain */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
