:root {
  --cream: #fbf6ea;
  --paper: #fffdf7;
  --navy: #1f2a5c;
  --ink: #2b3150;
  --muted: #5d6380;
  --orange: #ef5f2a;
  --sun: #ffd23f;
  --leaf: #5f9b5c;
  --honey: #d9a14a;
  --sky: #5bbef5;
  --line: #eadfc6;
  --radius: 22px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 17px/1.65 "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); }
h1, h2, h3 { font-family: "Fredoka", "Nunito", sans-serif; color: var(--navy); line-height: 1.15; margin: 0; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* Header */
header.site { padding: 18px 0; }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 56px; height: 56px; border-radius: 50%; }
.brand span { font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 22px; color: var(--navy); }
nav a { margin-left: 22px; font-weight: 700; text-decoration: none; color: var(--muted); }
nav a:hover { color: var(--navy); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: var(--orange); color: #fff; font-weight: 800; font-size: 17px; padding: 14px 26px; border-radius: 999px; text-decoration: none; box-shadow: 0 6px 0 #c94b1e; transition: transform .12s ease, box-shadow .12s ease; }
.btn:hover { transform: translateY(2px); box-shadow: 0 4px 0 #c94b1e; }
.btn.small { font-size: 15px; padding: 10px 18px; box-shadow: 0 4px 0 #c94b1e; }
.btn.ghost { background: transparent; color: var(--navy); box-shadow: none; border: 2px solid var(--navy); }
.btn.ghost:hover { transform: none; background: var(--paper); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Hero */
.hero { padding: 36px 0 56px; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-block; background: var(--sun); color: var(--navy); font-weight: 800; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; padding: 6px 14px; border-radius: 999px; }
.hero h1 { font-size: clamp(36px, 5.2vw, 58px); font-weight: 700; margin: 18px 0 16px; }
.hero h1 em { font-style: normal; color: var(--orange); }
.hero p.lead { font-size: 19px; color: var(--muted); max-width: 34em; margin: 0 0 28px; }
.cover-stage { position: relative; display: flex; justify-content: center; }
.cover-stage::before { content: ""; position: absolute; inset: 8% 4% -4% 10%; background: var(--sky); border-radius: 40% 46% 38% 50%; opacity: .28; }
.cover-stage img { position: relative; width: min(360px, 82vw); border-radius: 10px 16px 16px 10px; box-shadow: -10px 14px 0 rgba(31,42,92,.12), 0 22px 40px rgba(31,42,92,.22); transform: rotate(-2deg); }

/* Sections */
section { padding: 64px 0; }
.section-head { text-align: center; max-width: 660px; margin: 0 auto 36px; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 700; margin-bottom: 10px; }
.section-head p { color: var(--muted); margin: 0; }
.card { background: var(--paper); border: 2px solid var(--line); border-radius: var(--radius); }

/* Book grid (home) */
.books { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.book-card { display: flex; flex-direction: column; padding: 22px; }
.book-card .cover-link { display: block; margin: 0 auto 18px; width: 78%; }
.book-card img { border-radius: 8px; box-shadow: 0 12px 26px rgba(31,42,92,.18); }
.book-card h3 { font-size: 22px; margin: 6px 0 4px; }
.book-card h3 a { text-decoration: none; }
.book-card h3 a:hover { text-decoration: underline; }
.book-card p { margin: 0 0 16px; color: var(--muted); font-size: 15px; flex: 1; }
.book-card .btn-row { margin-top: auto; }
.series-tag { font-weight: 800; color: var(--leaf); text-transform: uppercase; letter-spacing: .05em; font-size: 13px; }
.series-tag.glimmer { color: var(--honey); }
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; padding: 0; list-style: none; }
.facts li { background: var(--cream); border: 1.5px solid var(--line); border-radius: 999px; padding: 3px 12px; font-weight: 700; font-size: 13px; color: var(--navy); }

/* Series */
.series { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.series .card { padding: 30px; }
.series h3 { font-size: 26px; margin: 4px 0 10px; }
.series p { margin: 0 0 12px; }
.friends { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.friends li { background: var(--cream); border-radius: 14px; padding: 10px 14px; font-size: 15px; }
.friends b { color: var(--navy); display: block; }

/* Book detail page */
.detail .wrap > .card { display: grid; grid-template-columns: 320px 1fr; gap: 40px; padding: 36px; align-items: start; }
.detail img.cover { border-radius: 8px; box-shadow: 0 14px 30px rgba(31,42,92,.2); }
.detail h1 { font-size: clamp(30px, 4vw, 42px); margin: 6px 0 6px; }
.detail .subtitle { color: var(--muted); font-weight: 600; margin: 0 0 18px; font-size: 18px; }
.detail ul.inside { margin: 0 0 24px; padding-left: 0; list-style: none; }
.detail ul.inside li { position: relative; padding-left: 30px; margin: 8px 0; }
.detail ul.inside li::before { content: "★"; position: absolute; left: 4px; top: 0; color: var(--orange); }
.crumbs { font-size: 14px; color: var(--muted); padding-top: 4px; }
.crumbs a { color: var(--muted); }
dl.details { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 24px 0 0; font-size: 15px; }
dl.details dt { font-weight: 800; color: var(--navy); }
dl.details dd { margin: 0; color: var(--muted); }

/* Tiles */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.tile { overflow: hidden; }
.tile img { width: 100%; aspect-ratio: 1; object-fit: cover; border-bottom: 2px solid var(--line); }
.tile div { padding: 16px 18px 20px; }
.tile h3 { font-size: 19px; margin-bottom: 6px; }
.tile p { margin: 0; font-size: 15px; color: var(--muted); }
.note { text-align: center; font-size: 14px; color: var(--muted); margin-top: 22px; }

/* Stories list */
.stories { background: var(--navy); color: #e9ecff; }
.stories .section-head h2 { color: #fff; }
.stories .section-head p { color: #c3c9ef; }
.story-list { columns: 3; column-gap: 32px; margin: 0; padding: 0; list-style: none; counter-reset: s; }
.story-list li { break-inside: avoid; padding: 9px 0 9px 44px; position: relative; border-bottom: 1px dashed rgba(255,255,255,.18); font-weight: 600; }
.story-list li::before { counter-increment: s; content: counter(s); position: absolute; left: 0; top: 8px; width: 30px; height: 30px; border-radius: 50%; background: var(--sun); color: var(--navy); font: 700 14px/30px "Fredoka", sans-serif; text-align: center; }

/* Review */
.review { text-align: center; }
.review blockquote { margin: 0 auto; max-width: 720px; padding: 40px 32px; }
.stars { color: #f2b705; font-size: 26px; letter-spacing: 4px; }
.review blockquote p { font-family: "Fredoka", sans-serif; font-size: clamp(26px, 3.4vw, 36px); color: var(--navy); margin: 12px 0; }
.review cite { font-style: normal; color: var(--muted); font-weight: 700; }

/* About */
.about .card { display: grid; grid-template-columns: 180px 1fr; gap: 32px; padding: 36px; align-items: center; }
.about img { width: 180px; height: 180px; border-radius: 50%; border: 6px solid var(--cream); }
.about h2 { font-size: 32px; margin-bottom: 10px; }
.about p { margin: 0 0 12px; }

footer { padding: 36px 0 48px; color: var(--muted); font-size: 14px; text-align: center; }
footer a { color: var(--muted); }
footer nav { margin-bottom: 8px; }
footer nav a { margin: 0 10px; font-weight: 700; }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: center; gap: 36px; }
  .hero p.lead { margin-left: auto; margin-right: auto; }
  .hero .btn-row { justify-content: center; }
  .books { grid-template-columns: 1fr 1fr; }
  .series { grid-template-columns: 1fr; }
  .detail .wrap > .card { grid-template-columns: 1fr; padding: 24px; }
  .detail img.cover { max-width: 280px; margin: 0 auto; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .story-list { columns: 2; }
  .about .card { grid-template-columns: 1fr; text-align: center; padding: 28px 22px; }
  .about img { margin: 0 auto; }
  header.site nav { display: none; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  section { padding: 48px 0; }
  .books, .tiles { grid-template-columns: 1fr; }
  .friends { grid-template-columns: 1fr; }
  .story-list { columns: 1; }
  .btn { width: 100%; }
}
