@charset "utf-8";
/* ==========================================================================
   《东坡的书童》全站样式
   宋韵 · 留白 · 纸感 · 墨色 · 一点朱色
   ========================================================================== */

:root {
  --paper: #f5f1e8;
  --paper-2: #efe9dc;
  --paper-3: #e8e1d1;
  --ink: #2b2b2b;
  --ink-2: #4a4438;
  --ink-3: #5f5646;
  --line: #d8cfba;
  --line-2: #c9bfa8;
  --zhu: #b5542a;
  --jin: #a3833d;
  --dai: #4a7b7c;

  --kai: "Kaiti SC", KaiTi, STKaiti, "Songti SC", "Noto Serif SC", serif;
  --serif: "Noto Serif SC", "Source Han Serif SC", "Source Han Serif CN",
    "Songti SC", SimSun, "Times New Roman", serif;

  --nav-h: 60px;
  --measure: 1080px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  /* ---- 纸与墨：层次用的补充色，不改动上面既有色值 ---- */
  --paper-card: #fdfaf3; /* 叠加在纸上的「纸片」 */
  --paper-warm: #fbf6ea; /* 暖光区 */
  --paper-edge: rgba(122, 101, 68, 0.09); /* 纸边暗部 */
  --ink-4: #8a806c; /* 更弱的字色 */
  --zhu-soft: rgba(181, 84, 42, 0.12);
  --jin-soft: rgba(163, 131, 61, 0.14);

  /* ---- 投影：纸片浮起的三级 ---- */
  --sh-1: 0 1px 2px rgba(90, 72, 46, 0.05), 0 4px 12px -8px rgba(90, 72, 46, 0.18);
  --sh-2: 0 2px 4px rgba(90, 72, 46, 0.06), 0 14px 28px -18px rgba(90, 72, 46, 0.28);
  --sh-3: 0 4px 8px rgba(90, 72, 46, 0.08), 0 26px 48px -26px rgba(90, 72, 46, 0.36);

  /* ---- 竖向节奏 ---- */
  --gap-s: clamp(12px, 1.6vw, 18px);
  --gap-m: clamp(22px, 3vw, 34px);
  --gap-l: clamp(40px, 6vw, 72px);

  /* ---- 知识图谱：关系语义色（统一到纸墨朱金黛体系） ---- */
  --rel-family: #b5542a;   /* 亲属 · 朱砂 */
  --rel-friend: #8a5a3b;   /* 挚友 · 赭 */
  --rel-mentor: #4a4438;   /* 师友 · 墨 */
  --rel-disciple: #a3833d; /* 门生/同门 · 金赭 */
  --rel-monk: #4a7b7c;     /* 僧道 · 黛青 */
  --rel-peer: #8a806c;     /* 同年 · 淡墨 */
  --rel-rival: #6b6152;    /* 相左 · 灰墨 */
  --rel-bond: #7a6a52;     /* 患难/其他 · 褐 */

  /* ---- 图谱头像：统一规格 ---- */
  --avatar-size: 30px;
  --avatar-center: 58px;
  --avatar-ring: 2px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* 纸纹：四层叠加 —— 颗粒、帘纹、纤维、斑驳。
   全部用 CSS 渐变与内联 SVG 生成，不请求任何外部图片。 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    /* 1 纸纤维颗粒（内联 SVG 噪声，无外部请求） */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E"),
    /* 2 帘纹：手工纸的细横纹 */
      repeating-linear-gradient(
        0deg,
        rgba(120, 100, 70, 0.026) 0 1px,
        transparent 1px 4px
      ),
    /* 3 纤维：极细纵纹 */
      repeating-linear-gradient(
        90deg,
        rgba(140, 118, 84, 0.014) 0 1px,
        transparent 1px 7px
      ),
    /* 4 斑驳：两处不对称的浅渍 */
      radial-gradient(
        circle at 16% 9%,
        rgba(168, 145, 105, 0.075),
        transparent 40%
      ),
    radial-gradient(
      circle at 84% 82%,
      rgba(146, 132, 104, 0.06),
      transparent 44%
    );
  background-size: 200px 200px, auto, auto, auto, auto;
}

/* 光：顶部天光 + 右下冷调 + 四周极轻的暗角，让纸面有受光的层次 */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(
      120% 70% at 50% -12%,
      rgba(255, 251, 240, 0.85),
      transparent 58%
    ),
    radial-gradient(
      80% 55% at 102% 96%,
      rgba(74, 123, 124, 0.055),
      transparent 62%
    ),
    radial-gradient(
      110% 110% at 50% 45%,
      transparent 58%,
      rgba(116, 96, 64, 0.055) 100%
    );
}

body > * {
  position: relative;
  z-index: 1;
}

[hidden] {
  display: none !important;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: rgba(181, 84, 42, 0.16);
}

:focus-visible {
  outline: 2px solid var(--zhu);
  outline-offset: 3px;
}

/* ------------------------------------------------------------------ 导航 */

.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 clamp(16px, 4vw, 40px);
  background: rgba(245, 241, 232, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav__brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--kai);
  font-size: 19px;
  letter-spacing: 0.14em;
  white-space: nowrap;
}

.nav__brand small {
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0.24em;
  color: var(--ink-3);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2.2vw, 30px);
  margin-left: auto;
}

.nav__link {
  position: relative;
  padding: 6px 2px;
  font-size: 14px;
  letter-spacing: 0.16em;
  color: var(--ink-2);
  transition: color 0.3s var(--ease);
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1.5px;
  background: var(--zhu);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.34s var(--ease);
}

.nav__link:hover {
  color: var(--ink);
}

.nav__link:hover::after,
.nav__link[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav__link[aria-current="page"] {
  color: var(--zhu);
}

.nav__link--soon::before {
  content: "即将";
  margin-right: 5px;
  padding: 1px 4px;
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  border: 1px solid var(--line-2);
  border-radius: 2px;
  vertical-align: 1px;
}

/* 导航右侧操作区：分享 + 目录 */
.nav__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav__share {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--zhu);
  background: rgba(181, 84, 42, 0.06);
  border: 1px solid var(--zhu);
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.nav__share svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}
.nav__share:hover,
.nav__share.is-done {
  background: var(--zhu);
  color: #fff;
}

.share-tip {
  position: absolute;
  top: calc(var(--nav-h) - 4px);
  right: 14px;
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: var(--paper-card);
  border: 1px solid var(--zhu);
  border-radius: 2px;
  box-shadow: var(--sh-2);
  font-size: 12px;
  color: var(--ink-2);
}
.share-tip input {
  width: min(46vw, 320px);
  padding: 3px 6px;
  font-family: var(--serif);
  font-size: 11px;
  color: var(--ink-2);
  background: var(--paper);
  border: 1px solid var(--line);
}

/* 分享方式菜单 */
.share-menu {
  position: absolute;
  top: calc(var(--nav-h) - 4px);
  right: 14px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  min-width: 216px;
  padding: 6px;
  background: var(--paper-card);
  border: 1px solid var(--line-2);
  border-radius: 3px;
  box-shadow: var(--sh-2);
}
.share-menu button {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 12px;
  text-align: left;
  background: none;
  border: 0;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.2s var(--ease);
}
.share-menu button:hover { background: var(--zhu-soft); }
.share-menu b { font-family: var(--kai); font-size: 14px; font-weight: 400; color: var(--ink); }
.share-menu small { font-size: 11px; color: var(--ink-4); }

/* 图片分享弹窗 */
body.share-open { overflow: hidden; }
.share-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(30, 26, 20, 0.62);
}
.share-modal__panel {
  width: min(860px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  padding: 20px 22px;
  background: var(--paper);
  border: 1px solid var(--line-2);
  box-shadow: var(--sh-3);
}
.share-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.share-modal__head b { font-family: var(--kai); font-size: 18px; font-weight: 400; }
.share-modal__close {
  width: 30px; height: 30px;
  font-size: 20px; line-height: 1;
  background: none; border: 1px solid var(--line-2); cursor: pointer;
  color: var(--ink-2);
}
.share-modal__close:hover { color: var(--zhu); border-color: var(--zhu); }
.share-modal__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.share-thumb {
  position: relative;
  padding: 0;
  border: 2px solid transparent;
  background: none;
  cursor: pointer;
  overflow: hidden;
}
.share-thumb img { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.share-thumb span {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 3px 6px; font-size: 11px; font-family: var(--kai);
  color: #fff; background: rgba(30, 26, 20, 0.55);
}
.share-thumb.is-active { border-color: var(--zhu); }
/* 分享图模式选择 */
.share-modal__modes {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}
.share-mode {
  flex: 1;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.share-mode:has(input:checked) {
  border-color: var(--zhu);
  background: var(--zhu-soft);
}
.share-mode input { margin-top: 3px; accent-color: var(--zhu); }
.share-mode span { display: flex; flex-direction: column; gap: 2px; }
.share-mode b { font-family: var(--kai); font-size: 13px; font-weight: 400; color: var(--ink); }
.share-mode small { font-size: 10.5px; color: var(--ink-4); }

.share-modal__preview canvas {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--line);
}
.share-modal__foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-top: 14px;
}
.share-modal__note { font-size: 11px; color: var(--ink-4); }
.share-modal__dl {
  padding: 9px 20px;
  font-family: var(--serif); font-size: 13px; letter-spacing: 0.1em;
  color: #fff; background: var(--zhu); border: 0; border-radius: 2px; cursor: pointer;
}
.share-modal__dl:hover { background: var(--zhu); filter: brightness(0.92); }

@media (max-width: 760px) {
  .share-modal__grid { grid-template-columns: repeat(3, 1fr); }
  .share-modal__foot { flex-direction: column; align-items: stretch; }
}

.nav__toggle {
  display: none;
  margin-left: 0;
  padding: 8px 12px;
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--ink-2);
  background: none;
  border: 1px solid var(--line-2);
  border-radius: 2px;
  cursor: pointer;
}

/* ------------------------------------------------------------------ 页脚 */

.footer {
  margin-top: clamp(72px, 12vh, 140px);
  padding: 46px 24px 54px;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--ink-3);
}

.footer__ci {
  font-family: var(--kai);
  font-size: 17px;
  letter-spacing: 0.3em;
  color: var(--ink-2);
}

.footer__rule {
  width: 46px;
  height: 1px;
  margin: 16px auto;
  background: var(--line-2);
}

.footer p {
  margin: 6px 0;
  font-size: 12px;
  line-height: 1.9;
  letter-spacing: 0.04em;
}

.footer a {
  border-bottom: 1px solid var(--line-2);
  padding-bottom: 1px;
}

.footer a:hover {
  color: var(--zhu);
  border-color: var(--zhu);
}

/* ------------------------------------------------------------------ 通用排版 */

.wrap {
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 40px);
}

.page-head {
  padding: clamp(46px, 9vh, 86px) 0 clamp(28px, 4vh, 44px);
}

.page-head__eyebrow {
  font-size: 11px;
  letter-spacing: 0.42em;
  color: var(--ink-3);
  text-transform: uppercase;
}

.page-head h1 {
  margin: 14px 0 0;
  font-family: var(--kai);
  font-size: clamp(30px, 4.6vw, 44px);
  font-weight: 400;
  letter-spacing: 0.16em;
  line-height: 1.4;
}

