/* 底部固定导航（详情页等轻量页面单独引用；首页规则仍含在 home.css） */
.bottom-nav-spacer {
    height: calc(78px + env(safe-area-inset-bottom, 0px));
    flex-shrink: 0;
}
.bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    padding: 8px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    pointer-events: none;
}
.bottom-nav-inner {
    max-width: 480px;
    margin: 0 auto;
    background: rgba(15, 23, 42, 0.45);
    -webkit-backdrop-filter: var(--st-glass-frost, blur(24px) saturate(1.42));
    backdrop-filter: var(--st-glass-frost, blur(24px) saturate(1.42));
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 22px 48px rgba(2, 8, 24, 0.55), var(--st-glass-inset, inset 0 1px 0 rgba(255, 255, 255, 0.06));
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    pointer-events: auto;
}
body.has-bottom-nav .crisp-client {
    --crisp-bottom-offset: calc(88px + env(safe-area-inset-bottom, 0px));
}
.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    text-decoration: none;
    color: var(--st-text-muted, #94a3b8);
    font-size: 11px;
    min-height: 44px;
    padding: 2px 4px;
}
.bottom-nav-item-icon {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5f5;
    margin-bottom: 1px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}
.bottom-nav-item.active .bottom-nav-item-icon {
    background: linear-gradient(135deg, rgba(125, 211, 252, 0.85), rgba(56, 189, 248, 0.65));
    color: #0f172a;
    border-color: rgba(255, 255, 255, 0.2);
}
.bottom-nav-item.active {
    color: #e5f7ff;
}
.theme-light .bottom-nav-inner {
    background: rgba(255, 255, 255, 0.13);
    -webkit-backdrop-filter: var(--st-glass-frost-md, blur(18px) saturate(1.38));
    backdrop-filter: var(--st-glass-frost-md, blur(18px) saturate(1.38));
    border-color: var(--st-card-border, rgba(255, 255, 255, 0.12));
    box-shadow: 0 16px 34px rgba(60, 80, 120, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.26);
}
.theme-light .bottom-nav-item {
    color: #64748b;
}
.theme-light .bottom-nav-item.active .bottom-nav-item-icon {
    background: #111827;
    color: #f8fafc;
    border-color: rgba(15, 23, 42, 0.35);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.22);
}
.theme-light .bottom-nav-item.active {
    color: #111827;
}
.theme-light .bottom-nav-item-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #0f172a;
    border-color: rgba(255, 255, 255, 0.14);
}
@media (min-width: 640px) {
    .bottom-nav-spacer {
        height: calc(86px + env(safe-area-inset-bottom, 0px));
    }
}
@media (min-width: 768px) {
    .bottom-nav-inner {
        max-width: 720px;
    }
}

/* Keep the standalone detail-page navigation aligned with the selected site
   theme as well as the homepage navigation. */
html.site-theme-dark .bottom-nav-inner,
html.site-theme-muted .bottom-nav-inner,
html.site-theme-grid .bottom-nav-inner,
html.site-theme-gradient .bottom-nav-inner,
html.site-theme-fluid .bottom-nav-inner {
    background: var(--st-admin-panel, var(--st-card-bg)) !important;
    border-color: var(--st-card-border) !important;
    box-shadow: var(--st-shadow-sm) !important;
}
html.site-theme-dark .bottom-nav-item-icon,
html.site-theme-muted .bottom-nav-item-icon,
html.site-theme-grid .bottom-nav-item-icon,
html.site-theme-gradient .bottom-nav-item-icon,
html.site-theme-fluid .bottom-nav-item-icon {
    background: var(--st-surface-bg) !important;
    color: var(--st-text-muted) !important;
    border-color: var(--st-surface-border) !important;
}
html.site-theme-dark .bottom-nav-item.active,
html.site-theme-muted .bottom-nav-item.active,
html.site-theme-grid .bottom-nav-item.active,
html.site-theme-gradient .bottom-nav-item.active,
html.site-theme-fluid .bottom-nav-item.active {
    color: var(--st-accent) !important;
}
html.site-theme-dark .bottom-nav-item.active .bottom-nav-item-icon,
html.site-theme-muted .bottom-nav-item.active .bottom-nav-item-icon,
html.site-theme-grid .bottom-nav-item.active .bottom-nav-item-icon,
html.site-theme-gradient .bottom-nav-item.active .bottom-nav-item-icon,
html.site-theme-fluid .bottom-nav-item.active .bottom-nav-item-icon {
    background: var(--st-accent) !important;
    color: var(--st-action-fg) !important;
    border-color: var(--st-accent) !important;
}
