@charset "UTF-8";

/* ═══════════════════════════════════════
   t13 · 水墨古典风格设计系统
   字体 · 宣纸色调 · 墨绿主题 · 深色模式
   ═══════════════════════════════════════ */

/* ── 艺术字体 ── */
@import url('https://cdn.jsdelivr.net/npm/lxgw-wenkai-webfont@1.7.0/lxgwwenkaiscreen.css');

/* ── CSS 变量 ── */
:root {
  /* 色彩系统 */
  --pri:       #3d6b4f;
  --pri-dk:    #2a4a37;
  --pri-lt:    #5a9068;
  --pri-pale:  #e8f5ec;
  --acc:       #a83820;      /* 朱砂 */
  --acc-pale:  #fdf0ec;
  --gold:      #c49a2e;      /* 金色点缀 */

  /* 背景色系（宣纸）*/
  --bg:        #faf6ee;
  --bg-card:   #fffcf5;
  --bg-side:   #f3ede1;
  --bg-alt:    #f7f2e8;

  /* 文字 */
  --tx:        #2c2422;
  --tx-m:      #7a6a5a;
  --tx-l:      #b0a090;

  /* 边框与阴影 */
  --bd:        #d8cdb0;
  --bd-lt:     #ece5d0;
  --sh:        0 2px 14px rgba(42,74,55,.09);
  --sh-h:      0 6px 28px rgba(42,74,55,.16);

  /* 圆角 */
  --r:    4px;
  --r-lg: 8px;
  --r-xl: 14px;

  /* 字体 */
  --f: 'LXGW WenKai Screen', 'Noto Serif SC', 'STSong', 'SimSun', Georgia, serif;

  /* 过渡 */
  --tr: all .22s ease;

  /* 纹样透明度 */
  --pat: .045;
}

/* ── 深色模式 ── */
[data-theme="dark"] {
  --bg:       #0e1912;
  --bg-card:  #152010;
  --bg-side:  #0b150d;
  --bg-alt:   #111e14;
  --tx:       #d6cba8;
  --tx-m:     #8a9a7a;
  --tx-l:     #4a6050;
  --bd:       #253a28;
  --bd-lt:    #1e3022;
  --sh:       0 2px 14px rgba(0,0,0,.45);
  --sh-h:     0 6px 28px rgba(0,0,0,.55);
  --pri-pale: #1a2e20;
  --acc-pale: #2a1510;
  --bg-alt:   #0f1c12;
  --pat:      .025;
}

/* ── 重置 ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* 过渡不对动画类 */
body, .card, .hdr-btn, .nav a, .fl, .tag, .li-ttl a,
.btn, .filter-link, a {
  transition: var(--tr);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--f);
  background: var(--bg);
  color: var(--tx);
  line-height: 1.9;
  font-size: 15px;
  min-height: 100vh;
}

/* ── 宣纸纹路背景 ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: var(--pat);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Crect x='0.5' y='0.5' width='23' height='23' fill='none' stroke='%233d6b4f' stroke-width='0.4'/%3E%3Crect x='6' y='6' width='12' height='12' fill='none' stroke='%233d6b4f' stroke-width='0.3'/%3E%3C/svg%3E");
}

/* ── 基础链接 ── */
a { color: var(--pri); text-decoration: none; }
a:hover { color: var(--pri-lt); text-decoration: underline; }

img { max-width: 100%; height: auto; }

