/* 首页顶栏（#header-top.wb-header-tv）— PC / 移动端同一套布局 */

body.wb-video-home {
    --wb-header-tv-bar-height: 44px;
    --wb-header-tv-nav-height: 40px;
    --wb-header-tv-gutter: 10px;
    --wb-header-tv-edge: 6px;
    --wb-header-tv-text: #000;
    --wb-header-tv-muted: #5c5c5c;
    --wb-header-tv-search-bg: #f2f2f2;
    --wb-header-tv-app-bg: #f2f2f2;
    --myui-header-height: calc(var(--wb-header-tv-bar-height) + var(--wb-header-tv-nav-height));
}

#header-top.wb-header-tv {
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    transform: none !important;
    height: auto !important;
    min-height: var(--myui-header-height) !important;
    background: #fff !important;
    padding: 0 !important;
}

html.theme-dark #header-top.wb-header-tv {
    --wb-header-tv-text: #f8fafc;
    --wb-header-tv-muted: #cbd5e1;
    --wb-header-tv-search-bg: rgba(255, 255, 255, 0.1);
    --wb-header-tv-app-bg: rgba(255, 255, 255, 0.12);
    background: #121826 !important;
}

html.theme-dark #header-top.wb-header-tv .wb-header-tv__search-icon {
    color: #6b7280;
}

#header-top.wb-header-tv > .container {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

#header-top.wb-header-tv .wb-header-tv__bar {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    height: var(--wb-header-tv-bar-height);
    padding-left: var(--wb-header-tv-gutter);
    padding-right: var(--wb-header-tv-edge);
    box-sizing: border-box;
}

#header-top.wb-header-tv .wb-header-tv__menu {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--wb-header-tv-text);
    text-decoration: none !important;
    -webkit-tap-highlight-color: transparent;
}

#header-top.wb-header-tv .wb-header-tv__menu .fa {
    font-size: 18px;
    line-height: 1;
}

#header-top.wb-header-tv .wb-header-tv__menu:active {
    opacity: .72;
}

#header-top.wb-header-tv .wb-header-tv__logo {
    flex: 0 0 auto;
    min-width: 0;
}

#header-top.wb-header-tv .wb-header-tv__logo-link {
    display: flex;
    align-items: center;
    height: var(--wb-header-tv-bar-height);
}

#header-top.wb-header-tv .wb-header-tv__logo-img {
    display: block;
    height: 30px;
    max-width: 130px;
    width: auto;
    object-fit: contain;
}

#header-top.wb-header-tv .wb-header-tv__search {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    height: 32px;
    margin: 0;
    padding: 0 12px 0 14px;
    border-radius: 999px;
    background: var(--wb-header-tv-search-bg) !important;
    color: var(--wb-header-tv-text) !important;
    text-decoration: none !important;
    border: 0;
    box-shadow: none;
    box-sizing: border-box;
}

#header-top.wb-header-tv .wb-header-tv__search-text {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    line-height: 1;
    color: var(--wb-header-tv-muted) !important;
}

#header-top.wb-header-tv .wb-header-tv__search-icon {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    color: #bbb;
}

#header-top.wb-header-tv .wb-header-tv__actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-left: auto;
}

#header-top.wb-header-tv .wb-header-tv__menu,
#header-top.wb-header-tv .wb-header-tv__app {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    margin: 0;
    padding: 0;
    line-height: 1;
    color: var(--wb-header-tv-text) !important;
    text-decoration: none !important;
    background: transparent;
    border: 0;
    box-shadow: none;
    white-space: nowrap;
}

#header-top.wb-header-tv .wb-header-tv__actions .wb-header-tv__menu {
    width: 32px;
    height: 32px;
}

#header-top.wb-header-tv .wb-header-tv__app {
    padding: 0 12px;
    border-radius: 999px;
    background: var(--wb-header-tv-app-bg) !important;
    font-size: 12px;
}

#header-top.wb-header-tv .wb-header-tv__nav {
    position: relative;
}

