@media print {
    .si-christmas-snow,
    .si-christmas-lights,
    .si-christmas-ornaments,
    .si-christmas-logo-hat,
    .si-christmas-card-lights,
    .si-christmas-trees {
        display: none;
    }
}

@media screen {
    .si-christmas-snow,
    .si-christmas-lights,
    .si-christmas-ornaments,
    .si-christmas-trees {
        pointer-events: none;
        user-select: none;
    }

    .si-christmas-snow {
        position: absolute;
        inset: 0;
        overflow: hidden;
        z-index: 55;
        mask-image: radial-gradient(ellipse at 50% 55%, #0007 0%, #000 72%);
    }

    .si-christmas-snow--ambient {
        --flake-scale: .87;
        position: fixed;
        z-index: 85;
        mask-image: linear-gradient(90deg, #000, #000b 32% 68%, #000);
    }

    .si-christmas-snow--dashboard {
        --flake-scale: .64;
        position: fixed;
        z-index: 35;
        opacity: .74;
        mask-image: none;
    }

    .si-christmas-snow--dashboard .si-christmas-particle:nth-child(even) {
        left: auto;
        right: var(--flake-left);
    }

    @media (min-width: 1024px) {
        .si-christmas-snow--dashboard {
            left: 250px;
        }

        .mainmenu-collapsed .si-christmas-snow--dashboard {
            left: 80px;
        }
    }

    .si-christmas-particle {
        position: absolute;
        top: -32px;
        left: var(--flake-left);
        width: calc(var(--flake-size) * var(--flake-scale, 1));
        height: calc(var(--flake-size) * var(--flake-scale, 1));
        background: #f4f9ff;
        border-radius: 50%;
        box-shadow: 0 0 2px #7191b8;
        opacity: .68;
        animation: si-christmas-snowfall var(--flake-time) linear var(--flake-delay) infinite;
    }

    .si-christmas-particle--crystal {
        background: none;
        box-shadow: none;
        color: #f1f9ff;
        opacity: .92;
        filter: drop-shadow(0 0 1px #55779c);
    }

    :is(.si-christmas-snow--ambient, .si-christmas-snow--dashboard) .si-christmas-particle--crystal {
        color: #e8f4ff;
        filter: drop-shadow(0 1px 1px #55779cbf);
    }

    .si-christmas-crystal {
        /* Three crossed axes, each with two forked tips. */
        --crystal-axis: polygon(
            47% 0, 53% 0, 53% 17%, 61% 10%, 64% 14%, 53% 23%,
            53% 33%, 65% 23%, 68% 27%, 53% 40%, 53% 60%,
            68% 73%, 65% 77%, 53% 67%, 53% 77%, 64% 86%, 61% 90%,
            53% 83%, 53% 100%, 47% 100%, 47% 83%, 39% 90%, 36% 86%,
            47% 77%, 47% 67%, 35% 77%, 32% 73%, 47% 60%, 47% 40%,
            32% 27%, 35% 23%, 47% 33%, 47% 23%, 36% 14%, 39% 10%, 47% 17%
        );
        position: absolute;
        inset: 0;
        background: radial-gradient(circle, currentColor 0 6%, transparent 9%);
    }

    .si-christmas-particle:nth-child(3n) .si-christmas-crystal {
        --crystal-axis: polygon(
            50% 0, 58% 13%, 53% 19%, 53% 33%, 64% 23%, 68% 27%, 53% 40%,
            53% 60%, 68% 73%, 64% 77%, 53% 67%, 53% 81%, 58% 87%, 50% 100%,
            42% 87%, 47% 81%, 47% 67%, 36% 77%, 32% 73%, 47% 60%, 47% 40%,
            32% 27%, 36% 23%, 47% 33%, 47% 19%, 42% 13%
        );
    }

    .si-christmas-crystal > span,
    .si-christmas-crystal::before,
    .si-christmas-crystal::after {
        content: "";
        position: absolute;
        inset: 0;
        background: currentColor;
        clip-path: var(--crystal-axis);
    }

    .si-christmas-crystal::before { transform: rotate(60deg); }
    .si-christmas-crystal::after { transform: rotate(-60deg); }

    @keyframes si-christmas-snowfall {
        0% { transform: translate3d(0, 0, 0); }
        35% { transform: translate3d(var(--flake-drift), 36vh, 0) rotate(85deg); }
        70% { transform: translate3d(calc(var(--flake-drift) * .45), 72vh, 0) rotate(175deg); }
        100% { transform: translate3d(var(--flake-drift), calc(100vh + 36px), 0) rotate(250deg); }
    }

    .si-christmas-lights {
        --strand-depth: 10px;
        --bulb-size: 5px;
        --bulb-pace: 1;
        --bulb-dim: .34;
        --halo-outset: 6px;
        position: absolute;
        inset-inline: 0;
        display: flex;
        overflow-x: clip;
    }

    .si-christmas-lights--header {
        --halo-outset: 4px;
        bottom: 1px;
    }

    .si-christmas-lights--footer {
        --strand-depth: 18px;
        --bulb-size: 6px;
        --halo-outset: 5px;
        top: 0;
    }

    .si-christmas-lights--popup {
        --bulb-size: 6px;
        --bulb-pace: .87;
        --bulb-dim: .28;
        --halo-outset: 9px;
        top: 0;
    }

    :where([data-si-christmas-card], .user-dashboard-summary > div) {
        position: relative;
    }

    .si-christmas-card-lights {
        --bulb-dim: .52;
        --card-light-phase: 0s;
        --card-light-wire: #568271a6;
        --card-light-gold: #b97717;
        --card-light-red: #c85d58;
        --card-light-green: #418f75;
        position: absolute;
        inset-block-start: 2px;
        inset-inline-end: 10px;
        inline-size: 44px;
        block-size: 8px;
        border-bottom: 1px solid var(--card-light-wire);
        border-radius: 0 0 50% 50% / 0 0 100% 100%;
        pointer-events: none;
        user-select: none;
    }

    html[data-theme="dark"] .si-christmas-card-lights {
        --card-light-wire: #80b89aa6;
        --card-light-gold: #ffcc79;
        --card-light-red: #fc9890;
        --card-light-green: #83d7b9;
    }

    :is(.user-dashboard-summary, .admin-overview-grid) > div:nth-child(even) > .si-christmas-card-lights {
        --card-light-phase: -.85s;
    }

    .si-christmas-card-lights > span {
        position: absolute;
        inset-block-start: 5px;
        inset-inline-start: 16%;
        inline-size: 4px;
        block-size: 5px;
        border-radius: 48% 48% 55% 55%;
        color: var(--card-light-gold);
        background: radial-gradient(circle at 41% 28%, #fff8df 7%, currentColor 67%);
        box-shadow: 0 0 4px currentColor;
        animation: si-christmas-twinkle 3.3s ease-in-out var(--card-light-phase) infinite;
    }

    .si-christmas-card-lights > span:nth-child(2) {
        inset-block-start: 7px;
        inset-inline-start: calc(50% - 2px);
        color: var(--card-light-red);
        animation-duration: 3.9s;
        animation-delay: calc(var(--card-light-phase) - 1.1s);
    }

    .si-christmas-card-lights > span:last-child {
        inset-inline-start: calc(84% - 4px);
        color: var(--card-light-green);
        animation-duration: 4.2s;
        animation-delay: calc(var(--card-light-phase) - 2.2s);
    }

    .si-christmas-card-lights--compact {
        inset-block-start: 0;
        transform: scale(.74);
        transform-origin: top right;
    }

    @supports ((background-clip: text) or (-webkit-background-clip: text)) {
        .si-christmas-modal-gold {
            background-image: linear-gradient(#f5fbff 8%, #fff2d1 25%, #ffdc60 43%, #facc15 77%);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
        }
    }

    h2 .si-christmas-modal-gold {
        position: relative;
    }

    h2 .si-christmas-modal-gold::after {
        content: "";
        position: absolute;
        top: .04em;
        right: -.37em;
        width: .29em;
        height: .29em;
        background: #f4fbff;
        clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
        pointer-events: none;
    }

    .si-christmas-modal-field {
        position: relative;
    }

    .si-christmas-modal-field::before {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: 999px;
        box-shadow: inset 0 1px 0 #e7f6ffd9, inset 0 4px 6px -4px #83b7de;
        pointer-events: none;
    }

    .si-christmas-field-crystal {
        inset: -5px 20px auto auto;
        width: 13px;
        height: 13px;
        color: #ecf8ff;
        filter: drop-shadow(0 0 1px #47698b);
        transform: rotate(12deg);
        pointer-events: none;
    }

    @media (forced-colors: active) {
        .si-christmas-modal-gold {
            background: none;
            color: CanvasText;
        }
    }

    .si-christmas-lights__strand {
        display: flex;
        flex: 1 1 0;
        justify-content: space-evenly;
        height: var(--strand-depth);
        border-bottom: 1px solid #518477;
        border-radius: 0 0 50% 50% / 0 0 100% 100%;
    }

    .si-christmas-lights__strand:nth-child(even) {
        --strand-phase: -.58s;
    }

    .si-christmas-page .si-christmas-lights .si-christmas-lights__strand span {
        --bulb-speed: 2.35s;
        --bulb-phase: -.15s;
        --twinkle-time: calc(var(--bulb-speed) * var(--bulb-pace));
        --twinkle-delay: calc(var(--bulb-phase) + var(--strand-phase, 0s));
        position: relative;
        top: calc(var(--strand-depth) - 2px);
        width: var(--bulb-size);
        height: calc(var(--bulb-size) * 1.35);
        border-radius: 45% 45% 55% 55%;
        color: #ffca64;
        background: radial-gradient(circle at 39% 32%, #fffcec 0, currentColor 61%);
        box-shadow: 0 0 3px currentColor;
        animation: si-christmas-twinkle var(--twinkle-time) ease-in-out var(--twinkle-delay) infinite;
    }

    .si-christmas-lights__strand span::before {
        content: "";
        position: absolute;
        inset: -2px 1px auto;
        height: 2px;
        border-radius: 1px;
        background: #6a9288;
    }

    .si-christmas-lights__strand span::after {
        content: "";
        position: absolute;
        inset: calc(-1 * var(--halo-outset));
        border-radius: 50%;
        background: radial-gradient(ellipse, currentColor 8%, transparent 72%);
        opacity: .26;
        animation: si-christmas-halo var(--twinkle-time) ease-in-out var(--twinkle-delay) infinite;
    }

    .si-christmas-lights__strand span:is(:first-child, :last-child) {
        top: calc(var(--strand-depth) * .62);
    }

    .si-christmas-page .si-christmas-lights .si-christmas-lights__strand span:nth-child(2) {
        --bulb-speed: 2.8s;
        --bulb-phase: -1s;
        color: #f47580;
    }

    .si-christmas-page .si-christmas-lights .si-christmas-lights__strand span:nth-child(3) {
        --bulb-speed: 2.1s;
        --bulb-phase: -1.5s;
        color: #fff5ce;
    }

    .si-christmas-page .si-christmas-lights .si-christmas-lights__strand span:nth-child(4) {
        --bulb-speed: 2.6s;
        --bulb-phase: -.55s;
        color: #7ad6ad;
    }

    .si-christmas-page .si-christmas-lights .si-christmas-lights__strand span:last-child {
        --bulb-phase: -1.6s;
    }

    @keyframes si-christmas-twinkle {
        0%, 100% { opacity: var(--bulb-dim); }
        44%, 56% { opacity: 1; }
    }

    @keyframes si-christmas-halo {
        0%, 100% { opacity: .08; transform: scale(.76); }
        50% { opacity: .94; transform: scale(1.28); }
    }

    .si-christmas-ornaments {
        position: absolute;
        inset: 70px 0 auto;
        z-index: 51;
    }

    .si-christmas-ornaments::before {
        content: "";
        position: absolute;
        inset: 0 0 auto;
        height: clamp(148px, 29vh, 260px);
        background:
            radial-gradient(ellipse at 6% 0%, #ffd78819, transparent 55%),
            radial-gradient(ellipse at 94% 0%, #d2eaff17, transparent 55%);
    }

    .si-christmas-ornament {
        --ornament-size: clamp(26px, 4vw, 56px);
        --ornament-drop: clamp(40px, 13vh, 118px);
        --ornament-arc: 12deg;
        --ornament-tempo: 2.8s;
        position: absolute;
        top: 0;
        display: flex;
        justify-content: center;
        align-items: end;
        width: var(--ornament-size);
        height: calc(var(--ornament-drop) + var(--ornament-size));
        transform-origin: top center;
        animation: si-christmas-sway var(--ornament-tempo) ease-in-out infinite alternate;
    }

    .si-christmas-ornament::before {
        content: "";
        position: absolute;
        top: 0;
        width: 1px;
        height: var(--ornament-drop);
        background: linear-gradient(#fff6cc38, #ffdf92);
    }

    .si-christmas-ornament i {
        position: relative;
        width: 100%;
        aspect-ratio: 1;
        border: 1px solid #ffffff55;
        border-radius: 50%;
        background:
            radial-gradient(ellipse at 32% 24%, #fff9e2 0%, transparent 23%),
            radial-gradient(circle at 34% 26%, var(--ornament-light), var(--ornament-color) 57%, var(--ornament-shade));
        box-shadow: 0 5px 16px #02071466, 0 0 12px #f1d38724;
    }

    .si-christmas-ornament i::before {
        content: "";
        position: absolute;
        inset: -5px 39% auto;
        height: 5px;
        border-radius: 2px 2px 0 0;
        background: linear-gradient(90deg, #9a763d, #f5dda6 45%, #b08a4a);
    }

    .si-christmas-ornament i::after {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: inherit;
        background: repeating-linear-gradient(-29deg, transparent 0 10px, #fff4cd55 10px 11px, transparent 11px 13px, #fff4cd28 13px 14px, transparent 14px 18px);
    }

    .si-christmas-ornament--gold {
        --ornament-light: #fff2a3;
        --ornament-color: #e2a633;
        --ornament-shade: #8f501d;
        left: 4%;
    }

    .si-christmas-ornament--red {
        --ornament-size: clamp(17px, 2.6vw, 37px);
        --ornament-drop: clamp(20px, 6vh, 56px);
        --ornament-tempo: 2.35s;
        --ornament-light: #ffc1ad;
        --ornament-color: #cb4855;
        --ornament-shade: #6e243f;
        left: 11%;
        animation-delay: -1.4s;
    }

    .si-christmas-ornament--green {
        --ornament-size: clamp(18px, 3vw, 41px);
        --ornament-drop: clamp(20px, 7vh, 69px);
        --ornament-tempo: 2.55s;
        --ornament-light: #d2ffe7;
        --ornament-color: #48a887;
        --ornament-shade: #20555d;
        right: 11%;
        animation-delay: -.7s;
    }

    .si-christmas-ornament--silver {
        --ornament-light: #f5fbff;
        --ornament-color: #a6c0db;
        --ornament-shade: #506493;
        right: 4%;
        animation-delay: -2.1s;
    }

    @keyframes si-christmas-sway {
        from { transform: rotate(calc(-1 * var(--ornament-arc))); }
        to { transform: rotate(var(--ornament-arc)); }
    }

    .si-christmas-logo-hat {
        position: absolute;
        top: 4.4%;
        left: 49.8%;
        z-index: 52;
        width: clamp(23px, 7.4%, 71px);
        aspect-ratio: 1.35;
        transform: translate(-50%, -86%) rotate(-12deg);
        transform-origin: 50% 85%;
        filter: drop-shadow(0 2px 3px #03071866);
        pointer-events: none;
    }

    .si-christmas-logo-hat::before {
        content: "";
        position: absolute;
        inset: 0 0 15%;
        clip-path: polygon(11% 100%, 17% 72%, 26% 42%, 40% 15%, 52% 5%, 60% 2%, 68% 5%, 78% 15%, 88% 31%, 97% 51%, 91% 61%, 81% 51%, 73% 45%, 65% 47%, 66% 63%, 74% 82%, 79% 100%);
        background:
            radial-gradient(ellipse at 84% 65%, #761226aa, transparent 48%),
            linear-gradient(145deg, #ff8585 4%, #e7495b 42%, #bf223a 74%, #9d1b35);
    }

    .si-christmas-logo-hat::after,
    .si-christmas-logo-hat > span {
        position: absolute;
        background: radial-gradient(ellipse at 32% 21%, #fff, #f3f9ff 54%, #bdcee2);
    }

    .si-christmas-logo-hat::after {
        content: "";
        inset: auto 20% 7% 8%;
        height: 23%;
        border-radius: 41% 37% 31% 38% / 57% 50% 47% 51%;
    }

    .si-christmas-logo-hat > span {
        top: 39%;
        right: 0;
        width: 23%;
        aspect-ratio: 1;
        border-radius: 50%;
    }

    .si-christmas-trees {
        position: absolute;
        inset: 30px 0 0;
        overflow: hidden;
    }

    .si-christmas-tree {
        position: absolute;
        bottom: 0;
        left: 1.5%;
        width: clamp(48px, 10vw, 150px);
        aspect-ratio: 3 / 4;
    }

    .si-christmas-tree:last-child {
        --tree-phase: -.91s;
        left: auto;
        right: 1.5%;
        width: clamp(40px, 8vw, 120px);
    }

    .si-christmas-tree::before {
        content: "";
        position: absolute;
        inset: 0 44% auto;
        aspect-ratio: 1;
        background: linear-gradient(145deg, #fff7d1, #ffd477 68%, #eab25d);
        clip-path: polygon(50% 0, 62% 36%, 100% 38%, 70% 61%, 81% 100%, 50% 76%, 19% 100%, 30% 61%, 0 38%, 38% 36%);
        opacity: .82;
        animation: si-christmas-star-glow 5.4s ease-in-out var(--tree-phase, 0s) infinite;
    }

    @keyframes si-christmas-star-glow {
        0%, 100% { opacity: .62; transform: scale(.95); }
        50% { opacity: 1; transform: scale(1.08); }
    }

    .si-christmas-tree::after {
        content: "";
        position: absolute;
        inset: 10% 0 0;
        background: linear-gradient(160deg, #c8e8e5, #518b85 42%, #273e61 82%);
        clip-path: polygon(50% 0, 70% 31%, 62% 31%, 82% 58%, 72% 58%, 100% 94%, 56% 94%, 56% 100%, 44% 100%, 44% 94%, 0 94%, 28% 58%, 18% 58%, 38% 31%, 30% 31%);
        opacity: .64;
    }

    .si-christmas-tree__light {
        --bulb-dim: .21;
        --twinkle-delay: calc(var(--tree-light-delay) + var(--tree-phase, 0s));
        position: absolute;
        top: var(--tree-light-top);
        left: var(--tree-light-left);
        z-index: 1;
        width: clamp(2px, .42vw, 5.5px);
        aspect-ratio: 1;
        border-radius: 50%;
        color: var(--tree-light-color);
        background: radial-gradient(circle at 37% 32%, #fff7e3 4%, currentColor 70%);
        box-shadow: 0 0 3px currentColor;
        opacity: .66;
        transform: translate(-50%, -50%);
        animation: si-christmas-twinkle var(--tree-light-duration) ease-in-out var(--twinkle-delay) infinite;
    }

    .si-christmas-tree__light::after {
        content: "";
        position: absolute;
        inset: -62%;
        border-radius: 50%;
        background: radial-gradient(circle, currentColor 12%, transparent 70%);
        opacity: .45;
        animation: si-christmas-halo var(--tree-light-duration) ease-in-out var(--twinkle-delay) infinite;
    }

    .si-christmas-tree:last-child .si-christmas-tree__light {
        left: calc(100% - var(--tree-light-left));
    }

    /* Keep existing positioning utilities ahead of this default. */
    :where(.si-christmas-page) :where(:is(a, button).rounded-full, a[class~="rounded-[30px]"], a.bg-coloryellow[class~="rounded-[40px]"]) {
        position: relative;
    }

    .si-christmas-page :where(:is(a, button).rounded-full, a[class~="rounded-[30px]"], a.bg-coloryellow[class~="rounded-[40px]"])::after {
        --snow-shape:
            radial-gradient(ellipse at 52% 57%, #000 66%, #0000 74%) 0 42% / 35% 64%,
            radial-gradient(ellipse at 50% 57%, #000 66%, #0000 74%) 22% 0 / 40% 76%,
            radial-gradient(ellipse at 48% 54%, #000 66%, #0000 74%) 58% 36% / 49% 71%,
            radial-gradient(ellipse at 46% 60%, #000 66%, #0000 74%) 90% 8% / 32% 76%,
            radial-gradient(ellipse at 44% 55%, #000 66%, #0000 74%) 100% 48% / 22% 62%,
            radial-gradient(ellipse at 47% 36%, #000 66%, #0000 74%) 21% 98% / 21% 52%,
            radial-gradient(ellipse at 52% 34%, #000 66%, #0000 74%) 61% 100% / 16% 65%,
            radial-gradient(ellipse at 40% 26%, #000 66%, #0000 74%) 86% 85% / 13% 43%;
        content: "";
        position: absolute;
        inset: var(--snow-top, -6px) 0 auto;
        width: var(--snow-width, min(72%, 142px));
        height: var(--snow-depth, 14px);
        margin-inline: auto;
        z-index: 1;
        background:
            radial-gradient(circle at 2px 3px, #ffffffb8 .65px, transparent 1.25px) 0 0 / 13px 6px,
            radial-gradient(circle at 7px 5px, #8eaaca70 .5px, transparent 1.1px) 0 0 / 17px 7px,
            linear-gradient(178deg, #fff 13%, #f8fcff 46%, #e1eef9 64%, #adc8e0 89%, #819fbf 100%);
        -webkit-mask: var(--snow-shape);
        mask: var(--snow-shape);
        -webkit-mask-repeat: no-repeat;
        mask-repeat: no-repeat;
        pointer-events: none;
    }

    .si-christmas-page .close-schristmas {
        --snow-width: 66%;
        --snow-depth: 8px;
        --snow-top: -4px;
    }

    .si-christmas-page a.bg-coloryellow[class~="rounded-[40px]"] {
        --snow-width: min(66%, 130px);
        --snow-depth: 12px;
        --snow-top: -5px;
    }

    @media (min-width: 768px) {
        .si-christmas-ornaments {
            top: 80px;
        }
    }

    @media (min-width: 768px) and (max-height: 689.98px) {
        .si-christmas-logo-hat {
            width: min(5%, 40px);
        }
    }

    @media (min-width: 768px) and (max-height: 619.98px),
           (min-width: 1280px) and (max-height: 649.98px) {
        .si-christmas-logo-hat {
            display: none;
        }
    }

    @media (max-width: 767.98px) {
        .si-christmas-ornament {
            --ornament-arc: 9deg;
        }

        .si-christmas-ornament--gold {
            left: max(6%, 23px);
        }

        .si-christmas-ornament:is(.si-christmas-ornament--red, .si-christmas-ornament--green) {
            --ornament-size: clamp(17px, 4.5vw, 25px);
            --ornament-arc: 7deg;
            display: flex;
        }

        .si-christmas-ornament--red {
            --ornament-drop: clamp(23px, 5vh, 43px);
            left: clamp(57px, 17%, 100px);
        }

        .si-christmas-ornament--green {
            --ornament-drop: clamp(29px, 5.8vh, 50px);
            right: clamp(57px, 17%, 100px);
        }

        .si-christmas-ornament--silver {
            right: max(6%, 23px);
        }

        .si-christmas-particle:nth-child(n+17),
        .si-christmas-snow--dashboard .si-christmas-particle:nth-child(n+7),
        .si-christmas-lights__strand:nth-child(n+5) {
            display: none;
        }
    }

    @media (max-height: 460px) {
        .si-christmas-ornaments,
        .si-christmas-logo-hat {
            display: none;
        }
    }

    @media (prefers-reduced-motion: reduce) {
        .si-christmas-snow {
            display: none;
        }

        .si-christmas-ornament,
        .si-christmas-page .si-christmas-lights .si-christmas-lights__strand span,
        .si-christmas-lights__strand span::after,
        .si-christmas-card-lights > span,
        .si-christmas-tree::before,
        .si-christmas-tree__light,
        .si-christmas-tree__light::after {
            animation: none;
        }
    }
}
