/*
Theme Name: Qin Cui Leaf 秦翠叶语
Theme URI: https://blog.qincui.cc
Author: 秦翠
Author URI: https://qincui.cc
Description: 秦翠叶语 —— 文艺杂志编排 · 暖纸低饱和。以暖米宣纸为底、竹绿为骨、暖陶为韵，用杂志式栅格与错落卡片流承载图文内容。内置深色模式、文章目录、阅读进度、代码高亮与一键复制、全站搜索浮层、分类彩色标签与时间轴归档。零外部依赖，经典 PHP 模板，不改写任何核心文件。
Version: 2.4.1
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: qincui-leaf
Tags: blog, magazine, two-columns, right-sidebar, custom-colors, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, rtl-language-support, wide-blocks, block-styles
*/

/* ==========================================================================
   0. 设计变量 —— 奶油暖纸 · 去色块化
   ========================================================================== */
:root {
  /* 纸 · 奶油暖底，比纯米白更柔，比冷白更亲 */
  --paper:        #FAF5EC;
  --paper-raised: #FEFCF8;
  --paper-sunken: #F3EADB;
  --paper-tint:   #F7EFE2;

  /* 墨 · 暖褐文字 */
  --ink:    #3A322A;
  --ink-2:  #574E43;
  --ink-3:  #837768;
  --ink-4:  #ADA192;

  /* 线 · 实线为主，不使用虚线 */
  --line:   #E7DACA;
  --line-2: #F0E7D9;

  /* 竹 · 主色（略降饱和，避免与浅绿站点撞色） */
  --accent:       #4A7A63;
  --accent-hover: #39614E;
  --accent-soft:  #EBF1EC;
  --accent-ring:  rgba(74, 122, 99, .16);

  /* 暖陶 · 点缀 */
  --bronze:      #B98A5B;
  --bronze-soft: #F5EADB;

  /* 朱印 · 仅用于置顶等强调标记 */
  --seal:      #A85446;
  --seal-soft: #F6E7E3;

  /* 描边强调（替代彩色分类块） */
  --rule:       #DCCDB8;
  --rule-strong:#C7B39A;

  /* 阴影 · 极淡，靠层次而非投影 */
  --shadow-xs: 0 1px 2px rgba(92, 74, 54, .04);
  --shadow-sm: 0 2px 10px rgba(92, 74, 54, .05);
  --shadow:    0 10px 30px rgba(92, 74, 54, .07);
  --shadow-lg: 0 20px 50px rgba(92, 74, 54, .10);

  /* 排版 */
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", "STSong", Georgia, serif;
  --sans:  -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
           "Noto Sans SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --mono:  "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --fs-body:  17.5px;
  --lh-body:  1.9;
  --measure:  42rem;     /* 正文可读宽度，略收窄以提升专注 */
  --container: 74rem;

  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 18px;

  --header-h: 74px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* 深色：暖褐夜色，保留纸的温度 */
[data-theme="dark"] {
  --paper:        #1B1714;
  --paper-raised: #231E1A;
  --paper-sunken: #141110;
  --paper-tint:   #2A231D;

  --ink:    #EDE4D6;
  --ink-2:  #CFC4B3;
  --ink-3:  #9E9285;
  --ink-4:  #776C5F;

  --line:   #332B23;
  --line-2: #292219;

  --accent:       #77AC90;
  --accent-hover: #8DC0A4;
  --accent-soft:  #212E28;
  --accent-ring:  rgba(119, 172, 144, .2);

  --bronze:      #C79A6B;
  --bronze-soft: #322719;

  --seal:      #C98073;
  --seal-soft: #342320;

  --rule:       #3B3229;
  --rule-strong:#4E4237;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, .34);
  --shadow:    0 10px 30px rgba(0, 0, 0, .4);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, .5);
}

/* ==========================================================================
   1. 重置与基础
   ========================================================================== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color .3s var(--ease), color .3s var(--ease);
}

/* 宣纸肌理：极淡的双色晕染 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(ellipse at 12% 8%,  rgba(190, 140, 85, .05) 0%, transparent 46%),
    radial-gradient(ellipse at 88% 92%, rgba(63, 122, 92, .045) 0%, transparent 46%),
    radial-gradient(ellipse at 62% 38%, rgba(190, 140, 85, .025) 0%, transparent 40%);
}
[data-theme="dark"] body::before { opacity: .5; }

img, svg, video { max-width: 100%; height: auto; display: block; }
svg { display: inline-block; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color .22s var(--ease), background-color .22s var(--ease), border-color .22s var(--ease);
}
a:hover { color: var(--bronze); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.38;
  color: var(--ink);
  letter-spacing: .01em;
}

p { margin-bottom: 1.1em; }
p:last-child { margin-bottom: 0; }

ul, ol { padding-left: 1.4em; }

::selection { background: var(--bronze-soft); color: var(--ink); }

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }

/* 焦点可见性 */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

/* 屏幕阅读器专用 */
.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
  height: 1px; width: 1px; margin: -1px; overflow: hidden;
  padding: 0; position: absolute !important; word-wrap: normal !important;
}
.skip-link:focus {
  position: fixed !important; top: 12px; left: 12px;
  z-index: 9999; width: auto; height: auto; clip: auto; clip-path: none;
  padding: 12px 20px; background: var(--paper-raised);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: var(--shadow); color: var(--ink); font-size: 14px;
}

/* 减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* ==========================================================================
   2. 布局容器
   ========================================================================== */
.site {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.site-content { flex: 1 0 auto; padding-bottom: 72px; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}
.container--narrow { max-width: 52rem; }

/* 阅读进度条 */
.read-progress {
  position: fixed; top: 0; left: 0; right: 0;
  height: 2px; z-index: 300; pointer-events: none;
  background: transparent;
}
.read-progress__bar {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--accent), var(--bronze));
  transition: width .1s linear;
}

/* 返回顶部 */
.back-top {
  position: fixed; right: 26px; bottom: 26px; z-index: 200;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  color: var(--ink-3);
  box-shadow: var(--shadow);
  opacity: 0; visibility: hidden;
  transform: translateY(10px);
  transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s, color .2s;
}
.back-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.back-top:hover { color: var(--accent); border-color: var(--accent); }

/* ==========================================================================
   3. 页头与导航
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 150;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line-2);
  transition: box-shadow .3s var(--ease), background-color .3s var(--ease);
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 28px;
}

/* 品牌区 */
.site-branding { display: flex; align-items: center; gap: 12px; min-width: 0; }

/* 牌匾式站名：站名上移为主视觉，去掉与副题重复的方形印记 */
.brand-text {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 11px;
}

.site-title {
  position: relative;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: .04em;
  white-space: nowrap;
}
.site-title::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 12px;
  margin-right: 9px;
  vertical-align: 1px;
  background: var(--accent);
}
.site-title a { color: var(--ink); }
.site-title a:hover { color: var(--accent); }

