:root {
  /* 使用OKLCH色彩空间，中性色带有微妙暖色相 */
  --bg: #f1f0eb;
  --bg-oklch: oklch(95% 0.01 85);
  --panel: #ece8df;
  --panel-oklch: oklch(93% 0.015 85);
  --panel-deep: #dfd6c6;
  --panel-deep-oklch: oklch(88% 0.02 85);
  --paper: #fcfbf8;
  --paper-oklch: oklch(98% 0.005 85);
  --ink: #202020;
  --ink-oklch: oklch(20% 0.02 85);
  --muted: #7d7a73;
  --muted-oklch: oklch(55% 0.015 85);
  --line: #d8d0c3;
  --line-oklch: oklch(85% 0.02 85);
  --accent: #95c394;
  --accent-oklch: oklch(75% 0.12 145);

  /* 阴影使用更自然的暖色调 */
  --shadow: 0 12px 28px oklch(35% 0.03 85 / 0.1);
  --shadow-elevated: 0 20px 40px oklch(35% 0.03 85 / 0.15);
  --grid-line: oklch(50% 0.01 85 / 0.03);

  /* 间距系统 - 4px基数 */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;

  /* 圆角系统 */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 26px;
  --radius-full: 999px;

  /* 动效缓动 */
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-enter: cubic-bezier(0, 0, 0.2, 1);
  --ease-exit: cubic-bezier(0.4, 0, 1, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* 字体加载策略 - 确保中文网字计划不受影响 */
  --font-display: swap;

  /* 主题变量 */
  --printer-cn-font-family: "";
  --printer-external-link-color: #ff6b35;
  --printer-post-category-color: #ff6b35;
  --printer-post-category-rgb: 255 107 53;
}

* {
  box-sizing: border-box;
}

/* ============================================
   动效系统 - 统一使用CSS变量缓动
   ============================================ */
html.theme-animating *,
html.theme-animating *::before,
html.theme-animating *::after {
  transition:
    background-color 250ms var(--ease-smooth),
    color 250ms var(--ease-smooth),
    border-color 250ms var(--ease-smooth),
    box-shadow 250ms var(--ease-smooth),
    background-image 250ms var(--ease-smooth),
    transform 250ms var(--ease-smooth);
}

/* 关键元素单独优化过渡 */
html.theme-animating .printer-top,
html.theme-animating .paper,
html.theme-animating .site-footer {
  transition:
    background-color 250ms var(--ease-smooth),
    border-color 250ms var(--ease-smooth),
    box-shadow 250ms var(--ease-smooth);
}

/* 按钮和交互元素更快响应 - 使用enter缓动 */
html.theme-animating .theme-toggle,
html.theme-animating .menu a,
html.theme-animating .header-search-btn {
  transition:
    background-color 180ms var(--ease-enter),
    border-color 180ms var(--ease-enter),
    box-shadow 180ms var(--ease-enter),
    transform 180ms var(--ease-bounce);
}

@keyframes power-pulse {
  0%, 100% { box-shadow: 0 0 5px rgba(134, 188, 142, 0.4); }
  50%       { box-shadow: 0 0 18px rgba(134, 188, 142, 1); }
}

@keyframes power-pulse-dark {
  0%, 100% { box-shadow: 0 0 5px rgba(255, 77, 79, 0.4); }
  50%       { box-shadow: 0 0 18px rgba(255, 77, 79, 1); }
}

/* 页面加载动画 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* 交错动画延迟 */
.post-item:nth-child(1) { animation: fadeInUp 0.5s var(--ease-enter) 0.1s both; }
.post-item:nth-child(2) { animation: fadeInUp 0.5s var(--ease-enter) 0.15s both; }
.post-item:nth-child(3) { animation: fadeInUp 0.5s var(--ease-enter) 0.2s both; }
.post-item:nth-child(4) { animation: fadeInUp 0.5s var(--ease-enter) 0.25s both; }
.post-item:nth-child(5) { animation: fadeInUp 0.5s var(--ease-enter) 0.3s both; }
.post-item:nth-child(6) { animation: fadeInUp 0.5s var(--ease-enter) 0.35s both; }
.post-item:nth-child(7) { animation: fadeInUp 0.5s var(--ease-enter) 0.4s both; }
.post-item:nth-child(8) { animation: fadeInUp 0.5s var(--ease-enter) 0.45s both; }
.post-item:nth-child(9) { animation: fadeInUp 0.5s var(--ease-enter) 0.5s both; }
.post-item:nth-child(10) { animation: fadeInUp 0.5s var(--ease-enter) 0.55s both; }

.paper-title {
  animation: slideInLeft 0.6s var(--ease-enter) 0.05s both;
}

.paper-subtitle {
  animation: fadeIn 0.5s var(--ease-smooth) 0.2s both;
}

.paper-meta {
  animation: fadeIn 0.5s var(--ease-smooth) 0.3s both;
}

html,
body {
  margin: 0;
  padding: 0;
  color: var(--ink);
  background-color: var(--bg);
  /* 优化：使用repeating-linear-gradient提升性能 */
  background-image:
    repeating-linear-gradient(to right, var(--grid-line) 0, var(--grid-line) 1px, transparent 1px, transparent 32px),
    repeating-linear-gradient(to bottom, var(--grid-line) 0, var(--grid-line) 1px, transparent 1px, transparent 32px);
  font-family: "Songti SC", "Noto Serif CJK SC", "STSong", "PingFang SC", "Microsoft YaHei", sans-serif;
  /* 字体加载策略 - 不影响中文网字计划 */
  font-display: var(--font-display);
  transition: background-color 250ms var(--ease-smooth);
  /* 优化文本渲染 */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

html.printer-cn-font.printer-cn-scope-article article,
html.printer-cn-font.printer-cn-scope-article article * {
  font-family: var(--printer-cn-font-family), "Songti SC", "Noto Serif CJK SC", "STSong", "PingFang SC", "Microsoft YaHei", sans-serif;
}

html.printer-cn-font.printer-cn-scope-paper .paper,
html.printer-cn-font.printer-cn-scope-paper .paper * {
  font-family: var(--printer-cn-font-family), "Songti SC", "Noto Serif CJK SC", "STSong", "PingFang SC", "Microsoft YaHei", sans-serif;
}

html.printer-cn-font.printer-cn-scope-all body,
html.printer-cn-font.printer-cn-scope-all body * {
  font-family: var(--printer-cn-font-family), "Songti SC", "Noto Serif CJK SC", "STSong", "PingFang SC", "Microsoft YaHei", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

/* 使用间距系统 */
.site-wrap {
  max-width: 940px;
  margin: var(--space-7) auto var(--space-8);
  padding: 0 var(--space-4);
}

.printer-top {
  background: linear-gradient(180deg, #f5f0e6 0%, #ebe5d8 50%, #e0d8c8 100%);
  border: 1px solid #d4c8b0;
  border-radius: var(--radius-xl) var(--radius-xl) var(--radius-md) var(--radius-md);
  padding: var(--space-5) var(--space-6) var(--space-5);
  box-shadow:
    /* 顶部高光 */
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    /* 外阴影 */
    0 20px 40px rgba(40, 34, 25, 0.12),
    0 8px 16px rgba(40, 34, 25, 0.08);
  position: relative;
  z-index: 2;
  /* 微交互：悬停时轻微上浮 */
  transition: transform 300ms var(--ease-smooth), box-shadow 300ms var(--ease-smooth);
}

.printer-top:hover {
  transform: translateY(-3px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 28px 56px rgba(40, 34, 25, 0.15),
    0 12px 24px rgba(40, 34, 25, 0.1);
}

/* 底部阴影层 */
.printer-top::after {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: -10px;
  height: 12px;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  background: linear-gradient(to bottom, #c4b8a0, #d4c8b0);
  box-shadow:
    0 4px 8px rgba(40, 34, 25, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  z-index: -1;
}

.top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* 拟物化Logo底座 */
.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(145deg, #e8e0d0 0%, #d4c8b0 100%);
  position: relative;
  flex-shrink: 0;
  aspect-ratio: 1 / 1;
  box-shadow:
    /* 外阴影 - 营造悬浮感 */
    0 8px 20px rgba(40, 34, 25, 0.15),
    0 4px 8px rgba(40, 34, 25, 0.1),
    /* 内阴影 - 凹陷效果 */
    inset 0 2px 4px rgba(255, 255, 255, 0.6),
    inset 0 -2px 4px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Logo内部圆形 */
.brand-mark::before {
  content: "";
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(145deg, #3a3a3a 0%, #2a2a2a 100%);
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.1),
    0 2px 4px rgba(0, 0, 0, 0.2);
}

.brand-logo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  aspect-ratio: 1 / 1;
  background: linear-gradient(145deg, #e8e0d0 0%, #d4c8b0 100%);
  box-shadow:
    0 8px 20px rgba(40, 34, 25, 0.15),
    0 4px 8px rgba(40, 34, 25, 0.1),
    inset 0 2px 4px rgba(255, 255, 255, 0.6),
    inset 0 -2px 4px rgba(0, 0, 0, 0.08);
  padding: 6px;
}

.brand-logo img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  display: block;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* 中心指示灯 */
.brand-mark::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffb347 0%, #e6953a 100%);
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.2),
    inset 0 1px 2px rgba(255, 255, 255, 0.4);
}

.brand-text h1 {
  margin: 0;
  font-size: clamp(16px, 2.5vw, 20px);
  letter-spacing: 0.25em;
  font-weight: 600;
  background: linear-gradient(135deg, var(--ink) 0%, #5a5448 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-text p {
  margin: 4px 0 0;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 500;
}

.power {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
}

.power-text-off {
  display: none;
}

html.dark .power-text-on {
  display: none;
}

html.dark .power-text-off {
  display: inline;
}

.power-dot {
  width: 11px;
  height: 11px;
  margin: 0 auto 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: power-pulse 2.4s ease-in-out infinite;
}

html.dark .power-dot {
  background: #ff4d4f;
  box-shadow: 0 0 10px rgba(255, 77, 79, 0.85);
}

.menu-row {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.menu {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* 3D拟物化菜单按钮 */
.menu a {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  padding: 12px 24px;
  border-radius: 10px;
  background: linear-gradient(180deg, #f5f0e6 0%, #e8e0d0 100%);
  color: #4a453d;
  /* 3D立体阴影 */
  box-shadow:
    /* 顶部高光 */
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    /* 底部阴影 */
    0 6px 0 #c9bfa8,
    0 8px 8px rgba(40, 34, 25, 0.15),
    0 12px 16px rgba(40, 34, 25, 0.1);
  /* 微交互 */
  transition: all 150ms var(--ease-enter);
  position: relative;
  border: none;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* 悬停效果 - 轻微上浮 */
.menu a:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 8px 0 #c9bfa8,
    0 10px 12px rgba(40, 34, 25, 0.18),
    0 16px 20px rgba(40, 34, 25, 0.12);
}

/* 点击效果 - 按下凹陷 */
.menu a:active {
  transform: translateY(4px);
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.1),
    0 2px 0 #c9bfa8,
    0 3px 4px rgba(40, 34, 25, 0.1);
}

/* 当前选中状态 */
.menu a.current {
  background: linear-gradient(180deg, #e8e0d0 0%, #ddd5c0 100%);
  color: #3a3530;
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.08),
    0 3px 0 #b8ad94,
    0 4px 6px rgba(40, 34, 25, 0.1);
  transform: translateY(3px);
}

.ctrls {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-search {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.header-search-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.header-search input[type="search"] {
  width: 0;
  padding: 7px 0;
  opacity: 0;
  pointer-events: none;
  border: 1px solid #d7cfbe;
  border-radius: var(--radius-full);
  background: rgba(253, 251, 246, 0.75);
  font-size: 12px;
  color: inherit;
  outline: none;
  transition: width 250ms var(--ease-enter), padding 250ms var(--ease-enter), opacity 200ms var(--ease-smooth);
}

.header-search.open input[type="search"] {
  width: 140px;
  padding: 7px 10px;
  opacity: 1;
  pointer-events: auto;
}

.header-search input[type="search"]::placeholder {
  color: rgba(125, 122, 115, 0.9);
}

/* 拟物化旋钮按钮 - 搜索 */
.header-search-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(145deg, #f5f0e6 0%, #e0d6c4 100%);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  /* 3D立体效果 */
  box-shadow:
    /* 顶部高光 */
    inset 0 2px 4px rgba(255, 255, 255, 0.7),
    /* 底部阴影 */
    0 5px 0 #c4b8a0,
    0 6px 8px rgba(40, 34, 25, 0.2),
    0 10px 16px rgba(40, 34, 25, 0.12);
  transition: all 150ms var(--ease-enter);
  position: relative;
}

/* 旋钮内部凹陷 */
.header-search-btn::before {
  content: "";
  position: absolute;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(145deg, #e8e0d0 0%, #f0ebe0 100%);
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.08),
    0 1px 0 rgba(255, 255, 255, 0.5);
}

.header-search-btn svg {
  width: 16px;
  height: 16px;
  fill: #7a7265;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.5));
}

.header-search-btn:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.7),
    0 7px 0 #c4b8a0,
    0 8px 12px rgba(40, 34, 25, 0.22),
    0 14px 20px rgba(40, 34, 25, 0.15);
}

.header-search-btn:active {
  transform: translateY(3px);
  box-shadow:
    inset 0 3px 6px rgba(0, 0, 0, 0.12),
    0 2px 0 #c4b8a0,
    0 3px 5px rgba(40, 34, 25, 0.1);
}

html.dark .header-search input[type="search"] {
  background: rgba(16, 26, 40, 0.7);
  border-color: #2b3f5f;
  color: #dce6f5;
}

html.dark .header-search input[type="search"]::placeholder {
  color: rgba(129, 146, 168, 0.95);
}

html.dark .header-search-btn {
  border-color: #355174;
  background: radial-gradient(circle at 35% 35%, #24374e 0, #1b2c44 45%, #162336 100%);
  color: #cfe3ff;
  box-shadow: inset -1px -2px 3px rgba(0, 0, 0, 0.35);
}

/* 语言切换器 - 拟物化风格 */
.lang {
  font-size: 11px;
  font-weight: 600;
  color: #8d877d;
  display: flex;
  gap: 3px;
  padding: 3px;
  background: linear-gradient(145deg, #e8e0d0 0%, #d4c8b0 100%);
  border-radius: 20px;
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.08),
    0 1px 0 rgba(255, 255, 255, 0.5);
}

.lang span {
  padding: 5px 10px;
  border-radius: 16px;
  cursor: pointer;
  transition: all 200ms var(--ease-enter);
  letter-spacing: 0.05em;
}

.lang span:not(.current):hover {
  background: rgba(255, 255, 255, 0.3);
}

.lang .current {
  background: linear-gradient(145deg, #f5f0e6 0%, #e8e0d0 100%);
  color: #e37d65;
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* 拟物化旋钮按钮 - 主题切换 */
.theme-toggle {
  border: none;
  padding: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #f5f0e6 0%, #e0d6c4 100%);
  position: relative;
  cursor: pointer;
  /* 3D立体效果 */
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.7),
    0 5px 0 #c4b8a0,
    0 6px 8px rgba(40, 34, 25, 0.2),
    0 10px 16px rgba(40, 34, 25, 0.12);
  transition: all 150ms var(--ease-enter);
}

/* 旋钮内部凹陷 */
.theme-toggle::before {
  content: "";
  position: absolute;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(145deg, #e8e0d0 0%, #f0ebe0 100%);
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.08),
    0 1px 0 rgba(255, 255, 255, 0.5);
}

/* 指针 */
.theme-toggle::after {
  content: "";
  width: 3px;
  height: 12px;
  border-radius: 2px;
  background: linear-gradient(180deg, #e37d65 0%, #d46a4f 100%);
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%) rotate(20deg);
  transform-origin: center 16px;
  transition: transform 400ms var(--ease-bounce);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  z-index: 1;
}

.theme-toggle:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.7),
    0 7px 0 #c4b8a0,
    0 8px 12px rgba(40, 34, 25, 0.22),
    0 14px 20px rgba(40, 34, 25, 0.15);
}

.theme-toggle:active {
  transform: translateY(3px);
  box-shadow:
    inset 0 3px 6px rgba(0, 0, 0, 0.12),
    0 2px 0 #c4b8a0,
    0 3px 5px rgba(40, 34, 25, 0.1);
}

html.dark .theme-toggle::after {
  transform: translateX(-50%) rotate(160deg);
}

html.dark {
  /* 暗黑模式使用冷色调中性色 */
  --bg: #060d18;
  --bg-oklch: oklch(12% 0.02 250);
  --panel: #101926;
  --panel-oklch: oklch(18% 0.03 250);
  --panel-deep: #1a2434;
  --panel-deep-oklch: oklch(24% 0.04 250);
  --paper: #0f1824;
  --paper-oklch: oklch(17% 0.025 250);
  --ink: #d6deea;
  --ink-oklch: oklch(88% 0.02 250);
  --muted: #8192a8;
  --muted-oklch: oklch(65% 0.03 250);
  --line: #253349;
  --line-oklch: oklch(32% 0.04 250);
  --accent: #2fdc7b;
  --accent-oklch: oklch(75% 0.2 155);

  --shadow: 0 18px 40px oklch(5% 0.05 250 / 0.6);
  --shadow-elevated: 0 24px 48px oklch(5% 0.05 250 / 0.7);
  --grid-line: oklch(50% 0.08 250 / 0.28);
}

html.dark .printer-top::after {
  background: linear-gradient(to bottom, #0b111a, #1a2434);
}

html.dark .printer-top {
  background: linear-gradient(to bottom, #111c2b 0%, #0d1623 100%);
  border-color: #20314b;
  box-shadow:
    0 0 0 1px rgba(52, 90, 143, 0.12),
    0 18px 36px rgba(0, 0, 0, 0.62);
}

html.dark .brand-mark {
  background: #1f2c3e;
  box-shadow: inset 0 0 0 1px rgba(120, 145, 181, 0.24);
}

html.dark .brand-logo {
  background: #1a2536;
  border-color: #2a3a53;
}

html.dark .menu a,
html.dark .meta-tags a,
html.dark .meta-tags span,
html.dark .page-navigator a,
html.dark .page-navigator span,
html.dark #comment-form input,
html.dark #comment-form textarea {
  background: linear-gradient(to bottom, #131f2f 0%, #101a28 100%);
  border-color: #2b3f5f;
  color: #dce6f5;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 0 0 1px rgba(20, 40, 67, 0.18);
}

html.dark .menu a.current,
html.dark .page-navigator .current a {
  background: linear-gradient(to bottom, #162a43 0%, #12233a 100%);
  border-color: #65b2ff;
  color: #e8f3ff;
  box-shadow:
    0 0 0 1px rgba(101, 178, 255, 0.55),
    0 0 14px rgba(65, 141, 222, 0.35);
}

html.dark .menu a:hover {
  border-color: #4b8ecf;
  color: #e5f1ff;
}

html.dark #comment-form button {
  background: linear-gradient(to bottom, #183150 0%, #13263f 100%);
  border-color: #4b8ecf;
  color: #e9f4ff;
}

html.dark .theme-toggle {
  border-color: #355174;
  background: radial-gradient(circle at 35% 35%, #24374e 0, #1b2c44 45%, #162336 100%);
  box-shadow:
    inset -1px -2px 3px rgba(0, 0, 0, 0.4),
    0 0 10px rgba(77, 132, 196, 0.25);
}

html.dark .theme-toggle::after {
  background: #7dbdff;
}

html.dark .power-dot {
  box-shadow: 0 0 10px rgba(47, 220, 123, 0.9);
}

html.dark .lang .current {
  color: #ff8a6d;
}

html.dark .paper {
  border-color: #20314a;
}

html.dark .paper::before {
  background-image: linear-gradient(to bottom, rgba(142, 180, 235, 0.06) 1px, transparent 1px);
  opacity: 0.3;
}

html.dark .post-title a:hover {
  color: #f0f6ff;
}

.paper {
  position: relative;
  background: var(--paper);
  border: 1px solid #e4dfd3;
  border-top: var(--space-2) solid var(--panel-deep);
  box-shadow: var(--shadow);
  padding: var(--space-6) var(--space-6) var(--space-7);
  margin: -1px auto 0;
  width: calc(100% - 26px);
  min-height: 560px;
  /* 微交互：悬停时轻微阴影增强 */
  transition: box-shadow 300ms var(--ease-smooth);
}

.paper:hover {
  box-shadow: var(--shadow-elevated);
}

/* 优化：使用repeating-linear-gradient提升性能 */
.paper::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.015) 0,
    rgba(0, 0, 0, 0.015) 1px,
    transparent 1px,
    transparent 30px
  );
  opacity: 0.45;
}

.paper>* {
  position: relative;
  z-index: 1;
}

.paper-title {
  margin: 0 0 8px;
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, var(--ink) 0%, #5a5448 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.paper>h2.paper-title {
  font-size: clamp(20px, 3vw, 26px);
  letter-spacing: 0.08em;
  background: none;
  -webkit-text-fill-color: var(--ink);
}

.paper-subtitle {
  margin: 0 0 24px;
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.05em;
}

.paper-meta {
  border-top: 1px dashed #ece6da;
  border-bottom: 1px dashed #ece6da;
  padding: 14px 0 10px;
  margin-bottom: 26px;
}

.meta-group+.meta-group {
  margin-top: 12px;
}

.meta-label {
  margin: 0 0 7px;
  color: #8f887d;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.meta-label-icon {
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.meta-label-icon svg {
  width: 100%;
  height: 100%;
  fill: #c1baaf;
}

html.dark .meta-label-icon svg {
  fill: #607190;
}

.meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta-tags a {
  font-size: 12px;
  color: #5f5850;
  border: 1px solid #e8e0d4;
  border-radius: 20px;
  background: linear-gradient(145deg, #fdfbf7 0%, #f5f0e8 100%);
  padding: 4px 12px;
  font-weight: 500;
  transition: all 0.2s var(--ease-enter);
}

.meta-tags a:hover {
  background: linear-gradient(145deg, #f5f0e8 0%, #ebe5db 100%);
  border-color: #d4c8b8;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(40, 34, 25, 0.08);
}


.meta-tags span {
  font-size: 12px;
  color: #8c857a;
  border: 1px dashed #d8d0c3;
  border-radius: 20px;
  background: #faf7f1;
  padding: 4px 12px;
  font-style: italic;
}

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

.post-item {
  border-top: 1px dashed #e7e1d6;
  padding: 28px 16px;
  margin: 0 -16px;
  border-radius: 12px;
  transition: all 0.3s var(--ease-smooth);
}

.post-item:first-child {
  border-top: 0;
  padding-top: 8px;
}

.post-item:hover {
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.015) 0%, rgba(0, 0, 0, 0.025) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 4px 12px rgba(0, 0, 0, 0.04);
}

.post-item:nth-child(even) {
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.012) 0%, rgba(0, 0, 0, 0.018) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 1px 3px rgba(0, 0, 0, 0.02);
}

.post-item:nth-child(even):hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 4px 12px rgba(0, 0, 0, 0.05);
}

html.dark .post-item:nth-child(even) {
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.015) 0%, rgba(255, 255, 255, 0.025) 100%);
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 1px 3px rgba(0, 0, 0, 0.1);
}

html.dark .post-item:nth-child(even):hover {
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 2px 8px rgba(0, 0, 0, 0.15);
}

.post-date {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.post-meta {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--muted);
  text-align: left;
}

.post-meta-label {
  display: inline-block;
  margin-right: 6px;
  letter-spacing: 0.08em;
}

.post-meta-category .post-meta-label {
  display: none;
}

.post-meta-value {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.post-meta-value a {
  color: var(--printer-post-category-color);
  display: inline-flex;
  align-items: center;
  border: 1px solid rgb(var(--printer-post-category-rgb) / 0.6);
  border-radius: 20px;
  background: linear-gradient(145deg, rgb(var(--printer-post-category-rgb) / 0.08) 0%, rgb(var(--printer-post-category-rgb) / 0.04) 100%);
  padding: 5px 14px;
  line-height: 1.2;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: all 0.2s var(--ease-enter);
}

.post-meta-value a:hover {
  background: linear-gradient(145deg, rgb(var(--printer-post-category-rgb) / 0.15) 0%, rgb(var(--printer-post-category-rgb) / 0.08) 100%);
  border-color: rgb(var(--printer-post-category-rgb) / 0.8);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgb(var(--printer-post-category-rgb) / 0.15);
}

html.dark .post-meta-value a {
  border-color: rgb(var(--printer-post-category-rgb) / 0.7);
  background: rgb(var(--printer-post-category-rgb) / 0.08);
  color: var(--printer-post-category-color);
}

.post-meta-value a:hover {
  background: rgb(var(--printer-post-category-rgb) / 0.12);
}

html.dark .post-meta-value a:hover {
  background: rgb(var(--printer-post-category-rgb) / 0.12);
}

.post-title {
  margin: 0;
  font-size: clamp(18px, 2.5vw, 24px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.post-title a {
  display: inline-block;
  transition: all 0.25s var(--ease-enter);
  position: relative;
}

.post-title a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), #c4a35a);
  transition: width 0.3s var(--ease-enter);
}

.post-title a:hover {
  color: #45403a;
}

.post-title a:hover::after {
  width: 100%;
}

.post-excerpt {
  margin: 12px 0 0;
  color: inherit;
  font-size: 15px;
  line-height: 1.8;
  overflow-wrap: anywhere;
  word-break: break-word;
  opacity: 0.9;
}

.post-excerpt blockquote {
  margin: 14px 0;
  padding: 10px 14px;
  border-left: 4px solid rgba(255, 107, 53, 0.55);
  background: rgba(255, 107, 53, 0.06);
  color: rgba(32, 32, 32, 0.9);
}

html.dark .post-excerpt blockquote {
  border-left-color: rgba(255, 138, 109, 0.75);
  background: rgba(255, 138, 109, 0.08);
  color: rgba(214, 222, 234, 0.92);
}

.post-excerpt blockquote> :first-child {
  margin-top: 0;
}

.post-excerpt blockquote> :last-child {
  margin-bottom: 0;
}

.post-excerpt :not(pre)>code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.92em;
  padding: 0.15em 0.45em;
  border-radius: 6px;
  border: 1px solid rgba(255, 107, 53, 0.28);
  background: rgba(255, 107, 53, 0.08);
  color: #a63f19;
}

html.dark .post-excerpt :not(pre)>code {
  border-color: rgba(255, 138, 109, 0.35);
  background: rgba(255, 138, 109, 0.12);
  color: #ffd2c6;
}

.post-excerpt pre {
  max-width: 100%;
  overflow: auto;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.03);
}

.post-excerpt pre code {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13px;
  line-height: 1.7;
  color: rgba(32, 32, 32, 0.92);
}

html.dark .post-excerpt pre {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.25);
}

html.dark .post-excerpt pre code {
  color: rgba(214, 222, 234, 0.92);
}

.post-excerpt table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  width: 100%;
  margin: 14px 0;
  font-size: 14px;
  color: inherit;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.01);
}

.post-excerpt th,
.post-excerpt td {
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 9px 12px;
  text-align: left;
  vertical-align: top;
}

.post-excerpt thead th {
  background: rgba(0, 0, 0, 0.03);
  font-weight: 700;
}

.post-excerpt tbody tr:nth-child(even) td {
  background: rgba(0, 0, 0, 0.018);
}

html.dark .post-excerpt table {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
}

html.dark .post-excerpt th,
html.dark .post-excerpt td {
  border-color: rgba(255, 255, 255, 0.1);
}

html.dark .post-excerpt thead th {
  background: rgba(255, 255, 255, 0.05);
}

html.dark .post-excerpt tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.03);
}

.post-excerpt iframe,
.post-excerpt video,
.post-excerpt embed {
  max-width: 100%;
}

.post-nav {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px dashed #e7e1d6;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.post-nav-item {
  font-size: 13px;
  color: var(--muted);
}

.post-nav-label {
  display: block;
  margin-bottom: 6px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.post-nav-link a {
  display: inline-block;
  max-width: 100%;
  color: inherit;
}

.post-nav-prev .post-nav-link a::before {
  content: "← ";
}

.post-nav-next .post-nav-link a::after {
  content: " →";
}

.post-nav-link a:hover {
  color: #e37d65;
}

/* ============================================
   页脚 - 垂直卡片式布局
   ============================================ */
.site-footer {
  margin-top: 48px;
  padding-bottom: 32px;
  position: relative;
}

/* 页脚卡片 */
.site-footer-card {
  background: linear-gradient(145deg, var(--panel) 0%, var(--bg) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 8px 24px rgba(40, 34, 25, 0.08);
  text-align: center;
}

/* 社交链接 */
.site-footer-social {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.social-link {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #f5f0e6 0%, #e0d6c4 100%);
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.7),
    0 4px 0 #c4b8a0,
    0 6px 8px rgba(40, 34, 25, 0.15);
  transition: all 0.2s var(--ease-enter);
  color: #7a7265;
}

.social-link svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.social-link:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.7),
    0 6px 0 #c4b8a0,
    0 8px 12px rgba(40, 34, 25, 0.2);
  color: #5a5448;
}

.social-link:active {
  transform: translateY(2px);
  box-shadow:
    inset 0 3px 6px rgba(0, 0, 0, 0.1),
    0 2px 0 #c4b8a0,
    0 3px 5px rgba(40, 34, 25, 0.1);
}

/* 分隔装饰 */
.site-footer-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
}

.divider-line {
  flex: 1;
  max-width: 80px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

.divider-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(149, 195, 148, 0.5);
}

/* 版权信息 */
.site-footer-copyright {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 12px;
  letter-spacing: 0.02em;
}

/* 访问统计 */
.site-footer-stats {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 16px;
  letter-spacing: 0.05em;
}

/* 技术标识 */
.site-footer-powered {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.site-footer-powered a {
  color: var(--muted);
  font-weight: 600;
  margin-left: 4px;
  transition: color 0.2s ease;
}

.site-footer-powered a:hover {
  color: var(--accent);
}

/* 返回顶部按钮 */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(145deg, #f5f0e6 0%, #e0d6c4 100%);
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.7),
    0 4px 0 #c4b8a0,
    0 8px 16px rgba(40, 34, 25, 0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s var(--ease-enter);
  z-index: 100;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top svg {
  width: 24px;
  height: 24px;
  fill: #7a7265;
  transition: transform 0.2s ease;
}

.back-to-top:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.7),
    0 6px 0 #c4b8a0,
    0 10px 20px rgba(40, 34, 25, 0.25);
}

.back-to-top:hover svg {
  transform: translateY(-2px);
}

.back-to-top:active {
  transform: translateY(2px);
  box-shadow:
    inset 0 3px 6px rgba(0, 0, 0, 0.1),
    0 2px 0 #c4b8a0,
    0 4px 8px rgba(40, 34, 25, 0.15);
}

.not-found-hint {
  margin: 12px 0 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.not-found-search {
  margin: 12px 0 20px;
}

.not-found-search-label {
  display: inline-block;
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
}

.not-found-search-bar {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.not-found-search-bar input[type="search"] {
  flex: 1;
  width: 100%;
  border: 1px solid #ddd5c8;
  border-radius: 8px;
  background: #fdfbf6;
  padding: 10px 12px;
  font-size: 13px;
  color: inherit;
  outline: none;
}

.not-found-search-submit {
  width: 44px;
  border: 1px solid #d4cab8;
  border-radius: 8px;
  background: linear-gradient(to bottom, #eee5d8 0%, #e4dacc 100%);
  color: #2e2a24;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.not-found-search-submit svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

html.dark .not-found-search-bar input[type="search"] {
  background: linear-gradient(to bottom, #131f2f 0%, #101a28 100%);
  border-color: #2b3f5f;
  color: #dce6f5;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 0 0 1px rgba(20, 40, 67, 0.18);
}

html.dark .not-found-search-submit {
  background: linear-gradient(to bottom, #183150 0%, #13263f 100%);
  border-color: #4b8ecf;
  color: #e9f4ff;
}

html.dark .site-footer {
  border-top-color: rgba(120, 145, 181, 0.22);
}

/* 页脚卡片 - 暗黑模式 */
html.dark .site-footer-card {
  background: linear-gradient(145deg, #1a2940 0%, #131c2e 100%);
  border-color: #2b3f5f;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 8px 24px rgba(0, 0, 0, 0.3);
}

/* 社交链接 - 暗黑模式 */
html.dark .social-link {
  background: linear-gradient(145deg, #1e3a5f 0%, #152a45 100%);
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.05),
    0 4px 0 #0f1f35,
    0 6px 8px rgba(0, 0, 0, 0.3);
  color: #8fa3bf;
}

html.dark .social-link:hover {
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.05),
    0 6px 0 #0f1f35,
    0 8px 12px rgba(0, 0, 0, 0.4);
  color: #b8c9e0;
}

html.dark .social-link:active {
  box-shadow:
    inset 0 3px 6px rgba(0, 0, 0, 0.3),
    0 2px 0 #0f1f35,
    0 3px 5px rgba(0, 0, 0, 0.2);
}

/* 分隔装饰 - 暗黑模式 */
html.dark .divider-line {
  background: linear-gradient(90deg, transparent, #2b3f5f, transparent);
}

html.dark .divider-dot {
  background: #7ab8a0;
  box-shadow: 0 0 8px rgba(122, 184, 160, 0.4);
}

/* 返回顶部按钮 - 暗黑模式 */
html.dark .back-to-top {
  background: linear-gradient(145deg, #1e3a5f 0%, #152a45 100%);
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.05),
    0 4px 0 #0f1f35,
    0 8px 16px rgba(0, 0, 0, 0.35);
}

html.dark .back-to-top svg {
  fill: #8fa3bf;
}

html.dark .back-to-top:hover {
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.05),
    0 6px 0 #0f1f35,
    0 10px 20px rgba(0, 0, 0, 0.45);
}

html.dark .back-to-top:hover svg {
  fill: #b8c9e0;
}

html.dark .back-to-top:active {
  box-shadow:
    inset 0 3px 6px rgba(0, 0, 0, 0.3),
    0 2px 0 #0f1f35,
    0 4px 8px rgba(0, 0, 0, 0.25);
}

@media (max-width: 720px) {
  .site-footer-inner {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 10px;
  }

  .site-footer-left,
  .site-footer-center,
  .site-footer-right {
    white-space: normal;
  }
}

.comments-area {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px dashed #e7e1d6;
}

.comments-title {
  margin: 0 0 14px;
  font-size: 21px;
}

.comment-list {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
}

.comment-item {
  border-top: 1px dashed #ece6da;
  padding: 12px 0;
}

.comment-item:first-child {
  border-top: 0;
}

.comment-meta {
  margin: 0 0 6px;
  font-size: 12px;
  color: #7e786e;
}

.comment-dot {
  margin: 0 6px;
}

.comment-content {
  font-size: 14px;
  line-height: 1.75;
  color: inherit;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.respond-title {
  margin: 18px 0 10px;
  font-size: 18px;
}

.respond-group {
  margin-bottom: 12px;
}

.respond-label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  color: #8f887d;
  letter-spacing: 0.05em;
}

html.dark .respond-label {
  color: #8192a8;
}

.respond-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 4px;
}

#comment-form input,
#comment-form textarea {
  width: 100%;
  border: 1px solid #ddd5c8;
  border-radius: 6px;
  background: #fdfbf6;
  padding: 9px 10px;
  font-size: 13px;
  color: #3f3a33;
  outline: none;
  transition: border-color 0.2s ease;
}

#comment-form input:focus,
#comment-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(149, 195, 148, 0.2);
}

html.dark #comment-form input:focus,
html.dark #comment-form textarea:focus {
  border-color: #4b8ecf;
  box-shadow: 0 0 0 3px rgba(75, 142, 207, 0.2);
}

#comment-form textarea {
  display: block;
  resize: vertical;
  min-height: 120px;
}

#comment-form button {
  margin-top: 6px;
  border: 1px solid #d4cab8;
  border-radius: 6px;
  background: linear-gradient(to bottom, #eee5d8 0%, #e4dacc 100%);
  color: #2e2a24;
  font-size: 13px;
  padding: 8px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

#comment-form button:hover {
  background: linear-gradient(to bottom, #e4dacc 0%, #d8cdba 100%);
  border-color: #c7beac;
}

.respond-login,
.respond-closed {
  font-size: 13px;
  color: #6a6358;
}

.page-navigator {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-navigator li {
  display: inline-flex;
}

.page-navigator a,
.page-navigator span {
  font-size: 12px;
  line-height: 1;
  padding: 7px 10px;
  border-radius: 6px;
  border: 1px solid #dfd7ca;
  background: #f7f3ea;
  color: #6a6358;
}

.page-navigator .current a {
  background: #e9dfcf;
  border-color: #d4c8b6;
  color: #3f3a33;
}

article .post-excerpt a[href^="http"] {
  color: var(--printer-external-link-color);
}

article .post-excerpt p {
  margin: 0 0 1em;
}

article .post-excerpt img {
  max-width: 100%;
  height: auto;
}

@media (max-width: 920px) {
  .paper {
    width: 100%;
    padding: 26px 24px 40px;
  }

  .paper-title {
    font-size: 30px;
  }

  .paper>h2.paper-title {
    font-size: 20px;
  }

  .post-title {
    font-size: 20px;
  }
}

/* ============================================
   移动端适配优化 (Mobile-First Adaptation)
   ============================================ */

/* 小屏手机优化 (375px以下) */
@media (max-width: 375px) {
  .site-wrap {
    margin-top: 16px;
    padding: 0 8px;
  }

  .printer-top {
    padding: 14px 12px 12px;
    border-radius: 20px 20px 10px 10px;
  }

  .brand-mark,
  .brand-logo {
    width: 44px;
    height: 44px;
  }

  .brand-logo img {
    width: 32px;
    height: 32px;
  }

  .brand-text h1 {
    font-size: 16px;
    letter-spacing: 0.2em;
  }

  .brand-text p {
    font-size: 10px;
    letter-spacing: 0.12em;
  }

  /* 隐藏电源指示器节省空间 */
  .power {
    display: none;
  }

  .menu {
    gap: 8px;
  }

  .menu a {
    padding: 10px 14px;
    font-size: 12px;
    border-radius: 8px;
  }

  .ctrls {
    gap: 8px;
  }

  .header-search-btn,
  .theme-toggle {
    width: 40px;
    height: 40px;
  }

  .lang {
    font-size: 11px;
  }

  .lang span {
    padding: 5px 10px;
  }
}

/* 标准移动端 (376px - 767px) */
@media (min-width: 376px) and (max-width: 767px) {
  .site-wrap {
    margin-top: 20px;
    padding: 0 12px;
  }

  .printer-top {
    padding: 16px 16px 12px;
    border-radius: 24px 24px 12px 12px;
  }

  .brand-mark,
  .brand-logo {
    width: 48px;
    height: 48px;
  }

  .brand-logo img {
    width: 36px;
    height: 36px;
  }

  .brand-text h1 {
    font-size: 18px;
    letter-spacing: 0.24em;
  }

  .power {
    transform: scale(0.9);
  }

  .menu {
    gap: 10px;
  }

  .menu a {
    padding: 10px 16px;
    font-size: 13px;
  }

  .ctrls {
    gap: 10px;
  }

  .header-search-btn,
  .theme-toggle {
    width: 42px;
    height: 42px;
  }
}

/* 通用移动端样式 (767px以下) */
@media (max-width: 767px) {
  /* 暗黑模式移动端优化 */
  html.dark .brand-mark,
  html.dark .brand-logo {
    background: radial-gradient(circle at 35% 35%, #22344b 0, #1a2a42 55%, #142234 100%);
    box-shadow:
      0 12px 22px rgba(0, 0, 0, 0.55),
      inset 0 1px 0 rgba(255, 255, 255, 0.06);
  }

  html.dark .menu {
    border-bottom-color: rgba(120, 145, 181, 0.22);
  }

  html.dark .menu a {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.04),
      0 0 0 1px rgba(20, 40, 67, 0.18),
      0 14px 24px rgba(0, 0, 0, 0.45);
  }

  html.dark .theme-toggle {
    box-shadow:
      inset -2px -3px 6px rgba(0, 0, 0, 0.45),
      0 14px 24px rgba(0, 0, 0, 0.5);
  }

  .top-row {
    align-items: center;
  }

  .brand {
    gap: 10px;
  }

  .brand-mark::before {
    width: 36px;
    height: 36px;
  }

  .brand-mark::after {
    width: 12px;
    height: 12px;
  }

  /* 菜单和控制按钮垂直堆叠 */
  .menu-row {
    margin-top: 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .menu {
    justify-content: center;
    flex-wrap: wrap;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(180, 167, 146, 0.35);
  }

  .menu a {
    border-radius: 10px;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.7),
      0 5px 0 rgba(180, 167, 146, 0.25),
      0 8px 16px rgba(40, 34, 25, 0.08);
  }

  .menu a.current {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.65),
      0 3px 0 rgba(180, 167, 146, 0.18),
      0 8px 16px rgba(40, 34, 25, 0.06);
  }

  /* 点击效果优化 */
  .menu a:active {
    transform: translateY(3px);
    box-shadow:
      inset 0 2px 4px rgba(0, 0, 0, 0.1),
      0 2px 0 rgba(180, 167, 146, 0.2);
  }

  .ctrls {
    width: 100%;
    justify-content: center;
    gap: 16px;
  }

  /* 搜索框移动端优化 */
  .header-search {
    flex: 1;
    max-width: 200px;
  }

  .header-search.open input[type="search"] {
    width: 100%;
    max-width: 160px;
    padding: 10px 14px;
    font-size: 16px; /* 防止iOS缩放 */
  }

  .header-search-btn {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
  }

  .header-search-btn::before {
    width: 36px;
    height: 36px;
  }

  /* 主题切换按钮优化 */
  .theme-toggle {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
  }

  .theme-toggle::before {
    width: 36px;
    height: 36px;
  }

  .theme-toggle::after {
    width: 3px;
    height: 10px;
    top: 7px;
  }

  /* 语言切换器优化 */
  .lang {
    font-size: 12px;
  }

  .lang span {
    padding: 6px 12px;
  }

  /* 纸张区域优化 */
  .paper {
    width: calc(100% - 16px);
    padding: 24px 16px 32px;
    margin-top: -2px;
  }

  .paper-title {
    font-size: 24px;
    line-height: 1.2;
  }

  .paper > h2.paper-title {
    font-size: 18px;
  }

  .paper-subtitle {
    font-size: 13px;
    margin-bottom: 16px;
  }

  /* 文章列表优化 */
  .post-item {
    padding: 20px 0;
    margin: 0;
  }

  .post-date {
    font-size: 12px;
    margin-bottom: 6px;
  }

  .post-title {
    font-size: 17px;
    line-height: 1.4;
  }

  .post-excerpt {
    font-size: 14px;
    line-height: 1.7;
    margin-top: 8px;
  }

  /* 元信息区域优化 */
  .paper-meta {
    padding: 12px 0 10px;
    margin-bottom: 20px;
  }

  .meta-label {
    font-size: 11px;
  }

  .meta-tags {
    gap: 6px;
  }

  .meta-tags a,
  .meta-tags span {
    font-size: 11px;
    padding: 3px 8px;
  }

  /* 分页导航优化 */
  .page-navigator {
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-top: 24px;
  }

  .page-navigator a,
  .page-navigator span {
    padding: 8px 12px;
    font-size: 13px;
    min-width: 36px;
    text-align: center;
  }

  /* 评论区域优化 */
  .comments-area {
    margin-top: 24px;
    padding-top: 16px;
  }

  .comments-title {
    font-size: 18px;
  }

  .comment-item {
    padding: 16px 0;
  }

  .comment-meta {
    font-size: 11px;
  }

  .comment-content {
    font-size: 14px;
    line-height: 1.7;
  }

  /* 评论表单优化 */
  .respond-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  #comment-form input,
  #comment-form textarea {
    padding: 12px 14px;
    font-size: 16px; /* 防止iOS缩放 */
  }

  #comment-form button {
    width: 100%;
    padding: 12px 20px;
    font-size: 15px;
  }

  /* 页脚优化 - 移动端 */
  .site-footer {
    margin-top: 32px;
    padding-bottom: 24px;
  }

  .site-footer-card {
    padding: 24px 16px;
    border-radius: var(--radius);
  }

  .site-footer-social {
    gap: 12px;
    margin-bottom: 20px;
  }

  .social-link {
    width: 40px;
    height: 40px;
  }

  .social-link svg {
    width: 18px;
    height: 18px;
  }

  .site-footer-divider {
    margin-bottom: 20px;
  }

  .divider-line {
    max-width: 60px;
  }

  .site-footer-copyright {
    font-size: 13px;
    margin-bottom: 10px;
  }

  .site-footer-stats {
    font-size: 11px;
    margin-bottom: 12px;
  }

  .site-footer-powered {
    font-size: 10px;
  }

  /* 返回顶部按钮 - 移动端 */
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
  }

  .back-to-top svg {
    width: 20px;
    height: 20px;
  }

  /* 阅读进度条优化 */
  #reading-progress {
    height: 4px;
  }

  /* 触摸反馈优化 */
  .menu a,
  .header-search-btn,
  .theme-toggle,
  .page-navigator a,
  #comment-form button {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  /* 禁用悬停效果（触摸设备） */
  .menu a:hover,
  .header-search-btn:hover,
  .theme-toggle:hover,
  .post-title a:hover {
    transform: none;
  }

  /* 启用active状态 */
  .menu a:active,
  .header-search-btn:active,
  .theme-toggle:active {
    transform: translateY(2px);
  }
}