.page-head__lead {
  max-width: 46em;
  margin: 18px 0 0;
  color: var(--ink-3);
  font-size: 15px;
  line-height: 2.05;
}

.rule {
  height: 1px;
  margin: 0;
  border: 0;
  background: linear-gradient(90deg, var(--line-2), transparent);
}

/* 书童口吻的引子 */
.voice {
  font-family: var(--kai);
  font-size: 15px;
  line-height: 2.1;
  color: var(--ink-3);
  letter-spacing: 0.06em;
}

.voice::before {
  content: "书童说 · ";
  font-size: 11px;
  letter-spacing: 0.24em;
  color: var(--jin);
}

/* ------------------------------------------------------------------ 首页 */

.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8vh clamp(20px, 6vw, 60px) 12vh;
  overflow: hidden;
  text-align: center;
}

.hero__mountains {
  position: absolute;
  inset: auto 0 0;
  width: 100%;
  height: 62%;
  opacity: 0.5;
  pointer-events: none;
}

.hero__mountains figcaption {
  position: absolute;
  right: 18px;
  bottom: 8px;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--ink-3);
  opacity: 0.5;
}

.hero__verse {
  position: relative;
  z-index: 2;
  margin: 0;
  font-family: var(--kai);
  font-size: clamp(28px, 5.2vw, 56px);
  font-weight: 400;
  line-height: 2.05;
  letter-spacing: 0.13em;
  color: var(--ink);
  text-wrap: balance;
}

.hero__verse em {
  font-style: normal;
  color: var(--zhu);
  opacity: 0.86;
}

.hero__sub {
  position: relative;
  z-index: 2;
  margin: 30px 0 0;
  font-family: var(--kai);
  font-size: clamp(12px, 1.3vw, 14px);
  line-height: 2.2;
  letter-spacing: 0.26em;
  color: var(--ink-3);
  max-width: 30em;
}

.hero__down {
  position: absolute;
  left: 50%;
  bottom: clamp(26px, 5vh, 46px);
  z-index: 2;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  letter-spacing: 0.4em;
  color: var(--ink-3);
}

.hero__down span {
  display: block;
  width: 1px;
  height: 34px;
  background: linear-gradient(var(--line-2), transparent);
  animation: drip 2.6s var(--ease) infinite;
}

@keyframes drip {
  0%,
  100% {
    opacity: 0.25;
    transform: scaleY(0.55);
    transform-origin: top;
  }
  50% {
    opacity: 0.85;
    transform: scaleY(1);
    transform-origin: top;
  }
}

/* 四板块印章入口 */
.seals {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(12px, 1.8vw, 22px);
  margin: clamp(40px, 8vh, 90px) 0 0;
  padding: 0;
  list-style: none;
}

.seal {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: clamp(26px, 3.6vw, 40px) clamp(10px, 1.6vw, 18px)
    clamp(22px, 3vw, 34px);
  background: linear-gradient(160deg, rgba(255, 253, 247, 0.7), rgba(233, 226, 210, 0.42));
  border: 1px solid var(--line);
  transition: transform 0.42s var(--ease), border-color 0.42s var(--ease),
    box-shadow 0.42s var(--ease);
}

.seal::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid transparent;
  transition: border-color 0.42s var(--ease);
  pointer-events: none;
}

.seal:hover {
  transform: translateY(-5px);
  border-color: rgba(181, 84, 42, 0.5);
  box-shadow: 0 16px 34px -22px rgba(70, 55, 35, 0.6);
}

.seal:hover::after {
  border-color: rgba(181, 84, 42, 0.18);
}

.seal__mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  font-family: var(--kai);
  font-size: 21px;
  color: var(--zhu);
  border: 1.5px solid rgba(181, 84, 42, 0.55);
  border-radius: 3px;
  letter-spacing: 0;
}

.seal__name {
  font-family: var(--kai);
  font-size: clamp(17px, 1.9vw, 21px);
  letter-spacing: 0.24em;
  color: var(--ink);
}

.seal__note {
  font-size: 12px;
  line-height: 1.85;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  text-align: center;
}

.seal--soon .seal__mark {
  color: var(--ink-3);
  border-color: var(--line-2);
}

.seal--soon .seal__name {
  color: var(--ink-2);
}

.seal__badge {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--ink-3);
  border: 1px solid var(--line-2);
  padding: 2px 5px;
}

.home-note {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 40px;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: clamp(52px, 9vh, 96px);
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
}

.home-note b {
  font-family: var(--kai);
  font-size: 15px;
  font-weight: 400;
  color: var(--ink-2);
  letter-spacing: 0.12em;
}

/* 首页 · 东坡日记入口：横条，与印章入口区分开 */
.zilin-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 34px;
  margin: clamp(34px, 6vh, 64px) 0 0;
  padding: clamp(22px, 3vw, 30px) clamp(20px, 3vw, 34px);
  background: linear-gradient(120deg, rgba(255, 253, 247, 0.72), rgba(232, 225, 209, 0.4));
  border: 1px solid var(--line);
  border-left: 2px solid var(--dai);
  transition: border-color 0.4s var(--ease), box-shadow 0.4s var(--ease),
    transform 0.4s var(--ease);
}

.zilin-band:hover {
  transform: translateY(-3px);
  border-color: rgba(74, 123, 124, 0.48);
  box-shadow: 0 16px 34px -24px rgba(70, 55, 35, 0.55);
}

.zilin-band__eyebrow {
  display: block;
  font-size: 10.5px;
  letter-spacing: 0.28em;
  color: var(--dai);
}

.zilin-band h2 {
  margin: 8px 0 0;
  font-family: var(--kai);
  font-size: clamp(22px, 2.8vw, 27px);
  font-weight: 400;
  letter-spacing: 0.18em;
  color: var(--ink);
}

.zilin-band__text p {
  max-width: 46em;
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.95;
  color: var(--ink-3);
}

.zilin-band__meta {
  display: flex;
  align-items: baseline;
  gap: 16px;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  white-space: nowrap;
}

.zilin-band__meta b {
  font-family: var(--kai);
  font-size: 19px;
  font-weight: 400;
  color: var(--ink-2);
  margin-right: 3px;
}

.zilin-band__go {
  color: var(--zhu);
  letter-spacing: 0.12em;
}

.zilin-band__go i {
  font-style: normal;
  display: inline-block;
  transition: transform 0.34s var(--ease);
}

.zilin-band:hover .zilin-band__go i {
  transform: translateX(5px);
}

/* ------------------------------------------------------------------ 子页签 */

.subtabs {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 247, 0.5);
}

.subtab {
  padding: 7px 18px;
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.16em;
  color: var(--ink-3);
  background: none;
  border: 0;
  cursor: pointer;
  transition: color 0.3s var(--ease), background 0.3s var(--ease);
}

.subtab[aria-selected="true"] {
  color: var(--paper);
  background: var(--ink-2);
}

.subtab:hover:not([aria-selected="true"]) {
  color: var(--ink);
}

/* ------------------------------------------------------------------ 画轴 */

.scroll-view {
  position: relative;
  margin-top: 26px;
}

.axis {
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 44px 26px;
  scrollbar-width: thin;
  cursor: grab;
  -webkit-overflow-scrolling: touch;
}

.axis.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}

.axis__roll {
  position: relative;
  min-width: 100%;
  height: 360px;
}

.axis__paper {
  position: absolute;
  inset: 8px 0 26px;
  background: linear-gradient(180deg, #fbf8f0, #f2ece0 60%, #eee7d8);
  border-top: 1px solid var(--line-2);
  border-bottom: 1px solid var(--line-2);
  box-shadow: inset 0 0 42px rgba(150, 130, 95, 0.14);
}

/* 上下轴杆：竖向受光的圆木轴，两端略暗 */
.axis__paper::before,
.axis__paper::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 8px;
  background: linear-gradient(
    180deg,
    #e0d3b4 0%,
    #c9b48d 38%,
    #a68e64 72%,
    #8d7550 100%
  );
  opacity: 0.9;
  box-shadow: 0 1px 4px rgba(90, 72, 46, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.axis__paper::before {
  top: -8px;
  border-radius: 3px 3px 0 0;
}

.axis__paper::after {
  bottom: -8px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(
    0deg,
    #e0d3b4 0%,
    #c9b48d 38%,
    #a68e64 72%,
    #8d7550 100%
  );
}

.axis__line {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.axis__node {
  position: absolute;
  transform: translate(-50%, 0);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: var(--ink-2);
  font-family: var(--serif);
}

.axis__dot {
  display: grid;
  place-items: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--paper);
  border: 1.5px solid var(--ink-3);
  transition: all 0.34s var(--ease);
}

.axis__node--south .axis__dot {
  border-color: var(--zhu);
  background: rgba(181, 84, 42, 0.12);
}

.axis__node[aria-current="true"] .axis__dot {
  background: var(--zhu);
  border-color: var(--zhu);
  box-shadow: 0 0 0 5px rgba(181, 84, 42, 0.16);
}

.axis__node:hover .axis__dot {
  border-color: var(--zhu);
}

.axis__label {
  font-size: 12px;
  letter-spacing: 0.1em;
  white-space: nowrap;
  writing-mode: vertical-rl;
  max-height: 86px;
  color: var(--ink-2);
}

.axis__year {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  opacity: 0.72;
  font-variant-numeric: tabular-nums;
}

.axis__node--above .axis__label {
  order: -1;
}

/* 卷首卷尾 */
.axis__cap {
  position: sticky;
  left: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0 0;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--ink-3);
}

.axis__hint {
  margin: 0 0 0 44px;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ink-3);
}

/* ------------------------------------------------------------------ 地图 */

.map-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: clamp(16px, 2.4vw, 30px);
  align-items: start;
  margin-top: 22px;
}

.map-panel {
  padding: 22px 22px 24px;
  background: rgba(255, 253, 247, 0.62);
  border: 1px solid var(--line);
}

.map-panel__year {
  font-family: var(--kai);
  font-size: 34px;
  line-height: 1.1;
  letter-spacing: 0.06em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.map-panel__meta {
  margin-top: 4px;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
}

.map-panel h2 {
  margin: 20px 0 6px;
  font-family: var(--kai);
  font-size: 24px;
  font-weight: 400;
  letter-spacing: 0.14em;
}

.map-panel h2 span {
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  margin-left: 8px;
}

.map-panel__event {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 2;
  color: var(--ink-2);
  text-align: justify;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
  padding: 0;
  list-style: none;
}

.chip {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  padding: 2px 8px;
  border: 1px solid var(--line);
  background: rgba(245, 241, 232, 0.8);
  white-space: nowrap;
}

.chip--zhu {
  color: var(--zhu);
  border-color: rgba(181, 84, 42, 0.34);
}

.map-panel__stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin-top: 20px;
  border: 1px solid var(--line);
  background: var(--line);
}

.map-panel__stats div {
  padding: 9px 10px;
  background: rgba(250, 247, 240, 0.9);
}

.map-panel__stats b {
  display: block;
  font-family: var(--kai);
  font-size: 19px;
  font-weight: 400;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.map-panel__stats small {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--ink-3);
}

.map-panel__works {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed var(--line-2);
}