/* ── 容器 ── */
.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* ═══ 头部 ═══ */
.header {
  background: linear-gradient(135deg, #2a4a37 0%, #1e3528 55%, #2d5040 100%);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(0,0,0,.28);
}

.header-inner {
  display: flex;
  align-items: center;
  height: 58px;
  gap: 20px;
}

/* Logo */
.logo {
  color: #e8dfc0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 2px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
  text-decoration: none;
}
.logo:hover { color: #fff; text-decoration: none; }
.logo-icon {
  width: 26px; height: 26px;
  flex-shrink: 0;
  opacity: .9;
}
.logo-sub {
  font-size: 10px;
  color: rgba(232,223,192,.55);
  font-weight: 400;
  letter-spacing: .5px;
  margin-left: 2px;
  white-space: nowrap;
}

/* 导航 */
.nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
}
.nav a {
  color: rgba(232,223,192,.8);
  padding: 6px 13px;
  border-radius: var(--r);
  font-size: 14px;
  letter-spacing: 1px;
  text-decoration: none;
}
.nav a:hover { color: #fff; background: rgba(255,255,255,.12); text-decoration: none; }
.nav a.active { color: #fff; background: rgba(255,255,255,.18); font-weight: 600; }

/* 头部按钮 */
.hdr-btns { display: flex; gap: 8px; flex-shrink: 0; }
.hdr-btn {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  color: rgba(232,223,192,.88);
  width: 34px; height: 34px;
  border-radius: var(--r);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}
.hdr-btn:hover { background: rgba(255,255,255,.22); color: #fff; }

/* 搜索栏 */
.search-bar {
  background: #192d22;
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 10px 0;
  display: none;
}
.search-bar.open {
  display: block;
  animation: fadeUp .2s ease;
}
.sb-inner { display: flex; gap: 8px; }
.sb-input {
  flex: 1;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--r);
  color: #e8dfc0;
  padding: 7px 14px;
  font: 14px/1 var(--f);
  outline: none;
}
.sb-input::placeholder { color: rgba(232,223,192,.4); }
.sb-input:focus { border-color: rgba(255,255,255,.38); background: rgba(255,255,255,.14); }
.sb-btn {
  background: var(--pri);
  border: none;
  color: #fff;
  padding: 7px 20px;
  border-radius: var(--r);
  cursor: pointer;
  font: 14px var(--f);
}
.sb-btn:hover { background: var(--pri-lt); }

/* ═══ 主体布局 ═══ */
.page-body {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 20px 40px;
  display: grid;
  grid-template-columns: 1fr 272px;
  gap: 22px;
  align-items: start;
  position: relative;
  z-index: 1;
}
.page-full { /* 全宽页面 */
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 20px 40px;
  position: relative;
  z-index: 1;
}
.main { min-width: 0; }
.sidebar { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 72px; }

/* ── 动画 ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.main { animation: fadeUp .36s ease both; }

/* ═══ 卡片 ═══ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--bd);
  border-radius: var(--r-lg);
  box-shadow: var(--sh);
  overflow: hidden;
}
.card:hover { box-shadow: var(--sh-h); transform: translateY(-1px); }
.card-hd {
  padding: 14px 18px;
  border-bottom: 1px solid var(--bd-lt);
  display: flex;
  align-items: center;
}
.card-ttl {
  font-size: 14px;
  font-weight: 600;
  color: var(--pri-dk);
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.card-ttl::before {
  content: '';
  display: block;
  width: 3px;
  height: 14px;
  background: linear-gradient(to bottom, var(--pri), var(--pri-lt));
  border-radius: 2px;
  flex-shrink: 0;
}
.card-bd { padding: 16px 18px; }

/* ── 墨线装饰 ── */
.ink-line {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--pri) 30%, var(--pri) 70%, transparent);
  opacity: .2;
  margin: 16px 0;
}

/* ── 面包屑 ── */
.bc {
  font-size: 12px;
  color: var(--tx-m);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.bc a { color: var(--pri); }
.bc a:hover { text-decoration: underline; }
.bc-sep { color: var(--tx-l); }

/* ─ 标签 ─ */
.tag {
  display: inline-block;
  background: rgba(61,107,79,.07);
  color: var(--pri);
  border: 1px solid rgba(61,107,79,.2);
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 12px;
}
.tag:hover { background: var(--pri); color: #fff; text-decoration: none; }

/* ─ 筛选栏 ─ */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 18px;
  padding: 12px 16px;
  background: var(--bg-side);
  border: 1px solid var(--bd);
  border-radius: var(--r);
}
.filter-label {
  font-size: 12px;
  color: var(--tx-m);
  align-self: center;
  white-space: nowrap;
  margin-right: 4px;
}
.fl {
  display: inline-block;
  padding: 3px 13px;
  border: 1px solid var(--bd);
  border-radius: 20px;
  font-size: 13px;
  color: var(--tx-m);
  background: var(--bg-card);
}
.fl:hover { border-color: var(--pri); color: var(--pri); text-decoration: none; }
.fl.active { background: var(--pri); color: #fff; border-color: var(--pri); }

/* ─ 列表项 ─ */
.li {
  padding: 15px 0;
  border-bottom: 1px solid var(--bd-lt);
}
.li:last-child { border-bottom: none; }
.li-ttl { font-size: 15px; font-weight: 500; margin-bottom: 3px; }
.li-ttl a { color: var(--tx); }
.li-ttl a:hover { color: var(--pri); text-decoration: none; }
.li-sub { font-size: 12px; color: var(--tx-m); margin-bottom: 5px; }
.li-snp { font-size: 13px; color: var(--tx-m); line-height: 1.7; }

/* ─ 按钮 ─ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 18px;
  border-radius: var(--r);
  font: 14px var(--f);
  cursor: pointer;
  border: 1px solid var(--pri);
  color: var(--pri);
  background: transparent;
  text-decoration: none;
}
.btn:hover { background: var(--pri); color: #fff; text-decoration: none; }
.btn-solid { background: var(--pri); color: #fff; }
.btn-solid:hover { background: var(--pri-dk); color: #fff; }

/* ─ 分页（PHP buildPager 输出）─ */
.pager { display: flex; align-items: center; justify-content: center; gap: 5px; flex-wrap: wrap; margin-top: 26px; }
.pager a,
.pager span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 9px;
  border: 1px solid var(--bd);
  border-radius: var(--r);
  font-size: 13px;
  color: var(--tx);
}
.pager a:hover { border-color: var(--pri); color: var(--pri); text-decoration: none; }
.pager span.cur { background: var(--pri); color: #fff; border-color: var(--pri); }
.pager a.prv, .pager a.nxt { color: var(--pri); font-weight: 500; }

/* ═══ 首页特供 ═══ */

/* 英雄区 */
.hero {
  background: linear-gradient(135deg, var(--pri-dk) 0%, #1e3528 60%, #2d5040 100%);
  border-radius: var(--r-xl);
  padding: 36px 32px;
  color: #e8dfc0;
  margin-bottom: 22px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Ccircle cx='30' cy='30' r='28' fill='none' stroke='%23ffffff' stroke-width='.3' opacity='.15'/%3E%3Ccircle cx='30' cy='30' r='20' fill='none' stroke='%23ffffff' stroke-width='.2' opacity='.1'/%3E%3Cpath d='M2 30h56M30 2v56' stroke='%23ffffff' stroke-width='.2' opacity='.08'/%3E%3C/svg%3E");
  opacity: 1;
  pointer-events: none;
}
.hero-label {
  font-size: 11px;
  letter-spacing: 3px;
  opacity: .65;
  margin-bottom: 12px;
  text-transform: uppercase;
}
.hero-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 2px;
  margin-bottom: 6px;
  line-height: 1.4;
}
.hero-meta {
  font-size: 13px;
  opacity: .7;
  margin-bottom: 14px;
}
.hero-snippet {
  font-size: 14px;
  line-height: 2;
  opacity: .85;
  border-left: 2px solid rgba(200,170,80,.5);
  padding-left: 14px;
  margin-bottom: 18px;
}
.hero-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: rgba(200,170,80,.9);
  font-size: 13px;
  border: 1px solid rgba(200,170,80,.4);
  padding: 5px 14px;
  border-radius: 20px;
}
.hero-link:hover { background: rgba(200,170,80,.15); color: #e8c860; text-decoration: none; }

/* 统计数据 */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--bd);
  border: 1px solid var(--bd);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: 22px;
}
.stat-item {
  background: var(--bg-card);
  padding: 14px 8px;
  text-align: center;
}
.stat-num {
  font-size: 20px;
  font-weight: 600;
  color: var(--pri);
  letter-spacing: 1px;
  line-height: 1;
  margin-bottom: 4px;
}
.stat-label { font-size: 11px; color: var(--tx-m); letter-spacing: 1px; }

/* 朝代导航 */
.dynasty-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 22px;
}
.dynasty-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 14px;
  border: 1px solid var(--bd);
  border-radius: 20px;
  font-size: 13px;
  color: var(--tx-m);
  background: var(--bg-card);
}
.dynasty-link:hover {
  border-color: var(--pri);
  color: var(--pri);
  background: var(--pri-pale);
  text-decoration: none;
}
.dynasty-count { font-size: 11px; opacity: .7; }