#header-top.wb-header-tv .wb-header-tv__nav-row {
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
    height: var(--wb-header-tv-nav-height);
    min-height: var(--wb-header-tv-nav-height);
    padding-left: var(--wb-header-tv-gutter);
    padding-right: var(--wb-header-tv-edge);
    box-sizing: border-box;
}

#header-top.wb-header-tv .wb-header-tv__nav-inner {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-right: 4px;
    position: relative;
}

#header-top.wb-header-tv .wb-header-tv__nav-inner::-webkit-scrollbar {
    display: none;
}

#header-top.wb-header-tv .wb-header-tv__nav-toggle {
    position: relative;
    flex: 0 0 32px;
    width: 32px;
    min-width: 32px;
    height: 32px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--wb-header-tv-text);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

#header-top.wb-header-tv .wb-header-tv__nav-toggle:active {
    opacity: .72;
}

html.theme-dark #header-top.wb-header-tv .wb-header-tv__nav-toggle {
    background: transparent;
}

#header-top.wb-header-tv .wb-header-tv__nav-toggle-ico {
    font-size: 20px;
    line-height: 1;
    transition: transform .2s ease;
}

#header-top.wb-header-tv .wb-header-tv__nav.is-expanded .wb-header-tv__nav-toggle-ico {
    transform: rotate(180deg);
}

#header-top.wb-header-tv .wb-header-tv__nav-panel {
    position: fixed;
    top: 0;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    z-index: 100100;
    width: 100%;
    max-width: var(--wb-app-shell-max, 960px);
    height: 100vh;
    height: 100dvh;
    padding: 0;
    border: 0;
    background: #fff;
    box-shadow: 0 0 40px rgba(15, 23, 42, .16);
    box-sizing: border-box;
    overflow: hidden;
}

html.theme-dark #header-top.wb-header-tv .wb-header-tv__nav-panel {
    background: #07090f;
    box-shadow: 0 0 40px rgba(0, 0, 0, .42);
}

#header-top.wb-header-tv .wb-header-tv__nav.is-expanded .wb-header-tv__nav-row {
    display: none;
}

/* 展开面板：规整网格 + 小字号 */
#header-top.wb-header-tv .wb-header-tv__nav-sheet {
    display: flex;
    flex-direction: column;
    gap: 0;
    height: 100%;
    min-height: 0;
}

body.wb-category-nav-open {
    overflow: hidden !important;
}

body.wb-category-nav-open .myui-nav__tabbar.wb-bottom-tabbar,
body.wb-category-nav-open #f_bottom,
body.wb-category-nav-open #f_top_dingbu {
    display: none !important;
}

#header-top.wb-header-tv .wb-header-tv__category-head {
    position: relative;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    align-items: center;
    flex: 0 0 auto;
    min-height: calc(54px + env(safe-area-inset-top, 0px));
    padding: env(safe-area-inset-top, 0px) 8px 0;
    border-bottom: 1px solid rgba(15, 23, 42, .035);
    background: #fff;
    box-sizing: border-box;
}

#header-top.wb-header-tv .wb-header-tv__category-back,
#header-top.wb-header-tv .wb-header-tv__category-search {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #0f172a !important;
    text-decoration: none !important;
    cursor: pointer;
}

#header-top.wb-header-tv .wb-header-tv__category-back .fa {
    font-size: 30px;
    font-weight: 300;
}

#header-top.wb-header-tv .wb-header-tv__category-search .fa {
    font-size: 21px;
}

#header-top.wb-header-tv .wb-header-tv__category-title {
    min-width: 0;
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

html.theme-dark #header-top.wb-header-tv .wb-header-tv__category-head {
    border-bottom-color: rgba(255, 255, 255, .05);
    background: #07090f;
}

html.theme-dark #header-top.wb-header-tv .wb-header-tv__category-back,
html.theme-dark #header-top.wb-header-tv .wb-header-tv__category-search,
html.theme-dark #header-top.wb-header-tv .wb-header-tv__category-title {
    color: #f8fafc !important;
}