.map-panel__works h3 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.22em;
  color: var(--ink-3);
}

.map-panel__works ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.map-panel__works li {
  padding: 3px 0;
  font-size: 13px;
}

.map-panel__works a {
  color: var(--ink-2);
  border-bottom: 1px solid transparent;
}

.map-panel__works a:hover {
  color: var(--zhu);
  border-color: rgba(181, 84, 42, 0.4);
}

.map-stage {
  position: relative;
  background: rgba(255, 253, 247, 0.4);
  border: 1px solid var(--line);
  overflow: hidden;
}

.map-canvas {
  width: 100%;
  height: 560px;
}

/* 年份滑块 */
.map-ctrl {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  background: rgba(245, 241, 232, 0.7);
}

.map-ctrl__play {
  flex: none;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: none;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  color: var(--ink-2);
  cursor: pointer;
  transition: all 0.3s var(--ease);
}

.map-ctrl__play:hover {
  border-color: var(--zhu);
  color: var(--zhu);
}

.map-ctrl__play svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

.map-ctrl__range {
  flex: 1;
  accent-color: var(--zhu);
  height: 2px;
}

.map-ctrl__ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.map-ctrl__now {
  flex: none;
  min-width: 66px;
  text-align: right;
  font-family: var(--kai);
  font-size: 17px;
  letter-spacing: 0.06em;
  color: var(--zhu);
  font-variant-numeric: tabular-nums;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 16px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
}

.legend i {
  display: inline-block;
  width: 18px;
  height: 2px;
  margin-right: 6px;
  vertical-align: 4px;
}

/* ------------------------------------------------------------------ 关系图 */

.graph-toolbar {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-bottom: 0;
  background: rgba(255, 253, 247, 0.55);
}

.graph-stage {
  position: relative;
  border: 1px solid var(--line);
  background: rgba(255, 253, 247, 0.4);
}

.graph-canvas {
  width: 100%;
  height: 640px;
}

.graph-legend,
.graph-rellegend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  padding: 12px 18px;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}

.graph-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.graph-legend b {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

/* 连线图例：身份在上、关系在下 */
.graph-rellegend {
  border-top: 1px dashed var(--line);
  padding-top: 10px;
  gap: 8px 18px;
}

.rel-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--kai);
}

.rel-legend__line {
  width: 22px;
  height: 0;
  display: inline-block;
  flex: none;
}

.graph-card {
  position: absolute;
  z-index: 5;
  width: 262px;
  padding: 18px 20px 16px;
  background: rgba(252, 249, 242, 0.97);
  border: 1px solid var(--line-2);
  box-shadow: 0 20px 40px -26px rgba(60, 48, 30, 0.7);
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 0.28s var(--ease), transform 0.28s var(--ease);
}

.graph-card.is-open {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.graph-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

/* 卡片头像：圆形裁切 + 印色边框 + 书法字占位 */
.graph-card__avatar {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #f7f2e7;
  border: 2px solid var(--zhu);
  font-family: var(--kai);
  font-size: 21px;
  box-shadow: inset 0 0 0 3px rgba(255, 253, 247, 0.7), 0 2px 6px -3px rgba(60, 48, 30, 0.4);
}

.graph-card h3 {
  margin: 0 0 2px;
  font-family: var(--kai);
  font-size: 21px;
  font-weight: 400;
  letter-spacing: 0.12em;
}

.graph-card__role {
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--zhu);
}

/* 别称分组（据 CNKGraph），紧凑排布 */
.graph-card__aliases {
  margin-top: 10px;
  padding: 9px 11px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 3px;
  max-height: 132px;
  overflow-y: auto;
}
.graph-card__alias-row {
  display: flex;
  gap: 8px;
  font-size: 11px;
  line-height: 1.75;
  padding: 2px 0;
}
.graph-card__alias-row + .graph-card__alias-row {
  border-top: 1px dashed var(--line);
  margin-top: 3px;
  padding-top: 5px;
}
.graph-card__alias-row b {
  flex: 0 0 auto;
  color: var(--zhu);
  font-weight: 600;
}
.graph-card__alias-row span {
  color: var(--ink-2);
}

/* 诗文述及信息 */
.graph-card__mentions {
  margin-top: 10px;
  padding: 9px 11px;
  background: rgba(163, 131, 61, 0.07);
  border-left: 2px solid var(--jin);
  font-size: 11px;
  line-height: 1.8;
  color: var(--ink-3);
}
.mentions-count b {
  color: var(--zhu);
  font-size: 13px;
  font-family: var(--kai);
}
.mentions-called {
  margin-top: 3px;
  font-family: var(--kai);
}
.mentions-works {
  margin-top: 5px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.mentions-work {
  display: inline-block;
  max-width: 100%;
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--paper);
  font-size: 10px;
  color: var(--ink-4);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.graph-card p {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.95;
  color: var(--ink-2);
}

.graph-card__note {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--line-2);
  font-size: 11px;
  color: var(--ink-3);
  line-height: 1.8;
}

.graph-card__close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: 0;
  background: none;
  font-size: 16px;
  line-height: 1;
  color: var(--ink-3);
  cursor: pointer;
  padding: 4px;
}

/* ------------------------------------------------------------------ 作品 */

.stagebar {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.stagebar button {
  padding: 5px 12px;
  font-family: var(--serif);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  background: none;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: all 0.28s var(--ease);
  white-space: nowrap;
}

.stagebar button:hover {
  border-color: var(--line-2);
  color: var(--ink);
}

.stagebar button[aria-pressed="true"] {
  color: var(--paper);
  background: var(--ink-2);
  border-color: var(--ink-2);
}

.list-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 26px 0 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
}

.list-bar b {
  font-family: var(--kai);
  font-size: 16px;
  font-weight: 400;
  color: var(--ink-2);
  letter-spacing: 0.08em;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.work-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 24px 26px 22px;
  background: rgba(250, 247, 240, 0.86);
  transition: background 0.34s var(--ease);
}

.work-card:hover {
  background: #fdfaf3;
}

.work-card__top {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.work-card__genre {
  padding: 1px 6px;
  border: 1px solid var(--line-2);
  color: var(--ink-3);
}

.work-card h3 {
  margin: 0;
  font-family: var(--kai);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.08em;
  line-height: 1.5;
  color: var(--ink);
}

.work-card:hover h3 {
  color: var(--zhu);
}

.work-card__excerpt {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.95;
  color: var(--ink-3);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.work-card__arrow {
  position: absolute;
  right: 20px;
  bottom: 20px;
  font-size: 14px;
  color: var(--line-2);
  transition: transform 0.34s var(--ease), color 0.34s var(--ease);
}

.work-card:hover .work-card__arrow {
  color: var(--zhu);
  transform: translateX(3px);
}

/* 作品详情 */
.reader {
  max-width: 720px;
  margin: 0 auto;
}

.reader__back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 34px;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--ink-3);
}

.reader__back:hover {
  color: var(--zhu);
}

.reader__head {
  text-align: center;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
}

.reader__meta {
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.reader__head h1 {
  margin: 16px 0 10px;
  font-family: var(--kai);
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 400;
  letter-spacing: 0.1em;
  line-height: 1.5;
}

.reader__place {
  font-size: 12.5px;
  letter-spacing: 0.12em;
  color: var(--ink-3);
}

.reader__body {
  padding: clamp(28px, 5vh, 46px) 0;
  font-family: var(--kai);
  font-size: clamp(17px, 2.1vw, 19.5px);
  line-height: 2.5;
  letter-spacing: 0.05em;
  color: var(--ink);
  text-align: justify;
}

.reader__body p {
  margin: 0 0 0.9em;
  text-indent: 2em;
}

.reader__body p:last-child {
  margin-bottom: 0;
}

/* 诗、词一类分行短句：不缩进，行距略收，靠左挂齐 */
.reader__body--verse {
  line-height: 2.55;
}

.reader__body--verse p {
  text-indent: 0;
  margin-bottom: 0.15em;
}

.reader__source {
  padding-top: 18px;
  border-top: 1px dashed var(--line-2);
  font-size: 11.5px;
  line-height: 1.9;
  color: var(--ink-3);
  letter-spacing: 0.03em;
}

.reader__source b {
  font-weight: 400;
  letter-spacing: 0.16em;
  color: var(--ink-3);
  margin-right: 6px;
}

/* 出处是系年依据而非版本卷次时，把这句话说明白，不装作有卷次 */
.reader__srcnote {
  display: block;
  margin-top: 5px;
  padding-left: 10px;
  border-left: 2px solid rgba(163, 131, 61, 0.4);
  font-size: 11px;
  line-height: 1.8;
  color: var(--ink-3);
  opacity: 0.86;
}

/* 双源系年核对标注：低调，作为佐证而非主信息 */
.reader__verified {
  display: block;
  margin-top: 6px;
  padding-left: 10px;
  border-left: 2px solid rgba(74, 123, 124, 0.45);
  font-size: 10.5px;
  line-height: 1.75;
  color: var(--ink-4);
}

.reader__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 22px;
  align-items: center;
}

.reader__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink-2);
  border: 1px solid var(--line);
  transition: all 0.28s var(--ease);
}

.reader__link:hover {
  color: var(--zhu);
  border-color: rgba(181, 84, 42, 0.42);
}

.related {
  margin-top: clamp(46px, 8vh, 72px);
  padding-top: 30px;
  border-top: 1px solid var(--line);
}

.related h2 {
  margin: 0 0 18px;
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.3em;
  color: var(--ink-3);
}

.related__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.related__item {
  padding: 18px 20px;
  border: 1px solid var(--line);
  background: rgba(252, 249, 242, 0.6);
  transition: border-color 0.3s var(--ease);
}

.related__item:hover {
  border-color: rgba(181, 84, 42, 0.4);
}

.related__item small {
  display: block;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  margin-bottom: 4px;
}

.related__item strong {
  font-family: var(--kai);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--ink);
}

/* ------------------------------------------------------------------ 人间清欢 */

.life-layout {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
  margin-top: 30px;
}

.life-aside {
  position: sticky;
  top: calc(var(--nav-h) + 26px);
  align-self: start;
  max-height: calc(100vh - var(--nav-h) - 52px);
  overflow-y: auto;
}

.life-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0;
  margin: 0;
  list-style: none;
  border-left: 1px solid var(--line);
}

.life-nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0 9px 16px;
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  transition: color 0.28s var(--ease);
}

.life-nav a::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--zhu);
  transform: scaleY(0);
  transition: transform 0.3s var(--ease);
}

.life-nav a:hover,
.life-nav a.is-active {
  color: var(--ink);
}

.life-nav a.is-active::before {
  transform: scaleY(1);
}

.life-nav i {
  font-family: var(--kai);
  font-style: normal;
  font-size: 14px;
  color: var(--line-2);
}

.life-nav a.is-active i {
  color: var(--zhu);
}

.life-sec {
  padding: 0 0 clamp(46px, 8vh, 78px);
  scroll-margin-top: calc(var(--nav-h) + 20px);
}

.life-sec + .life-sec {
  border-top: 1px solid var(--line);
  padding-top: clamp(38px, 6vh, 58px);
}

.life-sec__head {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 28px;
}

.life-sec__mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  font-family: var(--kai);
  font-size: 20px;
  color: var(--zhu);
  border: 1px solid rgba(181, 84, 42, 0.4);
  border-radius: 3px;
}

