/* ============================================================
   tp21_dark_black — main.css
   本檔由 tp17_dark_black 的 main.css 整份複製而來（見 .claude/CLAUDE.md §1），
   結構／選擇器／功能鉤子完全不動，這裡只改了 :root 配色（橙→粉）跟新增
   Hero 輪播／頂欄搜尋框等 tp21 專屬的視覺調整，其餘規則沿用 tp17 原樣，
   不要看到「tp17」字樣的既有註解就以為寫錯檔案，那些是複製過來時保留的說明。
   視覺：黑底白字粉點綴，純頂欄導覽（無常駐側欄）＋漢堡抽屜選單，參考 4kvms.org 版式。
   ============================================================ */

/* ===== CSS Variables ===== */
:root {
  /* 背景層（黑底，比 tp17 的 #0B0B0D 更深、更接近純黑，比照 4kvms.org 截圖） */
  --bg-body:        #060607;
  --bg-page:        #060607;
  --bg-card:        #141416;
  --bg-card-hover:  #1C1C1F;
  --bg-elevated:    #19191C;
  --bg-input:       #1C1C1F;
  --bg-overlay:     rgba(0,0,0,.75);

  /* 主調色改為粉色（黑底白字＋粉色點綴，比照 4kvms.org 頂欄「首页」選中底線／
     Hero 分頁圓點的顏色），用法跟 tp17 的 --accent 完全對應，只是換色票。 */
  --accent:         #FF2D6A;
  --accent-hover:   #FF548A;
  --accent-grad:    linear-gradient(135deg, #FF2D6A 0%, #FF6F9C 100%);
  --accent-muted:   rgba(255,45,106,.14);

  --fill:           var(--accent);
  --fill-hover:     var(--accent-hover);

  /* 文字（白字系，黑底） */
  --text-1:         #FFFFFF;
  --text-2:         #ABABB0;
  --text-3:         #737379;

  --border:         #26262A;
  --border-light:   #33333A;

  --topbar-bg:          #0A0A0C;
  --topbar-input-bg:    rgba(255,255,255,.06);
  --sidebar-overlay:    rgba(0,0,0,.6);
  --sidebar-text:       rgba(255,255,255,.85);
  --sidebar-text-muted: rgba(255,255,255,.6);

  --topbar-h:       64px;
  --sidebar-w:      0px;  /* 純頂欄導覽，同 tp17，不要改回非 0，見 tp17 CLAUDE.md §1／§2 */
  --container-w:    none;
  /* 全站（含頂欄）不設寬度上限，鋪滿到瀏覽器左右邊緣——這點刻意跟 tp17 相反
     （tp17 CLAUDE.md §9 記錄的是「置中＋有上限」，那是 tp17 專屬、使用者
     比對 kuaibo8.com 後才要求的行為）。tp21 依使用者截圖回報，大螢幕下要
     像 tp13 那種「不置中、內容直接鋪到邊緣」的寬版面，不要看到 tp17 的
     --page-max-w 用法就照搬過來當成通用規則。 */
  --page-max-w:     none;
  --radius:         4px;
  --radius-sm:      3px;
  --shadow-card:    0 2px 14px rgba(0,0,0,.5);

  /* tp16 移植块（详情/播放/下载/分集/专题等页共用 CSS）用的 token 别名 */
  --border-2:       var(--border-light);
  --accent-light:   var(--accent-muted);
  --radius-pill:    50px;
  --content-max:    var(--page-max-w);
  --bg-base:        var(--bg-body);
  --score-hi:       var(--accent);
  --accent-2:       var(--rank-1);
  --accent-2-alt:   #ffe066;
  --shadow-panel:   0 10px 40px rgba(0,0,0,.6);

  --rank-1:         #FFD700;
  --rank-2:         #C0C0C0;
  --rank-3:         #CD7F32;
  --score-mid:      #FFB800;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg-body); color: var(--text-1); min-height: 100%; }
body { font-family: "PingFang SC","Microsoft YaHei",Arial,sans-serif; font-size: 14px; line-height: 1.6; }
a { text-decoration: none; color: inherit; }
a:hover { color: var(--accent); transition: .15s ease-in-out; }
/* 全域圖片佔位背景（需求方 skill §B 硬性要求）：裸 img{} 選擇器，全站所有
   內容 <img> 自動套用，不用逐個 widget 補——載入前透出這個底圖/底色、載入
   成功後被不透明的實際圖片蓋掉、載入失敗（onerror 沒接住或還沒觸發）時一樣
   透出這個占位，避免破圖時整塊變空白。sprite 圖示是 <svg> 不算 img，不受
   影響；logo 雖然這個專案是 <img>（不是 skill 假設的 CSS background-image），
   但 svg 秒開，實際上看不到占位背景閃現。 */
img { display: block; max-width: 100%; background: url(../img/load.gif) no-repeat center/cover, var(--bg-elevated); }
img[src$=".svg"], .dk-brand-img, .mnd-brand-img, .fab-qr-popup img { background: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }
.mac-icon { display: inline-flex; align-items: center; vertical-align: middle; }
input, select, textarea { font-family: inherit; }

/* ===== Page Shell =====
   side-nav 是浮在 main-area 上方的半透明疊層（見 §22.1），不佔版面寬度，
   所以這裡用 padding-left（讓 main-area 背景延伸到最左，側欄疊在上面）
   而不是 margin-left（那樣會挖出一塊空白，側欄後面就沒東西可透了）。 */
.page-shell { min-height: 100vh; }
.main-area  {
  min-height: 100vh; display: flex; flex-direction: column; padding-left: var(--sidebar-w);
  max-width: var(--page-max-w); margin: 0 auto;
}
.page-content { flex: 1; padding-top: var(--topbar-h); }

/* ===== Container ===== */
.warp { }
/* margin 不置中（不是 0 auto）：側欄已經把內容往右推過一次，
   若再置中會在側欄與內容之間多出一大塊空白，跟參考網站「內容緊貼側欄右緣」的版型不符。 */
.container { width: 100%; max-width: var(--container-w); margin: 0; padding: 0 16px; }

/* ===== Two-column layout ===== */
.page-body {
  display: flex; gap: 20px; align-items: flex-start;
  padding: 20px 0 40px;
}
.main-inner { flex: 1; min-width: 0; }
.mian-sidebar { width: 300px; flex-shrink: 0; }
.main-inner > *:first-child,
.mian-sidebar > *:first-child { margin-top: 0; }


/* ============================================================
   TOPBAR — 全寬固定於最上層
   ============================================================ */
/* topbar 是暗色 chrome（跟側欄同色系），跟頁面白底內容區分開，
   固定用 --topbar-bg／--sidebar-text 這類不隨主題變化的 token（見 CLAUDE.md §27）。 */
.dk-topbar {
  position: fixed; top: 0; left: 0; right: 0;
  max-width: var(--page-max-w); margin: 0 auto;
  height: var(--topbar-h);
  background: var(--topbar-bg);
  z-index: 300;
  /* auto 1fr auto（不是 1fr auto 1fr）：左右兩欄用 auto，剛好貼合 logo／
     .dk-right 自己的實際內容寬度，不會多留任何空隙；中間欄用 1fr 吃掉
     「整條 topbar 寬度 － logo 寬度 － .dk-right 寬度」剩下的那一段，導覽
     用 justify-self:center 在這段剩餘空間裡置中——這樣導覽只會相對於
     logo／.dk-right 的實際邊緣置中，不是相對於整條 topbar 置中。
     之前用 1fr auto 1fr 的問題：左右兩欄都是可伸縮的 1fr，就算 logo／
     .dk-right 本身沒那麼寬，欄位還是會被撐開到跟對向等寬（左右各分到
     一半的剩餘空間），變成導覽兩側各留一段等寬空隙、整個飄在 topbar
     正中央，跟 logo 距離很遠，不是「貼著 logo，只在剩下的空間裡置中」。 */
  display: grid; grid-template-columns: auto 1fr auto; align-items: center;
  padding: 0 20px;
  gap: 8px;
}

/* Logo 區塊：純頂欄導覽沒有側欄可對齊寬度，改用內距自然撐開；grid 第一欄
   （1fr）預設 justify-self:stretch，這裡改 start，logo 才會貼在欄位左邊
   而不是被拉伸/置中。 */
.dk-brand {
  justify-self: start;
  flex-shrink: 0;
  display: flex; align-items: center;
  height: 100%; padding-right: 12px;
}
.dk-brand-img { background: none; height: 30px; width: auto; }

/* 頂欄內嵌導覽連結（電影/連續劇/綜藝/動漫/專題/留言），資料來源與 .mob-nav-drawer
   共用同一份分類清單（見 widget/kb_nav_links），純文字、不帶圖示，跟參考網站一致。
   「排行榜」刻意不放進來——只在漢堡抽屜裡，比照參考網站頂欄只有到「留言」為止。 */
.dk-nav-links { justify-self: center; display: flex; align-items: center; gap: 28px; flex-shrink: 0; }
/* 選中/hover 都用「底部粉色短條」表示，不是文字變色（文字永遠白色）。
   hover 的短條用 scaleX 動畫從中間往左右展開（transform-origin 預設就是
   50% 50%，不用另外設定），不是單純 width:0→width:18px——width 動畫只會
   從某一端長出來，視覺上不是「從中間展開」，scaleX 才能左右對稱地展開。
   選中頁面（.is-active）不需要 hover 動畫，直接是展開後的狀態（scaleX(1)）。 */
.dk-nav-link {
  position: relative;
  font-size: 15px; color: var(--text-1); white-space: nowrap;
}
.dk-nav-link::after {
  content: ''; position: absolute; left: 50%; bottom: -20px;
  width: 28px; height: 3px; margin-left: -14px; border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0); transition: transform .25s ease;
}
.dk-nav-link:hover::after, .dk-nav-link.is-active::after { transform: scaleX(1); }

/* 「全部」漢堡按鈕：tp17 不分桌面/手機斷點，永遠顯示（見 .claude/CLAUDE.md），
   點擊開啟 .mob-nav-drawer（沿用 header.js 既有的 hamburgerBtn 邏輯，不用改 JS）。 */
/* tp21 專屬：漢堡按鈕改成純圖示圓形鈕（不帶「全部」文字／邊框），跟歷史圖示
   放在同一組 .dk-actions 裡，比照 4kvms.org 截圖的精簡風格。點擊行為完全沿用
   header.js 既有的 hamburgerBtn/mobNavDrawer 邏輯，沒有改 JS，只是拿掉文字
   標籤跟外框，圖示也換成 ph-list-checks（見 header.html 註解）。 */
.dk-hamburger {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  color: var(--text-2); font-size: 18px; flex-shrink: 0;
  transition: .15s;
}
.dk-hamburger:hover { color: #fff; background: rgba(255,255,255,.08); }
.dk-hamburger span { display: none; } /* HTML 裡保留的「全部」文字節點，這裡隱藏不刪，維持既有 DOM 結構 */

/* 搜尋框縮窄（480px→260px）＋確實靠右：.dk-topbar 是 flex，margin-left:auto
   把 .dk-search 自己（連同排在它後面的 .dk-actions）一起推到最右側，比照
   4kvms.org 截圖的搜尋框比例，不是塞滿中間一大段（使用者截圖回報過原本太寬）。 */
/* .dk-right：grid 第三欄（1fr），justify-self:end 貼右，裡面搜尋框＋圖示
   按鈕用一般 flex + gap 排列即可——原本 .dk-search 的 margin-left:auto 是
   flex 時代「自己撐開跟前面元素的距離」的寫法，現在外層 .dk-right 已經被
   grid 貼到最右邊了，這裡不需要再靠 auto margin 頂，拿掉。 */
.dk-right { justify-self: end; display: flex; align-items: center; gap: 12px; }
.dk-search {
  display: flex; align-items: center;
  flex: 0 0 260px; height: 36px;
  background: var(--topbar-input-bg); border: 1px solid var(--border);
  border-radius: 18px; overflow: hidden; padding-left: 4px;
}
.dk-search-type {
  flex-shrink: 0; height: 100%; padding: 0 8px 0 12px;
  border: none; outline: none;
  background: transparent; color: var(--text-2); font-size: 13px;
  -webkit-appearance: none; appearance: none;
  display: none; /* 參考站搜尋框沒有下拉分類，只保留欄位隱藏，功能鉤子仍在 */
}
.dk-search input {
  flex: 1; min-width: 0; height: 100%; padding: 0 6px 0 16px;
  border: none; outline: none; background: transparent;
  color: var(--text-1); font-size: 13px;
}
.dk-search input::placeholder { color: var(--text-3); }
/* 搜尋鈕改成純圖示（不是實心圓形彩色按鈕）：比照 4kvms.org 截圖，放大鏡本身
   沒有底色圓圈，跟旁邊 .dk-hamburger／.dk-action-btn 是同一種視覺語言。 */
.dk-search-btn {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: transparent; color: var(--text-2);
  transition: color .15s, background .15s;
}
.dk-search-btn span { display: none; }
.dk-search-btn:hover { color: #fff; background: rgba(255,255,255,.08); }

.dk-actions {
  display: flex; align-items: center; gap: 4px;
  flex-shrink: 0;
}
.dk-action-btn {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  font-size: 18px; color: var(--text-2);
  transition: .15s;
}
/* 登入圖示／「全部」抽屜按鈕：只在手機斷點顯示（使用者截圖回報手機模式需要，
   桌面版維持之前拿掉登入入口／拿掉左側抽屜的決定，這兩顆桌面版不出現）。 */
.dk-action-btn--mob-only { display: none; }
@media (max-width: 767px) { .dk-action-btn--mob-only { display: flex; } }
/* 「全部」抽屜開啟時的作用中狀態（比照使用者截圖的顏色），header.js 的
   openMobNav/closeMobNav 會加/拿掉這個 class，圖示同時換成 X（見 header.js）。 */
#hamburgerBtn.is-open { color: var(--accent); background: var(--accent-muted); }
.dk-action-btn:hover { color: #fff; background: rgba(255,255,255,.08); }
.dk-action-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,.08); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0; margin-left: 4px; cursor: pointer;
  color: var(--text-2); font-size: 22px; transition: .15s;
}
.dk-action-avatar:hover { border-color: var(--accent); color: var(--accent); }

/* ============================================================
   SIDE-NAV — 左側常駐圖示側欄（桌面）
   ============================================================ */
/* tp17 是純頂欄導覽（見 .claude/CLAUDE.md 導覽方式），不使用 tp13 那種常駐側欄，
   分類清單一律走 .mob-nav-drawer 這個漢堡抽屜（桌面/手機共用同一份，不分斷點），
   所以 .side-nav 這個 aside 直接關閉，不要只靠 --sidebar-w:0 讓它退化——
   width:0 加上 overflow-y:auto 會被瀏覽器隱性推導出 overflow-x:auto，內容還是可能
   露出一條變形的捲軸，display:none 才是乾淨的做法。 */
.side-nav { display: none; }
.side-nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 20px; font-size: 16px; color: var(--sidebar-text-muted);
  border-left: 3px solid transparent;
  transition: .15s;
  white-space: nowrap;
}
.side-nav-item .mac-icon { font-size: 19px; flex-shrink: 0; }
.side-nav-item span { overflow: hidden; text-overflow: ellipsis; }
.side-nav-item:hover { color: var(--sidebar-text); background: rgba(255,255,255,.08); }
.side-nav-item.is-active {
  color: #fff; background: rgba(76,141,255,.35);
  border-left-color: var(--accent); font-weight: 600;
}
.side-nav-divider { height: 1px; background: rgba(255,255,255,.15); margin: 10px 20px; }

/* ===== 「全部」抽屜——滿版寬度，但不蓋住 topbar（不是 tp17 原本 280px 左側
   滑出的窄面板，也不是上一版直接 inset:0 整個蓋過去的寫法）=====
   使用者截圖回報參考站的手機選單是滿版寬度，但真正的 topbar 全程可見，不會被
   蓋住；上一版用 `inset:0` 蓋過整個畫面，抽屜自己又加了一條 .mnd-header
   （logo＋關閉鈕）疊在最上面，等於在真正的 topbar 上面多疊了一條「假
   header」。改成 `top:var(--topbar-h)`（只蓋 topbar 以下的區域），這樣：
   1. 真正的 topbar（logo／導覽／搜尋圖示）全程看得到、點得到，不會被抽屜擋住；
   2. 不需要抽屜自己的 .mnd-header／logo／關閉鈕了——#hamburgerBtn 開啟後會
      變成 X（見 header.js），使用者直接點真正 topbar 上的那顆按鈕就能關閉，
      不用在抽屜裡重複放一顆關閉鈕（.mnd-header／.mnd-brand／.mnd-close 這幾條
      規則因此變成死碼，沒有跟著刪，之後確認不需要可以整段清掉）。
   背景色 `rgba(18,23,27,.95)` 直接抓 4kvms.org 實際編譯後 CSS 的
   `.bg-dark-900{background-color:rgb(18 23 27)}` 這個色值，不是憑空挑的。 */
.mob-nav-drawer {
  display: none; position: fixed; top: var(--topbar-h); left: 0; right: 0; bottom: 0;
  z-index: 410;
  background: rgba(18,23,27,.95);
  overflow-y: auto;
}
.mob-nav-drawer.is-open { display: block; }
.mnd-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid rgba(255,255,255,.15);
}
.mnd-brand { display: flex; align-items: center; height: 30px; }
.mnd-brand-img { height: 26px; width: auto; }
.mnd-close { font-size: 22px; color: var(--sidebar-text-muted); }
/* 抽屜內搜尋框改成比照桌面版 .dk-search 的樣式（灰色邊框＋深底，不是粉紅
   邊框），搜尋框本身的背景色抓 4kvms.org 編譯後 CSS 的
   `.bg-secondary\/50{background-color:rgba(34,34,34,.5)}`。位置也搬到
   分類清單最上面（「首页」之前，見 header.html），不是夾在清單中間。 */
