/*
 * Зимнее оформление (перенос из vintage). Подключается только когда активен зимний режим
 * (frontend/widgets/winter/WinterWidget.php). Свои зимние стили можно писать от body.is-winter.
 */

/* ---------- Фоновый снег: DOM + CSS-анимации (web/js/winter.js → buildCssSnow) ----------
   Анимируется только transform — анимации выполняет композитор, без JS и перерисовок. */
.winter-snow-layer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 900;
    contain: strict;
}
.winter-snow-layer[hidden] {
    display: none;
}

.winter-flake {
    position: absolute;
    top: 0;
    animation: winter-fall 10s linear infinite;
    will-change: transform;
}

.winter-flake__i {
    width: 100%;
    height: 100%;
    background: no-repeat center / contain;
    animation: winter-sway-a 3s ease-in-out infinite alternate;
}
.winter-flake__i--b {
    animation-name: winter-sway-b;
}
.winter-flake__i--c {
    animation-name: winter-sway-c;
}

/* «Взрыв» снежинок (window.winterSnow.burstAt(el)): позиция — left/top точки, движение — Web Animations */
.winter-burst {
    position: absolute;
    background: no-repeat center / contain;
    will-change: transform, opacity;
}

@keyframes winter-fall {
    from { transform: translate3d(0, -60px, 0); }
    to { transform: translate3d(0, calc(100vh + 20px), 0); }
}
@keyframes winter-sway-a {
    from { transform: translate3d(-10px, 0, 0) rotate(-25deg); }
    to { transform: translate3d(10px, 0, 0) rotate(25deg); }
}
@keyframes winter-sway-b {
    from { transform: translate3d(-18px, 0, 0) rotate(30deg); }
    to { transform: translate3d(18px, 0, 0) rotate(-35deg); }
}
@keyframes winter-sway-c {
    from { transform: translate3d(-26px, 0, 0) rotate(-40deg); }
    to { transform: translate3d(26px, 0, 0) rotate(40deg); }
}

/* ---------- Нижний левый угол: кнопка вкл/выкл снега ---------- */
.winter-dock {
    position: fixed;
    left: 12px;
    bottom: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    display: flex;
    align-items: flex-end;
    gap: 8px;
    z-index: 899;
    pointer-events: none;
}
.winter-dock > * {
    pointer-events: auto;
}

