.book-home-main {
  display: grid;
  gap: 22px;
}

.book-home-intro,
.book-home-section {
  position: relative;
  overflow: hidden;
  padding: 34px 36px;
  border-radius: min(34px, 5vw);
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(247, 250, 255, 0.92));
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.book-home-intro::after {
  content: '';
  position: absolute;
  inset: auto -80px -120px auto;
  width: min(38vw, 460px);
  height: min(38vw, 460px);
  background: radial-gradient(circle, rgba(31, 103, 242, 0.2) 0%, rgba(31, 103, 242, 0) 68%);
  pointer-events: none;
}

.book-home-intro > * {
  position: relative;
  z-index: 1;
}

.book-home-title {
  max-width: 12ch;
  font-size: clamp(3rem, 7vw, 5rem);
  line-height: 0.96;
  margin-top: 16px;
}

.book-home-lead {
  max-width: 66ch;
  margin-top: 18px;
  color: var(--text-dim);
  font-size: 1.06rem;
  line-height: 1.82;
}

.book-home-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 26px;
}

.book-home-stat {
  display: grid;
  gap: 8px;
  padding: 20px 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.book-home-stat strong {
  color: var(--text);
  font-size: 1rem;
}

.book-home-stat span,
.book-home-meta,
.book-home-section-head p {
  color: var(--text-soft);
  font-size: 0.98rem;
  line-height: 1.72;
}

.book-home-meta {
  margin-top: 18px;
}

.book-home-section {
  display: grid;
  gap: 18px;
}

.book-home-section-head {
  display: grid;
  gap: 8px;
}

.book-home-section-head h2 {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
}

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

.book-part-card,
.book-toc-part {
  border-radius: 26px;
  border: 1px solid rgba(111, 129, 156, 0.14);
  background: rgba(255, 255, 255, 0.62);
}

.book-part-card {
  display: grid;
  grid-template-rows: auto auto minmax(5.4rem, auto) 1fr;
  align-content: start;
  gap: 16px;
  padding: 22px 22px;
}

.book-part-kicker {
  color: var(--accent-strong);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.book-part-card h3 {
  font-size: 1.22rem;
}

.book-part-card h3 a {
  color: var(--text);
}

.book-part-summary {
  min-height: 5.4rem;
  color: var(--text-dim);
}

.book-part-list {
  display: grid;
  gap: 10px;
  list-style: none;
}

.book-part-list a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--text-dim);
}

.book-part-list a:hover {
  background: rgba(255, 255, 255, 0.9);
  color: var(--accent-strong);
}

.book-part-list span {
  color: var(--text-soft);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

#book-toc-root {
  display: grid;
  gap: 14px;
}

#book-toc-root .book-toc-part {
  padding: 18px 20px;
}

#book-toc-root .book-toc-part + .book-toc-part {
  margin-top: 0;
}

#book-toc-root .book-toc-links {
  margin-top: 12px;
  gap: 6px;
}

#book-toc-root .book-toc-link,
#book-toc-root .book-toc-part-link {
  padding-left: 0;
  padding-right: 0;
  background: transparent;
}

@media (max-width: 1180px) {
  .book-home-parts-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1080px) {
  .book-home-intro,
  .book-home-section {
    padding: 28px 20px;
    gap: 20px;
  }

  .book-home-title {
    max-width: none;
    font-size: clamp(2.7rem, 14vw, 4rem);
    line-height: 1.02;
  }

  .book-home-lead {
    font-size: 1.08rem;
    line-height: 1.84;
  }

  .book-home-section-head h2 {
    font-size: 1.72rem;
    line-height: 1.16;
  }

  .book-home-section-head p,
  .book-home-meta,
  .book-home-stat span {
    font-size: 1rem;
  }

  .book-home-stats {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .book-part-card {
    grid-template-rows: auto auto auto 1fr;
    padding: 20px 18px;
  }

  .book-part-summary {
    min-height: auto;
  }

  .book-part-card h3 {
    font-size: 1.16rem;
    line-height: 1.3;
  }

  .book-part-list a {
    padding: 14px 14px;
  }
}