.mnd-search {
  display: flex; align-items: center; margin: 14px 20px 6px; height: 40px;
  background: rgba(34,34,34,.5); border: 1px solid var(--border);
  border-radius: 20px; overflow: hidden; transition: border-color .15s;
}
/* 點擊輸入框當下（focus）邊框變粉紅色，平常維持灰色（比照使用者截圖）——
   :focus-within 是因為實際能 focus 的是裡面的 <input>，不是這層 form 本身。 */
.mnd-search:focus-within { border-color: var(--accent); }
.mnd-search input {
  flex: 1; min-width: 0; height: 100%; padding: 0 14px;
  border: none; outline: none; background: transparent;
  color: var(--sidebar-text); font-size: 13px;
}
.mnd-search input::placeholder { color: var(--sidebar-text-muted); }
.mnd-search button {
  flex-shrink: 0; width: 40px; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--sidebar-text-muted);
}
.mnd-nav { padding: 8px 0; }
/* 導覽項目：一般狀態純文字列，選中（.is-active）整條底色變主色粉紅＋白字
   （比照使用者截圖，不是邊框＋粉紅字那種樣式）。 */
/* 選中狀態改回「紅字黑底＋微微的紅框」（不是整條實心粉紅底＋白字，之前改錯
   了兩次，使用者截圖回報：圖1 是參考站，「首页」是粉紅字＋淡淡的粉紅描邊，
   底色維持跟其他項目一樣的深色，不是自己一塊實心色塊）。base 規則先放一個
   透明邊框佔位，切到 .is-active 才不會因為多了邊框寬度讓文字跳動位置。 */
.mnd-nav-item {
  display: block; padding: 14px 20px;
  font-size: 15px; color: var(--sidebar-text);
  border: 1px solid transparent; border-radius: 8px;
}
.mnd-nav-item:hover { background: rgba(255,255,255,.06); }
.mnd-nav-item.is-active {
  background: transparent; color: var(--accent); font-weight: 700;
  border-color: rgba(255,45,106,.5);
}

