/* ============================================================
   诗经 · 精讲  —— 现代极简版式（Apple-like）
   单栏 · 大留白 · 沉浸优先 · 对照可选
   ============================================================ */

:root {
  --bg:          #fbfbfa;
  --bg-soft:     #f4f4f2;
  --card:        #ffffff;
  --ink:         #1d1d1f;
  --ink-2:       #3a3a3c;
  --ink-3:       #6e6e73;
  --ink-4:       #a1a1a6;
  --line:        #e6e6e3;
  --line-2:      #efefec;

  /* 单一主调（唐·赭金）+ 四唐分期点缀 */
  --accent:      #9a6a2e;   /* 主赭金 */
  --accent-soft: #f4efe3;
  --chutang:     #6a7f8c;   /* 初唐·青苍 */
  --shengtang:   #9a6a2e;   /* 盛唐·赭金 */
  --zhongtang:   #7a6a9a;   /* 中唐·紫 */
  --wantang:     #8a5a52;   /* 晚唐·绛 */
  --beisong:     #9a6a2e;   /* 北宋·赭金 */
  --nansong:     #2c5a8a;   /* 南宋·青蓝 */
  --gold:        #b08815;   /* 名句 */

  --thing:       #2f6f5e;   /* 草木鸟兽器物 */
  --person:      #b3322a;   /* 人名 */
  --place:       #2c5a8a;   /* 地名 */
  --allude:      #8a6d3b;   /* 典故·词义 */

  --serif: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "STSong", serif;
  --sans:  -apple-system, BlinkMacSystemFont, "SF Pro SC", "PingFang SC",
           "Noto Sans SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;

  --shadow-1: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.04);
  --shadow-2: 0 6px 30px rgba(0,0,0,.10);
  --radius: 16px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration: none; transition: .18s; }
a:hover { opacity: .7; }
::selection { background: var(--accent-soft); }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 14px max(20px, env(safe-area-inset-left));
  background: rgba(251,251,250,.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line-2);
  font-size: 14px;
}
.topbar .tb-home { color: var(--ink); font-weight: 600; letter-spacing: .02em; }
.topbar .tb-center { color: var(--ink-3); letter-spacing: .25em; font-size: 13px; }
.topbar .tb-nav { display: flex; gap: 14px; color: var(--ink-3); white-space: nowrap; }
.topbar .tb-nav a { color: var(--ink-3); }
.topbar .tb-nav a:hover { color: var(--accent); opacity: 1; }
.topbar .tb-nav .disabled { color: var(--ink-4); }

/* ---------- 诗页主体 ---------- */
.poem-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 8px 22px 120px;
}

.poem-head {
  text-align: center;
  padding: 56px 0 30px;
}
.poem-head .eyebrow {
  font-size: 12.5px; letter-spacing: .42em; text-transform: none;
  color: var(--accent); font-weight: 600; margin-bottom: 18px;
}
.poem-head h1 {
  font-family: var(--serif);
  font-size: 52px; font-weight: 600;
  letter-spacing: .14em;
  margin: 0; color: var(--ink);
}
.poem-head .poem-sub {
  margin-top: 16px;
  font-size: 15px; color: var(--ink-3);
  letter-spacing: .02em;
}

/* ---------- 页面水墨背景 ---------- */
.has-poem-bg {
  background: var(--bg);
}
.poem-page-bg {
  position: fixed;
  inset: 53px 0 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: var(--bg);
}
.poem-page-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--bg-focus, 50% 50%);
  opacity: var(--bg-opacity, .28);
  filter: saturate(.82) contrast(.96);
}
.poem-page-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(251,251,250,.34), rgba(251,251,250,.50) 36%, rgba(251,251,250,.78) 100%),
    radial-gradient(circle at 50% 26%, rgba(251,251,250,.10), rgba(251,251,250,.54) 64%);
}
.poem-page-bg[data-tone="dark"] img {
  opacity: var(--bg-opacity, .22);
  filter: saturate(.72) contrast(.92);
}
.has-poem-bg .topbar {
  background: rgba(251,251,250,.72);
}
.has-poem-bg .poem-page {
  position: relative;
  z-index: 1;
}
.has-poem-bg footer {
  position: relative;
  z-index: 1;
}
.has-poem-bg .poem-head,
.has-poem-bg .reader,
.has-poem-bg .reading,
.has-poem-bg .term-grid,
.has-poem-bg .lines,
.has-poem-bg .prose,
.has-poem-bg .reviews {
  text-shadow: 0 1px 16px rgba(255,255,255,.84), 0 0 2px rgba(255,255,255,.96);
}
/* 翻页按钮本身有卡片底色与边框，无需白色光晕；
   只给最外层按钮（.prv/.nxt）加底色，内部标签/标题不再各自成框。 */
