/* food.slade.run shared styles */
:root {
  --ink: #3a2418;
  --muted: #7a6255;
  --bg: #fff7ec;
  --dot: #f5e2c6;
  --card: #fff;
  --coral: #ff6b57;
  --mint: #8fd3c4;
  --butter: #ffd166;
  --pink: #ffc2cf;
  --sky: #b7def2;
  --lilac: #d9c8f5;
  --radius: 22px;
  --edge: #3a2418;
  --rule: #ecdcc6;
  --chip: #f6ecdf;
  --opt: #fbf6ee;
  --t-butter: #fff3d6;
  --t-mint: #e3f6f1;
  --t-pink: #ffe8ee;
  --t-pink2: #fff5f7;
  --t-sky: #eaf4fb;
  --scene1: #ffdcb4;
  --scene2: #ffeed8;
  --scene-dot: rgba(255,255,255,.6);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--ink);
  background-color: var(--bg);
  background-image: radial-gradient(var(--dot) 1.6px, transparent 1.8px);
  background-size: 22px 22px;
  font: 17px/1.55 ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
main { max-width: 720px; margin: 0 auto; padding: 22px 18px 72px; }
a { color: var(--coral); font-weight: 700; }

/* Characters */
.char { display: block; width: 56px; height: 56px; }
.bob { animation: bob 2.6s ease-in-out infinite; transform-origin: 50% 90%; }
.bob:nth-child(2) { animation-delay: .25s; }
.bob:nth-child(3) { animation-delay: .5s; }
.bob:nth-child(4) { animation-delay: .75s; }
.bob:nth-child(5) { animation-delay: 1s; }
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-7px) rotate(4deg); }
}
@media (prefers-reduced-motion: reduce) { .bob, .card .char { animation: none !important; transition: none !important; } }

.parade { display: flex; align-items: flex-end; gap: 4px; margin: 6px 0 4px; }
.parade .char { width: 58px; height: 58px; }

/* Type */
h1 { font-size: 2.6rem; line-height: 1.05; font-weight: 900; letter-spacing: -.02em; margin: 8px 0 6px; }
h1 .squiggle { background: linear-gradient(transparent 62%, var(--butter) 62%); padding: 0 4px; border-radius: 4px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.sub { color: var(--muted); margin: 0 0 18px; font-size: 1.05rem; }
h2 {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.45rem; font-weight: 900; margin: 40px 0 12px;
}
h2 .char { width: 48px; height: 48px; flex: none; }
h2 mark { color: inherit; background: linear-gradient(transparent 60%, var(--pink) 60%); padding: 0 4px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
h3 {
  display: inline-block; margin: 20px 0 8px;
  font-size: .8rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  background: var(--mint); border: 2px solid var(--edge); border-radius: 999px; padding: 3px 12px;
}
h3.butter { background: var(--butter); }
h3.pink { background: var(--pink); }
h3.sky { background: var(--sky); }
h3.lilac { background: var(--lilac); }

/* Sticker surfaces */
.sticker, .card, table, .checklist, input[type=search] {
  background: var(--card);
  border: 2.5px solid var(--edge);
  border-radius: var(--radius);
  box-shadow: 4px 4px 0 var(--edge);
}

/* Pill links and buttons */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font: inherit; font-size: .9rem; font-weight: 800; text-decoration: none; color: var(--ink);
  background: var(--card); border: 2px solid var(--edge); border-radius: 999px;
  padding: 5px 14px; box-shadow: 2px 2px 0 var(--edge); cursor: pointer;
}
.pill:active { transform: translate(2px, 2px); box-shadow: none; }
.pill[aria-pressed=true] { background: var(--coral); color: #fff; }

/* Speech bubble */
.bubble { display: flex; align-items: center; gap: 12px; margin: 18px 0 6px; }
.bubble .char { width: 76px; height: 76px; flex: none; }
.bubble p {
  position: relative; margin: 0; padding: 12px 15px;
  background: var(--butter); border: 2.5px solid var(--edge); border-radius: 18px; box-shadow: 3px 3px 0 var(--edge);
  font-weight: 600;
}
.bubble p::before {
  content: ""; position: absolute; left: -11px; top: 50%; width: 16px; height: 16px; margin-top: -8px;
  background: var(--butter); border-left: 2.5px solid var(--edge); border-bottom: 2.5px solid var(--edge);
  transform: rotate(45deg); border-radius: 0 0 0 4px;
}

/* Checklist */
.checklist { list-style: none; margin: 0; padding: 4px 16px; }
.checklist li { padding: 10px 0; border-bottom: 2px dashed var(--rule); }
.checklist li:last-child { border-bottom: 0; }
.checklist label { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.checklist input {
  -webkit-appearance: none; appearance: none; flex: none;
  width: 26px; height: 26px; margin: 0; margin-top: 1px;
  border: 2.5px solid var(--edge); border-radius: 9px; background: var(--card); cursor: pointer;
  transition: background-color .15s, transform .15s;
}
.checklist input:checked {
  background: var(--coral) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 80% no-repeat;
  transform: rotate(-6deg) scale(1.05);
}
.checklist input:focus-visible { outline: 3px solid var(--butter); outline-offset: 2px; }
.checklist input:checked + span { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 2px; }

/* Steps */
ol.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; }
ol.steps li { counter-increment: step; position: relative; padding: 2px 0 14px 46px; }
ol.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 32px; height: 32px; display: grid; place-items: center;
  font-weight: 900; font-size: .95rem; background: var(--mint);
  border: 2.5px solid var(--edge); border-radius: 50%;
}
ol.steps.butter li::before { background: var(--butter); }
ol.steps.pink li::before { background: var(--pink); }

/* Tables */
table { width: 100%; border-collapse: separate; border-spacing: 0; overflow: hidden; }
th, td { text-align: left; vertical-align: top; padding: 11px 13px; border-bottom: 2px dashed var(--rule); }
th { background: var(--butter); font-size: .8rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; border-bottom: 2.5px solid var(--edge); }
tr:last-child td { border-bottom: 0; }
td:first-child { font-weight: 800; }
/* Timeline */
ol.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 3px dashed var(--edge); }
ol.timeline li { position: relative; margin: 0 0 16px; padding: 12px 14px 12px 16px; background: var(--card);
  border: 2.5px solid var(--edge); border-radius: 18px; box-shadow: 3px 3px 0 var(--edge); }
