/* ============ Table to Table — app styles ============
   Tokens mirrored from the Kgyoka Design System (claude.ai/design project
   1707ccf5…, tokens/). Light-only "porcelain" theme by decree — no dark mode.
   Color jobs: cyan = brand/halal/verified/links · ink-navy = money · red = allergens. */

:root {
  /* paper scale */
  --paper-0: #FCFCFA; --paper-1: #FFFFFF; --paper-2: #F2F4F1; --paper-3: #E7EDEA;
  --ink-deep: #22302C;
  /* text */
  --text-1: #22302C; --text-2: #5C6B65; --text-3: #8A968F; --text-disabled: #B7C0BB;
  /* lines */
  --line-1: #E6E9E4; --line-2: #D2DAD5;
  /* brand ramp */
  --teal-100: #DFF3F2; --teal-300: #7BCBC9; --teal-500: #16A3A0;
  --teal-600: #12908D; --teal-700: #0E7573; --teal-800: #0B5E5C;
  --brand: var(--teal-500); --brand-hover: var(--teal-600); --brand-press: var(--teal-700);
  --brand-tint: rgba(22,163,160,.12); --on-teal: #FFFFFF;
  /* money */
  --money: #223240; --money-hover: #2E4250; --money-tint: rgba(34,50,64,.08); --on-money: #F4F8F7;
  /* danger */
  --red-500: #C94040; --red-tint: rgba(201,64,64,.1);
  /* semantic */
  --halal: var(--teal-500); --halal-surface: var(--teal-100);
  --verified: var(--teal-500); --link: var(--teal-700);
  --focus-ring: 0 0 0 3px rgba(22,163,160,.28);
  /* type */
  --font-display: "Bebas Neue", "Arial Narrow", sans-serif;
  --font-heading: "Space Grotesk", "Segoe UI", sans-serif;
  --font-body: "Outfit", "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, monospace;
  /* effects */
  --shadow-1: 0 1px 2px rgba(27,42,38,.05), 0 4px 14px rgba(27,42,38,.06);
  --shadow-2: 0 2px 6px rgba(27,42,38,.07), 0 12px 32px rgba(27,42,38,.10);
  --blur-paywall: 8px;
  --ease-out: cubic-bezier(.2,.8,.2,1);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--paper-2);
  color: var(--text-1);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--brand); color: #fff; }
a { color: var(--link); }
button { font-family: var(--font-heading); cursor: pointer; }
:focus-visible { outline: none; box-shadow: var(--focus-ring); }
input, select, textarea {
  font-family: var(--font-body); font-size: 15px; color: var(--text-1);
  background: var(--paper-2); border: 1px solid var(--line-1); border-radius: 10px;
  padding: 10px 12px; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--focus-ring); }
.hidden { display: none !important; }

/* ---------- app frame: phone-shaped, centered on desktop ---------- */
#app {
  max-width: 520px; min-height: 100dvh; margin: 0 auto;
  background: var(--paper-0);
  box-shadow: 0 0 0 1px var(--line-1);
  display: flex; flex-direction: column; position: relative;
}
main { flex: 1; padding: 16px 16px 90px; }

.marquee { font-family: var(--font-display); line-height: .95; letter-spacing: .01em; font-weight: 400; }
.hd { font-family: var(--font-heading); font-weight: 600; }
.microlabel {
  font-family: var(--font-heading); font-weight: 500; font-size: 11px;
  letter-spacing: .08em; text-transform: uppercase; color: var(--text-3);
}
.num { font-variant-numeric: tabular-nums; }

/* ---------- buttons ---------- */
.btn {
  display: block; width: 100%; text-align: center; border: none; border-radius: 10px;
  padding: 13px; font-family: var(--font-heading); font-weight: 600; font-size: 14px;
  transition: background 120ms var(--ease-out), transform 120ms var(--ease-out);
}
.btn:active { transform: translateY(1px); }
.btn-brand { background: var(--brand); color: var(--on-teal); }
.btn-brand:hover { background: var(--brand-hover); }
.btn-money { background: var(--money); color: var(--on-money); }
.btn-money:hover { background: var(--money-hover); }
.btn-ghost { background: var(--paper-1); border: 1px solid var(--line-2); color: var(--text-1); }
.btn-ghost:hover { background: var(--paper-2); }
.btn-danger { background: var(--red-tint); color: var(--red-500); border: 1px solid var(--red-500); }
.btn-inline { display: inline-block; width: auto; padding: 9px 16px; font-size: 13px; }