.life-sec h2 {
  margin: 0;
  font-family: var(--kai);
  font-size: clamp(23px, 3vw, 29px);
  font-weight: 400;
  letter-spacing: 0.18em;
}

.life-sec__sub {
  margin: 6px 0 0;
  font-family: var(--kai);
  font-size: 14px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}

.life-item {
  padding: 24px 26px 22px;
  margin-bottom: 14px;
  background: rgba(252, 249, 242, 0.66);
  border: 1px solid var(--line);
  border-left: 2px solid var(--line-2);
  transition: border-left-color 0.34s var(--ease), background 0.34s var(--ease);
}

.life-item:hover {
  border-left-color: var(--zhu);
  background: rgba(255, 252, 245, 0.9);
}

.life-item h3 {
  margin: 0 0 10px;
  font-family: var(--kai);
  font-size: 19px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--ink);
}

.life-item__body {
  margin: 0;
  font-size: 14.5px;
  line-height: 2.15;
  color: var(--ink-2);
  text-align: justify;
}

.life-quote {
  position: relative;
  margin: 16px 0 0;
  padding: 14px 18px 14px 22px;
  background: rgba(239, 233, 220, 0.72);
  font-family: var(--kai);
  font-size: 15.5px;
  line-height: 2.1;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.life-quote::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: rgba(181, 84, 42, 0.5);
}

.life-item__src {
  display: block;
  margin-top: 10px;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}

/* 引文可溯源到《东坡日记》原文时，给一个回链 */
.life-item__link {
  display: inline-block;
  margin-top: 6px;
  padding-bottom: 1px;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--dai);
  border-bottom: 1px solid rgba(74, 123, 124, 0.32);
  transition: color 0.26s var(--ease), border-color 0.26s var(--ease);
}

.life-item__link:hover {
  color: var(--zhu);
  border-bottom-color: rgba(181, 84, 42, 0.42);
}

/* ------------------------------------------------------------------ 占位与关于 */

.soon {
  max-width: 620px;
  margin: clamp(50px, 12vh, 130px) auto;
  padding: clamp(36px, 6vw, 62px) clamp(24px, 5vw, 52px);
  text-align: center;
  border: 1px solid var(--line);
  background: rgba(252, 249, 242, 0.6);
}

.soon__mark {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 26px;
  font-family: var(--kai);
  font-size: 26px;
  color: var(--zhu);
  border: 1.5px solid rgba(181, 84, 42, 0.42);
  border-radius: 4px;
}

.soon h1 {
  margin: 0;
  font-family: var(--kai);
  font-size: clamp(25px, 3.6vw, 33px);
  font-weight: 400;
  letter-spacing: 0.2em;
}

.soon p {
  margin: 18px 0 0;
  font-family: var(--kai);
  font-size: 15px;
  line-height: 2.2;
  letter-spacing: 0.05em;
  color: var(--ink-3);
}

.soon__rule {
  width: 40px;
  height: 1px;
  margin: 26px auto;
  background: var(--line-2);
}

.soon__note {
  font-size: 11.5px;
  line-height: 2;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin: 34px 0 42px;
  background: var(--line);
  border: 1px solid var(--line);
}

.about-stat {
  padding: 22px 18px;
  background: rgba(252, 249, 242, 0.8);
  text-align: center;
}

.about-stat b {
  display: block;
  font-family: var(--kai);
  font-size: 30px;
  font-weight: 400;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.about-stat small {
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--ink-3);
}

.about-sec {
  margin-bottom: clamp(34px, 5vh, 52px);
}

.about-sec h2 {
  margin: 0 0 14px;
  font-family: var(--kai);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.14em;
  color: var(--ink);
}

.about-sec h2 span {
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0.24em;
  color: var(--ink-3);
  margin-left: 10px;
}

.about-sec p {
  margin: 0 0 12px;
  font-size: 14.5px;
  line-height: 2.15;
  color: var(--ink-2);
  text-align: justify;
}

.about-sec ul {
  margin: 0;
  padding-left: 1.2em;
  font-size: 14.5px;
  line-height: 2.1;
  color: var(--ink-2);
}

.about-sec li {
  margin-bottom: 6px;
}

.about-quote {
  margin: 0 0 28px;
  padding-left: 18px;
  border-left: 2px solid rgba(181, 84, 42, 0.42);
  font-family: var(--kai);
  font-size: clamp(17px, 2.2vw, 20px);
  line-height: 2.1;
  letter-spacing: 0.06em;
  color: var(--ink-2);
}

/* ------------------------------------------------------------------ 东坡日记 */

.zl-stats {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(20px, 4vw, 46px);
  margin: 26px 0 0;
  padding: 14px 0 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.zl-stats li {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.zl-stats b {
  font-family: var(--kai);
  font-size: 26px;
  font-weight: 400;
  color: var(--ink-2);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.zl-stats span {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--ink-3);
}

.zl-note {
  margin: 34px 0 0;
  padding: clamp(20px, 3vw, 30px) clamp(18px, 3vw, 32px);
  background: rgba(255, 253, 247, 0.55);
  border: 1px solid var(--line);
  border-left: 2px solid rgba(181, 84, 42, 0.42);
}

.zl-note__title {
  margin: 0 0 12px;
  font-family: var(--kai);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.18em;
  color: var(--jin);
}

.zl-note p {
  margin: 0 0 12px;
  font-size: 13.5px;
  line-height: 2.05;
  color: var(--ink-3);
  text-align: justify;
}

.zl-note p:last-child {
  margin-bottom: 0;
}

.zl-note__hint {
  font-size: 12px !important;
  letter-spacing: 0.08em;
  color: var(--jin) !important;
}

.zl-tools {
  margin: 40px 0 0;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.zl-tools .stagebar button em {
  margin-left: 5px;
  font-style: normal;
  font-size: 10px;
  color: inherit;
  opacity: 0.62;
  font-variant-numeric: tabular-nums;
}

.zl-tools__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px 20px;
  margin-top: 12px;
}

.zl-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 6px;
  flex: 1 1 340px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.zl-cats button {
  padding: 3px 9px;
  font-family: var(--serif);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  background: rgba(245, 241, 232, 0.8);
  border: 1px solid var(--line);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.26s var(--ease);
}

.zl-cats button em {
  margin-left: 4px;
  font-style: normal;
  font-size: 10px;
  opacity: 0.6;
  font-variant-numeric: tabular-nums;
}

.zl-cats__empty {
  padding: 4px 0;
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  opacity: 0.85;
}

.zl-cats button:hover {
  border-color: var(--line-2);
  color: var(--ink);
}

.zl-cats button[aria-pressed="true"] {
  color: var(--zhu);
  border-color: rgba(181, 84, 42, 0.42);
  background: rgba(181, 84, 42, 0.07);
}

.zl-search {
  position: relative;
  flex: 0 1 240px;
  min-width: 180px;
}

.zl-search input {
  width: 100%;
  padding: 5px 24px 5px 2px;
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line-2);
  transition: border-color 0.28s var(--ease);
}

.zl-search input::-webkit-search-cancel-button {
  display: none;
}

.zl-search input::placeholder {
  color: var(--ink-3);
  opacity: 0.75;
}

.zl-search input:focus {
  outline: none;
  border-bottom-color: var(--zhu);
}

.zl-search button {
  position: absolute;
  top: 50%;
  right: 2px;
  transform: translateY(-50%);
  padding: 0 4px;
  font-size: 15px;
  line-height: 1;
  color: var(--ink-3);
  background: none;
  border: 0;
  cursor: pointer;
}

.zl-item {
  padding: 24px 0 26px;
  border-bottom: 1px solid var(--line);
}

.zl-item__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
}

.zl-item__tag {
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--jin);
  white-space: nowrap;
}

.zl-item__head h2 {
  flex: 1 1 auto;
  margin: 0;
  font-family: var(--kai);
  font-size: clamp(18px, 2.2vw, 21px);
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--ink);
}

.zl-item__len {
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  opacity: 0.7;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.zl-item__body {
  position: relative;
  max-height: 8em;
  margin-top: 10px;
  overflow: hidden;
  font-size: 14.5px;
  line-height: 2;
  color: var(--ink-2);
  text-align: justify;
}

.zl-item__body p {
  margin: 0 0 6px;
}

/* 去掉末段外边距，否则 overflow:hidden 把它关在里面，四行的钳高会切在半行上 */
.zl-item__body p:last-child {
  margin-bottom: 0;
}

/* 渐隐只在真有下文时出现；刚好满四行的条目不该让人误以为还有内容 */
.zl-item__body::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: none;
  height: 1.35em;
  pointer-events: none;
  background: linear-gradient(transparent, rgba(245, 241, 232, 0.97) 72%);
}

.zl-item.has-more:not(.is-open) .zl-item__body::after {
  display: block;
}

.zl-item.is-open .zl-item__body {
  max-height: none;
}

.zl-item.is-open .zl-item__body::after {
  display: none;
}.zl-item__more {
  margin-top: 10px;
  padding: 0 0 2px;
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--zhu);
  background: none;
  border: 0;
  border-bottom: 1px solid rgba(181, 84, 42, 0.32);
  cursor: pointer;
  transition: border-color 0.26s var(--ease);
}

.zl-item__more:hover {
  border-bottom-color: var(--zhu);
}

.zl-item mark {
  padding: 0 1px;
  color: inherit;
  background: rgba(181, 84, 42, 0.2);
  box-shadow: inset 0 -1px 0 rgba(181, 84, 42, 0.35);
}

/* 从别处回链过来时，那一则闪一下朱色底 */
.zl-item.is-target {
  animation: zlTarget 2.4s var(--ease) 0.15s both;
}

@keyframes zlTarget {
  0%,
  55% {
    background: rgba(181, 84, 42, 0.07);
    box-shadow: inset 2px 0 0 rgba(181, 84, 42, 0.5);
  }
  100% {
    background: transparent;
    box-shadow: inset 2px 0 0 transparent;
  }
}

@media (max-width: 760px) {
  .zl-stats {
    gap: 14px 26px;
  }

  .zl-stats b {
    font-size: 21px;
  }

  .zl-tools__row {
    flex-direction: column;
    gap: 12px;
  }

  .zl-cats,
  .zl-search {
    flex: 1 1 auto;
    width: 100%;
  }

  .zl-item__head h2 {
    flex-basis: 100%;
    order: 3;
    margin-top: 2px;
  }

  .zl-item__body {
    font-size: 14px;
  }
}

/* ==========================================================================
   视觉升级：纸面层次 · 版口装饰 · 卡片浮起
   只加质感与装饰，不改任何布局与交互逻辑。
   ========================================================================== */

/* ------------------------------------------------------------------ 导航 */

.nav {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 10px 24px -22px rgba(70, 55, 35, 0.7);
}

/* 品牌前一枚朱色小印 */
.nav__brand::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 9px;
  transform: translateY(-2px);
  background: var(--zhu);
  box-shadow: 0 0 0 1.5px rgba(181, 84, 42, 0.22);
  display: inline-block;
}

/* 当前页下划线收短、加重，像书上的朱笔标记 */
.nav__link::after {
  left: 50%;
  right: auto;
  width: 22px;
  height: 2px;
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  background: var(--zhu);
  border-radius: 1px;
}

