.homepage-back-to-top {
    position: fixed;
    right: 24px;
    bottom: max(24px, env(safe-area-inset-bottom, 0px));
    z-index: 90;
    display: flex;
    width: 46px;
    height: 46px;
    min-height: 0;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid #850000;
    border-radius: 50%;
    background: #990000;
    color: #fffaf4;
    box-shadow: 0 3px 10px rgba(70, 0, 0, 0.16);
    cursor: pointer;
    transition: border-color 0.18s ease, background-color 0.18s ease;
}

.homepage-back-to-top[hidden],
.homepage-back-to-top span {
    display: none;
}

.homepage-back-to-top svg {
    width: 24px;
    height: 24px;
    stroke-width: 1.8;
}

.homepage-back-to-top:hover {
    border-color: #fffaf4;
    background: #740000;
}

.homepage-back-to-top:focus-visible {
    outline: 2px solid #990000;
    outline-offset: 3px;
}

@media (max-width: 600px) {
    .homepage-back-to-top {
        right: 14px;
        bottom: max(16px, env(safe-area-inset-bottom, 0px));
        width: 44px;
        height: 44px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .homepage-back-to-top {
        transition: none;
    }
}
