/* Кнопка «Наверх»: снизу слева, в стиле d4.by */
#scroll-to-top.scroll-to-top {
    position: fixed;
    z-index: 9990;
    left: max(16px, env(safe-area-inset-left, 16px));
    bottom: max(20px, env(safe-area-inset-bottom, 20px));
    width: 46px;
    height: 46px;
    padding: 0;
    margin: 0;
    border: 1px solid #d9e3ea;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 4px 18px rgba(44, 61, 81, 0.18);
    color: #2C3D51;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s ease,
        background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

#scroll-to-top.scroll-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#scroll-to-top.scroll-to-top:hover,
#scroll-to-top.scroll-to-top:focus {
    background: #fbb005;
    border-color: #e0a000;
    color: #2C3D51;
    box-shadow: 0 6px 22px rgba(44, 61, 81, 0.22);
    outline: none;
}

#scroll-to-top.scroll-to-top:focus-visible {
    outline: 2px solid #1C7ED6;
    outline-offset: 2px;
}

.scroll-to-top__icon {
    font-size: 20px;
    line-height: 1;
    font-weight: 700;
    display: block;
    margin-top: -2px;
}

@media (max-width: 767px) {
    #scroll-to-top.scroll-to-top {
        width: 44px;
        height: 44px;
        left: max(12px, env(safe-area-inset-left, 12px));
        bottom: max(18px, env(safe-area-inset-bottom, 18px));
    }

    .scroll-to-top__icon {
        font-size: 19px;
    }
}
