/* ══════════════════════════════════════════════════════════
   Seasoned — pill-and-photo system
   Canvas-light, one berry accent, photo-forward rows.
   ══════════════════════════════════════════════════════════ */

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

/* the app fades in on arrival (e.g. from the home cover) — gentle, not a harsh cut */
@keyframes app-enter { from { opacity: 0; } to { opacity: 1; } }
body { animation: app-enter .4s ease both; }

html, body { height: 100%; }

:root {
  --canvas:      #ffffff;   /* white — page background, every view */
  --panel:       #efeae6;   /* image placeholder / subtle fill */
  --ink:         #241d20;   /* warm near-black text */
  --muted:       #8d8186;   /* warm grey, secondary text */
  --faint:       #b4a9ae;   /* tertiary */
  --rule:        #e6ded9;   /* hairlines */

  --accent:      #69140E;   /* deep brick red */
  --accent-deep: #500f0a;   /* hover */
  --accent-ink:  #ffffff;   /* text on accent */
  --accent-tint: #f4e3e1;   /* soft wash for chips */
  --accent-tint-border: #e9cfcb;

  --r:    16px;
  --r-lg: 24px;
  --pill: 999px;

  --pad:  clamp(1.25rem, 4vw, 3.5rem);  /* legacy gutter (modal, footer, etc.) */
  --edge: clamp(1.5rem, 4vw, 3rem);     /* min page gutter — matches the cover */
  --maxw: 1440px;                       /* content column cap — matches the cover */
  --gutter: max(var(--edge), calc((100% - var(--maxw)) / 2));  /* shared by topbar + sections */

  --shadow: 0 12px 32px -14px rgba(60, 25, 40, .28);
}

html { scroll-behavior: smooth; }

body {
  background: var(--canvas);
  color: var(--ink);
  font-family: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: clip;            /* never let anything widen the page past the viewport */
}
.topbar { flex-shrink: 0; }
body[data-view="home"] .topbar { display: none; }   /* home is just the hero + Mmm/Ahh */

img { display: block; max-width: 100%; }

/* ── Pills (the core UI atom) ──────────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  border-radius: var(--pill);
  font: inherit;
  font-size: .82rem;
  font-weight: 500;
  line-height: 1;
  padding: .5rem 1rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background .16s, color .16s, border-color .16s, transform .16s;
}

.pill-solid {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
.pill-solid:hover { background: var(--accent-deep); border-color: var(--accent-deep); }

.pill-ghost {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent-tint-border);
}
.pill-ghost:hover { background: var(--accent-tint); border-color: var(--accent); }

/* ── Top bar ───────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  padding: .85rem var(--gutter);
  background: color-mix(in srgb, var(--canvas) 86%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}

.topbar-brand {
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--ink);
  text-decoration: none;
}

.topbar-nav { display: flex; gap: 1.5rem; }

.topbar-link {
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  font-size: .82rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  padding: 0;
  transition: color .15s;
}
.topbar-link:hover { color: var(--accent); }

/* ── Wordmark slot ─────────────────────────────────────── */
.wordmark-block {
  text-align: center;
  padding: clamp(3rem, 9vw, 7rem) var(--pad) clamp(2rem, 5vw, 4rem);
}

.wordmark {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: clamp(4rem, 18vw, 15rem);
  line-height: .9;
  letter-spacing: -.05em;
  color: var(--accent);
  /* placeholder styling — user swaps in their own logo here */
}

.wordmark-tag {
  margin: 1.5rem auto 0;
  max-width: 30ch;
  font-size: .95rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ── Section scaffolding ───────────────────────────────── */
.section {
  padding: clamp(2rem, 5vw, 3.75rem) var(--gutter);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2.25rem;
}

.section-heading { display: flex; flex-direction: column; }
.section-eyebrow {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--accent);
  margin-bottom: .15rem;
}

.section-title {
  font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
  font-size: clamp(2.1rem, 5.5vw, 3.6rem);   /* matches the home heading so it doesn't jump on nav */
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -.02em;
  color: var(--ink);
}

.result-count {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-size: 1rem;
  color: var(--muted);
  white-space: nowrap;
}

/* ── Recipe card (shared: latest row + grid) ───────────── */
.recipe-card {
  position: relative;        /* anchor for the In-progress flag */
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: .7rem;
  font: inherit;
  color: inherit;
}

/* Completed vs in-progress grouping */
.grid-section-head {
  grid-column: 1 / -1;
  margin: .25rem 0 -.75rem;
  font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
  font-style: italic;
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: lowercase;
  color: var(--accent);
}
.grid-section-head ~ .grid-section-head { margin-top: 2.25rem; }  /* gap above "in progress" */
.grid-section-count { color: var(--faint); font-weight: 500; font-style: normal; }

.recipe-card-flag {
  position: absolute;
  top: .55rem;
  left: .55rem;
  z-index: 1;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .02em;
  padding: .26rem .52rem;
  border-radius: var(--pill);
  background: rgba(36, 29, 32, .72);
  color: #fff;
}
.recipe-card--wip .recipe-card-img.is-loaded { opacity: .7; }
.recipe-card--wip .recipe-card-title { color: var(--muted); }

/* The frame owns the shape + hover-lift; the img owns the crop (pan + zoom).
   Two separate elements so the lift transform and the zoom transform never
   fight over the same `transform` property. */
.recipe-card-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--panel);
  border-radius: 10px;
  overflow: hidden;     /* clips the zoomed image to the 4:3 crop window */
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .25s;
}
.recipe-card:hover .recipe-card-frame,
.recipe-card:focus-visible .recipe-card-frame {
  transform: translateY(-6px);   /* lift only — no scale, so corners stay crisp */
  box-shadow: var(--shadow);
}

