:root {
  --ink: #1f2421;
  --muted: #66706a;
  --paper: #f6f5f1;
  --surface: #fffdfa;
  --line: #ded8ce;
  --teal: #0f6f68;
  --rust: #a64235;
  --gold: #c8912f;
  --green: #426a48;
  --blue: #245f86;
  --black-red: #2b2527;
  --shadow: 0 18px 48px rgba(31, 36, 33, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(15, 111, 104, 0.06), transparent 26%),
    linear-gradient(180deg, #ffffff 0%, var(--paper) 42%, #eef3ef 100%);
  font-family:
    "Noto Serif SC",
    "Songti SC",
    "STSong",
    "Source Han Serif SC",
    Georgia,
    serif;
  letter-spacing: 0;
}

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

img {
  display: block;
  width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(222, 216, 206, 0.86);
  background: rgba(255, 253, 250, 0.92);
  backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1220px;
  margin: 0 auto;
  padding: 14px 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(15, 111, 104, 0.3);
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--green));
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 18px;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-family:
    "PingFang SC",
    "Microsoft YaHei",
    Arial,
    sans-serif;
  font-size: 12px;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  font-family:
    "PingFang SC",
    "Microsoft YaHei",
    Arial,
    sans-serif;
  white-space: nowrap;
}

.top-nav a {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 9px 12px;
  color: #3e4642;
  font-size: 14px;
}

.top-nav a:hover,
.top-nav a:focus-visible {
  border-color: rgba(15, 111, 104, 0.28);
  color: var(--teal);
  background: rgba(15, 111, 104, 0.08);
  outline: none;
}

.library-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1.08fr);
  gap: 42px;
  align-items: center;
  max-width: 1220px;
  margin: 0 auto;
  padding: 54px 22px 44px;
}

.hero-copy {
  max-width: 620px;
}

.eyebrow,
.section-label {
  margin: 0 0 10px;
  color: var(--rust);
  font-family:
    "PingFang SC",
    "Microsoft YaHei",
    Arial,
    sans-serif;
  font-size: 13px;
  font-weight: 800;
}

.library-hero h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.08;
  font-weight: 900;
}

.hero-lead {
  margin: 24px 0 0;
  max-width: 570px;
  color: #48524d;
  font-size: 18px;
  line-height: 1.9;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
  font-family:
    "PingFang SC",
    "Microsoft YaHei",
    Arial,
    sans-serif;
}

.hero-actions a,
.book-nav a {
  border: 1px solid rgba(15, 111, 104, 0.28);
  border-radius: 8px;
  padding: 10px 13px;
  color: #fff;
  background: var(--teal);
  font-size: 14px;
  font-weight: 800;
}

.hero-actions a + a,
.book-nav a:first-child {
  color: #24534f;
  background: rgba(255, 253, 250, 0.92);
}

.hero-actions a:hover,
.hero-actions a:focus-visible,
.book-nav a:hover,
.book-nav a:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(31, 36, 33, 0.12);
  outline: none;
}

.hero-stack {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.cover-card {
  position: relative;
  min-height: 390px;
  overflow: hidden;
  border: 1px solid rgba(31, 36, 33, 0.14);
  border-radius: 8px;
  box-shadow: var(--shadow);
  background: var(--surface);
}

.cover-card img {
  height: 100%;
  min-height: 390px;
  object-fit: cover;
  transition: transform 260ms ease;
}

.cover-card:hover img {
  transform: scale(1.035);
}

.cover-card span {
  position: absolute;
  right: 12px;
  bottom: 12px;
  left: 12px;
  border-radius: 8px;
  padding: 10px 12px;
  color: #fff;
  background: rgba(31, 36, 33, 0.7);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
}

.reader-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 30px;
  max-width: 1220px;
  margin: 0 auto;
  padding: 22px 22px 64px;
}

.shelf-panel {
  position: sticky;
  top: 82px;
  align-self: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 250, 0.88);
  box-shadow: 0 14px 42px rgba(31, 36, 33, 0.08);
  overflow: hidden;
}

