/* 博客前台：复用 styles.css 的 --ink/--paper/--seal/字体 */
.blog-page {
  min-height: 100vh;
  background: var(--paper, #f4f0e8);
  color: var(--ink, #243936);
  font-family: "LXGW WenKai", "Songti SC", "STSong", serif;
}

.blog-main, .post-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 36px 24px 90px;
}
.blog-page-title {
  font-family: "LXGW WenKai", "Songti SC", "STSong", serif;
  font-weight: 600;
  font-size: clamp(34px, 6vw, 54px);
  text-align: center;
  margin: 24px 0 6px;
  letter-spacing: 0.04em;
}
.blog-page-sub {
  text-align: center; color: var(--ink-soft, #6b7d78);
  margin: 0 0 40px; font-size: 15px;
}

/* ---- 列表卡片 ---- */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
}
.post-card {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid rgba(36,57,54,.1);
  border-radius: 14px; overflow: hidden; text-decoration: none; color: inherit;
  transition: transform .18s ease, box-shadow .18s ease;
}
.post-card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(36,57,54,.12); }
.post-card .pc-cover {
  width: 100%; aspect-ratio: 16/9; object-fit: cover; background: rgba(36,57,54,.06);
}
.post-card .pc-body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 8px; text-align: left; }
.post-card .pc-title { font-size: 18px; margin: 0; line-height: 1.35; text-align: left; }
.post-card .pc-summary { font-size: 14px; color: var(--ink-soft, #6b7d78); margin: 0; line-height: 1.55; text-align: left;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-card .pc-date { font-size: 12px; color: var(--seal, #9d453b); margin-top: 2px; text-align: left; }

.blog-empty { text-align: center; color: var(--ink-soft, #6b7d78); padding: 40px 0; }

/* ---- 分页 ---- */
.pager { display: flex; justify-content: center; align-items: center; gap: 18px; margin-top: 44px; }
.page-ind { font-size: 14px; color: var(--ink-soft); }
.btn-ghost {
  font: inherit; cursor: pointer; border-radius: 9px; padding: 9px 18px; font-size: 14px;
  background: transparent; color: var(--ink); border: 1px solid rgba(36,57,54,.25);
}
.btn-ghost:hover:not(:disabled) { background: rgba(36,57,54,.06); }
.btn-ghost:disabled { opacity: .4; cursor: default; }

/* ---- 详情 ---- */
.back-link { display: block; text-align: left; font-size: 14px; color: var(--ink-soft, #6b7d78); text-decoration: none; max-width: 820px; margin-left: auto; margin-right: auto; }
.back-link .back-icon { height: 1em; width: auto; vertical-align: -0.15em; margin-right: 6px; }
.back-link:hover { color: var(--seal, #9d453b); }
.post-article { max-width: 820px; margin: 22px auto 0; }
.post-article .pa-cover { width: 100%; border-radius: 14px; margin-bottom: 26px; }
.post-article h1.pa-title {
  font-family: "LXGW WenKai", "Songti SC", "STSong", serif;
  font-weight: 600;
  font-size: clamp(28px, 5vw, 42px); margin: 0 0 10px; line-height: 1.25;
}
.post-article .pa-date { color: var(--seal, #9d453b); font-size: 13px; margin-bottom: 0; }
.post-content { font-size: 17px; line-height: 1.95; color: var(--ink); }
.post-content h1, .post-content h2, .post-content h3 { font-family: "LXGW WenKai", serif; margin: 1.4em 0 .6em; line-height: 1.4; }
.post-content h2 { font-size: 24px; }
.post-content h3 { font-size: 20px; }
.post-content p { margin: 0 0 1.1em; }
.post-content img { max-width: 100%; border-radius: 10px; margin: 14px 0; }
.post-content blockquote {
  margin: 1.2em 0; padding: 6px 18px; border-left: 3px solid var(--seal, #9d453b);
  color: var(--ink-soft, #6b7d78); background: rgba(36,57,54,.04); border-radius: 0 8px 8px 0;
}
.post-content a { color: var(--seal, #9d453b); }
.post-content pre, .post-content code {
  font-family: "EB Garamond", Menlo, monospace; background: rgba(36,57,54,.06);
  border-radius: 6px; padding: 2px 6px; font-size: .92em;
}
.post-content pre { padding: 14px 16px; overflow: auto; }
.post-content figure { margin: 14px 0; }
.post-content figcaption { font-size: 13px; color: var(--ink-soft); text-align: center; margin-top: 6px; }

/* 文章元信息（分类 + 日期 + 阅读量） */
.pa-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 0 0 22px; }
.pa-cat {
  font-size: 12px; letter-spacing: 0.08em; padding: 2px 10px;
  border: 1px solid rgba(36, 57, 54, 0.2); border-radius: 999px;
  color: rgba(36, 57, 54, 0.7);
}

/* 阅读量：跟在分类、日期后面，线性小眼睛图标 */
.pa-views {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; color: rgba(36, 57, 54, 0.55);
}
.pa-views-icon {
  width: 15px; height: 15px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.6;
}

/* 点赞按钮：正文末尾居中，未点赞空心、已点赞实心（品牌赭色），可再点取消 */
.pa-like-wrap { display: flex; justify-content: center; margin-top: 44px; }
.pa-like-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 22px; border-radius: 999px;
  background: transparent;
  border: 1px solid rgba(36, 57, 54, 0.2);
  color: rgba(36, 57, 54, 0.7);
  font-family: inherit; font-size: 13px; letter-spacing: 0.04em;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.pa-like-btn:hover { border-color: rgba(36, 57, 54, 0.4); color: rgba(36, 57, 54, 0.92); }
.pa-like-btn:focus-visible { outline: 2px solid rgba(157, 69, 59, 0.5); outline-offset: 2px; }
.pa-like-icon {
  width: 17px; height: 17px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.6;
  transition: fill 0.2s ease;
}
.pa-like-btn.is-liked { border-color: rgba(157, 69, 59, 0.5); color: #9d453b; }
.pa-like-btn.is-liked .pa-like-icon { fill: #9d453b; stroke: #9d453b; }

/* 相关文章 */
.pa-related { margin-top: 48px; padding-top: 28px; border-top: 1px solid rgba(36,57,54,.12); }
.pa-related-title { font-family: "LXGW WenKai", "Songti SC", "STSong", serif; font-weight: 600; font-size: 22px; margin: 0 0 18px; }
.pa-related-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }

@media (max-width: 760px) {
  .blog-main, .post-main { padding: 24px 16px 70px; }
  .post-grid { grid-template-columns: 1fr; }
  .post-content { font-size: 16px; line-height: 1.85; }
}

/* ============ 分类筛选 ============ */
.cat-filter {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 26px;
  vertical-align: middle;
}
.cat-chip {
  font-family: "LXGW WenKai", "Songti SC", "STSong", serif;
  font-size: 14px;
  letter-spacing: 0.06em;
  padding: 6px 16px;
  border: 1px solid rgba(36, 57, 54, 0.22);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease;
}
.cat-chip:hover { background: rgba(36, 57, 54, 0.06); }
.cat-chip.active {
  background: var(--ink);
  color: #faf7ee;
  border-color: var(--ink);
}

/* ============ 卡片元信息（分类 + 日期） ============ */
.pc-meta { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.pc-cat {
  font-size: 12px;
  letter-spacing: 0.08em;
  padding: 2px 10px;
  border: 1px solid rgba(36, 57, 54, 0.2);
  border-radius: 999px;
  color: rgba(36, 57, 54, 0.7);
}
.pc-date { font-size: 12px; color: rgba(36, 57, 54, 0.5); letter-spacing: 0.04em; }
.pc-author { font-size: 12px; color: rgba(36, 57, 54, 0.6); letter-spacing: 0.02em; }
.pc-author::before { content: '·'; margin-right: 12px; color: rgba(36, 57, 54, 0.3); }

/* ============ 大屏加宽（仅 ≥1440px 生效；普通桌面 ≤1439px 完全不动，保留现有效果） ============ */
@media (min-width: 1440px) {
  .blog-main, .post-main { max-width: min(92vw, 1500px); }
  .post-article { max-width: min(90vw, 960px); }
  .back-link { max-width: min(90vw, 960px); }
}
@media (min-width: 1920px) {
  .blog-main, .post-main { max-width: min(90vw, 1760px); }
  .post-article { max-width: min(90vw, 1040px); }
  .back-link { max-width: min(90vw, 1040px); }
}

/* ============ 文章列表「形式」：新增三种布局（卡片为默认，见上方 .post-grid/.post-card） ============ */

/* --- 紧凑文字列表：无封面，一行一条，日期 | 标题 | 摘要 --- */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.post-list-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 9px 4px;
  border-bottom: 0.5px solid rgba(36, 57, 54, 0.07);
  text-decoration: none;
  color: inherit;
  border-radius: 8px;
  transition: background 0.2s ease;
}
.post-list-item:hover { background: rgba(36, 57, 54, 0.05); }
.post-list-item .pl-date {
  flex: 0 0 46px;
  font-size: 12px;
  color: var(--seal, #9d453b);
  letter-spacing: 0.04em;
}
.post-list-item .pl-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}
.post-list-item .pl-excerpt {
  flex: 1.4 1 0;
  min-width: 0;
  font-size: 12px;
  color: var(--ink-soft, #6b7d78);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

/* --- 横向滑动列表：卡片横排，左右滑动 --- */
.post-slider {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x proximity;
}
.post-slider .post-card {
  scroll-snap-align: start;
  min-width: 170px;
}
.post-slider .post-card .pc-cover { aspect-ratio: 16/9; }
.post-slider .post-card .pc-body { padding: 10px 12px 12px; }
.post-slider .post-card .pc-title { font-size: 14px; }
.post-slider .post-card .pc-summary { font-size: 12px; -webkit-line-clamp: 2; }

/* --- 带序号时间线式：左侧序号圆点 + 竖线，右侧标题 + 日期 + 摘要 --- */
.post-timeline {
  position: relative;
  max-width: 720px;
  padding-left: 8px;
}
.post-timeline-item {
  position: relative;
  display: flex;
  gap: 14px;
  padding-bottom: 24px;
}
.post-timeline-item:last-child { padding-bottom: 0; }
/* 竖向连接线（穿过序号圆点中心） */
.post-timeline-item::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 26px;
  bottom: 0;
  width: 2px;
  background: var(--paper-edge, rgba(218, 210, 192, 0.7));
}
.post-timeline-item:last-child::before { display: none; }
.post-timeline-marker {
  flex: 0 0 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.post-timeline-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ink, #243936);
  color: var(--paper, #faf7ee);
  font-family: "LXGW WenKai", "Songti SC", serif;
  font-size: 12px;
  font-weight: 400;
  box-shadow: 0 0 0 3px var(--paper, #faf7ee), 0 0 0 4px rgba(36, 57, 54, 0.15);
  position: relative;
  z-index: 1;
}
.post-timeline-date {
  margin-top: 6px;
  text-align: center;
  font-family: "LXGW WenKai", "Songti SC", serif;
  font-size: 11px;
  letter-spacing: 0.02em;
  line-height: 1.4;
  color: rgba(36, 57, 54, 0.5);
}
.post-timeline-body { flex: 1; padding-top: 2px; min-width: 0; text-align: left; }
.post-timeline-title {
  font-family: "LXGW WenKai", "Songti SC", serif;
  font-weight: 400;
  font-size: 15px;
  margin: 0 0 2px;
  line-height: 1.35;
  color: var(--ink, #243936);
  text-align: left;
}
.post-timeline-excerpt {
  font-family: "LXGW WenKai", "Songti SC", serif;
  font-size: 12px;
  line-height: 1.6;
  color: rgba(36, 57, 54, 0.7);
  margin: 0;
  text-align: left;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 移动端：时间线收紧、滑动卡片更窄 */
@media (max-width: 760px) {
  .post-list-item { flex-wrap: wrap; gap: 4px; padding: 8px 4px; }
  .post-list-item .pl-date { width: 42px; }
  .post-list-item .pl-excerpt { flex: none; width: 100%; -webkit-line-clamp: 1; margin-top: 2px; }
  .post-slider .post-card { min-width: 150px; }
  .post-timeline { max-width: 100%; padding-left: 4px; }
  .post-timeline-item::before { left: 9px; }
  .post-timeline-num { width: 20px; height: 20px; font-size: 11px; }
}
