/* ==========================================================================
   俗世闲想 · 水墨留白主题
   纸：米白 ｜ 墨：黛黑 ｜ 印：朱砂 —— 一处红，满纸静
   ========================================================================== */

:root {
  --paper:      #f7f4ec;  /* 纸色 */
  --paper-deep: #efeade;  /* 深一度的纸 */
  --ink:        #2f2b23;  /* 墨 */
  --ink-soft:   #6b6455;  /* 淡墨 */
  --ink-faint:  #a29a88;  /* 宿墨 */
  --seal:       #93231f;  /* 印泥红（唯一点缀色） */
  --seal-deep:  #6f1714;  /* 沉印 */
  --hairline:   #ddd5c3;  /* 界栏细线 */
  --font-kai:   "LXGW WenKai", "Kaiti SC", "STKaiti", "KaiTi", "Songti SC", serif;
  --font-song:  "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", "LXGW WenKai", serif;
}

/* ---------- 纸与墨 ---------- */

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-song);
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: rgba(147, 35, 31, 0.16);
  color: var(--ink);
}

h1, h2, h3, h4, h5, h6,
.page__title, .site-title, .archive__item-title {
  font-family: var(--font-kai);
  color: var(--ink);
  letter-spacing: 0.04em;
}

/* ---------- 链接：墨中一线朱 ---------- */

a { color: var(--seal); }

a:hover, a:active, a:focus {
  color: var(--seal-deep);
}

