/* Granny's Bad Batch — official site
   Materials come straight from the game: mint tile wall, wooden counter,
   red gingham, cream recipe paper and clay buttons. */

@font-face {
  font-family: "Bree";
  src: url("../assets/fonts/BreeSerif-Regular.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("../assets/fonts/NunitoSans.ttf") format("truetype");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --mint: #8ed1b4;
  --mint-soft: #b4e2cf;
  --mint-deep: #4e9c83;
  --teal: #2f6b5e;
  --butter: #f5d27e;
  --gold: #f2c14e;
  --biscuit: #d89a5b;
  --choc: #6a3e2b;
  --choc-dark: #3e2318;
  --ink: #3a2219;
  --jam: #d8463e;
  --jam-deep: #a82e2e;
  --cream: #fff3dc;
  --paper: #fbefd6;
  --wood: #e4b98a;
  --wood-dark: #b27b4c;
  --pink: #f4a3b8;

  --display: "Bree", "Rockwell", "Georgia", serif;
  --body: "Nunito", "Avenir Next", "Segoe UI", system-ui, sans-serif;

  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 22px;

  --clay-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.55), inset 0 -5px 0 rgba(62, 35, 24, 0.14);
  --drop: 0 14px 28px -14px rgba(62, 35, 24, 0.55);

  --tile:
    linear-gradient(rgba(255, 255, 255, 0.6) 3px, transparent 3px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.6) 3px, transparent 3px),
    radial-gradient(120% 90% at 30% 20%, rgba(255, 255, 255, 0.28), transparent 60%);
  --wood-grain:
    linear-gradient(180deg, rgba(255, 236, 205, 0.18), rgba(120, 66, 28, 0.12)),
    url("../assets/img/art/wood.jpg");
  --wood-size: 100% 100%, 420px 420px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--mint);
  background-image: var(--tile);
  background-size: 84px 84px, 84px 84px, 100% 100%;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--jam-deep); }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.1; margin: 0; color: var(--choc); }
p { margin: 0 0 1em; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--jam); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--cream); padding: 10px 16px; border-radius: 12px; font-weight: 800;
}
.skip:focus { top: 12px; }

/* ---------- Clay button ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  border: 0; cursor: pointer;
  padding: 12px 20px 14px;
  border-radius: 999px;
  font-family: var(--display); font-size: 1.05rem; letter-spacing: 0.01em;
  box-shadow: var(--clay-shadow), 0 6px 0 rgba(62, 35, 24, 0.22);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.btn img { height: 34px; width: auto; margin: -6px 0; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(3px); box-shadow: var(--clay-shadow), 0 2px 0 rgba(62, 35, 24, 0.22); }
.btn:disabled { filter: grayscale(0.7) opacity(0.6); cursor: not-allowed; transform: none; }
.btn--cream { background: var(--cream); color: var(--choc); }
.btn--jam { background: linear-gradient(180deg, #e65a4f, var(--jam) 55%, var(--jam-deep)); color: var(--cream); }

/* ---------- Top bar: gingham ribbon + scalloped cream shelf ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--cream);
  box-shadow: 0 10px 20px -16px rgba(62, 35, 24, 0.6);
}
.topbar::before {
  content: ""; display: block; height: 10px;
  background: url("../assets/img/art/gingham.jpg") 0 0 / 48px 48px;
}
.topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -11px; height: 12px;
  background: radial-gradient(circle at 12px 0, var(--cream) 11px, transparent 12px) 0 0 / 24px 12px repeat-x;
  pointer-events: none;
}
.topbar__inner {
  max-width: var(--wrap); margin: 0 auto;
  padding: 10px var(--gutter);
  display: flex; align-items: center; gap: 20px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--choc);
  font-family: var(--display); font-size: 1.3rem; white-space: nowrap;
}
.brand img { width: 44px; height: 44px; border-radius: 12px; box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--mint-deep); }
.tabs { margin-left: auto; display: flex; gap: 6px; }
.tabs a {
  font-weight: 800; font-size: 0.92rem; text-decoration: none;
  color: var(--teal);
  padding: 9px 15px 10px;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}
.tabs a:hover { background: var(--mint-soft); }
.tabs a[aria-current="page"] {
  background: linear-gradient(180deg, #e65a4f, var(--jam) 60%, var(--jam-deep));
  color: var(--cream);
  box-shadow: var(--clay-shadow);
}
.menu-toggle { display: none; }

@media (max-width: 900px) {
  .menu-toggle {
    margin-left: auto; display: inline-flex; align-items: center; gap: 10px;
    border: 0; background: var(--mint-soft); color: var(--teal);
    padding: 8px 14px; border-radius: 999px; font-weight: 900; cursor: pointer;
    box-shadow: var(--clay-shadow);
  }
  .menu-toggle__pin {
    width: 26px; height: 10px; border-radius: 6px; position: relative;
    background: linear-gradient(180deg, #edc596, var(--biscuit));
  }
  .menu-toggle__pin::before, .menu-toggle__pin::after {
    content: ""; position: absolute; top: 3px; width: 6px; height: 4px; border-radius: 2px; background: var(--wood-dark);
  }
  .menu-toggle__pin::before { left: -5px; }
  .menu-toggle__pin::after { right: -5px; }
  .tabs {
    position: absolute; right: var(--gutter); top: calc(100% + 16px);
    flex-direction: column; gap: 4px; min-width: 220px;
    background: var(--cream); padding: 10px; border-radius: 20px;
    box-shadow: var(--drop), 0 0 0 3px var(--mint);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  }
  .tabs.is-open { opacity: 1; visibility: visible; transform: none; }
  .tabs a { padding: 12px 16px; }
  .brand span { font-size: 1.1rem; }
}
@media (max-width: 380px) { .brand span { display: none; } }

/* ---------- Cover ---------- */
.cover { position: relative; padding-top: 34px; }
.cover__wall {
  max-width: var(--wrap); margin: 0 auto;
  padding: 24px var(--gutter) 0;
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: end;
}
.cover__logo img { width: min(600px, 100%); height: auto; filter: drop-shadow(0 10px 14px rgba(62, 35, 24, 0.25)); }
.cover__logo { margin-left: -10px; }
.cover__line {
  font-family: var(--display); font-size: clamp(1.25rem, 2.3vw, 1.6rem);
  color: var(--choc); max-width: 30ch; margin: 18px 0 30px;
}
.index-card {
  position: relative;
  background:
    linear-gradient(90deg, transparent 46px, rgba(216, 70, 62, 0.45) 46px 48px, transparent 48px),
    repeating-linear-gradient(transparent 0 31px, rgba(78, 156, 131, 0.28) 31px 32px),
    var(--paper);
  background-position: 0 0, 0 14px, 0 0;
  padding: 18px 24px 16px 64px;
  border-radius: 6px;
  max-width: 470px;
  transform: rotate(-1.6deg);
  box-shadow: var(--drop), 0 1px 0 rgba(255, 255, 255, 0.8) inset;
  margin-bottom: 46px;
}
.index-card::before {
  content: ""; position: absolute; top: -14px; left: 50%; width: 110px; height: 28px;
  transform: translateX(-50%) rotate(2deg);
  background: rgba(255, 243, 220, 0.75);
  box-shadow: 0 2px 4px rgba(62, 35, 24, 0.12);
}
.index-card__title { font-size: 1.15rem; color: var(--jam-deep); line-height: 32px; }
.index-card__list { list-style: none; margin: 0; padding: 0; }
.index-card__list li { line-height: 32px; font-weight: 600; }
.index-card__list b { font-family: var(--display); font-weight: 400; color: var(--jam); font-size: 1.15rem; margin-right: 4px; }
.index-card__foot { margin: 0; line-height: 32px; font-size: 0.86rem; font-weight: 800; color: var(--teal); text-transform: uppercase; letter-spacing: 0.06em; }

