body.is-winter {
    --winter-amber: #e4c48a;
    --winter-ember: #d0894a;
    --winter-cream: #f6efe2;
}

body.is-winter .background-overlay {
    background:
        radial-gradient(circle at 18% 22%, rgba(246, 239, 226, 0.55) 0 1px, transparent 1.6px),
        radial-gradient(circle at 32% 14%, rgba(246, 239, 226, 0.4) 0 1px, transparent 1.6px),
        radial-gradient(circle at 46% 28%, rgba(228, 196, 138, 0.45) 0 1px, transparent 1.6px),
        radial-gradient(circle at 61% 12%, rgba(246, 239, 226, 0.35) 0 1px, transparent 1.6px),
        radial-gradient(circle at 74% 24%, rgba(246, 239, 226, 0.4) 0 1px, transparent 1.6px),
        radial-gradient(circle at 86% 16%, rgba(228, 196, 138, 0.3) 0 1px, transparent 1.6px),
        radial-gradient(ellipse at 50% 0%, rgba(210, 140, 70, 0.16), transparent 42%),
        radial-gradient(ellipse at 12% 88%, rgba(80, 28, 90, 0.28), transparent 46%),
        radial-gradient(ellipse at 88% 70%, rgba(40, 16, 56, 0.22), transparent 40%),
        linear-gradient(180deg, rgba(18, 10, 22, 0.35), rgba(8, 5, 14, 0.2));
}

body.is-winter .site-nav {
    background: rgba(16, 9, 18, 0.88);
    border-bottom-color: rgba(228, 196, 138, 0.22);
}

body.is-winter .site-nav::before {
    height: 0;
}

.winter-garland {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 46px;
    z-index: 85;
    pointer-events: none;
    overflow: visible;
}