.page__content a,
.landing a,
.archive__item-title a {
  text-decoration: underline;
  text-decoration-color: rgba(147, 35, 31, 0.35);
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.page__content a:hover { text-decoration-color: var(--seal); }

/* ---------- 顶栏：低调如书眉 ---------- */

.masthead {
  background: var(--paper);
  border-bottom: 1px solid var(--hairline);
  box-shadow: none;
}

/* 顶栏整条（站名 + 导航 + 搜索按钮）与纸色完全一致：
   主题 air 皮肤把 $background-color 设成了 #eee，.greedy-nav 因此带一层灰底，
   与纸色 #f7f4ec 打架——这里把内层都压平成纸色。 */
.greedy-nav,
.greedy-nav .visible-links,
.greedy-nav .hidden-links,
.greedy-nav button,
.masthead__inner-wrap {
  background: var(--paper);
}

.greedy-nav .hidden-links {
  border: 1px solid var(--hairline);
  border-radius: 3px;
  box-shadow: 0 2px 10px rgba(47, 43, 35, 0.09);
}

.greedy-nav button {
  color: var(--ink-soft);
  border: none;
}

.greedy-nav button:hover { color: var(--seal); }

.site-title {
  font-family: var(--font-kai);
  font-size: 1.35em;
  letter-spacing: 0.22em;
  margin-left: 0.2em;
}

.site-title a { color: var(--ink); }
.site-title a:hover { color: var(--seal); text-decoration: none; }

.greedy-nav a {
  color: var(--ink-soft);
  font-family: var(--font-kai);
  letter-spacing: 0.12em;
}

.greedy-nav a:hover {
  color: var(--seal);
  background: transparent;
}

.greedy-nav .visible-links a:before { background: var(--seal); }

/* ---------- 正文：书页式排版 ----------
   注意：正文 font-size / line-height 由 post.html 布局内联控制（1.2rem / 2），
   此处不再重复声明——曾经的 1.06rem/2.05 在文章页被内联压制（死规则），
   却会让本地预览页与真实站排版不一致，故删除。 */

.page__title {
  font-size: 1.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.page__content p { margin-bottom: 1.45em; }

.page__content h2 {
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 0.35em;
}

.page__content h2, .page__content h3 { font-weight: 600; }

.page__meta, .page__taxonomy, .page__date {
  font-family: var(--font-song);
  color: var(--ink-faint);
}

.page__meta .far, .page__meta .fas { color: var(--ink-faint); }

.page__meta a, .page__taxonomy a {
  color: var(--ink-soft);
  border-bottom: none;
}

blockquote {
  border-left: 3px solid var(--seal);
  background: var(--paper-deep);
  color: var(--ink-soft);
  font-style: normal;
  padding: 0.8em 1.4em;
  border-radius: 0 2px 2px 0;
}

hr { border-top: 1px solid var(--hairline); }

/* 代码块与行内代码退到纸色 */

.page__content pre, .page__content code,
pre, code, kbd, samp {
  font-family: "SF Mono", "Menlo", "Consolas", monospace;
}

.page__content code {
  background: var(--paper-deep);
  color: var(--seal-deep);
  font-size: 0.88em;
}

/* ---------- 侧栏作者卡 ---------- */

.sidebar__right, .sidebar {
  font-family: var(--font-song);
}

.author__avatar img {
  border-radius: 3px;
  border: 1px solid var(--hairline);
  box-shadow: none;
}

.author__bio {
  font-family: var(--font-kai);
  color: var(--ink-soft);
  font-size: 0.92em;
  line-height: 1.9;
}

.author__name { font-family: var(--font-kai); letter-spacing: 0.2em; }

.author__urls a { color: var(--ink-soft); }
.author__urls a:hover { color: var(--seal); }

/* ---------- 页脚与翻页 ---------- */

.page__footer {
  background: var(--paper);
  color: var(--ink-faint);
  border-top: 1px solid var(--hairline);
  font-family: var(--font-kai);
  letter-spacing: 0.1em;
}

.page__footer a { color: var(--ink-soft); }
.page__footer a:hover { color: var(--seal); }

.pagination--pager {
  color: var(--ink-soft);
  border: 1px solid var(--hairline);
  background: var(--paper);
}

.pagination--pager:hover {
  color: var(--seal);
  border-color: var(--seal);
  background: var(--paper-deep);
}

/* ---------- 目录/归档/搜索页 ---------- */

.archive__item-title a { color: var(--ink); }
.archive__item-title a:hover { color: var(--seal); }
.archive__item-excerpt { color: var(--ink-soft); }
.list__item .page__meta { color: var(--ink-faint); }

.search__toggle { color: var(--ink-soft); }
.search__toggle:hover { color: var(--seal); }

/* ==========================================================================
   首页 · 卷首（一页书题：题眉 · 题名 · 落款 · 朱印 · 压脚线）
   ========================================================================== */

/* 注意：主题给 #main 用的是 id 选择器（max-width: 1280px / padding: 1rem），
   类选择器 .landing 压不住，这里必须写成 #main.landing（1,1,0）才收得回书页宽。
   容器放宽到 888px（= 840px 正文 + 左右各 1.5rem padding），让压脚线下的
   最新全文块与单篇文章正文同宽；卷首本身收窄居中（见 .landing__hero）。 */

#main.landing {
  max-width: 906px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* 卷首（题眉·题名·落款·朱印·压脚线）保持原先的书题页紧凑宽度 */
.landing__hero {
  max-width: 632px;
  margin-left: auto;
  margin-right: auto;
}

/* 首屏：撑满一屏，上下居中 */

.landing__hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: calc(100vh - 24rem);
  padding: 4rem 0 5rem;
  isolation: isolate;
}

/* 一枚极淡的墨晕，衬于题名之后，似宣纸洇开的水痕 */

.landing__hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 50%;
  width: min(74vw, 440px);
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -56%);
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(47, 43, 35, 0.055) 0%,
    rgba(47, 43, 35, 0.028) 42%,
    rgba(47, 43, 35, 0) 70%);
}

/* 题眉：小字配左右渐隐界栏 */

.landing__motto {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.8rem, 3vw, 1.4rem);
  font-family: var(--font-kai);
  color: var(--ink-soft);
  font-size: 0.95rem;
  letter-spacing: 0.42em;
  margin: 0 0 2.4rem;
  white-space: nowrap;   /* 书页宽收窄后题眉仍走一行，不折字 */
}

.landing__motto > span { margin-left: 0.42em; }  /* 抵消末字后的字距，视觉居中 */

/* 两侧界栏可伸缩：宽屏最长 3.2rem，窄屏自动收短，不与题眉抢位 */
.landing__motto::before,
.landing__motto::after {
  content: "";
  flex: 1 1 auto;
  min-width: 0.6rem;
  max-width: 3.2rem;
  height: 1px;
}

