:root {
  color-scheme: light;
  --brand: #1677ff;
  --text: #172033;
  --muted: #667085;
  --line: #e5e7eb;
  --bg: #f7f8fb;
  --panel-bg: #ffffff;
}

/* theme-dark 与 body.family-* 双保险：暗色站选集字色/底色必须成对 */
html.theme-dark {
  color-scheme: dark;
  --bg: #0f1115;
  --text: #f3f4f6;
  --muted: #9aa3b2;
  --line: #2a2f3a;
  --panel-bg: #171b22;
}

* {
  box-sizing: border-box;
}

html {
  max-width: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, "Microsoft YaHei", sans-serif;
  max-width: 100%;
  overflow-x: clip;
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  width: 100%;
  max-width: var(--content-max-width, 1180px);
  min-width: 0;
  margin: 0 auto;
  padding: var(--panel-padding, 16px);
  padding-top: var(--shell-pad-top, 24px);
  box-sizing: border-box;
}

.breadcrumbs {
  margin: 12px 0;
  color: var(--muted, #667085);
  font-size: 14px;
}

.breadcrumbs a {
  color: inherit;
}

.home-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 20px;
  align-items: start;
}

.home-split-side {
  position: sticky;
  top: calc(var(--header-height, 64px) + 12px);
}

.hero-compact h1 {
  font-size: 1.5rem;
}

.hero-magazine {
  min-height: var(--hero-min-height, 220px);
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 12%, white), white);
}

.hero-kicker {
  color: var(--brand);
  font-size: 13px;
  margin-top: 8px;
}

.rank-sidebar {
  box-shadow: var(--shadow-card);
}

.layout-magazine-split .panel,
.layout-top-nav-dense .panel {
  box-shadow: var(--shadow-card);
}

.layout-minimal .section-title {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.layout-header-static .topbar {
  position: relative;
}

.layout-footer-minimal .site-footer .panel {
  border: none;
  background: transparent;
}

.layout-compact .movie-card {
  gap: var(--card-gap);
}

.nav-links-tabs {
  display: none;
  position: fixed;
  top: auto;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: white;
  border-top: 1px solid var(--line);
  padding: 8px 16px;
  z-index: 20;
  justify-content: space-around;
  box-sizing: border-box;
}

/* 移动端：全站统一底部 Tab 导航（horizontal 模板不再把下拉塞进顶栏横滑） */
@media (max-width: 767px) {
  .nav-links-tabs {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    background: var(--panel-bg, var(--panel, #fff));
    border-top: 1px solid var(--line);
    color: var(--text);
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
    z-index: 30;
    justify-content: space-around;
    gap: 4px;
    box-sizing: border-box;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .nav-links-tabs::-webkit-scrollbar {
    display: none;
  }

  .nav-links-tabs a {
    flex: 1 1 0;
    min-width: 0;
    max-width: 88px;
    padding: 6px 4px;
    margin: 0;
    font-size: 13px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text, inherit);
  }

  /* 仅底栏族藏顶栏频道链；经典/暗轨/杂志等须保留顶栏横滑导航 */
  body.family-header-bottom-tabs .nav-links-top,
  body.layout-bottom-tabs .nav-links-top,
  .topbar-bottom-nav .nav-links-top {
    display: none !important;
  }

  body.family-header-bottom-tabs main.shell,
  body.layout-bottom-tabs main.shell {
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  }
}

@media (min-width: 768px) {
  /* 仅「非底栏族」隐藏 tabs；底栏族 PC 仍可见（chrome.css 会改成顶栏横链） */
  body:not(.family-header-bottom-tabs):not(.layout-bottom-tabs) .nav-links-tabs {
    display: none !important;
  }

  body.layout-bottom-tabs main.shell,
  .layout-mobile-tab main.shell {
    padding-bottom: var(--panel-padding, 16px);
  }
}

.layout-regional .region-filter .topic-chip {
  cursor: pointer;
}

.layout-dark-hero .hero-panel {
  background: #111;
  color: #fff;
}

.layout-dark-hero .hero-panel .muted {
  color: #ccc;
}

.layout-anime-zone {
  --brand-muted: color-mix(in srgb, var(--brand) 22%, white);
}

.layout-docu-stream .section-title {
  border-left: 4px solid var(--brand);
  padding-left: 10px;
}

@media (max-width: 900px) {
  .home-split {
    grid-template-columns: 1fr;
  }

  .home-split-side {
    position: static;
  }
}

.topbar {
  position: relative;
  /* 顶栏随页面滚动，不做 sticky，避免滚动时挡内容 */
  z-index: 200;
  background: var(--panel-bg, #ffffff);
  border-bottom: 1px solid var(--line);
  backdrop-filter: none;
}

.nav {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  width: 100%;
  max-width: var(--content-max-width, 1180px);
  min-width: 0;
  margin: 0 auto;
  padding: 10px 16px;
  box-sizing: border-box;
}

.nav.nav-single-row {
  flex-direction: row;
  align-items: center;
  gap: 20px;
  min-height: 64px;
  padding: 12px 20px;
}

.nav.nav-single-row .brand {
  flex-shrink: 0;
  max-width: min(32vw, 260px);
}

.nav.nav-single-row .nav-links {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  justify-content: flex-start;
  gap: 4px;
  padding-bottom: 0;
  overflow-x: auto;
}

@media (min-width: 768px) {
  .nav.nav-single-row .nav-links-top,
  .family-header-kids .nav-links,
  .chrome-nav-kids {
    overflow: visible;
  }

  .chrome-nav-dark,
  .family-header-dark .nav-links,
  .chrome-header-dark .nav-links {
    overflow: visible;
  }

  .chrome-header-dark-navrow,
  .chrome-header-kids-row,
  .family-header-kids.topbar {
    overflow: visible;
  }
}

.nav.nav-single-row .search-wrap,
.nav.nav-single-row .search {
  flex: 0 1 340px;
  width: auto;
  margin-left: auto;
}

.nav-primary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-width: 0;
}

.brand {
  color: var(--brand);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  min-width: 0;
  max-width: min(42vw, 280px);
}

.brand span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section-title {
  margin: 16px 0 12px;
  font-size: 18px;
  font-weight: 600;
}

.home-seo-hero {
  margin: 8px 0 16px;
}

.home-seo-h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.35;
}

/* 首页独立 H1（模板没有把 H1 嵌进首个模块时）：只占一行小标题，不再留大块空白；H1 必须可见，不能删 */
.site-main-home [data-home-module="home-seo-h1-fallback"] .home-seo-hero {
  min-height: 0;
  margin: 0 0 10px;
  padding: 0;
  background: none;
  border: 0;
}

.site-main-home [data-home-module="home-seo-h1-fallback"] + *,
.site-main-home [data-home-module="home-seo-h1-fallback"] + * > :first-child,
.site-main-home [data-home-module="home-seo-h1-fallback"] + * > :first-child > :first-child {
  margin-top: 0;
}

.site-main-home [data-home-module="home-seo-h1-fallback"] .home-seo-h1 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0;
  color: var(--muted, #8a94a6);
}

.home-seo-tagline {
  margin: 6px 0 0;
  color: color-mix(in srgb, currentColor 72%, transparent);
  font-size: 14px;
}

.hero-panel h1 {
  margin-bottom: 8px;
}

.topic-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.topic-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: var(--radius, 12px);
  background: color-mix(in srgb, var(--brand) 12%, white);
  color: var(--brand);
  line-height: 1.3;
  white-space: nowrap;
}

.meta-chip-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
}

.meta-chip-label {
  flex: 0 0 auto;
}