/* 诗词卡片网格 */
.poem-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}
.poem-card {
  background: var(--bg-card);
  border: 1px solid var(--bd);
  border-radius: var(--r-lg);
  padding: 16px;
  box-shadow: var(--sh);
}
.poem-card:hover { box-shadow: var(--sh-h); transform: translateY(-2px); }
.poem-card-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}
.poem-card-title a { color: var(--tx); }
.poem-card-title a:hover { color: var(--pri); text-decoration: none; }
.poem-card-meta { font-size: 12px; color: var(--tx-m); margin-bottom: 8px; }
.poem-card-snippet { font-size: 13px; color: var(--tx-m); line-height: 1.7; }

/* 作者卡片 */
.author-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.author-card {
  background: var(--bg-card);
  border: 1px solid var(--bd);
  border-radius: var(--r-lg);
  padding: 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  box-shadow: var(--sh);
}
.author-card:hover { box-shadow: var(--sh-h); transform: translateY(-1px); }
.author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pri), var(--pri-lt));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  flex-shrink: 0;
}
.author-card-name { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.author-card-name a { color: var(--tx); }
.author-card-name a:hover { color: var(--pri); text-decoration: none; }
.author-card-meta { font-size: 12px; color: var(--tx-m); margin-bottom: 5px; }
.author-card-bio { font-size: 12px; color: var(--tx-m); line-height: 1.6; }

/* 标签云 */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.cloud-tag {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 20px;
  border: 1px solid var(--bd);
  background: var(--bg-card);
  color: var(--tx-m);
}
.cloud-tag:hover { background: var(--pri-pale); color: var(--pri); border-color: var(--pri); text-decoration: none; }

/* ═══ 诗词详情页 ═══ */
.poem-main {
  background: var(--bg-card);
  border: 1px solid var(--bd);
  border-radius: var(--r-xl);
  padding: 32px 36px;
  box-shadow: var(--sh);
}
.poem-heading { text-align: center; margin-bottom: 24px; }
.poem-heading h1 {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 3px;
  margin-bottom: 10px;
  color: var(--tx);
}
.poem-heading .poem-author-line {
  font-size: 14px;
  color: var(--tx-m);
  letter-spacing: 1px;
}
.poem-author-line a { color: var(--pri); }
.poem-body {
  font-size: 16px;
  line-height: 2.6;
  letter-spacing: 2px;
  text-align: center;
  color: var(--tx);
  margin: 28px 0;
  white-space: pre-wrap;
}
.poem-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--bd-lt);
}
.poem-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--pri);
  letter-spacing: 2px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.poem-section-title::before {
  content: '◆';
  font-size: 8px;
}
.poem-section-body {
  font-size: 14px;
  color: var(--tx-m);
  line-height: 2;
}
.poem-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 20px; }
.poem-nav { display: flex; justify-content: space-between; margin-top: 24px; gap: 12px; }
.poem-nav-btn {
  flex: 1;
  padding: 8px 14px;
  border: 1px solid var(--bd);
  border-radius: var(--r);
  font-size: 13px;
  color: var(--tx-m);
  background: var(--bg-alt);
  text-align: center;
}
.poem-nav-btn:hover { border-color: var(--pri); color: var(--pri); background: var(--pri-pale); text-decoration: none; }
.poem-nav-btn.prev { text-align: left; }
.poem-nav-btn.next { text-align: right; }

