:root {
  --paper: #f5f3ec;
  --paper-2: #ecefea;
  --ink: #233139;
  --ink-soft: #5a6670;
  --accent: #2f7d6e;          /* 现代青碧：古典而清新，避免「土老」感 */
  --accent-soft: #3f9685;
  --gold: #c9a24b;
  --line: #dde2da;
  --focus: #2f7d6e;
  --maxw: 1080px;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(35, 49, 57, 0.10);
  /* 字体：思源宋体/黑体（SIL OFL 开源协议，可商用、无版权纠纷）；
     若设备无该字体则回退系统宋体/黑体（系统字体仅引用、不打包，亦无版权问题）。 */
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", "Times New Roman", serif;
  --font-sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, "Helvetica Neue", Arial, sans-serif;
  /* 拼音专用拉丁字体栈：CJK 字体（Noto Sans SC）对 ā（一声平调 macron，U+0101）定位偏右，
     改用拉丁优先字体（Noto Sans / Arial）渲染拼音，声调符号精准居中于字母上方。系统字体仅引用不打包，无版权问题。 */
  --font-latin: "Noto Sans", "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-serif);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: 20px; }

/* 内容页容器：确保页脚不贴底、底部文字不被截断 */
.page-wrap {
  min-height: calc(100dvh - 64px);
  padding: 28px 20px 80px;
}

/* 小屏安全下边距，避免底部工具栏/地址栏遮挡 */
@media (max-width: 640px) {
  .page-wrap { padding-bottom: 100px; }
}

h1, h2, h3 { line-height: 1.3; color: var(--ink); }
a { color: var(--accent); }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: #fff; padding: 8px 14px;
  border-radius: 0 0 8px 0; z-index: 50;
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* 顶栏：跨页固定一致，仅高亮当前页 */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(222, 240, 234, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font-size: 1.4rem; font-weight: 700; text-decoration: none; color: var(--ink); letter-spacing: 2px; }
.brand-sub { color: var(--accent); margin-left: 6px; font-size: 0.9rem; letter-spacing: 1px; }
.site-header nav a { margin-left: 18px; text-decoration: none; color: var(--ink-soft); font-size: 0.98rem; }
.site-header nav a:hover { color: var(--accent); }
.site-header nav a.active { color: var(--accent); font-weight: 700; border-bottom: 2px solid var(--accent); padding-bottom: 4px; }

/* 移动端汉堡按钮：桌面隐藏，窄屏显示 */
.nav-toggle {
  display: none;
  align-items: center; justify-content: center;
  width: 42px; height: 42px; margin-left: auto;
  background: transparent; border: 1px solid transparent; border-radius: 10px;
  color: var(--ink); cursor: pointer; font-size: 1.5rem; line-height: 1;
}
.nav-toggle:hover { background: rgba(47, 125, 110, 0.10); }
.nav-toggle:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* 窄屏（≤640px）：顶栏收成汉堡菜单，主导航变为下拉面板（相对 sticky 顶栏定位，全宽铺满） */
@media (max-width: 640px) {
  .nav-toggle { display: inline-flex; }
  .header-inner { gap: 10px; }
  .site-header nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(222, 240, 234, 0.98);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 10px 24px rgba(35, 49, 57, 0.12);
    padding: 6px 0; display: none;
  }
  .site-header nav.open { display: flex; }
  .site-header nav a {
    margin-left: 0; padding: 13px 20px; font-size: 1.05rem;
    border-bottom: 1px solid rgba(47, 125, 110, 0.08);
  }
  .site-header nav a:last-child { border-bottom: none; }
  .site-header nav a:hover { background: rgba(47, 125, 110, 0.08); }
  .site-header nav a.active {
    border-bottom: 1px solid rgba(47, 125, 110, 0.08);
    background: rgba(47, 125, 110, 0.12); padding-bottom: 13px;
  }
}