.recipe-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Per-recipe crop, set inline as --fx/--fy (focal %) + --zoom on the card.
     Absent crop → 50% 50% / 1 → identical to the old centered cover. */
  object-position: var(--fx, 50%) var(--fy, 50%);
  transform: scale(var(--zoom, 1));
  transform-origin: var(--fx, 50%) var(--fy, 50%);
  opacity: 0;                       /* fade in once loaded (panel placeholder shows meanwhile) */
  transition: opacity .35s ease;
}
.recipe-card-img.is-loaded { opacity: 1; }

.recipe-card-body {
  display: flex;
  flex-direction: column;
  gap: .2rem;
}

.recipe-card-title {
  font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--ink);
  line-height: 1.2;
}

.recipe-card-tags {
  font-size: .8rem;
  color: var(--muted);
  line-height: 1.4;
}

.recipe-card:focus-visible { outline: none; }
.recipe-card:focus-visible .recipe-card-frame {
  outline: 2.5px solid var(--accent);   /* on the frame so it isn't clipped by overflow:hidden */
  outline-offset: 3px;
}

/* ── Latest row (horizontal scroller) + floating note ──── */
.latest-wrap { position: relative; }

.card-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(230px, 1fr);
  gap: 1.5rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  /* breathing room so the hover-lift + shadow aren't clipped by the scroller */
  padding: 14px 2px 22px;
  /* soft edge-fade so cards dissolve at the ends instead of a hard cut */
  --fade: 32px;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--fade), #000 calc(100% - var(--fade)), transparent 100%);
          mask-image: linear-gradient(to right, transparent 0, #000 var(--fade), #000 calc(100% - var(--fade)), transparent 100%);
}
/* drop the fade on whichever end you've reached */
.card-row.at-start {
  -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - var(--fade)), transparent 100%);
          mask-image: linear-gradient(to right, #000 0, #000 calc(100% - var(--fade)), transparent 100%);
}
.card-row.at-end {
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--fade), #000 100%);
          mask-image: linear-gradient(to right, transparent 0, #000 var(--fade), #000 100%);
}
.card-row.at-start.at-end { -webkit-mask-image: none; mask-image: none; }
.card-row::-webkit-scrollbar { display: none; }
.card-row .recipe-card { scroll-snap-align: start; }

/* horizontal scroller arrow buttons */
.row-nav {
  position: absolute;
  top: 36%;
  transform: translateY(-50%);
  z-index: 6;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--pill);
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow);
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: background .15s, color .15s, transform .12s;
}
.row-nav:hover { background: #fff; color: var(--accent); }
.row-nav:active { transform: translateY(-50%) scale(.92); }
.row-nav-prev { left: -.7rem; }
.row-nav-next { right: -.7rem; }
.row-nav[hidden] { display: none; }
@media (hover: none), (max-width: 600px) { .row-nav { display: none; } }

.dispatch-float {
  position: absolute;
  top: -1.25rem;
  left: -.5rem;
  z-index: 5;
  width: min(280px, 70vw);
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--r);
  padding: 1.1rem 1.2rem 1.2rem;
  box-shadow: var(--shadow);
  transform: rotate(-3deg);
  transition: transform .25s;
}
.dispatch-float:hover { transform: rotate(-1deg); }

.dispatch-close {
  position: absolute;
  top: .6rem;
  right: .7rem;
  background: none;
  border: none;
  color: rgba(255,255,255,.7);
  font-size: .75rem;
  cursor: pointer;
  line-height: 1;
}
.dispatch-close:hover { color: #fff; }

.dispatch-title { font-weight: 600; font-size: .95rem; margin-bottom: .35rem; }
.dispatch-copy { font-size: .8rem; line-height: 1.5; color: rgba(255,255,255,.85); margin-bottom: .9rem; }

.dispatch-input { display: flex; gap: .4rem; }
.dispatch-input input {
  flex: 1;
  min-width: 0;
  border: none;
  border-radius: var(--pill);
  padding: .5rem .85rem;
  font: inherit;
  font-size: .8rem;
  background: rgba(255,255,255,.92);
  color: var(--ink);
  outline: none;
}
.dispatch-input .pill {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.dispatch-input .pill:hover { background: #000; border-color: #000; }
.dispatch-float[hidden] { display: none; }

/* ── Hero image band ───────────────────────────────────── */
.hero-band {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  aspect-ratio: 21 / 9;
  background: var(--panel);
}
.hero-band img { width: 100%; height: 100%; object-fit: cover; }

.hero-band-pill {
  position: absolute;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  box-shadow: var(--shadow);
  font-size: .88rem;
  padding: .65rem 1.3rem;
}

/* ── Filters ───────────────────────────────────────────── */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem 1.75rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.filter-group { flex: 0 0 auto; }
.filter-search { flex: 1 1 240px; min-width: 200px; }

.filter-group label {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
}

.filter-group input,
.filter-group select {
  width: 100%;
  border: none;
  border-bottom: 1.5px solid var(--rule);
  border-radius: 0;
  background: transparent;
  padding: .5rem .15rem;
  font: inherit;
  font-size: .9rem;
  color: var(--ink);
  appearance: none;
  cursor: pointer;
  outline: none;
  transition: border-color .16s, color .16s;
}
.filter-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238d8186' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .15rem center;
  padding-right: 1.5rem;
}
.filter-group input::placeholder { color: var(--faint); }
.filter-group input:focus,
.filter-group select:focus { border-bottom-color: var(--accent); }

.filter-group input.active,
.filter-group select.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 500;
}
.filter-group select.active {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2369140E' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
}

.clear-btn[hidden] { display: none; }

/* ── Recipe grid ───────────────────────────────────────── */
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 2.5rem 1.75rem;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 4rem 1rem;
  text-align: center;
  font-size: .9rem;
  color: var(--muted);
}

