@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap");

:root {
  color-scheme: light;
  --bg: #fbf7f1;
  --surface: #ffffff;
  --surface-soft: #fdfbf7;
  --surface-muted: #f3f5ef;
  --text: #25211d;
  --muted: #989188;
  --muted-strong: #726b63;
  --sage: #dce8dc;
  --sage-deep: #8da485;
  --peach: #f6b69d;
  --peach-soft: #fff1e7;
  --line: rgba(34, 32, 29, 0.06);
  --shadow: 0 14px 36px rgba(116, 111, 98, 0.08);
  --radius-xl: 26px;
  --radius-lg: 22px;
  --radius-md: 18px;
  --font-display: "Inter", "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
  --font-body: "Inter", "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  min-height: 100%;
  overflow-x: hidden;
  /* Disable browser pull-to-refresh and overscroll bounce */
  overscroll-behavior-y: contain;
  overscroll-behavior-x: none;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background:
    radial-gradient(circle at 22% 10%, rgba(214, 230, 214, 0.34), transparent 20%),
    radial-gradient(circle at 76% 14%, rgba(248, 192, 167, 0.2), transparent 18%),
    radial-gradient(circle at 50% 0%, rgba(255,255,255,0.96), transparent 34%),
    linear-gradient(180deg, #fffaf4 0%, #f7f2ea 100%);
  color: var(--text);
}

button, input, textarea { font: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }

.page { min-height: 100vh; overflow-x: hidden; }

.app-shell {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px));
  background: transparent;
  overflow-x: hidden;
}

@media (min-width: 720px) {
  .app-shell { max-width: 960px; }
  .bottom-nav { max-width: 960px; }
}

@media (min-width: 960px) {
  .app-shell { max-width: 1200px; }
  .bottom-nav { max-width: 1200px; }
}

/* ── Tablet polish (keep mobile unchanged) ───────────────────────────────── */
@media (min-width: 768px) and (max-width: 1024px) {
  /* Consistent tablet gutters */
  .topbar,
  .channel-row,
  .cookbook-filter-bar,
  .section-heading,
  .recipe-grid,
  .grocery-groups,
  .grocery-order,
  .kookboek-heading {
    padding-inline: 24px;
  }

  /* Home: search hero + chips spacing */
  .home-search-hero.search-card {
    margin-bottom: 22px;
    padding: 14px 24px 18px;
    border-radius: 0 0 34px 34px;
    box-shadow: 0 16px 36px rgba(36, 60, 43, 0.1);
  }

  .home-search-chips-row { gap: 10px; }
  .home-search-chips { gap: 10px; }
  .home-chip-row { gap: 16px; margin-bottom: 28px; }

  /* Cards/grids: more breathing room on tablet */
  .recipe-grid { gap: 18px; }
  .recipe-card { border-radius: 28px; }
  .recipe-card__body { padding: 14px 14px 16px; }
  .recipe-card h3 {
    font-size: 1.15rem;
    margin-bottom: 8px;
    min-height: 2.3rem;
  }
  .recipe-card__meta { font-size: 0.9rem; }

  /* Recipe detail: better column balance + headings */
  .detail-content-grid {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 22px;
  }

  .detail-screen .topbar--home { padding: 14px 24px; }
  .detail-hero__actions { right: 24px; }

  .detail-sheet {
    padding: 30px 24px 38px;
    border-radius: 34px 34px 0 0;
  }

  .detail-sheet h1 {
    font-size: clamp(2.0rem, 4vw, 2.65rem);
    max-width: 16ch;
  }

  /* Cookbooks: align grid with app gutters */
  .cb-detail__grid {
    gap: 20px;
    padding-inline: 24px;
  }

  /* Bottom nav: align with shell, avoid “floating” look */
  .bottom-nav {
    width: min(calc(100vw - 48px), 960px);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid rgba(120, 147, 111, 0.1);
    border-left: 1px solid rgba(120, 147, 111, 0.08);
    border-right: 1px solid rgba(120, 147, 111, 0.08);
  }

  .nav-item { min-height: 64px; gap: 7px; }
  .nav-label { font-size: 0.76rem; }
}

#homeScreen {
  position: relative;
  padding-bottom: 28px;
}

#homeScreen > * {
  position: relative;
  z-index: 1;
}

.screen { display: none; min-height: 100vh; }
.screen--active { display: block; }

/* ── Shared topbar — uniform responsive header ── */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  margin-bottom: 0;
  background: var(--bg);
  flex-wrap: nowrap;
  min-height: 56px;
  box-sizing: border-box;
  width: 100%;
}

/* Home topbar variant */
.topbar--home {
  background: var(--bg);
}

/* Brand lockup — clickable logo area */
.brand-lockup {
  border: 0;
  background: transparent;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  cursor: pointer;
  flex-shrink: 0;
  min-width: 0;
}

/* Unified responsive logo */
.brand-logo {
  height: 76px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  object-position: left center;
  mix-blend-mode: multiply;
  display: block;
  flex-shrink: 0;
}

/* Backwards compat variants — all unified to 40px now */
.brand-logo--sm {
  height: 40px;
  width: auto;
  mix-blend-mode: multiply;
}

.brand-logo--grocery {
  height: 40px;
  width: auto;
  mix-blend-mode: multiply;
}

/* Cookbooks back button (detail mode) */
.cookbooks-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: #78936f;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 0;
}
.cookbooks-back-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Cookbook detail header inside grid — bigger, cleaner */
.cb-detail__header {
  padding: 8px 0 20px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  margin-bottom: 20px;
}
.cb-detail__name {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.cb-detail__count {
  font-size: 0.85rem;
  font-weight: 600;
  color: #aaa;
  margin-top: 2px;
  display: block;
}

/* Cookbook detail back button in grid — hide it; topbar back handles it */
.cb-detail__back {
  display: none;
}

.topbar-spacer {
  width: 142px;
}

.tagline, .section-kicker {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  color: #9d9c95;
  text-transform: uppercase;
}

/* Green tagline for grocery subtitle */
#grocerySubtitle {
  color: #b8cfbc;
}

.topbar-actions,
.detail-hero__actions,
.grocery-header__actions,
/* ── Icon buttons ── */
.icon-button {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 0;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.94);
  box-shadow: 0 10px 24px rgba(112,106,95,0.08);
  flex: none;
}

.icon-button svg, .filter-button svg, .nav-item svg {
  width: 20px;
  height: 20px;
  fill: #35322f;
}

.icon-button--solid { background: rgba(255,255,255,0.92); }
.icon-button--soft  { background: rgba(245,246,242,0.98); }

.icon-button--alert::after {
  content: "";
  position: absolute;
  top: 11px; right: 11px;
  width: 8px; height: 8px;
  border-radius: 999px;
  background: #f3b58b;
  border: 2px solid #fff;
}
.icon-button--alert { position: relative; }

/* ── Search card ── */
.search-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding: 16px 16px 0;
}

.search-input {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.94);
  border-radius: 999px;
  padding: 15px 18px;
  box-shadow: 0 12px 28px rgba(112,106,95,0.06);
}

.search-input svg { width: 19px; height: 19px; fill: #afc3af; }

.search-input input {
  width: 100%;
  border: 0;
  background: transparent;
  outline: none;
  color: var(--text);
  font-size: 0.97rem;
}
.search-input input::placeholder { color: #b5b2ab; }

.filter-button {
  width: 44px; height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(34, 32, 29, 0.04);
  background: rgba(255,255,255,0.9);
  box-shadow: 0 10px 24px rgba(112,106,95,0.06);
  display: grid;
  place-items: center;
  flex: none;
}

/* ── Import banner ── */
.import-banner {
  background: rgba(241, 247, 241, 0.88);
  border: 1px solid rgba(168, 182, 167, 0.22);
  border-radius: 32px;
  padding: 18px 16px 16px;
  margin: 0 16px 26px;
  box-shadow: 0 16px 30px rgba(124, 121, 111, 0.05);
}

.import-banner__head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
}

.import-banner__icon {
  width: 68px;
  height: 68px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: #b7d0b4;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 800;
  flex-shrink: 0;
}

.import-banner__icon svg {
  width: 34px;
  height: 34px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.import-banner h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 6vw, 2.25rem);
  letter-spacing: -0.04em;
  line-height: 1.02;
  max-width: none;
}

.import-banner__title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.beta-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(141, 164, 133, 0.16);
  color: #4a6b4c;
  border: 1px solid rgba(141, 164, 133, 0.35);
}

.section-copy, .section-subcopy, .detail-description, .helper-text {
  margin: 10px 0 0;
  line-height: 1.5;
  color: var(--muted-strong);
  font-size: 0.94rem;
}

.detail-description.is-hidden {
  display: none;
}

.import-banner__form {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.recipe-grid-more {
  display: flex;
  justify-content: center;
  padding: 10px 0 0;
}

.recipe-grid-more__btn {
  min-width: 220px;
}

.import-banner__input--full {
  width: 100%;
  border: 1.5px solid rgba(34,32,29,0.12);
  border-radius: 14px;
  padding: 13px 16px;
  background: rgba(255,255,255,0.96);
  font-size: 1rem;
  color: var(--text);
  outline: none;
  box-sizing: border-box;
}

.import-banner__input--full::placeholder { color: #aba79f; }
.import-banner__input--full:focus { border-color: #8da485; }

.import-banner__button--full {
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  border: none;
  background: #78936f;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: -0.01em;
  box-shadow: 0 4px 12px rgba(120, 147, 111, 0.25);
}

.import-banner__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  background: rgba(255,255,255,0.96);
  border-radius: 999px;
  padding: 6px 6px 6px 14px;
  box-shadow: inset 0 0 0 1px rgba(34,32,29,0.03);
}

.import-banner__input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: none;
  border-radius: 18px;
  padding: 10px 8px;
  background: transparent;
  color: var(--text);
  box-shadow: none;
}

.import-banner__input::placeholder { color: #aba79f; }

.import-banner__button {
  border: 1px solid #2d332d;
  border-radius: 999px;
  padding: 13px 24px;
  background: #2d332d;
  color: #fff;
  font-weight: 700;
  letter-spacing: -0.01em;
  box-shadow: 0 8px 20px rgba(45, 51, 45, 0.12);
}

.import-banner__button:hover {
  background: #353d35;
}

.ghost-link {
  color: #5d7a61;
}

.ghost-link,
.filter-button,
.import-go-btn,
.primary-button,
.secondary-button,
.detail-cta,
.cook-toggle,
.servings-btn,
.platform-card {
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.filter-button {
  border: 1px solid rgba(34, 32, 29, 0.06);
  background: rgba(255,255,255,0.78);
  box-shadow: 0 6px 18px rgba(104,87,74,0.06);
}

.filter-button:hover,
.import-go-btn:hover,
.primary-button:hover,
.secondary-button:hover,
.detail-cta:hover,
.cook-toggle:hover,
.servings-btn:hover,
.platform-card:hover {
  transform: translateY(-1px);
}

.import-go-btn,
.primary-button,
.secondary-button,
.detail-cta {
  border-radius: 18px;
  box-shadow: 0 8px 18px rgba(55,50,45,0.08);
}

.primary-button,
.detail-cta {
  background: #24211e;
  color: #fff;
  border: 1px solid #24211e;
}

.import-banner__button:disabled {
  opacity: 0.72;
  cursor: wait;
}

.import-banner__feedback {
  margin: 10px 4px 0;
  color: var(--muted-strong);
  font-size: 0.9rem;
  line-height: 1.4;
}

.import-caption-toggle {
  background: none;
  border: none;
  color: #78936f;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  padding: 4px 0;
  text-align: left;
}
.import-caption-field {
  width: 100%;
  border: 1.5px solid #e5e2dc;
  border-radius: 12px;
  padding: 12px;
  font-size: 0.9rem;
  font-family: inherit;
  color: #1a1a1a;
  background: #fff;
  resize: vertical;
  min-height: 80px;
  box-sizing: border-box;
  outline: none;
}
.import-caption-field:focus {
  border-color: #78936f;
}

.social-pill, .meal-pill, .detail-stat, .live-dot {
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
}

/* ── Section heading ── */
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
  padding-inline: 16px;
}

.section-heading h2,
.featured-copy h3,
.recipe-card h3,
.detail-sheet h1,
.detail-section h2,
.grocery-group__header h2,
.modal-header h2 {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: -0.04em;
}

.section-heading h2 {
  font-size: clamp(1.35rem, 5vw, 1.75rem);
  font-family: var(--font-body);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.ghost-link, .section-note {
  border: 0;
  background: transparent;
  padding: 0;
  font-size: 0.93rem;
  font-weight: 800;
}
.ghost-link { color: var(--sage-deep); }
.section-note, .section-subcopy { color: var(--muted); font-size: 0.88rem; }

/* ── Featured card ── */
.featured-card {
  background: rgba(255,255,255,0.94);
  border: 0;
  width: calc(100% - 32px);
  margin: 0 16px 28px;
  padding: 14px;
  border-radius: 30px;
  box-shadow: 0 16px 34px rgba(112,106,95,0.08);
  cursor: pointer;
  text-align: left;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0 16px 24px;
}

.quick-card {
  position: relative;
  border: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(250,247,242,0.96));
  border-radius: 26px;
  padding: 16px 14px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  text-align: left;
  box-shadow: 0 14px 28px rgba(112,106,95,0.06);
  overflow: hidden;
}

.quick-card__img {
  position: relative;
  z-index: 1;
  width: 50px;
  height: 50px;
  border-radius: 999px;
  background: rgba(255,247,234,0.9);
  display: grid;
  place-items: center;
  font-size: 1.45rem;
}

.quick-card__glow {
  position: absolute;
  width: 84px;
  height: 84px;
  border-radius: 999px;
  right: -12px;
  top: -18px;
  opacity: 0.9;
}

.quick-card__glow--1 { background: radial-gradient(circle, rgba(220,232,220,0.85), transparent 72%); }
.quick-card__glow--2 { background: radial-gradient(circle, rgba(255,236,214,0.95), transparent 72%); }
.quick-card__glow--3 { background: radial-gradient(circle, rgba(243,240,225,0.95), transparent 72%); }
.quick-card__glow--4 { background: radial-gradient(circle, rgba(233,241,246,0.95), transparent 72%); }

.ingredient-visual__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.ingredient-visual__emoji {
  font-size: inherit;
  line-height: 1;
}

.quick-card__copy {
  display: grid;
  gap: 4px;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.quick-card__eyebrow {
  color: #8fa58d;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.quick-card__copy strong {
  font-family: var(--font-display);
  font-size: 1.12rem;
  line-height: 0.98;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.quick-card__copy span {
  color: #9a978f;
  font-size: 0.9rem;
}

.category-card {
  position: relative;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.category-card__photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 22px;
  background: #d9e8d9;
  box-shadow: 0 6px 18px rgba(70,74,66,0.10);
  margin-bottom: 10px;
}

.category-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.category-card h3 {
  margin: 0 0 2px;
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #243c2b;
  line-height: 1.15;
}

.category-card p {
  margin: 0;
  color: #95a393;
  font-size: 0.82rem;
  font-weight: 500;
}

.featured-image-wrap { margin-bottom: 13px; }

.featured-image-wrap {
  position: relative;
}

.featured-badge {
  position: absolute;
  left: 16px;
  top: 16px;
  z-index: 2;
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(191, 216, 191, 0.95);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
}

.featured-image {
  width: 100%;
  aspect-ratio: 1 / 1.02;
  object-fit: cover;
  border-radius: 24px;
  background: linear-gradient(180deg, #f5ead6, #d9efdb);
}

.featured-copy {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  padding: 2px 2px 0;
}

.featured-copy h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 5vw, 1.9rem);
  line-height: 1;
  letter-spacing: -0.03em;
}

.recipe-time {
  margin: 0;
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  flex-shrink: 0;
}

/* ── Kookboek filterbar ── */
.cookbook-filter-bar {
  display: flex;
  gap: 8px;
  padding: 4px 16px 16px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.cookbook-filter-bar::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  flex-shrink: 0;
  border: 1.5px solid var(--sage);
  background: transparent;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--muted-strong);
  white-space: nowrap;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}

.filter-chip:hover {
  background: var(--sage);
  color: var(--text);
}

.filter-chip--active {
  background: var(--sage-deep);
  border-color: var(--sage-deep);
  color: #fff;
}

/* ── Recipe grid ── */
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding-inline: 16px;
}

@media (min-width: 760px) {
  .recipe-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
}

.recipe-card {
  position: relative;
  border: 0; padding: 0;
  width: 100%;
  text-align: left;
  background: rgba(255,255,255,0.9);
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 12px 26px rgba(76,85,69,0.06);
}

.source-favicon,
.source-favicon--featured {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  box-shadow: 0 6px 14px rgba(70,74,66,0.08);
  display: grid;
  place-items: center;
  z-index: 2;
}

.source-favicon img,
.source-favicon__inner img {
  width: 16px;
  height: 16px;
  display: block;
}

.source-favicon__inner {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

.source-favicon span,
.source-favicon__inner span {
  font-size: 0.72rem;
  font-weight: 800;
  color: #6b675f;
}

.source-favicon--featured {
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
}

.recipe-card img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }

.recipe-card__body { padding: 11px 12px 13px; }

.recipe-card h3 {
  font-size: 1.2rem;
  line-height: 1.02;
  margin-bottom: 6px;
  min-height: 2.45rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.recipe-card__meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.88rem;
}

.recipe-card--empty .source-favicon { display: none; }

/* ── Detail screen ── */
.detail-screen { background: var(--bg); }

/* Position topbar over hero image */
.detail-screen {
  position: relative;
}

/* Transparent topbar over hero image */
.detail-screen .topbar--home {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100vw, 1200px);
  background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0) 100%);
  border: none;
  box-shadow: none;
  z-index: 25;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  backdrop-filter: blur(2px);
}

.detail-content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 760px) {
  .detail-content-grid {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 18px;
    align-items: start;
  }

  .detail-col--ingredients {
    position: sticky;
    top: 76px;
    align-self: start;
  }
}

.detail-screen .topbar--home .brand-logo {
  height: 48px;
  width: auto;
  object-fit: contain;
  padding: 2px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.review-logo {
  height: 56px !important;
  padding: 0 !important;
  background: none !important;
  box-shadow: none !important;
}

.detail-screen .topbar--home .topbar-actions {
  gap: 8px;
}

.detail-screen .topbar--home .icon-button {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  color: #243c2b;
}

.detail-screen .topbar--home .icon-button:active {
  background: rgba(255, 255, 255, 0.75);
}

/* Hide separate floating favorite button - use topbar button instead */
.detail-screen #topbarFavoriteButton {
  display: none;
}

.detail-hero {
  position: relative;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  width: 100vw;
  margin-top: 0;
  padding-top: 0;
}

.detail-hero img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  display: block;
}

.detail-hero__actions {
  position: absolute;
  top: 90px;
  right: 16px;
  display: flex;
  gap: 8px;
  flex-direction: column;
}

.detail-sheet {
  position: relative;
  margin-top: -40px;
  background: #f7f8f4;
  border-radius: 30px 30px 0 0;
  padding: 26px 16px 34px;
}

.detail-sheet__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

.detail-sheet h1 {
  font-size: clamp(2.1rem, 8vw, 3rem);
  line-height: 0.95;
  max-width: 10ch;
}

.meal-pill {
  padding: 4px 8px;
  background: #eef3ef;
  color: #c6d7ca;
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.detail-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.detail-stat {
  gap: 6px;
  padding: 10px 13px;
  background: #ffffff;
  color: var(--muted-strong);
  font-weight: 800;
  font-size: 0.9rem;
  box-shadow: 0 6px 18px rgba(84,87,79,0.05);
}

.detail-stat span { color: #adbfae; }

.detail-actions,
.recipe-management,
.recipe-management__row {
  display: grid;
  gap: 10px;
}

.detail-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 16px 0 12px;
}

.soft-action {
  border: 1px solid rgba(35,33,30,0.08);
  background: rgba(255,255,255,0.94);
  color: #4f4a43;
  border-radius: 16px;
  padding: 13px 14px;
  font-weight: 700;
}

.soft-action--dark {
  background: #24211e;
  color: #fff;
  border-color: #24211e;
}

.recipe-management {
  margin-bottom: 18px;
}

.recipe-management__row {
  grid-template-columns: 1fr auto;
  align-items: end;
}

.recipe-management__field {
  display: grid;
  gap: 6px;
  color: var(--muted-strong);
  font-size: 0.88rem;
  font-weight: 700;
}

.recipe-management__field select,
.cookbook-form input {
  width: 100%;
  border: 1px solid rgba(35,33,30,0.08);
  background: #fff;
  border-radius: 16px;
  padding: 13px 14px;
  color: var(--text);
}

.cook-tools {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.detail-assist {
  margin-top: 12px;
}

.detail-assist__card {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 20px;
  border: 1px solid rgba(120, 147, 111, 0.1);
  background: rgba(255,255,255,0.88);
}

.detail-assist__card--good {
  background: rgba(237, 244, 236, 0.95);
}

.detail-assist__card--warn {
  background: rgba(255, 244, 236, 0.98);
}

.detail-assist__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.detail-assist__head strong {
  color: #243c2b;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.detail-assist__head span {
  color: #7d897b;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.detail-assist__card p {
  margin: 0;
  color: #5f5a54;
  font-size: 0.88rem;
  line-height: 1.45;
}

.cook-toggle,
.cook-link {
  border-radius: 16px;
  padding: 11px 14px;
  font-size: 0.9rem;
  font-weight: 700;
}

.cook-toggle {
  border: 1px solid rgba(34, 32, 29, 0.08);
  background: rgba(255,255,255,0.86);
  color: #485247;
  box-shadow: 0 6px 16px rgba(76,85,69,0.05);
}

.cook-toggle--kookstand {
  border-color: rgba(120, 147, 111, 0.22);
  background: linear-gradient(135deg, rgba(255,255,255,0.92), rgba(237, 244, 236, 0.96));
  color: #243c2b;
  font-weight: 900;
}

.cook-toggle--kookstand:hover {
  box-shadow: 0 10px 26px rgba(76,85,69,0.10);
}

.cook-toggle.is-active {
  background: #dce8dc;
  color: #29422b;
  border-color: rgba(84, 122, 88, 0.18);
}

.cook-toggle:disabled {
  opacity: 0.55;
}

.cook-link {
  text-decoration: none;
  background: #fff;
  color: #7f977f;
  box-shadow: 0 6px 18px rgba(84,87,79,0.05);
}

.cook-mode-panel {
  margin-top: 6px;
  padding: 16px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(246, 248, 243, 0.96));
  border: 1px solid rgba(141, 164, 133, 0.12);
  box-shadow: 0 10px 30px rgba(76,85,69,0.06);
}

.cook-mode-panel__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
}

