/* ============ 全局重置与变量 ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --paper:      #f6f1e6;   /* 宣纸 */
  --paper-2:    #efe7d4;
  --ink:        #2a2620;   /* 墨 */
  --ink-2:      #4a423a;
  --ink-3:      #6b6258;
  --line:       #d9cfb9;
  --smoke:      #94a3b8;   /* 烟青 */
  --cinnabar:   #b5432b;   /* 朱砂 */
  --jade:       #5b7a5a;
  --shadow:     0 6px 30px rgba(58, 44, 28, 0.08);
  --radius:     10px;
  --serif:      "Noto Serif SC", "Songti SC", "STSong", serif;
  --sans:       "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;

  scroll-padding-bottom: 50px;}

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  overflow-y: scroll;
}

body {
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 20% -10%, #fbf6e8 0%, transparent 60%),
    radial-gradient(900px 500px at 100% 10%, #f3eada 0%, transparent 60%),
    var(--paper);
  line-height: 1.7;
  letter-spacing: 0.02em;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* 仿宣纸纹理 */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(120,90,50,0.05) 0 1px, transparent 2px),
    radial-gradient(circle at 70% 60%, rgba(120,90,50,0.04) 0 1px, transparent 2px),
    radial-gradient(circle at 40% 80%, rgba(120,90,50,0.04) 0 1px, transparent 2px);
  background-size: 7px 7px, 11px 11px, 13px 13px;
  opacity: 0.55;
  z-index: 0;
}

/* 雨丝背景画布 */
#rain {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}

/* 链接 */
a { color: inherit; text-decoration: none; transition: color .2s; }
a:hover { color: var(--cinnabar); }

/* ============ 导航 ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 40px;
  background: rgba(246, 241, 230, 0.78);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid rgba(217, 207, 185, 0.6);
  z-index: 100;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--serif);
  font-size: 18px; font-weight: 500;
  letter-spacing: 0.12em;
}
.seal {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  background: var(--cinnabar);
  color: #fff5e3;
  font-family: var(--serif);
  font-size: 18px; font-weight: 700;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(181, 67, 43, 0.35);
  transform: rotate(-3deg);
}
.brand-text em { color: var(--cinnabar); font-style: normal; margin: 0 4px; }
.nav-links { display: flex; gap: 32px; font-size: 15px; }
.nav-links a {
  position: relative;
  padding: 4px 2px;
}
.nav-links a::after {
  content: "";
  position: absolute; left: 0; right: 100%; bottom: 0;
  height: 1px; background: var(--cinnabar);
  transition: right .25s ease;
}
.nav-links a:hover::after { right: 0; }
.nav-toggle {
  display: none;
  background: transparent; border: none;
  font-size: 22px; color: var(--ink);
  cursor: pointer;
}

/* ============ Hero ============ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 120px 24px 60px;
  z-index: 1;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    url("/images/hero-rain-pavilion.png") center 42% / cover no-repeat;
  opacity: 0.22;
  filter: saturate(0.78) sepia(0.12) contrast(0.92);
  z-index: -2;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(248, 241, 224, 0.72) 0%, rgba(248, 241, 224, 0.52) 34%, rgba(248, 241, 224, 0.84) 72%, var(--paper) 100%),
    radial-gradient(circle at 50% 34%, rgba(255, 251, 240, 0.24), transparent 46%);
  z-index: -1;
}
.hero-inner {
  text-align: center;
  width: min(100%, 1040px);
  position: relative;
}
.kicker {
  font-family: var(--serif);
  font-size: 14px;
  color: var(--ink-3);
  letter-spacing: 0.6em;
  margin-bottom: 36px;
  opacity: 0;
  animation: fadeUp 1s .2s forwards;
}
.title {
  font-family: var(--serif);
  font-size: clamp(72px, 14vw, 168px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.04em;
  color: var(--ink);
  display: flex;
  justify-content: center;
  gap: clamp(8px, 1.5vw, 24px);
  margin-bottom: 32px;
}
.title .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(40px) rotate(-4deg);
  animation: charIn .9s cubic-bezier(.2,.7,.2,1) forwards;
  text-shadow: 0 2px 0 rgba(0,0,0,0.04);
}
.title .char:nth-child(1) { animation-delay: .35s; }
.title .char:nth-child(2) { animation-delay: .50s; color: var(--cinnabar); }
.title .char:nth-child(3) { animation-delay: .65s; }
.title .char:nth-child(4) { animation-delay: .80s; color: var(--cinnabar); }

.subtitle {
  font-family: var(--serif);
  font-size: clamp(16px, 2vw, 22px);
  color: var(--ink-2);
  letter-spacing: 0.18em;
  margin-bottom: 28px;
  opacity: 0;
  animation: fadeUp 1s 1.1s forwards;
}
.meta {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 14px;
  font-size: 14px; color: var(--ink-3);
  margin-bottom: 36px;
  opacity: 0;
  animation: fadeUp 1s 1.3s forwards;
}
.meta .dot { color: var(--cinnabar); }
.cta {
  display: inline-block;
  font-family: var(--serif);
  padding: 12px 28px;
  border: 1px solid var(--ink);
  color: var(--ink);
  letter-spacing: 0.15em;
  border-radius: 999px;
  position: relative;
  overflow: hidden;
  transition: all .3s;
  opacity: 0;
  animation: fadeUp 1s 1.5s forwards;
}
.cta::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--cinnabar);
  transform: translateX(-100%);
  transition: transform .4s ease;
  z-index: -1;
}
.cta:hover { color: #fff5e3; border-color: var(--cinnabar); }
.cta:hover::before { transform: translateX(0); }

.scroll-hint {
  position: absolute; bottom: 28px; left: 50%;
  transform: translateX(-50%);
  font-size: 28px; color: var(--ink-3);
  animation: bounce 2s infinite;
  font-family: var(--serif);
}

@keyframes charIn {
  to { opacity: 1; transform: translateY(0) rotate(0); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes bounce {
  0%, 100% { transform: translate(-50%, 0); opacity: .5; }
  50%      { transform: translate(-50%, 8px); opacity: 1; }
}

/* ============ Section 通用 ============ */
.section {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  padding: 100px 32px;
  z-index: 1;
}
.section-alt {
  max-width: none;
  padding: 100px 0;
  background:
    linear-gradient(180deg, rgba(217, 207, 185, 0.0), rgba(217, 207, 185, 0.18) 50%, rgba(217, 207, 185, 0));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section-alt > * { max-width: 1100px; margin-left: auto; margin-right: auto; padding-left: 32px; padding-right: 32px; }

.section-head {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 56px;
}
.section-no {
  font-family: var(--serif);
  font-size: 14px; color: var(--cinnabar);
  border: 1px solid var(--cinnabar);
  padding: 2px 10px;
  letter-spacing: 0.2em;
  border-radius: 2px;
}
.section-head h2 {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 500;
  letter-spacing: 0.12em;
  white-space: nowrap;
}
.section-line {
  flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--line), transparent);
}