/* ── Guides (two-up) ───────────────────────────────────── */
.guide-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

.guide-img {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--panel);
  margin-bottom: 1.1rem;
}
.guide-img img { width: 100%; height: 100%; object-fit: cover; }

.guide-pill {
  position: absolute;
  top: 1rem;
  left: 1rem;
  font-size: .72rem;
  padding: .4rem .85rem;
}

.guide-title {
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -.02em;
  margin-bottom: .5rem;
}
.guide-copy { font-size: .9rem; color: var(--muted); line-height: 1.65; max-width: 46ch; }

/* ── Tall photo trio ───────────────────────────────────── */
.photo-trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.trio-item {
  border-radius: var(--r-lg);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: var(--panel);
}
.trio-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s cubic-bezier(.2,.7,.2,1);
}
.trio-item:hover img { transform: scale(1.04); }

.trio-caption {
  text-align: center;
  margin-top: 2rem;
  font-size: .95rem;
  color: var(--muted);
}
.trio-caption .pill { margin-left: .5rem; vertical-align: middle; }

/* ── Footer ────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--rule);
  margin-top: 2rem;
  padding: clamp(2.5rem, 5vw, 4rem) var(--pad) 1.5rem;
}

.footer-cols {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, auto) 1fr;
  gap: 2.5rem 3rem;
  align-items: start;
}

.footer-head {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--faint);
  margin-bottom: 1rem;
}

.chip-list { display: flex; flex-wrap: wrap; gap: .45rem; }

.chip {
  display: inline-flex;
  align-items: center;
  border-radius: var(--pill);
  background: var(--accent-tint);
  color: var(--accent-deep);
  border: 1px solid var(--accent-tint-border);
  font: inherit;
  font-size: .78rem;
  font-weight: 500;
  padding: .35rem .8rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.chip:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

.footer-col-wide { max-width: 340px; }
.footer-copy { font-size: .85rem; color: var(--muted); line-height: 1.6; margin-bottom: 1rem; }

.footer-dispatch { display: flex; gap: .45rem; }
.footer-dispatch input {
  flex: 1;
  min-width: 0;
  border: 1.5px solid var(--rule);
  border-radius: var(--pill);
  padding: .55rem 1rem;
  font: inherit;
  font-size: .82rem;
  background: var(--canvas);
  color: var(--ink);
  outline: none;
}
.footer-dispatch input:focus { border-color: var(--accent); }

.botbar {
  max-width: var(--maxw);
  margin: 3rem auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}
.botbar-copy { font-size: .78rem; color: var(--faint); }

/* ── Modal (full-screen recipe view) ───────────────────── */
dialog#recipe-modal {
  width: 100vw; max-width: 100vw;
  height: 100vh; max-height: 100vh;
  border: none; border-radius: 0;
  padding: 0; margin: 0;
  background: var(--canvas);
  overflow-y: auto;
}
dialog#recipe-modal::backdrop { background: rgba(36,20,28,.55); }

.recipe-view-close {
  position: fixed;
  top: 1.25rem; right: 1.5rem;
  z-index: 100;
  width: 2.4rem; height: 2.4rem;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--canvas) 88%, transparent);
  backdrop-filter: blur(6px);
  border: 1px solid var(--rule);
  border-radius: var(--pill);
  color: var(--muted);
  font-size: .85rem;
  cursor: pointer;
  transition: color .15s, background .15s;
}
.recipe-view-close:hover { color: var(--accent); background: var(--canvas); }

.recipe-view { max-width: 960px; margin: 0 auto; padding: 4.5rem var(--pad) 5rem; }

.recipe-view-header { max-width: 640px; margin-bottom: 2.5rem; }
.recipe-view-category {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: .6rem;
}
.recipe-view-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.05;
  margin-bottom: 1.1rem;
}
.recipe-view-desc { font-size: 1rem; color: var(--muted); line-height: 1.7; margin-bottom: 1.4rem; }

.recipe-view-pills { display: flex; gap: .5rem; flex-wrap: wrap; }
.recipe-pill {
  font-size: .78rem;
  font-weight: 500;
  padding: .4rem .9rem;
  border-radius: var(--pill);
  background: var(--accent-tint);
  color: var(--accent-deep);
  border: 1px solid var(--accent-tint-border);
}

.recipe-gallery {
  margin: 0 0 3rem;
  border-radius: var(--r-lg);
  overflow: hidden;
  /* no placeholder fill — the photo morphs into a transparent slot, so there's
     no empty colored box flashing before the image arrives */
}
.recipe-gallery img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  object-position: center;     /* placement knob — try 'center 65%', 'center bottom' */
  border-radius: var(--r-lg);  /* keep corners rounded through the morph */
}

/* Portrait media gallery (photo + looping clip side by side) */
.recipe-media {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .9rem;
  max-width: 560px;
  margin: 0 0 3rem;
}
.recipe-media .rm-item {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--r-lg);
  background: var(--panel);     /* shown only behind the video while it buffers */
}

/* Equipment sub-section (beneath ingredients) — reuses .ingredient-grid */
.recipe-equip { margin-top: 2.25rem; }
.equip-grid { gap: 1rem .75rem; }
.equip-plus {
  margin-top: 1.1rem;
  font-size: .82rem;
  color: var(--muted);
}

/* Out-of-stock marker on recipe ingredients (subtle: dim + accent dot) */
.ing-thumb { position: relative; }
.ing-card.is-out .ing-thumb img { opacity: .42; filter: grayscale(.85); transition: opacity .2s, filter .2s; }
.ing-card.is-out .ing-thumb::after {
  content: '';
  position: absolute;
  top: 4%;
  right: 12%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--canvas);
}

