/* ============================================================
   xfmpress-theme-anziyu — 仿安知鱼(hexo-theme-anzhiyu)布局风格
   特征：玻璃固定导航 / Hero 横幅 / 封面卡片流 / 右侧栏 / 深浅色
   ============================================================ */

:root {
  --ac: #425aef;             /* 安知鱼蓝 */
  --ac-2: #56c9f4;
  --grad: linear-gradient(135deg, #425aef 0%, #56c9f4 100%);
  --bg: #f7f9fe;
  --card: #ffffff;
  --text: #363636;
  --muted: #8086a1;
  --line: #e3e8f7;
  --border: var(--line); /* 别名：部分官方插件（share 等）按 --border 取描边色 */
  --soft: rgba(66, 90, 239, .08);
  --shadow: 0 8px 24px -4px rgba(66, 90, 239, .12);
  --shadow-lg: 0 16px 40px -8px rgba(66, 90, 239, .22);
  --radius: 14px;
  --nav-h: 60px;
  color-scheme: light;
}

[data-theme="dark"] {
  --ac: #6d8bff;
  --ac-2: #74c7f8;
  --grad: linear-gradient(135deg, #6d8bff 0%, #4aa8d8 100%);
  --bg: #18171c;
  --card: #1e1e24;
  --text: #becbd8;
  --muted: #7f8ca3;
  --line: #31313b;
  --border: var(--line);
  --soft: rgba(109, 139, 255, .12);
  --shadow: 0 8px 24px -4px rgba(0, 0, 0, .4);
  --shadow-lg: 0 16px 40px -8px rgba(0, 0, 0, .55);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'PingFang SC', 'HarmonyOS Sans SC', 'Microsoft YaHei', -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  transition: background .3s, color .3s;
}
a { color: var(--ac); text-decoration: none; transition: color .2s; }
a:hover { color: var(--ac-2); }
img { max-width: 100%; }
time { color: var(--muted); font-size: .85rem; }
.empty { text-align: center; color: var(--muted); padding: 48px 0; }

/* ---------- 阅读进度条 ---------- */
.progress-bar {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: var(--grad); z-index: 1001; border-radius: 0 3px 3px 0;
  transition: width .1s linear;
}

/* ---------- 固定玻璃导航 ---------- */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(18px) saturate(1.6);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .3s, background .3s;
}
[data-theme="dark"] .site-nav { background: rgba(24, 23, 28, .78); }
.site-nav.scrolled { box-shadow: var(--shadow); }
.nav-wrap {
  max-width: 1200px; margin: 0 auto; padding: 0 20px;
  height: var(--nav-h); display: flex; align-items: center; gap: 24px;
}
.nav-brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; }
.nav-brand:hover { color: var(--ac); }
.nav-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--grad); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .95rem; font-weight: 700;
}
.nav-links { display: flex; gap: 6px; margin-left: auto; }
.nav-links a {
  padding: 6px 14px; border-radius: 999px;
  color: var(--text); font-size: .95rem; font-weight: 500;
}
.nav-links a:hover { background: var(--soft); color: var(--ac); }
.nav-links a.active { background: var(--grad); color: #fff; box-shadow: 0 4px 12px -2px rgba(66, 90, 239, .4); }
.nav-actions { display: flex; gap: 8px; }
.nav-icon-btn {
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.nav-icon-btn:hover { color: var(--ac); border-color: var(--ac); transform: translateY(-1px); }
[data-theme="light"] .icon-moon, [data-theme="dark"] .icon-sun { display: none; }
#nav-menu-btn { display: none; }
.nav-drawer { display: none; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-title { display: none; }
  #nav-menu-btn { display: inline-flex; }
  .nav-drawer {
    display: flex; flex-direction: column; padding: 8px 16px 14px;
    border-top: 1px solid var(--line); background: var(--card);
  }
  .nav-drawer a { padding: 10px 12px; border-radius: 10px; color: var(--text); font-weight: 500; }
  .nav-drawer a.active { background: var(--soft); color: var(--ac); }
}

/* ---------- 主体布局 ---------- */
.site-main { max-width: 1200px; margin: 0 auto; padding: calc(var(--nav-h) + 24px) 20px 40px; }
.layout-two { display: grid; grid-template-columns: 1fr 300px; gap: 24px; align-items: start; }
.layout-two.narrow { grid-template-columns: 1fr 300px; }
.layout-main { min-width: 0; }
@media (max-width: 1024px) {
  .layout-two, .layout-two.narrow { grid-template-columns: 1fr; }
  .sidebar { display: none; }
}

/* ---------- Hero 横幅 ---------- */
.hero-banner {
  position: relative; overflow: hidden;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 40px 36px; box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.hero-hello { margin: 0; color: var(--muted); font-size: 1.05rem; }
.hero-name { color: var(--ac); font-weight: 700; }
.hero-emoji { display: inline-block; animation: wave 1.6s ease-in-out infinite; transform-origin: 70% 70%; }
@keyframes wave { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(14deg); } 20% { transform: rotate(-8deg); } 40% { transform: rotate(-4deg); } 50% { transform: rotate(10deg); } }
.hero-title { margin: 8px 0 6px; font-size: clamp(1.6rem, 4vw, 2.4rem); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-desc { margin: 0; color: var(--muted); }
.hero-links { margin-top: 20px; display: flex; gap: 12px; flex-wrap: wrap; }
.hero-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px; border-radius: 12px;
  background: var(--grad); color: #fff; font-weight: 600; font-size: .92rem;
  box-shadow: 0 6px 16px -4px rgba(66, 90, 239, .45);
  transition: transform .2s, box-shadow .2s;
}
.hero-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px -4px rgba(66, 90, 239, .55); color: #fff; }
.hero-btn.ghost { background: var(--card); color: var(--ac); border: 1px solid var(--line); box-shadow: none; }
.hero-btn.ghost:hover { border-color: var(--ac); }
.hero-deco { position: relative; width: 150px; height: 130px; flex: none; }
.hero-deco-a, .hero-deco-b { position: absolute; border-radius: 50%; opacity: .5; }
.hero-deco-a { inset: 12px 30px 30px 12px; background: var(--grad); filter: blur(2px); animation: float 6s ease-in-out infinite; }
.hero-deco-b { inset: 40px 0 0 60px; background: var(--soft); border: 2px dashed var(--ac); animation: float 7s ease-in-out infinite reverse; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.hero-big {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  font-size: 2rem; font-weight: 800; color: var(--ac); line-height: 1.1;
}
.hero-big small { font-size: .85rem; font-weight: 500; color: var(--muted); }
@media (max-width: 640px) { .hero-deco { display: none; } .hero-banner { padding: 28px 22px; } }

/* ---------- 分类快捷栏 ---------- */
.cat-bar { display: flex; gap: 8px; flex-wrap: wrap; margin: 20px 0 4px; }
.cat-chip {
  padding: 6px 16px; border-radius: 999px; font-size: .9rem; font-weight: 500;
  background: var(--card); border: 1px solid var(--line); color: var(--muted);
  transition: all .2s;
}
.cat-chip:hover, .cat-chip.active { background: var(--grad); color: #fff; border-color: transparent; transform: translateY(-1px); }

/* ---------- 区块标题 ---------- */
.section-head { display: flex; align-items: baseline; gap: 10px; margin: 24px 0 14px; }
.section-title { margin: 0; font-size: 1.3rem; }
.section-sub { color: var(--muted); font-size: .88rem; }

/* ---------- 文章卡片流 ---------- */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.post-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  transition: transform .25s, box-shadow .25s;
  display: flex; flex-direction: column;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-cover { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--soft); }
.card-cover-link { display: block; height: 100%; }
.card-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; display: block; }
.post-card:hover .card-cover img { transform: scale(1.06); }
.card-cat {
  position: absolute; top: 10px; left: 10px;
  padding: 3px 12px; border-radius: 999px; font-size: .78rem; font-weight: 600;
  background: rgba(255, 255, 255, .85); color: var(--ac); backdrop-filter: blur(6px);
}
.card-body { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.card-title { font-size: 1.08rem; font-weight: 700; color: var(--text); line-height: 1.45; }
.card-title:hover { color: var(--ac); }
.card-desc {
  margin: 8px 0 0; color: var(--muted); font-size: .9rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  flex: 1;
}
.card-meta { display: flex; align-items: center; gap: 14px; margin-top: 12px; flex-wrap: wrap; }
.card-meta-item { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: .82rem; }
.card-tag { font-size: .82rem; color: var(--ac); opacity: .85; }

/* ---------- 分页 ---------- */
.pager { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 28px 0 8px; flex-wrap: wrap; }
.pager-nums { display: flex; gap: 6px; }
.pager-num, .pager-step, .pager-gap {
  min-width: 36px; height: 36px; padding: 0 12px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  background: var(--card); border: 1px solid var(--line); color: var(--text);
  font-size: .9rem; font-weight: 500;
}
.pager-num:hover, .pager-step:hover { border-color: var(--ac); color: var(--ac); }
.pager-num.is-current { background: var(--grad); color: #fff; border-color: transparent; }
.pager-step.is-disabled { opacity: .45; pointer-events: none; }
.pager-gap { border: none; background: none; }

/* ---------- 侧边栏 ---------- */
.sidebar { display: flex; flex-direction: column; gap: 16px; position: sticky; top: calc(var(--nav-h) + 24px); }
.side-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow);
}
.side-title { margin: 0 0 12px; font-size: 1.02rem; display: flex; align-items: center; gap: 8px; }
.side-title::before { content: ''; width: 4px; height: 16px; border-radius: 2px; background: var(--grad); }
.side-author-top { display: flex; align-items: center; gap: 12px; }
.side-avatar {
  width: 52px; height: 52px; border-radius: 50%; flex: none;
  background: var(--grad); color: #fff; font-size: 1.3rem; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 14px -4px rgba(66, 90, 239, .5);
}
.side-author-name { display: block; font-weight: 700; }
.side-author-desc { display: block; color: var(--muted); font-size: .82rem; }
.side-author-stats { display: flex; justify-content: space-around; margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); }
.stat { text-align: center; }
.stat-num { display: block; font-weight: 800; color: var(--ac); font-size: 1.05rem; }
.stat-label { color: var(--muted); font-size: .78rem; }
.side-notice {
  margin-top: 14px; padding: 10px 12px; border-radius: 10px;
  background: var(--soft); color: var(--ac); font-size: .85rem;
}
.side-recent { list-style: none; margin: 0; padding: 0; }
.side-recent li { padding: 7px 0; border-bottom: 1px dashed var(--line); display: flex; flex-direction: column; gap: 2px; }
.side-recent li:last-child { border-bottom: none; }
.side-recent a {
  color: var(--text); font-size: .9rem; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.side-recent a:hover { color: var(--ac); }
.side-list { list-style: none; margin: 0; padding: 0; }
.side-list li { display: flex; align-items: center; padding: 6px 0; }
.side-list a { flex: 1; color: var(--text); font-size: .92rem; }
.side-list a:hover { color: var(--ac); }
.side-count {
  min-width: 22px; height: 22px; border-radius: 8px; padding: 0 6px;
  background: var(--soft); color: var(--ac); font-size: .78rem; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
}
.side-more { display: block; margin-top: 10px; font-size: .85rem; }
.side-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.side-tag {
  padding: 3px 12px; border-radius: 999px; font-size: .82rem;
  background: var(--soft); color: var(--ac);
}
.side-tag:hover { background: var(--grad); color: #fff; }

/* ---------- 页面横幅（分类/标签/归档） ---------- */
.page-banner {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 28px 32px; box-shadow: var(--shadow); margin-bottom: 20px;
}
.banner-eyebrow { margin: 0; color: var(--ac); font-weight: 700; letter-spacing: .08em; font-size: .82rem; text-transform: uppercase; }
.banner-title { margin: 6px 0 4px; font-size: 1.7rem; }
.banner-desc { margin: 0; color: var(--muted); }

/* ---------- 分类索引卡片 ---------- */
.term-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.term-card {
  position: relative; display: flex; flex-direction: column; gap: 4px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow); color: var(--text);
  transition: transform .25s, box-shadow .25s;
  overflow: hidden;
}
.term-card::after { content: ''; position: absolute; right: -24px; top: -24px; width: 80px; height: 80px; border-radius: 50%; background: var(--soft); transition: transform .3s; }
.term-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); color: var(--text); }
.term-card:hover::after { transform: scale(1.4); }
.term-icon { color: var(--ac); margin-bottom: 6px; }
.term-name { font-size: 1.1rem; font-weight: 700; }
.term-count { color: var(--ac); font-size: .84rem; font-weight: 600; }
.term-latest { color: var(--muted); font-size: .82rem; margin-top: 4px; }