.has-poem-bg .pager > a,
.has-poem-bg .pager > span {
  background: rgba(255,255,255,.86);
  backdrop-filter: saturate(160%) blur(6px);
  -webkit-backdrop-filter: saturate(160%) blur(6px);
}
.has-poem-bg .verse,
.has-poem-bg .poem-head h1 {
  color: #151513;
}

/* ---------- 题解 ---------- */
.tijie {
  font-family: var(--serif);
  font-size: 16.5px; line-height: 1.95;
  color: var(--ink-2);
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin: 6px 0 36px;
}
.tijie .t-label {
  display: block; font-family: var(--sans);
  font-size: 12px; letter-spacing: .3em; color: var(--accent);
  font-weight: 600; margin-bottom: 8px;
}

/* ---------- 阅读工具条 ---------- */
.reader-toolbar {
  display: flex; gap: 10px; justify-content: center;
  margin: 0 0 26px;
}
.pill {
  appearance: none; cursor: pointer;
  font-family: var(--sans); font-size: 13px;
  color: var(--ink-3);
  background: var(--bg-soft);
  border: 1px solid transparent;
  border-radius: 980px;
  padding: 7px 16px;
  letter-spacing: .08em;
  transition: .18s;
}
.pill:hover { color: var(--ink); }
.pill[aria-pressed="true"] {
  color: #fff; background: var(--accent);
}

/* ---------- 沉浸正文 ---------- */
.poem { text-align: center; }
.stanza { margin: 0 0 34px; }
.stanza:last-child { margin-bottom: 0; }

.verse {
  font-family: var(--serif);
  font-size: 25px;
  line-height: 2.15;
  letter-spacing: .14em;
  color: var(--ink);
  margin: 0;
  font-weight: 500;
}
.verse .ln { display: block; }
/* 句内「顿」：每个标点小句不被拆断，长句只在标点处折行（不截单字）。
   inline-block + nowrap：窄屏时整顿一起换行，行内仍居中。 */
.verse .cl {
  display: inline-block;
  white-space: nowrap;
  vertical-align: top;
}

/* 每章白话（默认隐藏，由「白话对照」开关控制） */
.trans {
  display: none;
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--ink-3);
  letter-spacing: .01em;
  max-width: 30em;
  margin: 14px auto 0;
  padding-top: 12px;
  border-top: 1px solid var(--line-2);
}
.reader[data-bilingual="on"] .trans { display: block; }

/* 注音开关：
   - 生僻字/异读字（rt 无 .rt-common 类）始终显示，作常驻引导注音；
   - 常用字注音（rt.rt-common）默认隐藏，按下「注音」键后全文逐字显示。 */
.reader rt.rt-common { display: none; }
.reader[data-pinyin="on"] rt.rt-common { display: revert; }

ruby { ruby-align: center; }
rt {
  font-family: var(--sans);
  font-size: .38em;
  color: var(--ink-4);
  font-weight: 400;
  letter-spacing: 0;
  user-select: none;
}

/* 关键词着色 + 点按注释 */
.kw { cursor: help; position: relative; }
.kw-thing  { color: var(--thing); }
.kw-person { color: var(--person); }
.kw-place  { color: var(--place); }
.kw-word   { color: var(--allude); border-bottom: 1px dotted var(--allude); }
.kw-golden {
  background: linear-gradient(180deg, transparent 62%, rgba(176,136,21,.18) 62%);
  color: var(--ink);
}

