:root {
  --ink: #2b2622;
  --muted: #7a716a;
  --accent: #c2541f;      /* warm terracotta — appetite-forward */
  --bg: #fbf7f1;
  --card: #ffffff;
  --line: #ece4d8;
  --maxw: 920px;
}
* { box-sizing: border-box; }
body {
  margin: 0; color: var(--ink); background: var(--bg);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header {
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--maxw); margin: 0 auto; padding: 18px 20px;
}
.brand { font-weight: 800; font-size: 1.35rem; color: var(--ink); letter-spacing: -.5px; }
.brand-logo { height: 38px; width: auto; display: block; }
.site-header nav a { margin-left: 18px; font-weight: 600; }
.nav-prefs { opacity: .75; }
.nav-prefs:hover { opacity: 1; }
main { max-width: var(--maxw); margin: 0 auto; padding: 8px 20px 48px; }

.hero { text-align: center; padding: 32px 0 24px; }
.hero--sm { padding: 14px 0 8px; }
.hero h1 { font-size: 2.2rem; margin: 0 0 8px; letter-spacing: -1px; }
.intro { color: var(--muted); max-width: 640px; margin: 0 auto 18px; }
.cta, .recipe-form button {
  display: inline-block; background: var(--accent); color: #fff; font-weight: 700;
  padding: 12px 22px; border-radius: 8px; border: 0; cursor: pointer; font-size: 1rem;
  transition: background .25s, opacity .15s;
}
.cta:hover { text-decoration: none; opacity: .92; }
.recipe-form button.is-sent { background: #4a6e2e; cursor: default; }

.hero--image {
  background-size: cover; background-position: center; border-radius: 14px;
  min-height: 320px; display: flex; align-items: center; justify-content: center;
  padding: 32px 20px; margin-top: 8px; overflow: hidden;
}
.hero--image .hero-panel {
  background: rgba(255,255,255,.80); backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px); border-radius: 12px; padding: 22px 28px;
  max-width: 600px; box-shadow: 0 6px 28px rgba(0,0,0,.10);
}
.cat-banner {
  width: 100%; height: 200px; object-fit: cover; border-radius: 12px;
  display: block; margin: 8px 0 4px;
}

