/* ============================================================
   主题：classic
   设计规格参考经典 WordPress 个人博客（WordStar 类主题）：
   浅灰底 + 白色卡片 + 1px 边框（几乎不用阴影）、15px 正文、
   主链接 #007acc、悬停橙红、元信息浅灰条、部件标题通栏。
   所有字体与图标均本地化，不请求任何外部 CDN。
   ============================================================ */

:root {
  /* 底色与卡片 */
  --page-bg: #EFEFEF;
  --card-bg: #FFFFFF;
  --card-border: #dedede;
  --meta-bg: #f7f7f7;
  --widget-divider: #d1d1d1;

  /* 文字 */
  --text: #333333;
  --text-dark: #1a1a1a;
  --text-secondary: #555555;
  --text-meta: #686868;
  --text-muted: #8a8a8a;

  /* 交互 */
  --link: #007acc;
  --link-hover: #D13210;

  /* 代码 */
  --code-bg: #f7f7f7;
  --code-border: #e8e8e8;

  /* 尺寸 */
  --wrap: 1200px;
  --main-col: 70%;
  --side-col: 26%;
  --toc-width: 190px;
}

* { box-sizing: border-box; }

html { font-size: 16px; }

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--text);
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC",
    "Hiragino Sans GB", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 1rem;
}

a { color: var(--link); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--link-hover); text-decoration: none; }

/* ---------- 页头（白色通栏） ---------- */
.site-header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--card-border);
  padding-top: 1.6rem;
}

.header-inner { position: relative; }

.site-title {
  display: block;
  color: var(--text-dark);
  font-size: 1.375rem;      /* 22px，与参考站一致 */
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.01em;
}
.site-title:hover { color: var(--link); }

.site-subtitle {
  display: block;
  color: var(--text-meta);
  font-size: 0.8125rem;
  margin-top: 0.3rem;
}

.site-nav { margin-top: 1.1rem; }

.site-nav a {
  display: inline-block;
  margin-right: 1.5rem;
  padding-bottom: 0.5rem;
  font-size: 0.9375rem;
  color: var(--text);
}
.site-nav a:hover { color: var(--link); }
.site-nav a.active {
  color: var(--link);
  border-bottom: 2px solid var(--link);
}

/* ---------- 主体网格 ---------- */
.site-main { padding: 1.75rem 0 0; }
.content-area { min-width: 0; }
.sidebar { margin-top: 1.5rem; }

@media (min-width: 900px) {
  .site-body.has-sidebar {
    display: flex;
    gap: 4%;               /* 70% + 26% + 4% = 100% */
    align-items: flex-start;
  }
  .site-body.has-sidebar .content-area { flex: 0 0 var(--main-col); width: var(--main-col); min-width: 0; }
  .site-body.has-sidebar .sidebar {
    flex: 0 0 var(--side-col);
    width: var(--side-col);
    margin-top: 0;
    position: sticky;
    top: 1rem;
  }
}

/* ---------- 卡片：内容块与部件共用同一套质感 ---------- */
.post-item,
.post,
.list-title,
.page-header,
.pagination,
.term-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
}

/* ---------- 栏目标题（卡片式） ---------- */
.list-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin: 0 0 1.25rem;
  padding: 0.75rem 1.25rem;
}

/* ---------- 文章列表卡片 ---------- */
.post-item {
  padding: 1.25rem 1.55rem 1.4rem;
  margin-bottom: 1.6rem;
}

.post-item-title {
  font-size: 1.75rem;      /* 28px，参考站规格 */
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 0.75rem;
  word-break: break-word;
}
.post-item-title a { color: var(--text-dark); }
.post-item-title a:hover { color: var(--link); }

/* 元信息条：浅灰背景 + 小字 */
.post-item-meta {
  background: var(--meta-bg);
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
  color: var(--text-meta);
  font-size: 0.8125rem;
  line-height: 1.6;
  padding: 0.6rem 0.75rem;
  margin: 0 -1.55rem 1rem;   /* 通栏 */
}

.post-item-excerpt {
  margin: 0 0 1.25rem;
  color: var(--text);
  line-height: 1.8;
}