.cook-mode-panel__progress {
  margin: 0;
  color: #7d8f77;
  font-size: 0.9rem;
  font-weight: 700;
}

.cook-mode-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  padding: 16px;
  border-radius: 24px;
  background: rgba(250, 252, 247, 0.98);
  box-shadow: inset 0 0 0 1px rgba(225, 233, 221, 0.9);
}

.cook-mode-card__index {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #dce8dc;
  color: #29422b;
  font-weight: 900;
  font-size: 1rem;
}

.cook-mode-card__text {
  margin: 0;
  color: #3f3b36;
  line-height: 1.58;
  font-size: 0.98rem;
  font-weight: 700;
}

.cook-mode-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.detail-section { margin-top: 20px; }

.detail-section__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 16px;
}

.detail-section h2, .grocery-group__header h2 {
  font-size: clamp(1.5rem, 5.5vw, 2rem);
  line-height: 0.98;
}

.detail-section__header p, .grocery-group__progress {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.detail-servings-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 12px;
}

.ingredient-quick-actions {
  display: none;
  gap: 8px;
}

.ingredient-quick-btn {
  padding: 6px 12px;
  background: var(--sage-deep);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
}

.ingredient-quick-btn:active {
  transform: scale(0.95);
}

.ingredient-quick-btn:hover {
  opacity: 0.9;
}

.ingredient-quick-btn--secondary {
  background: rgba(141, 164, 133, 0.2);
  color: var(--sage-deep);
}

/* ── Ingredient list — clean minimal design ── */
.ingredient-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.ingredient-item {
  list-style: none;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 42px;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  background: rgba(255,255,255,0.98);
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(76,85,69,0.04);
  border: 1px solid rgba(120, 147, 111, 0.06);
}

.ingredient-item:hover {
  transform: translateY(-1px);
  border-color: rgba(141, 164, 133, 0.16);
}

.ingredient-amount {
  min-width: auto;
  max-width: none;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f1f6f1;
  text-align: center;
  color: #b5cbbb;
  font-weight: 800;
  font-size: 0.80rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}

.ingredient-image-wrapper {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff5e8, #fffaf3);
  box-shadow: inset 0 0 0 1px rgba(236, 221, 197, 0.65);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}

.ingredient-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ingredient-image-fallback {
  font-size: 1.15rem;
  position: absolute;
  display: grid;
  place-items: center;
}

.ingredient-name {
  flex: 1;
  min-width: 0;
  color: #3b3834;
  font-size: 0.95rem;
  line-height: 1.3;
  font-weight: 600;
}

.ingredient-thumb {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #fff5e8, #fffaf3);
  box-shadow: inset 0 0 0 1px rgba(236, 221, 197, 0.65);
  font-size: 1.15rem;
  flex: none;
  overflow: hidden;
}

.ingredient-item.is-checked .ingredient-thumb {
  opacity: 0.78;
  background: linear-gradient(180deg, #eef5ea, #f7fbf3);
}

/* ── Steps — flat card ── */
.step-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 22px;
}

.step-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: flex-start;
  padding: 0;
}

.step-index {
  width: 28px; height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #fde3d0;
  color: #342820;
  font-weight: 900;
  font-size: 0.85rem;
  flex: none;
  margin-top: 2px;
}

.step-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.step-copy {
  margin: 0;
  color: #4a4643;
  font-size: 0.94rem;
  line-height: 1.55;
}

/* ── Step timer button ───────────────────────────────────────────────────── */
.step-timer {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1.5px solid #e0d5c8;
  background: #faf7f4;
  color: #7a6a5a;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  width: fit-content;
}
.step-timer svg { width: 14px; height: 14px; flex-shrink: 0; }
.step-timer:hover { background: #f0e8df; border-color: #c8b8a8; color: #5a4a3a; }
.step-timer--running {
  background: #fff4e6;
  border-color: #f0a060;
  color: #c06020;
  font-variant-numeric: tabular-nums;
}
.step-timer--done {
  background: #e8f5e9;
  border-color: #81c784;
  color: #388e3c;
}

/* ── Cookbook detail view ────────────────────────────────────────────────── */
.cb-detail {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
}

/* In settings screen the cookbook detail is rendered in #cookbookList (no grid padding). */
#cookbookList .cb-detail {
  padding: 16px 16px calc(100px + env(safe-area-inset-bottom, 0px));
}

.cb-detail__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: #8da485;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0 16px;
  margin-bottom: 4px;
}
.cb-detail__back svg { width: 16px; height: 16px; }
.cb-detail__back:hover { color: #6a7f62; }

.cb-detail__header {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  margin-bottom: 18px;
}

.cb-detail__title-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.cb-detail__actions {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-start;
}

.cb-detail__action-btn {
  border: 1px solid #e7ded3;
  background: #fff;
  color: #2c2c2c;
  border-radius: 999px;
  padding: 10px 12px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  flex: 0 1 auto;
  white-space: nowrap;
  min-width: 0;
}

.cb-detail__action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.cb-detail__action-btn--danger {
  border-color: #f1b4b4;
  color: #b42318;
}
.cb-detail__name {
  font-size: 1.45rem;
  font-weight: 800;
  margin: 0;
  color: #1a1a1a;
  min-width: 0;
}
.cb-detail__count {
  font-size: 0.9rem;
  color: #7a7a7a;
  font-weight: 650;
}

.cb-detail__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
  padding-inline: 0;
  grid-auto-rows: 1fr;
}

@media (min-width: 960px) {
  .cb-detail__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.cb-detail__item {
  position: relative;
  display: block;
  border-radius: 28px;
  overflow: hidden;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.cb-detail__select {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,0.9);
  background: rgba(0,0,0,0.25);
  color: #fff;
  font-weight: 900;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3;
}

.cb-detail--selecting .cb-detail__select {
  display: inline-flex;
}

.cb-detail--selecting .cb-detail__remove {
  display: none;
}

.cb-detail__item.is-selected .cb-detail__select {
  background: rgba(120, 147, 111, 0.95);
}

.cb-detail__item.is-selected .cb-detail__card {
  outline: 2px solid rgba(120, 147, 111, 0.55);
  outline-offset: 3px;
}

.cb-detail__card {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
  height: 100%;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}
.cb-detail__card:active { transform: scale(0.98); }

.cb-detail__img {
  width: 100%;
  aspect-ratio: 1 / 1.08;
  border-radius: 28px;
  object-fit: cover;
  display: block;
  background: #e8ede8;
  box-shadow: 0 10px 26px rgba(36, 60, 43, 0.07);
}

.cb-detail__card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 10px 4px 2px;
  flex: 1;
}
.cb-detail__card-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #1a1a1a;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.cb-detail__card-time {
  font-size: 0.92rem;
  color: var(--muted);
  font-weight: 500;
}

.cb-detail__remove {
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(0,0,0,0.06);
}

.cb-detail__select {
  top: 10px;
  left: 10px;
  width: 34px;
  height: 34px;
  border-width: 2px;
}

@media (min-width: 760px) {
  .cb-detail__grid { gap: 18px; }
}

.cb-detail__remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.95);
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 5;
  pointer-events: auto;
}
.cb-detail__remove svg { width: 14px; height: 14px; pointer-events: none; }
.cb-detail__remove:hover { background: #fde8e8; color: #e05555; }

.cb-detail__empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0;
  margin: 16px 0;
  border: 2px dashed rgba(141, 164, 133, 0.35);
  background: rgba(141, 164, 133, 0.04);
  border-radius: 20px;
  overflow: hidden;
  text-align: center;
  min-height: 240px;
}

.cb-detail__empty-icon {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 4/3;
  background: rgba(141, 164, 133, 0.08);
}

.cb-detail__empty-icon svg {
  width: 28px;
  height: 28px;
  color: #8da485;
  opacity: 0.7;
}

.cb-detail__empty-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0;
  padding: 12px 12px 4px;
}

.cb-detail__empty-text {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0;
  padding: 0 12px 12px;
  font-weight: 500;
}

.cb-detail__add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  margin-top: 16px;
  padding: 13px 16px;
  border-radius: 14px;
  border: 2px dashed #d0c8be;
  background: transparent;
  color: #8da485;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.cb-detail__add-btn svg { width: 16px; height: 16px; }
.cb-detail__add-btn:hover { border-color: #8da485; background: #f4f8f3; color: #6a7f62; }

/* ── Recipe Picker overlay ───────────────────────────────────────────────── */
.recipe-picker {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: flex-end;
}
.recipe-picker.hidden { display: none; }

.recipe-picker__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
}

.recipe-picker__sheet {
  position: relative;
  z-index: 1;
  width: 100%;
  max-height: 80vh;
  background: #fff;
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.22s ease-out;
}

.recipe-picker__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 20px 10px;
  flex-shrink: 0;
}
.recipe-picker__header .section-kicker { margin: 0; }
.recipe-picker__title {
  font-size: 1rem;
  font-weight: 700;
  margin: 2px 0 0;
  color: #1a1a1a;
}

.recipe-picker__search {
  flex-shrink: 0;
  margin: 0 16px 10px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1.5px solid #e0d8d0;
  background: #faf7f4;
  font-size: 0.9rem;
  outline: none;
  width: calc(100% - 32px);
  box-sizing: border-box;
}
.recipe-picker__search:focus { border-color: #8da485; }

.recipe-picker__list {
  list-style: none;
  margin: 0;
  padding: 0 0 env(safe-area-inset-bottom, 16px);
  overflow-y: auto;
  flex: 1;
}

.recipe-picker__item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 16px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  border-bottom: 1px solid #f0ece8;
  transition: background 0.12s;
}
.recipe-picker__item:hover { background: #faf7f4; }
.recipe-picker__thumb {
  width: 48px; height: 48px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}
.recipe-picker__name {
  flex: 1;
  font-size: 0.88rem;
  font-weight: 600;
  color: #1a1a1a;
}
.recipe-picker__add-icon {
  width: 18px; height: 18px;
  color: #8da485;
  flex-shrink: 0;
}
.recipe-picker__empty {
  padding: 24px 16px;
  text-align: center;
  font-size: 0.85rem;
  color: #aaa;
}

.detail-cta, .primary-button, .secondary-button {
  border-radius: 18px;
}

.detail-cta {
  width: 100%;
  border: 1px solid #24211e;
  margin-top: 16px;
  margin-bottom: 4px;
  padding: 17px 20px;
  background: #282725;
  color: #fffdf9;
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ── Grocery screen ── */
.grocery-screen { padding-top: 0; }

.grocery-tools-hidden {
  display: none;
}

.grocery-headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 16px 8px;
}

.grocery-headline__title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.grocery-headline h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 8vw, 3.2rem);
  line-height: 0.96;
  letter-spacing: -0.045em;
}

.grocery-headline__chevron {
  color: #243c2b;
  font-size: 1.5rem;
  line-height: 1;
  margin-top: 6px;
}

.grocery-headline__more {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 12px 0 0;
  border: 0;
  background: transparent;
}

.grocery-headline__more span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #243c2b;
}

.grocery-groups {
  display: grid;
  gap: 28px;
  padding-inline: 16px;
  padding-bottom: 164px;
}

.grocery-group { display: grid; gap: 14px; }

.grocery-group--smart {
  gap: 10px;
  margin-bottom: 8px;
}

.grocery-group__header { display: block; }

.grocery-group__header h2 {
  margin: 0;
  font-size: clamp(1.65rem, 6vw, 2.2rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.grocery-group--smart .grocery-group__header h2 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #91a48e;
  margin-bottom: 8px;
}

.grocery-smart-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.grocery-smart-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(141, 164, 133, 0.08);
  border: 1px solid rgba(120, 147, 111, 0.15);
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  color: #3d3d3d;
  transition: all 0.2s ease;
}

.grocery-smart-item:hover {
  background: rgba(141, 164, 133, 0.15);
  border-color: rgba(120, 147, 111, 0.25);
}

.grocery-smart-item__icon {
  font-size: 1.2rem;
}

.grocery-smart-item__title {
  white-space: nowrap;
}

.grocery-entry-wrapper {
  display: flex;
  gap: 10px;
  align-items: center;
}

.grocery-entry-action {
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(120, 147, 111, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.98);
  color: #91a48e;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.2s ease;
}

.grocery-entry-action svg {
  width: 20px;
  height: 20px;
}

.grocery-entry-action--delete:hover {
  background: rgba(220, 100, 90, 0.1);
  color: #dc645a;
  border-color: rgba(220, 100, 90, 0.3);
}

.grocery-entry-action--add:hover {
  background: rgba(120, 147, 111, 0.1);
  color: #78936f;
  border-color: rgba(120, 147, 111, 0.3);
}

.grocery-entry {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto 48px;
  gap: 14px;
  padding: 14px 16px;
  align-items: center;
  border: 1px solid rgba(120, 147, 111, 0.08);
  flex: 1;
  text-align: left;
  background: rgba(255,255,255,0.98);
  border-radius: 999px;
  box-shadow: 0 3px 12px rgba(76,85,69,0.03);
}

.grocery-check {
  width: 40px; height: 40px;
  border-radius: 999px;
  border: 2px solid #90a890;
  background: #fff;
  display: grid;
  place-items: center;
  color: transparent;
  flex: none;
  font-size: 1rem;
}

.grocery-entry.is-checked .grocery-check {
  background: #cfd9ca;
  border-color: #cfd9ca;
  color: #fff;
}

.grocery-entry__img {
  width: 48px; height: 48px;
  border-radius: 999px;
  background: transparent;
  display: grid;
  place-items: center;
  font-size: 1.48rem;
  flex: none;
  overflow: hidden;
  transition: opacity 0.2s ease, filter 0.2s ease;
}

.grocery-entry.is-checked .grocery-entry__img {
  opacity: 0.4;
  filter: grayscale(1);
}

.grocery-entry__content {
  min-width: 0;
}

.grocery-entry__title {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.98rem;
  color: #2d2a27;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.grocery-entry__amount {
  color: #b5cbbb;
  background: #f1f6f1;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.grocery-entry.is-checked .grocery-entry__title {
  color: #b9b8b1;
  text-decoration: line-through;
}

.grocery-entry.is-checked {
  background: rgba(255,255,255,0.76);
  border-color: rgba(120, 147, 111, 0.04);
}

.grocery-empty {
  margin: 0;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255,255,255,0.92);
  color: var(--muted);
}

.grocery-empty-state {
  display: grid;
  gap: 14px;
}

.grocery-empty-hint {
  margin: 0;
  padding: 0 2px;
  color: var(--muted-strong);
  font-weight: 650;
}

.grocery-empty-recipes {
  padding-inline: 0;
}

.grocery-input-card {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 12px 0 28px;
  padding: 0 20px;
  height: 96px;
  border-radius: 999px;
  border: 1px solid rgba(120, 147, 111, 0.08);
  background: rgba(255,255,255,0.98);
  box-shadow: 0 3px 12px rgba(76,85,69,0.03);
}

.grocery-input-card__icon {
  color: #90a890;
  display: grid;
  place-items: center;
}

.grocery-input-card__icon svg {
  width: 30px;
  height: 30px;
  display: block;
}

.grocery-quick-input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: #243c2b;
  font-size: 1rem;
}

.grocery-toolbar,
.grocery-subtle {
  display: none;
}

/* ── Servings control ── */
.servings-control {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.92);
  border-radius: 999px;
  padding: 6px 10px;
  box-shadow: 0 4px 14px rgba(76,85,69,0.07);
}

.servings-btn {
  width: 28px; height: 28px;
  border-radius: 10px;
  border: 1px solid rgba(34, 32, 29, 0.08);
  background: #fff;
  color: #4a6b4c;
  font-size: 1.1rem;
  font-weight: 900;
  display: grid;
  place-items: center;
  line-height: 1;
}

.servings-btn:active { background: #d5e7d7; }

#servingsDisplay {
  font-size: 0.88rem;
  font-weight: 800;
  color: #4a6b4c;
  min-width: 44px;
  text-align: center;
}

/* ── Import screen ── */
.import-screen { padding-bottom: 0; }

.import-platforms {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 0 16px 20px;
}

.platform-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 12px;
  border: 1px solid rgba(34, 32, 29, 0.06);
  border-radius: 18px;
  background: rgba(255,255,255,0.88);
  box-shadow: 0 6px 18px rgba(76,85,69,0.05);
  cursor: pointer;
}

.platform-card--active {
  border-color: rgba(132, 160, 135, 0.35);
  background: #f5f8f4;
}

.platform-card__emoji { font-size: 2rem; }

.platform-card__name {
  font-weight: 800;
  font-size: 0.97rem;
  color: var(--text);
}

.platform-card__badge {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 3px 9px;
  border-radius: 999px;
  background: #d5e7d7;
  color: #3d6b41;
}

.platform-card__badge--soft {
  background: #f5e9d8;
  color: #8a5e34;
}

.import-url-form {
  padding: 0 16px 20px;
}

.import-url-row {
  display: flex;
  gap: 10px;
  align-items: center;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(34, 32, 29, 0.06);
  border-radius: 18px;
  padding: 6px 6px 6px 16px;
  box-shadow: 0 6px 18px rgba(76,85,69,0.05);
}

.import-url-input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  outline: none;
  font-size: 0.97rem;
  color: var(--text);
}

.import-url-input::placeholder { color: #b5b2ab; }

.import-go-btn {
  width: 44px; height: 44px;
  border-radius: 14px;
  border: 1px solid #24211e;
  background: #24211e;
  display: grid;
  place-items: center;
  flex: none;
  box-shadow: 0 6px 16px rgba(36,33,30,0.12);
}

.import-go-btn svg {
  width: 20px; height: 20px;
  stroke: #fff;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.import-go-btn:disabled { opacity: 0.5; }

.import-hint {
  margin: 10px 0 0;
  font-size: 0.84rem;
  color: var(--muted);
  padding: 0 4px;
}

.import-tips {
  margin: 4px 16px 0;
  padding: 18px;
  background: rgba(255,255,255,0.88);
  border-radius: 20px;
  box-shadow: 0 8px 22px rgba(76,85,69,0.06);
  display: grid;
  gap: 14px;
}

.import-tips__label {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: #a6a299;
  font-weight: 700;
}

.import-tip {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.import-tip__num {
  width: 26px; height: 26px;
  border-radius: 999px;
  background: #eef3ef;
  color: #4a6b4c;
  font-weight: 900;
  font-size: 0.88rem;
  display: grid;
  place-items: center;
  flex: none;
}

.import-tip p {
  margin: 0;
  font-size: 0.92rem;
  color: #5c5953;
  line-height: 1.45;
  padding-top: 4px;
}

.import-tips__or {
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #b8b2ab;
  text-transform: uppercase;
}

.import-tip__num svg {
  width: 15px;
  height: 15px;
  stroke: #4a6b4c;
}

/* ── Visual import screen ── */
.import-hero {
  text-align: center;
  padding: 24px 24px 16px;
}

.import-hero__icon {
  width: 72px;
  height: 72px;
  border-radius: 24px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, #b7d0b4 0%, #8da485 100%);
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 12px 24px rgba(141, 164, 133, 0.3);
}

.import-hero__icon svg {
  width: 32px;
  height: 32px;
}

.import-hero__title {
  margin: 0 0 8px;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}

.import-hero__subtitle {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--muted-strong);
  max-width: 320px;
  margin-inline: auto;
}

.import-platforms-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px 20px;
  flex-wrap: wrap;
}

.import-platform-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(34, 32, 29, 0.06);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  box-shadow: 0 4px 12px rgba(76, 85, 69, 0.04);
}