.landing__motto::before { background: linear-gradient(90deg, rgba(221, 213, 195, 0), var(--hairline)); }
.landing__motto::after  { background: linear-gradient(270deg, rgba(221, 213, 195, 0), var(--hairline)); }

.landing__title {
  font-family: var(--font-kai);
  font-size: clamp(2.9rem, 8.2vw, 4.4rem);
  font-weight: 600;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  color: var(--ink);
  margin: 0 0 1.6rem;
  line-height: 1.28;
}

.landing__sub {
  font-family: var(--font-song);
  color: var(--ink-faint);
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  margin: 0;
}

/* 印章：一枚小小的朱印（题名落款） */

.landing__seal {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--seal);
  color: #f6f2e8;
  font-family: var(--font-kai);
  font-size: 0.78rem;
  line-height: 1.5;
  letter-spacing: 0.1em;
  padding: 0.62em 0.72em;
  border-radius: 3px;
  margin-top: 2.8rem;
  box-shadow: inset 0 0 0 1.5px rgba(246, 242, 232, 0.55),
              0 2px 6px rgba(147, 35, 31, 0.16);
  transform: rotate(-1.6deg);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  user-select: none;
}

.landing__seal:hover {
  transform: rotate(0deg) scale(1.05);
  box-shadow: inset 0 0 0 1.5px rgba(246, 242, 232, 0.6),
              0 3px 10px rgba(147, 35, 31, 0.22);
}

/* 卷末压脚线：一线一朱点，收住整页 */

.landing__rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  margin: 3.6rem auto 0;
  width: min(58%, 240px);
}

.landing__rule::before,
.landing__rule::after {
  content: "";
  flex: 1;
  height: 1px;
}

.landing__rule::before { background: linear-gradient(90deg, rgba(221, 213, 195, 0), var(--hairline)); }
.landing__rule::after  { background: linear-gradient(270deg, rgba(221, 213, 195, 0), var(--hairline)); }

.landing__rule-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--seal);
  opacity: 0.75;
}

/* ---------- 压脚线之下：直接铺开最新一篇文章的全文 ----------
   宽度与单篇文章正文同宽（840px 栏位，容器 888px 减左右 padding）；
   正文取 .page__content 类的全套装饰（朱点小标题、装裱图片、账册表格），
   只把字号与缩进按首页调一档。 */

.landing__latest {
  max-width: 840px;
  margin: 4.4rem auto 0;
  padding-bottom: 1.6rem;
}

.landing__latest-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9em;
  margin: 0 0 1.1rem;
  font-family: var(--font-kai);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-indent: 0.2em;
  color: var(--ink-faint);
}

.landing__latest-cat {
  padding: 0.12em 0.62em;
  border: 1px solid var(--hairline);
  border-radius: 2px;
  letter-spacing: 0.14em;
  text-indent: 0.14em;
}

.landing__latest-title {
  margin: 0 0 2.8rem;
  text-align: center;
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-indent: 0.12em;
  line-height: 1.65;
}

.landing__latest-title a { color: var(--ink); text-decoration: none; }
.landing__latest-title a:hover { color: var(--seal); }

.landing__latest-body {
  font-size: 1.14rem;
  line-height: 2;
  color: var(--ink);
}

.landing__latest-body p {
  text-indent: 2em;
  margin-bottom: 1.8em;
}

/* 卷首逐行淡入（整页淡入由 .landing 关闭，见文末动效段）
   注意：整段用只动 opacity 的 fade-in，否则 fade-up 的 transform: none
   会把朱印的 rotate(-1.6deg) 一并抹掉；标题三行再叠加 fade-up 上浮。 */

@media (prefers-reduced-motion: no-preference) {
  .landing__hero > * {
    animation: fade-in 0.9s ease both;
  }

  .landing__motto,
  .landing__title,
  .landing__sub {
    animation-name: fade-up;
    animation-duration: 0.8s;
    animation-timing-function: cubic-bezier(0.22, 0.61, 0.36, 1);
  }

  .landing__hero > *:nth-child(1) { animation-delay: 0.05s; }
  .landing__hero > *:nth-child(2) { animation-delay: 0.15s; }
  .landing__hero > *:nth-child(3) { animation-delay: 0.25s; }
  .landing__hero > *:nth-child(4) { animation-delay: 0.35s; }
  .landing__hero > *:nth-child(5) { animation-delay: 0.5s; }
}

