/* =========================================================
   四站共用的结构层：布局、组件与交互状态。
   配色、字体与装饰全部来自 themes/<slug>.css（同一组 CSS 变量，三种阅读主题各一套）。
   规则：不用竖条侧边装饰，强调靠字重、字号、底色与横向细线。
   ========================================================= */
:root {
  --bg: #ffffff; --bg2: #ffffff; --card: #f5f5f3; --card-hover: #efefec;
  --line: #e4e4e1; --line-strong: #c9c9c5; --rule: #111111;
  --text: #111111; --text-soft: #2e2e2c; --text-faint: #9b9b97; --muted: #6b6b67;
  --accent: #111111; --accent-hover: #333333; --on-accent: #ffffff; --brand: #b3261e; --on-brand: #ffffff;
  --zh-soft: rgba(0,0,0,.045); --bar-bg: #e6e6e3; --bar-buf: #d2d2ce;
  --bg-glass: rgba(255,255,255,.9); --bg-glass2: rgba(255,255,255,.96); --trans-bg: rgba(0,0,0,.028);
  --thumb-bg: #ededea; --mark-bg: rgba(255,214,10,.42);
  --shadow: 0 14px 40px rgba(0,0,0,.12), 0 2px 6px rgba(0,0,0,.05); --focus: #111111;
  --radius-card: 0px; --radius-img: 0px;
  --read-size: 18px; --read-lh: 2; --measure: 680px; --toc-w: 232px;
}
:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", sans-serif;
  --font-serif: "Noto Serif SC", "Songti SC", "STSong", "Source Han Serif SC", "Noto Serif CJK SC", serif;
  --font-display: var(--font-serif);
  --font-label: var(--font-sans);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { color-scheme: light; -webkit-text-size-adjust: 100%; }
html[data-theme='dark'] { color-scheme: dark; }
html.theme-anim, html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after { transition: background-color .3s ease, border-color .3s ease, color .3s ease !important; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-autospace: ideograph-alpha ideograph-numeric; /* 中西文之间自动留出细空隙（支持的浏览器） */
}
a { color: inherit; }
button { font: inherit; color: inherit; }
svg { display: block; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
::selection { background: var(--mark-bg); }

/* 小号栏目标签：字距拉开，像杂志的栏目名 */
.ep-kicker, .hero-kicker, .card-kicker, .mast-date, .pop-k, .toc-h, .pn-k, .ap-label {
  font-family: var(--font-label); font-size: 11.5px; letter-spacing: .16em; color: var(--muted); font-weight: 500;
}

.skip-link { position: absolute; left: 12px; top: -52px; z-index: 200; background: var(--bg); color: var(--text); border: 1px solid var(--rule); padding: 8px 14px; text-decoration: none; font-size: 13px; transition: top .15s ease; }
.skip-link:focus { top: 12px; }

/* ---------- 首页报头（结构；视觉见主题） ---------- */
.masthead { position: relative; }
.mast-top { display: flex; justify-content: space-between; align-items: center; min-height: 44px; }
.mast-actions { display: flex; align-items: center; gap: 16px; }
.mast-link { font-size: 12.5px; color: var(--muted); text-decoration: none; letter-spacing: .04em; }
.mast-link:hover { color: var(--text); }
.mast-brand { padding: 40px 0 26px; }
.mast-kicker { font-family: var(--font-label); font-size: 12px; letter-spacing: .2em; color: var(--brand); }
.mast-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(40px, 7vw, 96px); line-height: 1; margin-top: 14px; letter-spacing: -.02em; }
.mast-title a { text-decoration: none; }
.mast-tagline { margin-top: 18px; font-size: 18px; color: var(--text-soft); max-width: 36em; }
.mast-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.mast-facts div { padding: 16px 0; display: flex; flex-direction: column; gap: 4px; }
.mast-facts b { font-family: var(--font-display); font-size: 30px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums lining-nums; }
.mast-facts span { font-size: 12px; color: var(--muted); letter-spacing: .08em; }
.mast-intro { padding: 18px 0 28px; color: var(--muted); font-size: 14px; line-height: 1.85; max-width: 52em; }
.mast-hosts { display: block; margin-top: 6px; color: var(--text-soft); }

/* ---------- 内页报头 ---------- */
.site-header.slim { border-bottom: 1px solid var(--line); background: var(--bg); }
.site-header.slim .header-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; height: 60px; }
.hdr-back { color: var(--muted); font-size: 13px; text-decoration: none; justify-self: start; letter-spacing: .04em; }
.hdr-back:hover { color: var(--text); }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 19px; text-decoration: none; white-space: nowrap; }
.wordmark .wm-cn { font-family: var(--font-label); font-weight: 500; font-size: 11.5px; color: var(--muted); letter-spacing: .14em; }
.mark { display: inline-flex; width: 28px; height: 28px; flex-shrink: 0; }
.mark img { width: 100%; height: 100%; display: block; border-radius: var(--radius-img); }
.header-actions { display: flex; align-items: center; gap: 4px; justify-self: end; }
.hdr-icon { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; color: var(--text-soft); border-radius: 50%; }
.hdr-icon:hover { color: var(--text); background: var(--card); }
.hdr-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

/* 主题切换：SVG 日 / 月 */
.theme-toggle {
  position: relative; width: 34px; height: 34px; flex-shrink: 0; cursor: pointer;
  background: transparent; border: 0; border-radius: 50%; color: var(--text-soft);
  display: inline-flex; align-items: center; justify-content: center; transition: background-color .15s ease, color .15s ease;
}
.theme-toggle:hover { background: var(--card); color: var(--text); }
.theme-toggle svg {
  position: absolute; width: 18px; height: 18px;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  transition: transform .35s cubic-bezier(.4,.2,.2,1), opacity .25s ease;
}
.theme-toggle .i-moon { fill: currentColor; stroke: none; }
/* 浅色 / 护眼时显示月亮（点击进入深色）；深色时显示太阳 */
.theme-toggle .i-sun { opacity: 0; transform: rotate(70deg) scale(.6); }
[data-theme='dark'] .theme-toggle .i-sun { opacity: 1; transform: none; }
[data-theme='dark'] .theme-toggle .i-moon { opacity: 0; transform: rotate(-70deg) scale(.6); }