.shelf-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 16px;
  font-family:
    "PingFang SC",
    "Microsoft YaHei",
    Arial,
    sans-serif;
}

.shelf-title span {
  color: var(--muted);
}

.shelf-panel a {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 4px 12px;
  padding: 15px 16px;
  border-bottom: 1px solid rgba(222, 216, 206, 0.68);
}

.shelf-panel a:last-child {
  border-bottom: 0;
}

.shelf-panel a span {
  grid-row: 1 / span 2;
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: 22px;
  font-weight: 800;
}

.shelf-panel a strong {
  font-size: 16px;
}

.shelf-panel a small {
  color: var(--muted);
  font-family:
    "PingFang SC",
    "Microsoft YaHei",
    Arial,
    sans-serif;
  font-size: 12px;
}

.shelf-panel a:hover,
.shelf-panel a:focus-visible {
  background: rgba(15, 111, 104, 0.08);
  outline: none;
}

.home-section,
.category-hero {
  max-width: 1220px;
  margin: 0 auto;
  padding: 34px 22px;
}

.section-heading {
  max-width: 780px;
  margin-bottom: 18px;
}

.section-heading h2,
.category-hero h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.15;
}

.section-heading p:not(.eyebrow),
.category-hero p:not(.eyebrow) {
  margin: 14px 0 0;
  color: #4f5a54;
  font-size: 17px;
  line-height: 1.8;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.category-card {
  display: block;
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: var(--surface);
  box-shadow: 0 14px 42px rgba(31, 36, 33, 0.08);
}

.category-card:hover,
.category-card:focus-visible,
.book-card:hover,
.book-card:focus-within {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  outline: none;
}

.category-count {
  display: inline-flex;
  border-radius: 8px;
  padding: 6px 9px;
  color: #fff;
  background: var(--teal);
  font-family:
    "PingFang SC",
    "Microsoft YaHei",
    Arial,
    sans-serif;
  font-size: 12px;
  font-weight: 800;
}

.category-card h3,
.book-card h3 {
  margin: 18px 0 10px;
  font-size: 28px;
  line-height: 1.16;
}

.category-card p,
.book-card p {
  margin: 0;
  color: #4f5a54;
  font-size: 15px;
  line-height: 1.75;
}

.accent-red {
  border-top: 5px solid var(--rust);
}

.accent-green {
  border-top: 5px solid var(--green);
}

.accent-blue {
  border-top: 5px solid var(--blue);
}

.accent-gold {
  border-top: 5px solid var(--gold);
}

.accent-black {
  border-top: 5px solid var(--black-red);
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.book-card {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 14px 42px rgba(31, 36, 33, 0.08);
}

.book-card > div {
  padding: 18px;
}

.book-card-image {
  display: block;
  overflow: hidden;
  background: #ece8df;
}

.book-card-image img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 260ms ease;
}

.book-card:hover .book-card-image img,
.book-card:focus-within .book-card-image img {
  transform: scale(1.035);
}

.book-card .tag-row {
  margin-top: 16px;
}

.category-list .book-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 520px));
}

.timeline-panel {
  display: grid;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: rgba(255, 253, 250, 0.78);
  box-shadow: 0 14px 42px rgba(31, 36, 33, 0.08);
}

.timeline-list {
  display: grid;
  gap: 0;
}

.timeline-entry {
  display: grid;
  grid-template-columns: 150px 22px minmax(0, 1fr);
  gap: 18px;
  min-height: 140px;
}

.timeline-date {
  padding-top: 16px;
  color: var(--rust);
  font-family:
    "PingFang SC",
    "Microsoft YaHei",
    Arial,
    sans-serif;
  font-size: 14px;
  font-weight: 900;
  text-align: right;
}

.timeline-rail {
  position: relative;
}

.timeline-rail::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: rgba(15, 111, 104, 0.22);
  content: "";
  transform: translateX(-50%);
}

.timeline-entry:first-child .timeline-rail::before {
  top: 18px;
}

