/* pka-mealboard — production app stylesheet.
   Palette/typography carried verbatim from the Brendan-approved rev-3
   mockup contract (Deliverables/2026-07-27-meal-planner-app-mockups.html).
   This is a bespoke consumer-product palette, not a cbio.health brand
   surface — no Vesta/GL-003 token conflict; Apelles/brand not applicable
   (household app, not a CBio-branded surface). Mobile-first; the 900px
   breakpoint below matches the mockup's own phone/desktop split. */

:root{
  --cream:#FBF6EE;
  --cream-card:#FFFDF8;
  --charcoal:#2E2A26;
  --charcoal-soft:#5B5349;
  --charcoal-faint:#8A8175;
  --line:#E7DECD;
  --terracotta:#B85A2B;
  --terracotta-dark:#8C3F1B;
  --terracotta-tint:#F3E2D2;
  --terracotta-tint-text:#7A3A1B;
  --sage:#6B8060;
  --sage-tint:#E4EBDE;
  --sage-tint-text:#3F5C34;
  --amber-tint:#FBEDD1;
  --amber-tint-text:#7A5410;
  --rust-tint:#F7E1DD;
  --rust-tint-text:#8C2E22;
  --neutral-chip-bg:#EDE7DC;
  --neutral-chip-text:#5B5349;
  --dot-verified: var(--sage);
  --dot-attention: var(--amber-tint-text);
  --dot-problem: var(--rust-tint-text);
  --dot-neutral: var(--charcoal-faint);
  --shadow: 0 10px 28px -12px rgba(46,26,15,0.22);
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 9px;
  --font-head: Georgia, 'Iowan Old Style', 'Times New Roman', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

*{box-sizing:border-box;}
html,body{margin:0;padding:0;height:100%;}
body{
  background: linear-gradient(180deg,#F3ECDC 0%, #FBF6EE 320px, #FBF6EE 100%);
  color:var(--charcoal);
  font-family:var(--font-body);
  font-size:16px;
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
  min-height:100vh;
  display:flex;
  flex-direction:column;
}

h1,h2,h3{font-family:var(--font-head); margin:0; color:var(--charcoal);}
a{color:var(--terracotta-dark);}
button{font-family:inherit;}
:focus-visible{ outline: 3px solid var(--terracotta); outline-offset: 2px; }

/* ---------- visually-hidden (accessible-name-only) labels ---------- */
.sr-only{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;
}

/* ---------- skip link ---------- */
.skip-link{
  position:absolute; left:-9999px; top:0; z-index:1000;
  background:var(--charcoal); color:#FBF6EE; padding:10px 16px; border-radius:0 0 8px 0;
}
.skip-link:focus{ left:0; }

/* ---------- app header ---------- */
.app-header{
  padding:16px 18px 12px;
  background: linear-gradient(135deg,#2E2A26 0%, #40332A 100%);
  color:#FBF6EE;
  flex-shrink:0;
  display:flex; align-items:center; justify-content:space-between; gap:12px;
}
.app-header h1{
  font-size:19px;
  color:#FBF6EE;
  display:flex; align-items:center; gap:8px;
}
.app-header .tagline{ font-size:12px; color:#D8CBB6; margin-top:2px; }
.header-identity{
  font-size:12px; color:#D8CBB6; text-align:right; white-space:nowrap;
}
.header-identity strong{ color:#FBF6EE; }

/* ---------- offline / demo-mode banner ---------- */
#connBanner{
  display:none;
  background:var(--amber-tint); color:var(--amber-tint-text);
  font-size:12.5px; font-weight:700;
  padding:8px 16px; text-align:center;
}
#connBanner.show{ display:block; }

/* ---------- plan/list-ready sign-in notice (C1/C2 notify fix) ---------- */
.plan-list-notice{
  display:block; width:100%; border:0; cursor:pointer;
  background:var(--amber-tint); color:var(--amber-tint-text);
  font-size:12.5px; font-weight:700;
  padding:8px 16px; text-align:center;
}
.plan-list-notice[hidden]{ display:none; }

/* ---------- tabs ---------- */
.tabs{
  display:flex;
  overflow-x:auto;
  gap:4px;
  padding:10px 10px 0;
  background:var(--cream-card);
  border-bottom:1px solid var(--line);
  flex-shrink:0;
  scrollbar-width:none;
}
.tabs::-webkit-scrollbar{display:none;}
.tab-btn{
  flex:0 0 auto;
  border:none;
  background:transparent;
  color:var(--charcoal-soft);
  font-size:12.5px;
  font-weight:600;
  padding:10px 11px 12px;
  display:flex; flex-direction:column; align-items:center; gap:4px;
  cursor:pointer;
  border-bottom:3px solid transparent;
  white-space:nowrap;
}
.tab-btn .tab-icon{font-size:18px;}
.tab-btn[aria-selected="true"]{
  color:var(--terracotta-dark);
  border-bottom-color:var(--terracotta);
}
.tab-btn.tab-settings{ margin-left:auto; }

@media (min-width:900px){
  .tabs{ padding:0 22px; justify-content:flex-start; gap:8px; }
  .tab-btn{ flex-direction:row; padding:16px 13px; font-size:13.5px; }
}

/* ---------- main content ---------- */
main{
  flex:1;
  overflow-y:auto;
  padding:18px 16px 60px;
  position:relative;
  max-width:1180px;
  margin:0 auto;
  width:100%;
}
@media (min-width:900px){
  main{ padding:28px 30px 60px; }
}

section[role="tabpanel"]{ display:none; }
section[role="tabpanel"].active{ display:block; }

.screen-title{
  font-size:21px;
  margin-bottom:4px;
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:2px;
}
.screen-sub{ color:var(--charcoal-soft); font-size:13.5px; margin-bottom:18px; }
.screen-sub strong{ color:var(--charcoal); }

h3.group-title, summary.group-title{
  font-size:13.5px;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:var(--charcoal-faint);
  margin:22px 0 10px;
  font-family:var(--font-body);
  font-weight:700;
  display:flex;
  align-items:baseline;
  gap:8px;
  flex-wrap:wrap;
}
h3.group-title:first-of-type{margin-top:0;}
/* FEATURE_PANTRY_GONE: the collapsed "Gone" group's <summary> reuses
   group-title typography (rule above); this just adds the pointer cursor
   a <summary> needs since it's a native disclosure control, not new
   layout. */
summary.group-title{ cursor:pointer; }
.snapshot-age{
  font-size:11.5px; font-weight:600; text-transform:none; letter-spacing:0;
  color:var(--charcoal-faint); background:var(--neutral-chip-bg);
  padding:2px 8px; border-radius:999px;
}

/* ---------- status word + dot ---------- */
.status-item{
  display:inline-flex; align-items:center; gap:7px;
  font-size:12.5px; font-weight:700; color:var(--charcoal-soft);
  white-space:nowrap; flex-shrink:0;
}
.status-dot{ width:9px; height:9px; border-radius:50%; flex-shrink:0; }
.dot-verified{ background:var(--dot-verified); }
.dot-attention{ background:var(--dot-attention); }
.dot-problem{ background:var(--dot-problem); }
.dot-neutral{ background:var(--dot-neutral); }

.status-legend{
  display:flex; flex-wrap:wrap; gap:16px;
  background:var(--cream-card); border:1px solid var(--line);
  border-radius:var(--radius-md); padding:12px 14px; margin-bottom:16px;
}

.tag-gf{
  display:inline-flex; align-items:center;
  font-size:11px; font-weight:800; letter-spacing:.02em;
  background:var(--neutral-chip-bg); color:var(--neutral-chip-text);
  padding:2px 7px; border-radius:6px; margin-left:7px;
}
/* SCR-01-d1 (1C Part E, mockup delta): member attribution segment inside
   the same GF tag. Muted via font-weight only, NOT opacity/color -- an
   opacity-based treatment was evaluated and rejected (GL-003 §7.7):
   .tag-gf-member at 72% opacity on --neutral-chip-bg computes to ~3.34:1,
   failing the 4.5:1 AA floor for small (11px) text. Reuses the identical
   --neutral-chip-text color at full opacity (already 6.14:1 on this
   background) and differentiates purely by weight (500 vs. the GF label's
   800). Zero new colors. */
.tag-gf .tag-gf-member{
  font-weight:500; letter-spacing:0; margin-left:3px;
}

.empty-state{
  background:var(--cream-card); border:1px dashed var(--line);
  border-radius:var(--radius-md); padding:22px; text-align:center;
  color:var(--charcoal-soft); font-size:13.5px; margin-bottom:16px;
}
.stub-note{
  font-size:11.5px; color:var(--charcoal-faint); background:var(--neutral-chip-bg);
  border-radius:var(--radius-sm); padding:8px 10px; margin-top:6px;
}
.error-banner{
  background:var(--rust-tint); color:var(--rust-tint-text);
  border-radius:var(--radius-md); padding:12px 14px; margin-bottom:14px; font-size:13px; font-weight:600;
}

/* ---------- photo-refresh primary action ---------- */
.photo-refresh-card{
  display:flex; align-items:center; gap:14px;
  background: linear-gradient(135deg, var(--terracotta) 0%, var(--terracotta-dark) 100%);
  color:#FFF7EC;
  border-radius:var(--radius-md);
  padding:16px 18px;
  margin-bottom:16px;
  flex-wrap:wrap;
}
.photo-refresh-icon{
  width:44px; height:44px; border-radius:50%;
  background:rgba(255,255,255,.16);
  display:flex; align-items:center; justify-content:center;
  font-size:22px; flex-shrink:0;
}
.photo-refresh-text{ flex:1; min-width:180px; }
.photo-refresh-text .prt-title{ font-weight:700; font-size:14.5px; margin-bottom:2px; }
.photo-refresh-text .prt-sub{ font-size:12.5px; color:#FBE9DA; }
.photo-refresh-btn{
  background:#FFF7EC; color:var(--terracotta-dark);
  border:none; font-weight:800; font-size:13px;
  padding:11px 16px; border-radius:999px; cursor:pointer;
  white-space:nowrap;
}
.photo-refresh-btn:hover{ background:#fff; }
.manual-edit-hint{ font-size:12px; color:var(--charcoal-faint); margin-bottom:18px; }

/* SCR-02-d1 (1C Part E, mockup delta): dietary exclusions banner -- one
   muted line between the kickoff card and the proposal grid. Existing
   tokens only, no new colors. Renders nothing (no DOM) when no household
   member carries a Tier-1 hard exclusion -- absence is the empty state. */
.dietary-banner{
  display:flex; align-items:center; gap:8px;
  background:var(--cream); border:1px solid var(--line); border-radius:var(--radius-sm);
  color:var(--charcoal-soft); font-size:12.5px; font-weight:600;
  padding:8px 12px; margin-top:10px; margin-bottom:16px;
}
.dietary-banner .db-icon{ flex-shrink:0; }
.dietary-banner b{ color:var(--charcoal); font-weight:700; }

/* ---------- photo-refresh flow (3-state) ---------- */
.photo-flow{
  background:var(--cream-card); border:1px solid var(--line);
  border-radius:var(--radius-lg); padding:16px 16px 20px; margin-bottom:18px;
}
.pf-stepper{ display:flex; gap:0; margin-bottom:18px; }
.pf-step{
  flex:1; display:flex; flex-direction:column; align-items:center; gap:6px;
  background:transparent; border:none; cursor:pointer; padding:4px 2px 0; position:relative; font-family:inherit;
}
.pf-step-dot{
  width:26px; height:26px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  font-size:12.5px; font-weight:800;
  background:var(--neutral-chip-bg); color:var(--charcoal-faint);
  border:2px solid var(--line); z-index:2;
}
.pf-step-label{ font-size:11px; font-weight:700; color:var(--charcoal-soft); text-align:center; line-height:1.2; }
.pf-step.pf-done .pf-step-dot{ background:var(--sage); border-color:var(--sage); color:#fff; }
.pf-step.pf-done .pf-step-label{ color:var(--sage-tint-text); }
.pf-step.pf-current .pf-step-dot{ background:var(--terracotta); border-color:var(--terracotta); color:#fff; }
.pf-step.pf-current .pf-step-label{ color:var(--terracotta-dark); }
.pf-step:not(:first-child)::before{
  content:''; position:absolute; top:17px; right:calc(50% + 13px); left:calc(-50% + 13px);
  height:2px; background:var(--line); z-index:1;
}
.pf-step.pf-done:not(:first-child)::before{ background:var(--sage); }

.pf-panel-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; gap:10px; }
.pf-panel-head h3{ font-size:15px; font-family:var(--font-body); font-weight:700; margin:0; }
.pf-cancel{
  border:1px solid var(--line); background:#fff; color:var(--charcoal-soft);
  font-size:12px; font-weight:700; padding:6px 11px; border-radius:999px; cursor:pointer;
}
.pf-thumb-grid{ display:grid; grid-template-columns:repeat(2,1fr); gap:10px; margin-bottom:12px; }
@media (min-width:640px){ .pf-thumb-grid{ grid-template-columns:repeat(4,1fr); } }
.pf-thumb{
  position:relative; height:92px; border-radius:var(--radius-sm);
  display:flex; align-items:center; justify-content:center; font-size:26px; color:#fff; overflow:hidden;
  background:linear-gradient(135deg,#3E6B87,#1F4A63);
}
.pf-thumb-label{
  position:absolute; bottom:6px; left:8px; font-size:11px; font-weight:700;
  background:rgba(23,19,16,.42); padding:2px 7px; border-radius:999px; color:#FFF7EC;
}
.pf-thumb-remove{
  position:absolute; top:6px; right:6px; width:24px; height:24px; border-radius:50%;
  border:none; background:rgba(23,19,16,.5); color:#fff; font-size:12px; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
}
.pf-file-input{ margin-bottom:12px; font-size:13px; }
.pf-primary-btn{
  width:100%; background:var(--terracotta-dark); color:#FFF7EC; border:none;
  padding:14px; font-size:14.5px; font-weight:700; border-radius:var(--radius-md); cursor:pointer;
}
.pf-primary-btn:disabled{ opacity:.5; cursor:not-allowed; }
.pf-secondary-btn{
  width:100%; background:transparent; color:var(--charcoal-soft); border:1px solid var(--line);
  padding:11px; font-size:13px; font-weight:700; border-radius:var(--radius-md); cursor:pointer; margin-top:12px;
}
.pf-processing-card{
  display:flex; align-items:center; gap:14px;
  background:var(--amber-tint); color:var(--amber-tint-text);
  border-radius:var(--radius-md); padding:16px 18px; margin-bottom:12px;
}
.pf-spinner{
  width:28px; height:28px; border-radius:50%; flex-shrink:0;
  border:3px solid rgba(122,84,16,.25); border-top-color:var(--amber-tint-text);
  animation:pf-spin 0.9s linear infinite;
}
@media (prefers-reduced-motion: reduce){ .pf-spinner{ animation:none; } }
@keyframes pf-spin{ to{ transform:rotate(360deg); } }
.pf-processing-title{ font-weight:700; font-size:14.5px; margin-bottom:2px; }
.pf-processing-sub{ font-size:12.5px; }
.pf-leave-note{
  font-size:12.5px; color:var(--charcoal-soft); background:var(--neutral-chip-bg);
  border-radius:var(--radius-sm); padding:10px 12px; margin-bottom:4px;
}
.pf-results-summary{
  background:var(--sage-tint); color:var(--sage-tint-text);
  border-radius:var(--radius-md); padding:14px 16px; margin-bottom:14px;
}
.pf-results-headline{ font-weight:700; font-size:14.5px; margin-bottom:8px; }

/* ---------- tabular list container ---------- */
.tlist{
  background:var(--cream-card); border:1px solid var(--line);
  border-radius:var(--radius-md); overflow:hidden; margin-bottom:22px;
}
.trow{
  display:flex; align-items:center; justify-content:space-between; gap:14px;
  min-height:58px; padding:11px 14px; border-bottom:1px solid var(--line);
  cursor:pointer; background:transparent; width:100%; text-align:left;
  border-left:none; border-right:none; border-top:none; font-family:inherit;
}
.trow:last-child{ border-bottom:none; }
@media (hover:hover){ .trow:hover{ background:#F5EFE1; } }
.tr-main{ min-width:0; flex:1; }
.tr-name{ font-weight:700; font-size:14px; display:flex; align-items:center; flex-wrap:wrap; }
.tr-desc{
  font-size:12.5px; color:var(--charcoal-soft); margin-top:2px;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:100%;
}
.tr-chevron{ color:var(--charcoal-faint); font-size:16px; flex-shrink:0; }

@media (min-width:900px){
  .pantry-groups{ display:grid; grid-template-columns:1fr 1fr; gap:0 28px; }
}

/* ---------- stepper ---------- */
.stepper{
  display:flex; overflow-x:auto; gap:0;
  background:var(--cream-card); border:1px solid var(--line);
  border-radius:var(--radius-md); padding:16px 10px; margin-bottom:16px;
}
.step{ display:flex; flex-direction:column; align-items:center; flex:1; min-width:74px; position:relative; }
.step-dot{
  width:26px; height:26px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  font-size:13px; font-weight:800;
  background:var(--neutral-chip-bg); color:var(--charcoal-faint);
  border:2px solid var(--line); z-index:2;
}
.step.done .step-dot{ background:var(--sage); border-color:var(--sage); color:#fff; }
.step.current .step-dot{ background:var(--terracotta); border-color:var(--terracotta); color:#fff; }
.step-label{ font-size:11px; font-weight:700; text-align:center; margin-top:6px; color:var(--charcoal-soft); line-height:1.2; }
.step.done .step-label{ color:var(--sage-tint-text); }
.step.current .step-label{ color:var(--terracotta-dark); }
.step-line{ position:absolute; top:13px; left:-50%; width:100%; height:2px; background:var(--line); z-index:1; }
.step:first-child .step-line{ display:none; }
.step.done .step-line{ background:var(--sage); }

/* Screen 1 (mealboard-screens-mockup/screens/01-staples-check-need-more.html):
   the "answer these, then Approve unlocks" prompt above the staples-check
   list. Ported verbatim from that mockup's own mockup.css rule. */
.mockup-next-step{
  display:flex; align-items:flex-start; gap:8px;
  background:var(--sage-tint); color:var(--sage-tint-text);
  border-radius:var(--radius-sm); padding:8px 12px; margin-bottom:14px;
  font-size:12.5px; font-weight:700;
}
.mockup-next-step .mns-icon{ flex-shrink:0; }

/* A staple-check button holding a not-yet-committed learned/status
   suggestion (js/screens/approval.js) -- dotted outline, same convention
   the mockup uses, distinct from a solid aria-pressed="true" answer. */
.seg-btn-suggested{ outline:2px dotted var(--charcoal-faint); outline-offset:2px; }

/* Screen 2 (mealboard-screens-mockup/screens/02-household-settings.html):
   a fixed/always-on household toggle (GF household, toddler-safe) has no
   backend key to flip this batch -- rendered visibly ON and disabled
   rather than a fake interactive control. */
.toggle-switch[disabled]{ opacity:.6; cursor:not-allowed; }

.approve-plan-banner{
  display:flex; align-items:center; gap:10px;
  background:var(--sage-tint); color:var(--sage-tint-text);
  border-radius:var(--radius-md); padding:12px 14px; margin-bottom:12px;
  font-size:13.5px; font-weight:700;
}
.approve-plan-banner .check-badge{
  width:26px; height:26px; border-radius:50%; background:var(--sage); color:#fff;
  display:flex; align-items:center; justify-content:center; flex-shrink:0; font-size:14px;
}
.doc-link-card{
  display:flex; align-items:center; gap:10px; justify-content:space-between;
  background:var(--cream-card); border:1px solid var(--line);
  border-radius:var(--radius-md); padding:12px 14px; margin-bottom:18px; flex-wrap:wrap;
}
.doc-link-card.disabled-card{ background:#F5EFE1; }
.doc-link-left{ display:flex; align-items:center; gap:9px; font-size:13.5px; font-weight:700; }
.doc-status-chip{
  background:var(--neutral-chip-bg); color:var(--neutral-chip-text);
  font-size:12px; font-weight:700; padding:4px 9px; border-radius:999px;
}
.doc-link-btn{
  border:1px solid var(--terracotta); background:transparent; color:var(--terracotta-dark);
  font-weight:700; font-size:12.5px; padding:8px 12px; border-radius:999px; cursor:pointer;
}
.doc-link-btn[disabled], .card-link-btn[disabled]{
  border-color:var(--line); color:var(--charcoal-faint); cursor:not-allowed; background:transparent;
}

/* ---------- meal cards ---------- */
.meal-grid{ display:grid; gap:14px; }
@media (min-width:640px){ .meal-grid{ grid-template-columns:1fr 1fr; } }
@media (min-width:900px){ .meal-grid{ grid-template-columns:1fr 1fr; gap:20px; } }
.meal-card{
  background:var(--cream-card); border:1px solid var(--line);
  border-radius:var(--radius-md); overflow:hidden; display:flex; flex-direction:column;
}
.meal-photo{
  height:80px; display:flex; align-items:center; justify-content:center;
  font-size:34px; color:#fff; background:linear-gradient(135deg,#B85A2B,#7A3A1B);
}
.meal-body{ padding:14px; flex:1; display:flex; flex-direction:column; }
.meal-name{ font-size:16.5px; font-weight:700; margin-bottom:3px; }
.meal-hook{ font-size:13.5px; color:var(--charcoal-soft); margin-bottom:10px; }
.meal-meta{ display:flex; flex-wrap:wrap; gap:6px; font-size:12px; color:var(--charcoal-faint); margin-bottom:10px; }
.meal-meta span{ background:var(--neutral-chip-bg); padding:3px 8px; border-radius:999px; }
.card-link-btn{
  margin-top:auto; align-self:flex-start; border:1px solid var(--terracotta);
  background:transparent; color:var(--terracotta-dark); font-weight:700; font-size:12.5px;
  padding:8px 12px; border-radius:999px; cursor:pointer;
}
.meal-card-tappable{ cursor:pointer; }
.meal-card-tappable:hover{ border-color:var(--terracotta); }
.meal-card-cta{
  margin-top:auto; padding-top:4px; font-size:12.5px; font-weight:700; color:var(--terracotta-dark);
}

/* ---------- recipe card modal (Weekly Plan tap-through) ---------- */
.recipe-note-box{
  background:var(--neutral-chip-bg); border-radius:var(--radius-sm);
  padding:10px 12px; font-size:13.5px; margin-bottom:10px; line-height:1.4;
}
.recipe-note-warn{ background:var(--amber-tint); color:var(--amber-tint-text); }
.recipe-ingredient-list{ border:1px solid var(--line); border-radius:var(--radius-sm); overflow:hidden; }
.recipe-ingredient-row{
  display:flex; justify-content:space-between; gap:10px; padding:8px 12px; font-size:13.5px;
  border-bottom:1px solid var(--line);
}
.recipe-ingredient-row:last-child{ border-bottom:none; }
.recipe-ingredient-amount{ color:var(--charcoal-soft); white-space:nowrap; }
.recipe-steps{ margin:0; padding-left:20px; font-size:13.5px; line-height:1.5; }
.recipe-steps li{ margin-bottom:8px; }
.recipe-steps li:last-child{ margin-bottom:0; }

/* ---------- recipe card rating row (C7, mockup screen 08) ---------- */
.rating-choices{ flex-direction:column; }
.rating-btn{ width:100%; text-align:left; padding:13px 16px; font-size:14px; border-radius:var(--radius-sm); }
.rating-btn[aria-pressed="true"]{ background:var(--sage); border-color:var(--sage); }
.rating-saved-hint{ font-size:12px; color:var(--sage-tint-text); font-weight:700; margin-top:8px; }

/* ---------- proposals ---------- */
.proposal-grid{ display:grid; gap:14px; }
@media (min-width:900px){ .proposal-grid{ grid-template-columns:1fr 1fr 1fr; } }
.proposal-card{
  background:var(--cream-card); border:1px solid var(--line);
  border-radius:var(--radius-md); padding:16px; display:flex; flex-direction:column;
}
.proposal-name{ font-size:16px; font-weight:700; margin-bottom:4px; }
.proposal-hook{ font-size:13.5px; color:var(--charcoal-soft); margin-bottom:10px; }
.week-shape-form{
  background:var(--cream-card); border:1px solid var(--line); border-radius:var(--radius-md);
  padding:16px; margin-bottom:16px; display:flex; flex-direction:column; gap:12px;
}
.week-shape-form label{ font-size:12.5px; font-weight:700; color:var(--charcoal-soft); display:block; margin-bottom:4px; }
.week-shape-form input, .week-shape-form textarea{
  width:100%; border:1px solid var(--line); border-radius:var(--radius-sm); padding:9px 11px;
  font-size:14px; font-family:inherit; background:#fff; color:var(--charcoal);
}
.confirm-chip{
  display:flex; align-items:center; justify-content:space-between; gap:8px; flex-wrap:wrap;
  background:var(--amber-tint); color:var(--amber-tint-text);
  border-radius:var(--radius-sm); padding:8px 10px; margin-bottom:10px;
}
/* Confirm-chip labels are variable-length item names + a fixed suffix, so
   this instance of .status-item needs to wrap instead of inheriting the
   shared nowrap rule that clips it on narrow viewports. As a flex item,
   .status-item won't shrink below its max-content width just from
   white-space:normal alone (default flex min-width:auto) -- min-width:0
   below gives normal wrapping something to wrap against. */
.confirm-chip .status-item{ color:var(--amber-tint-text); white-space:normal; min-width:0; }
/* SCR-02-d1 (1C Part E, mockup delta, round 2): JIT trailing attribution
   ("— for <Member>") lives on its own full-width line below the chip's
   status text, inside a column wrapper -- NOT squeezed inline beside the
   Confirm/Edit buttons (round 1 tried that and the longer "— for <Member>"
   line escaped the amber chip / the parent card's right border on narrow
   viewports; round 2 is the shipped fix, matching Iris's recommendation). */
.confirm-chip-main{ display:flex; flex-direction:column; gap:3px; flex:1 1 220px; min-width:0; }
.confirm-chip .attribution{ display:block; font-weight:500; }
.quick-add-row{ display:flex; gap:8px; margin-bottom:16px; }
.quick-add-row input{
  flex:1; border:1px solid var(--line); border-radius:var(--radius-sm); padding:9px 11px;
  font-size:14px; font-family:inherit;
}

/* ---------- buttons (shared) ---------- */
.btn-primary{
  background:var(--charcoal); color:#FBF6EE; border:none;
  padding:14px 18px; font-size:14.5px; font-weight:700; border-radius:var(--radius-md); cursor:pointer;
}
.btn-primary:hover{ background:#443A31; }
.btn-primary:disabled{ opacity:.5; cursor:not-allowed; }
.btn-secondary{
  border:1px solid var(--line); background:#fff; color:var(--charcoal-soft);
  font-size:12.5px; font-weight:700; padding:9px 14px; border-radius:999px; cursor:pointer;
}
.btn-secondary:hover{ background:var(--neutral-chip-bg); }
.icon-btn{
  width:32px; height:32px; border-radius:50%; border:1px solid var(--line); background:#fff;
  font-size:14px; cursor:pointer; display:flex; align-items:center; justify-content:center;
}
.icon-btn.approve[aria-pressed="true"]{ background:var(--sage-tint); border-color:var(--sage); color:var(--sage-tint-text); }

/* ---------- list approval ---------- */
.approval-columns{ display:flex; flex-direction:column; gap:22px; }
@media (min-width:900px){
  .approval-columns{ flex-direction:row; gap:24px; align-items:flex-start; }
  .approval-columns > div{ flex:1; }
}
.meal-group-heading{
  font-size:12.5px; font-weight:700; color:var(--terracotta-dark);
  margin:16px 0 8px; text-transform:uppercase; letter-spacing:.03em;
}
.meal-group-heading:first-of-type{ margin-top:0; }
.list-row{ display:flex; align-items:center; gap:10px; min-height:58px; padding:10px 12px; border-bottom:1px solid var(--line); }
.tlist .list-row:last-child{ border-bottom:none; }
.list-num{
  flex:0 0 24px; height:24px; border-radius:50%;
  background:var(--terracotta-tint); color:var(--terracotta-tint-text);
  font-size:12px; font-weight:800; display:flex; align-items:center; justify-content:center;
}
.list-info{ flex:1; min-width:0; }
.list-item-name{ font-weight:700; font-size:14px; }
.list-item-note{ font-size:12px; color:var(--charcoal-soft); margin-top:1px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.list-actions{ display:flex; gap:4px; flex-shrink:0; }
.already-row{ display:flex; align-items:center; gap:10px; min-height:52px; padding:10px 12px; border-bottom:1px solid var(--line); }
.tlist .already-row:last-child{ border-bottom:none; }
.already-check{
  flex:0 0 20px; height:20px; border-radius:6px; background:var(--sage); color:#fff;
  display:flex; align-items:center; justify-content:center; font-size:12px;
}
.skip-chip{ margin-left:auto; font-size:11.5px; font-weight:700; color:var(--charcoal-faint); white-space:nowrap; }
.approve-bar{
  position:sticky; bottom:0; margin-top:18px;
  background:linear-gradient(180deg, rgba(251,246,238,0) 0%, var(--cream) 30%); padding-top:14px;
}
.approve-all-btn{
  width:100%; background:var(--charcoal); color:#FBF6EE; border:none;
  padding:16px; font-size:15px; font-weight:700; border-radius:var(--radius-md); cursor:pointer;
}
.approve-all-btn:disabled{ opacity:.5; cursor:not-allowed; }
.approve-all-sub{ text-align:center; font-size:12.5px; color:var(--charcoal-soft); margin-top:8px; }
.approve-all-sub strong{ color:var(--charcoal); }

/* ---------- cart status ---------- */
.action-strip{ margin-bottom:18px; }
.action-card{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; min-height:56px; padding:11px 14px; border-bottom:1px solid var(--line); }
.tlist .action-card:last-child{ border-bottom:none; }
.action-title{ font-weight:700; font-size:13.5px; flex:1; min-width:150px; }
.action-sub{ font-size:11.5px; color:var(--charcoal-faint); width:100%; }

/* ---------- item detail modal ---------- */
.modal-backdrop{
  position:fixed; inset:0; background:rgba(23,19,16,.52);
  display:none; align-items:flex-end; justify-content:center; z-index:700; padding:0;
}
.modal-backdrop.open{ display:flex; }
.item-modal{
  background:var(--cream); width:100%; max-width:520px; max-height:88vh;
  border-radius:22px 22px 0 0; overflow-y:auto; padding:18px 18px 26px;
  box-shadow:0 -10px 30px rgba(0,0,0,.28);
}
@media (min-width:900px){
  .modal-backdrop{ align-items:center; }
  .item-modal{ border-radius:var(--radius-lg); max-height:80vh; padding:24px 26px 30px; }
}
.modal-top{ display:flex; align-items:flex-start; justify-content:space-between; gap:10px; margin-bottom:4px; }
.modal-drag{ width:40px; height:4px; background:var(--line); border-radius:99px; margin:0 auto 14px; }
@media (min-width:900px){ .modal-drag{ display:none; } }
.modal-close{
  border:none; background:var(--neutral-chip-bg); color:var(--charcoal-soft);
  width:30px; height:30px; border-radius:50%; font-size:15px; cursor:pointer; flex-shrink:0;
}
.detail-item-name{ font-size:19px; font-weight:700; margin-bottom:6px; }
.detail-item-status{ margin-bottom:14px; }
.field-group{ margin-bottom:16px; }
.field-label{ font-size:12.5px; font-weight:700; color:var(--charcoal-soft); text-transform:uppercase; letter-spacing:.03em; margin-bottom:7px; display:block; }
.segmented{ display:flex; flex-wrap:wrap; gap:6px; }
.seg-btn{
  border:1px solid var(--line); background:var(--cream-card); color:var(--charcoal-soft);
  font-size:12.5px; font-weight:700; padding:8px 12px; border-radius:999px; cursor:pointer;
}
.seg-btn[aria-pressed="true"]{ background:var(--charcoal); color:#FBF6EE; border-color:var(--charcoal); }
.seg-btn.chip-toggle[aria-pressed="true"]{ background:var(--sage); border-color:var(--sage); }
.evidence-field{ display:flex; flex-direction:column; gap:6px; margin-top:10px; }
.evidence-field input{
  border:1px solid var(--line); border-radius:var(--radius-sm); padding:10px 12px;
  font-size:14px; font-family:inherit; background:#fff; color:var(--charcoal);
}
.evidence-field label{ font-size:12.5px; color:var(--charcoal-soft); font-weight:600; }
.field-error{ font-size:12px; color:var(--rust-tint-text); font-weight:700; margin-top:6px; }
.save-btn{
  width:100%; background:var(--charcoal); color:#FBF6EE; border:none;
  padding:14px; font-size:14.5px; font-weight:700; border-radius:var(--radius-md); cursor:pointer; margin-top:6px;
}
.save-btn:disabled{ opacity:.5; cursor:not-allowed; }
.save-hint{ font-size:12px; color:var(--charcoal-faint); text-align:center; margin-top:8px; }
.history-list{ display:flex; flex-direction:column; gap:8px; }
.history-entry{
  background:var(--cream-card); border:1px solid var(--line); border-radius:var(--radius-md);
  padding:10px 12px; font-size:12.5px;
}
.history-entry .h-meta{ font-weight:700; color:var(--charcoal-soft); margin-bottom:3px; }
.history-entry.new{ border-color:var(--sage); background:var(--sage-tint); }
.history-entry.new .h-meta{ color:var(--sage-tint-text); }

/* ---------- settings ---------- */
.settings-count{ font-size:12.5px; color:var(--charcoal-soft); margin-bottom:10px; }
.settings-row-main{ display:flex; align-items:center; gap:10px; flex:1; min-width:0; }
.avatar-circle{
  width:34px; height:34px; border-radius:50%; flex-shrink:0;
  background:var(--terracotta-tint); color:var(--terracotta-tint-text);
  display:flex; align-items:center; justify-content:center; font-weight:800; font-size:13px;
}
.settings-name{ font-weight:700; font-size:14px; }
.settings-role{ font-size:12px; color:var(--charcoal-faint); }
.settings-actions{ display:flex; gap:6px; flex-shrink:0; align-items:center; }
.btn-text{
  border:1px solid var(--line); background:#fff; color:var(--charcoal-soft);
  font-size:12px; font-weight:700; padding:7px 11px; border-radius:999px; cursor:pointer;
}
.btn-text:disabled{ opacity:.6; cursor:not-allowed; }
.add-person-btn{
  border:1px dashed var(--charcoal-faint); background:transparent; color:var(--charcoal-soft);
  font-size:13px; font-weight:700; padding:10px 14px; border-radius:var(--radius-sm);
  cursor:pointer; width:100%; text-align:center; margin-bottom:22px;
}
.add-person-row{ display:flex; gap:8px; margin-bottom:22px; }
.add-person-row input{
  flex:1; border:1px solid var(--line); border-radius:var(--radius-sm); padding:9px 11px; font-size:14px;
}

/* one closed card per person: name and what is on; one tap opens it */
.diet-card > summary{ list-style:none; }
.diet-card > summary::-webkit-details-marker{ display:none; }
.diet-card:not([open]) > summary{ border-bottom:none; }
.diet-card .tr-chevron{ transition:transform .15s ease; }
.diet-card[open] .tr-chevron{ transform:rotate(90deg); }
/* a portion or calorie setting: label, input, then its own Save row, so the next label starts on a clean line */
.dial-field{ display:flex; flex-direction:column; align-items:flex-start; gap:6px; margin-bottom:18px; }
.dial-field label{ width:100%; }
.dial-field input{ width:100%; box-sizing:border-box; }

/* Settings reading and rhythm. --charcoal-soft measures 6.14:1 on the note background and 7.03:1 on the page (the faint token was
   3.12:1 and 3.56:1). Descriptions wrap instead of cutting off. One space above every heading, one Save button: 48px, the primary style. */
#screen-settings .tr-desc{ white-space:normal; overflow:visible; text-overflow:clip; }
#screen-settings .stub-note{ font-size:13px; color:var(--charcoal-soft); }
#screen-settings h3.group-title{ margin:28px 0 10px; color:var(--charcoal-soft); }
#settingsBody > h3.group-title:first-child{ margin-top:0; }
#screen-settings .diet-tier-label, #screen-settings .settings-role{ color:var(--charcoal-soft); }
#screen-settings .btn-primary{ min-height:48px; padding:0 18px; }
.learn-row{
  display:flex; flex-direction:column; align-items:flex-start; gap:2px; width:100%; min-height:56px; box-sizing:border-box;
  margin-bottom:24px; padding:10px 14px; text-align:left; font-family:inherit; color:var(--charcoal); cursor:pointer;
  background:var(--cream-card); border:1px solid var(--line); border-radius:var(--radius-md);
}
.learn-modal{ max-width:860px; }
.learn-video{ display:block; width:100%; margin-top:8px; aspect-ratio:16 / 9; max-height:calc(100vh - 130px); background:var(--charcoal); border-radius:var(--radius-sm); }
.leftovers-row{ flex-wrap:wrap; align-items:center; }
.leftovers-row label{ flex:0 0 100%; }
.leftovers-row select{ flex:1; min-width:0; min-height:48px; box-sizing:border-box; }

/* diet tier chips */
.diet-tier-block{ margin-bottom:14px; }
.diet-tier-label{ font-size:11.5px; font-weight:800; text-transform:uppercase; color:var(--charcoal-faint); margin-bottom:6px; }
.diet-toggle-row{ display:flex; align-items:center; justify-content:space-between; gap:10px; padding:8px 0; border-bottom:1px solid var(--line); }
.diet-toggle-row:last-child{ border-bottom:none; }
.diet-toggle-name{ font-size:13px; font-weight:600; }
.diet-toggle-strict{ font-size:11px; color:var(--charcoal-faint); }

/* ---------- toggle switch ---------- */
.toggle-row .tr-main{ flex:1; }
.toggle-switch{
  position:relative; width:46px; height:26px; flex-shrink:0;
  border-radius:999px; border:1px solid var(--line); background:var(--neutral-chip-bg);
  cursor:pointer; padding:0; transition:background .15s ease, border-color .15s ease;
}
.toggle-switch[aria-checked="true"]{ background:var(--sage); border-color:var(--sage); }
.toggle-thumb{
  position:absolute; top:2px; left:2px; width:20px; height:20px; border-radius:50%;
  background:#fff; box-shadow:0 1px 3px rgba(0,0,0,.25); transition:transform .15s ease;
}
.toggle-switch[aria-checked="true"] .toggle-thumb{ transform:translateX(20px); }
/* Settings email switch: 48x48 hit area, the 46x26 track is drawn by ::before so the look is unchanged (gate G5). */
#emailOptinToggle{ width:48px; height:48px; background:transparent; border:0; border-radius:0; }
#emailOptinToggle::before{ content:""; position:absolute; left:1px; top:11px; width:46px; height:26px; box-sizing:border-box; border-radius:999px; border:1px solid var(--line); background:var(--neutral-chip-bg); transition:background .15s ease, border-color .15s ease; }
#emailOptinToggle[aria-checked="true"]::before{ background:var(--sage); border-color:var(--sage); }
#emailOptinToggle .toggle-thumb{ top:13px; left:3px; }

.tech-details{
  background:var(--cream-card); border:1px solid var(--line);
  border-radius:var(--radius-md); padding:12px 14px; margin-top:4px; margin-bottom:8px;
  font-size:12.5px; color:var(--charcoal-soft);
}
.tech-details summary{ cursor:pointer; font-weight:700; color:var(--charcoal); }
.tech-details p{ margin:8px 0 0; }

/* ---------- SCR-00 Google sign-in gate ----------
   Card look reuses .identity-card's own tokens verbatim (same background,
   border, radius, spacing) -- per the approved mockup's own provenance
   note: "This card look is already in the app. Same colors, same spacing,
   same rounded corners." No fixed-position dimmer: like #identityOverlay,
   this sits in normal flow and the body's own gradient shows through. */
.auth-card{
  max-width:420px; margin:60px auto; background:var(--cream-card);
  border:1px solid var(--line); border-radius:var(--radius-lg); padding:28px 24px; text-align:center;
}
.auth-title{ font-size:20px; margin-bottom:8px; }
.auth-sub{ font-size:13.5px; color:var(--charcoal-soft); margin:0 0 18px; }
/* a plain notice line (left bar, no fill), so it does not read as a button */
.auth-notice{ margin:0 0 14px; padding:2px 0 2px 12px; border-left:4px solid var(--amber-tint-text); color:var(--amber-tint-text); font-size:15px; font-weight:600; }
.auth-notice[hidden]{ display:none; }
.auth-gis-slot{
  display:flex; align-items:center; justify-content:center; min-height:44px;
  font-size:12.5px; color:var(--charcoal-faint);
}
/* Denied-state action is a link, not a button -- approved mockup reuses the
   page's own global `a` token (terracotta-dark, underlined), not .btn-secondary. */
.auth-link-btn{
  border:none; background:none; padding:0; font:inherit;
  color:var(--terracotta-dark); font-weight:700; text-decoration:underline; cursor:pointer;
}

/* ---------- identity picker (first-run) ---------- */
.identity-card{
  max-width:420px; margin:60px auto; background:var(--cream-card);
  border:1px solid var(--line); border-radius:var(--radius-lg); padding:28px 24px; text-align:center;
}
.identity-card h2{ font-size:20px; margin-bottom:8px; }
.identity-card p{ font-size:13.5px; color:var(--charcoal-soft); margin-bottom:18px; }
.identity-choice-list{ display:flex; flex-direction:column; gap:8px; }
.identity-choice-btn{
  border:1px solid var(--line); background:#fff; padding:12px 16px; border-radius:var(--radius-md);
  font-size:14px; font-weight:700; cursor:pointer; text-align:left;
}
.identity-choice-btn:hover{ background:var(--neutral-chip-bg); }

/* ---------- toast ---------- */
#toast{
  position:fixed; bottom:22px; left:50%; transform:translateX(-50%) translateY(20px);
  background:var(--charcoal); color:#FBF6EE; padding:11px 18px; border-radius:999px;
  font-size:13px; font-weight:600; box-shadow:0 8px 20px rgba(0,0,0,.25);
  opacity:0; pointer-events:none; transition:opacity .2s ease, transform .2s ease;
  z-index:800; max-width:88vw; text-align:center;
}
#toast.show{ opacity:1; transform:translateX(-50%) translateY(0); }

.app-footer{
  max-width:1180px; margin:0 auto; padding:14px 16px 26px; font-size:12px; color:var(--charcoal-faint);
}
