/* ===========================================================
   Bentley & Aston — Jacqueline Rose
   Immersive watercolor children's book world
   =========================================================== */

:root {
  /* Palette — eyedropped from Jacqueline's logo + beach hero */
  --paper:        #FBF8EF;
  --paper-2:      #F6EDD8;
  --paper-edge:   #EADFBE;
  --sand:         #F0E0BD;
  --ink:          #2E2620;
  --ink-soft:     #5A4B3F;
  --ink-muted:    #8E8472;

  /* Brand primaries from logo */
  --sky:          #5BB6D9;
  --sky-deep:     #2E8FB8;
  --leaf:         #9BC85E;
  --leaf-deep:    #6FA535;
  --sun:          #F5D24A;
  --sun-deep:     #D9B228;
  --coral:        #F0846A;
  --coral-deep:   #C75B41;
  --seafoam:      #9AD6CE;

  /* Aliases kept so existing class names still work */
  --sage:         var(--leaf);
  --sage-deep:    var(--leaf-deep);
  --periwinkle:   var(--sky);
  --periwinkle-deep: var(--sky-deep);
  --terracotta:   var(--coral);
  --terracotta-deep: var(--coral-deep);
  --gold:         var(--sun);
  --gold-deep:    var(--sun-deep);
  --plum:         #B587C2;

  --shadow-soft:  0 10px 30px -12px rgba(46, 38, 32, 0.22);
  --shadow-mid:   0 18px 40px -16px rgba(46, 38, 32, 0.30);
  --shadow-deep:  0 26px 60px -20px rgba(46, 38, 32, 0.40);

  --font-display: 'Fredoka', 'Nunito', system-ui, sans-serif;
  --font-hand:    'Caveat', 'Schoolbell', cursive;
  --font-body:    'Inclusive Sans', 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --r-1: 8px; --r-2: 14px; --r-3: 22px; --r-4: 32px;
  --r-pill: 999px;

  --section-pad-y: clamp(64px, 9vw, 140px);
  --container: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; border: 0; background: transparent; cursor: pointer; color: inherit; }
button:disabled { cursor: not-allowed; opacity: .6; }
input, textarea, select { font: inherit; color: inherit; }
ul { padding: 0; margin: 0; list-style: none; }

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.18  0 0 0 0 0.15  0 0 0 0 0.12  0 0 0 0.08 0'/></filter><rect width='220' height='220' filter='url(%23n)' opacity='.45'/></svg>"),
    radial-gradient(ellipse at 50% -10%, rgba(217,174,90,.10), transparent 60%),
    radial-gradient(ellipse at 50% 110%, rgba(143,168,137,.10), transparent 60%);
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.005em;
  color: var(--ink);
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.4rem, 5.4vw, 4.4rem); letter-spacing: -0.01em; font-weight: 600; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); font-weight: 600; }
h3 { font-size: clamp(1.25rem, 2vw, 1.6rem); }
h4 { font-size: 1.1rem; }
p  { margin: 0 0 1em; max-width: 64ch; }

.eyebrow {
  font-family: var(--font-hand);
  font-size: clamp(1.15rem, 1.4vw, 1.45rem);
  color: var(--terracotta-deep);
  letter-spacing: .01em;
  display: inline-block;
  transform: rotate(-1.2deg);
  margin-bottom: .35em;
}
.handwritten { font-family: var(--font-hand); }
.muted { color: var(--ink-muted); }

.skip-link {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link:focus {
  position: fixed;
  top: 12px; left: 12px;
  width: auto; height: auto;
  padding: .6rem 1rem;
  margin: 0;
  clip: auto; overflow: visible;
  background: var(--ink); color: var(--paper);
  border-radius: var(--r-1);
  box-shadow: var(--shadow-mid);
  z-index: 999;
}

.container, .section-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
  position: relative;
}
section { padding: var(--section-pad-y) 0; position: relative; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(180deg, rgba(251,246,236,.95), rgba(251,246,236,.82));
  backdrop-filter: saturate(120%) blur(6px);
  -webkit-backdrop-filter: saturate(120%) blur(6px);
  border-bottom: 1px solid rgba(233, 222, 193, .8);
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(18px, 4vw, 40px);
  gap: 20px;
}
.nav-logo { display: flex; align-items: center; gap: 12px; min-width: 0; }
.nav-logo-img {
  height: 100px; width: auto; max-width: 280px; object-fit: contain;
  mix-blend-mode: multiply;
}
.nav-inner { padding-top: 8px; padding-bottom: 8px; }
@media (max-width: 540px) { .nav-logo-img { height: 72px; max-width: 200px; } }
.nav-logo-text {
  font-family: var(--font-display);
  font-size: 1.35rem; font-weight: 500;
  white-space: nowrap;
}
.nav-logo-text em {
  font-family: var(--font-hand);
  font-style: normal;
  color: var(--terracotta-deep);
  font-size: 1.5rem;
  margin: 0 .12em;
}
.nav-links { display: flex; align-items: center; gap: clamp(14px, 2vw, 28px); }
.nav-links a {
  font-size: .98rem;
  color: var(--ink-soft);
  padding: 6px 0;
  position: relative;
  transition: color .2s;
}
.nav-links a:hover { color: var(--terracotta-deep); }
.nav-links a.active::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -2px;
  height: 8px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 8'><path d='M2,5 Q15,1 30,4 T60,5 T78,3' stroke='%23C97B5C' stroke-width='2' fill='none' stroke-linecap='round'/></svg>") center/100% 100% no-repeat;
}
.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 6px; }
.nav-toggle span { width: 26px; height: 2px; background: var(--ink); border-radius: 2px; }