/* ---------- 工具条（吸顶） ---------- */
.toolbar { position: sticky; top: 0; z-index: 40; background: var(--bg-glass); -webkit-backdrop-filter: saturate(160%) blur(12px); backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--line); }
.toolbar-inner { display: flex; align-items: center; gap: 24px; padding-top: 8px; padding-bottom: 8px; }
.search-box { position: relative; flex: 1; min-width: 220px; }
.search-box .i-search { position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; pointer-events: none; }
#search { width: 100%; background: transparent; color: var(--text); border: 0; border-radius: 0; padding: 10px 64px 10px 28px; font-size: 15px; outline: none; font-family: var(--font-sans); }
#search::placeholder { color: var(--text-faint); }
#search::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.search-box:focus-within .i-search { stroke: var(--text); }
.search-kbd { position: absolute; right: 0; top: 50%; transform: translateY(-50%); font: 500 11px/1 var(--font-sans); color: var(--text-faint); border: 1px solid var(--line); border-radius: 4px; padding: 3px 6px; pointer-events: none; }
.search-clear { position: absolute; right: 0; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 12.5px; padding: 5px 6px; }
.search-clear:hover { color: var(--text); }
.search-box.has-q .search-kbd { display: none; }
.search-box:not(.has-q) .search-clear { display: none; }
.filters { display: flex; gap: 22px; }
.filters button { background: none; border: 0; color: var(--muted); padding: 10px 0 8px; font-size: 13.5px; cursor: pointer; white-space: nowrap; border-bottom: 2px solid transparent; }
.filters button:hover { color: var(--text); }
.filters button.on { color: var(--text); font-weight: 600; border-bottom-color: var(--rule); }
.filters button[hidden] { display: none; }
.filters .n { color: var(--text-faint); font-weight: 400; margin-left: 5px; font-variant-numeric: tabular-nums; }
.sort-btn { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; color: var(--muted); padding: 8px 0; font-size: 13.5px; cursor: pointer; white-space: nowrap; }
.sort-btn:hover { color: var(--text); }
.sort-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s ease; }
.sort-btn[data-dir='asc'] svg { transform: scaleY(-1); }