.site-description {
  font-size: 12px;
  color: var(--ink-4);
  line-height: 1.35;
  margin: 0;
  padding-left: 11px;
  border-left: 1px solid var(--line);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}

/* 主导航 */
.main-navigation { margin-left: auto; }

.main-navigation ul {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.main-navigation li { position: relative; }

.main-navigation a {
  display: block;
  padding: 8px 14px;
  font-size: 14.5px;
  color: var(--ink-2);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
.main-navigation a:hover { color: var(--accent); background: var(--accent-soft); }

.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a,
.main-navigation .current-menu-ancestor > a {
  color: var(--accent);
  font-weight: 500;
}
.main-navigation .current-menu-item > a::after {
  content: '';
  position: absolute;
  left: 14px; right: 14px; bottom: 2px;
  height: 2px; border-radius: 2px;
  background: var(--accent);
}

/* 下拉子菜单 */
.main-navigation .sub-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 178px;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  padding: 7px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .22s var(--ease), transform .22s var(--ease), visibility .22s;
}
.main-navigation li:hover > .sub-menu,
.main-navigation li:focus-within > .sub-menu {
  opacity: 1; visibility: visible; transform: none;
}
.main-navigation .sub-menu a { font-size: 14px; padding: 8px 12px; }

/* 头部操作按钮 */
.header-actions { display: flex; align-items: center; gap: 6px; }

.icon-btn {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--ink-3);
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
.icon-btn:hover { color: var(--accent); background: var(--accent-soft); }

/* 深浅色图标切换 */
.icon-sun { display: none; }
.icon-moon { display: block; }
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }

/* 汉堡菜单 */
.menu-toggle {
  display: none;
  width: 38px; height: 38px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: var(--radius-sm);
}
.menu-toggle__bar {
  display: block;
  width: 18px; height: 1.8px;
  border-radius: 2px;
  background: var(--ink-2);
  transition: transform .3s var(--ease), opacity .2s var(--ease);
}
.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(1) { transform: translateY(5.8px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(3) { transform: translateY(-5.8px) rotate(-45deg); }

/* ==========================================================================
   4. 通用组件
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 22px;
  font-size: 14.5px;
  font-weight: 500;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .24s var(--ease);
}
.btn--primary { background: var(--accent); color: #FFF9F0; }
.btn--primary:hover { background: var(--accent-hover); color: #FFF9F0; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--ink-2); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* 分类标记：去色块化，改用描边小字 + 前置短竖线 */
.badges {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.badge {
  position: relative;
  display: inline-block;
  padding: 0 0 0 13px;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.8;
  letter-spacing: .09em;
  color: var(--ink-3);
  transition: color .22s var(--ease);
}
.badge::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 11px;
  background: var(--rule-strong);
  transition: background-color .22s var(--ease);
}
.badge:hover { color: var(--accent); }
.badge:hover::before { background: var(--accent); }

/* 文章元信息 */
.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--ink-4);
}
.post-meta a { color: var(--ink-3); }
.post-meta a:hover { color: var(--accent); }
.meta-sep { color: var(--ink-4); opacity: .55; }

/* 区块标题 */
.section-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 26px;
  font-size: 21px;
  font-weight: 600;
}
.section-head::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line), transparent);
}

/* 页面头部（归档 / 搜索 / 404） */
.page-head {
  padding: 46px 0 34px;
  margin-bottom: 38px;
  border-bottom: 1px solid var(--line-2);
}
.page-head__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--bronze);
  margin-bottom: 12px;
}
.page-head__label::before {
  content: '';
  width: 18px; height: 1px;
  background: var(--bronze);
}
.page-head__title {
  font-size: clamp(26px, 3.4vw, 38px);
  line-height: 1.28;
  margin-bottom: 12px;
}
.page-head__desc {
  max-width: 42rem;
  font-size: 15.5px;
  color: var(--ink-3);
  line-height: 1.8;
}
.page-head__desc p { margin-bottom: .6em; }
.page-head__count {
  margin-top: 14px;
  font-size: 13.5px;
  color: var(--ink-4);
}

/* ==========================================================================
   5. 杂志式栅格布局
   ========================================================================== */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 306px;
  gap: 56px;
  align-items: start;
  padding-top: 46px;
}
.layout--full { grid-template-columns: minmax(0, 1fr); }

/* 侧栏 */
.sidebar {
  position: sticky;
  top: calc(var(--header-h) + 28px);
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.widget {
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line-2);
}
.widget:last-child { padding-bottom: 0; border-bottom: 0; }

.widget-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .03em;
  margin-bottom: 16px;
  color: var(--ink);
}
.widget-title::before {
  content: '';
  width: 3px; height: 14px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), var(--bronze));
}
.widget ul { list-style: none; padding: 0; }
.widget li { padding: 7px 0; font-size: 14.5px; }
.widget li a { color: var(--ink-2); }
.widget li a:hover { color: var(--accent); padding-left: 4px; }
.widget li a { transition: color .2s var(--ease), padding-left .2s var(--ease); }

/* 侧栏常用小工具样式 */
.widget_categories li,
.widget_archive li,
.widget_recent_entries li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  border-bottom: 1px solid var(--line-2);
}
.widget_categories li:last-child,
.widget_archive li:last-child { border-bottom: 0; }

.widget_recent_entries .post-date {
  display: block;
  font-size: 12.5px;
  color: var(--ink-4);
  margin-top: 2px;
}

.widget_tag_cloud .tagcloud { display: flex; flex-wrap: wrap; gap: 7px; }
.widget_tag_cloud a {
  display: inline-block;
  padding: 4px 12px;
  font-size: 13px !important;
  color: var(--ink-3);
  background: var(--paper-tint);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  transition: all .22s var(--ease);
}
.widget_tag_cloud a:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.widget .search-form { display: flex; gap: 8px; }
.widget .search-field {
  flex: 1;
  min-width: 0;
  padding: 9px 14px;
  font-size: 14px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.widget .search-field:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-ring); }
.widget .search-submit {
  padding: 9px 16px;
  font-size: 14px;
  color: #FFF9F0;
  background: var(--accent);
  border-radius: var(--radius-sm);
}
.widget .search-submit:hover { background: var(--accent-hover); }

/* --- 空状态 --- */
.no-results {
  padding: 60px 0 70px;
  text-align: center;
}
.no-results__seal {
  width: 62px; height: 62px;
  margin: 0 auto 22px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif);
  font-size: 28px;
  color: var(--ink-4);
  background: var(--paper-tint);
  border: 1px solid var(--line);
  border-radius: 50%;
}
.no-results__title { font-size: 23px; margin-bottom: 12px; }
.no-results__text { color: var(--ink-3); font-size: 15px; margin-bottom: 24px; }
.no-results .search-form { max-width: 400px; margin: 0 auto; display: flex; gap: 8px; }
.no-results .search-field {
  flex: 1;
  padding: 11px 16px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.no-results .search-field:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-ring); }