/* ============================================
   横屏移动端优化 (Landscape)
   ============================================ */
@media (max-width: 767px) and (orientation: landscape) {
  .site-wrap {
    margin-top: 16px;
  }

  .printer-top {
    padding: 14px 20px 12px;
  }

  /* 横屏时菜单和控制按钮水平排列 */
  .menu-row {
    flex-direction: row;
    align-items: center;
    gap: 16px;
  }

  .menu {
    flex: 1;
    justify-content: flex-start;
    border-bottom: none;
    padding-bottom: 0;
  }

  .ctrls {
    width: auto;
    justify-content: flex-end;
  }

  /* 减小Logo尺寸 */
  .brand-mark,
  .brand-logo {
    width: 44px;
    height: 44px;
  }

  .brand-logo img {
    width: 32px;
    height: 32px;
  }

  .brand-text h1 {
    font-size: 16px;
  }

  /* 隐藏电源指示器节省空间 */
  .power {
    display: none;
  }
}

/* ============================================
   平板适配 (768px - 1023px)
   ============================================ */
@media (min-width: 768px) and (max-width: 1023px) {
  .site-wrap {
    margin-top: 36px;
    padding: 0 20px;
  }

  .printer-top {
    padding: 20px 24px 16px;
  }

  .paper {
    width: calc(100% - 20px);
    padding: 28px 28px 40px;
  }

  .menu a {
    padding: 11px 20px;
    font-size: 14px;
  }

  .post-title {
    font-size: 19px;
  }

  /* 平板横屏优化 */
  @media (orientation: landscape) {
    .menu-row {
      gap: 20px;
    }

    .ctrls {
      gap: 14px;
    }
  }
}