/* ---------- sign-in ---------- */
#signin {
  min-height: 100dvh; display: flex; flex-direction: column; justify-content: center;
  padding: 32px 28px;
  background: radial-gradient(420px 320px at 85% -40px, rgba(22,163,160,.12), transparent 70%), var(--paper-0);
}
#signin .wordmark { font-family: var(--font-display); font-size: 30px; letter-spacing: .05em; }
#signin h1 { font-size: 64px; margin: 18px 0 0; max-width: 8ch; }
#signin h1 em { font-style: normal; color: var(--brand); }
#signin .valueprops { margin: 22px 0 30px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
#signin .valueprops li { display: flex; gap: 10px; align-items: baseline; font-size: 14.5px; color: var(--text-2); }
#signin .valueprops li::before { content: ""; flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); position: relative; top: -1px; }
#signin .fineprint { font-size: 12px; color: var(--text-3); margin-top: 18px; }
.authfields { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.authdivider {
  display: flex; align-items: center; gap: 12px; margin: 18px 0 4px;
  color: var(--text-3); font-family: var(--font-heading); font-size: 11px;
  letter-spacing: .08em; text-transform: uppercase;
}
.authdivider::before, .authdivider::after { content: ""; flex: 1; height: 1px; background: var(--line-1); }
.segmented { display: flex; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; margin-top: 10px; }
.segmented button {
  flex: 1; border: none; background: var(--paper-1); padding: 10px 4px;
  font-family: var(--font-heading); font-size: 13px; font-weight: 500; color: var(--text-2);
  border-right: 1px solid var(--line-2);
}
.segmented button:last-child { border-right: none; }
.segmented button.on { background: var(--brand-tint); color: var(--teal-800); font-weight: 600; }

/* ---------- onboarding ---------- */
#onboard {
  min-height: 100dvh; display: flex; flex-direction: column; justify-content: center;
  background: radial-gradient(420px 320px at 85% -40px, rgba(22,163,160,.12), transparent 70%), var(--paper-0);
}
.onboard-inner { padding: 32px 28px; max-width: 520px; margin: 0 auto; width: 100%; }
.avail-hint { font-family: var(--font-heading); font-size: 12px; font-weight: 500; margin-top: 6px; min-height: 18px; }
.avail-hint.ok { color: var(--teal-700); }
.avail-hint.bad { color: var(--red-500); }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px;
  background: rgba(252,252,250,.86); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-1);
}
.topbar .wordmark { font-family: var(--font-display); font-size: 22px; letter-spacing: .05em; }
.topbar .avatar-chip { display: flex; align-items: center; gap: 8px; }

/* ---------- tab bar ---------- */
#tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 520px; z-index: 30;
  display: flex; justify-content: space-around; align-items: flex-end;
  background: rgba(252,252,250,.9); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line-1);
  padding: 8px 8px calc(10px + env(safe-area-inset-bottom));
}
#tabbar button {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: none; border: none; padding: 2px 8px;
  font-family: var(--font-heading); font-size: 10px; font-weight: 500;
  letter-spacing: .04em; text-transform: uppercase; color: var(--text-3);
}
#tabbar button svg { width: 20px; height: 20px; }
#tabbar button.on { color: var(--teal-700); }
#tabbar .tab-create i {
  width: 44px; height: 44px; border-radius: 13px; background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center;
  position: relative; top: -10px; box-shadow: var(--shadow-1);
}

/* ---------- cards ---------- */
.card { background: var(--paper-1); border: 1px solid var(--line-1); border-radius: 14px; box-shadow: var(--shadow-1); }
.rcard { margin-top: 14px; overflow: hidden; cursor: pointer; transition: transform 120ms var(--ease-out), box-shadow 120ms var(--ease-out); }
.rcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.rart {
  height: 118px; position: relative;
  background: linear-gradient(135deg, var(--teal-100), var(--paper-2) 72%);
  display: flex; align-items: center; justify-content: center;
}
.rart svg { width: 38px; height: 38px; color: var(--teal-300); }
.rart img { width: 100%; height: 100%; object-fit: cover; }
.pricebadge {
  position: absolute; top: 10px; right: 10px;
  background: var(--money); color: var(--on-money);
  font-family: var(--font-heading); font-size: 11.5px; font-weight: 600;
  border-radius: 999px; padding: 3px 10px;
}
.freebadge {
  position: absolute; top: 10px; right: 10px;
  background: rgba(255,255,255,.92); color: var(--text-2); border: 1px solid var(--line-1);
  font-family: var(--font-heading); font-size: 11px; font-weight: 600;
  border-radius: 999px; padding: 3px 10px;
}
.rbody { padding: 12px 14px 14px; }
.rtitle { font-family: var(--font-heading); font-size: 15px; font-weight: 600; }
.rby { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-2); margin-top: 3px; }
.rmeta { display: flex; gap: 12px; margin-top: 9px; font-size: 11.5px; color: var(--text-3); align-items: center; flex-wrap: wrap; }

