/* 全站体验：顶部加载进度条、回到顶部 / 底部、手机端快速新建（逻辑见 static/js/site-ux.js） */
#siteLoadBar { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 2147483000; pointer-events: none; opacity: 0; transition: opacity .25s; overflow: hidden; }
#siteLoadBar.on { opacity: 1; }
#siteLoadBar::before { content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 40%; border-radius: 3px;
    background: linear-gradient(90deg, rgba(22, 163, 74, 0), #16a34a, #15803d); animation: siteLoad 1.1s ease-in-out infinite; }
@keyframes siteLoad { 0% { left: -40%; } 100% { left: 100%; } }
@media (prefers-reduced-motion: reduce) { #siteLoadBar::before { animation: none; left: 0; width: 100%; opacity: .6; } }

.site-scroll-nav { position: fixed; right: 16px; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 40; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.site-scroll-nav button { width: 38px; height: 38px; border-radius: 999px; display: flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, .92); color: #4b5563; border: 1px solid #e5e7eb; box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
    opacity: 0; transform: scale(.8); pointer-events: none; transition: opacity .2s, transform .2s; cursor: pointer; }
.site-scroll-nav button.show { opacity: 1; transform: scale(1); pointer-events: auto; }
.site-scroll-nav button:hover { color: #16a34a; }
.site-scroll-nav svg { width: 18px; height: 18px; }
.site-scroll-nav .site-fab { width: 52px; height: 52px; background: #16a34a; color: #fff; border: 0; box-shadow: 0 8px 20px rgba(22, 163, 74, .35); opacity: 1; transform: none; pointer-events: auto; }
.site-scroll-nav .site-fab:hover { color: #fff; background: #15803d; }
.site-scroll-nav .site-fab svg { width: 22px; height: 22px; }
@media (min-width: 768px) { .site-scroll-nav .site-fab { display: none; } }
@media (max-width: 767px) { body.has-site-fab { padding-bottom: 84px; } }
html.dark .site-scroll-nav button:not(.site-fab) { background: rgba(15, 23, 42, .92); color: #9ca3af; border-color: #1f2937; }
@media print { #siteLoadBar, .site-scroll-nav { display: none !important; } }

/* 各页面「操作结果」提示（保存成功 / 失败…）始终在站内通知卡片（#hub-toast-stack，z-index 99998）之上：
   刚点的操作的反馈不能被后台推来的通知盖住。仍在顶部加载条之下。 */
#toastContainer, #toast-container, #toast, .wl-toast { z-index: 2147482000 !important; }
/* 站内通知卡片（#hub-toast-stack）平时在最上层；有弹窗 / 表单打开时（modal-lock.js 给 html 加 modal-scroll-locked）
   退到遮罩下面，不再盖住正在填写的内容（手机上卡片几乎和屏幕一样宽，会挡住整个表单）。8 秒后照常自动消失。 */
html.modal-scroll-locked #hub-toast-stack { z-index: 1 !important; }
