:root {
  --paper: #faf6ec;
  --paper-line: rgba(176, 140, 96, 0.22);
  --ink: #3d362c;
  --ink-soft: #8a7f6f;
  --accent: #b98a5a;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  background: var(--paper);
  background-image:
    radial-gradient(ellipse at 20% 10%, rgba(255, 252, 244, 0.9), transparent 60%),
    radial-gradient(ellipse at 85% 90%, rgba(230, 214, 186, 0.55), transparent 55%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  color: var(--ink);
  font-family: "Kaiti SC", "STKaiti", "KaiTi", "楷体", "Songti SC", "SimSun", serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 24px 100px;
  -webkit-font-smoothing: antialiased;
}

/* 日记本纸页 */
.page {
  width: min(720px, 100%);
  background: #fdfaf3;
  border: 1px solid rgba(185, 138, 90, 0.28);
  border-radius: 3px;
  box-shadow: 0 18px 50px rgba(120, 94, 58, 0.16), 0 3px 10px rgba(120, 94, 58, 0.08);
  position: relative;
  padding: 60px 64px 56px;
  animation: rise 1.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* 装订线（书脊侧） */
.page::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 30px;
  width: 1px;
  background: linear-gradient(to bottom,
    transparent 0%, rgba(185, 138, 90, 0.4) 6%, rgba(185, 138, 90, 0.4) 94%, transparent 100%);
}

/* 装订孔 ×2 */
.page::after, .pin {
  content: "";
  position: absolute;
  top: 52px; left: 20px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid rgba(185, 138, 90, 0.45);
}
.pin { top: auto; bottom: 52px; }

/* 正文横格线 */
.lines {
  position: absolute;
  top: 150px; left: 64px; right: 64px; bottom: 60px;
  background: repeating-linear-gradient(
    to bottom,
    var(--paper-line) 0 1px,
    transparent 1px 42px
  );
  pointer-events: none;
  opacity: 0.5;
}

/* ---- 首页（目录） ---- */
.cover-head { text-align: center; margin-bottom: 40px; }

.date {
  font-size: 15px;
  letter-spacing: 0.35em;
  color: var(--ink-soft);
  margin-bottom: 24px;
  animation: rise 1.1s 0.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

h1 {
  font-size: clamp(38px, 7vw, 54px);
  font-weight: 500;
  letter-spacing: 0.12em;
  margin-bottom: 20px;
  animation: rise 1.1s 0.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.sign {
  display: inline-block;
  width: 34px; height: 3px;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0.75;
  animation: grow 1s 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
  transform-origin: left center;
}

.sub {
  margin-top: 16px;
  font-size: 17px;
  color: var(--ink-soft);
  letter-spacing: 0.2em;
  animation: rise 1.1s 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.list {
  margin-top: 8px;
  animation: rise 1.1s 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.item {
  display: flex;
  align-items: baseline;
  gap: 22px;
  padding: 15px 6px;
  border-top: 1px dashed rgba(176, 140, 96, 0.35);
  text-decoration: none;
  color: var(--ink);
  transition: padding-left 0.25s ease, background 0.25s ease;
}
.item:last-of-type { border-bottom: 1px dashed rgba(176, 140, 96, 0.35); }
.item:hover { padding-left: 18px; background: rgba(185, 138, 90, 0.07); }

.item .d { min-width: 118px; color: var(--accent); font-size: 17px; letter-spacing: 0.06em; }
.item .w { min-width: 52px; color: var(--ink-soft); font-size: 14px; letter-spacing: 0.15em; }
.item .t { font-size: 18px; letter-spacing: 0.05em; }
.item:hover .t { color: var(--accent); }

/* ---- 详情页 ---- */
.d-head { margin-bottom: 30px; }
.d-head .date { margin-bottom: 16px; }
.d-title { font-size: clamp(26px, 5vw, 34px); font-weight: 500; letter-spacing: 0.1em; }

.d-body p {
  font-size: 18.5px;
  line-height: 2.1;
  letter-spacing: 0.04em;
  margin-bottom: 18px;
  text-indent: 2em;
  animation: rise 1.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.d-body p:nth-of-type(2) { animation-delay: 0.12s; }
.d-body p:nth-of-type(3) { animation-delay: 0.24s; }

.nav {
  display: flex;
  justify-content: space-between;
  margin-top: 42px;
  padding-top: 24px;
  border-top: 1px solid rgba(176, 140, 96, 0.35);
  font-size: 16px;
  animation: rise 1.1s 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.nav a {
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: opacity 0.25s ease;
}
.nav a:hover { opacity: 0.7; }
.nav .home { color: var(--ink-soft); }
.nav .void { visibility: hidden; }

/* ---- 底部备案 ---- */
footer {
  margin-top: 26px;
  text-align: center;
  font-size: 13px;
  letter-spacing: 0.05em;
  color: #a99d8b;
  animation: rise 1.1s 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}
footer a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted rgba(169, 157, 139, 0.7);
  transition: color 0.25s ease;
}
footer a:hover { color: var(--accent); }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes grow {
  from { opacity: 0; transform: scaleX(0); }
  to   { opacity: 0.75; transform: scaleX(1); }
}

@media (max-width: 560px) {
  .page { padding: 44px 38px 46px; }
  .lines { left: 38px; right: 38px; }
  .item { gap: 12px; }
  .item .d { min-width: 96px; }
  .d-body p { font-size: 17px; }
}