/* 展开分类：左侧一级分类，右侧二级分类 */
#header-top.wb-header-tv .wb-header-tv__category-explorer {
    display: grid;
    grid-template-columns: minmax(104px, 31%) minmax(0, 1fr);
    flex: 1 1 auto;
    min-height: 0;
    margin: 0;
    border-top: 0;
}

#header-top.wb-header-tv .wb-header-tv__category-rail {
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 0 16px;
    border-right: 1px solid rgba(15, 23, 42, .035);
    background: #f7f8fa;
}

#header-top.wb-header-tv .wb-header-tv__category-rail-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 70px;
    padding: 8px 10px;
    border: 0;
    background: transparent;
    color: #0f172a;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

#header-top.wb-header-tv .wb-header-tv__category-rail-item::after {
    display: none;
}

#header-top.wb-header-tv .wb-header-tv__category-rail-item.is-active {
    color: #ff4f87;
    background: #ffe5ed;
}

#header-top.wb-header-tv .wb-header-tv__category-content {
    min-width: 0;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px 12px 24px;
    background: #fff;
}

#header-top.wb-header-tv .wb-header-tv__category-pane[hidden] {
    display: none !important;
}

#header-top.wb-header-tv .wb-header-tv__category-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-content: start;
}

#header-top.wb-header-tv .wb-header-tv__category-chip {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
    min-height: 66px;
    padding: 8px 6px;
    border: 0;
    border-radius: 11px;
    background: rgba(15, 23, 42, .05);
    color: #475569 !important;
    font-size: 13px;
    line-height: 1.2;
    text-align: center;
    text-decoration: none !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}

#header-top.wb-header-tv .wb-header-tv__category-chip.has-image {
    min-height: 0;
    aspect-ratio: 1 / 1;
    justify-content: flex-end;
    padding: 10px 7px 9px;
    color: #fff !important;
    background: #334155;
}

#header-top.wb-header-tv .wb-header-tv__category-chip:not(.has-image):nth-child(4n + 1) {
    color: #075985 !important;
    background: #e0f2fe;
}

#header-top.wb-header-tv .wb-header-tv__category-chip:not(.has-image):nth-child(4n + 2) {
    color: #6d28d9 !important;
    background: #ede9fe;
}

#header-top.wb-header-tv .wb-header-tv__category-chip:not(.has-image):nth-child(4n + 3) {
    color: #15803d !important;
    background: #dcfce7;
}

#header-top.wb-header-tv .wb-header-tv__category-chip:not(.has-image):nth-child(4n) {
    color: #c2410c !important;
    background: #ffedd5;
}

#header-top.wb-header-tv .wb-header-tv__category-chip-media {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

#header-top.wb-header-tv .wb-header-tv__category-chip-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, .02) 32%, rgba(15, 23, 42, .15) 55%, rgba(2, 6, 23, .88) 100%);
}

#header-top.wb-header-tv .wb-header-tv__category-chip-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#header-top.wb-header-tv .wb-header-tv__category-chip-main {
    position: relative;
    z-index: 1;
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#header-top.wb-header-tv .wb-header-tv__category-chip-num {
    position: relative;
    z-index: 1;
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 10px;
    font-weight: 400;
    color: #94a3b8;
}

#header-top.wb-header-tv .wb-header-tv__category-chip:not(.has-image)
    .wb-header-tv__category-chip-num {
    color: inherit;
    opacity: .72;
}

#header-top.wb-header-tv .wb-header-tv__category-chip.has-image
    .wb-header-tv__category-chip-main {
    overflow: visible;
    font-size: 17px;
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: .8px;
    color: #fff;
    text-overflow: clip;
    text-shadow:
        0 0 2px #fff,
        0 0 7px rgba(236, 72, 153, .92),
        0 2px 3px rgba(0, 0, 0, .95),
        1px 1px 0 rgba(0, 0, 0, .72),
        -1px -1px 0 rgba(0, 0, 0, .55);
    white-space: normal;
}