/* “继续阅读”描边按钮 */
.read-more {
  display: inline-block;
  padding: 0.55rem 1.15rem;
  border: 1px solid var(--card-border);
  border-radius: 2px;
  color: var(--text-secondary);
  font-size: 0.875rem;
  text-align: center;
  transition: all 0.15s ease;
}
.read-more:hover {
  color: #fff;
  background: var(--link);
  border-color: var(--link);
}

.post-item-tags { margin-top: 0.9rem; }

/* ---------- 文章页 ---------- */
.post { padding: 1.25rem 1.55rem 1.75rem; }

.post-title {
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-dark);
  margin: 0 0 0.75rem;
  word-break: break-word;
}

/* 文章页元信息条 */
.post-meta {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  background: var(--meta-bg);
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
  color: var(--text-meta);
  font-size: 0.8125rem;
  line-height: 1.65;
  padding: 0.6rem 0.75rem;
  margin: 0 -1.55rem 1.5rem;
}
.meta-avatar { flex: none; border-radius: 50%; margin-top: 0.1rem; }
.meta-lines { min-width: 0; }
.meta-author { color: var(--text-secondary); }

.meta-sep { margin: 0 0.4rem; color: #c9c9c9; }

/* ---------- 设计文档状态徽章（A2） ---------- */
.meta-line-doc { margin-top: 0.35rem; }

.doc-badge {
  display: inline-block;
  font-size: 0.75rem;
  line-height: 1.5;
  padding: 0.05rem 0.5rem;
  border: 1px solid;
  border-radius: 2px;
  margin-right: 0.5rem;
  vertical-align: 1px;
}
.doc-badge.doc-active      { color: #2f7d32; border-color: #b6dcb8; background: #f2faf2; }
.doc-badge.doc-superseded  { color: #9a6a00; border-color: #e8d59a; background: #fffaf0; }
.doc-badge.doc-dead        { color: #a33a30; border-color: #e8b9b4; background: #fdf4f3; }

.doc-version {
  font-family: Consolas, "Courier New", Menlo, Monaco, monospace;
  font-size: 0.75rem;
  color: var(--text-meta);
}

/* 变更记录：作者正常写 "## 变更记录"，主题渲染成档案样式 */
.changelog {
  margin-top: 2.4rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--widget-divider);
}
.changelog h2,
.changelog h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-dark);
  letter-spacing: 0.02em;
  margin: 0 0 0.7rem;
  padding: 0;
  border: none;
}
.changelog ul, .changelog ol {
  margin: 0;
  padding-left: 1.1rem;
  font-family: Consolas, "Courier New", Menlo, Monaco, monospace;
  font-size: 0.8125rem;
  line-height: 1.85;
  color: var(--text-meta);
}
.changelog li { margin-bottom: 0.25rem; }
.changelog p {
  font-family: Consolas, "Courier New", Menlo, Monaco, monospace;
  font-size: 0.8125rem;
  color: var(--text-meta);
  margin: 0 0 0.4rem;
}
.changelog a { color: var(--link); }

/* ============================================================
   系列（决策项 A3）
   作者在文章头部写 series: 名称 即可，无需任何额外配置
   ============================================================ */

/* 文章头部系列导航条 */
.series-nav {
  background: #fbfbfc;
  border: 1px solid var(--card-border);
  border-left: 3px solid var(--link);
  padding: 0.7rem 0.9rem;
  margin: 0 0 1.6rem;
}

.series-head { font-size: 0.875rem; line-height: 1.7; }

.series-label {
  display: inline-block;
  color: var(--text-muted);
  font-size: 0.75rem;
  border: 1px solid var(--card-border);
  background: #fff;
  border-radius: 2px;
  padding: 0.05rem 0.4rem;
  margin-right: 0.4rem;
}

.series-name { font-weight: 600; color: var(--text-dark); }
.series-name:hover { color: var(--link); }

.series-count { color: var(--text-meta); margin-left: 0.6rem; font-size: 0.8125rem; }

.series-details { margin-top: 0.5rem; }
.series-details > summary {
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.8125rem;
  padding: 0.15rem 0;
}
.series-details > summary:hover { color: var(--link); }

.series-list {
  list-style: none;
  margin: 0.6rem 0 0.2rem;
  padding: 0;
  font-size: 0.875rem;
}
.series-list li {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
  padding: 0.3rem 0;
  border-bottom: 1px dashed var(--widget-divider);
}
.series-list li:last-child { border-bottom: none; }
.series-list li.current { background: #f2f7fd; }

.series-num {
  flex: none;
  width: 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-family: Consolas, "Courier New", Menlo, Monaco, monospace;
  font-size: 0.75rem;
}

.series-list .series-date {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-family: Consolas, monospace;
}

.series-current-title { color: var(--text-dark); font-weight: 600; }

/* 侧边栏系列部件 */
.series-widget-list li.current { color: var(--text-dark); font-weight: 600; }
.series-all {
  display: inline-block;
  margin-top: 0.7rem;
  font-size: 0.8125rem;
}

/* 系列索引页 /series/ */
.series-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 1.1rem 1.55rem 1.25rem;
  margin-bottom: 1.6rem;
}
.series-card-title {
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  line-height: 1.5;
}
.series-card-title a { color: var(--text-dark); }
.series-card-title a:hover { color: var(--link); }
.series-card-count {
  font-size: 0.75rem;
  color: var(--text-meta);
  font-weight: 400;
  border: 1px solid var(--card-border);
  border-radius: 2px;
  padding: 0.05rem 0.4rem;
  margin-left: 0.5rem;
  vertical-align: 2px;
}
.series-card-meta { font-size: 0.8125rem; color: var(--text-meta); margin: 0 0 0.4rem; }
.series-card-latest { font-size: 0.875rem; margin: 0; color: var(--text-secondary); }

/* 单个系列聚合页 */
.series-intro { color: var(--text-meta); font-size: 0.875rem; margin: 0 0 1.4rem; }

.series-full-list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
}
.series-full-list > li {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--card-border);
}
.series-full-list > li:last-child { border-bottom: none; }
.series-full-list .series-num { width: 1.75rem; font-size: 0.875rem; padding-top: 0.15rem; }