.nav__link:hover::after,
.nav__link[aria-current="page"]::after {
  transform: translateX(-50%) scaleX(1);
}

.nav__link--soon::before {
  border-radius: 1px;
  background: rgba(245, 241, 232, 0.6);
}

/* ------------------------------------------------------------------ 页头 */

.page-head {
  position: relative;
}

/* eyebrow 前一道朱线 */
.page-head__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  letter-spacing: 0.3em;
  color: var(--ink-2);
}

.page-head__eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: linear-gradient(90deg, var(--zhu), rgba(181, 84, 42, 0.1));
}

/* 主标题下压一道渐隐细线，收住视线 */
.page-head h1 {
  position: relative;
  padding-bottom: 18px;
}

.page-head h1::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: min(210px, 42%);
  height: 1px;
  background: linear-gradient(
    90deg,
    var(--line-2),
    rgba(201, 191, 168, 0.15)
  );
}

/* 书童口吻的引子：左侧竖线，像页边批注 */
.page-head__lead {
  padding-left: 16px;
  border-left: 2px solid rgba(181, 84, 42, 0.26);
  color: var(--ink-2);
}

/* 引自诗文的句子（.voice）前面那枚标签，压住不要飘 */
.voice::before {
  color: var(--jin);
  opacity: 0.95;
}

/* ------------------------------------------------------------------ 首页 */

/* 山影提亮，让底部的远山真正看得见 */
.hero__mountains {
  opacity: 0.78;
  filter: saturate(1.05);
}

/* 山脚一层雾，把山水与文字区隔开 */
.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 34%;
  pointer-events: none;
  background: linear-gradient(
    to top,
    rgba(245, 241, 232, 0.92) 0%,
    rgba(245, 241, 232, 0.55) 38%,
    transparent 100%
  );
}

/* 标题上方的朱印 */
.hero__seal {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 32px;
  font-family: var(--kai);
  font-size: 18px;
  line-height: 1.12;
  letter-spacing: 0.1em;
  writing-mode: vertical-rl;
  text-align: center;
  color: #fdfaf3;
  background: linear-gradient(150deg, #c05c2f, #a8441f);
  border-radius: 2px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset,
    0 8px 18px -12px rgba(120, 50, 20, 0.9);
  opacity: 0.92;
}

/* 诗句的墨韵：极轻的晕，不是投影 */
.hero__verse {
  text-shadow: 0 0 24px rgba(43, 43, 43, 0.05);
}

/* 副标题压在山影上，加一层纸色光晕拖住字 */
.hero__sub {
  color: #3a352c;
  text-shadow: 0 0 22px rgba(248, 244, 233, 0.98),
    0 0 10px rgba(248, 244, 233, 0.95), 0 1px 0 rgba(255, 253, 247, 0.8);
}

/* 右侧竖排闲句 */
.hero__side {
  position: absolute;
  top: 12%;
  right: clamp(16px, 4vw, 56px);
  z-index: 2;
  writing-mode: vertical-rl;
  font-family: var(--kai);
  font-size: 12px;
  letter-spacing: 0.34em;
  color: var(--ink-3);
  opacity: 0.5;
}

/* ------------------------------------------------------------------ 印章入口 */

.seal {
  background: linear-gradient(
    158deg,
    var(--paper-card) 0%,
    rgba(249, 244, 233, 0.92) 46%,
    rgba(235, 227, 210, 0.78) 100%
  );
  box-shadow: var(--sh-1);
}

.seal:hover {
  box-shadow: var(--sh-3);
}

/* 印章本体：钤印的凹陷感 */
.seal__mark {
  background: radial-gradient(
    circle at 32% 28%,
    rgba(181, 84, 42, 0.09),
    rgba(181, 84, 42, 0.02) 70%
  );
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 1px 2px rgba(181, 84, 42, 0.12);
}

.seal--soon .seal__mark {
  background: rgba(107, 97, 82, 0.05);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
}

/* ------------------------------------------------------------------ 首页入口条 */

.zilin-band {
  box-shadow: var(--sh-1);
}

.zilin-band:hover {
  box-shadow: var(--sh-2);
}

/* 筛选条：选中那档用朱色，像在纸上做了个记号 */
.stagebar button[aria-pressed="true"] {
  color: #fdfaf3;
  background: linear-gradient(160deg, #bd5b30, #a8481f);
  border-color: rgba(150, 66, 32, 0.9);
  box-shadow: 0 4px 12px -8px rgba(150, 66, 32, 0.95);
}

.stagebar button[aria-pressed="true"]:hover {
  color: #fdfaf3;
  border-color: rgba(150, 66, 32, 0.9);
}

/* ------------------------------------------------------------------ 作品卡 */

.work-card {
  background: linear-gradient(180deg, #fffdf8 0%, #fdfaf2 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease),
    transform 0.4s var(--ease);
}

.work-card:hover {
  background: linear-gradient(180deg, #fffefb 0%, #fffcf5 100%);
  box-shadow: var(--sh-2);
  z-index: 2;
}

/* 悬停时左侧浮起一道朱线 */
.work-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--zhu);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.4s var(--ease);
}

.work-card:hover::before {
  transform: scaleY(1);
}

/* ------------------------------------------------------------------ 人间清欢 */

.life-item {
  background: linear-gradient(
    180deg,
    rgba(255, 252, 246, 0.86),
    rgba(251, 247, 238, 0.66)
  );
  border-color: rgba(216, 207, 186, 0.85);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 6px 16px -16px rgba(90, 72, 46, 0.4);
}

.life-item:hover {
  background: linear-gradient(
    180deg,
    rgba(255, 253, 248, 0.98),
    rgba(252, 248, 240, 0.88)
  );
  box-shadow: var(--sh-2);
}

/* ------------------------------------------------------------------ 日记条目 */

.zl-item {
  transition: background 0.36s var(--ease);
}

.zl-item:hover {
  background: linear-gradient(
    90deg,
    rgba(253, 250, 243, 0.7),
    rgba(253, 250, 243, 0) 62%
  );
}

/* ------------------------------------------------------------------ 关于页 */

.about-quote {
  position: relative;
  background: linear-gradient(
    90deg,
    rgba(255, 253, 247, 0.5),
    rgba(255, 253, 247, 0) 70%
  );
}

/* 长文行宽收到 48 字上下——比什么都影响可读性 */
.about-sec p,
.about-sec li {
  max-width: 48em;
}

.about-stat {
  background: linear-gradient(
    180deg,
    rgba(255, 253, 248, 0.96),
    rgba(249, 244, 233, 0.72)
  );
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* 日记页的说明框：两栏排，行宽减半，密实的文字块变成书页上的小注 */
.zl-note {
  box-shadow: var(--sh-1);
}

.zl-note p {
  max-width: none;
}

@media (min-width: 761px) {
  .zl-note__body {
    column-count: 2;
    column-gap: clamp(28px, 4vw, 52px);
    column-rule: 1px solid rgba(216, 207, 186, 0.7);
  }

  .zl-note__body p {
    break-inside: auto;
    margin-bottom: 14px;
  }
}

/* ------------------------------------------------------------------ 全局细节 */

/* 滚动条：一条细木色，不喧宾夺主 */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(201, 191, 168, 0.7);
  border: 3px solid transparent;
  background-clip: content-box;
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(181, 84, 42, 0.5);
  background-clip: content-box;
}

/* 正文里的强调与分隔线 */
.rule {
  background: linear-gradient(
    90deg,
    transparent,
    var(--line-2) 18%,
    var(--line-2) 82%,
    transparent
  );
}

/* 页脚：上方加一道「版心线」，收束长页面 */
.footer {
  position: relative;
}

.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(680px, 78%);
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--line-2),
    transparent
  );
}

/* 子页签与筛选条统一语言：选中的一档都是朱色 */
.subtab[aria-selected="true"] {
  color: #fdfaf3;
  background: linear-gradient(160deg, #bd5b30, #a8481f);
  box-shadow: 0 4px 12px -9px rgba(150, 66, 32, 0.95);
}

.subtabs {
  background: rgba(255, 253, 248, 0.72);
  box-shadow: var(--sh-1);
}

/* ------------------------------------------------------------------ 小屏收束 */

@media (max-width: 760px) {
  /* 窄屏下山形被拉伸，压一压不抢字 */
  .hero__mountains {
    opacity: 0.6;
    height: 48%;
  }

  .hero__seal {
    width: 48px;
    height: 48px;
    font-size: 16px;
    margin-bottom: 26px;
  }

  .hero__side {
    font-size: 10.5px;
    opacity: 0.42;
  }

  /* 窄屏本身行宽就够小，不必再限 */
  .about-sec p,
  .about-sec li {
    max-width: none;
  }

  .page-head h1 {
    padding-bottom: 14px;
  }

  /* 小屏别让页头吃掉整屏，把节奏收紧 */
  .page-head {
    padding: 34px 0 22px;
  }

  .page-head__lead {
    margin-top: 14px;
    font-size: 14px;
    line-height: 1.95;
  }

  .zl-note p {
    font-size: 13px;
    line-height: 1.95;
  }

  .zl-note {
    padding: 18px 16px;
  }
}

/* 左栏目录：读数要够，选中的一档已经用朱色标了 */
.life-nav a {
  color: var(--ink-2);
  font-size: 13.5px;
}

.life-nav a.is-active {
  color: var(--zhu);
}

/* ------------------------------------------------------------------ 书童对话 */

/* 对话页要把一屏留给对话，页头压紧 */
.page-head--compact {
  padding: clamp(22px, 3vh, 32px) 0 clamp(14px, 2vh, 20px);
}

.page-head--compact h1 {
  font-size: clamp(26px, 3.4vw, 34px);
  padding-bottom: 12px;
}

.page-head--compact .page-head__lead {
  margin-top: 12px;
  font-size: 13.5px;
  line-height: 1.9;
}

.chat {
  margin: clamp(14px, 2.4vw, 22px) 0 0;
}

/* 对话工具条：放大按钮常驻在对话框右上，不随消息滚动 */
.chat__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px 8px;
}
.chat__toolbar-label {
  font-family: var(--kai);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--ink-3);
}
.chat__expand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--ink-2);
  background: var(--paper-card);
  border: 1px solid var(--line-2);
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.25s var(--ease);
}
.chat__expand svg { width: 14px; height: 14px; }
.chat__expand:hover {
  color: var(--zhu);
  border-color: var(--zhu);
  background: var(--zhu-soft);
}