/* ---------- 归档时间线 ---------- */
.timeline { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 26px 30px; box-shadow: var(--shadow); }
.tl-year-title { display: flex; align-items: center; gap: 12px; margin: 0 0 8px; }
.tl-year:not(:first-child) .tl-year-title { margin-top: 22px; }
.tl-badge {
  background: var(--grad); color: #fff; border-radius: 10px;
  padding: 3px 14px; font-size: 1.1rem; font-weight: 800;
}
.tl-count { color: var(--muted); font-size: .88rem; font-weight: 500; }
.tl-item {
  position: relative; display: flex; align-items: baseline; gap: 12px;
  padding: 9px 0 9px 22px; color: var(--text);
  border-left: 2px solid var(--line); margin-left: 6px;
}
.tl-dot {
  position: absolute; left: -6px; top: 50%; transform: translateY(-50%);
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--card); border: 2px solid var(--ac); transition: all .2s;
}
.tl-item:hover { color: var(--ac); }
.tl-item:hover .tl-dot { background: var(--ac); box-shadow: 0 0 0 4px var(--soft); }
.tl-date { flex: none; font-size: .85rem; }
.tl-title { font-weight: 500; line-height: 1.5; }

/* ---------- 文章页 ---------- */
.post-hero {
  position: relative; border-radius: 18px; overflow: hidden;
  background: var(--grad); background-size: cover; background-position: center;
  min-height: 240px; display: flex; align-items: stretch;
  box-shadow: var(--shadow-lg); margin-bottom: 20px;
}
.post-hero-mask {
  position: relative; width: 100%; display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 240px; padding: 96px 32px 34px;
  background: linear-gradient(180deg, rgba(14, 18, 34, .45) 0%, rgba(14, 18, 34, .75) 55%, rgba(14, 18, 34, .93) 100%);
  backdrop-filter: blur(2px) saturate(1.05);
  color: #fff;
}
.post-hero-crumbs { display: flex; gap: 14px; font-size: .85rem; opacity: .92; flex-wrap: wrap; }
.post-hero-crumbs a { color: #fff; }
.post-hero-crumbs a:hover { color: var(--ac-2); }
.post-hero-title { margin: 8px 0 12px; font-size: clamp(1.4rem, 3.5vw, 2.1rem); line-height: 1.35; text-shadow: 0 2px 10px rgba(0, 0, 0, .3); }
.post-hero-meta { display: flex; gap: 10px; flex-wrap: wrap; }
.meta-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 12px; border-radius: 999px; font-size: .8rem;
  background: rgba(255, 255, 255, .18); color: #fff; backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, .25);
}
a.meta-chip:hover { background: rgba(255, 255, 255, .32); color: #fff; }

.post-layout { display: grid; grid-template-columns: 1fr 260px; gap: 24px; align-items: start; }
@media (max-width: 1024px) { .post-layout { grid-template-columns: 1fr; } .post-toc-wrap { display: none; } }
.post-content-wrap { min-width: 0; }
.post-content-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 34px; box-shadow: var(--shadow);
}
@media (max-width: 640px) { .post-content-card { padding: 20px; } .post-hero-mask { padding: 24px 20px; } }

