html {
    scroll-behavior: smooth;
}

.top_button {
    align-items: center;
    background: #243238;
    border-radius: 50%;
    bottom: 20px;
    color: #fff;
    display: flex;
    height: 42px;
    justify-content: center;
    line-height: 1;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    right: 20px;
    text-align: center;
    text-decoration: none;
    transform: translateY(10px);
    transition: opacity .2s ease, transform .2s ease, background-color .2s ease;
    visibility: hidden;
    width: 42px;
    z-index: 9998;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

.top_button.is-visible {
    display: flex;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    visibility: visible;
}

.top_button span {
    display: block;
    font-size: 22px;
    font-weight: 600;
    line-height: 1;
}

.top_button:hover,
.top_button:focus {
    background-color: #BE1A1A;
    color: #fff;
    text-decoration: none;
}

@media (max-width: 767px) {
    .top_button {
        bottom: calc(100px + env(safe-area-inset-bottom));
        right: 14px;
    }
}