/* ============================================
   触摸设备通用优化
   ============================================ */
@media (hover: none) and (pointer: coarse) {
  /* 所有触摸设备禁用悬停效果 */
  .printer-top:hover,
  .paper:hover,
  .menu a:hover,
  .header-search-btn:hover,
  .theme-toggle:hover,
  .post-title a:hover,
  .meta-tags a:hover,
  .page-navigator a:hover {
    transform: none;
    box-shadow: none;
  }

  /* 恢复默认阴影 */
  .printer-top {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.8),
      0 20px 40px rgba(40, 34, 25, 0.12),
      0 8px 16px rgba(40, 34, 25, 0.08);
  }

  .menu a {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.8),
      0 6px 0 #c9bfa8,
      0 8px 8px rgba(40, 34, 25, 0.15),
      0 12px 16px rgba(40, 34, 25, 0.1);
  }

  .header-search-btn,
  .theme-toggle {
    box-shadow:
      inset 0 2px 4px rgba(255, 255, 255, 0.7),
      0 5px 0 #c4b8a0,
      0 6px 8px rgba(40, 34, 25, 0.2),
      0 10px 16px rgba(40, 34, 25, 0.12);
  }

  /* 优化触摸反馈 */
  .menu a:active,
  .header-search-btn:active,
  .theme-toggle:active,
  .page-navigator a:active {
    transform: translateY(3px) scale(0.98);
    transition-duration: 100ms;
  }

  /* 增大触摸目标 */
  .menu a,
  .header-search-btn,
  .theme-toggle,
  .page-navigator a,
  .meta-tags a {
    min-height: 44px;
    min-width: 44px;
  }

  /* 防止触摸时的文字选择 */
  .menu a,
  .header-search-btn,
  .theme-toggle {
    -webkit-user-select: none;
    user-select: none;
  }
}

