:root {
  --bg-paper: #f6f1e7;
  --bg-card: #fdfbf7;
  --primary: #9b2226;
  --primary-hover: #7f1d1d;
  --gold: #b08968;
  --ink-main: #2b2522;
  --ink-muted: #6e655f;
  --border-antique: #e3d9c6;
  --shadow-soft: 0 6px 24px rgba(43, 37, 34, 0.06);
  --font-serif: "Songti SC", "Noto Serif SC", "STSong", "SimSun", Georgia, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background-color: var(--bg-paper);
  color: var(--ink-main);
  line-height: 1.7;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; transition: color 0.25s, background 0.25s, border-color 0.25s; }
ul { list-style: none; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 9px 22px; border-radius: 4px; font-size: 14px; font-weight: 600;
  cursor: pointer; border: 1px solid transparent; transition: all 0.25s ease;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-ink { background: var(--ink-main); color: #f6f1e7; }
.btn-ink:hover { background: #1a1614; }

.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(246, 241, 231, 0.94); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-antique); padding: 14px 0;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; }
.seal-mark {
  width: 34px; height: 34px; border-radius: 4px; background: var(--primary); color: #fdfbf7;
  font-family: var(--font-serif); font-size: 18px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,0.25);
}
.brand-name { font-family: var(--font-serif); font-size: 22px; font-weight: 700; letter-spacing: 2px; color: var(--ink-main); }
.brand-name small { font-family: var(--font-sans); font-size: 12px; font-weight: 500; color: var(--ink-muted); letter-spacing: 0.5px; margin-left: 4px; }

.main-nav ul { display: flex; gap: 32px; }
.main-nav a { font-family: var(--font-serif); font-size: 16px; color: var(--ink-muted); padding: 4px 0; border-bottom: 2px solid transparent; }
.main-nav a:hover, .main-nav a.active { color: var(--primary); border-bottom-color: var(--primary); }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; width: 28px; height: 20px; position: relative; }
.nav-toggle span { display: block; width: 100%; height: 2px; background: var(--ink-main); position: absolute; transition: all 0.3s; }
.nav-toggle span:nth-child(1) { top: 0; }
.nav-toggle span:nth-child(2) { top: 9px; }
.nav-toggle span:nth-child(3) { top: 18px; }

.hero { padding: 48px 0 36px; }
.hero-card {
  background: var(--bg-card); border: 1px solid var(--border-antique); border-radius: 8px;
  padding: 48px 32px; text-align: center; box-shadow: var(--shadow-soft);
  position: relative;
}
.hero-card::before {
  content: ""; position: absolute; inset: 8px;
  border: 1px dashed rgba(176, 137, 104, 0.35); border-radius: 4px; pointer-events: none;
}
.hero-seal {
  display: inline-block; padding: 4px 16px; border: 1px solid var(--primary);
  color: var(--primary); font-family: var(--font-serif); font-size: 13px; letter-spacing: 3px;
  border-radius: 2px; margin-bottom: 18px;
}
.hero-title {
  font-family: var(--font-serif); font-size: clamp(28px, 4.5vw, 44px);
  color: var(--ink-main); letter-spacing: 4px; margin-bottom: 16px;
}
.hero-sub {
  max-width: 680px; margin: 0 auto 36px; font-size: 15px; color: var(--ink-muted);
}

.hero-download-grid { display: flex; justify-content: center; gap: 28px; flex-wrap: wrap; }
.dl-card {
  background: var(--bg-paper); border: 1px solid var(--border-antique); border-radius: 6px;
  padding: 18px 22px; display: flex; align-items: center; gap: 18px; text-align: left; min-width: 300px;
}
.qr-wrapper {
  width: 96px; height: 96px; background: #fff; padding: 6px;
  border: 1px solid var(--border-antique); border-radius: 4px; flex-shrink: 0;
}
.dl-qr { width: 100%; height: 100%; object-fit: cover; }
.dl-info { display: flex; flex-direction: column; gap: 6px; }
.dl-label { font-family: var(--font-serif); font-size: 16px; font-weight: 700; color: var(--ink-main); }
.dl-desc { font-size: 12px; color: var(--ink-muted); margin-bottom: 4px; }

.section-spacing { margin-top: 48px; margin-bottom: 48px; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  border-bottom: 2px solid var(--border-antique); padding-bottom: 12px; margin-bottom: 24px;
}
.section-title {
  font-family: var(--font-serif); font-size: 24px; color: var(--ink-main); letter-spacing: 2px;
  position: relative; padding-left: 14px;
}
.section-title::before {
  content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 4px; background: var(--primary);
}
.section-sub { font-size: 13px; color: var(--ink-muted); }