.winter-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: 0 0 16px;
    padding: 0;
    border: 1px solid #C9D3DC;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    color: #4F7385;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
    cursor: pointer;
    outline: none;
    transition: opacity .2s ease, transform .2s ease;
}
.winter-btn[hidden] {
    display: none;
}
.winter-btn svg {
    width: 22px;
    height: 22px;
}
.winter-btn:focus-visible {
    outline: 2px solid #4F7385;
    outline-offset: 2px;
}
.winter-btn[aria-pressed="false"] {
    opacity: .55;
    color: #888;
}
.is-winter .header__logo-link {
    position: relative;
}
.is-winter .header__logo-link::before {
    content: '';
    right: -12%;
    top: -137%;
    width: 100%;
    height: 100%;
    position: absolute;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='196' height='170' viewBox='0 0 196 170'%3E%3Cg transform='translate(196 0) scale(-1 1)'%3E%3Cdefs%3E%3ClinearGradient id='hv' x1='0' y1='0' x2='1' y2='.35'%3E%3Cstop offset='0' stop-color='%23F0505F'/%3E%3Cstop offset='.45' stop-color='%23D3243A'/%3E%3Cstop offset='1' stop-color='%238E1424'/%3E%3C/linearGradient%3E%3CradialGradient id='hs' cx='.32' cy='.3' r='.45'%3E%3Cstop offset='0' stop-color='%23fff' stop-opacity='.28'/%3E%3Cstop offset='1' stop-color='%23fff' stop-opacity='0'/%3E%3C/radialGradient%3E%3CclipPath id='hc'%3E%3Cpath d='M24 132C20 84 44 26 98 13C138 4 170 26 176 62C179 80 176 94 170 104C166 96 160 84 152 74C144 88 148 112 160 132Z'/%3E%3C/clipPath%3E%3C/defs%3E%3Cpath d='M24 132C20 84 44 26 98 13C138 4 170 26 176 62C179 80 176 94 170 104C166 96 160 84 152 74C144 88 148 112 160 132Z' fill='url(%23hv)'/%3E%3Cg clip-path='url(%23hc)'%3E%3Cpath d='M24 132C20 84 44 26 98 13C138 4 170 26 176 62C179 80 176 94 170 104C166 96 160 84 152 74C144 88 148 112 160 132Z' fill='url(%23hs)'/%3E%3Cpath d='M152 74C140 90 146 114 158 134L176 134L176 60Z' fill='%238E1424' opacity='.55'/%3E%3Cpath d='M60 128C58 96 70 62 96 40M112 130C108 102 116 70 140 46' stroke='%238E1424' stroke-width='3' stroke-linecap='round' fill='none' opacity='.35'/%3E%3Cpath d='M48 120C48 92 60 58 86 36' stroke='%23F0505F' stroke-width='2.4' stroke-linecap='round' fill='none' opacity='.55'/%3E%3Cpath d='M28 114C70 108 112 108 158 114' stroke='%23F9ED23' stroke-width='2' stroke-dasharray='4 3.2' stroke-linecap='round' fill='none'/%3E%3C/g%3E%3Cg fill='%23F9ED23'%3E%3Cpath d='M92 76l2.6 6.2 6.6.5-5 4.3 1.6 6.5-5.8-3.5-5.7 3.5 1.6-6.5-5-4.3 6.6-.5z'/%3E%3Cpath d='M124 92l1.6 3.8 4 .3-3.1 2.6 1 4-3.5-2.1-3.5 2.1 1-4-3.1-2.6 4-.3z'/%3E%3Cpath d='M64 98l1.4 3.2 3.4.3-2.6 2.2.8 3.4-3-1.8-3 1.8.8-3.4-2.6-2.2 3.4-.3z'/%3E%3C/g%3E%3Cpath d='M24 132C20 84 44 26 98 13C138 4 170 26 176 62C179 80 176 94 170 104C166 96 160 84 152 74C144 88 148 112 160 132Z' fill='none' stroke='%238E1424' stroke-width='1.6' stroke-linejoin='round' opacity='.6'/%3E%3Cg fill='%23BFCFDB'%3E%3Ccircle cx='17' cy='132.5' r='5'/%3E%3Ccircle cx='20' cy='158.9' r='5.2'/%3E%3Ccircle cx='25' cy='132.4' r='5.8'/%3E%3Ccircle cx='28' cy='159.4' r='5.4'/%3E%3Ccircle cx='32.6' cy='132.6' r='5.4'/%3E%3Ccircle cx='35.6' cy='158.7' r='6.3'/%3E%3Ccircle cx='40.6' cy='132.3' r='5.2'/%3E%3Ccircle cx='43.6' cy='158.9' r='5.6'/%3E%3Ccircle cx='48.8' cy='132.9' r='6.2'/%3E%3Ccircle cx='51.8' cy='159.5' r='5.7'/%3E%3Ccircle cx='56.2' cy='132.5' r='6.1'/%3E%3Ccircle cx='59.2' cy='158.3' r='5.2'/%3E%3Ccircle cx='63.3' cy='131.8' r='6.3'/%3E%3Ccircle cx='66.3' cy='158.3' r='5.9'/%3E%3Ccircle cx='71.3' cy='132.7' r='5.1'/%3E%3Ccircle cx='74.3' cy='158.5' r='6.5'/%3E%3Ccircle cx='78.9' cy='132.7' r='6.7'/%3E%3Ccircle cx='81.9' cy='158.7' r='5.9'/%3E%3Ccircle cx='86.2' cy='132.6' r='5.4'/%3E%3Ccircle cx='89.2' cy='158.2' r='5.8'/%3E%3Ccircle cx='92.8' cy='132' r='5'/%3E%3Ccircle cx='95.8' cy='158.8' r='6.1'/%3E%3Ccircle cx='99.3' cy='132.9' r='5.1'/%3E%3Ccircle cx='102.3' cy='159' r='5.9'/%3E%3Ccircle cx='106' cy='132.2' r='5.4'/%3E%3Ccircle cx='109' cy='158.3' r='6.5'/%3E%3Ccircle cx='113.6' cy='132.5' r='6.2'/%3E%3Ccircle cx='116.6' cy='159.4' r='5.2'/%3E%3Ccircle cx='120.1' cy='132.2' r='5.5'/%3E%3Ccircle cx='123.1' cy='158.7' r='6.3'/%3E%3Ccircle cx='126.3' cy='132.6' r='5.4'/%3E%3Ccircle cx='129.3' cy='158.7' r='5.6'/%3E%3Ccircle cx='133' cy='132.3' r='6.1'/%3E%3Ccircle cx='136' cy='158.8' r='5.1'/%3E%3Ccircle cx='140.1' cy='133.1' r='6.4'/%3E%3Ccircle cx='143.1' cy='158.3' r='5.3'/%3E%3Ccircle cx='146.3' cy='132' r='5.8'/%3E%3Ccircle cx='149.3' cy='159.3' r='4.9'/%3E%3Ccircle cx='152.6' cy='132.8' r='6.2'/%3E%3Ccircle cx='155.6' cy='159.1' r='5.1'/%3E%3Ccircle cx='160.9' cy='132.8' r='5.2'/%3E%3Ccircle cx='163.9' cy='159.2' r='5.8'/%3E%3Ccircle cx='168.2' cy='131.8' r='5.2'/%3E%3Ccircle cx='171.2' cy='158.8' r='5.6'/%3E%3Ccircle cx='174.8' cy='132.3' r='5.4'/%3E%3Ccircle cx='177.8' cy='159.2' r='5.7'/%3E%3Ccircle cx='18' cy='145.6' r='9'/%3E%3Ccircle cx='174' cy='145.6' r='9'/%3E%3C/g%3E%3Crect x='15' y='130' width='160' height='28' rx='12' fill='%23FFFFFF'/%3E%3Cg fill='%23FFFFFF'%3E%3Ccircle cx='16' cy='130.9' r='5'/%3E%3Ccircle cx='19' cy='157.3' r='5.2'/%3E%3Ccircle cx='24' cy='130.8' r='5.8'/%3E%3Ccircle cx='27' cy='157.8' r='5.4'/%3E%3Ccircle cx='31.6' cy='131' r='5.4'/%3E%3Ccircle cx='34.6' cy='157.1' r='6.3'/%3E%3Ccircle cx='39.6' cy='130.7' r='5.2'/%3E%3Ccircle cx='42.6' cy='157.3' r='5.6'/%3E%3Ccircle cx='47.8' cy='131.3' r='6.2'/%3E%3Ccircle cx='50.8' cy='157.9' r='5.7'/%3E%3Ccircle cx='55.2' cy='130.9' r='6.1'/%3E%3Ccircle cx='58.2' cy='156.7' r='5.2'/%3E%3Ccircle cx='62.3' cy='130.2' r='6.3'/%3E%3Ccircle cx='65.3' cy='156.7' r='5.9'/%3E%3Ccircle cx='70.3' cy='131.1' r='5.1'/%3E%3Ccircle cx='73.3' cy='156.9' r='6.5'/%3E%3Ccircle cx='77.9' cy='131.1' r='6.7'/%3E%3Ccircle cx='80.9' cy='157.1' r='5.9'/%3E%3Ccircle cx='85.2' cy='131' r='5.4'/%3E%3Ccircle cx='88.2' cy='156.6' r='5.8'/%3E%3Ccircle cx='91.8' cy='130.4' r='5'/%3E%3Ccircle cx='94.8' cy='157.2' r='6.1'/%3E%3Ccircle cx='98.3' cy='131.3' r='5.1'/%3E%3Ccircle cx='101.3' cy='157.4' r='5.9'/%3E%3Ccircle cx='105' cy='130.6' r='5.4'/%3E%3Ccircle cx='108' cy='156.7' r='6.5'/%3E%3Ccircle cx='112.6' cy='130.9' r='6.2'/%3E%3Ccircle cx='115.6' cy='157.8' r='5.2'/%3E%3Ccircle cx='119.1' cy='130.6' r='5.5'/%3E%3Ccircle cx='122.1' cy='157.1' r='6.3'/%3E%3Ccircle cx='125.3' cy='131' r='5.4'/%3E%3Ccircle cx='128.3' cy='157.1' r='5.6'/%3E%3Ccircle cx='132' cy='130.7' r='6.1'/%3E%3Ccircle cx='135' cy='157.2' r='5.1'/%3E%3Ccircle cx='139.1' cy='131.5' r='6.4'/%3E%3Ccircle cx='142.1' cy='156.7' r='5.3'/%3E%3Ccircle cx='145.3' cy='130.4' r='5.8'/%3E%3Ccircle cx='148.3' cy='157.7' r='4.9'/%3E%3Ccircle cx='151.6' cy='131.2' r='6.2'/%3E%3Ccircle cx='154.6' cy='157.5' r='5.1'/%3E%3Ccircle cx='159.9' cy='131.2' r='5.2'/%3E%3Ccircle cx='162.9' cy='157.6' r='5.8'/%3E%3Ccircle cx='167.2' cy='130.2' r='5.2'/%3E%3Ccircle cx='170.2' cy='157.2' r='5.6'/%3E%3Ccircle cx='173.8' cy='130.7' r='5.4'/%3E%3Ccircle cx='176.8' cy='157.6' r='5.7'/%3E%3Ccircle cx='17' cy='144' r='9'/%3E%3Ccircle cx='173' cy='144' r='9'/%3E%3C/g%3E%3Cpath d='M129.1 142.9l-0.2 -2.9M42.4 149l-0.7 -1.8M22.7 153.6l-0.3 -2.4M121.6 153.8l0.4 -2.4M136.9 154.1l0.2 -1.9M149.4 149.6l1 -2.1M51.9 143.7l-0.7 -1.7M65.7 150.5l-0.4 -2.7M70.7 141l0.6 -2M124.6 153.8l-1.6 -2.1M68.7 132.3l-0.5 -2.6M148.3 149.4l1 -2.5M44.3 134.4l0.8 -2.1M67.1 154l-0.9 -2.5M136.2 140.6l-0.2 -2.2M165.9 145.2l0.9 -1.4M51.3 142.6l1.3 -2.1M123.4 132.7l1 -1.3M103.4 133.2l-1.9 -2.3M71.6 140.5l0.9 -1.4M89.2 146.8l0.6 -1.5M58.3 145.6l0.4 -2.4M36.3 142.7l-0.3 -2M66.1 148.1l0.2 -2.3M147.2 156.5l0.4 -1.9M102.6 144.2l-0.8 -1.4M114 152.8l0.9 -1.4M84.3 148.4l-1.1 -2.4M59.8 148.8l0 -3.1M30.8 148l0.1 -3.2M78.4 139.1l1.2 -2.4M42.1 132.3l-0.2 -2M79.6 137.5l-0.4 -3.1M147.4 156.8l-1.3 -1.9' stroke='%23E3ECF2' stroke-width='1.1' opacity='.8' stroke-linecap='round'/%3E%3Ccircle cx='173.5' cy='110.5' r='17' fill='%23BFCFDB'/%3E%3Ccircle cx='172' cy='108' r='15' fill='%23FFFFFF'/%3E%3Ccircle cx='183.9' cy='109.2' r='6.9' fill='%23FFFFFF'/%3E%3Ccircle cx='182.8' cy='113.3' r='6.7' fill='%23FFFFFF'/%3E%3Ccircle cx='178.5' cy='118.1' r='6.4' fill='%23FFFFFF'/%3E%3Ccircle cx='173.5' cy='119.9' r='5.3' fill='%23FFFFFF'/%3E%3Ccircle cx='166.8' cy='118.8' r='6.5' fill='%23FFFFFF'/%3E%3Ccircle cx='163.9' cy='116.8' r='5.6' fill='%23FFFFFF'/%3E%3Ccircle cx='160.4' cy='111' r='5.7' fill='%23FFFFFF'/%3E%3Ccircle cx='160' cy='107.1' r='6.8' fill='%23FFFFFF'/%3E%3Ccircle cx='161.2' cy='102.8' r='6.1' fill='%23FFFFFF'/%3E%3Ccircle cx='165.5' cy='97.9' r='6.5' fill='%23FFFFFF'/%3E%3Ccircle cx='171.7' cy='96' r='6.1' fill='%23FFFFFF'/%3E%3Ccircle cx='177.5' cy='97.3' r='5.1' fill='%23FFFFFF'/%3E%3Ccircle cx='180.9' cy='99.9' r='5.3' fill='%23FFFFFF'/%3E%3Ccircle cx='183.4' cy='104.4' r='6.8' fill='%23FFFFFF'/%3E%3Ccircle cx='175' cy='112' r='9.350000000000001' fill='%23E3ECF2' opacity='.35'/%3E%3Ccircle cx='167' cy='102' r='5.1' fill='%23fff' opacity='.7'/%3E%3C/g%3E%3C/svg%3E%0A");
    background-repeat: no-repeat;
    background-position: top left;
    background-size: contain;
    transform: scaleX(1) rotate(-20deg);
    pointer-events: none;
}
@media (min-width: 1200px) {
    .winter-btn:hover {
        transform: scale(1.08);
    }
}
@media (max-width: 767px) {
    .winter-dock {
        left: 8px;
    }
    .winter-btn {
        width: 34px;
        height: 34px;
        margin-bottom: 12px;
    }
    .winter-btn svg {
        width: 18px;
        height: 18px;
    }
}