.no-results .search-submit {
  padding: 11px 22px;
  color: #FFF9F0;
  background: var(--accent);
  border-radius: var(--radius-sm);
}

/* --- 分页 --- */
.pagination { margin: 52px 0 10px; }
.pagination__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.pagination .page-numbers {
  min-width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 13px;
  font-size: 14.5px;
  color: var(--ink-2);
  background: var(--paper-raised);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  transition: all .22s var(--ease);
}
.pagination .page-numbers:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}
.pagination .page-numbers.current {
  color: #FFF9F0;
  background: var(--accent);
  border-color: var(--accent);
  font-weight: 500;
}
.pagination .page-numbers.dots { background: none; border-color: transparent; color: var(--ink-4); }

/* ==========================================================================
   8. 文章详情页
   ========================================================================== */
.article-wrap { display: grid; grid-template-columns: minmax(0, 1fr); }

/* 有 TOC 时的三栏：目录 / 正文 */
.single-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 44px;
  align-items: start;
}
.single-layout.has-toc {
  grid-template-columns: 216px minmax(0, 1fr);
}

/* --- 文章头部 --- */
.article-header { margin-bottom: 34px; padding-bottom: 30px; border-bottom: 1px solid var(--line-2); }

.article-header__badges { margin-bottom: 18px; }

.article-title {
  font-size: clamp(28px, 4.2vw, 42px);
  font-weight: 700;
  line-height: 1.26;
  letter-spacing: -.008em;
  margin-bottom: 20px;
}

.article-header .post-meta { font-size: 13.5px; }

.article-thumb {
  margin: 34px 0 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--paper-sunken);
}
.article-thumb img { width: 100%; height: auto; }

/* --- 正文排版 --- */
.entry-content {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--ink-2);
  max-width: var(--measure);
}
.entry-content > * { margin-bottom: 1.35em; }
.entry-content > *:last-child { margin-bottom: 0; }

.entry-content p { margin-bottom: 1.45em; }

.entry-content h2 {
  position: relative;
  font-size: 24px;
  margin: 2.6em 0 .9em;
  padding-top: 26px;
  line-height: 1.45;
  letter-spacing: .01em;
  scroll-margin-top: calc(var(--header-h) + 28px);
}
/* 上方通栏细线：章节分界，替代常见的符号/竖线装饰 */
.entry-content h2::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line);
}
/* 细线左端的短强调段 */
.entry-content h2::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 34px;
  height: 1px;
  background: var(--accent);
}
.entry-content h3 {
  position: relative;
  font-size: 19.5px;
  margin: 2.1em 0 .7em;
  padding-left: 15px;
  line-height: 1.5;
  scroll-margin-top: calc(var(--header-h) + 28px);
}
/* 小标题前置圆点：与 h2 的横线形成层级区分 */
.entry-content h3::before {
  content: '';
  position: absolute;
  left: 0;
  top: .62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--bronze);
}
.entry-content h4 {
  font-size: 17px;
  margin: 1.7em 0 .6em;
  color: var(--ink);
}
.entry-content h2:first-child,
.entry-content h3:first-child { margin-top: 0; padding-top: 0; }
.entry-content h2:first-child::before,
.entry-content h2:first-child::after { display: none; }

.entry-content a {
  color: var(--accent);
  border-bottom: 1px solid var(--accent-ring);
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.entry-content a:hover { color: var(--bronze); border-bottom-color: var(--bronze); }

.entry-content strong { font-weight: 600; color: var(--ink); }
.entry-content em { font-style: italic; color: var(--ink-3); }

.entry-content ul,
.entry-content ol { margin-bottom: 1.45em; }
.entry-content li { margin-bottom: .5em; }
.entry-content li::marker { color: var(--bronze); }
.entry-content ul ul,
.entry-content ol ol,
.entry-content ul ol,
.entry-content ol ul { margin: .5em 0 .2em; }

/* 引用块 */
.entry-content blockquote {
  margin: 1.8em 0;
  padding: 20px 26px;
  background: var(--paper-tint);
  border-left: 3px solid var(--bronze);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--ink-2);
  font-family: var(--serif);
  font-size: 16.5px;
  line-height: 1.82;
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content blockquote cite {
  display: block;
  margin-top: 10px;
  font-size: 13.5px;
  font-style: normal;
  color: var(--ink-4);
}

/* 图片与图注 */
.entry-content img { border-radius: var(--radius); margin: 0 auto; }
.entry-content figure { margin: 1.8em 0; }
.entry-content figcaption {
  margin-top: 11px;
  font-size: 13.5px;
  color: var(--ink-4);
  text-align: center;
  line-height: 1.7;
}

/* 分隔线 */
.entry-content hr {
  border: 0;
  height: 1px;
  margin: 2.6em auto;
  width: 64px;
  background: var(--line);
  position: relative;
}
.entry-content hr::after {
  content: '◆';
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  font-size: 9px;
  color: var(--bronze);
  background: var(--paper);
  padding: 0 9px;
}

/* 表格 */
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.8em 0;
  font-size: 15px;
  overflow: hidden;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}
.entry-content th,
.entry-content td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line-2);
}
.entry-content th {
  font-weight: 600;
  background: var(--paper-tint);
  color: var(--ink);
}
.entry-content tr:last-child td { border-bottom: 0; }
.entry-content tbody tr:hover { background: var(--paper-tint); }