.import-platform-pill svg {
  width: 16px;
  height: 16px;
}

.import-platform-pill[title="TikTok"] svg { color: #000; }
.import-platform-pill[title="Instagram"] svg { color: #c5358d; }
.import-platform-pill[title="Websites"] svg { color: #4a6b4c; }

.import-url-label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: #a6a299;
  font-weight: 700;
  margin: 0 4px 8px;
}

.import-url-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: #8da485;
  flex: none;
  margin-right: -6px;
}

.import-url-icon svg {
  width: 18px;
  height: 18px;
}

.import-steps {
  margin: 4px 16px 32px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 22px;
  box-shadow: 0 8px 22px rgba(76, 85, 69, 0.06);
}

.import-steps__label {
  margin: 0 0 14px;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: #a6a299;
  font-weight: 700;
}

.import-steps__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}

.import-step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.import-step__num {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #b7d0b4;
  color: #fff;
  font-weight: 900;
  font-size: 0.95rem;
  display: grid;
  place-items: center;
  flex: none;
}

.import-step__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 4px;
}

.import-step__body strong {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.import-step__body span {
  font-size: 0.88rem;
  color: var(--muted-strong);
  line-height: 1.45;
}

.import-steps__alt {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed rgba(34, 32, 29, 0.1);
  display: flex;
  align-items: center;
  gap: 12px;
}

.import-steps__alt-label {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #b8b2ab;
  font-weight: 700;
  flex: none;
}

.import-steps__alt p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted-strong);
  line-height: 1.45;
}

/* ── Store order section ── */
.grocery-order {
  position: fixed;
  left: 50%;
  bottom: calc(102px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  width: min(calc(100% - 48px), 390px);
  z-index: 16;
  padding: 0;
}

.store-cta {
  width: 100%;
  height: 96px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 18px 0 16px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(0,113,194,0.2);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.store-cta:hover { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(0,113,194,0.24); }
.store-cta:active { transform: translateY(0); }

.store-cta--ah-pill {
  background: #0aa2e6;
  color: #fff;
}

.store-cta__logo {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: transparent;
  flex-shrink: 0;
  overflow: hidden;
}

.store-cta__logo svg {
  display: block;
  width: 50px;
  height: 50px;
}

.store-cta__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.store-cta__name {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
  color: #fff;
}

.store-cta__dest {
  font-size: 0.92rem;
  line-height: 1.2;
  color: rgba(255,255,255,0.88);
  text-align: left;
}

.store-cta__arrow {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  background: rgba(255,255,255,0.14);
  display: grid;
  place-items: center;
  font-size: 2rem;
  line-height: 1;
  color: #fff;
  flex-shrink: 0;
}

.store-assistant {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 18px;
  border-radius: 28px;
  background: rgba(255,255,255,0.88);
  box-shadow: 0 12px 28px rgba(76,85,69,0.08);
}

.store-assistant.is-hidden {
  display: none;
}

.store-assistant__copy {
  margin: 8px 0 0;
  color: var(--muted-strong);
  line-height: 1.45;
}

/* ── Recent imports on home ──────────────────────────────── */
.recent-imports-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding-inline: 16px;
  margin: 0 0 32px;
}

.recent-card {
  background: #fff;
  border-radius: 20px;
  border: 1px solid rgba(120, 147, 111, 0.1);
  box-shadow: 0 4px 12px rgba(36, 60, 43, 0.06);
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  padding: 0;
  width: 100%;
  position: relative;
  transition: box-shadow 160ms ease, border-color 160ms ease;
}

.recent-card:hover {
  border-color: rgba(120, 147, 111, 0.15);
  box-shadow: 0 6px 16px rgba(36, 60, 43, 0.1);
}

.recent-card__img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  display: block;
  background: #e8ede8;
}

.recent-card__body {
  padding: 10px 12px 12px;
}

.recent-card__title {
  margin: 0 0 4px;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #243c2b;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.recent-card__meta {
  margin: 0;
  font-size: 0.76rem;
  color: #9dad9d;
  font-weight: 500;
}

.recent-card--add {
  border: 2px dashed rgba(141, 164, 133, 0.35);
  background: rgba(141, 164, 133, 0.04);
  display: flex;
  flex-direction: column;
}
.recent-card--add:hover {
  border-color: #8da485;
  background: rgba(141, 164, 133, 0.08);
}

.recent-card__add-icon {
  width: 100%;
  aspect-ratio: 4/3;
  display: grid;
  place-items: center;
  background: rgba(141, 164, 133, 0.08);
}
.recent-card__add-icon svg {
  width: 28px;
  height: 28px;
  color: #8da485;
  opacity: 0.7;
}

.recent-card__favicon {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: 0 1px 6px rgba(0,0,0,0.14);
  pointer-events: none;
}
.recent-card__favicon img {
  width: 15px;
  height: 15px;
  object-fit: contain;
  border-radius: 3px;
}

.grocery-clear-btn {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: #fff;
  border: 1.5px solid rgba(200, 80, 80, 0.2);
  color: #c85050;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  flex-shrink: 0;
}

.grocery-clear-btn svg {
  width: 18px;
  height: 18px;
}

/* ── Bottom nav — unified flat bar design ── */
.nav-item {
  border: 0;
  background: transparent;
  color: #a2a099;
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 12px 4px;
  border-radius: 24px;
}

.nav-item span {
  font-size: 0.82rem;
  font-weight: 700;
}

.nav-item--active {
  color: #9ab59d;
  background: #eef5ef;
}

.nav-item--active svg { fill: #9ab59d; }

/* Nav badge (grocery count) */
.nav-icon-wrap {
  position: relative;
  display: grid;
  place-items: center;
}

.nav-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #f07046;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
  border: 2px solid rgba(255,255,255,0.9);
}

.nav-badge:not(:empty) { display: flex; }

/* Nav dot badge (announcements) */
.nav-badge--dot {
  width: 10px;
  height: 10px;
  min-width: 10px;
  border-radius: 999px;
  background: #e04458;
  border: 2px solid rgba(255,255,255,0.95);
  position: absolute;
  top: -2px;
  right: -2px;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 160ms ease, transform 160ms ease;
  pointer-events: none;
}

.nav-badge--visible {
  opacity: 1;
  transform: scale(1);
}

/* Announcement modal */
.announce-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(36, 33, 30, 0.42);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 9999;
}

.announce-modal {
  width: min(420px, 100%);
  background: var(--surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  box-shadow:
    0 26px 80px rgba(36, 60, 43, 0.22),
    0 10px 26px rgba(55, 50, 45, 0.12);
  padding: 18px 18px 16px;
  position: relative;
  overflow: hidden;
}

.announce-modal__accent {
  position: absolute;
  inset: 0 0 auto 0;
  height: 12px;
  background:
    linear-gradient(90deg, rgba(141, 164, 133, 0.65) 0%, rgba(246, 182, 157, 0.62) 55%, rgba(220, 232, 220, 0.55) 100%);
}

.announce-modal__head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  margin-bottom: 10px;
}

.announce-modal__icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.75) 46%, rgba(255, 255, 255, 0.4) 100%),
    linear-gradient(135deg, rgba(220, 232, 220, 0.9), rgba(255, 241, 231, 0.85));
  border: 1px solid rgba(34, 32, 29, 0.06);
  color: #5d7a61;
  box-shadow: 0 10px 22px rgba(116, 111, 98, 0.08);
}

.announce-modal__icon svg {
  width: 20px;
  height: 20px;
}

.announce-modal__close {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  border: 1px solid rgba(34, 32, 29, 0.08);
  background: rgba(255, 255, 255, 0.75);
  display: grid;
  place-items: center;
  color: var(--muted-strong);
  box-shadow: 0 8px 18px rgba(55, 50, 45, 0.08);
}

.announce-modal__close:hover {
  background: rgba(255, 255, 255, 0.92);
}

.announce-modal__close svg {
  width: 18px;
  height: 18px;
}

.announce-modal__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.08rem;
  letter-spacing: -0.02em;
  color: var(--text);
}

.announce-modal__body {
  margin: 0 0 16px;
  color: var(--muted-strong);
  line-height: 1.45;
}

.announce-modal__actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

@media (max-width: 420px) {
  .announce-modal__actions {
    justify-content: stretch;
  }
  .announce-modal__actions .primary-button,
  .announce-modal__actions .secondary-button {
    width: 100%;
  }
}

/* ── Kanalen row ── */
.channel-row {
  display: flex;
  gap: 16px;
  padding: 4px 16px 20px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.channel-row::-webkit-scrollbar { display: none; }

.channel-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.channel-avatar {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.04em;
}

.channel-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted-strong);
  text-align: center;
  max-width: 68px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Snel & Makkelijk horizontal list ── */
.quick-list {
  display: flex;
  gap: 12px;
  padding: 4px 16px 20px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.quick-list::-webkit-scrollbar { display: none; }

.quick-card {
  flex-shrink: 0;
  width: 220px;
  border: 0;
  background: rgba(255,255,255,0.92);
  border-radius: 22px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  box-shadow: 0 8px 22px rgba(112,106,95,0.07);
  cursor: pointer;
}

.quick-card__img {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: rgba(255,247,234,0.9);
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.quick-card__copy {
  display: grid;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.quick-card__eyebrow {
  color: #8fa58d;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.quick-card__copy strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.05;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.quick-card__copy span {
  color: #9a978f;
  font-size: 0.82rem;
}

.quick-card__glow { display: none; }

.mealplan-screen {
  padding: 0 16px calc(132px + env(safe-area-inset-bottom, 0px));
}
.profile-screen {
  padding: 0 0 calc(132px + env(safe-area-inset-bottom, 0px));
}

.planner-intro,
.profile-section-head {
  margin-bottom: 18px;
}

.planner-intro h1,
.profile-hero h1,
.profile-section-head h2 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: clamp(2rem, 8vw, 3rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.planner-intro p,
.profile-meta,
.profile-helper,
.profile-section-head p {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.5;
}

.planner-focus,
.profile-hero,
.premium-card {
  display: grid;
  gap: 14px;
}

.planner-focus__card,
.planner-day,
.premium-card {
  background: rgba(255,255,255,0.9);
  border-radius: 26px;
  box-shadow: 0 12px 28px rgba(76,85,69,0.06);
}

.planner-focus__card,
.premium-card {
  padding: 18px;
}

.planner-focus__title {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 1.65rem;
}

.planner-focus__meta {
  margin: 0;
  color: var(--muted-strong);
}

.planner-focus__hint {
  margin: 8px 0 0;
  font-size: 0.82rem;
  color: #aaa59d;
}

.planner-focus__card--empty {
  border: 2px dashed var(--sage);
  background: rgba(220,232,220,0.18);
  box-shadow: none;
}

.planner-grid {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.planner-day {
  padding: 16px;
}

.planner-day__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.planner-day__head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.45rem;
}

.planner-day__recipe {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.45;
}

.planner-day__empty {
  color: #aaa59d;
}

.planner-day__actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.cookbook-form {
  display: grid;
  gap: 10px;
}

.cookbook-form--inline {
  margin-bottom: 18px;
}

.profile-hero {
  justify-items: center;
  text-align: center;
  padding: 10px 4px 0;
}

.profile-avatar-wrap {
  position: relative;
  width: 156px;
  height: 156px;
  margin: 4px auto 0;
}

.profile-avatar {
  width: 100%;
  height: 100%;
  border-radius: 42px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 16px 38px rgba(70,74,66,0.12);
}

.profile-avatar__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar-edit {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  border: 0;
  background: rgba(255,255,255,0.98);
  box-shadow: 0 10px 24px rgba(70,74,66,0.12);
  display: grid;
  place-items: center;
}

.profile-avatar-edit svg {
  width: 20px;
  height: 20px;
  fill: #3a3a36;
}

.profile-hero h1 {
  font-size: clamp(2.35rem, 9vw, 3.55rem);
  color: #b7ceb8;
  margin-top: 8px;
}

.profile-meta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 0.98rem;
}

.profile-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  width: 100%;
  margin-top: 6px;
}

.profile-actions__main {
  width: 100%;
}

.account-card {
  margin: 18px 0 24px;
  padding: 18px;
  border-radius: 26px;
  background: rgba(255,255,255,0.9);
  box-shadow: 0 12px 28px rgba(76,85,69,0.06);
  display: grid;
  gap: 14px;
}

.account-card h2 {
  margin: 4px 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 5.2vw, 2.2rem);
  letter-spacing: -0.04em;
}

.account-copy {
  margin: 8px 0 0;
  color: var(--muted-strong);
  line-height: 1.5;
}

.account-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.account-actions .hidden {
  display: none;
}

.premium-card {
  margin: 26px 0 28px;
  border: 1px solid rgba(232, 225, 214, 0.9);
  background:
    radial-gradient(circle at top left, rgba(255,245,230,0.8), transparent 22%),
    rgba(255,255,255,0.92);
}

.premium-card__head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.premium-card__icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #fff7e8;
  display: grid;
  place-items: center;
  color: #3b3a33;
  font-size: 1.2rem;
}

.premium-card__head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 6vw, 2.45rem);
  letter-spacing: -0.04em;
}

.premium-card p {
  margin: 0;
  color: #5e5b56;
  line-height: 1.55;
  font-size: 0.98rem;
}

.premium-card__button {
  border: 0;
  border-radius: 22px;
  background: #b8d3b9;
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  padding: 17px 18px;
  box-shadow: 0 12px 24px rgba(112, 142, 114, 0.18);
}

/* ── Profile v2 (new layout) ──────────────────────────────────────── */
.profile-screen {
  background: #f5f5f5;
  padding-bottom: 110px;
}

.profile2-hero {
  background: #fff;
  padding: 20px 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 16px;
}

.profile2-avatar-wrap {
  position: relative;
  margin-bottom: 6px;
}

.profile2-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #e8b4a0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
}

.profile2-avatar__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile2-camera-btn {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #6b9e72;
  border: 2.5px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
}

.profile2-camera-btn svg {
  width: 16px;
  height: 16px;
  stroke: #fff;
}

.profile2-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: #1a1a1a;
  text-align: center;
  line-height: 1.2;
}

.profile2-email {
  font-size: 0.9rem;
  color: #6b7280;
  text-align: center;
  margin-bottom: 6px;
}

.profile2-stats {
  display: flex;
  align-items: center;
  gap: 0;
  padding-top: 12px;
  border-top: 1px solid #f0f0f0;
  width: 100%;
  justify-content: center;
}

.profile2-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.profile2-stat__num {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.1;
}

.profile2-stat__lbl {
  font-size: 0.67rem;
  font-weight: 600;
  color: #9ca3af;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.profile2-stat--btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 4px;
  border-radius: 10px;
  transition: background 0.15s;
}
.profile2-stat--btn:active {
  background: rgba(0,0,0,0.05);
}

.profile2-stat-divider {
  width: 1px;
  height: 36px;
  background: #e5e7eb;
  flex-shrink: 0;
}

.profile2-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #9ca3af;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0 20px 8px;
}

.profile2-card {
  background: #fff;
  border-radius: 16px;
  margin: 0 14px 20px;
  overflow: hidden;
}

.admin-search-terms__status {
  font-size: 0.85rem;
  color: #989188;
  margin-bottom: 10px;
}

.admin-search-terms__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.admin-search-terms__table th,
.admin-search-terms__table td {
  padding: 10px 0;
  border-bottom: 1px solid #f3f5ef;
  vertical-align: middle;
}

.admin-search-terms__table th {
  font-size: 0.72rem;
  font-weight: 700;
  color: #9ca3af;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-search-terms__table td.query {
  color: #3d3d3b;
  padding-right: 10px;
  max-width: 420px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-search-terms__table th.num,
.admin-search-terms__table td.num {
  text-align: right;
  width: 64px;
  color: #3d3d3b;
  font-variant-numeric: tabular-nums;
}

/* ── Admin tabs (in-app) ─────────────────────────────────────────────────── */
.admin-tabs {
  position: sticky;
  top: 10px;
  z-index: 20;
  margin: 0 14px 16px;
}

.admin-tabs__rail {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid rgba(34, 32, 29, 0.10);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 10px 24px rgba(116, 111, 98, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow-x: auto;
}

.admin-tabs__btn {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  color: rgba(37, 33, 29, 0.72);
  white-space: nowrap;
}

.admin-tabs__btn[aria-selected="true"] {
  background: rgba(141, 164, 133, 0.18);
  color: rgba(37, 33, 29, 0.92);
  box-shadow: inset 0 0 0 1px rgba(141, 164, 133, 0.28);
}

.admin-tab-section { display: none; }
.admin-tab-section.is-active { display: block; }

.profile2-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.profile2-row--notap {
  cursor: default;
}

.profile2-row__icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.profile2-row__icon svg {
  width: 20px;
  height: 20px;
}

.profile2-row__label {
  flex: 1;
  font-size: 0.98rem;
  font-weight: 500;
  color: #1a1a1a;
}

.profile2-row.profile2-row--sub,
.profile2-row.profile2-row--sub2 {
  padding-top: 12px;
  padding-bottom: 12px;
}

.profile2-row.profile2-row--sub .profile2-row__label {
  font-size: 0.95rem;
  font-weight: 500;
  color: #2f2d2a;
}

.profile2-row.profile2-row--sub2 .profile2-row__label {
  font-size: 0.9rem;
  font-weight: 500;
  color: #6b6258;
}

.profile2-row--danger .profile2-row__label {
  color: #dc2626;
}

.profile2-row__meta {
  font-size: 0.85rem;
  color: #9ca3af;
  margin-right: 2px;
}

.profile2-row__chevron {
  width: 18px;
  height: 18px;
  color: #d1d5db;
  flex-shrink: 0;
}

.profile2-row-divider {
  height: 1px;
  background: #f3f4f6;
  margin-left: 68px;
}

/* Toggle switch */
.profile2-toggle {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 28px;
  margin-left: auto;
  flex-shrink: 0;
}

.profile2-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.profile2-toggle__track {
  position: absolute;
  inset: 0;
  border-radius: 28px;
  background: #d1d5db;
  transition: background 0.2s;
}

.profile2-toggle__track::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  top: 3px;
  left: 3px;
  transition: left 0.2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
}

.profile2-toggle input:checked + .profile2-toggle__track {
  background: #6b9e72;
}

.profile2-toggle input:checked + .profile2-toggle__track::after {
  left: 23px;
}

/* Profile screen background matches rest of site */
.profile-screen {
  background: var(--bg);
}
.profile2-hero {
  background: var(--bg);
}

/* ── Not-logged-in banner ── */
.profile-login-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 40px 24px 32px;
  text-align: center;
}

.profile-login-banner__avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #f0ece5;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}
.profile-login-banner__avatar svg {
  width: 44px;
  height: 44px;
}

/* Make logo larger on login/welcome screen */
.profile-login-banner .brand-logo {
  height: 160px;
  max-width: 380px;
  margin-bottom: 16px;
}

.profile-login-banner__title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0;
  letter-spacing: -0.03em;
}

.profile-login-banner__sub {
  font-size: 0.92rem;
  color: #6b7280;
  margin: 0 0 8px;
  line-height: 1.5;
  max-width: 260px;
}

.profile-login-banner__btn {
  display: block;
  width: 100%;
  max-width: 280px;
  padding: 14px 20px;
  border-radius: 14px;
  font-size: 0.98rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s;
}
.profile-login-banner__btn:active { opacity: 0.8; }
.profile-login-banner__btn--primary {
  background: #78936f;
  color: #fff;
}
.profile-login-banner__btn--ghost {
  background: transparent;
  color: #78936f;
  border: 2px solid #c5d5c2;
}

/* ── Profile sub-panels (slide-in pages) ── */
.profile-subpanel {
  position: fixed;
  inset: 0;
  background: var(--bg);
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 200;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.profile-subpanel--active {
  transform: translateX(0);
}

/* Recipe edit panel - integrated Plately layout */
#recipeEditPanel {
  transform: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
  background: var(--bg);
}
#recipeEditPanel.profile-subpanel--active {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

#recipeEditPanel .topbar--sub {
  background: var(--bg);
  border-bottom: 1px solid rgba(0,0,0,0.07);
  padding: 14px 16px;
  min-height: 56px;
}

#recipeEditPanel .topbar-title {
  font-size: 1.2rem;
  font-weight: 600;
}

#recipeEditPanel .recipe-edit__save-btn {
  background: var(--sage-deep);
  color: white;
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  cursor: pointer;
}

.recipe-edit__body {
  padding: 20px 16px;
}

/* ── Universal sub-page topbar (profile panels, cookbook detail, etc.) ── */
.topbar--sub {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  background: var(--bg);
  border-bottom: 1px solid rgba(0,0,0,0.07);
  padding: 14px 12px;
  margin-bottom: 0;
  gap: 0;
  min-height: 56px;
}

.topbar--sub .topbar-back-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  padding: 0;
  color: #1a1a1a;
  -webkit-tap-highlight-color: transparent;
}

.topbar--sub .topbar-back-btn svg {
  width: 20px;
  height: 20px;
  display: block;
}