/* ---------- 移动端微调 ----------
   断点用 63.99em：与主题 64em 断点对齐，769-1023px 平板竖屏同样吃到留白规则。
   （原 .page__content 1.02rem 一条因被 post.html 内联样式压制从未生效，删除。） */

@media (max-width: 63.99em) {
  /* 卷首：手机上留出一屏内的呼吸感，题名交给 clamp() 伸缩，不再写死字号 */
  .landing__hero {
    min-height: calc(100vh - 20rem);
    padding: 2.6rem 0 3.4rem;
  }

  .landing__motto { font-size: 0.86rem; margin-bottom: 1.9rem; }
  .landing__seal { margin-top: 2.2rem; }
  .landing__rule { margin-top: 2.8rem; }

  /* 最新一篇：手机上字号收到与文章页一致（17px 档） */
  .landing__latest { margin-top: 3.2rem; }
  .landing__latest-title { font-size: 1.3rem; }
  .landing__latest-body { font-size: 1.06rem; }
}

/* ==========================================================================
   文章浏览 · 一页三签（分类 / 标签 / 年份）
   ========================================================================== */

.browse { margin-top: 1.6rem; }

/* ==========================================================================
   文章浏览 · 可叠加筛选
   ========================================================================== */

/* 容器：宽度交给主题的 article.page（与文章页同宽，左右留白一致） */

.browse-page {
  width: 100%;
  padding: 1.6rem 0 3rem;
  box-sizing: border-box;
}

/* ---------- 留言板：与浏览页同宽的题头 + 留言区 ---------- */

.guestbook-page { padding-bottom: 2.4rem; }

.guestbook__body {
  max-width: 840px;
  margin: 1.8rem auto 0;
  padding: 0 1.5rem;
  box-sizing: border-box;
}

.browse-page__head {
  text-align: center;
  margin-bottom: 1.2rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--hairline);
}

.browse-page__title {
  font-family: var(--font-kai);
  font-size: 1.85rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-indent: 0.32em;
  color: var(--ink);
  margin: 0 0 0.45rem;
}

.browse-page__sub {
  font-family: var(--font-kai);
  font-size: 0.86rem;
  letter-spacing: 0.22em;
  text-indent: 0.22em;
  color: var(--ink-faint);
  margin: 0;
}

/* ---------- 关于作者：顶部统一页头（与浏览页/留言板同宽、同位置） ----------
   页头放在 #main 之外、独占一行，所以水平位置得自己对齐：
   · 小屏：两侧留白用与主题 article.page 相同的 1.3rem；
   · 宽屏（≥80em）：收成 840px 居中——正好等于浏览页页头所占的 840px 区域。
   1.6rem 的顶部留白与 .browse-page 的 padding-top 完全一致，
   因此页头落点与浏览页/留言板分毫不差。
   注意：本站根字号是 22px（不是 16px），1.6rem = 35.2px。 */

.about-head {
  padding: 1.6rem 1.3rem 0;
  box-sizing: border-box;
}

@media (min-width: 80em) {
  .about-head {
    max-width: 840px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 0;
    padding-right: 0;
  }
}

/* 页头与下方作者资料卡之间的呼吸 */
.about-head + #main { margin-top: 0.2rem; }

.facet__groups {
  margin: 1.6rem 0 0;
}

.facet__group {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem 1.1rem;
  padding: 0.7rem 0;
  border-bottom: 1px dashed var(--hairline);
}

.facet__group-label {
  flex-shrink: 0;
  font-family: var(--font-kai);
  font-size: 0.95rem;
  letter-spacing: 0.3em;
  color: var(--ink-faint);
  padding-top: 0.32em;
  white-space: nowrap;
}

.facet__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.6rem;
}

/* 标签行：默认收起（hidden），选中分类后展开该分类的标签 */
.facet__group--tags[hidden] { display: none; }

.facet__tag-set {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.6rem;
}

.facet__tag-set[hidden] { display: none; }

