/* =========================================================
   Ansel the Explorer — site styles
   Palette pulled from the books: jungle green, sunlit
   parchment, carved wood, and one bright accent per book.
   ========================================================= */
:root {
  --jungle: #0e3a22;
  --canopy: #1d5530;
  --moss: #4c8a3a;
  --parchment: #f5d98f;
  --paper: #fcefc9;
  --bark: #4a2a12;
  --bark-dark: #2e190a;
  --ink: #2b1a0b;
  --sun: #f7a823;

  --bugs: #e4531b;
  --bugs-2: #ffcf3f;
  --animals: #e59a12;
  --animals-2: #ffe07a;
  --amphibians: #1596ad;
  --amphibians-2: #b8e03a;
  --fishes: #0d63c4;
  --fishes-2: #ffe14a;
  --birds: #c2410c;
  --birds-2: #ffb938;

  --display: "Lilita One", "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
  --body: "Andika", "Verdana", "Segoe UI", system-ui, sans-serif;

  --wrap: 1180px;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--jungle);
}
html { scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 80px); scroll-behavior: smooth; }
*, *::before, *::after { box-sizing: inherit; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--parchment);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.1; margin: 0; letter-spacing: .01em; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 4px solid var(--sun); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--sun); color: var(--ink); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 12px; }

/* ---------- Wood & parchment materials ---------- */
.wood {
  background:
    repeating-linear-gradient(92deg, rgba(0,0,0,.0) 0 18px, rgba(0,0,0,.08) 18px 20px, rgba(255,255,255,.03) 20px 34px),
    linear-gradient(180deg, #7a4a22, #5a3416 55%, #4a2a12);
  border: 3px solid var(--bark-dark);
  box-shadow: inset 0 2px 0 rgba(255,220,160,.25), inset 0 -3px 0 rgba(0,0,0,.25), 0 6px 0 rgba(0,0,0,.25);
}

/* ---------- Top bar ---------- */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; padding: 10px 12px 0; }
.plank {
  max-width: var(--wrap); margin: 0 auto;
  display: flex; align-items: center; gap: 12px; justify-content: space-between;
  padding: 8px 12px 8px 10px; border-radius: 16px;
  background:
    repeating-linear-gradient(92deg, transparent 0 22px, rgba(0,0,0,.08) 22px 24px),
    linear-gradient(180deg, #7a4a22, #4f2d13);
  border: 3px solid var(--bark-dark);
  box-shadow: inset 0 2px 0 rgba(255,220,160,.25), 0 5px 0 rgba(0,0,0,.3);
}
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--parchment); font-family: var(--display); font-size: 1.25rem; white-space: nowrap; text-shadow: 0 2px 0 var(--bark-dark); }
.brand-compass { width: 34px; height: 34px; flex: none; }
.nav-links { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  display: block; padding: 6px 12px; border-radius: 10px; text-decoration: none; white-space: nowrap;
  color: var(--paper); font-weight: 700; font-size: 1rem;
}
.nav-links a:hover { background: rgba(255,220,150,.15); }
@media (max-width: 760px) {
  .plank { flex-direction: column; align-items: stretch; gap: 4px; padding: 8px; }
  .brand { justify-content: center; }
  .nav-links { justify-content: center; flex-wrap: wrap; overflow: visible; }
  .nav-links a { font-size: .95rem; padding: 4px 10px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--display); font-size: 1.2rem; text-decoration: none; cursor: pointer;
  padding: 12px 24px; border-radius: 999px; border: 3px solid var(--ink);
  box-shadow: 0 5px 0 var(--ink); transition: transform .12s, box-shadow .12s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--ink); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--ink); }