/* 放大态：整屏沉浸对话 */
.chat--expanded {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: clamp(12px, 2.5vh, 26px) clamp(14px, 4vw, 60px) clamp(12px, 2.5vh, 26px);
  background: var(--paper);
  box-shadow: none;
}
body.chat-open { overflow: hidden; }
.chat--expanded .chat__toolbar {
  flex: none;
  padding: 0 0 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 10px;
}
.chat--expanded .chat__toolbar-label { font-size: 13px; }
/* 单壳多技能：四角色切换 */
.chat-roles { display: flex; flex-wrap: wrap; gap: 4px; margin-left: auto; }
.chat-role {
  padding: 4px 10px;
  font-family: var(--kai); font-size: 11.5px;
  color: var(--ink-3); background: transparent;
  border: 1px solid var(--line-2); border-radius: 2px; cursor: pointer;
  transition: all .22s var(--ease);
}
.chat-role:hover { color: var(--zhu); border-color: var(--zhu); }
.chat-role.is-active {
  color: #fff; background: var(--zhu); border-color: var(--zhu);
}
.chat__teacher { margin-left: 0; }
.chat__savecard {
  padding: 4px 10px;
  font-family: var(--kai); font-size: 11.5px;
  color: var(--ink-3); background: transparent;
  border: 1px solid var(--line-2); border-radius: 2px; cursor: pointer;
  transition: all .22s var(--ease);
}
.chat__savecard:hover { color: var(--zhu); border-color: var(--zhu); }
.chat__teacher {
  margin-left: auto; margin-right: 10px;
  padding: 5px 11px;
  font-family: var(--kai); font-size: 12px;
  color: var(--zhu); text-decoration: none;
  border: 1px solid rgba(181,84,42,.4); border-radius: 2px;
  transition: all .25s var(--ease);
}
.chat__teacher:hover { background: var(--zhu); color: #fff; }
.chat--expanded .chat__expand {
  padding: 7px 14px;
  color: var(--zhu);
  border-color: var(--zhu);
  background: var(--zhu-soft);
}
.chat--expanded .chat__log {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
  background: rgba(255, 253, 248, 0.6);
}
.chat--expanded .chat__form,
.chat--expanded .chat__hint { flex: none; }

/* 放大态：消息区居中收束，气泡放宽，避免右侧大片空白。
   限宽 900px 保证单行不至于长到难读，同时把消息整体居中。 */
.chat--expanded .chat__log {
  padding: clamp(18px, 3vh, 34px) max(18px, calc((100% - 940px) / 2));
}
.chat--expanded .msg__body {
  max-width: min(92%, 900px);
  padding: 16px 22px;
  font-size: 15.5px;
}
.chat--expanded .msg--user .msg__body { max-width: min(70%, 620px); }
.chat--expanded .chat__form,
.chat--expanded .chat__hint {
  max-width: 940px;
  margin-left: auto;
  margin-right: auto;
}
.chat--expanded .chat__suggest { max-width: 940px; margin-left: auto; margin-right: auto; }

.chat__log {
  height: clamp(340px, calc(100vh - 420px), 660px);
  padding: clamp(18px, 2.4vw, 26px);
  overflow-y: auto;
  background: linear-gradient(
    180deg,
    rgba(255, 253, 248, 0.92),
    rgba(251, 247, 238, 0.78)
  );
  border: 1px solid var(--line);
  box-shadow: var(--sh-1);
}

.chat__hello {
  padding: clamp(10px, 4vh, 40px) 0 0;
}

.chat__hello-line {
  margin: 0 0 6px;
  font-family: var(--kai);
  font-size: 15px;
  letter-spacing: 0.1em;
  color: var(--ink-2);
}

.chat__hello-sub {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}

.chat__hello-list {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  font-size: 12.5px;
  line-height: 2.1;
  color: var(--ink-3);
}

.chat__hello-list li {
  position: relative;
  padding-left: 14px;
}

.chat__hello-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.95em;
  width: 4px;
  height: 4px;
  background: var(--jin);
  opacity: 0.7;
}

/* ---- 消息 */

.msg {
  display: flex;
  margin-top: 18px;
}

.msg:first-of-type {
  margin-top: 22px;
}

.msg--user {
  justify-content: flex-end;
}

.msg__body {
  max-width: min(86%, 620px);
  padding: 12px 16px;
  font-size: 14.5px;
  line-height: 2;
  color: var(--ink-2);
  background: var(--paper-card);
  border: 1px solid rgba(216, 207, 186, 0.8);
  box-shadow: var(--sh-1);
}

.msg__body p {
  margin: 0 0 8px;
}

.msg__body p:last-child {
  margin-bottom: 0;
}

.msg--user .msg__body {
  color: var(--ink-2);
  background: rgba(181, 84, 42, 0.08);
  border-color: rgba(181, 84, 42, 0.22);
  box-shadow: none;
}

.msg--bot .msg__body {
  border-left: 2px solid rgba(181, 84, 42, 0.4);
}

.msg__dots {
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--ink-3);
}

/* ---- 卡片 */

.chat-card {
  margin: 10px 0;
  padding: 12px 14px;
  background: linear-gradient(180deg, #fffdf8, #fdfaf2);
  border: 1px solid var(--line);
}

.chat-card__top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
}

.chat-card__top b {
  font-family: var(--kai);
  font-size: 15.5px;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--ink);
}

.chat-card__top span {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
}

.chat-card__works,
.chat-card__steps {
  margin: 8px 0 0;
  padding-left: 0;
  list-style: none;
  font-size: 12.5px;
  line-height: 1.95;
}

.chat-card__works li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 0;
  border-bottom: 1px dashed rgba(216, 207, 186, 0.7);
}

.chat-card__works li:last-child {
  border-bottom: 0;
}

.chat-card__works a {
  color: var(--ink-2);
  border-bottom: 1px solid transparent;
  transition: border-color 0.26s var(--ease), color 0.26s var(--ease);
}

.chat-card__works a:hover {
  color: var(--zhu);
  border-bottom-color: rgba(181, 84, 42, 0.4);
}

.chat-card__works em {
  flex: none;
  font-style: normal;
  font-size: 11px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.chat-card__steps {
  counter-reset: step;
  padding-left: 0;
}

.chat-card__steps li {
  counter-increment: step;
  position: relative;
  padding-left: 20px;
}

.chat-card__steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 2px;
  width: 14px;
  height: 14px;
  font-size: 9px;
  line-height: 14px;
  text-align: center;
  color: var(--zhu);
  border: 1px solid rgba(181, 84, 42, 0.4);
  border-radius: 50%;
}

.chat-card__noMethod {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--ink-3);
}

/* ---- 引文 */

.chat-quote {
  margin: 12px 0;
  padding: 10px 0 10px 14px;
  background: rgba(163, 131, 61, 0.05);
  border-left: 2px solid rgba(163, 131, 61, 0.5);
}

.chat-quote p {
  margin: 0;
  font-family: var(--kai);
  font-size: 14px;
  line-height: 2;
  letter-spacing: 0.04em;
  color: var(--ink-2);
}

.chat-quote cite {
  display: block;
  margin-top: 4px;
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--jin);
}

.chat-quote__note {
  display: block;
  margin-top: 2px;
  font-size: 10.5px;
  color: var(--ink-3);
  opacity: 0.85;
}

/* ---- 出处与导流 */

.chat-cites {
  margin: 12px 0 2px;
  padding-top: 8px;
  border-top: 1px dashed rgba(216, 207, 186, 0.9);
  font-size: 11.5px;
  color: var(--ink-3);
}

.chat-cites > span {
  letter-spacing: 0.16em;
}

.chat-cites ul {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.chat-cites li {
  line-height: 1.9;
}

.chat-cites a {
  color: var(--dai);
  border-bottom: 1px solid rgba(74, 123, 124, 0.28);
}

.chat-cites a:hover {
  color: var(--zhu);
  border-bottom-color: rgba(181, 84, 42, 0.4);
}

.chat-redirect {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 6px 12px;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  color: var(--zhu);
  border: 1px solid rgba(181, 84, 42, 0.35);
  background: rgba(181, 84, 42, 0.04);
  transition: background 0.26s var(--ease), border-color 0.26s var(--ease);
}

.chat-redirect:hover {
  background: rgba(181, 84, 42, 0.1);
  border-color: rgba(181, 84, 42, 0.55);
}

.chat-redirect i {
  font-style: normal;
  transition: transform 0.3s var(--ease);
}

.chat-redirect:hover i {
  transform: translateX(4px);
}

.chat-error,
.chat-offline {
  margin-top: 12px;
  padding: 10px 14px;
  font-size: 12.5px;
  line-height: 1.9;
  color: var(--ink-3);
  background: rgba(181, 84, 42, 0.05);
  border: 1px solid rgba(181, 84, 42, 0.2);
}

/* 三段式第3段：追问建议按钮 */
.chat-followups {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--line-2);
}
.chat-followups__label {
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--ink-4);
  margin-right: 2px;
}
.chat-followups__q {
  padding: 5px 11px;
  font-family: var(--kai);
  font-size: 12px;
  line-height: 1.5;
  text-align: left;
  color: var(--zhu);
  background: rgba(181, 84, 42, 0.05);
  border: 1px solid rgba(181, 84, 42, 0.28);
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.25s var(--ease);
}
.chat-followups__q:hover {
  background: var(--zhu);
  color: #fff;
  border-color: var(--zhu);
}

/* 限流提示：温和的「歇一口气」，带一键重发 */
.chat-rate {
  margin-top: 12px;
  padding: 12px 15px;
  font-family: var(--kai);
  font-size: 13px;
  line-height: 1.85;
  color: var(--ink-2);
  background: rgba(163, 131, 61, 0.08);
  border-left: 3px solid var(--jin);
}
.chat-rate small {
  display: block;
  font-family: var(--serif);
  font-size: 11px;
  color: var(--ink-4);
  margin: 2px 0 8px;
}
.chat-rate__retry {
  padding: 5px 13px;
  font-family: var(--serif);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: var(--zhu);
  background: transparent;
  border: 1px solid var(--zhu);
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.25s var(--ease);
}
.chat-rate__retry:hover {
  background: var(--zhu);
  color: #fff;
}

/* 三种可信度标注：原文卡不加标，检索生成与通识各标一行 */
.chat-tier {
  margin: 0 0 8px;
  padding: 4px 10px;
  font-size: 11px;
  letter-spacing: 0.06em;
  border-left: 2px solid transparent;
}

.chat-tier--site {
  color: var(--dai);
  background: rgba(74, 123, 124, 0.07);
  border-left-color: rgba(74, 123, 124, 0.5);
}

.chat-tier--general {
  color: var(--ink-3);
  background: rgba(163, 131, 61, 0.08);
  border-left-color: rgba(163, 131, 61, 0.5);
}

/* 降级回放时的小标识：让人知道这是预存的回答 */
.chat-degrade {
  margin: 0 0 10px;
  padding: 6px 10px;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  background: rgba(163, 131, 61, 0.08);
  border-left: 2px solid rgba(163, 131, 61, 0.45);
}

.chat-offline a {
  color: var(--dai);
  border-bottom: 1px solid rgba(74, 123, 124, 0.3);
}

/* ---- 建议问句与输入 */

.chat__suggest {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 14px 0 0;
}

.chat__suggest:empty {
  display: none;
}

.chat-chip {
  padding: 5px 12px;
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  background: rgba(255, 253, 248, 0.7);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: all 0.26s var(--ease);
}

.chat-chip:hover {
  color: var(--zhu);
  border-color: rgba(181, 84, 42, 0.4);
  background: rgba(181, 84, 42, 0.05);
}

.chat__form {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-2);
}

.chat__label {
  flex: none;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--ink-3);
}

.chat__input {
  flex: 1;
  min-width: 0;
  padding: 6px 2px;
  font-family: var(--serif);
  font-size: 14.5px;
  color: var(--ink);
  background: none;
  border: 0;
  outline: none;
}

