/* ==========================================
   CSS Variables — tp35_white_pink：淺灰白底 + 櫻花粉主色（視覺參考 xhkan1.top 亮色版）
   色值依目標站亮色主題實測（背景 #f8f8fa／次底 #f0f0f2／主色 #fe9aaf／主文字 #1a1a2e）
   重新整理為本主題 token，元件內一律引用變數，不寫死色碼
   ========================================== */
:root {
  --section-gap:  24px;   /* 模塊間統一垂直間距（skill 強制 20；decisions.md 間距 24px） */
  --bg-base:       #f8f8fa;   /* 全站淺灰白背景 */
  --bg-topbar:     rgba(255, 255, 255, 0.95);   /* 白色頂欄（半透明＋模糊） */
  --bg-card:       #ffffff;   /* 卡片／面板底色 */
  --bg-elevated:   #f0f0f2;   /* 次一階底色：輸入框、pill、頁尾、hover */
  --bg-tertiary:   #e5e5e8;   /* 圖片佔位、圓形圖示按鈕底 */

  --accent:        #fe9aaf;   /* 櫻花粉主色：選中導覽、篩選 pill、CTA */
  --accent-hover:  #f7708f;
  --accent-deep:   #e8557a;   /* 白底上 hover 文字用的加深粉，確保可讀性 */
  --accent-light:  rgba(254, 154, 175, 0.16);
  --accent-grad:   linear-gradient(135deg, #ffb3c3 0%, #fe9aaf 45%, #f7708f 100%);

  --badge-red:     linear-gradient(to right, #ff711f 0%, #e50914 100%);   /* 卡片「更新至／全N集」角標 */
  --badge-orange:  linear-gradient(-45deg, #faaf61 0%, #ff5f00 100%);    /* 卡片類型角標 */

  --gold:          #ffb400;   /* 評分星級金色 */
  --gold-2:        #ff7a00;
  --gold-grad:     linear-gradient(104deg, var(--gold) 9.95%, var(--gold-2) 86.56%);

  --tag-purple:    #8b7cf6;

  --text-1:        #1a1a2e;   /* 標題／主要文字 */
  --text-2:        #4a4a63;   /* 導覽／次要文字 */
  --text-3:        rgba(26, 26, 46, 0.48);   /* 三級文字 */
  --text-label:    rgba(0, 0, 0, 0.6);        /* 篩選列左側標籤 */

  --border:        rgba(26, 26, 46, 0.10);
  --border-2:      #d0d0d0;

  --score-hi:      #ff9500;
  --score-mid:     #35c980;

  --shadow-sm:     0 2px 10px rgba(26, 26, 46, 0.06);
  --shadow-md:     0 12px 32px rgba(26, 26, 46, 0.12);

  /* 舊頁面 CSS 內引用、但基底主題從未定義的別名變數（補齊，避免 fallback 成繼承色） */
  --text-pri:      var(--text-1);
  --text-sec:      var(--text-2);
  --text-muted:    var(--text-3);
  --bg-sidebar:    var(--bg-card);

  --container:     1600px;    /* 全站內容最大寬度（含兩側內距） */
  --page-pad:      clamp(20px, 4vw, 72px);   /* 全站兩側留白：隨螢幕寬度連續縮放（§21.2），≤767px 為 12px */
  --topbar-h:      64px;
  --radius:        12px;
  --radius-sm:     8px;
  --radius-pill:   999px;
}

/* ==========================================
  Base Reset
   ========================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background-color: var(--bg-base);
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-base);
  color: var(--text-1);
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}

a { text-decoration: none; color: inherit; }
img { display: block; background: url(../img/load.gif) no-repeat center/cover, var(--bg-elevated); }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }
ul { list-style: none; }
/* 評論列表／楼中楼用 ul，歸零瀏覽器預設內距（樣式主體在各頁 css） */
.cmt-item-reply-list { margin: 0; padding: 0; list-style: none; }
.cmt-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 0; }

/* 僅供螢幕閱讀器使用，不影響視覺呈現 */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.mac-icon {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  width: 1em;
  height: 1em;
  fill: currentColor;
  flex-shrink: 0;
}

/* 全站 icon 基底樣式：取代原本 <iconify-icon> 自訂元素的內建行為
   （iconify-icon 已移除，改用 public/icons.html 的 SVG sprite，見 §21.25）。
   width/height:1em 讓 icon 尺寸跟著容器 font-size 縮放（原本 iconify-icon 的預設行為），
   fill:currentColor 讓 icon 顏色跟著 color 走，沿用全站原本大量「.xxx iconify-icon { color:... }」
   的既有用法模式，改成 .mac-icon 後行為完全一致，不需要逐一調整套用顏色的地方。 */

/* ==========================================
   Page Layout — 無 Sidebar，純全寬
   ========================================== */
.page-shell {
  min-height: 100vh;
  background-color: var(--bg-base);
}

.main-area {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-base);
}

/* ==========================================
   Topbar — 仿 xhkan1.top：白色扁平頂欄，左 Logo、導覽靠右（圖示＋文字、選中粉色字），
   右側為「假輸入框」搜尋鈕＋「观看记录」文字鈕；手機版改為兩列（Logo/按鈕列＋可橫滑導覽列）
   ========================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--bg-topbar);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  height: var(--topbar-h);
  padding: 0;
}

.topbar-inner {
  display: flex;
  align-items: center;
  height: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--page-pad);
  gap: 24px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 28px;
  flex: 1;
  min-width: 0;
}

/* Logo */
.topbar-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}
.brand-logo-img {
  height: 36px;
  width: auto;
  max-width: 150px;
  object-fit: contain;
  background: none;
  flex-shrink: 0;
}

/* Horizontal nav — 純文字＋前置小圖示，無膠囊底色，緊接 Logo 從前頭排列；選中與 hover 皆為粉色字 */
.topbar-nav {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex: 1;
  min-width: 0;
  gap: 22px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.topbar-nav::-webkit-scrollbar { display: none; }

.tn-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0;
  font-size: 15px;
  font-weight: 400;
  color: var(--text-2);
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.2s;
}
.tn-item .mac-icon { font-size: 16px; }

.tn-item:hover { color: var(--accent-deep); }
.tn-item.is-active { color: var(--accent-deep); font-weight: 600; }

/* "更多" dropdown — tablet nav overflow */
.tn-more-wrap {
  position: relative;
  display: none;
  flex-shrink: 0;
}
.tn-more-btn { gap: 3px; }
.tn-more-caret {
  font-size: 11px;
  transition: transform 0.2s;
}
.tn-more-btn[aria-expanded="true"] .tn-more-caret { transform: rotate(180deg); }
.tn-more-menu {
  display: none;
  position: fixed;  /* fixed 繞開所有上層 overflow 限制 */
  min-width: 132px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  z-index: 9999;
  padding: 6px 0;
  box-shadow: var(--shadow-md);
}
.tn-more-menu.is-open { display: block; }
.tn-more-menu .tn-item {
  display: flex;
  height: auto;
  padding: 9px 16px;
  width: 100%;
}
.tn-more-menu .tn-item:hover { background: var(--bg-elevated); }
.tn-more-menu .tn-item::after { display: none; }

/* Right actions */
.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

/* 搜尋：外觀仿目標站的灰底輸入框，實際仍是 #searchToggle 按鈕（點擊開啟 search overlay） */
.tb-search-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 192px;
  height: 34px;
  padding: 0 10px 0 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-2);
  border-radius: 4px;
  color: var(--text-3);
  font-size: 14px;
  transition: border-color 0.2s;
  flex-shrink: 0;
}
.tb-search-box .mac-icon { font-size: 16px; color: var(--text-2); }

.tb-search-box:hover { border-color: var(--accent); }
.tb-search-ph { white-space: nowrap; }

/* 观看记录：圖示＋文字 */
.tb-hist-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  color: var(--text-2);
  white-space: nowrap;
  transition: color 0.2s;
  flex-shrink: 0;
}
.tb-hist-btn .mac-icon { font-size: 16px; }

.tb-hist-btn:hover { color: var(--accent-deep); }

