:root {
  --paper: #f7f3ff;
  --surface: #ffffff;
  --ink: #122033;
  --muted: #667085;
  --line: #e2d8f3;
  --navy: #13284b;
  --gold: #8f6bdc;
  --gold-soft: #eadcff;
  --coral: #ef7b68;
  --teal: #2e9ca0;
  --sky: #86b7e8;
  --plum: #7b4b8f;
  --violet: #6f4bd8;
  --lavender: #d9ccff;
  --pink: #ffd3ec;
  --sage: #dce6d2;
  --rose: #ecd6cf;
  --shadow: 0 16px 42px rgba(34, 31, 24, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 12%, rgba(111, 75, 216, 0.22) 0 150px, transparent 152px),
    radial-gradient(circle at 92% 7%, rgba(255, 93, 177, 0.18) 0 160px, transparent 162px),
    radial-gradient(circle at 78% 46%, rgba(134, 183, 232, 0.18) 0 210px, transparent 212px),
    var(--paper);
  line-height: 1.5;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 78%, rgba(134, 183, 232, 0.22), transparent 230px),
    radial-gradient(circle at 96% 88%, rgba(123, 75, 143, 0.18), transparent 230px),
    radial-gradient(circle at 42% 35%, rgba(255, 211, 236, 0.24), transparent 260px);
}

.watermarks {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.wm {
  position: absolute;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 9px 18px;
  border: 1px solid rgba(111, 75, 216, 0.13);
  border-radius: 999px;
  color: rgba(111, 75, 216, 0.13);
  background: rgba(255, 255, 255, 0.22);
  font-size: clamp(15px, 2.2vw, 30px);
  font-weight: 900;
  box-shadow: 0 18px 50px rgba(111, 75, 216, 0.06);
  backdrop-filter: blur(2px);
  white-space: nowrap;
}

.wm-1 { top: 13%; left: 7%; transform: rotate(-14deg); }
.wm-2 { top: 20%; right: 13%; transform: rotate(11deg); }
.wm-3 { top: 42%; left: 4%; transform: rotate(8deg); }
.wm-4 { top: 55%; right: 8%; transform: rotate(-10deg); }
.wm-5 { top: 76%; left: 14%; transform: rotate(13deg); }
.wm-6 { top: 84%; right: 18%; transform: rotate(-7deg); }
.wm-7 { top: 33%; left: 42%; transform: rotate(-18deg); }
.wm-8 { top: 66%; left: 47%; transform: rotate(16deg); }
.wm-9 { top: 9%; left: 58%; transform: rotate(-6deg); }
.wm-10 { top: 91%; left: 38%; transform: rotate(9deg); }

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

button,
input {
  font: inherit;
}

.skip-link,
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.skip-link:focus {
  width: auto;
  height: auto;
  clip: auto;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 12px;
  background: var(--navy);
  color: white;
  border-radius: 6px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.header-shell {
  display: grid;
  grid-template-columns: auto minmax(260px, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 20px 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--navy);
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: white;
  background: linear-gradient(135deg, var(--violet), var(--navy));
  box-shadow: inset 0 -3px 0 rgba(255, 255, 255, 0.16);
}

.search-form {
  display: flex;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(19, 40, 75, 0.08);
}

.search-form input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 12px 14px 12px 18px;
  color: var(--ink);
  background: transparent;
}

.search-form button {
  border: 0;
  background: var(--navy);
  color: white;
  min-width: 46px;
  border-radius: 999px;
  cursor: pointer;
}

.desktop-icons {
  display: flex;
  gap: 8px;
}

.desktop-icons a,
.menu-toggle {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 20px rgba(19, 40, 75, 0.06);
}

.menu-toggle {
  display: none;
  padding: 0;
  cursor: pointer;
}

.menu-toggle span:not(.sr-only) {
  width: 18px;
  height: 2px;
  background: var(--navy);
}

.category-strip {
  display: flex;
  gap: 8px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.category-strip::-webkit-scrollbar,
.book-row::-webkit-scrollbar {
  display: none;
}

.category-strip a {
  flex: 0 0 auto;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--navy);
  background: linear-gradient(135deg, #ffffff, #f1eaff);
  font-size: 14px;
  font-weight: 700;
}

.mobile-panel {
  display: none;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.7fr);
  gap: 32px;
  align-items: center;
  max-width: 1180px;
  min-height: 520px;
  margin: 0 auto;
  padding: 72px 20px 56px;
}

.hero::before {
  content: "";
  position: absolute;
  left: max(20px, calc((100vw - 1180px) / 2));
  right: max(20px, calc((100vw - 1180px) / 2));
  top: 118px;
  height: 420px;
  z-index: -1;
  border-radius: 30px;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.72), rgba(234, 220, 255, 0.7)),
    radial-gradient(circle at 18% 22%, rgba(255, 93, 177, 0.18), transparent 170px),
    radial-gradient(circle at 82% 18%, rgba(111, 75, 216, 0.18), transparent 190px);
  box-shadow: 0 24px 70px rgba(19, 40, 75, 0.08);
}

