/* The art is painted off-line. Only small transparent pieces move at runtime. */
.garden-world {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
  user-select: none;
}
.garden-world > div { position: absolute }
.garden-plate { inset: 0; background-size: 100% 100%; background-repeat: no-repeat }
.garden-palm {
  width: 26.9%; height: 16.7%;
  left: -8.2%; top: 52.2%;
  background: url('../assets/scenery/garden-palm.webp') center / 100% 100% no-repeat;
  transform-origin: 45% 96%;
  animation: palm-breeze 9s ease-in-out infinite alternate;
}
.garden-bulbul {
  left: 16.7%; top: 67.5%; width: 6.8%; height: 2.2%;
  background: url('../assets/scenery/bulbul.svg') center bottom / contain no-repeat;
  transform-origin: 48% 100%;
  animation: bulbul-perch 11.5s ease-in-out infinite;
}
.garden-canopy {
  top: -1.6%;
  width: min(36%, 203px);
  aspect-ratio: 286/212;
  transform-origin: 2% 2%;
  animation: canopy-breeze 10.8s ease-in-out infinite alternate;
}
.garden-canopy::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url('../assets/scenery/mango-bough.webp') center / contain no-repeat;
}
.canopy-right::before { transform: scaleX(-1) }
.canopy-left { left: -4% }
.canopy-right {
  right: -5%;
  top: -2.3%;
  width: min(33%, 174px);
  transform-origin: 98% 2%;
  animation-delay: -4.6s;
  animation-duration: 12.9s;
}
.garden-garland {
  top: -7px;
  width: min(15%, 58px);
  aspect-ratio: 88/145;
  background: url('../assets/scenery/marigold-strings.webp') center / contain no-repeat;
  transform-origin: 50% 0%;
  animation: marigold-breeze 6.5s ease-in-out infinite alternate;
}
.garland-left { left: 0 }
.garland-right { right: -1%; scale: -1 1; animation-delay: -3s }
.garden-flowers {
  width: min(27%, 153px);
  aspect-ratio: 128/82;
  bottom: -2.4%;
  background: url('../assets/scenery/flower-bed.webp') center / contain no-repeat;
}
.flowers-left { left: -8% }
.flowers-right { right: -7%; scale: -1 1 }

/* The book is already a complete Blender set. Let two quiet paper petals drop
   over the floral edges, outside the printed page. */
.ch-book .garden-world { z-index: 1 }
.ch-book .garden-petals { left: 0; width: 100%; height: 100%; inset-block: 0 }
.ch-book .garden-petal { left: 2%; top: 1.5% }
.ch-book .garden-petal + .garden-petal { left: 96%; top: 4% }
.ch-intro .intro-garden, .garden-world ~ .bg, .ch-final .final-glow { display: none }
.ch-intro .intro-paper, .ch-intro .intro-stage { z-index: 2 }
.ch-intro .canopy-left { width: min(42%, 240px) }
.ch-intro .canopy-right { width: min(39%, 225px) }
.ch-intro .garland-left { left: 7% }
.ch-intro .garland-right { right: 6% }
.ch-intro .garden-flight { top: 11% }
.ch-date .canopy-left, .ch-date .canopy-right { width: min(26%, 145px); top: -3% }
.ch-date .garden-garland { width: min(11%, 47px) }
.ch-dress .garden-canopy {
  opacity: .55;
  filter: sepia(.82) saturate(.72) brightness(1.43);
  top: -3%;
}
.ch-dress .canopy-right { width: min(23%, 143px); top: -2.5% }
.ch-haldi .garden-canopy { top: -2.8% }
.ch-haldi .flowers-left, .ch-haldi .flowers-right { width: min(23%, 128px); bottom: -2.7% }
.ch-loc .garden-canopy { top: -2.5%; width: min(33%, 156px) }
.ch-loc .garden-flight { top: 71% }
.ch-loc .flowers-right { width: min(28%, 148px); right: -8%; bottom: -2.8% }
.ch-final .garden-canopy { width: min(32%, 157px) }
.ch-final .canopy-right { width: min(34%, 170px) }
.ch-final .garden-flight { top: 7.8% }
.ch-final .garden-petals { inset: 10% 0 0 }
.ch-final .garden-petal { left: 3% }
.ch-final .garden-petal + .garden-petal { left: 91% }

