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

* {
  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);
  }

  .nav-links-top {
    display: none !important;
  }

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

  .layout-bottom-tabs .nav-links-top,
  .topbar-bottom-nav .nav-links-top {
    display: none !important;
  }
}

@media (min-width: 768px) {
  .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: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.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) {
  /* 避免 overflow-x 裁切 PC 端 hover 下拉子菜单 */
  .nav.nav-single-row .nav-links-top,
  .nav.nav-single-row .nav-links:has(.nav-dropdown),
  .family-header-kids .nav-links,
  .chrome-nav-kids {
    overflow: visible;
  }

  /* 暗色宽轨等两行顶栏：nav-links 默认 overflow-x:auto 会连带裁切 dropdown */
  .nav-links:has(.nav-dropdown),
  .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;
  }

  /* 扩展 hover 热区，避免 trigger 与子菜单之间的间隙导致 :hover 丢失 */
  .nav-dropdown {
    padding-bottom: 8px;
    margin-bottom: -8px;
  }

  .nav-dropdown-menu {
    z-index: 40;
  }
}

.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;
}

.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;
}

.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: 8px;
  font-size: 16px;
  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: 4px 12px;
  margin: 0 4px;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--text, #172033);
  transition: color 0.15s ease, background-color 0.15s ease;
}

.nav-links .nav-dropdown {
  flex-shrink: 0;
  margin: 0 4px;
}

.nav-links .nav-dropdown-trigger {
  white-space: nowrap;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--text, #172033);
  transition: color 0.15s ease, background-color 0.15s ease;
}

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

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