.timeline-entry:last-child .timeline-rail::before {
  bottom: calc(100% - 18px);
}

.timeline-dot {
  position: absolute;
  top: 16px;
  left: 50%;
  width: 18px;
  height: 18px;
  border: 4px solid var(--surface);
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 1px rgba(15, 111, 104, 0.28);
  transform: translateX(-50%);
}

.timeline-card {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 18px;
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid rgba(31, 36, 33, 0.12);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 14px 34px rgba(31, 36, 33, 0.08);
}

.timeline-card:hover,
.timeline-card:focus-within {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.timeline-thumb {
  display: block;
  min-height: 144px;
  overflow: hidden;
  background: #ece8df;
}

.timeline-thumb img {
  height: 100%;
  object-fit: cover;
  transition: transform 260ms ease;
}

.timeline-card:hover .timeline-thumb img,
.timeline-card:focus-within .timeline-thumb img {
  transform: scale(1.035);
}

.timeline-copy {
  padding: 16px 18px 16px 0;
}

.timeline-copy h3 {
  margin: 0;
  font-size: 26px;
  line-height: 1.18;
}

.timeline-meta {
  margin: 8px 0 0;
  color: var(--muted);
  font-family:
    "PingFang SC",
    "Microsoft YaHei",
    Arial,
    sans-serif;
  font-size: 13px;
  font-weight: 700;
}

.timeline-copy p:not(.eyebrow):not(.timeline-meta) {
  margin: 10px 0 0;
  color: #4f5a54;
  font-size: 15px;
  line-height: 1.75;
}

.timeline-era {
  margin: 8px 0 0;
  color: #24534f;
  font-family:
    "PingFang SC",
    "Microsoft YaHei",
    Arial,
    sans-serif;
  font-size: 13px;
  font-weight: 800;
}

.category-hero {
  padding-top: 46px;
  padding-bottom: 18px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 18px 28px 0;
  color: var(--muted);
  font-family:
    "PingFang SC",
    "Microsoft YaHei",
    Arial,
    sans-serif;
  font-size: 13px;
}

.category-hero .breadcrumbs {
  padding: 0;
  margin-bottom: 22px;
}

.breadcrumbs a {
  color: #24534f;
  font-weight: 800;
}

.breadcrumbs strong {
  color: var(--ink);
}

.book-page-shell {
  padding-top: 34px;
}

.book-title {
  margin: 0;
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1.1;
}

.book-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 20px 30px 26px;
  font-family:
    "PingFang SC",
    "Microsoft YaHei",
    Arial,
    sans-serif;
}

.book-flow {
  display: grid;
  gap: 34px;
}

.book-section {
  scroll-margin-top: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.book-heading {
  display: grid;
  grid-template-columns: minmax(300px, 0.95fr) minmax(0, 1.05fr);
  gap: 30px;
  align-items: center;
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(15, 111, 104, 0.08), transparent 38%),
    linear-gradient(315deg, rgba(198, 137, 47, 0.14), transparent 44%);
}

.book-heading figure {
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(31, 36, 33, 0.16);
  background: #ece8df;
}

.book-heading figure img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.book-heading figcaption {
  padding: 10px 12px;
  color: var(--muted);
  background: rgba(255, 253, 250, 0.95);
  font-family:
    "PingFang SC",
    "Microsoft YaHei",
    Arial,
    sans-serif;
  font-size: 12px;
  line-height: 1.55;
}

.book-heading h2 {
  margin: 0;
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1.1;
}

.meta {
  margin: 16px 0 0;
  color: #4f5a54;
  font-size: 17px;
  line-height: 1.8;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
  font-family:
    "PingFang SC",
    "Microsoft YaHei",
    Arial,
    sans-serif;
}

.tag-row span {
  border: 1px solid rgba(15, 111, 104, 0.24);
  border-radius: 8px;
  padding: 7px 10px;
  color: #24534f;
  background: rgba(15, 111, 104, 0.08);
  font-size: 13px;
  font-weight: 700;
}

.content-block,
.split-block {
  padding: 30px;
}

