body[data-winter-page] {
    min-height: 100vh;
    background: #14263e;
    isolation: isolate;
}

body[data-winter-page]::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(180deg, #08172f4d, #08172f26 55%, #08172f66),
        url("village.webp") center / cover no-repeat;
}

body[data-winter-page="home"] main {
    background: rgba(12, 26, 45, .88);
    border-color: #eecb8b99;
    backdrop-filter: blur(4px);
}

body[data-winter-page="home"] nav a,
body[data-winter-page="scripts"] nav > a,
body[data-winter-page="tools"] nav > a {
    border-color: #eecb8b99;
}

body[data-winter-page="home"] nav a:hover,
body[data-winter-page="home"] nav a:focus-visible {
    border-color: #ffe0a3;
}

body[data-winter-page="support"] .container,
body[data-winter-page="learn"] .hero,
body[data-winter-page="learn"] .section {
    background: rgba(252, 248, 238, .95);
    border-radius: 20px;
}

body[data-winter-page="support"] .container {
    width: min(960px, calc(100% - 24px));
    box-sizing: border-box;
    margin-block: 24px;
}

body[data-winter-page="learn"] .site-header {
    background: #fcf8ee;
    border-radius: 0 0 16px 16px;
}

body[data-winter-page="learn"] .hero,
body[data-winter-page="learn"] .section {
    width: calc(100% - 24px);
    margin-block-end: 24px;
}

.winter-snow {
    position: fixed;
    inset: 0;
    overflow: hidden;
    z-index: 10;
    pointer-events: none;
}

.winter-snow > span {
    position: absolute;
    left: var(--left);
    top: -12px;
    width: var(--size);
    height: var(--size);
    border-radius: 50%;
    background: #fff;
    opacity: var(--opacity);
    animation: winter-fall var(--duration) var(--delay) linear infinite;
}

.winter-snow[hidden],
.winter-toggle[hidden] {
    display: none;
}

.winter-toggle {
    position: fixed;
    z-index: 31;
    left: 12px;
    bottom: 12px;
    padding: .45rem .75rem;
    border: 1px solid #eecb8b99;
    border-radius: 999px;
    background: #14263e;
    color: #fff;
    font: 600 .78rem/1.4 system-ui, sans-serif;
    cursor: pointer;
}

.winter-toggle:focus-visible {
    outline: 2px solid #ffe0a3;
    outline-offset: 3px;
}

@keyframes winter-fall {
    to { transform: translate(var(--drift), calc(100dvh + 24px)); }
}

@media (prefers-reduced-motion: reduce) {
    .winter-snow,
    .winter-toggle {
        display: none;
    }

    .winter-snow > span {
        animation: none;
    }
}

body[data-winter-page="traffic"] .winter-toggle {
    inset: 12px 12px auto auto;
}

@media (max-width: 600px) {
    body[data-winter-page="home"] {
        overflow-x: clip;
        grid-template-columns: minmax(0, 1fr);
    }

    body[data-winter-page="home"] main {
        min-width: 0;
        overflow-wrap: anywhere;
        background: rgba(12, 26, 45, .80);
    }

    body[data-winter-page="home"] .banner,
    body[data-winter-page="home"] .banner-big {
        max-width: 100%;
        overflow: hidden;
    }
}