.mobile-menu {
  position: fixed; inset: 0; z-index: 60;
  background: var(--paper);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 24px;
  transform: translateY(-100%);
  transition: transform .35s cubic-bezier(.6,.05,.3,1);
}
.mobile-menu.open { transform: translateY(0); }
.mobile-menu a { font-family: var(--font-display); font-size: 1.6rem; color: var(--ink); }
.mobile-close { position: absolute; top: 18px; right: 20px; font-size: 2rem; line-height: 1; }

/* collapse a little earlier now the nav carries Shop + Awards too */
@media (max-width: 980px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  font-size: .98rem;
  white-space: nowrap;
  transition: transform .2s, box-shadow .2s, background .2s;
  box-shadow: var(--shadow-soft);
}
.btn:hover { transform: translateY(-2px) rotate(-.4deg); box-shadow: var(--shadow-mid); }
.btn:active { transform: translateY(0) rotate(0); }
.btn--terracotta { background: var(--terracotta); }
.btn--terracotta:hover { background: var(--terracotta-deep); }
.btn--sage { background: var(--sage-deep); }
.btn--gold { background: var(--gold-deep); color: #fffaf0; }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
/* on the dark ink band an ink-on-ink ghost button is invisible — go cream */
.section--ink .btn--ghost { color: #FFF7E4; box-shadow: inset 0 0 0 2px rgba(255,247,228,.7); }
.section--ink .btn--ghost:hover { background: #FFF7E4; color: var(--ink); }
.btn--small { padding: 10px 20px; font-size: .9rem; line-height: 1; }

/* Stamp-style circular button (nav Say hello) */
.btn--stamp {
  width: 76px; height: 76px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  text-align: center;
  font-size: .92rem;
  line-height: 1.05;
  white-space: normal;
  font-family: var(--font-display);
  font-weight: 600;
  transform: rotate(-4deg);
  flex-shrink: 0;
}
.btn--stamp:hover { transform: rotate(-2deg) translateY(-2px) scale(1.05); }
.btn--lg { padding: 16px 30px; font-size: 1.05rem; }
.btn .arrow { transition: transform .2s; }
.btn:hover .arrow { transform: translateX(4px); }

/* Dividers — wave + sand for the beach world */
.divider { width: 100%; height: 80px; background-repeat: no-repeat; background-size: 100% 100%; pointer-events: none; }
.divider--scallop,
.divider--wave {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80' preserveAspectRatio='none'><path d='M0,55 C120,15 240,75 360,45 C480,15 600,70 720,40 C840,10 960,75 1080,45 C1200,15 1320,70 1440,40 L1440,80 L0,80 Z' fill='%23F6EDD8'/><path d='M0,65 C120,30 240,80 360,55 C480,30 600,78 720,52 C840,26 960,80 1080,55 C1200,30 1320,78 1440,52 L1440,80 L0,80 Z' fill='%23F6EDD8' opacity='.5'/></svg>");
}
.divider--torn {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80' preserveAspectRatio='none'><path d='M0,45 Q90,15 180,40 T360,45 T540,40 T720,48 T900,40 T1080,50 T1260,42 T1440,46 L1440,80 L0,80 Z' fill='%23F0E0BD'/></svg>");
}

.section--paper-2 { background: var(--paper-2); }
.section--paper-edge { background: var(--paper-edge); }
.section--ink { background: var(--ink); color: #FFF7E4; }
.section--ink h1, .section--ink h2, .section--ink h3 {
  color: #FFF7E4;
  font-weight: 600;
  text-shadow: 0 2px 18px rgba(0,0,0,.35);
}
.section--ink .eyebrow { color: var(--gold); }
.section--ink p { color: rgba(255,247,228,.88); }

/* Watercolor blobs */
.blob { position: absolute; pointer-events: none; filter: blur(40px); opacity: .35; z-index: 0; }
.blob--sage,
.blob--leaf        { background: radial-gradient(closest-side, var(--leaf), transparent 70%); }
.blob--periwinkle,
.blob--sky         { background: radial-gradient(closest-side, var(--sky), transparent 70%); }
.blob--terracotta,
.blob--coral       { background: radial-gradient(closest-side, var(--coral), transparent 70%); }
.blob--gold,
.blob--sun         { background: radial-gradient(closest-side, var(--sun), transparent 70%); }
.blob--seafoam     { background: radial-gradient(closest-side, var(--seafoam), transparent 70%); }

/* Hero */
.hero { position: relative; padding: clamp(60px, 8vw, 120px) 0; overflow: hidden; }
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
  position: relative; z-index: 2;
}
.hero-title { font-family: var(--font-display); font-weight: 400; }
.hero-title em { font-family: var(--font-hand); font-style: normal; color: var(--terracotta-deep); }
.hero-lede { font-size: clamp(1.05rem, 1.4vw, 1.18rem); color: var(--ink-soft); max-width: 50ch; margin: 1.2em 0 2em; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-art { position: relative; aspect-ratio: 3 / 2; display: grid; place-items: center; }
.hero-art-frame {
  position: relative;
  width: 100%; height: 100%;
  border-radius: 22px;
  background: #fff;
  padding: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-deep);
  transform: rotate(-1.5deg);
  border: 1px solid var(--paper-edge);
}
.hero-art-frame::after {
  /* polaroid bottom caption strip */
  content: ""; display: block;
  position: absolute; left: 14px; right: 14px; bottom: 14px;
  height: 18px;
  background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,.05));
  border-radius: 0 0 12px 12px;
  pointer-events: none;
}
.hero-art-frame img { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; }
.hero-art-frame--empty {
  display: grid; place-items: center;
  color: var(--ink-muted);
  font-family: var(--font-hand);
  font-size: 1.4rem; text-align: center; padding: 24px;
}
.hero-art-tape {
  position: absolute; top: -8px; left: 50%;
  width: 110px; height: 28px;
  background: rgba(217,174,90,.55);
  transform: translateX(-50%) rotate(-3deg);
  box-shadow: 0 2px 4px rgba(0,0,0,.08);
}
.hero-particles { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.particle { position: absolute; width: 14px; height: 14px; opacity: .55; will-change: transform; }
.hero .blob-1 { top: -120px; left: -100px; width: 400px; height: 400px; }
.hero .blob-2 { bottom: -160px; right: -80px; width: 480px; height: 480px; }
@media (max-width: 880px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { max-width: 360px; margin: 0 auto; }
}

/* Reveal */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease-out, transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal--delay-1 { transition-delay: .12s; }
.reveal--delay-2 { transition-delay: .24s; }
.reveal--delay-3 { transition-delay: .36s; }

/* Bookshelf */
.bookshelf {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(20px, 3vw, 40px);
  /* stretch, not end: covers line up along the top of the row and the buy
     buttons all sit on the shelf, however long each title runs. */
  align-items: stretch;
  margin-top: 2.5rem;
  padding-bottom: 32px;
}
.bookshelf::after {
  content: ""; position: absolute; left: -2%; right: -2%; bottom: 0;
  height: 18px; background: linear-gradient(180deg, #8B6A4B, #5D4530);
  border-radius: 2px; box-shadow: 0 8px 18px -8px rgba(46,38,32,.6);
}
.book {
  position: relative; text-align: center; transform-origin: bottom center;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), filter .35s;
  display: flex; flex-direction: column;
}
.book .book-title-link { flex: 1; } /* soak up the height difference between titles */
.book:nth-child(3n+1) { transform: rotate(-2deg); }
.book:nth-child(3n+2) { transform: rotate(1.2deg); }
.book:nth-child(3n)   { transform: rotate(-1deg); }
.book:hover { transform: translateY(-14px) rotate(0) scale(1.04); filter: drop-shadow(0 16px 24px rgba(46,38,32,.35)); z-index: 2; }
.book-cover {
  display: block; aspect-ratio: 1 / 1;
  background: var(--paper-2); border-radius: 6px 14px 14px 6px;
  overflow: hidden;
  box-shadow: inset 4px 0 0 rgba(0,0,0,.18), inset 6px 0 8px rgba(0,0,0,.06), var(--shadow-mid);
  position: relative;
}
.book-cover img { width: 100%; height: 100%; object-fit: cover; object-position: top; background: #fff; }
.book-cover--empty { display: grid; place-items: center; padding: 20px; font-family: var(--font-display); color: var(--ink-muted); text-align: center; }
.book-title { margin: 14px 0 4px; font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; }
.book-sub { font-family: var(--font-hand); color: var(--terracotta-deep); font-size: 1.05rem; }
.book-cover-link, .book-title-link { display: block; color: inherit; }
.book-buy-btn { margin-top: 12px; align-self: center; }
.book-buy-btn.is-pending {
  opacity: .55;
  cursor: not-allowed;
  filter: saturate(.6);
  box-shadow: none;
}
.book-buy-btn.is-pending:hover { transform: none; }

/* Series shelf headings — hand-lettered, like a label pinned above the shelf */
.series-head { text-align: center; margin-top: 1.5rem; }
.series-title {
  display: inline-block;
  font-family: var(--font-hand);
  font-size: clamp(1.6rem, 3.2vw, 2.2rem);
  font-weight: 600;
  color: var(--terracotta-deep);
  transform: rotate(-1.2deg);
  margin: 0;
}
.series-title::after {
  content: "";
  display: block;
  height: 8px;
  margin-top: 2px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 8' preserveAspectRatio='none'><path d='M2,5 Q50,1 100,4 T198,3' fill='none' stroke='%23D9B228' stroke-width='3' stroke-linecap='round'/></svg>") no-repeat center / 100% 100%;
}

/* Format / edition ribbon on a book cover (e.g. “Hardback · Special Edition”) */
.book-ribbon {
  position: absolute;
  top: 12px; left: -8px;
  z-index: 2;
  background: linear-gradient(135deg, var(--sun), var(--sun-deep));
  color: var(--ink);
  font-family: var(--font-display);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .02em;
  padding: .3em .8em .3em .9em;
  border-radius: 0 999px 999px 0;
  box-shadow: 0 3px 8px rgba(46,38,32,.25);
  transform: rotate(-2deg);
  max-width: 88%;
}
.book-ribbon::before {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  border: 3px solid transparent;
  border-top-color: var(--sun-deep);
  border-right-color: var(--sun-deep);
  filter: brightness(.7);
}

/* “Tag us on Facebook” note — a pinned paper slip, not a CTA banner */
.fb-tag-note {
  max-width: 480px;
  margin-left: auto; margin-right: auto;
  text-align: center;
  background: var(--paper-2);
  border: 1px solid var(--paper-edge);
  border-radius: var(--r-3);
  padding: 2rem 2.25rem 2.25rem;
  box-shadow: var(--shadow-soft);
  transform: rotate(-.8deg);
  position: relative;
}
.fb-tag-note::before {
  /* washi-tape strip pinning the note to the page */
  content: "";
  position: absolute;
  top: -12px; left: 50%;
  width: 110px; height: 26px;
  transform: translateX(-50%) rotate(2deg);
  background: rgba(245, 210, 74, .45);
  border-left: 1px dashed rgba(46,38,32,.15);
  border-right: 1px dashed rgba(46,38,32,.15);
}
.fb-tag-hand {
  font-family: var(--font-hand);
  font-size: 1.5rem;
  color: var(--terracotta-deep);
  margin: 0;
}

/* Game page banner — Jacqueline's wide illustration above pairs / maze */
.game-banner {
  margin: 0 auto 1.75rem;
  max-width: 920px;
  border-radius: var(--r-3);
  overflow: hidden;
  box-shadow: var(--shadow-mid);
  transform: rotate(-.4deg);
  border: 6px solid var(--paper-2);
}
.game-banner img { display: block; width: 100%; height: auto; }

/* The little shop — market-stall shelf, not an e-commerce grid */
.shop-shelf {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: clamp(28px, 4vw, 48px);
  margin-top: 3rem;
}
.shop-item { text-align: center; position: relative; transition: transform .3s; }
.shop-item:nth-child(3n+1) { transform: rotate(-1.2deg); }
.shop-item:nth-child(3n+2) { transform: rotate(.9deg); }
.shop-item:nth-child(3n)   { transform: rotate(-.5deg); }
.shop-item:hover { transform: translateY(-8px) rotate(0); }
.shop-photo {
  position: relative;
  aspect-ratio: 1;
  background: var(--paper-2);
  border: 8px solid #fff;
  border-bottom-width: 36px; /* polaroid lip */
  border-radius: 4px;
  box-shadow: var(--shadow-mid);
  overflow: visible;
  margin-bottom: 1rem;
}
.shop-photo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.shop-photo--empty { display: grid; place-items: center; font-family: var(--font-hand); color: var(--ink-muted); font-size: 1.3rem; padding: 12px; }
.shop-price-tag {
  position: absolute;
  right: -14px; top: -12px;
  background: var(--sun);
  color: var(--ink);
  font-family: var(--font-hand);
  font-size: 1.25rem;
  font-weight: 700;
  padding: .35em .85em;
  border-radius: 999px 999px 999px 4px;
  box-shadow: 0 4px 10px rgba(46,38,32,.25);
  transform: rotate(6deg);
}
.shop-title { font-family: var(--font-display); font-size: 1.2rem; margin: 0 0 .35rem; }
.shop-desc { font-size: .95rem; color: var(--ink-muted); max-width: 30ch; margin: 0 auto .9rem; }
.shop-soon { font-family: var(--font-hand); font-size: 1.15rem; color: var(--terracotta-deep); }
.shop-photo-link { display: block; text-decoration: none; }
.shop-title a { color: inherit; text-decoration: none; }
.shop-title a:hover { color: var(--terracotta-deep); }
.shop-actions { display: flex; gap: .55rem; justify-content: center; align-items: center; flex-wrap: wrap; }

/* ── Product detail page (paper "exhibit card" — see DESIGN.md §4) ── */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; margin-top: 1rem; }
@media (max-width: 760px) { .product-detail { grid-template-columns: 1fr; } }
.product-gallery__main {
  position: relative; aspect-ratio: 1; background: var(--paper-2);
  border: 10px solid #fff; border-bottom-width: 40px; border-radius: 5px;
  box-shadow: var(--shadow-deep); transform: rotate(-1deg);
}
.product-gallery__main img { width: 100%; height: 100%; object-fit: contain; display: block; }
.product-gallery__main--empty { display: grid; place-items: center; font-family: var(--font-hand); color: var(--ink-muted); font-size: 1.4rem; padding: 16px; }
.product-gallery__thumbs { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.5rem; }
.product-thumb {
  width: 76px; height: 76px; padding: 4px; background: #fff; border: 1px solid var(--paper-edge);
  border-radius: 6px; box-shadow: var(--shadow-soft); cursor: pointer; overflow: hidden;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.product-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 3px; display: block; }
.product-thumb:hover { transform: translateY(-3px); }
.product-thumb.is-active { border-color: var(--terracotta); box-shadow: 0 0 0 2px var(--terracotta); }
.product-info { padding-top: .5rem; }
.product-info h1 { font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 .4rem; }
.product-price { font-family: var(--font-hand); font-size: 1.8rem; color: var(--terracotta-deep); margin: 0 0 1.2rem; }
.product-desc { font-size: 1.05rem; line-height: 1.7; color: var(--ink-soft); white-space: pre-line; margin-bottom: 1.6rem; max-width: 48ch; }

/* Customer account — paper forms in the house language */
.account-card {
  background: var(--paper-2);
  border: 1px solid var(--paper-edge);
  border-radius: var(--r-3);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow-soft);
  margin-top: 2rem;
  text-align: left;
}
.account-h { font-size: 1.25rem; margin: 0 0 1rem; }
.account-card label { display: block; margin-bottom: .9rem; font-family: var(--font-display); font-weight: 500; font-size: .95rem; }
.account-card input {
  display: block; width: 100%; margin-top: .35rem;
  padding: .65rem .8rem;
  border: 1px solid var(--paper-edge); border-radius: 10px;
  background: #fff; font-family: var(--font-body, inherit); font-size: 1rem;
}
.account-card input:focus { outline: 2px solid var(--terracotta); outline-offset: 1px; }
.account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 480px) { .account-grid { grid-template-columns: 1fr; } }
.account-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start; }
@media (max-width: 760px) { .account-cols { grid-template-columns: 1fr; } }
.form-error { background: rgba(196,99,69,.12); border: 1px solid rgba(196,99,69,.4); color: var(--terracotta-deep); border-radius: 10px; padding: .65rem .9rem; }
.account-order { border-bottom: 1px dashed var(--paper-edge); padding: .35rem 0; }
.account-order summary { display: flex; justify-content: space-between; gap: 1rem; cursor: pointer; padding: .5rem 0; flex-wrap: wrap; }
.account-order ul { margin: .25rem 0 .5rem 1.2rem; }
.order-status { font-size: .75rem; text-transform: uppercase; letter-spacing: .07em; padding: .25em .7em; border-radius: 999px; background: var(--paper-edge); align-self: center; }
.order-status--new { background: rgba(245,210,74,.45); }
.order-status--shipped { background: rgba(127,168,79,.35); }
.saved-card { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .5rem 0; border-bottom: 1px dashed var(--paper-edge); }
.saved-card:last-of-type { border-bottom: 0; }

