/* Nutrivo — weekly plan + shopping list styles (loaded after app.css) */

/* Generic button (also fixes the previously-unstyled auth modal .btn) */
.btn{
  appearance: none;
  border: 1px solid var(--line);
  background: var(--card);
  color: #111827;
  font-weight: 800;
  font-size: 14px;
  padding: 11px 16px;
  border-radius: 12px;
  cursor: pointer;
  transition: transform .05s ease, box-shadow .15s ease, opacity .15s ease;
}
.btn:hover{ box-shadow: 0 2px 10px rgba(17,24,39,.06); }
.btn:active{ transform: translateY(1px); }
.btn:disabled{ opacity: .55; cursor: not-allowed; }
.btn.primary{
  border: 0;
  color: #fff;
  background: linear-gradient(90deg, var(--brand), var(--brand2));
}

/* Header sign-in button (signed-out state) */
.signInBtn{ padding: 7px 14px; font-size: 13px; border-radius: 999px; }

/* ---- Signed-out gate ---- */
.welcome{ display: none; }
body.is-signed-out .welcome{
  display: flex; flex-direction: column; justify-content: center;
  min-height: calc(100vh - 64px);
  padding: 24px 22px 40px;
}
/* Hide the app chrome until signed in */
body.is-signed-out .content,
body.is-signed-out .tabbar,
body.is-signed-out .topbar .right{ display: none !important; }

.welcomeInner{ max-width: 460px; margin: 0 auto; text-align: center; }
.welcomeLogo{ width: 72px; height: 72px; object-fit: contain; margin-bottom: 18px; }
.welcomeTitle{
  margin: 0; font-size: 28px; line-height: 1.15; font-weight: 900; letter-spacing: -0.01em;
}
.welcomeSub{ margin: 12px 0 26px; color: var(--muted); font-size: 15px; font-weight: 600; line-height: 1.45; }
.welcomeActions{ display: grid; gap: 10px; }
.welcomeActions .btn{ width: 100%; padding: 14px; font-size: 15px; }

/* Home tweaks */
.focusGo{
  appearance: none; border: 0; cursor: pointer;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(42,166,160,.14); color: var(--brand);
  font-size: 20px; font-weight: 900; line-height: 1;
}
.weekCta{ margin-top: 12px; }
.weekCta .btn{ width: 100%; }