.hero {
  position: relative;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--violet);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 0.98;
  color: var(--navy);
}

.hero-text {
  max-width: 620px;
  margin: 22px 0 0;
  color: #3d4a5f;
  font-size: 20px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 800;
}

.button.primary {
  color: white;
  background: linear-gradient(135deg, var(--violet), var(--navy));
}

.button.secondary {
  border: 1px solid var(--lavender);
  color: var(--navy);
  background: linear-gradient(135deg, var(--gold-soft), var(--pink));
}

.hero-stack {
  position: relative;
  min-height: 390px;
}

.floating-book {
  position: absolute;
  width: 170px;
  height: 250px;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.book-a {
  top: 34px;
  left: 18px;
  transform: rotate(-9deg);
  background:
    linear-gradient(90deg, rgba(255,255,255,0.18) 0 12px, transparent 12px),
    linear-gradient(145deg, #17335d, #4d6e9f);
}

.book-b {
  top: 96px;
  left: 150px;
  transform: rotate(7deg);
  background:
    linear-gradient(90deg, rgba(255,255,255,0.2) 0 12px, transparent 12px),
    linear-gradient(145deg, #ff5db1, #d9ccff);
}

.book-c {
  top: 0;
  right: 24px;
  transform: rotate(13deg);
  background:
    linear-gradient(90deg, rgba(255,255,255,0.2) 0 12px, transparent 12px),
    linear-gradient(145deg, #6f4bd8, #86b7e8);
}

.shelf-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px 20px;
}

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

.section-heading h2 {
  margin: 0;
  color: var(--navy);
  font-size: 28px;
}

.section-heading a {
  color: var(--gold);
  font-weight: 800;
  white-space: nowrap;
}

.book-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 190px;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline proximity;
  padding: 6px 2px 18px;
  -webkit-overflow-scrolling: touch;
}

.book-card {
  scroll-snap-align: start;
  position: relative;
  min-height: 352px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.86), rgba(250,247,255,0.98)),
    var(--surface);
  box-shadow: 0 12px 28px rgba(19, 40, 75, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.cover,
.featured-cover {
  border-radius: 7px;
  background: linear-gradient(145deg, #13284b, #c49a3a);
  position: relative;
  overflow: hidden;
}

.cover::before,
.featured-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.22) 0 16px, transparent 16px 100%),
    radial-gradient(circle at 72% 22%, rgba(255,255,255,0.3), transparent 44px),
    repeating-linear-gradient(0deg, transparent 0 28px, rgba(255,255,255,0.12) 28px 30px);
}

.book-card .cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  margin-bottom: 12px;
}

.badge {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #43225f;
  background: linear-gradient(135deg, var(--gold-soft), #ffe1f2);
  font-size: 12px;
  font-weight: 800;
}

.book-card h3 {
  margin: 0;
  color: var(--navy);
  font-size: 16px;
  line-height: 1.25;
}

.book-card p {
  margin: 6px 0 12px;
  color: var(--muted);
  font-size: 14px;
}

.card-link {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: grid;
  place-items: center;
  min-height: 38px;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--violet), #274e7f);
  font-weight: 800;
}

.featured {
  display: grid;
  grid-template-columns: minmax(220px, 330px) minmax(0, 1fr);
  gap: 34px;
  max-width: 1180px;
  margin: 42px auto 70px;
  padding: 34px 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 12% 22%, rgba(255, 93, 177, 0.15), transparent 180px),
    radial-gradient(circle at 88% 20%, rgba(111, 75, 216, 0.14), transparent 180px);
}

.featured-cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  box-shadow: var(--shadow);
}

.featured-copy h2 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(32px, 5vw, 54px);
}

.meta {
  color: var(--muted);
  font-weight: 700;
}