/* 文章页右侧目录 */
.post-toc-wrap { position: sticky; top: calc(var(--nav-h) + 24px); }
.toc {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow);
  max-height: calc(100vh - var(--nav-h) - 60px); overflow-y: auto;
}
.toc-title {
  display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .95rem;
  padding-bottom: 10px; margin-bottom: 8px; border-bottom: 1px dashed var(--line);
}
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc li { margin: 2px 0; }
.toc a {
  display: block; padding: 4px 10px; border-radius: 8px;
  color: var(--muted); font-size: .86rem; line-height: 1.5;
  border-left: 2px solid transparent;
}
.toc a:hover { color: var(--ac); background: var(--soft); }
.toc li.toc-h3 a { padding-left: 22px; }
.toc a.active { color: var(--ac); border-left-color: var(--ac); background: var(--soft); font-weight: 600; }

/* 上一篇下一篇 */
.post-pn { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 20px; }
.pn-card {
  display: flex; flex-direction: column; gap: 4px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 18px; box-shadow: var(--shadow); color: var(--text);
  transition: transform .2s, box-shadow .2s;
}
a.pn-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); color: var(--text); }
.pn-card.next { text-align: right; }
.pn-card.is-empty { visibility: hidden; }
.pn-label { color: var(--ac); font-size: .8rem; font-weight: 700; }
.pn-title { font-weight: 600; line-height: 1.5; }
@media (max-width: 640px) { .post-pn { grid-template-columns: 1fr; } .pn-card.is-empty { display: none; } .pn-card.next { text-align: left; } }