/* ============ 关于 ============ */
.about-grid {
  max-width: 860px;
  margin: 0 auto;
  position: relative;
  padding-left: 30px;
}
.about-grid::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 10px;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--line) 12%, rgba(181, 67, 43, 0.36) 50%, var(--line) 88%, transparent);
}
.about-grid::after {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--cinnabar);
  box-shadow: 0 0 0 5px rgba(181, 67, 43, 0.06);
}
.about-text p {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 2.05;
  color: var(--ink-2);
  margin-bottom: 20px;
  text-indent: 2em;
}
.about-text p:last-child { margin-bottom: 0; }
.about-text b { color: var(--cinnabar); font-weight: 500; }

/* ============ 在学卡片 ============ */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.card {
  background: rgba(255, 251, 240, 0.7);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 26px 22px;
  box-shadow: var(--shadow);
  transition: transform .3s, box-shadow .3s, border-color .3s;
  position: relative;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 36px rgba(58, 44, 28, 0.12);
  border-color: var(--cinnabar);
}
.card-tag {
  display: inline-block;
  font-family: var(--serif);
  font-size: 12px;
  color: var(--cinnabar);
  border: 1px solid var(--cinnabar);
  padding: 2px 10px;
  letter-spacing: 0.2em;
  border-radius: 2px;
  margin-bottom: 14px;
}
.card h3 {
  font-family: var(--serif);
  font-size: 20px; font-weight: 500;
  margin-bottom: 10px;
  letter-spacing: 0.06em;
}
.card p {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.8;
  margin-bottom: 18px;
}
.progress {
  height: 4px;
  background: var(--paper-2);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 8px;
}
.progress span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--cinnabar), #d96a4a);
  width: 0;
  border-radius: 2px;
  transition: width 1.4s cubic-bezier(.2,.7,.2,1);
}
.card small {
  display: block;
  color: var(--ink-3);
  font-size: 12px;
  letter-spacing: 0.06em;
}