.series-full-body { flex: 1; min-width: 0; }
.series-full-title {
  display: block;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.5;
  margin-bottom: 0.25rem;
}
.series-full-title:hover { color: var(--link); }
.series-full-meta { font-size: 0.8125rem; color: var(--text-meta); line-height: 1.7; }
.series-full-summary { color: var(--text-secondary); }

/* ---------- 标题锚点（鼠标悬停标题时出现） ---------- */.post-content h2 .headerlink,
.post-content h3 .headerlink,
.post-content h4 .headerlink {
  color: var(--card-border);
  text-decoration: none;
  margin-left: 0.35rem;
  font-size: 0.8em;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.post-content h2:hover .headerlink,
.post-content h3:hover .headerlink,
.post-content h4:hover .headerlink { opacity: 1; color: var(--link); }

/* ---------- 正文排版 ---------- */
.post-content h2 {
  font-size: 1.5rem;       /* 24px */
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.4;
  margin: 2.2rem 0 1rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--widget-divider);
}
.post-content h3 { font-size: 1.1875rem; font-weight: 600; color: var(--text-dark); margin: 1.9rem 0 0.75rem; }
.post-content h4 { font-size: 1.0625rem; font-weight: 600; color: var(--text-dark); margin: 1.6rem 0 0.6rem; }

.post-content p { margin: 0 0 1.15rem; }
.post-content ul, .post-content ol { margin: 0 0 1.15rem; padding-left: 1.5rem; }
.post-content li { margin-bottom: 0.35rem; }

.post-content img { max-width: 100%; height: auto; display: block; margin: 1.3rem auto; }

.post-content blockquote {
  margin: 1.4rem 0;
  padding: 0.4rem 1.1rem;
  border-left: 3px solid var(--link);
  color: var(--text-secondary);
  background: #fafafa;
}