.book-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.book-card {
  background: var(--bg-card); border: 1px solid var(--border-antique); border-radius: 6px;
  display: flex; overflow: hidden; box-shadow: var(--shadow-soft); transition: transform 0.25s;
}
.book-card:hover { transform: translateY(-3px); border-color: var(--gold); }
.book-spine {
  width: 78px; background: var(--primary); color: #fdfbf7; flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: 16px 8px; font-family: var(--font-serif);
}
.spine-ink { background: #343a40; }
.spine-gold { background: #8c6239; }
.spine-plum { background: #5c2a3a; }
.book-cat { font-size: 11px; opacity: 0.85; border: 1px solid rgba(255,255,255,0.4); padding: 2px 4px; }
.book-title-v { writing-mode: vertical-rl; font-size: 18px; letter-spacing: 4px; font-weight: 700; }
.book-body { padding: 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.book-body h3 { font-family: var(--font-serif); font-size: 18px; color: var(--ink-main); }
.book-author { font-size: 12px; color: var(--gold); font-weight: 600; }
.book-body p { font-size: 13px; color: var(--ink-muted); line-height: 1.65; }
.book-link { margin-top: auto; font-size: 13px; font-weight: 600; color: var(--primary); }
.book-link:hover { text-decoration: underline; }

.article-catalog {
  background: var(--bg-card); border: 1px solid var(--border-antique); border-radius: 6px;
  padding: 24px 28px; box-shadow: var(--shadow-soft);
}
.catalog-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 36px; }
.catalog-list li {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  padding: 12px 0; border-bottom: 1px dashed var(--border-antique); min-width: 0;
}
.catalog-list a {
  font-size: 14px; color: var(--ink-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  position: relative; padding-left: 14px;
}
.catalog-list a::before { content: "▪"; position: absolute; left: 0; color: var(--primary); }
.catalog-list a:hover { color: var(--primary); }
.catalog-list time { font-size: 12px; color: var(--ink-muted); flex-shrink: 0; font-family: monospace; }

.comment-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.comment-card {
  background: var(--bg-card); border: 1px solid var(--border-antique); border-radius: 6px;
  padding: 20px; box-shadow: var(--shadow-soft);
}
.c-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.c-avatar {
  width: 40px; height: 40px; border-radius: 50%; background: var(--bg-paper);
  border: 1px solid var(--primary); color: var(--primary); font-family: var(--font-serif);
  font-size: 16px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.c-name { font-size: 15px; font-weight: 700; color: var(--ink-main); }
.c-meta { font-size: 12px; color: var(--ink-muted); }
.c-text { font-size: 14px; color: var(--ink-muted); line-height: 1.7; }

.site-footer { background: #241e1b; color: #c7bdb4; padding: 48px 0 24px; margin-top: 60px; }
.footer-grid { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 36px; margin-bottom: 32px; }
.footer-logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-serif); font-size: 20px; color: #fdfbf7; margin-bottom: 12px; }
.footer-slogan { font-size: 13px; color: #9c9187; max-width: 380px; }
.footer-notice { max-width: 460px; }
.footer-notice h3 { font-family: var(--font-serif); font-size: 16px; color: #fdfbf7; margin-bottom: 10px; }
.notice-text { font-size: 13px; color: #9c9187; line-height: 1.8; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
  font-size: 12px; color: #8c8177;
}
.footer-dl {
  color: #fdfbf7; background: var(--primary); padding: 6px 14px; border-radius: 4px; font-weight: 600;
}
.footer-dl:hover { background: var(--primary-hover); }

@media (max-width: 900px) {
  .book-grid, .catalog-list, .comment-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-cta { display: none; }
  .main-nav {
    position: absolute; top: 100%; left: 0; width: 100%;
    background: var(--bg-card); border-bottom: 1px solid var(--border-antique); padding: 18px 0;
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0); transition: all 0.3s ease;
  }
  .main-nav.active { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
  .main-nav ul { flex-direction: column; align-items: center; gap: 16px; }
  .nav-toggle.open span:nth-child(1) { transform: rotate(45deg); top: 9px; }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: rotate(-45deg); top: 9px; }
  .hero-card { padding: 32px 18px; }
  .dl-card { width: 100%; min-width: auto; }
  .article-catalog { padding: 18px; }
}