/* ---- Weekly plan ---- */
.wpCard{ padding: 16px; }
.wpHead{ display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.wpKicker{ font-size: 12px; font-weight: 900; letter-spacing:.04em; text-transform: uppercase; color: var(--brand); }
.wpTitle{ margin: 2px 0 0; font-size: 22px; font-weight: 900; }
.wpTargets{
  margin-top: 12px; padding: 10px 12px; border-radius: 12px;
  background: rgba(42,166,160,.08); color: #111827; font-size: 13px; font-weight: 700;
}
.wpSummary{ margin-top: 10px; font-weight: 700; color: #374151; }
.wpStatus{ margin-top: 8px; }

/* Plan config (meals + days) — toggle pills */
.wpConfig{ margin-top: 14px; display: grid; gap: 14px; padding: 14px; background: #faf9f6; border: 1px solid var(--line); border-radius: 14px; }
.wpConfigGroup{ display: grid; gap: 9px; }
.wpConfigLabel{ font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.pillRow{ display: flex; flex-wrap: wrap; gap: 8px; }
.togPill{
  appearance: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
  border: 1.5px solid rgba(29,39,51,.14); background: var(--card, #fff); color: #1d2733;
  font-size: 13px; font-weight: 750; padding: 9px 15px; border-radius: 999px;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .1s ease;
}
.togPill.day{ padding: 9px 13px; }
.togPill:active{ transform: scale(.95); }
.togPill.on{
  border-color: transparent; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  box-shadow: 0 6px 14px -8px rgba(31,143,138,.85);
}

.wpDays{ margin-top: 14px; display: grid; gap: 16px; }
.wpDayPending{ opacity: .55; }
.wpDayPending .wpDayTotals{ font-style: italic; }

.wpHeadBtns{ display: flex; align-items: center; gap: 8px; }
.wpFavesBtn{ appearance: none; cursor: pointer; font: inherit; font-size: 13px; font-weight: 800; color: #f0a500; background: #fff7e6; border: 1.5px solid #f6d99a; padding: 8px 13px; border-radius: 999px; }

/* Favorites sheet */
.favOverlay{ position: fixed; inset: 0; z-index: 70; display: flex; align-items: flex-end; justify-content: center; background: rgba(17,24,39,.45); opacity: 0; transition: opacity .18s ease; }
.favOverlay.open{ opacity: 1; }
.favSheet{ width: min(560px, 100%); max-height: 86vh; display: flex; flex-direction: column; background: var(--card,#fff); border-radius: 22px 22px 0 0; transform: translateY(14px); transition: transform .2s ease; overflow: hidden; }
.favOverlay.open .favSheet{ transform: translateY(0); }
.favGrip{ width: 40px; height: 4px; border-radius: 99px; background: #d9d5cd; margin: 10px auto 4px; }
.favHead{ display: flex; align-items: center; justify-content: space-between; padding: 8px 18px 12px; border-bottom: 1px solid var(--line); }
.favKicker{ font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.favSheetTitle{ font-family: var(--font-display, Georgia, serif); font-size: 21px; font-weight: 600; color: var(--ink,#1d2733); }
.favClose{ appearance: none; border: 0; background: #f1efe9; width: 34px; height: 34px; border-radius: 50%; font-size: 20px; cursor: pointer; color: #5b6675; }
.favBody{ overflow-y: auto; padding: 8px 0; }
.favRow{ display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; cursor: pointer; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 10px 16px; -webkit-tap-highlight-color: transparent; }
.favRow:last-child{ border-bottom: 0; }
.favRow:active{ background: rgba(42,166,160,.05); }
.favThumb{ flex: 0 0 auto; width: 52px; height: 52px; border-radius: 12px; overflow: hidden; background: #eef0f1; }
.favThumb img{ width: 100%; height: 100%; object-fit: cover; display: block; }
.favInfo{ flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.favTitle{ font-size: 14.5px; font-weight: 750; color: var(--ink,#1d2733); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.favMeta{ display: flex; align-items: center; gap: 10px; }
.favStars{ font-size: 12px; color: #f0a500; letter-spacing: 1px; }
.favMade{ font-size: 11px; font-weight: 800; color: #2e9c6b; }
.favEmpty{ padding: 32px 24px; text-align: center; color: var(--muted); font-weight: 600; font-size: 14px; line-height: 1.5; }

.wpDaysBar{ display: flex; justify-content: flex-end; margin-top: 12px; }
.wpExpandAll{
  appearance: none; cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 800;
  color: #1d2733; background: var(--card,#fff); border: 1.5px solid var(--line);
  padding: 7px 13px; border-radius: 999px;
}

.wpDay{ border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.wpDayHead{
  display:flex; align-items:center; justify-content:space-between; gap:10px; width:100%;
  padding: 11px 12px; background: #faf9f6; border:0; border-bottom: 1px solid var(--line);
  cursor:pointer; text-align:left; font:inherit; -webkit-tap-highlight-color:transparent;
}
.wpDay.collapsed .wpDayHead{ border-bottom-color: transparent; }
.wpDayHead:active{ background:#f1efe9; }
.wpDayHeadL{ display:flex; flex-direction:column; gap:2px; min-width:0; flex:1; }
.wpDayName{ font-size:15px; font-weight:900; color: var(--ink,#1d2733); }
.wpDayPreview{ font-size:12px; font-weight:600; color: var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.wpDay:not(.collapsed) .wpDayPreview{ display:none; }
.wpDayTotals{ font-size: 12px; font-weight: 800; color: var(--muted); flex:0 0 auto; white-space:nowrap; }
.wpDayChevron{ width:18px; height:18px; color:#9aa3ad; transition: transform .2s ease; flex:0 0 auto; }
.wpDay.collapsed .wpDayChevron{ transform: rotate(-90deg); }

/* Meals: a clean vertical list of tappable rows (thumb + info) */
.wpMeals{ display: flex; flex-direction: column; padding: 8px; overflow: hidden; max-height: 5000px; transition: max-height .28s ease; }
.wpDay.collapsed .wpMeals{ max-height: 0; padding-top: 0; padding-bottom: 0; }
.wpMeal{
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; cursor: pointer;
  background: none; border: 0; border-bottom: 1px solid var(--line); padding: 10px 6px;
  -webkit-tap-highlight-color: transparent;
}
.wpMeals .wpMeal:last-child{ border-bottom: 0; }
.wpMeal:active{ background: rgba(42,166,160,.05); }
.wpMealBadge{ display: inline-flex; gap: 8px; align-items: center; margin-top: 2px; }
.wpBadgeMade{ font-size: 11px; font-weight: 800; color: #2e9c6b; }
.wpBadgeStars{ font-size: 11px; color: #f0a500; letter-spacing: 1px; }

/* Recipe modal: made-it toggle + star rating */
.mealLogRow{ display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0; padding: 12px 14px; background: #faf9f6; border-radius: 14px; }
.madeBtn{ appearance: none; cursor: pointer; font: inherit; font-size: 13px; font-weight: 800; padding: 9px 15px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; color: #1d2733; }
.madeBtn.on{ background: #eef7f1; border-color: #2e9c6b; color: #2e9c6b; }
.starRow{ display: flex; gap: 2px; }
.star{ appearance: none; border: 0; background: none; cursor: pointer; font-size: 26px; line-height: 1; color: #d8d4cc; padding: 0 1px; transition: color .12s ease, transform .12s ease; }
.star.on{ color: #f0a500; }
.star:active{ transform: scale(1.2); }
.wpThumb{
  position: relative; flex: 0 0 auto; width: 64px; height: 64px; border-radius: 14px;
  overflow: hidden; background: #eef0f1;
}
.wpThumb img{ width: 100%; height: 100%; object-fit: cover; display: block; }
.wpSlotTag{
  position: absolute; left: 4px; bottom: 4px;
  background: rgba(17,24,39,.74); color: #fff; font-size: 8.5px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .04em; padding: 2px 5px; border-radius: 999px;
}
.wpMealInfo{ flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.wpMealTitle{ font-weight: 800; font-size: 14.5px; line-height: 1.2; color: #1d2733; }
.wpWhy{ font-size: 12px; font-style: italic; color: var(--brand); font-weight: 700; line-height: 1.25; }
.wpMacros{ font-size: 11.5px; color: var(--muted); font-weight: 700; }
.wpMacros b{ color: #1d2733; }
.wpChevron{ flex: 0 0 auto; font-size: 22px; color: #c3c8cf; font-weight: 400; line-height: 1; }

/* Recipe detail modal */
.mealModalOverlay{
  position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(17,24,39,.45); opacity: 0; transition: opacity .18s ease;
}
.mealModalOverlay.open{ opacity: 1; }
.mealModal{
  position: relative; width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto;
  background: var(--card, #fff); border-radius: 24px 24px 0 0;
  transform: translateY(16px); transition: transform .2s cubic-bezier(.22,.7,.3,1);
}
.mealModalOverlay.open .mealModal{ transform: none; }
@media (min-width: 540px){
  .mealModalOverlay{ align-items: center; }
  .mealModal{ border-radius: 24px; }
}
.mealModalClose{
  position: absolute; top: 12px; right: 12px; z-index: 2; width: 34px; height: 34px; border-radius: 50%;
  border: 0; cursor: pointer; background: rgba(255,255,255,.9); color: #1d2733; font-size: 22px; line-height: 1;
  box-shadow: 0 2px 8px rgba(17,24,39,.18);
}
.mealModalImg{ height: 190px; background: #eef0f1; }
.mealModalImg img{ width: 100%; height: 100%; object-fit: cover; display: block; }
.mealModalBody{ padding: 18px 20px 26px; }
.mealModalSlot{ font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.mealModalTitle{ margin: 6px 0 12px; font-size: 22px; font-weight: 800; line-height: 1.15; color: #1d2733; }
.mealModalMacros{ display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--muted); font-weight: 700; }
.mealModalMacros b{ color: #1d2733; }
.mealModalWhy{ margin: 14px 0 0; font-style: italic; color: var(--brand); font-weight: 700; }
.mealModalSec{ margin-top: 20px; }
.mealModalSec h4{ margin: 0 0 10px; font-size: 12px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.mIngList{ list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mIngList li{ display: flex; gap: 10px; font-size: 14px; font-weight: 600; color: #1d2733; }
.mIngAmt{ flex: 0 0 84px; font-weight: 800; color: var(--brand); }
.mStepList{ list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: none; }
.mStepList li{ display: flex; gap: 12px; font-size: 14px; line-height: 1.45; color: #2a3540; }
.mStepN{
  flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(42,166,160,.14); color: var(--brand); font-size: 12px; font-weight: 800;
}
.mealModalLink{ display: inline-block; margin-top: 18px; }
.mealModalSrc{ display: inline-block; margin-top: 20px; font-size: 14px; font-weight: 800; color: var(--brand); text-decoration: none; }
.mealModalSrc:hover{ text-decoration: underline; }

/* ---- Shopping list (redesigned) ---- */
.slTitle{ font-family: var(--font-display, Georgia, serif); font-weight: 600; font-size: 24px; letter-spacing: -.01em; margin: 4px 0 0; color: var(--ink, #1d2733); }

.slHeadCard{
  background: #fff; border: 1px solid var(--card-line, rgba(29,39,51,.07)); border-radius: 20px;
  padding: 18px; box-shadow: var(--card-shadow, 0 8px 28px -14px rgba(29,39,51,.22));
}
.slMeta{ margin-top: 6px; font-size: 13px; font-weight: 700; color: var(--ink-soft, #5b6675); }
.slHint{ margin-top: 8px; font-size: 12.5px; font-weight: 600; color: var(--brand); background: rgba(42,166,160,.08); border-radius: 10px; padding: 7px 10px; }
.slProgress{ height: 8px; border-radius: 99px; background: #eeece6; overflow: hidden; margin-top: 14px; }
.slProgressBar{ height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--brand), var(--brand2)); transition: width .25s ease; }
.slProgressTxt{ margin-top: 7px; font-size: 12px; font-weight: 800; color: var(--ink-soft, #5b6675); }

.slAisleCard{
  background: #fff; border: 1px solid var(--card-line, rgba(29,39,51,.07)); border-radius: 18px;
  overflow: hidden; box-shadow: var(--card-shadow, 0 8px 28px -14px rgba(29,39,51,.22));
}
.slAisleHead{
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; width: 100%;
  background: #faf9f6; border: 0; border-bottom: 1px solid var(--card-line, rgba(29,39,51,.07));
  cursor: pointer; text-align: left; font: inherit; -webkit-tap-highlight-color: transparent;
}
.slAisleHead:active{ background: #f1efe9; }
.slAisleIcon{ font-size: 16px; }
.slAisleName{ flex: 1; font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: #374151; }
.slAisleCount{ font-size: 12px; font-weight: 800; color: #fff; background: var(--brand); border-radius: 99px; padding: 2px 9px; min-width: 34px; text-align: center; }
.slChevron{ width: 18px; height: 18px; color: #9aa3ad; transition: transform .2s ease; flex: 0 0 auto; }

/* Collapsed: fold the items away to keep the page short. */
.slItems{
  list-style: none; margin: 0; padding: 0;
  overflow: hidden; max-height: 2000px; transition: max-height .25s ease;
}
.slAisleCard.collapsed .slItems{ max-height: 0; }
.slAisleCard.collapsed .slChevron{ transform: rotate(-90deg); }
.slAisleCard.collapsed .slAisleHead{ border-bottom-color: transparent; }
/* Finished aisle: muted + green tick. */
.slAisleCard.done .slAisleHead{ background: #eef7f1; }
.slAisleCard.done .slAisleName{ color: #6b7280; }
.slAisleCard.done .slAisleCount{ background: #2e9c6b; }
.slItem{ display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--card-line, rgba(29,39,51,.06)); }
.slItem:last-child{ border-bottom: 0; }
.slCheckWrap{ position: relative; flex: 0 0 auto; width: 24px; height: 24px; cursor: pointer; }
.slCheck{ position: absolute; opacity: 0; width: 24px; height: 24px; margin: 0; cursor: pointer; }
.slBox{
  display: block; width: 24px; height: 24px; border-radius: 8px;
  border: 2px solid #d4d0c8; background: #fff; transition: all .15s ease;
}
.slCheck:checked + .slBox{
  background: linear-gradient(135deg, var(--brand), var(--brand2)); border-color: transparent;
}
.slCheck:checked + .slBox::after{
  content: ""; position: absolute; left: 8px; top: 4px; width: 6px; height: 11px;
  border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}
.slItemMain{ flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.slQty{ font-size: 12px; font-weight: 800; color: var(--brand); }
.slName{ font-size: 14.5px; font-weight: 650; color: var(--ink, #1d2733); }
/* Checked = flagged to buy: highlight it so your picks stand out. */
.slItem:has(.slCheck:checked){ background: rgba(42,166,160,.07); }
.slItem:has(.slCheck:checked) .slName{ color: var(--ink, #1d2733); font-weight: 750; }
.slAisleCard.noneSelected .slAisleCount{ background: #b6bcc4; }
.slFrom{ font-size: 11px; font-weight: 800; color: var(--ink-soft, #9aa3ad); }

.slEmpty{ text-align: center; padding: 48px 24px; }
.slEmptyIcon{ font-size: 44px; }
.slEmpty .slTitle{ margin-top: 10px; }
.slEmpty .btn{ margin-top: 18px; }

/* Order card */
.slOrderCard{
  background: #fff; border: 1px solid var(--card-line, rgba(29,39,51,.07)); border-radius: 20px;
  padding: 18px; box-shadow: var(--card-shadow, 0 8px 28px -14px rgba(29,39,51,.22));
}
.slOrderHead{ display: flex; align-items: center; gap: 12px; }
.slOrderIcon{
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  font-size: 20px; background: rgba(42,166,160,.1);
}
.slOrderTitle{ font-family: var(--font-display, Georgia, serif); font-weight: 600; font-size: 18px; color: var(--ink, #1d2733); }
.slOrder{ margin-top: 14px; display: flex; gap: 10px; align-items: stretch; }
.slOrder .btn{ flex: 1; }
.slZip{
  width: 96px; padding: 11px 12px; border: 1.5px solid var(--card-line, rgba(29,39,51,.14)); border-radius: 12px;
  font-size: 15px; font-weight: 800; text-align: center; letter-spacing: .08em;
}
.slOrderNote{ margin-top: 10px; }

/* ---- Kroger priced cart ---- */
.krResult{ margin-top: 14px; }
.krCard{ border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.krBanner{ background: #fff7ed; color: #9a3412; font-size: 12px; font-weight: 800; padding: 8px 12px; }
.krHead{
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 14px; background: #faf9f6; border-bottom: 1px solid var(--line);
}
.krStore{ font-weight: 900; font-size: 14px; }
.krTotal{ font-weight: 900; font-size: 20px; color: var(--brand); }
.krTotal span{ font-size: 11px; font-weight: 700; color: var(--muted); margin-left: 4px; }
.krRows{ display: flex; flex-direction: column; }
.krRow{
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.krRow:last-child{ border-bottom: 0; }
.krImg{ width: 40px; height: 40px; border-radius: 8px; object-fit: cover; flex: 0 0 auto; background: #eef0f1; }
.krImgPh{ display: inline-block; }
.krName{ flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.krName b{ font-size: 13px; font-weight: 800; line-height: 1.25; }
.krName small{ color: var(--muted); font-size: 11px; font-weight: 700; }
.krPrice{ font-weight: 900; font-size: 14px; white-space: nowrap; }
.krMiss .krName b, .krMiss .krName{ color: var(--muted); }
.krNoMatch{ font-size: 11px; font-weight: 800; color: #b45309; }
.krUnmatched{ padding: 10px 14px; border-top: 1px solid var(--line); }
.krFoot{ padding: 10px 14px; border-top: 1px solid var(--line); background: #faf9f6; }
.krModality{ display: flex; align-items: center; gap: 10px; padding: 12px 14px 0; border-top: 1px solid var(--line); }
.krModality + .krActions{ border-top: 0; }
.krModLabel{ font-size: 12.5px; font-weight: 800; color: var(--muted); }
.krModSeg{ display: inline-flex; background: #ece9e3; border-radius: 999px; padding: 3px; }
.krMod{ appearance: none; border: 0; cursor: pointer; font: inherit; font-size: 13px; font-weight: 800; color: var(--muted); background: transparent; padding: 6px 16px; border-radius: 999px; transition: all .15s ease; }
.krMod.on{ background: #fff; color: var(--brand); box-shadow: 0 1px 4px rgba(29,39,51,.12); }
.krActions{ display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--line); background: #faf9f6; }
.krBtn{ flex: 1; }
.krLink{ appearance: none; background: none; border: 0; cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 800; color: var(--muted); text-decoration: underline; }
.krCartMsg{ padding: 0 14px 12px; }
.krCartMsg:empty{ display: none; }
.krCartMsg a{ color: var(--brand); font-weight: 800; }

/* ---- Pantry ---- */
.slHeadBtns{ display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.slPantryBtn{
  appearance: none; cursor: pointer;
  border: 1.5px solid var(--card-line, rgba(29,39,51,.14)); background: var(--card,#fff); color: #1d2733;
  font-size: 13px; font-weight: 800; padding: 9px 14px; border-radius: 999px;
}
.pantryOverlay{
  position: fixed; inset: 0; z-index: 65; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(17,24,39,.45); opacity: 0; transition: opacity .18s ease;
}
.pantryOverlay.open{ opacity: 1; }
.pantrySheet{
  width: 100%; max-width: 480px; max-height: 88vh; display: flex; flex-direction: column;
  background: var(--card,#fff); border-radius: 24px 24px 0 0;
  transform: translateY(16px); transition: transform .2s cubic-bezier(.22,.7,.3,1);
}
.pantryOverlay.open .pantrySheet{ transform: none; }
@media (min-width:540px){ .pantryOverlay{ align-items:center; } .pantrySheet{ border-radius:24px; } }
.pantryGrip{ width: 38px; height: 4px; border-radius: 99px; background: #d8d4cc; margin: 10px auto 4px; }
.pantryHead{ display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 8px 20px 12px; border-bottom: 1px solid var(--card-line, rgba(29,39,51,.07)); }
.pantryTitle{ font-family: var(--font-display, Georgia, serif); font-weight: 600; font-size: 22px; color: #1d2733; }
.pantrySub{ margin-top: 4px; font-size: 13px; font-weight: 600; color: var(--ink-soft,#5b6675); }
.pantryClose{ width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer; background: #f0eee8; font-size: 22px; line-height: 1; color: #1d2733; flex: 0 0 auto; }
.pantryBody{ overflow-y: auto; padding: 16px 20px; display: grid; gap: 18px; }
.pantryGroup{ display: grid; gap: 10px; }
.pantryGroupHead{ font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-soft,#5b6675); }
.pantryChips{ display: flex; flex-wrap: wrap; gap: 8px; }
.pantryChip{
  appearance: none; cursor: pointer; border: 1.5px solid var(--card-line, rgba(29,39,51,.14)); background: #fff; color: #1d2733;
  font-size: 13px; font-weight: 700; padding: 8px 13px; border-radius: 999px; transition: background .12s, color .12s, border-color .12s;
}
.pantryChip.on{ background: linear-gradient(135deg, var(--brand), var(--brand2)); border-color: transparent; color: #fff; }
.pantryChip.on::before{ content: "✓ "; }
.pantryAddRow{ display: flex; gap: 8px; }
.pantryAddInput{ flex: 1; padding: 10px 12px; border: 1.5px solid var(--card-line, rgba(29,39,51,.14)); border-radius: 12px; font-size: 14px; font-weight: 600; }
.pantryPills{ display: flex; flex-wrap: wrap; gap: 8px; }
.pantryPill{ display: inline-flex; align-items: center; gap: 6px; background: rgba(42,166,160,.12); color: var(--brand); font-size: 13px; font-weight: 700; padding: 6px 6px 6px 12px; border-radius: 999px; }
.pantryPillX{ border: 0; background: rgba(42,166,160,.2); color: var(--brand); width: 20px; height: 20px; border-radius: 50%; cursor: pointer; font-size: 14px; line-height: 1; }
.pantryFoot{ padding: 14px 20px max(14px, env(safe-area-inset-bottom)); border-top: 1px solid var(--card-line, rgba(29,39,51,.07)); }
.pantrySave, .pantryAddBtn{ background: linear-gradient(135deg, var(--brand), var(--brand2)); color: #fff; border: 0; }
.pantrySave{ width: 100%; }