.facet__chip {
  appearance: none;
  background: transparent;
  border: 1px solid var(--hairline);
  border-radius: 3px;
  cursor: pointer;
  font-family: var(--font-kai);
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  padding: 0.26em 0.8em;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.facet__chip:hover {
  color: var(--seal);
  border-color: var(--seal);
}

.facet__chip.is-active {
  background: var(--seal);
  border-color: var(--seal);
  color: #f6f2e8;
}

.facet__chip-count {
  font-size: 0.78em;
  opacity: 0.72;
  margin-left: 0.45em;
  font-variant-numeric: tabular-nums;
}

.facet__status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 0.2rem;
}

.facet__count {
  font-family: var(--font-kai);
  font-size: 0.9rem;
  letter-spacing: 0.18em;
  color: var(--ink-soft);
}

.facet__clear {
  appearance: none;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: var(--font-kai);
  font-size: 0.88rem;
  letter-spacing: 0.14em;
  color: var(--seal);
  border-bottom: 1px dotted rgba(147, 35, 31, 0.5);
  padding: 0.1em 0.15em;
}

.facet__clear:hover {
  color: var(--seal-deep);
  border-bottom-color: var(--seal-deep);
}

.facet__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.facet__item {
  padding: 0.95rem 0.35rem;
  border-bottom: 1px dashed var(--hairline);
  transition: background 0.15s ease;
}

.facet__item:hover { background: var(--paper-deep); }

.facet__item.is-hidden { display: none; }

.facet__title {
  display: inline-block;
  font-family: var(--font-song);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-decoration: none;
}

.facet__item:hover .facet__title { color: var(--seal); }

/* 主题给链接的全局下划线在列表场景不体面，压掉（悬停也只变色不加线） */
.browse-page .facet__title,
.browse-page .facet__title:hover,
.browse-page .facet__title:focus {
  text-decoration: none;
}

.facet__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.7rem;
  margin-top: 0.4rem;
  font-size: 0.78rem;
}

.facet__meta-cat {
  color: var(--seal-deep);
  border: 1px solid rgba(147, 35, 31, 0.32);
  border-radius: 2px;
  padding: 0 0.5em;
  line-height: 1.65;
}

.facet__meta-tag {
  color: var(--ink-soft);
}

.facet__meta-tag::before {
  content: "· ";
  color: var(--ink-faint);
}

.facet__meta-date {
  margin-left: auto;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.facet__empty {
  text-align: center;
  font-family: var(--font-kai);
  letter-spacing: 0.35em;
  text-indent: 0.35em;
  color: var(--ink-faint);
  padding: 3rem 0;
}

@media (max-width: 63.99em) {
  .facet__group { flex-direction: column; gap: 0.45rem; }
  .facet__meta-date { margin-left: 0; }
}

/* ==========================================================================
   全站精修 · 纸感与书卷气
   ========================================================================== */

/* ---------- 纸面细噪点（极淡，非 retina 上近似宣纸纹理） ---------- */

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- 正文：通篇同字号同字体 ----------
   原「首字下沉」（放大红色首字）已按要求取消：正文第一段与其他段落完全一致，
   首字不再放大、不再变朱色。段落 2 字符缩进仍来自 post.html 内联样式，
   所以第一段照旧缩进两个字，与通篇统一。 */

/* ---------- 小节标题：一枚朱点 ---------- */

.page__content h2 {
  position: relative;
  padding-left: 0.75em;
}

.page__content h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  background: var(--seal);
  opacity: 0.75;
  transform: rotate(45deg);
}

/* ---------- 图片：装裱 ---------- */

.page__content img {
  border: 1px solid var(--hairline);
  border-radius: 2px;
  padding: 0.45em;
  background: #fffdf8;
  box-shadow: 0 1px 4px rgba(47, 43, 35, 0.07);
}

/* ---------- 表格：账册 ---------- */

.page__content table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.95rem;
}

.page__content th {
  font-family: var(--font-kai);
  font-weight: 600;
  letter-spacing: 0.08em;
  background: var(--paper-deep);
  border-bottom: 1px solid var(--hairline);
}

.page__content th,
.page__content td {
  padding: 0.5em 0.9em;
  border-bottom: 1px dashed var(--hairline);
}