/* ============ 时间线 ============ */
.timeline {
  list-style: none;
  position: relative;
  padding-left: 28px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 6px; top: 6px; bottom: 6px;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--line) 8%, var(--line) 92%, transparent);
}
.timeline li {
  position: relative;
  padding: 0 0 36px 20px;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: -28px; top: 8px;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--cinnabar);
  box-shadow: 0 0 0 4px rgba(181, 67, 43, 0.08);
}
.timeline time {
  font-family: var(--serif);
  font-size: 14px;
  color: var(--cinnabar);
  letter-spacing: 0.15em;
}
.timeline h4 {
  font-family: var(--serif);
  font-size: 19px; font-weight: 500;
  margin: 6px 0 8px;
  letter-spacing: 0.06em;
}


.timeline p { color: var(--ink-2); font-size: 15px; line-height: 1.85; text-indent: 2em; }

/* ============ 书单 ============ */
.books {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 22px;
}
.book {
  background: rgba(255, 251, 240, 0.7);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 18px;
  text-align: center;
  transition: transform .3s, box-shadow .3s, border-color .3s;
  position: relative;
  overflow: hidden;
}
.book:hover {
  transform: translateY(-6px);
  border-color: var(--cinnabar);
  box-shadow: 0 16px 36px rgba(58, 44, 28, 0.14);
}
.book-cover {
  display: block;
  font-family: var(--serif);
  font-size: 38px; font-weight: 700;
  color: var(--cinnabar);
  letter-spacing: -0.04em;
  height: 60px;
  line-height: 60px;
  border-bottom: 1px dashed var(--line);
  margin-bottom: 12px;
  text-align: left;
  padding-left: 6px;
  position: relative;
}
.book-cover::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--cinnabar);
  border-radius: 2px;
}
.book h4 {
  font-family: var(--serif);
  font-size: 15px; font-weight: 500;
  margin-bottom: 4px;
  letter-spacing: 0.05em;
}
.book p { font-size: 12px; color: var(--ink-3); }

/* ============ 笔记 ============ */
.notes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}
.note {
  display: block;
  background: rgba(255, 251, 240, 0.65);
  border: 1px solid var(--line);
  border-left: 3px solid var(--cinnabar);
  border-radius: var(--radius);
  padding: 20px 22px;
  transition: transform .25s, box-shadow .25s, background .25s;
}
.note:hover {
  transform: translateX(4px);
  background: #fff8e7;
  box-shadow: var(--shadow);
}
.note time {
  font-family: var(--serif);
  font-size: 12px;
  color: var(--cinnabar);
  letter-spacing: 0.2em;
}
.note h4 {
  font-family: var(--serif);
  font-size: 17px; font-weight: 500;
  margin: 6px 0 6px;
  letter-spacing: 0.05em;
}
.note p { font-size: 14px; color: var(--ink-2); line-height: 1.7; }

/* ============ Footer ============ */
.footer {
  position: relative;
  z-index: 1;
  padding: 80px 24px 60px;
  text-align: center;
  background:
    linear-gradient(180deg, transparent, rgba(217, 207, 185, 0.25));
  border-top: 1px solid var(--line);
}
.footer-title {
  font-family: var(--serif);
  font-size: 32px;
  letter-spacing: 0.4em;
  margin-bottom: 14px;
  color: var(--ink);
}
.footer-quote {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--ink-3);
  letter-spacing: 0.1em;
  margin-bottom: 26px;
}
.footer-meta {
  font-size: 12px;
  color: var(--ink-3);
  margin-bottom: 18px;
  letter-spacing: 0.1em;
}
.footer-links {
  display: flex; justify-content: center; gap: 28px;
  font-size: 13px;
  letter-spacing: 0.1em;
}
.footer-links a { color: var(--ink-2); }
.footer-links a:hover { color: var(--cinnabar); }

/* ============ 响应式 ============ */
@media (max-width: 900px) {
  .nav { padding: 14px 20px; }
  .brand-text { display: none; }
  .nav-links {
    position: fixed;
    top: 64px; left: 0; right: 0;
    background: rgba(246, 241, 230, 0.96);
    backdrop-filter: blur(10px);
    flex-direction: column;
    gap: 0;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: all .25s;
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-links a {
    padding: 14px 24px;
    border-bottom: 1px dashed var(--line);
  }
  .nav-toggle { display: block; }
  .about-grid { padding-left: 24px; }
  .section { padding: 70px 22px; }
  .section-alt > * { padding-left: 22px; padding-right: 22px; }
  .section-head h2 { font-size: 24px; }
  .timeline { padding-left: 22px; }
  .timeline li { padding-left: 14px; }
  .timeline li::before { left: -25px; }
}

@media (max-width: 480px) {
  .meta { font-size: 12px; gap: 8px; }
  .kicker { font-size: 12px; letter-spacing: 0.4em; }
}

/* 滚动出现动画 */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .8s ease, transform .8s ease;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}


