.falling-duck {
    position: fixed;
    top: -100px;
    width: 60px;
    height: auto;
    pointer-events: none;
    animation: duckFall 2.5s linear forwards;
    z-index: 9999;
}

@keyframes duckFall {
    from {
        transform: translateY(0) rotate(0deg);
    }
    to {
        transform: translateY(110vh) rotate(360deg);
    }
}

/* Ensure the festival title is visible (white) on small screens */
@media (max-width: 520px) {
    .duckrace-page .hero .hero-content .festival-title,
    .duckrace-page .festival-title {
        color: #ffffff !important;
        text-shadow: none !important;
    }

    /* Constrain the hero duck image on small screens to avoid Chrome mobile rendering it too large.
       Use max-width in viewport-relative units so the image scales with screen width, and provide
       a hard pixel cap for very narrow devices. */
    .hero .duck-image,
    img[data-duck],
    #hero-duck {
        max-width: 42vw;
        width: auto;
        height: auto;
        max-height: 32vh;
        display: inline-block;
        vertical-align: middle;
    }
}

/* Stronger cap for very narrow devices */
@media (max-width: 360px) {
    .hero .duck-image,
    img[data-duck],
    #hero-duck {
        max-width: 140px;
        max-height: 120px;
    }
}