/* Basket — simple paper receipt */
.basket { background: var(--paper-2); border: 1px solid var(--paper-edge); border-radius: var(--r-3); padding: 1.5rem 1.75rem; box-shadow: var(--shadow-soft); margin-top: 2rem; }
.basket-row { display: grid; grid-template-columns: 64px 1fr auto auto; gap: 14px; align-items: center; padding: .9rem 0; border-bottom: 1px dashed var(--paper-edge); }
.basket-thumb { width: 64px; height: 64px; border-radius: 10px; overflow: hidden; background: var(--paper); }
.basket-thumb img { width: 100%; height: 100%; object-fit: cover; }
.basket-info { display: flex; flex-direction: column; gap: 2px; text-align: left; }
.basket-qty { display: flex; gap: 6px; align-items: center; }
.basket-qty input[type=number] { width: 60px; padding: .4rem .5rem; border: 1px solid var(--paper-edge); border-radius: 8px; font-family: inherit; background: #fff; }
.basket-line { font-family: var(--font-display); font-weight: 600; min-width: 70px; text-align: right; }
.basket-totals { margin-top: 1rem; display: flex; flex-direction: column; gap: .35rem; align-items: flex-end; }
.basket-totals > div { display: flex; gap: 2rem; }
.basket-totals span { color: var(--ink-muted); }
.basket-grand { font-size: 1.2rem; font-family: var(--font-display); }
@media (max-width: 560px) {
  .basket-row { grid-template-columns: 48px 1fr; }
  .basket-qty, .basket-line { grid-column: 2; justify-self: end; }
}

/* Facebook posts — embedded post cards, 2–3 per row on desktop.
   Fallback (no curated posts): the timeline widget scaled to ~2/3 page width. */
.fb-feed { text-align: center; }
.fb-feed-box {
  max-width: min(100%, 780px);
  margin: 2rem auto 0;
  background: var(--paper-2);
  border: 1px solid var(--paper-edge);
  border-radius: var(--r-3);
  padding: 2rem;
  box-shadow: var(--shadow-soft);
}
.fb-embed-fit {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  height: 720px; /* default before JS rescales */
}
.fb-embed-fit iframe {
  position: absolute;
  top: 0; left: 0;
  transform-origin: top left;
}
.fb-post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 380px));
  justify-content: center;
  gap: 24px;
  margin-top: 2.5rem;
}
.fb-post-card {
  background: var(--paper-2);
  border: 1px solid var(--paper-edge);
  border-radius: var(--r-3);
  padding: 14px;
  box-shadow: var(--shadow-soft);
  display: flex;
  justify-content: center;
  overflow: hidden;
}
.fb-post-card:nth-child(3n+1) { transform: rotate(-.7deg); }
.fb-post-card:nth-child(3n+2) { transform: rotate(.5deg); }
.fb-post-card:nth-child(3n)   { transform: rotate(-.3deg); }