.topbar--sub .topbar-back-btn:active {
  background: rgba(0,0,0,0.10);
}

.topbar--sub .topbar-title {
  flex: 1;
  text-align: center;
  font-family: var(--font-body, inherit);
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: 0;
  margin: 0;
}

/* Right spacer keeps title perfectly centered */
.topbar--sub .topbar-spacer {
  width: 40px;
  flex-shrink: 0;
}

/* Legacy: profile sub-panels that still use topbar--std */
.profile-subpanel .topbar--sub {
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
  border-bottom: 1px solid rgba(0,0,0,0.07);
  padding: 14px 12px;
  margin-bottom: 0;
  min-height: 56px;
}

.profile-subpanel .topbar-title {
  font-family: var(--font-body, inherit);
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: 0;
  margin: 0;
  flex: 1;
  text-align: center;
}

.profile-subpanel .icon-button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0,0,0,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
  border: none;
  cursor: pointer;
  color: #1a1a1a;
}

.profile-subpanel .icon-button svg {
  width: 20px;
  height: 20px;
  display: block;
}

/* Changelog styles */
.changelog-release {
  margin: 0 14px 20px;
}

.changelog-release__header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
  padding-top: 4px;
}

.changelog-release__version {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: #1a1a1a;
}

.changelog-release__date {
  font-size: 0.82rem;
  color: #9ca3af;
}

.changelog-release__list {
  margin: 0;
  padding: 0;
  list-style: none;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
}

.changelog-release__item {
  padding: 12px 16px;
  font-size: 0.93rem;
  color: #374151;
  border-bottom: 1px solid #f3f4f6;
  line-height: 1.45;
}

.changelog-release__item:last-child {
  border-bottom: none;
}

.changelog-release__item::before {
  content: "✦ ";
  color: #ca8a04;
  font-size: 0.7rem;
}

.profile-subpanel__body {
  padding: 8px 0 100px;
}

.profile-subpanel__avatar-section {
  display: flex;
  justify-content: center;
  padding: 24px 0 20px;
}

.profile-subpanel__form-card {
  margin-top: 0 !important;
}

.profile-subpanel__field {
  padding: 14px 16px 10px;
}

.profile-subpanel__label {
  display: block;
  font-size: 0.74rem;
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 6px;
}

.profile-subpanel__input {
  display: block;
  width: 100%;
  border: none;
  background: transparent;
  font-size: 1rem;
  color: #1a1a1a;
  padding: 0;
  outline: none;
  font-family: inherit;
}

.profile-subpanel__save-btn {
  display: block;
  width: calc(100% - 28px);
  margin: 20px 14px 0;
  padding: 15px;
  background: #78936f;
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
}

.profile-subpanel__save-btn:active {
  background: #5e7857;
}

.profile-subpanel__avatar-hint {
  text-align: center;
  font-size: 0.78rem;
  color: #9ca3af;
  margin: 6px 0 0;
}

.profile-subpanel__remove-photo-btn {
  display: block;
  width: calc(100% - 28px);
  margin: 10px 14px 0;
  padding: 13px;
  background: transparent;
  color: #e05252;
  border: 1.5px solid #f3c5c5;
  border-radius: 14px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
}

.profile-subpanel__remove-photo-btn:active {
  background: #fff0f0;
}

/* Language checkmark */
.lang-check {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.profile-section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.profile-section-head h2 {
  font-size: clamp(1.8rem, 6vw, 2.6rem);
  color: #b9ceb9;
}

.cookbooks-screen .cookbook-grid {
  padding: 16px 16px calc(100px + env(safe-area-inset-bottom, 0px));
}

.cookbook-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

@media (min-width: 760px) {
  .cookbook-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
  }
}

.cookbook-grid--detail {
  display: block;
}

.cookbook-collection-wrap {
  position: relative;
}

.cookbook-collection-wrap .cookbook-collection {
  width: 100%;
}

.cookbook-collection {
  position: relative;
  border: 0;
  padding: 0;
  background: transparent;
  text-align: left;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

.cookbook-collection__cover {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 26px;
  overflow: hidden;
  background: rgba(255,255,255,0.9);
  box-shadow: 0 12px 26px rgba(76,85,69,0.06);
}

.cookbook-collection__cover--grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
  padding: 3px;
  background: #fff;
}

.cookbook-collection__cover--empty {
  display: grid;
  place-items: center;
  color: #d1d7ce;
  font-size: 2.8rem;
  border: 1px dashed rgba(170, 181, 166, 0.45);
  box-shadow: none;
}

.cookbook-collection--add .cookbook-collection__cover--empty {
  background: rgba(255,255,255,0.56);
}

.cookbook-collection--add .cookbook-collection__head h3 {
  color: #cdd4c9;
}

.cookbook-collection__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cookbook-collection__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.92);
  color: var(--muted);
  font-weight: 800;
  font-size: 0.86rem;
  box-shadow: 0 6px 14px rgba(70,74,66,0.08);
}

.cookbook-collection__head {
  padding: 11px 12px 13px;
}

.cookbook-collection__head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: #1a1a1a !important;
  min-height: 2.45rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.cookbook-collection__meta {
  margin: 6px 0 0;
  color: #8e8b84;
  font-size: 0.88rem;
  line-height: 1.35;
}

/* Cookbook detail recipes should match recipe cards */
.cb-detail__grid {
  padding-inline: 16px;
}
#cookbookList .cb-detail__grid {
  padding-inline: 0;
}

.cb-detail__item {
  background: rgba(255,255,255,0.9);
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 12px 26px rgba(76,85,69,0.06);
}

.cb-detail__img {
  aspect-ratio: 1 / 1;
  border-radius: 0;
  box-shadow: none;
}

.cb-detail__card-body {
  padding: 11px 12px 13px;
}

.cb-detail__card-title {
  font-size: 1.2rem;
  line-height: 1.02;
  margin-bottom: 6px;
  min-height: 2.45rem;
  letter-spacing: -0.02em;
}

.cb-detail__remove,
.cb-detail__select {
  top: 10px;
  width: 28px;
  height: 28px;
}
.cb-detail__remove { right: 10px; left: auto; border-radius: 999px; box-shadow: 0 6px 14px rgba(70,74,66,0.08); }
.cb-detail__select { left: 10px; right: auto; }

.cookbook-collection.is-active .cookbook-collection__cover {
  box-shadow: 0 14px 34px rgba(129, 159, 131, 0.18);
  outline: 2px solid rgba(174, 205, 176, 0.85);
}

.profile-helper {
  margin-top: 14px;
  font-size: 0.88rem;
  text-align: center;
}

.profile-space {
  height: 10px;
}

/* ── Modal ── */
/* ── Auth full-screen panel ── */
/* ══ Auth screen ══════════════════════════════════════════════════════════════ */
.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: var(--bg);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.auth-screen.hidden { display: none !important; }

.auth-screen__close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0,0,0,0.07);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  z-index: 1;
}
.auth-screen__close-btn svg { width: 18px; height: 18px; display: block; }
.auth-screen__close-btn:active { background: rgba(0,0,0,0.14); }

.auth-screen__inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0 24px 48px;
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
}

.auth-screen__brand {
  text-align: center;
  padding: 40px 0 32px;
}

.auth-screen__logo {
  height: 120px;
  width: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto 16px;
}

.auth-screen__title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  color: #1a1a1a;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.auth-screen__subtitle {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.4;
}

.auth-screen__form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-field__label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.auth-field__input {
  width: 100%;
  padding: 15px 16px;
  border: 1.5px solid #e5e2dc;
  border-radius: 14px;
  background: #fff;
  font-size: 1rem;
  font-family: inherit;
  color: #1a1a1a;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s;
}
.auth-field__input:focus { border-color: #78936f; }

.auth-field__password-wrap { position: relative; }
.auth-field__password-wrap .auth-field__input { padding-right: 48px; }

.auth-field__eye {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: #9ca3af;
  display: flex;
  align-items: center;
}
.auth-field__eye svg { width: 20px; height: 20px; display: block; }

.auth-field__forgot-link {
  background: none;
  border: none;
  color: #8da485;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  margin-top: 6px;
  text-decoration: underline;
  text-decoration-color: rgba(141, 164, 133, 0.3);
  transition: color 0.15s, text-decoration-color 0.15s;
}
.auth-field__forgot-link:hover {
  color: #78936f;
  text-decoration-color: #78936f;
}

.auth-screen__feedback {
  min-height: 20px;
  font-size: 0.88rem;
  color: #e05252;
  margin: -4px 0 0;
  text-align: center;
}
.auth-screen__feedback:empty { display: none; }

.auth-screen__submit {
  display: block;
  width: 100%;
  padding: 16px;
  background: #78936f;
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 1.05rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.15s;
}
.auth-screen__submit:active { background: #5e7857; }
.auth-screen__submit:disabled { opacity: 0.6; cursor: default; }

.auth-screen__switch {
  text-align: center;
  margin-top: 20px;
}

.auth-screen__switch-btn {
  background: none;
  border: none;
  font-size: 0.95rem;
  color: #6b7280;
  cursor: pointer;
  font-family: inherit;
  padding: 8px;
}

.auth-screen__switch-btn strong { color: #78936f; }

.auth-screen__reset-form {
  display: flex;
  flex-direction: column;
}

.auth-screen__reset-form.hidden {
  display: none;
}

.auth-screen__reset-back {
  background: none;
  border: none;
  color: #8da485;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0 0 12px 0;
  text-align: left;
  margin-bottom: 12px;
}

.auth-screen__reset-note {
  font-size: 0.85rem;
  color: #666;
  text-align: center;
  margin-top: 16px;
  line-height: 1.4;
}

.auth-screen__divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: #d1cfc9;
  font-size: 0.85rem;
}

.auth-screen__divider::before,
.auth-screen__divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e5e2dc;
}

.auth-screen__social-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 8px;
}

.auth-screen__social-buttons--single {
  justify-content: center;
}

.auth-screen__social-btn {
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border: none;
  border-radius: 50%;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 40px;
  height: 40px;
  background: #f0f0f0;
  color: #333;
}

.auth-screen__social-btn:hover {
  background: #e0e0e0;
  transform: translateY(-2px);
}

.auth-screen__social-btn:active {
  transform: scale(0.95);
}

.auth-screen__social-btn svg {
  width: 20px;
  height: 20px;
  display: block;
}

.auth-screen__social-btn--tiktok {
  background: #f0f0f0;
}

.auth-screen__social-btn--tiktok:hover {
  background: #e0e0e0;
}

.auth-screen__social-btn--instagram {
  background: #f0f0f0;
}

.auth-screen__social-btn--instagram:hover {
  background: #fce7f3;
}

.auth-screen__social-btn--instagram svg {
  color: #e4405f;
  fill: #e4405f;
}

/* ══ Onboarding screen ════════════════════════════════════════════════════════ */
.onboarding-screen {
  position: fixed;
  inset: 0;
  z-index: 320;
  background: var(--bg);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  -webkit-overflow-scrolling: touch;
}
.onboarding-screen.hidden { display: none !important; }

.onboarding-container {
  max-width: 520px;
  width: 100%;
  margin: 0 auto;
}

.onboarding-screen .topbar--sub {
  position: sticky;
  top: 0;
  z-index: 12;
}

.onboarding-step {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-top: 48px;
}
.onboarding-step.hidden { display: none; }

.onboarding-header {
  text-align: center;
}

.onboarding-progress {
  display: inline-block;
  padding: 4px 10px;
  background: #f3f4f6;
  color: #6b7280;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}

.onboarding-title {
  margin: 12px 0 8px;
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  color: #1a1a1a;
  letter-spacing: -0.02em;
}

.onboarding-subtitle {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.onboarding-channels {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.onboarding-channel-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface);
  border-radius: 12px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  font-size: 0.95rem;
}
.onboarding-channel-item:active { background: var(--sage); opacity: 0.7; }
.onboarding-channel-item.selected { border-color: #78936f; background: rgba(120,147,111,0.08); }

.onboarding-channel-item input {
  width: 16px;
  height: 16px;
  cursor: pointer;
  margin: 0;
  flex-shrink: 0;
}

.onboarding-channel-avatar {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #f0f0f0;
  flex-shrink: 0;
  font-weight: 700;
  font-size: .58rem;
  color: #999;
  letter-spacing: -0.02em;
  overflow: hidden;
}

.onboarding-channel-avatar__favicon {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.onboarding-suggest-section {
  display: flex;
  justify-content: center;
  padding: 12px 0 8px;
  border-top: 1px solid rgba(0,0,0,0.06);
  margin-top: 8px;
}

.onboarding-suggest-btn {
  padding: 4px 8px;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: #8da485;
  font-size: 0.85rem;
  font-weight: 400;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 6px;
}

.onboarding-suggest-btn:active {
  background: rgba(141, 164, 133, 0.08);
}

.onboarding-suggest-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.onboarding-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.onboarding-form .auth-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.onboarding-photo-upload {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.onboarding-photo-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 28px 20px;
  background: var(--surface);
  border: 2px dashed rgba(120,147,111,0.3);
  border-radius: 14px;
  cursor: pointer;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.15s, background 0.15s;
}
.onboarding-photo-btn svg { width: 28px; height: 28px; display: block; opacity: 0.6; }
.onboarding-photo-btn:active { background: rgba(120,147,111,0.06); }

.onboarding-actions {
  display: flex;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
}

.onboarding-btn {
  flex: 1;
  padding: 14px 16px;
  border: none;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.15s;
}
.onboarding-btn:active { opacity: 0.8; }

.onboarding-btn--primary {
  background: #78936f;
  color: #fff;
}

.onboarding-btn--secondary {
  background: transparent;
  color: #6b7280;
  border: 1.5px solid #e5e2dc;
}

/* Progress dots */
.onboarding-progress-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 16px 0;
}

.onboarding-progress-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e5e2dc;
  transition: background 0.3s, transform 0.3s;
}

.onboarding-progress-dot.active {
  background: #78936f;
  transform: scale(1.3);
}

/* Hero icons */
.onboarding-hero-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 12px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.onboarding-hero-icon svg {
  width: 44px;
  height: 44px;
  display: block;
}

.onboarding-hero-icon--channels {
  background: rgba(120, 147, 111, 0.12);
  color: #78936f;
}

.onboarding-hero-icon--book {
  background: rgba(168, 135, 209, 0.12);
  color: #a887d1;
}

.onboarding-hero-icon--profile {
  background: rgba(210, 152, 100, 0.12);
  color: #d29864;
}

/* Suggestion pills */
.onboarding-suggestions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.onboarding-suggestions__label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
}

.onboarding-suggestion-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.onboarding-suggestion-pill {
  padding: 10px 14px;
  background: var(--surface);
  border: 1.5px solid transparent;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  font-family: inherit;
}

.onboarding-suggestion-pill:active {
  border-color: #78936f;
  background: rgba(120, 147, 111, 0.1);
}

/* Photo upload styling */
.onboarding-photo-btn {
  position: relative;
  width: 120px;
  height: 120px;
  padding: 0;
  background: var(--surface);
  border: 2px solid #e5e2dc;
  border-radius: 50%;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  overflow: hidden;
}

.onboarding-photo-btn:active {
  background: rgba(120, 147, 111, 0.06);
  border-color: #78936f;
}

.onboarding-photo-circle {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background:
    radial-gradient(120px 120px at 30% 20%, rgba(120, 147, 111, 0.10), transparent 55%),
    linear-gradient(180deg, #f5f3ec 0%, #ece8dd 100%);
}

.onboarding-photo-icon {
  width: 56px;
  height: 56px;
  color: #78936f;
  opacity: 0.85;
  stroke-width: 1.7;
}

.onboarding-photo-btn:focus-visible {
  outline: 3px solid rgba(120, 147, 111, 0.35);
  outline-offset: 3px;
}

.onboarding-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.onboarding-tile {
  padding: 12px 12px;
  border-radius: 14px;
  border: 1.5px solid #e5e2dc;
  background: var(--surface);
  color: #1a1a1a;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.onboarding-tile[aria-pressed="true"] {
  border-color: #78936f;
  background: rgba(120, 147, 111, 0.1);
}

.onboarding-tile:active {
  transform: scale(0.99);
}

.onboarding-tile:focus-visible {
  outline: 3px solid rgba(120, 147, 111, 0.35);
  outline-offset: 2px;
}

@media (max-width: 380px) {
  .onboarding-tiles {
    grid-template-columns: 1fr;
  }
}

.onboarding-photo-camera {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 38px;
  height: 38px;
  background: linear-gradient(180deg, #8aa57f 0%, #6f8a66 100%);
  border: 3px solid var(--surface);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(82, 102, 70, 0.28);
}

.onboarding-photo-camera svg {
  width: 18px;
  height: 18px;
  color: #fff;
}

.onboarding-photo-hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 12px 0 0;
  text-align: center;
}

/* ── Home empty states ────────────────────────────────────────────────────────── */
.home-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0;
  margin: 0 16px;
  border: 2px dashed rgba(141, 164, 133, 0.35);
  background: rgba(141, 164, 133, 0.04);
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  text-align: center;
}

.home-empty-state:hover {
  border-color: #8da485;
  background: rgba(141, 164, 133, 0.08);
}

.home-empty-state__icon {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 4/3;
  background: rgba(141, 164, 133, 0.08);
}

.home-empty-state__icon svg {
  width: 28px;
  height: 28px;
  color: #8da485;
  opacity: 0.7;
}

.home-empty-state__title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0;
  text-align: center;
  padding: 12px 12px 4px;
}

.home-empty-state__text {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0;
  text-align: center;
  padding: 0 12px 12px;
  font-weight: 500;
}

.home-empty-state__btn {
  display: none;
}

.hidden { display: none !important; }

/* ── Custom confirm action sheet ─────────────────────────────────────────────── */
.confirm-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 350;
}
.confirm-sheet-backdrop.hidden { display: none !important; }

.confirm-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 351;
  background: var(--bg);
  border-radius: 20px 20px 0 0;
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom, 0px));
  max-width: 520px;
  margin: 0 auto;
}
.confirm-sheet.hidden { display: none !important; }

.confirm-sheet__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 4px;
  text-align: center;
}

.confirm-sheet__subtitle {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0 0 20px;
  text-align: center;
}
.confirm-sheet__subtitle:empty { display: none; }

.confirm-sheet__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.confirm-sheet__btn {
  display: block;
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.15s;
}
.confirm-sheet__btn:active { opacity: 0.8; }

.confirm-sheet__btn--confirm {
  background: #78936f;
  color: #fff;
}
.confirm-sheet__btn--destructive {
  background: #ef4444;
  color: #fff;
}
.confirm-sheet__btn--cancel {
  background: rgba(0,0,0,0.06);
  color: #4b5563;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
}
.modal.hidden, .toast.hidden { display: none; }
.hidden { display: none !important; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(24,26,22,0.34);
  backdrop-filter: blur(4px);
}

.modal-sheet {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  width: min(100%, 430px);
  margin: 0 auto;
  background: #f8f7f2;
  border-radius: 24px 24px 0 0;
  /* Extra bottom padding so content clears the fixed nav bar (~80 px) */
  padding: 12px 16px calc(22px + 82px);
  box-shadow: 0 -16px 44px rgba(33,37,30,0.18);
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal--fullscreen .modal-backdrop { display: none; }

.modal-sheet--fullscreen {
  top: 0;
  bottom: 0;
  width: 100%;
  max-height: 100vh;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

/* ── Kookstand overlay (full-screen cooking mode) ─────────────────────────── */
.kookstand-overlay {
  position: fixed;
  inset: 0;
  /* Above fixed bottom nav + other UI chrome */
  z-index: 9600;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 0;
}

.kookstand-overlay.hidden { display: none !important; }

.kookstand-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(24,26,22,0.34);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.kookstand-sheet {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  background: #f8f7f2;
  display: flex;
  flex-direction: column;
  padding: calc(12px + env(safe-area-inset-top)) 14px calc(10px + env(safe-area-inset-bottom));
  box-shadow: none;
  overflow: hidden;
}

.kookstand-sheet::before {
  content: "";
  position: absolute;
  inset: -40px -40px auto -40px;
  height: 180px;
  background: radial-gradient(circle at 20% 30%, rgba(141,164,133,0.22), rgba(141,164,133,0) 60%),
              radial-gradient(circle at 90% 10%, rgba(232,160,32,0.16), rgba(232,160,32,0) 55%);
  pointer-events: none;
}

.kookstand-head {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.kookstand-close {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
}

.kookstand-title-row {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
}

.kookstand-title {
  margin: 0;
  font-size: clamp(1.7rem, 7vw, 2.6rem);
  line-height: 0.96;
  letter-spacing: -0.02em;
}

.kookstand-servings {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.80);
  border: 1px solid rgba(36, 60, 43, 0.08);
  color: #516250;
  font-weight: 800;
  font-size: 0.92rem;
  white-space: nowrap;
}

.kookstand-body {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
}

.kookstand-progress {
  margin: 0 0 12px;
  color: #7d8f77;
  font-size: 0.98rem;
  font-weight: 800;
}

.kookstand-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  padding: 18px;
  border-radius: 26px;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(141, 164, 133, 0.14);
  box-shadow: 0 14px 36px rgba(55,50,45,0.08);
}

.kookstand-step__index {
  margin: 0;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #dce8dc;
  color: #29422b;
  font-weight: 950;
  font-size: 1.12rem;
}

.kookstand-step__text {
  margin: 0;
  color: #2f2b27;
  font-size: clamp(1.15rem, 4.4vw, 1.55rem);
  line-height: 1.55;
  font-weight: 850;
}

.kookstand-ingredients {
  margin-top: 14px;
  padding: 14px;
  border-radius: 24px;
  background: rgba(250, 252, 247, 0.96);
  border: 1px solid rgba(141, 164, 133, 0.12);
}

.kookstand-ingredients__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.kookstand-ingredients__head h3 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.1;
}

