/* =========================================================================
   MEAL PLANNER — Week, Groceries, Recipes, Profile + overlays
   ========================================================================= */

/* household badge in groceries header */
.groc-hs-badge {
  display: inline-flex; align-items: center; gap: 3px;
  margin-left: 8px; padding: 1px 7px;
  background: var(--brand-1, #e8f3ed); color: var(--brand);
  border-radius: 8px; font-size: var(--fs-11); font-weight: 700;
}

/* ---------------------------------------------------------------- overlay / sheet / dialog */
.ov {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(33,30,26,0.42);
  display: flex;
}
.app--mobile  .ov { align-items: flex-end; justify-content: center; }
.app--desktop .ov { align-items: center; justify-content: center; }

.sheet {
  background: var(--surface); position: relative;
  display: flex; flex-direction: column; max-height: 92%;
  box-shadow: var(--sh-pop);
}
.app--mobile .sheet {
  width: 100%; border-radius: var(--r-4) var(--r-4) 0 0;
  animation: sheet-up .26s cubic-bezier(.2,.8,.2,1);
}
.app--desktop .sheet {
  width: 540px; max-width: 92%; border-radius: var(--r-4);
  animation: dialog-in .2s cubic-bezier(.2,.8,.2,1);
}
.sheet--wide.app, .app--desktop .sheet--wide { width: 680px; }
@keyframes sheet-up { from { transform: translateY(36px); } to { transform: translateY(0); } }
@keyframes dialog-in { from { transform: scale(.975); } to { transform: scale(1); } }

.sheet__grip { width: 40px; height: 4px; border-radius: 999px; background: var(--line-2); margin: 10px auto 0; flex-shrink: 0; }
.app--desktop .sheet__grip { display: none; }
.sheet__head {
  display: flex; align-items: center; gap: 12px; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--line); flex-shrink: 0;
}
.sheet__head-l { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sheet__eyebrow { font-size: var(--fs-11); font-weight: 800; letter-spacing: var(--tr-caps); text-transform: uppercase; color: var(--c, var(--ink-3)); }
.sheet__title { font-family: var(--ff-display); font-weight: 800; font-size: var(--fs-22); letter-spacing: var(--tr-tight); line-height: 1.1; margin-top: 2px; }
.sheet__close { appearance: none; border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); flex-shrink: 0; }
.sheet__close:hover { background: var(--paper-2); }
.sheet__body { padding: 18px 20px; overflow-y: auto; }
.sheet__foot { padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: flex; gap: 10px; flex-shrink: 0; }

/* action list inside sheet */
.actionlist { display: flex; flex-direction: column; gap: 4px; }
.actionrow {
  appearance: none; cursor: pointer; width: 100%; text-align: left;
  display: flex; align-items: center; gap: 13px;
  padding: 13px 12px; border-radius: var(--r-2); border: 0; background: none;
  font-family: var(--ff-body); font-size: var(--fs-15); font-weight: 600; color: var(--ink);
  transition: background .12s;
}
.actionrow:hover { background: var(--paper-2); }
.actionrow svg { width: 20px; height: 20px; color: var(--ink-3); }
.actionrow--danger { color: var(--danger); }
.actionrow--danger svg { color: var(--danger); }
.actionrow small { color: var(--ink-3); font-weight: 500; font-size: var(--fs-12); display: block; }
.actionrow__txt { flex: 1; min-width: 0; }

/* stepper */
.stepper { display: inline-flex; align-items: center; gap: 0; border: 1px solid var(--line-2); border-radius: var(--r-2); overflow: hidden; }
.stepper button { appearance: none; cursor: pointer; border: 0; background: var(--surface); width: 40px; height: 40px; display: grid; place-items: center; color: var(--ink); font-size: 20px; }
.stepper button:hover { background: var(--paper-2); }
.stepper button[disabled] { opacity: .35; cursor: not-allowed; }
.stepper__val { min-width: 52px; text-align: center; font-family: var(--ff-display); font-weight: 700; font-size: var(--fs-18); font-variant-numeric: tabular-nums; }
.stepper__input { width: 64px; border: 0; background: none; text-align: center; font-family: var(--ff-display); font-weight: 700; font-size: var(--fs-18); font-variant-numeric: tabular-nums; color: var(--ink); outline: none; padding: 0; -moz-appearance: textfield; }
.stepper__input:focus { background: var(--brand-soft); }

/* ---------------------------------------------------------------- recipe picker (in sheet) */
.picker__search { position: relative; margin-bottom: 12px; }
.picker__search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--ink-3); }
.input {
  width: 100%; font-family: var(--ff-body); font-size: var(--fs-15);
  padding: 12px 14px; border-radius: var(--r-2); border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink); outline: none; transition: border-color .14s, box-shadow .14s;
}
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.picker__search .input { padding-left: 40px; }
textarea.input { resize: vertical; line-height: 1.5; font-size: var(--fs-13); }

/* non-recipe meal options */
.optbtn { appearance: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: var(--r-2); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-family: var(--ff-body); font-weight: 600; font-size: var(--fs-14); transition: all .13s; }
.optbtn:hover { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); }
.optbtn svg { width: 17px; height: 17px; color: var(--ink-3); }
.optbtn:hover svg { color: var(--brand); }