/* 按钮 */
.btn {
  display: inline-block; padding: 12px 26px; border-radius: 999px;
  text-decoration: none; font-size: 1rem; font-family: var(--font-serif);
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.12s ease, background 0.2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-soft); }
.btn-ghost { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn-ghost:hover { background: rgba(138, 31, 31, 0.08); }

/* ===== 首页 Hero：青绿意境 · 细雨落水 + 静止水面涟漪（沿用 V1.3 青绿设计，增加雨/水效果） ===== */
.hero {
  position: relative; overflow: hidden;
  min-height: calc(100dvh - 64px);
  display: flex; align-items: center;
  /* 浅青绿（teal-green）基底：更通透的水色渐变 + 双角浅青碧晕光，奠定「浅青绿」主调 */
  background:
    radial-gradient(1000px 560px at 82% -12%, rgba(95,179,163,0.20), transparent 62%),
    radial-gradient(900px 540px at 6% 116%, rgba(63,150,133,0.18), transparent 62%),
    linear-gradient(162deg, #e8f7f2 0%, #cfeae1 55%, #b6dccd 100%);
}
.hero-fx { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
/* 动态景深画布：静止水面 + 稀疏雨滴涟漪 + 手绘垂柳 / 水草 / 荷叶 / 游鱼（assets/app.js 绘制） */
.hero-canvas { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
/* 极简古典短句：缓慢淡入淡出，置于水面上方、玻璃面板之外；深青绿配浅青绿光晕，在青绿背景上清晰不喧宾夺主 */
.hero-phrase {
  position: absolute; left: 0; right: 0; bottom: 15%;
  z-index: 0; text-align: center; pointer-events: none;
  margin: 0; padding: 0 16px;
  font-family: var(--font-serif); font-weight: 600;
  font-size: clamp(1.1rem, 3vw, 1.9rem); letter-spacing: 10px;
  color: #2e6b5e;
  opacity: 0; transition: opacity 2.4s ease;
  text-shadow: 0 1px 18px rgba(220,240,234,0.95), 0 0 32px rgba(220,240,234,0.7);
}
.hero-phrase.show { opacity: 0.6; }
.hero .wrap { position: relative; z-index: 2; }
.hero-glass {
  max-width: 720px; margin: 0 auto; padding: 40px 44px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 22px;
  box-shadow: 0 18px 50px rgba(35, 49, 57, 0.14);
  backdrop-filter: blur(10px);
  text-align: center;
}
.hero-kicker { color: var(--gold); letter-spacing: 3px; margin: 0 0 14px; font-size: 0.95rem; }
.hero h1 {
  font-family: var(--font-serif); font-weight: 700;
  font-size: clamp(2.8rem, 9vw, 5.6rem); letter-spacing: 14px;
  margin: 0 0 16px; color: var(--ink);
}
.hero-sub {
  font-family: var(--font-serif); font-size: clamp(1.1rem, 3vw, 1.7rem);
  color: var(--accent); letter-spacing: 4px; margin: 0 0 20px;
}
.hero-lead { max-width: 600px; margin: 0 auto; font-size: 1.1rem; color: var(--ink-soft); line-height: 1.95; }
.hero-actions { margin-top: 30px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* 全站鼠标「魔法棒」引导线：固定满屏画布，仅作柔光描边，绝不拦截点击（pointer-events:none）。
   尊重 reduced-motion（见下方媒体查询隐藏）；触屏设备由 JS 判定不启用。 */
.cursor-trail {
  position: fixed; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 60;
  opacity: 0.9;
}

/* 首页形象展示条：玻璃质感可点击卡片，图标 + 短句 + 直达链接 */
.intro {
  padding: 72px 0 84px;
  background:
    radial-gradient(900px 420px at 18% 0%, rgba(95,179,163,0.06), transparent 60%),
    linear-gradient(180deg, rgba(63,150,133,0.03), transparent 55%);
}
.intro-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.intro-card {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  min-height: 230px;
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(47,125,110,0.14);
  border-radius: 18px;
  padding: 28px 24px;
  box-shadow: 0 8px 26px rgba(35,49,57,0.06);
  text-decoration: none; color: var(--ink);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.intro-card:hover,
.intro-card:focus-visible {
  transform: translateY(-5px);
  border-color: rgba(47,125,110,0.35);
  box-shadow: 0 18px 40px rgba(47,125,110,0.12);
}
.intro-card .ic {
  width: 46px; height: 46px; display: flex; align-items: center; justify-content: center;
  border-radius: 13px; background: rgba(47,125,110,0.10); color: var(--accent);
  margin-bottom: 2px;
}
.intro-card .ic svg { width: 22px; height: 22px; }
.intro-card h3 {
  margin: 0; color: var(--accent);
  font-family: var(--font-serif); font-size: 1.22rem; letter-spacing: 1px;
}
.intro-card p { margin: 0; color: var(--ink-soft); line-height: 1.85; }
.card-go {
  margin-top: auto; padding-top: 14px; font-size: 0.92rem; color: var(--accent-soft);
  display: inline-flex; align-items: center; gap: 4px;
  transition: gap 0.2s ease;
}
.intro-card:hover .card-go { gap: 8px; }
@media (max-width: 860px) {
  .intro-grid { grid-template-columns: 1fr; }
}

/* 首页精选诗篇：内容前置，直接可读 */
.featured {
  padding: 56px 0 72px;
  background:
    radial-gradient(900px 420px at 82% 0%, rgba(95,179,163,0.06), transparent 60%),
    linear-gradient(180deg, rgba(63,150,133,0.03), transparent 55%);
}
.featured-head {
  text-align: center; margin-bottom: 28px;
}
.featured-head h2 {
  font-family: var(--font-serif); font-size: clamp(1.6rem, 4vw, 2.2rem);
  letter-spacing: 6px; margin: 0 0 8px; color: var(--ink);
}
.featured-head p { color: var(--ink-soft); margin: 0; }
.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}
.featured-grid a {
  display: flex; align-items: center; justify-content: center;
  min-height: 84px; padding: 14px 12px;
  background: rgba(255,255,255,0.80);
  border: 1px solid var(--line); border-radius: 12px;
  text-decoration: none; color: var(--ink);
  font-family: var(--font-serif); font-size: 1.18rem; letter-spacing: 2px;
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}
.featured-grid a:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 10px 24px rgba(35,49,57,0.10);
}
.featured-more {
  text-align: center; margin-top: 28px;
}
.featured-more .btn { padding: 12px 34px; }

/* ===== 全站动态背景层（AmbientFX 画布）与各子页统一青绿底 ===== */
.overview, .search-page, .poem-page {
  background: linear-gradient(180deg, #eaf6f1 0%, #dcefe8 100%);
  position: relative;
}
.ambient-fx { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.ambient-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.ov-hero, .section, .search-head, #poem-root { position: relative; z-index: 1; }

/* ===== 总览页 ===== */
.overview { padding: 8px 20px 64px; }
.ov-hero { padding: 40px 0 12px; }
.ov-hero h1 { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: 6px; margin: 6px 0; }
.ov-lead { color: var(--ink-soft); font-size: 1.05rem; }

.section { padding: 44px 0; }
.section-title {
  font-family: var(--font-serif); font-size: 1.5rem; color: var(--accent);
  margin: 0 0 22px; letter-spacing: 4px;
}
.section-alt { background: rgba(255, 255, 255, 0.32); border-block: 1px solid var(--line); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; margin-bottom: 18px; box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 10px; color: var(--accent); }
.card p { margin: 0 0 12px; color: var(--ink-soft); }
.card p:last-child { margin-bottom: 0; }
.card strong { color: var(--ink); }

.card-feature {
  display: flex; gap: 24px; align-items: center;
}
.card-feature .card-body { flex: 1 1 auto; }
.card-feature .card-figure {
  flex: 0 0 240px; margin: 0; text-align: center;
}
.card-figure svg {
  display: block; width: 100%; height: auto; border-radius: 12px;
  box-shadow: 0 8px 24px rgba(35,49,57,0.08);
}
.card-figure figcaption {
  font-size: 0.78rem; color: var(--ink-soft); margin-top: 8px;
}
.card .source, .time-body .source {
  font-size: 0.85rem; color: #8a9a94; margin-top: 8px;
  border-left: 3px solid var(--gold); padding-left: 8px;
}

.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin: 18px 0; }
.grid-3 .card { margin-bottom: 0; }

/* 总览页时间线 */
.timeline { position: relative; padding-left: 24px; }
.timeline::before {
  content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px;
  width: 2px; background: linear-gradient(to bottom, var(--accent), var(--gold));
}
.timeline-item { position: relative; margin-bottom: 22px; }
.timeline-item:last-child { margin-bottom: 0; }
.time-dot {
  position: absolute; left: -24px; top: 6px;
  width: 14px; height: 14px; border-radius: 50%;
  background: #fff; border: 2px solid var(--accent);
}
.time-body {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow);
}
.time-body h4 { margin: 0 0 8px; color: var(--accent); }
.time-body p { margin: 0 0 10px; color: var(--ink-soft); }
.time-body p:last-child { margin-bottom: 0; }

.ref-list { margin: 0; padding-left: 22px; color: var(--ink-soft); }
.ref-list li { margin-bottom: 6px; }
.card .note {
  margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line);
  font-size: 0.9rem; color: var(--ink-soft);
}

@media (max-width: 680px) {
  .card-feature { flex-direction: column; }
  .card-feature .card-figure { flex: 1 1 auto; max-width: 280px; }
}

/* 检索 */
.search { margin: 18px 0 10px; }
.search input {
  width: 100%; padding: 14px 18px; font-size: 1.05rem;
  border: 1px solid var(--line); border-radius: 999px; background: #fff;
  font-family: var(--font-sans);
}
.search input:focus { outline: 3px solid var(--focus); outline-offset: 1px; }
.result-list { display: grid; gap: 12px; margin-top: 14px; }
.result-item {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 18px; background: #fff; border: 1px solid var(--line);
  border-radius: 10px; text-decoration: none; color: var(--ink);
}
.result-item:hover { border-color: var(--accent); }
.result-item .r-title { font-weight: 700; font-size: 1.1rem; }
.result-item .r-meta { color: var(--ink-soft); font-size: 0.9rem; }
.result-empty { color: var(--ink-soft); padding: 12px 4px; }
.hint { margin-top: 18px; margin-bottom: 24px; color: var(--ink-soft); }
.hint a { margin: 0 4px; }

/* ===== 检索页（独立页面 search.html）：左侧目录 + 右侧卡片 ===== */
.search-page { padding: 36px 20px 64px; }
.search-head { text-align: center; margin-bottom: 22px; }
.search-head h1 { font-family: var(--font-serif); font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: 6px; margin: 0 0 8px; }
.search-head .section-lead { margin: 0 auto 18px; }
.search {
  position: relative; max-width: 560px; margin: 0 auto;
}
.search input {
  width: 100%; padding: 14px 52px 14px 20px; font-size: 1.05rem;
  border: 1px solid var(--line); border-radius: 999px; background: #fff;
  font-family: var(--font-sans); box-shadow: var(--shadow);
}
.search input:focus { outline: 3px solid var(--focus); outline-offset: 1px; }
.search-btn {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%; border: none;
  background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background 0.15s ease;
}
.search-btn:hover { background: var(--accent-soft); }
.filter-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.filter-btn {
  border: 1px solid var(--line); background: #fff; color: var(--ink-soft);
  padding: 8px 20px; border-radius: 999px; cursor: pointer;
  font-family: var(--font-sans); font-size: 0.95rem; transition: all 0.15s ease;
}
.filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.filter-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.result-count { text-align: center; color: var(--ink-soft); margin: 18px 0 4px; font-size: 0.92rem; min-height: 1.2em; }
.result-message { text-align: center; color: var(--accent); margin: 8px 0 0; font-size: 0.95rem; min-height: 1.4em; }
.result-message strong { font-weight: 600; }

.search-layout {
  display: flex; gap: 24px; align-items: flex-start;
}
.search-sidebar {
  flex: 0 0 220px;
  max-height: calc(100dvh - 280px); overflow-y: auto;
  position: sticky; top: 84px;
  background: rgba(255,255,255,0.78);
  border: 1px solid var(--line); border-radius: 14px;
  padding: 18px 16px;
  box-shadow: 0 6px 18px rgba(35,49,57,0.05);
  transition: max-height 0.2s ease;
}
.sidebar-inner { min-width: 0; }
.search-main { flex: 1 1 auto; min-width: 0; }

.search-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.s-item {
  display: flex; flex-direction: column; gap: 3px;
  padding: 12px 14px; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; text-decoration: none; color: var(--ink);
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}
.s-item:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 10px 24px rgba(35,49,57,0.12); }
.s-item .s-title { font-family: var(--font-serif); font-weight: 700; font-size: 1.1rem; letter-spacing: 2px; }
.s-item .s-meta { font-family: var(--font-sans); color: var(--ink-soft); font-size: 0.78rem; }

/* 检索页目录：单列，每行一首 */
.dir-title {
  font-family: var(--font-serif); font-size: 1.15rem; color: var(--accent);
  margin: 0 0 12px; letter-spacing: 3px;
}
.dir-group { margin-bottom: 14px; }
.dir-group:last-child { margin-bottom: 0; }
.dir-group h3 {
  font-family: var(--font-sans); font-size: 0.86rem; color: var(--ink-soft);
  margin: 0 0 6px; font-weight: 600;
}
.dir-list { list-style: none; margin: 0; padding: 0; }
.dir-list li { margin: 0; }
.dir-list a {
  display: block;
  font-family: var(--font-serif); font-size: 0.98rem; color: var(--ink);
  text-decoration: none; padding: 5px 8px; border-radius: 6px;
  transition: background 0.12s ease, color 0.12s ease;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dir-list a:hover { background: rgba(47,125,110,0.10); color: var(--accent); }

@media (max-width: 760px) {
  .search-layout { flex-direction: column; }
  .search-sidebar {
    position: relative; top: auto; flex: 1 1 auto; width: 100%; max-height: 240px;
  }
}

/* 版权：使用边界高亮徽章（保留，非错误；文字改白色加阴影确保可读） */
.license-badge {
  display: inline-block; background: var(--accent-soft); color: #fff !important;
  padding: 6px 16px; border-radius: 999px; font-weight: 700;
  letter-spacing: 1px; margin: 10px 0;
  text-shadow: 0 1px 2px rgba(0,0,0,0.25);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.15), 0 2px 6px rgba(47,125,110,0.18);
}
.license p { color: var(--ink-soft); }
.license strong { color: var(--ink); }

/* ===== 诗篇详情页：原文译文逐行左右对照，诗文解析下沉（V1.14） ===== */
.poem-page { min-height: calc(100dvh - 64px); padding: 28px 16px 64px; }
#poem-root {
  max-width: 1080px; margin: 0 auto;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.55); border-radius: 18px;
  padding: 30px 28px 36px; box-shadow: 0 12px 40px rgba(40, 30, 15, 0.12);
}
.loading { color: var(--ink-soft); }
.back-link { display: inline-block; margin-bottom: 18px; color: var(--ink-soft); text-decoration: none; font-family: var(--font-sans); }
.back-link:hover { color: var(--accent); }