.content-block {
  border-top: 1px solid var(--line);
}

.long-read {
  display: grid;
  gap: 18px;
  color: #2b302d;
  font-size: 18px;
  line-height: 2.05;
}

.long-read p {
  margin: 0;
}

.split-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 26px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(238, 243, 239, 0.62), rgba(255, 253, 250, 0.8));
}

.quote-list {
  display: grid;
  gap: 10px;
}

.quote-list p {
  margin: 0;
  border-left: 4px solid var(--teal);
  border-radius: 8px;
  padding: 13px 14px;
  color: #34403a;
  background: #fff;
  font-size: 15px;
  line-height: 1.8;
}

.quote-list strong {
  color: var(--ink);
}

.impact-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
  color: #34403a;
  font-size: 15px;
  line-height: 1.8;
}

.impact-list li::marker {
  color: var(--rust);
  font-weight: 800;
}

.source-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 18px 30px 24px;
  background: #f8faf6;
  font-family:
    "PingFang SC",
    "Microsoft YaHei",
    Arial,
    sans-serif;
}

.source-strip a {
  border: 1px solid rgba(31, 36, 33, 0.14);
  border-radius: 8px;
  padding: 8px 11px;
  color: #24534f;
  background: #fff;
  font-size: 13px;
  font-weight: 800;
}

.source-strip a:hover,
.source-strip a:focus-visible {
  border-color: rgba(15, 111, 104, 0.4);
  background: rgba(15, 111, 104, 0.08);
  outline: none;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 24px 22px 34px;
  color: var(--muted);
  background: #fffdfa;
  font-family:
    "PingFang SC",
    "Microsoft YaHei",
    Arial,
    sans-serif;
  font-size: 13px;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 980px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .library-hero,
  .reader-shell,
  .book-heading,
  .split-block,
  .timeline-entry,
  .timeline-card {
    grid-template-columns: 1fr;
  }

  .timeline-date {
    padding-top: 0;
    text-align: left;
  }

  .timeline-rail {
    display: none;
  }

  .timeline-thumb {
    min-height: 220px;
  }

  .timeline-copy {
    padding: 18px;
  }

  .category-grid,
  .book-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .library-hero {
    gap: 28px;
    padding-top: 38px;
  }

  .hero-stack {
    grid-template-columns: repeat(3, minmax(170px, 1fr));
    overflow-x: auto;
    padding-bottom: 6px;
  }

  .cover-card,
  .cover-card img {
    min-height: 310px;
  }

  .reader-shell {
    padding-top: 8px;
  }

  .shelf-panel {
    position: static;
  }
}

@media (max-width: 640px) {
  .header-inner {
    padding: 12px 14px;
  }

  .brand {
    min-width: 0;
  }

  .library-hero,
  .reader-shell,
  .home-section,
  .category-hero {
    padding-right: 14px;
    padding-left: 14px;
  }

  .library-hero h1 {
    font-size: 34px;
  }

  .hero-lead,
  .long-read {
    font-size: 16px;
  }

  .hero-stack {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .hero-actions,
  .book-nav {
    flex-direction: column;
  }

  .hero-actions a,
  .book-nav a {
    width: 100%;
    text-align: center;
  }

  .category-grid,
  .book-grid,
  .category-list .book-grid {
    grid-template-columns: 1fr;
  }

  .category-card h3,
  .book-card h3 {
    font-size: 24px;
  }

  .cover-card,
  .cover-card img {
    min-height: 250px;
  }

  .book-heading,
  .content-block,
  .split-block,
  .timeline-panel {
    padding: 18px;
  }

  .timeline-copy h3 {
    font-size: 24px;
  }

  .breadcrumbs {
    padding: 16px 18px 0;
  }

  .book-heading h2 {
    font-size: 36px;
  }

  .book-title {
    font-size: 36px;
  }

  .meta {
    font-size: 15px;
  }

  .source-strip {
    padding: 16px 18px 20px;
  }

  .source-strip a {
    width: 100%;
    text-align: center;
  }
}