ol.timeline li::before { content: ""; position: absolute; left: -30px; top: 16px; width: 16px; height: 16px;
  background: var(--coral); border: 2.5px solid var(--edge); border-radius: 50%; }
ol.timeline li:nth-child(even)::before { background: var(--mint); }
ol.timeline .when { display: inline-block; font-size: .82rem; font-weight: 900; color: #fff; background: var(--coral);
  border-radius: 999px; padding: 2px 10px; margin-bottom: 6px; }
ol.timeline p { margin: 0; }

/* Tips */
ul.tips { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
ul.tips li { padding: 13px 15px; }
ul.tips li:nth-child(4n+1) { background: var(--t-butter); }
ul.tips li:nth-child(4n+2) { background: var(--t-mint); }
ul.tips li:nth-child(4n+3) { background: var(--t-pink); }
ul.tips li:nth-child(4n+4) { background: var(--t-sky); }

footer { margin-top: 44px; color: var(--muted); font-size: .88rem; text-align: center; }
footer .parade { justify-content: center; opacity: .9; }
footer .parade .char { width: 34px; height: 34px; }

/* Home page */
.tools { display: flex; flex-direction: column; gap: 12px; margin: 6px 0 24px; }
input[type=search] { width: 100%; padding: 13px 16px; font: inherit; color: var(--ink); border-radius: 16px; }
input[type=search]:focus { outline: 3px solid var(--butter); outline-offset: 2px; }
.tool-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tool-row .filters { display: contents; }
.tool-row .filter-tags { order: 2; }
.pill.sort { order: 1; margin-left: auto; flex: none; display: inline-flex; align-items: center; gap: 4px; font-size: .85rem; font-weight: 600; color: var(--muted); background: var(--card); cursor: pointer; }
.pill.sort select { appearance: none; -webkit-appearance: none; border: 0; background: transparent; color: var(--ink); font: inherit; font-weight: 800; padding: 0 14px 0 0; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: right 5px center, right 0 center; background-size: 5px 5px; background-repeat: no-repeat; }
.pill.sort select:focus-visible { outline: 3px solid var(--butter); outline-offset: 2px; border-radius: 6px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filter-tags { display: flex; flex-wrap: wrap; gap: 8px; flex-basis: 100%; padding: 10px; border: 2.5px dashed var(--edge); border-radius: 16px; background: var(--card); }
.filter-toggle .caret { font-size: .8em; margin-left: 2px; }
.pill.clear { background: var(--card); font-size: .85rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
a.card { display: flex; flex-direction: column; overflow: hidden; color: inherit; text-decoration: none; font-weight: 400; transition: transform .15s, box-shadow .15s; }
a.card:hover, a.card:focus-visible { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--edge); }
a.card:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--edge); }
.card-top { display: grid; place-items: center; height: 108px; border-bottom: 2.5px solid var(--edge); background: var(--butter);
  background-image: radial-gradient(rgba(255,255,255,.55) 2px, transparent 2.2px); background-size: 16px 16px; }