.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,
.layout-channel-wall-dark .nav-links .nav-dropdown-trigger,
.layout-hot-rail-dark .nav-links .nav-dropdown-trigger,
.layout-dark-hero .nav-links .nav-dropdown-trigger,
.layout-netflix-rail .nav-links .nav-dropdown-trigger,
.layout-score-grid .nav-links .nav-dropdown-trigger {
  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,
.layout-channel-wall-dark .nav-links .nav-dropdown-trigger:hover,
.layout-hot-rail-dark .nav-links .nav-dropdown-trigger:hover,
.layout-dark-hero .nav-links .nav-dropdown-trigger:hover,
.layout-netflix-rail .nav-links .nav-dropdown-trigger:hover,
.layout-score-grid .nav-links .nav-dropdown-trigger:hover,
.layout-channel-wall-dark .nav-dropdown:hover > .nav-dropdown-trigger,
.layout-hot-rail-dark .nav-dropdown:hover > .nav-dropdown-trigger,
.layout-dark-hero .nav-dropdown:hover > .nav-dropdown-trigger,
.layout-netflix-rail .nav-dropdown:hover > .nav-dropdown-trigger,
.layout-score-grid .nav-dropdown:hover > .nav-dropdown-trigger {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
}

.nav-dropdown-chevron {
  font-size: 10px;
  opacity: 0.7;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% - 4px);
  left: 0;
  min-width: 160px;
  padding: 8px;
  background: var(--panel-bg, var(--panel, #fff));
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 30;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  color: var(--text, #172033);
}

.nav-dropdown-open .nav-dropdown-menu,
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  display: grid;
}

.nav-dropdown-menu a {
  padding: 8px 10px;
  white-space: nowrap;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text, #172033);
}

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

/* 暗色壳：下拉菜单与分类标签对比度 */
.layout-dark-hero .nav-dropdown-menu,
.layout-channel-wall-dark .nav-dropdown-menu,
.layout-hot-rail-dark .nav-dropdown-menu,
.layout-netflix-rail .nav-dropdown-menu,
.layout-score-grid .nav-dropdown-menu {
  background: var(--panel-bg, #171b22);
  border-color: var(--line);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  color: var(--text);
}

.layout-dark-hero .nav-dropdown-menu a,
.layout-channel-wall-dark .nav-dropdown-menu a,
.layout-hot-rail-dark .nav-dropdown-menu a,
.layout-netflix-rail .nav-dropdown-menu a,
.layout-score-grid .nav-dropdown-menu a {
  color: var(--text);
}

.layout-dark-hero .nav-dropdown-menu a:hover,
.layout-channel-wall-dark .nav-dropdown-menu a:hover,
.layout-hot-rail-dark .nav-dropdown-menu a:hover,
.layout-netflix-rail .nav-dropdown-menu a:hover,
.layout-score-grid .nav-dropdown-menu a:hover {
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 16%, transparent);
}

.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) {
  /* 频道分组：横滑 chip，点开展开层；禁止每项 width:100% 堆成手风琴占满首屏 */
  .nav-dropdown-accordion {
    flex: 0 0 auto;
    width: auto;
  }

  .nav-links,
  .chrome-nav-dark,
  .chrome-nav-kids,
  .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-bar::-webkit-scrollbar {
    display: none;
  }

  .nav-dropdown-accordion.nav-dropdown-open .nav-dropdown-trigger {
    color: var(--brand);
    background: color-mix(in srgb, var(--brand) 12%, transparent);
  }

  header.topbar {
    overflow: visible;
  }

  .nav-dropdown-sheet {
    position: absolute;
    left: 12px;
    right: 12px;
    top: 100%;
    z-index: 50;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    max-height: min(52vh, 360px);
    margin-top: 6px;
    padding: 8px;
    overflow-y: auto;
    background: var(--panel-bg, var(--panel, #fff));
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
    color: var(--text, #172033);
  }

  .nav-dropdown-sheet a {
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
    white-space: nowrap;
    color: var(--text, #172033);
  }

  .nav-dropdown-sheet a:hover,
  .nav-dropdown-sheet a:active {
    background: color-mix(in srgb, var(--brand) 12%, transparent);
    color: var(--brand);
  }

  .layout-dark-hero .nav-dropdown-sheet,
  .layout-channel-wall-dark .nav-dropdown-sheet,
  .layout-hot-rail-dark .nav-dropdown-sheet,
  .layout-netflix-rail .nav-dropdown-sheet,
  .layout-score-grid .nav-dropdown-sheet {
    background: var(--panel-bg, #171b22);
    border-color: var(--line);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    color: var(--text);
  }

  .layout-dark-hero .nav-dropdown-sheet a,
  .layout-channel-wall-dark .nav-dropdown-sheet a,
  .layout-hot-rail-dark .nav-dropdown-sheet a,
  .layout-netflix-rail .nav-dropdown-sheet a,
  .layout-score-grid .nav-dropdown-sheet a {
    color: var(--text);
  }
}

.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-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;
}

.channel-filter-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
  padding: 14px 16px;
}

.channel-filter-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  flex-wrap: wrap;
}

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

.channel-filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  flex: 1;
  min-width: 0;
}

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

.channel-filter-options a.is-active {
  color: var(--brand, #1677ff);
  font-weight: 600;
  background: color-mix(in srgb, var(--brand, #1677ff) 12%, transparent);
  border-color: color-mix(in srgb, var(--brand, #1677ff) 35%, var(--line));
}

.channel-filter-options a:not(.is-active) {
  border-color: var(--line);
}

.channel-sort-row {
  align-items: flex-start;
  border-top: 1px dashed var(--line);
  padding-top: 8px;
  margin-top: 2px;
}

.channel-filter-total {
  margin-left: auto;
  font-size: 13px;
  line-height: 28px;
  white-space: nowrap;
}

.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-filters {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 0 4px;
}

.channel-portal-filter-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}

.channel-portal-filter-label {
  flex-shrink: 0;
  width: 36px;
  font-size: 12px;
  color: var(--muted);
  padding-top: 5px;
}

.channel-portal-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.channel-portal-filter-chips a {
  padding: 3px 10px;
  border: 1px solid var(--line, #ddd);
  border-radius: 999px;
  font-size: 12px;
  text-decoration: none;
  color: var(--muted);
  transition: border-color 0.15s, color 0.15s;
}

.channel-portal-filter-chips a:hover {
  border-color: var(--brand);
  color: var(--brand);
}

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

.channel-list-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-bottom: 12px;
}

.channel-list-tabs a {
  font-size: 15px;
  text-decoration: none;
  color: inherit;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}

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

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

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

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

.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 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: 6px;
}

.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;
}

.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 0;
}

.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;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: min(56vw, 520px);
  background: #000;
  border-radius: 8px;
  overflow: hidden;
}

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

.artplayer-host .art-video-player {
  width: 100% !important;
  height: 100% !important;
}

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

.player-loading {
  color: #fff;
  font-size: 14px;
  background: rgba(0, 0, 0, 0.45);
  padding: 8px 14px;
  border-radius: 999px;
}

.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 {
  margin: 8px 0 0;
  padding: 8px 12px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--brand, #1677ff) 12%, transparent);
  font-size: 13px;
}

.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: 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: 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) 6%, var(--panel-bg, #fff));
}

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

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

@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;
  }
}

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

.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-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: 6px;
  margin-top: 16px;
  width: 100%;
  min-width: 0;
}

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

.pagination-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-bg, #fff);
  color: var(--text);
  font-size: 14px;
  line-height: 1;
}

.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;
}

.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: #f0f4f8;
  --text: #1f2937;
  --line: #d9e2ec;
}

.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-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__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;
  }
}

/* 移动端筛选：须放在 channel-portal-filter 等规则之后，避免被 display:flex 覆盖 */
@media (max-width: 767px) {
  .channel-filter-row,
  .channel-portal-filter-row {
    display: grid;
    grid-template-columns: 2.75rem minmax(0, 1fr);
    column-gap: 8px;
    row-gap: 6px;
    align-items: start;
  }

  .channel-filter-label,
  .channel-portal-filter-label {
    line-height: 32px;
    padding-top: 0;
  }

  .channel-filter-options,
  .channel-portal-filter-chips {
    flex-wrap: wrap;
    overflow: visible;
    gap: 8px;
    min-width: 0;
  }

  .channel-filter-options a {
    font-size: 13px;
    padding: 5px 12px;
  }

  .channel-sort-row {
    align-items: start;
  }

  .channel-filter-total {
    margin-left: 0;
    grid-column: 1 / -1;
  }

  .channel-portal-filter-label {
    width: auto;
  }

  .active-filter-chips {
    gap: 6px;
  }
}