/* ═══ 作者页 ═══ */
.author-header {
  background: linear-gradient(135deg, var(--bg-side) 0%, var(--bg-alt) 100%);
  border: 1px solid var(--bd);
  border-radius: var(--r-xl);
  padding: 28px 28px 24px;
  margin-bottom: 20px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.author-big-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pri-dk), var(--pri-lt));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 26px;
  font-weight: 600;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(42,74,55,.25);
}
.author-info h1 { font-size: 22px; font-weight: 600; letter-spacing: 2px; margin-bottom: 6px; }
.author-info .author-dynasty {
  display: inline-block;
  font-size: 12px;
  background: var(--pri-pale);
  color: var(--pri);
  border: 1px solid rgba(61,107,79,.2);
  padding: 2px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}
.author-bio-text { font-size: 14px; color: var(--tx-m); line-height: 1.9; }

/* 诗词列表（作者页）*/
.poem-list-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--bd-lt);
}
.poem-list-item:last-child { border-bottom: none; }
.poem-list-title { font-size: 15px; font-weight: 500; margin-bottom: 5px; }
.poem-list-title a { color: var(--tx); }
.poem-list-title a:hover { color: var(--pri); text-decoration: none; }
.poem-list-snippet { font-size: 13px; color: var(--tx-m); line-height: 1.7; }