/* ==========================================
   Search Overlay — 全屏彈出式搜尋
   ========================================== */
.search-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(248, 248, 250, 0.97);
  backdrop-filter: blur(6px);
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
}
.search-overlay.is-open { display: flex; }

.search-overlay-inner {
  width: 100%;
  max-width: 680px;
  padding: 0 20px;
}

.search-bar {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-pill);
  padding: 4px 4px 4px 18px;
  gap: 8px;
  transition: border-color 0.2s;
}
.search-bar:focus-within { border-color: var(--accent); }

.search-bar-icon {
  color: var(--text-3);
  font-size: 20px;
  flex-shrink: 0;
}

#searchInput {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-1);
  font-size: 16px;
  padding: 10px 0;
  min-width: 0;
}
#searchInput::placeholder { color: var(--text-3); }

.search-submit-btn {
  padding: 9px 22px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
  transition: background 0.2s;
}
.search-submit-btn:hover { background: var(--accent-hover); }

.search-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--text-3);
  font-size: 18px;
  flex-shrink: 0;
  transition: color 0.2s, background 0.2s;
}
.search-close-btn:hover { color: var(--text-1); background: rgba(26, 26, 46, 0.05); }

.search-drop {
  display: flex;
  flex-direction: column;
  padding: 12px 4px 4px;
}
.sd-group + .sd-group { margin-top: 6px; }
.sd-group-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px 6px;
}
.sd-label {
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.5px;
}
.sd-clear {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: var(--text-3);
  font-size: 14px;
  transition: color 0.2s, background 0.2s;
}
.sd-clear:hover { color: var(--text-1); background: rgba(26, 26, 46, 0.05); }
.sd-list { list-style: none; counter-reset: sd-counter; }
.sd-item { counter-increment: sd-counter; }
.sd-word {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 10px;
  padding: 7px 6px;
  border: none;
  background: transparent;
  border-radius: 6px;
  font: inherit;
  font-size: 13px;
  color: var(--text-2);
  text-align: left;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.sd-num {
  flex-shrink: 0;
  width: 16px;
  font-size: 12px;
  color: var(--text-3);
  text-align: center;
}
.sd-num::before { content: counter(sd-counter); }
.sd-word:hover { background: rgba(26, 26, 46, 0.05); color: var(--accent-deep); }
.sd-word:hover .sd-num { color: var(--accent-deep); }

/* ==========================================
   Page Content
   ========================================== */
.page-content { flex: 1; }

/* ==========================================
   Hero Banner — 仿 xhkan1.top：置中 container 內的圓角滿版輪播（非滿螢幕寬），
   整張投影片即為連結（導向詳情頁），左下角大標題＋兩行簡介，
   左右圓形半透明箭頭（#heroPrev／#heroNext），底部置中圓點指示（選中拉長為膠囊）
   ========================================== */
.hero-wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 24px var(--page-pad) 0;
  width: 100%;
}
.hero-banner {
  position: relative;
  height: 450px;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  margin-bottom: var(--section-gap);
  /* 允許手機版左右滑動切換投影片（見 hero.js），同時保留垂直滾動頁面 */
  touch-action: pan-y;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: block;
  opacity: 0;
  transition: opacity 0.7s ease;
  pointer-events: none;
  z-index: 1;
  color: #fff;
}
.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-color: var(--bg-tertiary);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  transform: scale(1.03);
  transition: transform 6s ease;
}
.hero-slide.is-active .hero-bg { transform: scale(1); }

/* 底部漸層：from black/82 → via black/20 → transparent（目標站實測值） */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
    rgba(0, 0, 0, 0.82) 0%,
    rgba(0, 0, 0, 0.20) 45%,
    rgba(0, 0, 0, 0) 100%);
}

.hero-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 32px 32px 44px;
}
.hero-title {
  max-width: 100%;
  color: #fff;
  font-size: 36px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hero-meta {
  max-width: 672px;
  font-size: 16px;
  line-height: 24px;
  color: rgba(255, 255, 255, 0.8);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 左右切換箭頭 */
.hero-arrow {
  position: absolute;
  top: 45%;
  z-index: 5;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #fff;
  font-size: 20px;
  transition: background 0.2s;
}
.hero-arrow:hover { background: rgba(0, 0, 0, 0.65); }
.hero-arrow--prev { left: 12px; }
.hero-arrow--next { right: 12px; }

/* 底部置中圓點（沿用 #heroPlaylist／.hero-playlist-item／data-idx，hero.js 不需改 selector） */
.hero-playlist {
  position: absolute;
  left: 50%;
  bottom: 12px;
  z-index: 5;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-playlist-item {
  width: 8px;
  height: 8px;
  padding: 0;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.55);
  transition: background 0.2s, width 0.25s;
}
.hero-playlist-item:hover { background: rgba(255, 255, 255, 0.75); }
.hero-playlist-item.is-active {
  width: 24px;
  background: #fff;
}

@media (max-width: 1023px) {
  .hero-banner { height: 400px; }
}
@media (max-width: 767px) {
  .hero-wrap { padding-top: 12px; }
  .hero-banner { height: 280px; margin-bottom: var(--section-gap); }
  .hero-content { padding: 16px 16px 30px; }
  .hero-title { font-size: 20px; margin-bottom: 0; }
  .hero-meta { display: none; }
  .hero-arrow { width: 32px; height: 32px; font-size: 16px; }
}
@media (max-width: 639px) {
  .hero-banner { height: clamp(184px, 52vw, 228px); }
}

/* ==========================================
   Content Block — 內容區塊容器（仿目標站 container 1280px＋左右 16px 內距；
   16px 為最小值，任何寬度都不會變 0，符合 §21.2「不可出現留白斷層」原則）
   ========================================== */
.content-block {
  max-width: var(--container);
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  padding: 0 var(--page-pad);
  margin-bottom: var(--section-gap);
}
.index-main { padding-bottom: 8px; }

.section-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

/* 區塊標題：20px 粗體純文字（目標站無色條／圖示） */
.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1.4;
}
.section-title-icon {
  color: var(--accent-deep);
  font-size: 18px;
  display: flex;
}

/* 「查看更多 ›」 */
.section-more {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 14px;
  color: var(--text-2);
  transition: color 0.2s;
}
.section-more .mac-icon { font-size: 16px; }

.section-more:hover { color: var(--accent-deep); }

/* 首页分类区块标题行：当前分类日排行（index.md 强制 2.3）——横向滚动、不换行、移动端隐藏；序号用 CSS 计数，前三名主题色 */
.section-hd > .section-title,
.section-hd > .section-more { flex-shrink: 0; }
.sh-dayrank { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; font-size: 13px; }
.sdr-label { flex-shrink: 0; display: inline-flex; align-items: center; gap: 3px; color: var(--accent-deep); font-weight: 600; }
.sdr-list { display: flex; gap: 16px; min-width: 0; overflow-x: auto; scrollbar-width: none; list-style: none; margin: 0; padding: 0; counter-reset: sdr; }
.sdr-list::-webkit-scrollbar { display: none; }
.sdr-list > li { flex-shrink: 0; white-space: nowrap; counter-increment: sdr; }
.sdr-item { color: var(--text-2); }
.sdr-item::before { content: counter(sdr); margin-right: 4px; font-weight: 700; color: var(--text-3); }
.sdr-list > li:nth-child(-n+3) .sdr-item::before { color: var(--accent-deep); }
.sdr-item:hover { color: var(--accent-deep); }
@media (max-width: 767px) { .sh-dayrank { display: none; } }

/* ==========================================
   VOD Grid — 一般清單頁：多欄自動換行
   ========================================== */
.vod-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 20px 16px;
}

/* 首頁／分類模塊專用：固定六欄（不橫向捲動） */
.vod-row--fixed { grid-template-columns: repeat(6, minmax(0, 1fr)); }
/* ==========================================
   VOD Card — 仿 xhkan1.top：2:3 圓角海報，左上角貼邊漸層角標（更新狀態＋類型），
   hover 時海報微放大＋黑色半透明遮罩＋毛玻璃播放圓鈕＋底部兩行簡介，片名置中於下方
   ========================================== */