.cover__phone { position: relative; margin: 0; justify-self: center; width: min(320px, 78vw); }
.device {
  padding: 11px; border-radius: 48px;
  background: linear-gradient(160deg, #a6dfc8, var(--mint-deep));
  box-shadow: var(--clay-shadow), 0 30px 50px -24px rgba(47, 107, 94, 0.9), 0 0 0 4px var(--cream);
  transform: rotate(3deg);
}
.device img { border-radius: 38px; width: 100%; height: auto; }
.cover__wall { position: relative; z-index: 1; }
.cover__granny {
  position: absolute; width: 50%; right: -44%; bottom: -40px; z-index: -1;
  transform: rotate(10deg);
  filter: drop-shadow(0 12px 14px rgba(62, 35, 24, 0.3));
  animation: peek 5s ease-in-out infinite;
}
@keyframes peek {
  0%, 100% { transform: rotate(10deg) translateY(0); }
  50% { transform: rotate(6deg) translateY(-8px); }
}

.counter {
  position: relative; margin-top: -40px; z-index: 2;
  height: 170px;
  background-image: var(--wood-grain); background-size: var(--wood-size);
  box-shadow: inset 0 14px 0 rgba(255, 233, 200, 0.55), inset 0 18px 0 rgba(140, 86, 44, 0.25), 0 -6px 18px -8px rgba(62, 35, 24, 0.35);
}
.runway { position: relative; max-width: 860px; margin: 0 auto; top: -34px; padding: 0 var(--gutter); }
.runway__board { width: 100%; height: auto; filter: drop-shadow(0 12px 10px rgba(62, 35, 24, 0.35)); }
.runner {
  position: absolute; bottom: 52%; height: clamp(54px, 9vw, 92px); width: auto;
  animation: run 10s linear infinite, bob 0.36s ease-in-out infinite alternate;
}
.runner--b { animation-delay: -3.3s, -0.12s; }
.runner--c { animation-delay: -6.6s, -0.24s; }
@keyframes run { from { left: 4%; opacity: 0; } 6% { opacity: 1; } 92% { opacity: 1; } to { left: 88%; opacity: 0; } }
@keyframes bob { from { transform: translateY(0) rotate(-4deg); } to { transform: translateY(-10px) rotate(4deg); } }

/* ---------- Contents card ---------- */
.contents { position: relative; z-index: 3; margin-top: -60px; padding: 0 var(--gutter); }
.contents__card {
  max-width: 720px; margin: 0 auto;
  background: var(--paper) url("../assets/img/art/paper.jpg") center / 420px;
  border-radius: 18px; overflow: hidden;
  box-shadow: var(--drop), 0 0 0 1px rgba(106, 62, 43, 0.08);
  padding: 0 0 18px;
}
.contents__card h2 {
  background: url("../assets/img/art/gingham.jpg") 0 0 / 56px 56px;
  color: var(--cream); text-align: center;
  font-size: 1.4rem; padding: 14px 16px 16px;
  text-shadow: 0 2px 0 var(--jam-deep), 0 0 8px rgba(168, 46, 46, 0.9);
}
.contents ol { list-style: none; margin: 0; padding: 10px 28px 0; counter-reset: c; }
.contents a {
  display: flex; align-items: baseline; gap: 10px;
  padding: 9px 0; text-decoration: none; color: var(--choc); font-weight: 800;
}
.contents a span { font-size: 1.05rem; }
.contents a i { flex: 1; border-bottom: 3px dotted rgba(106, 62, 43, 0.35); transform: translateY(-4px); }
.contents a em { font-style: normal; font-family: var(--display); color: var(--jam); }
.contents a:hover span { color: var(--jam-deep); }

/* ---------- Chapters ---------- */
.chapter { position: relative; padding: clamp(72px, 10vw, 120px) var(--gutter); }
.chapter > * { max-width: var(--wrap); margin-left: auto; margin-right: auto; }
.chapter__head { margin-bottom: 44px; }
.chapter__head--center { text-align: center; }
.chapter__no {
  display: inline-block; margin: 0 0 12px;
  font-weight: 900; font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--cream); background: var(--teal);
  padding: 5px 14px 6px; border-radius: 999px;
}
.chapter h2 { font-size: clamp(2rem, 4.6vw, 3.3rem); max-width: 18ch; }
.chapter__head--center h2 { margin: 0 auto; }
.chapter__lede { max-width: 58ch; margin-top: 16px; font-size: 1.08rem; }