/* ── Pantry view ───────────────────────────────────────── */
.pantry-intro { margin: -.5rem 0 1.75rem; color: var(--muted); font-size: .92rem; }
.pantry-intro strong { color: var(--ink); font-weight: 600; }
.pantry-tools { display: flex; align-items: center; gap: 1rem; }

/* "What can we make?" — a quiet one-liner, never a hero */
.cook-line { font-size: .88rem; color: var(--muted); margin: -.85rem 0 1.6rem; }
.cook-line:empty { display: none; }
.cook-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
}
.cook-link:hover { text-decoration: underline; }

/* per-recipe pantry status under the Ingredients heading */
.ing-stock-line { font-size: .82rem; color: var(--muted); margin: -.4rem 0 1.1rem; }
.ing-stock-line.is-missing { color: var(--accent); }

/* Location sections (Fridge / Freezer / Pantry / Equipment) + groups */
.pantry-loc { margin-bottom: 1.6rem; }
.pantry-loc-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1.5px solid var(--ink);
  padding-bottom: .45rem;
  margin-bottom: 1rem;
}
.pantry-loc-head h3 { font-size: 1.1rem; font-weight: 600; letter-spacing: -.02em; }
.pantry-loc-count { font-size: .76rem; color: var(--muted); white-space: nowrap; }
.pantry-group { margin-bottom: 1.1rem; }
.pantry-group-head {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .7rem;
}
/* grid view: groups + their tiles size to content and wrap, so sections stay
   short and there's no dead space beside single-group sections */
.is-grid .pantry-groups { display: flex; flex-wrap: wrap; gap: 1.5rem 2.4rem; align-items: flex-start; }
.is-grid .pantry-group { margin-bottom: 0; }
.is-grid .pantry-items { display: flex; flex-wrap: wrap; gap: 1rem .7rem; }
.is-grid .pantry-item { width: 84px; }
.pantry-item {
  appearance: none;
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: .4rem;
}
.pantry-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pantry-thumb img {
  max-width: 84%;
  max-height: 84%;
  object-fit: contain;
  opacity: 0;                    /* fade in once the image actually loads (no pop) */
  transition: opacity .35s ease, filter .2s, transform .2s;
}
.pantry-thumb img.is-loaded { opacity: 1; }
.pantry-item:hover .pantry-thumb img { transform: translateY(-3px); }
.pantry-label { font-size: .78rem; line-height: 1.2; color: var(--ink); }
.pantry-state { font-size: .68rem; color: var(--muted); }
.pantry-item.is-out .pantry-thumb img { opacity: .3; filter: grayscale(1); }
.pantry-item.is-out .pantry-label { color: var(--muted); }
.pantry-item.is-out .pantry-state { color: var(--accent); font-weight: 600; }
/* equipment is owned, not toggled — no stock state */
.pantry-item.is-equip { cursor: default; }
.pantry-item.is-equip:hover .pantry-thumb img { transform: none; }
.is-equip .pantry-dot { background: var(--faint); }
/* placeholder tile for items whose image you haven't sourced yet */
.pantry-thumb.is-empty { border-radius: var(--r); background: var(--panel); width: 82%; aspect-ratio: 1/1; }

/* List view */
.is-list .pantry-items { display: flex; flex-direction: column; }
.pantry-row {
  display: flex;
  align-items: center;
  gap: .8rem;
  width: 100%;
  padding: .62rem .25rem;
  background: none;
  border: none;
  border-bottom: 1px solid var(--rule);
  cursor: pointer;
  font: inherit;
  color: var(--ink);
  text-align: left;
}
.pantry-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: #7c9a6a; }  /* in stock */
.pantry-row-name { flex: 1; font-size: .92rem; }
.pantry-row-state { font-size: .78rem; color: var(--muted); }
.pantry-row.is-out .pantry-dot { background: var(--accent); }
.pantry-row.is-out .pantry-row-name { color: var(--muted); }
.pantry-row.is-out .pantry-row-state { color: var(--accent); font-weight: 600; }

/* "More to cook" carousel (reuses the .card-row scroller) */
.recipe-more {
  margin-top: 3rem;
  padding-top: 2.25rem;
  border-top: 1px solid var(--rule);
}
.recipe-more-head { margin-bottom: 1.25rem; }
.recipe-more-head h3 { font-size: 1.05rem; font-weight: 600; letter-spacing: -.01em; }

.recipe-view-body {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3.5rem;
}

.recipe-col-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1.5px solid var(--ink);
  padding-bottom: .6rem;
  margin-bottom: 1.25rem;
}
.recipe-col-head h3 { font-size: 1.05rem; font-weight: 600; letter-spacing: -.01em; }

/* Ingredients view toggle (grid ⇄ list) */
.ing-toggle {
  flex: none;
  font: inherit;
  font-size: .82rem;
  line-height: 1;
  color: var(--accent);
  background: var(--accent-tint);
  border: 1px solid var(--accent-tint-border);
  border-radius: var(--pill);
  padding: .42rem .8rem;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.ing-toggle:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* Die-cut ingredient grid */
.ingredient-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem .75rem;
}
.ing-card {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: .5rem;
}
.ing-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1 / 1;
}
.ing-thumb img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}
.ing-thumb.is-empty {
  border-radius: var(--r);
  background: var(--panel);
}
.ing-card figcaption {
  font-size: .82rem;
  line-height: 1.3;
  color: var(--ink);
}

.ingredient-list { list-style: none; }
.ingredient-list li {
  padding: .6rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: .92rem;
  line-height: 1.5;
}