#header-top.wb-header-tv .wb-header-tv__category-chip.has-image
    .wb-header-tv__category-chip-num {
    order: -1;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    opacity: .86;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .9);
}

#header-top.wb-header-tv .wb-header-tv__category-chip--all {
    color: #2563eb !important;
    background: rgba(37, 99, 235, .1);
}

html.theme-dark #header-top.wb-header-tv .wb-header-tv__category-rail {
    border-right-color: rgba(255, 255, 255, .05);
    background: #090c14;
}

html.theme-dark #header-top.wb-header-tv .wb-header-tv__category-rail-item {
    color: #8f97a8;
}

html.theme-dark #header-top.wb-header-tv .wb-header-tv__category-rail-item.is-active {
    color: #ff7aa5;
    background: rgba(255, 79, 135, .16);
}

html.theme-dark #header-top.wb-header-tv .wb-header-tv__category-content {
    background: #07090f;
}

html.theme-dark #header-top.wb-header-tv .wb-header-tv__category-chip {
    background: #121827;
    color: #dbe2ee !important;
}

html.theme-dark #header-top.wb-header-tv .wb-header-tv__category-chip.has-image {
    color: #fff !important;
    background: #1e293b;
}

html.theme-dark #header-top.wb-header-tv .wb-header-tv__category-chip:not(.has-image):nth-child(4n + 1) {
    color: #7dd3fc !important;
    background: rgba(14, 165, 233, .18);
}

html.theme-dark #header-top.wb-header-tv .wb-header-tv__category-chip:not(.has-image):nth-child(4n + 2) {
    color: #c4b5fd !important;
    background: rgba(139, 92, 246, .2);
}

html.theme-dark #header-top.wb-header-tv .wb-header-tv__category-chip:not(.has-image):nth-child(4n + 3) {
    color: #86efac !important;
    background: rgba(34, 197, 94, .18);
}

html.theme-dark #header-top.wb-header-tv .wb-header-tv__category-chip:not(.has-image):nth-child(4n) {
    color: #fdba74 !important;
    background: rgba(249, 115, 22, .2);
}

html.theme-dark #header-top.wb-header-tv .wb-header-tv__category-chip-num {
    color: #8f9aac;
}

html.theme-dark #header-top.wb-header-tv .wb-header-tv__category-chip:not(.has-image)
    .wb-header-tv__category-chip-num {
    color: inherit;
}

html.theme-dark #header-top.wb-header-tv .wb-header-tv__category-chip--all {
    color: #93c5fd !important;
    background: rgba(37, 99, 235, .22);
}

#header-top.wb-header-tv .wb-header-tv__category-chip:active {
    transform: scale(.97);
}

#header-top.wb-header-tv .wb-header-tv__panel-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px 6px;
}

#header-top.wb-header-tv .wb-header-tv__panel-grid--flat {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    align-content: start;
    padding: 16px 14px 24px;
}

#header-top.wb-header-tv .wb-header-tv__panel-chip {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 6px 4px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, .06);
    background: rgba(0, 0, 0, .025);
    font-size: 11px;
    font-weight: 400;
    line-height: 1.25;
    text-align: center;
    color: var(--wb-header-tv-muted, #64748b) !important;
    text-decoration: none !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-tap-highlight-color: transparent;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}

#header-top.wb-header-tv .wb-header-tv__panel-chip--stack {
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 1px;
    min-height: 40px;
    padding: 4px 5px;
    border: 0;
    border-radius: 6px;
    white-space: normal;
}

#header-top.wb-header-tv .wb-header-tv__panel-chip__main {
    display: block;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#header-top.wb-header-tv .wb-header-tv__panel-chip__num {
    display: block;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.2;
    color: var(--wb-header-tv-muted, #94a3b8);
    opacity: .92;
}

