/*
 * Nosh — fresh, colorful, a little silly.
 * Chunky ink outlines, sticker shadows, fruit-bowl colors.
 */

:root {
  --tomato: #ff6b5e;
  --mango: #ffb23f;
  --lemon: #ffe45c;
  --mint: #2ec99a;
  --blueberry: #5a8dee;
  --grape: #9a6bff;
  --bubblegum: #ff7eb9;

  --tomato-soft: #ffe3df;
  --mango-soft: #fff0d6;
  --lemon-soft: #fff9d1;
  --mint-soft: #d9f7ec;
  --blueberry-soft: #e1ebff;
  --grape-soft: #ece3ff;
  --bubblegum-soft: #ffe3f0;

  --ink: #2a1f3d;
  --ink-soft: #6b6280;
  --cream: #fff6e9;
  --paper: #ffffff;
  --line: 3px solid var(--ink);

  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 5px 5px 0 var(--ink);
  --shadow-sm: 3px 3px 0 var(--ink);

  --font-display: "Fredoka", "Nunito", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, sans-serif;

  --bounce: cubic-bezier(.34, 1.56, .64, 1);
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--cream);
  background-image:
    radial-gradient(circle at 20% 20%, rgb(255 178 63 / .14) 0 2px, transparent 3px),
    radial-gradient(circle at 70% 60%, rgb(255 107 94 / .12) 0 2px, transparent 3px),
    radial-gradient(circle at 40% 85%, rgb(46 201 154 / .12) 0 2px, transparent 3px);
  background-size: 90px 90px, 120px 120px, 150px 150px;
}

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 .5em; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--blueberry); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--grape); }
img { max-width: 100%; display: block; }
small { font-size: .82em; }
hr { border: 0; }

:focus-visible { outline: 3px solid var(--blueberry); outline-offset: 3px; border-radius: 6px; }

.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 10px; }
.skip-link:focus { left: 8px; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 28px 20px 60px; flex: 1; }
.narrow { max-width: 680px; }