/* --- 行内代码 --- */
.entry-content code {
  font-family: var(--mono);
  font-size: .89em;
  padding: .16em .42em;
  color: #9A5B3F;
  background: #F5E8DE;
  border-radius: var(--radius-xs);
  word-break: break-word;
}
[data-theme="dark"] .entry-content code { color: #D8A184; background: #2E2119; }

/* --- 代码块 --- */
.entry-content pre {
  position: relative;
  margin: 1.8em 0;
  padding: 42px 22px 20px;
  background: var(--paper-sunken);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.72;
  -webkit-overflow-scrolling: touch;
}
[data-theme="dark"] .entry-content pre { background: #16120F; border-color: #2C251F; }

.entry-content pre code {
  font-family: var(--mono);
  font-size: 13.6px;
  padding: 0;
  color: var(--ink-2);
  background: none;
  border-radius: 0;
  white-space: pre;
  word-break: normal;
}

/* 代码块语言标签与复制按钮 */
.code-toolbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px 0 16px;
  border-bottom: 1px solid var(--line-2);
  background: var(--paper-tint);
  border-radius: var(--radius) var(--radius) 0 0;
}
[data-theme="dark"] .code-toolbar { background: #1D1814; border-bottom-color: #2C251F; }

.code-lang {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-4);
}

.code-copy {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  font-size: 12px;
  color: var(--ink-3);
  border-radius: var(--radius-xs);
  transition: all .2s var(--ease);
}
.code-copy:hover { color: var(--accent); background: var(--accent-soft); }
.code-copy.is-copied { color: var(--accent); }

/* 语法高亮配色（与暖纸底色协调） */
.tok-comment { color: var(--ink-4); font-style: italic; }
.tok-string  { color: #A8763C; }
.tok-number  { color: #B25A4C; }
.tok-keyword { color: #7A6489; font-weight: 500; }
.tok-function{ color: #3F7A5C; }
.tok-tag     { color: #4E8480; }
.tok-attr    { color: #A8763C; }
.tok-builtin { color: #54688C; }
.tok-punct   { color: var(--ink-3); }

[data-theme="dark"] .tok-comment { color: #7B7061; }
[data-theme="dark"] .tok-string  { color: #CFA06B; }
[data-theme="dark"] .tok-number  { color: #CE8577; }
[data-theme="dark"] .tok-keyword { color: #B6A0C4; }
[data-theme="dark"] .tok-function{ color: #7FB394; }
[data-theme="dark"] .tok-tag     { color: #7FB3AD; }
[data-theme="dark"] .tok-attr    { color: #CFA06B; }
[data-theme="dark"] .tok-builtin { color: #92A6C6; }

/* --- 文章目录 TOC --- */
.toc {
  position: sticky;
  top: calc(var(--header-h) + 28px);
  max-height: calc(100vh - var(--header-h) - 56px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
  font-size: 13.5px;
}
.toc__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-2);
}
.toc__list { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--line); }
.toc__item { margin: 0; }

.toc__link {
  display: block;
  padding: 5px 0 5px 14px;
  margin-left: -1px;
  color: var(--ink-3);
  line-height: 1.55;
  border-left: 2px solid transparent;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.toc__link:hover { color: var(--accent); }
.toc__link.is-active {
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 500;
}
.toc__item--h3 .toc__link { padding-left: 28px; font-size: 13px; }

/* TOC 滚动条 */
.toc::-webkit-scrollbar { width: 4px; }
.toc::-webkit-scrollbar-thumb { background: var(--line); border-radius: 2px; }
.toc::-webkit-scrollbar-track { background: transparent; }

/* 移动端 TOC 折叠 */
.toc-mobile { display: none; margin-bottom: 26px; }
.toc-mobile summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  background: var(--paper-tint);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  list-style: none;
}
.toc-mobile summary::-webkit-details-marker { display: none; }
.toc-mobile summary::after {
  content: '';
  width: 7px; height: 7px;
  border-right: 1.6px solid var(--ink-3);
  border-bottom: 1.6px solid var(--ink-3);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform .25s var(--ease);
}
.toc-mobile[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.toc-mobile__body {
  margin-top: 10px;
  padding: 6px 0;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
}
.toc-mobile__body .toc__list { border-left: 0; }
.toc-mobile__body .toc__link { padding-left: 18px; }

/* --- 文章底部 --- */
.article-footer { margin-top: 52px; padding-top: 30px; border-top: 1px solid var(--line-2); max-width: var(--measure); }

/* 标签 */
.tag-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 30px;
  font-size: 13.5px;
}
.tag-links__label { color: var(--ink-4); }
.tag-links a {
  padding: 4px 12px;
  color: var(--ink-3);
  background: var(--paper-tint);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  transition: all .22s var(--ease);
}
.tag-links a:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }

/* 分享按钮 */
.share-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 34px;
  flex-wrap: wrap;
}
.share-row__label { font-size: 13.5px; color: var(--ink-4); margin-right: 2px; }
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 13.5px;
  color: var(--ink-2);
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: all .22s var(--ease);
}
.share-btn:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); transform: translateY(-1px); }

/* 作者名片 */
.author-card {
  display: flex;
  gap: 18px;
  padding: 24px;
  background: var(--paper-raised);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  margin-bottom: 34px;
}
.author-card__avatar { flex: none; }
.author-card__avatar img { width: 60px; height: 60px; border-radius: 50%; }
.author-card__name { font-family: var(--serif); font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.author-card__desc { font-size: 14px; line-height: 1.78; color: var(--ink-3); margin-bottom: 10px; }
.author-card__link { font-size: 13.5px; }

/* 上下篇导航 */
.post-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin-bottom: 34px;
}
.post-nav__item {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 20px 22px;
  background: var(--paper-raised);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  transition: all .26s var(--ease);
}
.post-nav__item:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-2px);
}
.post-nav__item--next { text-align: right; }
.post-nav__label { font-size: 12px; color: var(--ink-4); letter-spacing: .06em; }
.post-nav__title { font-size: 15.5px; font-weight: 500; line-height: 1.5; color: var(--ink); }

/* 相关阅读 */
.related { margin-bottom: 40px; }
.related .section-head { font-size: 18px; margin-bottom: 20px; }
.related__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}
.related-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper-raised);
  border: 1px solid var(--line-2);
  transition: all .28s var(--ease);
}
.related-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); border-color: var(--line); }
.related-card__media { aspect-ratio: 16 / 10; overflow: hidden; display: flex; align-items: center; justify-content: center; background: linear-gradient(150deg, var(--tone-bg1) 0%, var(--tone-bg2) 100%); }
.related-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s var(--ease); }
.related-card__media .thumb__glyph { font-size: clamp(34px, 4vw, 52px); }
.related-card:hover .related-card__media img { transform: scale(1.06); }
.related-card__body { padding: 15px 17px 18px; }
.related-card__title { font-size: 15px; font-weight: 500; line-height: 1.5; margin-bottom: 7px; }
.related-card__title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.related-card__link { display: block; color: var(--ink); }
.related-card__link:hover .related-card__title { color: var(--accent); }
.related-card__meta { font-size: 12.5px; color: var(--ink-4); }

/* 面包屑 */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 22px 0 0;
  font-size: 13px;
  color: var(--ink-4);
}
.breadcrumb a { color: var(--ink-3); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb__sep { color: var(--ink-4); opacity: .5; }
.breadcrumb__current { color: var(--ink-4); }

/* ==========================================================================
   9. 搜索浮层
   ========================================================================== */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 20px 40px;
}
.search-overlay[hidden] { display: none; }

.search-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(30, 24, 19, .42);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: qcl-fade-in .22s var(--ease);
}
[data-theme="dark"] .search-overlay__backdrop { background: rgba(0, 0, 0, .62); }

.search-overlay__panel {
  position: relative;
  width: 100%;
  max-width: 620px;
  max-height: 76vh;
  display: flex;
  flex-direction: column;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: qcl-pop-in .26s var(--ease);
}

@keyframes qcl-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes qcl-pop-in {
  from { opacity: 0; transform: translateY(-14px) scale(.98); }
  to   { opacity: 1; transform: none; }
}

.search-overlay__head {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line-2);
  color: var(--ink-3);
}
.search-overlay__input {
  flex: 1;
  min-width: 0;
  font-size: 17px;
  background: none;
  border: 0;
  outline: none;
  color: var(--ink);
}
.search-overlay__input::placeholder { color: var(--ink-4); }

