/* ===== 主题变量 ===== */
:root {
  --bg: #faf7f2;
  --bg-alt: #f3ede2;
  --surface: #ffffff;
  --ink: #1f1b16;
  --ink-soft: #6b6358;
  --line: #e6dccd;
  --brand: #9b1c1c;
  --brand-dark: #7a1414;
  --brand-soft: #fbe9e9;
  --gold: #b0894c;
  --gold-soft: #efe3cc;
  --ok: #1f7a3f;
  --ok-soft: #e4f3ea;
  --bad: #b42318;
  --bad-soft: #fdeceb;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(31, 27, 22, .04), 0 8px 24px rgba(31, 27, 22, .06);
  --shadow-lg: 0 12px 40px rgba(31, 27, 22, .14);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Noto Sans SC", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 860px; }

/* ===== 按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .18s ease;
  white-space: nowrap;
}
.btn.sm { padding: 7px 14px; font-size: 13px; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--gold); color: var(--brand); }

/* ===== 导航 ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 247, 242, .85);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark {
  flex: 0 0 auto;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  background: var(--brand); color: #fff;
  border-radius: 8px;
  font-family: "Noto Serif SC", serif;
  font-weight: 700;
}
.brand-text {
  font-family: "Noto Serif SC", serif;
  font-weight: 700;
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.nav-links { display: flex; gap: 6px; }
.nav-links a {
  padding: 8px 12px;
  font-size: 14px;
  color: var(--ink-soft);
  border-radius: 8px;
  transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--brand); background: var(--brand-soft); }

/* ===== 首屏 ===== */
.hero {
  position: relative;
  padding: 72px 20px 64px;
  background:
    radial-gradient(1200px 400px at 80% -10%, rgba(176, 137, 76, .12), transparent 60%),
    linear-gradient(180deg, #fff8ee 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero-inner { max-width: 860px; margin: 0 auto; text-align: center; }
.hero-kicker {
  margin: 0 0 14px;
  letter-spacing: .25em;
  font-size: 12px;
  color: var(--gold);
  font-weight: 500;
}
.hero-title {
  font-family: "Noto Serif SC", serif;
  font-weight: 900;
  font-size: clamp(28px, 5vw, 46px);
  line-height: 1.25;
  margin: 0 0 18px;
  color: var(--ink);
}
.hero-sub { margin: 0 0 28px; color: var(--ink-soft); font-size: 16px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ===== 通用区块 ===== */
.section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.section-title {
  font-family: "Noto Serif SC", serif;
  font-weight: 700;
  font-size: 26px;
  margin: 0 0 8px;
  text-align: center;
}
.section-lead {
  text-align: center;
  color: var(--ink-soft);
  max-width: 620px;
  margin: 0 auto 36px;
}

/* ===== 简介特性卡片 ===== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  position: relative;
  transition: transform .18s, box-shadow .18s;
}
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature-no {
  font-family: "Noto Serif SC", serif;
  font-weight: 900;
  color: var(--gold-soft);
  font-size: 30px;
  line-height: 1;
  margin-bottom: 8px;
}
.feature-card h3 { margin: 0 0 6px; font-size: 17px; }
.feature-card p { margin: 0; color: var(--ink-soft); font-size: 14px; }

/* ===== 验真 ===== */
.verify-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.verify-label { display: block; font-size: 14px; color: var(--ink-soft); margin-bottom: 8px; }
.verify-row { display: flex; gap: 10px; flex-wrap: wrap; }
.verify-input {
  flex: 1 1 240px;
  padding: 12px 16px;
  font-size: 16px;
  font-family: "Noto Sans SC", sans-serif;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.verify-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.verify-hint { margin: 12px 0 0; font-size: 13px; color: var(--ink-soft); }

.verify-result { margin-top: 22px; }
.result-card {
  display: flex;
  gap: 16px;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
}
.result-card.ok { background: var(--ok-soft); border-color: #bfe3cd; }
.result-card.bad { background: var(--bad-soft); border-color: #f5c9c5; }
.result-icon {
  flex: 0 0 auto;
  width: 40px; height: 40px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 20px; font-weight: 700;
  color: #fff;
}
.result-card.ok .result-icon { background: var(--ok); }
.result-card.bad .result-icon { background: var(--bad); }
.result-title { font-weight: 700; font-size: 17px; margin-bottom: 8px; }
.result-meta { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 14px; }
.result-meta li { display: flex; gap: 8px; }
.result-meta b { color: var(--ink-soft); font-weight: 500; min-width: 72px; display: inline-block; }
.result-note { margin: 10px 0 0; font-size: 13px; color: var(--ink-soft); }

/* ===== 电子书 ===== */
.ebook-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 28px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.ebook-cover { perspective: 800px; }
.cover-face {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 6px 10px 10px 6px;
  background: linear-gradient(160deg, #8a1414 0%, #6b0f0f 100%);
  color: #fff;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25), inset 0 0 0 1px rgba(255, 255, 255, .08);
  transform: rotateY(-8deg);
  transform-style: preserve-3d;
}
.cover-spine {
  position: absolute;
  left: -8px; top: 0; bottom: 0;
  width: 8px;
  background: linear-gradient(90deg, #5c0c0c, #7a1212);
  border-radius: 3px 0 0 3px;
  box-shadow: -2px 0 6px rgba(0, 0, 0, .3);
}
.cover-tag { font-size: 10px; letter-spacing: .2em; color: var(--gold-soft); }
.cover-title {
  font-family: "Noto Serif SC", serif;
  font-weight: 900;
  font-size: 22px;
  line-height: 1.3;
}
.cover-foot { font-size: 12px; letter-spacing: .3em; color: rgba(255, 255, 255, .7); }
.ebook-info h3 { margin: 0 0 8px; font-size: 19px; }
.ebook-info p { margin: 0 0 18px; color: var(--ink-soft); font-size: 15px; }
.ebook-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.ebook-tip { margin: 14px 0 0; font-size: 13px; color: var(--ink-soft); }
.ebook-tip code { background: var(--bg-alt); padding: 1px 6px; border-radius: 4px; }

/* ===== 页脚 ===== */
.footer {
  background: #2a211a;
  color: #cdbfa9;
  padding: 28px 0;
  font-size: 13px;
  text-align: center;
}
.footer p { margin: 0; }
.footer-sub { margin-top: 6px; color: #8a7f6f; }

/* ===== 阅读器浮层 ===== */
.reader {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #2a211a;
  display: flex;
  flex-direction: column;
}
.reader[hidden] { display: none; }
.reader-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: #1f1812;
  color: #fff;
  border-bottom: 1px solid #3a2e22;
}
.reader-title { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reader-actions { display: flex; gap: 8px; }
.reader .btn-ghost { color: #fff; border-color: #4a3b2c; }
.reader .btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.reader-stage { position: relative; flex: 1 1 auto; }
#pdfFrame {
  width: 100%; height: 100%; border: 0; display: block; background: #525029;
}
.pdf-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: #f7f4ee;
}
.fallback-inner { text-align: center; max-width: 420px; padding: 24px; }
.fallback-inner h3 { margin: 0 0 8px; font-family: "Noto Serif SC", serif; }
.fallback-inner p { color: var(--ink-soft); margin: 0 0 18px; }
.fallback-inner code { background: var(--bg-alt); padding: 1px 6px; border-radius: 4px; }

/* ===== 响应式 ===== */
@media (max-width: 720px) {
  .nav-links { display: none; }
  .ebook-card { grid-template-columns: 1fr; }
  .ebook-cover { max-width: 200px; margin: 0 auto; }
  .reader-actions .btn:not(:last-child) { display: none; }
}
