/*
Theme Name: sd-b5 酒紅票根
Theme URI: https://example.invalid/
Author: SD Network
Description: 酒紅票根風短劇主題：酒紅配米色，卡片做成撕票根造型，左半海報、右半虛線票根。
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.1
Text Domain: sd-b5
*/

/* ==========================================================================
   共用基礎層（結構 / 行為）— 顏色與造型一律走變數，各主題在下方覆寫
   需要的變數：--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; }

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

/* ---------- 搜尋表單 ---------- */
.b5-sf { display: flex; gap: 8px; align-items: stretch; }
.b5-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;
}
.b5-sf input[type="search"]::placeholder { color: var(--muted); opacity: .8; }
.b5-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 綁定） ---------- */
.b5-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;
}
.b5-search.is-open { opacity: 1; visibility: visible; }
.b5-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);
}
.b5-search__hint { margin: 18px 0 8px; font-size: 13px; color: var(--muted); }
.b5-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.b5-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;
}
.b5-tags a:hover { border-color: var(--accent); color: var(--accent); }

.b5-overlay { position: fixed; inset: 0; z-index: 150; background: var(--scrim, rgba(0, 0, 0, .55)); opacity: 0; transition: opacity .25s; }
.b5-overlay.is-open { opacity: 1; }
.b5-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;
}
.b5-drawer.is-open { transform: none; visibility: visible; }
.b5-drawer__close {
  position: absolute; top: 10px; right: 10px; width: 48px; height: 48px;
  display: grid; place-items: center; border: 0; background: transparent; font-size: 20px;
}
.b5-drawer__list { list-style: none; margin: 0; padding: 0; }
.b5-drawer__list a { display: flex; align-items: center; min-height: 52px; border-bottom: 1px solid var(--line); font-size: 17px; }
.b5-drawer__list [aria-current="page"], .b5-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 上下堆疊 ---------- */
.b5-dgrid { display: grid; grid-template-columns: minmax(280px, 400px) minmax(0, 1fr); gap: 32px; align-items: start; }
.b5-dgrid__l, .b5-dgrid__r { min-width: 0; }
.b5-dposter img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.b5-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.b5-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.b5-pill { min-height: 44px; }
.b5-pill--accent { border-color: var(--accent); color: var(--accent); }
.b5-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0; }
.b5-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;
}
.b5-btn--primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.b5-note { padding: 14px 16px; border: 1px dashed var(--line); color: var(--muted); font-size: 14px; }
.b5-pn { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; }
.b5-pn a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); background: var(--surface); }
.b5-pn a.is-next { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.b5-side-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: 16px; color: var(--accent); font-weight: 600; }
.b5-prose { max-width: 70ch; }
.b5-prose img { height: auto; }
.b5-faq details { border-bottom: 1px solid var(--line); }
.b5-faq summary { display: flex; align-items: center; min-height: 52px; cursor: pointer; font-weight: 600; }
.b5-faq details p { color: var(--muted); }
.b5-empty, .b5-notfound { padding: 48px 0; }
.b5-notfound__search { max-width: 520px; margin: 22px 0; }
.b5-notfound__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.b5-results { display: grid; gap: 0; }
.b5-result { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: flex-start; min-width: 0; }
.b5-result__img { width: 72px; flex: 0 0 72px; aspect-ratio: 2 / 3; object-fit: cover; }
.b5-result__body { display: grid; gap: 4px; min-width: 0; }
.b5-result__t { font-weight: 700; overflow-wrap: anywhere; }
.b5-result__m, .b5-result__x { font-size: 13px; color: var(--muted); }
.b5-searchbar { max-width: 640px; margin: 4px 0 24px; }