.post-content hr { border: none; border-top: 1px solid var(--card-border); margin: 2.2rem 0; }

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.4rem 0;
  font-size: 0.9375rem;
}
.post-content th, .post-content td {
  border: 1px solid var(--card-border);
  padding: 0.55rem 0.75rem;
  text-align: left;
}
.post-content th { background: var(--meta-bg); font-weight: 600; color: var(--text-dark); }

/* ---------- 代码 ---------- */
.post-content code, .post-content kbd {
  font-family: Consolas, "Courier New", Menlo, Monaco, monospace;
  font-size: 0.875em;
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 2px;
  padding: 0.1em 0.35em;
}

.post-content figure.highlight,
.post-content pre {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 2px;
  padding: 0.9rem 1.05rem;
  overflow-x: auto;
  margin: 1.4rem 0;
  line-height: 1.65;
}
.post-content figure.highlight pre { border: none; padding: 0; margin: 0; background: none; }
.post-content figure.highlight code,
.post-content pre code { background: none; border: none; padding: 0; font-size: 0.84375rem; }

/* highlight.js 经典浅色配色（自制，无外部依赖） */
.highlight .comment, .highlight .quote { color: #8a8a8a; font-style: italic; }
.highlight .keyword, .highlight .selector-tag, .highlight .literal, .highlight .section, .highlight .link { color: #a626a4; }
.highlight .string, .highlight .regexp, .highlight .addition { color: #50a14f; }
.highlight .number, .highlight .symbol, .highlight .bullet, .highlight .variable, .highlight .template-variable { color: #986801; }
.highlight .title, .highlight .name, .highlight .attr, .highlight .attribute, .highlight .built_in { color: #4078f2; }
.highlight .type, .highlight .class .title { color: #c18401; }
.highlight .deletion { color: #e45649; }

/* ---------- 文章内目录 ---------- */
.toc-desktop { display: none; }
.toc-mobile { margin: 2rem 0 0; font-size: 0.875rem; }
.toc-mobile summary {
  cursor: pointer;
  color: var(--text-meta);
  font-size: 0.8125rem;
  padding: 0.45rem 0;
  border-top: 1px solid var(--card-border);
}
.toc-mobile ol, .toc-mobile ul { margin: 0.6rem 0 0; padding-left: 1.2rem; line-height: 1.7; }
.toc-mobile a { color: var(--text-meta); }

.toc-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.7rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--widget-divider);
}
.toc-desktop ol, .toc-desktop ul {
  list-style: none;
  margin: 0; padding: 0;
  font-size: 0.8125rem;
  line-height: 1.6;
}
.toc-desktop ol ol, .toc-desktop ul ul { padding-left: 0.85rem; }
.toc-desktop li { margin-bottom: 0.35rem; }
.toc-desktop a {
  color: var(--text-meta);
  display: block;
  padding-left: 0.55rem;
  border-left: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.toc-desktop a:hover { color: var(--link); }
.toc-desktop a.active {
  color: var(--link);
  border-left-color: var(--link);
  font-weight: 600;
}

/* 宽屏时显示目录列，并隐藏侧边栏避免三栏拥挤 */
@media (min-width: 1180px) {
  .site-body.has-toc.has-sidebar .sidebar { display: none; }
  .site-body.has-toc .toc-desktop {
    display: block;
    position: sticky;
    top: 1rem;
    flex: 0 0 var(--toc-width);
    width: var(--toc-width);
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 1.25rem 1.1rem;
  }
  .site-body.has-toc .content-area { flex: 1 1 auto; width: auto; }
}

/* ---------- 侧边栏部件（白色卡片，标题通栏） ---------- */
.widget {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 1.1rem;
  margin-bottom: 1.6rem;
}

.widget-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-dark);
  margin: -1.1rem -1.1rem 0.9rem;   /* 负边距做通栏头部 */
  padding: 0.8rem 1.1rem 0.7rem;
  border-bottom: 1px solid var(--widget-divider);
}

.widget-list { list-style: none; margin: 0; padding: 0; font-size: 0.875rem; }
.widget-list li {
  margin-bottom: 0.85rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px dashed var(--widget-divider);
}
.widget-list li:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.widget-list a { color: var(--text); line-height: 1.55; }
.widget-list a:hover { color: var(--link); }
.widget-date { display: block; color: var(--text-muted); font-size: 0.75rem; margin-top: 0.2rem; }

/* ---------- 站内搜索 ---------- */
.site-search { position: relative; }

.site-search input {
  width: 100%;
  padding: 0.5rem 0.7rem;
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--text);
  border: 1px solid var(--card-border);
  border-radius: 2px;
  background: #fff;
}
.site-search input:focus { outline: none; border-color: var(--link); }

.search-results {
  position: absolute;
  z-index: 30;
  top: calc(100% + 3px);
  left: 0;
  width: 100%;
  min-width: 340px;
  max-height: 60vh;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--card-border);
}
.search-results a {
  display: block;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--card-border);
  color: var(--text);
}
.search-results a:last-child { border-bottom: none; }
.search-results a:hover { background: var(--meta-bg); }
.search-results .sr-title { display: block; font-weight: 600; font-size: 0.875rem; color: var(--text-dark); }
.search-results .sr-meta { display: block; font-size: 0.8125rem; color: var(--text-meta); margin-top: 0.2rem; line-height: 1.6; }
.search-results .sr-none { padding: 0.7rem 0.75rem; color: var(--text-meta); font-size: 0.875rem; }
.search-results mark { background: #fff3b0; color: inherit; padding: 0 1px; }

/* ---------- 标签 ---------- */
.tag { display: inline-block; font-size: 0.8125rem; color: var(--text-meta); margin-right: 0.5rem; }
.tag:hover { color: var(--link); }
.tag-cloud { line-height: 2.2; }
.tag-cloud .tag { font-size: 0.875rem; margin-right: 0.75rem; }

/* ---------- 归档（也做成卡片） ---------- */
.archive-year {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 1.1rem 1.55rem 1.3rem;
  margin-bottom: 1.6rem;
}
.archive-year-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-dark);
  margin: -1.1rem -1.55rem 1rem;
  padding: 0.8rem 1.55rem 0.7rem;
  border-bottom: 1px solid var(--widget-divider);
}
.archive-list { list-style: none; margin: 0; padding: 0; }
.archive-list li { margin-bottom: 0.6rem; line-height: 1.7; }
.archive-list time { color: var(--text-muted); font-size: 0.8125rem; margin-right: 0.7rem; font-family: Consolas, monospace; }
.archive-cat { color: var(--text-muted); font-size: 0.8125rem; margin-left: 0.6rem; }

