body.newyear-mode {
    position: relative;
    z-index: 0;
}

body.newyear-mode::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://www.dropbox.com/s/7fsmf9uqbjtfaul/bg.jpg?raw=1');
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    z-index: -1;
    opacity: 0.3;
    display: block !important;
    visibility: visible !important;
}

.newyear-garland {
    display: none;
    position: relative;
    width: 100%;
    height: 115px;
    overflow: hidden;
    background: url(https://www.dropbox.com/s/v9lpxcfepsvin60/b-head-decor_newyear.png?raw=1) repeat-x 0 0;
    z-index: 1;
    pointer-events: auto;
}

body.newyear-mode .drawer.open ~ .newyear-garland,
body.newyear-mode .drawer.open + .newyear-garland {
    z-index: 0;
}

body.newyear-mode .newyear-garland {
    display: block;
}

.newyear-garland::before {
    content: '';
    display: block;
    position: absolute;
    top: -115px;
    left: 0;
    z-index: 3;
    height: 115px;
    width: 100%;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.75);
}

.newyear-garland__inner {
    position: absolute;
    top: 0;
    left: 0;
    height: 115px;
    display: block;
    width: 373px;
}

.newyear-garland__inner_n2 {
    left: 373px;
}

.newyear-garland__inner_n3 {
    left: 746px;
}

.newyear-garland__inner_n4 {
    left: 1119px;
}

.newyear-garland__inner_n5 {
    left: 1492px;
}

.newyear-garland__inner_n6 {
    left: 1865px;
}

.newyear-garland__inner_n7 {
    left: 2238px;
}

.newyear-ball {
    position: absolute;
}

.newyear-ball_n1 {
    top: 0;
    left: 3px;
    width: 59px;
    height: 83px;
}

.newyear-ball_n2 {
    top: -19px;
    left: 51px;
    width: 55px;
    height: 70px;
}

.newyear-ball_n3 {
    top: 9px;
    left: 88px;
    width: 49px;
    height: 67px;
}

.newyear-ball_n4 {
    top: 0;
    left: 133px;
    width: 57px;
    height: 102px;
}

.newyear-ball_n5 {
    top: 0;
    left: 166px;
    width: 49px;
    height: 57px;
}

.newyear-ball_n6 {
    top: 6px;
    left: 200px;
    width: 54px;
    height: 70px;
}

.newyear-ball_n7 {
    top: 0;
    left: 240px;
    width: 56px;
    height: 67px;
}

.newyear-ball_n8 {
    top: 0;
    left: 283px;
    width: 54px;
    height: 53px;
}

.newyear-ball_n9 {
    top: 10px;
    left: 321px;
    width: 49px;
    height: 66px;
}