.meta-chip-list {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.meta-chip-row .meta-chip {
  text-decoration: none;
  font-size: 0.92em;
}

.meta-chip-row .meta-chip:hover {
  text-decoration: underline;
}

.announcement {
  border-left: 4px solid var(--brand);
}

.layout-top-nav-dense {
  --content-max-width: 1280px;
}

.layout-top-nav-dense .shell {
  max-width: var(--content-max-width, 1280px);
}

.layout-minimal .panel {
  box-shadow: none;
  border: 1px solid var(--line);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px 4px;
  font-size: 17px;
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding-bottom: 2px;
}

.nav-links a {
  white-space: nowrap;
  flex-shrink: 0;
  padding: 8px 16px;
  margin: 0 2px;
  border-radius: 8px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.35;
  color: var(--text, #172033);
  transition: color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.nav-links a:hover {
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 10%, transparent);
}

.nav-links a.is-active,
.nav-links a[aria-current="page"],
.chrome-header-filter-links a.is-active,
.chrome-header-filter-links a[aria-current="page"],
.chrome-header-magazine-index a.is-active,
.chrome-header-magazine-index a[aria-current="page"],
.chrome-nav-editorial a.is-active,
.chrome-nav-editorial a[aria-current="page"],
.chrome-bottom-tabs a.is-active,
.chrome-bottom-tabs a[aria-current="page"],
.chrome-nav-dark a.is-active,
.chrome-nav-dark a[aria-current="page"] {
  color: var(--brand, #3b82f6);
  font-weight: 800;
  background: color-mix(in srgb, var(--brand, #3b82f6) 16%, transparent);
  box-shadow: inset 0 -3px 0 var(--brand, #3b82f6);
}

.chrome-header-filter-links a,
.chrome-header-magazine-index a,
.chrome-nav-editorial a {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.layout-channel-wall-dark .nav-links > a,
.layout-hot-rail-dark .nav-links > a,
.layout-dark-hero .nav-links > a,
.layout-netflix-rail .nav-links > a,
.layout-score-grid .nav-links > a {
  color: rgba(238, 238, 238, 0.88);
}

.layout-channel-wall-dark .nav-links > a:hover,
.layout-hot-rail-dark .nav-links > a:hover,
.layout-dark-hero .nav-links > a:hover,
.layout-netflix-rail .nav-links > a:hover,
.layout-score-grid .nav-links > a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

/* 暗色壳：分类标签对比度 */
.layout-dark-hero .topic-chip,
.layout-channel-wall-dark .topic-chip,
.layout-hot-rail-dark .topic-chip,
.layout-netflix-rail .topic-chip,
.layout-score-grid .topic-chip,
.layout-dark-hero .genre-chip-bar .topic-chip,
.layout-channel-wall-dark .genre-chip-bar .topic-chip,
.layout-hot-rail-dark .genre-chip-bar .topic-chip,
.layout-netflix-rail .genre-chip-bar .topic-chip,
.layout-score-grid .genre-chip-bar .topic-chip {
  background: color-mix(in srgb, var(--brand) 20%, var(--panel-bg, #171b22));
  color: var(--text);
  border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--line));
}

.layout-dark-hero .genre-chip-bar .topic-chip:hover,
.layout-channel-wall-dark .genre-chip-bar .topic-chip:hover,
.layout-hot-rail-dark .genre-chip-bar .topic-chip:hover,
.layout-netflix-rail .genre-chip-bar .topic-chip:hover,
.layout-score-grid .genre-chip-bar .topic-chip:hover {
  color: var(--brand);
  border-color: color-mix(in srgb, var(--brand) 55%, var(--line));
}

@media (max-width: 767px) {
  .nav-links,
  .chrome-nav-dark,
  .chrome-nav-kids,
  .chrome-nav-editorial,
  .chrome-nav-editorial-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    justify-content: flex-start;
  }

  .nav-links::-webkit-scrollbar,
  .chrome-nav-dark::-webkit-scrollbar,
  .chrome-nav-kids::-webkit-scrollbar,
  .chrome-nav-editorial::-webkit-scrollbar,
  .chrome-nav-editorial-bar::-webkit-scrollbar {
    display: none;
  }

  header.topbar {
    overflow: visible;
  }
}

.genre-chip-bar {
  padding-top: 12px;
  padding-bottom: 12px;
}

.genre-chip-scroll {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.genre-chip-scroll::-webkit-scrollbar {
  display: none;
}

.genre-chip-scroll .topic-chip {
  flex-shrink: 0;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  text-decoration: none;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-bottom: 12px;
}

.footer-nav a {
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--brand);
}

.footer-utility {
  margin-bottom: 8px;
}

.footer-discovery {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--muted);
}

.footer-discovery a {
  color: var(--muted);
  text-decoration: none;
}

.footer-discovery a + a::before {
  content: "\2014";
  margin: 0 6px;
}

.ad-slot-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 12px 0;
}

/* 网格 / 金刚：列数由 ad-loader.js 写入 CSS 变量；移动端最多两列 */
.ad-slot-grid {
  display: grid;
  grid-template-columns: repeat(var(--ad-columns, 1), minmax(0, 1fr));
}

.ad-slot-grid > .ad-slot {
  width: 100%;
}

@media (max-width: 640px) {
  .ad-slot-grid {
    grid-template-columns: repeat(var(--ad-columns-mobile, 1), minmax(0, 1fr));
  }
}

/* 广告占位：不占盒子，填充后的列表直接参与父级布局（播放页 flex order 等照常生效） */
.ad-slot-mount {
  display: contents;
}

/* M12：预览占位框——编辑器按 slotKey 显示广告位位置与名称，线上不输出 */
.ad-slot-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 90px;
  margin: 12px 0;
  border: 1px dashed #91caff;
  border-radius: 6px;
  background: #f0f7ff;
  color: #0958d9;
  font-size: 12px;
  letter-spacing: 0.02em;
}

.ad-slot[hidden] {
  display: none !important;
}

/* 素材图按容器收缩：大尺寸横幅图（如 1200 宽）不得撑破页脚 / 侧栏 */
.ad-slot {
  min-width: 0;
  max-width: 100%;
}

.ad-slot-image {
  display: block;
  max-width: 100%;
  height: auto;
}

/* 横幅 / 信息流类多条时每条一行（金刚、文字链保持原排布） */
.ad-home-notice > .ad-slot,
.ad-home-banner > .ad-slot,
.ad-home-feed-card > .ad-slot,
.ad-channel-banner > .ad-slot,
.ad-list-feed > .ad-slot,
.ad-detail-banner > .ad-slot,
.ad-detail-after-info > .ad-slot,
.ad-search-result > .ad-slot,
.ad-player-above > .ad-slot,
.ad-player-below > .ad-slot,
.ad-footer-banner > .ad-slot,
.ad-mobile-sticky .ad-slot {
  flex: 1 1 100%;
  min-width: 0;
}

.ad-slot-carousel {
  position: relative;
}

.ad-slot-carousel-dots {
  position: absolute;
  right: 8px;
  bottom: 6px;
  display: flex;
  gap: 4px;
  pointer-events: none;
}

.ad-slot-carousel-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
}

.ad-slot-carousel-dots span.is-active {
  background: rgba(255, 255, 255, 0.95);
}

.ad-jingang {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 10px;
  margin: 12px 0 16px;
}

.ad-jingang .ad-slot-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: inherit;
  font-size: 12px;
  text-align: center;
}

.ad-jingang .ad-slot-image {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 12px;
}

/* 金刚位（NAV_JINGANG）：图标下方名称居中、与图片留距、12px 两行省略。
   M32 流内分区 preset=card-list 时挂载类是 mitoa-inline-ad，此前无任何专属规则，
   导致名称左对齐、继承 16px、紧贴图片；这里按 slotKey 统一，不影响其它广告位。 */
.ad-slot-nav_jingang .ad-slot-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  color: inherit;
  text-decoration: none;
}
.ad-slot-nav_jingang .ad-slot-text,
.ad-slot-nav_jingang .ad-slot-title {
  display: block;
  width: 100%;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
  overflow-wrap: anywhere;
}

.ad-home-banner,
.ad-player-above,
.ad-player-below {
  width: 100%;
}

/* 横幅类联接下挂图片时让链接撑满一行，图片才能按容器居中 */
.ad-home-banner .ad-slot-link,
.ad-player-above .ad-slot-link,
.ad-player-below .ad-slot-link,
.ad-footer-banner .ad-slot-link,
.ad-channel-banner .ad-slot-link,
.ad-detail-banner .ad-slot-link,
.ad-list-feed .ad-slot-link,
.ad-search-result .ad-slot-link {
  display: block;
  text-align: center;
}

/* 横幅类素材自适应：按原始宽高比完整显示，不裁切也不放大；超宽收缩到容器，超高等比缩小 */
.ad-home-banner .ad-slot-image,
.ad-player-above .ad-slot-image,
.ad-player-below .ad-slot-image,
.ad-footer-banner .ad-slot-image,
.ad-channel-banner .ad-slot-image,
.ad-detail-banner .ad-slot-image,
.ad-list-feed .ad-slot-image,
.ad-search-result .ad-slot-image {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 240px;
  object-fit: contain;
  margin-inline: auto;
  border-radius: 8px;
}

.ad-slot-third-party {
  width: 100%;
  overflow: visible;
  line-height: normal;
}

.ad-slot-third-party > * {
  line-height: normal;
}

.ad-slot-frame {
  width: 100%;
  height: auto;
  min-height: 0;
  border: 0;
  display: block;
}

.ad-mobile-sticky {
  position: sticky;
  bottom: 0;
  z-index: 40;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bg, #111) 92%, transparent);
  backdrop-filter: blur(8px);
}

@media (min-width: 901px) {
  .ad-mobile-sticky {
    display: none;
  }
}

/* —— 浮层类广告位：两侧对联 / 居中弹窗 / 右下浮窗 / 开屏 / 播放器贴片 —— */
.ad-overlay-close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.ad-overlay-close:hover {
  background: rgba(0, 0, 0, 0.75);
}

/* 对联 / 移动端吸顶 / 暂停广告的关闭按钮定位 */
/* 左右两幅各自定位锚点，× 各锚定在自己右上角 */
.ad-couplet-left,
.ad-couplet-right {
  position: relative;
}

.ad-couplet .ad-overlay-close {
  pointer-events: auto;
  top: 0;
  right: 0;
  width: 24px;
  height: 24px;
  font-size: 15px;
}

/* 顶栏推广条 ×：参与 flex 排在下载按钮右侧，避免误触下载链接。
   保留 .ad-overlay-close 的基础重置，这里只覆盖定位/尺寸/配色；
   padding/border/font-family/display 必须显式重置，防止 UA 默认按钮样式透出。 */
[data-nav-promo] .nav-promo-close {
  position: static;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  margin-left: 0;
  padding: 0;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  line-height: 1;
}

[data-nav-promo] .nav-promo-close:hover {
  background: rgba(255, 255, 255, 0.24);
}

/* 蜜桃推广条是浅色底：白色半透明会看不见，改用与下载按钮同色系的深紫。
   用推广条自身类名匹配，不能用 body 上的 family-* 类（色猫站会同时挂两个族类）。 */
[data-nav-promo].nav-mitao-promo .nav-promo-close {
  background: rgba(93, 67, 174, 0.12);
  color: #5d43ae;
}

[data-nav-promo].nav-mitao-promo .nav-promo-close:hover {
  background: rgba(93, 67, 174, 0.24);
}

.ad-mobile-sticky .ad-overlay-close {
  top: 2px;
  right: 8px;
  width: 24px;
  height: 24px;
  font-size: 15px;
}

.ad-player-pause .ad-overlay-close {
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  font-size: 16px;
}

/* 桌面两侧竖幅对联：窄屏隐藏，仅保留左右两幅 */
.ad-couplet {
  position: fixed;
  top: 96px;
  left: 8px;
  right: 8px;
  z-index: 35;
  display: none;
  justify-content: space-between;
  pointer-events: none;
}

@media (min-width: 1280px) {
  .ad-couplet {
    display: flex;
  }
}

.ad-couplet .ad-slot {
  pointer-events: auto;
  width: 160px;
  margin: 0;
}

.ad-couplet .ad-slot-image {
  width: 160px;
  height: auto;
  display: block;
  border-radius: 8px;
}

/* 优先级需高于 `.ad-couplet .ad-slot { margin: 0 }`，否则 auto 被覆盖：
   关闭左联后右联会被 space-between 单项规则甩到最左边 */
.ad-couplet .ad-couplet-right {
  margin-left: auto;
}

/* —— 吸顶 / 吸底 / 左右挂角（对标竞对常驻位，2026-11 新增）—— */
/* 关闭按钮锚定在各自容器右上角 */
.ad-sticky-top,
.ad-sticky-bottom,
.ad-corner {
  position: relative;
}