/* ---------- 分类 / 标签索引页 ---------- */
.term-list, .tag-cloud-page {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 1.25rem 1.55rem;
}
.term-list { list-style: none; margin: 0; }
.term-list li {
  margin-bottom: 0.7rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px dashed var(--widget-divider);
}
.term-list li:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.term-count { color: var(--text-muted); font-size: 0.8125rem; margin-left: 0.4rem; }

/* ---------- 翻页（白色描边按钮，参考站样式） ---------- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  margin: 0 0 1.6rem;
  font-size: 0.875rem;
}
.page-info { color: var(--text-meta); }
.pagination a {
  padding: 0.45rem 1rem;
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
}
.pagination a:hover { color: #fff; background: var(--link); border-color: var(--link); }
.pagination .disabled { visibility: hidden; }

/* ---------- 相关文章（B3） ---------- */
.related {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 1.1rem 1.55rem 1.25rem;
  margin-top: 1.6rem;
}
.related-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-dark);
  margin: -1.1rem -1.55rem 0.9rem;
  padding: 0.8rem 1.55rem 0.7rem;
  border-bottom: 1px solid var(--widget-divider);
}
.related-list { list-style: none; margin: 0; padding: 0; font-size: 0.9375rem; }
.related-list li {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
  padding: 0.45rem 0;
  border-bottom: 1px dashed var(--widget-divider);
}
.related-list li:last-child { border-bottom: none; }
.related-list a { color: var(--text); }
.related-list a:hover { color: var(--link); }
.related-date {
  margin-left: auto;
  flex: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-family: Consolas, monospace;
}