/* Live Graph-API feed — native storybook post cards (no Facebook chrome) */
.fb-live-card {
  background: var(--paper-2);
  border: 1px solid var(--paper-edge);
  border-radius: var(--r-3);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  text-align: left;
  display: flex;
  flex-direction: column;
}
.fb-live-card:nth-child(3n+1) { transform: rotate(-.7deg); }
.fb-live-card:nth-child(3n+2) { transform: rotate(.5deg); }
.fb-live-card:nth-child(3n)   { transform: rotate(-.3deg); }
.fb-live-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.fb-live-card p { padding: 1rem 1.25rem 0; margin: 0; flex: 1; font-size: .98rem; }
.fb-live-card footer {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: .9rem 1.25rem 1.1rem; font-size: .85rem;
}
.fb-live-card footer a { font-weight: 600; color: var(--terracotta-deep); }

/* Reader-review slips — handwritten notes pinned at slight angles, not a testimonial carousel */
.review-wall {
  columns: 3 280px;
  column-gap: 28px;
  margin-top: 2.5rem;
}
.review-slip {
  break-inside: avoid;
  margin: 0 0 28px;
  background: var(--paper-2);
  border: 1px solid var(--paper-edge);
  border-radius: 4px 18px 6px 16px / 14px 5px 17px 6px; /* wobbly hand-cut edge */
  padding: 1.5rem 1.6rem;
  box-shadow: var(--shadow-soft);
}
.review-slip:nth-child(3n+1) { transform: rotate(-1.1deg); }
.review-slip:nth-child(3n+2) { transform: rotate(.8deg); }
.review-slip:nth-child(3n)   { transform: rotate(-.4deg); }
.review-stars { color: var(--sun-deep); letter-spacing: .15em; font-size: 1.05rem; margin-bottom: .5rem; }
.review-slip blockquote {
  margin: 0;
  font-family: var(--font-hand);
  font-size: 1.3rem;
  line-height: 1.45;
  color: var(--ink);
}
.review-slip figcaption { margin-top: .8rem; display: flex; flex-wrap: wrap; gap: .35rem .75rem; align-items: baseline; }
.review-name { font-family: var(--font-display); font-weight: 600; font-size: .95rem; }
.review-source { font-size: .8rem; color: var(--ink-muted); text-transform: uppercase; letter-spacing: .08em; }