/* ═══ 成语/汉字详情 ═══ */
.detail-main {
  background: var(--bg-card);
  border: 1px solid var(--bd);
  border-radius: var(--r-xl);
  padding: 28px 32px;
  box-shadow: var(--sh);
  margin-bottom: 20px;
}
.detail-heading { display: flex; align-items: flex-start; gap: 20px; margin-bottom: 24px; }
.detail-big-char {
  font-size: 52px;
  font-weight: 600;
  color: var(--pri-dk);
  line-height: 1;
  letter-spacing: -2px;
  flex-shrink: 0;
}
.detail-big-name {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--tx);
  line-height: 1.2;
  margin-bottom: 6px;
}
.detail-pinyin { font-size: 15px; color: var(--tx-m); margin-bottom: 8px; font-style: italic; }
.detail-meta-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 0; }
.detail-meta-item { font-size: 13px; color: var(--tx-m); }
.detail-meta-item strong { color: var(--tx); }
.detail-section { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--bd-lt); }
.detail-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--pri);
  letter-spacing: 2px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.detail-section-title::before { content: '◆'; font-size: 8px; }
.detail-section-body { font-size: 14px; color: var(--tx-m); line-height: 2; }

/* 汉字大字 */
.char-hero {
  text-align: center;
  padding: 20px 0;
}
.char-big {
  font-size: 80px;
  font-weight: 400;
  color: var(--pri-dk);
  line-height: 1;
  letter-spacing: 0;
  display: block;
  margin-bottom: 8px;
}
.char-big-trad { font-size: 18px; color: var(--tx-m); margin-bottom: 10px; }
.char-pinyin { font-size: 18px; color: var(--pri); font-style: italic; margin-bottom: 8px; }
.char-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 16px;
}
.char-meta-cell {
  background: var(--bg-alt);
  border-radius: var(--r);
  padding: 10px;
  text-align: center;
}
.char-meta-cell .val { font-size: 16px; font-weight: 600; color: var(--tx); }
.char-meta-cell .lbl { font-size: 11px; color: var(--tx-m); margin-top: 2px; }

/* ═══ 名句详情 ═══ */
.sentence-main {
  background: var(--bg-card);
  border: 1px solid var(--bd);
  border-radius: var(--r-xl);
  padding: 32px 36px;
  box-shadow: var(--sh);
  text-align: center;
}
.sentence-content {
  font-size: 20px;
  line-height: 2;
  letter-spacing: 2px;
  color: var(--tx);
  margin: 20px 0 14px;
}
.sentence-from {
  font-size: 14px;
  color: var(--tx-m);
  margin-bottom: 20px;
}
.sentence-from a { color: var(--pri); }

/* ═══ 列表页 ═══ */
.list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--bd-lt);
}
.list-header h1 { font-size: 18px; font-weight: 600; letter-spacing: 1px; }
.list-count { font-size: 13px; color: var(--tx-m); }

/* 汉字列表网格 */
.char-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}
.char-grid-item {
  background: var(--bg-card);
  border: 1px solid var(--bd);
  border-radius: var(--r-lg);
  padding: 12px 8px;
  text-align: center;
  box-shadow: var(--sh);
}
.char-grid-item:hover { box-shadow: var(--sh-h); transform: translateY(-1px); }
.char-grid-item .cg-char { font-size: 24px; font-weight: 500; color: var(--tx); display: block; margin-bottom: 4px; }
.char-grid-item .cg-pinyin { font-size: 12px; color: var(--tx-m); display: block; }
.char-grid-item:hover .cg-char { color: var(--pri); }

/* 成语列表 */
.idiom-list-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--bd-lt);
}
.idiom-list-item:last-child { border-bottom: none; }
.idiom-name-box {
  flex-shrink: 0;
  width: 72px;
  text-align: center;
  background: var(--bg-alt);
  border: 1px solid var(--bd);
  border-radius: var(--r);
  padding: 8px 5px;
}
.idiom-name-text { font-size: 15px; font-weight: 600; color: var(--tx); display: block; margin-bottom: 2px; }
.idiom-name-pinyin { font-size: 11px; color: var(--tx-m); display: block; line-height: 1.3; }
.idiom-name-box:hover { background: var(--pri-pale); border-color: var(--pri); text-decoration: none; }
.idiom-name-box:hover .idiom-name-text { color: var(--pri); }
.idiom-list-body { flex: 1; min-width: 0; }
.idiom-list-expl { font-size: 13px; color: var(--tx-m); line-height: 1.7; }

/* 作者列表 */
.author-list-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--bd-lt);
}
.author-list-item:last-child { border-bottom: none; }
.author-list-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pri), var(--pri-lt));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  flex-shrink: 0;
}
.author-list-name { font-size: 15px; font-weight: 600; margin-bottom: 3px; }
.author-list-name a { color: var(--tx); }
.author-list-name a:hover { color: var(--pri); text-decoration: none; }
.author-list-meta { font-size: 12px; color: var(--tx-m); margin-bottom: 5px; }
.author-list-bio { font-size: 13px; color: var(--tx-m); line-height: 1.7; }