/* 相关推荐 */
.post-related { margin-top: 28px; }
.related-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.related-item {
  display: flex; flex-direction: column; gap: 4px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; color: var(--text); box-shadow: var(--shadow);
  transition: transform .2s;
}
.related-item:hover { transform: translateY(-3px); color: var(--text); }
.related-title { font-weight: 600; line-height: 1.5; font-size: .95rem; }
.related-item:hover .related-title { color: var(--ac); }

/* ---------- 普通页面 ---------- */
.page-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 34px; box-shadow: var(--shadow);
}
.page-head h1 { margin: 0 0 6px; }
.page-lead { color: var(--muted); margin: 0 0 16px; }
@media (max-width: 640px) { .page-card { padding: 20px; } }

/* ---------- 正文排版 ---------- */
.prose { line-height: 1.85; word-break: break-word; }
.prose h2 {
  margin: 2em 0 .8em; padding-bottom: 8px; font-size: 1.35rem;
  border-bottom: 1px solid var(--line);
}
.prose h2::before { content: ''; display: inline-block; width: 6px; height: 1.1em; margin-right: 10px; border-radius: 3px; background: var(--grad); vertical-align: -0.2em; }
.prose h3 { margin: 1.6em 0 .6em; font-size: 1.15rem; color: var(--text); }
.prose p { margin: .9em 0; }
.prose blockquote {
  margin: 1.2em 0; padding: 12px 18px; border-radius: 10px;
  background: var(--soft); border-left: 4px solid var(--ac); color: var(--muted);
}
.prose blockquote p { margin: .3em 0; }
.prose code {
  background: var(--soft); color: var(--ac);
  padding: 2px 7px; border-radius: 6px; font-size: .88em;
  font-family: 'Cascadia Code', Consolas, 'JetBrains Mono', monospace;
}
.prose pre {
  position: relative; margin: 1.3em 0; padding: 16px 18px; border-radius: 12px;
  background: #282c34; overflow-x: auto;
}
[data-theme="dark"] .prose pre { background: #131318; }
.prose pre code { background: none; color: #d7dce5; padding: 0; font-size: .88rem; line-height: 1.7; }
.prose .code-copy-btn {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 30px; height: 30px; border-radius: 8px; border: none; cursor: pointer;
  background: rgba(255, 255, 255, .12); color: #d7dce5;
  display: inline-flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .2s, background .2s;
}
.prose pre:hover .code-copy-btn { opacity: 1; }
.prose .code-copy-btn:hover { background: rgba(255, 255, 255, .25); }
.prose .code-copy-btn.done { color: #7ee2a8; opacity: 1; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.3em 0; font-size: .92rem; display: block; overflow-x: auto; }
.prose th { background: var(--soft); color: var(--ac); font-weight: 700; }
.prose th, .prose td { border: 1px solid var(--line); padding: 9px 14px; text-align: left; }
.prose tr:hover td { background: var(--soft); }
.prose img { border-radius: 10px; cursor: zoom-in; }
.prose ul, .prose ol { padding-left: 1.6em; }
.prose li { margin: .35em 0; }
.prose hr { border: none; border-top: 1px dashed var(--line); margin: 2em 0; }
.prose mark { background: rgba(66, 90, 239, .18); color: var(--ac); padding: 1px 4px; border-radius: 4px; }

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--line); background: var(--card);
  padding: 28px 20px; text-align: center;
}
.footer-icons { display: flex; justify-content: center; gap: 14px; margin-bottom: 10px; }
.footer-icons a {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center; color: var(--muted);
  transition: all .2s;
}
.footer-icons a:hover { color: #fff; background: var(--grad); border-color: transparent; transform: translateY(-2px); }
.copyright { margin: 0; font-weight: 600; }
.powered { margin: 4px 0 0; color: var(--muted); font-size: .84rem; }

/* ---------- 回到顶部 ---------- */
.back-top {
  position: fixed; right: 22px; bottom: 26px; z-index: 999;
  width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card); color: var(--ac); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow); opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity .3s, transform .3s, background .2s;
}
.back-top.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-top:hover { background: var(--grad); color: #fff; border-color: transparent; }

/* ---------- 图片灯罩 ---------- */
.img-mask {
  position: fixed; inset: 0; z-index: 1100; background: rgba(0, 0, 0, .82);
  display: none; align-items: center; justify-content: center; cursor: zoom-out;
  padding: 4vh 4vw;
}
.img-mask.show { display: flex; }
.img-mask img { max-width: 100%; max-height: 92vh; border-radius: 10px; box-shadow: var(--shadow-lg); }

/* ---------- 站内搜索面板（Ctrl/⌘+K） ---------- */
.xfm-search {
  position: fixed; inset: 0; z-index: 120; display: none;
  padding: 11vh 1rem 1rem; background: rgba(20, 24, 44, .42);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.xfm-search.is-open { display: block; }
.xfm-search-box {
  display: flex; align-items: center; gap: .6rem; max-width: 640px; margin: 0 auto;
  padding: .55rem .8rem; background: var(--card);
  border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-lg);
}
.xfm-search-input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  font: inherit; font-size: 1rem; color: var(--text);
}
.xfm-search-input::placeholder { color: var(--muted); }
.xfm-search-kbd {
  font-size: .68rem; color: var(--muted);
  border: 1px solid var(--line); border-radius: 4px; padding: 0 .28rem;
}
.xfm-search-list {
  max-width: 640px; max-height: 54vh; overflow-y: auto; margin: .45rem auto 0; padding: .35rem;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-lg);
}
.xfm-hit {
  display: grid; grid-template-columns: 1fr auto; gap: .12rem .8rem;
  padding: .55rem .7rem; border-radius: 10px; color: var(--text);
}
.xfm-hit:hover, .xfm-hit.is-active { background: var(--soft); text-decoration: none; }
.xfm-hit-title { font-weight: 600; font-size: .95rem; }
.xfm-hit-date { font-size: .74rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.xfm-hit-desc { grid-column: 1 / -1; font-size: .83rem; line-height: 1.6; color: var(--muted); }
.xfm-hit mark { background: rgba(66, 90, 239, .26); color: inherit; border-radius: 3px; }
.xfm-search-empty { margin: 0; padding: 1rem; text-align: center; font-size: .9rem; color: var(--muted); }
.xfm-search-foot {
  display: flex; justify-content: space-between; max-width: 640px; margin: .4rem auto 0;
  font-size: .74rem; color: var(--muted);
}
html.xfm-no-scroll { overflow: hidden; }

/* ---------- 语言切换按钮 ---------- */
.nav-lang-btn { min-width: 34px; text-align: center; text-decoration: none; }
.nav-lang-text { font-size: .72rem; font-weight: 700; letter-spacing: .02em; }

/* ---------- 页脚版本号 ---------- */
.powered-version {
  padding: 0 .32rem; border-radius: 5px; background: var(--soft); color: var(--ac);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .76rem;
}

/* ---------- 评论区（Waline） ---------- */
.post-comments { margin-top: 32px; }
.post-comments .section-title { margin-bottom: 16px; }
.post-comments-body { min-height: 40px; }
/* 让 Waline 跟随站点配色与明暗主题 */
#waline {
  --waline-theme-color: var(--ac);
  --waline-active-color: var(--ac);
  --waline-color: var(--text);
  --waline-bg-color: var(--card);
  --waline-bg-color-light: var(--soft);
  --waline-bg-color-hover: var(--soft);
  --waline-border-color: var(--line);
  --waline-disable-bg-color: var(--soft);
  --waline-info-bg-color: var(--soft);
  --waline-info-color: var(--muted);
  --waline-font-size: 15px;
}
#waline .wl-panel { border-radius: var(--radius); }