.poem-head { text-align: center; padding-bottom: 18px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.poem-title { font-size: clamp(2.2rem, 6vw, 3.4rem); margin: 0; letter-spacing: 8px; }
.poem-pinyin { color: var(--gold); font-family: var(--font-latin); font-style: normal; margin: 10px 0 6px; word-spacing: 0.45em; font-size: 1.05rem; }
.poem-cat { color: var(--ink-soft); font-family: var(--font-sans); margin: 10px 0 0; letter-spacing: 1px; font-size: 0.95rem; }

.poem-section { margin-bottom: 34px; }
.poem-main { margin-bottom: 34px; }
.poem-row {
  display: grid;
  grid-template-columns: 1fr 1.12fr;
  gap: 28px;
  align-items: end;
  margin-bottom: 16px;
}
.poem-row-head { margin-bottom: 18px; }
.poem-row-head .section-tag { margin-bottom: 0; }
.poem-row-head .section-tag::after { display: none; }
.poem-line { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.1em; }
.poem-trans {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  line-height: 1.45;
  color: var(--ink);
  padding-top: 0.15em;
}
.poem-trans:empty { min-height: 1.2em; }
@media (max-width: 860px) {
  .poem-row { grid-template-columns: 1fr; gap: 6px; margin-bottom: 26px; }
  .poem-trans { padding-top: 0; font-size: 1.35rem; }
}
@media (max-width: 480px) {
  .poem-trans { font-size: 1.25rem; }
}
.section-tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-serif); font-size: 1.12rem; color: var(--accent);
  border-left: 4px solid var(--gold); padding-left: 10px; margin: 0 0 16px;
}
.section-tag::after {
  content: ""; display: block; width: 40px; height: 1px; background: var(--line); flex: 1;
}