/* ============ 小节标题（板块内子标题）============ */
.sub-title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.08em;
  margin: 56px 0 24px;
  padding-left: 14px;
  border-left: 3px solid var(--cinnabar);
  color: var(--ink);
}
.sub-title:first-of-type { margin-top: 8px; }
.section-intro {
  font-family: var(--serif);
  font-size: 16px;
  color: var(--ink-2);
  line-height: 1.9;
  margin: -24px 0 36px;
  max-width: 720px;
  text-indent: 2em;
}

/* 卡片左对齐：仅 .section-alt 需要推齐到 1100px 居中容器 */
.section-alt .section-intro {
  margin-left: max(0px, calc(50vw - 550px));
}

/* ============ 留言板 ============ */
.guest-form {
  max-width: 1036px;
  margin: 0 auto 24px;
  background: rgba(255, 251, 240, 0.7);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 30px;
  box-shadow: var(--shadow);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}
.guest-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.guest-form label > span {
  font-family: var(--serif);
  font-size: 13px;
  color: var(--ink-3);
  letter-spacing: 0.15em;
}
.guest-form input,
.guest-form textarea {
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink);
  background: rgba(255, 255, 250, 0.6);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 14px;
  outline: none;
  transition: border-color .2s, background .2s, box-shadow .2s;
  resize: vertical;
}
.guest-form input:focus,
.guest-form textarea:focus {
  border-color: var(--cinnabar);
  background: #fff8e7;
  box-shadow: 0 0 0 3px rgba(181, 67, 43, 0.1);
}
.guest-form input::placeholder,
.guest-form textarea::placeholder {
  color: #b5a994;
  font-size: 14px;
}
.form-block { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.form-tip {
  font-family: var(--serif);
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.08em;
}
.submit-btn {
  font-family: var(--serif);
  font-size: 15px;
  color: #fff5e3;
  background: var(--cinnabar);
  border: none;
  padding: 12px 28px;
  border-radius: 999px;
  letter-spacing: 0.15em;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s, background .2s;
  box-shadow: 0 4px 12px rgba(181, 67, 43, 0.25);
}
.submit-btn:hover {
  background: #a23a23;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(181, 67, 43, 0.35);
}
.submit-btn:active { transform: translateY(0); }

/* 留言列表 */
.messages {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.message {
  background: rgba(255, 251, 240, 0.7);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 30px;
  box-shadow: var(--shadow);
  transition: transform .25s, box-shadow .25s;
  animation: msgIn .6s cubic-bezier(.2,.7,.2,1);
}
.message:hover {
  transform: translateX(2px);
  box-shadow: 0 10px 24px rgba(58, 44, 28, 0.1);
}
.msg-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.msg-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  background: var(--cinnabar);
  color: #fff5e3;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 700;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(181, 67, 43, 0.25);
  flex-shrink: 0;
}
.msg-head > div { display: flex; flex-direction: column; line-height: 1.4; flex: 1; min-width: 0; }
.msg-name {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
}
.msg-from {
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
}
.msg-head time {
  font-family: var(--serif);
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.1em;
  white-space: nowrap;
}
.message > p {
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.85;
  margin-bottom: 10px;
}
.msg-reply {
  background: var(--paper-2);
  border-left: 2px solid var(--cinnabar);
  padding: 8px 14px;
  border-radius: 0 6px 6px 0;
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.7;
}
.msg-reply b {
  color: var(--cinnabar);
  font-family: var(--serif);
  font-weight: 500;
  margin-right: 4px;
}

@keyframes msgIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 700px) {
  .form-row { grid-template-columns: 1fr; gap: 14px; }
  .guest-form { padding: 22px 20px; }
  .form-actions { flex-direction: column; align-items: stretch; }
  .submit-btn { width: 100%; }
}



