:root {
  --bg: #faf9f6;
  --surface: #ffffff;
  --ink: #2f2d2a;
  --muted: #6f6b64;
  --faint: #9a958c;
  --line: #e8e4dc;
  --accent: #3f6f5f;
  --accent-soft: #e7f0ec;
  --radius: 12px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 760px; margin: 0 auto; padding: 0 20px; }

header.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 64px; gap: 16px; flex-wrap: wrap;
}
.brand-group { display: flex; align-items: center; gap: 10px; min-width: 0; }
.header-logo { width: 30px; height: 30px; flex: none; display: block; }
.brand { font-size: 17px; font-weight: 600; color: var(--ink); letter-spacing: .02em; }
.brand:hover { text-decoration: none; }
nav a {
  color: var(--muted); font-size: 14px; margin-left: 20px;
  padding: 6px 0; border-bottom: 2px solid transparent;
}
nav a:hover { color: var(--ink); text-decoration: none; }
nav a.active { color: var(--accent); border-bottom-color: var(--accent); }

main { padding: 48px 0 80px; min-height: 60vh; }

.hero { padding: 24px 0 40px; }
.hero-brand { display: flex; align-items: center; gap: 26px; margin: 0 0 26px; }
.hero-logo { display: block; width: 92px; height: 92px; margin: 0 0 18px; flex: none; }
.hero-brand .hero-logo { margin: 0; }
.hero-quote {
  margin: 0; color: var(--ink);
  font-family: "SimHei", "黑体", "Microsoft YaHei", sans-serif;
  font-weight: 600; font-size: 19px; line-height: 1.9; letter-spacing: .02em;
}
.hero-quote-by { font-size: 15px; color: var(--muted); white-space: nowrap; }
.hero-logo-large { width: 140px; height: 140px; }
.hero-with-logo { text-align: center; }
.hero-with-logo .hero-logo { margin-left: auto; margin-right: auto; }
.hero h1 { font-size: 32px; line-height: 1.35; margin: 0 0 14px; font-weight: 600; letter-spacing: -.01em; }
.hero p.sub { font-size: 17px; color: var(--muted); margin: 0 0 20px; }
.hero p.bio { max-width: 620px; color: var(--muted); margin: 0; }

.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 44px 0 18px; gap: 12px;
}
.section-head h2 { font-size: 19px; font-weight: 600; margin: 0; }
.section-head a { font-size: 13px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 14px;
}
.card h3 { margin: 0 0 6px; font-size: 16px; font-weight: 600; }
.card p { margin: 0; color: var(--muted); white-space: pre-wrap; }
.home-card { padding: 16px 22px; }
.home-card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.home-card-title-wrap { display: flex; align-items: center; gap: 10px; min-width: 0; }
.home-card-title { margin: 0; font-size: 16px; font-weight: 600; }
.latest-badge {
  flex: none; font-size: 11px; line-height: 1; color: #fff;
  background: #c0392b; border-radius: 4px; padding: 4px 7px; font-weight: 600;
}
.home-card-toggle {
  flex: none; border: 1px solid var(--line); background: var(--surface);
  color: var(--accent); border-radius: 20px; padding: 4px 14px;
  font-size: 13px; cursor: pointer; font-family: inherit;
}
.home-card-toggle:hover { border-color: var(--accent); background: var(--accent-soft); }
.home-card-detail { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }

