.hd-row { display: flex; justify-content: space-around; align-items: flex-end; position: relative; line-height: 0; pointer-events: none; }
.hd-row .hd-item { width: 30px; height: 30px; flex: none; overflow: visible; }
.hd-row .hd-item:nth-child(5n+2) { width: 38px; height: 38px; }
.hd-row .hd-item:nth-child(5n+3) { width: 24px; height: 24px; }
.hd-row .hd-item:nth-child(5n+4) { width: 34px; height: 34px; }
.hd-logo { position: absolute; pointer-events: none; line-height: 0; }
.hd-logo .hd-item { width: 20px; height: 20px; overflow: visible; }

.hd-d1 { animation-delay: -.7s !important; }
.hd-d2 { animation-delay: -1.4s !important; }
.hd-d3 { animation-delay: -2.1s !important; }
.hd-d4 { animation-delay: -2.8s !important; }

.pumpkin-face { filter: drop-shadow(0 0 2px #ffb000) drop-shadow(0 0 4px rgba(255, 150, 0, .7)); animation: hd-flicker 2.6s ease-in-out infinite; }
.pumpkin-eyes { transform-box: fill-box; transform-origin: center; animation: hd-blink 5s ease-in-out infinite; }
.pumpkin-1 .pumpkin-face { animation-delay: -.9s; }
.pumpkin-1 .pumpkin-eyes { animation-delay: 1.7s; animation-duration: 6.2s; }
.pumpkin-2 .pumpkin-face { animation-delay: -1.7s; }
.pumpkin-2 .pumpkin-eyes { animation-delay: 3.1s; animation-duration: 4.4s; }

.hd-row.hd-newyear { border-top: 2px solid #2f6b3a; border-radius: 50% 50% 0 0 / 14px 14px 0 0; align-items: flex-start; padding-top: 0; }
.hd-row.hd-newyear .hd-item { margin-top: -2px; }
.hd-bulb path:last-child { filter: drop-shadow(0 0 4px currentColor); animation: hd-bulb 1.6s ease-in-out infinite; }
.hd-hat { transform-box: fill-box; transform-origin: 50% 100%; animation: hd-sway 4s ease-in-out infinite; }

.hd-heart { transform-box: fill-box; transform-origin: center; animation: hd-beat 1.4s ease-in-out infinite; }
.hd-tulip { transform-box: fill-box; transform-origin: 50% 100%; animation: hd-sway 3.4s ease-in-out infinite; }
.hd-smiley { transform-box: fill-box; transform-origin: center; animation: hd-bob 2.4s ease-in-out infinite; }
.hd-wink { transform-box: fill-box; transform-origin: center; animation: hd-blink 3s ease-in-out infinite; }
.hd-star { transform-box: fill-box; transform-origin: center; filter: drop-shadow(0 0 3px #ffe066); animation: hd-twinkle 2s ease-in-out infinite; }
.hd-code { animation: hd-flicker 2.2s steps(2, end) infinite; }
.hd-code text { filter: drop-shadow(0 0 3px rgba(61, 220, 132, .7)); }

.hd-rocket { position: absolute; left: 0; bottom: 6px; width: 30px; height: 30px; line-height: 0; animation: hd-fly 9s linear infinite; }
.hd-rocket .hd-item { width: 30px; height: 30px; overflow: visible; }
.hd-flame { transform-box: fill-box; transform-origin: 50% 0; animation: hd-flame .25s ease-in-out infinite alternate; }


@keyframes hd-flicker { 0%, 100% { opacity: 1; } 18% { opacity: .72; } 22% { opacity: .95; } 55% { opacity: .8; } 70% { opacity: 1; } }
@keyframes hd-blink { 0%, 44%, 52%, 100% { transform: scaleY(1); } 48% { transform: scaleY(.08); } }
@keyframes hd-bulb { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes hd-sway { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
@keyframes hd-beat { 0%, 60%, 100% { transform: scale(1); } 20% { transform: scale(1.18); } 40% { transform: scale(.95); } }
@keyframes hd-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes hd-twinkle { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.8); } }
@keyframes hd-flame { from { transform: scaleY(.7); } to { transform: scaleY(1.25); } }
@keyframes hd-fly { 0% { left: -10%; bottom: 0; opacity: 0; } 8% { opacity: 1; } 92% { opacity: 1; } 100% { left: 100%; bottom: 60%; opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .hd-row *, .hd-logo *, .hd-rocket { animation: none !important; }
  .hd-rocket { display: none; }
}
@media print { .hd-row, .hd-logo { display: none !important; } }
.hd-row.hd-newyear .hd-item, .hd-row.hd-newyear .hd-item:nth-child(n) { width: 34px; height: 34px; }
.hd-row.hd-cosmonautics .hd-item:nth-child(n) { width: 18px; height: 18px; }
.hd-row.hd-cosmonautics .hd-item:nth-child(3n+1) { width: 12px; height: 12px; margin-bottom: 14px; }
.hd-row.hd-cosmonautics .hd-item:nth-child(4n+2) { margin-bottom: 22px; }
.hd-row.hd-cosmonautics .hd-rocket .hd-item { width: 30px; height: 30px; margin: 0; }
.hd-row.hd-programmers .hd-item:nth-child(n) { width: 46px; height: 46px; }
.hd-row.hd-womensday .hd-item:nth-child(n) { width: 34px; height: 34px; }
.hd-row.hd-womensday .hd-item:nth-child(5n+2) { width: 42px; height: 42px; }

.hd-badger { display: block; overflow: visible; }
.hd-badger-cosmonautics { animation: hd-bob 3.4s ease-in-out infinite; }
.hd-badger .hd-heart, .hd-badger .hd-star { transform-box: fill-box; transform-origin: center; }