/* ---------- 头条 ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 52px; align-items: center; padding: 44px 0 50px; border-bottom: 1px solid var(--line); }
.hero[hidden] { display: none; }
.hero-media { display: block; aspect-ratio: 16/9; overflow: hidden; background: var(--thumb-bg); }
.hero-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s cubic-bezier(.2,.7,.2,1), filter .5s ease; }
.hero-text { text-align: center; }
.hero-kicker { color: var(--brand); margin-bottom: 18px; }
.hero-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(28px, 3.1vw, 40px); line-height: 1.32; letter-spacing: .01em; word-break: keep-all; overflow-wrap: anywhere; text-wrap: balance; }
.hero-title a { text-decoration: none; background-image: linear-gradient(currentColor, currentColor); background-size: 0 1px; background-repeat: no-repeat; background-position: 0 94%; transition: background-size .4s ease; }
.hero-title a:hover { background-size: 100% 1px; }
.hero-en { color: var(--muted); font-family: var(--font-display); font-style: italic; font-size: 15px; line-height: 1.5; margin-top: 14px; }
.hero-desc { color: var(--text-soft); font-family: var(--font-display); font-size: 17px; line-height: 1.85; margin: 18px auto 0; max-width: 28em; text-wrap: pretty; }
.hero-by { margin-top: 18px; color: var(--muted); font-size: 12.5px; letter-spacing: .08em; }
.hero-cta { display: inline-flex; align-items: center; gap: 8px; margin-top: 24px; font-size: 13.5px; font-weight: 600; letter-spacing: .1em; text-decoration: none; border-bottom: 1px solid var(--rule); padding-bottom: 4px; }
.hero-cta svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s ease; }
.hero-cta:hover svg { transform: translateX(4px); }

/* ---------- 热门话题 ---------- */
.topics { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 26px 0 0; }
.topics-k { font-family: var(--font-label); font-size: 11.5px; letter-spacing: .14em; color: var(--muted); margin-right: 6px; }
.topic { display: inline-flex; align-items: baseline; gap: 5px; background: none; border: 1px solid var(--line-strong); color: var(--text-soft); border-radius: 999px; padding: 5px 12px; font-size: 13px; cursor: pointer; transition: border-color .15s ease, color .15s ease, background-color .15s ease; }
.topic span { font-family: var(--font-label); font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.topic:hover { border-color: var(--brand); color: var(--brand); }
.topic.on { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.topic.on span { color: inherit; opacity: .8; }

/* ---------- 栏目标题 ---------- */
.result-line { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 44px 0 12px; border-bottom: 1px solid var(--rule); }
.result-line h2 { font-family: var(--font-display); font-size: 24px; font-weight: 700; letter-spacing: .02em; }
.result-line h2 small { font-family: var(--font-sans); font-size: 12.5px; color: var(--muted); font-weight: 400; margin-left: 12px; letter-spacing: .06em; }

/* ---------- 继续 ---------- */
.continue { padding-top: 36px; }
.continue[hidden] { display: none; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--rule); margin-bottom: 18px; }
.sec-h h2 { font-family: var(--font-display); font-size: 19px; font-weight: 700; letter-spacing: .02em; }
.sec-h button { background: none; border: 0; color: var(--muted); font-size: 12.5px; cursor: pointer; }
.sec-h button:hover { color: var(--text); }
.continue-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 24px; }
.cont-item { display: flex; gap: 14px; align-items: center; text-decoration: none; }
.cont-thumb { position: relative; width: 112px; flex-shrink: 0; aspect-ratio: 16/9; overflow: hidden; background: var(--thumb-bg); }
.cont-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: filter .4s ease; }
.cont-body { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cont-title { font-family: var(--font-display); font-size: 14.5px; font-weight: 700; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cont-item:hover .cont-title { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.cont-meta { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.prog { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(0,0,0,.35); }
.prog i { display: block; height: 100%; background: #fff; }

/* ---------- 列表 ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 44px 32px; padding: 28px 0 30px; }
.card { display: flex; flex-direction: column; text-decoration: none; }
.thumb { position: relative; aspect-ratio: 16/9; background: var(--thumb-bg); overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s cubic-bezier(.2,.7,.2,1), filter .45s ease; }
@media (hover: hover) {
  .card:hover .thumb img, .hero:hover .hero-media img { transform: scale(1.025); }
}
.thumb .no-img { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--text-faint); font: 700 28px/1 var(--font-display); letter-spacing: .2em; }
.card-body { padding-top: 14px; display: flex; flex-direction: column; gap: 7px; }
.card-kicker { display: flex; align-items: center; gap: 10px; font-variant-numeric: tabular-nums; }
.card-kicker .ep-n { color: var(--text); font-weight: 600; }
.card-kicker .zh-tag { color: var(--brand); }
.card-title { font-family: var(--font-display); font-size: 18.5px; font-weight: 700; line-height: 1.45; letter-spacing: .01em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card:hover .card-title { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.card-title-en { color: var(--muted); font-family: var(--font-display); font-style: italic; font-size: 13.5px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.card-desc { color: var(--text-soft); font-size: 13.5px; line-height: 1.75; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
mark { background: var(--mark-bg); color: inherit; padding: 0 1px; }
.sentinel { display: flex; flex-direction: column; align-items: center; gap: 12px; color: var(--text-faint); padding: 28px 0 80px; font-size: 12.5px; }
.sentinel .end { letter-spacing: .24em; font-size: 12px; }
.more-btn { background: none; border: 1px solid var(--rule); color: var(--text); border-radius: 999px; padding: 10px 30px; font-size: 13.5px; font-weight: 600; letter-spacing: .1em; cursor: pointer; transition: background-color .15s ease, color .15s ease; }
.more-btn:hover { background: var(--accent); color: var(--on-accent); }
.more-sub { color: var(--muted); }
.more-sub a { color: var(--text-soft); text-underline-offset: 3px; }
.empty { grid-column: 1 / -1; text-align: center; padding: 80px 20px; color: var(--muted); }
.empty h3 { color: var(--text); font-family: var(--font-display); font-size: 24px; font-weight: 700; margin-bottom: 10px; }
.empty p { font-size: 14px; }
.empty .chips { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }
.chip { background: none; border: 1px solid var(--line-strong); color: var(--text-soft); border-radius: 999px; padding: 5px 14px; font-size: 13px; cursor: pointer; white-space: nowrap; }
.chip:hover { border-color: var(--rule); color: var(--text); }

/* =========================================================
   单集页
   ========================================================= */
.ep-main { max-width: calc(var(--measure) + 48px); }
/* 有目录时：正文 + 目录作为一个整体居中，左右不失衡 */
@media (min-width: 1180px) {
  .ep-main.has-toc {
    max-width: calc(var(--measure) + var(--toc-w) + 72px + 48px);
    display: grid; grid-template-columns: minmax(0, var(--measure)) var(--toc-w); column-gap: 72px; align-items: start;
  }
  .ep-main.has-toc .ep-toc { display: block; }
  .ep-main.has-toc .tool-btn[data-tool='toc'] { display: none; }
}
.ep-head { text-align: center; padding: 56px 0 36px; }
.ep-kicker { display: flex; justify-content: center; align-items: center; gap: 10px; }
.ep-kicker .k-zh { color: var(--brand); }
.k-sep { color: var(--line-strong); }
.ep-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(28px, 4vw, 42px); line-height: 1.3; letter-spacing: .01em; margin: 18px auto 0; max-width: 17em; word-break: keep-all; overflow-wrap: anywhere; text-wrap: balance; }
.ep-title-en { color: var(--muted); font-family: var(--font-display); font-style: italic; font-size: 16px; line-height: 1.5; margin-top: 14px; }
.ep-dek { font-family: var(--font-display); font-size: 18.5px; line-height: 1.8; color: var(--text-soft); max-width: 28em; margin: 22px auto 0; text-wrap: pretty; }
.ep-byline { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 22px; font-size: 12.5px; color: var(--muted); letter-spacing: .06em; }

/* 媒体区：视频缩略图（点击展开）+ 音频播放器，上粗下细两条线收边 */
.media { display: flex; align-items: stretch; margin-bottom: 34px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--line); }
.media:not(.has-audio) { border: 0; }
.media:not(.has-audio) .video-facade { width: 100%; aspect-ratio: 16/9; margin: 0; }
.media.video-open { flex-direction: column; }
.media iframe { width: 100%; aspect-ratio: 16/9; border: 0; display: block; margin-top: 16px; }
.video-facade { position: relative; width: 196px; flex-shrink: 0; align-self: center; aspect-ratio: 16/9; background: #000; border: 0; padding: 0; cursor: pointer; overflow: hidden; color: #fff; margin: 16px 0; }
.video-facade img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .9; transition: filter .3s ease, opacity .3s ease; }
.video-facade:hover img { filter: none; opacity: 1; }
.vf-play { position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 5px; background: rgba(0,0,0,.78); color: #fff; padding: 4px 10px 4px 7px; font-size: 12px; font-weight: 600; letter-spacing: .06em; }
.vf-play svg { width: 13px; height: 13px; fill: currentColor; }
.media:not(.has-audio) .vf-play { left: 50%; top: 50%; bottom: auto; transform: translate(-50%, -50%); padding: 12px 22px 12px 18px; font-size: 15px; }
.audio-player { flex: 1; min-width: 0; display: flex; gap: 16px; align-items: center; padding: 16px 0 16px 22px; }
.media > .audio-player:first-child { padding-left: 0; }
.ap-play { width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0; background: var(--accent); color: var(--on-accent); border: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform .12s ease, background-color .15s ease; }
.ap-play:hover { background: var(--accent-hover); }
.ap-play:active { transform: scale(.94); }
.ap-play svg, .mp-play svg { width: 20px; height: 20px; fill: currentColor; }
.ap-play .i-play, .mp-play .i-play { margin-left: 2px; }
.ap-play .i-pause, .mp-play .i-pause { display: none; }
.is-playing .ap-play .i-play, .is-playing .mp-play .i-play { display: none; }
.is-playing .ap-play .i-pause, .is-playing .mp-play .i-pause { display: block; }
.ap-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ap-line1 { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; }
.ap-time { color: var(--muted); font-variant-numeric: tabular-nums; }
.ap-bar { position: relative; height: 16px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.ap-bar::before { content: ''; position: absolute; left: 0; right: 0; height: 3px; background: var(--bar-bg); }
.ap-buf { position: absolute; left: 0; height: 3px; background: var(--bar-buf); width: 0; }
.ap-fill { position: absolute; left: 0; height: 3px; background: var(--accent); width: 0; }
.ap-fill::after { content: ''; position: absolute; right: -6px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: var(--accent); transform: scale(0); transition: transform .15s ease; }
.ap-bar:hover .ap-fill::after, .ap-bar:focus-visible .ap-fill::after { transform: scale(1); }
.ap-line2 { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; font-size: 12.5px; }
.ap-line2 button { background: none; color: var(--muted); border: 0; padding: 2px 0; font-size: 12.5px; cursor: pointer; font-variant-numeric: tabular-nums; }
.ap-line2 button:hover { color: var(--text); }
.ap-line2 .ap-video { display: none; align-items: center; gap: 4px; }
.ap-video svg { width: 11px; height: 11px; fill: currentColor; }
.ap-resume { color: var(--text-soft); }
.ap-resume[hidden] { display: none; }
.ap-resume button { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

/* 内容 tabs（吸顶）：左 tab，右阅读工具；与正文同宽 */
.content-tabs { margin-top: 4px; }
.tabs { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 24px; background: var(--bg-glass); -webkit-backdrop-filter: saturate(160%) blur(12px); backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--line); margin: 0 0 28px; }
.tab-btn { display: none; }
body.epjs .tab-btn { display: block; background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 14px; letter-spacing: .1em; font-weight: 600; padding: 14px 0 12px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
body.epjs .tab-btn:hover { color: var(--text); }
body.epjs .tab-btn { white-space: nowrap; }
body.epjs .tab-btn.on { color: var(--text); border-bottom-color: var(--rule); }
.tab-tools { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.tool-btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px; border-radius: 999px; background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 13px; white-space: nowrap; }
.tool-btn:hover, .tool-btn[aria-expanded='true'] { color: var(--text); background: var(--card); }
.tool-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tool-btn .aa { font: 700 15px/1 var(--font-display); letter-spacing: -.02em; }
.tool-btn .aa small { font-size: 11.5px; }
.read-progress { position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); pointer-events: none; }

/* 弹出层：阅读设置 / 目录 */
.pop { position: absolute; right: 0; top: calc(100% + 10px); z-index: 30; width: 330px; max-height: calc(100vh - 110px); overflow-y: auto; overscroll-behavior: contain; background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 14px; font-size: 13px; animation: pop-in .16s ease-out; touch-action: pan-y; }
.pop[hidden] { display: none; }
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px); } }
.pop-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.pop-head span { font-size: 11.5px; letter-spacing: .16em; color: var(--muted); font-weight: 500; }
.pop-head button { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.pop-head button:hover { color: var(--text); }
.seg { display: flex; padding: 3px; gap: 2px; background: var(--card); border-radius: 10px; }
.seg button { flex: 1; background: none; border: 0; color: var(--muted); border-radius: 7px; padding: 6px 0; cursor: pointer; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed='true'] { background: var(--bg2); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12); font-weight: 600; }
.seg button:disabled { opacity: .35; cursor: default; }
.seg .sz { display: flex; align-items: center; justify-content: center; flex: .9; color: var(--text); font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 600; }
.seg svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
/* 背景：色块本身就是按钮，名字写在色块上 */
.swatches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.swatches button { height: 38px; border-radius: 9px; border: 1px solid rgba(0,0,0,.12); cursor: pointer; font-size: 13px; font-family: var(--font-display); }
.swatches button[aria-pressed='true'] { box-shadow: 0 0 0 2px var(--bg2), 0 0 0 3.5px var(--accent); font-weight: 700; }
/* 字体：三列，每个名字用自身字体显示 */
.font-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 12px; }
.font-list button { background: var(--card); border: 1px solid transparent; border-radius: 9px; padding: 9px 4px; cursor: pointer; color: var(--text); font-size: 15px; line-height: 1.3; white-space: nowrap; }
.font-list button:first-child { font-family: var(--font-sans); }
.font-list button:hover { border-color: var(--line-strong); }
.font-list button[aria-pressed='true'] { border-color: var(--accent); background: var(--bg2); font-weight: 600; }
/* 字号与行距并排 */
.pop-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.seg-measure { margin-top: 8px; }
.seg[hidden] { display: none; }
.pop-toc { width: min(340px, calc(100vw - 32px)); max-height: 60vh; padding: 8px; }

/* 目录（侧栏与弹层共用）：当前节用字重 + 浅底色标记，不用竖线 */
.toc-list { list-style: none; counter-reset: toc; }
.toc-list a { display: flex; gap: 10px; text-decoration: none; color: var(--muted); font-size: 13px; line-height: 1.55; padding: 6px 10px; border-radius: 6px; transition: color .15s ease, background-color .15s ease; }
.toc-list a::before { counter-increment: toc; content: counter(toc, decimal-leading-zero); flex-shrink: 0; font: 400 11px/1.55 var(--font-display); color: var(--text-faint); padding-top: 1px; font-variant-numeric: tabular-nums lining-nums; }
.toc-list a:hover { color: var(--text); }
.toc-list a.on { color: var(--text); background: var(--zh-soft); font-weight: 600; }
.toc-list a.on::before { color: var(--text); }
.ep-toc { display: none; position: sticky; top: 76px; max-height: calc(100vh - 100px); overflow-y: auto; padding-top: 56px; scrollbar-width: thin; }
.ep-toc.is-off { visibility: hidden; }
.ep-toc .toc-h { margin: 0 0 12px 10px; }

.tab-panel { margin-bottom: 10px; }
body.epjs .tab-panel { display: none; }
body.epjs .tab-panel.active { display: block; }
.zh-note, .tr-note { color: var(--text-faint); font-size: 12.5px; line-height: 1.7; margin-bottom: 30px; }
.zh-note a { color: var(--muted); }

/* =========================================================
   中文正文排版（Markdown 渲染结果）
   版心约 36–38 字一行；两端对齐 + 标点挤压；段间留白而非首行缩进（可在设置中切换）。
   ========================================================= */
.zh-article {
  font-size: var(--read-size); line-height: var(--read-lh); letter-spacing: .02em; color: var(--text-soft);
  text-align: justify; text-justify: inter-ideograph; hanging-punctuation: allow-end; overflow-wrap: break-word;
  font-kerning: normal; counter-reset: sec;
}
[data-font='sans'] .zh-article { font-family: "Noto Sans SC", var(--font-sans); }
[data-font='serif'] .zh-article { font-family: "Noto Serif SC", var(--font-serif); letter-spacing: .03em; }
[data-font='kai'] .zh-article { font-family: "LXGW WenKai Screen", "Kaiti SC", "STKaiti", var(--font-serif); letter-spacing: .03em; }
[data-font='wei'] .zh-article { font-family: "ZCOOL XiaoWei", var(--font-serif); letter-spacing: .04em; }
[data-font='song'] .zh-article { font-family: "KingHwa_OldSong", var(--font-serif); letter-spacing: .03em; }

.zh-article p { margin: 0 0 1.1em; }
/* 小节标题：上方一行小号序号，标题用衬线，留足呼吸 */
.zh-article h2 {
  counter-increment: sec; font-family: var(--font-display); font-weight: 700; color: var(--text);
  font-size: 1.32em; line-height: 1.5; letter-spacing: .02em; margin: 2.6em 0 1em; text-align: left;
  text-wrap: balance; scroll-margin-top: 76px; word-break: keep-all; overflow-wrap: anywhere;
}
.zh-article h2::before {
  content: counter(sec, decimal-leading-zero); display: block; margin-bottom: .55em;
  font: 400 .62em/1 var(--font-display); letter-spacing: .2em; color: var(--muted); font-variant-numeric: lining-nums;
}
.zh-article h3 { font-family: var(--font-display); font-weight: 700; color: var(--text); font-size: 1.08em; line-height: 1.6; margin: 1.9em 0 .7em; scroll-margin-top: 76px; text-align: left; }
.zh-article strong { color: var(--text); font-weight: 650; }
.zh-article a { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: .25em; text-decoration-thickness: 1px; }
.zh-article a:hover { text-decoration-color: currentColor; }
/* em：中文用着重号，西文保留斜体 */
.zh-article em { font-style: normal; text-emphasis: filled dot; -webkit-text-emphasis: filled dot; text-emphasis-position: under right; -webkit-text-emphasis-position: under; text-emphasis-color: var(--muted); -webkit-text-emphasis-color: var(--muted); }
.zh-article em.latin { font-style: italic; text-emphasis: none; -webkit-text-emphasis: none; }

/* 引语 → 杂志摘句：上下细线收束，衬线放大，开引号悬挂在行外，说话人另起一行 */
.zh-article blockquote {
  margin: 2em 0; padding: 1.15em 0 1.2em; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--line);
  font-family: var(--font-display); font-size: 1.1em; line-height: 1.85; color: var(--text); text-align: left;
}
.zh-article blockquote.hang { text-indent: -.5em; }
.zh-article blockquote p { margin: 0; }
.zh-article blockquote cite { display: block; margin-top: .7em; text-indent: 0; font: normal 500 12px/1.4 var(--font-sans); letter-spacing: .16em; color: var(--muted); }
.zh-article blockquote cite::before { content: '—— '; letter-spacing: 0; }