/* Soft storybook backdrop behind the maze (art from the books, faded right back) */
.maze-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: .14;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 12%, #000 82%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 12%, #000 82%, transparent);
}

/* Characters */
.characters { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 32px; margin-top: 2.5rem; }
.character { text-align: center; position: relative; }
.character-portrait {
  position: relative;
  width: clamp(180px, 22vw, 240px); aspect-ratio: 1 / 1;
  margin: 0 auto 18px;
  background: var(--paper-2);
  border-radius: 50% 48% 52% 50% / 52% 50% 50% 48%;
  overflow: hidden; box-shadow: var(--shadow-mid);
  transition: transform .4s, border-radius .8s;
}
.character:nth-child(2n) .character-portrait { transform: rotate(2deg); }
.character:nth-child(2n+1) .character-portrait { transform: rotate(-1.5deg); }
.character:hover .character-portrait { transform: rotate(0) scale(1.04); border-radius: 48% 52% 48% 52% / 50% 48% 52% 50%; }
.character-portrait img { width: 100%; height: 100%; object-fit: cover; }
.character-portrait--empty { display: grid; place-items: center; font-family: var(--font-hand); color: var(--ink-muted); font-size: 1.4rem; }
.character-name { font-family: var(--font-display); font-size: 1.5rem; margin: 8px 0 4px; }
.character-tagline { font-family: var(--font-hand); color: var(--terracotta-deep); font-size: 1.1rem; }

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 28px; margin-top: 2rem; }
.card { background: var(--paper); border-radius: var(--r-3); padding: 24px; box-shadow: var(--shadow-soft); transition: transform .3s, box-shadow .3s; border: 1px solid rgba(233, 222, 193, .9); }
.card:hover { transform: translateY(-4px) rotate(-.25deg); box-shadow: var(--shadow-mid); }
.card-image { margin: -24px -24px 18px; aspect-ratio: 16 / 10; background: var(--paper-2); border-radius: var(--r-3) var(--r-3) 0 0; overflow: hidden; }
.card-image img { width: 100%; height: 100%; object-fit: cover; }
.card-meta { font-family: var(--font-hand); color: var(--terracotta-deep); font-size: 1.05rem; margin-bottom: 4px; }
.card-title { font-family: var(--font-display); font-size: 1.25rem; margin: 0 0 .5em; }

