/* ================= 全站底部快捷导航 ================= */
:root { --bn-h: 58px; }

/* 页面底部留出导航高度，避免遮挡内容 */
body.has-bottom-nav {
    box-sizing: border-box;
    padding-bottom: calc(var(--bn-h) + env(safe-area-inset-bottom));
}
body.has-bottom-nav .app {
    height: calc(100dvh - var(--bn-h) - env(safe-area-inset-bottom));
}
body.has-bottom-nav .layout { min-height: calc(100vh - var(--bn-h)); }
body.has-bottom-nav .auth-wrap {
    min-height: calc(100dvh - var(--bn-h) - env(safe-area-inset-bottom));
}

.bottom-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    height: calc(var(--bn-h) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    display: flex; align-items: stretch;
    background: rgba(255, 255, 255, .96);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border-top: 1px solid #e6e6e6;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, .05);
}
.bn-item {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    border: 0; background: transparent; color: #5b5b5b;
    font-size: 11px; font-family: inherit; line-height: 1;
    text-decoration: none; cursor: pointer; padding: 0;
    -webkit-user-select: none; user-select: none;
    transition: color .12s, background .12s;
}
.bn-item svg {
    width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8;
    stroke-linecap: round; stroke-linejoin: round;
}
.bn-item:hover { color: #07c160; background: #f4f6f5; }
.bn-item:active { background: #eceeed; }

@media (max-width: 640px) {
    /* 移动端 toast 原本贴底，抬到导航上方 */
    body.has-bottom-nav .toast-wrap {
        top: auto;
        bottom: calc(var(--bn-h) + 16px + env(safe-area-inset-bottom));
    }
    /* 进入聊天时隐藏底栏，避免被软键盘顶起遮挡输入框 */
    /* 聊天页与其它页面一致，保留底部导航；整体高度略收窄 */
    :root { --bn-h: 52px; }
}