.search-overlay__esc {
  flex: none;
  padding: 3px 8px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-4);
  background: var(--paper-tint);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-xs);
}

.search-overlay__hint {
  padding: 14px 22px 4px;
  font-size: 12.5px;
  color: var(--ink-4);
}

.search-overlay__results {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px 12px;
}
.search-overlay__results:empty { display: none; }

.search-result {
  display: block;
  padding: 13px 14px;
  border-radius: var(--radius-sm);
  transition: background-color .18s var(--ease);
}
.search-result:hover { background: var(--paper-tint); }

.search-result__title {
  font-family: var(--serif);
  font-size: 15.5px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 4px;
  line-height: 1.5;
}
.search-result__title mark {
  background: var(--bronze-soft);
  color: var(--bronze);
  padding: 0 2px;
  border-radius: 3px;
}
.search-result__meta { font-size: 12.5px; color: var(--ink-4); }

.search-overlay__state {
  padding: 26px 14px;
  text-align: center;
  font-size: 14px;
  color: var(--ink-4);
}

.search-overlay__form {
  padding: 14px 22px 20px;
  border-top: 1px solid var(--line-2);
  display: flex;
  justify-content: flex-end;
}
.search-overlay__form .btn { padding: 9px 18px; font-size: 14px; }

/* ==========================================================================
   10. 评论
   ========================================================================== */
.comments-area {
  margin-top: 46px;
  padding-top: 34px;
  border-top: 1px solid var(--line-2);
  max-width: var(--measure);
}

.comments-title,
.comment-reply-title {
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 24px;
}

.comment-list {
  list-style: none;
  padding: 0;
  margin: 0 0 34px;
}
.comment-list .children {
  list-style: none;
  padding-left: 26px;
  margin: 0;
  border-left: 1px solid var(--line-2);
}

.comment-body {
  padding: 20px 0;
  border-bottom: 1px solid var(--line-2);
}
.comment-list > li:last-child > .comment-body { border-bottom: 0; }

.comment-author {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 9px;
  font-size: 14.5px;
}
.comment-author .avatar { border-radius: 50%; width: 38px; height: 38px; }
.comment-author .fn { font-style: normal; font-weight: 600; color: var(--ink); }
.comment-author .says { display: none; }

.comment-metadata {
  font-size: 12.5px;
  color: var(--ink-4);
  margin-bottom: 10px;
}
.comment-metadata a { color: var(--ink-4); }
.comment-metadata a:hover { color: var(--accent); }

.comment-content { font-size: 15px; line-height: 1.8; color: var(--ink-2); }
.comment-content p:last-child { margin-bottom: 0; }

.reply { margin-top: 9px; }
.comment-reply-link {
  font-size: 13px;
  color: var(--ink-4);
  padding: 3px 10px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  transition: all .2s var(--ease);
}
.comment-reply-link:hover { color: var(--accent); border-color: var(--accent); }

.comment-respond { margin-top: 30px; }
.comment-form { display: flex; flex-direction: column; gap: 16px; }
.comment-form p { margin: 0; }

.comment-form label {
  display: block;
  font-size: 13.5px;
  color: var(--ink-3);
  margin-bottom: 7px;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 12px 15px;
  font-size: 15px;
  color: var(--ink);
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}
.comment-form textarea { min-height: 130px; resize: vertical; line-height: 1.75; }

.comment-form .comment-form-cookies-consent {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 13.5px;
  color: var(--ink-3);
}
.comment-form .comment-form-cookies-consent input { width: auto; margin-top: 4px; }
.comment-form .comment-form-cookies-consent label { margin: 0; }

.comment-form .submit {
  align-self: flex-start;
  padding: 11px 26px;
  font-size: 14.5px;
  font-weight: 500;
  color: #FFF9F0;
  background: var(--accent);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: all .24s var(--ease);
}
.comment-form .submit:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: var(--shadow-sm); }

.comment-notes,
.logged-in-as { font-size: 13.5px; color: var(--ink-4); }

/* ==========================================================================
   11. 页脚
   ========================================================================== */
.site-footer {
  flex: none;
  margin-top: auto;
  padding: 54px 0 30px;
  background: var(--paper-sunken);
  border-top: 1px solid var(--line-2);
}
[data-theme="dark"] .site-footer { background: var(--paper-sunken); }

.footer-widgets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 40px;
  padding-bottom: 40px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--line);
}

.footer-col .widget { padding-bottom: 0; border-bottom: 0; }
.footer-col .widget-title {
  font-size: 14.5px;
  margin-bottom: 15px;
}
.footer-col .widget li { font-size: 14px; padding: 5px 0; }
.footer-col .widget li,
.footer-col .widget p { color: var(--ink-3); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-seal {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif);
  font-size: 16px;
  color: #FFF9F0;
  background: linear-gradient(145deg, var(--accent), var(--accent-hover));
  border-radius: 10px;
}
.footer-brand__name { font-family: var(--serif); font-size: 15.5px; font-weight: 600; color: var(--ink); }
.footer-brand__note { font-size: 13px; color: var(--ink-4); margin-top: 1px; }

.footer-nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  list-style: none;
  padding: 0;
}
.footer-nav__list a { font-size: 13.5px; color: var(--ink-3); }
.footer-nav__list a:hover { color: var(--accent); }

.footer-copy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  color: var(--ink-4);
}
.footer-copy a { color: var(--ink-3); }
.footer-copy a:hover { color: var(--accent); }
.footer-powered { opacity: .85; }

.footer-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 16px;
	margin-bottom: 14px;
	font-size: 13.5px;
}
.footer-links a { color: var(--ink-2); }
.footer-links a:hover { color: var(--accent); }
.footer-links__sep { color: var(--ink-4); }

/* ==========================================================================
   12. 时间轴归档
   ========================================================================== */
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
  padding-left: 30px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 5px; top: 8px; bottom: 8px;
  width: 1px;
  background: linear-gradient(180deg, var(--line), var(--line-2), transparent);
}

.timeline__item { position: relative; padding: 0 0 30px; }
.timeline__item:last-child { padding-bottom: 0; }

.timeline__item::before {
  content: '';
  position: absolute;
  left: -30px; top: 8px;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--line);
  transition: border-color .25s var(--ease), transform .25s var(--ease);
}
.timeline__item:hover::before { border-color: var(--accent); transform: scale(1.18); }

.timeline__date {
  display: block;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--bronze);
  letter-spacing: .04em;
  margin-bottom: 7px;
}
.timeline__title { font-size: 17px; font-weight: 500; line-height: 1.55; }
.timeline__title a { color: var(--ink-2); }
.timeline__title a:hover { color: var(--accent); }
.timeline__excerpt { font-size: 14px; line-height: 1.75; color: var(--ink-3); margin-top: 6px; }