#header-top.wb-header-tv .wb-header-tv__panel-chip.is-active .wb-header-tv__panel-chip__num {
    color: inherit;
    opacity: .82;
}

html.theme-dark #header-top.wb-header-tv .wb-header-tv__panel-chip {
    border-color: rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .04);
    color: rgba(255, 255, 255, .72) !important;
}

#header-top.wb-header-tv .wb-header-tv__panel-chip:active {
    transform: scale(.98);
    opacity: .9;
}

#header-top.wb-header-tv .wb-header-tv__panel-chip.is-active {
    color: #2563eb !important;
    font-weight: 600;
    border-color: rgba(37, 99, 235, .35);
    background: rgba(37, 99, 235, .08);
}

html.theme-dark #header-top.wb-header-tv .wb-header-tv__panel-chip.is-active {
    color: #93c5fd !important;
    border-color: rgba(147, 197, 253, .35);
    background: rgba(37, 99, 235, .16);
}

#header-top.wb-header-tv .wb-header-tv__panel-chip.is-active::after {
    display: none !important;
}

/* 二级平铺模式：保留旧 grid 类兼容 */
#header-top.wb-header-tv .wb-header-tv__nav-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px 6px;
    align-items: stretch;
    padding-right: 0;
}

#header-top.wb-header-tv .wb-header-tv__nav-grid .wb-header-tv__nav-item {
    display: flex;
    align-items: center;
    justify-content: center;
    height: auto;
    min-height: 32px;
    padding: 6px 4px;
    font-size: 11px;
    text-align: center;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#header-top.wb-header-tv .wb-header-tv__nav-grid .wb-header-tv__nav-item.is-active {
    font-size: 11px;
    font-weight: 600;
}

#header-top.wb-header-tv .wb-header-tv__nav-grid .wb-header-tv__nav-item.is-active::after {
    display: none;
}

#header-top.wb-header-tv .wb-header-tv__nav-grid-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 34px;
    margin: 8px 0 0;
    padding: 0;
    border: 0;
    border-top: 1px solid rgba(0, 0, 0, .06);
    border-radius: 0;
    background: transparent;
    color: var(--wb-header-tv-muted);
    font-size: 16px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

@media (max-width: 360px) {
    #header-top.wb-header-tv .wb-header-tv__panel-grid,
    #header-top.wb-header-tv .wb-header-tv__nav-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px 5px;
    }

    #header-top.wb-header-tv .wb-header-tv__panel-chip {
        min-height: 30px;
        font-size: 10px;
    }
}

@media (min-width: 768px) {
    #header-top.wb-header-tv .wb-header-tv__category-explorer {
        grid-template-columns: minmax(132px, 28%) minmax(0, 1fr);
    }
    #header-top.wb-header-tv .wb-header-tv__category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }
    #header-top.wb-header-tv .wb-header-tv__panel-grid,
    #header-top.wb-header-tv .wb-header-tv__nav-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

#header-top.wb-header-tv .wb-header-tv__nav-item,
.wb-co-channel-nav .wb-header-tv__nav-item {
    flex: 0 0 auto;
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 100%;
    padding: 0 12px;
    font-size: 15px;
    color: var(--wb-header-tv-muted) !important;
    text-decoration: none !important;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}

#header-top.wb-header-tv .wb-header-tv__nav-item:first-child,
.wb-co-channel-nav .wb-header-tv__nav-item:first-child {
    padding-left: 0;
}

#header-top.wb-header-tv .wb-header-tv__nav-item.is-active,
.wb-co-channel-nav .wb-header-tv__nav-item.is-active {
    color: var(--wb-header-tv-text) !important;
    font-size: 16px;
    font-weight: 600;
}

#header-top.wb-header-tv .wb-header-tv__nav-item.is-active::after,
.wb-co-channel-nav .wb-header-tv__nav-item.is-active::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 5px;
    width: 16px;
    height: 3px;
    margin-left: -8px;
    border-radius: 2px;
    background: var(--wb-header-tv-text);
}