.avatar {
  width: 24px; height: 24px; border-radius: 50%; flex: 0 0 auto;
  background: var(--teal-100); color: var(--teal-700);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-heading); font-size: 10px; font-weight: 700;
}
.vcheck { width: 14px; height: 14px; color: var(--verified); flex: 0 0 auto; }
.halalseal {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--halal-surface); color: var(--teal-800);
  font-family: var(--font-heading); font-size: 10.5px; font-weight: 600;
  border-radius: 6px; padding: 2px 8px;
}
.halalseal svg { width: 11px; height: 11px; color: var(--halal); }
.allergen-tag {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--red-tint); color: var(--red-500);
  font-family: var(--font-heading); font-size: 10.5px; font-weight: 600;
  border-radius: 6px; padding: 2px 8px;
}

/* ---------- discover controls ---------- */
.searchrow { display: flex; align-items: center; gap: 8px; background: var(--paper-2); border: 1px solid var(--line-1); border-radius: 10px; padding: 10px 12px; }
.searchrow svg { width: 16px; height: 16px; color: var(--text-3); flex: 0 0 auto; }
.searchrow input { border: none; background: none; padding: 0; box-shadow: none; }
.searchrow input:focus { box-shadow: none; }
.halal-toggle {
  display: flex; align-items: center; justify-content: space-between; margin-top: 10px;
  background: var(--halal-surface); border: 1px solid var(--teal-300); border-radius: 10px; padding: 10px 12px;
}
.halal-toggle .lab { display: flex; align-items: center; gap: 7px; font-family: var(--font-heading); font-size: 13px; font-weight: 600; color: var(--teal-800); }
.halal-toggle .lab svg { width: 16px; height: 16px; color: var(--halal); }

.switch { position: relative; width: 38px; height: 21px; flex: 0 0 auto; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch i {
  position: absolute; inset: 0; border-radius: 20px; background: var(--line-2);
  transition: background 120ms var(--ease-out); pointer-events: none;
}
.switch i::after {
  content: ""; position: absolute; left: 2px; top: 2px; width: 17px; height: 17px;
  border-radius: 50%; background: #fff; transition: transform 120ms var(--ease-out);
}
.switch input:checked + i { background: var(--brand); }
.switch input:checked + i::after { transform: translateX(17px); }

/* ---------- detail sheet ---------- */
#sheet-scrim {
  position: fixed; inset: 0; z-index: 40; background: rgba(34,48,64,.42);
  opacity: 0; pointer-events: none; transition: opacity 200ms var(--ease-out);
}
#sheet-scrim.open { opacity: 1; pointer-events: auto; }
#sheet {
  position: fixed; left: 50%; transform: translate(-50%, 104%);
  bottom: 0; width: 100%; max-width: 520px; z-index: 41;
  max-height: 92dvh; overflow-y: auto;
  background: var(--paper-0); border-radius: 20px 20px 0 0;
  box-shadow: var(--shadow-2);
  transition: transform 320ms var(--ease-out);
}
#sheet.open { transform: translate(-50%, 0); }
.sheet-grab { width: 36px; height: 4px; background: var(--line-2); border-radius: 4px; margin: 10px auto 0; }
.sheet-inner { padding: 8px 18px 24px; }
.dhero {
  margin: 10px -18px 0; height: 170px; position: relative;
  background: linear-gradient(135deg, var(--teal-100), var(--paper-2) 75%);
  display: flex; align-items: center; justify-content: center;
}
.dhero svg { width: 56px; height: 56px; color: var(--teal-300); }
.dtitle { font-family: var(--font-heading); font-size: 21px; font-weight: 700; margin-top: 14px; line-height: 1.2; }
.dstats { display: flex; gap: 14px; margin-top: 10px; font-size: 12px; color: var(--text-2); align-items: center; flex-wrap: wrap; }
.forkline { display: flex; align-items: center; gap: 6px; margin-top: 9px; font-family: var(--font-heading); font-size: 12.5px; font-weight: 500; color: var(--link); }
.forkline svg { width: 14px; height: 14px; }

.servings { margin-top: 18px; display: flex; align-items: center; justify-content: space-between; }
.stepper { display: flex; align-items: center; gap: 12px; font-family: var(--font-heading); font-weight: 600; font-size: 15px; }
.stepper button { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--paper-1); color: var(--text-1); font-size: 16px; }
.ing { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-1); font-size: 14px; }
.ing b { font-family: var(--font-heading); font-weight: 600; white-space: nowrap; }

