/*
Theme Name: 寵短劇網 橙白分格
Theme URI: https://example.invalid/
Author: SD Network
Description: 橙白分格風短劇主題：白底橙紅強調、斜切分格卡片，首屏為 2×3 斜切拼貼。
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.1
Text Domain: sd-b3
*/

/* ==========================================================================
   共用基礎層（結構 / 行為）— 顏色與造型一律走變數，各主題在下方覆寫
   需要的變數：--bg --surface --ink --muted --line --accent --accent-2 --accent-soft
              --on-accent --radius --wrap --gut --font --scrim
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.7 var(--font); overflow-x: clip;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
body.sd-no-scroll { overflow: hidden; }
img, video, iframe, svg { max-width: 100%; }
img { height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.b3-wrap { width: 100%; max-width: var(--wrap, 1240px); margin: 0 auto; padding: 0 var(--gut, 20px); }
.sr-only, .screen-reader-text {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: 12px; top: -80px; z-index: 999; padding: 12px 18px; background: var(--ink); color: var(--bg); }
.skip:focus { top: 12px; }

/* ---------- 搜尋表單 ---------- */
.b3-sf { display: flex; gap: 8px; align-items: stretch; }
.b3-sf input[type="search"] {
  flex: 1 1 auto; min-width: 0; min-height: 44px; padding: 0 14px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: var(--radius);
  -webkit-appearance: none; appearance: none;
}
.b3-sf input[type="search"]::placeholder { color: var(--muted); opacity: .8; }
.b3-sf button {
  flex: 0 0 auto; min-height: 44px; padding: 0 20px; border: 0; border-radius: var(--radius);
  background: var(--accent); color: var(--on-accent); font-weight: 700;
}

/* ---------- 搜尋面板 / 遮罩 / 手機抽屜（app.js 以 id 綁定） ---------- */
.b3-search {
  position: fixed; inset: 0; z-index: 200; display: grid; align-items: start; justify-items: center;
  padding: 12vh 16px 16px; background: var(--scrim, rgba(0, 0, 0, .55));
  opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s;
}
.b3-search.is-open { opacity: 1; visibility: visible; }
.b3-search__box {
  width: min(640px, 100%); max-height: 80vh; overflow: auto; padding: 20px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius);
}
.b3-search__hint { margin: 18px 0 8px; font-size: 13px; color: var(--muted); }
.b3-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.b3-tags a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 14px;
}
.b3-tags a:hover { border-color: var(--accent); color: var(--accent); }

.b3-overlay { position: fixed; inset: 0; z-index: 150; background: var(--scrim, rgba(0, 0, 0, .55)); opacity: 0; transition: opacity .25s; }
.b3-overlay.is-open { opacity: 1; }
.b3-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 160; width: min(320px, 86vw);
  padding: 68px 22px 28px; overflow: auto; background: var(--surface); color: var(--ink);
  border-left: 1px solid var(--line);
  transform: translateX(100%); visibility: hidden; transition: transform .25s, visibility .25s;
}
.b3-drawer.is-open { transform: none; visibility: visible; }
.b3-drawer__close {
  position: absolute; top: 10px; right: 10px; width: 48px; height: 48px;
  display: grid; place-items: center; border: 0; background: transparent; font-size: 20px;
}
.b3-drawer__list { list-style: none; margin: 0; padding: 0; }
.b3-drawer__list a { display: flex; align-items: center; min-height: 52px; border-bottom: 1px solid var(--line); font-size: 17px; }
.b3-drawer__list [aria-current="page"], .b3-drawer__list .current-menu-item > a { color: var(--accent); font-weight: 700; }

