/* member_center tabbar — 移动端底部Tab + 右侧悬浮栏（复刻子比 footer-tabbar / float-right） */

.mcenter-tabbar,
.mcenter-float {
    --tb-bg: #ffffff;
    --tb-bg-soft: rgba(255, 255, 255, .86);
    --tb-muted: #8b92a3;
    --tb-focus: var(--primary, #333);
    --tb-shadow: rgba(18, 22, 33, .06);
    --tb-shadow-lg: rgba(15, 23, 42, .14);
    --tb-highlight: rgba(255, 255, 255, .72);
    --tb-soft: rgba(15, 23, 42, .045);
    --tb-line: rgba(15, 23, 42, .07);
    --tb-radius: 8px;
    --tb-h: 52px;
}
html[data-theme="dark"] .mcenter-tabbar,
html[data-theme="dark"] .mcenter-float {
    --tb-bg: #23262e;
    --tb-bg-soft: rgba(35, 38, 46, .88);
    --tb-muted: #7a8296;
    --tb-shadow: rgba(0, 0, 0, .3);
    --tb-shadow-lg: rgba(0, 0, 0, .5);
    --tb-highlight: rgba(255, 255, 255, .06);
    --tb-soft: rgba(255, 255, 255, .06);
    --tb-line: rgba(255, 255, 255, .09);
}

/* ---- 底部 TabBar：悬浮胶囊容器 ---- */
.footer-tabbar.mcenter-tabbar {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(8px + constant(safe-area-inset-bottom));
    bottom: calc(8px + env(safe-area-inset-bottom));
    width: min(560px, calc(100% - 20px));
    margin: 0 auto;
    z-index: 1035;
    justify-content: space-around;
    align-items: center;
    text-align: center;
    padding: 5px 6px;
    background: var(--tb-bg);
    background: var(--tb-bg-soft);
    border: 1px solid var(--tb-line);
    border-radius: 18px;
    box-shadow: 0 10px 30px var(--tb-shadow-lg), inset 0 1px 0 var(--tb-highlight);
    -webkit-backdrop-filter: saturate(1.6) blur(18px);
    backdrop-filter: saturate(1.6) blur(18px);
    transition: transform .3s cubic-bezier(.32, .72, 0, 1);
}
.scroll-down .footer-tabbar.mcenter-tabbar.scroll-down-hide {
    transform: translateY(calc(100% + 24px));
}
.mcenter-tabbar .tabbar-item {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    min-height: var(--tb-h);
    padding: 5px 2px 4px;
    margin: 0 1px;
    border-radius: 13px;
    color: var(--tb-muted);
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition: color .18s ease, background-color .18s ease;
}
.mcenter-tabbar .tabbar-item:active { background: var(--tb-soft); }
/* 选中态：浅主色胶囊底板 + 主色文字 */
.mcenter-tabbar .tabbar-item.tabbar-cur,
.mcenter-tabbar .tabbar-item.is-done {
    color: var(--tb-focus);
    background: var(--tb-soft);
    background: color-mix(in srgb, var(--tb-focus) 11%, transparent);
}
.mcenter-tabbar .tabbar-item.tabbar-cur text { font-weight: 700; }
.mcenter-tabbar .tabbar-item.actived {
    color: var(--tb-focus);
}
.mcenter-tabbar .tabbar-item > icon,
.mcenter-tabbar .tabbar-item > svg {
    position: relative;
    width: 22px;
    height: 22px;
    line-height: 1;
    transition: transform .12s ease;
}
.mcenter-tabbar .tabbar-item icon svg {
    width: 22px;
    height: 22px;
    display: block;
    margin: 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.mcenter-tabbar .tabbar-item icon img.mcenter-tb-img {
    width: 22px;
    height: 22px;
    display: block;
    margin: 0 auto;
    object-fit: cover;
    border-radius: 5px;
}
.mcenter-tabbar .tabbar-item icon .mcenter-tb-emoji {
    display: block;
    width: 22px;
    height: 22px;
    line-height: 22px;
    font-size: 18px;
    text-align: center;
}
.mcenter-tabbar .tabbar-item:active icon { transform: scale(.9); }
.mcenter-tabbar text {
    width: 100%;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: .01em;
    margin-top: 3px;
}
.mcenter-tabbar badge {
    position: absolute;
    top: 6px;
    left: 50%;
    margin-left: 6px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: var(--red, #ef4444);
    color: #fff;
    font-size: 10px;
    font-style: normal;
    font-weight: 600;
    line-height: 16px;
    text-align: center;
    white-space: nowrap;
    pointer-events: none;
}
.mcenter-tabbar .tabbar-item icon count {
    position: absolute;
    top: -5px;
    left: 50%;
    margin-left: 4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: var(--tb-muted);
    color: #fff;
    border-radius: 8px;
    font-size: 10px;
    line-height: 16px;
    text-align: center;
    white-space: nowrap;
    pointer-events: none;
}

/* 首页位 + 回顶切换（子比 tabbar-ontop） */
.mcenter-tabbar .tabbar-ontop { padding: 0; }
.mcenter-tabbar .tabbar-ontop > a.tabbar-home {
    position: static;
    width: 100%;
}
.mcenter-tabbar .tabbar-ontop .ontop {
    position: absolute;
    left: 0;
    right: 0;
    transform: translateY(calc(var(--tb-h) + 6px));
    transition: transform .25s cubic-bezier(.32, .72, 0, 1);
}
.mcenter-tabbar .tabbar-ontop .ontop.show {
    transform: translateY(0);
}
.mcenter-tabbar .tabbar-ontop .ontop.show + a {
    transform: translateY(calc(-1 * (var(--tb-h) + 6px)));
    transition: transform .25s cubic-bezier(.32, .72, 0, 1);
}

/* 文章页动作组（子比 single-action-tabbar / single-pay-tabbar） */
.mcenter-tabbar .single-action-tabbar {
    flex: 1 1 0;
    min-width: 0;
    margin: 0;
}
.mcenter-tabbar .single-action-tabbar.is-done {
    color: var(--tb-focus);
}
.mcenter-tabbar .single-action-tabbar.is-done icon svg {
    fill: currentColor;
    fill-opacity: .18;
}
.mcenter-tabbar .single-pay-tabbar {
    background: var(--tb-focus);
    background: linear-gradient(135deg, color-mix(in srgb, var(--tb-focus) 84%, #fff), var(--tb-focus));
    color: #fff;
    min-height: 40px;
    padding: 0 15px;
    flex: 0 0 auto;
    gap: 3px;
    margin: 0 4px;
    border: 0;
    border-radius: 100px;
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .02em;
    line-height: 1;
    box-shadow: 0 6px 16px color-mix(in srgb, var(--tb-focus) 30%, transparent), inset 0 1px 0 rgba(255, 255, 255, .28);
    cursor: pointer;
    transition: transform .14s ease, box-shadow .14s ease;
}
.mcenter-tabbar .single-pay-tabbar::after {
    content: "";
    display: block;
    width: 5px;
    height: 5px;
    margin-left: 1px;
    border-top: 1.6px solid rgba(255, 255, 255, .9);
    border-right: 1.6px solid rgba(255, 255, 255, .9);
    transform: rotate(45deg);
}
@media (hover: hover) {
    .mcenter-tabbar .single-pay-tabbar:hover { filter: brightness(1.04); }
}
.mcenter-tabbar .single-pay-tabbar:active {
    transform: scale(.96);
    box-shadow: 0 3px 8px color-mix(in srgb, var(--tb-focus) 24%, transparent), inset 0 1px 0 rgba(255, 255, 255, .2);
}

/* 移动端显示 */
@media (max-width: 768px) {
    .footer-tabbar.mcenter-tabbar {
        display: flex;
    }
    .footer-tabbar-placeholder {
        height: calc(78px + constant(safe-area-inset-bottom));
        height: calc(78px + env(safe-area-inset-bottom));
    }
    body.mcenter-has-tabbar {
        /* 占位由 placeholder 承担，此处仅标记 */
    }
}
.footer-tabbar-placeholder {
    display: none;
}
@media (max-width: 768px) {
    .footer-tabbar-placeholder {
        display: block;
    }
}

/* ---- 右侧悬浮工具栏（子比 float-right） ---- */
.float-right.mcenter-float {
    position: fixed;
    bottom: calc(76px + constant(safe-area-inset-bottom));
    bottom: calc(76px + env(safe-area-inset-bottom));
    right: 16px;
    z-index: 1030;
    text-align: center;
    transition: 0.3s;
}
.scroll-down .scroll-down-hide.float-right,
.scroll-ing .scrolling-hide.float-right {
    transform: translateX(200%);
}
.mcenter-float .float-btn {
    width: 40px;
    min-height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 7px 0;
    position: relative;
    background: var(--tb-bg);
    border: 1px solid var(--tb-shadow);
    border-radius: 10px;
    color: var(--tb-muted) !important;
    text-decoration: none !important;
    cursor: pointer;
    margin-top: 6px;
    box-shadow: 0 2px 8px var(--tb-shadow);
}
.mcenter-float .float-btn:first-child {
    margin-top: 0;
}
.mcenter-float .float-btn svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.mcenter-float .float-btn img.mcenter-tb-img {
    width: 19px;
    height: 19px;
    object-fit: cover;
    border-radius: 4px;
}
.mcenter-float .float-btn .mcenter-tb-emoji {
    font-size: 17px;
    line-height: 1;
}
.mcenter-float .float-btn:hover {
    color: var(--tb-focus) !important;
}
.mcenter-float .float-btn.ontop {
    display: none;
}
.mcenter-float .float-btn.ontop.show {
    display: flex;
    animation: mcenterFloatIn .3s ease-out;
}
@keyframes mcenterFloatIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* hover 弹出气泡（子比 hover-show-con） */
.mcenter-float .hover-show {
    position: relative;
}
.mcenter-float .hover-show-con {
    position: absolute;
    right: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    min-width: 120px;
    padding: 10px 14px;
    background: var(--tb-bg);
    border: 1px solid var(--tb-shadow);
    border-radius: 10px;
    box-shadow: 0 4px 14px var(--tb-shadow);
    font-size: .82rem;
    color: var(--tb-focus);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: .2s;
}
.mcenter-float .hover-show-con::after {
    content: "";
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-left-color: var(--tb-bg);
}
.mcenter-float .hover-show-con img {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}
.mcenter-float .hover-show:hover .hover-show-con,
.mcenter-float .hover-show:focus .hover-show-con,
.mcenter-float .hover-show:focus-within .hover-show-con {
    opacity: 1;
    visibility: visible;
}
/* 移动端无 hover：点按切换 */
.mcenter-float .hover-show.open .hover-show-con {
    opacity: 1;
    visibility: visible;
}