.page__content tr:hover td { background: var(--paper-deep); }

/* ---------- 归档 / 目录列表条目 ---------- */

.archive__item {
  padding: 0.15rem 0.35rem;
  border-radius: 2px;
  transition: background 0.15s ease;
}

.archive__item:hover { background: var(--paper-deep); }

.archive__item:hover .archive__item-title a { color: var(--seal); }

/* ---------- 分类 / 标签索引：小签 ---------- */

.taxonomy__index a {
  display: inline-block;
  border: 1px solid var(--hairline);
  border-radius: 3px;
  background: transparent;
  padding: 0.22em 0.75em;
  font-size: 0.92rem;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.taxonomy__index a:hover {
  color: var(--seal);
  border-color: var(--seal);
  text-decoration: none;
}

.taxonomy__count {
  font-family: var(--font-song);
  font-size: 0.78em;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

/* ---------- 回到顶部 ---------- */

.back-to-top {
  font-family: var(--font-kai);
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  color: var(--ink-faint);
}

.back-to-top:hover { color: var(--seal); }

/* ---------- 搜索浮层 ---------- */

.search-content__inner-wrap {
  background: var(--paper);
  border-bottom: 1px solid var(--hairline);
}

.search-input-wrap .search-input {
  border-bottom: 1px solid var(--hairline);
  color: var(--ink);
  font-family: var(--font-song);
}

.search-input-wrap .search-input:focus {
  border-bottom-color: var(--seal);
  box-shadow: none;
}

/* ---------- 面包屑 ---------- */

.breadcrumbs {
  font-family: var(--font-kai);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
}

.breadcrumbs a { color: var(--ink-soft); }
.breadcrumbs a:hover { color: var(--seal); }

/* ---------- 按钮 ---------- */

.btn {
  font-family: var(--font-kai);
  letter-spacing: 0.1em;
  background: var(--paper);
  color: var(--ink-soft);
  border: 1px solid var(--hairline);
  box-shadow: none;
}

.btn:hover {
  background: var(--paper-deep);
  color: var(--seal);
  border-color: var(--seal);
}

/* ---------- 页脚：版权与来信入口同行，整行居中 ---------- */

.page__footer footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5em;
  text-align: center;
}

/* 主题把版权字色设成 $footer-text-color（air 皮肤下混入白，纸底上几乎看不见），
   这里连同 .page__footer-copyright 一起压回淡墨。 */

.page__footer,
.page__footer footer,
.page__footer-copyright,
.page__footer-copyright p,
.page__footer p {
  color: var(--ink-soft);
}

.page__footer-copyright p { margin: 0; }

/* 版权行末尾的来信入口：一枚信封图标，与文字同色，悬停转朱 */
.page__footer-copyright .footer__mail {
  display: inline-block;
  margin-left: 0.45em;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.18s ease, transform 0.18s ease;
}

.page__footer-copyright .footer__mail i { font-size: 1em; vertical-align: -0.08em; }

.page__footer-copyright .footer__mail:hover,
.page__footer-copyright .footer__mail:focus {
  color: var(--seal);
  transform: translateY(-1px);
}

/* ---------- 内容淡入（尊重系统减弱动效设置） ---------- */

@media (prefers-reduced-motion: no-preference) {
  #main {
    animation: fade-up 0.5s ease both;
  }

  /* 卷首改由 .landing__hero 子元素逐行淡入（见首页段），整页淡入在此关闭 */
  #main.landing { animation: none; }

  @keyframes fade-up {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
  }

  @keyframes fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
  }
}

/* ---------- 细滚动条 ---------- */

::-webkit-scrollbar { width: 9px; }
::-webkit-scrollbar-track { background: var(--paper-deep); }
::-webkit-scrollbar-thumb { background: var(--hairline); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-faint); }

/* ==========================================================================
   文章分享 · 微博 / 微信 / 小红书 / 抖音
   纸墨风按钮：细边、淡字，前置各渠道官方图标（内联 SVG，无外链请求），
   常态品牌色压低一档，悬停点亮。
   ========================================================================== */

.share {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 2.8rem 0 1.6rem;
  font-family: var(--font-kai);
}