.vod-card { position: relative; min-width: 0; }
.vod-card a { display: block; }

.vod-thumb {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 2/3;
  background: var(--bg-tertiary);
}
.vod-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.vod-card:hover .vod-thumb img { transform: scale(1.05); }

/* ===== 影視卡網格（單一來源，skill 強制 11.9／11.10）：
   一行 6 列（≤1199px 4 列、≤600px 3 列）；想改單頁列數只加修飾類，不動 base 規則。 ===== */
.vod-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 20px 16px;
  margin-bottom: var(--section-gap);
}
@media (max-width: 1199px) {
  .vod-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .vod-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 10px; }
}

/* 详情页「关联系列」：收起时每个断点只留一行（6/4/3 列），detail.js 判断有被收起的项才显示按钮 */
.rel-series-grid { margin-bottom: 0; }
.rel-series-grid.is-collapsed > li:nth-child(n+7) { display: none; }
@media (max-width: 1199px) { .rel-series-grid.is-collapsed > li:nth-child(n+5) { display: none; } }
@media (max-width: 600px)  { .rel-series-grid.is-collapsed > li:nth-child(n+4) { display: none; } }
.rel-toggle { display: inline-flex; align-items: center; gap: 4px; margin-top: 12px; padding: 6px 14px; font-size: 13px; color: var(--text-2); background: none; border: 1px solid var(--border-2); border-radius: var(--radius-pill); cursor: pointer; transition: color .2s, border-color .2s; }
.rel-toggle[hidden] { display: none; }
.rel-toggle:hover { color: var(--accent-deep); border-color: var(--accent); }

/* 影視卡 hover 不放播放 icon（decisions.md 全局：影視卡 hover 弹层不要播放 icon） */

/* ===== hover 彈出詳情卡（skill 強制15）：寬度 170% 跨出欄寬，置中展開；
   靠視窗邊緣時由 vod_card.js 加 .pop-left／.pop-right 改為貼齊左／右緣，避免被裁切；移動端隱藏 ===== */
.vod-card:hover { z-index: 30; }
.vod-pop {
  position: absolute;
  top: -10px;
  left: 50%;
  width: 170%;
  transform: translateX(-50%);
  transform-origin: center top;
  z-index: 30;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: 0 18px 44px rgba(26, 26, 46, 0.2);
  overflow: hidden;
  /* 未 hover 時 display:none（對照 tp30 .hover-popout）：絕對定位的 170% 寬浮層若只用 opacity/visibility 隱藏，
     仍會計入 scrollWidth，最右一列卡片會撐出橫向捲軸（decisions.md tp16 已記錄此坑）。
     display 無法 transition，淡入改用 @keyframes（0.15s hover 意圖延遲 + 0.2s 淡入縮放）；
     縮放用獨立的 scale 屬性，transform 只管定位，pop-left／pop-right 翻轉不必各寫一套動畫。 */
  display: none;
}
/* 只在真正支持悬停、且宽度 ≥768px 的设备打开浮层：触屏点击会触发 :hover，
   若不加限定，:hover 规则的优先级会盖过下方移动端的 display:none（强制 15「移动端隐藏」） */
@media (hover: hover) and (min-width: 768px) {
  .vod-card:hover .vod-pop {
    display: block;
    animation: vodPopIn 0.2s ease 0.15s both;
  }
}
@keyframes vodPopIn {
  from { opacity: 0; scale: 0.94; }
  to   { opacity: 1; scale: 1; }
}
.vod-card.pop-left .vod-pop { left: 0; transform: none; transform-origin: left top; }
.vod-card.pop-right .vod-pop { left: auto; right: 0; transform: none; transform-origin: right top; }
.vod-pop-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg-tertiary);
}
.vod-pop-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vod-pop-body { padding: 12px 14px 14px; }
.vod-pop-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vod-pop-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 8px; font-size: 11px; }
.vem-tag { color: var(--text-2); background: var(--bg-elevated); border-radius: 4px; padding: 1px 6px; }
.vem-tag--accent { color: var(--accent-deep); background: var(--accent-light); }
.vem-score { display: inline-flex; align-items: center; gap: 3px; color: var(--score-hi); font-weight: 700; }
.vem-score .mac-icon { font-size: 11px; }

.vod-pop-genres { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.veg-tag { font-size: 11px; color: var(--accent-deep); border: 1px solid var(--accent); border-radius: var(--radius-pill); padding: 0 8px; }
.vod-pop-people {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vod-pop-people span { color: var(--text-3); }
.vod-pop-desc {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-2);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (max-width: 767px) {
  .vod-pop { display: none; }
}

/* 左上角貼邊角標（右側圓角） */
.vod-badge-tl {
  position: absolute;
  top: 8px; left: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  max-width: 90%;
  z-index: 3;
  pointer-events: none;
}
.vbadge {
  max-width: 100%;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  color: #fff;
  border-radius: 0 4px 4px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vbadge--remark {
  background: var(--badge-red);
  box-shadow: 0 10px 12px -4px rgba(229, 9, 20, 0.25);
}
.vbadge--class {
  background: var(--badge-orange);
  box-shadow: 0 1px 1px rgba(255, 95, 0, 0.15);
}

/* 右下角評分小膠囊（hover 時讓位給簡介） */
.vod-meta-bar {
  position: absolute;
  right: 6px; bottom: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 3;
  transition: opacity 0.2s;
}
.vod-card:hover .vod-meta-bar { opacity: 0; }

.vod-rate {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.55);
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
}
.vod-rate .mac-icon { font-size: 11px; }

.vod-name {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-1);
  transition: color 0.2s;
}
.vod-card:hover .vod-name { color: var(--accent-deep); }

.vod-sub {
  margin-top: 2px;
  font-size: 12px;
  text-align: center;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 767px) {
  .vbadge { font-size: 10px; padding: 2px 6px; }
  .vod-name { font-size: 13px; margin-top: 6px; }
}

/* ==========================================
   登入／註冊表單（user/login、user/reg、widget/login_form 共用）
   ========================================== */
.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-2);
  border-radius: 14px;
  padding: 32px 28px 28px;
  width: 340px;
  max-width: calc(100vw - 32px);
  position: relative;
  box-shadow: 0 20px 60px rgba(26, 26, 46, 0.14);
}
.modal-title { font-size: 18px; font-weight: 700; margin-bottom: 24px; }
.modal-field { margin-bottom: 16px; }
.modal-label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 6px; }
.modal-input {
  width: 100%;
  padding: 10px 13px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-1);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}
.modal-input:focus { border-color: var(--accent); }
.modal-submit {
  width: 100%;
  padding: 13px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 700;
  transition: background 0.2s;
  margin-top: 6px;
}
.modal-submit:hover { background: var(--accent-hover); }
.modal-footer {
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-3);
}
.modal-link { color: var(--text-2); transition: color 0.2s; }
.modal-link:hover { color: var(--accent-deep); }
.modal-link--accent { color: var(--accent-deep); }

/* ==========================================
   History Modal
   ========================================== */
.hm-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 46, 0.45);
  z-index: 9000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.hm-overlay.is-open { display: flex; }

.hm-box {
  background: var(--bg-card);
  border: 1px solid var(--border-2);
  border-radius: 12px;
  width: 100%;
  max-width: 700px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(26, 26, 46, 0.14);
}
.hm-header {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.hm-title {
  flex: 1;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-1);
}
.hm-clear {
  font-size: 13px;
  color: var(--text-3);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition: color 0.15s;
}
.hm-clear:hover { color: var(--accent-deep); }
.hm-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-3);
  transition: background 0.15s, color 0.15s;
}
.hm-close:hover { background: var(--border); color: var(--text-1); }
.hm-body {
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-content: flex-start;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.hm-body::-webkit-scrollbar { width: 4px; }
.hm-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.hm-card {
  flex: 0 0 calc((100% - 50px) / 6);
  min-width: 0;
  display: block;
  text-decoration: none;
  color: var(--text-1);
  align-self: flex-start;
}
.hm-thumb {
  position: relative;
  aspect-ratio: 2/3;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-card);
  contain: strict;
}
.hm-thumb img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s;
}
.hm-card:hover .hm-thumb img { transform: scale(1.04); }
.hm-card:hover .hm-name { color: var(--accent-deep); }
.hm-name {
  margin-top: 5px;
  font-size: 11px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.15s;
}
.hm-empty {
  width: 100%;
  text-align: center;
  padding: 40px 0;
  color: var(--text-3);
  font-size: 13px;
}