.btn-sun { background: var(--sun); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--paper); border-color: var(--paper); box-shadow: 0 5px 0 rgba(0,0,0,.35); }
.btn-small { font-size: 1rem; padding: 8px 16px; box-shadow: 0 4px 0 var(--ink); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; margin-top: -70px; padding: 120px 0 40px;
  color: var(--paper);
  background:
    radial-gradient(ellipse 60% 50% at 75% 30%, rgba(247,168,35,.35), transparent 70%),
    radial-gradient(ellipse 80% 60% at 20% 110%, rgba(76,138,58,.55), transparent 70%),
    linear-gradient(180deg, #123f25, var(--jungle));
}
.leaf { position: absolute; width: 260px; fill: var(--canopy); opacity: .9; pointer-events: none; }
.leaf .vein { fill: none; stroke: rgba(0,0,0,.18); stroke-width: 3; }
.leaf-a { left: -70px; bottom: -60px; transform: rotate(-10deg); }
.leaf-b { right: -80px; top: 60px; transform: scaleX(-1) rotate(-30deg); width: 220px; fill: var(--moss); opacity: .5; }
.hero-inner {
  position: relative; max-width: var(--wrap); margin: 0 auto; padding: 0 20px;
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: center;
}
.hero-kicker { font-weight: 700; color: var(--sun); margin-bottom: .5em; }
.hero-title {
  font-size: clamp(2.6rem, 6vw, 4.6rem); color: var(--parchment);
  text-shadow: 0 4px 0 var(--bark-dark), 0 8px 20px rgba(0,0,0,.35);
  margin-bottom: .35em; max-width: 12ch;
}
.hero-lede { font-size: 1.2rem; max-width: 34em; color: #f3e6c2; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 1.4em; }

.hero-shelf {
  position: relative; display: flex; justify-content: center; align-items: flex-end;
  min-height: 340px; padding: 30px 4% 36px;
}
.hero-shelf::after { /* the mossy log the books stand on */
  content: ""; position: absolute; left: 4%; right: 4%; bottom: 8px; height: 38px; border-radius: 30px;
  background:
    radial-gradient(ellipse 30% 60% at 20% 20%, rgba(120,170,70,.8), transparent 70%),
    radial-gradient(ellipse 25% 60% at 70% 10%, rgba(120,170,70,.7), transparent 70%),
    repeating-linear-gradient(90deg, #5a3416 0 30px, #4a2a12 30px 34px);
  border: 3px solid var(--bark-dark); box-shadow: 0 10px 20px rgba(0,0,0,.4);
}
.shelf-book {
  --r: 0deg; --y: 0px;
  position: relative; z-index: 1; flex: 0 0 auto; width: 25%; max-width: 168px; margin: 0 -3.2%;
  border-radius: 4px 10px 10px 4px; overflow: hidden;
  box-shadow: -6px 0 0 rgba(0,0,0,.25) inset, 0 16px 28px rgba(0,0,0,.45);
  border: 3px solid var(--bark-dark);
  transform: rotate(var(--r)) translateY(var(--y));
  transition: transform .25s ease;
}
/* Fan the covers out from the middle one; works for 3, 4 or 5 books */
.shelf-book:nth-child(1) { --r: -10deg; --y: 14px; }
.shelf-book:nth-child(2) { --r: -5deg;  --y: 0px;  z-index: 2; }
.shelf-book:nth-child(3) { --r: 0deg;   --y: -14px; z-index: 3; width: 29%; max-width: 194px; }
.shelf-book:nth-child(4) { --r: 5deg;   --y: 0px;  z-index: 2; }
.shelf-book:nth-child(5) { --r: 10deg;  --y: 14px; }
.shelf-book:hover, .shelf-book:focus-visible { transform: translateY(-30px) rotate(0); z-index: 5; }
.motto {
  position: relative; display: flex; justify-content: center; gap: .6em; flex-wrap: wrap;
  margin: 34px 0 0; font-family: var(--display); font-size: clamp(1.4rem, 3.4vw, 2.2rem); color: var(--sun);
}
.motto span:nth-child(2) { color: var(--amphibians-2); }
.motto span:nth-child(3) { color: #ff8a5c; }
@media (max-width: 860px) {
  .hero { padding-top: 150px; }
  .hero-inner { grid-template-columns: 1fr; text-align: left; gap: 26px; }
  .hero-shelf { min-height: 0; }
}

/* ---------- Book expeditions ---------- */
.expedition {
  --accent: var(--bugs); --accent-2: var(--bugs-2);
  padding: 70px 0 80px; position: relative;
  background:
    radial-gradient(circle at 12% 8%, rgba(255,255,255,.35), transparent 30%),
    radial-gradient(circle at 90% 60%, rgba(160,110,30,.12), transparent 40%),
    var(--parchment);
}
.expedition + .expedition { border-top: 14px solid var(--jungle); }
.expedition[data-theme="animals"] { --accent: var(--animals); --accent-2: var(--animals-2); background-color: #f2d185; }
.expedition[data-theme="amphibians"] { --accent: var(--amphibians); --accent-2: var(--amphibians-2); }
.expedition[data-theme="fishes"] { --accent: var(--fishes); --accent-2: var(--fishes-2); }
.expedition[data-theme="birds"] { --accent: var(--birds); --accent-2: var(--birds-2); background-color: #f2d185; }

.book-sign {
  display: inline-block; padding: 14px 26px 16px; border-radius: 18px; margin-bottom: 34px; transform: rotate(-1.2deg);
}
.book-sign .series { display: block; font-family: var(--display); color: var(--paper); font-size: 1.05rem; opacity: .9; }
.book-sign h2 {
  font-size: clamp(2.2rem, 6vw, 3.8rem); color: var(--accent-2);
  -webkit-text-stroke: 2px var(--bark-dark); paint-order: stroke fill;
  text-shadow: 0 4px 0 var(--bark-dark);
}
.book-top { display: grid; grid-template-columns: minmax(220px, 330px) 1fr; gap: 44px; align-items: start; }
.book-text .tagline { font-family: var(--display); font-size: 1.6rem; color: var(--accent); margin-bottom: .6em; line-height: 1.2; -webkit-text-stroke: .5px var(--bark-dark); }
.book-text .synopsis { max-width: 38em; font-size: 1.15rem; }
.book-meta { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; margin-top: 8px; }
.book-meta .count { font-weight: 700; }
.flip-hint { font-size: .95rem; margin-top: 10px; text-align: center; opacity: .8; }

/* Flip cover (published books + upcoming) */
.flip {
  display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer;
  perspective: 1400px; aspect-ratio: 980 / 1232;
}
.flip-inner { display: block; position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .8s cubic-bezier(.3,1.3,.5,1); }
.flip[aria-pressed="true"] .flip-inner { transform: rotateY(180deg); }
.flip-face { display: block;
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: 4px 12px 12px 4px; overflow: hidden; border: 3px solid var(--bark-dark);
  box-shadow: inset 8px 0 0 rgba(0,0,0,.18), 0 18px 30px rgba(60,30,0,.35);
  background: var(--paper);
}
.flip-face img { width: 100%; height: 100%; object-fit: cover; }
.flip-back { transform: rotateY(180deg); border-radius: 12px 4px 4px 12px; }
.flip-face .no-img { display: grid; place-items: center; height: 100%; padding: 20px; text-align: center; font-family: var(--display); color: var(--bark); }

/* Video frame */
.video-block { margin-top: 56px; }
.sub-head { font-size: clamp(1.7rem, 4vw, 2.4rem); color: var(--bark); margin-bottom: 16px; }
.film {
  position: relative; max-width: 960px; border-radius: 22px; padding: 18px; background: var(--bark-dark);
  box-shadow: 0 10px 0 rgba(0,0,0,.2);
}
.film::before, .film::after { /* sprocket holes */
  content: ""; position: absolute; left: 30px; right: 30px; height: 8px;
  background: repeating-linear-gradient(90deg, var(--parchment) 0 14px, transparent 14px 34px); opacity: .55; border-radius: 3px;
}
.film::before { top: 5px; } .film::after { bottom: 5px; }
.screen { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #000; }
.screen video { width: 100%; height: 100%; display: block; background: #000; }
.soon { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.soon-bg { position: absolute; inset: -20px; background-size: cover; background-position: center 30%; filter: blur(10px) saturate(1.2) brightness(.55); }
.soon-card { position: relative; padding: 20px; color: var(--paper); }
.soon-stamp {
  display: inline-block; font-family: var(--display); font-size: clamp(2.2rem, 7vw, 4.4rem);
  color: var(--accent-2); padding: 6px 28px; border: 5px solid var(--accent-2); border-radius: 18px;
  transform: rotate(-5deg); text-shadow: 0 4px 0 rgba(0,0,0,.4); background: rgba(0,0,0,.25);
}
.soon-card p { margin: 18px 0 0; font-size: 1.1rem; }
.play-dot { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; border: 4px solid var(--paper); display: grid; place-items: center; opacity: .8; }
.play-dot::after { content: ""; border-left: 20px solid var(--paper); border-top: 12px solid transparent; border-bottom: 12px solid transparent; margin-left: 6px; }

@media (max-width: 560px) {
  .film { padding: 12px; border-radius: 16px; }
  .soon-stamp { font-size: 1.7rem; padding: 4px 16px; border-width: 4px; }
  .soon-card p, .play-dot { display: none; }
}

/* All creatures: taped snapshots */
.creatures-block { margin-top: 60px; }
.creature-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 26px 20px; }
.snap {
  position: relative; width: 100%; padding: 8px 8px 0; background: #fffaf0; border: 0; cursor: pointer; text-align: center;
  box-shadow: 0 8px 16px rgba(60,30,0,.25); font: inherit; color: var(--ink);
  transition: transform .18s ease;
}
.creature-grid li:nth-child(3n+1) .snap { transform: rotate(-2deg); }
.creature-grid li:nth-child(3n+2) .snap { transform: rotate(1.5deg); }
.creature-grid li:nth-child(3n) .snap { transform: rotate(-.5deg); }
.creature-grid li .snap:hover { transform: rotate(0) scale(1.04); }
.snap::before { /* tape */
  content: ""; position: absolute; top: -10px; left: 50%; width: 64px; height: 22px; transform: translateX(-50%) rotate(-3deg);
  background: rgba(240,220,160,.85); box-shadow: 0 1px 2px rgba(0,0,0,.15);
}
.snap img { aspect-ratio: 4 / 5; object-fit: cover; object-position: center 70%; width: 100%; }
.snap .snap-name { display: block; font-family: var(--display); font-size: 1.05rem; line-height: 1.15; padding: 10px 4px 12px; }
.snap.is-star .snap-name { color: var(--accent); -webkit-text-stroke: .3px var(--bark-dark); }
.snap .star { position: absolute; top: 14px; right: 14px; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-2); border: 2px solid var(--bark-dark); display: grid; place-items: center; font-size: 15px; }

/* Field notes (the three highlights) */
.notes-block { margin-top: 64px; }
.notes-intro { max-width: 40em; margin-top: -6px; }
.notes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 10px; }
.note {
  background: var(--paper); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column;
  border: 3px solid var(--bark-dark); box-shadow: 0 8px 0 rgba(74,42,18,.35);
}
.note-img { position: relative; }
.note-img img { width: 100%; height: auto; } /* whole illustration, uncropped, so Ansel is always in the picture */
.note-sound {
  position: absolute; left: 12px; bottom: -18px; font-family: var(--display); font-size: 1.6rem; color: var(--accent-2);
  -webkit-text-stroke: 2px var(--bark-dark); paint-order: stroke fill; transform: rotate(-6deg); text-shadow: 0 3px 0 var(--bark-dark);
}
.note-body { padding: 26px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.note h3 { font-size: 1.7rem; color: var(--bark); }
.note .note-sub { font-style: italic; margin: 2px 0 10px; color: var(--moss); font-weight: 700; }
.note .note-story { font-size: 1.02rem; }
.facts { margin: 6px 0 14px; border: 2px dashed var(--bark); border-radius: 14px; padding: 4px 14px; background: rgba(245,217,143,.35); }
.fact { display: grid; grid-template-columns: 38px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px dashed rgba(74,42,18,.4); font-size: .98rem; line-height: 1.45; }
.fact:last-child { border-bottom: 0; }
.fact-icon { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--bark-dark); }
.fact-icon svg { width: 20px; height: 20px; }
.fact-home .fact-icon { background: #6fb04a; }
.fact-super .fact-icon { background: var(--accent-2); }
.fact-survive .fact-icon { background: #2d63b3; }
.fact b { display: block; font-family: var(--display); font-weight: 400; font-size: 1.05rem; }
.fact-home b { color: #2f6b1f; }
.fact-super b { color: #9a2b12; }
.fact-survive b { color: #1f4a8a; }
.dyk { margin-top: auto; font-size: .98rem; padding: 10px 14px; border-radius: 12px; background: var(--jungle); color: var(--paper); }
.dyk strong { color: var(--accent-2); font-family: var(--display); font-weight: 400; }

@media (max-width: 980px) { .notes { grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px) {
  .book-top { grid-template-columns: 1fr; gap: 28px; }
  .book-top .cover-col { max-width: 300px; margin: 0 auto; width: 100%; }
  .notes { grid-template-columns: 1fr; }
  .creature-grid { grid-template-columns: repeat(2, 1fr); gap: 22px 16px; }
  .expedition { padding: 50px 0 60px; }
}

/* ---------- Section heads (non-book sections) ---------- */
.section-head { margin-bottom: 26px; max-width: 44em; }
.section-head h2 { font-size: clamp(2.2rem, 5.5vw, 3.4rem); margin-bottom: .25em; }

/* ---------- Coloring ---------- */
.coloring {
  padding: 76px 0 86px; color: var(--paper);
  background:
    radial-gradient(circle at 85% 0%, rgba(247,168,35,.25), transparent 40%),
    linear-gradient(180deg, var(--canopy), var(--jungle));
}
.coloring .section-head h2 { color: var(--parchment); text-shadow: 0 4px 0 rgba(0,0,0,.35); }
.tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.tab {
  font-family: var(--display); font-size: 1.1rem; cursor: pointer;
  padding: 10px 18px; border-radius: 14px; border: 3px solid var(--bark-dark); background: #6b4020; color: var(--paper);
  box-shadow: 0 4px 0 rgba(0,0,0,.35);
}
.tab[aria-selected="true"] { background: var(--parchment); color: var(--ink); }
.tab .n { display: inline-block; min-width: 1.6em; margin-left: 6px; padding: 0 6px; border-radius: 99px; background: rgba(0,0,0,.2); font-size: .9rem; }
.page-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 22px; }
.page-card {
  background: #fff; color: var(--ink); border-radius: 8px; padding: 10px; display: flex; flex-direction: column; gap: 10px;
  box-shadow: 0 10px 0 rgba(0,0,0,.25); position: relative;
}
.page-card::after { /* stacked paper edge */
  content: ""; position: absolute; inset: 6px -6px -6px 6px; background: #efe6cf; border-radius: 8px; z-index: -1;
}
.page-thumb { aspect-ratio: 8.5 / 11; background: #fff; border: 2px dashed #cdbd95; border-radius: 4px; overflow: hidden; display: grid; place-items: center; }
.page-thumb img { width: 100%; height: 100%; object-fit: cover; }
.page-thumb img.from-book { filter: grayscale(1) contrast(1.25) brightness(1.1); opacity: .8; }
.page-thumb .pencil { width: 56px; height: 56px; opacity: .5; }
.page-card h3 { font-size: 1.15rem; }
.page-card .btn { width: 100%; }
.empty {
  border: 3px dashed rgba(245,217,143,.6); border-radius: 18px; padding: 30px 24px; text-align: center; max-width: 640px;
}
.empty h3 { font-size: 1.5rem; margin-bottom: 6px; }
.empty p { margin: 0; }

/* ---------- Upcoming ---------- */
.upcoming { padding: 76px 0 86px; background: var(--paper); }
.upcoming .section-head h2 { color: var(--bark); }
.upcoming-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 40px 30px; }
.soon-book h3 { font-size: 1.6rem; margin-top: 18px; color: var(--bark); }
.soon-book .release { display: inline-block; margin: 6px 0 8px; padding: 2px 12px; border-radius: 99px; background: var(--sun); font-weight: 700; font-size: .95rem; border: 2px solid var(--ink); }
.soon-book p { font-size: 1rem; }
.soon-book .flip { max-width: 300px; }
.upcoming .empty { border-color: rgba(74,42,18,.35); color: var(--ink); }
.upcoming .empty h3 { color: var(--bark); }

/* ---------- Promise ---------- */
.promise { padding: 76px 0; background: var(--parchment); border-top: 14px solid var(--jungle); }
.promise-inner { display: grid; grid-template-columns: 300px 1fr; gap: 50px; align-items: center; }
.promise-ansel { border-radius: 50%; border: 6px solid var(--bark); box-shadow: 0 0 0 6px var(--sun), 0 14px 30px rgba(60,30,0,.35); }
.promise h2 { font-size: clamp(2.2rem, 5vw, 3.2rem); color: var(--bark); margin-bottom: .3em; }
.pledges { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 10px; }
.pledges li { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 14px; font-size: 1.1rem; }
.pledges strong {
  font-family: var(--display); font-weight: 400; font-size: 1.15rem; text-align: center; color: var(--paper);
  background: var(--jungle); border-radius: 10px; padding: 4px 8px; border: 2px solid var(--bark-dark);
}
.promise-close { font-family: var(--display); font-size: 1.4rem; color: var(--moss); margin: 0; }
@media (max-width: 760px) {
  .promise-inner { grid-template-columns: 1fr; gap: 26px; }
  .promise-ansel { width: 200px; margin: 0 auto; }
  .pledges li { grid-template-columns: 1fr; gap: 4px; }
  .pledges strong { justify-self: start; }
}

/* ---------- Author & footer ---------- */
.author { padding: 60px 0 70px; background: #f2d185; }
.author-inner { max-width: 760px; }
.author h2 { font-size: 2.2rem; color: var(--bark); margin-bottom: .5em; }
.footer { background: var(--jungle); color: var(--paper); padding: 40px 0 50px; text-align: center; font-size: .95rem; }
.footer-motto { font-family: var(--display); font-size: 1.8rem; color: var(--sun); margin-bottom: .3em; }

/* ---------- Animal dialog ---------- */
.animal-dialog {
  width: min(560px, calc(100% - 32px)); padding: 0; border: 4px solid var(--bark-dark); border-radius: 20px; overflow: hidden;
  background: var(--paper); color: var(--ink);
}
.animal-dialog::backdrop { background: rgba(14,58,34,.75); }
.animal-dialog img { width: 100%; height: auto; max-height: 64vh; object-fit: contain; background: var(--jungle); }
.dlg-body { padding: 18px 22px 22px; }
.dlg-body h3 { font-size: 2rem; color: var(--bark); }
.dlg-book { margin: 0 0 4px; font-weight: 700; color: var(--moss); }
.dlg-body p:last-child { margin: 8px 0 0; font-size: 1.15rem; }
.dlg-close {
  position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  background: var(--paper); border: 3px solid var(--bark-dark); font-size: 1.6rem; line-height: 1; color: var(--ink);
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
  .flip[aria-pressed="true"] .flip-inner { transform: none; }
  .flip[aria-pressed="true"] .flip-front { visibility: hidden; }
  .flip-back { transform: none; visibility: hidden; }
  .flip[aria-pressed="true"] .flip-back { visibility: visible; }
}