.share__label {
  font-size: 0.82rem;
  letter-spacing: 0.22em;
  text-indent: 0.22em;
  color: var(--ink-faint);
  margin-right: 0.2rem;
}

.share__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.36em 1.05em;
  border: 1px solid var(--hairline);
  border-radius: 3px;
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--font-kai);
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  line-height: 1.9;
  text-decoration: none;
  cursor: pointer;
  appearance: none;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

/* 平台图标：内联 SVG，尺寸随字号走，颜色取各渠道品牌色 */

.share__icon {
  flex: none;
  width: 1.05em;
  height: 1.05em;
  fill: var(--brand, var(--ink-faint));
  opacity: 0.8;
  transition: opacity 0.18s ease;
}

.share__btn:hover,
.share__btn:focus-visible {
  color: var(--seal);
  border-color: var(--seal);
  background: rgba(255, 253, 248, 0.6);
  text-decoration: none;
}

.share__btn:hover .share__icon,
.share__btn:focus-visible .share__icon { opacity: 1; }

.share__btn--weibo       { --brand: #e6162d; }
.share__btn--wechat      { --brand: #07c160; }
.share__btn--xiaohongshu { --brand: #ff2442; }
.share__btn--douyin      { --brand: #161823; }

/* 微信二维码弹层 */

.share-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  width: fit-content;
  margin: 0 auto 1.6rem;
  padding: 1.1rem 1.3rem;
  border: 1px solid var(--hairline);
  border-radius: 4px;
  background: #fffdf8;
  box-shadow: 0 2px 12px rgba(47, 43, 35, 0.07);
}

.share-qr[hidden] { display: none; }

.share-qr__code img,
.share-qr__code canvas {
  display: block;
  width: 180px;
  height: 180px;
}

.share-qr__hint {
  margin: 0;
  font-family: var(--font-kai);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
}

.share-qr__copy {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--font-kai);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-decoration: underline;
  text-decoration-color: rgba(147, 35, 31, 0.35);
  text-underline-offset: 4px;
  cursor: pointer;
}

.share-qr__copy:hover { color: var(--seal); }

/* 复制/分享后的轻提示 */

.share-toast {
  position: fixed;
  left: 50%;
  bottom: 3rem;
  transform: translateX(-50%);
  z-index: 9999;
  max-width: min(88vw, 26rem);
  padding: 0.7em 1.4em;
  border-radius: 3px;
  background: rgba(47, 43, 35, 0.92);
  color: #f6f2e8;
  font-family: var(--font-kai);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-align: center;
  line-height: 1.7;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.share-toast.is-on { opacity: 1; }

/* ==========================================================================
   移动端阅读优化 · 参考微信读书
   覆盖手机（≤480px）到平板竖屏（≤1023px），断点与主题 64em 对齐。
   ========================================================================== */

@media (max-width: 63.99em) {

  /* 1) 页面左右留白 ≈ 屏宽 5.5%（微信读书正文边距比例），最小 1.25rem。
        .page 是文章页与浏览页共用容器（article.page），标题、正文、
        分享按钮、评论、筛选列表全部随之获得边距。 */
  .page {
    padding-left: max(1.25rem, 5.5vw);
    padding-right: max(1.25rem, 5.5vw);
    box-sizing: border-box;
  }

  /* 2) 正文 17px / 1.85 行高（微信读书默认阅读档）。
        用 .page .page__content（0,2,0）压过 post.html 内联的
        .page__content（0,1,0），无需 !important。 */
  .page .page__content {
    font-size: 1.0625rem;
    line-height: 1.85;
  }

  /* 3) 分享栏在窄屏两行排布，按钮略收 */
  .share { gap: 0.45rem; }
  .share__label { width: 100%; text-align: center; margin: 0 0 0.1rem; }
  .share__btn { padding: 0.32em 0.85em; font-size: 0.8rem; }

  /* 4) 微信二维码弹层：手机上收窄，避免溢出 */
  .share-qr { padding: 1rem 1.1rem; }
  .share-qr__code img { width: 160px; height: 160px; }

  /* 5) 浏览页筛选列表：标题与条目随窄屏收紧 */
  .facet__count { white-space: normal; }
}