/* ============================================
   减少动画偏好支持
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .power-dot {
    animation: none;
    box-shadow: 0 0 8px rgba(134, 188, 142, 0.6);
  }

  html.dark .power-dot {
    box-shadow: 0 0 8px rgba(255, 77, 79, 0.6);
  }
}

  .theme-toggle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    box-shadow:
      inset -2px -3px 6px rgba(136, 118, 88, 0.16),
      0 10px 18px rgba(40, 34, 25, 0.12);
  }

  .theme-toggle::after {
    height: 12px;
    top: 7px;
  }

  .paper-title {
    font-size: 24px;
  }

  .paper>h2.paper-title {
    font-size: 18px;
  }

  .post-title {
    font-size: 18px;
  }

  .post-excerpt {
    font-size: 15px;
  }

  .respond-grid {
    grid-template-columns: 1fr;
  }

  /* 移动端适配：移除负边距，确保边缘对齐 */
  .post-item {
    padding-left: 8px;
    padding-right: 8px;
    margin-left: -8px;
    margin-right: -8px;
  }
}

/* ============================================
   空状态和加载状态
   ============================================ */

/* 加载骨架屏 */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--panel) 25%,
    var(--paper) 50%,
    var(--panel) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: var(--space-8) var(--space-5);
  color: var(--muted);
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-4);
  opacity: 0.4;
}