/* No.1 — pinboard */
.down { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 56px; align-items: start; }
.down__text { font-size: 1.08rem; }
.checklist { list-style: none; padding: 0; margin: 0 0 22px; }
.checklist li {
  position: relative; padding: 12px 0 12px 44px;
  border-bottom: 2px dashed rgba(47, 107, 94, 0.25);
}
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 13px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--cream) url("../assets/img/art/coin.webp") center / 26px no-repeat;
  box-shadow: 0 2px 0 rgba(62, 35, 24, 0.18);
}
.hint { font-family: var(--display); color: var(--teal); }

.pinboard__tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.pinboard__tabs button {
  border: 0; cursor: pointer; font-weight: 800; font-size: 0.92rem;
  padding: 9px 16px; border-radius: 999px;
  background: var(--cream); color: var(--teal);
  box-shadow: 0 3px 0 rgba(47, 107, 94, 0.3);
}
.pinboard__tabs button[aria-selected="true"] { background: var(--teal); color: var(--cream); box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.2); }
.pinboard__frame {
  position: relative;
  padding: clamp(14px, 3vw, 26px) clamp(12px, 3vw, 24px);
  border-radius: 34px;
  background: #a6dcc6;
  box-shadow: inset 0 0 0 10px #7fc8ab, inset 0 0 0 14px var(--cream), var(--clay-shadow), 0 22px 36px -22px rgba(47, 107, 94, 0.95);
}
.pinboard__rows { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 8px; }
.pin-row {
  position: relative; min-width: 0; aspect-ratio: 900 / 238;
  background: url("../assets/img/art/barrel.webp") center / 100% 100% no-repeat;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: minmax(0, 1fr);
  padding: 2% 13% 2% 4%;
}
.pin-cell { position: relative; min-width: 0; min-height: 0; display: flex; align-items: center; justify-content: center; z-index: 2; }
.pin-cell img { height: 100%; width: 100%; object-fit: contain; transition: transform 0.25s ease, filter 0.25s ease; }
.pin-cell.is-win img { animation: hop 0.7s ease-in-out infinite alternate; filter: drop-shadow(0 0 10px rgba(255, 246, 214, 1)); }
.pin-cell.is-nope img { filter: saturate(0.6) brightness(0.95); }
.pin-cell.is-nope::after {
  content: "✕"; position: absolute; right: 12%; top: 4%;
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: var(--jam); color: var(--cream); font-weight: 900; font-size: 0.8rem;
  box-shadow: 0 2px 0 var(--jam-deep);
}
@keyframes hop { from { transform: translateY(0) scale(1); } to { transform: translateY(-6%) scale(1.06); } }
.pin-line {
  position: absolute; z-index: 1; pointer-events: none; width: 12px; margin-left: -6px; border-radius: 8px;
  background: linear-gradient(90deg, #f9c9d6, #fff6f0 50%, #f9c9d6);
  box-shadow: 0 0 0 2px rgba(216, 70, 62, 0.35), 0 0 16px rgba(255, 246, 214, 0.9);
  transition: top 0.3s ease, height 0.3s ease, left 0.3s ease, opacity 0.3s ease;
}
.pinboard__verdict {
  margin: 16px 0 0; padding: 12px 18px; border-radius: 16px;
  background: var(--teal); color: var(--cream); font-weight: 800; text-align: center;
}
.pinboard__verdict.is-nope { background: var(--jam-deep); }

/* No.2 — method */
.chapter--bake { background: var(--paper) url("../assets/img/art/paper.jpg") center / 520px; }
.chapter--bake::before, .chapter--bake::after {
  content: ""; position: absolute; left: 0; right: 0; height: 16px;
  background: url("../assets/img/art/gingham.jpg") 0 0 / 48px 48px;
}
.chapter--bake::before { top: 0; }
.chapter--bake::after { bottom: 0; }
.method { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: start; }
.method__card {
  position: relative; background: #fffaf0; border-radius: 22px;
  padding: 54px clamp(20px, 4vw, 40px) 28px;
  box-shadow: var(--drop), 0 0 0 2px rgba(216, 70, 62, 0.15);
}
.method__ribbon {
  position: absolute; top: -18px; left: 28px;
  font-family: var(--display); font-size: 1.3rem; color: var(--cream);
  background: linear-gradient(180deg, #e65a4f, var(--jam) 60%, var(--jam-deep));
  padding: 6px 22px 9px; border-radius: 12px 12px 12px 2px;
  box-shadow: var(--clay-shadow), 0 4px 0 rgba(62, 35, 24, 0.2);
}
.method__steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.method__steps li { position: relative; padding: 0 0 22px 64px; counter-increment: step; }
.method__steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: -4px; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--display); font-size: 1.4rem; color: var(--choc);
  background: var(--butter); box-shadow: var(--clay-shadow), 0 3px 0 rgba(62, 35, 24, 0.2);
}
.method__steps li:not(:last-child)::after {
  content: ""; position: absolute; left: 21px; top: 46px; bottom: 4px; border-left: 2px dashed rgba(106, 62, 43, 0.3);
}
.method__steps h3 { font-size: 1.3rem; margin-bottom: 4px; }
.method__steps p { margin: 0; }
.method__note { margin: 6px 0 0; padding: 12px 16px; border-radius: 14px; background: var(--mint-soft); color: var(--teal); font-weight: 700; font-size: 0.95rem; }