/* 顶部吸顶条：固定顶栏常驻，页面整体下移让位（body.has-sticky-top-ad） */
.ad-sticky-top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 8500;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--ad-sticky-top-h, 56px);
  padding: 6px 40px 6px 12px;
  background: color-mix(in srgb, var(--bg, #111) 94%, transparent);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.ad-sticky-top .ad-slot,
.ad-sticky-top .ad-slot-list {
  width: 100%;
  margin: 0;
}

.ad-sticky-top .ad-slot-image {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(var(--ad-sticky-top-h, 56px) - 12px);
  object-fit: contain;
  margin-inline: auto;
}

.ad-sticky-top .ad-overlay-close {
  top: 50%;
  transform: translateY(-50%);
  right: 8px;
  width: 26px;
  height: 26px;
  font-size: 16px;
}

/* 底部吸底条（桌面为主）：移动端仍用 ad-mobile-sticky，避免双底栏 */
.ad-sticky-bottom {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 8400;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--ad-sticky-bottom-h, 64px);
  padding: 8px 40px calc(8px + env(safe-area-inset-bottom)) 12px;
  background: color-mix(in srgb, var(--bg, #111) 94%, transparent);
  backdrop-filter: blur(8px);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.25);
}

.ad-sticky-bottom .ad-slot,
.ad-sticky-bottom .ad-slot-list {
  width: 100%;
  margin: 0;
}

.ad-sticky-bottom .ad-slot-image {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(var(--ad-sticky-bottom-h, 64px) - 16px);
  object-fit: contain;
  margin-inline: auto;
}

.ad-sticky-bottom .ad-overlay-close {
  top: 50%;
  transform: translateY(-50%);
  right: 8px;
  width: 26px;
  height: 26px;
  font-size: 16px;
}

/* 移动端不叠桌面吸底（移动走 ad-mobile-sticky），避免与底栏 Tab / 系统手势区冲突 */
@media (max-width: 900px) {
  .ad-sticky-bottom {
    display: none;
  }
}

/* 左右挂角：桌面长期常驻竖幅，窄屏隐藏 */
.ad-corner {
  position: fixed;
  top: 25%;
  z-index: 35;
  display: none;
  width: 120px;
  pointer-events: none;
}

.ad-corner-left {
  left: 8px;
}

.ad-corner-right {
  right: 8px;
}

.ad-corner .ad-slot {
  pointer-events: auto;
  width: 120px;
  margin: 0;
  position: relative;
}

.ad-corner .ad-slot-image {
  width: 120px;
  height: auto;
  display: block;
  border-radius: 8px;
}

.ad-corner .ad-overlay-close {
  pointer-events: auto;
  top: 0;
  right: 0;
  width: 24px;
  height: 24px;
  font-size: 15px;
}

@media (min-width: 1280px) {
  .ad-corner {
    display: block;
  }
}

/* 让位：吸顶/吸底条固定，出现时给文档流顶部/底部与固定顶栏预留高度 */
body.has-sticky-top-ad {
  padding-top: var(--ad-sticky-top-h, 56px);
}

body.has-sticky-top-ad [data-cg-navbar] {
  top: var(--ad-sticky-top-h, 56px) !important;
}

body.has-sticky-bottom-ad {
  padding-bottom: calc(var(--ad-sticky-bottom-h, 64px) + env(safe-area-inset-bottom, 0px));
}

/* 居中弹窗 */
.ad-popup-wrap {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.6);
}

.ad-popup-wrap[hidden] {
  display: none !important;
}

.ad-popup-card {
  position: relative;
  max-width: min(600px, 92vw);
  max-height: 90vh;
  overflow: auto;
  padding: 10px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.ad-popup-ad {
  margin: 0;
}

.ad-popup-ad .ad-slot-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

/* 右下浮窗 */
.ad-float-wrap {
  position: fixed;
  right: 16px;
  bottom: 96px;
  z-index: 8000;
  width: min(240px, 45vw);
}

.ad-float-card {
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  background: #fff;
}

.ad-float-card .ad-slot-image {
  width: 100%;
  height: auto;
  display: block;
}

/* 开屏覆盖层 */
.ad-splash-wrap {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: #000;
}

.ad-splash-ad {
  max-width: min(750px, 100vw);
  max-height: 100vh;
  margin: 0;
}

.ad-splash-ad .ad-slot-image {
  max-width: 100%;
  max-height: calc(100vh - 32px);
  width: auto;
  display: block;
  margin: 0 auto;
}

/* 播放器贴片：播放前覆盖 / 暂停覆盖 / 右下角标 */
.ad-player-before {
  position: absolute;
  inset: 0;
  z-index: 36;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #000;
}

.ad-player-before-ad {
  margin: 0;
  max-width: 100%;
}

.ad-player-before-ad .ad-slot-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.ad-player-before-bar {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
}

.ad-player-before .ad-overlay-close {
  top: 10px;
  left: 10px;
  right: auto;
}

.ad-player-skip {
  padding: 6px 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 12px;
  cursor: pointer;
}

.ad-player-skip:disabled {
  opacity: 0.7;
  cursor: default;
}

.ad-player-pause {
  position: absolute;
  inset: 0;
  z-index: 35;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  background: rgba(0, 0, 0, 0.6);
  cursor: pointer;
}

.ad-player-pause .ad-slot-image {
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
}

.ad-player-corner-mount .ad-slot-list {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 22;
  display: block;
  margin: 0;
}

.ad-player-corner-mount .ad-slot {
  max-width: 140px;
}

.ad-player-corner-mount .ad-slot-image {
  width: 100%;
  height: auto;
  border-radius: 6px;
}

.footer-nav-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
}

.footer-nav-group > a:first-child {
  font-weight: 600;
}

.category-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.category-subnav a {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
}

/* —— 频道门户标题行：一行 H1 + 右侧入口，替代原先「小标签 + 大标题 + 按钮」的大卡片 —— */
.channel-portal-title,
.dual-board-channel-title,
.chrome-magazine-title {
  align-items: center;
  margin: 4px 0 12px;
}

.channel-portal-title h1,
.dual-board-channel-title h1,
.chrome-magazine-title h1 {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.3;
}

/* —— 频道筛选面板（四种骨架共用基线；族皮肤在 family-chrome.css，手机横滑在 mobile-experience.css）—— */
.channel-filter-bar {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
  padding: 6px 16px 10px;
}

.channel-filter-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0 12px;
  border-bottom: 1px solid var(--line);
}

.channel-filter-head h1 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.35;
}

.channel-filter-head-icon {
  flex: 0 0 auto;
  width: 4px;
  height: 18px;
  border-radius: 2px;
  background: var(--brand, #1677ff);
}

.channel-filter-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px dashed color-mix(in srgb, var(--line) 80%, transparent);
}

.channel-filter-row:last-child {
  border-bottom: 0;
}

.channel-filter-label {
  flex: 0 0 auto;
  min-width: 3.5rem;
  color: var(--muted, #888);
  font-size: 14px;
  line-height: 30px;
}

.channel-filter-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  flex: 1;
  min-width: 0;
  margin: 0;
}