.newyear-ball_n1 .newyear-ball__i {
    background: url(https://www.dropbox.com/s/6uejpodl90ozcaj/b-ball_n1.png?raw=1) no-repeat;
}

.newyear-ball_n2 .newyear-ball__i {
    background: url(https://www.dropbox.com/s/ygy31out3i61ry8/b-ball_n2.png?raw=1) no-repeat;
}

.newyear-ball_n3 .newyear-ball__i {
    background: url(https://www.dropbox.com/s/uaffezwbvb4yuhd/b-ball_n3.png?raw=1) no-repeat;
}

.newyear-ball_n4 .newyear-ball__i {
    background: url(https://www.dropbox.com/s/j8q7itkqekxwt65/b-ball_n4.png?raw=1) no-repeat;
}

.newyear-ball_n5 .newyear-ball__i {
    background: url(https://www.dropbox.com/s/8d7jo6a8b7ngfcq/b-ball_n5.png?raw=1) no-repeat;
}

.newyear-ball_n6 .newyear-ball__i {
    background: url(https://www.dropbox.com/s/x9uqu3fe5cma2ra/b-ball_n6.png?raw=1) no-repeat;
}

.newyear-ball_n7 .newyear-ball__i {
    background: url(https://www.dropbox.com/s/vn9n8rsl3rfm5kx/b-ball_n7.png?raw=1) no-repeat;
}

.newyear-ball_n8 .newyear-ball__i {
    background: url(https://www.dropbox.com/s/kbba0lcmcbxjb6p/b-ball_n8.png?raw=1) no-repeat;
}

.newyear-ball_n9 .newyear-ball__i {
    background: url(https://www.dropbox.com/s/buok8jqo2plg1kh/b-ball_n9.png?raw=1) no-repeat;
}

.newyear-ball_i1 .newyear-ball__i {
    background: url(https://www.dropbox.com/s/ao4okf3y6xl6zfu/b-ball_i1.png?raw=1) no-repeat;
}

.newyear-ball_i2 .newyear-ball__i {
    background: url(https://www.dropbox.com/s/o0c0co1gxur78pu/b-ball_i2.png?raw=1) no-repeat;
}

.newyear-ball_i3 .newyear-ball__i {
    background: url(https://www.dropbox.com/s/hs4frdr0g1sk8qy/b-ball_i3.png?raw=1) no-repeat;
}

.newyear-ball_i4 .newyear-ball__i {
    background: url(https://www.dropbox.com/s/by8955xypx3rwkx/b-ball_i4.png?raw=1) no-repeat;
}

.newyear-ball_i5 .newyear-ball__i {
    background: url(https://www.dropbox.com/s/lwub7a629rbdsgf/b-ball_i5.png?raw=1) no-repeat;
}

.newyear-ball_i6 .newyear-ball__i {
    background: url(https://www.dropbox.com/s/3d0vxlzgutik2xn/b-ball_i6.png?raw=1) no-repeat;
}

.newyear-ball_i1 {
    top: 0;
    left: 0;
    width: 25px;
    height: 71px;
}

.newyear-ball_i2 {
    top: 0;
    left: 25px;
    width: 61px;
    height: 27px;
}

.newyear-ball_i3 {
    top: 0;
    left: 176px;
    width: 29px;
    height: 31px;
}

.newyear-ball_i4 {
    top: 0;
    left: 205px;
    width: 50px;
    height: 51px;
}

.newyear-ball_i5 {
    top: 0;
    left: 289px;
    width: 78px;
    height: 28px;
}

.newyear-ball_i6 {
    top: 0;
    left: 367px;
    width: 6px;
    height: 69px;
}

.newyear-ball__i {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-transform-origin: 50% 0;
    -moz-transform-origin: 50% 0;
    -o-transform-origin: 50% 0;
    transform-origin: 50% 0;
    -webkit-transition: all .3s ease-in-out;
    -moz-transition: all .3s ease-in-out;
    -o-transition: all .3s ease-in-out;
    transition: all .3s ease-in-out;
    pointer-events: none;
}

.newyear-ball_bounce {
    cursor: pointer;
    pointer-events: auto;
}

.newyear-ball_bounce .newyear-ball__right {
    position: absolute;
    top: 0;
    right: 0;
    left: 50%;
    bottom: 0;
    z-index: 9;
    pointer-events: auto;
}

.newyear-ball_bounce:hover .newyear-ball__right {
    display: none;
}

.newyear-ball_bounce .newyear-ball__right:hover {
    left: 0;
    display: block !important;
}

.newyear-ball_bounce.bounce > .newyear-ball__i {
    -webkit-transform: rotate(-9deg);
    -moz-transform: rotate(-9deg);
    -o-transform: rotate(-9deg);
    transform: rotate(-9deg);
}

.newyear-ball_bounce .newyear-ball__right.bounce + .newyear-ball__i {
    -webkit-transform: rotate(9deg);
    -moz-transform: rotate(9deg);
    -o-transform: rotate(9deg);
    transform: rotate(9deg);
}

.newyear-ball_bounce.bounce1 > .newyear-ball__i {
    -webkit-transform: rotate(6deg);
    -moz-transform: rotate(6deg);
    -o-transform: rotate(6deg);
    transform: rotate(6deg);
}

.newyear-ball_bounce .newyear-ball__right.bounce1 + .newyear-ball__i {
    -webkit-transform: rotate(-6deg);
    -moz-transform: rotate(-6deg);
    -o-transform: rotate(-6deg);
    transform: rotate(-6deg);
}

.newyear-ball_bounce.bounce2 > .newyear-ball__i {
    -webkit-transform: rotate(-3deg);
    -moz-transform: rotate(-3deg);
    -o-transform: rotate(-3deg);
    transform: rotate(-3deg);
}

.newyear-ball_bounce .newyear-ball__right.bounce2 + .newyear-ball__i {
    -webkit-transform: rotate(3deg);
    -moz-transform: rotate(3deg);
    -o-transform: rotate(3deg);
    transform: rotate(3deg);
}

.newyear-ball_bounce.bounce3 > .newyear-ball__i {
    -webkit-transform: rotate(1.5deg);
    -moz-transform: rotate(1.5deg);
    -o-transform: rotate(1.5deg);
    transform: rotate(1.5deg);
}

.newyear-ball_bounce .newyear-ball__right.bounce3 + .newyear-ball__i {
    -webkit-transform: rotate(-1.5deg);
    -moz-transform: rotate(-1.5deg);
    -o-transform: rotate(-1.5deg);
    transform: rotate(-1.5deg);
}

.newyear-snow-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

body.newyear-mode .newyear-snow-container {
    display: block;
}

.newyear-decorations {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

body.newyear-mode .newyear-decorations {
    display: block;
}

.newyear-decoration {
    position: absolute;
    width: 40px;
    height: 40px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    animation: float 3s ease-in-out infinite;
    opacity: 0.7;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

.newyear-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #ff6b6b, #ff8787);
    color: #fff;
    border: 0;
    border-radius: 999px;
    padding: 10px 18px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.28);
    transition: all .3s ease;
    white-space: nowrap;
}

.newyear-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 36px rgba(255, 107, 107, 0.35);
}

.newyear-btn:active {
    transform: translateY(0);
    box-shadow: 0 6px 16px rgba(255, 107, 107, 0.2);
}

.newyear-btn.active {
    background: linear-gradient(135deg, #51cf66, #69db7c);
    box-shadow: 0 10px 30px rgba(81, 207, 102, 0.28);
}

.newyear-btn.active:hover {
    box-shadow: 0 16px 36px rgba(81, 207, 102, 0.35);
}

body.newyear-mode .site-header {
    position: relative;
    z-index: 1000;
}

/* Поднимаем дровер выше новогодних украшений и элементов с высоким z-index */
body.newyear-mode .drawer {
    z-index: 60000 !important;
}

body.newyear-mode .drawer.open .drawer__overlay {
    z-index: 60000 !important;
}

body.newyear-mode .drawer__panel {
    z-index: 60001 !important;
}

body.newyear-mode .drawer.open .drawer__head {
    z-index: 60002 !important;
    position: relative;
}

body.newyear-mode .drawer.open .drawer__close {
    z-index: 60003 !important;
    position: relative;
}

@media (max-width: 768px) {
    body.newyear-mode::before {
        background-attachment: scroll !important;
        background-image: url('https://www.dropbox.com/s/7fsmf9uqbjtfaul/bg.jpg?raw=1') !important;
        background-size: cover !important;
        background-position: center !important;
        background-repeat: no-repeat !important;
        display: block !important;
        visibility: visible !important;
        opacity: 0.3 !important;
        position: fixed !important;
        width: 100% !important;
        height: 100% !important;
        z-index: -1 !important;
    }
    
    .newyear-garland,
    i.newyear-garland,
    #newyear-garland,
    body .newyear-garland,
    body i.newyear-garland,
    body #newyear-garland {
        display: block !important;
        position: relative !important;
        width: 100% !important;
        height: 80px !important;
        min-height: 80px !important;
        max-height: none !important;
        z-index: 10 !important;
        pointer-events: none !important;
        overflow: visible !important;
        visibility: visible !important;
        opacity: 1 !important;
        background-image: url(https://www.dropbox.com/s/v9lpxcfepsvin60/b-head-decor_newyear.png?raw=1) !important;
        background-size: auto 80px !important;
        background-repeat: repeat-x !important;
        background-position: 0 0 !important;
        background-attachment: scroll !important;
        background-color: transparent !important;
        margin: 0 !important;
        padding: 0 !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
    }
    
    body.newyear-mode .newyear-garland,
    body.newyear-mode #newyear-garland,
    body.newyear-mode i.newyear-garland {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: relative !important;
        width: 100% !important;
        height: 80px !important;
        min-height: 80px !important;
    }
    
    .newyear-garland__inner {
        width: 100% !important;
        height: 80px !important;
        min-height: 80px !important;
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .newyear-garland__inner:first-child {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        height: 80px !important;
        min-height: 80px !important;
    }
    
    .newyear-garland__inner_n2,
    .newyear-garland__inner_n3,
    .newyear-garland__inner_n4,
    .newyear-garland__inner_n5,
    .newyear-garland__inner_n6,
    .newyear-garland__inner_n7 {
        left: 0 !important;
        top: 0 !important;
        display: none !important;
    }
    
    .newyear-ball {
        display: block !important;
        visibility: visible !important;
        position: absolute !important;
    }
    
    .newyear-ball__i {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: absolute !important;
        width: 100% !important;
        height: 100% !important;
        background-size: contain !important;
        background-position: center !important;
        background-repeat: no-repeat !important;
    }
    
    .newyear-ball_n1,
    .newyear-ball_n2,
    .newyear-ball_n3,
    .newyear-ball_n4,
    .newyear-ball_n5,
    .newyear-ball_n6,
    .newyear-ball_n7,
    .newyear-ball_n8,
    .newyear-ball_n9 {
        transform: scale(0.7) !important;
        transform-origin: top left !important;
    }
    
    .newyear-ball_i1,
    .newyear-ball_i2,
    .newyear-ball_i3,
    .newyear-ball_i4,
    .newyear-ball_i5,
    .newyear-ball_i6 {
        transform: scale(0.7) !important;
        transform-origin: top left !important;
    }
    
    .newyear-ball_n1 .newyear-ball__i,
    .newyear-ball_n2 .newyear-ball__i,
    .newyear-ball_n3 .newyear-ball__i,
    .newyear-ball_n4 .newyear-ball__i,
    .newyear-ball_n5 .newyear-ball__i,
    .newyear-ball_n6 .newyear-ball__i,
    .newyear-ball_n7 .newyear-ball__i,
    .newyear-ball_n8 .newyear-ball__i,
    .newyear-ball_n9 .newyear-ball__i,
    .newyear-ball_i1 .newyear-ball__i,
    .newyear-ball_i2 .newyear-ball__i,
    .newyear-ball_i3 .newyear-ball__i,
    .newyear-ball_i4 .newyear-ball__i,
    .newyear-ball_i5 .newyear-ball__i,
    .newyear-ball_i6 .newyear-ball__i {
        background-size: contain !important;
        background-position: center !important;
        background-repeat: no-repeat !important;
    }
    
    .newyear-snow-container {
        display: block !important;
        position: fixed !important;
        z-index: -1 !important;
        pointer-events: none !important;
    }
    
    body.newyear-mode .newyear-snow-container {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .newyear-decorations {
        display: block !important;
        position: fixed !important;
        z-index: -1 !important;
        pointer-events: none !important;
    }
    
    body.newyear-mode .newyear-decorations {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .newyear-decoration {
        display: block !important;
        visibility: visible !important;
        opacity: 0.7 !important;
    }
}