.stepcard { margin-top: 14px; display: flex; gap: 12px; }
.stepcard .no { font-family: var(--font-display); font-size: 22px; color: var(--teal-500); width: 22px; flex: 0 0 auto; line-height: 1.05; }
.stepcard p { font-size: 14px; margin: 0; }
.steptimer {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 6px;
  font-family: var(--font-mono); font-size: 11.5px; color: var(--teal-700);
  background: var(--brand-tint); border-radius: 6px; padding: 2px 9px;
}

.paywall { position: relative; margin-top: 16px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line-1); }
.paywall .blurred { filter: blur(var(--blur-paywall)); padding: 14px 14px 18px; user-select: none; pointer-events: none; }
.paywall .veil {
  position: absolute; inset: 0; background: rgba(252,252,250,.45);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
}
.paywall .veil svg { width: 24px; height: 24px; color: var(--money); }
.paywall .veil span {
  font-family: var(--font-heading); font-size: 12.5px; font-weight: 600; color: var(--text-1);
  background: rgba(255,255,255,.85); border-radius: 999px; padding: 4px 13px; backdrop-filter: blur(4px);
}
.moneybar {
  position: sticky; bottom: 0; margin: 18px -18px -24px;
  background: var(--money); color: var(--on-money);
  padding: 15px 18px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  cursor: pointer; border: none; width: calc(100% + 36px); text-align: left;
}
.moneybar:hover { background: var(--money-hover); }
.moneybar .l { font-family: var(--font-heading); font-weight: 600; font-size: 15px; }
.moneybar .r { font-size: 11.5px; opacity: .75; }

.actionrow { display: flex; gap: 10px; margin-top: 18px; }
.actionrow .btn { flex: 1; }
.starsrow { display: flex; gap: 6px; margin-top: 12px; align-items: center; }
.starsrow button { background: none; border: none; font-size: 22px; color: var(--line-2); padding: 2px; }
.starsrow button.lit { color: var(--brand); }
.starsrow .hint { font-size: 11.5px; color: var(--text-3); margin-left: 6px; }

/* ---------- editor ---------- */
.field { margin-top: 14px; }
.field > label {
  display: block; font-family: var(--font-heading); font-size: 11px; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin-bottom: 6px;
}
.fieldrow { display: flex; gap: 10px; }
.fieldrow .field { flex: 1; }
.ingrow { display: grid; grid-template-columns: 58px 82px 1fr 30px; gap: 7px; margin-top: 8px; align-items: center; }
.ingrow select { padding: 10px 6px; }
.sugwrap { position: relative; display: block; }
.suggest {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 40;
  background: var(--paper-1); border: 1px solid var(--line-2); border-radius: 10px;
  box-shadow: var(--shadow-2); overflow: hidden;
}
.suggest button {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  width: 100%; padding: 10px 12px; border: none; background: none; text-align: left;
  font-family: var(--font-body); font-size: 13px; color: var(--text-1);
  border-bottom: 1px solid var(--line-1);
}
.suggest button:last-child { border-bottom: none; }
.suggest button:hover { background: var(--paper-2); }
.suggest .kcal { font-size: 10.5px; color: var(--text-3); white-space: nowrap; }
.suggest .custom { font-family: var(--font-heading); font-weight: 500; color: var(--teal-700); }

.steprow { margin-top: 10px; }
.steprow .steprow-controls { display: flex; gap: 8px; margin-top: 6px; align-items: center; }
.timerchip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 12px;
  background: var(--paper-1); color: var(--text-2);
  font-family: var(--font-heading); font-size: 12px; font-weight: 500;
}
.timerchip svg { width: 13px; height: 13px; }
.timerchip.set { background: var(--brand-tint); border-color: var(--teal-300); color: var(--teal-800); font-weight: 600; }
.timerpick button { font-variant-numeric: tabular-nums; }

