:root {
  --paper: #f6f1e4;
  --paper-deep: #ede5d0;
  --ink: #2f2b25;
  --ink-soft: #7a7060;
  --seal: #a8382a;
  --rule: #d9cdb0;
}

* { box-sizing: border-box; }

html { font-size: 18px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "LXGW WenKai GB Screen", "LXGW WenKai Screen", "Kaiti SC", "STKaiti", "KaiTi", "Songti SC", "Noto Serif SC", serif;
  line-height: 1.85;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-decoration: none; }

.wrap { max-width: 640px; margin: 0 auto; padding: 0 1.4rem; }

/* 刊头 */
.masthead { text-align: center; padding: 3.2rem 0 1.4rem; }
.masthead .seal {
  display: inline-block;
  width: 2.6rem; height: 2.6rem; line-height: 2.6rem;
  background: var(--seal); color: var(--paper);
  font-size: 1.5rem; border-radius: 4px;
  margin-bottom: 0.9rem;
}
.masthead .site-title {
  display: block;
  font-size: 2rem; letter-spacing: 0.3em; text-indent: 0.3em;
  line-height: 1.3;
}
.masthead .motto { color: var(--ink-soft); font-size: 0.85rem; margin: 0.5rem 0 0; letter-spacing: 0.05em; }

.nav {
  display: flex; justify-content: center; gap: 2rem;
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  padding: 0.5rem 0; margin-bottom: 2.6rem;
  font-size: 0.95rem; letter-spacing: 0.15em;
}
.nav a { color: var(--ink-soft); }
.nav a:hover, .nav a.active { color: var(--seal); }

main { min-height: 50vh; padding-bottom: 3rem; }

h1 { font-size: 1.55rem; font-weight: normal; line-height: 1.45; margin: 0 0 0.6rem; letter-spacing: 0.05em; }
h2 { font-size: 1.15rem; font-weight: normal; line-height: 1.5; margin: 2.4rem 0 1rem; }

.label {
  font-size: 0.85rem; color: var(--ink-soft); letter-spacing: 0.3em;
  text-align: center; margin: 0 0 1.2rem;
}
.label::before, .label::after { content: "—"; margin: 0 0.6rem; color: var(--rule); }

/* 文章列表 */
.post-list { list-style: none; padding: 0; margin: 0; }
.post-list li { padding: 0.9rem 0; border-bottom: 1px dotted var(--rule); }
.post-list li:last-child { border-bottom: none; }
.post-list a { font-size: 1.1rem; line-height: 1.5; display: block; }
.post-list a:hover { color: var(--seal); }
.post-list .date { color: var(--ink-soft); font-size: 0.8rem; letter-spacing: 0.05em; }

.year { text-align: center; color: var(--seal); font-size: 1rem; letter-spacing: 0.2em; }

.more { text-align: center; margin-top: 1.6rem; font-size: 0.9rem; }
.more a { color: var(--seal); letter-spacing: 0.1em; }

/* 正文 */
article h1 { text-align: center; margin-top: 0.4rem; }
.meta { color: var(--ink-soft); font-size: 0.85rem; text-align: center; margin-bottom: 2.2rem; }
.meta a { color: var(--seal); }

.content { font-size: 1.05rem; }
.content p { margin: 0 0 1.3rem; text-align: justify; }
.content a { color: var(--seal); border-bottom: 1px solid rgba(168, 56, 42, 0.3); }
.content blockquote {
  margin: 1.8rem 0; padding: 1rem 1.3rem;
  background: var(--paper-deep);
  border-radius: 4px;
  color: #4a4337;
}
.content blockquote p:last-child { margin-bottom: 0; }
.content img { max-width: 100%; height: auto; border-radius: 4px; }
.content table { border-collapse: collapse; width: 100%; font-size: 0.95rem; margin: 1rem 0 1.6rem; }
.content th, .content td { border-bottom: 1px solid var(--rule); padding: 0.55rem 0.4rem; text-align: left; vertical-align: top; }
.content th { color: var(--ink-soft); font-weight: normal; }

/* 道德经进度 */
.progress { text-align: center; color: var(--ink-soft); font-size: 0.9rem; margin: 1.4rem 0; }
.progress b { color: var(--seal); font-weight: normal; font-size: 1.3rem; }
.chapters {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(9, 1fr); gap: 0.35rem;
}
.chapters li {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem; color: #b5aa92;
  border: 1px solid var(--rule); border-radius: 50%;
}
.chapters li.done { background: var(--seal); border-color: var(--seal); }
.chapters li.done a { color: var(--paper); width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }

.tag-cloud { list-style: none; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem 1.6rem; }
.tag-cloud .count { color: var(--ink-soft); font-size: 0.8rem; }

.site-footer { text-align: center; color: var(--ink-soft); font-size: 0.8rem; padding: 1.6rem 0 2.4rem; border-top: 1px solid var(--rule); letter-spacing: 0.1em; }

@media (max-width: 480px) {
  html { font-size: 17px; }
  .masthead { padding-top: 2.4rem; }
  .masthead .site-title { font-size: 1.75rem; }
  .nav { gap: 1.3rem; }
}

@media (max-width: 480px) {
  .chapters { grid-template-columns: repeat(6, 1fr); }
  .chapters li { font-size: 0.72rem; }
}