.transform {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px;
  background: #fffaf0; border-radius: 26px; padding: 22px;
  box-shadow: var(--drop);
  margin-bottom: 44px;
}
.transform__col { display: grid; gap: 4px; justify-items: center; }
.transform__col img { height: 74px; width: auto; }
.transform__col:first-child img { animation: puff-out 4s ease-in-out infinite; }
.transform__col--after img { animation: puff-in 4s ease-in-out infinite; }
.transform__col img:nth-child(2) { animation-delay: 0.12s; }
.transform__col img:nth-child(3) { animation-delay: 0.24s; }
@keyframes puff-out { 0%, 30% { transform: scale(1); opacity: 1; } 45% { transform: scale(1.2); opacity: 0.6; } 55%, 92% { transform: scale(0.9); opacity: 0.45; } 100% { transform: scale(1); opacity: 1; } }
@keyframes puff-in { 0%, 40% { transform: scale(0.85); opacity: 0.45; } 58% { transform: scale(1.15); opacity: 1; } 66%, 92% { transform: scale(1); opacity: 1; } 100% { transform: scale(0.85); opacity: 0.45; } }
.transform__arrow { position: relative; display: grid; justify-items: center; gap: 6px; }
.transform__arrow::before { content: "→"; font-family: var(--display); font-size: 2.4rem; line-height: 1; color: var(--jam); }
.transform__arrow img { position: absolute; top: -40px; width: 90px; animation: puff-cloud 4s ease-in-out infinite; }
.transform__arrow span {
  font-family: var(--display); color: var(--cream); background: var(--jam);
  padding: 4px 12px 6px; border-radius: 999px; font-size: 0.95rem; white-space: nowrap;
}
@keyframes puff-cloud { 0%, 35% { transform: scale(0.5); opacity: 0; } 50% { transform: scale(1.1); opacity: 1; } 70%, 100% { transform: scale(1.3); opacity: 0; } }

.fan { position: relative; height: 420px; }
.fan figure {
  position: absolute; top: 0; width: 44%; margin: 0;
  background: #fff; padding: 8px 8px 34px; border-radius: 10px;
  box-shadow: var(--drop);
  transition: transform 0.25s ease, z-index 0s;
}
.fan figure img { border-radius: 6px; aspect-ratio: 640 / 1000; object-fit: cover; object-position: top; width: 100%; }
.fan figcaption { position: absolute; bottom: 7px; left: 0; right: 0; text-align: center; font-family: var(--display); color: var(--choc); }
.fan figure:nth-child(1) { left: 0; transform: rotate(-7deg); }
.fan figure:nth-child(2) { left: 28%; top: 18px; transform: rotate(1deg); z-index: 2; }
.fan figure:nth-child(3) { left: 56%; transform: rotate(7deg); }
.fan figure:hover { transform: rotate(0) translateY(-10px) scale(1.04); z-index: 3; }