.nutriline {
  display: flex; gap: 12px; flex-wrap: wrap; align-items: baseline;
  margin-top: 12px; padding: 9px 13px;
  background: var(--paper-2); border-radius: 10px;
  font-family: var(--font-heading); font-size: 12px; font-weight: 600; color: var(--text-1);
}
.nutriline .sub { font-weight: 400; color: var(--text-3); font-size: 10.5px; }
.rowdel { background: none; border: none; color: var(--text-3); font-size: 17px; padding: 4px; }
.rowdel:hover { color: var(--red-500); }
.ghostrow {
  margin-top: 10px; width: 100%; border: 1px dashed var(--line-2); border-radius: 10px;
  padding: 11px; text-align: center; background: none;
  font-family: var(--font-heading); font-size: 13px; font-weight: 500; color: var(--teal-700);
}
.radio-list { display: flex; flex-direction: column; gap: 8px; }
.radio-list label {
  display: flex; gap: 10px; align-items: flex-start;
  border: 1px solid var(--line-1); border-radius: 10px; padding: 11px 13px; cursor: pointer;
  background: var(--paper-1);
}
.radio-list label:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); }
.radio-list input { width: auto; margin-top: 3px; accent-color: var(--teal-600); }
.radio-list b { font-family: var(--font-heading); font-size: 13.5px; font-weight: 600; display: block; }
.radio-list span { font-size: 12px; color: var(--text-2); }
.togglerow { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.togglerow .lab { font-family: var(--font-heading); font-size: 13px; font-weight: 600; }

/* ---------- profile ---------- */
.profilehead { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.profilehead .avatar { width: 52px; height: 52px; font-size: 18px; }
.streakcard { text-align: center; padding: 20px 16px; margin-top: 16px; }
.streakcard .n { font-family: var(--font-display); font-size: 72px; line-height: .95; }
.statrow { display: flex; justify-content: center; gap: 22px; margin-top: 14px; }
.statrow > div { text-align: center; }
.statrow .n { font-family: var(--font-display); font-size: 24px; }
.statrow .lab { font-size: 10.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; font-family: var(--font-heading); }
.rowitem {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 12px 14px; border-bottom: 1px solid var(--line-1); font-size: 14px;
}
.rowitem:last-child { border-bottom: none; }
.statuschip {
  font-family: var(--font-heading); font-size: 10.5px; font-weight: 600;
  letter-spacing: .05em; text-transform: uppercase; border-radius: 999px; padding: 2px 9px;
}
.statuschip.draft { background: var(--paper-2); color: var(--text-2); border: 1px solid var(--line-2); }
.statuschip.published { background: var(--brand-tint); color: var(--teal-700); }

/* ---------- planner ---------- */
.weeknav { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; }
.weeknav button {
  width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--paper-1); color: var(--text-1); font-size: 18px; line-height: 1;
}
.weeknav .hd { font-size: 15px; }
.dayrow { margin-top: 12px; padding: 12px 14px; }
.dayrow .dayname { font-family: var(--font-heading); font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--text-3); }
.dayrow .dayname .today { color: var(--teal-700); }
.slotgrid { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.slotchip {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left;
  border-radius: 8px; padding: 8px 10px; font-size: 12.5px;
  font-family: var(--font-heading); font-weight: 500; border: 1px solid var(--line-1);
  background: var(--paper-0); color: var(--text-1);
}
.slotchip .slotlab { font-size: 9.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); flex: 0 0 58px; }
.slotchip svg { width: 13px; height: 13px; color: var(--teal-500); flex: 0 0 auto; }
.slotchip.empty { border-style: dashed; border-color: var(--line-2); color: var(--text-disabled); }
.slotchip.empty:hover { color: var(--teal-700); border-color: var(--teal-300); }
.slotchip .chipx { margin-left: auto; background: none; border: none; color: var(--text-3); font-size: 15px; padding: 0 2px; }
.slotchip .chipx:hover { color: var(--red-500); }
.slotchip .pd { width: 7px; height: 7px; border-radius: 50%; background: var(--money); flex: 0 0 auto; margin-left: auto; }
.slotchip .pd + .chipx { margin-left: 6px; }

/* grocery list */
.ggroup { margin-top: 18px; }
.ggroup h5 {
  font-family: var(--font-heading); font-size: 11px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--teal-700);
  margin: 0 0 4px; display: flex; align-items: center; gap: 6px;
}
.ggroup h5 svg { width: 13px; height: 13px; }
.gitem { display: flex; align-items: center; gap: 11px; padding: 9px 0; border-bottom: 1px solid var(--line-1); }
.gitem .gbox {
  width: 20px; height: 20px; border: 1.5px solid var(--line-2); border-radius: 6px;
  flex: 0 0 auto; background: var(--paper-1); position: relative; padding: 0;
}
.gitem .gbox.ck { background: var(--brand); border-color: var(--brand); }
.gitem .gbox.ck::after {
  content: ""; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.gitem .nm { flex: 1; font-size: 13.5px; }
.gitem .nm small { display: block; font-size: 10.5px; color: var(--text-3); }
.gitem .nm .havenote { color: var(--teal-700); font-family: var(--font-heading); font-weight: 500; }
.gitem .amt { font-family: var(--font-heading); font-size: 12px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.gitem.done .nm { color: var(--text-disabled); text-decoration: line-through; }

/* picker sheet */
#picker-scrim {
  position: fixed; inset: 0; z-index: 50; background: rgba(34,48,64,.42);
  opacity: 0; pointer-events: none; transition: opacity 200ms var(--ease-out);
}
#picker-scrim.open { opacity: 1; pointer-events: auto; }
#picker {
  position: fixed; left: 50%; transform: translate(-50%, 104%);
  bottom: 0; width: 100%; max-width: 520px; z-index: 51;
  max-height: 70dvh; overflow-y: auto;
  background: var(--paper-0); border-radius: 20px 20px 0 0; box-shadow: var(--shadow-2);
  transition: transform 320ms var(--ease-out);
}
#picker.open { transform: translate(-50%, 0); }
.picker-inner { padding: 8px 18px 24px; }
.picker-inner h4 { font-family: var(--font-heading); font-size: 16px; font-weight: 700; margin: 10px 0 4px; }
.pickrow {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  background: none; border: none; border-bottom: 1px solid var(--line-1);
  padding: 11px 2px; font-family: var(--font-body); font-size: 14px; color: var(--text-1);
}
.pickrow:hover { background: var(--paper-2); }
.pickrow .sub { margin-left: auto; font-size: 11px; color: var(--text-3); white-space: nowrap; }
.slotpick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.slotpick-grid button {
  border: 1px solid var(--line-2); border-radius: 10px; background: var(--paper-1);
  padding: 10px 4px; font-family: var(--font-heading); font-size: 11.5px; font-weight: 500; color: var(--text-1);
}
.slotpick-grid button:hover { border-color: var(--teal-300); background: var(--brand-tint); }
.slotpick-day { font-family: var(--font-heading); font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); margin: 14px 0 0; }