/* ==========================================================================
   13. 滚动入场动画
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }
/* 无 JS 时兜底：延迟后可读 */
.no-js .reveal { opacity: 1; transform: none; }

/* ==========================================================================
   14. 响应式
   ========================================================================== */
@media (max-width: 1080px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .sidebar { position: static; flex-direction: row; flex-wrap: wrap; gap: 34px; padding-top: 34px; border-top: 1px solid var(--line-2); }
  .sidebar .widget { flex: 1 1 240px; padding-bottom: 0; border-bottom: 0; }
  .single-layout.has-toc { grid-template-columns: minmax(0, 1fr); }
  .single-layout.has-toc > .toc { display: none; }
  .toc-mobile { display: block; }
}

@media (max-width: 900px) {
  .main-navigation { display: none; }
  .menu-toggle { display: flex; }

  /* 移动端展开菜单 */
  .main-navigation.is-open {
    display: block;
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    padding: 14px 22px 20px;
    background: var(--paper-raised);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    animation: qcl-fade-in .2s var(--ease);
  }
  .main-navigation.is-open ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .main-navigation.is-open a { padding: 11px 14px; font-size: 15.5px; }
  .main-navigation.is-open .current-menu-item > a::after { display: none; }
  .main-navigation.is-open .sub-menu {
    position: static;
    opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: 0; border-left: 2px solid var(--line);
    border-radius: 0; margin-left: 14px; padding: 0 0 0 8px;
    min-width: 0; background: none;
  }

  .header-inner { padding: 0 20px; gap: 14px; }
  .site-description { display: none; }
  .container { padding: 0 20px; }

  .hero { padding: 34px 0 32px; margin-bottom: 32px; }
  .hero__stats { gap: 30px; }

  .card-feature__overlay { padding: 56px 24px 24px; }

  .card,
  .card:nth-child(even) { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .card:nth-child(even) .card__media { order: 0; }
  .card__media { aspect-ratio: 16 / 9; }
  .card { padding: 24px 0; }

  .entry-content { font-size: 16.5px; }
  .article-title { font-size: clamp(25px, 6vw, 32px); }

  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 18px; }
  .post-nav__item--next { text-align: left; }

  .back-top { right: 16px; bottom: 16px; }
  .search-overlay { padding: 6vh 14px 30px; }
  .search-overlay__panel { max-height: 82vh; }
}

@media (max-width: 560px) {
  :root {
    --fs-body: 16.5px;
    --header-h: 64px;
  }

  .site-title { font-size: 17.5px; letter-spacing: .02em; }
  .site-title::before { height: 11px; margin-right: 7px; }
  .header-actions { gap: 2px; }
  .icon-btn { width: 36px; height: 36px; }

  .hero__title { font-size: clamp(27px, 8vw, 36px); }
  .hero__stats { gap: 22px; }
  .hero__stat-num { font-size: 24px; }

  .post-grid { grid-template-columns: minmax(0, 1fr); }
  .related__grid { grid-template-columns: minmax(0, 1fr); }

  .card-feature__link { aspect-ratio: 4 / 3; border-radius: var(--radius); }
  .card-feature__title { font-size: 21px; }
  .card-feature__excerpt { -webkit-line-clamp: 3; }

  .entry-content h2 { font-size: 21.5px; }
  .entry-content h3 { font-size: 18.5px; }
  .entry-content pre { padding: 40px 16px 16px; font-size: 13px; border-radius: var(--radius-sm); }

  .comment-list .children { padding-left: 14px; }
  .author-card { flex-direction: column; gap: 14px; }
  .timeline { padding-left: 24px; }
  .timeline__item::before { left: -24px; }
}

/* ==========================================================================
   15. WordPress 核心类对齐
   ========================================================================== */
.alignleft {
  float: left;
  margin: 0 1.6em 1em 0;
}
.alignright {
  float: right;
  margin: 0 0 1em 1.6em;
}
.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.alignwide {
  margin-left: calc(-1 * var(--radius-lg));
  margin-right: calc(-1 * var(--radius-lg));
  max-width: 1000px;
  width: auto;
}
.alignfull {
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  max-width: 100vw;
  width: 100vw;
}

.wp-caption { max-width: 100%; }
.wp-caption-text,
.wp-element-caption { font-size: 13.5px; color: var(--ink-4); text-align: center; margin-top: 10px; }

.sticky .card__title::after,
.sticky .card-grid__title::after {
  content: '置顶';
  display: inline-block;
  margin-left: 8px;
  padding: 1px 8px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  color: var(--seal);
  background: var(--seal-soft);
  border-radius: 999px;
  vertical-align: middle;
}

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 1.8em 0; }
.gallery-item { margin: 0; }
.gallery-item img { border-radius: var(--radius-sm); }

.wp-block-image img { border-radius: var(--radius); }

.wp-block-quote { border-left: 3px solid var(--bronze); padding-left: 22px; }
.wp-block-quote cite { font-size: 13.5px; color: var(--ink-4); font-style: normal; }

.wp-block-button__link {
  padding: 11px 24px;
  font-size: 14.5px;
  border-radius: 999px;
  background: var(--accent);
  color: #FFF9F0;
}
.wp-block-button__link:hover { background: var(--accent-hover); color: #FFF9F0; }

.wp-block-separator { border: 0; border-top: 1px solid var(--line); max-width: 100px; margin: 2.4em auto; }

/* 自定义滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--paper-sunken); }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 5px; border: 2px solid var(--paper-sunken); }
::-webkit-scrollbar-thumb:hover { background: var(--ink-4); }

/* 打印 */
@media print {
  .site-header, .sidebar, .site-footer, .back-top, .search-overlay,
  .read-progress, .post-nav, .related, .comments-area, .toc, .toc-mobile, .share-row { display: none !important; }
  body { background: #fff; color: #000; }
  .layout, .single-layout, .single-layout.has-toc { grid-template-columns: 1fr; display: block; }
  .entry-content { max-width: none; }
  .entry-content pre { border: 1px solid #ddd; background: #f8f8f8; }
  a { color: #000; text-decoration: underline; }
}

/* ==========================================================================
   16. 文章页居中单栏（阅读模式）
   ========================================================================== */

/* 文章页去掉侧栏后，正文居中并放大字号 */
.single-article-wrap {
  max-width: 46rem;
  margin: 0 auto;
  padding-top: 20px;
}

/* 文章头部居中 */
.article-header--centered {
  text-align: center;
  margin-bottom: 40px;
  padding-bottom: 34px;
  border-bottom: 1px solid var(--line-2);
}
.article-header--centered .badges { justify-content: center; }
.article-header--centered .article-title { margin-left: auto; margin-right: auto; max-width: 24ch; }
.article-header--centered .post-meta { justify-content: center; }

/* 居中窄栏下的正文行宽控制 */
.entry-content--centered {
  font-size: 18px;
  line-height: 1.95;
}
.entry-content--centered > * { max-width: 100%; }

/* 目录：居中单栏时改为顶部横向段落导航 */
.toc-inline {
  margin: 0 auto 40px;
  max-width: 46rem;
  padding: 22px 26px;
  background: var(--paper-tint);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
}
.toc-inline__title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin-bottom: 14px;
}
.toc-inline__title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}
.toc-inline__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}
.toc-inline__item { margin: 0; }
.toc-inline__link {
  position: relative;
  display: inline-block;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-3);
  transition: color .2s var(--ease);
}
.toc-inline__link::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 1px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s var(--ease);
}
.toc-inline__link:hover { color: var(--accent); }
.toc-inline__link:hover::after,
.toc-inline__link.is-active::after { transform: scaleX(1); }
.toc-inline__link.is-active { color: var(--accent); font-weight: 500; }
.toc-inline__item--h3 .toc-inline__link { font-size: 13.5px; padding-left: 13px; }
.toc-inline__item--h3 .toc-inline__link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--rule-strong);
  transform: translateY(-50%);
}

