.winter-frame {
  position: fixed;
  z-index: 49;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 2px #ffffffd9, inset 0 0 50px #ffffff18;
}

.winter-frame::before,
.winter-frame::after {
  position: absolute;
  content: "";
}

.winter-frame::before {
  top: 0;
  right: 0;
  left: 0;
  height: 36px;
  background-image:
    radial-gradient(ellipse 44px 15px at 50% 0, #ffffff 0 43%, transparent 82%) 0 0 / 88px 25px repeat-x,
    linear-gradient(180deg, #ffffff55, transparent);
  filter: drop-shadow(0 4px 8px #ffffff80);
}

.winter-frame::after {
  top: 0;
  right: 0;
  left: 0;
  height: 14px;
  background:
    radial-gradient(circle at 6px 7px, #ff6572 0 2px, transparent 4px),
    radial-gradient(circle at 18px 7px, #facc15 0 2px, transparent 4px),
    radial-gradient(circle at 30px 7px, #4ade80 0 2px, transparent 4px),
    radial-gradient(circle at 42px 7px, #60a5fa 0 2px, transparent 4px);
  background-repeat: repeat-x;
  background-size: 48px 14px;
  filter: drop-shadow(0 0 4px #ffffff);
  animation: holiday-lights-glow 3.2s ease-in-out infinite alternate;
}

.snowfall {
  position: fixed;
  z-index: 50;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.snowfall-flake {
  position: absolute;
  top: -12vh;
  display: block;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 28%, #fff 0, #eef7ff 42%, #b8d7ff 76%, #a78bfa 100%);
  box-shadow: 0 0 8px #dceaff80;
  filter: blur(.2px);
  animation: snowfall-drop var(--snow-duration) linear var(--snow-delay) infinite;
  will-change: transform;
}

.snowfall-crystal {
  width: auto !important;
  height: auto !important;
  overflow: visible;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: #eef7ff;
  filter: drop-shadow(0 0 5px #bfdbfecc);
  font-size: var(--snow-size);
  line-height: 1;
  text-shadow: 0 0 8px #dbeafecc;
}

.snowfall-phase-0 { --snow-delay: 0s; }
.snowfall-phase-1 { --snow-delay: -8s; }
.snowfall-phase-2 { --snow-delay: -16s; }
.snowfall-phase-3 { --snow-delay: -24s; }

.snowfall-type-0 { left: 7%; width: 2px; height: 2px; opacity: .38; --snow-drift: -33px; --snow-drift-half: -16.5px; --snow-duration: 12s; --snow-size: 7px; --snow-static-top: 4%; }
.snowfall-type-1 { left: 50%; width: 8px; height: 8px; opacity: .55; --snow-drift: -4px; --snow-drift-half: -2px; --snow-duration: 19s; --snow-size: 13px; --snow-static-top: 27%; }
.snowfall-type-2 { left: 93%; width: 7px; height: 7px; opacity: .72; --snow-drift: 25px; --snow-drift-half: 12.5px; --snow-duration: 23s; --snow-size: 12px; --snow-static-top: 50%; }
.snowfall-type-3 { left: 36%; width: 6px; height: 6px; opacity: .89; --snow-drift: -47px; --snow-drift-half: -23.5px; --snow-duration: 18s; --snow-size: 11px; --snow-static-top: 73%; }
.snowfall-type-4 { left: 79%; width: 5px; height: 5px; opacity: .5; --snow-drift: -18px; --snow-drift-half: -9px; --snow-duration: 25s; --snow-size: 10px; --snow-static-top: 0%; }
.snowfall-type-5 { left: 22%; width: 4px; height: 4px; opacity: .67; --snow-drift: 11px; --snow-drift-half: 5.5px; --snow-duration: 17s; --snow-size: 9px; --snow-static-top: 23%; }
.snowfall-type-6 { left: 65%; width: 3px; height: 3px; opacity: .84; --snow-drift: 40px; --snow-drift-half: 20px; --snow-duration: 24s; --snow-size: 8px; --snow-static-top: 46%; }
.snowfall-type-7 { left: 8%; width: 2px; height: 2px; opacity: .45; --snow-drift: -32px; --snow-drift-half: -16px; --snow-duration: 16s; --snow-size: 7px; --snow-static-top: 69%; }
.snowfall-type-8 { left: 51%; width: 8px; height: 8px; opacity: .62; --snow-drift: -3px; --snow-drift-half: -1.5px; --snow-duration: 23s; --snow-size: 13px; --snow-static-top: 92%; }
.snowfall-type-9 { left: 94%; width: 7px; height: 7px; opacity: .79; --snow-drift: 26px; --snow-drift-half: 13px; --snow-duration: 15s; --snow-size: 12px; --snow-static-top: 19%; }
.snowfall-type-10 { left: 37%; width: 6px; height: 6px; opacity: .4; --snow-drift: -45px; --snow-drift-half: -22.5px; --snow-duration: 22s; --snow-size: 11px; --snow-static-top: 42%; }
.snowfall-type-11 { left: 80%; width: 5px; height: 5px; opacity: .57; --snow-drift: -16px; --snow-drift-half: -8px; --snow-duration: 14s; --snow-size: 10px; --snow-static-top: 65%; }
.snowfall-type-12 { left: 23%; width: 4px; height: 4px; opacity: .74; --snow-drift: 13px; --snow-drift-half: 6.5px; --snow-duration: 21s; --snow-size: 9px; --snow-static-top: 88%; }
.snowfall-type-13 { left: 66%; width: 3px; height: 3px; opacity: .91; --snow-drift: 41px; --snow-drift-half: 20.5px; --snow-duration: 13s; --snow-size: 8px; --snow-static-top: 15%; }

@keyframes snowfall-drop {
  0% { transform: translate3d(0, -12vh, 0) rotate(0deg); }
  35% { transform: translate3d(var(--snow-drift-half), 35vh, 0) rotate(126deg); }
  70% { transform: translate3d(var(--snow-drift), 75vh, 0) rotate(252deg); }
  100% { transform: translate3d(var(--snow-drift-half), 112vh, 0) rotate(360deg); }
}

@keyframes holiday-lights-glow {
  from { opacity: .72; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .snowfall-flake {
    top: var(--snow-static-top);
    animation: none;
    will-change: auto;
  }

  .winter-frame::after {
    animation: none;
  }
}