/* ---------- recipe books ---------- */
.bookshelf { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.spine {
  position: relative; overflow: hidden; text-align: left;
  border: 1px solid var(--line-1); border-radius: 10px;
  min-height: 128px; padding: 14px 12px 12px;
  display: flex; flex-direction: column; justify-content: flex-end;
  cursor: pointer; box-shadow: var(--shadow-1);
  transition: transform 120ms var(--ease-out);
  background: linear-gradient(160deg, var(--teal-100), var(--paper-2));
  font-family: var(--font-body);
}
.spine:hover { transform: translateY(-2px); }
.spine::before { content: ""; position: absolute; left: 8px; top: 0; bottom: 0; width: 2px; background: rgba(27,42,38,.10); }
.spine.alt { background: linear-gradient(160deg, #EFE9F2, var(--paper-2)); }
.spine.vault { background: linear-gradient(160deg, var(--paper-3), var(--paper-2)); }
.spine .t { font-family: var(--font-display); font-size: 17px; line-height: 1.02; letter-spacing: .02em; color: var(--text-1); text-transform: uppercase; }
.spine .c { font-size: 10.5px; color: var(--text-3); margin-top: 5px; }
.spine .vaultlock { position: absolute; top: 10px; right: 10px; color: var(--money); }
.spine .vaultlock svg { width: 16px; height: 16px; }
.vaultbanner {
  margin-top: 14px; border: 1px solid var(--line-2); background: var(--money-tint);
  border-radius: 10px; padding: 12px 14px; display: flex; gap: 10px; align-items: center;
}
.vaultbanner svg { width: 20px; height: 20px; color: var(--money); flex: 0 0 auto; }
.vaultbanner .tx { font-size: 12.5px; color: var(--text-2); }
.vaultbanner .tx b { font-family: var(--font-heading); color: var(--text-1); display: block; font-size: 13px; }

/* ---------- feed + comments ---------- */
#feed-strip { margin-top: 14px; }
#feed-strip .fhead { font-family: var(--font-heading); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--teal-700); margin-bottom: 2px; }
.feeditem {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  background: var(--paper-1); border: 1px solid var(--line-1); border-radius: 10px;
  padding: 9px 12px; margin-top: 6px; font-size: 12.5px; font-family: var(--font-body); color: var(--text-1); cursor: pointer;
}
.feeditem:hover { background: var(--paper-2); }
.feeditem .fw { font-size: 10.5px; color: var(--text-3); margin-left: auto; white-space: nowrap; }
.comment { display: flex; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line-1); }
.comment .cb { flex: 1; }
.comment .cwho { font-family: var(--font-heading); font-size: 12px; font-weight: 600; }
.comment .cwho .cw { font-weight: 400; color: var(--text-3); font-size: 10.5px; margin-left: 6px; }
.comment p { font-size: 13px; margin: 3px 0 0; max-width: none; }
.commentbox { display: flex; gap: 8px; margin-top: 12px; }
.commentbox input { flex: 1; }

/* ---------- trades ---------- */
.tradelink {
  display: block; width: 100%; background: none; border: none; text-align: center;
  font-family: var(--font-heading); font-size: 12.5px; font-weight: 500;
  color: var(--link); padding: 12px 4px 4px; cursor: pointer;
}
.tradelink:hover { color: var(--teal-800); }
.tradecard { padding: 13px 15px; margin-top: 10px; }
.tradecard .tt { font-size: 13.5px; }
.tradecard .tt b { font-family: var(--font-heading); font-weight: 600; }
.tradecard .tstatus {
  font-family: var(--font-heading); font-size: 10.5px; font-weight: 600;
  letter-spacing: .05em; text-transform: uppercase; border-radius: 999px; padding: 2px 9px;
  background: var(--paper-2); color: var(--text-2); border: 1px solid var(--line-2);
}
.tradecard .tstatus.accepted { background: var(--brand-tint); color: var(--teal-700); border-color: var(--teal-300); }
.tradecard .tstatus.declined { background: var(--red-tint); color: var(--red-500); border-color: var(--red-500); }
.tradebtns { display: flex; gap: 8px; margin-top: 10px; }
.tradebtns .btn { flex: 1; padding: 10px; font-size: 13px; }

/* ---------- notifications + settings ---------- */
.bellbtn {
  position: relative; width: 34px; height: 34px; border-radius: 10px;
  border: 1px solid var(--line-1); background: var(--paper-1); color: var(--text-2);
  display: inline-flex; align-items: center; justify-content: center; margin-right: 8px;
}
.bellbtn svg { width: 17px; height: 17px; }
.bellbtn i { position: absolute; top: 6px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); border: 1.5px solid var(--paper-1); }
.rowbtn { width: 100%; background: none; border: none; text-align: left; font-family: var(--font-body); font-size: 14px; color: var(--text-1); cursor: pointer; }
.rowbtn:hover { background: var(--paper-2); }
.notif { display: flex; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--line-1); align-items: flex-start; }
.notif .ndot { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); margin-top: 6px; }
.notif.read .ndot { background: var(--line-1); }
.notif .nt { font-size: 13.5px; }
.notif .nw { font-size: 11px; color: var(--text-3); }
.chips-input { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chips-input .p-tag { cursor: pointer; }
.chips-input .p-tag.on { background: var(--brand-tint); border-color: var(--teal-300); color: var(--teal-800); }
.allergychip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--red-tint); color: var(--red-500); border: 1px solid var(--red-500);
  border-radius: 999px; padding: 4px 11px; font-family: var(--font-heading); font-size: 12px; font-weight: 600;
}
.allergychip button { background: none; border: none; color: inherit; font-size: 13px; padding: 0; cursor: pointer; }
.allergywarn {
  margin-top: 12px; background: var(--red-tint); border: 1px solid var(--red-500);
  border-radius: 10px; padding: 10px 13px; font-size: 12.5px; color: var(--red-500);
  font-family: var(--font-heading); font-weight: 600;
}