.method-steps { list-style: none; }
.method-steps li {
  display: grid;
  grid-template-columns: 1.9rem 1fr;
  gap: .85rem;
  margin-bottom: 1.6rem;
}
.step-num {
  font-size: .85rem;
  font-weight: 600;
  color: var(--accent);
  border: 1.5px solid var(--accent-tint-border);
  background: var(--accent-tint);
  border-radius: var(--pill);
  width: 1.9rem; height: 1.9rem;
  display: flex; align-items: center; justify-content: center;
}
.step-text { font-size: .95rem; line-height: 1.75; margin: 0; padding-top: .15rem; }

.recipe-col-empty { font-size: .9rem; color: var(--muted); font-style: italic; }

.recipe-view-notes {
  margin-top: 3rem;
  padding: 1.5rem 1.75rem;
  background: var(--accent-tint);
  border-radius: var(--r);
  font-size: .92rem;
  color: var(--accent-deep);
  line-height: 1.7;
  max-width: 620px;
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 860px) {
  .guide-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .footer-col-wide { grid-column: 1 / -1; max-width: none; }
  .recipe-view-body { grid-template-columns: 1fr; gap: 2.5rem; }
}

@media (max-width: 600px) {
  .dispatch-float {
    position: static;
    width: 100%;
    transform: none;
    margin-bottom: 1.5rem;
  }
  .dispatch-float:hover { transform: none; }
  .latest-wrap { display: flex; flex-direction: column; }
  .hero-band { aspect-ratio: 4 / 3; }
  .photo-trio { grid-template-columns: 1fr; }
  .trio-item { aspect-ratio: 4 / 3; }
  .footer-cols { grid-template-columns: 1fr; gap: 2rem; }
  .topbar-nav { gap: 1rem; }

  /* Stack the section header so the count sits under the title, not tucked beside the wrap */
  .section-head { flex-direction: column; align-items: start; gap: .3rem; }

  /* Two-up recipe grid on phones */
  .recipe-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem .9rem; }
  .recipe-card-frame { border-radius: 12px; }
  .recipe-card-title { font-size: .82rem; }
  .recipe-card-tags { font-size: .72rem; }
}

/* ══════════════════════════════════════════════════════════
   Interaction layer — tabs, chips, zones, transitions
   ══════════════════════════════════════════════════════════ */

/* ── Category tabs (primary filter) ────────────────────── */
.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule);
}
.cat-tab {
  position: relative;
  border: none;
  background: none;
  border-radius: 0;
  color: var(--muted);
  font: inherit;
  font-size: .95rem;
  font-weight: 500;
  letter-spacing: -.01em;
  text-transform: lowercase;
  padding: .1rem 0 .8rem;
  cursor: pointer;
  transition: color .15s;
}
.cat-tab:hover { color: var(--ink); }
.cat-tab.is-active { color: var(--accent); }
.cat-tab.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--accent);
}

/* ── Active-filter chips ───────────────────────────────── */
.active-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin: 0 0 1.75rem;
}
.active-chips:empty { margin: 0; }
.chip-active {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
.chip-active:hover {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
  color: #fff;
}
.chip-x { font-size: .9em; opacity: .85; margin-left: .1em; }
.chip-clear {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--rule);
}
.chip-clear:hover {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}

/* ── In-overlay Back button ────────────────────────────── */
.recipe-view-back {
  position: fixed;
  top: 1.25rem;
  left: 1.5rem;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  background: color-mix(in srgb, var(--canvas) 88%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--rule);
  border-radius: var(--pill);
  padding: .5rem 1rem .5rem .9rem;
  font: inherit;
  font-size: .82rem;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.recipe-view-back:hover { color: var(--accent); border-color: var(--accent); }

/* branded focus for the modal buttons (replaces the UA blue ring on open) */
.recipe-view-back:focus,
.recipe-view-close:focus { outline: none; }
.recipe-view-back:focus-visible,
.recipe-view-close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-color: var(--accent);
}

/* ── Tinted section zone (Guides) ──────────────────────── */
.zone-band { background: var(--accent-tint); }
.zone-head { margin-bottom: 2rem; }
.zone-eyebrow {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: .35rem;
}

/* ── Top-bar scroll-spy indicator ──────────────────────── */
.topbar-link { position: relative; }
.topbar-link.is-current { color: var(--accent); }
.topbar-link.is-current::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -5px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

/* ── View Transitions (gated to motion-OK users) ───────── */
@media (prefers-reduced-motion: no-preference) {
  /* The photo is the only thing that moves on open/close: it morphs from
     the tapped card into the recipe hero (and back). */
  ::view-transition-group(recipe-hero) {
    animation-duration: .4s;
    animation-timing-function: cubic-bezier(.2, .7, .2, 1);
    z-index: 20;                 /* stay above the background swap */
  }
  /* Background cuts instantly — no slow root cross-fade, so the previous
     grid never ghosts through the opening recipe. */
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none;
    mix-blend-mode: normal;
  }
  /* When filtering, cards reflow/fade smoothly (each has its own name). */
  ::view-transition-group(*) {
    animation-duration: .34s;
    animation-timing-function: cubic-bezier(.2, .7, .2, 1);
  }
}

/* ── Reduced motion: strip animation everywhere ────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

@media (max-width: 600px) {
  .recipe-view-back { top: 1rem; left: 1rem; padding: .45rem .85rem; font-size: .78rem; }
}

/* ══════════════════════════════════════════════════════════
   Landing redesign — "living recipe counter"
   ══════════════════════════════════════════════════════════ */

[hidden] { display: none !important; }

/* ── Views ─────────────────────────────────────────────── */
.view { width: 100%; }
.view-home {
  min-height: calc(100dvh - 3.4rem);
  display: flex;
  flex-direction: column;
}

