.back-to-top {
    position: fixed;
    right: max(20px, env(safe-area-inset-right));
    bottom: max(24px, env(safe-area-inset-bottom));
    z-index: 1020;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 14px;
    background: var(--program-primary-color, #6658dd);
    color: var(--program-primary-text-color, #fff);
    box-shadow: 0 4px 16px rgb(20 30 50 / 18%);
    cursor: pointer;
    transition: background-color .15s, box-shadow .15s;
}
.back-to-top[hidden] { display: none; }
.back-to-top:hover {
    background: var(--program-primary-color-hover, #5548c4);
    box-shadow: 0 6px 20px rgb(20 30 50 / 24%);
}
.back-to-top:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
@media (max-width: 767.98px) {
    .back-to-top {
        right: max(14px, env(safe-area-inset-right));
        bottom: max(16px, env(safe-area-inset-bottom));
        width: 44px;
        height: 44px;
        border-radius: 12px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .back-to-top { transition: none; }
}
