:root {
  --pink: #ff0053;
  --pink-dark: #d90047;
  --orange: #fb8f00;
  --ink: #172033;
  --muted: #667085;
  --line: #e7e9ee;
  --paper: #ffffff;
  --wash: #f7f8fb;
  --gradient: linear-gradient(135deg, #ff0053 0%, #fb8f00 100%);
  --shadow-sm: 0 8px 24px rgba(23, 32, 51, 0.08);
  --shadow-lg: 0 28px 65px rgba(23, 32, 51, 0.14);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

.shell {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(231, 233, 238, 0.8);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  text-decoration: none;
}

.brand img {
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(255, 0, 83, 0.18);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.header-nav a,
.site-footer nav a {
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 600;
  text-decoration: none;
}

.header-nav a:hover,
.site-footer nav a:hover {
  color: var(--pink);
}

.header-nav .header-cta {
  padding: 10px 18px;
  border-radius: 999px;
  color: #fff;
  background: #ff6b1a;
  box-shadow: 0 8px 20px rgba(255, 107, 26, 0.24);
}

.header-nav .header-cta:hover {
  color: #fff;
  background: #e65a0f;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 34px 0 26px;
  color: #858c9b;
  font-size: 0.85rem;
}

.breadcrumbs a {
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--pink);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--pink);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.book-page {
  padding-bottom: 80px;
}

.book-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(240px, 360px) minmax(0, 1fr);
  gap: clamp(48px, 7vw, 92px);
  align-items: center;
  padding: 34px clamp(28px, 5vw, 70px) 58px;
  overflow: hidden;
  border: 1px solid #f0e8eb;
  border-radius: 32px;
  background:
    radial-gradient(circle at 88% 10%, rgba(251, 143, 0, 0.15), transparent 31%),
    radial-gradient(circle at 6% 90%, rgba(255, 0, 83, 0.11), transparent 35%),
    linear-gradient(145deg, #fff 20%, #fff8fa 100%);
}

.book-cover-wrap {
  position: relative;
}

.book-cover-wrap::after {
  position: absolute;
  right: 8%;
  bottom: -22px;
  left: 8%;
  height: 35px;
  border-radius: 50%;
  background: rgba(23, 32, 51, 0.18);
  content: "";
  filter: blur(18px);
}

.book-cover {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  aspect-ratio: 1024 / 1536;
  border-radius: 18px;
  background: #eef0f4;
  box-shadow: var(--shadow-lg);
  object-fit: cover;
}

.chip-row,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.chip-row {
  margin-bottom: 25px;
}

.meta-chip,
.tag-list span {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 6px 12px;
  border: 1px solid #e3e6ec;
  border-radius: 999px;
  color: #50586a;
  background: rgba(255, 255, 255, 0.86);
  font-size: 0.79rem;
  font-weight: 700;
  text-decoration: none;
}

.rating-chip {
  border-color: #f5dca8;
  color: #9a6200;
  background: #fff9eb;
}

.rating-chip span {
  margin-left: 4px;
  color: #7c6640;
}

.adult-chip {
  border-color: #efc9d1;
  color: #a01938;
  background: #fff4f6;
}

.audio-chip {
  border-color: #cfdcf5;
  color: #34578e;
  background: #f4f8ff;
}

.exclusive-chip {
  border-color: transparent;
  color: #fff;
  background: var(--gradient);
  box-shadow: 0 7px 16px rgba(255, 0, 83, 0.16);
}

.book-intro h1,
.catalogue-hero h1,
.genre-hero h1,
.error-page h1 {
  margin: 0;
  font-size: clamp(2.45rem, 6vw, 5.25rem);
  font-weight: 800;
  letter-spacing: -0.065em;
  line-height: 0.98;
}

.book-author {
  margin: 20px 0 0;
  color: #3d4658;
  font-size: 1.15rem;
  font-weight: 700;
}

.book-tagline {
  max-width: 680px;
  margin: 22px 0 0;
  color: var(--muted);
  font-family: "Lora", Georgia, serif;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-style: italic;
  line-height: 1.55;
}

.book-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin: 26px 0 0;
  padding: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  list-style: none;
}

.book-facts li + li {
  position: relative;
}

.book-facts li + li::before {
  position: absolute;
  top: 50%;
  left: -15px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #bdc2cc;
  content: "";
}

.tag-list {
  margin-top: 25px;
}

.tag-list span {
  min-height: 30px;
  padding: 4px 10px;
  color: #676f7d;
  background: #f3f4f7;
  font-size: 0.74rem;
}

.primary-button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
  padding: 13px 22px;
  border-radius: 999px;
  color: #fff;
  background: var(--gradient);
  box-shadow: 0 14px 28px rgba(255, 0, 83, 0.2);
  font-weight: 800;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.primary-button:hover {
  box-shadow: 0 18px 34px rgba(255, 0, 83, 0.26);
  transform: translateY(-2px);
}

.content-section {
  max-width: 900px;
  margin: 88px auto 0;
}

.content-section > h2,
.section-heading h2,
.download-panel h2 {
  margin: 0;
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  letter-spacing: -0.045em;
  line-height: 1.1;
}

.summary-copy {
  margin-top: 26px;
  color: #394254;
  font-family: "Lora", Georgia, serif;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.9;
  white-space: pre-line;
}

.chapter-section {
  max-width: 780px;
  padding-top: 76px;
  border-top: 1px solid var(--line);
}

.chapter-copy {
  margin-top: 42px;
  color: #252d3a;
  font-family: "Lora", Georgia, serif;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  line-height: 1.95;
}

.chapter-copy p {
  margin: 0 0 1.55em;
}

.chapter-heading {
  margin: 2.2em 0 1.3em;
  color: var(--ink);
  font-family: "Lora", Georgia, serif;
  font-size: clamp(1.55rem, 4vw, 2.2rem);
  line-height: 1.2;
  text-align: center;
}

.chapter-copy .chapter-heading:first-child {
  margin-top: 0;
}

.chapter-next-cta {
  display: flex;
  justify-content: center;
  margin-top: clamp(52px, 8vw, 80px);
  padding-top: clamp(38px, 6vw, 56px);
  border-top: 1px solid var(--line);
}

.chapter-next-button {
  width: min(100%, 380px);
  min-height: 60px;
  margin-top: 0;
  padding-inline: 28px;
  font-size: 1.02rem;
}

.reviews-section,
.related-section {
  max-width: 1180px;
  padding-top: 76px;
  border-top: 1px solid var(--line);
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 32px;
}

.review-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.review-heading {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
}

.review-avatar {
  display: grid;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #fff;
  background: var(--gradient);
  font-weight: 800;
  place-items: center;
}

.review-heading strong,
.review-heading time {
  display: block;
}

.review-heading time {
  margin-top: 2px;
  color: #8a91a0;
  font-size: 0.75rem;
}

.review-stars {
  color: #ec9b12;
  font-size: 0.87rem;
  letter-spacing: 0.02em;
}

.review-card > p {
  margin: 19px 0 0;
  color: #50596a;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

.section-heading > a {
  color: var(--pink);
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
}

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

.book-card {
  min-width: 0;
}

.book-card-cover {
  display: block;
  overflow: hidden;
  border-radius: 12px;
  background: #eef0f4;
  box-shadow: 0 13px 28px rgba(23, 32, 51, 0.13);
}

.book-card-cover img {
  width: 100%;
  height: auto;
  aspect-ratio: 1024 / 1536;
  object-fit: cover;
  transition: transform 220ms ease;
}

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

.book-card-copy {
  padding: 16px 3px 0;
}

.book-card-copy > span {
  color: var(--pink);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.book-card-copy h3 {
  margin: 5px 0 3px;
  overflow: hidden;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  line-height: 1.35;
}

.book-card-copy h3 a {
  text-decoration: none;
}

.book-card-copy h3 a:hover {
  color: var(--pink);
}

.book-card-copy p {
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.download-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 50px;
  align-items: center;
  margin-top: 100px;
  padding: clamp(34px, 6vw, 64px);
  overflow: hidden;
  border-radius: 28px;
  color: #fff;
  background:
    radial-gradient(circle at 80% 30%, rgba(255, 255, 255, 0.18), transparent 29%),
    linear-gradient(130deg, #b0003a 0%, #ff0053 46%, #f58a00 100%);
  box-shadow: 0 30px 70px rgba(185, 0, 60, 0.2);
}

.download-panel .eyebrow {
  color: #ffd9e5;
}

.download-panel p:not(.eyebrow) {
  max-width: 650px;
  margin: 15px 0 0;
  color: rgba(255, 255, 255, 0.82);
}

.open-app-link {
  display: inline-flex;
  gap: 10px;
  margin-top: 22px;
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.store-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.store-links a {
  display: block;
}

.store-links img {
  width: 180px;
  height: auto;
}

.catalogue-body {
  background: linear-gradient(180deg, #fff9fb 0, #fff 520px);
}

.catalogue-page,
.genre-page {
  padding-bottom: 80px;
}

.catalogue-browse-header {
  max-width: 760px;
  padding: clamp(46px, 6vw, 72px) 0 clamp(32px, 4vw, 46px);
}

.catalogue-browse-header h1 {
  margin: 0;
  font-size: clamp(2.65rem, 5vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 1;
}

.catalogue-browse-header p {
  max-width: 680px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.18rem);
}

.catalogue-hero {
  max-width: 880px;
  padding: 60px 0 70px;
}

.catalogue-hero h1 {
  font-size: clamp(3.2rem, 8vw, 6.6rem);
}

.catalogue-hero > p:last-child,
.genre-hero > p:last-child {
  max-width: 690px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.22rem);
}

.catalogue-section {
  margin-top: 72px;
}

.catalogue-genre-section {
  margin-top: 0;
}

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

.genre-card,
.genre-hero {
  --genre-a: #ff0053;
  --genre-b: #fb8f00;
}

.genre-romance { --genre-a: #ff2b72; --genre-b: #ff8baa; }
.genre-thriller { --genre-a: #222b45; --genre-b: #6956e8; }
.genre-drama { --genre-a: #e45d35; --genre-b: #f0a552; }
.genre-mystery { --genre-a: #26374d; --genre-b: #5c7797; }
.genre-fantasy { --genre-a: #7254c5; --genre-b: #cc75db; }
.genre-adventure { --genre-a: #19776f; --genre-b: #62b68c; }
.genre-historical { --genre-a: #895d3c; --genre-b: #c79868; }
.genre-science-fiction { --genre-a: #2768ae; --genre-b: #43b9bf; }
.genre-horror { --genre-a: #421b32; --genre-b: #9b3156; }
.genre-comedy { --genre-a: #f18812; --genre-b: #f8cb3e; }
.genre-kids { --genre-a: #337bd6; --genre-b: #68cfe2; }

.genre-card {
  position: relative;
  min-height: 280px;
  padding: 30px;
  overflow: hidden;
  border: 1px solid rgba(23, 32, 51, 0.06);
  border-radius: 22px;
  color: #fff;
  background: linear-gradient(140deg, var(--genre-a), var(--genre-b));
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.genre-card::after {
  position: absolute;
  right: -40px;
  bottom: -90px;
  width: 210px;
  height: 210px;
  border: 32px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  content: "";
}

.genre-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.genre-icon {
  display: grid;
  flex: 0 0 54px;
  width: 54px;
  height: 54px;
  border-radius: 15px;
  color: inherit;
  background: rgba(255, 255, 255, 0.17);
  place-items: center;
}

.genre-icon-svg {
  display: block;
  width: 24px;
  height: 24px;
}

.genre-card h3 {
  margin: 30px 0 8px;
  font-size: 1.45rem;
  letter-spacing: -0.035em;
}

.genre-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.88rem;
  line-height: 1.55;
}

.genre-card strong {
  display: block;
  margin-top: 18px;
  font-size: 0.82rem;
}

.catalogue-section > .book-grid,
.genre-page .book-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.genre-hero {
  position: relative;
  padding: clamp(40px, 7vw, 76px);
  overflow: hidden;
  border-radius: 28px;
  color: #fff;
  background: linear-gradient(135deg, var(--genre-a), var(--genre-b));
}

.genre-hero::after {
  position: absolute;
  top: -160px;
  right: -90px;
  width: 420px;
  height: 420px;
  border: 66px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  content: "";
}

.genre-hero .genre-icon {
  margin-bottom: 30px;
}

.genre-hero .eyebrow,
.genre-hero > p:last-child {
  color: rgba(255, 255, 255, 0.82);
}

.genre-hero h1 {
  position: relative;
  z-index: 1;
}

.pagination {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: center;
  margin-top: 60px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.pagination a {
  color: var(--pink);
  text-decoration: none;
}

.pagination a:last-child {
  text-align: right;
}

.error-body {
  background: linear-gradient(145deg, #fff 0%, #fff4f7 100%);
}

.error-page {
  display: flex;
  min-height: 68vh;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding-block: 80px;
}

.error-code {
  margin: 0 0 14px;
  color: var(--pink);
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.error-page > p:not(.error-code) {
  max-width: 580px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: 1.1rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #fafbfc;
}

.footer-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 36px;
  align-items: center;
  min-height: 120px;
}

.footer-brand {
  font-size: 1rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: center;
}

.site-footer p {
  margin: 0;
  color: #9096a2;
  font-size: 0.78rem;
}

@media (max-width: 1050px) {
  .book-grid,
  .catalogue-section > .book-grid,
  .genre-page .book-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .download-panel {
    grid-template-columns: 1fr;
  }

  .store-links {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 28px, 1180px);
  }

  .header-inner {
    min-height: 68px;
  }

  .brand span {
    display: none;
  }

  .header-nav {
    gap: 18px;
  }

  .header-nav .header-cta {
    padding: 9px 14px;
  }

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

  .book-hero {
    grid-template-columns: 1fr;
    gap: 44px;
    padding: 24px 20px 38px;
    border-radius: 24px;
  }

  .book-cover-wrap {
    width: min(76%, 310px);
    margin-inline: auto;
  }

  .book-intro h1,
  .catalogue-hero h1,
  .genre-hero h1,
  .error-page h1 {
    letter-spacing: -0.05em;
  }

  .content-section {
    margin-top: 68px;
  }

  .chapter-section,
  .reviews-section,
  .related-section {
    padding-top: 56px;
  }

  .review-grid {
    grid-template-columns: 1fr;
  }

  .book-grid,
  .catalogue-section > .book-grid,
  .genre-page .book-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px 12px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .catalogue-hero {
    padding: 48px 0 54px;
  }

  .catalogue-browse-header {
    padding: 38px 0 30px;
  }

  .genre-grid {
    grid-template-columns: 1fr;
  }

  .genre-card {
    min-height: 250px;
  }

  .genre-hero {
    border-radius: 22px;
  }

  .download-panel {
    gap: 34px;
    margin-top: 72px;
    border-radius: 22px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 22px;
    padding-block: 34px;
    text-align: center;
  }

  .footer-brand,
  .site-footer nav {
    justify-content: center;
  }
}

@media (max-width: 500px) {
  .book-grid,
  .catalogue-section > .book-grid,
  .genre-page .book-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .review-heading {
    grid-template-columns: auto 1fr;
  }

  .review-stars {
    grid-column: 2;
  }

  .store-links {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