/* ===== Search Overlay (mobile) ===== */
.search-overlay {
  display: none; position: fixed; inset: 0;
  background: var(--bg-page); z-index: 500;
}
.search-overlay.is-open { display: flex; flex-direction: column; }
.search-overlay-inner { padding: 12px 16px; }
.search-bar-row { display: flex; align-items: center; gap: 10px; }
.search-bar {
  flex: 1; display: flex; align-items: center;
  height: 40px; background: var(--bg-input);
  border: 1px solid var(--border); border-radius: 4px; overflow: hidden;
}
.search-bar-icon { font-size: 18px; color: var(--text-3); margin: 0 10px; flex-shrink: 0; }
.search-bar input {
  flex: 1; height: 100%; border: none; outline: none;
  background: transparent; color: var(--text-1); font-size: 15px;
}
.search-submit-btn {
  padding: 0 16px; height: 40px;
  background: var(--fill); color: #fff; font-size: 14px; font-weight: 600;
}
.search-close-btn { font-size: 22px; color: var(--text-2); flex-shrink: 0; }
.search-hot { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.sh-label { font-size: 13px; color: var(--text-3); width: 100%; }
.sh-tag {
  padding: 5px 14px; background: var(--bg-card);
  border-radius: 20px; font-size: 13px; color: var(--text-2);
  transition: .15s;
}
.sh-tag:hover { background: var(--fill); color: #fff; }

/* ===== History Modal ===== */
/* tp21 改成錨定在觀看歷史圖示按鈕正下方的小面板，不是 tp17 那種蓋滿全螢幕、
   置中彈出的大 modal——.hm-overlay 維持 position:fixed;inset:0（保留「點面板
   外面關閉」這個 header.js 既有邏輯要用的全螢幕點擊層），但背景改透明、不再
   置中內容，真正的面板 .hm-box 用 fixed 定位貼齊右上角、topbar 正下方。 */
.hm-overlay {
  display: none; position: fixed; inset: 0;
  background: transparent; z-index: 600;
}
.hm-overlay.is-open { display: block; }
.hm-box {
  position: fixed; top: calc(var(--topbar-h) + 8px); right: 16px; z-index: 601;
  width: 320px; max-width: calc(100vw - 32px); max-height: 70vh;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: var(--shadow-card);
  display: flex; flex-direction: column;
}
.hm-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.hm-title { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; }
.hm-title .mac-icon { font-size: 15px; color: var(--text-2); }
.hm-clear { font-size: 12px; color: var(--text-3); flex-shrink: 0; }
.hm-clear:hover { color: var(--accent); }
/* 列表改成單欄、一列一筆（縮圖＋文字並排），比照小面板的寬度，不是 tp17
   那種寬 modal 裡的多欄縮圖格狀排列。 */
.hm-body { flex: 1; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 4px; }
.hm-card {
  display: flex; align-items: center; gap: 10px; padding: 6px;
  border-radius: 6px; text-decoration: none; color: var(--text-1);
  transition: background .15s;
}
.hm-card:hover { background: var(--bg-elevated); }
.hm-thumb {
  position: relative; flex-shrink: 0; width: 46px; aspect-ratio: 2/3;
  border-radius: 4px; overflow: hidden; background: var(--bg-elevated);
}
.hm-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.hm-card:hover .hm-name { color: var(--accent); }
.hm-info { min-width: 0; }
.hm-name {
  font-size: 13px; color: var(--text-1); white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; transition: color .15s;
}
.hm-type { margin-top: 3px; font-size: 12px; color: var(--text-3); }
/* 手機版改成滿版寬度、貼齊 topbar 下緣（跟「全部」抽屜同一種道理，見 §4.9——
   參考站的手機彈出面板都是滿版寬度，不是桌面版那種靠右上角的小卡片，之前
   用桌面版那組 320px／right:16px 的定位在手機上使用者截圖回報太小、位置也
   跑掉）。縮圖／字級也跟著放大一點，比照參考站截圖的比例。 */
@media (max-width: 767px) {
  .hm-box {
    top: var(--topbar-h); left: 0; right: 0; width: auto; max-width: none;
    max-height: calc(100vh - var(--topbar-h));
    border-radius: 0; border-left: none; border-right: none; border-top: none;
  }
  .hm-thumb { width: 60px; }
  .hm-name { font-size: 14px; }
  .hm-type { font-size: 12px; }
}
.hm-empty { width: 100%; text-align: center; padding: 36px 0; color: var(--text-3); font-size: 13px; }

/* ===== Module: .mod ===== */
.mod {
  padding: 20px; background: var(--bg-card);
  border-radius: var(--radius);
}
.mod + .mod, .mod + .mod-inner, .mod-inner + .mod,
.mod-inner + .mod-inner, .margin-t-20 { margin-top: 20px; }

/* Section header */
.mod-head { display: flex; align-items: center; margin-bottom: 16px; }
.mod-head-title {
  flex: 1; padding-left: 14px; position: relative;
}
.mod-head-title::before {
  content: ""; position: absolute;
  left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 20px; background: var(--accent); border-radius: 1px;
}
.mod-head-name { font-size: 20px; font-weight: 700; color: var(--text-1); }
.mod-head-more { font-size: 13px; color: var(--text-3); flex-shrink: 0; transition: color .15s; }
.mod-head-more:hover { color: var(--accent); text-decoration: underline; }
.mod-head-today { font-size: 13px; color: var(--text-2); margin-left: auto; margin-right: 12px; flex-shrink: 0; }
.mod-head-today em { color: var(--accent); font-style: normal; font-weight: 700; }

/* Tab list */
.mod-author-list { display: flex; gap: 8px; flex: 1; margin-left: 16px; }
.mod-author-list li {
  display: inline-flex; align-items: center;
  height: 26px; padding: 0 12px;
  background: var(--bg-elevated); border-radius: 13px;
  font-size: 13px; cursor: pointer; transition: .15s; color: var(--text-2);
}
.mod-author-list li:hover,
.mod-author-list li.active { color: #fff; background: var(--fill); }

/* .mod-inner */
.mod-inner { background: var(--bg-card); padding: 20px; border-radius: var(--radius); }
.mod-inner-head { display: flex; align-items: center; margin-bottom: 14px; }
.mod-inner-name {
  font-size: 20px; font-weight: 700; color: var(--text-1);
  padding-left: 12px; position: relative;
}
.mod-inner-name::before {
  content: ""; position: absolute;
  left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 18px; background: var(--accent); border-radius: 1px;
}
.mod-inner-more {
  margin-left: auto; font-size: 13px; color: var(--text-3); font-weight: 600;
  flex-shrink: 0; text-decoration: none; transition: color .15s;
}
.mod-inner-more:hover { color: var(--accent); }
.mod-inner-count { margin-left: auto; font-size: 13px; color: var(--text-3); flex-shrink: 0; }
.mod-inner-count em { color: var(--accent); font-style: normal; font-weight: 700; }

/* ===== Breadcrumb（widget/breadcrumb：nav>ol>li）===== */
.breadcrumb { font-size: 13px; color: var(--text-3); margin-bottom: 14px; }
.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; gap: 6px; }
.breadcrumb a { color: var(--text-3); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .bc-sep { color: var(--border-light); margin: 0 4px; }
.breadcrumb .bc-current { color: var(--text-2); }

/* 详情类页面面包屑（detail_hero 之上，与 .detail-hero-wrap 同 gutter） */
.breadcrumb--wide { max-width: var(--content-max); margin: 16px auto 16px; padding: 0 20px; }

/* ===== VOD Grid =====
   卡片維持固定寬度（150px），不用 minmax(...,1fr) 讓卡片跟著容器變寬——
   容器（.container）現在不設 max-width，寬螢幕時應該是「多塞幾欄」而不是
   「卡片被拉得比原本大」，所以欄寬給固定像素，auto-fill 只決定塞得下幾欄，
   欄與欄之間多出的零頭空間留白在最右邊，不強制撐滿最後一欄（見 CLAUDE.md §35）。 */
.video-film-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, 150px);
  justify-content: start;
  gap: 16px 12px;
}
/* --6col 重新啟用，但用途跟舊版不同：這個 modifier 專門給「資料筆數固定、不分頁的
   推薦片單」用（vod/detail.html 的猜你喜欢／关联视频／相关推荐、vod/play.html 的
   为你推荐）。
   這類推薦片單常常筆數不多不少（例如關聯影片只有 10 部），固定寬度 auto-fill
   算出來的欄數如果沒有整除，最後一排會塞不滿，右側留下一大塊空白（使用者截圖
   回報過）。改用 repeat(6, minmax(0,1fr))：固定 6 欄，每欄用剩餘寬度平均分配
   （minmax(0,1fr) 而不是單純 1fr，是為了避免內容撐開欄寬——理由跟 flex item 的
   min-width:0 是同一個道理，見 CLAUDE.md §30 的坑），永遠不會有塞不滿的右側空白，
   代價是卡片寬度會跟著可用寬度縮放，不是絕對固定值，這是刻意的取捨。 */
.video-film-list--6col {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  justify-content: normal;
}
@media (max-width: 1024px) { .video-film-list--6col { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 767px)  { .video-film-list--6col { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* --9col（原本叫 --8col，使用者要求改成一行 9 個，索性連 class 名稱一起改，
   避免之後看到「--9col 卻只有 8 欄」這種名不符實的情況）：首頁分類片單、
   vod/type.html「最近更新」／各子分類片單、vod/show.html 篩選結果格都在用，
   固定欄數、跟 --6col 是同一種道理，資料筆數也跟著調整成 9 的倍數（18／9／27）
   避免最後一排缺格。 */
.video-film-list--9col {
  grid-template-columns: repeat(9, minmax(0, 1fr));
  justify-content: normal;
}
@media (max-width: 1024px) { .video-film-list--9col { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 767px)  { .video-film-list--9col { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* --fill：給有分頁的清單頁用（vod/type／vod/show，見 CLAUDE.md §35 後續更新）。
   這兩頁原本沿用上面沒有 modifier 的固定寬度版本，使用者截圖回報同一個問題在這裡
   也發生了——螢幕右緣一樣留一大塊沒用到的空白（能塞下第 10 欄的寬度，但固定 150px
   auto-fill 只塞了 9 欄就不動了）。這裡不像 --6col 用固定欄數，是因為這兩頁清單的
   資料量遠大於推薦片單（分頁 24 筆），欄數應該跟著螢幕寬度自然增減，不能寫死成
   某個固定數字。改用 repeat(auto-fit, minmax(150px, 1fr))：auto-fit 和 auto-fill
   的差異在於，算出目前寬度塞得下幾欄之後，auto-fit 會把多餘的零頭空間分給「已經
   存在的那幾欄」（欄位跟著變寬一點，撐滿到右緣），auto-fill 則是把零頭空間晾在
   最右邊當空白（就是這裡要修的問題）。minmax(150px,1fr) 保底 150px、上限用剩餘
   空間平均分配，寬螢幕下頂多把每欄撐寬到接近下一欄的門檻，不會像 --6col 那樣
   把欄數鎖死在一個很小的數字、卡片被拉得特別大。 */
/* auto-fit 的 1fr 上限沒有封頂：欄數是靠「現有筆數」動態決定的，資料筆數
   很少（甚至只有 1 筆）時，僅有的那一欄會獨吞整行寬度，.video-item 預設
   justify-items:stretch 撐滿那欄，裡面 .video-cover 又是 aspect-ratio:2/3
   跟著 width 等比例放大，直接爆版成一張巨大灰色方塊（vod/type 頁資料稀少的
   分類，使用者截圖回報過）。加一個 max-width 幫 .video-item 封頂，欄再寬
   卡片也不會跟著撐大，多出來的空間就單純留白，不會影響到其他欄。 */
.video-film-list--fill {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  justify-content: normal;
}
.video-film-list--fill .video-item { max-width: 220px; }

/* ===== Hot Featured Block (首頁热点資訊) ===== */
.hot-block { display: flex; gap: 14px; height: 350px; }
.hot-feat-card {
  flex-shrink: 0; width: 220px;
  display: block; position: relative; overflow: hidden;
  border-radius: var(--radius); text-decoration: none;
  background: var(--bg-elevated);
}
.hot-feat-card img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center center;
  transition: transform .35s ease;
}
.hot-feat-card:hover img { transform: scale(1.05); }
.hot-feat-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 40px 12px 12px;
  background: linear-gradient(transparent, rgba(0,0,0,.9));
}
.hot-feat-name { font-size: 17px; font-weight: 700; color: #fff; line-height: 1.3; display: block; }
/* 固定寬度 auto-fill（185px，即原本 5 欄在 1280px 容器下的實際寬度，見 CLAUDE.md §35）：
   容器不設 max-width 後不能再用 repeat(5,1fr)，那樣寬螢幕下卡片會被拉得又寬又扁
   （使用者回報過這個問題）。改成固定寬度後欄數會隨可用寬度增加，所以模板那邊把
   {maccms:vod num} 從 11 提高到 31，確保有足夠資料可以多開幾欄；固定列高
   grid-auto-rows + overflow:hidden 讓超過 2 排的多餘項目（資料抓多了、但畫面只有
   350px 高放不下）直接被裁掉，不會撐高 .hot-block，維持原本「精選圖＋2 排縮圖」的版面比例。
   168px = 原本 grid-template-rows:repeat(2,1fr) 在 350px 高、扣掉一條 14px row-gap
   後平分兩排的實際高度（(350-14)/2），不是天真地拿 350/2，避免第二排被 overflow:hidden
   多裁掉幾像素。 */
.hot-grid {
  flex: 1; display: grid;
  grid-template-columns: repeat(auto-fill, 185px);
  grid-auto-rows: 168px;
  justify-content: start;
  overflow: hidden;
  gap: 14px 12px;
  list-style: none; padding: 0; margin: 0;
}
.hot-grid .video-item { display: flex; flex-direction: column; min-height: 0; }
.hot-grid .video-cover { aspect-ratio: unset; height: 115px; flex: none; }
.hot-grid .video-con { flex-shrink: 0; padding: 4px 0; }
@media (max-width: 767px) {
  .hot-block { height: auto; }
  .hot-feat-card { display: none; }
  .hot-grid { grid-template-columns: repeat(3, 1fr); grid-template-rows: auto; gap: 10px 8px; overflow: visible; }
  /* 桌面版把 {maccms:vod num} 從 11 提高到 31 是為了寬螢幕多開幾欄用的（見上面桌面版
     .hot-grid 的註解），手機版沒有裁切機制（grid-template-rows:auto 不會被 overflow:hidden
     裁掉），資料變多會讓手機版多長出好幾排，所以手機版額外用 nth-child 只保留原本的
     前 10 筆（比照改動前 num=11 扣掉 1 筆精選圖之後手機版原本看到的數量），維持原本手機版版面。 */
  .hot-grid .video-item:nth-child(n+11) { display: none; }
  .hot-grid .video-cover { aspect-ratio: 2/3; flex: unset; }
  .hot-grid .video-con { padding: unset; }
}
/* ================================ */
.video-item { position: relative; min-width: 0; }
.video-cover {
  display: block; width: 100%; position: relative; overflow: hidden;
  background: var(--bg-elevated); border-radius: var(--radius);
  aspect-ratio: 2/3;
}
.video-cover img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; transition: transform .35s ease;
}
.video-item:hover .video-cover img { transform: scale(1.07); }
.video-mask {
  position: absolute; bottom: 0; left: 0; right: 0; height: 55%;
  background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,.85) 100%);
  pointer-events: none; z-index: 1;
}
.video-badge-tl { position: absolute; top: 0; left: 0; display: flex; gap: 4px; z-index: 2; }
.vbadge { padding: 3px 7px; font-size: 10px; font-weight: 700; line-height: 1.5; }
.vbadge--year { background: rgba(0,0,0,.7); color: rgba(255,255,255,.85); border-radius: 0 0 var(--radius-sm) 0; }
.vbadge--type { background: var(--accent); color: #fff; border-radius: 0 0 var(--radius-sm) 0; }
.video-duration {
  position: absolute; right: 6px; bottom: 6px;
  height: 20px; line-height: 20px; padding: 0 6px;
  color: #fff; font-size: 12px; z-index: 2;
}
.video-tips {
  position: absolute; top: 0; right: 0;
  padding: 0 6px; height: 20px; line-height: 20px;
  font-size: 11px; color: #fff;
  border-radius: 0 var(--radius) 0 var(--radius); z-index: 3;
}
.video-tips.red   { background: linear-gradient(to left, #e5424b 0, #ff8a3d 100%); }
.video-tips.blue  { background: linear-gradient(to left, #4C8DFF 0, #7FB1FF 100%); }
.video-tips.green { background: linear-gradient(to left, #2DD671 0, #58E08E 100%); }
.video-cover::after {
  content: ""; position: absolute; inset: 0;
  background: rgba(0,0,0,.35); opacity: 0; transition: opacity .22s; z-index: 2;
}
.video-item:hover .video-cover::after { opacity: 1; }
.video-play-icon {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 44px; height: 44px; background: var(--accent); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 20px; z-index: 3;
  opacity: 0; transition: opacity .22s;
  box-shadow: 0 0 0 6px var(--accent-muted);
}
.video-item:hover .video-play-icon { opacity: 1; }
/* 右上角畫質徽章（HD／正片／集數等，取自 vod_remarks），比照參考網站卡片右上角的白底黑字小標籤 */
.video-badge-hd {
  position: absolute; top: 6px; right: 6px; z-index: 2;
  padding: 2px 6px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,.92); color: #1A1A1A;
  font-size: 10px; font-weight: 700; line-height: 1.4;
}
.video-con { margin-top: 7px; }
.video-con-tit {
  font-size: 13px; font-weight: 600; color: var(--text-1);
  display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color .15s;
}
.video-item:hover .video-con-tit { color: var(--accent); }
.video-con-subtitle {
  font-size: 11px; color: var(--text-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 4px;
}
/* 評分（橙色粗體）＋演員名，同一行顯示，比照參考網站卡片標題下方的資訊列 */
.video-con-meta {
  display: flex; align-items: center; gap: 6px; margin-top: 4px;
  font-size: 11px; color: var(--text-3);
  white-space: nowrap; overflow: hidden;
}
.video-con-score { flex-shrink: 0; color: var(--accent); font-weight: 700; }
.video-con-actor { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* ===== Mini film list ===== */
.video-mini-film-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px 10px;
}
.video-mini-film-list .video-cover { aspect-ratio: 2/3; border-radius: var(--radius); }

/* ===== Sidebar slide-grid ===== */
.slide-grid { background: var(--bg-card); padding: 16px 14px; border-radius: var(--radius); }
.slide-grid + .slide-grid { margin-top: 16px; }
.slide-grid-title { padding-left: 12px; position: relative; margin-bottom: 10px; }
.slide-grid-title::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 16px; background: var(--accent); border-radius: 1px;
}
.slide-grid-name { font-size: 15px; font-weight: 700; color: var(--text-1); }
.recent-tag-lists { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.recent-tag-lists a {
  display: inline-block; padding: 3px 10px;
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 2px;
  font-size: 12px; font-weight: 700; color: var(--text-2); transition: .15s;
}
.recent-tag-lists a:hover { color: #fff; background: var(--fill); border-color: var(--fill); }

/* ===== Search result ===== */
.film-item {
  display: flex; gap: 14px; padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.film-item .img {
  flex-shrink: 0; width: 90px; height: 126px;
  border-radius: var(--radius); overflow: hidden; background: var(--bg-elevated);
}
.film-item .img img { width: 100%; height: 100%; object-fit: cover; }
.film-item .info { flex: 1; min-width: 0; }
.film-item .title { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.film-item .title a:hover { color: var(--accent); }
.film-item .des p { font-size: 13px; color: var(--text-2); line-height: 1.7; }
.film-item .des label { color: var(--text-3); }
.film-item .btn {
  display: inline-flex; align-items: center; margin-top: 10px;
  padding: 6px 16px; background: var(--fill); color: #fff;
  border-radius: var(--radius); font-size: 13px; font-weight: 600; transition: .15s;
}
.film-item .btn:hover { background: var(--fill-hover); color: #fff; }

/* ===== VOD Detail ===== */
.detail { background: var(--bg-card); padding: 20px; border-radius: var(--radius); }
/* 頂部海報＋資訊區塊背景改成「該片封面圖放大模糊」，比照使用者截圖（參考
   Netflix/Apple TV 那種毛玻璃背景卡片）。.detail-main-bg／.detail-main-overlay
   是兩個獨立的絕對定位圖層，不是同一個元素疊 ::after——如果模糊圖跟暗色遮罩
   疊在同一個元素上，CSS filter 建立的新堆疊上下文會把「這個元素自己的完整
   渲染結果」（含子元素/偽元素）一起模糊，暗色遮罩會被模糊化、邊緣跟著發散，
   不是想要的效果；分成兩層各自獨立，模糊只作用在圖片那層，遮罩維持銳利。
   圖片欄位優先用 vod_pic_slide（後台幻燈片橫幅圖，構圖比較適合裁成寬幅
   背景），沒有才退回 vod_pic（見 html 裡 $_dbgpic 判斷，跟 §4.18 Hero
   輪播圖同一套優先順序邏輯）。 */
.detail-main {
  position: relative; overflow: hidden; display: flex; gap: 20px;
  margin: -20px -20px 0; padding: 24px 20px;
  border-radius: var(--radius) var(--radius) 0 0;
}
.detail-main-bg {
  position: absolute; inset: -30px; z-index: 0;
  background-size: cover; background-position: center;
  filter: blur(50px) brightness(.55) saturate(1.3);
  transform: scale(1.15);
}
.detail-main-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: rgba(6,6,7,.45);
}
.detail-main-left, .detail-main-right { position: relative; z-index: 2; }
.detail-main-left { flex-shrink: 0; width: 200px; }
.detail-main-left .cover {
  position: relative; width: 200px; border-radius: var(--radius);
  overflow: hidden; background: var(--bg-elevated);
}
.detail-main-left .cover img { width: 100%; aspect-ratio: 2/3; object-fit: cover; display: block; }
.detail-main-left label { display: block; margin-top: 8px; text-align: center; font-size: 12px; color: var(--text-3); }
.detail-main-right { flex: 1; min-width: 0; }
.detail-main-right h1 { font-size: 22px; font-weight: 700; margin-bottom: 10px; }
.intro p { font-size: 13px; color: var(--text-2); line-height: 2; }
.intro label.color-9 { color: var(--text-3); }
.intro-desc { margin-top: 10px; font-size: 13px; color: var(--text-2); line-height: 1.8; }
.detail-main-btn { margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; }
.detail-main-btn .btn {
  display: inline-flex; align-items: center;
  padding: 9px 24px; background: var(--fill); color: #fff;
  border-radius: var(--radius); font-size: 14px; font-weight: 700;
  transition: .15s; text-decoration: none; cursor: pointer; border: none;
}
.detail-main-btn .btn:hover { background: var(--fill-hover); color: #fff; }
.detail-main-btn .btn-dl {
  background: var(--accent-muted); color: var(--accent); border: 1px solid var(--accent);
}
.detail-main-btn .btn-dl:hover { background: var(--fill); color: #fff; }
.detail-main-btn .btn-share {
  background: var(--bg-elevated); color: var(--text-2); border: 1px solid var(--border);
}
.detail-main-btn .btn-share:hover { color: var(--accent); border-color: var(--accent); }

/* Episode buttons */
.tv-info-list ul { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tv-info-list li a {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 5px 0; width: 72px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 13px; color: var(--text-2); transition: .15s;
}
.tv-info-list li a:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-muted); }
.tv-info-list li a.cur { color: var(--accent); border-color: var(--accent); font-weight: 700; }

/* ===== Play page ===== */
.tvplay { background: #000; }
.tvplay .inner-main { position: relative; aspect-ratio: 16/9; background: #000; }
.tvplay .inner-main > iframe,
.tvplay .inner-main > div { position: absolute; inset: 0; width: 100%; height: 100%; }
.filmplay-info { padding: 12px 0; }
.filmplay-info-common .title { font-size: 20px; font-weight: 700; }
.filmplay-info-desc { margin-top: 8px; font-size: 13px; color: var(--text-2); line-height: 1.7; }

/* ===== Filter / Show page ===== */
.mod-screen { padding: 4px 0 12px; }
.mod-screen-item { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin: 6px 0; }
.mod-screen-label { font-size: 13px; color: var(--text-3); white-space: nowrap; flex-shrink: 0; }
.mod-screen-list { display: flex; flex-wrap: wrap; gap: 4px; }
.mod-screen-link {
  padding: 3px 10px; border-radius: var(--radius);
  font-size: 13px; color: var(--text-2); transition: .15s;
}
.mod-screen-link:hover { color: var(--accent); background: var(--accent-muted); }
.mod-screen-link.cur { color: #fff; background: var(--fill); }

/* Sticky filter bar */
.vod-show-sticky {
  position: sticky; top: var(--topbar-h); z-index: 100;
  background: var(--bg-card); border-bottom: 1px solid var(--border);
  padding: 8px 0;
}

/* ============================================================
   HERO — 大圖左 + 熱門片單右（參考 miguvideo 頻道頁）
   ============================================================ */
/* .dk-hero 是滿版 banner：.main-area 因側欄浮層而有 padding-left，
   這裡用等量負 margin 把 hero 拉回貼齊螢幕左右邊（見 CLAUDE.md §22.1／§25），
   下面的 .warp/.container 內容維持原本的置中留白版型，不受影響。
   比照參考網站：桌面版完全去邊——不留 padding、.dk-hero-slides 不設 border-radius，
   讓圖片直接貼齊頂欄下緣與螢幕左右兩側，不要有黑邊/縫隙（使用者截圖回報過）；
   高度也從 440px 調高到 460px，比照參考網站量出來的高度。 */
.dk-hero {
  height: 460px; max-height: 460px;
  margin-left: calc(-1 * var(--sidebar-w));
  width: calc(100% + var(--sidebar-w));
}
.dk-hero-slides {
  width: 100%; height: 100%; position: relative; overflow: hidden;
  background: var(--bg-card);
}
.hero-slide {
  position: absolute; inset: 0;
  opacity: 0; transition: opacity .5s ease;
}
.hero-slide.is-active { opacity: 1; z-index: 1; }
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
}
/* vod_pic 退回方案（沒有 vod_pic_slide 橫版banner圖時）：vod_pic 多半是直式海報，
   直接 cover 會裁掉大半張臉/主體，改用「模糊放大鋪滿底 + 原圖 contain 置中」的雙層作法，
   兩層都靠 background-image:inherit 繼承同一個 .hero-bg 的行內背景圖，不用另外複製一份 URL。 */
.hero-bg--fallback::before,
.hero-bg--fallback::after {
  content: ''; position: absolute; inset: 0;
  background-image: inherit; background-repeat: no-repeat; background-position: center;
}
.hero-bg--fallback::before {
  background-size: cover;
  filter: blur(28px) brightness(.55);
  transform: scale(1.15); /* 放大蓋掉模糊造成的邊緣透空 */
}
.hero-bg--fallback::after { background-size: contain; }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,.7) 0%, rgba(0,0,0,.15) 45%, transparent 75%),
              linear-gradient(to top, rgba(0,0,0,.9) 0%, transparent 55%);
}
/* left 從側欄右緣算起，避免播放/詳情等按鈕被浮在上層的半透明側欄擋住點擊（見 CLAUDE.md §25.2） */
.hero-content {
  position: absolute; bottom: 30px; left: 30px; z-index: 2; max-width: 55%;
}
.hero-badges { display: flex; gap: 6px; margin-bottom: 10px; }
.hb {
  display: inline-block; padding: 2px 8px;
  border-radius: 2px; font-size: 11px; font-weight: 700;
}
.hb--year { background: var(--accent); color: #fff; }
.hb--area { background: rgba(255,255,255,.12); color: rgba(255,255,255,.9); border: 1px solid rgba(255,255,255,.25); }
.hero-title { font-size: 30px; font-weight: 800; color: #fff; margin-bottom: 8px; text-shadow: 0 2px 10px rgba(0,0,0,.6); }
.hero-meta { font-size: 13px; color: rgba(255,255,255,.7); margin-bottom: 14px; line-height: 1.5; }
.hero-btns { display: flex; gap: 10px; }
.hero-play-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 22px; background: var(--accent); color: #fff;
  border-radius: 20px; font-size: 14px; font-weight: 700;
  transition: background .15s;
}
.hero-play-btn:hover { background: var(--accent-hover); color: #fff; }
.hero-detail-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 20px; background: rgba(255,255,255,.1); color: #fff;
  border: 1px solid rgba(255,255,255,.28); border-radius: 20px;
  font-size: 14px; transition: background .15s;
}
.hero-detail-btn:hover { background: rgba(255,255,255,.2); color: #fff; }

/* Hero controls */
/* 圓點位置比照參考網站放在右下角（不是左下角）——tp17 沒有側欄可扣，也沒有像
   tp13 那樣在旁邊放熱門片單面板，圓點是 hero 唯一的手動切換方式。 */
.hero-dots {
  position: absolute; bottom: 16px; right: 24px; z-index: 3;
  display: flex; gap: 5px;
}
.hero-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,.4); transition: .2s;
}
.hero-dot.is-active { background: var(--accent); width: 20px; border-radius: 3px; }

/* ===== Hero 熱門片單 — 疊在 hero 圖片右上方，不佔獨立欄位（見 CLAUDE.md §25.2） =====
   跟 .hero-title/.hero-badges 一樣，這塊疊在照片上，配色固定用白色系，
   不跟著全站白底配色走（跟 .side-nav 的道理相同：疊在圖片上的東西配色固定）。 */
/* 背景比照參考網站的 .slide-nav：不是純色色塊，是「上下淡出、中段實色」的漸層
   （上緣/下緣 rgba(0,0,0,0) 全透明，11%～92% 是 rgba(0,0,0,.5)），讓面板跟 hero 圖片
   的交界處是柔化的漸層，不是一條生硬的色塊邊界。 */
/* width/padding/top 比照參考網站 .slide-nav 實測數值：230px 寬、上下 padding 20px、
   跟頂欄下緣固定距離 56px（不是百分比、不是靠 flex 置中算出來的，使用者實測拉伸 RWD
   這個距離都不會變，所以這裡直接寫死 56px，不要改成 % 或其他會隨容器高度變動的算法）。
   right 從 16px 調成 70px：右下角固定的 .fab-group（回頂/選單按鈕，見 §38）
   `right:20px` + 按鈕本身 40px 寬，左緣落在離螢幕右邊 60px 處，panel 貼 16px 會跟
   FAB 按鈕視覺上黏在一起（使用者截圖回報）；70px 這個值不是憑空選的，`main.css` 裡
   `.fab-qr-popup`（FAB 的彈出視窗）本來就是用 `right:70px` 來閃避同一組 FAB 按鈕，
   這裡沿用同一個既有慣例，不要改成其他數字。 */
.dk-hero-panel {
  position: absolute; top: 56px; right: 70px; bottom: 16px;
  width: 230px; z-index: 5;
  background: linear-gradient(to bottom,
    rgba(0,0,0,0) 0%,
    rgba(0,0,0,.5) 11%,
    rgba(0,0,0,.5) 92%,
    rgba(0,0,0,0) 100%);
  padding: 20px 0;
  border-radius: 8px;
  display: flex; flex-direction: column; overflow: hidden;
}
/* overflow-x:hidden 是關鍵：只設 overflow-y:auto 的話，瀏覽器會把 overflow-x 隱性算成
   auto（CSS 規範規則），.php-item 的 hover/is-active transform:scale(1.06) 又會讓內容
   的可捲動範圍稍微超出容器寬度，兩者疊加就會在面板底部多冒出一條水平捲軸；
   scrollbar-width/::-webkit-scrollbar 則是把「上下捲動」這個功能保留，但不顯示捲軸外觀
   （比照 .rail-track／.actor-hot-scroll 既有的隱藏捲軸寫法），參考網站的原始片單面板
   本來就看不到任何捲軸。 */
.dk-hero-panel-list {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  scrollbar-width: none;
}
.dk-hero-panel-list::-webkit-scrollbar { display: none; }
.php-item {
  display: block;
  padding: 8px 16px;
  transition: background .15s, transform .15s;
  transform-origin: left center;
}
.php-item-title {
  display: block; font-size: 13px; color: rgba(255,255,255,.7);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color .15s, font-size .15s;
}
/* 副標題只在目前播放中／hover 時才顯示（見 CLAUDE.md §34） */
.php-item-sub {
  display: none; font-size: 11px; color: rgba(211,211,211,1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: 2px;
}
.php-item.is-active,
.php-item:hover {
  transform: scale(1.06);
}
/* 比照參考網站：hover/is-active 的片名字級放大到 20px、顏色用參考站實際的
   #007aff（不是共用的 var(--accent) #4C8DFF，兩者色號不同，這裡指定成參考站的原色，
   不動全站共用的 --accent 變數，避免牽動其他地方）。 */
.php-item.is-active .php-item-title,
.php-item:hover .php-item-title {
  color: #007aff; font-weight: 700; font-size: 20px;
}
.php-item.is-active .php-item-sub,
.php-item:hover .php-item-sub {
  display: block;
}

/* ============================================================
   RAIL — 橫向捲動片單列（見 CLAUDE.md §23）
   ============================================================ */
/* 左右 padding 對齊下方 .mod 區塊的實際內縮（.mod 本身 padding:20px），
   否則 rail 沒有這層 padding 會比下面的卡片區塊「寬」，兩者內容邊界對不齊。 */
.rail { padding: 0 20px; }
/* 跟下一個區塊的間距縮小：.mod 本身有 20px 內距 + margin-top:20px，疊在一起會顯得
   rail 跟下面區塊隔太遠，這裡用相鄰選擇器把間距收窄，不動其餘區塊彼此的間距。 */
.rail + .margin-t-20 { margin-top: 8px; }
.rail-head { display: flex; align-items: center; margin-bottom: 14px; }
.rail-title { font-size: 20px; font-weight: 700; color: var(--text-1); }
.rail-nav { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.rail-counter { font-size: 12px; color: var(--text-3); }
.rail-counter .cur { color: var(--text-1); font-weight: 700; }
.rail-arrow {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--bg-card); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2); font-size: 14px; transition: .15s;
}
.rail-arrow:hover { color: #fff; background: var(--fill); border-color: var(--fill); }
.rail-arrow[disabled] { opacity: .35; pointer-events: none; }
/* ⚠️ overflow-x:auto 會連垂直方向一起裁切（CSS 規範：一軸設裁切值、另一軸沒明講時
   會被隱性算成 auto，見 CLAUDE.md §36 同一個坑），.hover-popout 疊在 .rail-card 上
   放大時如果比卡片本身高，上下露出的部分會被這裡的 overflow-x 直接切掉，
   放大效果看起來像被原卡片的窄小範圍夾住（使用者截圖回報過）。
   解法沿用 tp14_dark_black 的 .video-track 技巧：上下各加 60px 內距，
   再用等量負外距把版面拉回原位——裁切框因此上下各多出 60px 可以露出浮層，
   但 .rail-track 本身的版面佔位（外部看到的高度／跟其他區塊的間距）完全不變，
   兩者互相抵銷。60px 是估計值（.hover-popout 比卡片高出的量沒有精確量過），
   如果之後發現浮層還是被切到一點，或反過來蓋到上面 .kb-cat-head 的篩選列，
   調這裡的數字就好（padding 跟 margin 要維持同步，只改一邊會破壞抵銷）。
   水平方向仍然靠 vod_card.js 的 pop-left/pop-right 把浮層留在
   捲動容器可視範圍內，不是靠加大這個方向的裁切框（那樣做不到，捲動列本來就要裁水平）。 */
.rail-track {
  display: flex; gap: 14px; overflow-x: auto; scroll-behavior: smooth;
  padding: 60px 0 64px; margin: -60px 0 -64px;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  /* pointer-events:none 在 .rail-track 本身、auto 在 .rail-card 身上：
     上面加的 60px/64px padding 讓 .rail-track 的實際盒子往上下各多蓋出一截
     （為了讓 .hover-popout 有地方溢出，見前面的說明），這塊透明的 padding 區域
     會往上疊到 .kb-cat-head（分類名稱／「更多」／篩選 pill 那一列）身上，即使
     看不到也照樣會吃掉點擊事件，導致「更多」連結點不到（使用者截圖回報過）。
     讓 .rail-track 本身不接收指標事件，只讓卡片（.rail-card）自己接收，
     這樣空白的 padding 區域點擊會直接穿透到底下/旁邊真正該接的元素。 */
  pointer-events: none;
}
.rail-track .rail-card { pointer-events: auto; }
.rail-track::-webkit-scrollbar { display: none; }
/* min-width:0 是關鍵：flex item 預設 min-width:auto，若卡片內文字用 white-space:nowrap
   （.rail-card-title 就是），瀏覽器會把「文字完整不換行的寬度」當成這個 flex item 的最小寬度，
   標題一長，卡片就會被撐開超過 flex-basis，變成畫面上「某張卡片異常寬大」的爆版。
   加 min-width:0 讓 flex-basis 才是實際寬度，標題的 overflow:hidden/ellipsis 才會生效。 */
/* 桌面版改回容器等分 6 份（不是固定像素）：使用者明確要求「一行固定 6 張，底部跟
   排行榜面板高度沒對齊到就算了」，比起「維持絕對固定的卡片寬度」更優先。用
   calc((100% - 5*14px)/6) 讓 6 張卡片＋5 個 14px 間距剛好等分整個 .rail-track 寬度，
   不管容器多寬都固定顯示 6 欄整，不會有切一半的第 7 張卡片（那是 v9/v10 想解決、
   固定寬度又重新引入的問題，這次換個優先順序，不用兩者兼顧）。
   ⚠️ 這裡是「桌面版專用」的等分算法——手機版（<767px）已經完全改用 CSS Grid
   （repeat(3,1fr)，見下面手機斷點），跟這條 calc() 是兩條独立的路徑，不會互相干擾，
   所以不用擔心等分算法在窄螢幕上出問題（那是 flex-basis 那次事故，現在手機版
   根本不會走到這條規則）。 */
.rail-card { position: relative; flex: 0 0 calc((100% - 5 * 14px) / 6); width: calc((100% - 5 * 14px) / 6); min-width: 0; scroll-snap-align: start; }
/* width:100% 只是「正常情況下」的寫法，.rail-card-link/.rail-card-thumb 不另外加
   max-width 上限了——手機版的「width:100% 算不出正確寬度、退回用 <img> 原始像素
   尺寸當寬度」那個爆版問題已經改用 CSS Grid 徹底繞開（不再經過這條 flex-basis 路徑），
   桌面版本來就沒出過這個問題，不需要為了防一個已經不會發生的情境而限制桌面版
   卡片可以長到的最大寬度（現在卡寬是 calc() 等分算出來的，不是固定值，硬加
   max-width 反而會在螢幕更寬時把卡片截斷成比其他 5 張還窄）。 */
.rail-card-link { display: block; width: 100%; }
.rail-card-thumb {
  position: relative; width: 100%; aspect-ratio: 2/3; border-radius: var(--radius);
  overflow: hidden; background: var(--bg-card);
}
.rail-card-thumb img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; transition: transform .3s ease;
}
.rail-card:hover .rail-card-thumb img { transform: scale(1.06); }
.rail-card-badge {
  position: absolute; right: 6px; bottom: 6px;
  padding: 2px 7px; font-size: 11px; color: rgba(255,255,255,.9);
  background: rgba(0,0,0,.6); border-radius: 3px;
}
.rail-card-title {
  margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--text-1);
  transition: color .15s;
}
.rail-card:hover .rail-card-title { color: var(--accent); }

/* ============================================================
   卡片 hover 詳情浮層（.hover-popout）—— 參考 tp14_dark_black 的 .video-track
   / widget/vod_card.html / vod_card.js 移植，套用到 tp17 兩種卡片容器：
   `.video-item`（CSS Grid 格狀清單）與 `.rail-card`（.rail-track 橫向捲動列）。
   兩者都已經是 position:relative，直接把 .hover-popout 當絕對定位子層插入即可，
   不需要額外包一層 wrapper。
   進場動畫：scale(0.6667)→1，0.25s cubic-bezier(.25,1,.5,1)，delay 0.15s
   （hover 意圖延遲，滑鼠只是滑過去不會亂彈出來）。
   ============================================================ */
.hover-popout {
  display: none;
  position: absolute;
  top: 50%; left: 50%;
  z-index: 60;
  width: 320px; height: auto;
  opacity: 0; visibility: hidden; pointer-events: none;
  background: var(--bg-elevated);
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0,0,0,.6);
  transform: translate(-50%, -50%) scale(.6667);
  transform-origin: center center;
}
.hover-popout.pop-left  { left: 0; transform: translate(0, -50%) scale(.6667); transform-origin: left center; }
.hover-popout.pop-right { left: auto; right: 0; transform: translate(0, -50%) scale(.6667); transform-origin: right center; }

.video-item:hover .hover-popout,
.rail-card:hover .hover-popout {
  display: block; visibility: visible; pointer-events: auto;
  animation: popoutIn .25s cubic-bezier(.25,1,.5,1) forwards;
  animation-delay: .15s;
}
.video-item:hover .hover-popout.pop-left,  .rail-card:hover .hover-popout.pop-left  { animation-name: popoutInLeft; }
.video-item:hover .hover-popout.pop-right, .rail-card:hover .hover-popout.pop-right { animation-name: popoutInRight; }

@keyframes popoutIn      { from { opacity: 0; transform: translate(-50%,-50%) scale(.6667); } to { opacity: 1; transform: translate(-50%,-50%) scale(1); } }
@keyframes popoutInLeft  { from { opacity: 0; transform: translate(0,-50%) scale(.6667); }     to { opacity: 1; transform: translate(0,-50%) scale(1); } }
@keyframes popoutInRight { from { opacity: 0; transform: translate(0,-50%) scale(.6667); }     to { opacity: 1; transform: translate(0,-50%) scale(1); } }

.popout-inner { width: 100%; display: flex; flex-direction: column; background: var(--bg-elevated); border-radius: 10px; overflow: hidden; position: relative; }

.popout-cover { position: relative; display: block; width: 100%; aspect-ratio: 16/9; overflow: hidden; background: var(--bg-card); }
.popout-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.popout-cover-shadow { position: absolute; left: 0; right: 0; bottom: -1px; height: 70px; background: linear-gradient(rgba(0,0,0,0), var(--bg-elevated)); }

.popout-title-wrap { position: relative; padding: 0 16px; margin-top: -32px; }
.popout-title {
  font-size: 16px; font-weight: 700; color: var(--text-1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.popout-mix { padding: 12px 16px 0; }
.popout-tags { display: flex; flex-wrap: nowrap; gap: 6px; overflow: hidden; }
.popout-tag { height: 20px; padding: 0 6px; border-radius: var(--radius-sm); font-size: 11px; line-height: 20px; white-space: nowrap; }
.popout-tag--main  { color: var(--accent); background: var(--accent-muted); }
.popout-tag--grey  { color: rgba(255,255,255,.85); background: rgba(255,255,255,.1); }
.popout-tag--plain { color: var(--text-3); background: none; overflow: hidden; text-overflow: ellipsis; }
/* 年份：跟其他 plain 標籤不同，年份要「一定完整顯示」，不能被旁邊的類型標籤擠到
   靠 ellipsis 截斷——所以另外給實色底（不是 background:none）＋flex-shrink:0
   （.popout-tags 是 nowrap+overflow:hidden，預設 flex-shrink:1 遇到空間不夠時
   還是會被壓縮甚至整個被容器裁掉，這裡鎖住不讓它縮）。 */
/* 年份改用網站主色橘色實色底（--accent，不是 --accent-muted 那種淡橘色調——
   .popout-tag--main 的地區標籤已經在用 --accent-muted，年份用實色 --accent 才會
   跟地區標籤明顯區分開，不是兩個看起來很像的淡色塊）。 */
.popout-tag--year  { color: #fff; background: var(--accent); font-weight: 700; flex-shrink: 0; }

/* 演員／簡介各自獨立一行（不是合併成一段文字），比照參考網站：
   演員固定 1 行，超出寬度用省略號；簡介固定 2 行，超出用省略號。
   前面各自加「演员：」「简介：」label，用比內容淺一階的顏色跟內容區分開。 */
.popout-label { color: var(--text-3); }
.popout-actor {
  margin-top: 10px; font-size: 12px; line-height: 1.6; color: var(--text-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.popout-desc {
  margin-top: 4px; font-size: 12px; line-height: 1.7; color: var(--text-3);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.popout-score { display: flex; align-items: center; gap: 5px; padding: 10px 16px 0; font-size: 12px; color: var(--text-1); }
.popout-score .mac-icon { font-size: 13px; color: #F0B429; }
.popout-score .score-num { font-size: 13px; font-weight: 700; color: #F0B429; }

.popout-bottom { display: flex; align-items: center; gap: 10px; height: 62px; padding: 0 16px; }
.popout-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,.1); color: var(--text-1); font-size: 16px;
  transition: background .15s, color .15s;
}
.popout-btn:hover { background: var(--accent); color: #fff; }
.popout-btn:first-child { background: var(--accent); color: #fff; }
.popout-btn:first-child:hover { background: var(--accent-hover); }

/* 平板／手機關掉浮層：觸控裝置沒有「滑鼠停留」這個狀態，瀏覽器會在點擊時合成一次
   :hover 並黏著，結果變成想點進詳情頁卻先跳出浮層擋住畫面。卡片本身仍是連結，
   點擊照樣進詳情頁，功能沒有消失，只是不做這層滑鼠專屬的預覽互動。 */
@media (max-width: 1024px) { .hover-popout { display: none !important; } }
@media (hover: none), (pointer: coarse) { .hover-popout { display: none !important; } }

/* ============================================================
   KB-CAT — 首頁「分类内容+该分类排行榜」區塊（比照 kuaibo8.com 首頁版式）
   每個頂層分類一個區塊：抬頭（圖示/名稱/更多/類型篩選 pill/頁碼)，
   下方左側沿用 .rail 橫向片單、右側固定寬度排行榜面板。
   ============================================================ */
.kb-cat { padding: 20px; background: var(--bg-card); border-radius: var(--radius); }
.kb-cat + .kb-cat, .kb-cat + .mod, .mod + .kb-cat { margin-top: 20px; }
.kb-cat-head { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-bottom: 16px; }
.kb-cat-title {
  display: flex; align-items: center; gap: 6px;
  font-size: 20px; font-weight: 700; color: var(--text-1); flex-shrink: 0;
}
.kb-cat-title .mac-icon { color: var(--accent); }
.kb-cat-title a { color: inherit; }
.kb-cat-more {
  font-size: 13px; color: var(--text-3); display: flex; align-items: center; gap: 2px;
  flex-shrink: 0; transition: color .15s;
}
.kb-cat-more:hover { color: var(--accent); }
/* .kb-cat-pills-wrap 取代舊的 .kb-cat-pills 直接放在 .kb-cat-head 裡的寫法——分類多的
   時候 flex-wrap:wrap 會擠成兩行甚至更多，把整個 head 撐高、跟旁邊的「更多」/翻頁
   計數器對不齊（使用者截圖回報過）。改成單行 + 左右箭頭捲動，視覺上比照
   vod/show.html 篩選列「按鈕點擊翻頁」的呈現方式，箭頭沿用 .rail-arrow 的圓形樣式
   （純視覺共用 class，JS 行為不共用——見下方 kb-pills.js 的獨立實作，不能跟
   rail.js 用同一組 .rail-arrow--prev/--next，否則同一個 .kb-cat-head 裡會有兩組
   同名 class，rail.js 的 section.querySelector 只抓得到第一組，會把翻頁箭頭跟
   影片 rail 的箭頭綁在一起，點擊會同時捲動兩條軌道）。 */
.kb-cat-pills-wrap { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; }
.kb-cat-pills {
  display: flex; flex-wrap: nowrap; gap: 8px; min-width: 0;
  overflow-x: auto; scroll-behavior: smooth; scrollbar-width: none;
}
.kb-cat-pills::-webkit-scrollbar { display: none; }
.kb-pills-arrow { width: 24px; height: 24px; font-size: 12px; flex-shrink: 0; }
.kb-pill {
  padding: 5px 14px; border-radius: 16px; font-size: 13px;
  background: var(--bg-elevated); color: var(--text-2); white-space: nowrap;
  transition: .15s;
}
.kb-pill:hover, .kb-pill.is-active { color: #fff; background: var(--accent); }
.kb-cat-nav { margin-left: auto; flex-shrink: 0; }

/* .kb-cat-body／.kb-cat-rail／.kb-cat-nav 之後不再用了——分類片單改成不分頁的
   8 欄 grid（見 index/index.html .kb-cat 的調整，使用者截圖回報要拿掉每個分類
   旁邊的排行榜側欄跟橫向捲動），這三條規則留著純粹是沒刪的死碼，之後確認不需要
   可以整段清掉。.kb-rank-panel／.kb-rank-head 還在用（下面新增的「今天熱播」
   區塊沿用同一組面板樣式），不要跟著一起刪。 */
.kb-cat-body { display: flex; gap: 20px; align-items: flex-start; }
.kb-cat-rail { flex: 1; min-width: 0; }
/* 分类区块左侧：9 列 × 2 行 = 18（与右侧 1+9 日榜同高）；≤1199 6 列（多余隐藏）、≤767 3 列 */
.kb-cat-grid { flex: 1; min-width: 0; display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 14px 12px; list-style: none; margin: 0; padding: 0; }
.kb-cat-grid > li { min-width: 0; }
/* 右侧日榜面板与左侧 9×2 网格等高：面板拉伸，10 行均分剩余高度（视口变化时卡片高度变了也能跟着对齐） */
@media (min-width: 1025px) {
  .kb-cat-body { align-items: stretch; }
  .kb-rank-panel { display: flex; flex-direction: column; padding-bottom: 6px; }
  .kb-rank-panel .rank-list { flex: 1; display: flex; flex-direction: column; }
  .kb-rank-panel .rank-li { flex: 1; display: flex; }
  .kb-rank-panel .rank-li-inner { flex: 1; align-items: center; padding-top: 0; padding-bottom: 0; }
}
@media (max-width: 1199px) {
  .kb-cat-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .kb-cat-grid > li:nth-child(n+13) { display: none; }
}
@media (max-width: 767px) {
  .kb-cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 8px; }
  .kb-cat-grid > li:nth-child(n+13) { display: block; }
}
.kb-rank-panel {
  flex-shrink: 0; width: 260px;
  background: var(--bg-elevated); border-radius: var(--radius);
  padding: 14px 0;
}
.kb-rank-head {
  display: flex; align-items: center; gap: 6px;
  padding: 0 16px 12px; margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
  font-size: 14px; font-weight: 700; color: var(--text-1);
}
.kb-rank-head .mac-icon { color: var(--accent); }
@media (max-width: 1024px) {
  .kb-cat-body { flex-direction: column; }
  .kb-rank-panel { width: 100%; }
}
@media (max-width: 767px) {
  .kb-cat { padding: 14px; }
  .kb-cat-pills-wrap { display: none; }
  /* 手機版空間有限，每個分類旁邊的小排行榜面板直接不顯示（完整榜單走首頁下方的
     「排行榜」大區塊／label/rank.html，不是拿掉功能，只是這個縮小版面板在手機
     上不划算）。 */
  .kb-rank-panel { display: none; }
}

/* ============================================================
   今天熱播（tp21 首頁新增，Hero 正下方）
   ============================================================ */
.th-section { padding: 20px; }
.th-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.th-title { font-size: 22px; font-weight: 800; color: var(--text-1); }
.th-subtitle { font-size: 13px; color: var(--text-3); margin-top: 4px; }
.th-more { font-size: 13px; color: var(--text-3); display: flex; align-items: center; gap: 2px; flex-shrink: 0; transition: color .15s; }
.th-more:hover { color: var(--accent); }
/* 使用者要求移除右側「榜單排行」小面板，.th-body 底下現在只剩一個
   .th-grid，不再需要 9 欄 grid 分割左右兩塊，改回單純滿版。
   .th-rank-* 系列跟 .kb-rank-panel／.kb-rank-head（在 main.css 別處）都
   變成死碼，沒有刪，之後確認不需要可以整組清掉。 */
.th-body { display: block; }
.th-rank-list { list-style: none; padding: 0; margin: 0; }
.th-rank-item {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 20px; border-bottom: 1px solid var(--border);
}
.th-rank-item:last-child { border-bottom: none; }
.th-rank-num { width: 22px; text-align: center; font-size: 16px; font-weight: 700; color: var(--text-3); flex-shrink: 0; }
/* 前三名用主色粉紅，不是 .rl-num--gold/--silver/--bronze 那組金銀銅配色
   （使用者截圖回報這裡要跟著網站主色調，不是金銀銅三種不同顏色）。 */
.th-rank-num--top { color: var(--accent); }
/* 不再寫死 420px，改成 grid-column:span 3（.th-body 現在是 9 欄 grid，
   左邊影片格 span 6），寬度自動是容器的 3/9，會跟著響應式縮放。 */
.th-rank-panel { grid-column: span 3; width: auto; }
.th-rank-thumb {
  flex-shrink: 0; width: 64px; aspect-ratio: 2/3; border-radius: 4px;
  overflow: hidden; background: var(--bg-elevated); display: block;
}
.th-rank-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.th-rank-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.th-rank-name {
  font-size: 15px; color: var(--text-1); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; transition: color .15s;
}
.th-rank-item:hover .th-rank-name { color: var(--accent); }
.th-rank-sub { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.th-rank-score { display: flex; align-items: center; gap: 4px; font-size: 14px; color: #FFB800; flex-shrink: 0; }
.th-rank-score .mac-icon { font-size: 14px; }
@media (max-width: 767px) {
  .th-section { padding: 14px; }
}

/* ===== 语义化列表容器（ul/li 化后的重置）与首页杂项 ===== */
.rail-track { list-style: none; padding-left: 0; }
.art-home-grid, .topic-grid, .rank-home-grid { list-style: none; margin-top: 0; margin-bottom: 0; padding-left: 0; }
.topic-grid > li, .rank-home-grid > li { min-width: 0; }
.topic-grid > li > .topic-card, .rank-home-grid > li > .rank-col { height: 100%; }
.home-wrap { padding: 20px 0 40px; }
.friend-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding-top: 4px; }
.friend-links a { font-size: 13px; color: var(--text-3); }
.friend-links a:hover { color: var(--accent); }
.hb--remarks { background: rgba(0,0,0,.45); color: rgba(255,255,255,.85); }
.hero-title a { color: inherit; }

/* 搜索输入框下拉（强制18.2）：序列式、一行一条、左侧序号、历史在前热门在后 */
.dk-search { position: relative; }
/* tp21 抽屉搜索框下拉：.mnd-search 有 overflow:hidden 会裁掉浮层，改为定位锚点 + 可见溢出 */
.mnd-search { position: relative; overflow: visible; }
.mnd-search .search-drop--mnd { top: calc(100% + 6px); left: 0; right: 0; }
.search-drop {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 60;
  padding: 6px 0; background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,.5); max-height: 60vh; overflow-y: auto; text-align: left;
}
.search-drop--overlay { position: static; margin-top: 10px; }
.search-drop .sd-group + .sd-group { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 4px; }
.sd-group-hd { display: flex; align-items: center; justify-content: space-between; padding: 4px 12px; }
.sd-label { font-size: 11px; color: var(--text-3); letter-spacing: .5px; }
.sd-clear { font-size: 11px; color: var(--text-3); background: none; border: 0; padding: 0; cursor: pointer; }
.sd-clear:hover { color: var(--accent); }
.sd-list { list-style: none; margin: 0; padding: 0; }
.sd-item { display: flex; align-items: center; gap: 10px; padding: 0 12px; transition: background .15s; }
.sd-item:hover { background: rgba(255,255,255,.06); }
.sd-num { flex-shrink: 0; width: 16px; font-size: 11px; color: var(--text-3); text-align: center; }
.sd-item:nth-child(-n+3) .sd-num { color: var(--accent); font-weight: 700; }
.sd-word {
  flex: 1; min-width: 0; text-align: left; padding: 6px 0;
  font-size: 13px; color: var(--text-2); background: none; border: 0; cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .15s;
}
.sd-item:hover .sd-word { color: var(--accent); }

/* ===== Footer ===== */
.site-footer {
  background: var(--bg-page); border-top: 1px solid var(--border);
  padding: 24px 0; text-align: center;
  color: var(--text-3); font-size: 13px;
}
.site-footer p { margin: 4px 0; line-height: 1.8; }
.site-footer a { color: var(--text-3); transition: color .15s; }
.site-footer a:hover { color: var(--accent); }
.footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin: 10px 0; }

/* ===== FAB ===== */
.fab-group {
  position: fixed; right: 20px; bottom: 80px; z-index: 100;
  display: flex; flex-direction: column; gap: 8px;
}
.fab-btn {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-2); font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  transition: .2s;
}
.fab-btn:hover { background: var(--fill); border-color: var(--fill); color: #fff; }
.fab-qr-popup {
  display: none; position: fixed; right: 70px; bottom: 120px; z-index: 101;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px; text-align: center;
  font-size: 13px; color: var(--text-2); box-shadow: var(--shadow-card);
}
.fab-qr-popup img { width: 100px; height: 100px; margin: 8px auto 0; }

/* ===== Mobile tabbar ===== */
.mobile-tabbar {
  display: none; position: fixed; bottom: 0; left: 0; right: 0;
  height: 56px; background: var(--bg-card);
  border-top: 1px solid var(--border); z-index: 350;
  justify-content: space-around; align-items: center;
}
.mtb-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; gap: 2px;
  font-size: 11px; color: var(--text-3); padding: 6px 0;
  transition: color .15s;
}
.mtb-item .mac-icon { font-size: 22px; }
.mtb-item:hover, .mtb-item.is-active { color: var(--accent); }

/* ===== Auth page (user/login, user/reg — 獨立頁面版本，重用 login-modal-box 樣式) ===== */
.auth-page {
  display: flex; align-items: center; justify-content: center;
  min-height: calc(100vh - var(--topbar-h)); padding: 40px 16px;
}
.auth-page .login-modal-box { width: 380px; max-width: 100%; }
.auth-page .jump-error { padding: 10px 20px 0; font-size: 13px; color: var(--accent); }

/* ===== Login / Logout Modal ===== */
.login-modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.75); z-index: 700;
  align-items: center; justify-content: center;
}
.login-modal-overlay.is-open { display: flex; }
.login-modal-box {
  width: 360px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 8px; overflow: hidden; position: relative;
}
.login-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-bottom: 1px solid var(--border);
}
.login-modal-title { font-size: 16px; font-weight: 700; }
.modal-close-btn { font-size: 20px; color: var(--text-3); }
.login-modal-body { padding: 24px 20px; }
.login-form-group { margin-bottom: 14px; }
.login-form-group label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.login-form-group input {
  width: 100%; height: 40px; padding: 0 12px;
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text-1); font-size: 14px; outline: none;
}
.login-form-group input:focus { border-color: var(--accent); }
.login-submit {
  width: 100%; height: 42px;
  background: var(--fill); color: #fff;
  border-radius: var(--radius); font-size: 15px; font-weight: 700;
  cursor: pointer; transition: background .15s; border: none;
}
.login-submit:hover { background: var(--fill-hover); }
.login-footer-links { margin-top: 12px; display: flex; justify-content: space-between; font-size: 13px; }
.login-footer-links a { color: var(--text-3); }
.login-footer-links a:hover { color: var(--accent); }

/* ===== Rank Widget ===== */
.rank-home-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.rank-col { }
.rank-col-head {
  display: flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 700; color: var(--text-1);
  margin-bottom: 10px; padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.rank-top-item {
  display: flex; gap: 10px; align-items: flex-start;
  margin-bottom: 10px;
}
.rank-top-cover {
  flex-shrink: 0; width: 72px; border-radius: var(--radius);
  overflow: hidden; position: relative; aspect-ratio: 2/3;
  background: var(--bg-elevated);
}
.rank-top-cover img { width: 100%; height: 100%; object-fit: cover; }
.rank-top-crown { position: absolute; top: 4px; left: 4px; font-size: 15px; color: #F0B429; line-height: 1; filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); }
.rank-top-info { flex: 1; min-width: 0; }
.rank-top-num {
  font-size: 22px; font-weight: 900; line-height: 1;
  color: var(--rank-1); margin-bottom: 4px;
}
.rank-top-name {
  font-size: 13px; font-weight: 700; color: var(--text-1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rank-top-meta { font-size: 11px; color: var(--text-3); margin-top: 3px; }
.rank-top-status { font-size: 11px; color: var(--score-mid, #85c13a); margin-top: 2px; }
.rank-top-hits { font-size: 12px; color: var(--accent); margin-top: 5px; display: flex; align-items: center; gap: 3px; }
.rank-list-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0; border-bottom: 1px solid var(--border);
}
.rank-list-item:last-child { border-bottom: none; }
.rank-num {
  width: 20px; text-align: center; font-size: 13px; font-weight: 700;
  flex-shrink: 0; color: var(--text-3);
}
.rank-num.is-1 { color: var(--rank-1); }
.rank-name {
  flex: 1; min-width: 0;
  font-size: 13px; color: var(--text-1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rank-name:hover { color: var(--accent); }
.rank-hits { font-size: 12px; color: var(--text-3); flex-shrink: 0; }
.rank-more { display: block; text-align: center; font-size: 13px; color: var(--text-3); margin-top: 8px; transition: color .15s; }
.rank-more:hover { color: var(--accent); text-decoration: underline; }
/* sidebar rank — vod/play, vod/detail */
.rank-col-title { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--text-1); margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.rank-col-more { font-size: 12px; font-weight: 400; color: var(--text-3); margin-left: auto; transition: color .15s; }
.rank-col-more:hover { color: var(--accent); text-decoration: underline; }
.rank-top1 { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; text-decoration: none; }
.rt1-thumb { flex-shrink: 0; width: 90px; border-radius: var(--radius); overflow: hidden; position: relative; aspect-ratio: 2/3; background: var(--bg-elevated); }
.rt1-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rt1-crown { position: absolute; top: 4px; left: 4px; font-size: 15px; color: #F0B429; line-height: 1; filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); }
.rt1-info { flex: 1; min-width: 0; }
.rt1-name { font-size: 13px; font-weight: 700; color: var(--text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0 0 4px; display: block; }
.rt1-meta { font-size: 11px; color: var(--text-3); margin: 0 0 2px; }
.rt1-status { font-size: 11px; color: var(--score-mid, #85c13a); margin: 0 0 4px; }
.rt1-hits { font-size: 12px; color: var(--accent); display: flex; align-items: center; gap: 3px; }
.rank-list { list-style: none; padding: 0; margin: 0; }
.rank-li { border-bottom: 1px solid var(--border); }
.rank-li:last-child { border-bottom: none; }
.rank-li-inner { display: flex; align-items: center; gap: 8px; padding: 6px 0; text-decoration: none; }
.rl-num { width: 20px; text-align: center; font-size: 13px; font-weight: 700; flex-shrink: 0; color: var(--text-3); }
.rl-num--gold { color: var(--rank-1, #f5a623); }
.rl-name { flex: 1; min-width: 0; font-size: 13px; color: var(--text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .15s; }
.rank-li-inner:hover .rl-name { color: var(--accent); }
.rl-hits { font-size: 12px; color: var(--text-3); flex-shrink: 0; }

/* ===== Art card ===== */
.art-home-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 12px; }
.art-card { display: flex; gap: 10px; align-items: flex-start; }
.art-card-cover { flex-shrink: 0; width: 80px; height: 54px; border-radius: var(--radius); overflow: hidden; background: var(--bg-elevated); }
.art-card-cover img { width: 100%; height: 100%; object-fit: cover; }
.art-card-info { flex: 1; min-width: 0; }
.art-card-title {
  font-size: 13px; font-weight: 600; color: var(--text-1);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  transition: color .15s;
}
.art-card-title:hover { color: var(--accent); }
.art-card-meta { font-size: 11px; color: var(--text-3); margin-top: 4px; }

/* ===== Topic card ===== */
.topic-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.topic-card { display: block; text-decoration: none; border-radius: var(--radius); overflow: hidden; background: var(--bg-card); transition: transform .2s; }
.topic-card:hover { transform: translateY(-2px); }
.topic-card-thumb { position: relative; overflow: hidden; aspect-ratio: 16/9; }
.topic-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; display: block; }
.topic-card:hover .topic-card-thumb img { transform: scale(1.05); }
.topic-card-name {
  padding: 8px 10px 0;
  font-size: 13px; font-weight: 600; color: var(--text-1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color .15s;
}
.topic-card:hover .topic-card-name { color: var(--accent); }
/* 縮圖左上角常駐播放圖示（不是 hover 才出現），比照參考網站 kuaibo8.com 首頁專題卡片 */
/* 演員縮圖堆疊：topic/detail.html 的 hero 資訊列＋topic/index.html／首頁專題卡片
   縮圖裡的迷你版都共用這組 base class（放 main.css 而不是 topic_detail.css，
   因為不是每個用到它的頁面都有載入 topic_detail.css）。 */
.td-cast-stack { display: flex; align-items: center; }
.td-cast-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--bg-elevated); border: 2px solid var(--bg-body);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3); font-size: 15px; margin-left: -8px;
}
.td-cast-avatar:first-child { margin-left: 0; }

.topic-card-play {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(0,0,0,.55); color: #fff; font-size: 11px;
  display: flex; align-items: center; justify-content: center;
}
.topic-card-meta { padding: 4px 10px 10px; font-size: 12px; color: var(--text-3); }
.sidebar-topic-grid { display: flex; flex-direction: column; gap: 10px; }
.topic-card-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.4); opacity: 0; transition: opacity .2s; font-size: 24px; color: #fff; }
.topic-card:hover .topic-card-overlay { opacity: 1; }
.topic-card-count { position: absolute; bottom: 6px; right: 6px; font-size: 11px; color: #fff; background: rgba(0,0,0,.65); padding: 2px 6px; border-radius: 3px; }
.topic-card-body { padding: 6px 10px; }
.topic-card-title { font-size: 13px; font-weight: 600; color: var(--text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0; transition: color .15s; }
.topic-card:hover .topic-card-title { color: var(--accent); }

/* ===== Actor card ===== */
.actor-card { text-align: center; }
.actor-card-cover {
  border-radius: 50%; overflow: hidden; aspect-ratio: 1/1;
  background: var(--bg-elevated); margin-bottom: 6px;
}
.actor-card-cover img { width: 100%; height: 100%; object-fit: cover; }
.actor-card-name { font-size: 13px; color: var(--text-1); }

/* ===== Comment ===== */
.comment-form { margin-bottom: 20px; }
.comment-form textarea {
  width: 100%; height: 80px; padding: 10px 12px;
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text-1); font-size: 14px;
  resize: vertical; outline: none;
}
.comment-form textarea:focus { border-color: var(--accent); }
.comment-submit {
  margin-top: 8px; padding: 8px 24px;
  background: var(--fill); color: #fff; border-radius: var(--radius);
  font-size: 14px; font-weight: 600; cursor: pointer; transition: background .15s;
}
.comment-submit:hover { background: var(--fill-hover); }
.comment-list { }
.comment-item { padding: 12px 0; border-bottom: 1px solid var(--border); }
.comment-item:last-child { border-bottom: none; }
.comment-meta { font-size: 12px; color: var(--text-3); margin-bottom: 6px; }
.comment-text { font-size: 14px; color: var(--text-2); line-height: 1.7; }

/* ===== Pagination（widget/pagination 单一来源：pg-btn / pg-num / pg-info）===== */
.pagination { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 20px; }
.pg-btn, .pg-num {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 10px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 14px; color: var(--text-2); transition: .15s;
}
.pg-btn:hover, .pg-num:hover { color: var(--accent); border-color: var(--accent); }
.pg-num.is-active { background: var(--fill); border-color: var(--fill); color: #fff; font-weight: 700; }
.pg-info { width: 100%; text-align: center; margin-top: 6px; font-size: 12px; color: var(--text-3); }
/* 列表页 9 列网格（分类/筛选/搜索共用）：≤1199 6 列、≤767 3 列 */
.vod-grid { display: grid; gap: 14px 12px; list-style: none; margin: 0; padding: 0; }
.vod-grid > li { min-width: 0; }
.vod-grid--c9 { grid-template-columns: repeat(9, minmax(0, 1fr)); }
@media (max-width: 1199px) { .vod-grid--c9 { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 767px) { .vod-grid--c9 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 8px; } }
.kb-cat-count { margin-left: 8px; font-size: 12px; font-weight: 400; color: var(--text-3); }
.kb-cat-count em { font-style: normal; color: var(--accent); font-weight: 700; }
.list-empty { padding: 40px 0; text-align: center; color: var(--text-3); font-size: 14px; }

/* ===== Content-block animate ===== */
.content-block.will-observe { opacity: 0; transform: translateY(16px); transition: opacity .4s ease, transform .4s ease; }
.content-block.will-observe.is-visible { opacity: 1; transform: none; }

/* ===== Utility ===== */
.ellipsis-1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ellipsis-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.clearfix::after { content: ""; display: table; clear: both; }
.shadow { box-shadow: var(--shadow-card); }
.color-9 { color: var(--text-3); }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-body); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }

/* ===== Responsive =====
   tp17 沒有側欄（--sidebar-w 固定 0px，見 :root），這裡不用再像 tp13 那樣在斷點裡
   覆寫 --sidebar-w／關 .side-nav。 */
@media (max-width: 1024px) {
  :root { --container-w: 100%; }
  .dk-nav-links { display: none; }
  .rank-home-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
  :root { --topbar-h: 54px; }
  .dk-search { display: none; }
  .dk-actions .dk-action-btn { display: none; }
  /* #searchToggle／.search-overlay 不再於手機斷點強制顯示——參考站手機版
     header 本來就沒有搜尋圖示，搜尋收在「全部」抽屜裡（見 .mnd-search），
     這顆按鈕維持預設的 display:none（inline style），不用再用 !important
     蓋成顯示。 */
  /* 觀看歷史／登入圖示／「全部」抽屜按鈕都要在這個斷點顯示，但上面
     `.dk-actions .dk-action-btn{display:none}` 是兩層 class 的複合選擇器
     （specificity 0,2,0），比單一 class 的 `.dk-action-btn--mob-only`／
     `.dk-action-btn--always-mob`（specificity 0,1,0）優先權更高，會直接
     蓋掉、導致這些按鈕在手機模式完全不會出現（使用者截圖回報過兩次類似
     問題）。這裡一樣用 !important 蓋回來。 */
  .dk-actions .dk-action-btn--mob-only,
  .dk-actions .dk-action-btn--always-mob { display: flex !important; }
  /* .dk-search／.dk-actions 現在都包在 .dk-right 裡面，.dk-right 本身靠 grid
     的 justify-self:end 貼右（見 .dk-topbar），不是靠自己 margin-left:auto
     頂出來的，所以 .dk-search 就算 display:none，.dk-actions 也不會跑位，
     不需要再補一個 margin-left:auto 的修正。 */
  .dk-hero { flex-direction: column; height: auto; padding: 10px 12px 0; }
  .dk-hero-slides { height: 210px; flex: none; border-radius: 8px; }
  .dk-hero-panel { display: none; }
  /* 手機版 banner 只留圖，文字/按鈕都藏起來，整張圖點擊直接跳轉（heroTap，見 §28） */
  .hero-badges, .hero-title, .hero-meta, .hero-btns { display: none; }
  .hero-slide { cursor: pointer; }
  .mobile-tabbar { display: flex; }
  .page-content { padding-bottom: 56px; }
  .video-film-list { grid-template-columns: repeat(3, 1fr); gap: 10px 8px; }
  .rank-home-grid { grid-template-columns: repeat(2, 1fr); }
  .art-home-grid { grid-template-columns: repeat(2, 1fr); }
  .topic-grid { grid-template-columns: repeat(3, 1fr); }
  .page-body { flex-direction: column; }
  .mian-sidebar { width: 100%; }
  .main-inner { max-width: calc(100vw - 32px); }
  .detail-main { flex-direction: column; }
  .detail-main-left { width: 100%; display: flex; flex-direction: column; align-items: center; }
  .detail-main-left .cover { width: 160px; }
  .detail-main-right { width: 100%; }
  /* 手機版放棄橫向捲動＋flex-basis 那一套算法，改用跟 .video-film-list 完全一樣、
     全站已經驗證過穩定的 CSS Grid 三欄寫法（見 tp13_dark_black 同一個 class 的手機版
     斷點，數值都是照抄）。連續兩次用 flex:0 0 calc()／再疊 width 明寫都沒有解決
     「一行變 1 張」的問題（使用者截圖回報過兩次），與其繼續在 flex-basis 這條路上猜，
     不如直接换成已經反覆證明可靠的 Grid 版型——Grid 的欄寬是由 grid-template-columns
     直接决定，不像 flex-basis 需要看容器怎麼分配剩餘空間，這裡沒有「算不出正確寬度」
     這一步。橫向翻頁箭頭在手機版本來就不好用（觸控滑動比按小箭頭直覺），改成滿版換行
     也同時解決了那個 UX 問題，不是純粹繞過 bug。 */
  .rail-track {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 8px;
    overflow-x: visible; overflow-y: visible;
    padding: 0; margin: 0;
  }
  .rail-card { position: relative; flex: none; width: auto; scroll-snap-align: none; }
  /* 橫向翻頁計數/箭頭在網格版型下沒有意義（已經不是橫向捲動），跟著隱藏；
     rail.js 找不到 .rail-arrow 也不會報錯（都已經是 if(btn) 防呆寫法）。 */
  .kb-cat-nav { display: none; }
}
@media (max-width: 480px) {
  .video-film-list { grid-template-columns: repeat(3, 1fr); }
  .art-home-grid { grid-template-columns: 1fr; }
  .topic-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .rank-home-grid { grid-template-columns: 1fr; }
  .rank-top-cover { width: 110px; }
  .rank-top-name { font-size: 14px; }
  .hm-card { flex: 0 0 calc((100% - 20px) / 3); }
}

/* ===== 資訊列表 art/type ===== */
@media (max-width: 480px) {
  .ali-thumb { width: 100px; }
  .ali-title { font-size: 13px; }
}

/* ===== 廣告區塊 ===== */
.site-ad {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; position: relative;
}
.site-ad::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 4px; background: var(--fill);
}
.site-ad--sidebar { display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 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(--fill); margin-bottom: 2px; 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: 5px 12px; background: var(--fill); color: #fff; border-radius: var(--radius-sm); font-size: 12px; font-weight: 600; white-space: nowrap; transition: .18s; text-decoration: none; }
.site-ad-btn:hover { opacity: 0.85; color: #fff; }

/* mac-icon sprite base */
.mac-icon{width:1em;height:1em;fill:currentColor;flex-shrink:0;}

/* ============================================================
   HERO CAROUSEL（tp21 專屬）— 中間放大＋左右露出鄰居縮圖，參考 4kvms.org 首頁
   ============================================================
   跟上面 tp17 沿用下來的 .dk-hero（單張滿版 crossfade，見 §「HERO」區塊）是完全
   不同的元件，這裡 class 名稱刻意都加 hc- 前綴（.hc-slide／.hc-dot／.hc-nav--*），
   不跟 .dk-hero 用的 .hero-slide／.hero-dot 撞名——這兩組字面上都叫「hero」，
   如果沿用同一個 class 名稱，tp17 舊規則裡沒被覆蓋到的屬性（例如 .hero-slide 的
   position:absolute; inset:0）會偷偷疊加在新元件上，版面會跑掉且很難查（測試時
   發現的教訓，直接用不同前綴從根本避免，不用逐屬性比對兩邊有沒有蓋掉)。
   運作原理：.hc-viewport 用原生橫向捲動（overflow-x:auto + scroll-snap），
   左右各留 14% padding 讓鄰居露出一截，中央那張 scroll-snap-align:center 置中，
   JS（hero_carousel.js）只負責用 IntersectionObserver 同步 is-active／圓點、
   箭頭與圓點點擊時呼叫 scrollIntoView，不手算 translateX，跟 rail.js／kb_pills.js
   是同一套「交給瀏覽器原生捲動」的寫法。 */
/* 高度直接寫死在最外層 .hero-carousel（比照參考站 devtools 量出來的
   section#hero-banner 實際高度 ~688px），裡面 .hc-viewport／.hc-track／
   .hc-slide 一路用 height:100% 往下繼承，不要在 .hc-slide 上另外寫死一個
   跟外層對不上的 px 高度——之前就是 .hc-slide 自己寫 420px，跟外層沒有關聯，
   導致外層 .hero-carousel 的實際高度只由「內容自然高度＋padding」撐出來
   （420+24+24=468px），完全沒吃到「應該要多高」這個設計意圖（使用者截圖回報
   量到的就是 468px）。用 box-sizing:border-box 讓 padding 內含在這個高度裡，
   不會變成 688+48。 */
/* 縫隙底色改成純色 #0D0F11——直接對照 4kvms.org 編譯後 CSS 的
   `.bg-shensebg{background-color:rgb(13 15 17)}`，不是模糊放大的圖片延伸
   （早期版本猜錯了，見下方 .hc-viewport 的說明修正）。 */
.hero-carousel {
  position: relative; height: 688px; box-sizing: border-box;
  padding: 24px 0; overflow: hidden;
  background: #0D0F11;
}
/* ⚠️ 不要加 position:relative／z-index 在這個元素上：.hc-nav 箭頭是
   position:absolute，如果 .hc-viewport 變成 positioned 元素，箭頭的
   containing block 就會從外層 .hero-carousel 改成這裡，而這裡又是
   overflow-x:auto 的捲動容器——箭頭會被當成捲動內容的一部分，捲到其他
   slide 時箭頭會被裁掉/捲走，只有在第一張 slide 附近才看得到（使用者
   截圖回報「箭頭附著在第一個影片上，換頁就消失」）。這裡曾經因為疊加
   .hc-backdrop 模糊背景層而加過 position:relative;z-index:1，backdrop
   拿掉的時候忘記把這兩個屬性也拿掉，見 main.css 上面「HERO CAROUSEL」
   區塊「箭頭按鈕的定位技巧」那段說明——箭頭要固定，這裡就必須維持
   static（非 positioned），讓箭頭的 containing block 往上跳到
   .hero-carousel。 */
.hc-viewport {
  height: 100%;
  overflow-x: auto; overflow-y: visible; scroll-behavior: smooth;
  scroll-snap-type: x mandatory; scrollbar-width: none;
  padding: 0 14%;
  box-sizing: border-box;
}
.hc-viewport::-webkit-scrollbar { display: none; }
.hc-track { display: flex; gap: 16px; height: 100%; }
.hc-slide {
  position: relative; flex: 0 0 auto; width: 100%; height: 100%;
  scroll-snap-align: center;
  border-radius: 14px; overflow: hidden;
  background: var(--bg-card);
  opacity: .45; transition: opacity .35s ease;
  cursor: pointer;
}
.hc-slide.is-active { opacity: 1; }
.hc-slide-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
}
.hc-slide-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.15) 45%, transparent 70%);
}
/* 垂直置中，但比正中央再往下一點：比照參考站截圖量出來的位置（文字區塊
   偏下半部，不是圖片正中央），單純 top:50% 會偏高（使用者截圖回報「太上面
   一點點」），用 calc(50% + 28px) 把置中基準點往下挪一小段，水平仍維持
   靠左（文字本身靠左對齊，只有垂直方向要置中）。 */
.hc-slide-content {
  position: absolute; left: 28px; right: 28px; top: calc(50% + 28px); transform: translateY(-50%); z-index: 2;
  opacity: 0; transition: opacity .25s ease;
}
.hc-slide.is-active .hc-slide-content { opacity: 1; }
.hc-slide-badges { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.hc-slide-badge {
  display: inline-block; padding: 2px 8px; border-radius: 2px;
  font-size: 11px; font-weight: 700; background: var(--accent); color: #fff;
}
.hc-slide-title { font-size: 24px; font-weight: 800; color: #fff; margin-bottom: 8px; text-shadow: 0 2px 10px rgba(0,0,0,.6); }
.hc-slide-meta {
  font-size: 13px; color: rgba(255,255,255,.75); line-height: 1.6; margin-bottom: 6px;
  max-width: 640px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hc-slide-rating { display: flex; align-items: center; gap: 6px; font-size: 13px; color: rgba(255,255,255,.85); }
.hc-slide-rating .mac-icon { color: #FFD24D; font-size: 14px; }
.hc-slide-rating b { color: #fff; font-size: 15px; }

/* 箭頭改成純圖示（不是實心圓形按鈕），比照參考站截圖——箭頭本身沒有底色/邊框，
   站在左右露出的鄰居縮圖上方，用 drop-shadow 確保在任何底圖顏色上都看得清楚，
   不是靠底色色塊撐視覺。 */
.hc-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; color: #fff; font-size: 26px;
  filter: drop-shadow(0 1px 4px rgba(0,0,0,.6));
  transition: transform .15s;
}
.hc-nav:hover { transform: translateY(-50%) scale(1.15); }
.hc-nav--prev { left: 12px; }
.hc-nav--next { right: 12px; }

/* 圓點改疊在圖片正下方（比照參考站截圖），不是獨立一行排在 Hero 外面——
   .hero-carousel 本身是 position:relative，這裡直接絕對定位蓋在圖上。 */
.hc-dots {
  position: absolute; left: 0; right: 0; bottom: 14px; z-index: 3;
  display: flex; justify-content: center; align-items: center; gap: 6px;
}
.hc-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,.3); transition: .2s;
}
.hc-dot.is-active { background: var(--accent); width: 20px; border-radius: 3px; }

/* 響應式高度改在最外層 .hero-carousel 上調整（.hc-viewport／.hc-track／
   .hc-slide 都是 height:100% 繼承下來的，不用每層各自重複寫一次高度）。 */
@media (max-width: 1024px) {
  .hero-carousel { height: 480px; }
  .hc-viewport { padding: 0 6%; }
}
@media (max-width: 600px) {
  .hero-carousel { height: 320px; }
  .hc-viewport { padding: 0 3%; }
  .hc-slide { border-radius: 10px; }
  .hc-nav { display: none; } /* 手機版直接滑動切換，不需要箭頭按鈕 */
  /* 手機版 Hero 不顯示標題／簡介／評分這些文字疊層（使用者截圖回報），
     只留純圖片＋下面的圓點分頁，.hc-slide-title 的字級設定也跟著沒用了。 */
  .hc-slide-content { display: none; }
}

.playlist-empty {
  padding: 24px;
  text-align: center;
  color: var(--text-3);
  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-3);
  margin-bottom: 10px;
  padding: 8px 12px;
  background: var(--bg-elevated);
}
.playlist-notice .mac-icon { color: var(--accent); }
.playlist-episodes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 4px;
}
.playlist-episodes.episodes-collapsed {
  max-height: 132px;
  overflow: hidden;
}
.episode-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 70px;
  padding: 7px 10px;
  background: #fcfcfc;
  border: 1px solid var(--border-2);
  font-size: 13px;
  color: var(--text-2);
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.episode-btn:hover { border-color: var(--accent); color: var(--accent); }
.episode-btn.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.episode-more-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  padding: 5px 12px;
  border: 1px dashed var(--border);
  font-size: 12px;
  color: var(--text-3);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.episode-more-trigger:hover { color: var(--accent); border-color: var(--accent); }
/* ==========================================
   分享弹窗 widget（detail / down 共用）
   ========================================== */
/* ===== Share Modal ===== */
.share-modal { display: none; }
.share-modal.is-open { display: block; }
.share-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 1400;
}
.share-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1401;
  background: var(--bg-card);
  padding: 24px;
  width: min(380px, 92vw);
  box-shadow: 0 16px 48px rgba(0,0,0,0.3);
}
.share-popup-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-3);
  cursor: pointer;
  line-height: 1;
}
.share-popup-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-1);
  margin: 0 0 16px;
}
.share-popup-icons {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}
.share-popup-hint {
  font-size: 12px;
  color: var(--text-3);
  margin: 0 0 8px;
}
.share-popup-link {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 8px 10px;
  font-size: 12px;
  color: var(--text-2);
  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;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.share-popup-copy:hover { opacity: 0.88; }
/* ==========================================
   简介展开 widget（detail / down 共用）
   ========================================== */
.desc-body {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.8;
}
.desc-body * {
  background-color: transparent !important;
  color: inherit !important;
}
.desc-body.desc-collapsed {
  max-height: 5.4em;
  overflow: hidden;
  position: relative;
}
.desc-body.desc-collapsed::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2.4em;
  background: linear-gradient(transparent, var(--bg-card));
}
.desc-body.desc-expanded {
  max-height: none;
}
.desc-expand-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  background: none;
  border: none;
  color: var(--accent);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 0;
}
.desc-expand-btn:hover { opacity: 0.8; }
/* 简介两段式：模板化短句与真实剧情之间要有可见间距（全局 reset 清掉了 p 的默认 margin，强制1.4/7.3） */
.desc-lead { margin-bottom: 10px; color: var(--text-2); }
.desc-text p { margin-bottom: 10px; }
.desc-text p:last-child { margin-bottom: 0; }
/* ==========================================
   评论 widget（detail / play / art detail 共用）
   ========================================== */
/* ===== Comment Section（仿 .mac_comment 素樸方框） ===== */
.cmt-total-label { font-size: 13px; font-weight: 400; color: var(--text-3); margin-left: 6px; }
.cmt-total-label em { color: var(--accent); font-style: normal; }
.mac_comment.cmt-ajax-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  min-height: 60px;
  padding: 12px;
}
.cmt-loading {
  font-size: 13px;
  color: var(--text-3);
  padding: 24px 0;
  text-align: center;
}
.cmt-empty {
  padding: 32px 0;
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
}
.cmt-form {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 16px;
  margin-bottom: 24px;
}
.cmt-textarea {
  display: block;
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-1);
  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-3); }
.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-card);
  border: 1px solid var(--border);
  color: var(--text-1);
  font-size: 12px;
  outline: none;
}
.cmt-captcha-img { height: 30px; 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-3); white-space: nowrap; }
.cmt-remaining em { color: var(--accent); font-style: normal; }
.cmt-submit-btn {
  padding: 8px 22px;
  background: var(--accent-2);
  color: #fff;
  border: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}
.cmt-submit-btn:hover { background: var(--accent-2-alt); }
.cmt-list { display: flex; flex-direction: column; gap: 0; list-style: none; margin: 0; padding: 0; }
.cmt-children { list-style: none; margin: 0; padding: 0; }
.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-2);
  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-1); }
.cmt-time { font-size: 11px; color: var(--text-3); }
.cmt-content { font-size: 13px; color: var(--text-2); line-height: 1.6; margin: 0 0 6px; }
.cmt-child-item {
  margin-top: 8px;
  padding: 8px 12px;
  background: var(--bg-elevated);
  border-left: 2px solid var(--accent);
}
.cmt-child-name { font-size: 12px; font-weight: 600; color: var(--text-1); margin-right: 6px; }
.cmt-actions { display: flex; gap: 12px; margin-top: 4px; }
.cmt-action-link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
  font-size: 12px;
  color: var(--text-3);
  text-decoration: none;
  transition: color 0.15s;
}
.cmt-action-link:hover { color: var(--accent); }
.cmt-paging {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 16px 0 4px;
}
.cmt-page-btn {
  background: none;
  font: inherit;
  padding: 4px 10px;
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}
.cmt-page-btn:hover { border-color: var(--accent); color: var(--accent); }
.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; }
/* ==========================================
   专题侧栏 widget（detail / play / down 共用）
   ========================================== */
.topic-side-block { margin-top: 24px; padding-bottom: 8px; }
.ts-hd { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px 6px; }
.ts-hd-title { display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 700; color: var(--text-1); }
.ts-hd-title .mac-icon { color: var(--accent); }
.ts-hd-more { font-size: 12px; color: var(--text-3); }
.ts-hd-more:hover { color: var(--accent); }
.ts-list { list-style: none; margin: 0; padding: 0 12px; display: flex; flex-direction: column; gap: 10px; }
.ts-item { display: block; }
.ts-cover { aspect-ratio: 16/9; overflow: hidden; background: var(--bg-elevated) url("../img/load.gif") no-repeat center/cover; }
.ts-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s; }
.ts-item:hover .ts-cover img { transform: scale(1.04); }
.ts-title { font-size: 13px; font-weight: 600; color: var(--text-1); margin-top: 6px; line-height: 1.4; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ts-item:hover .ts-title { color: var(--accent); }
.ts-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; }
@media (max-width: 1199px) {
  .detail-vod-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .breadcrumb--wide { margin: 10px 12px; }
  .cmt-form-footer { flex-direction: column; align-items: stretch; }
  .cmt-form-right { margin-left: 0; justify-content: space-between; }
}
@media (max-width: 600px) {
  .detail-vod-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
}

