/* 导流大厅：沿用 wb-portal-hub.css，仅补页面背景与安全兜底 */
body.wb-portal-page.wb-portal-page {
  background: var(--wb-app-bg, #fff);
}

body.wb-portal-page .wb-portal-hub {
  padding-bottom: calc(24px + var(--wb-tabbar-height, 56px) + env(safe-area-inset-bottom, 0px));
}

/* 直播列表：确保全宽两列（勿把 list 类加在 panel body 上造成嵌套半宽） */
.wb-portal-hub .wb-portal-panel__body > .btm-nav-live__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .wb-portal-hub .wb-portal-panel__body > .btm-nav-live__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ========== 直播大厅：频道 / 二级 / 平台抽屉 ========== */
body.wb-live-page {
  --wb-live-rose: #f43f5e;
  --wb-live-rose-2: #fb7185;
  --wb-live-ink: #111827;
  --wb-live-chip: transparent;
  --wb-live-line: rgba(15, 23, 42, .08);
  --wb-live-page-bg: #f4f5f8;
  touch-action: manipulation;
}
html.theme-dark body.wb-live-page {
  --wb-live-chip: transparent;
  --wb-live-line: rgba(255, 255, 255, .08);
  --wb-live-page-bg: #0b0f16;
}
body.wb-live-page,
body.wb-live-page.wb-portal-page.wb-portal-page {
  background: var(--wb-live-page-bg, #f4f5f8);
}

body.wb-live-page .wb-portal-hub {
  padding: 0 0 calc(28px + var(--wb-tabbar-height, 56px) + env(safe-area-inset-bottom, 0px)) !important;
}

.wb-live-nav {
  position: relative;
  top: auto;
  z-index: 6;
  margin: 0 0 8px;
  padding: 2px 0 6px;
  background: transparent;
}
body.wb-live-page .wb-label-page-stack {
  padding-top: 0 !important;
}
html.theme-dark .wb-live-nav {
  background: transparent;
}
.wb-live-nav__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
}
.wb-live-nav__pins.wb-portal-hub__subtabs {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  margin: 0;
  padding: 0 2px 0 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.wb-live-nav__pins.wb-portal-hub__subtabs::-webkit-scrollbar { display: none; }
.wb-live-nav__more {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--wb-app-card-soft, #eef2f6);
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  box-shadow: none;
}
.wb-live-nav__more em {
  font-style: normal;
  min-width: 0;
  height: auto;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-size: 11px;
  line-height: 1;
  text-align: center;
  opacity: .75;
}
.wb-live-nav__more.is-on {
  background: #fff;
  color: var(--wb-portal-tab-active, #3b82f6);
  border-color: var(--wb-portal-tab-active, #3b82f6);
}
html.theme-dark .wb-live-nav__more {
  background: rgba(30, 41, 59, .55);
  color: #94a3b8;
  box-shadow: none;
}

.wb-live-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 30px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--wb-app-card-soft, #eef2f6);
  color: #64748b;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  box-shadow: none;
  position: relative;
}
.wb-live-chip__mark { display: none; }
.wb-live-chip--channel { padding-left: 14px; }
.wb-live-chip__n {
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  color: inherit;
  opacity: .7;
}
.wb-live-chip.is-active {
  background: #fff;
  color: var(--wb-portal-tab-active, #3b82f6);
  border-color: var(--wb-portal-tab-active, #3b82f6);
  box-shadow: none;
  font-weight: 700;
}
.wb-live-chip.is-active:after { display: none; }
.wb-live-chip.is-active .wb-live-chip__n { color: inherit; opacity: .75; }
html.theme-dark .wb-live-chip {
  background: rgba(30, 41, 59, .55);
  color: #94a3b8;
}
html.theme-dark .wb-live-chip.is-active {
  background: rgba(30, 41, 59, .9);
  color: #60a5fa;
  border-color: #60a5fa;
  box-shadow: none;
}

/* 二级分类：单行横滑，右侧固定「更多」，不再撑满首屏 */
.wb-live-nav__kids {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  margin: 6px 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}
.wb-live-nav__kids[hidden] {
  display: none !important;
}
.wb-live-nav__kids-scroll {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0 2px 2px 0;
}
.wb-live-nav__kids-scroll::-webkit-scrollbar { display: none; }
.wb-live-chip--child {
  height: 26px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 500;
  background: var(--wb-app-card-soft, #eef2f6);
  border: 1px solid transparent;
  color: #64748b;
  border-radius: 999px;
  box-shadow: none;
}
.wb-live-chip--child.is-active {
  background: #fff;
  color: var(--wb-portal-tab-active, #3b82f6);
  border-color: var(--wb-portal-tab-active, #3b82f6);
  box-shadow: none;
  font-weight: 700;
}
.wb-live-chip--child.is-active .wb-live-chip__n { color: inherit; }
.wb-live-chip--more {
  flex: 0 0 auto;
  background: var(--wb-app-card-soft, #eef2f6);
  color: var(--wb-portal-tab-active, #3b82f6);
  border: 1px solid transparent;
  font-weight: 700;
  box-shadow: none;
}
html.theme-dark .wb-live-chip--child {
  background: rgba(30, 41, 59, .55);
}
html.theme-dark .wb-live-chip--child.is-active {
  background: rgba(30, 41, 59, .9);
  color: #60a5fa;
  border-color: #60a5fa;
}
html.theme-dark .wb-live-nav__kids {
  background: transparent;
}

body.wb-live-page .wb-portal-hub .btm-nav-live__list {
  gap: 8px;
}
body.wb-live-page .wb-portal-hub .btm-nav-live__item {
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .1);
  background: #111;
}
body.wb-live-page .wb-portal-hub .btm-nav-live__thumb {
  position: relative;
  height: auto !important;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  background: #16161c;
  overflow: hidden;
}
body.wb-live-page .wb-portal-hub .btm-nav-live__thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover !important;
  object-position: center;
  display: block;
}
body.wb-live-page .wb-portal-hub .btm-nav-live__ph {
  position: absolute;
  inset: 0;
  display: block;
  background:
    radial-gradient(circle at 50% 40%, rgba(244, 63, 94, .22), transparent 58%),
    linear-gradient(160deg, #23232c, #14141a);
}
body.wb-live-page .wb-portal-hub .btm-nav-live__ph::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 44%;
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.28);
  box-shadow: 0 0 0 6px rgba(255,255,255,.06);
}
body.wb-live-page .wb-portal-hub .btm-nav-live__thumb::after {
  height: 48%;
  background: linear-gradient(to top, rgba(8, 8, 16, .86) 0%, rgba(8, 8, 16, .28) 55%, transparent 100%);
}
body.wb-live-page .wb-portal-hub .btm-nav-live__free {
  left: 8px;
  top: 8px;
  background: var(--wb-live-rose, #f43f5e);
  font-weight: 800;
  letter-spacing: 0;
  padding: 4px 8px 4px 7px;
  font-size: 10px;
}
body.wb-live-page .wb-portal-hub .btm-nav-live__item:nth-child(8n+1) .btm-nav-live__free { background: #f43f5e; }
body.wb-live-page .wb-portal-hub .btm-nav-live__item:nth-child(8n+2) .btm-nav-live__free { background: #f59e0b; }
body.wb-live-page .wb-portal-hub .btm-nav-live__item:nth-child(8n+3) .btm-nav-live__free { background: #10b981; }
body.wb-live-page .wb-portal-hub .btm-nav-live__item:nth-child(8n+4) .btm-nav-live__free { background: #3b82f6; }
body.wb-live-page .wb-portal-hub .btm-nav-live__item:nth-child(8n+5) .btm-nav-live__free { background: #8b5cf6; }
body.wb-live-page .wb-portal-hub .btm-nav-live__item:nth-child(8n+6) .btm-nav-live__free { background: #ec4899; }
body.wb-live-page .wb-portal-hub .btm-nav-live__item:nth-child(8n+7) .btm-nav-live__free { background: #06b6d4; }
body.wb-live-page .wb-portal-hub .btm-nav-live__item:nth-child(8n+8) .btm-nav-live__free { background: #f97316; }
body.wb-live-page .wb-portal-hub .btm-nav-live__plat {
  position: absolute;
  right: 8px;
  top: 8px;
  z-index: 2;
  max-width: 52%;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .55);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  backdrop-filter: blur(8px);
}
body.wb-live-page .wb-portal-hub .btm-nav-live__k {
  font-size: 13px;
  font-weight: 700;
}

html.wb-live-sheet-open body.wb-live-page .myui-nav__tabbar.wb-bottom-tabbar {
  z-index: 1 !important;
}

.wb-live-sheet {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100200;
  align-items: flex-end;
  justify-content: center;
}
.wb-live-sheet.is-open {
  display: flex;
}
.wb-live-sheet__overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .5);
}
.wb-live-sheet__panel {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: min(92dvh, 100%);
  display: flex;
  flex-direction: column;
  background: #f4f6f8;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -16px 48px rgba(15, 23, 42, .18);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
html.theme-dark .wb-live-sheet__panel {
  background: #0f172a;
}
.wb-live-sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 4px;
}
.wb-live-sheet__title {
  font-size: 17px;
  font-weight: 800;
  color: var(--wb-app-text, #0f172a);
  letter-spacing: .02em;
}
.wb-live-sheet__close {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: #e8edf3;
  color: #64748b;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
html.theme-dark .wb-live-sheet__close { background: #1e293b; color: #94a3b8; }
.wb-live-sheet__search {
  padding: 8px 16px 4px;
  flex-shrink: 0;
}
.wb-live-sheet__search input {
  width: 100%;
  height: 40px;
  border: 0;
  border-radius: 12px;
  padding: 0 14px;
  font-size: 14px;
  background: #fff;
  outline: 0;
  box-sizing: border-box;
  box-shadow: none;
}
html.theme-dark .wb-live-sheet__search input {
  background: #1e293b;
  color: #e2e8f0;
}
.wb-live-sheet__tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 6px 12px 0;
  margin: 4px 0 0;
  flex-shrink: 0;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  border: 0;
  box-shadow: inset 0 -1px 0 #e8edf3;
}
html.theme-dark .wb-live-sheet__tabs { box-shadow: inset 0 -1px 0 #1e293b; }
.wb-live-sheet__tabs[hidden] { display: none !important; }
.wb-live-sheet__tabs::-webkit-scrollbar { display: none; }
.wb-live-sheet__tab {
  flex: 0 0 auto;
  height: 38px;
  padding: 0 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #64748b;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  white-space: nowrap;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  position: relative;
  box-shadow: none;
}
.wb-live-sheet__tab em {
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
}
.wb-live-sheet__tab.is-active {
  background: transparent;
  color: #2563eb;
  font-weight: 800;
}
.wb-live-sheet__tab.is-active em { color: #60a5fa; }
.wb-live-sheet__tab.is-active:after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: #2563eb;
}
.wb-live-sheet__all {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 38px;
  margin: 0 0 12px;
  border: 0;
  border-radius: 10px;
  background: #fff;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: none;
}
.wb-live-sheet__all.is-active {
  background: #2563eb;
  color: #fff;
}
html.theme-dark .wb-live-sheet__all { background: #1e293b; color: #e2e8f0; }
.wb-live-sheet__body {
  overflow: auto;
  padding: 12px 16px 28px;
  -webkit-overflow-scrolling: touch;
}
.wb-live-sheet__sec { margin-top: 4px; }
.wb-live-sheet__h {
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: .04em;
  margin: 4px 0 10px;
}
.wb-live-sheet__h span {
  font-weight: 600;
  color: #cbd5e1;
}
.wb-live-sheet__channel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px;
  margin-bottom: 8px;
  border: 0;
  border-radius: 12px;
  background: #fff;
  color: #2563eb;
  font-size: 15px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  box-shadow: none;
}
.wb-live-sheet__channel.is-active,
.wb-live-sheet__channel:active {
  background: #2563eb;
  color: #fff;
}
.wb-live-sheet__channel em {
  font-style: normal;
  font-size: 12px;
  opacity: .8;
}
.wb-live-sheet__subs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -2px 0 14px;
}
.wb-live-sheet__sub {
  height: 30px;
  padding: 0 12px;
  border-radius: 8px;
  border: 0;
  background: #fff;
  color: #64748b;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  box-shadow: none;
}
.wb-live-sheet__sub.is-active {
  background: #2563eb;
  color: #fff;
}
.wb-live-sheet__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.wb-live-sheet__plat {
  min-height: 42px;
  padding: 9px 6px;
  border: 0;
  border-radius: 10px;
  background: #fff;
  color: #334155;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  line-height: 1.25;
  box-shadow: none;
  outline: 0;
}
html.theme-dark .wb-live-sheet__plat { background: #1e293b; color: #e2e8f0; }
.wb-live-sheet__plat em {
  display: block;
  margin-top: 2px;
  font-style: normal;
  font-size: 10px;
  font-weight: 600;
  color: #2563eb;
}
.wb-live-sheet__plat.is-active {
  background: #2563eb;
  color: #fff;
}
.wb-live-sheet__plat.is-active em { color: #fff; }
.wb-live-sheet__plat.is-empty { color: #94a3b8; font-weight: 500; }
.wb-live-sheet__empty {
  padding: 40px 12px;
  text-align: center;
  color: #94a3b8;
}

.wb-live-more {
  display: block;
  width: 100%;
  margin: 8px 0 2px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: transparent;
  font-size: 0;
  box-shadow: none;
  cursor: default;
  pointer-events: none;
}
.wb-live-more[hidden] { display: none !important; }

@media (max-width: 380px) {
  .wb-live-sheet__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 768px) {
  .wb-live-sheet { align-items: center; }
  .wb-live-sheet__panel {
    border-radius: 16px;
    max-height: 80vh;
  }
  body.wb-live-page .wb-portal-hub .wb-portal-panel__body > .btm-nav-live__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