/* centred variant — stops a lone card stretching the full row width */
.card-grid--centered {
  grid-template-columns: repeat(auto-fit, minmax(260px, 400px));
  justify-content: center;
}

.award-card {
  background: linear-gradient(135deg, rgba(245,210,74,.20), rgba(245,210,74,.05) 60%), var(--paper);
  border-color: rgba(217,178,40,.45); position: relative; overflow: hidden;
  text-align: center;
}
/* cards keep their light paper bg even inside .section--ink — re-assert dark text
   so the cream `.section--ink p` colour doesn't make the copy unreadable */
.section--ink .card p, .award-card p { color: var(--ink-soft); }
.section--ink .card h3 { color: var(--ink); text-shadow: none; }
.section--ink .award-card .card-title { color: var(--gold-deep); }
.award-card p { max-width: 44ch; margin-left: auto; margin-right: auto; }
.award-card .card-image {
  /* override: small centered badge, not a banner */
  margin: 8px auto 14px;
  width: 140px; height: 140px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: transparent;
  display: grid; place-items: center;
  overflow: visible;
}
.award-card .card-image img {
  width: 100%; height: 100%;
  object-fit: contain;
  border-radius: 50%;
  filter: drop-shadow(0 8px 20px rgba(217,178,40,.45));
}
.award-card::before {
  content: ""; position: absolute; top: -30%; left: -40%;
  width: 200%; height: 60%;
  background: linear-gradient(115deg, transparent 35%, rgba(255,235,180,.5) 50%, transparent 65%);
  transform: translateX(-100%); transition: transform 1.1s cubic-bezier(.4,.7,.3,1); pointer-events: none;
}
.award-card:hover::before { transform: translateX(100%); }
.award-card .card-title { color: var(--gold-deep); }