/* tooltip */
[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute; left: 50%; bottom: 132%;
  transform: translateX(-50%);
  background: var(--ink); color: #fff;
  font-family: var(--sans); font-size: 12.5px;
  font-weight: 400; line-height: 1.6; letter-spacing: 0;
  padding: 9px 13px; border-radius: 10px;
  white-space: pre-wrap; width: max-content; max-width: 260px;
  z-index: 60; box-shadow: var(--shadow-2);
  pointer-events: none;
}

/* ---------- 章节分隔 ---------- */
.rule {
  display: flex; align-items: center; gap: 16px;
  margin: 64px 0 30px;
}
.rule::before, .rule::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}
.rule span {
  font-size: 13px; letter-spacing: .4em; color: var(--ink-4);
  font-weight: 600;
}

/* ---------- 逐章精读 ---------- */
.read-stanza {
  margin: 0 0 22px;
  padding: 22px 24px;
  background: var(--card);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
}
.rs-orig {
  font-family: var(--serif);
  font-size: 19px; line-height: 1.95; letter-spacing: .08em;
  color: var(--ink);
  padding-bottom: 12px; margin-bottom: 14px;
  border-bottom: 1px solid var(--line-2);
}
.rs-note {
  font-size: 15px; line-height: 1.92; color: var(--ink-2);
}
.rs-take {
  display: block; margin-top: 12px;
  font-size: 14px; color: var(--accent); font-weight: 600;
  letter-spacing: .02em;
}