/* ---------- 麵包屑 ---------- */
.sd-crumbs { padding: 14px 0 4px; font-size: 13px; color: var(--muted); }
.sd-crumbs__list { display: flex; flex-wrap: wrap; align-items: center; list-style: none; margin: 0; padding: 0; }
.sd-crumbs li { display: inline-flex; align-items: center; min-width: 0; }
.sd-crumbs li + li::before { content: "/"; margin: 0 8px; opacity: .5; }
.sd-crumbs a { display: inline-flex; align-items: center; min-height: 44px; }
.sd-crumbs a:hover { color: var(--accent); }
.sd-crumbs [aria-current="page"] { color: var(--ink); max-width: 60vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 分頁 ---------- */
.sd-pagination { margin: 36px 0 8px; }
.sd-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.sd-pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 14px;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-weight: 600;
}
.sd-pagination a.page-numbers:hover { border-color: var(--accent); color: var(--accent); }
.sd-pagination .current { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.sd-pagination .dots { background: none; border-color: transparent; }

/* ---------- 播放器 / 提示框 ---------- */
.sd-player { background: #000; overflow: hidden; }
.sd-player video { display: block; width: 100%; aspect-ratio: 9 / 16; max-height: 78vh; object-fit: contain; background: #000; }
.sd-embed { aspect-ratio: 9 / 16; max-height: 78vh; background: #000; }
.sd-embed iframe { display: block; width: 100%; height: 100%; border: 0; }
.sd-player__fallback { padding: 18px; color: #e5e7eb; font-size: 14px; }
.sd-player__fallback a { text-decoration: underline; }
.sd-callout { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 20px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.sd-callout__body { flex: 1 1 200px; }
.sd-callout__title { font-weight: 800; margin-bottom: 4px; }
.sd-callout__desc { color: var(--muted); font-size: 14px; }
.sd-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 22px;
  border: 0; border-radius: var(--radius); background: var(--accent); color: var(--on-accent); font-weight: 700;
}

/* ---------- 版面骨架（詳情 / 分集）：左播放器、右選集；≤900px 上下堆疊 ---------- */
.b3-dgrid { display: grid; grid-template-columns: minmax(280px, 400px) minmax(0, 1fr); gap: 32px; align-items: start; }
.b3-dgrid__l, .b3-dgrid__r { min-width: 0; }
.b3-dposter img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.b3-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.b3-pill { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; font-size: 13px; border: 1px solid var(--line); border-radius: 999px; }
a.b3-pill { min-height: 44px; }
.b3-pill--accent { border-color: var(--accent); color: var(--accent); }
.b3-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0; }
.b3-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 22px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: var(--radius); font-weight: 600;
}
.b3-btn--primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.b3-note { padding: 14px 16px; border: 1px dashed var(--line); color: var(--muted); font-size: 14px; }
.b3-pn { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; }
.b3-pn a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); background: var(--surface); }
.b3-pn a.is-next { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.b3-side-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: 16px; color: var(--accent); font-weight: 600; }
.b3-prose { max-width: 70ch; }
.b3-prose img { height: auto; }
.b3-faq details { border-bottom: 1px solid var(--line); }
.b3-faq summary { display: flex; align-items: center; min-height: 52px; cursor: pointer; font-weight: 600; }
.b3-faq details p { color: var(--muted); }
.b3-empty, .b3-notfound { padding: 48px 0; }
.b3-notfound__search { max-width: 520px; margin: 22px 0; }
.b3-notfound__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.b3-results { display: grid; gap: 0; }
.b3-result { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: flex-start; min-width: 0; }
.b3-result__img { width: 72px; flex: 0 0 72px; aspect-ratio: 2 / 3; object-fit: cover; }
.b3-result__body { display: grid; gap: 4px; min-width: 0; }
.b3-result__t { font-weight: 700; overflow-wrap: anywhere; }
.b3-result__m, .b3-result__x { font-size: 13px; color: var(--muted); }
.b3-searchbar { max-width: 640px; margin: 4px 0 24px; }

/* ---------- 篩選條：行內捲動，不撐破版面 ---------- */
.b3-filter { display: grid; gap: 4px; margin: 0 0 24px; }
.b3-filter__row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.b3-filter__label { flex: 0 0 auto; font-size: 13px; color: var(--muted); }
.b3-filter__list { display: flex; flex: 1 1 auto; gap: 6px; min-width: 0; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.b3-filter__list::-webkit-scrollbar { display: none; }
.b3-filter__list a { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; white-space: nowrap; }

/* ---------- 選集容器（app.js 會把目前集捲到可視範圍） ---------- */
[data-eps] { position: relative; }

/* ---------- 共用預設（各主題在 theme.css 覆寫） ---------- */
.b3-block { margin-top: clamp(40px, 6vw, 72px); }
.b3-pagehead { padding: 26px 0 20px; }
.b3-pagehead h1 { font-size: clamp(28px, 4vw, 44px); overflow-wrap: anywhere; }
.b3-pagehead p { margin: 10px 0 0; color: var(--muted); }
.b3-dhead { padding: 8px 0 22px; }
.b3-dhead h1 { font-size: clamp(26px, 3.6vw, 40px); overflow-wrap: anywhere; }
.b3-syn { font-size: 16px; line-height: 1.9; }
.b3-h2 { font-size: 20px; margin: 0 0 14px; }
.b3-h2 small { margin-left: 8px; font-size: 13px; font-weight: 500; color: var(--muted); }
.b3-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); column-gap: 28px; margin: 0; }
.b3-fact { padding: 12px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.b3-fact dt { font-size: 12.5px; color: var(--muted); }
.b3-fact dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.b3-fact--wide { grid-column: 1 / -1; }
.b3-article { max-width: 860px; }
.b3-notfound__code { margin: 0; font-size: clamp(72px, 16vw, 150px); font-weight: 900; line-height: 1; color: var(--accent); }
.b3-notfound h1 { font-size: clamp(26px, 4vw, 40px); margin: 6px 0 10px; }
.b3-notfound__desc { max-width: 34em; color: var(--muted); }
.b3-empty__title { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.b3-result:hover .b3-result__t { color: var(--accent); }
.b3-sec { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.b3-sec__more { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); font-weight: 600; white-space: nowrap; }

@media (max-width: 900px) {
  .b3-dgrid { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .b3-dgrid__l .sd-player, .b3-dgrid__l .b3-dposter { max-width: 420px; margin-inline: auto; }
}
@media (max-width: 560px) {
  :root { --gut: 16px; }
  .b3-filter__row { gap: 8px; }
  .sd-crumbs [aria-current="page"] { max-width: 48vw; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ==========================================================================
   sd-b3 橙白分格：白底 / 橙紅強調 / 斜切分格卡片 / 首屏 2×3 斜切拼貼 / 平行四邊形標籤
   斜切做法：卡片與拼貼用 transform: skewX + 內容反向斜切；標籤與按鈕用 clip-path 平行四邊形（文字保持正立）
   ========================================================================== */

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --paper: #fff4ec;
  --ink: #1c1411;
  --muted: #6f625b;
  --line: #eadbd2;
  --accent: #f2542d;
  --accent-2: #ff8a3d;
  --accent-soft: rgba(242, 84, 45, .14);
  --on-accent: #ffffff;
  --radius: 0px;
  --skew: -6deg;
  --para: 12px;
  --wrap: 1240px;
  --gut: 28px;
  --scrim: rgba(28, 20, 17, .55);
  --sans: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font: var(--sans);
}

body { background: var(--bg); }
.b3-main { overflow-x: clip; } /* 斜切偽元素（標題底色塊）可能略超出，裁在 main 內 */
h1, h2, h3 { font-weight: 900; letter-spacing: .01em; }
a:hover { color: var(--accent); }
::selection { background: var(--accent); color: #fff; }

/* 平行四邊形（文字保持正立） */
.b3-btn, .b3-pill, .b3-nav__list a, .b3-tool, .b3-filter__list a, .b3-chips a, .b3-brand, .sd-pagination .page-numbers, .b3-pn a, .b3-sf button {
  clip-path: polygon(var(--para) 0, 100% 0, calc(100% - var(--para)) 100%, 0 100%);
}

/* ---------- 頁首 ---------- */
.b3-head { position: sticky; top: 0; z-index: 100; background: #fff; border-bottom: 4px solid var(--accent); }
.b3-head__in { display: flex; align-items: center; gap: 22px; min-height: 68px; }
.b3-brand { display: inline-flex; align-items: center; min-height: 48px; padding: 0 30px; background: var(--accent); color: #fff; font-size: 22px; font-weight: 900; letter-spacing: .06em; }
.b3-brand:hover { background: var(--ink); color: #fff; }
.b3-brand__img { max-height: 36px; width: auto; }
.b3-nav { flex: 1 1 auto; min-width: 0; }
.b3-nav__list { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.b3-nav__list a { display: flex; align-items: center; min-height: 44px; padding: 0 22px; font-weight: 700; font-size: 15px; }
.b3-nav__list a:hover { background: var(--paper); color: var(--accent); }
.b3-nav__list [aria-current="page"], .b3-nav__list .current-menu-item > a { background: var(--ink); color: #fff; }
.b3-tools { display: flex; gap: 4px; margin-left: auto; }
.b3-tool { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 48px; padding: 0 20px; border: 0; background: var(--paper); font-weight: 700; }
.b3-tool__in { display: inline-flex; align-items: center; gap: 6px; }
.b3-tool:hover { background: var(--accent); color: #fff; }
.b3-tool--menu { display: none; }

/* ---------- 首屏：標題 + 2×3 斜切拼貼 ---------- */
.b3-first { position: relative; overflow: hidden; padding: 56px 0 64px; background: linear-gradient(104deg, #fff 0 56%, var(--paper) 56% 100%); }
.b3-first::after { content: ""; position: absolute; right: -8%; top: -30%; width: 34%; height: 160%; background: var(--accent); opacity: .08; transform: skewX(-16deg); pointer-events: none; }
.b3-first__in { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 44px; align-items: center; }
.b3-kicker { margin: 0 0 14px; font-weight: 700; letter-spacing: .08em; color: var(--muted); }
.b3-kicker span { display: inline-block; margin-right: 8px; padding: 2px 12px; background: var(--accent); color: #fff; font-size: 12px; letter-spacing: .2em; clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%); }
.b3-first h1 { display: grid; gap: 12px; }
.b3-h1__brand { font-size: clamp(40px, 6.2vw, 84px); line-height: 1.05; color: var(--accent); letter-spacing: .02em; }
.b3-h1__tag { font-size: clamp(18px, 2.2vw, 26px); line-height: 1.5; font-weight: 700; }
.b3-first__p { max-width: 28em; margin: 20px 0 24px; font-size: 16px; line-height: 1.9; color: var(--muted); }
.b3-first__p b { color: var(--accent); font-size: 1.2em; }
.b3-first__act { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.b3-collage { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(2, auto); gap: 14px; padding: 0 22px; }
.b3-collage__c { display: block; overflow: hidden; transform: skewX(-8deg); border: 3px solid #fff; box-shadow: 0 10px 22px -8px rgba(28, 20, 17, .35); background: var(--ink); transition: transform .2s, box-shadow .2s; }
.b3-collage__c:nth-child(even) { margin-top: 18px; margin-bottom: -18px; }
.b3-collage__c:hover { transform: skewX(-8deg) translateY(-6px); box-shadow: 0 16px 28px -8px rgba(242, 84, 45, .55); }
.b3-collage__in { position: relative; display: block; margin: 0 -10%; transform: skewX(8deg); }
.b3-collage__in img { width: 100%; aspect-ratio: 1 / 1.2; object-fit: cover; }
.b3-collage__cap { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 8px; padding: 26px 13% 12px; background: linear-gradient(0deg, rgba(28, 20, 17, .85), transparent); color: #fff; }
.b3-collage__no { flex: 0 0 auto; display: grid; place-items: center; width: 24px; height: 24px; background: var(--accent); font: 900 13px var(--sans); }
.b3-collage__t { min-width: 0; font-size: 13px; font-weight: 700; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* ---------- 區塊標題 / 按鈕 ---------- */
.b3-sec { margin: 0 0 26px; align-items: center; }
.b3-sec h2 { font-size: clamp(24px, 3vw, 34px); }
.b3-sec__tx { position: relative; display: inline-block; padding: 0 6px; z-index: 0; }
.b3-sec__tx::after { content: ""; position: absolute; left: -6px; right: -10px; bottom: 2px; height: 14px; background: var(--accent); opacity: .85; transform: skewX(-18deg); z-index: -1; }
.b3-block { margin-top: clamp(48px, 7vw, 88px); }
.b3-btn { min-height: 48px; padding: 0 30px; border: 0; background: var(--ink); color: #fff; font-weight: 800; letter-spacing: .05em; }
.b3-btn:hover { background: var(--accent); color: #fff; }
.b3-btn--primary { background: var(--accent); }
.b3-btn--primary:hover { background: var(--ink); }
.b3-pill { min-height: 36px; padding: 0 20px; border: 0; background: var(--paper); font-weight: 600; }
a.b3-pill { min-height: 44px; }
a.b3-pill:hover { background: var(--accent); color: #fff; }
.b3-pill--accent { background: var(--accent); color: #fff; }

/* ---------- 斜切分格卡 ---------- */
.b3-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 34px 26px; padding: 0 8px 10px; }
.b3-tile { display: block; min-width: 0; transform: skewX(var(--skew)); background: #fff; border: 2px solid var(--ink); box-shadow: 7px 7px 0 var(--accent); transition: transform .18s, box-shadow .18s; }
.b3-tile:hover { transform: skewX(var(--skew)) translate(-3px, -3px); box-shadow: 11px 11px 0 var(--accent); color: inherit; }
.b3-tile__in { display: block; }
.b3-tile__fig { position: relative; display: block; overflow: hidden; }
.b3-tile__fig img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.b3-tile__badge { position: absolute; left: 0; top: 10px; padding: 4px 12px 4px 18px; background: var(--accent); color: #fff; font: 800 12px var(--sans); letter-spacing: .04em; transform: skewX(calc(var(--skew) * -1)); transform-origin: left top; }
.b3-tile__cap { display: grid; gap: 3px; padding: 10px 14px 12px; border-top: 2px solid var(--ink); transform: skewX(calc(var(--skew) * -1)); }
.b3-tile__t { font-weight: 800; line-height: 1.35; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.b3-tile:hover .b3-tile__t { color: var(--accent); }
.b3-tile__m { font-size: 12.5px; color: var(--muted); }

/* ---------- 分類 / 排行 ---------- */
.b3-duo { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 56px; }
.b3-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.b3-chips a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 26px; background: var(--paper); font-weight: 700; }
.b3-chips a span { display: inline-flex; align-items: baseline; gap: 8px; }
.b3-chips em { font: normal 800 12px var(--sans); color: var(--accent); }
.b3-chips a:hover { background: var(--accent); color: #fff; }
.b3-chips a:hover em { color: #fff; }
.b3-chips li:nth-child(3n) a { background: var(--ink); color: #fff; }
.b3-chips li:nth-child(3n) a:hover { background: var(--accent); }
.b3-rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.b3-rank a { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 56px; padding-right: 14px; border-bottom: 2px solid var(--line); }
.b3-rank a:hover { border-color: var(--accent); }
.b3-rank a:hover .b3-rank__t { color: var(--accent); }
.b3-rank__no { display: grid; place-items: center; align-self: stretch; background: var(--ink); color: #fff; font: 900 22px var(--sans); clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%); }
.b3-rank li:nth-child(-n+3) .b3-rank__no { background: var(--accent); }
.b3-rank__t { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b3-rank__m { font-size: 12.5px; color: var(--muted); white-space: nowrap; }

/* ---------- 列表頁 ---------- */
.b3-pagehead { padding: 38px 0 18px; }
.b3-pagehead h1 { position: relative; display: inline-block; z-index: 0; font-size: clamp(30px, 4.6vw, 56px); }
.b3-pagehead h1::after { content: ""; position: absolute; left: -8px; right: -16px; bottom: 4px; height: 16px; background: var(--accent); opacity: .85; transform: skewX(-18deg); z-index: -1; }
.b3-filter { gap: 2px; padding: 10px 0 12px; margin-bottom: 34px; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.b3-filter__label { min-width: 2.8em; font-weight: 900; color: var(--accent); }
.b3-filter__list { gap: 4px; }
.b3-filter__list a { padding: 0 20px; font-weight: 600; font-size: 14px; }
.b3-filter__list a:hover { background: var(--paper); color: var(--accent); }
.b3-filter__list a[aria-current="page"] { background: var(--accent); color: #fff; }
.sd-pagination .page-numbers { border: 0; background: var(--paper); color: var(--ink); min-width: 52px; }
.sd-pagination a.page-numbers:hover { background: var(--ink); color: #fff; }
.sd-pagination .current { background: var(--accent); color: #fff; }

/* ---------- 詳情 / 分集 ---------- */
.b3-dhead h1 { font-size: clamp(30px, 4.6vw, 54px); line-height: 1.12; }
.b3-dgrid { gap: 48px; }
.b3-player, .b3-dposter { border: 3px solid var(--ink); box-shadow: 12px 12px 0 var(--accent); background: #000; }
.b3-dposter img { aspect-ratio: 2 / 3; }
.b3-syn { padding-left: 18px; border-left: 6px solid var(--accent); font-size: 17px; line-height: 2; }
.b3-btn { color: #fff; }
.b3-actions { gap: 8px; }
.b3-actions .b3-btn:not(.b3-btn--primary) { background: var(--paper); color: var(--ink); }
.b3-actions .b3-btn:not(.b3-btn--primary):hover { background: var(--ink); color: #fff; }
.b3-note { border: 2px dashed var(--accent); color: var(--ink); }
.b3-eps-sec .b3-h2 { display: inline-block; padding: 4px 18px 4px 14px; background: var(--ink); color: #fff; clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 100%, 0 100%); }
.b3-eps-sec .b3-h2 small { color: #ffd2c4; }
.b3-eps { list-style: none; margin: 14px 0 0; padding: 0 8px; display: grid; grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); gap: 10px; max-height: 420px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--accent) transparent; }
.b3-eps a, .b3-eps .is-off { display: block; transform: skewX(-10deg); border: 2px solid var(--ink); background: #fff; }
.b3-eps a:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.b3-eps__in { display: grid; place-items: center; min-height: 52px; padding: 4px 0; transform: skewX(10deg); line-height: 1.15; }
.b3-eps__in b { font-size: 18px; font-weight: 900; }
.b3-eps__in small { font-size: 11px; opacity: .75; }
.b3-eps .is-current { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 4px 4px 0 var(--ink); }
.b3-eps .is-off { opacity: .4; }
.b3-facts-sec .b3-sec { margin-bottom: 8px; }
.b3-fact { border-bottom: 2px solid var(--line); }
.b3-fact dt { font-weight: 700; }
.b3-pn a { min-height: 48px; padding: 0 28px; border: 0; background: var(--paper); font-weight: 800; }
.b3-pn a.is-next { background: var(--accent); color: #fff; }
.b3-faq details { border-bottom: 2px solid var(--line); }
.b3-faq summary { font-weight: 800; }
.b3-result { border-bottom: 2px solid var(--line); }
.b3-result__img { border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--accent); }
.b3-sf input[type="search"] { border: 2px solid var(--ink); background: #fff; }
.b3-sf button { background: var(--accent); padding: 0 28px; }
.b3-search__box, .b3-drawer { background: #fff; border-radius: 0; }
.b3-search__box { border: 3px solid var(--ink); box-shadow: 10px 10px 0 var(--accent); }
.b3-tags a { border-radius: 0; border: 0; background: var(--paper); clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%); padding: 0 22px; }
.b3-tags a:hover { background: var(--accent); color: #fff; }

/* ---------- 頁尾 ---------- */
.b3-foot { margin-top: 96px; background: var(--ink); color: #f3e9e3; }
.b3-foot__stripe { height: 14px; background: repeating-linear-gradient(-60deg, var(--accent) 0 22px, var(--ink) 22px 36px, var(--accent-2) 36px 58px, var(--ink) 58px 72px); }
.b3-foot__grid { display: grid; grid-template-columns: 1.4fr 1.2fr 1fr; gap: 28px; padding: 44px 0 10px; }
.b3-cell { padding-left: 18px; border-left: 4px solid var(--accent); min-width: 0; }
.b3-foot h2 { margin-bottom: 10px; font-size: 16px; letter-spacing: .2em; color: var(--accent-2); }
.b3-foot ul { list-style: none; margin: 0; padding: 0; }
.b3-foot li a { display: inline-flex; align-items: center; min-height: 44px; opacity: .85; }
.b3-foot li a:hover { color: var(--accent-2); opacity: 1; }
.b3-foot__tags { display: flex; flex-wrap: wrap; gap: 0 18px; }
.b3-foot__name { font-size: 28px; font-weight: 900; color: var(--accent-2); letter-spacing: .04em; margin-bottom: 8px; }
.b3-foot__grid p { font-size: 14px; opacity: .85; max-width: 32em; }
.b3-foot__bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin: 26px 0 0; padding: 16px 0 26px; border-top: 1px solid rgba(255, 255, 255, .18); font-size: 12.5px; opacity: .75; }

/* ---------- 響應式 ---------- */
@media (max-width: 1100px) {
  .b3-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .b3-first__in { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .b3-first { background: linear-gradient(180deg, #fff 0 50%, var(--paper) 50% 100%); }
  .b3-collage { max-width: 680px; }
}
@media (max-width: 960px) {
  .b3-nav { display: none; }
  .b3-tool--menu { display: inline-flex; }
  .b3-duo { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .b3-foot__grid { grid-template-columns: 1fr 1fr; }
  .b3-foot__grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .b3-collage { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0 16px; gap: 12px; }
  .b3-collage__c:nth-child(even) { margin-top: 0; margin-bottom: 0; }
  .b3-collage__c:nth-child(n+3):nth-child(odd) { margin-top: 0; }
}
@media (max-width: 560px) {
  :root { --gut: 20px; }
  .b3-first { padding: 36px 0 44px; }
  .b3-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 18px; padding: 0 10px 6px; }
  .b3-tile { box-shadow: 5px 5px 0 var(--accent); }
  .b3-tile__cap { padding: 8px 8px 10px; }
  .b3-tile__t { font-size: 14px; }
  .b3-brand { padding: 0 22px; font-size: 18px; }
  .b3-head__in { gap: 10px; }
  .b3-tool__tx { display: none; }
  .b3-foot__grid { grid-template-columns: minmax(0, 1fr); }
  .b3-player, .b3-dposter { box-shadow: 8px 8px 0 var(--accent); margin-right: 8px; }
}

/* ==== batch4 variant: sd-c42 skew-collage #2646d8/#e37ef0 ==== */
:root{--accent:#2646d8;--accent-2:#e37ef0;--accent-soft:#2646d822;--radius:12px;--wrap:1180px;--font:"Noto Serif TC","Songti TC","PingFang TC",serif;--font-head:"Noto Serif TC","Songti TC","PingFang TC",serif}
body{font-family:"Noto Serif TC","Songti TC","PingFang TC",serif}
h1,h2,h3,.site-title,.brand,.entry-title{font-family:"Noto Serif TC","Songti TC","PingFang TC",serif}
.wrap,.container,.site-inner{max-width:1180px}