#header-top.wb-header-tv .wb-header-tv__nav-item:first-child.is-active::after,
.wb-co-channel-nav .wb-header-tv__nav-item:first-child.is-active::after {
    left: 8px;
    margin-left: 0;
}

.wb-co-channel-nav .wb-header-tv__nav-item:active,
.wb-co-channel-nav.is-dragging .wb-header-tv__nav-item {
    opacity: 1;
    background: transparent !important;
    color: inherit;
}

/* 社区筛选 Tab：与首页顶栏频道 Tab 同结构，吸顶在原生栏下方 */
body.wb-co-community-page,
body.wb-co-community-index,
body.wb-co-notify-page {
    --wb-header-tv-nav-height: 40px;
    --wb-header-tv-gutter: 10px;
    --wb-header-tv-edge: 6px;
    --wb-header-tv-text: #000;
    --wb-header-tv-muted: #5c5c5c;
}

html.theme-dark body.wb-co-community-page,
html.theme-dark body.wb-co-community-index,
html.theme-dark body.wb-co-notify-page {
    --wb-header-tv-text: #f8fafc;
    --wb-header-tv-muted: #cbd5e1;
}

.wb-co-channel-nav.wb-header-tv__nav {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + var(--top-floating-ad-height, 0px) + var(--wb-native-topbar-h, 44px));
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    z-index: 100019;
    width: 100%;
    max-width: var(--wb-app-shell-max, 960px);
    margin: 0;
    box-sizing: border-box;
    height: var(--wb-header-tv-nav-height);
    background: var(--wb-topbar-bg, #fff);
    border-bottom: 1px solid rgba(0, 0, 0, .06);
}

html.theme-dark .wb-co-channel-nav.wb-header-tv__nav {
    background: var(--wb-topbar-bg, #121826);
    border-bottom-color: rgba(255, 255, 255, .08);
}

.wb-co-channel-nav-spacer {
    display: block;
    width: 100%;
    height: var(--wb-header-tv-nav-height);
    flex-shrink: 0;
}

.wb-co-channel-nav .wb-header-tv__nav-row {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    height: 100%;
    min-height: var(--wb-header-tv-nav-height);
    padding-left: var(--wb-header-tv-gutter);
    padding-right: var(--wb-header-tv-edge);
    box-sizing: border-box;
}

.wb-co-channel-nav .wb-header-tv__nav-inner {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    padding-right: 4px;
}

.wb-co-channel-nav .wb-header-tv__nav-inner::-webkit-scrollbar {
    display: none;
}

.wb-co-channel-nav.is-dragging .wb-header-tv__nav-item {
    pointer-events: none;
}

/* PC / 平板：与内容区同宽居中，顶栏内部布局与手机一致 */
@media (min-width: 768px) {
    body.active:not(.wb-uc) #header-top.wb-header-tv,
    body.wb-video-home #header-top.wb-header-tv {
        left: 50% !important;
        right: auto !important;
        max-width: var(--wb-app-shell-max, 960px) !important;
        transform: translateX(-50%) !important;
    }
}

@media (max-width: 360px) {
    body.wb-video-home {
        --wb-header-tv-gutter: 8px;
        --wb-header-tv-edge: 4px;
    }
    #header-top.wb-header-tv .wb-header-tv__bar { gap: 6px; }
    #header-top.wb-header-tv .wb-header-tv__menu { width: 28px; height: 28px; }
    #header-top.wb-header-tv .wb-header-tv__logo-img { max-width: 96px; height: 26px; }
    #header-top.wb-header-tv .wb-header-tv__actions { gap: 10px; }
    #header-top.wb-header-tv .wb-header-tv__app { padding: 0 8px; font-size: 11px; }
    #header-top.wb-header-tv .wb-header-tv__search { padding: 0 10px 0 12px; }
    #header-top.wb-header-tv .wb-header-tv__search-text { font-size: 12px; }
}