/* ---------- 字词卡片 ---------- */
.term-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.term {
  background: var(--card);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  padding: 16px 18px;
}
.term .t-head {
  font-family: var(--serif); font-size: 17px; font-weight: 600;
  color: var(--ink); margin-bottom: 6px;
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
}
.term .t-tag {
  font-family: var(--sans); font-size: 11px; font-weight: 600;
  letter-spacing: .08em;
  padding: 1px 8px; border-radius: 980px;
  background: var(--accent-soft); color: var(--accent);
}
.t-tag.tag-thing  { background: #e8f1ee; color: var(--thing); }
.t-tag.tag-person { background: #f6e9e8; color: var(--person); }
.t-tag.tag-place  { background: #e7eef6; color: var(--place); }
.t-tag.tag-word, .t-tag.tag-allude, .t-tag.tag-idea { background: #f2ece1; color: var(--allude); }
.term .t-body {
  font-size: 14px; line-height: 1.82; color: var(--ink-2);
}

/* ---------- 名句 ---------- */
.lines { list-style: none; padding: 0; margin: 0; }
.lines li {
  padding: 16px 0; border-bottom: 1px solid var(--line-2);
}
.lines li:last-child { border-bottom: 0; }
.lines .ml {
  font-family: var(--serif); font-size: 20px; letter-spacing: .08em;
  color: var(--ink);
}
.lines .ml .idiom {
  font-family: var(--sans); font-size: 12px; font-weight: 600;
  color: var(--gold); margin-left: 10px;
  border: 1px solid var(--gold); border-radius: 980px; padding: 1px 9px;
  letter-spacing: .05em; vertical-align: 3px;
}
.lines .mn {
  display: block; margin-top: 7px;
  font-size: 13.5px; line-height: 1.8; color: var(--ink-3);
}

/* ---------- 讲评 / 评说 ---------- */
.prose h3 {
  font-family: var(--serif);
  font-size: 18px; font-weight: 600; letter-spacing: .06em;
  color: var(--ink);
  margin: 30px 0 10px;
}
.prose p { font-size: 15px; line-height: 1.95; color: var(--ink-2); margin: 0 0 12px; }

.reviews { list-style: none; padding: 0; margin: 0; }
.reviews li {
  padding: 16px 0; border-bottom: 1px solid var(--line-2);
  font-size: 14.5px; line-height: 1.9; color: var(--ink-2);
}
.reviews li:last-child { border-bottom: 0; }
.reviews .by { font-weight: 600; color: var(--ink); }

/* ---------- 篇末导航 ---------- */
.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  gap: 12px;
  margin-top: 56px;
}
.pager a, .pager span {
  display: flex; flex-direction: row; align-items: baseline; gap: 8px;
  min-width: 0;                 /* 允许子项收缩，避免长标题撑破/重叠 */
  padding: 10px 14px;
  background: var(--card); border: 1px solid var(--line-2);
  border-radius: 12px;
  font-size: 13px; color: var(--ink-3);
  transition: .18s;
}
.pager a:hover { border-color: var(--accent); color: var(--accent); opacity: 1; }
.pager .nxt { justify-content: flex-end; text-align: right; }
.pager .prv { justify-content: flex-start; text-align: left; }
.pager .lbl { flex: none; font-size: 13px; letter-spacing: .12em; color: var(--ink-4); }
.pager .ttl {
  font-size: 13px; line-height: 1.4; color: var(--ink-2);
  /* bbox 贴合标题文字本身：随内容伸缩、过长才省略，故标题左右无多余留白；
     .prv 整体靠左、.nxt 整体靠右，由各自 justify-content 决定对齐方向。 */
  flex: 0 1 auto;
  min-width: 0;
  padding-right: .1em;          /* 末字与边框留一点余地，避免笔画被裁 */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

footer {
  text-align: center; padding: 40px 20px 60px;
  font-size: 12.5px; letter-spacing: .25em; color: var(--ink-4);
}

/* ---------- 目录页 ---------- */
.hero {
  text-align: center;
  padding: 92px 22px 40px;
  max-width: 760px; margin: 0 auto;
}
.hero .mark {
  font-size: 12.5px; letter-spacing: .5em; color: var(--accent);
  font-weight: 600; margin-bottom: 22px;
}
.hero h1 {
  font-family: var(--serif);
  font-size: 76px; font-weight: 600; letter-spacing: .2em;
  margin: 0; line-height: 1.1;
}
.hero .h-sub { margin-top: 20px; font-size: 17px; color: var(--ink-3); letter-spacing: .04em; }
.hero .h-lede {
  font-family: var(--serif);
  margin: 26px auto 0; max-width: 30em;
  font-size: 16px; line-height: 1.95; color: var(--ink-2);
}
.hero-stats {
  display: flex; justify-content: center; gap: 40px;
  margin-top: 40px;
}
.hero-stats .s b { font-family: var(--serif); font-size: 30px; font-weight: 600; color: var(--ink); }
.hero-stats .s span { display: block; font-size: 12px; letter-spacing: .25em; color: var(--ink-4); margin-top: 4px; }

.overview {
  max-width: 760px; margin: 36px auto; padding: 0 22px;
}
.overview .ov-card {
  background: var(--bg-soft); border-radius: var(--radius);
  padding: 26px 28px;
}
.overview h2 { font-family: var(--serif); font-size: 20px; letter-spacing: .1em; margin: 0 0 8px; }
.overview p { font-size: 15px; line-height: 1.95; color: var(--ink-2); margin: 10px 0 0; }
.overview .ov-closing { margin-top: 16px; font-family: var(--serif); color: var(--accent); }

.filter {
  position: sticky; top: 53px; z-index: 30;
  display: flex; gap: 8px; flex-wrap: wrap; justify-content: center;
  padding: 14px 16px;
  background: rgba(251,251,250,.82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line-2);
  margin-bottom: 8px;
}
.filter .tab {
  cursor: pointer; font-size: 13.5px; color: var(--ink-3);
  padding: 6px 15px; border-radius: 980px; transition: .18s;
  letter-spacing: .08em;
}
.filter .tab:hover { color: var(--ink); }
.filter .tab.active { background: var(--accent); color: #fff; }
.filter .search {
  flex: 1 1 200px; max-width: 260px;
  border: 1px solid var(--line); border-radius: 980px;
  padding: 6px 16px; font-size: 13.5px; font-family: var(--sans);
  color: var(--ink); background: var(--card); outline: none;
}
.filter .search:focus { border-color: var(--accent); }

.poet-index {
  max-width: 1080px;
  margin: 30px auto 26px;
  padding: 0 22px;
  scroll-margin-top: 72px;
}
.poet-jump-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}
.poet-jump {
  display: flex; flex-direction: column; gap: 2px;
  min-height: 82px;
  padding: 12px 13px;
  background: rgba(255,255,255,.86);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  transition: .18s;
}
.poet-jump:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-1);
  border-color: var(--line);
  opacity: 1;
}
.poet-jump.has-bio { border-left: 3px solid var(--accent); }
.poet-jump .pj-name {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--ink);
  letter-spacing: .06em;
}
.poet-jump .pj-dates {
  font-size: 11px;
  line-height: 1.35;
  color: var(--ink-4);
  letter-spacing: .04em;
}
.poet-jump .pj-meta {
  margin-top: auto;
  font-size: 11px;
  line-height: 1.35;
  color: var(--ink-3);
  letter-spacing: .06em;
}

.cat {
  max-width: 1080px; margin: 30px auto; padding: 0 22px;
}
.cat-head {
  display: flex; align-items: baseline; gap: 14px;
  margin: 12px 0 18px;
}
.cat-head h2 {
  font-family: var(--serif); font-size: 26px; font-weight: 600;
  letter-spacing: .18em; margin: 0; color: var(--ink);
}
.cat-head .ch-meta { font-size: 13px; color: var(--ink-4); letter-spacing: .1em; }

.sub { margin: 18px 0 26px; scroll-margin-top: 126px; }
.sub.jump-focus .sub-name {
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 10px;
  padding-top: 4px;
  padding-bottom: 4px;
}
.sub-name {
  font-size: 13.5px; letter-spacing: .2em; color: var(--ink-3);
  font-weight: 600; margin: 0 0 12px;
  padding-left: 12px; border-left: 3px solid var(--accent);
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.card {
  display: flex; flex-direction: column; gap: 4px;
  padding: 14px 15px;
  background: var(--card); border: 1px solid var(--line-2);
  border-radius: 13px; transition: .18s; position: relative;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-1); border-color: var(--line); opacity: 1; }
.card .c-no { font-size: 11px; color: var(--ink-4); letter-spacing: .1em; }
.card .c-ti { font-family: var(--serif); font-size: 19px; color: var(--ink); letter-spacing: .06em; }
.card .c-meta { font-size: 12px; color: var(--ink-3); line-height: 1.5; }
.card.done { border-left: 3px solid var(--accent); }
.card.done::after {
  content: "精讲"; position: absolute; top: 11px; right: 11px;
  font-size: 10px; font-weight: 600; letter-spacing: .1em;
  color: var(--accent); background: var(--accent-soft);
  padding: 1px 7px; border-radius: 980px;
}
.card.todo .c-ti { color: var(--ink-2); }
.hidden { display: none !important; }

/* 诗人名（标题下） */
.poem-head .poem-sub {
  font-family: var(--serif);
  font-size: 17px; color: var(--ink-2); letter-spacing: .06em;
}

/* 四唐分期点缀 */
.cat[data-key="chutang"]   .sub-name { border-color: var(--chutang); }
.cat[data-key="shengtang"] .sub-name { border-color: var(--shengtang); }
.cat[data-key="zhongtang"] .sub-name { border-color: var(--zhongtang); }
.cat[data-key="wantang"]   .sub-name { border-color: var(--wantang); }
.cat[data-key="beisong"]   .sub-name { border-color: var(--beisong); }
.cat[data-key="nansong"]   .sub-name { border-color: var(--nansong); }

/* ---------- 单篇页：作者链接 ---------- */
.poem-author { color: var(--ink); border-bottom: 1px dotted var(--ink-4); }
.poem-author:hover { color: var(--accent); border-color: var(--accent); opacity: 1; }

a.s { display: block; }
a.s:hover b { color: var(--accent); }
a.s:hover { opacity: 1; }

/* ---------- 首页：诗人组名链接 ---------- */
.sub-poet { color: var(--ink-2); }
.sub-poet:hover { color: var(--accent); opacity: 1; }
.sub-bio-dot {
  display: inline-block; margin-left: 7px; vertical-align: 1px;
  font-size: 10px; font-weight: 600; letter-spacing: .04em;
  color: var(--accent); background: var(--accent-soft);
  padding: 0 6px; border-radius: 980px;
}

/* ---------- 诗人专页 ---------- */
.poet-page .poem-head { padding: 56px 0 22px; }
.poet-sub {
  margin-top: 14px; font-family: var(--serif);
  font-size: 16px; color: var(--ink-3); letter-spacing: .04em;
}
.poet-tags {
  display: flex; gap: 8px; flex-wrap: wrap; justify-content: center;
  margin-top: 18px;
}
.poet-tag {
  font-size: 12px; letter-spacing: .06em; color: var(--accent);
  background: var(--accent-soft); border-radius: 980px; padding: 3px 12px;
}
.poet-bio {
  font-family: var(--serif);
  background: var(--bg-soft); border-radius: var(--radius);
  padding: 26px 30px; margin: 10px 0 22px;
}
.poet-bio p {
  font-size: 16.5px; line-height: 2.0; color: var(--ink-2); margin: 0 0 14px;
}
.poet-bio p:last-child { margin-bottom: 0; }
.poet-repr {
  font-family: var(--serif); font-size: 16px; line-height: 1.95;
  color: var(--ink-2); border-left: 3px solid var(--accent);
  padding: 4px 0 4px 18px; margin: 0 0 18px;
}
.poet-repr .t-label {
  display: block; font-family: var(--sans);
  font-size: 11px; letter-spacing: .3em; color: var(--accent);
  font-weight: 600; margin-bottom: 6px;
}
.poet-refs { font-size: 13px; color: var(--ink-4); margin: 0 0 8px; letter-spacing: .02em; }

.poet-poems {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}
.pl-card {
  display: flex; flex-direction: column; gap: 4px;
  padding: 14px 16px;
  background: var(--card); border: 1px solid var(--line-2);
  border-radius: 13px; transition: .18s;
}
.pl-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-1); border-color: var(--accent); opacity: 1; }
.pl-card .pl-ti { font-family: var(--serif); font-size: 19px; color: var(--ink); letter-spacing: .06em; }
.pl-card .pl-form { font-size: 12px; color: var(--ink-4); letter-spacing: .08em; }