.empty-state-title {
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 var(--space-2);
}

.empty-state-desc {
  font-size: 14px;
  margin: 0;
  line-height: 1.6;
}

/* 访问统计加载状态 */
.stats-loading {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--muted);
}

.stats-loading::after {
  content: "";
  width: 12px;
  height: 12px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================
   阅读进度条
   ============================================ */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--accent);
  z-index: 9999;
  transition: width 0.1s linear;
  border-radius: 0 2px 2px 0;
  pointer-events: none;
}

/* ============================================
   暗黑模式呼吸灯动画覆盖
   ============================================ */
html.dark .power-dot {
  animation: power-pulse-dark 2.4s ease-in-out infinite;
}

/* ============================================
   无障碍：链接和按钮键盘焦点可见性
   ============================================ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
  transition: outline-offset 150ms var(--ease-enter);
}

/* 按钮焦点增强 */
button:focus-visible,
.menu a:focus-visible,
.header-search-btn:focus-visible,
.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  box-shadow: 0 0 0 4px oklch(75% 0.12 145 / 0.2);
}

/* 减少动画偏好支持 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .power-dot {
    animation: none;
    box-shadow: 0 0 8px rgba(134, 188, 142, 0.6);
  }

  html.dark .power-dot {
    box-shadow: 0 0 8px rgba(255, 77, 79, 0.6);
  }
}