.kookstand-ingredients__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kookstand-ingredients__item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(34, 32, 29, 0.06);
  background: rgba(255,255,255,0.88);
  cursor: pointer;
}

.kookstand-ingredients__item.is-checked {
  background: rgba(220, 232, 220, 0.85);
  border-color: rgba(84, 122, 88, 0.18);
}

.kookstand-ingredients__title {
  margin: 0;
  font-weight: 850;
  color: #3f3b36;
  line-height: 1.35;
}

.kookstand-ingredients__amount {
  color: #6b6a63;
  font-weight: 800;
  white-space: nowrap;
}

.kookstand-controls {
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 0 calc(10px + env(safe-area-inset-bottom));
  margin-top: 12px;
  background: linear-gradient(to top, rgba(248, 247, 242, 0.98) 65%, rgba(248, 247, 242, 0.70));
  border-top: 1px solid rgba(36, 60, 43, 0.08);
}

.kookstand-controls__row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
}

.kookstand-controls__counter {
  min-width: 64px;
  text-align: center;
  font-weight: 950;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  color: #516250;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(36, 60, 43, 0.10);
}

.kookstand-controls__ingredients {
  width: 100%;
}

@media (min-width: 760px) {
  .kookstand-overlay {
    align-items: center;
    padding: 22px;
  }
  .kookstand-sheet {
    width: min(860px, 100%);
    height: min(920px, 100%);
    border-radius: 28px;
    box-shadow: 0 24px 70px rgba(33,37,30,0.22);
    padding: 18px 18px 14px;
  }
  .kookstand-controls {
    padding-inline: 4px;
  }
}

.modal-handle {
  width: 54px; height: 5px;
  border-radius: 999px;
  background: #d4d2cb;
  margin: 4px auto 16px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.modal-header h2 {
  font-size: clamp(1.6rem, 6vw, 2rem);
  line-height: 0.95;
}

.cookbook-save-sheet {
  display: flex;
  flex-direction: column;
  gap: 14px;
  /* cap the sheet so the create-button stays visible above the nav bar */
  max-height: min(52vh, 440px);
}

.cookbook-save-screen {
  height: 100%;
  background: #f8f7f2;
}

.cookbook-save-topbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 10px;
  padding: calc(10px + env(safe-area-inset-top)) 12px 10px;
  background: #f8f7f2;
  border-bottom: 1px solid rgba(36, 60, 43, 0.08);
}

.cookbook-save-topbar__btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
}

.cookbook-save-topbar__copy {
  min-width: 0;
}

.cookbook-save-topbar .section-kicker {
  margin: 0 0 2px;
}

.cookbook-save-topbar h2 {
  margin: 0;
  font-size: clamp(1.28rem, 5.2vw, 1.7rem);
  line-height: 1.05;
}

.cookbook-save-content {
  padding: 14px 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: auto;
  flex: 1 1 auto;
  -webkit-overflow-scrolling: touch;
}

.cookbook-save-footer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgba(248, 247, 242, 0.98) 70%, rgba(248, 247, 242, 0.7));
  border-top: 1px solid rgba(36, 60, 43, 0.08);
}

.cookbook-save-confirm {
  width: 100%;
  padding: 15px 16px;
  border-radius: 18px;
  font-weight: 800;
}

.cookbook-save-copy {
  margin: 0;
  color: var(--muted-strong);
  font-size: 0.96rem;
  line-height: 1.45;
  flex-shrink: 0;
}

.cookbook-save-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  flex: 1 1 auto;
  /* subtle inner scroll indicator */
  padding-right: 2px;
}

/* thin scrollbar so it doesn't look clunky on mobile */
.cookbook-save-list::-webkit-scrollbar { width: 3px; }
.cookbook-save-list::-webkit-scrollbar-thumb { background: rgba(141,164,133,0.35); border-radius: 99px; }

.cookbook-save-create {
  flex-shrink: 0; /* always stays below the scrollable list */
}

.cookbook-save-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border: 1px solid rgba(120, 147, 111, 0.1);
  border-radius: 20px;
  background: rgba(255,255,255,0.92);
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.cookbook-save-option:hover,
.cookbook-save-option:focus-visible {
  background: rgba(255,255,255,0.98);
  border-color: rgba(120, 147, 111, 0.28);
}

.cookbook-save-option.is-selected {
  border-color: rgba(120, 147, 111, 0.45);
  background: rgba(255,255,255,0.98);
}

.cookbook-save-option.is-selected .cookbook-save-option__indicator {
  background: var(--sage-deep);
  color: #fff;
}

.cookbook-save-option__cover {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #f3efe7;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #93a68d;
  font-size: 0.92rem;
  font-weight: 700;
}

.cookbook-save-option__cover--grid {
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
}

.cookbook-save-option__cover--empty {
  display: grid;
  place-items: center;
}

.cookbook-save-option__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cookbook-save-option__copy {
  min-width: 0;
  flex: 1 1 auto;
}

.cookbook-save-option__copy strong {
  display: block;
  margin: 0 0 3px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #243c2b;
}

.cookbook-save-option__copy span {
  display: block;
  color: var(--muted-strong);
  font-size: 0.86rem;
  line-height: 1.3;
}

.cookbook-save-option__indicator {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(120, 147, 111, 0.18);
  color: #243c2b;
  font-size: 0.9rem;
  font-weight: 700;
}

.cookbook-save-option.is-default .cookbook-save-option__indicator {
  background: rgba(127, 152, 121, 0.22);
}

.cookbook-save-create {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border: 1.5px dashed rgba(141, 164, 133, 0.55);
  border-radius: 20px;
  background: rgba(220, 232, 220, 0.18);
  color: var(--sage-deep);
  font-size: 0.95rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  margin-top: 2px;
}
.cookbook-save-create:hover,
.cookbook-save-create:focus-visible {
  background: rgba(220, 232, 220, 0.38);
  border-color: var(--sage-deep);
}
.cookbook-save-create::before {
  content: "+";
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--sage-deep);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.basket-sheet {
  max-height: min(84vh, 760px);
  overflow: auto;
  padding-bottom: 28px;
}

.basket-subtitle {
  margin: 8px 0 0;
  color: var(--muted-strong);
  font-size: 0.96rem;
  line-height: 1.45;
}

.basket-summary {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.basket-summary__card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 15px;
  background: rgba(255,255,255,0.86);
  border-radius: 20px;
  box-shadow: 0 10px 24px rgba(76,85,69,0.06);
}

.basket-summary__copy {
  display: grid;
  gap: 3px;
}

.basket-summary__eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 0.77rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.basket-summary__title {
  margin: 0;
  font-weight: 700;
  color: var(--text);
}

.basket-summary__badge {
  border: 0;
  border-radius: 999px;
  background: #edf3ed;
  color: #678067;
  padding: 9px 12px;
  font-weight: 700;
  font-size: 0.83rem;
  white-space: nowrap;
}

.basket-summary__badge.is-direct {
  background: #dce8dc;
  color: #325132;
}

.basket-list {
  display: grid;
  gap: 12px;
}

.basket-item {
  background: rgba(255,255,255,0.92);
  border-radius: 24px;
  padding: 14px;
  box-shadow: 0 10px 28px rgba(76,85,69,0.06);
}

.basket-item__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.basket-item__ingredient {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.3rem;
  line-height: 1;
}

.basket-item__amount {
  margin: 4px 0 0;
  color: var(--muted-strong);
  font-size: 0.92rem;
}

.basket-item__confidence {
  margin: 0;
  border-radius: 999px;
  background: #f3f5ef;
  color: #76806f;
  padding: 8px 10px;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.basket-item__product {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: var(--surface-soft);
  border-radius: 18px;
}

.basket-item__emoji {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #fff7ec;
  font-size: 1.35rem;
}

.basket-item__product-title {
  margin: 0;
  font-weight: 700;
  color: var(--text);
}

.basket-item__product-meta {
  margin: 4px 0 0;
  color: var(--muted-strong);
  font-size: 0.9rem;
}

.basket-item__price {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.basket-item__actions {
  margin-top: 10px;
}

.basket-item__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  border-radius: 999px;
  background: #eef4ef;
  color: #4f7252;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 700;
}

.basket-item__choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.basket-choice-pill {
  border: 1px solid rgba(35,33,30,0.08);
  background: #fff;
  color: #5a564f;
  border-radius: 999px;
  padding: 9px 12px;
  font-size: 0.84rem;
  font-weight: 700;
}

.basket-choice-pill.is-selected {
  background: #e2ede3;
  color: #355235;
  border-color: rgba(102,132,102,0.18);
}

.basket-footer {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.basket-note {
  margin: 0;
  color: var(--muted-strong);
  font-size: 0.9rem;
  line-height: 1.45;
}

.import-form { display: grid; gap: 14px; }

.import-form label {
  display: grid;
  gap: 8px;
  color: #5d5a53;
  font-weight: 700;
  font-size: 0.93rem;
}

.platform-switcher {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.platform-button,
.import-form input,
.import-form textarea,
.primary-button,
.secondary-button {
  border-radius: 16px;
}

.platform-button {
  border: 1px solid rgba(35,33,30,0.08);
  background: #ffffff;
  padding: 12px 14px;
  font-weight: 700;
  color: #6b675f;
  font-size: 0.93rem;
}

.platform-button.is-selected {
  background: #dce8dc;
  color: #304230;
}

.import-form input,
.import-form textarea {
  width: 100%;
  border: 1px solid rgba(35,33,30,0.08);
  background: #ffffff;
  padding: 13px 15px;
  color: var(--text);
  resize: vertical;
  font-size: 0.93rem;
}

.import-form input:focus,
.import-form textarea:focus {
  outline: 2px solid rgba(143,167,143,0.28);
  border-color: rgba(143,167,143,0.44);
}

/* Instagram import UI improvements */
.input-with-helper {
  display: flex;
  gap: 8px;
  align-items: center;
}

.input-with-helper input {
  flex: 1;
}

.helper-button {
  padding: 10px 12px;
  border: 1px solid rgba(35,33,30,0.08);
  background: #f5f5f5;
  border-radius: 12px;
  font-size: 0.9rem;
  color: #6b675f;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.helper-button:hover:not(.hidden) {
  background: #efefef;
  border-color: rgba(35,33,30,0.12);
}

.primary-button {
  border: 1px solid #24211e;
  padding: 14px 18px;
  background: #24211e;
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 6px 16px rgba(36,33,30,0.12);
}

.secondary-button {
  border: 1px solid rgba(35,33,30,0.08);
  background: rgba(255,255,255,0.9);
  color: #4b4740;
  padding: 14px 18px;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 6px 16px rgba(76,85,69,0.05);
}

/* ── Product pass: home / review / grocery polish ── */
.section-heading--compact {
  margin-top: -4px;
  margin-bottom: 10px;
}

.home-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 0 16px 22px;
}

.home-stat-card {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-radius: 22px;
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(171, 183, 171, 0.12);
  box-shadow: 0 10px 22px rgba(112,106,95,0.04);
}

.home-stat-card__value {
  font-family: var(--font-display);
  font-size: 1.7rem;
  line-height: 1;
}

.home-stat-card__label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.recent-imports {
  display: grid;
  gap: 12px;
  padding: 0 16px 22px;
}

.recent-import-card {
  border: 0;
  background: rgba(255,255,255,0.9);
  border-radius: 24px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 12px;
  text-align: left;
  padding: 10px;
  box-shadow: 0 12px 26px rgba(76,85,69,0.05);
}

.recent-import-card img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 18px;
}

.recent-import-card__copy {
  display: grid;
  align-content: center;
  gap: 4px;
  min-width: 0;
}

.recent-import-card__copy strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
  line-height: 1;
}

.recent-import-card__copy span:last-child,
.recent-import-card--empty p,
.recent-import-card__kicker {
  color: var(--muted);
}

.recent-import-card__kicker {
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 800;
}

.recent-import-card__topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.import-status-badge {
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.import-status-badge--good {
  background: rgba(220, 232, 220, 0.9);
  color: #4e6d50;
}

.import-status-badge--warn {
  background: rgba(255, 236, 214, 0.98);
  color: #a36a45;
}

.import-status-badge--soft,
.import-status-badge--editorial {
  background: rgba(244, 240, 234, 0.98);
  color: #80796f;
}

.recent-import-card--empty {
  grid-template-columns: 1fr;
  padding: 18px;
}

.recipe-card {
  box-shadow: 0 14px 28px rgba(76,85,69,0.06);
}

.recipe-card__meta span:last-child {
  color: #7f977f;
  font-weight: 700;
}

.detail-origin {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  margin-bottom: 8px;
}

.detail-origin__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--muted-strong);
  font-size: 0.9rem;
  font-weight: 700;
}

.detail-origin__icon {
  position: static;
  flex: none;
}

.detail-origin__actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

#reviewImportButton {
  display: none !important;
}

.detail-icon-action {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: #3d3d3d;
  box-shadow: 0 6px 20px rgba(36, 60, 43, 0.12);
  transition: all 0.2s ease;
}

.detail-icon-action:hover,
.detail-icon-action:focus-visible {
  background: #fff;
  box-shadow: 0 8px 24px rgba(36, 60, 43, 0.18);
}

.detail-icon-action svg {
  width: 22px;
  height: 22px;
  display: block;
}

/* Favorite button active state - RED heart */
#favoriteRecipeButton.is-active,
#topbarFavoriteButton.is-active {
  color: #e74c3c;
}

#favoriteRecipeButton.is-active svg,
#topbarFavoriteButton.is-active svg {
  fill: #e74c3c;
}

/* Generic active state for other buttons */
.detail-icon-action.is-active:not(#favoriteRecipeButton):not(#topbarFavoriteButton) {
  background: rgba(141,164,133,0.18);
  border-color: rgba(120,147,111,0.18);
  color: #6d8767;
}

.detail-icon-action--delete:hover,
.detail-icon-action--delete:focus-visible {
  background: rgba(200, 70, 60, 0.08);
  border-color: rgba(200, 70, 60, 0.15);
  color: #c44;
}

.detail-icon-action--bug {
  color: #b9883a;
}

.detail-icon-action--bug:hover,
.detail-icon-action--bug:focus-visible {
  background: rgba(220, 170, 60, 0.1);
  border-color: rgba(220, 170, 60, 0.2);
  color: #a47521;
}

/* Bookmark saved state */
#detailSaveHeaderButton.is-active svg path {
  fill: var(--sage-deep);
}
#detailSaveHeaderButton.is-active {
  background: rgba(141,164,133,0.22);
}

.soft-action--pill {
  padding: 10px 14px;
  border-radius: 999px;
  white-space: nowrap;
}

.grocery-toolbar {
  display: grid;
  gap: 12px;
  padding: 4px 16px 20px;
}

.grocery-toolbar__summary,
.grocery-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.summary-chip {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.84);
  border: 1px solid rgba(35,33,30,0.06);
  color: #6a665f;
  font-size: 0.84rem;
  font-weight: 700;
}

.order-panel {
  border-radius: 28px;
}

.review-screen {
  padding-bottom: 120px;
}

/* Container for review card and title side-by-side */
.review-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 16px;
  align-items: stretch;
}

.review-card {
  flex: 1;
}

.review-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 4vw, 1.8rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  padding: 0 16px;
  color: var(--text);
  font-size: clamp(1.2rem, 5vw, 2.2rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
  padding-top: 14px; /* Align with form top */
}

.review-card {
  padding: 14px;
  background: rgba(255,255,255,0.9);
  border-radius: 30px;
  box-shadow: 0 16px 34px rgba(112,106,95,0.08);
}

.review-preview {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}

.review-preview img {
  width: 108px;
  height: 108px;
  object-fit: cover;
  border-radius: 22px;
}

.review-preview__copy {
  display: grid;
  gap: 10px;
}

.review-preview__copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.review-form {
  display: grid;
  gap: 14px;
}

.review-summary__row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.review-summary__pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(244, 240, 234, 0.96);
  color: #6d675f;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.review-summary__pill--good {
  background: rgba(220, 232, 220, 0.7);
  color: #4c6f4f;
}

.review-summary__pill--warn {
  background: rgba(255, 241, 231, 0.95);
  color: #9a6447;
}

.review-insights {
  display: grid;
  gap: 10px;
}

.review-suggestions {
  display: grid;
  gap: 10px;
}

.review-drafts {
  display: grid;
  gap: 10px;
  padding-top: 6px;
}
.review-drafts__title {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 800;
  color: #6d675f;
  letter-spacing: 0.06em;
}
.review-drafts__list {
  display: grid;
  gap: 10px;
}
.review-draft {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(244, 240, 234, 0.75);
  border: 1px solid rgba(35,33,30,0.06);
}
.review-draft__img {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  object-fit: cover;
  background: #e8ede8;
}
.review-draft__copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.review-draft__title-line {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 800;
  color: #1a1a1a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.review-draft__meta {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.review-draft__actions {
  margin-top: 6px;
  display: flex;
  gap: 8px;
}
.review-draft__btn {
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(120, 147, 111, 0.22);
  background: #fff;
  color: #6a7f62;
  font-weight: 800;
  font-size: 0.82rem;
  cursor: pointer;
}
.review-draft__btn--danger {
  border-color: rgba(224, 85, 85, 0.22);
  color: #b55050;
}
.review-draft__btn:active { transform: scale(0.98); }

.review-suggestion {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(35,33,30,0.06);
}

.review-suggestion__copy {
  display: grid;
  gap: 4px;
}

.review-suggestion__title {
  margin: 0;
  color: #37322d;
  font-size: 0.88rem;
  font-weight: 700;
}

.review-suggestion__meta {
  margin: 0;
  color: #8a837a;
  font-size: 0.79rem;
  line-height: 1.4;
}

.review-suggestion__action {
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  padding: 0 14px;
  background: rgba(220, 232, 220, 0.8);
  color: #4f6d53;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.review-insight {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px 14px;
  border-radius: 18px;
}

.review-insight p {
  margin: 0;
  color: #5e5953;
  font-size: 0.88rem;
  line-height: 1.45;
}

.review-insight__dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-top: 4px;
}

.review-insight--good {
  background: rgba(220, 232, 220, 0.46);
}

.review-insight--good .review-insight__dot {
  background: #8da485;
}

.review-insight--warn {
  background: rgba(255, 241, 231, 0.92);
}

.review-insight--warn .review-insight__dot {
  background: #f2a986;
}

.review-form label {
  display: grid;
  gap: 8px;
  color: #5e5953;
  font-size: 0.86rem;
  font-weight: 800;
}

.review-form input,
.review-form textarea {
  width: 100%;
  border: 1px solid rgba(35,33,30,0.08);
  background: #fff;
  padding: 14px 15px;
  border-radius: 18px;
  color: var(--text);
  resize: vertical;
}

.review-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.review-actions {
  display: grid;
  gap: 10px;
}

/* ── Toast ── */
.toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%);
  width: min(calc(100% - 28px), 340px);
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(35,33,30,0.95);
  color: #fffdf8;
  text-align: center;
  box-shadow: 0 14px 28px rgba(22,24,20,0.22);
  z-index: 50;
  font-size: 0.93rem;
}

@media (min-width: 900px) {
  .detail-hero img { height: 300px; }
}

@media (max-width: 390px) {
  .topbar,
  .search-card,
  .import-banner,
  .home-stats,
  .recent-imports,
  .section-heading,
  .recipe-grid,
  .grocery-groups,
  .review-hero,
  .grocery-toolbar,
  .kookboek-heading,
  .cookbook-filter-bar {
    padding-inline: 12px;
  }

  .featured-card {
    width: calc(100% - 24px);
    margin-inline: 12px;
  }

  .detail-sheet__header,
  .section-heading {
    flex-direction: column;
    align-items: flex-start;
  }

  .platform-switcher,
  .import-platforms,
  .grocery-order__stores,
  .review-meta-grid,
  .home-stats {
    grid-template-columns: 1fr;
  }

  .order-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .order-panel__stores {
    width: 100%;
    justify-content: flex-end;
  }

  .import-banner__row {
    grid-template-columns: 1fr;
  }

  .import-banner__button {
    width: 100%;
  }

  .review-preview {
    grid-template-columns: 1fr;
  }
}