.poet-page[data-era="chutang"]   .poet-repr { border-color: var(--chutang); }
.poet-page[data-era="shengtang"] .poet-repr { border-color: var(--shengtang); }
.poet-page[data-era="zhongtang"] .poet-repr { border-color: var(--zhongtang); }
.poet-page[data-era="wantang"]   .poet-repr { border-color: var(--wantang); }

/* ---------- 诗人录 ---------- */
.poet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.poet-card {
  display: flex; flex-direction: column; gap: 4px;
  padding: 16px 18px;
  background: var(--card); border: 1px solid var(--line-2);
  border-radius: 14px; transition: .18s; position: relative;
}
.poet-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-1); border-color: var(--line); opacity: 1; }
.poet-card .pc-name { font-family: var(--serif); font-size: 22px; color: var(--ink); letter-spacing: .08em; }
.poet-card .pc-dates { font-size: 12px; color: var(--ink-4); letter-spacing: .06em; }
.poet-card .pc-meta { font-size: 13px; color: var(--ink-3); line-height: 1.6; margin-top: 2px; }
.poet-card .pc-n { font-size: 11px; color: var(--ink-4); letter-spacing: .08em; margin-top: 2px; }
.poet-card.has-bio { border-left: 3px solid var(--accent); }
.poet-card[data-tier="major"] .pc-name { color: var(--accent); }
.cat[data-key="chutang"]   .poet-card.has-bio { border-left-color: var(--chutang); }
.cat[data-key="shengtang"] .poet-card.has-bio { border-left-color: var(--shengtang); }
.cat[data-key="zhongtang"] .poet-card.has-bio { border-left-color: var(--zhongtang); }
.cat[data-key="wantang"]   .poet-card.has-bio { border-left-color: var(--wantang); }