/* 原文带注音：上下两半固定宽度，使后半句垂直对齐 */
.verse .line { display: flex; flex-wrap: nowrap; align-items: flex-end; gap: 0.6em; margin: 0 0 16px; }
.half { display: inline-flex; flex-wrap: nowrap; align-items: flex-end; }
.half-left { min-width: 8.2em; justify-content: flex-start; }
.half-right { flex: 0 0 auto; }
.pair { display: inline-flex; flex-direction: column; align-items: center; width: 1.85em; padding-top: 0.15em; }
.pair .py {
  font-family: var(--font-latin); font-size: 0.72rem; color: var(--gold);
  line-height: 1.1; margin-bottom: 3px; font-weight: 500;
  width: 100%; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pair .han { font-family: var(--font-serif); font-size: 1.55rem; line-height: 1.2; color: var(--ink); }
.punct { align-self: flex-end; font-family: var(--font-serif); font-size: 1.55rem; padding: 0 2px; color: var(--ink); width: 0.55em; text-align: center; }
@media (max-width: 480px) {
  .pair { width: 1.55em; }
  .half-left { min-width: 6.9em; }
  .pair .py { font-size: 0.64rem; }
  .pair .han, .punct { font-size: 1.35rem; }
}

/* 译文：通俗轻盈，入口友好 */
.translate-card {
  background: rgba(250, 246, 235, 0.86);
  border-left: 4px solid var(--gold);
  border-radius: 0 12px 12px 0;
  padding: 18px 22px;
}
.translate-card p { margin: 0 0 10px; color: var(--ink); line-height: 2; font-size: 1.05rem; }
.translate-card p:last-child { margin-bottom: 0; }

/* 诗文解析：学术扎实，分区明确 */
.explain-card {
  background: rgba(244, 248, 246, 0.92);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 22px;
}
.explain-text p { margin: 0 0 12px; color: var(--ink-soft); line-height: 1.9; }
.explain-text p:last-child { margin-bottom: 0; }
.analysis-h {
  font-family: var(--font-serif); font-size: 1.05rem; color: var(--accent);
  margin: 18px 0 8px; border-left: 3px solid var(--gold); padding-left: 9px;
}
.analysis-h:first-child { margin-top: 0; }

/* 音视频 */
.media-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.media-box h4 { margin: 0 0 10px; color: var(--ink-soft); font-size: 0.95rem; font-weight: 600; font-family: var(--font-sans); }
.media-box audio, .media-box video { width: 100%; border-radius: 8px; }
.media-note { color: var(--ink-soft); font-size: 0.85rem; margin: 8px 0 0; }

/* 下载 */
.download-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.dl-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: #fff; border: none;
  padding: 12px 22px; border-radius: 999px; font-size: 1rem;
  cursor: pointer; font-family: var(--font-sans);
}
.dl-btn:hover { background: var(--accent-soft); }
.dl-locked { background: var(--gold); }
.dl-locked:hover { background: #836426; }

/* 音视频 */
.media-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.media-box h4 { margin: 0 0 10px; color: var(--ink-soft); font-size: 0.95rem; font-weight: 600; font-family: var(--font-sans); }
.media-box audio, .media-box video { width: 100%; border-radius: 8px; }
.media-note { color: var(--ink-soft); font-size: 0.85rem; margin: 8px 0 0; }

/* 下载 */
.download-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.dl-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: #fff; border: none;
  padding: 12px 22px; border-radius: 999px; font-size: 1rem;
  cursor: pointer; font-family: var(--font-sans);
}
.dl-btn:hover { background: var(--accent-soft); }
.dl-locked { background: var(--gold); }
.dl-locked:hover { background: #836426; }

/* 弹窗 */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(20, 14, 6, 0.55); }
.modal-dialog {
  position: relative; background: var(--paper); border-radius: 16px;
  max-width: 460px; width: 100%; padding: 26px 26px 30px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); max-height: 90vh; overflow: auto;
}
.modal-dialog h2 { margin: 0 0 8px; color: var(--accent); }
.modal-lead { color: var(--ink-soft); margin: 0 0 14px; }
.modal-close {
  position: absolute; top: 12px; right: 14px; background: none; border: none;
  font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--ink-soft);
}
.modal-close:hover { color: var(--accent); }
.modal-actions { display: flex; justify-content: center; margin-top: 18px; }
.pay-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0; }
.pay-method { border: 1px solid var(--line); border-radius: 10px; padding: 14px; text-align: center; background: #fff; }
.pay-name { margin: 0; font-weight: 700; color: var(--accent); }
.pay-note { font-weight: 400; font-size: 0.78rem; color: var(--ink-soft); margin: 4px 0 0; }
.paywall-lead { margin: 0 0 16px; }
.paywall-section { margin: 16px 0; padding: 14px; background: rgba(47,125,110,0.04); border: 1px solid var(--line); border-radius: 12px; }
.paywall-section-title { margin: 0 0 8px; color: var(--accent); font-size: 1.05rem; }
.paywall-section-desc { margin: 0; font-size: 0.92rem; color: var(--ink-soft); line-height: 1.7; }
.paywall-section-desc a { color: var(--accent); text-decoration: underline; }
.paywall-commercial { background: rgba(201,162,75,0.06); border-color: rgba(201,162,75,0.25); }
.paywall-commercial .paywall-section-title { color: #836426; }
.agreement { font-size: 0.92rem; color: var(--ink-soft); }
.agreement strong { color: var(--accent); }
.redeem { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 14px; }
.redeem label { display: block; font-size: 0.9rem; color: var(--ink-soft); margin-bottom: 6px; font-family: var(--font-sans); }
.redeem-row { display: flex; gap: 8px; }
.redeem-row input { flex: 1; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; font-family: var(--font-sans); }
.redeem-msg { font-size: 0.9rem; margin: 8px 0 0; min-height: 1.2em; }
.redeem-msg.ok { color: #2e7d32; }
.redeem-msg.err { color: var(--accent); }
.unlocked { margin-top: 16px; }
.ok { color: #2e7d32; font-weight: 700; }
.download-links { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.download-links a { background: var(--accent); color: #fff; text-decoration: none; padding: 10px 16px; border-radius: 8px; text-align: center; cursor: pointer; }
.download-links a:hover { background: var(--accent-soft); }


/* 页脚：浅青绿渐变 + 顶部水波分隔，与首页青绿体系统一 */
.site-footer {
  position: relative;
  background: linear-gradient(180deg, #f0f7f4 0%, #e6f0ec 100%);
  color: var(--ink-soft);
  padding: 56px 0 72px;
  border-top: 1px solid rgba(47,125,110,0.10);
}
.site-footer::before {
  content: "";
  position: absolute; top: -40px; left: 0; right: 0; height: 40px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 40' preserveAspectRatio='none'%3E%3Cpath fill='%23f5f3ec' d='M0,40 L0,18 Q360,-2 720,18 T1440,18 L1440,40 Z'/%3E%3C/svg%3E") center top / 100% 100% no-repeat;
}
.site-footer .wrap { position: relative; z-index: 1; }
.footer-top {
  display: flex; justify-content: space-between; align-items: center;
  gap: 20px; flex-wrap: wrap; margin-bottom: 18px;
}
.footer-brand {
  font-family: var(--font-serif); font-weight: 700; font-size: 1.25rem;
  color: var(--ink); text-decoration: none; letter-spacing: 2px;
}
.footer-brand span { color: var(--accent); margin-left: 6px; font-size: 0.95rem; letter-spacing: 1px; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { color: var(--ink-soft); text-decoration: none; font-size: 0.95rem; }
.footer-links a:hover { color: var(--accent); }
.footer-copy { margin: 0 0 12px; color: var(--ink); font-weight: 500; }
.footer-sub { margin: 6px 0 0; color: #8a9a94; font-size: 0.86rem; }

/* 响应式 */
@media (max-width: 860px) {
  .poem-grid { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 560px) {
  .header-inner { height: 56px; }
  .hero h1 { letter-spacing: 6px; }
  .hero-glass { padding: 28px 20px; border-radius: 18px; }
  .hero-lead { font-size: 1rem; }
  .featured-grid { grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 10px; }
  .featured-grid a { font-size: 1.05rem; min-height: 72px; }
  .pay-methods { grid-template-columns: 1fr; }
  .pair .han, .punct { font-size: 1.35rem; }
  .poem-title { letter-spacing: 4px; }
  .poem-page { padding: 20px 12px 48px; }
  #poem-root { padding: 22px 16px 28px; }
}

/* 尊重无障碍偏好：关闭所有动态，仅保留静止的水墨画面 + 一句静态短句 */
@media (prefers-reduced-motion: reduce) {
  .hero-phrase { transition: none; opacity: 0.5; }
  /* canvas 由 JS 检测 reduced-motion 后仅静态绘制一帧，不隐藏 */
  .cursor-trail { display: none; }
  html { scroll-behavior: auto; }
}

/* 歌曲 · 听歌学诗（V1.23 新增） */
.poem-songs .songs-lead { color: var(--ink-soft); font-size: 0.9rem; margin: 6px 0 16px; }
.song-list { display: grid; gap: 14px; }
.song-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.song-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.song-title { margin: 0; font-size: 1.02rem; font-weight: 600; color: var(--ink); font-family: var(--font-sans); }
.song-dur { font-size: 0.82rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.song-card audio { width: 100%; border-radius: 8px; }
.song-note { color: var(--ink-soft); font-size: 0.85rem; margin: 8px 0 0; line-height: 1.6; }
.lic-badge { display: inline-block; font-size: 0.72rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; line-height: 1.6; }
.lic-available { background: rgba(47,125,110,0.12); color: var(--accent); border: 1px solid rgba(47,125,110,0.3); }
.lic-contact { background: rgba(201,162,75,0.14); color: #9a7320; border: 1px solid rgba(201,162,75,0.4); }
.lic-none { background: #f0f0ee; color: #8a9a94; border: 1px solid #e1e1dd; }