/* 文章底部区域同样收窄居中 */
.article-footer--centered {
  max-width: 46rem;
  margin: 56px auto 0;
  padding-top: 32px;
  border-top: 1px solid var(--line-2);
}
.comments-area--centered {
  max-width: 46rem;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 900px) {
  .article-header--centered { text-align: left; }
  .article-header--centered .badges,
  .article-header--centered .post-meta { justify-content: flex-start; }
  .article-header--centered .article-title { max-width: none; }
  .entry-content--centered { font-size: 17px; line-height: 1.9; }
  .toc-inline { padding: 18px 20px; }
  .toc-inline__list { flex-direction: column; gap: 6px; }
}

/* ==========================================================================
   17. 首页：封面版块 + 卡片栅格
   ========================================================================== */

/* 报头：归档 / 搜索 / 404 仍在使用（首页已改用封面版块） */
.masthead {
  padding: 64px 0 46px;
  margin-bottom: 52px;
  border-bottom: 1px solid var(--line);
}
.masthead__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 18px;
  margin-bottom: 22px;
  font-size: 12.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--bronze);
}
.masthead__meta span::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 1px;
  margin-right: 9px;
  vertical-align: middle;
  background: currentColor;
  opacity: .55;
}
.masthead__title {
  font-size: clamp(38px, 6.4vw, 74px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -.02em;
  margin-bottom: 24px;
}
.masthead__title em {
  font-style: normal;
  color: var(--accent);
}
.masthead__desc {
  max-width: 44rem;
  font-size: 17px;
  line-height: 1.9;
  color: var(--ink-3);
  margin-bottom: 30px;
}

/* 归档 / 搜索页的报头：比首页矮一档，标题略小，避免与首页争主角 */
.masthead--archive {
  padding-bottom: 30px;
  margin-bottom: 40px;
}
.masthead--archive .masthead__title {
  font-size: clamp(28px, 3.4vw, 44px);
  letter-spacing: .01em;
}
.masthead--archive .masthead__desc {
  max-width: 38rem;
}
.masthead__searchform {
  max-width: 430px;
  margin-top: 24px;
}

/* 版块标题：竖线 + 标题 + 右端计数 + 延伸细线 */
.section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--ink);
}
.section-head__bar {
  flex: none;
  width: 3px;
  height: 16px;
  background: var(--accent);
}
.section-head__more {
  margin-left: auto;
  padding-left: 16px;
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: .06em;
  color: var(--ink-4);
}
.section-head::after {
  content: '';
  flex: none;
  width: 26px;
  height: 1px;
  background: linear-gradient(90deg, var(--line), transparent);
}