/* ---------- 篩選條：行內捲動，不撐破版面 ---------- */
.b5-filter { display: grid; gap: 4px; margin: 0 0 24px; }
.b5-filter__row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.b5-filter__label { flex: 0 0 auto; font-size: 13px; color: var(--muted); }
.b5-filter__list { display: flex; flex: 1 1 auto; gap: 6px; min-width: 0; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.b5-filter__list::-webkit-scrollbar { display: none; }
.b5-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 覆寫） ---------- */
.b5-block { margin-top: clamp(40px, 6vw, 72px); }
.b5-pagehead { padding: 26px 0 20px; }
.b5-pagehead h1 { font-size: clamp(28px, 4vw, 44px); overflow-wrap: anywhere; }
.b5-pagehead p { margin: 10px 0 0; color: var(--muted); }
.b5-dhead { padding: 8px 0 22px; }
.b5-dhead h1 { font-size: clamp(26px, 3.6vw, 40px); overflow-wrap: anywhere; }
.b5-syn { font-size: 16px; line-height: 1.9; }
.b5-h2 { font-size: 20px; margin: 0 0 14px; }
.b5-h2 small { margin-left: 8px; font-size: 13px; font-weight: 500; color: var(--muted); }
.b5-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); column-gap: 28px; margin: 0; }
.b5-fact { padding: 12px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.b5-fact dt { font-size: 12.5px; color: var(--muted); }
.b5-fact dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.b5-fact--wide { grid-column: 1 / -1; }
.b5-article { max-width: 860px; }
.b5-notfound__code { margin: 0; font-size: clamp(72px, 16vw, 150px); font-weight: 900; line-height: 1; color: var(--accent); }
.b5-notfound h1 { font-size: clamp(26px, 4vw, 40px); margin: 6px 0 10px; }
.b5-notfound__desc { max-width: 34em; color: var(--muted); }
.b5-empty__title { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.b5-result:hover .b5-result__t { color: var(--accent); }
.b5-sec { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.b5-sec__more { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); font-weight: 600; white-space: nowrap; }

@media (max-width: 900px) {
  .b5-dgrid { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .b5-dgrid__l .sd-player, .b5-dgrid__l .b5-dposter { max-width: 420px; margin-inline: auto; }
}
@media (max-width: 560px) {
  :root { --gut: 16px; }
  .b5-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-b5 酒紅票根：酒紅 + 米色 / 燈泡跑馬燈邊 / 撕票根卡片（左半海報·右半虛線票根）/ 影廳分類 / 迷你票根選集
   缺口做法：票根右半 ::before / ::after 圓形，顏色取 --notch（= 其背後的底色）
   ========================================================================== */

:root {
  --bg: #efe3cc;
  --surface: #f9f0dc;
  --paper: #fbf4e3;
  --ink: #34121a;
  --muted: #7a5b5f;
  --line: #d9c7a5;
  --accent: #7a1f2e;
  --accent-2: #b4475a;
  --accent-soft: rgba(122, 31, 46, .13);
  --on-accent: #f9f0dc;
  --wine-dk: #4a1019;
  --gold: #e8c46a;
  --notch: var(--bg);
  --radius: 6px;
  --wrap: 1240px;
  --gut: 24px;
  --scrim: rgba(52, 18, 26, .62);
  --serif: "Noto Serif TC", "Source Han Serif TC", "Songti TC", "PMingLiU", "MingLiU", "Times New Roman", serif;
  --sans: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font: var(--sans);
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

body { background: radial-gradient(900px 500px at 50% -10%, rgba(255, 255, 255, .5), transparent 70%), var(--bg); }
h1, h2, h3 { font-weight: 900; }
a:hover { color: var(--accent); }
.b5-main { overflow-x: clip; }

/* ---------- 頁首 ---------- */
.b5-bulbs { height: 16px; background: radial-gradient(circle at 14px 8px, #ffe9a8 0 3px, rgba(255, 233, 168, 0) 5px) 0 0 / 28px 16px repeat-x, var(--wine-dk); }
.b5-marq { background: var(--accent); color: var(--on-accent); border-bottom: 3px double var(--gold); }
.b5-marq__in { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.b5-brand { display: inline-flex; align-items: center; gap: 12px; min-height: 48px; font: 900 clamp(24px, 3.2vw, 34px) var(--serif); letter-spacing: .12em; color: var(--on-accent); text-shadow: 0 2px 0 rgba(0, 0, 0, .25); }
.b5-brand:hover { color: var(--gold); }
.b5-brand__star { color: var(--gold); font-size: .8em; }
.b5-brand__img { max-height: 44px; width: auto; }
.b5-motto { flex: 1 1 auto; margin: 0; font: italic 400 15px var(--serif); color: var(--gold); text-align: center; }
.b5-tools { display: flex; gap: 4px; margin-left: auto; }
.b5-tool { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; min-width: 44px; padding: 0 16px; border: 1px solid var(--gold); background: transparent; color: var(--gold); border-radius: 999px; font-weight: 700; letter-spacing: .1em; }
.b5-tool:hover { background: var(--gold); color: var(--accent); }
.b5-tool--menu { display: none; justify-content: center; padding: 0; }
.b5-nav { background: var(--surface); border-bottom: 1px solid var(--line); }
.b5-nav .b5-wrap { display: flex; justify-content: center; }
.b5-nav__list { display: flex; flex-wrap: wrap; justify-content: center; list-style: none; margin: 0; padding: 0; }
.b5-nav__list a { display: flex; align-items: center; min-height: 48px; padding: 0 22px; font: 700 15px var(--serif); letter-spacing: .14em; color: var(--accent); box-shadow: inset 0 -3px 0 transparent; }
.b5-nav__list a:hover { box-shadow: inset 0 -3px 0 var(--accent-2); }
.b5-nav__list [aria-current="page"], .b5-nav__list .current-menu-item > a { background: var(--accent); color: var(--on-accent); box-shadow: inset 0 -3px 0 var(--gold); }

/* ---------- 區塊標題 / 按鈕 ---------- */
.b5-sec { margin: 0 0 24px; justify-content: center; position: relative; text-align: center; }
.b5-sec h2 { display: flex; align-items: center; gap: 14px; font: 900 clamp(22px, 2.8vw, 32px) var(--serif); letter-spacing: .1em; color: var(--accent); }
.b5-sec h2 span { color: var(--accent-2); font-size: .6em; }
.b5-sec__more { position: absolute; right: 0; top: 50%; transform: translateY(-50%); font: 700 14px var(--serif); }
.b5-block { margin-top: clamp(44px, 6vw, 80px); }
.b5-btn { background: var(--on-accent); border: 2px solid var(--accent); color: var(--accent); font-weight: 800; letter-spacing: .08em; border-radius: 999px; padding: 0 28px; }
.b5-btn:hover { background: var(--accent); color: var(--on-accent); }
.b5-btn--primary { background: var(--accent); color: var(--on-accent); }
.b5-btn--primary:hover { background: var(--wine-dk); color: var(--on-accent); }
.b5-btn--gold { background: var(--gold); border-color: var(--gold); color: var(--wine-dk); }
.b5-btn--gold:hover { background: #fff0c0; border-color: #fff0c0; color: var(--wine-dk); }
.b5-pill { background: var(--paper); border-color: var(--accent); color: var(--accent); font-weight: 600; }
a.b5-pill:hover { background: var(--accent); color: var(--on-accent); }
.b5-pill--accent { background: var(--accent); color: var(--on-accent); }
.b5-kicker { margin: 0 0 12px; font: 700 12px var(--mono); letter-spacing: .3em; color: var(--gold); }

/* ---------- 首頁：熱映中 ---------- */
.b5-now { --notch: var(--accent); position: relative; padding: 46px 0 56px; background: radial-gradient(700px 360px at 80% 20%, rgba(232, 196, 106, .22), transparent 70%), linear-gradient(180deg, var(--accent), var(--wine-dk)); color: var(--on-accent); border-bottom: 6px solid var(--gold); }
.b5-now__in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 44px; align-items: center; }
.b5-now h1 { display: grid; gap: 10px; }
.b5-h1__brand { font: 900 clamp(40px, 6vw, 80px)/1.05 var(--serif); letter-spacing: .08em; color: var(--gold); text-shadow: 0 3px 0 rgba(0, 0, 0, .3); }
.b5-h1__tag { font: 500 clamp(17px, 2vw, 22px)/1.6 var(--serif); }
.b5-now__p { max-width: 30em; margin: 18px 0 22px; font: 400 16px/1.95 var(--serif); opacity: .92; }
.b5-now__p b { color: var(--gold); font-size: 1.2em; }
.b5-lead { display: grid; grid-template-columns: 38% minmax(0, 1fr); position: relative; background: var(--paper); color: var(--ink); border-radius: 10px; box-shadow: 0 18px 30px -12px rgba(0, 0, 0, .6); transform: rotate(-1.2deg); }
.b5-lead__poster { position: relative; display: block; min-height: 300px; border-radius: 10px 0 0 10px; overflow: hidden; }
.b5-lead__poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.b5-lead__stub { position: relative; padding: 20px 22px; border-left: 2px dashed rgba(122, 31, 46, .5); min-width: 0; }
.b5-lead__stub::before, .b5-lead__stub::after { content: ""; position: absolute; left: -11px; width: 20px; height: 20px; border-radius: 50%; background: var(--notch); }
.b5-lead__stub::before { top: -10px; }
.b5-lead__stub::after { bottom: -10px; }
.b5-lead__no { margin: 0 0 8px; font: 700 11.5px var(--mono); letter-spacing: .12em; color: var(--accent-2); }
.b5-lead__stub h2 { font: 900 clamp(20px, 2.2vw, 28px)/1.3 var(--serif); margin-bottom: 6px; }
.b5-lead__stub h2 a { display: inline-flex; align-items: center; min-height: 44px; }
.b5-lead__stub h2 a:hover { color: var(--accent-2); }
.b5-lead__m { margin: 0 0 8px; font: 12px var(--mono); color: var(--muted); }
.b5-lead__syn { font-size: 14px; line-height: 1.8; color: var(--muted); }

/* ---------- 撕票根卡 ---------- */
.b5-tickets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 22px; }
.b5-ticket { position: relative; display: grid; grid-template-columns: 40% minmax(0, 1fr); min-height: 216px; min-width: 0; background: var(--paper); border-radius: 8px; box-shadow: 0 6px 0 -2px rgba(74, 16, 25, .18), 0 12px 18px -10px rgba(74, 16, 25, .5); transition: transform .18s, box-shadow .18s; }
.b5-ticket:hover { transform: translateY(-4px) rotate(-.6deg); box-shadow: 0 8px 0 -2px rgba(74, 16, 25, .2), 0 18px 24px -12px rgba(74, 16, 25, .6); color: inherit; }
.b5-ticket__poster { position: relative; display: block; overflow: hidden; border-radius: 8px 0 0 8px; background: var(--accent-soft); }
.b5-ticket__poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.b5-ticket__badge { position: absolute; left: 0; top: 10px; padding: 3px 10px 3px 8px; background: var(--accent); color: var(--on-accent); font: 700 11.5px var(--sans); border-radius: 0 3px 3px 0; }
.b5-ticket__stub { position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 14px 14px 12px 18px; border-left: 2px dashed rgba(122, 31, 46, .5); }
.b5-ticket__stub::before, .b5-ticket__stub::after { content: ""; position: absolute; left: -11px; width: 20px; height: 20px; border-radius: 50%; background: var(--notch); box-shadow: inset 0 -2px 3px rgba(74, 16, 25, .18); }
.b5-ticket__stub::before { top: -10px; }
.b5-ticket__stub::after { bottom: -10px; }
.b5-ticket__no { font: 700 11px var(--mono); letter-spacing: .12em; color: var(--accent-2); }
.b5-ticket__t { font: 900 17px/1.35 var(--serif); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.b5-ticket:hover .b5-ticket__t { color: var(--accent); }
.b5-ticket__m { font-size: 12.5px; line-height: 1.6; color: var(--muted); }
.b5-ticket__foot { margin-top: auto; display: grid; gap: 6px; }
.b5-ticket__admit { font: 700 11px var(--sans); letter-spacing: .14em; color: var(--accent); }
.b5-ticket__bar { display: block; height: 20px; background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 4px, var(--ink) 4px 5px, transparent 5px 8px, var(--ink) 8px 11px, transparent 11px 13px); opacity: .7; }

/* ---------- 影廳 / 票房榜 ---------- */
.b5-duo { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 48px; }
.b5-halls { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.b5-halls a { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 52px; padding: 0 14px 0 0; background: var(--paper); border-radius: 6px; box-shadow: 0 3px 0 rgba(74, 16, 25, .14); }
.b5-halls a:hover { background: var(--accent); color: var(--on-accent); }
.b5-halls__no { align-self: stretch; display: grid; place-items: center; padding: 0 12px; min-width: 56px; border-right: 2px dashed rgba(122, 31, 46, .45); font: 800 12px var(--serif); color: var(--accent); letter-spacing: .1em; }
.b5-halls a:hover .b5-halls__no { color: var(--gold); border-color: rgba(255, 255, 255, .5); }
.b5-halls__t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.b5-halls em { font: normal 12px var(--mono); color: var(--muted); }
.b5-halls a:hover em { color: var(--on-accent); }
.b5-rank { list-style: none; margin: 0; padding: 8px 20px; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 0 -2px rgba(74, 16, 25, .14); }
.b5-rank a { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 52px; border-bottom: 2px dotted var(--line); }
.b5-rank li:last-child a { border-bottom: 0; }
.b5-rank__no { font: 900 24px var(--serif); color: var(--accent-2); }
.b5-rank li:nth-child(-n+3) .b5-rank__no { color: var(--accent); }
.b5-rank__t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.b5-rank__m { font: 12px var(--mono); color: var(--muted); white-space: nowrap; }
.b5-rank a:hover .b5-rank__t { color: var(--accent); }

/* ---------- 列表頁 ---------- */
.b5-pagehead { padding: 30px 0 14px; text-align: center; }
.b5-pagehead h1 { font: 900 clamp(30px, 4.6vw, 52px) var(--serif); letter-spacing: .12em; color: var(--accent); }
.b5-pagehead h1::before, .b5-pagehead h1::after { content: "★"; margin: 0 .5em; font-size: .4em; vertical-align: .6em; color: var(--accent-2); }
.b5-filter { gap: 4px; padding: 10px 14px; margin-bottom: 30px; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; border-top: 4px solid var(--accent); }
.b5-filter__label { min-width: 2.8em; font: 800 14px var(--serif); color: var(--accent); }
.b5-filter__list a { border-radius: 999px; font-size: 14px; }
.b5-filter__list a:hover { background: var(--accent-soft); color: var(--accent); }
.b5-filter__list a[aria-current="page"] { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.sd-pagination .page-numbers { background: var(--paper); border-color: var(--line); border-radius: 999px; }
.sd-pagination .page-numbers.current { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.sd-pagination .page-numbers.dots { background: none; border-color: transparent; }
.sd-pagination a.page-numbers:hover { border-color: var(--accent); }

/* ---------- 詳情 / 分集 ---------- */
.b5-dhead { text-align: center; padding-bottom: 26px; }
.b5-dhead h1 { font: 900 clamp(28px, 4.2vw, 48px)/1.2 var(--serif); letter-spacing: .06em; color: var(--accent); }
.b5-dhead .b5-meta { justify-content: center; }
.b5-dgrid { gap: 0; background: var(--paper); border-radius: 12px; box-shadow: 0 8px 0 -2px rgba(74, 16, 25, .16), 0 20px 30px -16px rgba(74, 16, 25, .5); }
.b5-dgrid__l { padding: 22px; }
.b5-dgrid__r { --notch: var(--bg); position: relative; padding: 24px 26px 24px 30px; border-left: 3px dashed rgba(122, 31, 46, .5); }
.b5-dgrid__r::before, .b5-dgrid__r::after { content: ""; position: absolute; left: -14px; width: 26px; height: 26px; border-radius: 50%; background: var(--notch); }
.b5-dgrid__r::before { top: -13px; }
.b5-dgrid__r::after { bottom: -13px; }
.b5-player, .b5-dposter { border-radius: 6px; overflow: hidden; border: 3px solid var(--accent); }
.b5-syn { font: 400 16px/2 var(--serif); }
.b5-note { background: var(--surface); border-color: var(--accent); }
.b5-eps-sec .b5-h2 { font: 900 18px var(--serif); letter-spacing: .12em; color: var(--accent); padding-bottom: 8px; border-bottom: 2px dotted var(--accent); }
.b5-eps { --notch: var(--paper); list-style: none; margin: 14px 0 0; padding: 4px 4px 2px; display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 10px; max-height: 400px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--accent) transparent; }
.b5-eps a, .b5-eps .is-off { position: relative; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; align-content: center; gap: 2px; min-height: 58px; padding: 6px 10px; background: var(--accent-soft); border: 1px dashed var(--accent); border-radius: 4px; }
.b5-eps a::before, .b5-eps a::after, .b5-eps .is-off::before, .b5-eps .is-off::after { content: ""; position: absolute; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: var(--notch); border: 1px dashed var(--accent); }
.b5-eps a::before, .b5-eps .is-off::before { left: -7px; clip-path: inset(0 0 0 50%); }
.b5-eps a::after, .b5-eps .is-off::after { right: -7px; clip-path: inset(0 50% 0 0); }
.b5-eps b { font: 900 20px var(--serif); color: var(--accent); }
.b5-eps__k { font: 700 11px var(--sans); color: var(--muted); }
.b5-eps small { flex-basis: 100%; text-align: center; font: 11px var(--mono); color: var(--muted); }
.b5-eps a:hover { background: var(--accent); }
.b5-eps a:hover b, .b5-eps a:hover .b5-eps__k, .b5-eps a:hover small { color: var(--on-accent); }
.b5-eps .is-current { background: var(--accent); border-style: solid; }
.b5-eps .is-current b, .b5-eps .is-current .b5-eps__k, .b5-eps .is-current small { color: var(--on-accent); }
.b5-eps .is-off { opacity: .45; }
.b5-facts-sec { padding: 22px 26px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; }
.b5-facts-sec .b5-sec { justify-content: flex-start; text-align: left; }
.b5-fact { border-bottom: 2px dotted var(--line); }
.b5-fact dt { font-family: var(--serif); }
.b5-pn a { background: var(--paper); border: 2px solid var(--accent); color: var(--accent); border-radius: 999px; font-weight: 800; }
.b5-pn a.is-next { background: var(--accent); color: var(--on-accent); }
.b5-faq details { border-bottom: 2px dotted var(--line); }
.b5-faq summary { font-family: var(--serif); }
.b5-result { border-bottom: 2px dotted var(--line); }
.b5-result__img { border-radius: 4px; border: 2px solid var(--accent); }
.b5-sf input[type="search"] { background: var(--paper); border-color: var(--accent); border-radius: 999px; padding: 0 20px; }
.b5-sf button { border-radius: 999px; }
.b5-search__box, .b5-drawer { background: var(--paper); }
.b5-tags a { background: var(--paper); border-color: var(--accent); color: var(--accent); }
.b5-tags a:hover { background: var(--accent); color: var(--on-accent); }

/* ---------- 頁尾 ---------- */
.b5-foot { margin-top: 90px; background: var(--accent); color: var(--on-accent); }
.b5-tear { height: 14px; background: radial-gradient(circle at 10px 0, var(--bg) 0 8px, transparent 9px) 0 0 / 20px 14px repeat-x; }
.b5-foot__grid { display: grid; grid-template-columns: 1.4fr 1.2fr 1fr; gap: 40px; padding: 34px 0 10px; }
.b5-foot h2 { margin-bottom: 10px; font: 900 16px var(--serif); letter-spacing: .3em; color: var(--gold); }
.b5-foot ul { list-style: none; margin: 0; padding: 0; }
.b5-foot li a { display: inline-flex; align-items: center; min-height: 44px; opacity: .9; }
.b5-foot li a:hover { color: var(--gold); opacity: 1; }
.b5-foot__tags { display: flex; flex-wrap: wrap; gap: 0 18px; }
.b5-foot__name { font: 900 26px var(--serif); letter-spacing: .12em; color: var(--gold); margin-bottom: 8px; }
.b5-foot__grid p { font-size: 14px; opacity: .88; max-width: 32em; }
.b5-foot__bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin: 24px 0 0; padding: 16px 0 26px; border-top: 1px dashed rgba(249, 240, 220, .4); font-size: 12.5px; opacity: .8; }

/* ---------- 響應式 ---------- */
@media (max-width: 1100px) {
  .b5-tickets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .b5-now__in { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .b5-lead { max-width: 560px; transform: none; }
}
@media (max-width: 960px) {
  .b5-nav { display: none; }
  .b5-tool--menu { display: inline-flex; }
  .b5-motto { display: none; }
  .b5-duo { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .b5-foot__grid { grid-template-columns: 1fr 1fr; }
  .b5-foot__grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .b5-dgrid__r { border-left: 0; border-top: 3px dashed rgba(122, 31, 46, .5); padding: 22px 20px; }
  .b5-dgrid__r::before, .b5-dgrid__r::after { top: -13px; bottom: auto; }
  .b5-dgrid__r::before { left: -13px; }
  .b5-dgrid__r::after { left: auto; right: -13px; }
}
@media (max-width: 640px) {
  .b5-tickets { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .b5-halls { grid-template-columns: minmax(0, 1fr); }
  .b5-sec__more { position: static; transform: none; }
  .b5-sec { flex-direction: column; gap: 0; }
  .b5-lead { grid-template-columns: 36% minmax(0, 1fr); }
  .b5-lead__poster { min-height: 240px; }
  .b5-dgrid__l { padding: 16px; }
}
@media (max-width: 560px) {
  .b5-tool__tx { display: none; }
  .b5-foot__grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .b5-now { padding: 34px 0 40px; }
}
