/* Вариант для слоя .snow.snow--powder поверх штатного snowfall.css */
.snow--powder {
  overflow: hidden;
}

.snow--powder .snow__flake {
  flex: 1 1 0;
  min-width: 0;
  height: 0;
  top: 0;
  color: transparent;
  animation-name: none;
  will-change: auto;
  --drift: 21px;
}

.snow--powder .snow__flake::before {
  content: "";
  position: absolute;
  left: 36%;
  width: .53em;
  height: .46em;
  border-radius: 58% 42% 65% 35%;
  background: radial-gradient(ellipse at 42% 48%, #edf3fa 12%, #d2e0ed 41%, transparent 76%);
  opacity: .57;
  animation: neo-powder-fall linear infinite;
  /* Размер и длительность уже назначены штатным snowfall.js */
  animation-duration: inherit;
  animation-delay: calc(-4.7s + var(--even-phase, 0s) + var(--third-phase, 0s) + var(--near-phase, 0s));
}

.snow--powder .snow__flake:nth-child(even) {
  --even-phase: -11.3s;
  --drift: -14px;
}

.snow--powder .snow__flake:nth-child(3n + 1) {
  --third-phase: -6.4s;
}

.snow--powder .snow__flake:nth-child(3n + 1)::before {
  left: 78%;
  width: .66em;
  height: .55em;
  opacity: .73;
}

/* Ближние хлопья крупнее, с неровным краем и чуть более быстрым падением */
.snow--powder .snow__flake:nth-child(5n + 2) {
  --near-phase: -8.1s;
  --drift: 38px;
}

.snow--powder .snow__flake:nth-child(5n + 2)::before {
  left: 12%;
  width: .98em;
  height: .76em;
  border-radius: 0;
  background:
    radial-gradient(ellipse 31% 39% at 54% 36%, #f4f7fa 28%, transparent 96%),
    radial-gradient(ellipse 34% 40% at 31% 59%, #edf3fa 33%, transparent 98%),
    radial-gradient(ellipse 31% 32% at 68% 61%, #e0e9f2 26%, transparent 96%);
  opacity: .8;
  animation-duration: 14.3s;
}

@keyframes neo-powder-fall {
  0%   { transform: translate3d(0, -1rem, 0) rotate(-20deg); }
  34%  { transform: translate3d(var(--drift), 34vh, 0) rotate(24deg); }
  68%  { transform: translate3d(calc(var(--drift) * .68), 68vh, 0) rotate(53deg); }
  100% { transform: translate3d(calc(var(--drift) * 1.65), calc(100vh + 1rem), 0) rotate(83deg); }
}

@media (prefers-reduced-motion: reduce), (forced-colors: active), print {
  .snow--powder {
    display: none;
  }
}