/* ---------- 词牌：单篇页解析卡片 ---------- */
.cipai-card {
  max-width: 600px;
  margin: 0 auto 30px;
  padding: 16px 20px 18px;
  background: var(--bg-soft);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
}
/* 默认隐藏，点「词牌」键展开 */
.reader .cipai-card { display: none; }
.reader[data-cipai="on"] .cipai-card {
  display: block;
  animation: cipai-reveal .24s ease both;
}
@keyframes cipai-reveal {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}
.has-poem-bg .cipai-card {
  background: rgba(255,255,255,.78);
  backdrop-filter: saturate(160%) blur(6px);
  -webkit-backdrop-filter: saturate(160%) blur(6px);
}
.cipai-card .ci-top {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
}
.cipai-card .ci-label {
  font-size: 11px; letter-spacing: .3em; color: var(--accent);
  font-weight: 600;
}
.cipai-card .ci-name {
  font-family: var(--serif); font-size: 19px; color: var(--ink);
  letter-spacing: .06em; border-bottom: 1px dotted var(--ink-4);
}
.cipai-card .ci-name:hover { color: var(--accent); border-color: var(--accent); opacity: 1; }
.cipai-card .ci-go { font-family: var(--sans); font-size: 11px; color: var(--accent); margin-left: 8px; letter-spacing: .04em; }
.cipai-card .ci-alias {
  font-size: 12.5px; color: var(--ink-3); letter-spacing: .02em;
}
.cipai-card .ci-chips {
  display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0 0;
}
.cipai-card .ci-chip {
  font-size: 11.5px; letter-spacing: .04em;
  color: var(--accent); background: var(--accent-soft);
  border-radius: 980px; padding: 2px 10px;
}
.cipai-card .ci-origin {
  margin: 12px 0 0; font-family: var(--serif);
  font-size: 14.5px; line-height: 1.85; color: var(--ink-2);
}
.poem-head .eyebrow .eb-link {
  color: var(--accent); border-bottom: 1px dotted var(--accent);
}
.poem-head .eyebrow .eb-link:hover { opacity: .7; }