.garden-flight {
  top: 21%;
  left: -21%;
  width: 70px;
  height: 27px;
  animation: garden-flight 13.5s linear infinite;
}
.garden-swallow {
  position: absolute;
  left: 0;
  top: 0;
  width: 23px;
  height: 12px;
  background: url('../assets/scenery/swallow.svg') center / contain no-repeat;
  transform-origin: 60% 65%;
  animation: swallow-glide 1.5s ease-in-out infinite;
}
.garden-swallow::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url('../assets/scenery/swallow-wing.svg') center / contain no-repeat;
  transform-origin: 54% 64%;
  animation: swallow-wing 1.5s ease-in-out infinite;
}
.garden-swallow.companion {
  left: 27px;
  top: -7px;
  scale: .72;
  animation-delay: -.2s;
}
.garden-swallow.companion::before { animation-delay: -.19s }
.garden-petals { inset: 0 }
.garden-petal {
  position: absolute;
  left: 7%;
  top: 8%;
  width: 9px;
  height: 6px;
  background: linear-gradient(125deg,#ebba9d 5%,#c88182 62%,#e4a09b);
  border-radius: 21% 76% 51% 80%;
  opacity: 0;
  animation: garden-petal 12.5s ease-in infinite;
}
.garden-petal + .garden-petal { left: 87%; animation-delay: -7s; scale: .75 }
@keyframes canopy-breeze {
  0%, 100% { transform: rotate(-1.15deg) }
  52% { transform: rotate(1.9deg) }
  76% { transform: rotate(.25deg) }
}
@keyframes marigold-breeze { from { transform: rotate(-1deg) } to { transform: rotate(2deg) } }
@keyframes palm-breeze { from { transform: rotate(-.7deg) } to { transform: rotate(1.6deg) } }
@keyframes bulbul-perch {
  0%, 48%, 56%, 100% { transform: rotate(0deg) }
  51%, 54% { transform: rotate(5deg) }
}
@keyframes garden-flight {
  0%, 15% { transform: translate(0, 8px) rotate(-6deg); opacity: 0 }
  20% { opacity: .82 }
  37% { transform: translate(53vw, -7px) rotate(-1deg) }
  55% { transform: translate(91vw, -15px) rotate(-3deg); opacity: .82 }
  70%, 100% { transform: translate(136vw, -24px) rotate(2deg); opacity: 0 }
}
@keyframes swallow-glide { 0%, 31%, 75%, 100% { transform: translateY(0) } 15%, 48% { transform: translateY(-1px) } }
@keyframes swallow-wing { 0%, 30%, 62%, 100% { transform: scaleY(.94) } 15%, 45% { transform: scaleY(-.53) } 74%, 93% { transform: scaleY(.65) } }
@keyframes garden-petal {
  0%, 25% { transform: translate(0,-6px) rotate(-5deg); opacity: 0 }
  32% { opacity: .78 }
  52% { transform: translate(9px,52px) rotate(70deg) }
  64% { transform: translate(1px,98px) rotate(152deg); opacity: .78 }
  78%, 100% { transform: translate(16px,195px) rotate(218deg); opacity: 0 }
}
.ch:not(.is-current) .garden-world *,
.ch:not(.is-current) .garden-world *::before { animation-play-state: paused }
@media (max-height: 650px) {
  /* The short map uses the entire sky band. Its palms carry the breeze here. */
  .ch-loc .garden-flight { display: none }
  .ch-final .garden-flight { top: 5.3% }
}
@media (prefers-reduced-motion: reduce) {
  .garden-world *, .garden-world *::before { animation: none }
  .garden-flight, .garden-petals { display: none }
}