/* Book detail */
.book-detail { display: grid; grid-template-columns: 360px 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.book-detail-cover { position: relative; aspect-ratio: 1 / 1; background: var(--paper-2); border-radius: 8px 18px 18px 8px; overflow: hidden; box-shadow: var(--shadow-deep); transform: rotate(-1.5deg); }
.book-detail { grid-template-columns: 380px 1fr; }
.book-detail-cover img { width: 100%; height: 100%; object-fit: cover; object-position: top; background: #fff; }
.book-detail-content h1 { margin-top: 0; }
.book-detail-blurb { font-family: var(--font-display); font-size: 1.35rem; font-style: italic; color: var(--ink-soft); margin: 0 0 1.4em; padding-left: 18px; border-left: 3px solid var(--terracotta); }
.book-buy { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 2rem; }
@media (max-width: 740px) { .book-detail { grid-template-columns: 1fr; } .book-detail-cover { max-width: 280px; margin: 0 auto; } }

body.reading-mode { background: #F2E9D2; }
body.reading-mode .book-detail-content { background: #F8EFD8; padding: 32px; border-radius: var(--r-3); box-shadow: var(--shadow-soft); font-size: 1.15rem; line-height: 1.85; font-family: var(--font-display); }
.reading-toggle { position: fixed; right: 18px; bottom: 100px; z-index: 30; width: 48px; height: 48px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; box-shadow: var(--shadow-mid); transition: transform .2s; }
.reading-toggle:hover { transform: scale(1.08); }

/* Audio */
.story-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 28px; margin-top: 2.5rem; }
.story { background: var(--paper); padding: 24px; border-radius: var(--r-3); box-shadow: var(--shadow-soft); border: 1px solid rgba(233, 222, 193, .9); display: flex; flex-direction: column; gap: 14px; }
.story-cover {
  aspect-ratio: 1 / 1; background: var(--paper-2);
  border-radius: 50%; overflow: hidden;
  width: 120px; height: 120px; margin: 0 auto; position: relative;
  box-shadow: inset 0 0 0 6px var(--paper), inset 0 0 0 8px var(--ink-soft), var(--shadow-soft);
  animation: spin 40s linear infinite; animation-play-state: paused;
}
.story.is-playing .story-cover { animation-play-state: running; }
.story-cover img { width: 100%; height: 100%; object-fit: cover; }
.story-cover::after { content: ""; position: absolute; top: 50%; left: 50%; width: 18px; height: 18px; background: var(--ink); border-radius: 50%; transform: translate(-50%, -50%); box-shadow: inset 0 0 0 4px var(--paper); }
@keyframes spin { to { transform: rotate(360deg); } }
.story h3 { text-align: center; margin: 0; }
.story audio { width: 100%; }

/* Downloads */
.downloads { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; margin-top: 2.5rem; }
.download { position: relative; text-align: center; cursor: pointer; transition: transform .35s; }
.download:hover { transform: translateY(-10px) rotate(-1.5deg); }
.download-paper {
  aspect-ratio: 3 / 4; background: #fff; border-radius: 4px;
  box-shadow: 0 1px 0 #e6dcc4, 0 3px 0 #fff, 0 4px 0 #ddd1b3, 0 6px 0 #fff, 0 7px 0 #d4c79f, var(--shadow-mid);
  overflow: hidden; position: relative;
}
.download-paper img { width: 100%; height: 100%; object-fit: contain; padding: 8%; }
.download h3 { font-family: var(--font-display); font-size: 1.15rem; margin: 18px 0 .25em; }
.download p { color: var(--ink-muted); font-size: .95rem; }

/* Forms */
.form { background: var(--paper); padding: clamp(24px, 4vw, 40px); border-radius: var(--r-3); box-shadow: var(--shadow-mid); border: 1px solid var(--paper-edge); max-width: 640px; }
.form-row { display: grid; gap: 6px; margin-bottom: 18px; }
.form-row label { font-family: var(--font-hand); color: var(--ink-soft); font-size: 1.1rem; }
.form input, .form textarea {
  width: 100%; padding: 12px 14px; border-radius: var(--r-2);
  border: 1.5px solid var(--paper-edge); background: rgba(255,255,255,.55);
  transition: border-color .2s, background .2s;
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--terracotta); background: #fff; }
.form textarea { min-height: 160px; resize: vertical; }

.flash-wrap { max-width: var(--container); margin: 16px auto 0; padding: 0 clamp(20px, 4vw, 40px); }
.flash { padding: 12px 18px; border-radius: var(--r-2); margin-bottom: 10px; font-weight: 500; }
.flash-success { background: rgba(143,168,137,.25); color: var(--sage-deep); }
.flash-error   { background: rgba(201,123,92,.20); color: var(--terracotta-deep); }

/* Footer */
.footer { background: var(--ink); color: rgba(251,246,236,.85); padding: clamp(48px, 7vw, 80px) 0 32px; margin-top: clamp(48px, 7vw, 80px); position: relative; }
.footer::before {
  content: ""; position: absolute; top: -1px; left: 0; right: 0;
  height: 30px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 30' preserveAspectRatio='none'><path d='M0,30 C120,5 240,28 360,15 C480,5 600,28 720,15 C840,5 960,28 1080,15 C1200,5 1320,28 1440,15 L1440,0 L0,0 Z' fill='%23FBF6EC'/></svg>") center/100% 100% no-repeat;
  transform: translateY(-29px);
}
.footer-inner { max-width: var(--container); margin: 0 auto; padding: 0 clamp(20px, 4vw, 40px); display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.footer h4 { color: var(--paper); margin-bottom: 14px; font-size: 1rem; letter-spacing: .03em; }
.footer-col a { display: block; padding: 4px 0; opacity: .85; transition: opacity .2s; }
.footer-col a:hover { opacity: 1; color: var(--gold); }
.footer-tag { font-family: var(--font-hand); font-size: 1.2rem; color: rgba(251,246,236,.75); }
.footer-bottom { margin-top: 40px; padding-top: 24px; border-top: 1px solid rgba(251,246,236,.12); text-align: center; font-size: .85rem; color: rgba(251,246,236,.55); }
.footer-bottom a { color: rgba(251,246,236,.7); padding: 0 6px; }
.footer-socials { margin-top: 14px; }
.footer-socials a { display: inline-flex; padding: 8px; margin-right: 6px; opacity: .75; }
.footer-socials a:hover { opacity: 1; color: var(--gold); }
@media (max-width: 740px) { .footer-inner { grid-template-columns: 1fr 1fr; } }

/* Cookie banner */
.cookie-banner { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 80; background: var(--ink); color: var(--paper); padding: 16px 20px; border-radius: var(--r-2); box-shadow: var(--shadow-deep); display: flex; justify-content: space-between; align-items: center; gap: 16px; max-width: 720px; margin: 0 auto; font-size: .95rem; }
.cookie-banner[hidden] { display: none; }
.cookie-banner a { color: var(--gold); text-decoration: underline; }
.cookie-banner-actions { display: flex; gap: 8px; }
.cookie-banner .btn { padding: 8px 16px; font-size: .9rem; }
@media (max-width: 540px) { .cookie-banner { flex-direction: column; align-items: stretch; } }

/* Cursor trail */
.cursor-trail { position: fixed; pointer-events: none; z-index: 999; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); opacity: 0; mix-blend-mode: multiply; transition: opacity .4s; }

/* 404 */
.error-page { text-align: center; padding: clamp(80px, 12vw, 160px) 0; }
.error-page h1 { font-size: clamp(4rem, 10vw, 8rem); margin-bottom: .2em; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .cursor-trail, .particle { display: none !important; }
}

.text-center { text-align: center; }
.section-head { max-width: 720px; margin: 0 auto; text-align: center; position: relative; z-index: 2; }
.section-head + * { margin-top: 2.5rem; }

/* ── Childlike layer (whimsy + interactivity) ───────────────── */

/* Bigger, bouncier eyebrows */
.eyebrow { font-size: clamp(1.3rem, 1.6vw, 1.7rem); transform: rotate(-2deg); display: inline-block; }
.eyebrow::before { content: "✨ "; color: var(--gold); }
.eyebrow::after  { content: " ✨"; color: var(--gold); }

/* Magic word — hand-drawn squiggle underline + bob */
.magic { position: relative; display: inline-block; color: var(--terracotta-deep); }
.magic::after {
  content: ""; position: absolute; left: -6%; right: -6%; bottom: -.18em;
  height: 14px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 14' preserveAspectRatio='none'><path d='M2,8 Q25,2 50,8 T100,8 T150,8 T198,8' stroke='%23D9AE5A' stroke-width='3' fill='none' stroke-linecap='round'/></svg>") center/100% 100% no-repeat;
}

/* Doodle decorations scattered on the page */
.doodle-layer { position: absolute; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; }
.doodle { position: absolute; opacity: .8; will-change: transform; }
.doodle--bob { animation: bob 5s ease-in-out infinite; }
.doodle--spin { animation: slowspin 30s linear infinite; }
.doodle--twinkle { animation: twinkle 2.4s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-12px) rotate(4deg); } }
@keyframes slowspin { to { transform: rotate(360deg); } }
@keyframes twinkle { 0%, 100% { opacity: .35; transform: scale(.9); } 50% { opacity: 1; transform: scale(1.15); } }

/* Idle bob on featured book + characters */
.book-detail-cover { animation: bookbob 6s ease-in-out infinite; }
@keyframes bookbob {
  0%, 100% { transform: rotate(-1.5deg) translateY(0); }
  50%      { transform: rotate(-2.2deg) translateY(-6px); }
}
.character-portrait { animation: portraitbob 5s ease-in-out infinite; }
.character:nth-child(2n) .character-portrait { animation-delay: -2.5s; }
@keyframes portraitbob {
  0%, 100% { transform: rotate(var(--rot, -1.5deg)) translateY(0); }
  50%      { transform: rotate(calc(var(--rot, -1.5deg) + 1.5deg)) translateY(-6px); }
}

/* Friendlier buttons — playful hover */
.btn--terracotta { background: linear-gradient(180deg, #D58A6B, #B66148); }
.btn--terracotta:hover { background: linear-gradient(180deg, #D58A6B, #9D5840); transform: translateY(-3px) rotate(-1deg) scale(1.02); }
.btn--lg { font-size: 1.1rem; padding: 18px 32px; }

/* Wavy underline on nav-link hover */
.nav-links a:not(.btn):hover::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 8px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 8'><path d='M2,5 Q15,1 30,4 T60,5 T78,3' stroke='%23D9AE5A' stroke-width='2' fill='none' stroke-linecap='round'/></svg>") center/100% 100% no-repeat;
}

/* Character speech bubbles */
.character { position: relative; }
.speech {
  position: absolute; top: -8px; right: 8%;
  background: var(--paper); color: var(--ink);
  padding: 8px 14px; border-radius: 18px;
  font-family: var(--font-hand); font-size: 1.05rem;
  box-shadow: var(--shadow-soft);
  border: 1.5px solid var(--paper-edge);
  transform: rotate(3deg);
  opacity: 0; transition: opacity .3s, transform .3s;
  pointer-events: none;
  z-index: 3;
  white-space: nowrap;
}
.speech::after {
  content: ""; position: absolute; left: 20%; bottom: -10px;
  width: 16px; height: 16px;
  background: var(--paper);
  border-right: 1.5px solid var(--paper-edge);
  border-bottom: 1.5px solid var(--paper-edge);
  transform: rotate(45deg);
}
.character:hover .speech,
.character.speech-show .speech { opacity: 1; transform: rotate(-2deg) translateY(-4px); }
.character:nth-child(2n) .speech { left: 8%; right: auto; transform: rotate(-3deg); }
.character:nth-child(2n) .speech::after { left: auto; right: 20%; }
.character:nth-child(2n):hover .speech,
.character:nth-child(2n).speech-show .speech { transform: rotate(2deg) translateY(-4px); }

/* Touch tap feedback */
.book.is-tapped { transform: translateY(-14px) rotate(0) scale(1.05); filter: drop-shadow(0 16px 24px rgba(46,38,32,.35)); }
.character.is-tapped .character-portrait { transform: rotate(0) scale(1.06); }
.btn:active { transform: scale(.96) !important; }

/* Tap-burst piece reuses .confetti-piece styling */

/* Bigger, more playful hero title */
.hero-title { font-size: clamp(2.5rem, 5.8vw, 4.8rem); line-height: 1.05; }
.hero-title em { font-size: 1.15em; }

/* Confetti container (JS appends bursts) */
.confetti-piece {
  position: fixed; pointer-events: none; z-index: 1000;
  width: 14px; height: 14px;
  will-change: transform, opacity;
}

/* Cursor sparkle — bigger, an actual sparkle */
.cursor-trail {
  width: 16px !important; height: 16px !important;
  background: none !important;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23D9AE5A'><path d='M12 2l1.8 6.5L20 10l-6.2 1.5L12 18l-1.8-6.5L4 10l6.2-1.5z'/></svg>") !important;
  background-size: contain !important;
  background-repeat: no-repeat !important;
  mix-blend-mode: normal !important;
}

/* Nav button extra cheer */
.nav-links a.btn:hover { transform: translateY(-2px) rotate(-2deg) scale(1.04); }

/* "Hi friend!" greeting */
.greeting {
  display: inline-block;
  font-family: var(--font-hand);
  color: var(--sage-deep);
  font-size: 1.4rem;
  transform: rotate(-3deg);
  margin-bottom: .3em;
}
.greeting::before { content: "👋 "; }

@media (prefers-reduced-motion: reduce) {
  .doodle--bob, .doodle--spin, .doodle--twinkle,
  .book-detail-cover, .character-portrait { animation: none !important; }
}