/* accessibility modes */
html.elder body { font-size: 17px; }
html.elder .btn { padding: 16px; font-size: 16px; }
html.elder .ing, html.elder .stepcard p, html.elder .rowitem { font-size: 16px; }
html.elder #ck-text { font-size: 27px; }
html.elder .rtitle { font-size: 17px; }
html.elder .p-tabbar button, html.elder #tabbar button { font-size: 11px; }
html.hc { --text-2: #3E4B45; --text-3: #55645D; --line-1: #C9D2CC; --line-2: #9FAFA6; }

/* ---------- community ---------- */
.cm-card { padding: 14px 16px; margin-top: 10px; cursor: pointer; transition: transform 120ms var(--ease-out); }
.cm-card:hover { transform: translateY(-2px); }
.cm-card .t { font-family: var(--font-display); font-size: 20px; letter-spacing: .02em; text-transform: uppercase; }
.cm-card .m { font-size: 12px; color: var(--text-2); margin-top: 3px; }
.needbar {
  margin-top: 14px; background: var(--brand-tint); border-radius: 10px; padding: 9px 13px;
  font-size: 12.5px; color: var(--teal-800); font-family: var(--font-heading); font-weight: 500;
}
.pot-claims { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; margin-top: 14px; }
.claim { border: 1px solid var(--line-1); border-radius: 10px; padding: 10px 11px; font-size: 11.5px; background: var(--paper-1); position: relative; }
.claim b { font-family: var(--font-heading); font-size: 13px; font-weight: 600; display: block; }
.claim .who { color: var(--text-3); font-size: 10.5px; }
.claim .claimx { position: absolute; top: 6px; right: 8px; background: none; border: none; color: var(--text-3); font-size: 14px; padding: 0; }
.claim .claimx:hover { color: var(--red-500); }
.claim.open {
  border-style: dashed; border-color: var(--line-2); background: none;
  display: flex; align-items: center; justify-content: center; min-height: 54px;
  color: var(--teal-700); font-family: var(--font-heading); font-weight: 500; cursor: pointer;
}
.claim .allergen-tag { margin-top: 5px; }

/* ---------- chef profile ---------- */
.chefhead { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.chefhead .avatar { width: 56px; height: 56px; font-size: 19px; }
.chefstats { display: flex; gap: 22px; margin-top: 16px; }
.chefstats > div { text-align: center; }
.chefstats .n { font-family: var(--font-display); font-size: 26px; }
.chefstats .lab { font-size: 10px; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; font-family: var(--font-heading); }
.followbtn { margin-top: 16px; }
.followbtn.following { background: var(--paper-1); border: 1px solid var(--teal-300); color: var(--teal-800); }

/* ---------- cook mode ---------- */
#cookmode {
  position: fixed; inset: 0; z-index: 70;
  background: var(--paper-0);
  display: flex; flex-direction: column;
  max-width: 520px; margin: 0 auto;
  box-shadow: 0 0 0 1px var(--line-1);
}
.ck-top {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px calc(10px);
  border-bottom: 1px solid var(--line-1);
}
.ck-top #ck-close {
  width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--paper-1); color: var(--text-1); font-size: 19px; line-height: 1; flex: 0 0 auto;
}
#ck-progress { flex: 1; display: flex; gap: 4px; }
#ck-progress i { height: 4px; flex: 1; border-radius: 3px; background: var(--line-1); }
#ck-progress i.done { background: var(--teal-300); }
#ck-progress i.on { background: var(--brand); }
.ck-top #ck-ingbtn {
  border: 1px solid var(--line-2); background: var(--paper-1); color: var(--text-1);
  border-radius: 999px; padding: 7px 13px; font-family: var(--font-heading);
  font-size: 12px; font-weight: 600; flex: 0 0 auto;
}
.ck-main { flex: 1; overflow-y: auto; padding: 26px 24px; display: flex; flex-direction: column; }
#ck-stepno { font-size: 30px; color: var(--teal-600); }
#ck-text { font-size: 22px; line-height: 1.45; margin: 14px 0 0; max-width: 24ch; }
#ck-temp {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 16px;
  padding: 9px 14px; border-radius: 10px; align-self: flex-start;
  background: var(--brand-tint); border: 1px solid var(--teal-300);
  font-family: var(--font-heading); font-size: 15px; font-weight: 600; color: var(--teal-800);
  font-variant-numeric: tabular-nums;
}
#ck-temp svg { width: 16px; height: 16px; }
#ck-timerwrap { margin-top: auto; padding-top: 26px; text-align: center; }
#ck-time {
  font-family: var(--font-mono); font-size: 56px; font-weight: 600; color: var(--text-1);
  letter-spacing: .02em;
}
#ck-time.zero { color: var(--teal-600); animation: ck-pulse 1s ease-in-out infinite; }
@keyframes ck-pulse { 50% { opacity: .35; } }
.ck-timerbtns { display: flex; gap: 10px; justify-content: center; margin-top: 12px; }
.ck-nav {
  display: flex; gap: 10px; padding: 14px 16px calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line-1); background: var(--paper-0);
}
.ck-nav .btn { flex: 1; padding: 15px; font-size: 15px; }
#ck-ingdrawer {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 5;
  background: var(--paper-1); border-top: 1px solid var(--line-1);
  border-radius: 20px 20px 0 0; box-shadow: var(--shadow-2);
  padding: 8px 20px 22px; max-height: 55%; overflow-y: auto;
}
.ck-finish { text-align: center; margin: auto 0; }
.ck-finish .marquee { font-size: 52px; }
.ck-finish p { color: var(--text-2); font-size: 14.5px; margin: 12px auto 0; max-width: 30ch; }

/* ---------- stubs, toasts, misc ---------- */
.stub { text-align: center; padding: 44px 24px; margin-top: 18px; }
.stub .marquee { font-size: 34px; color: var(--text-2); }
.stub p { color: var(--text-3); font-size: 13.5px; max-width: 36ch; margin: 10px auto 0; }
.demobanner {
  background: var(--money); color: var(--on-money); text-align: center;
  font-family: var(--font-heading); font-size: 11.5px; font-weight: 500;
  padding: 6px 12px; letter-spacing: .04em;
}
#toast {
  position: fixed; bottom: 96px; left: 50%; transform: translate(-50%, 20px);
  background: var(--ink-deep); color: var(--paper-0);
  font-family: var(--font-heading); font-size: 13px; font-weight: 500;
  border-radius: 10px; padding: 11px 18px; box-shadow: var(--shadow-2);
  opacity: 0; pointer-events: none; transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out);
  z-index: 60; max-width: 90%; text-align: center;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
.setupnotice { padding: 40px 28px; }
.setupnotice code { font-family: var(--font-mono); font-size: 12.5px; background: var(--paper-2); padding: 1px 6px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
