body { isolation: isolate; }
.fall-leaves { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: -1; }
.fall-leaf {
  position: absolute;
  top: -36px;
  left: var(--leaf-x);
  width: var(--leaf-size);
  aspect-ratio: 1;
  background: var(--leaf-color);
  clip-path: polygon(50% 0%, 59% 22%, 74% 13%, 73% 36%, 100% 30%, 88% 52%, 97% 63%, 62% 73%, 56% 88%, 55% 100%, 46% 100%, 48% 76%, 10% 67%, 17% 56%, 0% 37%, 30% 39%, 27% 15%, 42% 25%);
  animation: fall-leaf var(--leaf-time) linear var(--leaf-delay) infinite;
}
.fall-leaf:nth-child(3n) {
  clip-path: polygon(87% 4%, 94% 32%, 92% 54%, 78% 73%, 60% 83%, 36% 83%, 18% 100%, 12% 94%, 26% 76%, 22% 58%, 31% 34%, 52% 17%, 71% 9%);
}
@keyframes fall-leaf {
  0% { opacity: 0; transform: translate3d(0, 0, 0) rotate(-30deg); }
  12%, 80% { opacity: .34; }
  32% { transform: translate3d(var(--leaf-drift), 35vh, 0) rotate(48deg) rotateY(110deg); }
  63% { transform: translate3d(calc(var(--leaf-drift) * -.48), 68vh, 0) rotate(-32deg) rotateY(230deg); }
  100% { opacity: 0; transform: translate3d(var(--leaf-drift), calc(100vh + 55px), 0) rotate(var(--leaf-turn)) rotateY(360deg); }
}
.fall-leaves-toggle {
  margin-inline: 12px;
  padding: 7px 4px;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
@media (prefers-reduced-motion: reduce) {
  .fall-leaves, .fall-leaves-toggle { display: none; }
}