/* ==========================================
   资讯页共用（art/type + art/detail）：三栏布局 / 左侧分类导航 / 右侧栏 widget / 轮播
   原先在 art_type.css 与 art_detail.css 各写一份，这里收成单一来源。
   ========================================== */
.art-layout {
  max-width: var(--content-max); margin: 0 auto;
  display: grid;
  grid-template-columns: 200px 1fr 240px;
  gap: 24px;
  padding: 24px 20px 40px;
  align-items: start;
}
.art-content { min-width: 0; }
.art-content .breadcrumb { margin: 0 0 16px; }

/* 左侧分类导航 */
.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-item:last-child { border-bottom: none; }
.aln-item:hover { color: var(--text-1); background: var(--bg-elevated); }
.aln-item.is-active { color: var(--accent); background: var(--accent-light); font-weight: 600; }
.aln-item .mac-icon { width: 16px; height: 16px; }

/* 轮播 */
.art-slider {
  position: relative; overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 16/7;
  margin-bottom: 24px;
  background: var(--bg-elevated);
}
.art-slider-track { display: flex; transition: transform 0.4s ease; margin: 0; }
.art-slide { flex-shrink: 0; width: 100%; position: relative; margin: 0; }
.art-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.art-slide-caption {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 20px 16px 12px;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
}
.art-slide-title { font-size: 14px; font-weight: 600; color: #fff; }
.art-slider-dots { position: absolute; bottom: 10px; right: 12px; display: flex; gap: 6px; }
.asd {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,0.4); cursor: pointer; transition: background 0.2s;
}
.asd.is-active { background: var(--bg-card); width: 18px; border-radius: 3px; }

/* 右侧栏 */
.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: 24px;
}
.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-title .mac-icon { color: var(--accent); }
.art-hot-list { list-style: none; margin: 0; 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); }
.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);
}
/* 前三名配色用 nth-child，不在模板里判断 */
.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; }
.ahl-name { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

.art-sb-read-list { list-style: none; margin: 0; 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) url("../img/load.gif") no-repeat center/cover; }
.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); }
.asi-cat { font-size: 11px; color: var(--text-3); }

/* 平板：收起右侧栏，左导航缩窄 */
@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;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    min-width: 0;
    width: 100%;
  }
  .art-leftnav::-webkit-scrollbar { display: none; }
  .aln-item {
    flex-shrink: 0;
    border-bottom: none;
    border-right: 1px solid var(--border);
    padding: 9px 14px;
    font-size: 13px;
    white-space: nowrap;
  }
  .aln-item:last-child { border-right: none; }
  .art-content { width: 100%; }
  .art-slider { aspect-ratio: 16/9; margin-bottom: 12px; }
}