.group h2 { border-bottom: 2px solid var(--line); padding-bottom: 6px; margin-top: 36px; }
.recipe-grid {
  list-style: none; padding: 0; display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.card a {
  display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; overflow: hidden; height: 100%; color: var(--ink);
}
.card a:hover { text-decoration: none; box-shadow: 0 4px 16px rgba(0,0,0,.07); }
.card img { width: 100%; aspect-ratio: 3 / 1; object-fit: cover; display: block;
  border-radius: 10px 10px 0 0; }
.card-title { font-weight: 700; padding: 10px 12px 2px; }
.card-meta { color: var(--muted); font-size: .85rem; padding: 0 12px 12px; }

.recipe h1 { font-size: 2rem; letter-spacing: -.6px; margin-bottom: 6px; }
.summary { color: var(--muted); font-size: 1.05rem; }

/* Language toggle bar — shown only on bilingual recipes */
.lang-bar { display: flex; gap: 6px; margin-bottom: 14px; }
.lang-btn { padding: 4px 14px; border-radius: 20px; border: 1px solid var(--line);
  background: none; font-size: .85rem; cursor: pointer; color: var(--muted);
  font-family: inherit; transition: background .15s, color .15s; }
.lang-btn--active, .lang-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.facts { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 16px;
  border-block: 1px solid var(--line); padding: 12px 0; margin: 18px 0; }
.facts strong { display: block; font-size: .72rem; text-transform: uppercase;
  letter-spacing: .5px; color: var(--muted); }
.hero-img { width: 100%; border-radius: 12px; margin: 8px 0 24px; }
.ingredients ul, .steps ol { padding-left: 22px; }
.ingredients li, .steps li { margin: 6px 0; }
.recipe-dish-photo { margin: 32px 0 8px; border-radius: 8px; overflow: hidden;
  height: 320px; background-size: cover; background-position: center; background-color: #e8e2d8; }
.credit { color: var(--muted); font-size: .9rem; margin-top: 28px; }
.how-to-page { max-width: 760px; margin: 0 auto; padding: 8px 16px 48px; }
.how-to-section { margin-bottom: 36px; }
.how-to-section h2 { font-size: 1.15rem; margin-bottom: 10px; }
.how-to-section p, .how-to-section li { line-height: 1.7; margin-bottom: 8px; }
.how-to-section ul, .how-to-section ol { padding-left: 22px; }
.how-to-cta { margin-top: 40px; }

/* Food Photography page */
.fp-intro p { font-size: 1.05rem; color: var(--muted); }
.fp-example { margin: 20px 0 8px; }
.fp-example img { width: 100%; max-height: 420px; object-fit: cover; border-radius: 10px; display: block; }
.fp-example figcaption { font-size: .82rem; color: var(--muted); margin-top: 8px; line-height: 1.5; }
.fp-example figcaption a { color: var(--accent); }
.fp-tip { background: #fdf7ee; border-left: 3px solid var(--accent, #e55a2b); padding: 10px 14px; border-radius: 0 8px 8px 0; font-size: .9rem; margin: 14px 0; }
.fp-tip strong { display: block; margin-bottom: 2px; }
.fp-angles { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.fp-angles li { padding: 10px 14px; background: var(--card-bg, #f8f8f8); border-radius: 8px; font-size: .92rem; line-height: 1.6; }
.fp-angles li strong { display: block; margin-bottom: 2px; color: var(--accent, #e55a2b); }

.recipe-form { display: grid; gap: 14px; max-width: 640px; }
.recipe-form label { display: grid; gap: 4px; font-weight: 600; font-size: .9rem; }
.recipe-form input, .recipe-form textarea {
  font: inherit; padding: 9px 11px; border: 1px solid var(--line); border-radius: 7px;
  background: #fff;
}
.recipe-form .row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.fineprint { color: var(--muted); font-size: .8rem; font-weight: 400; }
.photo-field input[type=file] { font: inherit; font-size: .9rem; padding: 6px 0; }
.photo-preview { margin: 0; }
.photo-preview img { max-width: 100%; max-height: 260px; border-radius: 10px;
  border: 1px solid var(--line); display: block; }

.crumbs { color: var(--muted); font-size: .85rem; padding: 12px 0 0; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.group h2 a { color: var(--ink); }
.group h2 a:hover { color: var(--accent); text-decoration: none; }

.pantry-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pantry-list li a {
  display: inline-block; padding: 6px 12px; border: 1px solid var(--line);
  border-radius: 999px; background: var(--card); font-size: .9rem; color: var(--ink);
}
.pantry-list li a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.affiliate-disclosure { color: var(--muted); margin: 4px 0 18px; }
.affiliate-disclosure--inline { margin: 0 0 10px; font-style: italic; }

.site-footer { max-width: var(--maxw); margin: 0 auto; padding: 24px 20px 80px;
  border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.site-footer .meta { font-size: .8rem; }
.newsletter { margin: 0 0 20px; }
.newsletter label { display: block; font-weight: 600; color: var(--text, #222); margin-bottom: 6px; }
.newsletter-row { display: flex; gap: 8px; max-width: 26rem; }
.newsletter-row input { flex: 1; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; font: inherit; }
.newsletter-row button { padding: 8px 16px; border: 0; border-radius: 6px; background: var(--accent, #c0392b); color: #fff; font: inherit; cursor: pointer; }
.newsletter-msg { margin: 8px 0 0; font-size: .85rem; }
@media (max-width: 560px) { .newsletter-row { flex-direction: column; } }

/* ---- Mobile layout -------------------------------------------------------- */
@media (max-width: 680px) {
  .site-header {
    flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px 16px;
  }
  .site-header nav { display: flex; flex-wrap: wrap; gap: 4px 0; }
  .site-header nav a { margin-left: 0; margin-right: 14px; font-size: .88rem; }
  main { padding: 6px 16px 40px; }
  .hero h1 { font-size: 1.6rem; }
  .recipe h1 { font-size: 1.55rem; }
  .hero--image { min-height: 220px; padding: 20px 14px; }
  .hero--image .hero-panel { padding: 16px 18px; }
  .site-footer { padding: 20px 16px 76px; }
  .category-chips { gap: 6px; }
}

.legal { max-width: 44rem; margin: 0 auto; padding: 8px 0 24px; }
.legal h2 { margin-top: 1.6em; font-size: 1.15rem; }
.legal ul { padding-left: 1.2rem; }
.legal li { margin: .3em 0; }
.notfound { max-width: 40rem; margin: 2rem auto; text-align: center; }
.my-pantry-empty { max-width: 44rem; margin: 2rem auto; text-align: center; color: var(--muted); }
.my-pantry-signin-note { font-size: .85rem; color: var(--muted); margin-top: .5rem; }
.pantry-card-aff { display: block; margin-top: 8px; font-size: .8rem; color: var(--accent); }

.faq-page details {
  border-bottom: 1px solid var(--line); padding: 2px 0;
}
.faq-page summary {
  cursor: pointer; font-weight: 600; padding: 14px 0 14px 2px;
  list-style: none; display: flex; justify-content: space-between; align-items: center;
}
.faq-page summary::-webkit-details-marker { display: none; }
.faq-page summary::after {
  content: "+"; font-size: 1.3rem; font-weight: 400; color: var(--accent);
  flex-shrink: 0; margin-left: 12px; transition: transform .2s;
}
.faq-page details[open] summary::after { content: "−"; }
.faq-page details p { margin: 0 0 16px; color: var(--ink); line-height: 1.65; }
@media (max-width: 560px) { .recipe-form .row { grid-template-columns: 1fr; } }

/* --- Accounts + community ------------------------------------------------- */
/* Nav auth state: default to signed-out until app.js resolves /auth/me. */
.js-username:empty { display: none; }
.js-username { font-weight: 700; }
body.is-signed-in .js-signin-label { display: none; }

.actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 0 20px; }
.action {
  font: inherit; font-weight: 700; font-size: .92rem; cursor: pointer;
  background: #fff; color: var(--ink); border: 1px solid var(--line);
  border-radius: 999px; padding: 8px 16px;
}
.action:hover { border-color: var(--accent); color: var(--accent); }
.action.is-on { background: var(--accent); color: #fff; border-color: var(--accent); }
.action.js-vote.is-on { background: var(--accent); }
.action-meta { color: var(--muted); font-size: .9rem; }
.action--jump { text-decoration: none; font-weight: 700; }
.action--pin { text-decoration: none; display: inline-flex; align-items: center; gap: 5px; color: #e60023; border-color: #e60023; }
.action--pin:hover { background: #e60023; color: #fff; }
.action--share-x { text-decoration: none; display: inline-flex; align-items: center; gap: 5px; color: #000; border-color: #000; }
.action--share-x:hover { background: #000; color: #fff; }

.group--featured h2 { color: var(--accent); }

.related-recipes { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 18px; display: flex; gap: 32px; flex-wrap: wrap; }
.related-group { flex: 1; min-width: 200px; }
.related-group h2 { font-size: 1rem; margin: 0 0 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.related-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.related-list a { color: var(--accent); text-decoration: none; font-size: .95rem; }
.related-list a:hover { text-decoration: underline; }

.made-it { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 18px; }
.made-intro { color: var(--muted); margin: 0 0 10px; }
.made-form { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.made-form input[type=file] { font: inherit; font-size: .9rem; }

/* Community reader photos + voting. Top-voted photo graduates to the header. */
.community-photos { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 18px; }
.photos-intro { color: var(--muted); margin: 0 0 12px; }
.photo-form { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.photo-file { display: inline-flex; align-items: center; }
.photo-file input[type=file] { font: inherit; font-size: .9rem; }
.photo-gallery { list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.photo-empty { grid-column: 1 / -1; color: var(--muted); }
.photo-item { position: relative; }
.photo-item img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 10px; display: block; }
.photo-vote { position: absolute; left: 8px; bottom: 8px;
  border: 0; border-radius: 999px; padding: 4px 10px; font: inherit; font-size: .85rem; cursor: pointer;
  background: rgba(0,0,0,.6); color: #fff; backdrop-filter: blur(2px); }
.photo-vote.is-on { background: var(--accent); }
.photo-author { display: block; margin-top: 4px; color: var(--muted); font-size: .8rem; }

/* Account page: toggle panels on .is-authed. */
.signed-in-only { display: none; }
.js-account.is-authed .signed-in-only { display: block; }
.js-account.is-authed .signed-out-only { display: none; }

/* Allergy preferences (account page) */
.allergy-prefs { margin-top: 32px; border-top: 1px solid var(--line); padding-top: 24px; }
.allergy-prefs h2 { margin: 0 0 6px; font-size: 1.1rem; }
.allergy-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 8px; }
.js-allergy-chip { cursor: pointer; font-size: .9rem; padding: 5px 14px; }

/* Recipe page: allergy inline panel + ingredient flags */
.allergy-flagged { position: relative; }
.allergy-flagged::after { content: "⚠"; font-size: .7em; margin-left: 5px; color: #c0392b; vertical-align: super; }
.allergy-panel {
  margin: 0 0 20px; padding: 12px 16px;
  border-left: 3px solid #c0392b; background: #fdf2f2;
  border-radius: 0 8px 8px 0; font-size: .9rem;
}
.allergy-panel__header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.allergy-panel__pill { font-weight: 700; color: #c0392b; font-size: .88rem; }
.allergy-panel__edit { font-size: .82rem; color: var(--muted); text-decoration: underline; white-space: nowrap; }
.allergy-panel__swaps { list-style: none; padding: 0; margin: 0 0 6px; display: flex; flex-direction: column; gap: 6px; }
.allergy-panel__row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 4px 8px; font-size: .87rem; }
.allergy-panel__row--fallback { display: block; color: var(--muted); }
.allergy-panel__from { font-weight: 600; color: var(--ink); line-height: 1.35; }
.allergy-panel__arrow { color: #c0392b; font-weight: 700; padding-top: 1px; }
.allergy-panel__to { color: var(--ink); line-height: 1.35; }
.allergy-panel__note { margin: 4px 0 0; font-size: .78rem; color: var(--muted); }
.allergy-panel__accept {
  margin-left: auto; padding: 4px 12px;
  background: var(--accent, #e55a2b); color: #fff;
  border: none; border-radius: 5px; font-size: .8rem; font-weight: 600;
  cursor: pointer; white-space: nowrap; flex-shrink: 0;
}
.allergy-panel__accept:disabled { opacity: .6; cursor: default; }
.allergy-panel__row--accepted .allergy-panel__from { text-decoration: line-through; color: var(--muted); }
.allergy-panel__row--accepted .allergy-panel__accept { background: #2ecc71; }
.allergy-swapped { color: #2ecc71 !important; }
.allergy-swapped::after { content: " ✓"; font-size: .75em; }
.allergy-panel__regen-notice { margin: 8px 0 0; color: #2ecc71; font-size: .82rem; }
mark.allergy-swapped-step {
  background: rgba(46,204,113,.15); color: inherit;
  border-radius: 3px; padding: 0 2px;
  text-decoration: line-through; text-decoration-color: #c0392b;
}
.allergy-swapped-step__new {
  text-decoration: none; font-weight: 600; color: #27ae60;
}
.allergy-note { margin: 10px 0 0; }

/* Book page: toggle on .needs-auth. */
.book-signin { display: none; }
.js-book.needs-auth .book-content { display: none; }
.js-book.needs-auth .book-signin { display: block; }
.collections-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.collections-list .muted { color: var(--muted); }
.recipe-grid .empty { color: var(--muted); grid-column: 1 / -1; }

/* --- Pantry --------------------------------------------------------------- */
.pantry-search-wrap { margin: 22px 0 0; padding: 0 20px; }
.pantry-search-input {
  display: block; width: 100%; box-sizing: border-box;
  padding: 18px 28px; font: inherit; font-size: 1.15rem;
  border: 2px solid var(--line); border-radius: 999px; background: var(--card, #fff);
}
.pantry-search-input:focus { outline: none; border-color: var(--accent); }

/* "My Pantry" bar — flat strip, appears once items are saved */
.pantry-my-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 14px 20px 0; padding: 10px 16px;
  border-left: 3px solid var(--accent); background: #fdf3ee;
}
.pantry-my-bar[hidden] { display: none; }
.pantry-bar-link { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.pantry-bar-link:hover .pantry-bar-label { text-decoration: underline; }
.pantry-bar-label { font-weight: 700; color: var(--accent); font-size: .95rem; }
.pantry-bar-count { color: var(--muted); font-size: .9rem; }
.pantry-bar-cta { font-size: .88rem; font-weight: 600; color: var(--accent); }
.pantry-bar-clear {
  margin-left: auto; font: inherit; font-size: .82rem; cursor: pointer;
  background: none; border: none; color: var(--muted); text-decoration: underline; padding: 0;
}
.pantry-bar-clear:hover { color: var(--accent); }

.view-pantry-float {
  position: fixed; bottom: 22px; left: 0; right: 0;
  width: -webkit-fit-content; width: fit-content; margin: 0 auto;
  background: var(--accent); color: #fff; font-weight: 700;
  padding: 13px 26px; border-radius: 30px; text-decoration: none;
  font-size: .97rem; box-shadow: 0 4px 20px rgba(0,0,0,.22);
  z-index: 100; white-space: nowrap; transition: opacity .15s;
}
.view-pantry-float:hover { opacity: .88; color: #fff; text-decoration: none; }
.view-pantry-float[hidden] { display: none; }

.pantry-jump { max-width: 52rem; margin: 14px auto 4px; padding: 0 20px; display: flex; flex-wrap: wrap; gap: 8px; }
.pantry-jump a {
  display: inline-block; padding: 5px 14px; border: 1px solid var(--line);
  border-radius: 999px; background: var(--card, #fff); font-size: .85rem; color: var(--ink);
}
.pantry-jump a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

.pantry-body { max-width: 52rem; margin: 0 auto; padding: 4px 20px 32px; }
.pantry-aisle { margin-bottom: 32px; }
.pantry-aisle-name {
  scroll-margin-top: 16px; margin: 0 0 14px; font-size: 1.1rem; font-weight: 800;
  letter-spacing: -.3px; border-bottom: 2px solid var(--line); padding-bottom: 8px;
}
.pantry-aisle[hidden] { display: none; }

.pantry-grid {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}
.pantry-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 14px 12px; cursor: pointer;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.pantry-card[hidden] { display: none; }
.pantry-card:hover { border-color: #d4c4ba; box-shadow: 0 2px 10px rgba(0,0,0,.05); }
.pantry-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pantry-card.is-saved { border-color: var(--accent); background: #fdf3ee; }

.pantry-card-name { display: block; font-size: .95rem; font-weight: 700; margin-bottom: 5px; }
.pantry-card-why { margin: 0; font-size: .82rem; color: var(--muted); line-height: 1.45; }

/* "Add to My Pantry" / "✓ In My Pantry" text on each card */
.pantry-card-cta { display: block; margin-top: 10px; font-size: .8rem; font-weight: 600; }
.pantry-cta-add { color: var(--accent); }
.pantry-cta-added { display: none; color: #5a7a3a; }
.pantry-card.is-saved .pantry-cta-add { display: none; }
.pantry-card.is-saved .pantry-cta-added { display: inline; }

.pantry-search-empty { text-align: center; color: var(--muted); margin: 24px auto; }

/* --- Pantry item modal ---------------------------------------------------- */
.pantry-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 200; padding: 20px;
}
.pantry-modal-overlay[hidden] { display: none; }
.pantry-modal {
  position: relative; background: #fff; border-radius: 14px;
  padding: 20px 28px 24px; max-width: 420px; width: 100%;
  box-shadow: 0 12px 48px rgba(0,0,0,.18);
  cursor: pointer; text-align: center;
}
.pantry-modal-close {
  position: absolute; top: 14px; right: 16px;
  background: none; border: none; font-size: 1.2rem; cursor: pointer;
  color: var(--muted); line-height: 1; padding: 4px 6px;
}
.pantry-modal-close:hover { color: var(--ink); }
.pantry-modal-img {
  width: 100%; height: 140px; object-fit: cover; border-radius: 10px;
  display: block; margin-bottom: 14px;
}
.pantry-modal-img[hidden] { display: none; }
.pantry-modal-title { font-size: 1.25rem; margin: 0 0 10px; padding-right: 0; }
.pantry-modal-why { color: var(--muted); font-size: .92rem; margin: 0 0 22px; line-height: 1.55; }
.pantry-modal-save {
  display: block; width: 100%; padding: 15px 24px; margin-bottom: 14px;
  background: var(--accent); color: #fff; font: inherit; font-size: 1.05rem;
  font-weight: 700; text-align: center; border: 0; border-radius: 10px;
  cursor: pointer; transition: opacity .15s;
}
.pantry-modal-save:hover { opacity: .9; }
.pantry-modal-save.is-saved { background: #4a6e2e; }
.pantry-modal-nav {
  display: flex; gap: 10px; margin-bottom: 10px;
}
.pantry-modal-nav[hidden] { display: none; }
.pantry-modal-nav-back {
  flex: 1; padding: 11px 14px; font: inherit; font-size: .93rem; font-weight: 600;
  background: #fff; color: var(--ink); border: 1px solid var(--line);
  border-radius: 8px; cursor: pointer;
}
.pantry-modal-nav-back:hover { border-color: var(--accent); color: var(--accent); }
.pantry-modal-nav-goto {
  flex: 1; padding: 11px 14px; font-size: .93rem; font-weight: 700;
  background: var(--ink); color: #fff; border-radius: 8px; text-align: center;
  text-decoration: none;
}
.pantry-modal-nav-goto:hover { opacity: .85; color: #fff; text-decoration: none; }
.pantry-modal-shop {
  display: block; text-align: center; font-size: .88rem; color: var(--muted);
  padding: 6px 0 2px;
}
.pantry-modal-shop:hover { color: var(--accent); }
.pantry-modal-shop[hidden] { display: none; }

@media (max-width: 560px) {
  .pantry-grid { grid-template-columns: 1fr 1fr; }
  .pantry-card { padding: 11px 11px 10px; }
  .pantry-modal { padding: 20px 16px 20px; }
}

/* --- Recipe search (index) ------------------------------------------------ */
.recipe-search { max-width: 44rem; margin: 4px auto 20px; }
.recipe-search input {
  width: 100%; box-sizing: border-box; padding: 12px 18px; font: inherit;
  border: 1px solid var(--line); border-radius: 999px; background: var(--card, #fff);
}
.recipe-search input:focus { outline: none; border-color: var(--accent); }
.search-empty { text-align: center; color: var(--muted); margin: 8px 0 24px; }

/* Chip row label ("Cuisine" / "Meal type") */
.chip-row-label {
  text-align: center; font-size: .75rem; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 6px;
}
/* Second chip row sits closer to the first */
.chip-row-label + .category-chips { margin-bottom: 6px; }
.category-chips + .chip-row-label { margin-top: 14px; }

/* Active-filter summary bar */
.filter-status {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; background: var(--accent); color: #fff;
  border-radius: 8px; padding: 10px 16px; margin: 0 0 20px;
  font-weight: 600; font-size: .92rem;
}
.filter-status[hidden] { display: none; }
.filter-status-clear {
  background: rgba(255,255,255,.22); border: none; color: #fff;
  border-radius: 999px; padding: 3px 12px; font: inherit; font-size: .85rem;
  cursor: pointer; white-space: nowrap; flex: none;
}
.filter-status-clear:hover { background: rgba(255,255,255,.36); }

/* "See all N recipes →" link at the bottom of a homepage cuisine section */
.see-all {
  display: block; text-align: right; font-size: .9rem; font-weight: 600;
  color: var(--accent); margin-top: 6px; padding-right: 2px;
}
.see-all:hover { text-decoration: underline; }

/* Newsletter signup */
.newsletter-block { background: var(--warm); border-radius: 12px; margin: 32px 0; padding: 28px 20px; text-align: center; }
.newsletter-inner { max-width: 480px; margin: 0 auto; }
.newsletter-heading { font-size: 1.2rem; font-weight: 700; margin: 0 0 6px; }
.newsletter-sub { color: var(--muted); font-size: .9rem; margin: 0 0 14px; }
.newsletter-form { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.newsletter-email { flex: 1 1 220px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; font: inherit; font-size: .92rem; min-width: 0; }
.newsletter-btn { padding: 10px 20px; background: var(--accent); color: #fff; border: none; border-radius: 999px; font: inherit; font-weight: 700; font-size: .92rem; cursor: pointer; }
.newsletter-btn:hover { opacity: .88; }
.newsletter-note { font-size: .88rem; color: var(--muted); margin-top: 10px; }

/* Category filter chips */
.category-chips {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
  max-width: 52rem; margin: 0 auto 26px;
}
.cat-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 12px 4px 4px; font: inherit; font-size: .9rem; color: var(--text, #222);
  background: var(--card, #fff); border: 1px solid var(--line); border-radius: 999px;
  cursor: pointer; transition: border-color .15s, box-shadow .15s, background .15s;
}
.cat-chip[data-cat-filter="all"],
.cat-chip[data-cuisine-filter="all"],
.cat-chip[data-meal-filter="all"] { padding: 6px 16px; }
.cat-chip:hover { border-color: var(--accent); }
.cat-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cat-chip.is-active {
  border-color: var(--accent); background: var(--accent);
  color: #fff; box-shadow: 0 1px 6px rgba(0,0,0,.12);
}
.cat-chip-img {
  width: 34px; height: 34px; border-radius: 50%; object-fit: cover;
  flex: none; display: block;
}
.cat-chip-label { font-weight: 600; white-space: nowrap; }
.cat-chip-count {
  color: var(--muted); font-weight: 500; font-size: .8em; margin-left: 2px;
}
.cat-chip.is-active .cat-chip-count { color: rgba(255,255,255,.8); }
.cat-chip.chip-hidden { display: none; }

/* --- Elements section ----------------------------------------------------- */
/* The elemental wheel: each slice is a real <a> link, keyboard-focusable. */
.element-wheel { display: block; width: min(440px, 92vw); height: auto; margin: 8px auto 28px; }
/* Two layers per wedge: the element photo, then a translucent color tint that keeps the
   label readable (fill comes from --fill). Hover eases the tint back to reveal the image. */
.wheel-slice path {
  stroke: #fff; stroke-width: 3; cursor: pointer;
  transition: opacity .15s ease, filter .15s ease;
}
.wheel-slice .slice-img { fill: var(--fill); filter: saturate(1.3); }  /* var() is the pre-image fallback */
.wheel-slice .slice-tint { fill: var(--fill); opacity: .18; }
.wheel-slice text {
  fill: #fff; font-weight: 700; font-size: 27px; letter-spacing: .5px;
  pointer-events: none; paint-order: stroke;
  text-shadow: 0 1px 3px rgba(0,0,0,.55), 0 0 2px rgba(0,0,0,.45);
}
.wheel-slice:hover .slice-tint { opacity: .3; }
.wheel-slice:focus { outline: none; }
.wheel-slice:focus-visible .slice-tint { stroke: #111; stroke-width: 4; }
.wheel-hub { fill: #fff; stroke: var(--line); stroke-width: 2; }
.wheel-legend { list-style: none; padding: 0; max-width: 44rem; margin: 0 auto 8px; }
.wheel-legend li { margin: .5em 0; }
.wheel-legend li a strong { color: var(--ink); }
.wheel-legend li a:hover strong { color: var(--accent); }

.hub-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; margin: 1.5em 0 2em; }
.hub-card { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; text-decoration: none; transition: box-shadow .18s, border-color .18s; }
.hub-card:hover { border-color: var(--accent); box-shadow: 0 4px 18px rgba(0,0,0,.09); }
.hub-card-img { width: 100%; height: 160px; overflow: hidden; background: var(--surface); flex-shrink: 0; }
.hub-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hub-card-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 3rem; color: var(--muted); background: var(--surface); }
.hub-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; }
.hub-card-name { font-size: 1rem; font-weight: 700; color: var(--ink); }
.hub-card-tagline { font-size: .82rem; color: var(--muted); line-height: 1.4; }

.element-card a { padding: 20px 16px 18px; }
.element-card .card-title { font-size: 1.3rem; padding: 0 0 6px; }
.element-card .card-meta { padding: 0; }
.element-body { max-width: 44rem; margin: 0 auto; padding: 8px 0 24px; }
.element-body > p { margin: 0 0 1em; }
.element-picks h2 { margin-top: 1.6em; font-size: 1.15rem;
  border-bottom: 2px solid var(--line); padding-bottom: 6px; }
.pick-list { list-style: none; padding: 0; }
.pick-list li { margin: .55em 0; }
.pick-list li a, .pick-list li strong { font-weight: 700; color: var(--ink); }
.pick-list li a:hover { color: var(--accent); }
.why { color: var(--muted); }

/* --- Staple callout card (tool/tip highlight above instructions) ----------- */
.staple-callout {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--card); border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 10px; padding: 16px 18px; margin: 1.5em 0;
}
.staple-callout-icon { font-size: 1.3rem; flex-shrink: 0; line-height: 1.4; }
.staple-callout p { margin: 0 0 6px; font-size: .95rem; line-height: 1.55; }
.staple-callout a { font-size: .9rem; font-weight: 700; color: var(--accent); }
.staple-callout a:hover { opacity: .8; }

/* --- Variant selector (staple pages) -------------------------------------- */
.variant-selector { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 1.2em; }
.variant-btn {
  padding: 8px 20px; border: 2px solid var(--line); border-radius: 20px;
  background: #fff; font: inherit; font-size: .9rem; font-weight: 600;
  cursor: pointer; transition: border-color .15s, background .15s, color .15s;
  color: var(--ink);
}
.variant-btn:hover { border-color: var(--accent); color: var(--accent); }
.variant-btn.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* --- Equipment section (recipe pages) ------------------------------------- */
.equipment { margin: 2em 0; }
.equipment h2 { font-size: 1.2rem; margin-bottom: .6em; }

/* Equipment card grid */
.equip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px; margin-top: .8em;
}
.equip-card {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  background: var(--card, #fff); border: 1px solid var(--line);
  border-radius: 12px; padding: 16px 12px 14px;
  cursor: pointer; font: inherit; text-align: center;
  transition: box-shadow .15s, border-color .15s;
}
.equip-card:hover { border-color: var(--accent); box-shadow: 0 4px 18px rgba(0,0,0,.09); }
.equip-card-img { width: 72px; height: 72px; border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.equip-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.equip-card-placeholder {
  width: 100%; height: 100%; background: var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; font-weight: 700; color: var(--muted); border-radius: 8px;
  text-transform: uppercase;
}
.equip-card-name { font-size: .82rem; font-weight: 600; color: var(--ink); line-height: 1.3; }

/* Equipment modal */
.equip-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 200; padding: 20px;
}
.equip-modal-overlay[hidden] { display: none; }
.equip-modal {
  position: relative; background: #fff; border-radius: 14px;
  padding: 20px 28px 26px; max-width: 400px; width: 100%;
  box-shadow: 0 12px 48px rgba(0,0,0,.18); text-align: center;
}
.equip-modal-close {
  position: absolute; top: 14px; right: 16px;
  background: none; border: none; font-size: 1.2rem; cursor: pointer;
  color: var(--muted); line-height: 1; padding: 4px 6px;
}
.equip-modal-close:hover { color: var(--ink); }
.equip-modal-img-wrap {
  margin-bottom: 16px;
  background: linear-gradient(135deg, #f5ede0, #fdf8f3);
  border-radius: 12px; padding: 10px;
}
.equip-modal-img { width: 100%; height: 210px; object-fit: contain; border-radius: 8px; display: block; filter: saturate(1.15); }
.equip-modal-name { font-size: 1.15rem; font-weight: 700; margin: 0 0 10px; }
.equip-modal-why { color: var(--muted); font-size: .92rem; margin: 0 0 20px; line-height: 1.55; }
.equip-modal-shop {
  display: inline-block; padding: 12px 28px;
  background: var(--accent); color: #fff; font-weight: 700;
  border-radius: 10px; text-decoration: none; font-size: .95rem;
  transition: opacity .15s;
}
.equip-modal-shop:hover { opacity: .88; color: #fff; text-decoration: none; }
.equip-modal-shop[hidden] { display: none; }

@media (max-width: 560px) {
  .equip-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
  .equip-modal { padding: 18px 16px 22px; }
}

/* --- Staples hub + individual staple pages --------------------------------- */
.staples-list { list-style: none; padding: 0; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px;
  margin: 2em 0; }
.staples-card { background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; transition: box-shadow .15s; }
.staples-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.09); }
.staples-card-link { display: flex; flex-direction: column; gap: 6px;
  padding: 20px; text-decoration: none; color: var(--ink); height: 100%; }
.staples-card-link:hover { text-decoration: none; color: var(--ink); }
.staples-card-category { font-size: .75rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--accent); }
.staples-card-title { font-size: 1.12rem; font-weight: 700; line-height: 1.3; }
.staples-card-tagline { font-size: .9rem; color: var(--muted); line-height: 1.5;
  margin-top: 2px; flex: 1; }
.staples-card-cta { font-size: .85rem; font-weight: 700; color: var(--accent);
  margin-top: 8px; }

/* --- Cuisine feature banner (e.g. Serbian Table link on /cuisine/serbian) -- */
.cuisine-feature-banner {
  display: flex; flex-direction: column; gap: 4px;
  background: var(--warm); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 18px; margin: 0 0 24px; text-decoration: none; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.cuisine-feature-banner:hover {
  border-color: var(--accent); box-shadow: 0 2px 10px rgba(0,0,0,.07);
  text-decoration: none;
}
.cuisine-feature-label {
  font-weight: 700; font-size: 1.05rem; color: var(--accent);
}
.cuisine-feature-sub { font-size: .9rem; color: var(--muted); }

/* --- Serbian menu / food festival page ------------------------------------ */
.serbian-menu-intro {
  max-width: 640px; margin: 0 auto 36px; padding: 22px 24px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  font-size: 1.02rem;
}
.serbian-menu-intro p { margin: 0 0 .8em; }
.serbian-menu-intro p:last-child { margin-bottom: 0; }
.sr-line {
  font-style: italic; color: var(--muted); font-size: .95rem;
  border-top: 1px solid var(--line); padding-top: .7em; margin-top: .7em !important;
  display: block;
}
.menu-course { margin-top: 40px; }
.course-header {
  display: flex; align-items: baseline; gap: 12px;
  border-bottom: 2px solid var(--line); padding-bottom: 6px; margin-bottom: 12px;
}
.course-header h2 { margin: 0; border: none; padding: 0; }
.course-sr {
  font-size: .88rem; font-style: italic; color: var(--muted); white-space: nowrap;
}
.course-note {
  color: var(--muted); font-size: .95rem; margin: 0 0 14px; max-width: 600px;
}
.menu-plate-builder {
  margin-top: 44px; padding: 24px 26px; background: #fef3ec;
  border: 1px solid #f0c9a8; border-radius: 12px;
}
.menu-plate-builder h2 { margin: 0 0 6px; }
.plate-steps {
  padding-left: 20px; margin: 14px 0 0;
}
.plate-steps li { margin: 8px 0; line-height: 1.5; }
.menu-timing { margin-top: 40px; }
.menu-timing h2 { border-bottom: 2px solid var(--line); padding-bottom: 6px; }
.timing-list {
  list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px;
  margin: 14px 0 0;
}
.timing-list li {
  padding: 12px 16px; background: var(--card); border: 1px solid var(--line);
  border-radius: 9px; font-size: .96rem; line-height: 1.5;
}
.timing-list li strong { color: var(--accent); display: block; margin-bottom: 2px; }

/* ── Trending recipe modal ───────────────────────────────────────────────────── */
.trending-modal[hidden] { display: none; }
.trending-modal {
  position: fixed; inset: 0; z-index: 900;
  display: flex; align-items: flex-end; justify-content: center;
}
.trending-modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.38); cursor: pointer;
}
.trending-modal__card {
  position: relative; z-index: 1;
  background: var(--card); border-radius: 18px 18px 0 0;
  width: 100%; max-width: 480px;
  padding: 20px 18px 28px;
  box-shadow: 0 -4px 32px rgba(0,0,0,.14);
  animation: trending-up .22s ease-out;
}
@keyframes trending-up {
  from { transform: translateY(60px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.trending-modal__close {
  position: absolute; top: 12px; right: 14px;
  background: var(--bg); border: none; border-radius: 50%;
  width: 30px; height: 30px; font-size: 1.1rem; line-height: 1;
  cursor: pointer; color: var(--muted); display: flex; align-items: center; justify-content: center;
}
.trending-modal__pill {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .03em;
  color: var(--accent); border: 1px solid var(--line);
  background: var(--bg); border-radius: 20px; padding: 2px 10px; margin-bottom: 10px;
}
.trending-modal__img {
  width: 100%; max-height: 160px; object-fit: cover;
  border-radius: 10px; display: block; margin-bottom: 12px;
}
.trending-modal__title {
  font-weight: 700; font-size: 1.08rem; margin: 0 0 4px; line-height: 1.3;
}
.trending-modal__summary {
  color: var(--muted); font-size: .88rem; margin: 0 0 12px; line-height: 1.45;
}
.trending-modal__cta {
  display: inline-block; background: var(--accent); color: #fff;
  font-weight: 700; font-size: .95rem; padding: 10px 20px;
  border-radius: 8px; text-decoration: none;
}
.trending-modal__cta:hover { opacity: .9; text-decoration: none; }

@media (min-width: 560px) {
  .trending-modal { align-items: center; }
  .trending-modal__card {
    border-radius: 16px; max-width: 360px;
    animation: trending-fade .2s ease-out;
  }
}
@keyframes trending-fade {
  from { transform: scale(.95); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

/* Allergy modal (bottom sheet → centered on wide screens) */
.allergy-modal {
  position: fixed; inset: 0; z-index: 1100;
  display: flex; align-items: flex-end; justify-content: center;
}
.allergy-modal__backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,.45);
}
.allergy-modal__card {
  position: relative; z-index: 1; background: var(--surface, #fff);
  border-radius: 18px 18px 0 0; padding: 22px 20px 32px;
  width: 100%; max-width: 480px; box-shadow: 0 -4px 24px rgba(0,0,0,.18);
  animation: allergy-up .22s ease-out;
}
.allergy-modal__close {
  position: absolute; top: 14px; right: 16px;
  background: none; border: none; font-size: 1.5rem; line-height: 1;
  cursor: pointer; color: var(--muted, #888); padding: 0;
}
.allergy-modal__pill {
  display: inline-block; background: #fff2f2; color: #c0392b;
  border: 1px solid #f5c6c6; border-radius: 20px;
  font-size: .85rem; font-weight: 600; padding: 4px 12px; margin-bottom: 12px;
}
.allergy-modal__hints { margin: 0 0 10px; }
.allergy-modal-hint { margin: 4px 0; font-size: .9rem; color: var(--ink); }
@media (min-width: 560px) {
  .allergy-modal { align-items: center; }
  .allergy-modal__card {
    border-radius: 14px; max-width: 380px;
    animation: allergy-fade .2s ease-out;
  }
}
@keyframes allergy-up {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
@keyframes allergy-fade {
  from { transform: scale(.95); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

/* Avoidance settings page */
.avoidance-settings h1 { font-size: 1.5rem; margin-bottom: 8px; }
.avoidance-settings .intro { color: var(--muted); margin-bottom: 24px; }
.avoidance-settings h2 { font-size: 1.1rem; margin: 28px 0 6px; }
.custom-avoid-row { display: flex; gap: 8px; margin: 10px 0 12px; }
.custom-avoid-row input { flex: 1; padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px; font-size: .95rem; background: var(--surface); color: var(--ink); }
.custom-avoid-row button { padding: 7px 16px; border-radius: 6px; background: var(--accent, #e55a2b); color: #fff; border: none; cursor: pointer; font-size: .95rem; }
.custom-avoid-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.custom-avoid-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 20px; padding: 4px 12px; font-size: .9rem;
}
.custom-avoid-remove {
  background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: 1rem; line-height: 1; padding: 0;
}
.custom-avoid-remove:hover { color: #c0392b; }

/* First-visit allergy nudge — slim bottom banner */
.allergy-nudge {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 1050;
  background: var(--surface, #fff); border-top: 1px solid var(--line, #e5e5e5);
  padding: 14px 16px 18px; box-shadow: 0 -2px 12px rgba(0,0,0,.1);
  transform: translateY(100%); transition: transform .3s ease;
}
.allergy-nudge--in  { transform: translateY(0); }
.allergy-nudge--out { transform: translateY(100%); }
.allergy-nudge__text { margin: 0 0 10px; font-size: .9rem; line-height: 1.4; color: var(--ink); }
.allergy-nudge__actions { display: flex; gap: 10px; align-items: center; }
.allergy-nudge__yes {
  padding: 7px 16px; border-radius: 6px;
  background: var(--accent, #e55a2b); color: #fff;
  font-size: .9rem; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.allergy-nudge__yes:hover { opacity: .9; text-decoration: none; }
.allergy-nudge__no {
  background: none; border: none; color: var(--muted, #888);
  font-size: .9rem; cursor: pointer; padding: 0; text-decoration: underline;
}