/* ==========================================
   Footer — 內容同 tp31_dark_blue（免責聲明／ICP／網站地圖／版權），亮色淺灰底
   ========================================== */
.site-footer {
  margin-top: 0;   /* 與上方區塊的間距由區塊自身 margin-bottom（--section-gap 24px）提供（強制 20：間距統一） */
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  color: var(--text-1);
  font-size: 13px;
  line-height: 1.7;
}
.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--page-pad);
}
.site-footer .footer-inner { padding-top: 24px; }
.footer-note { font-size: 12px; color: var(--text-3); line-height: 1.8; }
.footer-links.footer-links--site { margin-top: 10px; padding-bottom: 16px; }
/* 修饰类提高优先级，避免被下方同优先级的 .footer-links a 覆盖（强制 11.8） */
.footer-links.footer-links--site a { font-size: 12px; color: var(--text-3); }

/* 友情链接列（首頁使用；樣式仿目標站頁尾「友情链接：」橫列） */
.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
}
.footer-links a { font-size: 14px; color: var(--text-2); transition: color 0.2s; }
.footer-links a:hover { color: var(--accent-deep); }
.fl-label { font-size: 14px; font-weight: 700; color: var(--text-1); }

.footer-bottom-bar {
  padding: 16px 0;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 12px;
  color: var(--text-3);
}

/* ==========================================
   漂浮功能按鈕 (FAB)
   ========================================== */
.fab-group {
  position: fixed;
  bottom: 30px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 400;
}
.fab-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(254, 154, 175, 0.45);
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s, opacity 0.25s;
}
.fab-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 8px 28px rgba(254, 154, 175,0.6), 0 2px 10px rgba(26, 26, 46, 0.14);
}
.fab-btn--top { opacity: 0; pointer-events: none; }
.fab-btn--top.is-visible { opacity: 1; pointer-events: auto; }
.fab-qr-popup {
  position: fixed;
  bottom: 160px;
  right: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(26, 26, 46, 0.14);
  z-index: 401;
  display: none;
}
.fab-qr-popup.is-open { display: block; }
.fab-qr-popup figcaption { font-size: 12px; color: var(--text-2); margin-bottom: 10px; }
.fab-qr-popup img { width: 130px; height: 130px; border-radius: 4px; background: #fff; display: block; }

/* ==========================================
   Comments (shared)
   ========================================== */

.gbook-count { font-size: 13px; font-weight: 400; color: var(--text-3); margin-left: 6px; }

/* ==========================================
   Rank Widgets
   ========================================== */
.rank-col {
  background: var(--bg-card);
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.rank-col-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-bottom: 1px solid var(--border);
}
.rank-col-title { padding: 12px; font-size: 14px; font-weight: 700; color: var(--text-1); }
.rch-badge { font-size: 10px; padding: 2px 6px; border-radius: 3px; background: var(--accent-light); color: var(--accent-deep); margin-left: 6px; }
.rank-col-more { font-size: 12px; color: var(--text-3); }
.rank-col-more:hover { color: var(--accent-deep); }
.rank-top1 { padding: 12px; border-bottom: 1px solid var(--border); }
.rank-top1 a { display: flex; gap: 10px; }
.rt1-thumb {
  position: relative; flex-shrink: 0;
  width: 56px; height: 78px;
  border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-elevated);
}
.rt1-thumb img { width: 100%; height: 100%; object-fit: cover; }
.rt1-crown { position: absolute; top: 3px; left: 3px; color: var(--score-hi); font-size: 13px; text-shadow: 0 1px 4px rgba(0,0,0,0.8); }
.rt1-info { flex: 1; min-width: 0; }
.rt1-name { font-size: 13px; font-weight: 600; color: var(--text-1); margin-bottom: 4px; }
.rank-top1 a:hover .rt1-name { color: var(--accent-deep); }
.rt1-meta { font-size: 11px; color: var(--text-3); margin-bottom: 3px; }
.rt1-status { font-size: 11px; color: var(--text-3); margin-bottom: 5px; }
.rt1-hits { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: var(--score-hi); }
.rank-list { list-style: none; padding: 6px 0; }
.rank-li { border-bottom: 1px solid rgba(26, 26, 46, 0.05); }
.rank-li:last-child { border-bottom: none; }
.rank-li-inner {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; font-size: 13px; color: var(--text-2); transition: background 0.15s;
}
.rank-li-inner:hover { background: var(--bg-elevated); color: var(--text-1); }
.rl-num {
  flex-shrink: 0; width: 20px; height: 20px;
  border-radius: 3px; background: var(--bg-elevated);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--text-3);
}
.rl-name { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.rl-hits { flex-shrink: 0; font-size: 11px; color: var(--text-3); display: flex; align-items: center; gap: 2px; }

/* ==========================================
   Art Card (文章資訊 — 橫向清單卡)
   ========================================== */
/* 文章／專題卡網格用 ul>li（skill 強制 2.3）；li 內的卡片撐滿等高 */
.art-card-item, .topic-card-item { display: flex; min-width: 0; }
.art-card-item > .art-card, .topic-card-item > .topic-card { flex: 1; min-width: 0; }
.art-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 28px; }
@media (max-width: 1199px) { .art-grid { grid-template-columns: 1fr; } }
.art-card {
  position: relative;
  display: flex; align-items: flex-start; gap: 14px;
  color: var(--text-1);
}
.art-card-thumb {
  position: relative; flex: 0 0 150px; width: 150px; aspect-ratio: 4/3;
  overflow: hidden; border-radius: var(--radius-sm); background: var(--bg-elevated);
}
.art-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.art-card:hover .art-card-thumb img { transform: scale(1.05); }
.art-card-nopic { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 30px; color: var(--text-3); }

