/* ============================================================
   全局快速滚动悬浮按钮（回顶部 / 去底部）—— 2026-10-12 统一组件
   全前台页面通用（base.html 注入，pjax 容器外，换页不重建）。
   滚动超过 40px 才出现；两个独立按钮比旧的单切换箭头更直观醒目。
   ============================================================ */
.page-scroll-fab {
    position: fixed;
    right: 22px;
    bottom: 26px;
    z-index: 60;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-end;
}
.page-scroll-fab[hidden] { display: none; }

.scroll-fab-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    /* 强调色实心底：浅色主题用白字（已验证对比达标），深色主题回 --color-accent-ink */
    background: var(--color-accent);
    color: var(--color-text-invert);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
    transition: transform .15s ease, box-shadow .15s ease, background-color .2s ease;
    -webkit-tap-highlight-color: transparent;
    padding: 0;
}
.scroll-fab-btn svg { width: 22px; height: 22px; display: block; }
.scroll-fab-btn:hover {
    transform: translateY(-2px) scale(1.06);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .24);
}
.scroll-fab-btn:active { transform: scale(.94); }
[data-theme="dark"] .scroll-fab-btn { color: var(--color-accent-ink); }

/* 移动端：避开底部主导航条（.app-bottomnav 约 56px 高），避免遮挡 */
@media (max-width: 768px) {
    .page-scroll-fab { right: 14px; bottom: 72px; gap: 10px; }
    .scroll-fab-btn { width: 42px; height: 42px; }
    .scroll-fab-btn svg { width: 20px; height: 20px; }
}
