:root {
  --bg: #faf6f0;
  --card: #ffffff;
  --ink: #241f1b;
  --muted: #8a7f74;
  --accent: #3e8f4f;
  --accent-soft: #dcecdf;
  --border: #ece2d6;
  --serif: "Songti SC", "STSong", Georgia, "Times New Roman", serif;
  --sans: -apple-system, "PingFang SC", "Segoe UI", sans-serif;
  --mono-display: "Space Grotesk", var(--sans);
  font-family: var(--sans);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
}

.lib-header {
  padding: 56px 24px 8px;
  text-align: center;
}
.brand-mark {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 14px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--bg);
  letter-spacing: -0.5px;
}

/* ---- value grid ---- */
.value-grid {
  max-width: 880px;
  margin: 48px auto 0;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.value-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 28px 22px;
}
.value-card-eyebrow {
  margin: 0 0 8px;
  font-size: 0.68rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}
.value-card-title {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 600;
}
.value-card-desc {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.75;
  color: var(--muted);
}
.lib-kicker {
  margin: 0 0 10px;
  font-size: 0.72rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}
.lib-header h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 2.1rem;
  letter-spacing: 0.5px;
}
.lib-tagline-hero {
  margin: 12px 0 0;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--accent);
}
.lib-tagline {
  margin: 14px auto 0;
  max-width: 460px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
}
.lib-tagline--secondary {
  margin-top: 8px;
  font-size: 0.85rem;
  opacity: 0.8;
}
.zh-inline-en { color: var(--muted); font-weight: 400; font-size: 0.8em; }

.shelf {
  max-width: 880px;
  margin: 56px auto 80px;
  padding: 0 24px;
}

/* ---- hero book ---- */
.hero-book {
  display: flex;
  gap: 48px;
  align-items: center;
  text-decoration: none;
  color: inherit;
  padding: 40px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(36, 31, 27, 0.04);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.hero-book:hover {
  box-shadow: 0 24px 48px rgba(36, 31, 27, 0.12);
  border-color: var(--accent-soft);
}

.hero-cover {
  width: 240px;
  min-width: 240px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 18px 40px rgba(36, 31, 27, 0.28);
}

.hero-info { min-width: 0; }
.hero-eyebrow {
  margin: 0 0 10px;
  font-size: 0.72rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}
.hero-title {
  margin: 0 0 18px;
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.25;
}
.hero-title-en {
  display: block;
  margin-top: 4px;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 1px;
  color: var(--muted);
}
.hero-blurb {
  margin: 0 0 14px;
  font-size: 0.92rem;
  line-height: 1.85;
  color: var(--ink);
}
.hero-blurb--secondary { color: var(--muted); }
.hero-cta {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  border-bottom: 1.5px solid var(--accent);
  padding-bottom: 2px;
}
.hero-cta-en { font-weight: 400; }

/* ---- how it works ---- */
.how-it-works { margin-top: 64px; }
.how-it-works-title {
  margin: 0 0 24px;
  font-family: var(--serif);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--muted);
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
}
.how-steps {
  display: grid;
  gap: 22px;
}
.how-step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.how-step-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.how-step-title {
  margin: 0 0 4px;
  font-weight: 600;
  font-size: 0.95rem;
}
.how-step-desc {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.75;
  color: var(--muted);
}

/* ---- more shelf ---- */
.more-shelf { margin-top: 64px; }
.more-shelf-title {
  margin: 0 0 20px;
  font-family: var(--serif);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--muted);
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
}
.more-row {
  display: flex;
  align-items: center;
  gap: 24px;
}
.more-slot { flex-shrink: 0; text-align: center; }
.more-slot-cover {
  width: 90px;
  aspect-ratio: 2 / 3;
  border-radius: 2px;
  border: 1px solid var(--border);
  background: linear-gradient(160deg, #fff 0%, var(--bg) 100%);
}
.more-slot-label {
  margin: 8px 0 0;
  font-size: 0.68rem;
  letter-spacing: 1px;
  color: var(--muted);
}
.more-slot-note {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--muted);
}

@media (max-width: 640px) {
  .lib-header { padding: 40px 20px 4px; }
  .brand-mark { width: 48px; height: 48px; border-radius: 12px; }
  .lib-header h1 { font-size: 1.5rem; }
  .lib-tagline-hero { font-size: 1rem; }
  .lib-tagline { font-size: 0.88rem; max-width: 100%; }

  .value-grid { grid-template-columns: 1fr; margin-top: 32px; padding: 0 20px; gap: 14px; }
  .value-card { padding: 22px 18px; }

  .shelf { margin: 40px auto 56px; padding: 0 20px; }

  .hero-book { flex-direction: column; padding: 24px 20px; gap: 20px; border-radius: 4px; }
  .hero-cover { width: 140px; min-width: 140px; }
  .hero-info { text-align: center; }
  .hero-title { font-size: 1.6rem; }
  .hero-blurb { font-size: 0.88rem; line-height: 1.75; }

  .how-it-works { margin-top: 44px; }
  .how-steps { gap: 18px; }
  .how-step-title { font-size: 0.9rem; }
  .how-step-desc { font-size: 0.82rem; }

  .more-shelf { margin-top: 44px; }
  .more-row { flex-direction: column; text-align: center; gap: 16px; }
}

.install-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(36, 31, 27, 0.16);
  max-width: 420px;
  margin: 0 auto;
}

.install-banner-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  flex-shrink: 0;
}

.install-banner-text { flex: 1; min-width: 0; }

.install-banner-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--ink);
  margin: 0;
}

.install-banner-desc {
  font-size: 0.76rem;
  color: var(--muted);
  margin: 2px 0 0;
}

.install-banner-btn {
  flex-shrink: 0;
  border: none;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.82rem;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
}

.install-banner-close {
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
}