.art-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.art-card-title {
  font-size: 15px; font-weight: 700; color: var(--text-1); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; transition: color 0.2s;
}
.art-card:hover .art-card-title { color: var(--accent-deep); }
.art-card-desc {
  font-size: 12.5px; color: var(--text-3); line-height: 1.7;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==========================================
   首頁排行榜三欄（index.html .rank-home-grid）
   ========================================== */
.rank-home-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* ==========================================
   Topic Card
   ========================================== */
.topic-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.topic-card {
  display: flex; flex-direction: column;
  background: var(--bg-card); border: none; border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden; transition: transform 0.25s, box-shadow 0.25s; color: var(--text-1);
}
.topic-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.topic-card-thumb { position: relative; aspect-ratio: 16/9; overflow: hidden; background: var(--bg-elevated); }
.topic-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.topic-card:hover .topic-card-thumb img { transform: scale(1.04); }
.topic-card-count { position: absolute; bottom: 8px; right: 8px; padding: 2px 8px; background: rgba(0,0,0,0.65); color: #fff; font-size: 11px; border-radius: 3px; }
.topic-card-body { padding: 12px 14px; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.topic-card-title { font-size: 14px; font-weight: 600; color: var(--text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color 0.2s; }
.topic-card:hover .topic-card-title { color: var(--accent-deep); }
.topic-card-blurb { font-size: 12px; color: var(--text-3); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ==========================================
   Mobile Tabbar — 白色毛玻璃底欄，選中為粉色圖示＋文字（仿目標站）
   ========================================== */
.mobile-tabbar {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  height: 56px; background: var(--bg-topbar);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 12px rgba(26, 26, 46, 0.04);
  z-index: 300; flex-direction: row;
}
.mtb-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 2px; height: 100%;
  color: var(--text-2); font-size: 10px;
  text-decoration: none; position: relative; transition: color 0.2s;
}
.mtb-item .mac-icon { font-size: 22px; transition: transform 0.2s; }

.mtb-item.is-active { color: var(--accent-deep); }
.mtb-item.is-active .mac-icon { transform: scale(1.1); }

/* ==========================================
   Pagination
   ========================================== */
.pagination { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; padding: 28px 0 10px; }
.pg-btn, .pg-num {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-2);
  background: var(--bg-card); color: var(--text-2); font-size: 13px; transition: all 0.2s;
}
.pg-btn:hover, .pg-num:hover { color: var(--accent-deep); border-color: var(--accent); }
.pg-num.is-active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.pg-info { font-size: 12px; color: var(--text-3); margin-left: 8px; }

/* ==========================================
   Download page
   ========================================== */

/* 详情页剧情收起样式只在 vod_detail.css 的 #detailDesc.desc-collapsed 定义一份（强制 11.9；原通用 .desc-collapsed/.desc-expanded 已无引用） */

/* ==========================================
   Ad Slots
   ========================================== */

/* 實測站內促銷橫幅為金色系（呼應「立即訂閱」按鈕漸層），與導覽/卡片的青藍主色區隔開來 */
.site-ad { border-radius: var(--radius); border: 1px solid rgba(255, 180, 0,0.3); background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-elevated) 100%); overflow: hidden; position: relative; }
.site-ad::before { content: ''; position: absolute; top: 0; left: 0; width: 3px; height: 100%; background: var(--gold-grad); border-radius: var(--radius) 0 0 var(--radius); }
.site-ad--banner { display: flex; align-items: center; gap: 12px; padding: 8px 14px 8px 18px; font-size: 12px; color: var(--text-2); flex: 1; }
.site-ad-left { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.site-ad-icon { font-size: 18px; flex-shrink: 0; color: var(--gold); }
.site-ad-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.site-ad-text strong { font-size: 13px; color: var(--text-1); }
.site-ad-text span { font-size: 11px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-ad--sidebar { display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 18px; text-align: left; }
.site-ad--sidebar .site-ad-body { flex: 1; min-width: 0; }
.site-ad-label { display: inline-block; font-size: 9px; color: var(--gold); margin-bottom: 3px; letter-spacing: 1px; text-transform: uppercase; }
.site-ad-title { font-size: 13px; font-weight: 700; color: var(--text-1); margin-bottom: 2px; }
.site-ad-desc { font-size: 11px; color: var(--text-3); line-height: 1.5; }
.site-ad-btn { display: inline-flex; align-items: center; flex-shrink: 0; padding: 6px 14px; background: var(--gold-grad); color: #fff; border-radius: var(--radius-sm); font-size: 12px; font-weight: 600; white-space: nowrap; transition: filter 0.2s; }
.site-ad-btn:hover { filter: brightness(1.1); }

/* ==========================================
   MAC.Pop 彈出層覆寫
   ========================================== */
.mac_pop_bg { background: rgba(26,26,46,0.45) !important; backdrop-filter: blur(4px); }
.mac_pop { background: var(--bg-card) !important; border: 1px solid var(--border) !important; border-radius: var(--radius) !important; box-shadow: 0 24px 64px rgba(26, 26, 46, 0.14) !important; padding: 0 !important; display: flex !important; flex-direction: column !important; overflow: hidden !important; }
.mac_pop .pop_top { display: flex !important; align-items: center !important; justify-content: space-between !important; height: auto !important; padding: 14px 16px !important; background: var(--bg-elevated) !important; border-bottom: 1px solid var(--border) !important; flex-shrink: 0 !important; }
.mac_pop .pop_top h2 { font-size: 15px !important; font-weight: 600 !important; color: var(--text-1) !important; margin: 0 !important; line-height: 1 !important; float: none !important; }
.mac_pop span.pop_close { float: none !important; width: 28px !important; height: 28px !important; font-size: 16px !important; text-indent: 0 !important; background: none !important; display: inline-flex !important; align-items: center !important; justify-content: center !important; border-radius: 50% !important; color: var(--text-3) !important; cursor: pointer !important; transition: color 0.2s, background 0.2s !important; line-height: 1 !important; }
.mac_pop span.pop_close:hover { color: var(--text-1) !important; background: var(--bg-base) !important; }
.mac_pop .pop_content { flex: 1 !important; overflow-y: auto !important; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.mac_pop_msg_bg { background: rgba(26,26,46,0.15) !important; }
.mac_pop_msg { background: var(--bg-elevated) !important; border: 1px solid var(--border) !important; border-radius: var(--radius-sm) !important; box-shadow: 0 4px 24px rgba(26, 26, 46, 0.14) !important; padding: 10px 20px !important; }
.mac_pop_msg .pop-msg { color: var(--text-1) !important; font-size: 13px !important; }

/* ==========================================
   Responsive
   ========================================== */
@media (max-width: 1199px) {
  .mobile-tabbar { display: flex; }
  .main-area { padding-bottom: 56px; }
}
@media (max-width: 1023px) {
  .rank-home-grid { grid-template-columns: repeat(3, 1fr); }
  .topic-grid     { grid-template-columns: repeat(3, 1fr); }
  .vod-row--fixed { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .site-ad--banner .site-ad-text span { display: none; }
  .fab-group { bottom: 76px; right: 14px; }
  .fab-qr-popup { bottom: 146px; right: 14px; }
  .fab-btn--qr { display: none; }
}

/* ==========================================
   Hamburger Button (hidden on desktop)
   ========================================== */
.hamburger-btn {
  display: none;
  align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  background: transparent; border: none;
  color: var(--text-2); font-size: 22px;
  cursor: pointer; transition: color 0.2s, background 0.2s;
}
.hamburger-btn:hover { color: var(--text-1); background: var(--bg-elevated); }

/* ==========================================
   Mobile Nav Drawer
   ========================================== */
.mob-nav-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(26, 26, 46, 0.35);
  z-index: 499;
}
.mob-nav-overlay.is-open { display: block; }

.mob-nav-drawer {
  position: fixed; top: 0; right: 0;
  width: 240px; height: 100dvh;
  background: var(--bg-topbar);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-left: 1px solid var(--border);
  z-index: 500;
  transform: translateX(100%);
  /* 收起态 visibility:hidden：不撑出横向滚动、链接不可被键盘聚焦/读屏读到（decisions tp16/tp24）；
     visibility 不做时长过渡（coding-rules 5.2）：关闭时延到滑出结束（.28s）才隐藏，打开时立即可见 */
  visibility: hidden;
  transition: transform 0.28s cubic-bezier(.4,0,.2,1), visibility 0s linear 0.28s;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  display: flex; flex-direction: column;
}
.mob-nav-drawer.is-open { transform: translateX(0); visibility: visible; transition: transform 0.28s cubic-bezier(.4,0,.2,1), visibility 0s linear 0s; }
.mob-nav-drawer::-webkit-scrollbar { display: none; }

.mnd-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.mnd-title { font-size: 14px; font-weight: 600; color: var(--text-2); }
.mnd-close {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: transparent; border: none;
  color: var(--text-2); font-size: 18px; cursor: pointer;
  transition: color 0.2s, background 0.2s;
}
.mnd-close:hover { color: var(--text-1); background: var(--bg-elevated); }

.mnd-nav { display: flex; flex-direction: column; padding: 8px 0; flex: 1; }

.mnd-item {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 20px;
  color: var(--text-2); font-size: 15px;
  text-decoration: none; transition: color 0.2s, background 0.2s;
}
.mnd-item:hover { color: var(--text-1); background: var(--bg-elevated); }
.mnd-item.is-active { color: var(--accent-deep); }
.mnd-item .mac-icon { font-size: 20px; flex-shrink: 0; }

@media (max-width: 767px) {
  /* .content-block 间距、.mobile-tabbar 显示、.main-area 底部留白已由基础规则与 ≤1199px 规则覆盖，不在此重复（强制 11.9） */
  .vod-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 10px; }
  .art-grid       { grid-template-columns: 1fr; gap: 16px; }
  .art-card-thumb { flex-basis: 110px; width: 110px; }
  .art-card-title { font-size: 14px; }
  .topic-grid     { grid-template-columns: repeat(2, 1fr); }
  .rank-home-grid { grid-template-columns: 1fr; }
  .hm-overlay { padding: 16px; }
  .hm-box { max-height: 85vh; }
  .hm-card { flex: 0 0 calc((100% - 20px) / 3); }

  /* 手機版頂欄：兩列（Logo＋圓形按鈕列／可橫滑導覽列），仿目標站手機版 */
  :root { --topbar-h: 104px; --page-pad: 12px; }
  .topbar { height: auto; }
  .topbar-inner { flex-wrap: wrap; height: auto; padding-top: 10px; gap: 0; }
  .topbar-left { display: contents; }
  .topbar-brand { order: 1; height: 40px; }
  .brand-logo-img { height: 32px; }
  .topbar-right { order: 2; margin-left: auto; gap: 8px; }
  .topbar-nav { order: 3; flex: 0 0 100%; justify-content: flex-start; gap: 20px; margin-top: 10px; padding: 6px 0 10px; border-top: 1px solid var(--border); scroll-snap-type: x proximity; }
  .tn-item { height: 30px; font-size: 17px; scroll-snap-align: start; }
  .tn-item .mac-icon { display: none; }

  .tb-search-box { width: 36px; height: 36px; padding: 0; justify-content: center; border: none; border-radius: 50%; background: var(--bg-tertiary); }
  .tb-search-ph { display: none; }
  .tb-hist-btn { width: 36px; height: 36px; justify-content: center; border-radius: 50%; background: var(--bg-tertiary); }
  .tb-hist-btn span { display: none; }
  .hamburger-btn { display: flex; width: 36px; height: 36px; border-radius: 50%; background: var(--bg-tertiary); font-size: 18px; }
}

/* ==========================================
   Section Lazy Reveal (Intersection Observer)
   ========================================== */
.content-block.will-observe {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.content-block.is-visible {
  opacity: 1;
  transform: none;
}

/* ===== Breadcrumb 面包屑（widget/breadcrumb：nav>ol>li，全站唯一来源；强制 3.2 / 11.9）
   基础版用于内容栏内；--wide 版用于整宽页（左右 gutter 与 .content-block 对齐）；深色底版由各页覆盖颜色 ===== */
.breadcrumb { font-size: 13px; color: var(--text-3); margin-bottom: var(--section-gap); }
.breadcrumb ol { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; list-style: none; margin: 0; padding: 0; }
.breadcrumb li { display: inline-flex; align-items: center; min-width: 0; }
.breadcrumb a { color: var(--text-3); }
.breadcrumb a:hover { color: var(--accent-deep); }
.breadcrumb .bc-sep { display: inline-flex; margin: 0 4px; color: var(--text-3); }
.breadcrumb .bc-current { color: var(--text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60vw; }
.breadcrumb--wide { max-width: var(--container); margin: 16px auto var(--section-gap); padding: 0 var(--page-pad); }
@media (max-width: 767px) {
  .breadcrumb--wide { margin: 10px 0 var(--section-gap); }
}

/* ==========================================
   tp35_white_pink — 亮色主題補充（卡片陰影、面板白底、清單間距）
   ========================================== */
.friend-links-row { padding: 16px 20px; background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow-sm); }

/* 排行榜名次配色（label-rank 強制 6.1：用 :nth-child，不在模板內 if／elseif 判斷）。
   第 1 名由 widget/rank_top（皇冠）呈現，.rank-list 從第 2 名起（start="2"），
   所以 li:nth-child(1)＝第 2 名（銀）、nth-child(2)＝第 3 名（銅），第 4 名起維持預設色。 */
.rank-list > li:nth-child(1) .rl-num { background: #b0b8c8; color: #1a1a1a; }
.rank-list > li:nth-child(2) .rl-num { background: #c28060; color: #1a1a1a; }
/* 資訊側欄「熱播影視」（widget/art_hot_vod，art/type 與 art/detail 共用 → 樣式集中在 main.css，原 art_type.css） */
.art-hot-list { padding: 8px 0; }
.art-hot-list li a {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 16px; font-size: 13px; color: var(--text-2);
    transition: color 0.2s;
}
.art-hot-list li a:hover { color: var(--accent-deep); }
.ahl-num {
    flex-shrink: 0; width: 20px; height: 20px;
    border-radius: 3px; background: var(--bg-elevated);
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; color: var(--text-3);
}
.ahl-name { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
/* 資訊側欄「熱播影視」前三名配色（art-type 強制 6.1：用 :nth-child，不在模板內 if／elseif） */
.art-hot-list > li:nth-child(1) .ahl-num { background: #f0b429; color: #1a1a1a; }
.art-hot-list > li:nth-child(2) .ahl-num { background: #b0b8c8; color: #1a1a1a; }
.art-hot-list > li:nth-child(3) .ahl-num { background: #c28060; color: #1a1a1a; }

/* ===== 排行榜頁 label/rank 專屬變體（原 label_rank.css，限定 .rank-wrap 內；強制 11.9 同名 class 只在 main.css 定義） ===== */
.rank-wrap .rank-col { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.rank-wrap .rank-col-hd { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.rank-wrap .rank-col-title { padding: 12px; font-size: 14px; font-weight: 700; color: var(--text-1); }
.rank-wrap .rank-col-more { font-size: 12px; color: var(--text-3); transition: color .15s; }
.rank-wrap .rank-col-more:hover { color: var(--accent-deep); }
.rank-wrap .rank-top1 { padding: 14px 16px; border-bottom: 1px solid var(--border); }
.rank-wrap .rank-top1 > a { display: flex; gap: 12px; align-items: flex-start; text-decoration: none; }
.rank-wrap .rt1-thumb { position: relative; width: 64px; flex-shrink: 0; border-radius: var(--radius-sm); overflow: hidden; }
.rank-wrap .rt1-thumb img { width: 100%; aspect-ratio: 2/3; object-fit: cover; display: block; }
.rank-wrap .rt1-crown { position: absolute; top: 4px; left: 4px; font-size: 16px; color: var(--score-hi); line-height: 1; filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)); }
.rank-wrap .rt1-info { flex: 1; min-width: 0; }
.rank-wrap .rt1-name { font-size: 14px; font-weight: 600; color: var(--text-1); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .15s; }
.rank-wrap .rank-top1 > a:hover .rt1-name { color: var(--accent-deep); }
.rank-wrap .rt1-meta { font-size: 12px; color: var(--text-3); margin-bottom: 4px; }
.rank-wrap .rt1-status { font-size: 12px; color: var(--score-mid); }
.rank-wrap .rt1-hits { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--accent-deep); margin-top: 6px; }
.rank-wrap .rank-list { list-style: none; padding: 4px 0; margin: 0; }
.rank-wrap .rank-li { border-bottom: 1px solid var(--border); }
.rank-wrap .rank-li:last-child { border-bottom: none; }
.rank-wrap .rank-li-inner { display: flex; align-items: center; gap: 10px; padding: 9px 16px; text-decoration: none; transition: background .15s; }
.rank-wrap .rank-li-inner:hover { background: var(--accent-light); }
.rank-wrap .rank-li-inner:hover .rl-name { color: var(--accent-deep); }
.rank-wrap .rl-num { width: 22px; height: 22px; border-radius: 4px; background: var(--bg-elevated); color: var(--text-3); font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.rank-wrap .rl-name { flex: 1; font-size: 13px; color: var(--text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .15s; }
.rank-wrap .rl-hits { font-size: 11px; color: var(--text-3); flex-shrink: 0; display: flex; align-items: center; gap: 2px; }

/* ===== 登入／註冊／跳轉頁專屬變體（原 jump.css，限定 .jump-main 內） ===== */
.jump-main .modal-field { display: flex; flex-direction: column; gap: 6px; }
.jump-main .modal-label { font-size: 12px; color: var(--text-2); font-weight: 500; }
.jump-main .modal-input { height: 40px; padding: 0 12px; background: var(--bg-elevated); border: 1px solid var(--border-2); border-radius: var(--radius-sm); color: var(--text-1); font-size: 14px; outline: none; transition: border-color .15s; }
.jump-main .modal-input:focus { border-color: var(--accent); }
.jump-main .modal-submit { height: 42px; background: var(--accent); color: #fff; font-size: 15px; font-weight: 600; border: none; border-radius: var(--radius-sm); cursor: pointer; transition: background .15s; }
.jump-main .modal-submit:hover { background: var(--accent-hover); }
.jump-main .modal-footer { font-size: 13px; color: var(--text-3); text-align: center; margin-top: 8px; }
.jump-main .modal-link--accent { color: var(--accent-deep); text-decoration: none; }
.jump-main .modal-link--accent:hover { text-decoration: underline; }

/* ===== 文章詳情頁關聯影視卡片列（原 art_detail.css 的 .vod-row，限定 .art-layout 內；強制 11.9） ===== */
.art-layout .vod-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }   /* 中栏固定 3 列（3 的倍数，decisions tp06：art_rel_vod 6 条＝2 行） */
@media (max-width: 768px) { .art-layout .vod-row { gap: 10px; } }

/* ==========================================
   共用元件樣式（原散落在 vod_detail／art_detail／actor／vod_show 等頁面 css 的重複定義，
   依 skill 強制 11.9 合併為單一來源；以 vod_detail 版本為準）
   ========================================== */
/* ---------- actor grid ---------- */
.actor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
    margin-bottom: var(--section-gap);
}
.actor-card { display: block; }
@media (max-width: 768px) { .actor-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; } }   /* 原在 vod_show.css，收口单一来源（强制 11.9） */
.ac-thumb {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 2/3;
    background: var(--bg-elevated);
}
.ac-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.actor-card:hover .ac-thumb img { transform: scale(1.05); }
.ac-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 48px; color: var(--text-3);
}
.ac-score {
    position: absolute; bottom: 6px; right: 6px;
    background: rgba(240,180,41,0.9); color: #1a1a1a;
    font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 3px;
}
.ac-info { padding: 6px 2px 0; }
.ac-name {
    font-size: 13px; color: var(--text-1); font-weight: 500;
    overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.ac-meta { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.art-layout {
    max-width: var(--container); margin: 0 auto;
    display: grid;
    grid-template-columns: 200px 1fr 240px;
    gap: 20px;
    padding: 20px var(--page-pad) 40px;
    align-items: start;
}
.art-layout > * { min-width: 0; }   /* grid 子项显式 min-width:0，长标题/长 URL 不撑爆中栏（强制 11.8） */
/* ---------- left nav (shared) ---------- */
.art-leftnav {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden;
    position: sticky; top: calc(var(--topbar-h) + 12px);
}
.aln-item {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 16px; font-size: 14px; color: var(--text-2);
    border-bottom: 1px solid var(--border); transition: all 0.2s;
}
.aln-list { list-style: none; margin: 0; padding: 0; }   /* 资讯左栏改 ul/li（强制 2.3） */
.aln-list > li:last-child .aln-item { border-bottom: none; }
.aln-item:hover { color: var(--text-1); background: var(--bg-elevated); }
/* ---------- sidebar ---------- */
.art-sidebar { position: sticky; top: calc(var(--topbar-h) + 12px); }
.art-sb-block {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden; margin-bottom: var(--section-gap);
}
.art-sb-title {
    display: flex; align-items: center; gap: 6px;
    font-size: 14px; font-weight: 600; color: var(--text-1);
    padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.art-sb-read-list { padding: 8px 12px; }
.art-sb-item a { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.art-sb-item:last-child a { border-bottom: none; }
.asi-thumb { flex-shrink: 0; width: 64px; height: 42px; border-radius: 4px; overflow: hidden; background: var(--bg-elevated); }
.asi-thumb img { width: 100%; height: 100%; object-fit: cover; }
.asi-info { flex: 1; min-width: 0; }
.asi-title { font-size: 13px; color: var(--text-2); line-height: 1.4; margin-bottom: 4px; }
.art-sb-item a:hover .asi-title { color: var(--accent-deep); }
.asi-cat { font-size: 11px; color: var(--text-3); }
.detail-section {
  margin-bottom: var(--section-gap);
}
.detail-section-hd {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-pri);
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
/* ===== Comment Section ===== */
.cmt-total-label { font-size: 13px; font-weight: 400; color: var(--text-muted); margin-left: 6px; }
.cmt-total-label em { color: var(--accent-deep); font-style: normal; }
.cmt-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: var(--section-gap);
}
.cmt-textarea {
  display: block;
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-pri);
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.cmt-textarea:focus { border-color: var(--accent); }
.cmt-textarea::placeholder { color: var(--text-muted); }
.cmt-form-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.cmt-verify-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.cmt-verify-input {
  width: 90px;
  padding: 6px 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-pri);
  font-size: 12px;
  outline: none;
}
.cmt-captcha-img { height: 30px; border-radius: 3px; cursor: pointer; flex-shrink: 0; }
.cmt-form-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.cmt-remaining { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.cmt-remaining em { color: var(--accent-deep); font-style: normal; }
.cmt-submit-btn {
  padding: 7px 20px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.cmt-submit-btn:hover { opacity: 0.85; }
.cmt-item {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.cmt-item:last-child { border-bottom: none; }
.cmt-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-elevated);
  color: var(--text-sec);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-transform: uppercase;
}
.cmt-body { flex: 1; min-width: 0; }
.cmt-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.cmt-name { font-size: 13px; font-weight: 600; color: var(--text-pri); }
.cmt-time { font-size: 11px; color: var(--text-muted); }
.cmt-content { font-size: 13px; color: var(--text-sec); line-height: 1.6; margin: 0 0 6px; }
.cmt-child-item {
  margin-top: 8px;
  padding: 8px 12px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border-left: 2px solid var(--border);
}
.cmt-child-name { font-size: 12px; font-weight: 600; color: var(--text-pri); margin-right: 6px; }
.cmt-actions { display: flex; gap: 12px; margin-top: 4px; }
.cmt-action-link {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.cmt-action-link:hover { color: var(--accent-deep); }
.cmt-empty {
  padding: 32px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}
.cmt-loading {
  font-size: 13px;
  color: var(--text-muted);
  padding: 24px 0;
  text-align: center;
}
.cmt-paging {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 16px 0 4px;
}
.cmt-page-btn {
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 13px;
  color: var(--text-sec);
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}
.cmt-page-btn:hover { border-color: var(--accent); color: var(--accent-deep); }
/* tp35：原本即屬本頁的規則（曾被誤移至 main.css 後移回） */
.aln-item.is-active { color: var(--accent-deep); background: var(--accent-light); font-weight: 600; }
.aln-item .mac-icon { font-size: 16px; }
.cmt-page-btn.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.cmt-page-btn.is-disabled { opacity: 0.4; cursor: default; pointer-events: none; }

/* 列表空態（vod/show、vod/type 共用；skill 強制 5.4／decisions.md 空態） */
.show-empty {
    padding: 60px 20px;
    text-align: center;
    color: var(--text-3);
}
.show-empty .mac-icon {
    font-size: 48px;
    display: block;
    margin: 0 auto 16px;
    color: var(--text-3);
}
.show-empty p { font-size: 15px; color: var(--text-2); margin-bottom: 6px; }
.show-empty .se-hint { font-size: 13px; color: var(--text-3); }

/* ===== 详情/播放/下载共用：播放列表 widget、分享弹窗（原在 vod_detail.css；播放页不再整份加载 vod_detail.css，强制 11.9） ===== */
.playlist-section {
  margin-bottom: var(--section-gap);
}
.share-modal { display: none; }
.share-modal.is-open { display: block; }
.share-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26,26,46,0.45);
  z-index: 1400;
}
.share-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1401;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  width: min(380px, 92vw);
  box-shadow: 0 16px 40px rgba(26,26,46,0.16);
}
.share-popup-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}
.share-popup-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-pri);
  margin: 0 0 16px;
}
.share-popup-icons {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}
.spi {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  color: var(--text-sec);
  font-size: 12px;
  cursor: pointer;
}
.spi-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text-pri);
  border: 1px solid var(--border);
}
.share-popup-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 8px;
}
.share-popup-link {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 12px;
  color: var(--text-sec);
  resize: none;
  height: 52px;
  box-sizing: border-box;
  display: block;
  margin-bottom: 10px;
}
.share-popup-copy {
  width: 100%;
  padding: 9px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.share-popup-copy:hover { opacity: 0.88; }
.playlist-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.playlist-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-pri);
}
.pl-sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 5px 12px;
  font-size: 13px;
  color: var(--text-sec);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.pl-sort-btn:hover { color: var(--accent-deep); border-color: var(--accent); }
.playlist-sources {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.pl-source-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text-sec);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.pl-source-tab.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.playlist-empty {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}
.playlist-panel { display: none; }
.playlist-panel.is-active { display: block; }
.playlist-notice {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
  padding: 7px 12px;
  background: var(--bg-card);
  border-radius: var(--radius);
}
.playlist-episodes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0 0 4px;   /* 选集改 ul/li（强制 2.3） */
}
.playlist-episodes > li { display: flex; min-width: 0; max-width: 100%; }
.playlist-episodes.episodes-collapsed {
  max-height: calc(2 * (32px + 6px));
  overflow: hidden;
}
.episode-btn {
  display: inline-block;
  max-width: 100%;          /* 超长集名换行显示，不裁切也不撑破容器（vod-detail 8.2 / vod-play 9.2） */
  overflow-wrap: anywhere;
  text-align: center;
  padding: 5px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 13px;
  color: var(--text-sec);
  text-decoration: none;
  white-space: normal;
  line-height: 1.5;
  transition: border-color 0.15s, color 0.15s;
}
.episode-btn:hover { border-color: var(--accent); color: var(--accent-deep); }
.episode-btn.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.episode-more-trigger {
  display: flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  margin: 8px 0 0 auto;
  padding: 5px 12px;
  border: 1px dashed var(--border);
  border-radius: 4px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.episode-more-trigger:hover { color: var(--accent-deep); border-color: var(--accent); }
@media (max-width: 640px) {
  .playlist-sources {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    scroll-behavior: smooth;
  }
  .playlist-sources::-webkit-scrollbar { display: none; }
  .pl-source-tab {
    flex: 0 0 auto;
    white-space: nowrap;
    scroll-snap-align: start;
  }
}

/* ===== 评论区补充（原分散在 vod_detail.css / art_detail.css，收口单一来源，强制 11.9） ===== */
.cmt-verify-input:focus { border-color: var(--accent); }
.cmt-ajax-wrap { border: none; background: transparent; min-height: 60px; }
.cmt-child-item .cmt-time { font-size: 11px; color: var(--text-3); }
.cmt-child-item .cmt-content { margin-top: 4px; color: var(--text-2); }
@media (max-width: 640px) {
  .cmt-form-footer { flex-direction: column; align-items: stretch; }
  .cmt-form-right { margin-left: 0; justify-content: space-between; }
}

/* ===== 资讯页布局响应式（资讯分类 + 资讯详情共用，原两份页面 css 断点不一致，收口单一来源，强制 11.9） ===== */
@media (max-width: 1023px) {
  .art-layout { grid-template-columns: 140px 1fr; gap: 14px; padding: 16px 16px 60px; }
  .art-sidebar { display: none; }
}
@media (max-width: 767px) {
  .art-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 10px 10px 80px; overflow-x: hidden; }
  .art-leftnav { position: static; border-radius: var(--radius); min-width: 0; width: 100%; }
  .aln-list { display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .aln-list::-webkit-scrollbar { display: none; }
  .aln-list > li { flex-shrink: 0; }
  .aln-item { border-bottom: none; border-right: 1px solid var(--border); padding: 9px 14px; font-size: 13px; white-space: nowrap; }
  .aln-list > li:last-child .aln-item { border-right: none; }
}

/* ===== 工具栏锚点（播放页 #playlist / #comment）避开吸顶 header ===== */
#playlist, .anchor-target { scroll-margin-top: calc(var(--topbar-h) + 12px); }

/* ===== 详情页 Hero（widget/detail_hero，vod/detail 与 vod/down 共用；原在 vod_detail.css，收口 main.css，强制 11.9） ===== */
.detail-wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 24px var(--page-pad) 0;
}
.detail-hero {
  position: relative;
  width: 100%;
  overflow: hidden;
}
.detail-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 20%;
  filter: blur(32px) brightness(1.1) saturate(1.15);
  transform: scale(1.15); /* 放大，避免模糊後邊緣露出銳利邊框 */
  z-index: 0;
}
.detail-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
      rgba(248,248,250,0.55) 0%,
      rgba(248,248,250,0.82) 65%,
      var(--bg-base) 100%);
  z-index: 1;
}
.detail-wrap--hero {
  position: relative;
  z-index: 2;
  padding-top: 36px;
}
.detail-top {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  padding-bottom: 24px;
}
.detail-poster {
  flex-shrink: 0;
  width: 250px;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(26,26,46,0.18);
}
.detail-poster img {
  width: 100%;
  display: block;
  aspect-ratio: 2/3;
  object-fit: cover;
}
.poster-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
}
.poster-score {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--score-mid);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.detail-info {
  flex: 1;
  min-width: 0;
  padding-top: 4px;
  /* 背景遮罩本輪調得很淺（見 .detail-hero-overlay），加一層文字陰影保底可讀性，
     沿用 §21.2 hero-badges/.hero-title-chip 已驗證過的作法，text-shadow 為
     可繼承屬性，掛在容器上即可讓標題／標籤／meta／簡介文字統一套用 */
  text-shadow: none; /* tp35 亮色主題：背景改為淺色霧面遮罩，深色文字不需陰影 */
}
.detail-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 4px;
}
.detail-title-row .detail-title { margin-bottom: 0; }
.detail-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-pri);
  margin: 0 0 4px;
  line-height: 1.3;
}
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.dtag {
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 12px;
  border: 1px solid var(--border);
  color: var(--text-sec);
  background: var(--bg-card);
}
.detail-meta {
  margin: 0 0 18px;
}
.dm-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 13px;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-sec);
}
.dm-row:last-child { border-bottom: none; }
.dm-row dt {
  color: var(--text-muted);
  flex-shrink: 0;
  width: 38px;
  font-weight: 500;
}
.dm-row dd {
  margin: 0;
  flex: 1;
  min-width: 0;
}
.dm-row dd a {
  color: var(--text-sec);
  text-decoration: none;
  margin-right: 4px;
}
.dm-row dd a:hover { color: var(--accent-deep); }
.dm-actors {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dm-actors a { display: inline; }
.dm-row--combo {
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 6px;
}
.dm-row--combo dt { width: auto; }
.dm-row--combo dd { flex: 0 1 auto; }
.dm-row--combo dd + dt {
  margin-left: 14px;
  padding-left: 20px;
  border-left: 1px solid var(--border);
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.detail-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: opacity 0.2s;
}
.detail-btn:hover { opacity: 0.85; }
.detail-btn--play {
  background: var(--accent);
  color: #fff;
}
.detail-btn--dl {
  background: var(--accent-light);
  border: 1px solid var(--accent);
  color: var(--accent-hover);
}
.detail-btn--share {
  background: var(--bg-elevated);
  border: 1px solid var(--border-2);
  color: var(--text-1);
}
.dm-status {
  display: inline-flex; align-items: center;
  padding: 1px 8px; margin-right: 6px;
  border-radius: 4px; font-size: 12px; font-weight: 600;
}
.dm-status--end { background: rgba(53, 201, 128, 0.14); color: #1f9d63; }
.dm-status--ing { background: var(--accent-light); color: var(--accent-deep); }
.dm-sep { margin: 0 4px; color: var(--text-3); }
@media (max-width: 640px) {
  .detail-hero-bg { filter: blur(18px) brightness(1.1) saturate(1.1); }
  .detail-top { flex-direction: column; align-items: center; }
  .detail-poster { width: 230px; }
  .detail-info { width: 100%; }
  .detail-wrap { padding: 16px var(--page-pad) 0; }
}
