/**
 * 手机端底部悬浮导航（壁纸 / 专题 / 标签）
 * v4.14.0
 *
 * 只在 <=767.98px 显示；桌面、平板不输出视觉。
 * 不覆盖父主题模板，fixed 定位不参与文档流，故不影响 CLS。
 */

.mc-tabbar {
    display: none;
}

@media (max-width: 767.98px) {

    /* 给页面底部留出 tab 高度，避免遮住「加载更多」/ 分页 / 页脚 */
    body {
        padding-bottom: calc(86px + env(safe-area-inset-bottom)) !important;
    }

    .mc-tabbar {
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: calc(10px + env(safe-area-inset-bottom));
        z-index: 9990;
        display: flex;
        align-items: stretch;
        height: 58px;
        padding: 4px;
        box-sizing: border-box;
        border-radius: 18px;
        border: 1px solid #eef0f4;
        background: rgba(255, 255, 255, .94);
        -webkit-backdrop-filter: saturate(180%) blur(14px);
        backdrop-filter: saturate(180%) blur(14px);
        box-shadow: 0 10px 30px -14px rgba(16, 24, 40, .22);
        font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
        -webkit-tap-highlight-color: transparent;
    }

    .mc-tabbar__item {
        flex: 1 1 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        min-width: 0;
        border-radius: 14px;
        color: #8a9099;
        text-decoration: none;
        transition: color .18s ease, background-color .18s ease;
    }

    .mc-tabbar__item:active {
        background: rgba(0, 0, 0, .03);
    }

    .mc-tabbar__icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 34px;
        height: 22px;
        border-radius: 9px;
        transition: background-color .18s ease;
    }

    .mc-tabbar__icon svg {
        width: 21px;
        height: 21px;
        display: block;
    }

    .mc-tabbar__label {
        font-size: 10px;
        line-height: 1;
        letter-spacing: 0;
        white-space: nowrap;
    }

    .mc-tabbar__item.is-active {
        color: #fa4d4e;
    }

    .mc-tabbar__item.is-active .mc-tabbar__icon {
        background: #fff1f1;
    }

    .mc-tabbar__item.is-active .mc-tabbar__label {
        font-weight: 600;
    }

    .mc-tabbar__item:focus-visible {
        outline: 2px solid #fa4d4e;
        outline-offset: 2px;
    }
}

/* 暗色（父主题：html[data-bs-theme="dark"]） */
@media (max-width: 767.98px) {
    html[data-bs-theme="dark"] .mc-tabbar {
        background: rgba(26, 28, 32, .94);
        border-color: rgba(255, 255, 255, .08);
        box-shadow: 0 10px 30px -14px rgba(0, 0, 0, .6);
    }

    html[data-bs-theme="dark"] .mc-tabbar__item {
        color: #8b939e;
    }

    html[data-bs-theme="dark"] .mc-tabbar__item.is-active {
        color: #ff6f70;
    }

    html[data-bs-theme="dark"] .mc-tabbar__item.is-active .mc-tabbar__icon {
        background: rgba(250, 77, 78, .16);
    }
}