/* No.3 — recipe cards on the wooden counter */
.chapter--recipes { background-image: var(--wood-grain); background-size: var(--wood-size); }
.chapter--recipes .chapter__head h2, .chapter--recipes .chapter__lede { color: var(--choc-dark); }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.rcard {
  position: relative; background: var(--paper) url("../assets/img/art/paper.jpg") center / 360px;
  border-radius: 18px; overflow: hidden;
  padding: 0 18px 18px;
  box-shadow: 0 18px 24px -14px rgba(62, 35, 24, 0.7), 0 0 0 3px #f6e2bf;
  transition: transform 0.25s ease;
  display: flex; flex-direction: column;
}
.rcard:nth-child(odd) { transform: rotate(-1.4deg); }
.rcard:nth-child(even) { transform: rotate(1.2deg) translateY(10px); }
.rcard:hover { transform: rotate(0) translateY(-8px); }
.rcard__name {
  margin: 0 -18px 14px; padding: 18px 12px 12px; text-align: center;
  font-size: 1.35rem; color: var(--cream);
  background: url("../assets/img/art/gingham.jpg") 0 0 / 40px 40px;
  text-shadow: 0 2px 0 var(--jam-deep), 0 0 6px rgba(168, 46, 46, 1);
  border-bottom: 4px solid var(--cream);
}
.rcard__swap { display: flex; align-items: center; justify-content: center; gap: 6px; height: 92px; margin-bottom: 12px; }
.rcard__swap img { height: 74px; width: auto; }
.rcard__swap--two img { height: 58px; }
.rcard__swap span { font-family: var(--display); font-size: 1.6rem; color: var(--jam); }
.rcard__effect { font-weight: 800; text-align: center; font-size: 0.98rem; }
.rcard__story { text-align: center; font-style: italic; color: rgba(58, 34, 25, 0.75); font-size: 0.94rem; }
.rcard__unlock {
  margin: auto 0 0; align-self: center; font-size: 0.78rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--teal); background: var(--mint-soft); padding: 5px 12px; border-radius: 999px;
}
.research {
  margin-top: 64px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 18px 40px;
  background: rgba(255, 243, 220, 0.92); border-radius: 22px; padding: 22px 26px; box-shadow: var(--drop);
}
.research__lead { margin: 0; font-weight: 800; max-width: 30ch; }
.research__stamps { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; justify-content: center; }
.research__stamps li { display: grid; justify-items: center; gap: 6px; }
.research__stamps small { font-weight: 800; color: rgba(58, 34, 25, 0.7); }
.stamp {
  width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--display); color: var(--jam-deep); font-size: 0.98rem; text-transform: uppercase;
  border: 4px double var(--jam); background: rgba(216, 70, 62, 0.06);
  transform: rotate(-12deg);
}
.research__stamps li:nth-child(2) .stamp { transform: rotate(6deg); }
.research__stamps li:nth-child(3) .stamp { transform: rotate(-4deg); background: rgba(242, 193, 78, 0.25); }