/* --- 封面版块：站点刊头（左）+ 本期推荐（右） --- */
.cover {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr);
  margin-bottom: 56px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--paper-raised);
  box-shadow: var(--shadow-sm);
}
.cover__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px 50px;
}
.cover__kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  font-size: 12.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--bronze);
}
.cover__kicker::before {
  content: '';
  flex: none;
  width: 22px;
  height: 1px;
  background: var(--bronze);
}
.cover__title {
  margin-bottom: 20px;
  font-family: var(--serif);
  font-size: clamp(34px, 4.4vw, 54px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.02em;
  color: var(--ink);
}
.cover__title em {
  font-style: normal;
  color: var(--accent);
}
.cover__desc {
  max-width: 30rem;
  margin-bottom: 30px;
  font-size: 16.5px;
  line-height: 1.95;
  color: var(--ink-3);
}
.cover__stats {
  display: flex;
  gap: 34px;
}
.cover__stat b {
  display: block;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.1;
  color: var(--ink);
}
.cover__stat span {
  font-size: 12.5px;
  letter-spacing: .08em;
  color: var(--ink-4);
}

.cover__feature {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding: 44px 42px;
	border-left: 1px solid var(--line);
	overflow: hidden;
	background: linear-gradient(158deg, var(--tone-bg1) 0%, var(--tone-bg2) 100%);
}
.cover__feature .thumb__glyph {
	position: absolute;
	right: -16px;
	top: -36px;
	font-size: clamp(150px, 16vw, 230px);
	line-height: 1;
	color: var(--tone-ink);
	opacity: .14;
}
.cover__feature-inner {
	position: relative;
	z-index: 1;
	flex: 1;
	display: flex;
	flex-direction: column;
}
.cover__tag {
	align-self: flex-start;
	margin-bottom: auto;
	padding: 4px 14px;
	font-size: 12px;
	letter-spacing: .14em;
	color: var(--tone-ink);
	background: color-mix(in srgb, var(--paper-raised) 78%, transparent);
	border: 1px solid currentColor;
	border-radius: 999px;
	backdrop-filter: blur(2px);
	-webkit-backdrop-filter: blur(2px);
}
.cover__feature-title {
	margin: 22px 0 14px;
	font-size: clamp(24px, 2.6vw, 32px);
	font-weight: 600;
	line-height: 1.34;
}
.cover__feature-title a {
	color: var(--ink);
}
.cover__feature-title a:hover {
	color: var(--accent);
}
.cover__feature-excerpt {
	margin-bottom: 22px;
	font-size: 15.5px;
	line-height: 1.9;
	color: var(--ink-3);
}
.cover__more {
	font-size: 14px;
	font-weight: 500;
	color: var(--accent);
}
.cover__more:hover {
	color: var(--accent-hover);
}

/* --- 生成式封面：文章无特色图时，按主分类生成低饱和色块 + 书法字 --- */
.thumb {
	--tone-bg1: #EFE9DC;
	--tone-bg2: #E5DCC8;
	--tone-ink: #837768;
	position: relative;
	background: linear-gradient(150deg, var(--tone-bg1) 0%, var(--tone-bg2) 100%);
	overflow: hidden;
}
.thumb--bamboo { --tone-bg1: #EAF1EC; --tone-bg2: #D9E6DD; --tone-ink: #4A7A63; } /* 管理手记 */
.thumb--sand   { --tone-bg1: #F6ECDD; --tone-bg2: #ECDDC6; --tone-ink: #B08A55; } /* 日常记录 */
.thumb--mist   { --tone-bg1: #E7EDEF; --tone-bg2: #D6E1E7; --tone-ink: #5E7E8C; } /* 旅途与风景 */
.thumb--plum   { --tone-bg1: #F1E7ED; --tone-bg2: #E7D7E1; --tone-ink: #9A6E83; } /* 读书观影 */
.thumb__glyph {
	font-family: var(--serif);
	font-weight: 600;
	line-height: 1;
	color: var(--tone-ink);
	opacity: .82;
	user-select: none;
	pointer-events: none;
}
[data-theme="dark"] .thumb {
	--tone-bg1: #26211d; --tone-bg2: #1e1a17; --tone-ink: #B0A395;
}
[data-theme="dark"] .thumb--bamboo { --tone-bg1: #1f2a25; --tone-bg2: #26332c; --tone-ink: #8DC0A4; }
[data-theme="dark"] .thumb--sand   { --tone-bg1: #2c2620; --tone-bg2: #332b22; --tone-ink: #C79A6B; }
[data-theme="dark"] .thumb--mist   { --tone-bg1: #1f272c; --tone-bg2: #252f35; --tone-ink: #8FB2BF; }
[data-theme="dark"] .thumb--plum   { --tone-bg1: #2a232a; --tone-bg2: #322733; --tone-ink: #C49AB1; }

/* --- 卡片栅格：顶部色块封面 + 正文，无特色图也能成立 --- */
.cardgrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.has-sidebar .cardgrid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.card {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--line-2);
	border-radius: var(--radius);
	background: var(--paper-raised);
	color: var(--ink);
	overflow: hidden;
	transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.card:hover {
	transform: translateY(-4px);
	border-color: var(--rule);
	box-shadow: var(--shadow);
}
.card__thumb {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 16 / 9;
	border-bottom: 1px solid var(--line-2);
}
.card__thumb .thumb__glyph {
	font-size: clamp(50px, 5.2vw, 78px);
}
.thumb__cat {
	position: absolute;
	left: 14px;
	top: 13px;
	padding: 3px 11px;
	font-size: 11.5px;
	letter-spacing: .1em;
	color: var(--tone-ink);
	background: color-mix(in srgb, var(--paper-raised) 76%, transparent);
	border: 1px solid currentColor;
	border-radius: 999px;
	backdrop-filter: blur(2px);
	-webkit-backdrop-filter: blur(2px);
}
.card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 13px 16px 0;
}
.card__title {
	margin-bottom: 6px;
	font-size: 16.5px;
	font-weight: 600;
	line-height: 1.32;
	color: var(--ink);
	transition: color .25s var(--ease);
}
.card:hover .card__title {
	color: var(--accent);
}
.card__excerpt {
	margin-bottom: 9px;
	font-size: 13.5px;
	line-height: 1.62;
	color: var(--ink-3);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.card__meta {
	margin: auto -16px 0;
	padding: 5px 16px 7px;
	border-top: 1px solid var(--line-2);
	font-size: 11.5px;
	line-height: 1.25;
	color: var(--ink-4);
}

/* --- 序号条目：归档与搜索页使用 --- */
.entries {
  list-style: none;
  padding: 0;
  margin: 0;
}
.entry {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 30px;
  padding: 34px 0;
  border-bottom: 1px solid var(--line-2);
}
.entry:last-child { border-bottom: 0; }

/* 序号栏：视觉锚点 */
.entry__index {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.9;
  letter-spacing: .06em;
  color: var(--ink-4);
  padding-top: 5px;
  border-top: 2px solid var(--rule);
  transition: border-color .25s var(--ease), color .25s var(--ease);
}
.entry:hover .entry__index { border-color: var(--accent); color: var(--accent); }

.entry__body { min-width: 0; }
.entry__badges { margin-bottom: 11px; }
.entry__title {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 11px;
}
.entry__title a { color: var(--ink); }
.entry__title a:hover { color: var(--accent); }
.entry__excerpt {
  font-size: 15.5px;
  line-height: 1.88;
  color: var(--ink-3);
  margin-bottom: 14px;
  max-width: 40rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.entry__meta { font-size: 13px; color: var(--ink-4); }

/* 条目缩略图：小尺寸右侧浮出 */
.entry--with-thumb {
  grid-template-columns: 92px minmax(0, 1fr) 148px;
  align-items: start;
}
.entry__thumb {
	aspect-ratio: 4 / 3;
	border-radius: var(--radius-sm);
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(150deg, var(--tone-bg1) 0%, var(--tone-bg2) 100%);
}
.entry__thumb img {
	width: 100%; height: 100%;
	object-fit: cover;
	transition: transform .6s var(--ease);
}
.entry__thumb .thumb__glyph { font-size: 40px; }
.entry:hover .entry__thumb img { transform: scale(1.05); }

@media (max-width: 1080px) {
  .cover { grid-template-columns: minmax(0, 1fr); }
  .cover__feature { border-left: 0; border-top: 1px solid var(--line); }
  .cardgrid,
  .has-sidebar .cardgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .entry--with-thumb { grid-template-columns: 70px minmax(0, 1fr); }
  .entry__thumb { display: none; }
}

@media (max-width: 900px) {
  .masthead { padding: 36px 0 30px; margin-bottom: 34px; }
  .cover__text { padding: 40px 32px; }
  .cover__feature { padding: 40px 32px; }
  .cover__feature::after { font-size: 150px; }
  .cardgrid,
  .has-sidebar .cardgrid { gap: 20px; }
  .entry { grid-template-columns: 58px minmax(0, 1fr); gap: 18px; padding: 26px 0; }
  .entry__title { font-size: 19px; }
}

@media (max-width: 640px) {
  .cover__text { padding: 34px 26px; }
  .cover__feature { padding: 34px 26px; }
  .cardgrid,
  .has-sidebar .cardgrid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 560px) {
  .masthead__title { font-size: clamp(30px, 10vw, 42px); }
  .cover__stats { gap: 22px; }
  .section-head { margin-bottom: 16px; font-size: 16px; }
  .section-head__more { display: none; }
  .cardgrid { gap: 16px; }
  .entry { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .entry__index { border-top: 0; padding-top: 0; }
  /* 窄屏卡片改横向排布，减少纵向空白 */
  .card { flex-direction: row; align-items: stretch; }
  .card__thumb { width: 40%; aspect-ratio: auto; min-height: 104px; border-bottom: 0; border-right: 1px solid var(--line-2); }
  .card__thumb .thumb__glyph { font-size: 42px; }
  .thumb__cat { display: none; }
  .card__title { font-size: 15.5px; }
  .card__excerpt { display: none; }
}