.card-top .char { width: 86px; height: 86px; transition: transform .2s; }
a.card:hover .card-top .char { transform: rotate(-8deg) scale(1.08); }
.card-body { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 16px; flex: 1; }
.card-body h2 { margin: 0; font-size: 1.25rem; }
.card-body p { margin: 0; color: var(--muted); font-size: .95rem; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: .76rem; font-weight: 800; background: var(--chip); border-radius: 999px; padding: 2px 10px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .85rem; font-weight: 700; color: var(--muted); margin-top: auto; padding-top: 4px; }
.empty[hidden] { display: none; }
.empty { display: flex; align-items: center; gap: 12px; color: var(--muted); font-weight: 700; }
.empty .char { width: 56px; height: 56px; }

@media print {
  body { background: var(--card); }
  .bob { animation: none; }
  .sticker, .card, table, .checklist { box-shadow: none; }
}

/* Serving scaler */
.scaler-bar { position: sticky; top: 10px; z-index: 5; display: flex; justify-content: center; margin: 16px 0 4px; pointer-events: none; }
.scaler {
  pointer-events: auto;
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800; background: var(--mint);
  border: 2.5px solid var(--edge); border-radius: 999px; box-shadow: 3px 3px 0 var(--edge);
  padding: 6px 8px 6px 16px;
}
.scaler select {
  -webkit-appearance: none; appearance: none;
  font: inherit; font-weight: 900; color: var(--ink);
  background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%233a2418' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 8px center / 16px no-repeat;
  border: 2px solid var(--edge); border-radius: 999px;
  padding: 4px 30px 4px 12px; cursor: pointer;
}
.scaler select:focus-visible { outline: 3px solid var(--butter); outline-offset: 2px; }
.scaler span:last-child { padding-right: 8px; }
[data-qty] { font-weight: 800; }
.callout { margin: 12px 0; padding: 12px 15px; background: var(--t-butter); border: 2.5px solid var(--edge); border-radius: 18px; box-shadow: 3px 3px 0 var(--edge); }
.callout[hidden] { display: none; }
td:last-child [data-qty] { white-space: normal; }