/* No.4 — oven */
.chapter--oven {
  background:
    radial-gradient(60% 70% at 72% 55%, rgba(242, 160, 78, 0.45), transparent 65%),
    linear-gradient(180deg, #4b2a1d, var(--choc-dark));
  color: var(--cream);
}
.chapter--oven h2 { color: var(--butter); }
.chapter--oven .chapter__no { background: var(--jam); }
.oven-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.oven-copy h2 { margin-bottom: 20px; }
.oven-copy > p { font-size: 1.08rem; max-width: 52ch; }
.oven-copy b { color: var(--butter); }
.oven-toy { margin-top: 28px; background: rgba(255, 243, 220, 0.08); border: 2px solid rgba(255, 243, 220, 0.15); border-radius: 22px; padding: 22px; }
.oven-toy__meter { display: flex; gap: 10px; margin-bottom: 12px; }
.oven-toy__meter span {
  flex: 1; height: 18px; border-radius: 999px; background: rgba(255, 243, 220, 0.14);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}
.oven-toy__meter span.is-on { background: linear-gradient(180deg, #ffe7a6, var(--gold)); box-shadow: 0 0 14px rgba(242, 193, 78, 0.8); }
.oven-toy__status { font-family: var(--display); font-size: 1.2rem; color: var(--butter); min-height: 1.6em; }
.oven-toy__buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.oven-stage { position: relative; max-width: 460px; justify-self: center; width: 100%; }
.oven-stage__body { width: 100%; height: auto; filter: drop-shadow(0 24px 30px rgba(0, 0, 0, 0.45)); }
.oven-stage__dough {
  position: absolute; left: 50%; top: 56%; width: 46%;
  transform: translate(-50%, -50%) scale(calc(0.5 + var(--rise, 0) * 0.085));
  transform-origin: 50% 85%;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.oven-stage__puff, .oven-stage__pop { position: absolute; left: 50%; pointer-events: none; opacity: 0; }
.oven-stage__puff { top: 62%; width: 70%; transform: translate(-50%, -50%) scale(0.4); }
.oven-stage__pop {
  top: 8%; transform: translateX(-50%); margin: 0;
  font-family: var(--display); font-size: 2.2rem; color: var(--butter);
  text-shadow: 0 3px 0 var(--jam-deep), 0 0 18px rgba(242, 193, 78, 0.8);
  white-space: nowrap;
}
.oven-stage.is-pop .oven-stage__body { animation: shake 0.5s ease; }
.oven-stage.is-pop .oven-stage__puff { animation: burst 1.1s ease-out; }
.oven-stage.is-pop .oven-stage__pop { animation: rise-text 1.6s ease-out; }
@keyframes shake { 0%, 100% { transform: none; } 20% { transform: rotate(-2deg) translateY(-4px); } 40% { transform: rotate(2deg); } 60% { transform: rotate(-1deg) translateY(-2px); } 80% { transform: rotate(1deg); } }
@keyframes burst { 0% { opacity: 0; transform: translate(-50%, -50%) scale(0.4); } 25% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -70%) scale(1.3); } }
@keyframes rise-text { 0% { opacity: 0; transform: translate(-50%, 20px) scale(0.7); } 20% { opacity: 1; transform: translate(-50%, 0) scale(1.08); } 75% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -16px); } }