.muted { color: var(--ink-soft); }
.text-tomato { color: #d9433a; font-weight: 700; }
.text-mango { color: #c77800; font-weight: 700; }
.text-mint { color: #12966e; font-weight: 700; }

.bg-tomato { background: var(--tomato); } .bg-tomato-soft { background: var(--tomato-soft); }
.bg-mango { background: var(--mango); } .bg-mango-soft { background: var(--mango-soft); }
.bg-lemon { background: var(--lemon); } .bg-lemon-soft { background: var(--lemon-soft); }
.bg-mint { background: var(--mint); } .bg-mint-soft { background: var(--mint-soft); }
.bg-blueberry { background: var(--blueberry); } .bg-blueberry-soft { background: var(--blueberry-soft); }
.bg-grape { background: var(--grape); } .bg-grape-soft { background: var(--grape-soft); }
.bg-bubblegum { background: var(--bubblegum); } .bg-bubblegum-soft { background: var(--bubblegum-soft); }

/* ---------- Top bar ---------- */

.topbar {
  position: sticky; top: 0; z-index: 20;
  background: var(--paper);
  border-bottom: var(--line);
}
.topbar::after { /* scalloped awning edge */
  content: ""; position: absolute; left: 0; right: 0; bottom: -13px; height: 10px;
  background: radial-gradient(circle at 10px -2px, var(--ink) 9px, transparent 10px) 0 0 / 20px 10px repeat-x;
  opacity: .9; pointer-events: none;
}
.topbar__inner { max-width: 1180px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 18px; }
.topbar__end { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.logo { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--ink); }
.logo__mark { font-size: 30px; display: inline-block; transition: transform .4s var(--bounce); }
.logo:hover .logo__mark { transform: rotate(-18deg) scale(1.15); }
.logo__word {
  font-family: var(--font-display); font-weight: 700; font-size: 30px; letter-spacing: -.5px;
  background: linear-gradient(90deg, var(--tomato), var(--mango) 45%, var(--mint) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-stroke: 1px var(--ink);
}

.nav { display: flex; gap: 2px; flex-wrap: nowrap; }
.nav__link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 11px; border-radius: 999px; border: 2px solid transparent; white-space: nowrap;
  color: var(--ink); text-decoration: none; font-weight: 800; font-size: 15px;
  transition: background .15s, transform .2s var(--bounce);
}
.nav__link:hover { background: var(--lemon-soft); color: var(--ink); transform: translateY(-2px); }
.nav__link--active { background: var(--lemon); border-color: var(--ink); }
.nav__emoji { font-size: 17px; }

/* ---------- Dropdown menus ---------- */

.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; }
.menu > summary::-webkit-details-marker { display: none; }
.menu__panel {
  position: absolute; top: calc(100% + 10px); min-width: 240px; z-index: 30;
  background: var(--paper); border: var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow);
  padding: 8px; animation: pop-in .25s var(--bounce);
}
.menu__panel--right { right: 0; }
.menu__heading { font-weight: 800; padding: 6px 10px; margin: 0; border-bottom: 2px dashed #e6dfd2; margin-bottom: 6px; }
.menu__heading small { font-weight: 600; color: var(--ink-soft); }
.menu__item {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 8px 10px; border-radius: 10px; border: 0; background: none;
  color: var(--ink); text-decoration: none; font: inherit; font-weight: 700; text-align: left; cursor: pointer;
}
.menu__item:hover { background: var(--mango-soft); color: var(--ink); }
.menu__item--active { background: var(--lemon-soft); }
.menu__item--accent { color: var(--grape); }
.menu__check { margin-left: auto; color: var(--mint); font-weight: 800; }
.menu form { margin: 0; }

.switcher {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border: var(--line); border-radius: 999px; background: var(--mango-soft);
  font-weight: 800; box-shadow: var(--shadow-sm); transition: transform .2s var(--bounce);
}
.switcher:hover { transform: translateY(-2px) rotate(-1deg); }
.switcher__name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.switcher__caret { font-size: 12px; }

.avatar {
  display: inline-grid; place-items: center; border-radius: 50%;
  border: var(--line); color: var(--ink); font-family: var(--font-display); font-weight: 700;
  flex-shrink: 0;
}
.avatar--md { width: 40px; height: 40px; font-size: 15px; }
.avatar--lg { width: 56px; height: 56px; font-size: 20px; vertical-align: middle; }

/* ---------- Buttons ---------- */

.btn {
  --btn-bg: var(--paper);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px; border: var(--line); border-radius: 999px;
  background: var(--btn-bg); color: var(--ink);
  font-family: var(--font-display); font-weight: 600; font-size: 17px; line-height: 1.2;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  box-shadow: 0 4px 0 var(--ink);
  transition: transform .15s var(--bounce), box-shadow .15s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--ink); color: var(--ink); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn--primary { --btn-bg: var(--tomato); color: #fff; text-shadow: 0 1px 0 rgb(0 0 0 / .2); }
.btn--primary:hover { color: #fff; }
.btn--mint { --btn-bg: var(--mint); }
.btn--ghost { --btn-bg: var(--paper); }
.btn--ghost:hover { --btn-bg: var(--lemon-soft); }
.btn--danger { --btn-bg: var(--paper); color: #d9433a; }
.btn--danger:hover { --btn-bg: var(--tomato-soft); color: #d9433a; }
.btn--sm { padding: 7px 14px; font-size: 15px; }
.btn--xs { padding: 4px 10px; font-size: 13px; border-width: 2px; box-shadow: 0 2px 0 var(--ink); }
.btn--lg { padding: 14px 28px; font-size: 20px; }
.btn--xl { padding: 20px 56px; font-size: 30px; border-width: 4px; box-shadow: 0 7px 0 var(--ink); }
.btn--xl:hover { box-shadow: 0 10px 0 var(--ink); }
.btn--block { width: 100%; }
.btn.is-busy, .is-busy { cursor: progress; opacity: .8; animation: wobble .6s ease-in-out infinite; }

.busy__working { display: none; }
.is-busy .busy__idle { display: none; }
.is-busy .busy__working { display: inline-flex; gap: 6px; }
.spinner { display: inline-block; animation: spin 1s linear infinite; }

.icon-button { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; text-decoration: none; transition: transform .2s var(--bounce), background .15s; }
.icon-button:hover { background: var(--lemon-soft); transform: rotate(-12deg) scale(1.1); }


form.button_to { margin: 0; }

.link-arrow { font-weight: 800; text-decoration: none; }
.link-arrow:hover { text-decoration: underline; }

/* ---------- Cards ---------- */

.card {
  background: var(--paper); border: var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}
.card--pop { transition: transform .25s var(--bounce), box-shadow .25s; }
.card--pop:hover { transform: translate(-2px, -3px) rotate(-.4deg); box-shadow: 8px 9px 0 var(--ink); }
.card--link { display: block; text-decoration: none; color: var(--ink); transition: transform .25s var(--bounce), box-shadow .25s; }
.card--link:hover { color: var(--ink); transform: translate(-2px, -3px) rotate(.6deg); box-shadow: 8px 9px 0 var(--ink); }

/* ---------- Page scaffolding ---------- */

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.page-head__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.page-title { font-size: clamp(30px, 4.5vw, 44px); margin: 0; font-weight: 700; }
.eyebrow {
  display: inline-block; margin: 0 0 6px; padding: 2px 12px; border-radius: 999px;
  background: var(--ink); color: var(--lemon);
  font-family: var(--font-display); font-size: 14px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase;
}
.eyebrow a { color: var(--lemon); text-decoration: none; }
.section-title { font-size: 23px; margin-bottom: 14px; }
.subsection-title { font-size: 19px; margin: 24px 0 10px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.section-head .section-title { margin-bottom: 14px; }
.count { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 8px; margin-left: 4px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 14px; vertical-align: middle; }

.highlight { background: linear-gradient(transparent 55%, var(--lemon) 55%); padding: 0 4px; }

.stack { display: flex; flex-direction: column; gap: 18px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: start; }
.two-col--wide-left { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }

.grid { display: grid; gap: 24px; }
.grid--cards { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.grid--recipes { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.grid--books { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 30px; }

.squiggle {
  height: 12px; margin: 22px 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='12'%3E%3Cpath d='M0 6 Q6 0 12 6 T24 6' fill='none' stroke='%232a1f3d' stroke-width='2.5'/%3E%3C/svg%3E") repeat-x center;
  opacity: .35;
}

.plain-list, .mini-list { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.plain-list li { font-weight: 700; }

/* ---------- Chips ---------- */

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips--center { justify-content: center; margin-top: 16px; }
.chips--big .chip { font-size: 18px; padding: 8px 16px; }
.chip {
  --chip-bg: var(--paper);
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 12px; border: 2px solid var(--ink); border-radius: 999px;
  background: var(--chip-bg); color: var(--ink);
  font-size: 14px; font-weight: 800; text-decoration: none; white-space: nowrap;
  transition: transform .2s var(--bounce);
}
a.chip:hover { transform: translateY(-2px) rotate(-2deg); color: var(--ink); }
.chip a { color: inherit; text-decoration: none; }
.chip--tomato { --chip-bg: var(--tomato-soft); }
.chip--mango { --chip-bg: var(--mango-soft); }
.chip--mint { --chip-bg: var(--mint-soft); }
.chip--blueberry { --chip-bg: var(--blueberry-soft); }
.chip--grape { --chip-bg: var(--grape-soft); }
.chip--bubblegum { --chip-bg: var(--bubblegum-soft); }
.chip--active { --chip-bg: var(--ink); color: #fff; }
a.chip--active:hover { color: #fff; }
.chip--tiny { font-size: 12px; padding: 1px 8px; margin-bottom: 6px; }
.chip small { opacity: .7; }
.chip__remove { border: 0; background: none; padding: 0 0 0 4px; font: inherit; font-size: 16px; line-height: 1; cursor: pointer; color: var(--ink-soft); }
.chip__remove:hover { color: #d9433a; }

/* ---------- Forms ---------- */

.form { display: flex; flex-direction: column; gap: 16px; }
.form__actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field__row { display: flex; justify-content: space-between; align-items: baseline; }
.field__hint { font-size: 14px; color: var(--ink-soft); margin: 0; }
.field__hint-link { font-size: 14px; font-weight: 700; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

label, .label { font-weight: 800; font-size: 15px; }

input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="url"],
input[type="number"], input[type="date"], select, textarea, .input {
  width: 100%; padding: 11px 14px;
  border: var(--line); border-radius: var(--radius-sm); background: var(--paper);
  font: inherit; color: var(--ink);
  transition: box-shadow .15s, transform .15s;
}
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus, .input:focus { outline: none; box-shadow: 0 0 0 4px var(--lemon), var(--shadow-sm); }
input:disabled { background: #f3eee5; color: var(--ink-soft); }
input::placeholder, textarea::placeholder { color: #aaa1b8; }
.input--big { font-family: var(--font-display); font-size: 22px; font-weight: 600; }
input[type="file"] { font: inherit; }

.fieldset { border: 2px dashed #d9cfbf; border-radius: var(--radius-sm); padding: 14px 16px 16px; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.fieldset legend { font-family: var(--font-display); font-weight: 600; font-size: 18px; padding: 0 6px; }
.fieldset legend small { font-family: var(--font-body); color: var(--ink-soft); font-weight: 600; }

.form-errors { background: var(--tomato-soft); border: var(--line); border-radius: var(--radius-sm); padding: 12px 16px; animation: wobble .5s ease-in-out 1; }
.form-errors__title { font-weight: 800; margin: 0 0 4px; }
.form-errors ul { margin: 0; padding-left: 20px; }

.inline-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.inline-form input, .inline-form select { flex: 1 1 200px; width: auto; }

.disclosure { border: 2px dashed #d9cfbf; border-radius: var(--radius-sm); padding: 10px 16px; }
.disclosure summary { cursor: pointer; font-weight: 800; }
.disclosure[open] { display: flex; flex-direction: column; gap: 14px; padding-bottom: 16px; }

.emoji-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.emoji-picker__option input, .color-picker__option input { position: absolute; opacity: 0; pointer-events: none; }
.emoji-picker__option span {
  display: grid; place-items: center; width: 44px; height: 44px; font-size: 24px;
  border: 2px solid transparent; border-radius: 12px; cursor: pointer; transition: transform .2s var(--bounce), background .15s;
}
.emoji-picker__option span:hover { background: var(--lemon-soft); transform: scale(1.15) rotate(-8deg); }
.emoji-picker__option input:checked + span { background: var(--lemon); border-color: var(--ink); box-shadow: var(--shadow-sm); }
.emoji-picker__option input:focus-visible + span { outline: 3px solid var(--blueberry); outline-offset: 2px; }

.color-picker { display: flex; gap: 10px; flex-wrap: wrap; }
.color-picker__option { position: relative; width: 40px; height: 40px; border-radius: 50%; border: var(--line); cursor: pointer; transition: transform .2s var(--bounce); }
.color-picker__option:hover { transform: scale(1.12); }
.color-picker__option:has(input:checked) { box-shadow: 0 0 0 4px var(--cream), 0 0 0 7px var(--ink); }
.color-picker__option:has(input:focus-visible) { outline: 3px solid var(--blueberry); outline-offset: 6px; }

.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; }
.toggle__track { position: relative; width: 50px; height: 28px; border: var(--line); border-radius: 999px; background: #eee6d8; transition: background .2s; }
.toggle__track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink); transition: transform .25s var(--bounce); }
.toggle input:checked + .toggle__track { background: var(--mint); }
.toggle input:checked + .toggle__track::after { transform: translateX(22px); }
.toggle input:focus-visible + .toggle__track { outline: 3px solid var(--blueberry); outline-offset: 3px; }

.search-pill {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 6px 6px 16px; border: var(--line); border-radius: 999px; background: var(--paper); box-shadow: var(--shadow-sm);
  min-width: min(100%, 360px);
}
.search-pill:focus-within { box-shadow: 0 0 0 4px var(--lemon), var(--shadow-sm); }
.search-pill input { border: 0; padding: 6px 0; background: transparent; box-shadow: none !important; flex: 1; min-width: 0; }
.search-pill--small { min-width: min(100%, 320px); }
.search-pill--big { max-width: 680px; margin: 22px auto 0; padding: 8px 8px 8px 22px; font-size: 19px; }
.search-pill--big > span { font-size: 26px; }

/* ---------- Flash & sprinkles ---------- */

.flashes { position: fixed; top: 84px; right: 20px; z-index: 40; display: flex; flex-direction: column; gap: 10px; max-width: min(420px, calc(100vw - 40px)); }
.flash {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border: var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow);
  background: var(--mint-soft); font-weight: 700;
  animation: pop-in .4s var(--bounce);
}
.flash--alert { background: var(--tomato-soft); }
.flash--leaving { animation: pop-out .3s ease-in forwards; }
.flash__icon { font-size: 24px; }
.flash__message { flex: 1; }
.flash__close { border: 0; background: none; font-size: 22px; line-height: 1; cursor: pointer; color: var(--ink); padding: 0 4px; }

.sprinkle {
  position: fixed; top: -40px; left: var(--x); z-index: 50; font-size: 28px; pointer-events: none;
  animation: sprinkle 1.8s cubic-bezier(.3, .6, .5, 1) var(--delay) forwards;
}

/* ---------- Empty states ---------- */

.empty { text-align: center; padding: 50px 20px; border: 3px dashed #d9cfbf; border-radius: var(--radius); background: rgb(255 255 255 / .5); }
.empty__emoji { font-size: 64px; display: inline-block; animation: float 3s ease-in-out infinite; }
.empty__title { font-size: 26px; margin: 10px 0 6px; }
.empty__body { color: var(--ink-soft); max-width: 460px; margin: 0 auto 16px; }
.empty__actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ---------- Auth ---------- */

.auth { position: relative; display: grid; place-items: center; padding: 20px 0 40px; }
.auth__card { position: relative; z-index: 1; width: 100%; max-width: 500px; padding: 34px; }
.auth__emoji { font-size: 56px; text-align: center; margin-top: -70px; margin-bottom: 4px; }
.auth__emoji { filter: drop-shadow(3px 3px 0 var(--ink)); animation: float 3.5s ease-in-out infinite; }
.auth__title { text-align: center; font-size: 32px; margin-bottom: 6px; }
.auth__subtitle { text-align: center; color: var(--ink-soft); margin-bottom: 22px; }
.auth__switch { text-align: center; margin: 18px 0 0; font-weight: 700; }
.auth__floaters span { position: absolute; font-size: 44px; opacity: .85; animation: float 5s ease-in-out infinite; }
.auth__floaters span:nth-child(1) { top: 6%; left: 8%; }
.auth__floaters span:nth-child(2) { top: 22%; right: 7%; animation-delay: -1s; }
.auth__floaters span:nth-child(3) { bottom: 16%; left: 12%; animation-delay: -2s; }
.auth__floaters span:nth-child(4) { bottom: 6%; right: 14%; animation-delay: -3s; }
.auth__floaters span:nth-child(5) { top: 48%; left: 2%; animation-delay: -1.5s; }
.auth__floaters span:nth-child(6) { top: 58%; right: 2%; animation-delay: -2.5s; }

/* ---------- Landing ---------- */

.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; padding: 30px 0 50px; }
.hero__title { font-size: clamp(40px, 6.5vw, 72px); font-weight: 700; letter-spacing: -1px; }
.hero__lede { font-size: 20px; color: var(--ink-soft); max-width: 560px; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.hero__signup { margin: 18px 0 0; font-weight: 700; font-size: 18px; }
.squiggle-underline {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='14'%3E%3Cpath d='M0 7 Q10 0 20 7 T40 7' fill='none' stroke='%23ff6b5e' stroke-width='4'/%3E%3C/svg%3E") repeat-x bottom / 40px 14px;
  padding-bottom: 10px;
}

.collage { position: relative; min-height: 540px; }
.polaroid {
  position: absolute; margin: 0; padding: 10px 10px 0; background: var(--paper);
  border: var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow);
  transition: transform .3s var(--bounce);
}
.polaroid img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; border: 2px solid var(--ink); }
.polaroid figcaption { font-family: var(--font-display); font-weight: 600; font-size: 18px; text-align: center; padding: 8px 0 10px; }
.polaroid:hover { transform: rotate(0) scale(1.04); z-index: 5; }
.polaroid--1 { width: 52%; top: 0; left: 2%; transform: rotate(-6deg); z-index: 2; }
.polaroid--2 { width: 44%; top: 6%; right: 0; transform: rotate(5deg); z-index: 1; }
.polaroid--3 { width: 40%; bottom: 0; left: 34%; transform: rotate(-2deg); z-index: 3; }

.sticker {
  position: absolute; z-index: 4; padding: 8px 16px; border: var(--line); border-radius: 999px;
  background: var(--lemon); font-family: var(--font-display); font-weight: 600; font-size: 17px;
  box-shadow: var(--shadow-sm); white-space: nowrap; animation: float 4.5s ease-in-out infinite;
}
.sticker--hero { bottom: 12%; left: -2%; }
.sticker--mint { background: var(--mint); bottom: -16px; right: 20px; }
.sticker--mango { background: var(--mango); top: -16px; left: 20px; }

.photo-strip { margin: 10px -20px 70px; overflow: hidden; border-block: var(--line); background: var(--lemon-soft); padding: 18px 0; }
.photo-strip__track { display: flex; gap: 18px; width: max-content; animation: strip 50s linear infinite; }
.photo-strip:hover .photo-strip__track { animation-play-state: paused; }
.photo-strip__img { width: 220px; height: 160px; object-fit: cover; border: var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); }
.photo-strip__img:nth-child(odd) { transform: rotate(-2deg); }
.photo-strip__img:nth-child(even) { transform: rotate(2deg); }

.story { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; margin-bottom: 90px; }
.story--flip .story__art { order: 2; }
.story__art { position: relative; }
.story__photo { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: var(--line); border-radius: var(--radius); box-shadow: 10px 12px 0 var(--ink); }
.story__title { font-size: clamp(28px, 3.6vw, 40px); font-weight: 700; }
.story__copy > p:not(.eyebrow) { font-size: 18px; color: var(--ink-soft); }
.checklist { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; font-weight: 700; }
.checklist li { display: flex; gap: 10px; align-items: baseline; }
.checklist li::before { content: "✓"; flex: none; display: grid; place-items: center; width: 26px; height: 26px; border: 2px solid var(--ink); border-radius: 50%; background: var(--mint); font-size: 14px; }

.tonight { margin-bottom: 90px; }
.tonight__title { text-align: center; font-size: clamp(28px, 3.6vw, 40px); font-weight: 700; margin-bottom: 30px; }
.tonight__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.tonight__card.card { padding: 12px; transition: transform .25s var(--bounce), box-shadow .25s; }
.tonight__card:nth-child(odd) { transform: rotate(-1.5deg); }
.tonight__card:nth-child(even) { transform: rotate(1.5deg); }
.tonight__card:hover { transform: translate(-2px, -4px) rotate(0); box-shadow: 8px 9px 0 var(--ink); }
.tonight__card img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border: 2px solid var(--ink); border-radius: var(--radius-sm); }
.tonight__card:nth-child(1) { background: var(--tomato-soft); }
.tonight__card:nth-child(2) { background: var(--mint-soft); }
.tonight__card:nth-child(3) { background: var(--lemon-soft); }
.tonight__card:nth-child(4) { background: var(--grape-soft); }
.tonight__card h3 { font-size: 19px; margin: 12px 4px 4px; }

.together { display: grid; grid-template-columns: 320px 1fr; gap: 36px; align-items: center; max-width: 900px; margin: 0 auto 90px; }
.together__photo { width: 100%; aspect-ratio: 1; object-fit: cover; border: var(--line); border-radius: 50%; box-shadow: var(--shadow); }
.together h2 { font-size: clamp(26px, 3vw, 34px); font-weight: 700; }
.together p { font-size: 18px; color: var(--ink-soft); margin: 0; }

.closer.card { background: var(--mango-soft); display: flex; flex-direction: column; align-items: center; text-align: center; padding: 50px 24px; transform: rotate(-.5deg); }
.closer__title { font-size: clamp(30px, 4.5vw, 48px); font-weight: 700; margin-bottom: 24px; }

/* ---------- Dashboard ---------- */

.welcome { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 34px; }
.stat { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 18px 20px; }
.stat__emoji { grid-row: span 2; font-size: 38px; transition: transform .3s var(--bounce); }
.stat:hover .stat__emoji { transform: rotate(-15deg) scale(1.2); }
.stat__number { font-family: var(--font-display); font-weight: 700; font-size: 34px; line-height: 1; }
.stat__label { font-weight: 800; color: var(--ink-soft); font-size: 14px; }

.mini-recipe { display: flex; align-items: center; gap: 12px; padding: 6px; border-radius: 12px; text-decoration: none; color: var(--ink); font-weight: 800; }
.mini-recipe:hover { background: var(--mango-soft); color: var(--ink); }
.mini-recipe__img { width: 48px; height: 48px; border-radius: 12px; border: 2px solid var(--ink); object-fit: cover; flex-shrink: 0; }
.recipe-placeholder.mini-recipe__img { font-size: 24px; }

/* ---------- Recipes ---------- */

.toolbar { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 26px; }

.recipe-placeholder {
  display: grid; place-items: center; font-size: 64px;
  background: repeating-linear-gradient(45deg, var(--mango-soft) 0 14px, var(--lemon-soft) 14px 28px);
}

.card.recipe-card { position: relative; padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.recipe-card__media { display: block; border-bottom: var(--line); }
.recipe-card__img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.recipe-card__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.recipe-card__title { font-size: 20px; margin: 0; }
.recipe-card__title a { color: var(--ink); text-decoration: none; }
.recipe-card__title a:hover { color: var(--tomato); }
.recipe-card__desc { font-size: 15px; color: var(--ink-soft); margin: 0; }
.recipe-card__meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 14px; font-weight: 700; color: var(--ink-soft); margin: 0; }
.recipe-card__body .btn--block { margin-top: auto; }
.recipe-card .favorite { position: absolute; top: 12px; right: 12px; }

.favorite form { margin: 0; }
.favorite__button {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  border: var(--line); background: var(--paper); font-size: 20px; cursor: pointer; box-shadow: var(--shadow-sm);
  transition: transform .25s var(--bounce);
}
.favorite__button:hover { transform: scale(1.15) rotate(-10deg); }
.favorite__button--on { background: var(--bubblegum-soft); animation: heartbeat .5s var(--bounce); }

.recipe { display: flex; flex-direction: column; gap: 26px; }
.card.recipe__hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); padding: 0; overflow: hidden; }
.recipe__hero:hover { transform: none; box-shadow: var(--shadow); }
.recipe__media { border-right: var(--line); min-height: 320px; }
.recipe__img { width: 100%; height: 100%; object-fit: cover; min-height: 320px; }
.recipe__intro { padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.recipe__intro .eyebrow, .recipe-card__body > .chip { align-self: flex-start; }
.recipe__title { font-size: clamp(30px, 4vw, 44px); margin: 0; font-weight: 700; }
.recipe__description { font-size: 18px; color: var(--ink-soft); margin: 0; }
.recipe__actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.recipe__byline { font-size: 14px; margin: 0; }
.recipe__body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 26px; align-items: start; }
.recipe__ingredients { position: sticky; top: 90px; }

.facts { list-style: none; margin: 0; padding: 0; display: flex; gap: 12px; flex-wrap: wrap; }
.facts li {
  display: grid; grid-template-columns: auto auto; column-gap: 8px; align-items: center;
  padding: 8px 14px; border: 2px solid var(--ink); border-radius: var(--radius-sm); background: var(--lemon-soft);
}
.facts span { grid-row: span 2; font-size: 24px; }
.facts strong { font-family: var(--font-display); font-size: 18px; line-height: 1.1; }
.facts small { color: var(--ink-soft); font-weight: 700; line-height: 1; }

.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { border-bottom: 2px dashed #eee4d4; }
.checklist li:last-child { border-bottom: 0; }
.checklist label { display: flex; align-items: flex-start; gap: 10px; padding: 9px 2px; font-weight: 600; cursor: pointer; }
.checklist input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--mint); flex-shrink: 0; }
.checklist__badge { margin-left: auto; white-space: nowrap; font-weight: 800; color: #12966e; background: var(--mint-soft); border-radius: 999px; padding: 0 8px; }
.checklist__item--done span { text-decoration: line-through; text-decoration-thickness: 2px; color: var(--ink-soft); }

.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.steps li { counter-increment: step; position: relative; padding-left: 56px; min-height: 40px; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: -2px;
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: var(--line); background: var(--mango); font-family: var(--font-display); font-weight: 700; font-size: 18px;
}
.steps li:nth-child(3n+2)::before { background: var(--mint); }
.steps li:nth-child(3n)::before { background: var(--bubblegum); }

/* ---------- Fridge ---------- */

.quick-add { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 30px; padding: 14px 16px; background: var(--mint-soft); }
.quick-add__emoji { font-size: 30px; }
.quick-add input[type="text"] { flex: 2 1 200px; width: auto; }
.quick-add .quick-add__qty { flex: 1 1 120px; }
.quick-add select { flex: 1 1 140px; width: auto; }

.fridge { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; align-items: start; }
.fridge__shelf--fridge { background: linear-gradient(var(--blueberry-soft), var(--paper) 120px); }
.fridge__shelf--freezer { background: linear-gradient(#e6f7ff, var(--paper) 120px); }
.fridge__shelf--pantry { background: linear-gradient(var(--mango-soft), var(--paper) 120px); }
.fridge__deals { margin: 12px 0 0; font-weight: 800; }
.fridge__shelf--shopping { position: relative; background: linear-gradient(var(--bubblegum-soft), var(--paper) 120px); }
.fridge__shopping-link { color: var(--ink); text-decoration: none; }
.fridge__shopping-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.fridge__shelf--shopping .ingredient__actions { position: relative; z-index: 1; }

.ingredient-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ingredient {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border: 2px solid var(--ink); border-radius: var(--radius-sm); background: var(--paper);
  transition: transform .2s var(--bounce);
}
.ingredient:hover { transform: translateX(4px) rotate(-.5deg); }
.ingredient__emoji { font-size: 26px; }
.ingredient__info { flex: 1; display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.ingredient__info small { color: var(--ink-soft); font-weight: 600; }
.ingredient__actions { display: flex; align-items: center; gap: 4px; }
.ingredient--out { background: #faf6ef; border-style: dashed; }
.ingredient--out .ingredient__emoji { filter: grayscale(.8); opacity: .7; }
.ingredient--expiring { background: var(--lemon-soft); }

/* ---------- Cookbooks ---------- */

.book {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px;
  aspect-ratio: 3 / 4; padding: 20px 18px 18px 30px;
  border: var(--line); border-radius: 6px 18px 18px 6px; box-shadow: 7px 7px 0 var(--ink);
  color: var(--ink); text-decoration: none;
  transition: transform .3s var(--bounce), box-shadow .3s;
}
.book:hover { color: var(--ink); transform: rotate(-3deg) translateY(-6px); box-shadow: 10px 12px 0 var(--ink); }
.book__spine { position: absolute; left: 12px; top: 0; bottom: 0; width: 3px; background: var(--ink); opacity: .35; }
.book__emoji { position: absolute; top: 20px; right: 18px; font-size: 52px; filter: drop-shadow(2px 2px 0 var(--ink)); }
.book__title { font-family: var(--font-display); font-size: 22px; line-height: 1.15; background: var(--paper); border: 2px solid var(--ink); border-radius: 10px; padding: 6px 10px; }
.book__count { font-weight: 800; }

.cookbook-banner {
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  padding: 26px; margin-bottom: 30px; border: var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.cookbook-banner__emoji { font-size: 72px; filter: drop-shadow(3px 3px 0 var(--ink)); }
.cookbook-banner p { margin: 6px 0 0; font-weight: 700; }
.cookbook-banner__actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }

/* ---------- Suggestions ---------- */

.match { display: flex; gap: 18px; padding: 14px; align-items: center; }
.match--ready { background: var(--mint-soft); }
.match__media { flex-shrink: 0; }
.match__img { width: 110px; height: 110px; object-fit: cover; border-radius: var(--radius-sm); border: 2px solid var(--ink); }
.recipe-placeholder.match__img { font-size: 44px; }
.match__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.match__head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.match__title { font-size: 20px; margin: 0; }
.match__title a { color: var(--ink); text-decoration: none; }
.match__title a:hover { color: var(--tomato); }
.match__percent { font-family: var(--font-display); font-weight: 700; font-size: 20px; white-space: nowrap; }
.match__detail { font-size: 15px; margin: 0; }

.meter { height: 16px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); overflow: hidden; }
.meter__fill {
  display: block; height: 100%; width: var(--fill);
  background: repeating-linear-gradient(-45deg, var(--mint) 0 10px, #5fdcb5 10px 20px);
  border-right: 2px solid var(--ink); animation: fill-up 1s var(--bounce);
}

/* ---------- Discover ---------- */

.discover-hero { text-align: center; margin-bottom: 36px; }
.results-count { font-weight: 700; margin-bottom: 18px; }

.deals { scroll-margin-top: 20px; }
.deals .search-pill { max-width: 560px; margin-bottom: 14px; }
.deals__ideas { margin-bottom: 22px; }
.deals__where summary { cursor: pointer; font-weight: 700; list-style: none; }
.deals__where summary::-webkit-details-marker { display: none; }
.deals__where .inline-form { margin-top: 8px; }
.deals__setup { display: flex; gap: 20px; align-items: center; max-width: 680px; }
.deals__setup h3 { margin: 0 0 4px; }
.deals__setup p { margin: 0; }
.deals__setup-emoji { font-size: 64px; animation: float 4s ease-in-out infinite; }

.grid--deals { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 20px; }
.grid--flyers { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 20px; }
.deals__head-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.deal-card, .flyer-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.deal-card__media { display: block; }
.deal-card__name a { color: var(--ink); text-decoration: none; }
.deal-card__name a:hover { color: var(--tomato); }
.deal-card__toggle { width: 100%; margin-top: 8px; }
.deal-card__img { width: 100%; aspect-ratio: 1; object-fit: contain; background: var(--paper); border-bottom: var(--line); padding: 10px; }
.deal-card__body { padding: 12px 14px 14px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; flex: 1; }
.deal-card__body .chip--tiny { margin-bottom: 0; white-space: normal; }
.deal-card__name { font-size: 16px; margin: 0; line-height: 1.3; }
.deal-card__price { margin: 4px 0 0; font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--tomato); }
.flyer-card__img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: top; border-bottom: var(--line); }
.flyer-card__body { padding: 10px 14px 12px; display: flex; flex-direction: column; line-height: 1.3; }

@media (max-width: 560px) {
  .deals__setup { flex-direction: column; text-align: center; }
  .grid--deals, .grid--flyers { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
}

.loading { text-align: center; padding: 50px 0; font-weight: 800; font-size: 18px; }
.loading__pot { position: relative; display: inline-block; font-size: 80px; margin-bottom: 10px; }
.loading__pot span { position: absolute; left: 50%; top: 10px; font-size: 30px; animation: toss 1.6s ease-in-out infinite; }
.loading__pot span:nth-child(2) { animation-delay: .4s; }
.loading__pot span:nth-child(3) { animation-delay: .8s; }
.loading__pot span:nth-child(4) { animation-delay: 1.2s; }

/* ---------- Favorite stores ---------- */

.favorite-stores { margin-top: 26px; }
.favorite-stores__list { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-direction: column; gap: 10px; }
.favorite-stores__item { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px; border: 2px solid var(--ink); border-radius: var(--radius-sm); }
.favorite-stores__info { flex: 1; display: flex; flex-direction: column; min-width: 160px; line-height: 1.3; }
.favorite-stores__info small { color: var(--ink-soft); font-weight: 600; }
.favorite-stores__actions { display: flex; gap: 6px; }

/* ---------- Account settings ---------- */

.kitchen-card { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; font-size: 19px; }
.kitchen-card__emoji { font-size: 56px; }
.kitchen-card small { color: var(--ink-soft); font-weight: 700; }

.member-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.member { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px; border: 2px solid var(--ink); border-radius: var(--radius-sm); }
.member__info { flex: 1; display: flex; flex-direction: column; min-width: 140px; line-height: 1.3; }
.member__info small { color: var(--ink-soft); }
.member__actions { display: flex; gap: 6px; }
.invite-list { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-direction: column; gap: 8px; }
.invite-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 12px; border: 2px dashed #d9cfbf; border-radius: var(--radius-sm); font-weight: 700; }
.invite-list small { color: var(--ink-soft); font-weight: 600; }

/* ---------- Footer ---------- */

.footer { text-align: center; padding: 28px 20px 36px; color: var(--ink-soft); font-weight: 700; border-top: 2px dashed #e3d8c6; }
.footer p { margin: 0; }
.wiggle { display: inline-block; animation: wobble 2s ease-in-out infinite; }

/* ---------- Animations ---------- */

@keyframes pop-in { from { opacity: 0; transform: scale(.85) translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes pop-out { to { opacity: 0; transform: scale(.85) translateX(40px); } }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-10px) rotate(3deg); } }
@keyframes wobble { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-4deg); } 75% { transform: rotate(4deg); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes heartbeat { 0% { transform: scale(1); } 40% { transform: scale(1.3); } 100% { transform: scale(1); } }
@keyframes fill-up { from { width: 0; } }
@keyframes strip { to { transform: translateX(-50%); } }
@keyframes toss {
  0% { transform: translate(-50%, 30px) rotate(0); opacity: 0; }
  20% { opacity: 1; }
  50% { transform: translate(-50%, -60px) rotate(180deg); }
  100% { transform: translate(-50%, 30px) rotate(360deg); opacity: 0; }
}
@keyframes sprinkle {
  0% { transform: translate(0, 0) rotate(0); opacity: 1; }
  100% { transform: translate(var(--drift), 105vh) rotate(var(--spin)); opacity: .9; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1220px) {
  .topbar__inner { flex-wrap: wrap; }
  .nav { order: 3; width: 100%; overflow-x: auto; padding-bottom: 4px; }
}

@media (max-width: 1000px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 800px) {
  body { font-size: 16px; }
  .two-col, .two-col--wide-left, .recipe__body, .hero { grid-template-columns: 1fr; }
  .card.recipe__hero { grid-template-columns: 1fr; }
  .recipe__media { border-right: 0; border-bottom: var(--line); min-height: 0; }
  .recipe__img { min-height: 0; height: auto; aspect-ratio: 2 / 1; max-height: 260px; }
  .recipe__ingredients { position: static; }
  .story, .together { grid-template-columns: 1fr; gap: 30px; }
  .story--flip .story__art { order: 0; }
  .together__photo { max-width: 240px; margin: 0 auto; }
  .tonight__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .collage { min-height: 0; aspect-ratio: 1 / 1.1; }
  .switcher__name { display: none; }
  .flashes { top: auto; bottom: 16px; right: 16px; left: 16px; max-width: none; }
}

@media (max-width: 560px) {
  .container { padding: 20px 16px 50px; }
  .topbar__inner { padding: 8px 16px; }
  .field-grid, .field-grid--3 { grid-template-columns: 1fr; }
  .stats { gap: 12px; }
  .stat { padding: 14px; }
  .stat__emoji { font-size: 28px; }
  .stat__number { font-size: 26px; }
  .card { padding: 18px; }
  .auth__card { padding: 26px 20px; }
  .btn--xl { width: 100%; padding: 16px 28px; font-size: 26px; }
  .photo-strip { margin-inline: -16px; }
  .photo-strip__img { width: 160px; height: 120px; }
  .sticker { font-size: 14px; padding: 6px 12px; }
  .sticker--hero { left: 0; bottom: 30%; }
  .tonight__grid { gap: 14px; }
  .tonight__card h3 { font-size: 16px; }
  .match { flex-direction: column; align-items: stretch; }
  .match__img { width: 100%; height: 160px; }
  .recipe__img { aspect-ratio: 5 / 2; max-height: 180px; }
  .recipe__intro { padding: 18px; gap: 12px; }
  .recipe__description { font-size: 16px; }
  .cookbook-banner__actions { margin-left: 0; }
}

/* ---------- Printable / in-store shopping list ---------- */

.print-body { background: #fff; background-image: none; }

.shopping {
  max-width: 640px;
  margin: 0 auto;
  padding: 16px max(16px, env(safe-area-inset-right)) calc(40px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}

.shopping__bar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin: 0 -16px 8px; padding: 10px 16px;
  background: rgb(255 255 255 / .94); backdrop-filter: blur(6px);
  border-bottom: 2px solid var(--ink);
}
.shopping__bar-actions { display: flex; gap: 8px; }

.shopping__head h1 { font-size: clamp(30px, 8vw, 40px); margin: 14px 0 2px; }
.shopping__meta { margin: 0 0 8px; color: var(--ink-soft); font-weight: 600; }

.shopping__part + .shopping__part { margin-top: 40px; }
.shopping__part-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.shopping__part-title { font-size: clamp(22px, 6vw, 28px); margin: 0; }
.shopping__part-actions { display: flex; gap: 8px; }
.shopping__route-note { margin: 4px 0 0; color: var(--ink-soft); font-weight: 600; font-size: 15px; }

.shopping__store-head { display: flex; align-items: center; gap: 10px; }
.shopping__stop {
  flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px;
  border-radius: 50%; background: var(--ink); color: var(--lemon); font-size: 15px; letter-spacing: 0;
}
.shopping__store-name { flex: 1; min-width: 0; }
.shopping__distance { font-size: 13px; color: var(--ink-soft); white-space: nowrap; }
.shopping__address { margin: 6px 0 0; color: var(--ink-soft); font-size: 14px; font-weight: 600; }
.shopping__price { color: var(--tomato); font-weight: 800; }
.shopping__address-link { margin-left: 4px; font-weight: 800; }
.shopping__address-link--add { color: var(--tomato); }

.shopping__item:has(.shopping__remove) { display: flex; align-items: center; }
.shopping__item:has(.shopping__remove) > label { flex: 1; min-width: 0; }
.shopping__remove {
  border: 0; background: none; padding: 10px; font: inherit; font-size: 18px; line-height: 1;
  color: var(--ink-soft); cursor: pointer; border-radius: 50%;
}
.shopping__remove:hover { color: #d9433a; background: var(--tomato-soft); }

.shopping__section { margin-top: 22px; break-inside: avoid; }
.shopping__section :is(h2, h3) {
  font-size: 15px; letter-spacing: .08em; text-transform: uppercase;
  margin: 0; padding-bottom: 6px; border-bottom: 3px solid var(--ink);
}

.shopping__items { list-style: none; margin: 0; padding: 0; }
.shopping__item { border-bottom: 1.5px dashed #cfc9d9; break-inside: avoid; }

.shopping__item label {
  display: flex; align-items: center; gap: 16px;
  min-height: 64px; padding: 10px 4px;
  cursor: pointer; -webkit-tap-highlight-color: transparent; user-select: none;
}
.shopping__item label:active { background: var(--lemon-soft); }

.shopping__check { position: absolute; opacity: 0; pointer-events: none; }

.shopping__box {
  flex: none; position: relative; width: 32px; height: 32px;
  border: 3px solid var(--ink); border-radius: 9px; background: #fff;
  transition: background-color .2s, transform .35s var(--bounce);
}
.shopping__box::after {
  content: ""; position: absolute; left: 9px; top: 2px; width: 8px; height: 16px;
  border: solid #fff; border-width: 0 4px 4px 0; transform: rotate(45deg) scale(0);
  transition: transform .25s var(--bounce);
}
.shopping__check:focus-visible + .shopping__box { outline: 3px solid var(--blueberry); outline-offset: 3px; }

.shopping__text {
  display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 12px;
  font-size: clamp(20px, 5.4vw, 24px); font-weight: 800; line-height: 1.3;
  transition: color .3s, opacity .3s;
}
.shopping__qty { font-size: .8em; font-weight: 600; color: var(--ink-soft); }

/* The strike-through is a background line that grows left to right, and follows wrapped text. */
.shopping__name, .shopping__qty {
  background: linear-gradient(currentColor, currentColor) no-repeat 0 58% / 0% 3px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}

.shopping__item--done .shopping__name,
.shopping__item--done .shopping__qty { background-size: 100% 3px; }
.shopping__item--done .shopping__text { color: var(--ink-soft); opacity: .6; }
.shopping__item--done .shopping__box { background: var(--mint); }
.shopping__item--done .shopping__box::after { transform: rotate(45deg) scale(1); }

.shopping__item--animate .shopping__name { transition: background-size .35s cubic-bezier(.65, 0, .35, 1); }
.shopping__item--animate .shopping__qty { transition: background-size .25s cubic-bezier(.65, 0, .35, 1) .2s; }
.shopping__item--animate .shopping__box { animation: shopping-pop .4s var(--bounce); }

@keyframes shopping-pop { 40% { transform: scale(1.25) rotate(-6deg); } }

.shopping__empty, .shopping__done { margin: 32px 0; text-align: center; font-family: var(--font-display); font-size: 22px; }

@media (prefers-reduced-motion: reduce) {
  .shopping__item--animate .shopping__name,
  .shopping__item--animate .shopping__qty,
  .shopping__box, .shopping__box::after { transition: none; }
  .shopping__item--animate .shopping__box { animation: none; }
}

@media print {
  @page { margin: 14mm; }
  .print-body { background: #fff; }
  .shopping { max-width: none; padding: 0; }
  .shopping__bar, .shopping__done { display: none !important; }
  .shopping__head h1 { margin-top: 0; font-size: 28pt; }
  .shopping__section :is(h2, h3) { font-size: 11pt; }
  .shopping__part-actions, .shopping__remove, .shopping__address-link { display: none !important; }
  .shopping__part-title { font-size: 16pt; }
  .shopping__part + .shopping__part { margin-top: 18pt; }
  .shopping__route-note { font-size: 9pt; }
  .shopping__address { font-size: 9pt; margin-top: 3pt; }
  .shopping__stop { width: 16pt; height: 16pt; font-size: 9pt; }
  .shopping__price { color: var(--ink); }
  .shopping__item label { min-height: 0; padding: 7pt 2pt; gap: 12pt; }
  .shopping__box { width: 16pt; height: 16pt; border-width: 1.5pt; border-radius: 3pt; }
  .shopping__box::after { display: none; }
  .shopping__text { font-size: 13pt; }
  .shopping__item--done .shopping__box { background: #fff; }
  .shopping__name, .shopping__qty { background-size: 0% 0 !important; }
  .shopping__item--done .shopping__text { opacity: 1; color: var(--ink); }
}