/* 列表：方块项目符号（与文末终止符同一语汇）+ 细线分隔，像杂志的「要点」栏 */
.zh-article ul, .zh-article ol { list-style: none; margin: 1.4em 0 1.6em; padding: 0; border-top: 1px solid var(--rule); }
.zh-article li { position: relative; padding: .75em 0 .75em 1.6em; border-bottom: 1px solid var(--line); margin: 0; }
.zh-article ul > li::before { content: ''; position: absolute; left: .2em; top: calc(.75em + (var(--read-lh) * 1em - .4em) / 2); width: .4em; height: .4em; background: var(--text); }
.zh-article ol { counter-reset: li; }
.zh-article ol > li { counter-increment: li; padding-left: 2.2em; }
.zh-article ol > li::before { content: counter(li, decimal-leading-zero); position: absolute; left: 0; top: .75em; font: 400 .82em/calc(var(--read-lh) * 1.22em) var(--font-display); color: var(--muted); font-variant-numeric: tabular-nums lining-nums; }
.zh-article li > p { margin: 0; }
.zh-article hr { border: 0; text-align: center; margin: 2.4em 0; height: 1em; }
.zh-article hr::before { content: '◆ ◆ ◆'; font-size: .5em; letter-spacing: 1.2em; color: var(--text-faint); }
.zh-article img { max-width: 100%; }