.channel-filter-options a {
  font-size: 14px;
  line-height: 22px;
  color: inherit;
  text-decoration: none;
  padding: 4px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.channel-filter-options a:hover {
  color: var(--brand, #1677ff);
}

.channel-filter-options a.is-active {
  color: #fff;
  font-weight: 600;
  background: var(--brand, #1677ff);
}

.channel-filter-more {
  flex: 0 0 auto;
  padding: 6px 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand, #1677ff);
  text-decoration: none;
  white-space: nowrap;
}

/* lite：只一行分类 + 行尾「全部筛选」入口 */
.channel-filter-lite {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding-top: 4px;
  padding-bottom: 4px;
}

.channel-filter-lite > .channel-filter-row,
.channel-filter-lite > .channel-filter-dl {
  flex: 1 1 auto;
  min-width: 0;
  border-bottom: 0;
}

.channel-filter-lite .channel-filter-options {
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}

.channel-filter-lite .channel-filter-options::-webkit-scrollbar {
  display: none;
}

/* rail：标签嵌进轨道，桌面也单行横滑 */
.channel-filter-bar-rail .channel-filter-track {
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}

.channel-filter-bar-rail .channel-filter-track::-webkit-scrollbar {
  display: none;
}

.channel-filter-bar-rail .channel-filter-track .channel-filter-label {
  min-width: 0;
  padding: 0 10px 0 0;
  margin-right: 4px;
  border-right: 1px solid color-mix(in srgb, currentColor 20%, transparent);
  font-weight: 700;
  line-height: 22px;
}

.channel-filter-bar-rail .channel-filter-row {
  border-bottom: 0;
  padding: 6px 0;
}

/* compact：标签在上、chip 墙铺开 */
.channel-filter-bar-compact .channel-filter-row {
  flex-direction: column;
  gap: 6px;
}

.channel-filter-bar-compact .channel-filter-label {
  line-height: 1.4;
  font-size: 13px;
  font-weight: 700;
}

.channel-filter-bar-compact .channel-filter-options a {
  border-radius: 8px;
  border: 1px solid var(--line);
}

.channel-filter-bar-compact .channel-filter-options a.is-active {
  border-color: transparent;
}

/* magazine：dl 文字链，选中加粗下划线 */
.channel-filter-bar-magazine {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.channel-filter-dl {
  margin: 0;
}

.channel-filter-bar-magazine .channel-filter-row {
  align-items: baseline;
  padding: 6px 0;
}

.channel-filter-bar-magazine .channel-filter-label {
  min-width: 3rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.6;
}

.channel-filter-bar-magazine .channel-filter-options {
  gap: 2px 8px;
}

.channel-filter-bar-magazine .channel-filter-options a {
  padding: 0;
  border-radius: 0;
  line-height: 1.6;
}

.channel-filter-bar-magazine .channel-filter-options a.is-active {
  color: var(--brand, #1677ff);
  background: transparent;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.channel-filter-sep {
  color: var(--muted, #98a2b3);
  opacity: 0.6;
  font-size: 12px;
}

/* —— 列表排序 Tab —— */
.list-sort-tabs {
  display: flex;
  align-items: center;
  gap: 4px 22px;
  margin: 0 0 14px;
  border-bottom: 1px solid var(--line);
}

.list-sort-tabs a {
  padding: 8px 0 10px;
  font-size: 15px;
  color: inherit;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}

.list-sort-tabs a.is-active {
  color: var(--brand, #1677ff);
  border-bottom-color: var(--brand, #1677ff);
  font-weight: 600;
}

.list-sort-tabs-rail {
  display: inline-flex;
  gap: 0;
  padding: 3px;
  border: 0;
  border-radius: 10px;
  background: color-mix(in srgb, var(--text, #fff) 8%, transparent);
}

.list-sort-tabs-rail a {
  padding: 6px 16px;
  margin: 0;
  border: 0;
  border-radius: 8px;
  font-size: 14px;
}

.list-sort-tabs-rail a.is-active {
  color: #fff;
  background: var(--brand, #1677ff);
}

.list-sort-tabs-compact {
  gap: 8px;
  border: 0;
}

.list-sort-tabs-compact a {
  padding: 6px 14px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
}

.list-sort-tabs-compact a.is-active {
  color: #fff;
  background: var(--brand, #1677ff);
  border-color: transparent;
}

.list-sort-tabs-magazine {
  gap: 4px 14px;
  border-bottom: 0;
  font-size: 14px;
}

.list-sort-tabs-magazine a {
  padding: 4px 0;
  border: 0;
  margin: 0;
  color: var(--muted, #667085);
}

.list-sort-tabs-magazine a + a::before {
  content: "\00b7";
  margin-right: 14px;
  color: var(--muted, #98a2b3);
}

.list-sort-tabs-magazine a.is-active {
  color: var(--text);
  font-weight: 700;
}

/* —— /vodshow：主栏 + 右侧热播（仅门户带侧栏的族；<1024px 隐藏榜单）—— */
.list-page-main {
  min-width: 0;
}

@media (min-width: 1024px) {
  .list-page-layout-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 20px;
    align-items: start;
  }

  .list-page-layout-split > .list-hot-aside {
    position: sticky;
    top: 72px;
    margin: 0;
  }
}

@media (max-width: 1023px) {
  .list-page-layout .list-hot-aside {
    display: none !important;
  }
}

.list-hot-classic {
  padding: 6px 14px 10px;
}

.list-hot-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0 12px;
  border-bottom: 1px solid var(--line);
}

.list-hot-head h2 {
  margin: 0;
  font-size: 1.05rem;
}

.list-hot-head-icon {
  width: 4px;
  height: 16px;
  border-radius: 2px;
  background: var(--brand, #1677ff);
}

.list-hot-rank {
  list-style: none;
  margin: 0;
  padding: 0;
}

.list-hot-rank li + li {
  border-top: 1px dashed color-mix(in srgb, var(--line) 80%, transparent);
}

.list-hot-rank a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  color: inherit;
  text-decoration: none;
  font-size: 14px;
}

.list-hot-rank a:hover .list-hot-title {
  color: var(--brand, #1677ff);
}

.list-hot-no {
  flex: 0 0 20px;
  height: 20px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--text, #333) 10%, transparent);
  color: var(--muted, #667085);
  font-size: 12px;
  line-height: 20px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.list-hot-no-1,
.list-hot-no-2,
.list-hot-no-3 {
  color: #fff;
  background: var(--brand, #1677ff);
}

.list-hot-no-2 {
  opacity: 0.85;
}

.list-hot-no-3 {
  opacity: 0.7;
}

.list-hot-title {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-hot-meta {
  flex: 0 0 auto;
  color: var(--muted, #98a2b3);
  font-size: 12px;
}

.channel-portal-hero {
  margin-bottom: 16px;
}

.channel-portal-intro {
  margin: 12px 0 0;
  line-height: 1.65;
  max-width: 72ch;
}

.channel-portal-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.channel-portal-chips a {
  padding: 4px 10px;
  border: 1px solid var(--line, #ddd);
  border-radius: 999px;
  font-size: 13px;
  text-decoration: none;
  color: inherit;
}

.channel-portal-section {
  margin: 20px 0 28px;
}

.channel-portal-block {
  margin-top: 8px;
  margin-bottom: 24px;
}

.chrome-magazine-block {
  margin-top: 28px;
  padding-top: 8px;
  border-top: 1px solid color-mix(in srgb, var(--brand, #1677ff) 12%, transparent);
}

.category-empty {
  padding: 24px;
  text-align: center;
}

/* —— 站内搜索页（/search/ 与 /search/{词}/ 共用 SearchPageView）：Hero 搜索区 —— */
.search-hero {
  margin-bottom: 16px;
  border: 1px solid var(--line, #2a2a2a);
  border-radius: 16px;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--brand, #1677ff) 10%, var(--panel-bg, #171b22)),
    var(--panel-bg, #171b22)
  );
  text-align: center;
}

.search-hero.is-open {
  padding: clamp(40px, 6vw, 72px) 24px;
}

.search-hero.is-compact {
  padding: 24px;
}

.search-hero-inner {
  max-width: 860px;
  margin: 0 auto;
}

.search-hero-title {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.3;
}

.search-hero-sub {
  margin: 0;
  font-size: 14px;
}

.search-hero.is-compact .search-hero-sub {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
}

.search-page-form {
  display: flex;
  gap: 10px;
  max-width: 720px;
  margin: 24px auto 0;
}

.search-hero.is-compact .search-page-form {
  margin-top: 14px;
}

.search-page-input {
  flex: 1;
  min-width: 0;
  min-height: 52px;
  border: 1px solid rgba(128, 128, 128, 0.35);
  border-radius: 12px;
  padding: 0 18px;
  font-size: 16px;
  font-family: inherit;
  background: transparent;
  color: inherit;
}

.search-page-input:focus {
  outline: none;
  border-color: var(--brand, #1677ff);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand, #1677ff) 25%, transparent);
}

.search-page-btn {
  flex-shrink: 0;
  min-height: 52px;
  border: none;
  border-radius: 12px;
  padding: 0 32px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  background: var(--brand, #1677ff);
  color: #fff;
}

.search-page-btn:hover {
  filter: brightness(1.08);
}

.search-hot-terms {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-top: 18px;
}

.search-hot-label {
  flex: 0 0 auto;
  font-size: 13px;
  color: var(--muted);
}

.search-hot-list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}

.search-hot-list a {
  padding: 5px 14px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand, #1677ff) 10%, transparent);
  color: inherit;
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease;
}

.search-hot-list a:hover {
  background: color-mix(in srgb, var(--brand, #1677ff) 20%, transparent);
}

.search-notice {
  margin: 0 0 16px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--surface-soft, #f5f7fa);
  color: var(--muted);
  font-size: 14px;
}

.search-suggestions {
  margin-bottom: 20px;
}

.search-suggest-title {
  margin: 0 0 10px;
  font-weight: 600;
}

.search-suggestions ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.search-suggestions li a {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface-soft, #f5f7fa);
  font-size: 14px;
}

.search-empty-recommend {
  margin-top: 8px;
  padding-top: 0;
}

.search-empty-hint {
  font-size: 14px;
  color: var(--muted);
  margin: 12px 0 12px;
}

/* —— 搜索结果信息行（列表型族）：classic 卡片行 / rail 暗色宽行 / feed 紧凑流 / editorial 编号行 —— */
.search-result-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.search-result-item {
  display: flex;
  gap: 14px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius, 10px);
  background: var(--panel-bg, #fff);
}

.search-result-poster {
  position: relative;
  flex: 0 0 112px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 6px;
  background: color-mix(in srgb, var(--text, #333) 8%, transparent);
}

.search-result-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.search-result-badge {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 3px 6px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
  color: #fff;
  font-size: 12px;
  text-align: center;
}

.search-result-body {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  flex: 1 1 auto;
}

.search-result-title {
  margin: 0 0 2px;
  font-size: 1.05rem;
  line-height: 1.35;
}

.search-result-title a {
  color: inherit;
  text-decoration: none;
}

.search-result-title a:hover {
  color: var(--brand, #1677ff);
}

.search-result-line,
.search-result-summary {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted, #667085);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-result-key {
  color: color-mix(in srgb, var(--muted, #667085) 75%, transparent);
}

.search-result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 12px;
}

.search-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: auto 0 0;
  padding-top: 6px;
}

.search-result-play,
.search-result-detail {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}

.search-result-play {
  color: #fff;
  background: var(--brand, #1677ff);
  font-weight: 600;
}

.search-result-detail {
  color: inherit;
  background: color-mix(in srgb, var(--text, #333) 8%, transparent);
}

.search-result-list-rail .search-result-item {
  background: #0f172a;
  border-color: rgba(148, 163, 184, 0.18);
  color: #e2e8f0;
}

.search-result-list-rail .search-result-line,
.search-result-list-rail .search-result-key {
  color: #94a3b8;
}

.search-result-list-rail .search-result-play,
.search-result-list-rail .search-result-detail {
  border-radius: 6px;
}

.search-result-list-rail .search-result-detail {
  background: rgba(148, 163, 184, 0.16);
}

.search-result-list-feed {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

.search-result-list-feed .search-result-item {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding: 14px 0;
}

.search-result-list-feed .search-result-poster {
  flex-basis: 96px;
}

.search-result-list-editorial {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  counter-reset: none;
}

.search-result-list-editorial .search-result-item {
  align-items: flex-start;
  border: 0;
  border-top: 2px solid var(--text, #111);
  border-radius: 0;
  background: transparent;
  padding: 16px 0;
}

.search-result-no {
  flex: 0 0 2.2rem;
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
  color: var(--brand, #1677ff);
  font-variant-numeric: tabular-nums;
}

.search-result-list-editorial .search-result-play,
.search-result-list-editorial .search-result-detail {
  border-radius: 0;
}

.search {
  display: flex;
  align-items: center;
  align-self: center;
  min-width: 0;
  flex: 0 0 auto;
  width: min(340px, 100%);
  max-width: 380px;
  height: 36px;
  min-height: 36px;
  max-height: 36px;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg, #f7f8fb) 88%, #fff);
  overflow: hidden;
}

.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  align-self: center;
  min-width: 0;
  flex: 0 0 auto;
  width: min(340px, 100%);
  max-width: 380px;
  margin-left: auto;
  z-index: 40;
}

.search-wrap .search {
  width: 100%;
  max-width: none;
  margin-left: 0;
}

.search-history {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-bg, #fff);
  box-shadow: 0 10px 28px rgba(16, 24, 40, 0.12);
  overflow: hidden;
}

.search-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px 6px;
  font-size: 12px;
  color: var(--muted);
}

.search-history-clear,
.search-history-remove {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  padding: 0;
  line-height: 1;
}

.search-history-clear:hover,
.search-history-remove:hover {
  color: var(--brand);
}

.search-history-list {
  list-style: none;
  margin: 0;
  padding: 0 0 6px;
}

.search-history-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 6px;
}

.search-history-item a {
  flex: 1;
  min-width: 0;
  padding: 8px 8px;
  color: var(--text);
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-radius: 8px;
}

.search-history-item a:hover {
  background: color-mix(in srgb, var(--brand) 10%, transparent);
  color: var(--brand);
}

.search-history-remove {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-size: 16px;
}

.search-history-remove:hover {
  background: color-mix(in srgb, var(--brand) 10%, transparent);
}

.search-suggest-list {
  list-style: none;
  margin: 0;
  padding: 6px;
}

.search-suggest-item a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  color: var(--text);
  font-size: 14px;
  border-radius: 8px;
}

.search-suggest-item a:hover,
.search-suggest-item.active a {
  background: color-mix(in srgb, var(--brand) 10%, transparent);
}

.search-suggest-label {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-suggest-meta {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--muted);
}

.search input {
  width: 100%;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: none;
  background: transparent;
  padding: 0 12px 0 14px;
  font-size: 14px;
  color: inherit;
}

.search input::placeholder {
  color: var(--muted, #98a2b3);
}

.search button,
.btn {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--brand);
  padding: 0 14px 0 8px;
  height: 100%;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.search button:hover {
  filter: brightness(1.08);
}

.btn {
  border-radius: 8px;
  background: var(--brand);
  color: white;
  padding: 8px 14px;
  height: auto;
}

.grid {
  --grid-cols: 6;
  display: grid;
  grid-template-columns: repeat(var(--grid-cols), minmax(0, 1fr));
  gap: var(--card-gap, 14px);
  width: 100%;
  min-width: 0;
  align-items: stretch;
  justify-items: stretch;
}

.grid > .movie-card,
.grid > .card {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-sizing: border-box;
}

.grid .movie-card-poster-wrap,
.grid .poster-frame,
.grid .poster {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.grid .card-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  gap: 4px;
}

.grid .title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  word-break: break-word;
  overflow-wrap: anywhere;
  min-height: calc(1.35em * 2);
}

.grid .muted {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  overflow: hidden;
  margin-top: auto;
  word-break: break-word;
  min-height: 1.4em;
}

.hot-playing-item .title,
.layout-mobile-hero-stack .home-hero-scroll .title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  min-height: calc(1.35em * 2);
}

.hot-playing-item .muted {
  -webkit-line-clamp: 1;
  line-clamp: 1;
  overflow: hidden;
}

.detail-watch-related {
  width: 100%;
  min-width: 0;
}

@media (max-width: 960px) {
  .grid {
    --grid-cols: 4;
  }
}

@media (max-width: 640px) {
  .grid {
    --grid-cols: 2;
  }
}

.card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.poster {
  aspect-ratio: 2 / 3;
  width: 100%;
  height: auto;
  object-fit: cover;
  background: #d8dee9;
}

.card-body {
  padding: 8px 4px 4px;
}

.title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}

.muted {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.detail {
  display: grid;
  grid-template-columns: minmax(150px, 260px) 1fr;
  gap: 24px;
}

.detail-layout {
  display: grid;
  gap: 24px;
}

.detail-watch {
  gap: 16px;
}

.detail-watch-hero {
  padding: 0;
  overflow: hidden;
}

.detail-watch-hero .player-stage {
  max-height: min(62vw, 560px);
  border-radius: 8px 8px 0 0;
}

.detail-watch-hero .player,
.detail-watch-hero .artplayer-host {
  border-radius: 8px 8px 0 0;
}

.detail-watch-title {
  padding: 14px 16px 0;
}

.detail-watch-title h1 {
  margin: 0 0 4px;
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  line-height: 1.3;
}

.detail-watch-title .muted {
  margin: 0;
}

.detail-watch-hero .play-source-section {
  gap: 12px;
  padding-bottom: 16px;
}

.detail-watch-hero .play-line-tabs,
.detail-watch-hero .play-episode-grid,
.detail-watch-hero .play-source-open {
  margin-left: 16px;
  margin-right: 16px;
}

.detail-watch-empty {
  padding: 0 16px 16px;
}

.detail-watch-info {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.detail-watch-info-text {
  grid-template-columns: 1fr;
}

.detail-watch-poster .poster {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.detail-watch-info-title {
  margin: 0 0 8px;
  font-size: 1rem;
}

.detail-watch-synopsis p {
  margin: 0 0 8px;
  line-height: 1.65;
}

.detail-watch-related h2 {
  margin: 0 0 12px;
}

/* 详情合并布局：信息卡 + 在线观看 Tab */
.detail-main.panel {
  padding: 16px 18px 18px;
}

.detail-main-crumb {
  margin: 0 0 12px;
}

.detail-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 180px);
  gap: 20px 24px;
  align-items: start;
}

.detail-main-title {
  margin: 0 0 10px;
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  line-height: 1.3;
}

.detail-main-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.detail-meta-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text) 6%, var(--panel-bg, #fff));
  border: 1px solid var(--line, #e5e7eb);
  color: var(--muted, #667085);
  font-size: 12px;
  text-decoration: none;
}

a.detail-meta-pill:hover {
  border-color: color-mix(in srgb, var(--brand) 40%, var(--line));
  color: var(--brand);
}

.detail-main-meta {
  margin: 0 0 14px;
  display: grid;
  gap: 8px;
}

.detail-main-meta > div {
  display: grid;
  grid-template-columns: 3em minmax(0, 1fr);
  gap: 8px 12px;
  align-items: start;
}

.detail-main-meta dt {
  margin: 0;
  color: var(--muted, #667085);
  font-size: 13px;
}

.detail-main-meta dd {
  margin: 0;
}

.detail-main-synopsis {
  margin: 0 0 16px;
}

.detail-main-cta {
  margin: 0;
}

.detail-play-cta,
.detail-main-cta .btn-important {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 140px;
  padding: 12px 22px;
  border-radius: 10px;
  background: var(--brand, #1677ff);
  color: #fff !important;
  text-decoration: none;
  font-weight: 700;
  border: none;
}

.detail-play-cta:hover,
.detail-main-cta .btn-important:hover {
  filter: brightness(1.06);
  color: #fff !important;
}

.detail-online.panel {
  padding: 14px 16px 16px;
}

.detail-online-head,
.play-island-online-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin: 0 0 12px;
  padding: 0 0 10px;
  border-bottom: 1px solid var(--line, #e5e7eb);
}

.detail-online-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text, #172033);
}

.detail-online-head .play-line-tabs,
.play-island-online-head .play-line-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: 0;
  justify-content: flex-end;
}

.detail-online-head .play-tab,
.play-island-online-head .play-tab,
.detail-online-head button.play-tab,
.play-island-online-head button.play-tab,
.detail-online-head a.play-tab,
.play-island-online-head a.play-tab {
  position: relative;
  min-height: auto;
  padding: 6px 4px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--muted, #667085) !important;
  font-size: 14px;
  font-weight: 500;
  box-shadow: none;
}

.detail-online-head .play-tab:hover,
.play-island-online-head .play-tab:hover {
  color: var(--text, #172033) !important;
  background: transparent;
  border: none;
}

.detail-online-head .play-tab.active,
.play-island-online-head .play-tab.active {
  color: var(--brand, #1677ff) !important;
  background: transparent;
  border: none;
  font-weight: 700;
  box-shadow: inset 0 -2px 0 var(--brand, #1677ff);
}

.play-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.1em;
  margin-left: 4px;
  padding: 0 4px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 14%, transparent);
  color: var(--brand, #1677ff);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  vertical-align: super;
}

.play-episode-panel {
  padding: 12px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--text) 4%, var(--panel-bg, #fff));
  border: 1px solid var(--line, #e5e7eb);
}

.play-episode-panel.is-hidden,
.play-episode-panel[hidden] {
  display: none !important;
}

.play-page-stage {
  padding: 0 0 16px;
  overflow: hidden;
}

.play-page-info {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px 20px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--line, #e5e7eb);
  background: var(--panel-bg, #fff);
}

.play-island .player-stage {
  margin: 0;
  border-radius: 0;
  overflow: hidden;
}

.play-island .artplayer-host {
  border-radius: 0;
}

.play-page .play-island-online-head {
  padding: 12px 16px 0;
  margin: 0;
  border-bottom: none;
}

.play-page .play-episode-panel {
  margin: 0 16px 4px;
}

.play-page-info-main {
  flex: 1 1 280px;
  min-width: 0;
}

.play-page-crumb {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--muted, #667085);
}

.play-page-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  margin: 0 0 10px;
}

.play-page-title-text {
  margin: 0;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  line-height: 1.3;
}

.play-page-title-text a {
  color: var(--text, #172033);
  text-decoration: none;
}

.play-page-title-text a:hover {
  color: var(--brand, #1677ff);
}

.play-page-ep-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 12%, var(--panel-bg, #fff));
  color: var(--brand, #1677ff);
  font-size: 13px;
  font-weight: 600;
}

.play-page-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
}

.play-page-synopsis {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text, #172033);
}

.play-page-synopsis-label {
  color: var(--muted, #667085);
}

.play-page-synopsis-fold > summary {
  display: inline;
  cursor: pointer;
  list-style: none;
  color: inherit;
}

.play-page-synopsis-fold > summary::-webkit-details-marker {
  display: none;
}

.play-page-synopsis-toggle {
  margin-left: 4px;
  color: var(--brand, #1677ff);
  font-weight: 600;
}

.play-page-synopsis-fold[open] .play-page-synopsis-short,
.play-page-synopsis-fold[open] .play-page-synopsis-toggle {
  display: none;
}

.play-page-synopsis-fold[open] > p {
  margin: 6px 0 0;
}

.play-page-handles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 0 0 auto;
  padding: 12px 16px 4px;
}

.play-handle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--line, #d9d9d9);
  background: color-mix(in srgb, var(--text) 4%, var(--panel-bg, #fff));
  color: var(--text, #172033) !important;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}

.play-handle-btn:hover {
  border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
  color: var(--brand, #1677ff) !important;
}

.play-handle-next {
  border-color: var(--brand, #1677ff);
  background: var(--brand, #1677ff);
  color: #fff !important;
}

.play-handle-next:hover {
  filter: brightness(1.06);
  color: #fff !important;
}

.play-handle-btn.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.play-page-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
}

.play-page-section-head h2 {
  margin: 0;
}

.play-page-section-head .more {
  color: var(--muted, #667085);
  font-size: 13px;
  text-decoration: none;
}

.play-page-section-head .more:hover {
  color: var(--brand, #1677ff);
}

.detail-top {
  display: grid;
  grid-template-columns: minmax(140px, 260px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.detail-top-play {
  grid-template-columns: minmax(120px, 180px) minmax(0, 1fr);
}

.detail-poster-col .poster {
  width: 100%;
  height: auto;
  display: block;
}

.detail-main-col {
  min-width: 0;
}

.detail-stack {
  display: grid;
  gap: 16px;
}

.category-intro {
  margin-bottom: 16px;
}

.category-intro h1 {
  margin: 0 0 6px;
  font-size: clamp(20px, 5vw, 26px);
}

.category-intro .active-filter-chips {
  margin-top: 6px;
}

.category-intro .muted {
  margin: 8px 0 0;
}

.active-filter-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 10px 0 12px;
}

.active-filter-label {
  font-size: 13px;
  color: var(--muted);
}

.active-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  color: var(--brand);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}

.active-filter-chip:hover {
  background: color-mix(in srgb, var(--brand) 20%, transparent);
}

.active-filter-chip-x {
  font-size: 14px;
  font-weight: 700;
  opacity: 0.8;
}

.active-filter-clear {
  font-size: 13px;
  color: var(--muted);
}

.active-filter-clear:hover {
  color: var(--brand);
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-bg, #fff);
  padding: 16px;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.source {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 10px 0;
}

.player-wrap {
  display: grid;
  gap: 12px;
}

.player-stage {
  position: relative;
  z-index: 0;
  isolation: isolate;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: min(56vw, 520px);
  background: #000;
  border-radius: 8px;
  overflow: hidden;
}

.player,
.artplayer-host {
  position: relative;
  z-index: 0;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  background: #000;
}

.artplayer-host .art-video-player {
  width: 100% !important;
  height: 100% !important;
  /* 非全屏时禁止抬到顶栏之上 */
  z-index: 0 !important;
}

.play-page .player-unmute {
  display: none !important;
}

.player-loading,
.player-status-hint,
.player-unmute {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
}

.player-loading,
.player-status-hint {
  z-index: 21;
  pointer-events: none;
  max-width: min(92%, 420px);
  color: #fff;
  font-size: clamp(16px, 3.6vw, 22px);
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
  background: rgba(0, 0, 0, 0.55);
  padding: 12px 18px;
  border-radius: 12px;
}

.player-unmute {
  border: 0;
  cursor: pointer;
  color: #111;
  background: rgba(255, 255, 255, 0.92);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
}

.play-switch-hint {
  display: none;
}

.play-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.play-nav-btn {
  border: 1px solid var(--line);
  background: var(--panel-bg, #fff);
  color: var(--text);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
}

.play-nav-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.play-nav-btn:not(:disabled):hover {
  border-color: color-mix(in srgb, var(--brand) 35%, var(--line));
  background: color-mix(in srgb, var(--brand) 8%, var(--panel-bg, #fff));
}

.play-now-label {
  flex: 1;
  text-align: center;
  font-size: 13px;
  min-width: 120px;
}

.source-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.source-tab {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-bg, #fff);
  color: var(--text);
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
}

.source-tab.active {
  border-color: var(--brand);
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 10%, var(--panel-bg, #fff));
}

.play-source-section {
  display: grid;
  gap: 14px;
}

.play-line-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.play-line-tab {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--text) 8%, var(--panel-bg, #fff));
  color: var(--text);
  padding: 8px 14px;
  font-size: 14px;
  cursor: pointer;
  line-height: 1.2;
}

.play-line-tab:hover {
  border-color: color-mix(in srgb, var(--brand) 35%, var(--line));
  background: color-mix(in srgb, var(--brand) 6%, var(--panel-bg, #fff));
}

.play-line-tab.active {
  border-color: var(--brand);
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 12%, var(--panel-bg, #fff));
}

.play-line-tab-more {
  border-style: dashed;
}

.play-episode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px;
}

.play-episode-chip {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--text) 8%, var(--panel-bg, #fff));
  color: var(--text);
  padding: 8px 10px;
  font-size: 13px;
  text-align: center;
  cursor: pointer;
  min-height: 40px;
}

.play-episode-chip:hover {
  border-color: color-mix(in srgb, var(--brand) 35%, var(--line));
  background: color-mix(in srgb, var(--brand) 12%, var(--panel-bg, #fff));
  color: var(--text);
}

.play-episode-chip.active {
  border-color: var(--brand);
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 16%, var(--panel-bg, #fff));
}

.play-source-open {
  margin: 0;
  font-size: 13px;
}

/* 详情/播放选集：强制可读对比度（勿用 color:inherit + 白底，暗色主题会字色发白） */
.detail-play-links {
  display: grid;
  gap: 14px;
}

.detail-online .play-episode-grid,
.play-island .play-episode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px;
  margin: 0;
}

.play-island .play-line-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
}

/* 略抬高底色，暗色面板上选集块仍可辨；字色强制跟 --text，禁止 inherit */
a.play-ep,
button.play-ep,
span.play-ep,
.play-island .play-tab,
.play-island button.play-tab {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--line, #d9d9d9);
  border-radius: 8px;
  background: color-mix(in srgb, var(--text, #172033) 8%, var(--panel-bg, #fff));
  color: var(--text, #172033) !important;
  font-size: 13px;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

a.play-ep:hover,
button.play-ep:hover,
.play-island .play-tab:hover {
  border-color: color-mix(in srgb, var(--brand, #1677ff) 45%, var(--line, #d9d9d9));
  background: color-mix(in srgb, var(--brand, #1677ff) 12%, var(--panel-bg, #fff));
  color: var(--text, #172033) !important;
}

a.play-ep.active,
button.play-ep.active,
.play-island .play-tab.active,
.play-island button.play-tab.active {
  border-color: var(--brand, #1677ff);
  color: var(--brand, #1677ff) !important;
  background: color-mix(in srgb, var(--brand, #1677ff) 16%, var(--panel-bg, #fff));
  font-weight: 600;
}

.detail-watch-hero .detail-play-links {
  padding: 12px 16px 16px;
}

.detail-play-line + .detail-play-line {
  padding-top: 4px;
  border-top: 1px solid var(--line, #e5e7eb);
}

.detail-watch-title .crumb {
  color: var(--muted, #667085);
  font-size: 13px;
}

.detail-watch-title .crumb a {
  color: var(--muted, #667085);
}

.detail-watch-title .crumb a:hover {
  color: var(--brand, #1677ff);
}

.detail-watch-title h1 {
  color: var(--text, #172033);
}

.detail-watch-title .muted,
.detail-watch-info .muted {
  color: var(--muted, #667085);
}

.synopsis-fold > summary {
  color: var(--brand, #1677ff);
  cursor: pointer;
  list-style: none;
}

.synopsis-fold > summary::-webkit-details-marker {
  display: none;
}

.synopsis-fold > summary .synopsis-toggle-open {
  display: none;
}

.synopsis-fold[open] > summary .synopsis-toggle-open {
  display: inline;
}

.synopsis-fold[open] > summary .synopsis-toggle-collapsed {
  display: none;
}

@media (max-width: 640px) {
  .play-episode-grid {
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  }

  .play-line-tab {
    padding: 7px 12px;
    font-size: 13px;
  }

  .detail-online .play-episode-grid,
  .play-island .play-episode-grid {
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  }
}

.rank-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

/* M19：运营显式设置列数时，榜单从纵向列表切换为多列网格；未设置时类名不变、逐字零回归。 */
.rank-list-grid {
  display: grid;
  gap: 0 16px;
}
.rank-list-grid li {
  border-bottom-color: color-mix(in srgb, var(--line) 70%, transparent);
}

.rank-list li {
  display: flex;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.rank-no {
  width: 24px;
  color: var(--brand);
  font-weight: 600;
}

.rank-list li:nth-child(-n + 3) .rank-no {
  color: #fff;
  background: var(--brand);
  border-radius: 4px;
  text-align: center;
  line-height: 24px;
}

.rank-badge {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.rank-list li a {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .site-stats-bar {
    gap: 12px 20px;
  }

  .site-stats-value {
    font-size: 1.15rem;
  }

  .rank-list li {
    gap: 8px;
  }

  /* 移动端周榜改为横向海报轨，避免长列表占满首屏 */
  .rank-weekly-panel .rank-list {
    display: flex;
    flex-direction: row;
    gap: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .rank-weekly-panel .rank-list::-webkit-scrollbar {
    display: none;
  }

  .rank-weekly-panel .rank-list li {
    flex: 0 0 140px;
    flex-direction: column;
    align-items: flex-start;
    border-bottom: 0;
    padding: 0;
    gap: 4px;
  }

  .rank-weekly-panel .rank-list li a {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.35;
  }

  .rank-weekly-panel .rank-badge {
    margin-left: 0;
  }
}

.site-footer-shell {
  padding-top: 8px;
  padding-bottom: 24px;
}

.site-footer {
  margin: 0;
  width: 100%;
  max-width: none;
}

.site-footer-copyright {
  white-space: pre-line;
  line-height: 1.7;
  font-size: 0.9rem;
}

.friend-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

/* mobile-feed：小屏可窄栏；PC 跟随 --content-max-width（默认 1180px） */
@media (max-width: 767px) {
  .layout-mobile-feed .shell {
    max-width: 640px;
  }
}

.layout-mobile-feed .home-feed .grid {
  --grid-cols: 1;
  gap: 16px;
}

.layout-mobile-feed .home-feed .card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  border-radius: var(--radius, 12px);
  box-shadow: var(--shadow-card);
}

.layout-mobile-feed .home-feed .poster {
  aspect-ratio: 2 / 3;
  height: 100%;
  border-radius: var(--radius, 12px) 0 0 var(--radius, 12px);
}

.layout-mobile-hero-stack .hero-panel {
  min-height: var(--hero-min-height, 220px);
  margin-bottom: 12px;
  border-radius: calc(var(--radius, 12px) + 4px);
  background: linear-gradient(160deg, color-mix(in srgb, var(--brand) 18%, white), white);
}

.layout-mobile-hero-stack .home-hero-scroll {
  display: flex;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.layout-mobile-hero-stack .home-hero-scroll .card {
  flex: 0 0 156px;
  scroll-snap-align: start;
}

.layout-mobile-compact-list .home-compact-list .grid,
.layout-mobile-compact-list .home-compact-list .movie-list {
  --grid-cols: 1;
  gap: 8px;
}

.layout-mobile-compact-list .home-compact-list .card,
.layout-mobile-compact-list .home-compact-list .movie-card-list {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  border: none;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  padding: 8px 0;
  background: transparent;
}

.layout-mobile-compact-list .home-compact-list .poster {
  width: 64px;
  height: 88px;
  border-radius: 6px;
}

.layout-mobile-compact-list .home-compact-list .title {
  font-size: calc(15px * var(--heading-scale, 1));
}

.layout-mobile-compact-list .home-compact-list .section-title {
  font-size: calc(16px * var(--heading-scale, 1));
  border-bottom: 2px solid var(--brand);
  padding-bottom: 6px;
}

.home-stack,
.home-feed,
.home-hero-stack,
.home-channel-flow,
.home-compact-list {
  display: grid;
  gap: 16px;
  width: 100%;
  min-width: 0;
}

.home-stack > *,
.home-feed > *,
.home-hero-stack > *,
.home-channel-flow > *,
.home-compact-list > *,
main.shell > * {
  min-width: 0;
  max-width: 100%;
}

@media (min-width: 768px) {
  .layout-mobile-feed .home-feed .grid {
    --grid-cols: 2;
  }

  .layout-mobile-feed .home-feed .card {
    grid-template-columns: 1fr;
  }

  .layout-mobile-hero-stack .home-split {
    grid-template-columns: minmax(0, 1fr) 300px;
  }

  .layout-mobile-compact-list .home-compact-list .grid {
    --grid-cols: 2;
  }
}

.detail-recipe-stack {
  display: grid;
  gap: 16px;
}

.detail-summary-block h1 {
  margin-top: 0;
}

.detail-play-block h2 {
  margin-top: 0;
}

@media (max-width: 720px) {
  .nav.nav-single-row {
    flex-wrap: wrap;
    gap: 8px 12px;
  }

  .nav.nav-single-row .brand {
    flex: 1 1 auto;
    max-width: calc(100% - 8px);
  }

  .nav.nav-single-row .search-wrap,
  .nav.nav-single-row .search {
    flex: 1 1 100%;
    max-width: none;
    margin-left: 0;
    order: 2;
  }

  .nav-primary {
    flex-wrap: wrap;
  }

  .brand {
    max-width: 100%;
  }

  .search-wrap,
  .search {
    max-width: none;
    flex: 1 1 100%;
    margin-left: 0;
  }

  .detail {
    grid-template-columns: 1fr;
  }

  .detail-top {
    grid-template-columns: 1fr;
  }

  .detail-poster-col {
    max-width: 200px;
  }

  .detail-watch-info {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 12px;
  }

  /* 手机紧凑信息卡：海报与标题/标签组成头部，演职、简介、播放按钮整宽下移 */
  .detail-main-grid {
    grid-template-columns: 108px minmax(0, 1fr);
    gap: 12px 14px;
  }

  .detail-main-body {
    display: contents;
  }

  .detail-main-poster {
    grid-column: 1;
    grid-row: 1 / span 2;
    width: 108px;
  }

  .detail-main-title {
    grid-column: 2;
    grid-row: 1;
    margin-bottom: 0;
  }

  .detail-main-tags {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
    margin: 0;
  }

  .detail-main-meta {
    grid-column: 1 / -1;
    grid-row: 3;
    margin: 0;
  }

  .detail-main-synopsis {
    grid-column: 1 / -1;
    grid-row: 4;
    margin: 0;
  }

  .detail-main-cta {
    grid-column: 1 / -1;
    grid-row: 5;
  }

  .detail-main-cta .detail-play-cta {
    width: 100%;
  }

  .detail-online-head,
  .play-island-online-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .detail-online-head .play-line-tabs,
  .play-island-online-head .play-line-tabs {
    justify-content: flex-start;
    width: 100%;
  }

  .detail-watch-hero .player-stage,
  .detail-watch-hero .player,
  .detail-watch-hero .artplayer-host {
    border-radius: 8px 8px 0 0;
  }
}

/* —— 首页统计 / 模块更多 / 分页 / 富卡片 —— */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 20px 0 12px;
}

.section-head .section-title {
  margin: 0;
}

.section-more {
  flex-shrink: 0;
  color: var(--brand);
  font-size: 14px;
  font-weight: 600;
}

.site-stats-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 32px;
  margin-bottom: 16px;
  align-items: center;
}

.site-stats-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 72px;
}

.site-stats-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--brand);
  line-height: 1.2;
}

.site-stats-label {
  font-size: 12px;
  color: var(--muted);
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  width: 100%;
  min-width: 0;
}

.pagination-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pagination-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-bg, #fff);
  color: var(--text);
  font-size: 14px;
  line-height: 1;
  text-decoration: none;
  transition:
    border-color 0.15s ease,
    color 0.15s ease;
}

.pagination-link:hover:not(.current):not(.disabled) {
  border-color: var(--brand);
  color: var(--brand);
}

.pagination-link.current {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  font-weight: 700;
}

.pagination-link.disabled {
  opacity: 0.45;
  pointer-events: none;
}

.pagination-ellipsis {
  color: var(--muted);
  padding: 0 2px;
}

.pagination-meta {
  margin-left: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.pagination-jump {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
  color: var(--muted);
  font-size: 13px;
}

.pagination-jump-input {
  width: 68px;
  height: 40px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-bg, #fff);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  text-align: center;
  appearance: textfield;
  -moz-appearance: textfield;
}

.pagination-jump-input::-webkit-outer-spin-button,
.pagination-jump-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.pagination-jump-input:focus {
  outline: none;
  border-color: var(--brand);
}

.pagination-jump-btn {
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-bg, #fff);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    color 0.15s ease;
}

.pagination-jump-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.movie-card-poster-wrap {
  position: relative;
}

.poster-frame {
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  background: #1a222d;
  aspect-ratio: 2 / 3;
}

.poster-placeholder {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  place-items: center;
  background-color: #1a222d;
  animation: poster-pulse 2.2s ease-in-out infinite;
  opacity: 1;
  transition: opacity 0.28s ease;
  pointer-events: none;
}

.poster-loading-spinner {
  width: 26%;
  max-width: 32px;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top-color: rgba(255, 255, 255, 0.42);
  animation: poster-spin 0.9s linear infinite;
}

@keyframes poster-pulse {
  0%,
  100% {
    background-color: #1a222d;
  }
  50% {
    background-color: #222a36;
  }
}

@keyframes poster-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .poster-placeholder,
  .poster-loading-spinner {
    animation: none;
  }

  .poster-placeholder {
    background-color: #222a36;
  }

  .poster-loading-spinner {
    border-top-color: rgba(255, 255, 255, 0.35);
    opacity: 0.85;
  }
}

.poster-frame .poster {
  position: relative;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.35s ease;
  width: 100%;
  height: auto;
}

.poster-frame.is-loaded .poster-placeholder {
  opacity: 0;
  animation: none;
}

.poster-frame.is-loaded .poster-loading-spinner {
  animation: none;
}

.poster-frame.is-loaded .poster {
  opacity: 1;
}

.movie-card-badge {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 6px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--brand) 14%, white);
  color: var(--brand);
  font-size: 11px;
  font-weight: 600;
}

.movie-card-score {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 3;
  margin: 0;
  padding: 0 7px;
  border-radius: 0 0 0 10px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 12px;
  font-weight: 400;
  line-height: 20px;
  letter-spacing: 0;
  pointer-events: none;
  box-shadow: none;
}

.movie-card-badge-overlay,
.movie-card-badge-corner {
  position: absolute;
  bottom: 6px;
  right: 6px;
  z-index: 2;
  margin: 0;
  padding: 0 4px;
  border-radius: 2px;
  background: transparent;
  color: #fff;
  font-size: 12px;
  font-weight: 400;
  line-height: 18px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
  pointer-events: none;
}

.movie-card-poster-wrap-list {
  position: relative;
  width: 72px;
  flex-shrink: 0;
}

.movie-card-poster-wrap-list .movie-card-score {
  top: 0;
  right: 0;
  padding: 0 5px;
  font-size: 11px;
  line-height: 18px;
  border-radius: 0 0 0 8px;
}

.movie-list {
  display: grid;
  gap: 10px;
}

.movie-card-list {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.movie-card-list .poster {
  width: 72px;
  height: 108px;
  border-radius: 6px;
}

.movie-card-list .card-body {
  padding: 0;
}

.synopsis-fold {
  margin: 0 0 8px;
}

.synopsis-fold summary {
  cursor: pointer;
  color: var(--brand);
  font-weight: 600;
  margin-bottom: 8px;
}

.synopsis-fold p {
  margin: 0;
  line-height: 1.65;
}

/* 壳差异强化：暗色影院 / 极简 / 信息流 */
.layout-dark-hero {
  --bg: #0f1115;
  --text: #f3f4f6;
  --muted: #9ca3af;
  --line: #2a2f3a;
}

.layout-dark-hero {
  --panel-bg: #171b22;
}

.layout-dark-hero .panel,
.layout-dark-hero .card,
.layout-dark-hero .movie-card-list,
.layout-dark-hero .pagination-link {
  background: var(--panel-bg);
  border-color: var(--line);
  color: var(--text);
}

.layout-dark-hero .topbar {
  background: rgba(15, 17, 21, 0.92);
  border-bottom-color: var(--line);
}

.layout-dark-hero .site-stats-value {
  color: #fff;
}

.layout-minimal .site-stats-bar {
  border-style: dashed;
}

.layout-minimal .section-more {
  font-weight: 500;
}

.layout-mobile-feed .home-feed {
  display: grid;
  gap: 12px;
}

.layout-mobile-feed .home-feed .grid {
  --grid-cols: 1;
  gap: 10px;
}

.layout-mobile-feed .home-feed .card {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: center;
}

.layout-mobile-feed .home-feed .poster {
  aspect-ratio: 2 / 3;
  height: auto;
}

.layout-mobile-hero-stack .home-hero-stack {
  display: grid;
  gap: 16px;
}

.layout-mobile-hero-stack .home-hero-scroll {
  display: flex;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  padding-bottom: 4px;
}

.layout-anime-zone .topic-chip {
  border-radius: 12px;
  background: var(--brand-muted, color-mix(in srgb, var(--brand) 18%, white));
}

.layout-docu-stream .site-stats-bar {
  border-left: 4px solid var(--brand);
}

/* —— 播放门户扩容：模块 + 壳 —— */
.hot-playing-rail,
.home-hero-scroll {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.hot-playing-scroller {
  position: relative;
  width: 100%;
  min-width: 0;
}

.hot-playing-rail .hot-playing-track,
.home-hero-scroll {
  display: flex;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  padding-bottom: 10px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--brand) 42%, #c5cad3) transparent;
}

.hot-playing-rail .hot-playing-track::-webkit-scrollbar,
.home-hero-scroll::-webkit-scrollbar {
  height: 6px;
}

.hot-playing-rail .hot-playing-track::-webkit-scrollbar-track,
.home-hero-scroll::-webkit-scrollbar-track {
  background: transparent;
  margin: 0 8px;
}

.hot-playing-rail .hot-playing-track::-webkit-scrollbar-thumb,
.home-hero-scroll::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--brand) 38%, #c5cad3);
  border-radius: 999px;
}

.hot-playing-rail .hot-playing-track::-webkit-scrollbar-thumb:hover,
.home-hero-scroll::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--brand) 62%, #9aa3b2);
}

.hot-playing-scroller::before,
.hot-playing-scroller::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 10px;
  width: 36px;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.hot-playing-scroller.has-prev::before,
.hot-playing-scroller.has-next::after {
  opacity: 1;
}

.hot-playing-scroller::before {
  left: 0;
  background: linear-gradient(90deg, var(--panel-bg, #fff) 8%, transparent);
}

.hot-playing-scroller::after {
  right: 0;
  background: linear-gradient(270deg, var(--panel-bg, #fff) 8%, transparent);
}

.hot-playing-nav {
  display: none;
  position: absolute;
  top: 42%;
  z-index: 3;
  width: 36px;
  height: 36px;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  border-radius: 50%;
  background: color-mix(in srgb, var(--panel-bg, #fff) 88%, transparent);
  color: var(--text);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(8px);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  align-items: center;
  justify-content: center;
  transition: opacity 0.18s ease, transform 0.18s ease, background-color 0.18s ease;
}

.hot-playing-nav-prev {
  left: 6px;
}

.hot-playing-nav-next {
  right: 6px;
}

.hot-playing-nav:disabled {
  opacity: 0;
  pointer-events: none;
}

.hot-playing-nav:not(:disabled):hover {
  background: var(--panel-bg, #fff);
  border-color: color-mix(in srgb, var(--brand) 40%, var(--line));
  color: var(--brand);
  transform: scale(1.04);
}

@media (min-width: 768px) {
  .hot-playing-scroller .hot-playing-nav {
    display: inline-flex;
    opacity: 0;
  }

  .hot-playing-scroller:hover .hot-playing-nav:not(:disabled),
  .hot-playing-scroller:focus-within .hot-playing-nav:not(:disabled) {
    opacity: 1;
  }

  /* PC：默认隐藏粗滚动条，保留触控板/拖拽滚动；悬停时显示细条 */
  .hot-playing-rail .hot-playing-track {
    scrollbar-width: none;
  }

  .hot-playing-rail .hot-playing-track::-webkit-scrollbar {
    height: 0;
  }

  .hot-playing-scroller:hover .hot-playing-track,
  .hot-playing-scroller:focus-within .hot-playing-track {
    scrollbar-width: thin;
  }

  .hot-playing-scroller:hover .hot-playing-track::-webkit-scrollbar,
  .hot-playing-scroller:focus-within .hot-playing-track::-webkit-scrollbar {
    height: 5px;
  }
}

.hot-playing-item {
  flex: 0 0 156px;
  max-width: 156px;
  scroll-snap-align: start;
  min-width: 0;
}

.hot-playing-item .movie-card {
  display: block;
}

.channel-row {
  margin-bottom: 8px;
}

.home-channel-flow {
  display: grid;
  gap: 18px;
}

.dual-latest-rank {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 20px;
  align-items: start;
}

@media (max-width: 900px) {
  .dual-latest-rank {
    grid-template-columns: 1fr;
  }
}

.update-pulse {
  border-left: 4px solid var(--brand);
  background: color-mix(in srgb, var(--brand) 8%, white);
}

.update-pulse-text {
  margin: 0;
  font-size: 15px;
}

.update-pulse-text strong {
  color: var(--brand);
  font-size: 1.15em;
}

.layout-channel-wall-dark,
.layout-hot-rail-dark,
.layout-netflix-rail,
.layout-score-grid {
  --bg: #12141a;
  --text: #f3f4f6;
  --muted: #9ca3af;
  --line: #2a2f3a;
  --panel-bg: #1a1e27;
}

.layout-channel-wall-dark .panel,
.layout-channel-wall-dark .card,
.layout-channel-wall-dark .movie-card-list,
.layout-channel-wall-dark .pagination-link,
.layout-hot-rail-dark .panel,
.layout-hot-rail-dark .card,
.layout-hot-rail-dark .pagination-link,
.layout-netflix-rail .panel,
.layout-netflix-rail .card,
.layout-netflix-rail .pagination-link,
.layout-score-grid .panel,
.layout-score-grid .card,
.layout-score-grid .pagination-link {
  background: var(--panel-bg);
  border-color: var(--line);
  color: var(--text);
}

.layout-channel-wall-dark .pagination-link.current,
.layout-hot-rail-dark .pagination-link.current,
.layout-netflix-rail .pagination-link.current,
.layout-score-grid .pagination-link.current,
.layout-dark-hero .pagination-link.current {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.layout-channel-wall-dark .topbar,
.layout-hot-rail-dark .topbar,
.layout-netflix-rail .topbar,
.layout-score-grid .topbar {
  background: rgba(18, 20, 26, 0.94);
  border-bottom-color: var(--line);
}

.layout-channel-wall-dark .brand,
.layout-hot-rail-dark .brand,
.layout-dark-hero .brand,
.layout-netflix-rail .brand,
.layout-score-grid .brand {
  color: #fff;
  text-shadow: none;
}

.layout-channel-wall-dark .brand span,
.layout-hot-rail-dark .brand span,
.layout-dark-hero .brand span,
.layout-netflix-rail .brand span,
.layout-score-grid .brand span {
  color: #fff;
}

.layout-channel-wall-dark .section-title {
  border-bottom: 2px solid var(--brand);
  padding-bottom: 6px;
}

.layout-hot-rail-dark .hot-playing-item {
  flex-basis: 160px;
  max-width: 160px;
}

.layout-netflix-rail {
  --content-max-width: 1280px;
}

.layout-netflix-rail .shell {
  max-width: var(--content-max-width, 1280px);
}

.layout-netflix-rail .hot-playing-item {
  flex-basis: 180px;
  max-width: 180px;
}

.layout-netflix-rail .hero-magazine {
  min-height: 260px;
  background: linear-gradient(120deg, #111 0%, color-mix(in srgb, var(--brand) 35%, #111) 100%);
  color: #fff;
}

.layout-maccms-light {
  --bg: #0f1115;
  --text: #e8edf5;
  --line: #2a3140;
  --panel-bg: #171b22;
  --content-max-width: 1440px;
  color-scheme: dark;
}

.layout-maccms-light .channel-row .section-title {
  font-size: 18px;
  border-left: 4px solid var(--brand);
  padding-left: 10px;
}

.layout-maccms-light .grid {
  gap: 12px;
}

.layout-maccms-light .search,
.family-classic-light .search {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

.layout-maccms-light .search input,
.family-classic-light .search input {
  color: #f3f4f6;
}

.layout-maccms-light .search input::placeholder,
.family-classic-light .search input::placeholder {
  color: #9aa4b2;
}

.layout-maccms-light .search button,
.family-classic-light .search button {
  color: var(--brand, #3b82f6);
}

.layout-dual-board .home-split-side .rank-list li {
  padding: 10px 0;
}

.layout-kids-soft {
  --bg: #f5f7fb;
  --radius: 12px;
}

.layout-kids-soft .card,
.layout-kids-soft .panel,
.layout-kids-soft .movie-card-list {
  border-radius: 12px;
}

.layout-filter-chip-portal .genre-chip-bar .topic-chip {
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 600;
}

.layout-filter-chip-portal .nav-primary .search,
.layout-editorial-portal .nav-primary .search,
.layout-score-grid .nav-primary .search {
  flex: 0 1 380px;
  max-width: 420px;
}

.layout-channel-wall-dark .search,
.layout-hot-rail-dark .search,
.layout-dark-hero .search,
.layout-netflix-rail .search,
.layout-score-grid .search {
  background: rgba(255, 255, 255, 0.18);
  border-color: transparent;
}

.layout-channel-wall-dark .search button,
.layout-hot-rail-dark .search button,
.layout-dark-hero .search button,
.layout-netflix-rail .search button,
.layout-score-grid .search button {
  color: var(--brand);
}

.layout-channel-wall-dark .search input,
.layout-hot-rail-dark .search input,
.layout-dark-hero .search input,
.layout-netflix-rail .search input,
.layout-score-grid .search input {
  color: #f3f4f6;
}

.layout-channel-wall-dark .search input::placeholder,
.layout-hot-rail-dark .search input::placeholder,
.layout-dark-hero .search input::placeholder,
.layout-netflix-rail .search input::placeholder,
.layout-score-grid .search input::placeholder {
  color: #9ca3af;
}

.layout-filter-chip-portal .grid {
  gap: 12px;
}

.layout-editorial-portal .hero-magazine {
  border-left: 6px solid var(--brand);
}

.layout-editorial-portal .announcement {
  background: color-mix(in srgb, var(--brand) 6%, white);
}

.layout-score-grid .movie-card-score {
  font-size: 14px;
  padding: 4px 9px;
}

.layout-wide-cinema {
  --content-max-width: 1360px;
}

.layout-wide-cinema .shell {
  max-width: var(--content-max-width, 1360px);
}

.layout-wide-cinema .hot-playing-item {
  flex-basis: 170px;
  max-width: 170px;
}

.layout-mobile-channels .home-channel-flow .grid {
  --grid-cols: 3;
  gap: 10px;
}

@media (max-width: 640px) {
  .layout-mobile-channels .home-channel-flow .grid {
    --grid-cols: 2;
  }

  .hot-playing-item {
    flex-basis: 120px;
  }
}

/* hero-stack：featured 模块是整块 section+grid，需改成横向滚动卡片 */
.layout-mobile-hero-stack .home-hero-scroll > section {
  display: contents;
}

.layout-mobile-hero-stack .home-hero-scroll .section-head {
  display: none;
}

.layout-mobile-hero-stack .home-hero-scroll .grid {
  display: contents;
}

.layout-mobile-hero-stack .home-hero-scroll .movie-card,
.layout-mobile-hero-stack .home-hero-scroll .card {
  flex: 0 0 156px;
  width: 156px;
  max-width: 156px;
  scroll-snap-align: start;
}

/* —— 系统提示页（404 / 410 / 429 / 维护 / 出错）—— */
.system-notice-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: 48px 16px;
}

.system-notice {
  /* 卡片固定浅色底，不继承深色布局的 --text/--muted，避免浅字配浅底 */
  --notice-text: #172033;
  --notice-muted: #475467;
  --notice-accent: #344054;
  --notice-code-fg: #344054;
  --notice-code-bg: #f2f4f7;
  --notice-code-border: #d0d5dd;
  position: relative;
  width: min(100%, 520px);
  margin: 0 auto;
  padding: 36px 28px 32px;
  text-align: center;
  border-radius: var(--radius, 14px);
  border: 1px solid color-mix(in srgb, var(--notice-code-border) 70%, var(--brand) 30%);
  background:
    linear-gradient(
      165deg,
      color-mix(in srgb, var(--brand) 8%, #fff) 0%,
      color-mix(in srgb, var(--bg) 40%, #fff) 48%,
      #fff 100%
    );
  box-shadow: var(--shadow-card, 0 10px 28px rgba(23, 32, 51, 0.06));
  overflow: hidden;
}

.system-notice__glow {
  position: absolute;
  inset: -40% -20% auto;
  height: 70%;
  background: radial-gradient(
    ellipse at center,
    color-mix(in srgb, var(--brand) 18%, transparent),
    transparent 70%
  );
  pointer-events: none;
}

.system-notice__badge {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--notice-accent);
}

.system-notice__glyph {
  width: 52px;
  height: 52px;
}

.system-notice__code {
  display: inline-block;
  min-width: 3.2em;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--notice-code-fg);
  background: var(--notice-code-bg);
  border: 1px solid var(--notice-code-border);
}

.system-notice__title {
  position: relative;
  margin: 0 0 10px;
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  line-height: 1.35;
  font-weight: 700;
  color: var(--notice-text);
}

.system-notice__desc {
  position: relative;
  margin: 0 auto;
  max-width: 36em;
  font-size: 15px;
  line-height: 1.65;
  color: var(--notice-muted);
}

.system-notice__hint {
  position: relative;
  margin: 12px 0 0;
  font-size: 13px;
  color: color-mix(in srgb, var(--notice-muted) 85%, var(--notice-accent) 15%);
}

.system-notice__ip {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 14px 0 0;
  color: var(--notice-muted);
  font-size: 14px;
}

.system-notice__ip code {
  padding: 3px 8px;
  border: 1px solid var(--notice-code-border);
  border-radius: 6px;
  background: var(--notice-code-bg);
  color: var(--notice-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  user-select: all;
}

.system-notice__actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 22px;
}

.system-notice__actions .btn {
  min-width: 120px;
}

.system-notice__actions .btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-secondary {
  border: 1px solid var(--line) !important;
  background: #fff !important;
  color: var(--text) !important;
}

.btn-secondary:hover {
  border-color: color-mix(in srgb, var(--brand) 35%, var(--line)) !important;
  color: var(--brand) !important;
}

.system-notice__meter {
  position: relative;
  width: min(100%, 280px);
  height: 6px;
  margin: 16px auto 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line) 70%, #fff);
  overflow: hidden;
}

.system-notice__meter-bar {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--brand) 70%, #fff),
    var(--brand)
  );
  transition: width 0.9s linear;
}

.system-notice--rate-limited .system-notice__code {
  color: #b54708;
  background: color-mix(in srgb, #f79009 14%, #fff);
  border-color: color-mix(in srgb, #f79009 28%, var(--line));
}

.system-notice--rate-limited .system-notice__badge {
  color: #dc6803;
}

.system-notice--gone .system-notice__code {
  color: #b42318;
  background: color-mix(in srgb, #f04438 12%, #fff);
  border-color: color-mix(in srgb, #f04438 24%, var(--line));
}

.system-notice--gone .system-notice__badge {
  color: #d92d20;
}

.system-notice--maintenance .system-notice__code {
  color: #b54708;
  background: color-mix(in srgb, #f79009 12%, #fff);
  border-color: color-mix(in srgb, #f79009 24%, var(--line));
}

.system-notice--maintenance .system-notice__badge {
  color: #dc6803;
}

.system-notice--error .system-notice__code {
  color: color-mix(in srgb, var(--text) 70%, var(--brand) 30%);
  background: color-mix(in srgb, var(--brand) 10%, #fff);
  border-color: color-mix(in srgb, var(--brand) 20%, var(--line));
}

.system-notice--error .system-notice__badge {
  color: var(--brand);
}

@media (max-width: 560px) {
  .system-notice {
    padding: 28px 18px 24px;
  }

  .system-notice__actions .btn {
    flex: 1 1 140px;
  }
}


/* M16：编辑器显式配置「每行列数」时（MovieGrid 输出 --grid-cols），桌面端覆盖族 CSS 写死的栅格；
   移动端维持 2 列自适应，避免运营设 6 列后窄屏挤爆。未配置列的模块没有该 inline 变量，完全不受影响。 */
[style*="--grid-cols"] {
  grid-template-columns: repeat(var(--grid-cols), minmax(0, 1fr)) !important;
}
/* 瀑布流用 column-count 而非 grid-template-columns，显式列数走同一变量。 */
.home-masonry-gallery[style*="--grid-cols"] {
  column-count: var(--grid-cols) !important;
}
@media (max-width: 720px) {
  [style*="--grid-cols"] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .home-masonry-gallery[style*="--grid-cols"] {
    column-count: 2 !important;
  }
}

/* M20：手工内容块只在运营新增块时输出；无块时原 DOM/CSS 不变。 */
.home-banner-wide-manual-list {
  display: flex;
  gap: 12px;
  padding: 0 18px 16px;
  overflow-x: auto;
}
.home-banner-wide-manual {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  white-space: nowrap;
}
.home-banner-wide-manual img {
  width: 72px;
  height: 44px;
  object-fit: cover;
  border-radius: 4px;
}
.home-magazine-cover-manual .home-magazine-cover-title {
  color: var(--brand, #1677ff);
}

/* M22：分区级样式变量，未显式设置时选择器不匹配，存量 DOM/CSS 零变化。 */
[style*="--section-bg"] {
  background: var(--section-bg) !important;
}
[style*="--section-padding"] {
  padding: var(--section-padding) !important;
}
[style*="--section-heading"] .section-title,
[style*="--section-heading"] h2,
[style*="--section-heading"] h3 {
  color: var(--section-heading) !important;
}
[style*="--section-density:compact"] [class*="movie-grid"],
[style*="--section-density:compact"] .home-magazine-cover {
  gap: 6px !important;
}
[style*="--section-density:relaxed"] [class*="movie-grid"],
[style*="--section-density:relaxed"] .home-magazine-cover {
  gap: 22px !important;
}

/* M22：只在 section 显式配置 mobile 时覆盖族断点，未配置零回归。 */
@media (max-width: 899px) {
  [style*="--mobile-cols"] > .home-magazine-cover,
  [style*="--mobile-cols"] > .home-masonry-gallery,
  [style*="--mobile-cols"] > .home-gallery-wall,
  [style*="--mobile-cols"] > .home-icon-nav,
  [style*="--mobile-cols"] > .rank-list,
  [style*="--mobile-cols"] > .rank-boards {
    grid-template-columns: repeat(var(--mobile-cols), minmax(0, 1fr)) !important;
  }
  [style*="--mobile-horizontal"] > .home-magazine-cover,
  [style*="--mobile-horizontal"] > .home-gallery-wall,
  [style*="--mobile-horizontal"] > .home-icon-nav,
  [style*="--mobile-horizontal"] > .rank-list {
    display: flex;
    overflow-x: auto;
    flex-wrap: nowrap;
  }
  [style*="--mobile-order"] {
    order: var(--mobile-order);
  }
}