/* ---------- 词牌专页：结构速览 ---------- */
.cipai-struct {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.cipai-struct .ci-cell {
  display: flex; flex-direction: column; gap: 4px;
  padding: 14px 16px;
  background: var(--card); border: 1px solid var(--line-2);
  border-radius: 13px;
}
.cipai-struct .cc-k {
  font-size: 11px; letter-spacing: .2em; color: var(--ink-4); font-weight: 600;
}
.cipai-struct .cc-v {
  font-family: var(--serif); font-size: 18px; color: var(--ink); letter-spacing: .04em;
}

@media (max-width: 600px) {
  .poem-head h1 { font-size: 40px; }
  .cipai-struct { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .verse { font-size: 21px; }
  .hero h1 { font-size: 52px; }
  .hero-stats { gap: 26px; }
  .poem-page { padding: 8px 18px 90px; }
  .poem-page-bg img {
    opacity: .30;
  }
  .poem-page-bg::after {
    background:
      linear-gradient(180deg, rgba(251,251,250,.62), rgba(251,251,250,.82) 42%, rgba(251,251,250,.94) 100%),
      radial-gradient(circle at 50% 20%, rgba(251,251,250,.20), rgba(251,251,250,.76) 66%);
  }
  .poet-bio { padding: 20px 20px; }
  .poet-bio p { font-size: 15.5px; }
  .poet-index { padding: 0 18px; }
  .poet-jump-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .poet-jump { min-height: 76px; padding: 10px 11px; }
}