/* ---------- 上一篇 / 下一篇 ---------- */
.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 1rem 1.55rem;
  margin-top: 1.6rem;
  font-size: 0.9375rem;
}
.post-nav .disabled { visibility: hidden; }

/* ---------- 页脚（浅灰通栏） ---------- */
.site-footer {
  background: #e0e0e0;
  border-top: 1px solid var(--card-border);
  margin-top: 2.5rem;
  padding: 1.6rem 0 2rem;
  color: var(--text-meta);
  font-size: 0.8125rem;
  line-height: 1.9;
}
.site-footer p { margin: 0; }
.footer-sep { margin: 0 0.45rem; color: #b8b8b8; }
.footer-notice, .footer-icp { margin-top: 0.3rem; }

.empty {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 1.25rem 1.55rem;
  color: var(--text-meta);
}

/* ---------- 附件下载卡片（阶段 4 使用） ---------- */
.attachment {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  background: var(--meta-bg);
  border: 1px solid var(--card-border);
  border-radius: 2px;
  padding: 0.9rem 1.05rem;
  margin: 1.4rem 0;
}
.attachment .att-icon {
  flex: none;
  width: 2.4rem; height: 2.4rem;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--card-border);
  background: #fff;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-meta);
}
.attachment .att-info { flex: 1; min-width: 0; }
.attachment .att-name { display: block; color: var(--text-dark); font-size: 0.9375rem; }
.attachment .att-note { display: block; color: var(--text-meta); font-size: 0.8125rem; margin-top: 0.15rem; }
.attachment .att-action {
  flex: none;
  font-size: 0.875rem;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--card-border);
  background: #fff;
}
.attachment .att-action:hover { color: #fff; background: var(--link); border-color: var(--link); }

/* ---------- 幻灯片画廊（阶段 4） ---------- */
.deck { margin: 1.6rem 0; border: 1px solid var(--card-border); background: #fff; }
.deck-caption {
  padding: 0.6rem 0.85rem;
  font-size: 0.8125rem;
  color: var(--text-meta);
  background: var(--meta-bg);
  border-bottom: 1px solid var(--card-border);
}
.deck-stage { position: relative; background: var(--page-bg); }
.deck-stage img { width: 100%; display: block; margin: 0; }
.deck-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.85rem;
  font-size: 0.8125rem;
  background: var(--meta-bg);
  border-top: 1px solid var(--card-border);
}
.deck-nav button {
  font: inherit;
  font-size: 0.8125rem;
  color: var(--link);
  background: none; border: none; cursor: pointer;
  padding: 0.15rem 0.3rem;
}
.deck-nav button:hover:not(:disabled) { color: var(--link-hover); }
.deck-nav button:disabled { color: #c4c4c4; cursor: default; }
.deck-count {
  color: var(--text-meta);
  font-family: Consolas, "Courier New", Menlo, Monaco, monospace;
}
.deck-thumbs {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 0.6rem 0.85rem;
  border-top: 1px solid var(--card-border);
}
.deck-thumbs img {
  width: 72px;
  flex: none;
  border: 2px solid transparent;
  outline: 1px solid var(--card-border);
  cursor: pointer;
}
.deck-thumbs img.active { border-color: var(--link); }

/* ---------- 移动端 ---------- */
@media (max-width: 640px) {
  html { font-size: 15.5px; }
  .container { padding: 0 0.75rem; }
  .site-header { padding-top: 1.2rem; }
  .site-title { font-size: 1.15rem; }
  .site-nav a { margin-right: 1rem; }
  .post-item, .post { padding-left: 1rem; padding-right: 1rem; }
  .post-item-title, .post-title { font-size: 1.3rem; }
  .post-item-meta, .post-meta { margin-left: -1rem; margin-right: -1rem; }
  .archive-year { padding-left: 1rem; padding-right: 1rem; }
  .archive-year-title { margin-left: -1rem; margin-right: -1rem; padding-left: 1rem; padding-right: 1rem; }
  .post-nav { padding: 0.9rem 1rem; }
  .search-results { min-width: 0; }
}