/* No.5 — fridge and cabinet */
.kitchen-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: start; }
.fridge-door {
  position: relative; border-radius: 44px;
  padding: 34px 54px 28px 28px;
  background: linear-gradient(160deg, #a3dcc4, #78c3a6 70%, #64b496);
  box-shadow: var(--clay-shadow), inset 0 0 0 4px rgba(255, 255, 255, 0.25), 0 26px 40px -24px rgba(47, 107, 94, 1);
}
.fridge-door__handle {
  position: absolute; right: 18px; top: 60px; width: 16px; height: 160px; border-radius: 10px;
  background: linear-gradient(90deg, #fff6e3, #e7d2ae);
  box-shadow: 0 4px 0 rgba(62, 35, 24, 0.2);
}
.fridge-notes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 26px 18px; }
.fridge-notes li {
  position: relative; padding: 26px 14px 14px;
  background: repeating-linear-gradient(transparent 0 23px, rgba(78, 156, 131, 0.25) 23px 24px), #fffaf0;
  background-position: 0 30px;
  border-radius: 4px 4px 14px 4px;
  box-shadow: 0 10px 14px -10px rgba(62, 35, 24, 0.6);
}
.fridge-notes li::before {
  content: ""; position: absolute; top: -14px; left: 50%; width: 30px; height: 36px; transform: translateX(-50%) rotate(-8deg);
  background: url("../assets/img/art/magnet.webp") center / contain no-repeat;
}
.fridge-notes li:nth-child(4n + 1) { transform: rotate(-2deg); }
.fridge-notes li:nth-child(4n + 2) { transform: rotate(1.5deg); }
.fridge-notes li:nth-child(4n + 3) { transform: rotate(1deg); }
.fridge-notes li:nth-child(4n + 4) { transform: rotate(-1.2deg); }
.fridge-notes h3 { font-size: 1.05rem; color: var(--jam-deep); margin-bottom: 4px; }
.fridge-notes p { font-size: 0.88rem; line-height: 24px; margin: 0 0 8px; }
.reward {
  display: inline-block; font-size: 0.74rem; font-weight: 900; color: var(--choc);
  background: var(--butter); padding: 3px 10px; border-radius: 999px;
}
.fridge-door__foot { margin: 24px 0 0; color: #1f4a41; font-weight: 800; font-size: 0.92rem; }

.cabinet {
  background: linear-gradient(180deg, #f6e4c6, #ecd2a9);
  border-radius: 28px; padding: 24px 22px 26px;
  box-shadow: inset 0 0 0 8px #e0b98a, inset 0 0 0 11px var(--cream), var(--drop);
}
.shelf { padding: 6px 14px 0; }
.shelf__label { font-size: 1.05rem; color: var(--choc); margin: 8px 0 2px; }
.shelf__label small { font-family: var(--body); font-size: 0.75rem; font-weight: 800; color: var(--jam-deep); margin-left: 6px; }
.shelf__row {
  --row: 84px;
  list-style: none; margin: 0 0 8px; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: var(--row);
  background:
    linear-gradient(180deg, transparent calc(var(--row) - 14px), #c8915b calc(var(--row) - 14px), var(--wood-dark) calc(var(--row) - 4px), rgba(62, 35, 24, 0.18) calc(var(--row) - 4px)) 0 0 / 100% var(--row);
}
.shelf__row li { display: flex; justify-content: center; align-items: flex-end; padding-bottom: 12px; }
.shelf__row button {
  border: 0; background: none; padding: 0; cursor: pointer; border-radius: 10px;
  transition: transform 0.18s ease;
}
.shelf__row img { height: 62px; width: auto; max-width: 100%; object-fit: contain; }
.shelf__row button:hover, .shelf__row button[aria-pressed="true"] { transform: translateY(-6px) scale(1.08); }
.cabinet__bio {
  margin: 14px 14px 0; min-height: 3.2em; padding: 10px 14px; border-radius: 14px;
  background: var(--cream); font-weight: 700; font-size: 0.95rem;
}
.cabinet__bio b { font-family: var(--display); font-weight: 400; color: var(--jam-deep); }
.dressup { display: grid; grid-template-columns: 120px 1fr; gap: 18px; align-items: center; margin: 22px 14px 0; }
.dressup__jar { width: 100%; height: auto; }
.dressup h3 { font-size: 1.2rem; margin-bottom: 6px; }
.dressup p { font-size: 0.95rem; margin-bottom: 10px; }
.dressup__acc { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.dressup__acc li {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--cream); padding: 4px 12px 4px 6px; border-radius: 999px; font-size: 0.82rem; font-weight: 800;
}
.dressup__acc img { height: 26px; width: auto; }

/* ---------- Photos pegged on the line ---------- */
.line { position: relative; padding: clamp(72px, 10vw, 110px) 0; background: var(--cream); overflow: hidden; }
.line .chapter__head { padding: 0 var(--gutter); }
.line .chapter__head h2 { font-size: clamp(2rem, 4.6vw, 3.3rem); }
.line__track {
  position: relative;
  display: flex; gap: 34px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 40px max(var(--gutter), calc((100vw - var(--wrap)) / 2)) 34px;
  scrollbar-width: thin; scrollbar-color: var(--mint-deep) transparent;
}
.line__track::before {
  content: ""; position: absolute; left: 0; top: 30px; height: 2px; width: 100%;
  min-width: calc(8 * 254px + 7 * 34px + 200px);
  background: linear-gradient(90deg, #b9a385, #8f7a5d);
}
.snap {
  position: relative; flex: 0 0 auto; width: 220px; margin: 0;
  background: #fff; padding: 10px 10px 54px; border-radius: 4px;
  box-shadow: 0 16px 24px -16px rgba(62, 35, 24, 0.6);
  scroll-snap-align: center; transform-origin: 50% -20px;
}
.snap:nth-child(odd) { transform: rotate(-2.4deg); }
.snap:nth-child(even) { transform: rotate(2deg); }
.snap::before {
  content: ""; position: absolute; top: -18px; left: 50%; width: 14px; height: 40px; margin-left: -7px; border-radius: 4px;
  background: linear-gradient(90deg, #d8a46d, #b47a45);
  box-shadow: 0 2px 2px rgba(62, 35, 24, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}
.snap img { border-radius: 2px; width: 100%; height: auto; }
.snap figcaption {
  position: absolute; left: 8px; right: 8px; bottom: 10px; text-align: center;
  font-family: var(--display); color: var(--choc); font-size: 0.98rem; line-height: 1.15;
}

/* ---------- Footer: the wooden counter ---------- */
.foot { position: relative; background-image: var(--wood-grain); background-size: var(--wood-size); color: var(--choc-dark); }
.foot::before {
  content: ""; display: block; height: 14px;
  background: url("../assets/img/art/gingham.jpg") 0 0 / 48px 48px;
}
.foot__inner {
  max-width: var(--wrap); margin: 0 auto; padding: 38px var(--gutter) 34px;
  display: grid; grid-template-columns: 1fr auto; gap: 18px 30px; align-items: center;
}
.foot__brand { display: flex; gap: 16px; align-items: center; }
.foot__brand img { border-radius: 14px; box-shadow: 0 0 0 3px var(--cream); }
.foot__name { font-family: var(--display); font-size: 1.4rem; margin: 0 0 2px; }
.foot__small { margin: 0; font-size: 0.88rem; font-weight: 700; max-width: 48ch; }
.foot__nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot__nav a { color: var(--choc-dark); font-weight: 800; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.foot__copy { grid-column: 1 / -1; margin: 0; font-size: 0.82rem; font-weight: 700; opacity: 0.75; }

/* ---------- Document pages (guide, privacy, terms, contact) ---------- */
.doc-main { padding: 56px var(--gutter) 90px; }
.sheet {
  position: relative; max-width: 900px; margin: 0 auto;
  background:
    linear-gradient(90deg, transparent 58px, rgba(216, 70, 62, 0.35) 58px 60px, transparent 60px),
    var(--paper) url("../assets/img/art/paper.jpg") center / 520px;
  border-radius: 12px;
  box-shadow: 0 30px 50px -30px rgba(47, 107, 94, 1), 0 0 0 1px rgba(106, 62, 43, 0.08);
  padding: 0 clamp(20px, 5vw, 64px) 48px clamp(76px, 9vw, 96px);
}
.sheet::before {
  content: ""; position: absolute; top: -16px; left: 50%; width: 130px; height: 32px;
  transform: translateX(-50%) rotate(-2deg);
  background: rgba(255, 243, 220, 0.85); box-shadow: 0 2px 4px rgba(62, 35, 24, 0.15);
}
.sheet__head { padding: 48px 0 26px; border-bottom: 3px dotted rgba(106, 62, 43, 0.25); margin-bottom: 26px; }
.sheet__kicker { font-weight: 900; font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--teal); margin-bottom: 10px; }
.sheet__head h1 { font-size: clamp(2.1rem, 5vw, 3.2rem); }
.sheet__date { margin: 12px 0 0; font-weight: 700; color: rgba(58, 34, 25, 0.7); }
.sheet__summary {
  margin: 0 0 30px; padding: 16px 20px; border-radius: 14px;
  background: var(--mint-soft); color: #1f4a41; font-weight: 700;
}
.sheet .sheet__jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 34px; padding: 0; list-style: none; }
.sheet__jump a {
  display: inline-block; text-decoration: none; font-size: 0.85rem; font-weight: 800; color: var(--teal);
  background: var(--cream); padding: 6px 12px; border-radius: 999px; box-shadow: 0 2px 0 rgba(47, 107, 94, 0.25);
}
.sheet__jump a:hover { background: var(--teal); color: var(--cream); }
.sheet section { margin-bottom: 34px; scroll-margin-top: 110px; }
.sheet h2 { font-size: 1.6rem; margin-bottom: 12px; display: flex; align-items: baseline; gap: 12px; }
.sheet h2 .n {
  flex: 0 0 auto; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  font-size: 1.05rem; background: var(--jam); color: var(--cream); transform: translateY(-3px);
}
.sheet h3 { font-size: 1.2rem; margin: 18px 0 8px; color: var(--teal); }
.sheet ul { padding-left: 1.2em; }
.sheet li { margin-bottom: 6px; }
.sheet li::marker { color: var(--jam); }
.callout { padding: 14px 18px; border-radius: 14px; background: #fffaf0; border: 2px dashed rgba(216, 70, 62, 0.35); }
.treat-table { width: 100%; border-collapse: collapse; margin: 10px 0 6px; }
.treat-table th, .treat-table td { text-align: left; padding: 10px 8px; border-bottom: 2px dotted rgba(106, 62, 43, 0.2); vertical-align: middle; }
.treat-table th { font-family: var(--display); font-weight: 400; color: var(--choc); font-size: 1.02rem; }
.treat-table td img { height: 44px; width: auto; display: inline-block; vertical-align: middle; margin-right: 4px; }
.guide-figure { display: grid; grid-template-columns: 200px 1fr; gap: 24px; align-items: center; margin: 18px 0; }
.guide-figure img { border-radius: 18px; box-shadow: var(--drop); }

.contact-card {
  display: grid; grid-template-columns: 150px 1fr; gap: 26px; align-items: center;
  background: #fffaf0; padding: 24px; border-radius: 20px; box-shadow: var(--drop); margin-bottom: 30px;
}
.contact-card img { width: 150px; height: auto; }
.mail {
  display: inline-block; font-family: var(--display); font-size: clamp(1.2rem, 3vw, 1.6rem);
  color: var(--jam-deep); word-break: break-all;
}

/* ---------- Responsive ---------- */
@media (max-width: 1040px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .rcard:nth-child(even) { transform: rotate(1.2deg); }
}
@media (max-width: 900px) {
  .cover__wall { grid-template-columns: 1fr; gap: 10px; }
  .cover__copy { text-align: left; }
  .cover__phone { width: min(280px, 70vw); margin: 10px auto 0; }
  .cover__granny { right: -40%; width: 46%; }
  .down, .method, .oven-wrap, .kitchen-pair { grid-template-columns: 1fr; gap: 40px; }
  .fan { height: 360px; max-width: 520px; margin: 0 auto; }
  .oven-stage { max-width: 360px; order: -1; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .counter { height: 120px; margin-top: -20px; }
  .runway { top: -22px; }
  .cards { grid-template-columns: 1fr; }
  .rcard:nth-child(n) { transform: none; }
  .fridge-door { padding: 30px 40px 24px 16px; border-radius: 32px; }
  .fridge-notes { grid-template-columns: 1fr; }
  .fan { height: 300px; }
  .transform__col img { height: 56px; }
  .transform__arrow img { width: 60px; }
  .dressup { grid-template-columns: 80px 1fr; }
  .shelf__row img { height: 48px; }
  .foot__inner { grid-template-columns: 1fr; }
  .guide-figure, .contact-card { grid-template-columns: 1fr; }
  .guide-figure img { max-width: 220px; }
  .sheet { padding-left: 24px; background: var(--paper) url("../assets/img/art/paper.jpg") center / 520px; }
  .index-card { padding-left: 54px; background-position: -8px 0, 0 14px, 0 0; }
  .cover__granny { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .runner { display: none; }
}