/* ── Home head (greeting + brand + shuffle) ────────────── */
.home-head {
  flex: 0 0 auto;
  text-align: center;
  padding: clamp(.9rem, 3vh, 2rem) var(--pad) .4rem;
}
.greet {
  font-size: .85rem;
  color: var(--muted);
  letter-spacing: .01em;
  margin-bottom: .45rem;
}
.home-wordmark {
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1;
  color: var(--accent);
}
.home-tag {
  font-size: .9rem;
  color: var(--muted);
  margin-top: .55rem;
}
.shuffle-btn {
  background: none; border: none; cursor: pointer;
  font: inherit; font-size: .82rem; font-weight: 600;
  color: var(--accent); padding: .1rem .25rem;
}
.shuffle-btn:hover { text-decoration: underline; }

/* ── Counter (scattered tile wall) ─────────────────────── */
.counter-wrap {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.counter { position: absolute; inset: 0; }
.icon-layer { position: absolute; inset: 0; pointer-events: none; z-index: 1000; }

.tile {
  position: absolute;
  transform: translate(-50%, -50%) rotate(var(--rot, 0deg));
  border: none; padding: 0; margin: 0; background: none;
  cursor: pointer;
  transition: transform .28s cubic-bezier(.2, .7, .2, 1);
  will-change: transform;
}
.tile-img {
  display: block;
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 8px 22px -12px rgba(60, 25, 40, .45);
  transition: box-shadow .25s;
}
/* lift + straighten on hover/focus — no scale, so corners stay crisp */
.tile:hover, .tile:focus-visible {
  transform: translate(-50%, calc(-50% - 9px)) rotate(0deg);
  z-index: 900 !important;
}
.tile:hover .tile-img, .tile:focus-visible .tile-img { box-shadow: var(--shadow); }
.tile:focus-visible { outline: none; }
.tile:focus-visible .tile-img { outline: 2.5px solid var(--accent); outline-offset: 3px; }

.tile-cap {
  position: absolute;
  left: .4rem; right: .4rem; bottom: .45rem;
  text-align: center; line-height: 1.2;
  font-size: .7rem; font-weight: 600; color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .65);
  opacity: 0; transition: opacity .15s;
  pointer-events: none;
}
.tile.peek .tile-cap { opacity: 1; }

/* ── Home links ────────────────────────────────────────── */
.home-links {
  flex: 0 0 auto;
  display: flex; gap: .7rem; justify-content: center;
  padding: .7rem var(--pad) clamp(1rem, 3vh, 1.6rem);
}

/* ── Reminisce placeholder ─────────────────────────────── */
.reminisce { text-align: center; max-width: 760px; margin: 0 auto; padding-top: clamp(2rem, 6vh, 4rem); }
.reminisce-title { font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 700; letter-spacing: -.02em; margin: .4rem 0 .9rem; }
.reminisce-copy { color: var(--muted); line-height: 1.7; margin: 0 auto 2.5rem; max-width: 48ch; }
.polaroid-row { display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap; }
.polaroid {
  background: #fff; padding: .55rem .55rem 1.5rem; border-radius: 3px;
  box-shadow: var(--shadow); transform: rotate(var(--r, -2deg));
}
.polaroid:nth-child(2) { --r: 1.6deg; }
.polaroid:nth-child(3) { --r: -1deg; }
.polaroid-photo { display: block; width: 160px; height: 130px; background: var(--panel); border-radius: 2px; }
.polaroid-cap { display: block; margin-top: .55rem; font-size: .72rem; color: var(--faint); letter-spacing: .04em; text-transform: uppercase; }

/* ── Touch / reduced motion: calm static wall ──────────── */
@media (hover: none) {
  .tile:hover { transform: translate(-50%, -50%) rotate(var(--rot, 0deg)); }
}

/* ══════════════════════════════════════════════════════════
   Home v2 — "Kain Tayo" card (Square-style image trail)
   ══════════════════════════════════════════════════════════ */
.view-home { display: flex; flex-direction: column; flex: 1 1 auto; padding: 0; }

/* white hero — the headline sits beside a single floating video card.
   flexes to fill whatever space is left below the top bar (adapts on resize) */
.hero {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  min-height: 420px;
  overflow: hidden;
  isolation: isolate;
  background: var(--canvas);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(2rem, 6vw, 5.5rem);
  padding: clamp(2rem, 6vh, 4rem) clamp(1.5rem, 6vw, 4.5rem);
}

/* the floating video card — clean, borderless b-roll: soft-rounded corners and a
   gentle drop shadow so the footage reads as a floating frame, no film treatment */
.slideshow {
  position: relative;
  flex: 0 0 auto;
  z-index: 2;
  width: clamp(340px, 44vw, 500px);
  aspect-ratio: 1.42;
  border-radius: 14px;
  overflow: hidden;
  background: #f1ece8;                              /* neutral placeholder while buffering */
  box-shadow: 0 30px 60px -28px rgba(40, 25, 30, .32),
              0 10px 24px -16px rgba(40, 25, 30, .22);
}
/* footage fills the whole cell; the overlay's transparent windows reveal it */
.slide {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 42%;     /* bias up to keep faces/action in the gate */
  opacity: 1;
  transition: opacity 1.5s ease;
  will-change: opacity;
}
.slide.fade { opacity: 0; }

/* vertical byline down the far-left edge (reads bottom-to-top) */
.hero-byline {
  position: absolute;
  left: clamp(.7rem, 2vw, 1.7rem);
  top: 0; bottom: 0;
  margin: auto 0;
  height: max-content;
  z-index: 5;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  white-space: nowrap;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: .18em;
  color: rgba(36, 29, 32, .42);
  pointer-events: none;
}

