.back-to-top {
    position: fixed;
    right: max(20px, env(safe-area-inset-right));
    bottom: max(20px, env(safe-area-inset-bottom));
    z-index: 15;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    width: 48px;
    height: 52px;
    padding: 6px;
    border: 1px solid var(--color-primary);
    border-radius: 4px;
    background: #fff;
    color: var(--color-primary);
    font: inherit;
    cursor: pointer;
    transition: background 150ms ease;
}
.back-to-top[hidden] { display: none; }
.back-to-top span { font-size: 10px; font-weight: 600; line-height: 1; letter-spacing: .06em; }
.back-to-top:hover { background: var(--color-soft-blue); }
.back-to-top:active { transform: translateY(1px); }
.back-to-top:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
@media (max-width: 640px) { .back-to-top { right: max(14px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); width: 44px; height: 48px; } }
@media (prefers-reduced-motion: reduce) { .back-to-top { transition: none; } }
