/**
 * Animated background layer — opt-in via the per-block "Durata animazione (s)"
 * field. The wrapper gets `position:relative; overflow:hidden`; this layer is
 * 200%×200% of the wrapper and drifts via JS-injected @keyframes so each
 * instance moves on a unique random path.
 *
 * Sibling content sits above the layer thanks to z-index:1 on direct children
 * not carrying [data-bg-anim].
 */

.theme-bg-anim {
    background-position: center;
    height: 200%;
    left: 0;
    pointer-events: none;
    position: absolute;
    top: 0;
    width: 200%;
    will-change: transform;
    z-index: 0;
}

[data-bg-anim-host] > *:not([data-bg-anim]) {
    position: relative;
    z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
    .theme-bg-anim {
        animation: none !important;
        transform: translate(-25%, -25%);
    }
}