/* Final Plately Banani pass */
:root {
  --bg: #fcfaf4;
  --surface: #ffffff;
  --surface-soft: #fcfaf4;
  --text: #243c2b;
  --muted: #9caa9a;
  --sage-deep: #78936f;
  --sage-soft: #edf0e5;
  --peach: #f0a38b;
  --line: rgba(114, 137, 109, 0.12);
  --shadow: 0 4px 18px rgba(53, 70, 54, 0.05);
  --font-display: "Inter", "Avenir Next", "Segoe UI", sans-serif;
  --font-body: "Inter", "Avenir Next", "Segoe UI", sans-serif;
}

body {
  font-family: var(--font-body);
  background: #fcfaf4;
  color: var(--text);
}

.app-shell {
  width: 100%;
  max-width: 960px;
  min-height: 100vh;
  display: block;
  padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px));
  background: #fcfaf4;
}

.screen--active {
  flex: none;
}

.screen {
  min-height: 100vh;
  padding: 0;
}

#homeScreen,
#groceryScreen,
#mealPlanScreen,
#settingsScreen,
#importScreen,
#reviewScreen,
#detailScreen {
  padding: 0;
}



.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.icon-button {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 0;
  background: #fff;
  color: #243c2b;
  box-shadow: 0 2px 8px rgba(36, 60, 43, 0.05);
  flex-shrink: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-avatar {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  border: 0;
  flex-shrink: 0;
  cursor: pointer;
}

.icon-button svg {
  width: 20px;
  height: 20px;
}

.icon-button--filled-green {
  border: 0;
  background: #78936f;
  color: #fff;
}

.icon-button--ghost-empty {
  background: #fff;
  color: transparent;
}

/* Home avatar — unified responsive profile button */
.home-avatar {
  background: transparent;
  overflow: hidden;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: -0.02em;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 56px;
  min-height: 56px;
  width: 56px;
  height: 56px;
  padding: 0;
}

.home-avatar img {
  width: 110%;
  height: 110%;
  object-fit: contain;
  border-radius: 999px;
}

.avatar-initials {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(120, 147, 111, 0.14);
  color: #243c2b;
  font-weight: 800;
  letter-spacing: -0.02em;
  user-select: none;
}

.search-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0;
  margin: 0 0 24px;
  padding: 0 12px 12px 22px;
  border-radius: 36px;
  background: #fff;
  border: 1px solid rgba(120, 147, 111, 0.08);
  box-shadow: 0 2px 10px rgba(36, 60, 43, 0.03);
}

.search-input {
  gap: 16px;
}

.search-input svg {
  width: 34px;
  height: 34px;
  color: #91a78b;
}

.search-input input {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: #243c2b;
}

.search-input input::placeholder,
.grocery-quick-input::placeholder,
.import-banner__input::placeholder {
  color: #9dad9d;
}

.home-search-hero.search-card {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  margin: 0 0 26px;
  padding: 12px 16px 16px;
  border: 0;
  border-radius: 0 0 32px 32px;
  background: rgba(252, 250, 244, 0.88);
  box-shadow: 0 18px 42px rgba(36, 60, 43, 0.12);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.home-search-hero .search-input {
  min-height: 68px;
  gap: 14px;
  padding: 0 22px;
  border: 1.5px solid rgba(141, 164, 133, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow:
    0 18px 34px rgba(36, 60, 43, 0.16),
    0 2px 0 rgba(255, 255, 255, 0.9) inset;
}

.home-search-hero .search-input:focus-within {
  border-color: rgba(141, 164, 133, 0.58);
  box-shadow:
    0 22px 44px rgba(36, 60, 43, 0.2),
    0 0 0 4px rgba(141, 164, 133, 0.14);
}

.home-search-hero .search-input svg {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  fill: #78936f;
  color: #78936f;
}

.home-search-hero .search-input input {
  min-height: 64px;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.home-search-hero .search-input input::placeholder {
  color: #748a73;
}

.home-search-chips-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin-top: 10px;
  min-width: 0;
}

.home-search-chips-label {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #2d4a2e;
  white-space: nowrap;
}

.home-search-chips-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin-top: 10px;
}

.home-search-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 2px 2px;
  scrollbar-width: none;
  flex: 1 1 auto;
  min-width: 0;
}

.home-search-chips::-webkit-scrollbar {
  display: none;
}

/* "Meer suggesties" should match the basket "Wissel" pill */
.home-search-more-suggestions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #d6e4d8;
  background: #f3f8f3;
  color: #2d4a2e;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 750;
  font-family: inherit;
  cursor: pointer;
  line-height: 1;
  min-height: 44px; /* tap target */
  min-width: 44px; /* icon-only tap target */
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, border-color 0.15s, transform 0.08s;
  flex: none;
}

.home-search-more-suggestions:hover { background: #e8f4e9; border-color: #6b9e72; }
.home-search-more-suggestions:active { background: #dceadd; transform: scale(0.99); }
.home-search-more-suggestions svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  flex: none;
}

.home-search-chip {
  flex: 0 0 auto;
  border: 1px solid rgba(120, 147, 111, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #36523b;
  padding: 9px 14px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(36, 60, 43, 0.08);
}

.filter-button {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: #f6f3ed;
  border: 0;
  color: #243c2b;
}

.home-chip-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 2px 0 10px;
  margin: 0 0 32px;
  scrollbar-width: none;
}

.home-chip-row::-webkit-scrollbar,
.cookbook-filter-bar::-webkit-scrollbar,
.channel-row::-webkit-scrollbar {
  display: none;
}

.home-chip {
  border: 1px solid rgba(120, 147, 111, 0.14);
  background: #fff;
  color: #243c2b;
  border-radius: 999px;
  min-width: 156px;
  height: 62px;
  padding: 0 24px 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  font-size: 0.98rem;
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.03em;
  white-space: nowrap;
  box-shadow: none;
}

.home-chip svg {
  width: 24px;
  height: 24px;
  stroke: #8ea28b;
  flex: none;
  overflow: visible;
}

.home-chip--breakfast svg {
  width: 31px;
  height: 31px;
}

.home-chip--salads svg {
  width: 29px;
  height: 29px;
}

.home-chip--dips svg {
  width: 24px;
  height: 24px;
}

.home-chip--mains {
  min-width: 186px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 18px;
  padding-inline: 16px;
}

.section-heading h2,
.grocery-headline h1,
.kookboek-heading h1 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 700;
  color: #243c2b;
}

.ghost-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: #8da485;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

#openFeaturedRecipeButton {
  display: none;
}

.channel-row {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  margin: 0 0 36px;
  padding: 4px 16px 20px;
}

.channel-item {
  flex: 0 0 88px;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: center;
  box-shadow: none;
}

.channel-avatar {
  width: 60px;
  height: 60px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
  flex-shrink: 0;
}

.channel-name {
  display: block;
  font-size: 0.79rem;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: #243c2b;
  max-width: 86px;
  margin: 0 auto;
  white-space: normal;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.channel-avatar__img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  display: block;
}

.channel-avatar__fallback {
  width: 60px;
  height: 60px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 1.04rem;
  font-weight: 700;
  color: #243c2b;
  background: #f6f3ed;
}

.channel-avatar__fallback[hidden] {
  display: none;
}

.featured-card {
  width: 100%;
  margin: 0 0 36px;
  padding: 0;
  border-radius: 30px;
  background: #fff;
  border: 1px solid rgba(120, 147, 111, 0.08);
  box-shadow: 0 2px 10px rgba(36, 60, 43, 0.03);
  overflow: hidden;
}

.featured-image-wrap {
  position: relative;
}

.featured-image {
  width: 100%;
  aspect-ratio: 1.08 / 1;
  object-fit: cover;
}

.featured-badge {
  position: absolute;
  top: 18px;
  left: 18px;
  padding: 14px 18px;
  border-radius: 999px;
  background: #fff;
  color: #8da485;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.featured-favorite {
  position: absolute;
  right: 18px;
  bottom: -22px;
  width: 64px;
  height: 64px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #7f9879;
  box-shadow: 0 8px 20px rgba(36, 60, 43, 0.08);
}

.featured-favorite svg {
  width: 30px;
  height: 30px;
}

.featured-copy {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.featured-copy h3 {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 700;
  color: #243c2b;
}

.featured-description {
  margin: 0 0 18px;
  color: #95a393;
  font-size: 0.92rem;
  line-height: 1.48;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.featured-meta-pills {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 14px;
}

.recipe-time {
  margin: 0;
  padding: 10px 16px;
  border-radius: 999px;
  background: #f5f2eb;
  color: #243c2b;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  align-self: flex-start;
}

.recipe-time__icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  stroke: #8da485;
  fill: none;
}

.quick-list {
  display: grid;
  gap: 14px;
  margin: 0 0 32px;
}

.quick-card {
  display: grid;
  grid-template-columns: 76px 1fr 42px;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 14px 16px;
  border-radius: 26px;
  border: 1px solid rgba(120, 147, 111, 0.08);
  background: #fff;
  box-shadow: 0 2px 10px rgba(36, 60, 43, 0.03);
  text-align: left;
}

.quick-card__glow,
.quick-card__eyebrow {
  display: none;
}

.quick-card__img {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  background: #f9efc8;
}

.quick-card__copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.quick-card__copy strong {
  font-size: 1rem;
  line-height: 1.16;
  letter-spacing: -0.03em;
  font-weight: 800;
  color: #243c2b;
}

.quick-card__meta {
  display: flex;
  gap: 10px;
  flex-wrap: nowrap;
  align-items: center;
}

.quick-card__meta span {
  font-size: 0.9rem;
  color: #9dad9d;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.quick-card__check {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 2px solid rgba(120, 147, 111, 0.15);
}

.import-banner {
  margin: 0 0 36px;
  padding: 24px;
  border-radius: 30px;
  background: #fff;
  border: 1px solid rgba(120, 147, 111, 0.08);
  box-shadow: 0 2px 10px rgba(36, 60, 43, 0.03);
}

.import-banner__head {
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 18px;
}

.import-banner__icon {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  background: #f7f2ea;
  color: #78936f;
}

.import-banner__icon--soft {
  background: #f3eee7;
}

.import-banner h1 {
  margin: 0 0 6px;
  font-size: 1.18rem;
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 800;
  color: #243c2b;
}

.section-copy,
.import-banner__feedback {
  color: #95a393;
  font-size: 0.96rem;
  line-height: 1.58;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.import-banner__row {
  grid-template-columns: 1fr 160px;
  gap: 12px;
  padding: 8px;
  border-radius: 999px;
  border: 1px solid rgba(120, 147, 111, 0.08);
  background: #fff;
}

.import-banner__input {
  min-height: 56px;
  padding: 0 24px;
  border: 0;
  background: transparent;
  font-size: 1rem;
}

.import-banner__button {
  min-height: 56px;
  border-radius: 999px;
  border: 0;
  background: #78936f;
  font-size: 1rem;
  font-weight: 800;
}

/* ── Recipe slider (horizontal scroll) ── */
.recipe-slider {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 0 0 12px;
  margin: 0 -4px 4px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.recipe-slider::-webkit-scrollbar { display: none; }

.recipe-slider__card {
  flex: 0 0 160px;
  border-radius: 14px;
  overflow: hidden;
  background: #f5f0ea;
  border: 0;
  cursor: pointer;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  text-align: left;
}

.recipe-slider__card img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  display: block;
}

.recipe-slider__body {
  padding: 8px 10px 10px;
}

.recipe-slider__title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #2d2d2d;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.recipe-slider__time {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-top: 4px;
}

.recipe-slider__empty {
  font-size: 0.9rem;
  color: #9ca3af;
  padding: 16px 4px;
}

.kookboek-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 10px 0 22px;
  padding-inline: 16px;
}

.kookboek-add {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  border: 0;
  background: #78936f;
  color: #fff;
}

.kookboek-add svg {
  width: 32px;
  height: 32px;
}

.cookbook-filter-bar {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 4px 16px 10px;
  margin: 0 0 26px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.filter-chip {
  min-width: 162px;
  padding: 18px 28px;
  border-radius: 999px;
  border: 1px solid rgba(120, 147, 111, 0.1);
  background: #fff;
  color: #243c2b;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.filter-chip--active {
  background: #78936f;
  color: #fff;
  border-color: transparent;
}

.recipe-grid--cookbook,
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding-inline: 16px;
  padding-bottom: 30px;
}

.recipe-card {
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(120, 147, 111, 0.08);
  background: #fff;
  box-shadow: 0 2px 10px rgba(36, 60, 43, 0.03);
  text-align: left;
}

.recipe-card .source-favicon {
  display: none;
}

.recipe-card img {
  width: calc(100% - 22px);
  margin: 11px;
  border-radius: 26px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.recipe-card__body {
  padding: 6px 16px 16px;
}

.recipe-card h3 {
  margin: 0 0 14px;
  font-size: 0.99rem;
  line-height: 1.18;
  letter-spacing: -0.03em;
  font-weight: 800;
  color: #243c2b;
}

.recipe-card__meta {
  justify-content: flex-start;
}

.recipe-card__meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: #f5f2eb;
  color: #7d8f77;
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.recipe-card__clock {
  display: inline-block;
  font-size: 1.45rem;
  line-height: 1;
  transform: translateY(-1px);
}

/* Bigger time pill text too */
.recipe-card__meta span {
  font-size: 1.02rem;
  padding: 9px 18px;
}


.grocery-group__header {
  margin-bottom: 10px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.grocery-group__header h2 {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.2;
  letter-spacing: 0.06em;
  font-weight: 600;
  color: #95a393;
  text-transform: uppercase;
}

.grocery-group__header--recipe h2 {
  color: #4a6a4b;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

.grocery-group__header--shared h2 {
  color: #6b5ea8;
  font-size: 0.8rem;
}

.grocery-group__count {
  font-size: 0.75rem;
  color: #aab8aa;
  font-weight: 500;
}

.grocery-entry__overlap {
  font-size: 0.72rem;
  color: #9ca3af;
  margin: 0;
  line-height: 1.2;
}

.grocery-group__progress,
.group-icon,
.grocery-entry__meta,
.grocery-entry__source {
  display: none !important;
}

.grocery-entry {
  display: grid;
  grid-template-columns: 48px 1fr auto 40px;
  align-items: center;
  gap: 14px;
  width: 100%;
  margin-bottom: 0;
  padding: 12px 14px 12px 12px;
  border-radius: 999px;
  border: 1px solid rgba(120, 147, 111, 0.08);
  background: #fff;
  box-shadow: 0 2px 10px rgba(36, 60, 43, 0.03);
}

.grocery-entry__img {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: transparent;
}

.grocery-entry__title {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: #243c2b;
  text-transform: lowercase;
}

.grocery-entry__amount {
  font-size: 0.98rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: #9dad9d;
}

.grocery-check {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 2px solid rgba(120, 147, 111, 0.3);
  background: transparent;
}

.grocery-entry.is-checked .grocery-check {
  background: #c4d0bf;
  border-color: #c4d0bf;
}

.grocery-entry.is-checked .grocery-entry__title {
  color: #c4cbbf;
  text-decoration: line-through;
}

.grocery-entry.is-checked .grocery-entry__amount {
  color: #c4cbbf;
}

/* ── Review screen: category chips ──────────────────────── */
.review-hero {
  margin: 0 0 20px;
  padding: 12px 0 0;
}

.review-hero h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #243c2b;
}

.review-field {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.review-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: #6b7c6b;
  letter-spacing: 0.01em;
}

.meal-tag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meal-chip {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1.5px solid rgba(120, 147, 111, 0.18);
  background: #fff;
  color: #4a6b4a;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 120ms ease;
  white-space: nowrap;
}

.meal-chip--active {
  background: #243c2b;
  border-color: #243c2b;
  color: #fff;
}

/* ── Grocery screen: compact header ─────────────────────── */
.grocery-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0 20px;
  gap: 12px;
}

.grocery-header__title {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #243c2b;
  line-height: 1;
}

.grocery-header__actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.grocery-add-btn {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: #78936f;
  border: 0;
  color: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(120,147,111,0.25);
}

.grocery-add-btn svg {
  width: 18px;
  height: 18px;
}

.grocery-avatar {
  width: 40px;
  height: 40px;
}

/* ── Input row ───────────────────────────────────────────── */
.grocery-input-wrap {
  display: none;
}

.grocery-input-row {
  position: relative;
}

.grocery-input-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #9dad9d;
  pointer-events: none;
}

.grocery-quick-input {
  width: 100%;
  height: 50px;
  padding: 0 18px 0 48px;
  border-radius: 999px;
  border: 1px solid rgba(120, 147, 111, 0.1);
  background: #fff;
  font-size: 0.95rem;
  color: #243c2b;
  box-shadow: 0 2px 8px rgba(36, 60, 43, 0.04);
  outline: none;
}

.grocery-quick-input::placeholder {
  color: #b0bfb0;
}

/* ── AH order banner — inline, not fixed ────────────────── */
.grocery-order {
  position: static;
  transform: none;
  width: 100%;
  margin: 0 0 20px;
  padding: 0 16px;
  left: auto;
  bottom: auto;
}

.store-cta {
  height: 62px;
  gap: 12px;
  padding: 0 14px 0 12px;
  border-radius: 18px;
  box-shadow: 0 4px 16px rgba(0, 113, 194, 0.15);
}

.store-cta__logo {
  width: 42px;
  height: 42px;
  font-size: 1.3rem;
}

.store-cta__name {
  font-size: 0.88rem;
}

.store-cta__dest {
  font-size: 0.78rem;
}

.store-cta__arrow {
  width: 36px;
  height: 36px;
  font-size: 1.4rem;
}

/* ── Groups ──────────────────────────────────────────────── */
.grocery-groups {
  display: grid;
  gap: 16px;
  padding-inline: 16px;
  padding-bottom: 100px;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100vw;
  max-width: 960px;
  margin: 0;
  padding: 10px 6px calc(14px + env(safe-area-inset-bottom, 0px));
  border-radius: 0;
  border-top: 1px solid rgba(120, 147, 111, 0.08);
  background: #fff;
  box-shadow: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  z-index: 80;
}

.nav-item {
  min-height: 68px;
  padding: 0 1px;
  border: 0;
  border-radius: 0;
  background: transparent;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 8px;
  color: #91a48e;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.nav-item svg {
  width: 30px;
  height: 30px;
  display: block;
  fill: none;
  stroke: currentColor;
}

.nav-icon-image {
  width: 30px;
  height: 30px;
  display: block;
}

.nav-icon-image--settings {
  width: 30px;
  height: 30px;
}

.nav-item--active {
  color: #91a48e;
  background: transparent;
}

.nav-item--profile {
  min-height: auto;
  padding: 8px 1px;
}

.profile2-avatar--nav {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  flex-shrink: 0;
}

.nav-label {
  font-size: 0.74rem;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  white-space: nowrap;
  text-align: center;
}

.nav-badge {
  top: -4px;
  right: -8px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #78936f;
  color: #fff;
  font-size: 0.74rem;
  font-weight: 800;
  border: 2px solid rgba(255,255,255,0.98);
}

.nav-icon-wrap {
  position: relative;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
}

/* ── Screen transitions ───────────────────────────────────────────────────── */
@keyframes screenFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes screenSlideInRight {
  from { opacity: 0.6; transform: translateX(40px); }
  to   { opacity: 1;   transform: translateX(0); }
}