.recommendation {
  max-width: 720px;
  color: #27364b;
  font-size: 18px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.detail-grid section,
.where-box {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.detail-grid h3,
.where-box h3 {
  margin: 0 0 8px;
  color: var(--navy);
}

.detail-grid p {
  margin: 0;
  color: var(--muted);
}

.partner-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.partner-buttons a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--navy);
  background: linear-gradient(135deg, var(--gold-soft), #d7f0ff);
  font-weight: 800;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 20px 92px;
  color: #3d4a5f;
  border-top: 1px solid var(--line);
}

.site-footer p {
  margin: 6px 0 0;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-weight: 800;
}

.bottom-nav {
  display: none;
}

.cover-1 { background: linear-gradient(145deg, #13284b, #86b7e8); }
.cover-2 { background: linear-gradient(145deg, #7b4b8f, #ffd1dc); }
.cover-3 { background: linear-gradient(145deg, #ff5db1, #d9ccff); }
.cover-4 { background: linear-gradient(145deg, #2e9ca0, #dce6d2); }
.cover-5 { background: linear-gradient(145deg, #12343b, #c8b6ff); }
.cover-6 { background: linear-gradient(145deg, #24587a, #f5b7ff); }
.cover-7 { background: linear-gradient(145deg, #30415d, #9ee7df); }
.cover-8 { background: linear-gradient(145deg, #bd4f6c, #ffd6ba); }
.cover-9 { background: linear-gradient(145deg, #9d4edd, #ffd3ec); }
.cover-10 { background: linear-gradient(145deg, #263c55, #b7d7f2); }
.cover-11 { background: linear-gradient(145deg, #5f8d4e, #dce6d2); }
.cover-12 { background: linear-gradient(145deg, #c44536, #f7b7a3); }
.cover-13 { background: linear-gradient(145deg, #514b82, #d9ccff); }
.cover-14 { background: linear-gradient(145deg, #122033, #c8b6ff); }
.cover-15 { background: linear-gradient(145deg, #128c7e, #b8d2cb); }
.cover-16 { background: linear-gradient(145deg, #3c4a67, #f5b7ff); }
.cover-17 { background: linear-gradient(145deg, #7b4b8f, #ffd3ec); }
.cover-18 { background: linear-gradient(145deg, #101827, #ef476f); }
.cover-19 { background: linear-gradient(145deg, #1f2a44, #c8b6ff); }
.cover-20 { background: linear-gradient(145deg, #2d3436, #74b9ff); }
.cover-21 { background: linear-gradient(145deg, #1a1d29, #a29bfe); }
.cover-22 { background: linear-gradient(145deg, #13284b, #7b4b8f 45%, #ffd3ec); }

@media (hover: hover) {
  .book-card:hover,
  .desktop-icons a:hover,
  .category-strip a:hover,
  .partner-buttons a:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
  }
}

@media (max-width: 820px) {
  .header-shell {
    grid-template-columns: 1fr auto;
  }

  .brand {
    min-width: 0;
  }

  .search-form {
    grid-column: 1 / -1;
    order: 3;
  }

  .desktop-icons {
    display: none;
  }

  .menu-toggle {
    display: grid;
  }

  .mobile-panel.is-open {
    display: grid;
    gap: 8px;
    padding: 4px 20px 14px;
  }

  .mobile-panel a {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    font-weight: 800;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 38px;
  }

  .hero-stack {
    min-height: 260px;
  }

  .floating-book {
    width: 128px;
    height: 188px;
  }

  .book-b {
    left: 112px;
  }

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

  .featured-cover {
    max-width: 250px;
  }

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

  .site-footer {
    display: block;
  }
}

@media (max-width: 640px) {
  body {
    padding-bottom: 70px;
  }

  .header-shell {
    padding-inline: 14px;
  }

  .brand span:last-child {
    font-size: 15px;
  }

  .category-strip {
    padding-inline: 14px;
  }

  .hero,
  .shelf-section,
  .featured,
  .site-footer {
    padding-inline: 14px;
  }

  .hero h1 {
    font-size: 42px;
  }

  .hero-text {
    font-size: 18px;
  }

  .book-row {
    grid-auto-columns: 164px;
  }

  .book-card {
    min-height: 326px;
  }

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

  .bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
  }

  .bottom-nav a {
    display: grid;
    place-items: center;
    gap: 2px;
    min-height: 62px;
    color: var(--navy);
    font-size: 11px;
    font-weight: 800;
  }
}
