/* Theme background effects (built by wwwroot/js/themeEffects.js).
   One fixed, viewport-sized layer behind all page content: it never scrolls (nothing re-rasters on scroll),
   never takes pointer events and cannot cause overflow. Children are pre-rendered once and only ever moved
   with transform/opacity animations, which run on the compositor. */
.fx-layer {
    --fx-focus-x: 50%;
    --fx-focus-y: 45%;
    --fx-focus-w: 420px;
    --fx-focus-h: 420px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100lvh; /* largest viewport: the mobile URL bar showing/hiding doesn't resize the layer */
    z-index: calc(var(--ux-z-effects, 0) - 1);
    pointer-events: none;
    overflow: hidden;
    contain: strict;
    user-select: none;
    /* soften the effect around the board so the eye stays on the puzzle */
    -webkit-mask-image: radial-gradient(var(--fx-focus-w) var(--fx-focus-h) at var(--fx-focus-x) var(--fx-focus-y), rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.45) 55%, #000 100%);
    mask-image: radial-gradient(var(--fx-focus-w) var(--fx-focus-h) at var(--fx-focus-x) var(--fx-focus-y), rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.45) 55%, #000 100%);
    animation: fx-fade-in 1.2s ease-out both;
}

.fx-layer * {
    pointer-events: none;
}

.fx-layer .fx-abs {
    position: absolute;
    display: block;
}

.fx-layer .fx-full {
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
}

/* tiled sheets (snow, bubbles): two viewports tall, scrolled one viewport per cycle */
.fx-layer .fx-sway {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.fx-layer .fx-sheet {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    display: block;
}

/* glowing dots (fireflies, twinkling stars) */
.fx-layer .fx-mote {
    display: block;
}

.fx-layer .fx-dot {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.fx-layer .fx-orb {
    border-radius: 50%;
}

.fx-layer .fx-shooter {
    height: 2px;
    border-radius: 2px;
    transform-origin: 100% 50%;
    opacity: 0;
}

.fx-layer .fx-ribbon {
    transform-origin: 50% 100%;
}

.fx-layer .fx-strip {
    position: absolute;
    left: 0;
    top: 0;
    display: block;
}

.fx-layer .fx-fall,
.fx-layer .fx-rise {
    width: 0;
    height: 0;
}

.fx-layer .fx-petal,
.fx-layer .fx-piece {
    display: block;
}

.fx-layer .fx-piece {
    position: absolute;
    left: 0;
    top: 0;
}

@keyframes fx-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .fx-layer {
        animation: none;
    }
}

@media print {
    .fx-layer {
        display: none !important;
    }
}

.fx-layer.fx-nomask {
    -webkit-mask-image: none;
    mask-image: none;
}