/* All screens fade in when activated */
.screen--active {
  animation: screenFadeIn 0.22s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

/* Detail screen slides in from the right */
#detailScreen.screen--active {
  animation: screenSlideInRight 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ── Cookbook name modal ──────────────────────────────────────────────────── */
@keyframes miniModalIn {
  from { opacity: 0; transform: scale(0.94) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.cookbook-name-suggestions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cookbook-name-suggestions__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cookbook-name-suggestions__label {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.cookbook-name-suggestions__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cookbook-name-suggestions__pills .onboarding-suggestion-pill {
  padding: 9px 12px;
  font-size: 0.9rem;
}

@keyframes refreshSpin {
  from { transform: rotate(0); }
  to { transform: rotate(360deg); }
}

.cookbook-name-suggestions__refresh.is-spinning svg {
  animation: refreshSpin 0.45s linear both;
}

@media (prefers-reduced-motion: reduce) {
  .cookbook-name-suggestions__refresh.is-spinning svg {
    animation: none;
  }
}

.mini-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.mini-modal.hidden { display: none; }

.mini-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(4px);
}

.mini-modal__box {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 20px;
  padding: 24px 20px 20px;
  width: 100%;
  max-width: 340px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.18);
  animation: miniModalIn 0.22s cubic-bezier(0.22, 1, 0.36, 1) both;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mini-modal__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0;
}

.mini-modal__input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #e0e0e0;
  border-radius: 12px;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  background: #f9f9f9;
  color: #1a1a1a;
  box-sizing: border-box;
  transition: border-color 0.15s;
}
.mini-modal__input:focus { border-color: #8da485; background: #fff; }

.mini-modal__actions {
  display: flex;
  gap: 10px;
}
.mini-modal__actions .secondary-button,
.mini-modal__actions .primary-button {
  flex: 1;
  padding: 11px 0;
  font-size: 0.92rem;
}

/* ── Cookbook options action sheet ────────────────────────────────────────── */
@keyframes actionSheetIn {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.action-sheet {
  position: fixed;
  inset: 0;
  z-index: 1050;
  display: flex;
  align-items: flex-end;
}
.action-sheet.hidden { display: none; }

.action-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(3px);
}

.action-sheet__box {
  position: relative;
  z-index: 1;
  width: 100%;
  background: #fff;
  border-radius: 24px 24px 0 0;
  padding: 16px 16px calc(env(safe-area-inset-bottom, 0px) + 16px);
  animation: actionSheetIn 0.25s cubic-bezier(0.22, 1, 0.36, 1) both;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.action-sheet__label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #999;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 8px 8px;
  margin: 0;
}

.action-sheet__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 12px;
  border-radius: 14px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
  font-weight: 500;
  color: #1a1a1a;
  text-align: left;
  transition: background 0.12s;
}
.action-sheet__item:hover { background: #f5f5f5; }
.action-sheet__item svg { width: 20px; height: 20px; opacity: 0.7; flex-shrink: 0; }
.action-sheet__item--danger { color: #d93025; }
.action-sheet__item--danger svg { opacity: 0.85; }
.action-sheet__item--cancel {
  margin-top: 4px;
  border-top: 1px solid #f0f0f0;
  color: #666;
  justify-content: center;
  font-weight: 600;
}
.action-sheet__item:disabled { opacity: 0.4; cursor: default; }

/* ── Cookbook card wrap + options button ─────────────────────────────────── */
.cookbook-options-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.95);
  border: 1px solid rgba(0,0,0,0.08);
  cursor: pointer;
  display: grid;
  place-items: center;
  color: #666;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  z-index: 2;
  opacity: 0.8;
  transition: opacity 0.15s, background 0.15s, box-shadow 0.15s;
}
.cookbook-collection-wrap:hover .cookbook-options-btn,
.cookbook-options-btn:focus,
.cookbook-options-btn:active {
  opacity: 1;
  background: rgba(255,255,255,1);
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}
.cookbook-options-btn svg { width: 18px; height: 18px; }

.cookbook-bulkbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(17, 24, 39, 0.55);
  margin-bottom: 12px;
}

.cookbook-bulkbar.hidden {
  display: none;
}

.cookbook-bulkbar__meta {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.82);
}

.cookbook-bulkbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cookbook-bulkbar__btn {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.88);
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 13px;
  cursor: pointer;
}

.cookbook-bulkbar__btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.cookbook-bulkbar__btn--danger {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.12);
}

.cookbook-collection__select {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(17, 24, 39, 0.7);
  color: rgba(255, 255, 255, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  cursor: pointer;
  z-index: 3;
}

.cookbooks-grid--selecting .cookbook-collection__select {
  display: inline-flex;
}

.cookbooks-grid--selecting .cookbook-options-btn {
  display: none;
}

.cookbook-collection-wrap.is-selected .cookbook-collection__cover {
  outline: 2px solid rgba(34, 197, 94, 0.85);
  outline-offset: 2px;
}

/* ── Channel settings in profile screen ──────────────────────────────────── */
.channel-settings-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0 16px 20px;
  background: #fff;
  border-radius: 16px;
  border: 1.5px solid rgba(0,0,0,0.07);
  overflow: hidden;
}

.channel-toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  transition: background 0.12s;
}
.channel-toggle-row:last-child { border-bottom: none; }
.channel-toggle-row:hover { background: #fafafa; }

.channel-toggle-avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 0.65rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.channel-toggle-name {
  flex: 1;
  font-size: 0.92rem;
  font-weight: 600;
  color: #1a1a1a;
}

.toggle-switch {
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: #ddd;
  position: relative;
  flex-shrink: 0;
  transition: background 0.2s;
}
.toggle-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.toggle-switch--on {
  background: #8da485;
}
.toggle-switch--on::after {
  transform: translateX(18px);
}
.toggle-switch[disabled] {
  background: #e8e8e8;
  cursor: not-allowed;
  opacity: 0.6;
}
.toggle-switch[disabled]::after {
  box-shadow: none;
}

.channel-toggle-row--disabled {
  opacity: 0.65;
  pointer-events: none;
}

/* Allow delete button to be clickable even when row is disabled (pending/rejected) */
.channel-toggle-row--disabled .channel-delete-btn {
  pointer-events: auto;
  opacity: 1;
  cursor: pointer;
}

/* ── Channel filter chips in search results ──────────────────────────────── */
.channel-filter-row {
  display: flex;
  gap: 6px;
  padding: 8px 14px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  -webkit-overflow-scrolling: touch;
}
.channel-filter-row:empty { display: none; }

.ch-filter-chip {
  flex-shrink: 0;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1.5px solid #e0e0e0;
  background: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  color: #555;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}
.ch-filter-chip--active {
  background: #8da485;
  border-color: #8da485;
  color: #fff;
}

/* ── Channel search results ───────────────────────────────────────────────── */

.channel-search-section {
  margin: 4px 16px 8px;
  background: #fff;
  border-radius: 18px;
  border: 1.5px solid rgba(0,0,0,0.07);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.channel-search-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 10px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.channel-search-header h2 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
  color: #1a1a1a;
}

.channel-search-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  scrollbar-width: none;
}
.channel-search-filters::-webkit-scrollbar { display: none; }
.channel-search-filters:empty { display: none; }

.channel-filter-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1.5px solid #e2e8e2;
  background: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  color: #5a7a5b;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.channel-filter-pill img {
  width: 16px;
  height: 16px;
  border-radius: 3px;
}
.channel-filter-pill.is-off {
  background: #f5f5f5;
  color: #9ca3af;
  border-color: #e5e7eb;
}

.channel-search-list {
  display: flex;
  flex-direction: column;
}

.ch-result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  cursor: pointer;
  transition: background 0.15s;
}
.ch-result:last-child { border-bottom: none; }
.ch-result:hover { background: rgba(0,0,0,0.025); }

.ch-result__thumb {
  width: 54px;
  height: 54px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: #eee;
}
.ch-result__thumb--placeholder {
  display: block;
  opacity: 0.55;
}

.ch-result__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ch-result__badge {
  display: inline-block;
  align-self: flex-start;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.01em;
}

.ch-result__title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ch-result__time {
  font-size: 0.75rem;
  color: #888;
}

.ch-result__import {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: #8da485;
  border: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: #fff;
  transition: background 0.15s, transform 0.12s;
}
.ch-result__import:hover { background: #78936f; transform: scale(1.08); }
.ch-result__import svg { width: 18px; height: 18px; }
.ch-result__import:disabled { opacity: 0.5; cursor: default; transform: none; }

.ch-result__loading {
  padding: 14px 16px;
  font-size: 0.88rem;
  color: #888;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Custom Plately hourglass SVG */
.plately-hourglass {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  animation: flip-hourglass 2.5s ease-in-out infinite;
}

.plately-hourglass svg {
  width: 100%;
  height: 100%;
}

/* ── Channel search result cards ──────────────────────────────────────────── */
.ch-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  padding: 16px;
}

.ch-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.18s, transform 0.18s;
}
.ch-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.13);
  transform: translateY(-2px);
}

.ch-card__visual {
  position: relative;
  height: 160px;
  background: #f0f0ec;
  overflow: hidden;
}

.ch-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ch-card__img--placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ch-card__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #8da485;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 3px 8px;
  border-radius: 20px;
  text-transform: uppercase;
}

.ch-card__body {
  flex: 1;
  padding: 12px 14px 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ch-card__title {
  font-size: 0.92rem;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ch-card__desc {
  font-size: 0.78rem;
  color: #777;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.ch-card__time {
  font-size: 0.75rem;
  color: #999;
  margin-top: 2px;
}

.ch-card__actions {
  display: flex;
  gap: 8px;
  padding: 10px 14px 14px;
  align-items: center;
}

.ch-card__view {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #555;
  text-decoration: none;
  padding: 7px 10px;
  border-radius: 8px;
  background: #f2f2f0;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.ch-card__view:hover { background: #e6e6e3; color: #333; }
.ch-card__view svg { width: 14px; height: 14px; flex-shrink: 0; }

.ch-card__import {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  background: #8da485;
  border: none;
  border-radius: 8px;
  padding: 7px 12px;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
  min-height: 32px;
  text-align: center;
  white-space: normal;
}
.ch-card__import:hover { background: #78936f; transform: scale(1.03); }
.ch-card__import:disabled { opacity: 0.5; cursor: default; transform: none; }
.ch-card__import svg { width: 16px; height: 16px; flex-shrink: 0; }

/* spinner for import button while loading */
@keyframes spin {
  to { transform: rotate(360deg); }
}
.spin { animation: spin 0.8s linear infinite; }

.grocery--loading .grocery-section__title::after {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid #d0cbc4;
  border-top-color: #4a6b4c;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 8px;
  vertical-align: middle;
}

/* ── Share card overlay ───────────────────────────────────────────────────── */
@keyframes shareCardIn {
  from { opacity: 0; transform: scale(0.96) translateY(16px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.share-card-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(15,15,15,0.88);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  gap: 16px;
}
.share-card-overlay.hidden { display: none; }

.share-card {
  width: 100%;
  max-width: 360px;
  border-radius: 24px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 24px 64px rgba(0,0,0,0.45);
  animation: shareCardIn 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.share-card__image-wrap {
  position: relative;
  height: 210px;
  overflow: hidden;
}
.share-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.share-card__image-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to bottom, transparent, #fff);
}

.share-card__body {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.share-card__tag {
  display: inline-block;
  align-self: flex-start;
  background: #8da485;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
}

.share-card__title {
  font-size: 1.22rem;
  font-weight: 800;
  color: #1a1a1a;
  margin: 0;
  line-height: 1.25;
}

.share-card__meta {
  display: flex;
  gap: 12px;
  font-size: 0.82rem;
  color: #888;
  font-weight: 500;
}

.share-card__ingredients {
  list-style: none;
  padding: 0;
  margin: 4px 0 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.share-card__ingredients li {
  font-size: 0.84rem;
  color: #555;
  padding: 5px 0;
  border-bottom: 1px solid #f5f5f5;
}
.share-card__ingredients li:last-child { border-bottom: none; }

.share-card__brand {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #f0f0f0;
}
.share-card__brand-logo { height: 18px; width: auto; }
.share-card__brand span { font-size: 0.74rem; color: #bbb; font-weight: 600; }

.share-card__actions {
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.share-card__hint {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.65);
  margin: 0;
  text-align: center;
}

.share-card__buttons {
  display: flex;
  gap: 10px;
  width: 100%;
}
.share-card__buttons .secondary-button,
.share-card__buttons .primary-button {
  flex: 1;
  padding: 12px 0;
  font-size: 0.92rem;
}

/* ── Grocery suggest dropdown ─────────────────────────────────────────────── */
@keyframes suggestIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.grocery-suggest-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 200;
  background: #fff;
  border-radius: 18px;
  border: 1.5px solid rgba(0,0,0,0.07);
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  overflow: hidden;
  animation: suggestIn 0.16s ease both;
}
.grocery-suggest-dropdown.hidden { display: none; }

.suggest-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 16px;
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
  border-bottom: 1px solid rgba(0,0,0,0.045);
  transition: background 0.12s;
  font-family: inherit;
}
.suggest-item:last-child { border-bottom: none; }
.suggest-item:hover,
.suggest-item[aria-selected="true"] {
  background: #f5f9f4;
}

.suggest-item__badge {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #0071c2;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 900;
  display: grid;
  place-items: center;
  letter-spacing: -0.03em;
}

.suggest-item__name {
  flex: 1;
  font-size: 0.88rem;
  font-weight: 600;
  color: #1a1a1a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.suggest-item__price {
  font-size: 0.82rem;
  font-weight: 700;
  color: #0071c2;
  flex-shrink: 0;
}

.suggest-item--plain .suggest-item__name {
  color: #666;
  font-weight: 500;
}

.suggest-item--plain .suggest-item__meta {
  font-size: 0.76rem;
  color: #aaa;
}

.suggest-loading {
  padding: 12px 16px;
  font-size: 0.85rem;
  color: #aaa;
  margin: 0;
}

/* ── Home cookbook strip ───────────────────────────────────────────────────── */
.home-cb-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 16px 20px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.home-cb-strip::-webkit-scrollbar { display: none; }

.home-cb-card {
  flex-shrink: 0;
  width: 140px;
  background: var(--surface);
  border-radius: var(--radius-md);
  border: none;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(116,111,98,0.08);
  cursor: pointer;
  text-align: left;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.home-cb-card:active { transform: scale(0.97); }

.home-cb-card__cover {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--sage);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  position: relative;
  overflow: hidden;
}
.home-cb-card__cover--photo {
  background-size: cover;
  background-position: center;
}
.home-cb-card__cover-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 2px;
}
.home-cb-card__cover-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.home-cb-card__body {
  padding: 8px 10px 10px;
}
.home-cb-card__name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.home-cb-card__count {
  font-size: 0.73rem;
  color: var(--muted);
  margin: 0;
}

/* Add cookbook card */
.home-cb-card--add {
  border: 2px dashed rgba(116,111,98,0.22);
  background: transparent;
  box-shadow: none;
}
.home-cb-card--add:active { transform: scale(0.97); }
.home-cb-card__cover--add {
  background: rgba(116,111,98,0.05);
  color: var(--muted);
}

/* ── Recipe card source favicon ────────────────────────────────────────────── */
.recipe-card { position: relative; }

.recipe-card__favicon {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 6px rgba(0,0,0,0.14);
  overflow: hidden;
  pointer-events: none;
}
.recipe-card__favicon img {
  width: 15px;
  height: 15px;
  object-fit: contain;
  border-radius: 3px;
  display: block;
}

/* ── Import screen search section ──────────────────────────────────────────── */
.import-search-card { margin: 0 16px 12px; }

.import-or-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 16px;
  color: var(--muted);
}
.import-or-row::before,
.import-or-row::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.import-or-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

/* ── AH product photo in grocery list ───────────────────────────────────── */
.grocery-entry__ah-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
  background: #f5f9f4;
}

/* ── Custom channel add/delete controls ─────────────────────────────────── */
.channel-toggle-row--custom {
  cursor: default;
}
.channel-toggle-row--custom .toggle-switch {
  cursor: pointer;
}

.channel-delete-btn {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(200, 60, 60, 0.10);
  color: #c83c3c;
  font-size: 1rem;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.12s;
  margin-left: 4px;
}
.channel-delete-btn:hover {
  background: rgba(200, 60, 60, 0.22);
}

.channel-add-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 12px 14px;
  border: none;
  background: none;
  color: #8da485;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s;
}
.channel-add-btn:hover {
  background: #f5f9f4;
}
.channel-add-btn__icon {
  font-size: 1.2rem;
  line-height: 1;
  font-weight: 400;
}

.channel-section-label {
  padding: 12px 14px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #8da485;
  letter-spacing: 0.05em;
  background: #fafaf9;
  border-top: 1px solid rgba(0,0,0,0.05);
}

.channel-toggle-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.channel-status-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
  width: fit-content;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.channel-status-badge--pending {
  background: #fef3c7;
  color: #92400e;
}

.channel-status-badge--approved {
  background: #dcfce7;
  color: #166534;
}

.channel-status-badge--rejected {
  background: #fee2e2;
  color: #991b1b;
}

.channel-dupe-badge {
  font-size: 0.68rem;
  font-weight: 650;
  padding: 2px 8px;
  border-radius: 999px;
  display: inline-block;
  width: fit-content;
  background: rgba(141, 164, 133, 0.16);
  border: 1px solid rgba(141, 164, 133, 0.28);
  color: #4a5e44;
  letter-spacing: 0.01em;
}

.channel-pending-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  margin: 0 0 16px 0;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
}

.channel-pending-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #166534;
  margin-bottom: 2px;
}

.channel-pending-desc {
  font-size: 0.85rem;
  color: #15803d;
  line-height: 1.4;
}

.channel-pending-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.channel-pending-hourglass {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  animation: flip-hourglass 2.5s ease-in-out infinite;
}

@keyframes flip-hourglass {
  0% {
    transform: rotateZ(0deg);
  }
  25% {
    transform: rotateZ(0deg);
  }
  50% {
    transform: rotateZ(180deg);
  }
  75% {
    transform: rotateZ(180deg);
  }
  100% {
    transform: rotateZ(360deg);
  }
}

/* ── Custom channel form ────────────────────────────────────────────────────── */
.channel-add-form {
  padding: 20px;
  border-top: 1px solid rgba(120, 147, 111, 0.1);
  background: linear-gradient(135deg, rgba(141, 164, 133, 0.03) 0%, rgba(141, 164, 133, 0.06) 100%);
  border-radius: 14px;
  margin-top: 16px;
}

.channel-add-form__title {
  margin: 0 0 16px 0;
  font-size: 1rem;
  font-weight: 600;
  color: #243c2b;
}

.channel-add-form__form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.channel-add-form__submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  background: linear-gradient(135deg, #8da485 0%, #78936f 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(141, 164, 133, 0.2);
}

.channel-add-form__submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(141, 164, 133, 0.3);
}

.channel-add-form__submit:active {
  transform: translateY(0);
}

.channel-add-form__submit svg {
  width: 18px;
  height: 18px;
}

/* ── Processing notice ──────────────────────────────────────────────────────── */
.channel-processing-notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(141, 164, 133, 0.08) 0%, rgba(141, 164, 133, 0.04) 100%);
  border-left: 3px solid #8da485;
  border-radius: 8px;
  margin-top: 16px;
  margin-bottom: 16px;
}

.channel-processing-hourglass {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: #8da485;
  margin-top: 0px;
  animation: hourglass-flip 3s ease-in-out infinite;
}

@keyframes hourglass-flip {
  0%, 100% { transform: rotateZ(0deg); }
  50% { transform: rotateZ(180deg); }
}

.channel-processing-text {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #555;
  font-weight: 500;
}

/* ── Channel favicon in avatar ───────────────────────────────────────────── */
.channel-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.channel-avatar__favicon {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.channel-toggle-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.channel-toggle-avatar__favicon {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ch-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.ch-filter-chip__favicon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  border-radius: 3px;
  flex-shrink: 0;
}

/* ── Grocery screen: use standard topbar instead of custom grocery-header ── */
.grocery-header { display: none; }

/* ── Onboarding tooltips ──────────────────────────────────────────────────── */
.onboarding-overlay {
  position: fixed;
  inset: 0;
  z-index: 9990;
  pointer-events: none;
}

.onboarding-spotlight {
  position: fixed;
  z-index: 9991;
  border-radius: 16px;
  /* Lighter dimming so the page stays readable */
  box-shadow: 0 0 0 9999px rgba(15, 15, 15, 0.35);
  transition: top 0.35s cubic-bezier(.4,0,.2,1),
              left 0.35s cubic-bezier(.4,0,.2,1),
              width 0.35s cubic-bezier(.4,0,.2,1),
              height 0.35s cubic-bezier(.4,0,.2,1);
  pointer-events: none;
}

.onboarding-bubble {
  position: fixed;
  z-index: 9992;
  background: #fff;
  border-radius: 18px;
  padding: 18px 18px 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.18);
  pointer-events: all;
  width: 270px;
  transition: top 0.3s ease, bottom 0.3s ease, left 0.3s ease;
}

/* arrow up = bubble is below target */
.onboarding-bubble[data-arrow="up"]::before {
  content: '';
  position: absolute;
  top: -8px;
  left: var(--arrow-x, 50%);
  transform: translateX(-50%);
  border: 9px solid transparent;
  border-top: 0;
  border-bottom: 9px solid #fff;
}

/* arrow down = bubble is above target */
.onboarding-bubble[data-arrow="down"]::before {
  content: '';
  position: absolute;
  bottom: -8px;
  left: var(--arrow-x, 50%);
  transform: translateX(-50%);
  border: 9px solid transparent;
  border-bottom: 0;
  border-top: 9px solid #fff;
}

.onboarding-bubble__progress {
  display: flex;
  gap: 5px;
  margin-bottom: 12px;
}

.onboarding-dot {
  height: 5px;
  border-radius: 999px;
  background: #e0dbd6;
  transition: background 0.2s, width 0.2s;
  width: 5px;
}

.onboarding-dot--active {
  background: #4a6b4c;
  width: 18px;
}

.onboarding-bubble__text {
  margin: 0 0 16px;
  font-size: 0.92rem;
  color: #3a3733;
  line-height: 1.52;
}

.onboarding-bubble__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.onboarding-skip-btn {
  background: none;
  border: none;
  color: #b0a9a2;
  font-size: 0.84rem;
  cursor: pointer;
  padding: 4px 0;
  font-family: inherit;
}