.chat__input::placeholder {
  color: var(--ink-3);
  opacity: 0.75;
}

.chat__send {
  flex: none;
  padding: 7px 20px;
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.18em;
  color: #fdfaf3;
  background: linear-gradient(160deg, #bd5b30, #a8481f);
  border: 0;
  cursor: pointer;
  transition: opacity 0.26s var(--ease), transform 0.26s var(--ease);
}

.chat__send:hover {
  transform: translateY(-1px);
}

.chat__send:disabled {
  opacity: 0.5;
  cursor: default;
  transform: none;
}

.chat__hint {
  margin: 12px 0 0;
  font-size: 11.5px;
  line-height: 1.9;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  opacity: 0.9;
}

@media (max-width: 760px) {
  .chat__log {
    height: min(52vh, 440px);
    padding: 14px;
  }

  .msg__body {
    max-width: 94%;
    padding: 10px 12px;
    font-size: 14px;
  }

  .chat__label {
    display: none;
  }

  .chat__form {
    gap: 8px;
  }

  .chat__send {
    padding: 7px 16px;
  }
}

/* ------------------------------------------------------------------ 提示 */

.notice {
  padding: 40px 24px;
  text-align: center;
  color: var(--ink-3);
  font-size: 14px;
  letter-spacing: 0.06em;
}

.notice b {
  display: block;
  font-family: var(--kai);
  font-size: 19px;
  font-weight: 400;
  color: var(--ink-2);
  margin-bottom: 8px;
  letter-spacing: 0.14em;
}

/* 载入淡入 */
.fade-in {
  animation: fadeIn 0.9s var(--ease) both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ------------------------------------------------------------------ 响应式 */

@media (max-width: 900px) {
  .map-layout {
    grid-template-columns: 1fr;
  }

  .map-panel {
    order: 2;
  }

  .seals {
    grid-template-columns: repeat(2, 1fr);
  }

  .life-layout {
    grid-template-columns: 1fr;
  }

  /* 二级目录固定在主导航下方，滚动时常驻，可随时横滑切换 */
  .life-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .life-aside {
    position: sticky;
    top: var(--nav-h);
    z-index: 20;
    min-width: 0;
    max-width: 100%;
    max-height: none;
    overflow: visible;
    padding: 8px 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
  }

  .life-nav {
    flex-direction: row;
    gap: 6px;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
    border-left: 0;
    border-bottom: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .life-nav::-webkit-scrollbar { display: none; }

  .life-nav a {
    padding: 8px 12px;
    border: 1px solid var(--line);
    white-space: nowrap;
  }

  .life-nav a::before {
    display: none;
  }

  .life-nav a.is-active {
    color: var(--paper);
    background: var(--ink-2);
    border-color: var(--ink-2);
  }

  .life-nav a.is-active i {
    color: rgba(245, 241, 232, 0.7);
  }
}

@media (max-width: 760px) {
  body {
    font-size: 15px;
  }

  .nav {
    gap: 10px;
  }

  .nav__toggle {
    display: block;
  }

  .nav__links {
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 6px 0;
    background: rgba(245, 241, 232, 0.98);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px -24px rgba(60, 48, 30, 0.6);
  }

  .nav.is-open .nav__links {
    display: flex;
  }

  .nav__link {
    padding: 12px clamp(16px, 4vw, 40px);
    letter-spacing: 0.18em;
  }

  .nav__link::after {
    display: none;
  }

  .nav__link[aria-current="page"] {
    background: rgba(181, 84, 42, 0.06);
  }

  .works-grid,
  .related__grid,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-grid {
    gap: 1px;
  }

  .axis {
    padding: 0 24px 22px;
  }

  .axis__roll {
    height: 320px;
  }

  .map-canvas {
    height: 400px;
  }

  .graph-canvas {
    height: 460px;
  }

  .graph-card {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    width: auto;
    top: auto;
  }

  .map-panel {
    padding: 18px;
  }

  .work-card {
    padding: 20px;
  }

  .reader__body {
    text-align: left;
  }

  .reader__body p {
    text-indent: 2em;
  }

  .life-item {
    padding: 20px 18px;
  }
}

@media (max-width: 600px) {
  .hero__verse {
    letter-spacing: 0.08em;
  }

  .seals {
    gap: 10px;
    margin-top: 34px;
  }

  .seal {
    padding: 22px 12px 20px;
    gap: 10px;
  }

  .seal__note {
    font-size: 11px;
  }

  /* 地图控件与面板在窄屏转为底部堆叠 */
  .map-ctrl {
    flex-wrap: wrap;
    gap: 10px;
  }

  .map-ctrl__range {
    order: 3;
    flex-basis: 100%;
  }

  .map-ctrl__ticks {
    order: 4;
    flex-basis: 100%;
  }

  .home-note {
    gap: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ==========================================================================
   视觉系统强化 · 裱框语言（Layers of Contemplation）
   灵感：QSAM 层叠画框 + 善本图鉴装裱逻辑 + 编辑式排版
   原则：增量覆盖，不改动上方既有规则；只加辨识度，不动功能与布局宽度。
   ========================================================================== */

:root {
  /* 字体比例：放大对比，建立清晰层级 */
  --fs-display: clamp(38px, 6.4vw, 76px);
  --fs-h2: clamp(25px, 3.4vw, 38px);
  --fs-h3: clamp(18px, 2vw, 22px);
  --fs-lead: clamp(14px, 1.5vw, 16px);
  /* 装裱色标：每个板块一种，作为辨识记忆点 */
  --mount-trail: #4a7b7c;   /* 行迹 · 黛青 */
  --mount-works: #a3833d;   /* 作品 · 金赭 */
  --mount-zilin: #6b6152;   /* 日记 · 墨褐 */
  --mount-life: #b5542a;    /* 生活 · 朱砂 */
  --mount-rel: #8a5a3b;     /* 人物 · 赭 */
  --mount-about: #5f5646;   /* 关于 · 淡墨 */
}

/* ---------- 1. 页头：板块印记 + 竖排题款，替代千篇一律的通用页头 ---------- */
.page-head {
  position: relative;
}
.page-head::before {
  /* 大号水墨字标，作为板块的视觉锚 */
  content: attr(data-mark);
  position: absolute;
  right: clamp(-6px, 1vw, 14px);
  top: clamp(6px, 2vh, 24px);
  font-family: var(--kai);
  font-size: clamp(92px, 15vw, 168px);
  line-height: 1;
  color: var(--ink);
  opacity: 0.075;
  pointer-events: none;
  user-select: none;
  writing-mode: vertical-rl;
  letter-spacing: 0.06em;
}
.page-head::after {
  /* 竖排细线题款，呼应古籍版口的界行 */
  content: "";
  position: absolute;
  right: clamp(96px, 12vw, 152px);
  top: clamp(10px, 3vh, 34px);
  bottom: clamp(24px, 5vh, 54px);
  width: 1px;
  background: linear-gradient(180deg, var(--line-2), transparent 82%);
  pointer-events: none;
}
.page-head__eyebrow {
  position: relative;
  display: inline-block;
  padding-left: 34px;
}
.page-head__eyebrow::before {
  /* 朱色小印，作为板块统一符号 */
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 15px;
  height: 15px;
  transform: translateY(-50%);
  border: 1px solid var(--zhu);
  border-radius: 1px;
  background: var(--zhu);
  box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 3px var(--zhu);
  opacity: 0.82;
}
.page-head h1 {
  position: relative;
  font-size: var(--fs-h2);
  letter-spacing: 0.14em;
}
.page-head__lead {
  font-size: var(--fs-lead);
}

/* ---------- 2. 裱框组件：内页卡片统一为「双层画框」语言 ---------- */
.work-card,
.life-item,
.about-sec,
.reader__body,
.map-panel,
.notice,
.related {
  position: relative;
  border: 1px solid var(--line);
}
.work-card::before,
.life-item::before,
.about-sec::before,
.map-panel::before,
.notice::before,
.related::before {
  /* 内框：5px 留白，与首页印章的 ::after 同构 */
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid var(--line);
  opacity: 0.42;
  pointer-events: none;
  transition: opacity 0.35s var(--ease), border-color 0.35s var(--ease);
}
.work-card:hover::before,
.life-item:hover::before,
.about-sec:hover::before,
.map-panel:hover::before,
.related:hover::before {
  opacity: 0.9;
  border-color: rgba(181, 84, 42, 0.42);
}
/* reader 正文是长文容器，内框只做上下的细线，避免干扰阅读 */
.reader__body::before { display: none; }

/* ---------- 3. 板块色标：每个板块的印记用不同装裱色 ---------- */
body[data-mount="trail"] .page-head__eyebrow::before { border-color: var(--mount-trail); background: var(--mount-trail); }
body[data-mount="works"] .page-head__eyebrow::before { border-color: var(--mount-works); }
body[data-mount="zilin"] .page-head__eyebrow::before { border-color: var(--mount-zilin); }
body[data-mount="life"] .page-head__eyebrow::before { border-color: var(--mount-life); }
body[data-mount="rel"] .page-head__eyebrow::before { border-color: var(--mount-rel); }
body[data-mount="about"] .page-head__eyebrow::before { border-color: var(--mount-about); }

/* ---------- 4. 摘句笺：引文块做成独立视觉物件 ---------- */
blockquote,
.life-quote,
.about-quote,
.chat-quote {
  position: relative;
  margin-left: 0;
  padding: 16px 22px 16px 30px;
  background: linear-gradient(100deg, rgba(163, 131, 61, 0.09), rgba(163, 131, 61, 0.02));
  border-left: 3px solid var(--jin);
  font-family: var(--kai);
  color: var(--ink-2);
}
blockquote::before,
.life-quote::before,
.about-quote::before {
  /* 引号用朱色印点，不靠字数 */
  content: "";
  position: absolute;
  left: 10px;
  top: 20px;
  width: 6px;
  height: 6px;
  background: var(--zhu);
  border-radius: 50%;
  opacity: 0.75;
}

/* ---------- 6. 微动效：卡片进入时的轻微上浮，只做一次 ---------- */
.js-ready .work-card,
.js-ready .life-item,
.js-ready .about-sec,
.js-ready .related__item {
  animation: riseIn 0.55s var(--ease) both;
}
@keyframes riseIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
/* 相邻卡片错峰，形成节奏而非齐刷刷出现 */
.js-ready .works-grid > :nth-child(3n+2),
.js-ready .related__grid > :nth-child(3n+2) { animation-delay: 0.06s; }
.js-ready .works-grid > :nth-child(3n+3),
.js-ready .related__grid > :nth-child(3n+3) { animation-delay: 0.12s; }

@media (max-width: 760px) {
  .page-head::before { font-size: 96px; opacity: 0.055; }
  .page-head::after { display: none; }
  .work-card::before,
  .life-item::before,
  .about-sec::before,
  .map-panel::before,
  .notice::before,
  .related::before { inset: 4px; }
}

/* ==========================================================================
   历代朋友圈：总览入口 + 朝代子板块导航
   ========================================================================== */

.era-section {
  margin-top: clamp(48px, 8vh, 88px);
  padding-top: clamp(28px, 4vh, 44px);
  border-top: 1px solid var(--line);
}
.era-section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}
.era-section__head h2 {
  margin: 8px 0 0;
  font-family: var(--kai);
  font-size: var(--fs-h2);
  font-weight: 400;
  letter-spacing: 0.1em;
}
.era-section__head p {
  margin: 0;
  max-width: 34em;
  font-size: 12.5px;
  line-height: 1.9;
  color: var(--ink-3);
}

.era-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
.era-card {
  position: relative;
  display: block;
  padding: 18px 20px 16px;
  background: var(--paper-card);
  border: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.era-card::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid transparent;
  pointer-events: none;
  transition: border-color 0.3s var(--ease);
}
.era-card:hover {
  transform: translateY(-3px);
  border-color: rgba(181, 84, 42, 0.5);
  box-shadow: var(--sh-2);
}
.era-card:hover::after { border-color: rgba(181, 84, 42, 0.28); }
.era-card__years {
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--ink-4);
  font-variant-numeric: tabular-nums;
}
.era-card h3 {
  margin: 7px 0 6px;
  font-family: var(--kai);
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--ink);
}
.era-card p {
  margin: 0 0 12px;
  font-family: var(--kai);
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.7;
}
.era-card__meta {
  display: block;
  font-size: 10.5px;
  color: var(--ink-4);
}
.era-card__go {
  position: absolute;
  right: 16px;
  bottom: 14px;
  font-size: 15px;
  color: var(--zhu);
  opacity: 0.55;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.era-card:hover .era-card__go { transform: translateX(3px); opacity: 1; }
.era-note {
  margin-top: 16px;
  font-size: 11px;
  line-height: 1.9;
  color: var(--ink-4);
}

/* 朝代切换标签 */
.era-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 26px;
}
.era-tab {
  padding: 7px 14px;
  font-family: var(--kai);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  background: transparent;
  border: 1px solid var(--line-2);
  border-radius: 2px;
  text-decoration: none;
  transition: all 0.25s var(--ease);
}
.era-tab:hover { color: var(--zhu); border-color: var(--zhu); }
.era-tab.is-active {
  color: #fff;
  background: var(--zhu);
  border-color: var(--zhu);
}
.era-back {
  display: inline-block;
  margin-top: 14px;
  font-size: 11.5px;
  color: var(--ink-3);
  text-decoration: none;
  border-bottom: 1px solid var(--line-2);
  padding-bottom: 2px;
}
.era-back:hover { color: var(--zhu); border-color: var(--zhu); }

@media (max-width: 760px) {
  .era-section__head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .era-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .era-card { padding: 14px 14px 12px; }
  .era-card h3 { font-size: 18px; }
}

/* 作品集页 → 全集入口 */
.archive-entry {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 34px;
  padding: 20px 24px;
  background: linear-gradient(100deg, rgba(163,131,61,.09), rgba(163,131,61,.02));
  border: 1px solid var(--line);
  border-left: 3px solid var(--jin);
  text-decoration: none;
  color: inherit;
  transition: border-color .3s var(--ease), transform .3s var(--ease);
}
.archive-entry:hover { border-color: rgba(181,84,42,.5); transform: translateX(3px); }
.archive-entry__seal {
  flex: none;
  display: grid; place-items: center;
  width: 42px; height: 42px;
  font-family: var(--kai); font-size: 20px;
  color: var(--zhu);
  border: 2px solid var(--zhu);
  border-radius: 2px;
}
.archive-entry__text { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.archive-entry__text b { font-family: var(--kai); font-size: 16px; font-weight: 400; color: var(--ink); }
.archive-entry__text small { font-size: 11px; color: var(--ink-3); line-height: 1.6; }
.archive-entry__go { font-size: 18px; color: var(--zhu); opacity: .65; }

/* ==========================================================================
   教学任务模式：一句话生成学习单
   ========================================================================== */
.teach-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin-top: 12px;
}
.teach-field { display: flex; flex-direction: column; gap: 5px; flex: 1 1 240px; }
.teach-field span { font-size: 11px; letter-spacing: 0.1em; color: var(--ink-3); }
.teach-field input, .teach-field select {
  padding: 10px 12px;
  font-family: var(--serif); font-size: 13px;
  color: var(--ink-2); background: var(--paper-card);
  border: 1px solid var(--line-2); outline: none;
}
.teach-field input:focus, .teach-field select:focus { border-color: var(--zhu); }
.teach-go {
  padding: 11px 22px;
  font-family: var(--kai); font-size: 14px; letter-spacing: 0.1em;
  color: #fff; background: var(--zhu); border: 1px solid var(--zhu); cursor: pointer;
}
.teach-go:hover { background: #8e3f1f; }
.teach-note { margin-top: 10px; font-size: 11px; color: var(--ink-4); line-height: 1.8; }
.teach-output { margin-top: 36px; }
.teach-output__head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.teach-output__head h2 { margin: 6px 0 0; font-family: var(--kai); font-size: var(--fs-h2); font-weight: 400; }
.teach-output__actions { display: flex; gap: 8px; }
.teach-output__actions button {
  padding: 7px 14px; font-family: var(--serif); font-size: 11.5px;
  color: var(--zhu); background: transparent; border: 1px solid var(--zhu); cursor: pointer;
}
.teach-output__actions button:hover { background: var(--zhu); color: #fff; }
.teach-sheet {
  padding: clamp(20px, 3vw, 36px);
  background: var(--paper-card);
  border: 1px solid var(--line);
}
.teach-block { margin-bottom: 22px; }
.teach-block:last-of-type { margin-bottom: 12px; }
.teach-block h3 {
  margin: 0 0 10px; padding-bottom: 6px;
  font-family: var(--kai); font-size: 17px; font-weight: 400; letter-spacing: 0.08em;
  border-bottom: 1px solid var(--line-2); color: var(--ink);
}
.teach-block ol, .teach-block ul { margin: 0; padding-left: 1.4em; }
.teach-block li { margin-bottom: 6px; font-size: 13px; line-height: 1.9; color: var(--ink-2); }
.teach-text { margin-bottom: 12px; padding: 12px 14px; background: rgba(163,131,61,.06); border-left: 2px solid var(--jin); }
.teach-text h4 { margin: 0 0 6px; font-family: var(--kai); font-size: 14px; font-weight: 400; }
.teach-text h4 a { color: var(--zhu); text-decoration: none; border-bottom: 1px solid var(--line-2); }
.teach-text p { margin: 0 0 6px; font-size: 12.5px; line-height: 1.9; }
.teach-text small { font-size: 10.5px; color: var(--ink-4); }
.teach-srcnote { font-size: 10.5px; line-height: 1.8; color: var(--ink-4); border-top: 1px dashed var(--line); padding-top: 10px; }

@media (max-width: 760px) {
  .teach-output__head { flex-direction: column; align-items: flex-start; }
  .teach-form { flex-direction: column; align-items: stretch; }
}

/* ==========================================================================
   苏轼全集：按需加载 + 解压后的检索界面
   ========================================================================== */

.archive-loading {
  margin-top: 28px;
  padding: clamp(32px, 8vh, 72px) 20px;
  text-align: center;
  border: 1px solid var(--line);
  background: var(--paper-card);
}
.archive-loading__seal {
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  margin: 0 auto 16px;
  font-family: var(--kai);
  font-size: 26px;
  color: var(--zhu);
  border: 2px solid var(--zhu);
  border-radius: 2px;
  animation: sealPulse 2s var(--ease) infinite;
}
@keyframes sealPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .55; transform: scale(.94); }
}
.archive-loading p { margin: 0 0 6px; font-family: var(--kai); font-size: 16px; color: var(--ink-2); }
.archive-loading small { font-size: 11px; color: var(--ink-4); }

.archive-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin-top: 8px;
}
.archive-search {
  flex: 1 1 300px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line-2);
  background: var(--paper-card);
}
.archive-search span { font-family: var(--kai); font-size: 13px; color: var(--zhu); }
.archive-search input {
  flex: 1; min-width: 0;
  font-family: var(--serif); font-size: 13px;
  color: var(--ink-2);
  background: transparent; border: 0; outline: none;
}
.archive-genres { display: flex; flex-wrap: wrap; gap: 6px; }
.archive-genre {
  padding: 7px 13px;
  font-family: var(--kai); font-size: 13px;
  color: var(--ink-3);
  background: transparent;
  border: 1px solid var(--line-2);
  border-radius: 2px;
  cursor: pointer;
  transition: all .25s var(--ease);
}
.archive-genre small { font-size: 10px; color: var(--ink-4); margin-left: 3px; }
.archive-genre:hover { color: var(--zhu); border-color: var(--zhu); }
.archive-genre.is-active { color: #fff; background: var(--zhu); border-color: var(--zhu); }
.archive-genre.is-active small { color: rgba(255,255,255,.75); }

.archive-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 12px;
}
.archive-item {
  position: relative;
  padding: 16px 18px 14px;
  background: var(--paper-card);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.archive-item:hover {
  border-color: rgba(181,84,42,.55);
  transform: translateY(-2px);
  box-shadow: var(--sh-2);
}
.archive-item__top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.archive-item__year { font-size: 10.5px; color: var(--ink-4); font-variant-numeric: tabular-nums; }
.archive-item h3 {
  margin: 0 0 8px;
  font-family: var(--kai); font-size: 16px; font-weight: 400;
  line-height: 1.5; color: var(--ink);
}
.archive-item p {
  margin: 0 0 10px;
  font-size: 11.5px; line-height: 1.8; color: var(--ink-3);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.archive-item__go { font-size: 10.5px; color: var(--zhu); opacity: .75; }
.archive-empty { padding: 40px 10px; text-align: center; font-family: var(--kai); color: var(--ink-3); }
.archive-more { margin-top: 18px; text-align: center; }
.archive-more button {
  padding: 9px 24px;
  font-family: var(--serif); font-size: 12px; letter-spacing: .1em;
  color: var(--zhu); background: transparent;
  border: 1px solid var(--zhu); border-radius: 2px; cursor: pointer;
}
.archive-more button:hover { background: var(--zhu); color: #fff; }

.archive-reader {
  position: relative;
  margin-top: 34px;
  padding: clamp(24px, 4vw, 42px);
  background: var(--paper-card);
  border: 1px solid var(--line-2);
  box-shadow: var(--sh-2);
  scroll-margin-top: 76px;
}
.archive-reader__close {
  position: absolute; top: 12px; right: 14px;
  width: 30px; height: 30px;
  font-size: 19px; line-height: 1;
  color: var(--ink-3); background: none;
  border: 1px solid var(--line-2); cursor: pointer;
}
.archive-reader__close:hover { color: var(--zhu); border-color: var(--zhu); }
.archive-reader h2 {
  margin: 10px 0 18px;
  font-family: var(--kai); font-size: clamp(22px, 3vw, 30px); font-weight: 400;
  letter-spacing: .08em; color: var(--ink);
}
.archive-reader .reader__body {
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 15.5px;
  line-height: 2.1;
}

@media (max-width: 760px) {
  .archive-list { grid-template-columns: 1fr; }
  .archive-tools { flex-direction: column; align-items: stretch; }
}
@media print {
  .nav,
  .hero__down,
  .map-ctrl,
  .stagebar,
  .life-nav {
    display: none !important;
  }
}