.winter-cord {
    position: absolute;
    left: -2%;
    right: -2%;
    top: 14px;
    height: 8px;
    background:
        radial-gradient(circle at 10% 40%, transparent 46%, rgba(90, 48, 28, 0.55) 47%, transparent 52%),
        linear-gradient(180deg, #6a3d22, #3d2416);
    border-radius: 99px;
    clip-path: polygon(0 40%, 8% 80%, 16% 20%, 24% 75%, 32% 25%, 40% 78%, 48% 22%, 56% 80%, 64% 28%, 72% 76%, 80% 24%, 88% 72%, 100% 38%, 100% 62%, 88% 88%, 80% 40%, 72% 92%, 64% 44%, 56% 96%, 48% 38%, 40% 94%, 32% 42%, 24% 90%, 16% 36%, 8% 96%, 0 56%);
    opacity: 0.72;
}

.winter-bulb {
    position: absolute;
    top: 8px;
    width: 9px;
    height: 11px;
    border-radius: 50% 50% 45% 45%;
    box-shadow:
        0 0 10px currentColor,
        0 0 22px rgba(232, 180, 110, 0.28);
    animation: winterGlow 3.6s ease-in-out infinite;
}

.winter-bulb::before {
    content: "";
    position: absolute;
    top: -4px;
    left: 50%;
    width: 4px;
    height: 4px;
    transform: translateX(-50%);
    background: #7a5230;
    border-radius: 1px;
}

.winter-bulb.a { left: 5%; color: #e8c48a; background: #f0d7a8; animation-delay: 0s; }
.winter-bulb.b { left: 13%; color: #d0894a; background: #e6a25a; animation-delay: 0.35s; top: 16px; }
.winter-bulb.c { left: 21%; color: #c96b6b; background: #e08a8a; animation-delay: 0.7s; }
.winter-bulb.d { left: 30%; color: #e8c48a; background: #f3dcaf; animation-delay: 0.15s; top: 18px; }
.winter-bulb.e { left: 38%; color: #c9a06a; background: #dfc08a; animation-delay: 0.9s; }
.winter-bulb.f { left: 47%; color: #d0894a; background: #e8b06a; animation-delay: 0.45s; top: 15px; }
.winter-bulb.g { left: 55%; color: #e8c48a; background: #f0d7a8; animation-delay: 1.1s; }
.winter-bulb.h { left: 63%; color: #c96b6b; background: #e08a8a; animation-delay: 0.25s; top: 17px; }
.winter-bulb.i { left: 72%; color: #e8c48a; background: #f3dcaf; animation-delay: 0.8s; }
.winter-bulb.j { left: 80%; color: #d0894a; background: #e6a25a; animation-delay: 0.55s; top: 16px; }
.winter-bulb.k { left: 88%; color: #c9a06a; background: #dfc08a; animation-delay: 1.2s; }
.winter-bulb.l { left: 95%; color: #e8c48a; background: #f0d7a8; animation-delay: 0.4s; top: 14px; }

.winter-icicles {
    position: absolute;
    left: 2%;
    right: 2%;
    top: 16px;
    height: 34px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    pointer-events: none;
}

.winter-icicles span {
    display: block;
    width: 7px;
    height: 16px;
    background: linear-gradient(180deg, rgba(255, 252, 246, 0.82), rgba(255, 252, 246, 0));
    clip-path: polygon(50% 100%, 0 0, 100% 0);
    opacity: 0.72;
    transform-origin: top center;
    animation: winterDrip 7s ease-in-out infinite;
}

.winter-icicles span:nth-child(3n) { height: 28px; animation-delay: -1.4s; }
.winter-icicles span:nth-child(4n) { height: 12px; opacity: 0.45; width: 5px; }
.winter-icicles span:nth-child(5n) { height: 22px; animation-delay: -3s; }
.winter-icicles span:nth-child(2n) { animation-delay: -2.2s; }

.winter-snow {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3;
}

.winter-side {
    position: fixed;
    top: 70px;
    width: 30px;
    height: calc(100vh - 70px);
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}

.winter-side-left {
    left: 6px;
}

.winter-side-right {
    right: 6px;
}

.winter-side-cord {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 12px;
    width: 6px;
    background:
        radial-gradient(circle at 40% 8%, transparent 46%, rgba(90, 48, 28, 0.55) 47%, transparent 52%),
        linear-gradient(90deg, #6a3d22, #3d2416);
    border-radius: 99px;
    clip-path: polygon(30% 0, 80% 6%, 20% 12%, 78% 20%, 24% 28%, 82% 36%, 18% 44%, 80% 52%, 22% 60%, 78% 68%, 26% 76%, 84% 84%, 20% 92%, 70% 100%, 40% 100%, 10% 92%, 74% 84%, 16% 76%, 72% 68%, 12% 60%, 70% 52%, 8% 44%, 72% 36%, 14% 28%, 68% 20%, 10% 12%, 50% 0);
    opacity: 0.7;
}

.winter-side .winter-bulb {
    left: 10px;
    top: auto;
}

.winter-side .winter-bulb.a { top: 3%; left: 10px; }
.winter-side .winter-bulb.b { top: 15%; left: 14px; }
.winter-side .winter-bulb.c { top: 27%; left: 10px; }
.winter-side .winter-bulb.d { top: 39%; left: 8px; }
.winter-side .winter-bulb.e { top: 51%; left: 10px; }
.winter-side .winter-bulb.f { top: 63%; left: 15px; }
.winter-side .winter-bulb.g { top: 75%; left: 10px; }
.winter-side .winter-bulb.h { top: 87%; left: 9px; }

body.page-chat .winter-side,
body.page-music .winter-side {
    display: none;
}

@media (max-width: 900px) {
    .winter-side {
        display: none;
    }
}

body.is-winter .site-nav {
    padding-top: 18px;
}

body.is-winter .btn-setup {
    box-shadow: 0 0 18px rgba(224, 168, 90, 0.12);
}

.winter-glass {
    position: fixed;
    inset: 0;
    z-index: 4;
    pointer-events: none;
    background:
        radial-gradient(180px 120px at 0 0, rgba(246, 239, 226, 0.16), transparent 72%),
        radial-gradient(160px 110px at 100% 0, rgba(246, 239, 226, 0.12), transparent 72%),
        radial-gradient(220px 140px at 0 100%, rgba(214, 226, 236, 0.07), transparent 70%),
        radial-gradient(220px 140px at 100% 100%, rgba(214, 226, 236, 0.07), transparent 70%);
    box-shadow: inset 0 0 90px rgba(206, 220, 232, 0.05);
}

body.is-winter main > section,
body.is-winter main > header.page-hero,
body.is-winter .site-footer:not(.site-footer-compact) {
    position: relative;
    border-top-color: transparent;
}

body.is-winter main > section {
    padding-top: 84px !important;
}

body.is-winter main > header.page-hero {
    padding-top: 84px;
}

body.is-winter main > section::before,
body.is-winter main > header.page-hero::before,
body.is-winter .site-footer:not(.site-footer-compact)::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -6px;
    height: 68px;
    background-image: url("/assets/images/winter-cap.png");
    background-repeat: no-repeat;
    background-position: center top;
    background-size: 100% 68px;
    pointer-events: none;
    z-index: 2;
}

.winter-snowman {
    position: fixed;
    left: 6px;
    bottom: 8px;
    z-index: 6;
    width: 168px;
    pointer-events: none;
}

.winter-snowman img {
    display: block;
    width: 100%;
    height: auto;
}

body:has(.cookie-bar:not([hidden])) .winter-snowman,
body:has(.vault-mini) .winter-snowman {
    bottom: 96px;
}

@keyframes winterGlow {
    0%, 100% { opacity: 0.62; filter: brightness(0.92); }
    50% { opacity: 1; filter: brightness(1.18); }
}

@keyframes winterDrip {
    0%, 100% { transform: scaleY(1); opacity: 0.62; }
    50% { transform: scaleY(1.08); opacity: 0.9; }
}

@media (max-width: 720px) {
    .winter-icicles span:nth-child(odd) {
        display: none;
    }

    .winter-snowman {
        width: 112px;
        left: 0;
        bottom: 0;
    }
}

body.page-chat .winter-snowman,
body.page-music .winter-snowman,
body.page-admin .winter-snowman {
    display: none;
}

@media (prefers-reduced-motion: reduce) {
    .winter-bulb,
    .winter-icicles span {
        animation: none;
    }

    .winter-bulb {
        opacity: 0.85;
    }

    .winter-snow {
        display: none;
    }
}