/* ============ 分页 ============ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 48px;
  flex-wrap: wrap;
}
.pg-btn {
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 0.1em;
  color: var(--ink-2);
  background: transparent;
  border: 1px solid var(--line);
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}
.pg-btn:hover:not(:disabled) {
  color: var(--cinnabar);
  border-color: var(--cinnabar);
}
.pg-arrow {
  font-size: 75%;
  display: inline-block;
  vertical-align: baseline;
  line-height: 1;
}
.pg-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.pg-pages {
  list-style: none;
  display: flex;
  gap: 6px;
  padding: 0;
  margin: 0;
}
.pg-pages li button {
  font-family: var(--serif);
  font-size: 14px;
  width: 36px; height: 36px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-2);
  border-radius: 50%;
  cursor: pointer;
  transition: all .2s;
}
.pg-pages li button:hover {
  color: var(--cinnabar);
  border-color: var(--cinnabar);
}
.pg-pages li button.active {
  background: var(--cinnabar);
  color: #fff5e3;
  border-color: var(--cinnabar);
  box-shadow: 0 4px 10px rgba(181, 67, 43, 0.25);
}
.pg-pages li button.dots {
  border: none;
  background: transparent;
  cursor: default;
  color: var(--ink-3);
}

/* 学习笔记：超出页码的卡片隐藏 */
.is-hidden { display: none; }

/* 进入动画：分页切换时也用 */
.card.is-entering {
  animation: cardIn .5s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
  .pagination { gap: 10px; }
  .pg-btn { padding: 6px 14px; font-size: 13px; }
  .pg-pages li button { width: 32px; height: 32px; font-size: 13px; }
}

/* ============ Archive pages ============ */
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 16px;
  border: 1px solid var(--cinnabar);
  border-radius: 999px;
  color: var(--cinnabar);
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 0.12em;
  background: rgba(255, 251, 240, 0.62);
  white-space: nowrap;
}
.section-more:hover {
  color: #fff5e3;
  background: var(--cinnabar);
}

.archive-page {
  position: relative;
  z-index: 1;
  width: min(100%, 1060px);
  margin: 0 auto;
  padding: 140px 32px 100px;
}
.archive-head {
  margin-bottom: 34px;
}
.archive-head h1 {
  margin-top: 18px;
  font-family: var(--serif);
  font-size: clamp(34px, 6vw, 58px);
  font-weight: 500;
  letter-spacing: 0.1em;
}
.archive-head p {
  margin-top: 12px;
  color: var(--ink-2);
  font-family: var(--serif);
  font-size: 17px;
}
.archive-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px 18px;
  align-items: end;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.archive-search label {
  grid-column: 1 / -1;
  color: var(--ink-3);
  font-size: 13px;
  letter-spacing: 0.12em;
}
.archive-search input {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 251, 240, 0.78);
  color: var(--ink);
  font: 15px var(--sans);
  outline: none;
}
.archive-search input:focus {
  border-color: var(--cinnabar);
  box-shadow: 0 0 0 3px rgba(181, 67, 43, 0.08);
}
.archive-count {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  color: var(--ink-3);
  white-space: nowrap;
  font-size: 13px;
}
.archive-list {
  display: grid;
  gap: 16px;
}
.archive-item {
  border: 1px solid var(--line);
  border-left: 3px solid var(--cinnabar);
  border-radius: 8px;
  background: rgba(255, 251, 240, 0.68);
  box-shadow: var(--shadow);
  transition: transform .24s, border-color .24s, background .24s;
}
.archive-item:hover {
  transform: translateX(4px);
  border-color: var(--cinnabar);
  background: rgba(255, 248, 231, 0.88);
}
.archive-item a {
  display: block;
  padding: 20px 22px;
}
.archive-item time {
  color: var(--cinnabar);
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.12em;
}
.archive-item h2 {
  margin: 6px 0 8px;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 500;
  letter-spacing: 0.05em;
}
.archive-item p {
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.8;
}
.archive-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 12px;
  color: var(--ink-3);
  font-size: 12px;
}
.archive-empty {
  margin-top: 24px;
  color: var(--ink-3);
  font-family: var(--serif);
  text-align: center;
}

@media (max-width: 700px) {
  .section-head {
    flex-wrap: wrap;
  }
  .section-more {
    margin-left: auto;
  }
  .archive-page {
    padding: 110px 20px 76px;
  }
  .archive-search {
    grid-template-columns: 1fr;
  }
  .archive-count {
    min-height: auto;
  }
}













/* ============ 滚动锚点偏移 ============
   三个分页版块翻页时，顶端均落在导航栏下方 */
#study,
#messages,
#thoughts,
#thoughts .timeline {
  scroll-margin-top: 80px;
}