/* ---------- 404 页 ---------- */
.error-page { display: flex; justify-content: center; padding: 48px 16px 72px; }
.error-card {
  width: 100%; max-width: 640px; text-align: center;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 48px 32px; box-shadow: var(--shadow);
}
.error-code {
  margin: 0; font-size: clamp(72px, 16vw, 132px); line-height: 1; font-weight: 900;
  letter-spacing: .04em; background: var(--grad); -webkit-background-clip: text;
  background-clip: text; color: transparent;
}
.error-title { margin: 8px 0 12px; font-size: 1.5rem; }
.error-text { margin: 0 auto 26px; max-width: 460px; color: var(--muted); }
.error-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.error-btn {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  padding: 9px 18px; border-radius: 999px; font-size: .92rem; font-family: inherit;
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  text-decoration: none; transition: transform .18s, box-shadow .18s, border-color .18s;
}
.error-btn:hover { transform: translateY(-2px); border-color: var(--ac); box-shadow: var(--shadow); color: var(--ac); }
.error-btn.primary { background: var(--grad); border-color: transparent; color: #fff; }
.error-btn.primary:hover { color: #fff; box-shadow: var(--shadow-lg); }
.error-hint { margin: 26px 0 0; font-size: .82rem; color: var(--muted); }
.error-hint code { background: var(--soft); padding: 1px 6px; border-radius: 6px; }
@media (max-width: 640px) { .error-card { padding: 36px 20px; } }

/* ---------- 404 页 ---------- */
.error-page { display: flex; justify-content: center; padding: 48px 16px 72px; }
.error-card {
  width: 100%; max-width: 640px; text-align: center;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 48px 32px; box-shadow: var(--shadow);
}
.error-code {
  margin: 0; font-size: clamp(72px, 16vw, 132px); line-height: 1; font-weight: 900;
  letter-spacing: .04em; background: var(--grad); -webkit-background-clip: text;
  background-clip: text; color: transparent;
}
.error-title { margin: 8px 0 12px; font-size: 1.5rem; }
.error-text { margin: 0 auto 26px; max-width: 460px; color: var(--muted); }
.error-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.error-btn {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  padding: 9px 18px; border-radius: 999px; font-size: .92rem; font-family: inherit;
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  text-decoration: none; transition: transform .18s, box-shadow .18s, border-color .18s;
}
.error-btn:hover { transform: translateY(-2px); border-color: var(--ac); box-shadow: var(--shadow); color: var(--ac); }
.error-btn.primary { background: var(--grad); border-color: transparent; color: #fff; }
.error-btn.primary:hover { color: #fff; box-shadow: var(--shadow-lg); }
.error-hint { margin: 26px 0 0; font-size: .82rem; color: var(--muted); }
.error-hint code { background: var(--soft); padding: 1px 6px; border-radius: 6px; }
@media (max-width: 640px) { .error-card { padding: 36px 20px; } }