.picker__list { display: flex; flex-direction: column; gap: 8px; max-height: 52vh; overflow-y: auto; margin: 0 -4px; padding: 2px 4px 4px; }
.prow {
  appearance: none; cursor: pointer; text-align: left; width: 100%; flex-shrink: 0;
  display: grid; grid-template-columns: 5px 1fr auto; align-items: stretch;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2);
  overflow: hidden; transition: border-color .12s, box-shadow .12s;
}
.prow:hover { border-color: var(--c, var(--ink-4)); box-shadow: var(--sh-1); }
.prow__spine { background: var(--c); }
.prow__body { padding: 13px 15px; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 3px; }
.prow__name { font-family: var(--ff-display); font-weight: 700; font-size: var(--fs-16); line-height: 1.15; }
.prow__meta { font-size: var(--fs-13); color: var(--ink-3); margin-top: 1px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.prow__meta b { font-family: var(--ff-display); color: var(--ink-2); }
.prow__kcal { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 16px; border-left: 1px solid var(--line); }
.prow__kcal b { font-family: var(--ff-display); font-weight: 800; font-size: var(--fs-20); line-height: 1; }
.prow__kcal span { font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }

/* ---------------------------------------------------------------- WEEK screen */
.weekbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.weekbar__spacer { flex: 1; }

/* week navigator */
.weeknav { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.weeknav__btn { appearance: none; cursor: pointer; width: 38px; height: 38px; border-radius: var(--r-2); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); display: grid; place-items: center; transition: all .13s; }
.weeknav__btn:hover { background: var(--paper-2); color: var(--ink); border-color: var(--ink-4); }
.weeknav__label { min-width: 124px; text-align: center; cursor: default; padding: 4px 10px; border-radius: var(--r-2); line-height: 1.1; }
.weeknav__label[data-now="0"] { cursor: pointer; }
.weeknav__label[data-now="0"]:hover { background: var(--paper-2); }
.weeknav__rel { display: block; font-family: var(--ff-display); font-weight: 700; font-size: var(--fs-15); }
.weeknav__label[data-now="1"] .weeknav__rel { color: var(--brand); }
.weeknav__back { display: block; font-size: 11px; font-weight: 700; color: var(--brand); letter-spacing: .02em; }
.weeknav__sub { display: block; font-size: 11px; font-weight: 600; color: var(--ink-3); }
.app--mobile .weeknav__label { min-width: 0; flex-shrink: 1; }
.app--mobile .weeknav { gap: 5px; flex-wrap: nowrap; justify-content: flex-end; width: 100%; }
.app--mobile .weeknav__rel { font-size: var(--fs-14); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app--mobile .weeknav__back, .app--mobile .weeknav__sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app--mobile .weeknav__btn { width: 34px; height: 34px; flex-shrink: 0; }
.app--mobile .weeknav .snacktoggle { flex-shrink: 0; }
/* Deel: in the title row on mobile, in the weeknav on desktop */
.sharetrigger--inline { display: none; }
.app--desktop .sharetrigger--inline { display: none; }
.shead__lead { display: flex; align-items: flex-start; gap: 12px; }
.app--desktop .shead__lead { align-items: center; }
.app--mobile .shead__lead { width: 100%; align-items: center; justify-content: space-between; gap: 10px; }
.app--mobile .sharetrigger--inline { display: inline-flex; align-self: center; }
.app--mobile .sharetrigger--nav { display: none; }
.app--mobile .sharetrigger { padding: 8px; gap: 0; }
.app--mobile .sharetrigger span { display: none; }
.app--mobile .shead { flex-wrap: wrap; gap: 12px; }
/* Snacks toggle: in the nav (arrow) row on both, left-aligned within that row on mobile */
.snacktoggle.snacktoggle--lead { display: none; }
.snacktoggle.snacktoggle--navmob { display: inline-flex; }
.app--mobile .snacktoggle--navmob { margin-right: auto; }

/* desktop matrix — columns = days (7), rows = meal types (6) */
.matrix { width: 100%; border: 1px solid var(--line); border-radius: var(--r-3); overflow: hidden; background: var(--surface); box-shadow: var(--sh-1); }
.matrix__row { display: grid; grid-template-columns: 104px repeat(7, minmax(0, 1fr)); }
.matrix__row + .matrix__row { border-top: 1px solid var(--line); }
.matrix__corner { padding: 10px; background: var(--paper-2); border-right: 1px solid var(--line); display: flex; align-items: center; }
.matrix__corner span { font-size: var(--fs-11); font-weight: 800; letter-spacing: var(--tr-caps); text-transform: uppercase; color: var(--ink-3); }
.matrix__dayhead {
  border-right: 1px solid var(--line); background: var(--paper-2);
  padding: 8px 6px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1px;
}
.matrix__dayhead:last-child { border-right: 0; }
.matrix__dayhead[data-today="1"] { background: var(--brand-soft); }
.matrix__dayhead-dow { font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.matrix__dayhead[data-today="1"] .matrix__dayhead-dow { color: var(--brand); }
.matrix__dayhead-day { font-family: var(--ff-display); font-weight: 800; font-size: var(--fs-20); line-height: 1; }
.matrix__dayhead-kcal { font-size: 10px; font-weight: 700; color: var(--ink-3); margin-top: 2px; font-variant-numeric: tabular-nums; }
.matrix__dayhead-kcal[data-over="1"] { color: var(--danger); }
.matrix__mealhead {
  border-right: 1px solid var(--line); background: var(--surface-2);
  padding: 8px 10px; display: flex; align-items: center; gap: 8px;
}
.matrix__mealhead .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex-shrink: 0; }
.matrix__mealhead-name { font-size: var(--fs-12); font-weight: 800; letter-spacing: .02em; text-transform: uppercase; color: var(--ink-2); line-height: 1.05; }

.mcell { border-right: 1px solid var(--line); padding: 5px; height: 92px; position: relative; min-width: 0; }
.mcell:last-child { border-right: 0; }
.mcell__card {
  height: 100%; cursor: pointer; border-radius: var(--r-1); padding: 8px 9px;
  background: var(--c-soft); border-left: 3px solid var(--c);
  display: flex; flex-direction: column; gap: 2px; transition: transform .08s, box-shadow .12s; overflow: hidden;
}
.mcell__card:hover { box-shadow: var(--sh-2); }
.mcell__card[data-eaten="1"] { opacity: .62; }
.mcell__name { font-family: var(--ff-display); font-weight: 700; font-size: var(--fs-14); line-height: 1.12; color: var(--c-ink); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mcell__sub { font-size: 11px; font-weight: 700; color: var(--c); margin-top: auto; display: flex; align-items: center; gap: 4px; }
.mcell__note { font-size: 10px; font-weight: 500; color: var(--ink-3); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-style: italic; }
.mcell__empty { height: 100%; cursor: pointer; border: 1px dashed var(--line-2); border-radius: var(--r-1); display: grid; place-items: center; color: var(--ink-4); background: var(--surface-2); transition: all .12s; }
.mcell__empty:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.mcell__empty svg { width: 16px; height: 16px; }
/* drag states */
.mcell__card[draggable="true"] { -webkit-user-drag: element; }
.mcell.dragover { background: var(--brand-soft); }
.mcell__card.dragging { opacity: .4; }

/* mobile week: day cards */
.weekdays { display: flex; flex-direction: column; gap: 14px; }
.wday { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3); box-shadow: var(--sh-1); overflow: hidden; }
.wday__head { display: flex; align-items: center; gap: 11px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.wday__head[data-today="1"] { background: var(--brand-soft); }
.wday__date { font-family: var(--ff-display); font-weight: 800; font-size: var(--fs-22); line-height: 1; }
.wday__dow { font-size: var(--fs-12); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.wday__kcal { margin-left: auto; text-align: right; }
.wday__kcal b { font-family: var(--ff-display); font-weight: 700; font-size: var(--fs-16); font-variant-numeric: tabular-nums; }
.wday__kcal b[data-over="1"] { color: var(--danger); }
.wday__kcal span { font-size: 10px; font-weight: 700; text-transform: uppercase; color: var(--ink-3); display: block; }
.wday__bar { height: 4px; background: var(--paper-2); position: relative; }
.wday__bar-fill { position: absolute; inset: 0 auto 0 0; background: var(--brand); }
.wday__bar-fill[data-over="1"] { background: var(--danger); }
.wday__slots { display: flex; flex-direction: column; }
.wslot { display: grid; grid-template-columns: 5px 70px 1fr auto; align-items: center; gap: 10px; padding: 9px 14px 9px 0; cursor: pointer; }
.wslot[data-empty="1"] { padding-top: 13px; padding-bottom: 13px; }
.wslot + .wslot { border-top: 1px solid var(--line); }
.wslot__spine { align-self: stretch; background: var(--c); }
.wslot__meal { font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--c-ink); }
.wslot__name { font-family: var(--ff-display); font-weight: 700; font-size: var(--fs-14); line-height: 1.1; min-width: 0; }
.wslot__name.empty { color: var(--ink-4); font-family: var(--ff-body); font-weight: 600; padding: 0; text-align: left; }
.wslot__note { font-size: 11px; font-weight: 500; color: var(--ink-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-style: italic; }
.wslot__kcal { font-size: var(--fs-12); color: var(--ink-3); font-weight: 600; padding-right: 14px; font-variant-numeric: tabular-nums; }

/* week summary banner */
.weeksum { display: grid; gap: 12px; margin-bottom: 18px; }
.app--desktop .weeksum { grid-template-columns: repeat(3, 1fr); }
.app--mobile .weeksum { grid-template-columns: 1fr 1fr; }
.sumcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3); padding: 14px 16px; box-shadow: var(--sh-1); }
.sumcard__lbl { font-size: var(--fs-11); font-weight: 800; letter-spacing: var(--tr-caps); text-transform: uppercase; color: var(--ink-3); }
.sumcard__val { font-family: var(--ff-display); font-weight: 800; font-size: var(--fs-28); line-height: 1; margin-top: 6px; font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: 6px; }
.sumcard__val small { font-size: var(--fs-14); color: var(--ink-3); font-weight: 700; }
.sumcard__val[data-over="1"] { color: var(--danger); }
.sumcard__bar { height: 5px; background: var(--paper-2); border-radius: 999px; margin-top: 9px; overflow: hidden; }
.sumcard__bar-fill { height: 100%; background: var(--brand); border-radius: 999px; }
.sumcard__bar-fill[data-over="1"] { background: var(--danger); }
.sumcard--span { grid-column: 1 / -1; }

/* Onboarding banner */
.onboarding-banner { background: linear-gradient(100deg, var(--brand-soft), #eef4ec); border: 1px solid #cfe2d4; border-radius: var(--r-3); padding: 18px 18px 16px; margin-bottom: 18px; position: relative; }
.onboarding-banner__close { position: absolute; top: 10px; right: 10px; background: none; border: none; cursor: pointer; color: var(--ink-3); padding: 4px; line-height: 1; }
.onboarding-banner__title { display: flex; align-items: center; gap: 6px; font-size: var(--fs-16); font-weight: 700; color: var(--brand); margin-bottom: 14px; }
.onboarding-banner__steps { display: flex; flex-direction: column; gap: 10px; }
.onboarding-step { display: flex; align-items: flex-start; gap: 12px; font-size: var(--fs-14); color: var(--ink-2); }
.onboarding-step__num { width: 22px; height: 22px; min-width: 22px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; margin-top: 1px; }

/* AI suggest banner */
.aibar {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px; margin-bottom: 18px;
  background: linear-gradient(100deg, var(--brand-soft), #eef4ec);
  border: 1px solid #cfe2d4; border-radius: var(--r-3);
}
.aibar__icon { width: 40px; height: 40px; border-radius: 11px; background: var(--brand); color: #fff; display: grid; place-items: center; flex-shrink: 0; box-shadow: var(--sh-1); }
.aibar__txt { flex: 1; min-width: 0; }
.aibar__title { font-family: var(--ff-display); font-weight: 800; font-size: var(--fs-16); }
.aibar__sub { font-size: var(--fs-13); color: var(--ink-2); }
/* compact AI banner on mobile */
.app--mobile .aibar { padding: 10px 12px; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.app--mobile .aibar__icon { display: none; }
.app--mobile .aibar__sub { display: none; }
.app--mobile .aibar__title { font-size: var(--fs-14); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app--mobile .aibar .btn { padding: 9px; font-size: var(--fs-13); }
.app--mobile .aibar__btnlbl { display: none; }

/* snack toggle pill */
.snacktoggle { appearance: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-3); font-family: var(--ff-body); font-weight: 700; font-size: var(--fs-13); white-space: nowrap; transition: all .13s; flex-shrink: 0; }
.snacktoggle[data-on="1"] { background: var(--brand-soft); border-color: transparent; color: var(--brand-ink); }
.snacktoggle svg { width: 14px; height: 14px; }
.snacktoggle:hover { border-color: var(--ink-4); }

/* ---- combined snacks editor (3 snack plekken) ---- */
.snacksum {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 14px; margin-bottom: 14px;
  background: var(--paper-2); border-radius: var(--r-2);
}
.snacksum__l { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.snacksum__count { font-family: var(--ff-display); font-weight: 800; font-size: var(--fs-18); color: var(--ink); line-height: 1; }
.snacksum__lbl { font-size: var(--fs-12); font-weight: 600; color: var(--ink-3); }
.snacksum__kcal { display: flex; align-items: baseline; gap: 4px; flex-shrink: 0; }
.snacksum__kcal b { font-family: var(--ff-display); font-weight: 800; font-size: var(--fs-18); line-height: 1; }
.snacksum__kcal span { font-size: 9px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); }

.snacklist { display: flex; flex-direction: column; gap: 10px; }
.snackrow {
  text-align: left; width: 100%; font-family: var(--ff-body);
  display: grid; grid-template-columns: 6px auto 1fr auto; align-items: stretch; min-height: 70px;
  background: var(--c-soft, var(--surface)); border: 1px solid transparent; border-radius: var(--r-2);
  overflow: hidden; transition: box-shadow .13s, filter .13s;
}
.snackrow:hover { box-shadow: var(--sh-2); }
.snackrow__spine { background: var(--c); }
.snackrow[data-filled="0"] { background: var(--paper-2); border-color: var(--line); }
.snackrow[data-filled="0"] .snackrow__spine { background: var(--line-2); }
/* tap-to-eat checkbox */
.snackrow__check {
  appearance: none; cursor: pointer; align-self: center; margin-left: 13px;
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid var(--c, var(--ink-4)); background: var(--surface); color: #fff;
  display: grid; place-items: center; transition: background .12s, border-color .12s, transform .08s;
}
.snackrow__check:hover { transform: scale(1.08); }
.snackrow[data-eaten="1"] .snackrow__check { background: var(--ok); border-color: var(--ok); }
.snackrow__main { appearance: none; cursor: pointer; background: none; border: none; font-family: var(--ff-body); text-align: left; padding: 11px 4px 11px 12px; min-width: 0; display: flex; flex-direction: column; gap: 3px; justify-content: center; }
.snackrow__name {
  font-family: var(--ff-display); font-weight: 700; font-size: var(--fs-16); line-height: 1.2; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.snackrow__meta { font-size: var(--fs-12); font-weight: 600; color: var(--c-ink, var(--ink-3)); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; opacity: .85; }
.snackrow__eaten { display: inline-flex; align-items: center; gap: 3px; font-weight: 800; color: var(--ok); padding: 1px 7px; border-radius: var(--r-pill); background: var(--surface); opacity: 1; }
.snackrow__empty { font-size: var(--fs-13); font-weight: 500; color: var(--ink-3); }
.snackrow__right { display: flex; align-items: center; gap: 3px; padding: 0 10px 0 4px; }
.snackrow__kcal {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 50px; padding: 4px 7px; border-radius: var(--r-1); background: var(--surface);
}
.snackrow__kcal b { font-family: var(--ff-display); font-weight: 800; font-size: var(--fs-16); line-height: 1; color: var(--c-ink, var(--ink)); }
.snackrow__kcal span { font-size: 8px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-top: 2px; }
.snackrow__icon { appearance: none; cursor: pointer; width: 32px; height: 32px; border-radius: 50%; border: none; background: none; color: var(--c-ink, var(--ink-3)); display: grid; place-items: center; flex-shrink: 0; transition: background .12s, color .12s; }
.snackrow__icon:hover { background: var(--surface); }
.snackrow__icon--danger:hover { background: var(--danger-soft, #f7e2e0); color: var(--danger); }
.snackrow__add { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: var(--surface); color: var(--brand); border: 1px solid var(--line-2); }
.snackrow[data-eaten="1"] { filter: saturate(.75); }
.snackrow[data-eaten="1"] .snackrow__name { opacity: .68; text-decoration: line-through; text-decoration-color: var(--ink-4); }

.snackhint { font-size: var(--fs-12); color: var(--ink-3); margin-top: 14px; text-align: center; line-height: 1.45; }

.snackempty { text-align: center; padding: 26px 16px 22px; border: 1.5px dashed var(--line-2); border-radius: var(--r-3); background: var(--surface-2); }
.snackempty__icon { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 12px; background: var(--sage-soft); color: var(--sage-ink); }
.snackempty__t { font-family: var(--ff-display); font-weight: 800; font-size: var(--fs-18); }
.snackempty__s { font-size: var(--fs-13); color: var(--ink-3); margin-top: 5px; line-height: 1.5; max-width: 320px; margin-left: auto; margin-right: auto; }

/* error boundary — shown instead of a blank screen */
.errbound { min-height: 100%; display: grid; place-items: center; padding: 32px 20px; background: var(--paper); }
.errbound__card { max-width: 340px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-4); padding: 28px 24px; box-shadow: var(--sh-2); }
.errbound__icon { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 14px; background: var(--brand-soft); color: var(--brand); }
.errbound__card h2 { font-family: var(--ff-display); font-weight: 800; font-size: var(--fs-22); margin: 0 0 6px; }
.errbound__card p { font-size: var(--fs-14); color: var(--ink-3); line-height: 1.5; margin: 0 0 18px; }
.errbound__reset { display: block; margin: 12px auto 0; background: none; border: none; color: var(--ink-3); font-size: var(--fs-13); font-weight: 600; text-decoration: underline; cursor: pointer; }

/* fruit quick-pick in the snack add sheet */
.fruitpick { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.fruitpick__note { display: flex; align-items: flex-start; gap: 8px; font-size: var(--fs-12); color: var(--ink-2); background: var(--sage-soft); border-radius: var(--r-2); padding: 9px 12px; margin-bottom: 12px; line-height: 1.4; }
.fruitpick__note svg { flex-shrink: 0; color: var(--sage-ink); margin-top: 1px; }
.fruitpick__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; }
.fruitchip { appearance: none; cursor: pointer; text-align: left; display: flex; align-items: center; gap: 9px; padding: 9px 11px; border-radius: var(--r-2); border: 1px solid var(--line-2); background: var(--surface); transition: border-color .12s, background .12s; }
.fruitchip:hover:not(:disabled) { border-color: var(--sage); background: var(--sage-soft); }
.fruitchip:disabled { opacity: .45; cursor: not-allowed; }
.fruitchip__dot { width: 22px; height: 22px; border-radius: 50%; background: var(--sage-soft); color: var(--sage-ink); display: grid; place-items: center; flex-shrink: 0; font-size: 12px; }
.fruitchip__t { min-width: 0; }
.fruitchip__name { font-weight: 700; font-size: var(--fs-13); line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fruitchip__amt { font-size: var(--fs-11); color: var(--ink-3); font-weight: 600; }
.fruitcount { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 13px; border-radius: var(--r-2); background: var(--paper-2); margin-bottom: 12px; font-size: var(--fs-13); }
.fruitcount[data-full="1"] { background: var(--warn-soft); }
.fruitcount__c { font-family: var(--ff-display); font-weight: 800; }

/* profile food-limit cards */
.limitgrid { display: flex; flex-direction: column; }
.limithead { display: grid; grid-template-columns: 1fr 116px 116px; gap: 12px; align-items: end; padding-bottom: 8px; }
.limithead span { font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); text-align: center; }
.limithead span:first-child { text-align: left; }
.limitrow { display: grid; grid-template-columns: 1fr 116px 116px; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.limitrow__l { min-width: 0; }
.limitrow__name { font-weight: 700; font-size: var(--fs-15); display: flex; align-items: center; gap: 8px; }
.limitrow__name .dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.limitrow__hint { font-size: var(--fs-12); color: var(--ink-3); margin-top: 3px; }
.limitrow__hint b { color: var(--ink-2); }
.limitrow__hint b[data-over="1"] { color: var(--danger); }
.limitctl { display: flex; justify-content: center; }

/* shop-order (winkelvolgorde) reorderable list */
.shoporder { display: flex; flex-direction: column; gap: 6px; }
.shoprow { display: flex; align-items: center; gap: 10px; padding: 9px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2); cursor: grab; transition: border-color .12s, background .12s, box-shadow .12s; }
.shoprow:hover { border-color: var(--line-2); }
.shoprow--drag { opacity: .5; cursor: grabbing; }
.shoprow--over { border-color: var(--brand); box-shadow: 0 -2px 0 var(--brand) inset; background: var(--brand-soft); }
.shoprow__num { width: 22px; height: 22px; flex-shrink: 0; display: grid; place-items: center; font-family: var(--ff-display); font-weight: 800; font-size: var(--fs-12); color: var(--ink-3); background: var(--paper-2); border-radius: var(--r-pill); }
.shoprow__grip { color: var(--ink-4); display: flex; flex-shrink: 0; }
.shoprow__name { flex: 1; min-width: 0; font-weight: 700; font-size: var(--fs-15); }
.shoprow__arrows { display: flex; gap: 2px; flex-shrink: 0; }
.shoprow__arrow { appearance: none; cursor: pointer; width: 30px; height: 30px; border-radius: var(--r-1); border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); display: grid; place-items: center; transition: background .12s, color .12s; }
.shoprow__arrow:hover:not(:disabled) { background: var(--brand-soft); color: var(--brand); border-color: var(--brand); }
.shoprow__arrow:disabled { opacity: .3; cursor: not-allowed; }

/* weekly limits bar under the week schedule */
.weeklimits { margin-top: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3); padding: 13px 16px; box-shadow: var(--sh-1); }
.weeklimits__lbl { display: flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 800; letter-spacing: var(--tr-caps); text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; }
.weeklimits__lbl svg { color: var(--ink-4); }
.weeklimits__row { display: flex; flex-wrap: wrap; gap: 8px; }
.wlimit { display: flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: var(--r-pill); background: var(--paper-2); font-size: var(--fs-13); font-weight: 600; }
.wlimit__dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.wlimit__name { color: var(--ink-2); }
.wlimit__val { font-family: var(--ff-display); font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.wlimit__max { color: var(--ink-3); font-weight: 700; }
.wlimit[data-near="1"] { background: var(--honey-soft); }
.wlimit[data-near="1"] .wlimit__val { color: var(--honey-ink); }
.wlimit[data-over="1"] { background: var(--danger-soft, #f7e2e0); }
.wlimit[data-over="1"] .wlimit__val, .wlimit[data-over="1"] .wlimit__max, .wlimit[data-over="1"] .wlimit__name { color: var(--danger); }

/* cook-double toggle in the dinner confirm step */
.cookdbl { width: 100%; margin-top: 16px; display: flex; align-items: center; gap: 11px; padding: 12px 14px; border-radius: var(--r-2); border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; text-align: left; font-family: var(--ff-body); transition: border-color .12s, background .12s; }
.cookdbl:hover { border-color: var(--brand); }
.cookdbl--on { border-color: var(--brand); background: var(--brand-soft); }
.cookdbl__check { width: 22px; height: 22px; border-radius: var(--r-1); border: 2px solid var(--ink-4); background: var(--surface); display: grid; place-items: center; color: #fff; flex-shrink: 0; }
.cookdbl--on .cookdbl__check { background: var(--brand); border-color: var(--brand); }
.cookdbl__txt { flex: 1; min-width: 0; }
.cookdbl__txt b { display: block; font-size: var(--fs-15); font-weight: 700; }
.cookdbl__txt small { display: block; font-size: var(--fs-12); color: var(--ink-3); line-height: 1.35; margin-top: 2px; }
.cookdbl > svg { color: var(--brand); flex-shrink: 0; }
/* leftover badge */
.leftover-badge { display: inline-flex; align-items: center; gap: 3px; font-size: 9px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--copper-ink); background: var(--copper-soft); padding: 1px 6px; border-radius: var(--r-pill); }

/* share sheet */
.sharebtns { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.sharebtn { flex: 1; min-width: 110px; appearance: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 16px 12px; border-radius: var(--r-3); border: 1px solid var(--line-2); background: var(--surface); font-family: var(--ff-body); font-weight: 700; font-size: var(--fs-13); color: var(--ink-2); transition: border-color .12s, background .12s, color .12s; }
.sharebtn:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.sharebtn--wa { color: #fff; background: #25D366; border-color: #25D366; }
.sharebtn--wa:hover { color: #fff; background: #1ebe5a; border-color: #1ebe5a; }
.sharepreview { white-space: pre-wrap; font-size: var(--fs-13); line-height: 1.5; color: var(--ink-2); background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r-2); padding: 14px 16px; max-height: 340px; overflow-y: auto; font-variant-numeric: tabular-nums; }
/* share trigger button in screen headers */
.sharetrigger { appearance: none; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--surface); font-family: var(--ff-body); font-weight: 700; font-size: var(--fs-13); color: var(--ink-2); transition: border-color .12s, background .12s, color .12s; flex-shrink: 0; }
.sharetrigger:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.weeklimits__note { font-size: var(--fs-12); color: var(--ink-3); margin-top: 10px; }

/* image picker */
.imgpick { position: relative; border-radius: var(--r-3); overflow: hidden; background: var(--paper-2); border: 1px solid var(--line); width: 100%; }
.imgpick__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.imgpick__drop { width: 100%; height: 100%; border: 1.5px dashed var(--line-2); background: var(--surface-2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--ink-3); border-radius: var(--r-3); text-align: center; padding: 12px; }
.imgpick__icon { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); margin-bottom: 4px; }
.imgpick__drop span { font-weight: 700; font-size: var(--fs-14); color: var(--ink-2); }
.imgpick__drop small { font-size: var(--fs-11); color: var(--ink-4); }
.imgpick__choices { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; justify-content: center; }
.imgpick__choice { appearance: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font-family: var(--ff-body); font-weight: 700; font-size: var(--fs-13); transition: background .12s, border-color .12s, color .12s; }
.imgpick__choice svg { width: 16px; height: 16px; }
.imgpick__choice:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.imgpick__choice--primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.imgpick__choice--primary:hover { background: var(--brand-ink); border-color: var(--brand-ink); color: #fff; }
.imgpick__actions { position: absolute; right: 10px; bottom: 10px; display: flex; gap: 8px; }
.imgpick__btn { appearance: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: var(--r-pill); border: 0; background: var(--ink); color: #fff; font-family: var(--ff-body); font-weight: 700; font-size: var(--fs-12); }
.imgpick__btn:hover { background: var(--ink-2); }
.imgpick__btn--del { background: var(--danger); padding: 7px 9px; }
.imgpick__btn--del:hover { filter: brightness(.92); }
.imgpick__btn svg { width: 14px; height: 14px; }

/* recipe hero image */
.rdetail__hero { border-radius: var(--r-3); overflow: hidden; border: 1px solid var(--line); }
.rdetail__hero img { width: 100%; height: 200px; object-fit: cover; display: block; }

/* recipe card photo header */
.reccard__photo { height: 132px; overflow: hidden; background: var(--paper-2); }
.reccard__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* sticky date + weekstrip on mobile Today */
.today { margin-top: 16px; }
.app--mobile .today__stickhead { position: sticky; top: 0; z-index: 6; background: var(--paper); margin: 0 -16px; padding: 0 16px 10px; box-shadow: 0 8px 10px -9px rgba(33,30,26,0.22); }
.app--mobile .today__stickhead .shead { padding: 14px 0 10px; }
.app--mobile .today__stickhead .weekstrip { margin-bottom: 0; }
.app--mobile .today { margin-top: 14px; }

/* compact mobile Today dashboard — ~half height so menu peeks through */
.dash--compact { padding: 14px 15px; }
.dash--compact .dash__eyebrow { margin-bottom: 6px; }
.dash--compact .dash__body { display: flex; align-items: center; gap: 12px; }
.dash--compact .dash__gaugewrap { padding: 0; flex-shrink: 0; gap: 5px; }
.dash--compact .statuspill { margin-top: 2px; font-size: 10px; padding: 3px 9px; }
.dash--compact .macros { flex-direction: column; align-items: center; gap: 7px; margin-top: 0; padding-top: 0; border-top: 0; flex: 1 1 auto; min-width: 0; }
.dash--compact .macros__legend { width: 100%; gap: 5px; }
.dash--compact .mleg { grid-template-columns: 10px 1fr auto; gap: 7px; font-size: var(--fs-12); }
.dash--compact .mleg__sw { width: 10px; height: 10px; }
/* smaller inner gauge text so it stays inside the arc on the compact gauge */
.dash--compact .gauge__unit { font-size: 8px; margin-top: 1px; }
.dash--compact .gauge__sub { font-size: 10px; margin-top: 1px; line-height: 1.15; }

/* swap mode banner */
.swapbar { display: flex; align-items: center; gap: 10px; padding: 11px 14px; background: var(--honey-soft); border: 1px solid #ecd7a6; border-radius: var(--r-2); margin-bottom: 14px; font-size: var(--fs-13); font-weight: 600; color: var(--honey-ink); }
.swapbar svg { width: 18px; height: 18px; }
.mcell__card.swapsel, .wslot.swapsel { outline: 2px solid var(--honey); outline-offset: -2px; }

/* ---------------------------------------------------------------- GROCERIES */
.groc { display: flex; flex-direction: column; gap: 18px; }
.app--desktop .groc { display: flex; flex-direction: column; gap: 20px; }
.app--desktop .groc--desktop { display: flex; flex-direction: column; }
/* horizontal add bar across the top */
.grocadd { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3); box-shadow: var(--sh-1); margin-bottom: 20px; }
.grocadd > svg { color: var(--ink-4); flex-shrink: 0; }
.grocadd__name { flex: 1 1 auto; }
.grocadd__cat { flex: 0 0 190px; }
.grocadd .btn { flex-shrink: 0; }
/* three-column aisle flow */
.aislewrap--cols { column-count: 3; column-gap: 18px; }
.aislewrap--cols .aisle { break-inside: avoid; -webkit-column-break-inside: avoid; margin-bottom: 18px; }
.aislewrap--cols .aisle + .aisle { margin-top: 0; }
@media (max-width: 1180px) { .aislewrap--cols { column-count: 2; } }
.groc__progress { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3); padding: 16px 18px; box-shadow: var(--sh-1); }
.app--desktop .groc__rail { position: sticky; top: 8px; display: flex; flex-direction: column; gap: 16px; }
.groc__progress-top { display: flex; align-items: baseline; justify-content: space-between; }
.groc__progress-num { font-family: var(--ff-display); font-weight: 800; font-size: var(--fs-28); line-height: 1; }
.groc__progress-num span { color: var(--ink-3); font-size: var(--fs-16); }
.groc__progress-bar { height: 8px; background: var(--paper-2); border-radius: 999px; margin-top: 12px; overflow: hidden; }
.groc__progress-fill { height: 100%; background: var(--brand); border-radius: 999px; transition: width .3s cubic-bezier(.2,.8,.2,1); }

.aisle { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3); box-shadow: var(--sh-1); overflow: hidden; }
.aisle + .aisle { margin-top: 14px; }
.aisle__head { display: flex; align-items: center; gap: 9px; padding: 11px 16px; background: var(--c-soft, var(--paper-2)); border-bottom: 1px solid var(--line); box-shadow: inset 4px 0 0 var(--c, transparent); }
.aisle__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--ink-4)); flex-shrink: 0; }
.aisle__name { font-family: var(--ff-display); font-weight: 800; font-size: var(--fs-15); letter-spacing: var(--tr-snug); text-transform: uppercase; color: var(--c-ink, var(--ink)); }
.aisle__count { margin-left: auto; font-size: var(--fs-12); font-weight: 700; color: var(--c-ink, var(--ink-3)); opacity: .75; }
.gitem { display: flex; align-items: center; gap: 12px; padding: 11px 16px; cursor: pointer; transition: background .1s; }
.gitem + .gitem { border-top: 1px solid var(--line); }
.gitem:hover { background: var(--surface-2); }
.gcheck { width: 24px; height: 24px; border-radius: var(--r-1); border: 1.5px solid var(--line-2); background: var(--surface); display: grid; place-items: center; color: #fff; flex-shrink: 0; transition: all .14s; }
.gitem[data-on="1"] { opacity: .55; }
.gitem[data-on="1"] .gcheck { background: var(--brand); border-color: var(--brand); }
.gitem[data-on="1"] .gitem__name { color: var(--ink-2); text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: var(--ink); }
.gitem[data-on="1"] .gitem__qty { text-decoration: line-through; text-decoration-thickness: 1px; }
.gcheck svg { width: 15px; height: 15px; opacity: 0; transition: opacity .12s; }
.gitem[data-on="1"] .gcheck svg { opacity: 1; }
.gitem__body { flex: 1; min-width: 0; }
.gitem__name { font-weight: 600; font-size: var(--fs-15); text-transform: capitalize; }
.gitem__sub { font-size: var(--fs-12); color: var(--ink-3); }
.gitem__qty { font-family: var(--ff-display); font-weight: 700; font-size: var(--fs-14); color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.gitem__manual { font-size: var(--fs-11); font-weight: 700; color: var(--honey-ink); background: var(--honey-soft); padding: 2px 7px; border-radius: var(--r-pill); }
.gitem__del { appearance: none; border: 0; background: none; cursor: pointer; color: var(--ink-4); padding: 4px; border-radius: var(--r-1); }
.gitem__del:hover { color: var(--danger); background: var(--danger-soft); }

/* mobile groceries: 2-column item grid for more density */
.app--mobile .aisle { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.app--mobile .aisle__head { grid-column: 1 / -1; }
.app--mobile .aisle > .gitem { padding: 8px 9px; gap: 7px; align-items: flex-start; min-width: 0; }
.app--mobile .aisle > .gitem + .gitem { border-top: 0; }
.app--mobile .aisle > .gitem { border-top: 1px solid var(--line); }
.app--mobile .aisle > .gitem:nth-child(odd) { border-left: 1px solid var(--line); }
.app--mobile .aisle .gcheck { width: 19px; height: 19px; flex-shrink: 0; }
.app--mobile .aisle .gcheck svg { width: 12px; height: 12px; }
.app--mobile .aisle .gitem__body { min-width: 0; }
.app--mobile .aisle .gitem__name { font-size: var(--fs-12); line-height: 1.2; overflow-wrap: anywhere; }
.app--mobile .aisle .gitem__sub { display: none; }
.app--mobile .aisle .gitem__manual { display: inline-block; margin-top: 2px; }
.app--mobile .aisle .gitem__qty { font-size: var(--fs-11); white-space: normal; }

/* ---------------------------------------------------------------- RECIPES */
/* ---- recipe type toggle bar (Gerechten / Snacks / Alles) ---- */
.rectypebar { display: flex; background: var(--paper-2); border-radius: 12px; padding: 4px; gap: 3px; margin-bottom: 14px; }
.rectype { flex: 1; padding: 8px 10px; border: none; border-radius: 9px; cursor: pointer; font-family: inherit; font-weight: 700; font-size: 13px; background: none; color: var(--ink-3); transition: background .15s, color .15s, box-shadow .15s; }
.rectype[data-active="1"] { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); }
.rectype:not([data-active="1"]):hover { color: var(--ink-2); background: var(--paper-3, rgba(0,0,0,.04)); }
.rectype--own { flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px; }

.recgrid { display: grid; gap: 14px; }
.app--desktop .recgrid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.app--mobile .recgrid { grid-template-columns: 1fr; }
/* recipe filter groups (wanneer + soort) */
.recfilters { display: flex; flex-direction: column; gap: 9px; margin-bottom: 20px; }
.recfilters__group { display: flex; align-items: flex-start; gap: 10px; }
.recfilters__lbl { flex-shrink: 0; width: 62px; padding-top: 8px; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.recfilters__cnt { font-size: 9px; font-weight: 800; letter-spacing: .04em; color: var(--brand); }
.chiprow { display: flex; gap: 7px; flex-wrap: wrap; flex: 1; min-width: 0; }
.chiprow--split { flex-wrap: nowrap; align-items: flex-start; }
.chipsub { display: flex; gap: 7px; flex-wrap: wrap; flex: 1; min-width: 0; }
/* mobile: filters as dropdowns to save space */
.recfilters--drop { display: none; }
.app--mobile .recfilters--drop { display: flex; gap: 10px; margin-bottom: 18px; }
.app--mobile .recfilters:not(.recfilters--drop) { display: none; }
.dropfield { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.dropfield > span { font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.dropfield select.input { width: 100%; }
/* mobile: Filters button → bottom sheet */
.filterbar { display: none; }
.app--mobile .filterbar { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.filterbtn { appearance: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; padding: 11px 16px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--surface); font-family: var(--ff-body); font-weight: 700; font-size: var(--fs-14); color: var(--ink-2); }
.filterbtn[data-active="1"] { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.filterbtn__badge { display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; border-radius: var(--r-pill); background: var(--brand); color: #fff; font-size: var(--fs-11); font-weight: 800; }
.filterclear { appearance: none; cursor: pointer; background: none; border: 0; color: var(--ink-3); font-family: var(--ff-body); font-weight: 700; font-size: var(--fs-13); text-decoration: underline; }
.app--mobile .recfilters__group { flex-direction: column; gap: 5px; }
.app--mobile .recfilters__lbl { width: auto; padding-top: 0; }

/* manual category editor in the recipe detail */
.cateditor { padding-top: 4px; }
.cateditor__reset { appearance: none; border: 0; background: none; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; font-family: var(--ff-body); font-size: 11px; font-weight: 700; color: var(--brand); text-transform: none; letter-spacing: 0; }
.cateditor__reset:hover { text-decoration: underline; }
.cateditor__reset svg { width: 12px; height: 12px; }
.chip--toggle[data-active="1"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip--toggle svg { margin-right: -1px; }
.chip--add { border-style: dashed; color: var(--ink-3); }
.chip--add:hover { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }
.cateditor__add { display: inline-flex; align-items: center; gap: 4px; }
.cateditor__input { width: 130px; height: 32px; border: 1px solid var(--brand); border-radius: var(--r-pill); padding: 0 12px; font-family: var(--ff-body); font-size: var(--fs-13); font-weight: 600; background: var(--surface); color: var(--ink); outline: none; }
.cateditor__ok { appearance: none; cursor: pointer; width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--brand); color: #fff; display: grid; place-items: center; flex-shrink: 0; }
.cateditor__ok:disabled { opacity: .4; cursor: not-allowed; }
.reccard {
  text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3);
  box-shadow: var(--sh-1); overflow: hidden;
  display: flex; flex-direction: column;
}
.reccard__inner { appearance: none; text-align: left; cursor: pointer; background: none; border: none; padding: 0; display: flex; flex-direction: column; flex: 1; transition: transform .1s; }
.reccard__inner:hover { transform: translateY(-2px); }
/* band: colored strip with category label + fav button */
.reccard__band { background: var(--c); padding: 6px 10px 6px 12px; display: flex; align-items: center; gap: 8px; min-height: 34px; }
.reccard__band-label { font-size: var(--fs-11); font-weight: 800; letter-spacing: var(--tr-caps); text-transform: uppercase; color: rgba(255,255,255,.9); flex: 1; }
.reccard__favbtn { background: rgba(255,255,255,.15); border: none; border-radius: 50%; width: 26px; height: 26px; min-width: 26px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: rgba(255,255,255,.45); transition: color .14s, background .14s; }
.reccard__favbtn[data-on="1"] { color: #fff; background: rgba(255,255,255,.25); }
.reccard__favbtn:hover { color: rgba(255,255,255,.85); background: rgba(255,255,255,.25); }
/* content: left text + right thumb */
.reccard__content { display: flex; align-items: stretch; flex: 1; }
.reccard__left { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 0; }
.reccard__thumb { width: 88px; min-width: 88px; background: var(--c); opacity: .18; }
.reccard__thumb--empty { background: var(--c); opacity: .13; }
.reccard__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 1; }
.reccard__thumb:has(img) { opacity: 1; }
.reccard__content { min-height: 90px; }
.reccard__title { font-family: var(--ff-display); font-weight: 700; font-size: var(--fs-14); line-height: 1.25; letter-spacing: var(--tr-snug); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.reccard__meta { margin-top: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.reccard__kcal { font-family: var(--ff-display); font-weight: 800; font-size: var(--fs-20); }
.reccard__kcal span { font-size: var(--fs-12); color: var(--ink-3); font-weight: 700; }
.reccard__kcal--missing { font-size: var(--fs-12); font-weight: 700; color: var(--amber-ink, #92510A); display: flex; align-items: center; gap: 4px; }
.rdetail__nokcal { display: flex; align-items: center; gap: 8px; background: #FFF8EC; border: 1px solid #F5D98C; border-radius: var(--r-2); padding: 10px 14px; font-size: var(--fs-13); color: #7A4B00; margin-bottom: 14px; }
.reccard__tags { display: flex; gap: 6px; flex-wrap: wrap; }

.imported-flag { font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--teal-ink); background: var(--teal-soft); padding: 2px 6px; border-radius: var(--r-pill); }

/* recipe detail */
.rdetail { display: flex; flex-direction: column; gap: 18px; }
.rdetail__macros { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.rmacro { background: var(--paper-2); border-radius: var(--r-2); padding: 12px; text-align: center; }
.rmacro b { font-family: var(--ff-display); font-weight: 800; font-size: var(--fs-22); display: block; line-height: 1; }
.rmacro span { font-size: var(--fs-11); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin-top: 5px; display: block; }
.rmacro[data-k="carb"] b { color: var(--macro-carb); }
.rmacro[data-k="prot"] b { color: var(--macro-prot); }
.rmacro[data-k="fat"]  b { color: var(--macro-fat); }
.ingrow { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.ingrow:last-child { border-bottom: 0; }
.ingrow__qty { font-family: var(--ff-display); font-weight: 700; font-size: var(--fs-14); min-width: 74px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.ingrow__name { flex: 1; font-size: var(--fs-14); text-transform: capitalize; }
.ingrow__cat { font-size: var(--fs-11); font-weight: 700; color: var(--ink-3); background: var(--paper-2); padding: 3px 8px; border-radius: var(--r-pill); }
.section-label { font-size: var(--fs-11); font-weight: 800; letter-spacing: var(--tr-caps); text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }

/* create-recipe form */
.crf { display: block; }
.crf__lbl { font-size: var(--fs-13); font-weight: 700; color: var(--ink-2); display: block; margin-bottom: 6px; }
.crf__row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.crf__row4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.crf__numinput { position: relative; display: flex; align-items: center; }
.crf__numinput .input { width: 100%; }
.crf__suffix { position: absolute; right: 12px; font-size: var(--fs-12); font-weight: 700; color: var(--ink-3); pointer-events: none; }
.crf__check { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: var(--fs-14); cursor: pointer; }
.crf__check input { width: 19px; height: 19px; accent-color: var(--brand); }
.crf__ings { display: flex; flex-direction: column; gap: 8px; }
.crf__ingrow { display: grid; grid-template-columns: 1fr 52px 116px 120px 32px; gap: 6px; align-items: center; }
.crf__ingrow .input { padding: 9px 10px; font-size: var(--fs-13); }
.crf__ingrow .crf__qty { text-align: center; padding-left: 6px; padding-right: 6px; }
.crf__ingrow .crf__unit { padding: 9px 6px; }
.crf__ingrow .crf__cat { padding: 9px 6px; }
.crf__foot { display: flex; gap: 10px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.app--mobile .crf__ingrow { display: flex; flex-wrap: wrap; gap: 6px; }
.app--mobile .crf__ingrow > input:first-child { flex: 1 1 100%; }
.app--mobile .crf__qty { flex: 0 0 58px; }
.app--mobile .crf__unit { flex: 1 1 110px; }
.app--mobile .crf__cat { flex: 1 1 130px; }
.app--mobile .crf__row4 { grid-template-columns: 1fr 1fr; }
input[type=number].input { -moz-appearance: textfield; }
input[type=number].input::-webkit-outer-spin-button, input[type=number].input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* JSON import */
.import__hint { font-size: var(--fs-13); color: var(--ink-2); background: var(--brand-soft); border-radius: var(--r-2); padding: 12px 14px; line-height: 1.5; }
.import__note { display: flex; align-items: flex-start; gap: 9px; margin-top: 14px; font-size: var(--fs-13); color: var(--ink-2); background: var(--teal-soft); border-radius: var(--r-2); padding: 11px 13px; line-height: 1.45; }
.import__note svg { width: 15px; height: 15px; color: var(--teal-ink); flex-shrink: 0; margin-top: 2px; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.45); border-top-color: #fff; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.import__hint code { font-family: ui-monospace, Menlo, monospace; font-size: var(--fs-12); background: rgba(0,0,0,.05); padding: 1px 5px; border-radius: 4px; }
.import__err { color: var(--danger); font-size: var(--fs-13); font-weight: 600; margin-top: 8px; }

/* ---------------------------------------------------------------- PROFILE */
.prof { display: flex; flex-direction: column; gap: 18px; }
.app--desktop .prof { max-width: 720px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.field__row > div:first-child { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.field__label { font-weight: 700; font-size: var(--fs-15); }
.field__hint { font-size: var(--fs-13); color: var(--ink-3); }
.bigreadout { font-family: var(--ff-display); font-weight: 800; font-size: var(--fs-34); line-height: 1; font-variant-numeric: tabular-nums; flex-shrink: 0; white-space: nowrap; }
.bigreadout span { font-size: var(--fs-16); color: var(--ink-3); font-weight: 700; }
.slider {
  -webkit-appearance: none; appearance: none; width: 100%; height: 6px;
  background: var(--paper-2); border-radius: 999px; outline: none;
}
.slider::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); border: 3px solid var(--surface); box-shadow: var(--sh-2); cursor: pointer; }
.slider::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: var(--brand); border: 3px solid var(--surface); cursor: pointer; }

.macrobars { display: flex; flex-direction: column; gap: 14px; }
.macroctl { display: grid; grid-template-columns: 108px 1fr 52px; align-items: center; gap: 12px; }
.macroctl__name { font-weight: 700; font-size: var(--fs-14); display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.macroctl__name .sw { width: 11px; height: 11px; border-radius: 3px; flex-shrink: 0; }
.macroctl__val { font-family: var(--ff-display); font-weight: 700; font-size: var(--fs-16); text-align: right; font-variant-numeric: tabular-nums; }
.macrosum { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-radius: var(--r-2); background: var(--paper-2); font-size: var(--fs-13); font-weight: 600; }
.macrosum[data-bad="1"] { background: var(--danger-soft); color: #8a2c1c; }
.macrosum b { font-family: var(--ff-display); }

.profcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3); box-shadow: var(--sh-1); padding: 20px 22px; }
.profcard__head { display: flex; align-items: center; gap: 11px; margin-bottom: 16px; }
.profcard__head svg { width: 22px; height: 22px; color: var(--brand); }
.profcard__head h3 { font-family: var(--ff-display); font-weight: 800; font-size: var(--fs-18); margin: 0; }
/* gebruikersrij bovenaan profiel (mobiel) */
.profcard--user { padding: 14px 18px; }
.profcard__userrow { display: flex; align-items: center; gap: 12px; }
/* op desktop is de sidebar-badge al zichtbaar — verberg de profielkaart */
.app--desktop .profcard--user { display: none; }
/* accordion cards */
.profcard--acc { padding: 0; overflow: hidden; }
.profcard__toggle { width: 100%; background: none; border: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; font: inherit; gap: 8px; }
.profcard__toggle:hover { background: var(--paper-2); }
.profcard--acc .profcard__head { margin-bottom: 0; }
.profcard--acc.profcard--open .profcard__toggle { border-bottom: 1px solid var(--line); }
.profcard__toggle svg:last-child { color: var(--ink-3); flex-shrink: 0; }
.profcard__body { padding: 18px 20px; }
.profcard__body .profcard__head { display: none; }

.empty { text-align: center; padding: 48px 24px; color: var(--ink-3); }
.empty__icon { width: 54px; height: 54px; border-radius: 16px; background: var(--paper-2); display: grid; place-items: center; margin: 0 auto 14px; color: var(--ink-4); }
.empty__title { font-family: var(--ff-display); font-weight: 800; font-size: var(--fs-20); color: var(--ink); margin-bottom: 6px; }

/* segmented control */
.seg { display: inline-flex; background: var(--paper-2); border-radius: var(--r-2); padding: 3px; gap: 3px; }
.seg button { appearance: none; border: 0; cursor: pointer; background: none; font-family: var(--ff-body); font-weight: 700; font-size: var(--fs-13); padding: 7px 14px; border-radius: var(--r-1); color: var(--ink-3); transition: all .13s; }
.seg button[data-active="1"] { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); }