/* 访客留言板 */
.guestbook textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font: inherit; font-size: 14px; color: var(--ink); background: var(--surface); resize: vertical; outline: none; }
.guestbook textarea:focus { border-color: var(--accent); }
.guestbook-bar { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.guestbook-count { font-size: 13px; color: var(--faint); font-variant-numeric: tabular-nums; }
.guestbook button { border: 1px solid var(--accent); background: var(--accent); color: #fff; border-radius: 8px; padding: 7px 20px; cursor: pointer; font: inherit; font-size: 14px; }
.guestbook button:hover { opacity: .9; }
.guestbook button:disabled { opacity: .5; cursor: not-allowed; }
.guestbook .err { color: var(--danger, #c0392b); font-size: 13px; margin-top: 8px; min-height: 0; }
.message-item { padding: 12px 0; border-top: 1px solid var(--line); }
.message-item:first-child { border-top: 0; }
.message-body { margin: 0 0 4px !important; color: var(--ink) !important; white-space: pre-wrap; word-break: break-word; }
.card .meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.date { font-size: 13px; color: var(--faint); font-variant-numeric: tabular-nums; }
.tag {
  display: inline-block; font-size: 12px; color: var(--accent);
  background: var(--accent-soft); border-radius: 20px; padding: 1px 10px;
}

.link-item {
  display: block; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 22px; margin-bottom: 12px;
  color: var(--ink);
}
.link-item:hover { border-color: var(--accent); text-decoration: none; }
.link-item .top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.link-item .title { font-weight: 600; }
.link-item .arrow { color: var(--faint); font-size: 13px; }
.link-item p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 20px; }
.filter {
  border: 1px solid var(--line); background: var(--surface); color: var(--muted);
  border-radius: 20px; padding: 5px 14px; font-size: 13px; cursor: pointer;
  font-family: inherit;
}
.filter:hover { border-color: var(--accent); color: var(--accent); }
.filter.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.timeline { border-left: 2px solid var(--line); margin-left: 8px; padding-left: 26px; }
.timeline .card { position: relative; }
.timeline .card::before {
  content: ""; position: absolute; left: -33px; top: 26px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent);
}

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 16px; }
.gallery-item { margin: 0; }
.gallery-item img { width: 100%; height: 140px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: block; cursor: zoom-in; }
.gallery-item figcaption { font-size: 12px; color: var(--faint); margin-top: 4px; text-align: center; }

.lightbox { position: fixed; inset: 0; background: rgba(20, 20, 18, .9); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 24px; }
.lightbox img { max-width: 100%; max-height: 92vh; object-fit: contain; border-radius: 6px; }
.lightbox .close { position: absolute; top: 16px; right: 20px; color: #fff; background: transparent; border: 0; font-size: 30px; cursor: pointer; line-height: 1; }

.empty { color: var(--faint); padding: 32px 0; text-align: center; }

footer.site-footer {
  border-top: 1px solid var(--line); color: var(--faint);
  font-size: 13px; padding: 24px 0 40px;
}

/* 今日访问量超限提示层 */
.visit-limit {
  position: fixed; inset: 0; z-index: 200;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.visit-limit-card {
  max-width: 420px; text-align: center;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 40px 32px;
}
.visit-limit-mark { font-size: 34px; margin-bottom: 14px; }
.visit-limit-card h2 { margin: 0 0 12px; font-size: 20px; }
.visit-limit-card p { color: var(--muted); margin: 0 0 10px; }
.visit-limit-sub { font-size: 13px; color: var(--faint); }
.visit-limit-link {
  display: inline-block; margin-top: 18px; padding: 9px 18px;
  background: var(--accent); color: #fff; border-radius: 8px;
}
.visit-limit-link:hover { text-decoration: none; opacity: .9; }

@media (max-width: 600px) {
  main { padding: 32px 0 60px; }
  .hero h1 { font-size: 26px; }
  .hero-brand { gap: 16px; }
  .hero-quote { font-size: 15px; line-height: 1.8; }
  .hero-quote-by { font-size: 13px; }
  .hero-logo { width: 76px; height: 76px; }
  .hero-logo-large { width: 116px; height: 116px; }
  .header-logo { width: 26px; height: 26px; }
  .card { padding: 18px; }
  .timeline { padding-left: 18px; }
  .timeline .card::before { left: -25px; }
  nav a { margin-left: 14px; font-size: 13px; }
  .visit-limit-card { padding: 32px 22px; }
}