.onboarding-next-btn {
  background: #4a6b4c;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 9px 20px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

/* ══════════════════════════════════════════════════════
   BASKET MODAL OVERLAY (AH-style)
   ══════════════════════════════════════════════════════ */

.basket-overlay {
  position: fixed;
  inset: 0;
  z-index: 9500;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.basket-overlay.hidden { display: none; }

.basket-sheet {
  background: #f5f3ef;
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-width: 480px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 -8px 40px rgba(0,0,0,0.18);
  animation: basket-slide-up 0.3s cubic-bezier(.4,0,.2,1) both;
}

@keyframes basket-slide-up {
  from { transform: translateY(100%); opacity: 0.6; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* Header */
.basket-sheet__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(0,0,0,0.07);
  flex-shrink: 0;
}

.basket-sheet__close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7a746e;
  line-height: 1;
}

.basket-sheet__close svg { width: 20px; height: 20px; display: block; }

.basket-sheet__title {
  font-size: 1rem;
  font-weight: 700;
  color: #2a2825;
}

.basket-sheet__header-spacer { width: 32px; }

/* Recipe head */
.basket-sheet__recipe-head {
  padding: 16px 16px 12px;
  flex-shrink: 0;
}

.basket-sheet__recipe-name {
  font-size: 1.35rem;
  font-weight: 900;
  color: #2d4a2e;
  margin: 0 0 12px;
  line-height: 1.2;
}

.basket-sheet__servings {
  display: flex;
  align-items: center;
  gap: 14px;
}

.basket-sheet__servings-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: #2a2825;
  min-width: 60px;
  text-align: center;
}

/* Diet filter chips in basket */
.basket-filter-row {
  display: flex;
  gap: 8px;
  padding: 0 16px 12px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.basket-filter-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1.5px solid #e2e8e2;
  background: #fff;
  font-size: 0.84rem;
  font-weight: 600;
  color: #4a6a4b;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}

.basket-filter-chip.is-active {
  background: #e8f4e9;
  border-color: #6b9e72;
  color: #2d4a2e;
}

/* Qty buttons (shared: servings + product) */
.basket-qty-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: opacity 0.15s;
}

.basket-qty-btn--minus {
  background: #f0a090;
  color: #fff;
}

.basket-qty-btn--plus {
  background: #4a6b4c;
  color: #fff;
}

.basket-qty-btn:active { opacity: 0.75; }

/* Scrollable list */
.basket-sheet__list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Product card */
.basket-product {
  background: #fff;
  border-radius: 16px;
  padding: 12px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.basket-product__img-wrap {
  position: relative;
  flex-shrink: 0;
}

.basket-product__img {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
  background: #f0ece6;
  display: block;
}

.basket-product__img--placeholder {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  background: #f0ece6;
  display: grid;
  place-items: center;
  font-size: 2rem;
}

.basket-product__swap {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255,255,255,0.88);
  border: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.basket-product__swap svg { width: 12px; height: 12px; stroke: #5c5953; }

.basket-product__info {
  flex: 1;
  min-width: 0;
}

.basket-product__name {
  font-size: 0.92rem;
  font-weight: 700;
  color: #2a2825;
  margin: 0 0 3px;
  line-height: 1.3;
}

.basket-product__meta {
  font-size: 0.8rem;
  color: #7a746e;
  margin: 0 0 3px;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.basket-product__partner {
  font-size: 0.68rem;
  font-weight: 800;
  color: #e07820;
  letter-spacing: 0.04em;
}

.basket-product__bonus {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #ff7900;
  color: #fff;
  padding: 2px 7px;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  line-height: 1.2;
}

.price-new {
  font-weight: 800;
  color: #2a2825;
}

.price-old {
  text-decoration: line-through;
  color: rgba(122, 116, 110, 0.85);
  font-weight: 650;
  margin-left: 6px;
}

.meta-sep {
  opacity: 0.75;
}

.basket-product__for {
  font-size: 0.77rem;
  color: #9a9390;
  font-style: italic;
  margin: 0;
}

.basket-product__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.basket-product__add {
  appearance: none;
  border: 1px solid #d6e4d8;
  background: #f3f8f3;
  color: #2d4a2e;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.85rem;
  font-weight: 800;
  line-height: 1;
  min-height: 40px;
}

.basket-product__add:hover { background: #e8f4e9; border-color: #6b9e72; }
.basket-product__add:active { background: #dceadd; }
.basket-product__add:disabled { opacity: 0.6; cursor: not-allowed; }

.basket-product__delete {
  background: rgba(192, 184, 176, 0.12);
  border: 1px solid rgba(192, 184, 176, 0.2);
  border-radius: 8px;
  cursor: pointer;
  color: #c0b8b0;
  padding: 8px 10px;
  display: grid;
  place-items: center;
  min-width: 40px;
  min-height: 40px;
  transition: all 0.2s ease;
}

.basket-product__delete svg { width: 20px; height: 20px; }
.basket-product__delete:hover {
  background: rgba(196, 68, 68, 0.1);
  border-color: rgba(196, 68, 68, 0.3);
  color: #c44;
}

.basket-product__qty {
  display: flex;
  align-items: center;
  gap: 8px;
}

.basket-product__qty-num {
  font-size: 0.95rem;
  font-weight: 700;
  color: #2a2825;
  min-width: 20px;
  text-align: center;
}

.basket-product__qty .basket-qty-btn {
  width: 28px;
  height: 28px;
  font-size: 1rem;
}

/* Footer */
.basket-sheet__footer {
  padding: 14px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(0,0,0,0.07);
  flex-shrink: 0;
  background: #f5f3ef;
}

.basket-sheet__total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
}

.basket-sheet__total {
  font-size: 1.4rem;
  font-weight: 900;
  color: #2a2825;
}

.basket-sheet__total-note {
  font-size: 0.72rem;
  color: #a6a299;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.basket-sheet__cta {
  width: 100%;
  background: #00AEEF;
  color: #fff;
  border: none;
  border-radius: 16px;
  padding: 16px 20px;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: inherit;
  transition: opacity 0.15s;
}

.basket-sheet__cta:active { opacity: 0.85; }

/* Per-item "Wissel" link in the basket sheet rows */
.basket-product__wissel {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 6px 0 0;
  padding: 4px 10px 4px 8px;
  border: 1px solid #d6e4d8;
  background: #f3f8f3;
  color: #2d4a2e;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  line-height: 1;
  transition: background 0.15s, border-color 0.15s;
}
.basket-product__wissel:hover { background: #e8f4e9; border-color: #6b9e72; }
.basket-product__wissel:active { background: #dceadd; }
.basket-product__wissel svg { width: 12px; height: 12px; stroke: #2d4a2e; }

/* ══════════════════════════════════════════════════════
   ALTERNATIVES OVERLAY ("Kies een alternatief", AH-style)
   ══════════════════════════════════════════════════════ */

.alt-overlay {
  position: fixed;
  inset: 0;
  z-index: 9600; /* above basket overlay (9500) */
  /* Fully block the basket sheet behind it */
  background: rgba(245, 243, 239, 0.98);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: alt-slide-up 0.28s cubic-bezier(.4,0,.2,1) both;
}

.alt-overlay.hidden { display: none; }

@keyframes alt-slide-up {
  from { transform: translateY(100%); opacity: 0.6; }
  to   { transform: translateY(0);    opacity: 1; }
}

.alt-sheet {
  background: #f5f3ef;
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-width: 480px;
  /* Keep the sheet height stable like the basket sheet */
  max-height: 92vh;
  height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 -8px 40px rgba(0,0,0,0.18);
}

.alt-sheet__header {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 32px;
  align-items: center;
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(0,0,0,0.07);
  flex-shrink: 0;
}

.alt-sheet__back {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7a746e;
}
.alt-sheet__back svg { width: 22px; height: 22px; display: block; }

.alt-sheet__title {
  font-size: 1rem;
  font-weight: 700;
  color: #2a2825;
  text-align: center;
}

.alt-sheet__header-spacer { width: 32px; height: 32px; }

.alt-sheet__context {
  padding: 12px 16px 10px;
  font-size: 0.88rem;
  color: #4a4642;
  background: #f5f3ef;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.alt-sheet__context-label {
  color: #9a9390;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.72rem;
}
.alt-sheet__context-value {
  color: #2a2825;
  font-weight: 700;
}

.alt-sheet__chips {
  display: flex;
  gap: 8px;
  padding: 10px 12px 8px;
  background: #f5f3ef;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.alt-sheet__chips::-webkit-scrollbar { display: none; }
.alt-sheet__chips:empty { display: none; }

.alt-filter-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(120, 147, 111, 0.30);
  background: #fff;
  color: #2a2825;
  font-weight: 700;
  font-size: 0.86rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.12s, background 0.12s, border-color 0.12s, color 0.12s;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}
.alt-filter-chip:active { transform: scale(0.98); }
.alt-filter-chip.is-active {
  background: #e8f4e9;
  border-color: #6b9e72;
  color: #2d4a2e;
}
.alt-filter-chip--subtle {
  border-color: rgba(0,0,0,0.12);
  color: rgba(0,0,0,0.62);
  font-weight: 650;
}

.alt-sheet__list {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px calc(20px + env(safe-area-inset-bottom, 0px));
}

.alt-sheet__empty {
  text-align: center;
  padding: 36px 18px;
  color: #888;
  font-size: 0.95rem;
}

.alt-section {
  margin: 14px 0 18px;
}

.alt-section__title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #2a2825;
  margin: 0 4px 10px;
  letter-spacing: 0.01em;
}

.alt-section__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.alt-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  border: 1.5px solid transparent;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.alt-card.is-selected {
  border-color: #6b9e72;
  background: #f3f8f3;
}

.alt-card__img {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  background: #f0ece6;
  display: block;
  flex-shrink: 0;
}

.alt-card__img--placeholder {
  display: grid;
  place-items: center;
  font-size: 1.6rem;
}

.alt-card__info {
  flex: 1;
  min-width: 0;
}

.alt-card__title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #2a2825;
  margin: 0 0 3px;
  line-height: 1.3;
  /* clamp to 2 lines */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.alt-card__meta {
  font-size: 0.8rem;
  color: #7a746e;
  margin: 0;
}

.alt-card__badges {
  margin-top: 6px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.alt-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.88);
  color: rgba(42, 40, 37, 0.82);
}

.alt-badge--bio {
  border-color: rgba(107, 158, 114, 0.35);
  background: #e8f4e9;
  color: #2d4a2e;
}

.alt-badge--bonus {
  border-color: rgba(255, 121, 0, 0.38);
  background: #ff7900;
  color: #fff;
}

.alt-badge--beterLeven1 {
  border-color: rgba(0, 174, 239, 0.28);
  background: rgba(0, 174, 239, 0.10);
  color: rgba(0, 96, 132, 0.92);
}

.alt-badge--vegan,
.alt-badge--vegetarisch,
.alt-badge--plantaardig {
  border-color: rgba(120, 147, 111, 0.24);
  background: rgba(120, 147, 111, 0.10);
  color: rgba(45, 74, 46, 0.92);
}

.alt-badge--cheapest {
  border-color: rgba(0,0,0,0.10);
  background: rgba(0,0,0,0.05);
  color: rgba(0,0,0,0.62);
}

.alt-card__choose {
  background: #4a6b4c;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, opacity 0.15s;
}
.alt-card__choose:hover { background: #3d5a3f; }
.alt-card__choose:active { opacity: 0.85; }

.alt-card__chosen {
  background: #e8f4e9;
  color: #2d4a2e;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.8rem;
  font-weight: 800;
  flex-shrink: 0;
  border: 1px solid #6b9e72;
}

/* ── Recipe edit panel ── */
.recipe-edit__save-btn {
  background: #78936f;
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 7px 16px;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  flex-shrink: 0;
}
.recipe-edit__save-btn:active { background: #5e7857; }

.recipe-edit__body {
  padding: 8px 16px 120px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.recipe-edit__section {
  padding: 16px 0 12px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.recipe-edit__section:last-child { border-bottom: none; }

.recipe-edit__section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.recipe-edit__section-head .recipe-edit__label { margin-bottom: 0; }

.recipe-edit__label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 8px;
}

.recipe-edit__input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #e5e2dc;
  border-radius: 12px;
  font-size: 1rem;
  font-family: inherit;
  color: #1a1a1a;
  background: #fff;
  outline: none;
  box-sizing: border-box;
}
.recipe-edit__input:focus { border-color: #78936f; }

.recipe-edit__textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #e5e2dc;
  border-radius: 12px;
  font-size: 0.95rem;
  font-family: inherit;
  color: #1a1a1a;
  background: #fff;
  outline: none;
  resize: vertical;
  min-height: 72px;
  box-sizing: border-box;
  line-height: 1.5;
}
.recipe-edit__textarea:focus { border-color: #78936f; }

.recipe-edit__row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 16px 0 12px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.recipe-edit__meal-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.recipe-edit__meal-chip {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1.5px solid #e5e2dc;
  background: #fff;
  font-size: 0.88rem;
  font-family: inherit;
  color: #6b7280;
  cursor: pointer;
  font-weight: 500;
}

.recipe-edit__meal-chip.is-active {
  background: #78936f;
  border-color: #78936f;
  color: #fff;
  font-weight: 700;
}

.recipe-edit__add-btn {
  background: none;
  border: none;
  color: #78936f;
  font-size: 0.88rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  padding: 4px 0;
}

.recipe-edit__ingredient-list,
.recipe-edit__step-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.recipe-edit__ingredient-item,
.recipe-edit__step-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f9f8f6;
  border-radius: 12px;
  padding: 4px 8px 4px 12px;
}

.recipe-edit__ingredient-inputs {
  display: flex;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.recipe-edit__qty-input {
  width: 52px;
  flex-shrink: 0;
  padding: 8px 6px;
  border: 1.5px solid transparent;
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  background: transparent;
  text-align: center;
  color: #1a1a1a;
  outline: none;
}
.recipe-edit__qty-input:focus { border-color: #78936f; background: #fff; }

.recipe-edit__unit-input {
  width: 52px;
  flex-shrink: 0;
  padding: 8px 6px;
  border: 1.5px solid transparent;
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  background: transparent;
  text-align: center;
  color: #6b7280;
  outline: none;
}
.recipe-edit__unit-input:focus { border-color: #78936f; background: #fff; }

.recipe-edit__name-input {
  flex: 1;
  min-width: 0;
  padding: 8px 6px;
  border: 1.5px solid transparent;
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  background: transparent;
  color: #1a1a1a;
  font-weight: 600;
  outline: none;
}
.recipe-edit__name-input:focus { border-color: #78936f; background: #fff; }

.recipe-edit__step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #78936f;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.recipe-edit__step-input {
  flex: 1;
  padding: 10px 6px;
  border: 1.5px solid transparent;
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  background: transparent;
  color: #1a1a1a;
  outline: none;
  resize: none;
  min-height: 44px;
  line-height: 1.45;
}
.recipe-edit__step-input:focus { border-color: #78936f; background: #fff; }

.recipe-edit__delete-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: #d1a0a0;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  border-radius: 8px;
}
.recipe-edit__delete-btn:active { color: #e05252; }
.recipe-edit__delete-btn svg { width: 16px; height: 16px; display: block; }

.onboarding-next-btn:active { opacity: 0.85; }

/* ── Over deze App sub-panel ─────────────────────────────────────────────── */
.about-app {
  text-align: center;
  padding: 24px 20px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.about-app__logo {
  width: 96px;
  height: 96px;
  border-radius: 28px;
  background: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 28px rgba(76, 85, 69, 0.12);
  margin-bottom: 18px;
  overflow: hidden;
}

.about-app__logo img {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

.about-app__name {
  margin: 0 0 4px;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.about-app__tagline {
  margin: 0 0 20px;
  font-size: 0.95rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.about-app__version-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(141, 164, 133, 0.12);
  border: 1px solid rgba(141, 164, 133, 0.2);
  margin-bottom: 24px;
  font-size: 0.88rem;
}

.about-app__version-label {
  color: var(--muted-strong);
  font-weight: 500;
}

.about-app__version {
  color: #4a6b4c;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.about-app__description {
  margin: 0 0 24px;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--muted-strong);
  max-width: 320px;
}

.about-app__copyright {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* Profile hero avatar (above the name on the profile screen) */
.profile2-hero-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: #e8b4a0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.profile2-hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Supermarket selector — reuses .onboarding-channel-item base styles */
.onboarding-supermarket-item {
  position: relative;
}

.onboarding-supermarket-item__badge {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 600;
  color: #92400e;
  background: #fef3c7;
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.onboarding-supermarket-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 14px 16px 4px;
  padding: 10px 12px;
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 10px;
  font-size: 0.82rem;
  line-height: 1.4;
  color: #78350f;
}

.onboarding-supermarket-note svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  stroke: #b45309;
}

.onboarding-hero-icon--supermarket {
  background: #fde8b8;
  color: #b45309;
}

/* ── Admin inventory (admin.html) ───────────────────────────────────────────── */
.admin-inventory__tabs {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  background: rgba(0,0,0,0.04);
  border-radius: 999px;
}

.admin-inventory__tab {
  border: 0;
  padding: 8px 12px;
  border-radius: 999px;
  background: transparent;
  font-weight: 700;
  font-size: 13px;
  color: rgba(0,0,0,0.62);
}

.admin-inventory__tab--active {
  background: #ffffff;
  color: #1a1a1a;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

.admin-inventory__controls {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.admin-inventory__controls input,
.admin-inventory__controls select {
  padding: 10px 14px;
  border: 1px solid rgba(0,0,0,0.14);
  border-radius: 10px;
  background: #fff;
  font-size: 14px;
}

.admin-inventory__controls input:focus,
.admin-inventory__controls select:focus {
  outline: none;
  border-color: rgba(120, 147, 111, 0.55);
  box-shadow: 0 0 0 3px rgba(120, 147, 111, 0.12);
}

.admin-inventory__pager {
  display: inline-flex;
  gap: 8px;
  margin-left: auto;
}

.admin-inventory__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.admin-inventory__card {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  display: grid;
  grid-template-columns: 96px 1fr;
  min-height: 96px;
}

.admin-inventory__card--row {
  grid-template-columns: 96px 1fr;
}

.admin-inventory__body {
  padding: 12px 12px 10px;
  min-width: 0;
}

.admin-inventory__title {
  font-weight: 800;
  font-size: 14px;
  line-height: 1.2;
  color: #1a1a1a;
  margin-bottom: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-inventory__subtitle {
  font-size: 12px;
  color: rgba(0,0,0,0.55);
  margin-bottom: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-inventory__meta {
  font-size: 12px;
  color: rgba(0,0,0,0.62);
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.admin-inventory__link {
  color: #78936f;
  font-weight: 700;
  text-decoration: none;
}
.admin-inventory__link:hover { text-decoration: underline; }

.admin-inventory__thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: rgba(0,0,0,0.03);
}

.admin-inventory__thumb--empty {
  display: grid;
  place-items: center;
  font-size: 28px;
  color: rgba(0,0,0,0.35);
}

.admin-inventory__collage {
  width: 96px;
  height: 96px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 2px;
  background: rgba(0,0,0,0.06);
}

.admin-inventory__collage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-inventory__placeholder {
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  background: rgba(120, 147, 111, 0.12);
  color: rgba(120, 147, 111, 0.95);
  font-size: 28px;
  font-weight: 900;
}

.admin-inventory__details {
  margin-top: 10px;
  border-top: 1px solid rgba(0,0,0,0.06);
  padding-top: 10px;
}

.admin-inventory__details summary {
  cursor: pointer;
  font-size: 12px;
  color: rgba(0,0,0,0.62);
  font-weight: 700;
  user-select: none;
}

.admin-inventory__detail-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  font-size: 12px;
  color: rgba(0,0,0,0.78);
}

@media (max-width: 520px) {
  .admin-inventory__grid {
    grid-template-columns: 1fr;
  }
  .admin-inventory__pager {
    margin-left: 0;
    width: 100%;
    justify-content: space-between;
  }
}

/* ── Home search: focus-state suggestions panel ──────────────────────────── */

.home-focus-panel {
  margin: -10px 16px 18px;
  padding: 14px 14px 12px;
  background: #ffffff;
  border: 1px solid rgba(120, 147, 111, 0.18);
  border-radius: 22px;
  box-shadow: 0 18px 36px rgba(36, 60, 43, 0.14);
  position: relative;
  z-index: 19;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.home-focus-panel.hidden {
  display: none !important;
}

.home-focus-section {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.home-focus-title {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #748a73;
}

.home-intent-row,
.home-recent-searches {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.home-intent-chip,
.home-recent-search {
  flex: 0 0 auto;
  border: 1px solid rgba(120, 147, 111, 0.22);
  border-radius: 999px;
  background: #f6f3ed;
  color: #36523b;
  padding: 6px 11px;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.home-intent-chip {
  background: #fff;
  border-color: rgba(141, 164, 133, 0.34);
}
.home-intent-chip:active,
.home-recent-search:active {
  transform: scale(0.97);
}

.home-recent-recipes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

@media (max-width: 480px) {
  .home-recent-recipes {
    grid-template-columns: repeat(2, 1fr);
  }
}

.home-recent-recipe {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  background: #f7f5ef;
  border: 1px solid rgba(120, 147, 111, 0.14);
  border-radius: 14px;
  cursor: pointer;
  text-align: left;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
.home-recent-recipe:active {
  transform: scale(0.98);
}

.home-recent-recipe__img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  object-fit: cover;
  flex: 0 0 auto;
  background: #e8ede8;
}

.home-recent-recipe__title {
  font-size: 0.74rem;
  font-weight: 600;
  color: #243c2b;
  line-height: 1.18;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