/* Tap-to-check tracking */
:root { --done: #d6f3e8; --done-ink: #2f7a5f; }
.trackable { cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background-color .2s, color .2s; }
.trackable:focus-visible { outline: 3px solid var(--butter); outline-offset: 2px; }

/* Shopping list rows */
.checklist li { margin: 0 -16px; padding: 10px 16px; }
.checklist li.done { background: var(--done); }
.checklist li:first-child { border-radius: 19px 19px 0 0; }
.checklist li:last-child { border-radius: 0 0 19px 19px; }
.checklist li:only-child { border-radius: 19px; }

/* Numbered steps */
ol.steps li { border-radius: 16px; margin: 0 -10px 6px; padding: 8px 10px 10px 56px; }
ol.steps li::before { left: 10px; top: 6px; }
ol.steps li.done { background: var(--done); color: var(--done-ink); }
ol.steps li.done::before { content: "\2713"; background: var(--done-ink); color: #fff; }

/* Timeline */
ol.timeline li.done { background: var(--done); color: var(--done-ink); }
ol.timeline li.done::before { background: var(--done-ink); }
ol.timeline li.done .when { background: var(--done-ink); }
ol.timeline li.done .when::after { content: " \2713"; }

/* Ingredient tables */
table.track tr:not(:first-child) td { transition: background-color .2s; }
table.track tr.done td { background: var(--done); color: var(--done-ink); }
table.track tr.done td:first-child::before { content: "\2713  "; white-space: pre; }

.track-tools { display: flex; justify-content: flex-end; margin: 10px 0 0; }
.reset-checks { background: var(--card); }
.reset-checks[hidden] { display: none; }
.trackable.done { cursor: default; }

/* Undo bar */
.undo-toast {
  position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 20;
  transform: translateX(-50%); width: min(92vw, 460px);
  display: flex; align-items: center; gap: 12px; overflow: hidden;
  padding: 12px 12px 14px 16px; background: var(--ink); color: #fff;
  border: 2.5px solid var(--edge); border-radius: 18px; box-shadow: 4px 4px 0 var(--coral);
  font-weight: 700; font-size: .95rem;
  animation: toast-in .2s ease-out;
}
.undo-toast[hidden] { display: none; }
.undo-toast span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.undo-toast button {
  font: inherit; font-weight: 900; color: var(--ink); background: var(--butter);
  border: 2px solid #fff; border-radius: 999px; padding: 6px 16px; cursor: pointer; flex: none;
}
.undo-timer { position: absolute; left: 0; bottom: 0; height: 4px; width: 100%; background: var(--coral); transform-origin: left; }
@keyframes toast-in { from { transform: translate(-50%, 20px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .undo-toast { animation: none; } }
main { padding-bottom: 110px; }
.hint { font-size: .9rem; font-weight: 700; color: var(--muted); margin-top: -4px; }

/* Home page scene (folds into a bar on scroll; see assets/scene.js) */
.scene {
  /* tall enough that the shelf characters always sit below the two-line title */
  --hb-min: calc(2.1 * clamp(2.5rem, 11vw, 3.4rem) + clamp(42px, 11vw, 60px) + 150px);
  --hb: max(var(--hb-min), 33vh);
  --hs: 68px;
  --p: 0;
  position: sticky; top: calc(var(--hs) - var(--hb)); z-index: 10;
  height: var(--hb); overflow: hidden;
  background:
    radial-gradient(var(--scene-dot) 1.6px, transparent 1.8px) 0 0 / 22px 22px,
    linear-gradient(var(--scene1), var(--scene2) 75%);
  border-bottom: 2.5px solid var(--edge);
  transition: box-shadow .2s;
}
@supports (height: 1svh) { .scene { --hb: max(var(--hb-min), 33svh); } }
.scene.folded { box-shadow: 0 4px 0 rgba(58, 36, 24, .12); }
.scene-inner { position: relative; max-width: 720px; height: 100%; margin: 0 auto; }
.scene-title {
  position: absolute; left: 18px; top: 20px; z-index: 3;
  transform-origin: left top;
  transform: translateY(var(--ty, 0px)) scale(calc(1 - .58 * var(--p)));
}
.scene-title h1 { margin: 0; font-size: clamp(2.5rem, 11vw, 3.4rem); line-height: 1.02; }
.scene-title h1 .squiggle { display: inline-block; margin-bottom: 2px; }
.scene-title p { margin: 6px 0 0; max-width: 15em; font-weight: 700; color: var(--muted); opacity: calc(1 - var(--p) * 3); }
.counter {
  position: absolute; left: 0; right: 0; bottom: 0; height: 16px; z-index: 1;
  border-top: 2.5px solid var(--edge);
  background: repeating-conic-gradient(#ff9a88 0 25%, #fff 0 50%) 0 0 / 16px 16px;
}
.actor {
  position: absolute; z-index: 2;
  bottom: 8px;
  left: calc(var(--x0) + (var(--x1) - var(--x0)) * var(--p));
  width: calc(var(--s0, clamp(64px, 18vw, 96px)) + (var(--s1) - var(--s0, clamp(64px, 18vw, 96px))) * var(--p));
  transform: translateX(-50%);
}
.actor img { display: block; width: 100%; height: auto; }
.actor { will-change: left, transform; }
/* Where supported, the browser runs the title fold itself, locked to the scroll (no script lag).
   scene.js sets --fold-range (scroll distance) and --ty-end (how far the title drops). */
@supports (animation-timeline: scroll()) {
  .scene-title {
    transform: none;
    animation: title-fold linear both;
    animation-timeline: scroll(root block);
    animation-range: 0px var(--fold-range, 200px);
  }
}
@keyframes title-fold {
  from { transform: translateY(0) scale(1); }
  to { transform: translateY(var(--ty-end, 0px)) scale(.42); }
}
.actor { --s0: clamp(58px, 15.5vw, 92px); --s1: clamp(30px, 7.6vw, 40px); }
.actor.back {
  z-index: 1; --s0: clamp(42px, 11vw, 60px);
  /* --f (sideways progress), --fy (drop with bounce) and --rot are set per character by scene.js */
  bottom: calc(99px - 91px * var(--fy, 0));
  left: calc(var(--x0) + (var(--x1) - var(--x0)) * var(--f, 0));
  transform: translateX(-50%) rotate(var(--rot, 0deg));
}
.shelf {
  position: absolute; left: 7%; right: 7%; bottom: 92px; height: 10px; z-index: 0;
  background: #e0a466; border: 2.5px solid var(--edge); border-radius: 6px;
  box-shadow: 0 3px 0 rgba(58, 36, 24, .15);
  opacity: calc(1 - max(0, var(--p) - .42) * 6);
}
.shelf::before, .shelf::after {
  content: ""; position: absolute; top: 7px; width: 10px; height: 14px;
  background: #c98a4b; border: 2.5px solid var(--edge); border-top: 0; border-radius: 0 0 4px 4px;
}
.shelf::before { left: 12%; } .shelf::after { right: 12%; }
.sparkle { position: absolute; z-index: 1; font-size: 1.3rem; color: var(--coral); opacity: calc(1 - var(--p) * 3); animation: twinkle 2.4s ease-in-out infinite; }
.sparkle:nth-of-type(2n) { color: #f2b632; animation-delay: .8s; }
.sparkle:nth-of-type(3n) { color: #5fbfae; animation-delay: 1.5s; }
@keyframes twinkle { 0%, 100% { transform: scale(.8) rotate(0); } 50% { transform: scale(1.15) rotate(20deg); } }
@media (prefers-reduced-motion: reduce) { .sparkle { animation: none; } }
body.home main { min-height: 100vh; padding-top: 24px; }
.actor:nth-child(2n) img { animation-delay: .4s; }
.actor:nth-child(3n) img { animation-delay: .9s; }
.actor:nth-child(5n) img { animation-delay: 1.4s; }
@media (min-width: 600px) { .scene-title p { max-width: none; } }

/* Tucked-away extras */
details.aside {
  margin: 18px 0; padding: 12px 16px; background: var(--t-sky);
  border: 2.5px solid var(--edge); border-radius: 18px; box-shadow: 3px 3px 0 var(--edge);
}
details.aside summary { cursor: pointer; font-weight: 800; list-style: none; display: flex; align-items: center; gap: 8px; }
details.aside summary::-webkit-details-marker { display: none; }

details.aside p { margin: 10px 0 2px; }
td small { font-weight: 600; color: var(--muted); }

/* Optional specialty ingredients, kept apart from the main list */
.extras { margin: 26px 0 6px; padding: 12px 16px; border: 2.5px dashed var(--edge); border-radius: 22px; background: var(--t-pink2); }
.extras[open] { padding-bottom: 18px; }
.extras > p { margin: 12px 0; font-size: .95rem; color: var(--muted); }

/* Shared look for collapsible optional sections */
details.extras > summary, details.aside > summary {
  cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; font-weight: 800;
}
details.extras > summary::-webkit-details-marker { display: none; }
details.extras > summary::after, details.aside > summary::after {
  content: "+"; margin-left: auto; display: grid; place-items: center; width: 26px; height: 26px; flex: none;
  border: 2px solid var(--edge); border-radius: 50%; background: var(--card); font-weight: 900; line-height: 1;
  transition: transform .2s;
}
details.extras[open] > summary::after, details.aside[open] > summary::after { content: "\2212"; }
.pill-label {
  font-size: .72rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase;
  background: var(--pink); border: 2px solid var(--edge); border-radius: 999px; padding: 2px 9px;
}
.extras .checklist { box-shadow: 3px 3px 0 var(--edge); }

/* Map links: open a Google Maps search near the reader (no fixed address) */
a.map-link {
  display: inline-flex; align-items: center; gap: 4px; vertical-align: baseline;
  padding: 1px 10px 1px 7px; margin: 0 1px;
  font-weight: 800; color: var(--ink); text-decoration: none; white-space: nowrap;
  background: var(--card); border: 2px solid var(--edge); border-radius: 999px; box-shadow: 2px 2px 0 var(--edge);
}
a.map-link::before {
  content: ""; width: 14px; height: 14px; flex: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 22s7-7.2 7-12.5A7 7 0 0 0 5 9.5C5 14.8 12 22 12 22z' fill='%23ff6b57' stroke='%233a2418' stroke-width='2.2'/%3E%3Ccircle cx='12' cy='9.5' r='2.6' fill='%23fff' stroke='%233a2418' stroke-width='1.8'/%3E%3C/svg%3E") center / contain no-repeat;
}
a.map-link:active { transform: translate(2px, 2px); box-shadow: none; }
a.map-link:focus-visible { outline: 3px solid var(--butter); outline-offset: 2px; }

/* Done cards: stay on the page when a group is finished */
.done-card {
  --card-bg: #d6f3e8;
  position: relative; display: flex; align-items: center; gap: 12px;
  margin: 16px 0 6px; padding: 12px 46px 12px 12px;
  background: var(--card-bg); border: 2.5px solid var(--edge); border-radius: 20px; box-shadow: 4px 4px 0 var(--edge);
}
.done-card .char { width: 58px; height: 58px; flex: none; animation: bob 2.6s ease-in-out infinite; }
.done-card strong { display: block; font-size: 1.15rem; font-weight: 900; line-height: 1.2; }
.done-card span { display: block; color: var(--ink); opacity: .8; font-weight: 600; font-size: .95rem; }
.done-tick {
  position: absolute; right: 12px; top: 50%; margin-top: -15px; width: 30px; height: 30px;
  display: grid; place-items: center; font-size: 1rem; font-weight: 900; color: #fff;
  background: var(--done-ink); border: 2.5px solid var(--edge); border-radius: 50%;
}
.done-card.pop { animation: card-pop .55s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes card-pop { 0% { transform: scale(.6) rotate(-4deg); opacity: 0; } 100% { transform: none; opacity: 1; } }

/* Celebrations: a full-screen layer that removes itself */
.celebration { position: fixed; inset: 0; z-index: 40; pointer-events: none; overflow: hidden; }
.celebration.night { animation: night 2.8s ease-in-out forwards; }
@keyframes night { 0%, 100% { background: rgba(40, 30, 70, 0); } 25%, 70% { background: rgba(40, 30, 70, .28); } }
.celebration .bit {
  position: absolute; display: block; opacity: 0;
  animation: fly var(--dur, 2s) cubic-bezier(.2, .6, .4, 1) var(--delay, 0s) forwards;
}
.celebration .rect { width: 9px; height: 14px; border-radius: 2px; }
.celebration .dot { border-radius: 50%; animation-timing-function: cubic-bezier(.4, 0, .9, .6); }
.celebration .glyph { font-style: normal; line-height: 1; text-shadow: 0 1px 0 rgba(58, 36, 24, .35); }
.celebration .moon { font-size: 64px; color: #fff3c4; margin: -32px 0 0 -20px; }
@keyframes fly {
  0% { opacity: 0; transform: translate(0, 0) rotate(0) scale(.6); }
  8% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--rot)) scale(1); }
}
.marcher {
  position: absolute; bottom: calc(96px + env(safe-area-inset-bottom)); left: 0; width: 64px;
  animation: march 3.4s linear var(--delay) forwards; transform: translateX(-80px);
}
.marcher img { display: block; width: 100%; animation: hop .38s ease-in-out infinite alternate; }
@keyframes march { from { transform: translateX(-80px); } to { transform: translateX(calc(100vw + 80px)); } }
@keyframes hop { from { transform: translateY(0) rotate(-6deg); } to { transform: translateY(-22px) rotate(6deg); } }

/* Recipe bar: sticky strip with the servings picker; characters stand on top of it.
   The recipe name appears in it once the big title scrolls away (scale.js adds .stuck). */
.recipe-bar {
  position: sticky; top: 0; z-index: 6;
  margin: 8px -18px 4px; padding: 52px 18px 12px;
  background: linear-gradient(var(--bg) 0 82%, transparent);
}
.bar-crew {
  position: absolute; right: 30px; top: 6px; height: 50px; z-index: 2;
  display: flex; align-items: flex-end; gap: 2px; pointer-events: none;
}
.bar-crew .char { width: 44px; height: 44px; }
.bar-body {
  position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 6px 8px 6px 14px;
  background: var(--mint); border: 2.5px solid var(--edge); border-radius: 18px; box-shadow: 3px 3px 0 var(--edge);
}
.bar-body .scaler { background: none; border: 0; box-shadow: none; padding: 0; gap: 8px; }
.bar-body .scaler span:last-child { padding-right: 4px; }
.bar-title {
  display: none; flex: 1; min-width: 0;
  font-weight: 900; font-size: 1.02rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.recipe-bar.stuck .bar-body { justify-content: space-between; }
.recipe-bar.stuck .bar-title { display: block; animation: title-in .25s ease-out; }
.recipe-bar.stuck .scaler > span:first-child { display: none; }  /* "Cooking for" */
@keyframes title-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .recipe-bar.stuck .bar-title { animation: none; } }

.done-card.has-list { align-items: flex-start; }
.done-card ul { margin: 8px 0 2px; padding-left: 18px; font-size: .92rem; font-weight: 700; }
.done-card li { margin: 3px 0; }
.done-card li::marker { color: var(--coral); }
.done-card.has-list .done-tick { top: 14px; margin-top: 0; }

/* Section links under the recipe bar (scale.js builds them from the h2s) */
.toc { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 7px 2px 0; padding: 1px 1px 3px; }
.toc::-webkit-scrollbar { display: none; }
.toc a { flex: none; font-size: .78rem; font-weight: 800; line-height: 1; color: var(--ink); text-decoration: none;
  background: var(--card); border: 2px solid var(--edge); border-radius: 999px; padding: 5px 10px; box-shadow: 1.5px 1.5px 0 var(--edge); }
.toc a.on { background: var(--butter); }
.recipe-bar { padding-bottom: 8px; }

/* Characters on the bar bob gently (smaller than elsewhere so heads never clip) */
.bar-crew .bob { animation-name: bob-small; }
@keyframes bob-small { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-3px) rotate(3deg); } }
/* ...and hop when a list is finished */
.bar-crew.cheer .char { animation: cheer .5s cubic-bezier(.3, 1.6, .5, 1) both; }
.bar-crew.cheer .char:nth-child(2) { animation-delay: .06s; }
.bar-crew.cheer .char:nth-child(3) { animation-delay: .12s; }
.bar-crew.cheer .char:nth-child(4) { animation-delay: .18s; }
@keyframes cheer { 0%, 100% { transform: none; } 45% { transform: translateY(-5px) rotate(-8deg) scale(1.08); } }

/* Boops: small burst + a note when one list in a section is finished */
.boop-note {
  position: fixed; z-index: 41; pointer-events: none; transform: translate(-50%, 0);
  padding: 6px 14px; white-space: nowrap; max-width: 92vw; overflow: hidden; text-overflow: ellipsis;
  font-weight: 900; font-size: .95rem; color: var(--ink);
  background: var(--butter); border: 2.5px solid var(--edge); border-radius: 999px; box-shadow: 3px 3px 0 var(--edge);
  animation: boop-note 2.2s ease-out forwards;
}
@keyframes boop-note {
  0% { opacity: 0; transform: translate(-50%, 10px) scale(.7); }
  12% { opacity: 1; transform: translate(-50%, 0) scale(1.05); }
  20% { transform: translate(-50%, 0) scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -26px); }
}
.boop-bit {
  position: fixed; z-index: 41; pointer-events: none; width: 8px; height: 8px; border-radius: 50%;
  border: 1.5px solid var(--edge); opacity: 0;
  animation: boop-bit .8s cubic-bezier(.2, .8, .4, 1) forwards;
}
@keyframes boop-bit {
  0% { opacity: 1; transform: translate(0, 0) scale(.4); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .boop-note { animation: boop-fade 2.2s ease-out forwards; }
  @keyframes boop-fade { 0%, 80% { opacity: 1; } 100% { opacity: 0; } }
}

/* Steps look like checklists: a card with rows, a number on the left and a checkbox on the right */
ol.steps {
  padding: 4px 16px; background: var(--card);
  border: 2.5px solid var(--edge); border-radius: var(--radius); box-shadow: 4px 4px 0 var(--edge);
}
ol.steps li {
  margin: 0 -16px; padding: 12px 56px 12px 60px; border-radius: 0;
  border-bottom: 2px dashed var(--rule);
}
ol.steps li:last-child { border-bottom: 0; border-radius: 0 0 19px 19px; }
ol.steps li:first-child { border-radius: 19px 19px 0 0; }
ol.steps li:only-child { border-radius: 19px; }
ol.steps li::before { left: 16px; top: 10px; }
ol.steps li.done::before { content: counter(step); background: var(--done-ink); color: #fff; }

/* the checkbox (steps and timeline) */
ol.steps li::after, ol.timeline li::after {
  content: ""; position: absolute; right: 16px; top: 12px; width: 26px; height: 26px;
  background: var(--card); border: 2.5px solid var(--edge); border-radius: 9px;
  transition: background-color .15s, transform .15s;
}
ol.steps li.done::after, ol.timeline li.done::after {
  background: var(--coral) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 80% no-repeat;
  transform: rotate(-6deg) scale(1.05);
}
ol.timeline li { padding-right: 54px; }
ol.timeline li::after { top: 14px; right: 14px; }
ol.timeline li.done .when::after { content: ""; }

/* Ingredient table rows get the same checkbox, before the ingredient name */
table.track tr:not(:first-child) td:first-child { position: relative; padding-left: 44px; }
table.track tr:not(:first-child):not(.optional) td:first-child::before,
table.track tr.done td:first-child::before {
  content: ""; white-space: normal; position: absolute; left: 12px; top: 10px; width: 22px; height: 22px;
  background: var(--card); border: 2.5px solid var(--edge); border-radius: 8px;
}
table.track tr.done:not(:first-child):not(.optional) td:first-child::before { background: var(--coral) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 80% no-repeat; transform: rotate(-6deg); }
table.track th:first-child { padding-left: 44px; }

table.track tr.optional td { color: var(--muted); font-weight: 600; background: var(--opt); }
table.track tr.optional td:first-child::before { content: "+"; position: absolute; left: 14px; top: 11px; font-weight: 900; color: var(--muted); }

.sub.intro { margin: 0 0 14px; font-weight: 700; }

.more { margin-top: 48px; }
.more h3 { margin-bottom: 12px; }
.more .grid { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .more .grid { grid-template-columns: 1fr 1fr; } }
.mini { display: flex; align-items: center; gap: 12px; padding: 8px 14px 8px 8px; border: 2.5px solid var(--edge); border-radius: 18px; background: var(--card); color: var(--ink); text-decoration: none; box-shadow: 3px 3px 0 var(--edge); }
.mini:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--edge); }
.mini-pic { flex: none; width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; }
.mini-pic .char { width: 40px; height: 40px; }
.mini-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.mini-text strong { font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-text small { color: var(--muted); font-size: .85rem; }
.mini-go { font-weight: 800; font-size: 1.2rem; }
.more-link { text-align: center; margin: 18px 0 0; }
.more-link .pill { display: inline-block; text-decoration: none; padding: 10px 18px; }

.back { margin: 0 0 10px; }
.back .pill { display: inline-block; text-decoration: none; padding: 6px 14px; font-size: .9rem; }

/* Dark mode: follows the shared slade.run color mode (boot.js sets data-theme on <html>).
   Pastels go deep so the light ink still reads on them; outlines turn a warm tan. */
@media screen {
  :root[data-theme="dark"] {
    color-scheme: dark;
    --ink: #f6e9db;
    --muted: #c4ad9a;
    --bg: #1c1410;
    --dot: #2c2019;
    --card: #2a1f18;
    --edge: #a8876d;
    --rule: #4a3a2e;
    --chip: #3a2c22;
    --opt: #241b15;
    --coral: #ff7a66;
    --mint: #1f5a4f;
    --butter: #6e5414;
    --pink: #6e2d40;
    --sky: #1f4a63;
    --lilac: #463669;
    --t-butter: #3a2f16;
    --t-mint: #173a33;
    --t-pink: #3d1f29;
    --t-pink2: #2f1d22;
    --t-sky: #172f3f;
    --scene1: #3d2a1d;
    --scene2: #261c15;
    --scene-dot: rgba(255,255,255,.07);
    --done: #17392e;
    --done-ink: #3f9f7c;
  }
  :root[data-theme="dark"] .undo-toast { background: #f6e9db; color: #1c1410; }
  :root[data-theme="dark"] .undo-toast button { border-color: #1c1410; }
  :root[data-theme="dark"] select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%23f6e9db' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
  /* celebration cards keep their light pastel colors, so their text stays dark */
  :root[data-theme="dark"] .done-card, :root[data-theme="dark"] .done-card span { color: #3a2418; }
  :root[data-theme="dark"] .done-card { border-color: #3a2418; box-shadow: 4px 4px 0 #000; }
  :root[data-theme="dark"] .scene.folded { box-shadow: 0 4px 0 rgba(0, 0, 0, .35); }
  :root[data-theme="dark"] .char, :root[data-theme="dark"] .actor img { filter: drop-shadow(0 0 1px rgba(246, 233, 219, .35)); }
}