/* Father's Day note — slanted, gently wiggling sticky-note, top-right of the hero */
.dispatch-note {
  position: absolute;
  top: clamp(1.5rem, 6vh, 3.5rem);
  right: clamp(1.25rem, 5vw, 4rem);
  left: auto;
  z-index: 6;
  width: min(300px, 74vw);
  background: var(--accent);
  color: #fff;
  border-radius: 18px;
  padding: 1.05rem 1.2rem 1.15rem;
  box-shadow: 0 20px 46px -18px rgba(40, 25, 30, .4);
  transform: rotate(4deg) scale(.92);
  animation: note-wiggle 2.8s ease-in-out infinite;
}
@keyframes note-wiggle {
  0%, 100% { transform: rotate(3deg) scale(.92); }
  50%      { transform: rotate(6deg) scale(.92); }
}
.dispatch-note-title {
  font-weight: 700;
  font-size: .98rem;
  line-height: 1.3;
  letter-spacing: -.01em;
  margin-bottom: .5rem;
  padding-right: .9rem;
}
.dispatch-note-copy {
  font-weight: 400;
  font-size: .82rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, .9);
}
.dispatch-note-close {
  position: absolute;
  top: .5rem; right: .6rem;
  background: none; border: none;
  color: rgba(255, 255, 255, .65);
  font-size: .78rem; line-height: 1;
  cursor: pointer;
}
.dispatch-note-close:hover { color: #fff; }
.dispatch-note[hidden] { display: none; }
/* mobile: span the note across the top so it doesn't crowd the headline */
@media (max-width: 600px) {
  .dispatch-note { left: 6vw; right: 6vw; top: 1rem; width: auto; }
}

/* text column — sits to the left of the floating video card */
.hero-content {
  position: relative; z-index: 5;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
  gap: clamp(1.3rem, 4vh, 2.4rem);
  text-align: left;
  max-width: 34rem;
}
.hero-title {
  display: flex; flex-direction: column; align-items: flex-start;
  font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
  font-weight: 600;
  font-size: clamp(2.3rem, 8.6vmin, 5rem);
  line-height: 1.0;
  letter-spacing: -.015em;
  color: var(--ink);
}
.hero-title span { display: block; }
.hero-title span:nth-child(1) { color: var(--faint); }   /* kain tayo — lightest */
.hero-title span:nth-child(2) { color: var(--muted); }   /* cholo khai — mid */

/* "let's eat" — the third line of the trilingual greeting; red-underline flourish */
.lets-eat {
  display: inline-block;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: clamp(3px, .55vmin, 6px);
  text-underline-offset: clamp(4px, 1.4vmin, 11px);
}

/* The two paths under the headline — "what to make" (recipes) vs "what we have"
   (pantry). Parallel choices, each a label + small eyebrow, with an accent rule
   that lights up on hover. */
.home-paths {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.1rem, 3.5vw, 2.4rem);
  align-self: flex-start;
  z-index: 5;
}
.home-path {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .4rem;
  background: none;
  border: none;
  padding: .15rem 0 .55rem;
  cursor: pointer;
  text-align: left;
  border-bottom: 2px solid rgba(36, 29, 32, .12);
  transition: border-color .18s ease, transform .18s ease;
}
.home-path-sub {
  order: -1;                         /* eyebrow sits above the label */
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--accent);
}
.home-path-label {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
  font-weight: 600;
  font-size: clamp(1.4rem, 3.6vmin, 2rem);
  line-height: 1.05;
  letter-spacing: -.01em;
  color: var(--ink);
}
.home-path-label::after {
  content: "\2192";                  /* → arrow, slides in on hover */
  font-family: inherit;
  color: var(--accent);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity .18s ease, transform .18s ease;
}
.home-path:hover { border-color: var(--accent); transform: translateY(-2px); }
.home-path:hover .home-path-label::after { opacity: 1; transform: translateX(0); }
.home-path:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; border-radius: 6px; }
/* tablet/mobile: stack the headline above the card, centered */
@media (max-width: 820px) {
  .hero { flex-direction: column; }
  .hero-content { align-items: center; text-align: center; max-width: 32rem; order: 1; }
  .hero-title { align-items: center; }
  .home-paths { align-self: center; justify-content: center; }
  .slideshow { order: 2; width: min(440px, 92vw); }
  .hero-byline { display: none; }   /* the edge byline crowds the stacked column */
}
.hero-actions { display: flex; gap: .8rem; margin-top: 1.7rem; }
.hero-btn {
  border: none; border-radius: 999px;
  padding: .72rem 1.9rem;
  font: inherit; font-weight: 600; font-size: 1rem;
  cursor: pointer;
  transition: transform .12s ease, background .15s, color .15s;
}
.hero-btn:active { transform: scale(.95); }
.hero-btn-light { background: #fff; color: var(--accent-deep); }
.hero-btn-light:hover { color: var(--accent); }
.hero-btn-accent { background: var(--accent); color: #fff; }
.hero-btn-accent:hover { background: var(--accent-deep); }

/* ══ THE MENU — weekly plan + shopping list ═══════════════ */
.menu-intro { max-width: 46rem; color: var(--muted); font-size: .95rem; line-height: 1.55; margin: -.4rem 0 1.8rem; }

/* week board — day cards reflow row → stack, like the recipe grid */
.week-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}
.day-card {
  display: flex; flex-direction: column;
  min-height: 168px;
  padding: .85rem .85rem 1rem;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  background: var(--canvas);
}
.day-card.is-today { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.day-head { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; margin-bottom: .7rem; }
.day-name { font-family: 'Fraunces', serif; font-weight: 600; font-size: 1.02rem; color: var(--ink); }
.day-card.is-today .day-name { color: var(--accent); }
.day-date { font-size: .72rem; color: var(--faint); letter-spacing: .02em; }
.day-dishes { display: flex; flex-direction: column; gap: .45rem; flex: 1; }
.day-empty { color: var(--faint); font-size: .82rem; font-style: italic; margin: .1rem 0; }

.dish-chip {
  display: flex; align-items: stretch;
  border: 1px solid var(--rule); border-radius: 12px;
  background: var(--panel); overflow: hidden;
}
.dish-open {
  display: flex; align-items: center; gap: .55rem; flex: 1; min-width: 0;
  font: inherit; text-align: left; padding: .35rem .4rem; background: none; border: none; cursor: pointer;
}
.dish-thumb { flex: none; width: 34px; height: 34px; border-radius: 8px; overflow: hidden; background: var(--rule); display: block; }
.dish-thumb img { width: 100%; height: 100%; object-fit: cover; }
.dish-name { font-size: .82rem; font-weight: 500; color: var(--ink); line-height: 1.2; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.dish-open:hover .dish-name { color: var(--accent); }
.dish-remove {
  flex: none; width: 30px; border: none; border-left: 1px solid var(--rule);
  background: none; color: var(--faint); font-size: .8rem; cursor: pointer; transition: color .15s, background .15s;
}
.dish-remove:hover { color: var(--accent); background: var(--accent-tint); }

.day-add {
  margin-top: .7rem; width: 100%;
  font: inherit; font-size: .8rem; font-weight: 500; color: var(--accent);
  background: var(--accent-tint); border: 1px dashed var(--accent-tint-border); border-radius: var(--pill);
  padding: .5rem; cursor: pointer; transition: background .15s, border-color .15s;
}
.day-add:hover { background: #fff; border-color: var(--accent); border-style: solid; }

/* shopping list */
.shop { border-top: 1px solid var(--rule); padding-top: clamp(1.5rem, 4vw, 2.5rem); }
.shop-head { margin-bottom: 1.2rem; }
.shop-summary { font-size: .92rem; color: var(--muted); margin: 0 0 1.4rem; }
.shop-summary strong { color: var(--accent); }
.shop-sec { margin-bottom: 1.6rem; }
.shop-sec-head { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; margin: 0 0 .7rem; }
.shop-sec.is-buy .shop-sec-head { color: var(--accent); }
.shop-sec-count { color: var(--faint); font-weight: 500; }
.shop-items { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .55rem 1.4rem; }
.shop-row { display: flex; align-items: flex-start; gap: .65rem; padding: .15rem 0; }
.shop-check {
  flex: none; width: 20px; height: 20px; margin-top: .05rem;
  border: 1.5px solid var(--accent-tint-border); border-radius: 6px; background: #fff; cursor: pointer;
  position: relative; transition: background .15s, border-color .15s;
}
.is-buy .shop-check { border-color: var(--accent); }
.shop-check.is-checked { background: var(--accent); border-color: var(--accent); }
.shop-check.is-checked::after { content: '✓'; position: absolute; inset: 0; color: #fff; font-size: .72rem; line-height: 20px; text-align: center; }
.shop-have-dot { flex: none; width: 20px; height: 20px; margin-top: .05rem; border-radius: 50%; background: var(--rule); position: relative; }
.shop-have-dot::after { content: '✓'; position: absolute; inset: 0; color: var(--faint); font-size: .7rem; line-height: 20px; text-align: center; }
.shop-text { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.shop-label { font-size: .9rem; color: var(--ink); line-height: 1.3; }
.shop-row.is-have .shop-label { color: var(--muted); }
.shop-row.is-bought .shop-label { text-decoration: line-through; color: var(--faint); }
.shop-uses { display: flex; flex-wrap: wrap; gap: .3rem .5rem; }
.shop-use { font-size: .7rem; color: var(--faint); }
.shop-empty, .shop-empty p { color: var(--muted); font-size: .92rem; max-width: 40rem; line-height: 1.55; }

/* picker sheet — reuses the recipe-grid; full-screen like the recipe modal */
dialog#planner-picker {
  width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh;
  border: none; border-radius: 0; padding: 0; margin: 0;
  background: var(--canvas); overflow-y: auto;
}
dialog#planner-picker::backdrop { background: rgba(36, 29, 32, .4); }
.picker-bar {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: clamp(1rem, 3vw, 1.6rem) var(--gutter);
  background: rgba(255, 255, 255, .9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.picker-title { font-family: 'Fraunces', serif; font-weight: 600; font-size: clamp(1.1rem, 3vw, 1.5rem); color: var(--ink); margin: 0; }
.picker-actions { display: flex; align-items: center; gap: .7rem; }
.picker-toggle.is-on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.picker-close { font: inherit; font-size: 1rem; width: 2rem; height: 2rem; border-radius: 50%; border: 1px solid var(--rule); background: #fff; color: var(--ink); cursor: pointer; transition: color .15s, border-color .15s; }
.picker-close:hover { color: var(--accent); border-color: var(--accent); }
.picker-grid { padding: clamp(1.5rem, 4vw, 2.5rem) var(--gutter) 4rem; }
.picker-grid .recipe-card { cursor: pointer; }
.pick-tag {
  position: absolute; top: .5rem; left: .5rem; z-index: 1;
  font-size: .68rem; font-weight: 600; letter-spacing: .02em;
  padding: .2rem .5rem; border-radius: var(--pill);
  background: rgba(255, 255, 255, .92); color: var(--muted); border: 1px solid var(--rule);
}
.pick-tag.is-ready { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

@media (max-width: 640px) {
  .week-board { grid-template-columns: 1fr 1fr; }
  .shop-items { grid-template-columns: 1fr; }
}