/* ═══ 搜索页 ═══ */
.search-result-section { margin-bottom: 28px; }
.result-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--pri-dk);
  letter-spacing: 1px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--bd-lt);
  display: flex;
  align-items: center;
  gap: 7px;
}
.result-section-title::before { content: '◆'; font-size: 9px; color: var(--pri); }
.search-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--tx-m);
}
.search-empty .empty-icon { font-size: 48px; margin-bottom: 14px; }
.search-empty p { font-size: 15px; }

/* ═══ 词牌页 ═══ */
.cipai-intro {
  background: var(--bg-card);
  border: 1px solid var(--bd);
  border-radius: var(--r-xl);
  padding: 28px 32px;
  box-shadow: var(--sh);
  margin-bottom: 20px;
}
.cipai-name { font-size: 28px; font-weight: 600; letter-spacing: 3px; margin-bottom: 8px; }
.cipai-meta-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.cipai-meta-item { font-size: 13px; color: var(--tx-m); }
.cipai-meta-item strong { color: var(--tx); }

/* ═══ 站点地图 ═══ */
.sitemap-section { margin-bottom: 28px; }
.sitemap-section h2 { font-size: 16px; font-weight: 600; margin-bottom: 14px; color: var(--pri-dk); }
.sitemap-links { display: flex; flex-wrap: wrap; gap: 8px; }
.sitemap-link { font-size: 13px; color: var(--tx-m); padding: 3px 0; }
.sitemap-link:hover { color: var(--pri); }

/* ═══ 侧边栏组件 ═══ */
.sidebar-poem-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--bd-lt);
}
.sidebar-poem-item:last-child { border-bottom: none; }
.sidebar-poem-item .sp-title { font-size: 14px; font-weight: 500; margin-bottom: 2px; }
.sidebar-poem-item .sp-title a { color: var(--tx); }
.sidebar-poem-item .sp-title a:hover { color: var(--pri); text-decoration: none; }
.sidebar-poem-item .sp-meta { font-size: 12px; color: var(--tx-m); }

.sidebar-idiom-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--bd-lt);
}
.sidebar-idiom-item:last-child { border-bottom: none; }
.sii-name { font-size: 14px; font-weight: 600; color: var(--tx); flex-shrink: 0; white-space: nowrap; }
.sii-name:hover { color: var(--pri); text-decoration: none; }
.sii-expl { font-size: 12px; color: var(--tx-m); line-height: 1.5; }

/* ─ 相关卡片 ─ */
.related-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}
.related-card {
  padding: 10px 12px;
  border: 1px solid var(--bd);
  border-radius: var(--r);
  background: var(--bg-alt);
}
.related-card:hover { border-color: var(--pri); background: var(--pri-pale); text-decoration: none; }
.related-card .rc-title { font-size: 13px; color: var(--tx); font-weight: 500; }
.related-card:hover .rc-title { color: var(--pri); }
.related-card .rc-meta { font-size: 12px; color: var(--tx-m); margin-top: 2px; }

/* ═══ 底部 ═══ */
.footer {
  background: linear-gradient(135deg, #1a3025, #142818);
  color: rgba(232,223,192,.65);
  text-align: center;
  padding: 28px 20px;
  margin-top: 32px;
  font-size: 13px;
  line-height: 2;
  position: relative;
  z-index: 1;
}
.footer a { color: rgba(232,223,192,.8); }
.footer a:hover { color: #e8dfc0; text-decoration: none; }

/* ═══ 响应式 ═══ */
@media (max-width: 960px) {
  .page-body { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .stats-bar { grid-template-columns: repeat(5, 1fr); }
  .poem-grid { grid-template-columns: 1fr; }
  .author-grid { grid-template-columns: 1fr; }
  .char-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 600px) {
  .header-inner { gap: 10px; }
  .nav a { padding: 5px 9px; font-size: 12px; }
  .logo-sub { display: none; }
  .poem-main, .detail-main { padding: 20px 18px; }
  .poem-body { font-size: 15px; letter-spacing: 1px; }
  .detail-big-name { font-size: 22px; }
  .detail-big-char { font-size: 40px; }
  .stats-bar { grid-template-columns: repeat(3, 1fr); }
  .hero { padding: 22px 18px; }
  .hero-title { font-size: 18px; }
  .char-grid { grid-template-columns: repeat(3, 1fr); }
  .related-grid { grid-template-columns: 1fr; }
}