/* 首字下沉（只在首字是汉字时由脚本加 .dropcap） */
html:not(.indent) .zh-article p.dropcap::first-letter {
  float: left; font-family: var(--font-display); font-weight: 700; color: var(--text);
  font-size: calc(var(--read-lh) * 2em - .3em); line-height: 1; margin: .12em .16em 0 0;
}
/* 文末终止符（形状由主题决定） */
.zh-article .end-mark::after { content: ''; display: inline-block; width: .55em; height: .55em; margin-left: .45em; background: var(--text); vertical-align: 0; }
/* 段首缩进模式（传统书刊排法） */
html.indent .zh-article p { text-indent: 2em; margin-bottom: .5em; }
html.indent .zh-article blockquote p, html.indent .zh-article li p { text-indent: 0; }

.ts-link, .tr-count { font-variant-numeric: tabular-nums; }
.tr-tools { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.tr-search { flex: 1; max-width: 320px; background: transparent; color: var(--text); border: 0; border-bottom: 1px solid var(--line-strong); border-radius: 0; padding: 7px 2px; font-size: 13.5px; outline: none; }
.tr-search:focus { border-bottom-color: var(--rule); }
.tr-count { color: var(--muted); font-size: 12.5px; display: inline-flex; align-items: center; gap: 4px; }
.tr-count button { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 6px; width: 24px; height: 24px; cursor: pointer; font-size: 12px; line-height: 1; }
.tr-count button:hover { color: var(--text); border-color: var(--line-strong); }
.tr-hint { color: var(--text-faint); font-size: 12.5px; }
.transcript-text { white-space: pre-wrap; font-family: var(--font-display); font-size: 15.5px; line-height: 1.85; color: var(--text-soft); max-height: 72vh; overflow-y: auto; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--line); padding: 20px 4px; }
.transcript-text mark.cur { outline: 2px solid var(--accent); }
.ts-link { color: var(--text); font-family: var(--font-sans); font-size: .82em; font-weight: 600; cursor: pointer; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.ts-link:hover { text-decoration-color: currentColor; }
.ep-notice { color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 16px 0; margin-bottom: 28px; text-align: center; }
.ep-notice a { color: var(--text); }

/* 延伸阅读：同站最相关的三期 */
.related { margin-top: 52px; padding-top: 18px; border-top: 1px solid var(--rule); }
.related h2 { font-family: var(--font-label); font-size: 11.5px; letter-spacing: .16em; color: var(--muted); font-weight: 500; margin-bottom: 16px; }
.rel-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.rel-item { display: flex; flex-direction: column; gap: 8px; text-decoration: none; }
.rel-thumb { aspect-ratio: 16/9; overflow: hidden; background: var(--thumb-bg); border-radius: var(--radius-img); }
.rel-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 1; transition: transform .5s ease; }
.rel-item:hover .rel-thumb img { transform: scale(1.03); }
.rel-meta { font-family: var(--font-label); font-size: 11.5px; color: var(--muted); letter-spacing: .04em; }
.rel-title { font-family: var(--font-display); font-size: 15px; font-weight: 700; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.rel-item:hover .rel-title { color: var(--brand); }
@media (max-width: 640px) {
  .rel-grid { grid-template-columns: 1fr; gap: 14px; }
  .rel-item { flex-direction: row; align-items: flex-start; gap: 12px; }
  .rel-thumb { width: 112px; flex-shrink: 0; }
  .rel-meta { display: none; }
}

/* 资源与出处 */
.ep-resources { border-top: 1px solid var(--rule); margin-top: 52px; padding-top: 18px; }
.ep-resources h2 { font-family: var(--font-sans); font-size: 11.5px; color: var(--muted); font-weight: 500; letter-spacing: .16em; margin-bottom: 14px; }
.ep-resources ul { list-style: none; display: flex; flex-direction: column; gap: 9px; font-size: 13.5px; }
.ep-resources li { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.res-k { color: var(--muted); flex-shrink: 0; width: 34px; }
.ep-resources a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.ep-resources a:hover { text-decoration-color: currentColor; }
.res-sub { color: var(--text-faint); font-size: 12px; }

/* 上一期 / 下一期 */
.ep-prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin: 44px 0 0; border-top: 1px solid var(--line); padding-top: 22px; }
.ep-prevnext a { min-width: 0; color: var(--text); text-decoration: none; display: flex; flex-direction: column; gap: 7px; }
.ep-prevnext a[rel='next'] { text-align: right; grid-column: 2; }
.pn-t { font-family: var(--font-display); font-size: 17px; font-weight: 700; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ep-prevnext a:hover .pn-t { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }

/* 悬浮迷你播放条 / 提示条 */
.mini-player {
  position: fixed; left: 50%; bottom: 16px; z-index: 90; width: min(560px, calc(100vw - 24px));
  background: var(--bg-glass2); -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px);
  border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 8px;
  transform: translate(-50%, 140%); opacity: 0; visibility: hidden;
  transition: transform .28s cubic-bezier(.3,.7,.2,1), opacity .2s ease, visibility .28s;
}
.mini-player.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }
.resume-toast { padding-left: 22px; }
.mp-play { width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; border: 0; cursor: pointer; background: var(--accent); color: var(--on-accent); display: flex; align-items: center; justify-content: center; }
.mp-play svg { width: 16px; height: 16px; }
.mp-body { flex: 1; min-width: 0; }
.mp-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-row { display: flex; align-items: center; gap: 8px; margin-top: 5px; }
.mp-bar { flex: 1; height: 2px; background: var(--bar-bg); overflow: hidden; }
.mp-fill { height: 100%; width: 0; background: var(--accent); }
.mp-time { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mp-close { background: none; border: 0; color: var(--muted); width: 30px; height: 30px; border-radius: 50%; cursor: pointer; font-size: 18px; line-height: 1; }
.mp-close:hover { color: var(--text); background: var(--card); }

#toTop { position: fixed; right: 20px; bottom: 20px; z-index: 80; width: 40px; height: 40px; border-radius: 50%; background: var(--bg2); color: var(--text); border: 1px solid var(--line); cursor: pointer; opacity: 0; visibility: hidden; transition: opacity .2s ease, transform .2s ease; transform: translateY(6px); display: flex; align-items: center; justify-content: center; }
#toTop svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#toTop.show { opacity: 1; visibility: visible; transform: none; }
body.mini-on #toTop { bottom: 88px; }
#toTop:hover { border-color: var(--line-strong); }

/* 页脚移除后，页面底部留白交给页面自己 */
.ep-main { padding-bottom: 96px; }
.ar-main { padding-bottom: 96px; }

/* ---------- 单集目录 ---------- */
.ar-main { max-width: 900px; }
.ar-nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 18px; padding: 14px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; background: var(--bg-glass); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.ar-nav a { font-family: var(--font-display); font-size: 15px; color: var(--muted); text-decoration: none; font-variant-numeric: lining-nums; }
.ar-nav a:hover { color: var(--text); }
.ar-year { padding-top: 44px; scroll-margin-top: 50px; }
.ar-year h2 { font-family: var(--font-display); font-size: 34px; font-weight: 700; border-bottom: 1px solid var(--rule); padding-bottom: 10px; font-variant-numeric: lining-nums; }
.ar-year h2 small { font-family: var(--font-sans); font-size: 12.5px; font-weight: 400; color: var(--muted); margin-left: 12px; letter-spacing: .08em; }
.ar-year ol { list-style: none; }
.ar-year li a { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 16px; align-items: baseline; padding: 13px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.ar-n { font-family: var(--font-display); font-size: 15px; color: var(--muted); font-variant-numeric: tabular-nums lining-nums; }
.ar-t { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ar-t b { font-family: var(--font-display); font-weight: 700; font-size: 16.5px; line-height: 1.5; }
.ar-t i { font-family: var(--font-display); font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ar-year li a:hover b { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.ar-d { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; display: flex; gap: 10px; white-space: nowrap; }
.ar-zh { color: var(--brand); letter-spacing: .1em; }

.modal { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-card { background: var(--bg2); color: var(--text); border-radius: 16px; padding: 28px 24px 22px; box-shadow: var(--shadow); max-width: 320px; width: 100%; text-align: center; position: relative; }
.modal-card h3 { font-family: var(--font-display); font-size: 19px; }
.modal-card img { width: 220px; height: 220px; object-fit: contain; margin: 14px auto; display: block; background: #fff; padding: 6px; }
.modal-close { position: absolute; top: 10px; right: 14px; background: none; border: 0; color: var(--muted); font-size: 24px; cursor: pointer; }
.modal-sub { color: var(--muted); font-size: 13px; }
.modal-links { margin-top: 8px; font-size: 13px; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 26px; padding-top: 30px; }
  .search-kbd { display: none; }
}
@media (max-width: 760px) {
  .toolbar-inner { flex-wrap: wrap; gap: 0 20px; }
  .search-box { flex-basis: 100%; border-bottom: 1px solid var(--line); }
  .filters { flex: 1; gap: 20px; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 18px; }
    .mast-brand { padding: 26px 0 18px; }
  .mast-tagline { font-size: 15.5px; margin-top: 12px; }
  .mast-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mast-facts b { font-size: 24px; }
  .mast-intro { font-size: 13.5px; }
  .mast-link { display: none; }
  .wordmark .wm-cn { display: none; }
  #search { font-size: 16px; } /* 16px 防 iOS 聚焦缩放 */
  .sort-btn span { display: none; }
  .hero { padding: 22px 0 30px; gap: 20px; }
  .hero-title { font-size: 25px; }
  .hero-desc { font-size: 15.5px; }
  .result-line { padding-top: 32px; }
  .result-line h2 { font-size: 20px; }
  /* 手机端：图右文左的紧凑列表 */
  .grid { grid-template-columns: 1fr; gap: 0; padding-top: 2px; }
  .card { flex-direction: row-reverse; gap: 14px; border-bottom: 1px solid var(--line); padding: 16px 0; }
  .card .thumb { width: 104px; flex-shrink: 0; align-self: flex-start; margin-top: 3px; }
  .card-body { padding: 0; flex: 1; min-width: 0; gap: 5px; }
  .card-title { font-size: 16px; }
  .card-title-en, .card-desc { display: none; }
  .continue-row { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 82%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; }
  .cont-item { scroll-snap-align: start; }

  .site-header.slim .header-inner { height: 54px; }
  .hdr-back { font-size: 0; }
  .hdr-back::before { content: '←'; font-size: 18px; }
  .wordmark { font-size: 17px; }
  .wordmark .wm-cn { display: none; }
  .ep-head { padding: 34px 0 26px; }
  .ep-dek { font-size: 16.5px; }
  .zh-article { text-align: left; } /* 窄屏两端对齐会把中西文混排撑出大空隙 */
  .zh-article blockquote { font-size: 1.04em; }
  .media.has-audio:not(.video-open) .video-facade { display: none; }
  .ap-line2 .ap-video { display: inline-flex; }
  .audio-player { padding-left: 0; }
  .ep-prevnext { grid-template-columns: 1fr; gap: 22px; }
  .ep-prevnext a[rel='next'] { grid-column: auto; text-align: left; }
  .tool-btn .lbl { display: none; }
  .pop { width: min(340px, calc(100vw - 24px)); }
  #toTop { right: 14px; bottom: 14px; }
  .ar-year li a { grid-template-columns: 40px minmax(0, 1fr); }
  .ar-d { grid-column: 2; }
  .ar-year h2 { font-size: 28px; }
}

@media print {
  .site-header, .masthead, .toolbar, .media, .tabs, .ep-toc, .ep-resources, .ep-prevnext, #toTop, .mini-player { display: none !important; }
  body { background: #fff; color: #000; }
  body.epjs .tab-panel { display: none; }
  body.epjs #panel-zh { display: block; }
}

/* ---------- 404 / 离线页 ---------- */
.special .ep-head { padding-top: 90px; }
.special-actions { display: flex; justify-content: center; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.special-actions a { text-decoration: none; }
.more-btn.ghost { border-color: var(--line-strong); color: var(--muted); }
.special-list { border-top: 1px solid var(--rule); margin: 30px 0 40px; }
.special-list h2 { font-size: 11.5px; letter-spacing: .16em; color: var(--muted); font-weight: 500; padding: 14px 0 6px; }
.special-list ol { list-style: none; }
.special-list a { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.special-list b { font-family: var(--font-display); font-size: 16.5px; }
.special-list i { font-style: normal; font-size: 12px; color: var(--muted); white-space: nowrap; }
.special-list a:hover b { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }

/* 缩略图加载完成后淡入，避免灰块闪烁 */
.thumb img, .cont-thumb img, .hero-media img { opacity: 0; }
.thumb img.ok, .cont-thumb img.ok, .hero-media img.ok { opacity: 1; transition: opacity .45s ease, transform .6s cubic-bezier(.2,.7,.2,1), filter .45s ease; }
.no-js .thumb img { opacity: 1; }

/* 站内跳转时的淡入淡出过渡（支持的浏览器） */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .22s; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* 生成的封面已是站点配色，不再套主题对 YouTube 缩略图用的滤镜 / 混合模式 */
img.cv, .card:hover img.cv, .hero:hover img.cv { filter: none !important; mix-blend-mode: normal !important; }

/* =========================================================
   Cognitive Revolution · 学术期刊（Distill / 研究笔记）
   象牙白纸面 + 学术蓝；Newsreader 衬线标题、IBM Plex Mono 元数据；
   单集像一篇论文：卷期号、摘要、§ 编号的小节、Fig. 图注。
   ========================================================= */
:root, :root[data-theme='light'] {
  --bg: #fbfaf6; --bg2: #fbfaf6; --card: #ffffff; --card-hover: #ffffff;
  --line: #e6e3da; --line-strong: #c9c5b8; --rule: #161616;
  --text: #161616; --text-soft: #2c2c2a; --text-faint: #a3a196; --muted: #6b6a64;
  --accent: #1d3fb8; --accent-hover: #15308f; --on-accent: #ffffff; --brand: #1d3fb8; --on-brand: #ffffff;
  --zh-soft: rgba(29,63,184,.06); --bar-bg: #e6e3da; --bar-buf: #d3cfc2;
  --bg-glass: rgba(251,250,246,.9); --bg-glass2: rgba(255,255,255,.96); --trans-bg: rgba(29,63,184,.035);
  --thumb-bg: #ecebe4; --mark-bg: rgba(29,63,184,.14);
  --shadow: 0 14px 40px rgba(20,30,60,.12), 0 2px 6px rgba(20,30,60,.05); --focus: #1d3fb8;
  color-scheme: light;
}
:root[data-theme='sepia'] {
  --bg: #f4ecd9; --bg2: #f4ecd9; --card: #faf4e6; --card-hover: #fdf8ec;
  --line: #e2d6ba; --line-strong: #c9b996; --rule: #2a2418;
  --text: #2a2418; --text-soft: #43392a; --text-faint: #a99b80; --muted: #7a6e57;
  --accent: #23408f; --accent-hover: #1a3274; --on-accent: #fff; --brand: #23408f; --on-brand: #fff;
  --zh-soft: rgba(35,64,143,.07); --bar-bg: #e3d7bd; --bar-buf: #d3c4a3;
  --bg-glass: rgba(244,236,217,.9); --bg-glass2: rgba(250,244,230,.96); --trans-bg: rgba(35,64,143,.04);
  --thumb-bg: #e8ddc4; --mark-bg: rgba(35,64,143,.14);
  --shadow: 0 14px 40px rgba(60,40,10,.14); --focus: #23408f;
  color-scheme: light;
}
:root[data-theme='dark'] {
  --bg: #14161b; --bg2: #14161b; --card: #1b1e25; --card-hover: #20242c;
  --line: #2a2e37; --line-strong: #434957; --rule: #e7e8ec;
  --text: #e7e8ec; --text-soft: #c5c8d1; --text-faint: #646a78; --muted: #9298a6;
  --accent: #8fa8ff; --accent-hover: #b2c3ff; --on-accent: #14161b; --brand: #8fa8ff; --on-brand: #14161b;
  --zh-soft: rgba(143,168,255,.08); --bar-bg: #2a2e37; --bar-buf: #39404c;
  --bg-glass: rgba(20,22,27,.88); --bg-glass2: rgba(27,30,37,.95); --trans-bg: rgba(143,168,255,.04);
  --thumb-bg: #1f232b; --mark-bg: rgba(143,168,255,.22);
  --shadow: 0 14px 40px rgba(0,0,0,.55); --focus: #8fa8ff;
  color-scheme: dark;
}
:root {
  --font-display: "Newsreader", "Noto Serif SC", "Songti SC", Georgia, serif;
  --font-label: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --radius-card: 2px; --radius-img: 2px;
}
.ep-kicker, .hero-kicker, .card-kicker, .mast-date, .pop-k, .toc-h, .pn-k, .ap-label { letter-spacing: .06em; font-size: 11.5px; }

/* 报头：期刊封面式，居中，上方卷期信息，下方细线 + 栏目导航 */
.masthead { text-align: center; border-bottom: 1px solid var(--rule); }
.mast-top { font-family: var(--font-label); border-bottom: 1px solid var(--line); }
.mast-brand { padding: 56px 0 28px; }
.mast-kicker { font-family: var(--font-display); font-style: italic; font-size: 18px; letter-spacing: 0; color: var(--brand); }
.mast-kicker::before { content: '§ '; font-style: normal; }
.mast-title { font-weight: 600; letter-spacing: -.025em; font-size: clamp(44px, 7.4vw, 104px); }
.mast-tagline { margin: 18px auto 0; font-family: var(--font-display); font-style: italic; font-size: 21px; color: var(--muted); }
.mast-facts { border-top: 1px solid var(--rule); border-bottom: 0; max-width: 820px; margin: 0 auto; }
.mast-facts div { align-items: center; }
.mast-facts b { font-weight: 500; font-size: 32px; color: var(--brand); }
.mast-facts span { font-family: var(--font-label); font-size: 11px; }
.mast-intro { margin: 0 auto; text-align: center; font-family: var(--font-display); font-size: 16px; color: var(--text-soft); max-width: 44em; }
.mast-intro::before { content: 'Abstract — '; font-style: italic; color: var(--brand); }

.toolbar { border-bottom-color: var(--line); }
.filters button.on { border-bottom-color: var(--brand); }
#search::placeholder { font-style: italic; }

/* 头条：论文首页，左文右图（图下方 Fig. 图注） */
.hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border-bottom: 1px solid var(--line); }
.hero-media { order: 2; border-radius: 50%; aspect-ratio: 1; max-width: 400px; justify-self: center; box-shadow: 0 0 0 1px var(--brand), 0 0 0 10px var(--bg), 0 0 0 11px var(--line); }
.hero-media img { filter: grayscale(1) contrast(1.05); }
.hero:hover .hero-media img { filter: none; }
.hero-text { text-align: left; }
.hero-kicker { color: var(--brand); font-family: var(--font-display); font-style: italic; font-size: 16px; letter-spacing: 0; }
.hero-kicker::before { content: '§ '; font-style: normal; }
.hero-title { font-weight: 600; }
.hero-en { font-size: 17px; }
.hero-desc { margin-left: 0; font-size: 17px; }
.hero-desc::before { content: 'Abstract. '; font-style: italic; color: var(--brand); font-family: var(--font-display); }
.hero-by { font-family: var(--font-label); font-size: 12px; letter-spacing: 0; }
.hero-cta { border-bottom-color: var(--brand); color: var(--brand); font-family: var(--font-display); font-size: 17px; font-style: italic; letter-spacing: 0; font-weight: 500; }

.result-line { border-bottom: 1px solid var(--rule); }
.result-line h2, .sec-h h2 { font-weight: 600; font-style: italic; }
.sec-h { border-bottom-color: var(--rule); }

/* 列表：目录页式两栏，卡片像论文条目（编号 + 标题 + 摘要） */
.grid { grid-template-columns: repeat(auto-fill, minmax(460px, 1fr)); gap: 0 56px; }
.card { flex-direction: row; gap: 18px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.card .thumb { width: 104px; flex-shrink: 0; aspect-ratio: 1; border-radius: 50%; align-self: flex-start; }
.card .thumb img { filter: grayscale(1) contrast(1.05); }
.card:hover .thumb img { filter: none; }
.card-body { padding-top: 0; flex: 1; min-width: 0; }
.card-kicker { font-family: var(--font-label); white-space: nowrap; flex-wrap: nowrap; }
.card-kicker .dur { display: none; }
.card-kicker .ep-n { color: var(--brand); }
.card-kicker .zh-tag { color: var(--brand); font-family: var(--font-display); font-style: italic; letter-spacing: 0; font-size: 13px; }
.card-kicker .zh-tag::before { content: '§ '; font-style: normal; }
.card-title { font-weight: 600; font-size: 18.5px; }
.card-title-en { font-size: 14.5px; }
.card-desc { font-family: var(--font-display); font-size: 14.5px; color: var(--muted); }
.card:hover .card-title { color: var(--brand); text-decoration: none; }

/* 单集页：论文版式 */
.wordmark { font-weight: 600; }
.wordmark .wm-cn { font-family: var(--font-display); font-style: italic; letter-spacing: 0; font-size: 14px; }
.ep-head { padding-top: 60px; border-bottom: 1px solid var(--rule); margin-bottom: 30px; }
.ep-kicker { font-family: var(--font-label); color: var(--muted); }
.ep-kicker .k-zh { color: var(--brand); font-family: var(--font-display); font-style: italic; letter-spacing: 0; font-size: 14px; }
.ep-title { font-weight: 600; letter-spacing: -.01em; }
.ep-title-en { font-size: 18px; }
.ep-byline { font-family: var(--font-label); font-size: 11.5px; letter-spacing: 0; }
.media { border-top-color: var(--line); }
.video-facade { border-radius: 2px; }
.ap-play { background: var(--brand); color: var(--on-brand); }
.ap-fill, .ap-fill::after, .mp-fill, .read-progress { background: var(--brand); }
body.epjs .tab-btn { font-family: var(--font-display); font-size: 16px; letter-spacing: 0; font-weight: 600; }
body.epjs .tab-btn.on { border-bottom-color: var(--brand); color: var(--brand); }

/* 正文：§ 编号小节、蓝色引文、数字脚注式列表 */
.zh-article h2 { font-weight: 700; }
.zh-article h2::before { content: '§ ' counter(sec); font-family: var(--font-display); font-style: italic; font-size: .7em; letter-spacing: 0; color: var(--brand); margin-bottom: .4em; }
.zh-article strong { color: var(--text); font-weight: 700; }
.zh-article blockquote { border-top: 0; border-bottom: 0; background: var(--trans-bg); padding: 1.1em 1.4em; border-radius: 2px; color: var(--text); }
.zh-article blockquote cite { color: var(--brand); font-family: var(--font-display); font-style: italic; letter-spacing: 0; font-size: 14px; }
.zh-article ul, .zh-article ol { border-top: 1px solid var(--line); counter-reset: li; }
.zh-article ul > li { counter-increment: li; padding-left: 2.2em; }
.zh-article ul > li::before { content: counter(li) '.'; background: none; width: auto; height: auto; top: .75em; left: 0; color: var(--brand); font-family: var(--font-display); font-style: italic; line-height: var(--read-lh); }
html:not(.indent) .zh-article p.dropcap::first-letter { color: var(--brand); font-weight: 600; }
.zh-article .end-mark::after { content: '∎'; background: none; width: auto; height: auto; color: var(--brand); font-size: 1em; vertical-align: 0; }
.toc-list a::before { content: '§' counter(toc); font-style: italic; }
.toc-list a.on { color: var(--brand); }
.transcript-text { border-top-color: var(--rule); }


.ar-year h2 { font-weight: 600; font-style: italic; }
.ar-n, .ar-nav a { color: var(--brand); }
.ar-zh { color: var(--brand); font-family: var(--font-display); font-style: italic; letter-spacing: 0; }
.more-btn { border-radius: 2px; border-color: var(--brand); color: var(--brand); }
.more-btn:hover { background: var(--brand); color: var(--on-brand); }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-media { order: -1; max-width: 260px; }
}
@media (max-width: 640px) {
  .card { flex-direction: row; }
  .card .thumb { width: 72px; }
  .card-desc { display: none; }
}

/* =========================================================
   窄屏（手机）阅读层：在 base.css 与 themes/<slug>.css 之后加载，
   因此这里的取值可以放心覆盖主题里的桌面版式。
   目标只有三个：更快进正文、读的时候不受干扰、手指点得准。
   ========================================================= */
@media (max-width: 640px) {
  /* ---------- 顶栏：图标按钮统一 44px 触控区 ---------- */
  .site-header.slim .header-inner { height: 54px; gap: 2px; }
  .hdr-back { font-size: 0; width: 44px; height: 44px; margin-left: -11px; display: inline-flex; align-items: center; justify-content: center; }
  .hdr-back::before { content: '←'; font-size: 18px; }
  .hdr-icon, .theme-toggle { width: 44px; height: 44px; }
  .header-actions { gap: 0; }

  /* ---------- 标题区：收紧到首屏能看到正文开头 ---------- */
  .ep-head { padding: 20px 0 16px; margin-bottom: 22px; }
  .ep-kicker { gap: 7px; }
  .ep-title { font-size: 26px; margin-top: 10px; }
  .ep-title-en { font-size: 15.5px; margin-top: 9px; }
  .ep-dek { font-size: 16px; line-height: 1.75; margin-top: 13px; }
  .ep-byline { margin-top: 13px; gap: 6px 8px; }

  /* ---------- 媒体与 tab 之间的空档 ---------- */
  .media { margin-bottom: 22px; }
  .media:not(.has-audio) .video-facade { margin: 0 0 22px; }
  .tabs { margin-bottom: 20px; }
  .zh-note, .tr-note { margin-bottom: 18px; }

  /* ---------- 正文：小节标题上方不留桌面那么大的空 ---------- */
  .zh-article h2 { margin-top: 2em; margin-bottom: .8em; }
  .zh-article h3 { margin-top: 1.6em; }
  .zh-article li { padding-top: .65em; padding-bottom: .65em; }

  /* ---------- 音频播放器：进度条加厚，按钮 44px ---------- */
  .ap-bar { height: 30px; }
  .ap-bar::before, .ap-buf, .ap-fill { height: 4px; }
  .ap-fill::after { width: 14px; height: 14px; margin-top: -7px; right: -7px; }
  .ap-line2 { gap: 2px; }
  .ap-line2 button { min-width: 44px; min-height: 44px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; }
  .ap-resume { display: block; line-height: 1.7; }

  /* ---------- tab 右侧阅读工具 ---------- */
  .tool-btn { min-width: 44px; height: 44px; justify-content: center; }
  /* 阅读设置 / 目录弹层：每个选项都要点得准 */
  .pop-head button { min-height: 44px; display: inline-flex; align-items: center; }
  .swatches button { height: 44px; }
  .font-list button { min-height: 44px; }
  .seg button { min-height: 40px; }
  .toc-list a { min-height: 44px; align-items: center; }
  .toc-list a::before { padding-top: 0; }

  /* ---------- 文末：资源、延伸阅读、上下期 ---------- */
  .related { margin-top: 40px; }
  .ep-resources { margin-top: 40px; }
  .ep-resources li { padding: 3px 0; align-items: center; }
  .ep-resources a { display: inline-flex; align-items: center; min-height: 44px; }
  .ep-prevnext { margin: 32px 0 0; }

  /* ---------- 悬浮控件避开 iPhone 底部安全区 ---------- */
  #toTop { right: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); width: 44px; height: 44px; }
  body.mini-on #toTop { bottom: calc(90px + env(safe-area-inset-bottom, 0px)); }
  .mini-player { bottom: calc(12px + env(safe-area-inset-bottom, 0px)); width: calc(100vw - 24px); }
  .mp-play { width: 44px; height: 44px; }
  .mp-close { width: 44px; height: 44px; }

  .ep-main, .ar-main { padding-bottom: 64px; }

  /* ---------- 单集目录页 ---------- */
  .ar-nav { gap: 0 20px; padding: 6px 0; }
  .ar-nav a { min-height: 44px; display: inline-flex; align-items: center; }
}
