/* FriendlyFridge design system v0.4 (Figma "Team-01_prototype_fridgegard", Nov 26).
   Cream ground, mustard cards, forest ink, Inter throughout, hard offset
   shadows, line-art illustration. Light theme only by design.
   v0.4: sage panels (--sage) replace the light green for info cards; nav and
   row radius is 8 px; sponsor tier badges are 4 px tags with a 16 px shield;
   Home's Marketplace card is cream inside an 8 px mustard frame.
   Layout: the app sits in a framed phone column on desktop and fills the
   screen on a phone. Staff mode adds a dark bar on top; nothing else changes.
   The shared sheet view is a single column of tables. */
:root {
  --bg: #F9F3E7;
  --backdrop: #EFE8D6;
  --surface: #FCFAF2;
  --card: #F4CE55;
  --primary: #2D5743;
  --primary-ink: #1F3F30;
  --accent: #9DD696;
  --accent-soft: #E3EFDC;
  --text: #1A1A1A;
  --text-2: #5C584E;
  --border: #E8E1D0;
  --tag: #EFEEE6;
  --disabled: #D9D7CE;
  --disabled-ink: #6E6B62;
  --danger: #B23B2A;
  --danger-ink: #8E2B1D;
  --danger-soft: #F8DCD6;
  --danger-corner: #F08A78;
  --pending-soft: #FBEFC4; /* saved on the phone, not uploaded yet */
  --staff: #16241C; /* staff mode bar only */
  --on-primary: #FCFAF2;
  --sage: #E5EEDC;          /* Figma nav-sage: info panels, selected menu item, metric cards */
  --activity: #FFF0B9;      /* Figma activity-surface: pick-up activity accordion */
  --ink-strong: #15231C;    /* Food details headings */
  --line-soft: #C5CCBE;     /* chips, search and merchant card outlines */
  --r-nav: 8px;             /* Figma nav-radius: menu, rows, panels */

  --shadow-card: 4px 4px 0 rgba(0, 0, 0, 0.5);

  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'Cascadia Mono', Menlo, Consolas, monospace;

  --r-sm: 5px;  /* controls */
  --r-md: 6px;  /* cards */
  --r-lg: 7px;  /* nav tab */
  color-scheme: light;
}

/* Inter (SIL Open Font License, fonts/OFL.txt), kept in the app so it loads with no signal. */
@font-face {
  font-family: 'Inter';
  font-weight: 400 900;
  font-display: swap;
  src: url(fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-weight: 400 900;
  font-display: swap;
  src: url(fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

*, *::before, *::after { box-sizing: border-box; }
html, body, #app { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
img { max-width: 100%; display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- shared components ---------- */
.btn {
  min-height: 48px;
  padding: 0 20px;
  border-radius: var(--r-sm);
  border: 1.5px solid transparent;
  font-weight: 700;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
}
.btn svg { width: 22px; height: 22px; flex-shrink: 0; }
.btn:active:not(:disabled) { transform: translate(1px, 1px); }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover:not(:disabled) { background: var(--primary-ink); }
.btn-outline { background: var(--surface); color: var(--text); border-color: var(--text); }
.btn:disabled { background: var(--disabled); color: var(--disabled-ink); border-color: var(--disabled); }
.btn-block { width: 100%; }

.text-link {
  border: none;
  background: none;
  padding: 0;
  min-height: 32px;
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.back-link {
  align-self: flex-start;
  border: none;
  background: none;
  padding: 0;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 12px; /* Figma: "← Marketplace", Bold 12 */
  color: var(--primary);
}
.back-link svg { width: 14px; height: 14px; }
.inline-link {
  border: none;
  background: none;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  font-size: 13px;
  color: var(--primary);
  min-height: 32px;
}
.inline-link svg { width: 14px; height: 14px; }

.eyebrow { font-weight: 800; font-size: 11px; line-height: 14px; letter-spacing: 0.5px; text-transform: uppercase; }
.meta { font-weight: 500; font-size: 12px; line-height: 16px; color: var(--text-2); }
.dot { width: 10px; height: 10px; border-radius: 999px; background: var(--primary); flex-shrink: 0; }

.pill {
  align-self: flex-start;
  height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--primary);
  font-weight: 800;
  font-size: 13px;
}
.date-tag { border-radius: 3px; padding: 5px 6px; font-weight: 500; font-size: 12px; background: var(--tag); color: var(--text); }
.date-tag.soon { background: var(--danger-soft); color: var(--danger-ink); font-weight: 700; }

.field {
  height: 48px;
  width: 100%;
  border: 1.5px solid var(--text);
  border-radius: var(--r-sm);
  padding: 0 14px;
  font-size: 15px;
  background: var(--surface);
}
.select { appearance: auto; }

.switch {
  width: 52px;
  height: 30px;
  flex-shrink: 0;
  border: 1.5px solid var(--text);
  border-radius: 999px;
  background: var(--disabled);
  padding: 2px;
  display: flex;
}
.switch::after { content: ""; width: 23px; height: 23px; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--text); transition: transform 0.15s; }
.switch[aria-checked="true"] { background: var(--accent); }
.switch[aria-checked="true"]::after { transform: translateX(21px); }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  background: var(--primary);
  color: var(--on-primary);
  padding: 12px 18px;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--text);
  box-shadow: var(--shadow-card);
  font-weight: 700;
  font-size: 15px;
  z-index: 60;
  max-width: calc(100% - 32px);
  text-align: center;
}

/* ---------- phone ---------- */
.phone-stage { height: 100%; display: flex; justify-content: center; align-items: center; }
.phone {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}
@media (min-width: 600px) {
  .phone-stage { padding: 24px; }
  .phone { max-width: 393px; height: min(852px, 100%); border: 2px solid var(--text); border-radius: 28px; }
}
.ph-banner {
  flex-shrink: 0;
  background: var(--backdrop);
  border-bottom: 1px solid #D9D2BF;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px 20px;
  display: flex;
  gap: 8px;
  align-items: center;
  font-weight: 600;
  font-size: 13px;
}
.ph-banner svg { width: 16px; height: 16px; flex-shrink: 0; }
.ph-main {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-top: calc(40px + env(safe-area-inset-top, 0px));
  padding-bottom: 24px;
  padding-left: max(24px, env(safe-area-inset-left, 0px));
  padding-right: max(24px, env(safe-area-inset-right, 0px));
  display: flex;
  flex-direction: column;
  gap: 18px;
}
/* Keep every block at its own height; the main area scrolls instead of squeezing them. */
.ph-main > * { flex-shrink: 0; }
.ph-banner + .ph-main { padding-top: 24px; }
.ph-main.tall { padding-top: calc(80px + env(safe-area-inset-top, 0px)); }
.ph-title { font-weight: 800; font-size: 28px; line-height: 34px; }
.ph-title.forest { color: var(--primary); }
.ph-title.deep { font-weight: 900; color: var(--primary-ink); }
.ph-sub { font-weight: 500; font-size: 15px; line-height: 21px; }
.spacer { flex: 1; }

.form-card {
  background: var(--card);
  border: 1.5px solid var(--text);
  border-radius: var(--r-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.form-card h2 { font-weight: 800; font-size: 20px; margin-bottom: 4px; }
.form-card label { font-weight: 700; font-size: 13px; }
.form-card .hint { font-weight: 500; font-size: 13px; line-height: 18px; }
.welcome {
  background: var(--accent);
  border: 1.5px solid var(--text);
  border-radius: var(--r-md);
  padding: 18px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.welcome strong { font-weight: 900; font-size: 19px; }
.welcome span { font-size: 14px; }
.greeting { display: flex; flex-direction: column; gap: 2px; }
.greeting span { font-size: 16px; }
.hero-card {
  background: var(--card);
  border: 1.5px solid var(--primary);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
  padding: 20px 10px 18px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  color: var(--primary);
}
.fridge-chip {
  background: var(--surface);
  border: 1px solid var(--primary);
  border-radius: var(--r-sm);
  min-height: 56px;
  padding: 8px 10px 8px 12px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.fridge-chip svg { width: 28px; height: 28px; flex-shrink: 0; }
.fridge-chip .eyebrow { font-weight: 700; font-size: 9px; line-height: 11px; }
.fridge-chip .name { font-weight: 700; font-size: 16px; line-height: 20px; }
.status-line { display: flex; flex-direction: column; gap: 2px; padding: 0 4px; }
.status-line strong { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 20px; line-height: 26px; }
.status-line > span { padding-left: 18px; font-size: 12px; }
.count-row { display: flex; align-items: flex-end; gap: 10px; padding: 0 4px; }
.count-row .count { font-weight: 900; font-size: 58px; line-height: 58px; font-variant-numeric: tabular-nums; }
.count-row .label { flex: 1; font-weight: 800; font-size: 16px; padding-bottom: 6px; }
.hero-card .btn { min-height: 44px; border-radius: var(--r-sm); font-size: 19px; }
.hero-card .note { text-align: center; font-weight: 500; font-size: 11px; line-height: 14px; }
/* The illustration rises beside the greeting, as in the design. */
.tagline-row { position: relative; padding-top: 16px; }
.ph-main > .tagline-row:first-child { margin-top: 76px; } /* Figma 769:3605: the greeting sits low, near the card */
.tagline { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 10px; padding-bottom: 6px; color: var(--primary); max-width: calc(100% - 92px); }
.tagline strong { font-weight: 900; font-size: 25px; line-height: 1.15; }
.tagline span { font-weight: 500; font-size: 14px; line-height: 1.15; white-space: nowrap; }
.illustration { position: absolute; right: -9px; bottom: 1px; width: 124px; height: 147px; object-fit: cover; }

.inv-head { display: flex; flex-direction: column; gap: 4px; }
.inv-head .where { font-weight: 800; font-size: 15px; }
.open-line { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--primary); }
.open-line .dot { width: 8px; height: 8px; }
.search {
  height: 44px;
  border: 1.5px solid var(--primary);
  border-radius: var(--r-sm);
  background: var(--surface);
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.search svg { width: 16px; height: 16px; flex-shrink: 0; }
.search input { flex: 1; min-width: 0; border: none; background: transparent; font-size: 15px; height: 100%; }
.search input:focus { outline: none; }
.search:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }
.filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.filters button {
  height: 40px;
  border: 1.5px solid var(--primary);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--primary);
  font-weight: 700;
  font-size: 14px;
}
.filters button[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); }
.result-meta { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-2); }
.filter-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.filter-toggle, .sort-toggle { border: none; background: none; padding: 0; min-height: 32px; color: var(--primary); }
.filter-toggle { font-weight: 700; font-size: 14px; }
.sort-toggle { font-weight: 500; font-size: 12px; }
.diet-card {
  background: var(--surface);
  border: 1.5px solid var(--text);
  border-radius: var(--r-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.diet-head { display: flex; flex-direction: column; gap: 2px; }
.diet-head strong { font-weight: 800; font-size: 16px; color: var(--primary); }
.diet-head span { font-size: 12px; color: var(--text-2); }
.diet-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.diet-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  border: 1.5px solid var(--primary);
  border-radius: var(--r-sm);
  background: var(--surface);
  font-size: 14px;
  color: var(--primary);
  cursor: pointer;
}
.diet-opt:has(input:checked) { background: var(--accent-soft); font-weight: 700; }
.diet-opt input { width: 18px; height: 18px; margin: 0; accent-color: var(--primary); flex-shrink: 0; }
.diet-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.diet-foot .btn { min-height: 40px; padding: 0 18px; font-size: 14px; }
.food-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.food-card {
  text-align: left;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--primary);
  border-radius: var(--r-md);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.food-card img { width: 100%; height: 112px; object-fit: cover; border-radius: 3px; }
.food-card .name { font-weight: 800; font-size: 16px; line-height: 20px; }
.food-card .qty { font-size: 12px; color: var(--text-2); }
.food-card.empty { opacity: 0.55; }
.empty-note { grid-column: 1 / -1; padding: 16px; text-align: center; color: var(--text-2); }

.detail-photo { width: 100%; height: 150px; object-fit: cover; border-radius: var(--r-md); }
.detail-head { display: flex; flex-direction: column; gap: 6px; }
.detail-head h2 { font-weight: 900; font-size: 22px; color: var(--primary-ink); }
.detail-head .loc { font-size: 13px; }
.info-list { background: var(--surface); border: 1px solid var(--primary); border-radius: var(--r-md); padding: 4px 14px; }
.info-list > div { padding: 10px 0; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 2px; }
.info-list > div:last-child { border-bottom: none; }
.info-list h3 { font-weight: 800; font-size: 15px; }
.info-list span { font-size: 13px; }
.center-note { text-align: center; font-size: 12px; }

.guide-card { background: var(--card); border: 1.5px solid var(--text); border-radius: var(--r-md); padding: 16px 20px; }
.guide-card ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.guide-card li { display: flex; flex-direction: column; gap: 2px; }
.guide-card strong { font-weight: 800; font-size: 14px; }
.guide-card span { font-size: 12.5px; line-height: 17px; }
.agree { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 21px; }
.agree input { width: 24px; height: 24px; flex-shrink: 0; accent-color: var(--primary); margin: 0; }

.section-title { font-weight: 800; font-size: 20px; color: var(--primary); }

.profile-card { background: var(--surface); border: 1px solid var(--primary); border-radius: var(--r-md); padding: 4px 16px; }
.profile-row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.profile-row:last-child { border-bottom: none; }
.profile-row .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.profile-row .title { font-weight: 800; font-size: 15px; }
.profile-row .sub { font-size: 13px; color: var(--text-2); }
.profile-row .select { height: 40px; width: auto; max-width: 170px; }
.confirm { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--r-md); background: var(--danger-soft); color: var(--danger-ink); border: 1.5px solid var(--danger); }
.confirm .row { display: flex; gap: 10px; flex-wrap: wrap; }

.nav {
  flex-shrink: 0;
  min-height: 72px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1.5px solid var(--text);
  background: var(--bg);
}
.nav button {
  border: none;
  margin: 1px;
  border-radius: var(--r-lg);
  background: transparent;
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-weight: 700;
  font-size: 12px;
}
.nav button svg { width: 28px; height: 28px; }
.nav button[aria-current="page"] { background: var(--accent); }
.nav button:disabled { color: var(--disabled-ink); }

.soft-note { background: var(--accent-soft); border-radius: var(--r-md); padding: 10px 14px; font-size: 13px; line-height: 18px; }
.btn-outline:disabled { background: var(--disabled); color: var(--disabled-ink); border-color: var(--disabled); }

/* sign in: student or staff */
.form-card .label { font-weight: 700; font-size: 13px; }
.mode-switch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mode-switch button {
  min-height: 44px;
  border: 1.5px solid var(--text);
  border-radius: var(--r-sm);
  background: var(--surface);
  font-weight: 700;
  font-size: 15px;
}
.mode-switch button[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }

/* ---------- staff mode ---------- */
.staff-bar {
  flex-shrink: 0;
  background: var(--staff);
  color: var(--on-primary);
  padding: calc(14px + env(safe-area-inset-top, 0px)) max(24px, env(safe-area-inset-right, 0px)) 12px max(24px, env(safe-area-inset-left, 0px));
  display: flex;
  align-items: center;
  gap: 10px;
}
.staff-badge {
  height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 3px;
  background: var(--card);
  color: var(--staff);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.5px;
}
.staff-bar .name { flex: 1; min-width: 0; font-weight: 700; font-size: 14px; }
.staff-bar .off { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; color: var(--accent-soft); }
.staff-bar .off svg { width: 14px; height: 14px; }
.ph-main.staff { padding-top: 20px; gap: 14px; }
.head { display: flex; flex-direction: column; gap: 4px; }
.head .meta { font-size: 13px; }

.status-card {
  border-radius: var(--r-md);
  padding: 12px 14px;
  display: flex;
  gap: 10px;
  align-items: center;
  font-weight: 700;
  font-size: 14px;
  text-align: left;
  color: var(--text);
}
.status-card svg { width: 20px; height: 20px; flex-shrink: 0; }
.status-card.done { background: var(--accent-soft); color: var(--primary-ink); }
.status-card.pending { background: var(--pending-soft); border: 1.5px solid var(--text); align-items: flex-start; }
.status-card.pending > span { display: flex; flex-direction: column; gap: 2px; }
.status-card.pending strong { font-weight: 800; font-size: 15px; }
.status-card.pending span span { font-weight: 500; font-size: 13px; line-height: 18px; }

.stock-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.stock-row, .check-row {
  background: var(--surface);
  border: 1px solid var(--primary);
  border-radius: var(--r-md);
  padding: 8px 12px 8px 8px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.stock-row img, .check-row img { width: 48px; height: 48px; object-fit: cover; border-radius: 3px; flex-shrink: 0; }
.stock-row.none { background: var(--backdrop); }
.stock-row.none img { opacity: 0.55; }
.stock-row .body, .check-row .body { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.stock-row .name, .check-row .name { font-weight: 800; font-size: 15px; }
.stock-row .sub, .check-row .sub { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; color: var(--text-2); }
.stock-row .n, .counter .n, .qty-box .n { font-weight: 900; color: var(--primary); font-variant-numeric: tabular-nums; }
.stock-row .n { font-size: 24px; }
.tag { display: inline-flex; align-items: center; min-height: 20px; padding: 1px 6px; border-radius: 3px; font-weight: 700; font-size: 11px; color: var(--text); }
.tag.pending { background: var(--pending-soft); border: 1px solid var(--text); }
.tag.report, .tag.past { background: var(--danger-soft); color: var(--danger-ink); }
.check-row { padding: 8px; gap: 10px; }
.check-row.changed { border-width: 1.5px; }
.check-row .text-link { min-height: 28px; font-size: 12px; }
.counter { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.counter .n { width: 30px; text-align: center; font-size: 22px; }
.step-btn {
  width: 44px;
  height: 44px;
  border: 1.5px solid var(--text);
  border-radius: var(--r-sm);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-btn svg, .qty-box svg { width: 18px; height: 18px; }
.step-btn:disabled, .qty-box button:disabled { opacity: 0.4; }

/* add food */
.add-form { padding: 16px; gap: 10px; }
.add-top { display: flex; gap: 12px; align-items: stretch; }
.fld { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.fld-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.add-form .field { height: 44px; padding: 0 10px; }
.photo-btn {
  position: relative;
  width: 88px;
  height: 88px;
  flex-shrink: 0;
  border: 1.5px solid var(--text);
  border-radius: var(--r-sm);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 12px;
  cursor: pointer;
  overflow: hidden;
}
.photo-btn svg { width: 26px; height: 26px; }
.photo-btn img { width: 100%; height: 100%; object-fit: cover; }
.photo-btn:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }
.qty-box {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1.5px solid var(--text);
  border-radius: var(--r-sm);
  background: var(--surface);
  overflow: hidden;
}
.qty-box button { width: 44px; height: 100%; border: none; background: transparent; display: flex; align-items: center; justify-content: center; }
.qty-box button:first-child { border-right: 1.5px solid var(--text); }
.qty-box button:last-child { border-left: 1.5px solid var(--text); }
.qty-box .n { font-size: 18px; }
.diet-set { margin: 0; padding: 0; border: none; min-width: 0; }
.diet-set legend { font-weight: 700; font-size: 13px; padding: 0 0 6px; }
.add-form .diet-opt { border: 1px solid var(--text); color: var(--text); min-height: 40px; padding: 0 10px; }
.add-form .agree { font-weight: 600; font-size: 14px; line-height: 19px; padding-top: 2px; }
.add-form .agree input { width: 22px; height: 22px; }

/* uploads */
.queue-card {
  background: var(--pending-soft);
  border: 1.5px solid var(--text);
  border-radius: var(--r-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.queue-card > strong { font-weight: 800; font-size: 16px; }
.queue-card .hint { text-align: center; font-size: 13px; }
.line-list { margin: 0; padding: 0; list-style: none; background: var(--surface); border: 1px solid var(--text); border-radius: var(--r-sm); }
.line-list.framed { border-color: var(--primary); border-radius: var(--r-md); }
.line-list li { padding: 10px 12px; border-bottom: 1px solid var(--border); display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.line-list li:last-child { border-bottom: none; }
.line-list svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; color: var(--primary); }
.line-list .what { flex: 1; min-width: 0; font-weight: 700; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.line-list .note { font-weight: 500; font-size: 12px; color: var(--danger-ink); }
.line-list .when { font-size: 12px; color: var(--text-2); white-space: nowrap; }
.list-title { font-weight: 800; font-size: 15px; }
.nav-icon { position: relative; display: inline-flex; }
.nav-badge {
  position: absolute;
  top: -4px;
  right: -10px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--card);
  border: 1.5px solid var(--text);
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- shared sheet view ---------- */
.sheet-body, .sheet-body #app, .dash-body, .dash-body #app { height: auto; min-height: 100%; }
.sheet {
  max-width: 760px;
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 32px max(16px, env(safe-area-inset-left, 0px));
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.sheet header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.sheet header .eyebrow { color: var(--text-2); }
.sheet h1 { font-weight: 800; font-size: 22px; line-height: 28px; color: var(--primary); }
.sheet header .btn { min-height: 40px; font-size: 14px; padding: 0 14px; }
.sheet-urls { font-size: 14px; }
.sheet code { font-family: var(--mono); font-weight: 700; background: var(--surface); border: 1px solid var(--border); border-radius: 3px; padding: 1px 6px; }
.sheet-card { background: var(--surface); border: 1.5px solid var(--text); border-radius: var(--r-md); padding: 14px 16px; overflow-x: auto; }
.sheet-card h2 { font-weight: 800; font-size: 15px; margin-bottom: 6px; }
.sheet-card h2 .meta { font-weight: 500; margin-left: 6px; }
.sheet table { width: 100%; border-collapse: collapse; font-size: 14px; }
.sheet th { text-align: left; font-weight: 700; font-size: 12px; color: var(--text-2); padding: 4px 10px 4px 0; border-bottom: 1px solid var(--text-2); white-space: nowrap; }
.sheet td { padding: 7px 10px 7px 0; border-bottom: 1px solid var(--border); vertical-align: top; }
.sheet tr:last-child td { border-bottom: none; }
.sheet .num { text-align: right; font-weight: 800; color: var(--primary); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sheet tr.gone td { color: var(--text-2); }
.sheet tr.gone .num { color: var(--text-2); }
.sheet a { color: var(--primary); font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- food details (team frames, Nov 17) ---------- */
.ph-main > .pill { align-self: flex-start; }
.detail-card {
  background: var(--card);
  border: 1px solid var(--primary-ink);
  border-radius: var(--r-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--primary-ink);
}
.detail-card.row { flex-direction: row; align-items: center; gap: 10px; font-size: 16px; padding: 12px 14px; }
.detail-card.row svg { width: 22px; height: 22px; flex-shrink: 0; }
.detail-card.row strong { font-weight: 800; }
.detail-card h3 { font-weight: 800; font-size: 16px; }
.detail-card .sub { font-size: 13px; }
.detail-card .small { font-size: 12px; }
.info-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid #D9D2BF;
  border-radius: var(--r-md);
  background: var(--surface);
  font-size: 14px;
  color: var(--primary-ink);
  text-align: left;
}
.info-row svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--primary); }
.info-row.link { justify-content: space-between; font-weight: 700; }
.info-row.link span { text-decoration: underline; text-underline-offset: 3px; }
.info-row.link svg { width: 16px; height: 16px; color: var(--primary-ink); }
.info-more { font-size: 13px; padding: 0 4px; }
.report-link { align-self: center; }

/* ---------- update-the-count sheet and thanks dialog ---------- */
.overlay { position: absolute; inset: 0; z-index: 20; background: rgba(26, 26, 26, 0.38); display: flex; flex-direction: column; justify-content: flex-end; }
.overlay.center { justify-content: center; align-items: center; padding: 28px; }
.bottom-sheet {
  background: var(--bg);
  border-radius: 20px 20px 0 0;
  padding: 22px 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 92%;
  overflow-y: auto;
  color: var(--primary-ink);
}
.bottom-sheet > * { flex-shrink: 0; }
.sheet-top, .dialog-top { display: flex; justify-content: space-between; align-items: center; }
.bottom-sheet h2 { font-weight: 800; font-size: 24px; line-height: 30px; color: var(--primary); }
.bottom-sheet p { font-size: 15px; line-height: 21px; }
.bottom-sheet .small { font-size: 12px; line-height: 16px; }
.bottom-sheet h3 { font-weight: 800; font-size: 16px; padding-top: 6px; border-top: 1px solid #D9D2BF; margin-top: 4px; padding-top: 12px; }
.sheet-item { display: flex; gap: 12px; align-items: center; }
.sheet-item img { width: 56px; height: 56px; object-fit: cover; border-radius: 3px; }
.sheet-item > span { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.sheet-item strong { font-weight: 800; font-size: 16px; }
.icon-btn { width: 40px; height: 40px; margin: -8px -8px -8px 0; border: none; background: none; color: var(--primary); display: inline-flex; align-items: center; justify-content: center; }
.icon-btn svg { width: 20px; height: 20px; }
.count-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.count-opt { min-height: 44px; border: 1.5px solid var(--primary); border-radius: var(--r-md); background: var(--surface); color: var(--primary-ink); font-weight: 800; font-size: 16px; }
.count-opt.wide { grid-column: 1 / -1; }
.count-opt[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); }
.bottom-sheet .text-link { align-self: center; color: var(--primary-ink); }
.dialog {
  width: 100%;
  background: var(--bg);
  border: 1.5px solid var(--primary);
  border-radius: 14px;
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: var(--primary);
}
.dialog-top > svg { width: 34px; height: 34px; }
.dialog h2 { font-weight: 800; font-size: 22px; line-height: 28px; }
.dialog p { font-size: 15px; line-height: 21px; }

/* ---------- profile: 3-way choice ---------- */
.segmented { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.segmented button { min-height: 40px; padding: 0 6px; border: 1.5px solid var(--primary); border-radius: var(--r-sm); background: var(--surface); color: var(--primary); font-weight: 700; font-size: 13px; }
.segmented button[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); }
/* Food details is denser than other screens, as on the frames. */

/* ---------- telemetry dashboard (?mode=dashboard) ---------- */
body.dash-body { background: var(--bg); overflow: auto; height: auto; min-height: 100%; }
.dash { max-width: 1200px; margin: 0 auto; padding: 24px 28px 40px; display: flex; flex-direction: column; gap: 18px; }
.dash-head h1 { font-weight: 800; font-size: 28px; line-height: 34px; color: var(--primary); }
.dash-head .meta { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; }
.dash-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.dash-seg { display: inline-grid; grid-template-columns: repeat(3, auto); }
.dash-seg button { padding: 0 14px; }
.dash-check { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; min-height: 40px; }
.dash-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--primary); }
.dash-spacer { flex: 1; }
.dash-btn { min-height: 40px; font-size: 14px; padding: 0 14px; }
.tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.tile { background: var(--surface); border: 1px solid var(--primary); border-radius: var(--r-md); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.tile-label { font-weight: 700; font-size: 13px; color: var(--text-2); }
.tile strong { font-weight: 900; font-size: 30px; line-height: 36px; color: var(--primary-ink); font-variant-numeric: tabular-nums; }
.tile-sub { font-size: 12px; color: var(--text-2); }
.dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.dash-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dash-card { background: var(--surface); border: 1.5px solid var(--text); border-radius: var(--r-md); padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.dash-card h2 { font-weight: 800; font-size: 17px; color: var(--primary-ink); display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.dash-card h2 .meta { font-weight: 500; font-size: 12px; }
.dash-card .meta { font-size: 12px; }
.hbars { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.hbars li { display: grid; grid-template-columns: minmax(110px, 160px) minmax(0, 1fr) auto; align-items: center; gap: 12px; font-size: 14px; }
.hb-label { font-weight: 600; }
.hb-track { height: 14px; background: var(--border); border-radius: 0 4px 4px 0; overflow: hidden; display: block; }
.hb-bar { display: block; height: 100%; background: var(--primary); border-radius: 0 4px 4px 0; }
.hb-value { font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; display: flex; flex-direction: column; align-items: flex-end; }
.hb-sub { font-weight: 500; font-size: 11px; color: var(--text-2); }
.vers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ver { border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.ver-name { font-weight: 700; font-size: 13px; }
.ver strong { font-weight: 900; font-size: 28px; line-height: 32px; color: var(--primary-ink); font-variant-numeric: tabular-nums; }
.ver-sub, .ver-meta { font-size: 12px; color: var(--text-2); }
.ver .hb-track { margin: 4px 0; }
.dash table { width: 100%; border-collapse: collapse; font-size: 14px; }
.dash th { text-align: left; font-weight: 700; font-size: 12px; color: var(--text-2); padding: 6px 10px 6px 0; border-bottom: 1px solid var(--text-2); white-space: nowrap; }
.dash td { padding: 8px 10px 8px 0; border-bottom: 1px solid var(--border); vertical-align: top; }
.dash .num { text-align: right; font-variant-numeric: tabular-nums; }
.dash .mono { font-family: var(--mono); font-size: 12px; color: var(--text-2); }
.table-wrap { overflow-x: auto; }
.bar-cell { display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-width: 140px; }
.cell-track { flex: 1; display: block; height: 10px; }
.cell-bar { display: block; height: 100%; background: var(--primary); border-radius: 0 4px 4px 0; }
.bar-cell b { font-weight: 800; min-width: 28px; }
.rank { margin: 0; padding: 0 0 0 20px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.rank li span:first-child { font-weight: 600; }
.rank li { display: list-item; }
.rank li .num { float: right; font-weight: 800; }
.hour-chart { width: 100%; height: auto; display: block; }
.hour-chart .grid { stroke: var(--border); stroke-width: 1; }
.hour-chart .axis { stroke: var(--text-2); stroke-width: 1; }
.hour-chart .tick { font-size: 11px; fill: var(--text-2); font-family: inherit; }
.hour-chart .peak { font-size: 12px; font-weight: 800; fill: var(--text); font-family: inherit; }
.hour-chart .col { fill: var(--primary); }
.hour-chart .hit.on .col { fill: var(--primary-ink); }
.hour-chart .hit.on rect { fill: rgba(45, 87, 67, 0.06); }
.table-view summary { cursor: pointer; font-weight: 700; font-size: 13px; color: var(--primary); }
.table-view table { max-width: 280px; margin-top: 8px; }
.dash-tip { position: fixed; z-index: 50; pointer-events: none; background: var(--text); color: var(--surface); font-size: 12px; font-weight: 600; padding: 6px 9px; border-radius: var(--r-sm); white-space: nowrap; }
@media (max-width: 900px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-grid, .dash-grid.three, .vers { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- fridge inventory header (Figma 719:1445) ---------- */
.brand-row { display: flex; align-items: center; gap: 8px; color: var(--primary); font-weight: 800; font-size: 22px; line-height: 28px; }
.brand-row svg { width: 28px; height: 28px; flex-shrink: 0; }
.mk-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mk-switch button { min-height: 44px; border: 1px solid #C5CCBE; border-radius: 8px; background: #fff; color: var(--primary); font-weight: 700; font-size: 13px; }
.mk-switch button[aria-current="page"] { background: var(--primary); color: var(--bg); }
.inv-meta { font-size: 12px; color: var(--primary); }
.result-meta { color: var(--primary); }

/* ---------- S5d: help update food counts (Figma 724:1545) ---------- */
.back-link.icon-only { width: 44px; height: 44px; margin: -10px 0 0 -10px; justify-content: center; color: var(--primary); }
.back-link.icon-only svg { width: 22px; height: 22px; }
.eyebrow.forest { color: var(--primary); }
.help-copy { display: flex; flex-direction: column; gap: 12px; color: var(--primary); }
.help-copy p { font-size: 15px; line-height: 22px; }
.help-copy p.strong { font-weight: 700; font-size: 14px; }
.help-art { width: 104px; height: 76px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.btn-outline.forest { border-color: var(--primary); color: var(--primary); font-size: 16px; border-width: 1px; }
.btn-outline.forest:hover:not(:disabled) { background: var(--accent-soft); }

/* ---------- Marketplace (Figma 721–737, simulated offers) ---------- */
.give-card { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--accent-soft); border-radius: 12px; padding: 15px 18px; color: var(--primary); }
.give-copy { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.give-copy h2 { font-weight: 700; font-size: 21px; }
.give-copy p { font-size: 13px; line-height: 17px; }
.btn-small { min-height: 35px; padding: 0 12px; border: 1px solid #C5CCBE; border-radius: 8px; background: var(--primary); color: var(--bg); font-weight: 700; font-size: 12px; }
.give-art { width: 83px; height: 83px; flex-shrink: 0; object-fit: cover; }
.mk-title { font-weight: 700; font-size: 24px; line-height: 30px; color: var(--primary); }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chips button { min-height: 36px; padding: 0 12px; border: 1px solid #C5CCBE; border-radius: 8px; background: var(--bg); color: var(--primary); font-weight: 700; font-size: 12px; }
.chips button[aria-pressed="true"] { background: var(--primary); color: var(--bg); }
.merchant-list { display: flex; flex-direction: column; gap: 10px; }
.merchant-card { display: flex; align-items: center; gap: 10px; min-height: 108px; padding: 12px; border: 1px solid #C5CCBE; border-radius: 10px; background: #FFFCF5; color: var(--primary); text-align: left; width: 100%; }
.merchant-card:hover { border-color: var(--primary); }
.merchant-card img { width: 82px; height: 82px; object-fit: cover; border-radius: 7px; flex-shrink: 0; }
.merchant-card > svg { width: 16px; height: 16px; flex-shrink: 0; }
.m-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; align-items: flex-start; }
.m-name { font-weight: 700; font-size: 16px; }
.m-meta { font-size: 11px; font-weight: 500; }
.m-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.m-tags .mine { font-size: 11px; font-weight: 700; padding: 4px 8px; border-radius: 999px; background: var(--accent-soft); }
.offer-badge { align-self: flex-start; display: inline-flex; align-items: center; padding: 6px 10px; border-radius: 999px; background: var(--card); color: var(--primary); font-weight: 800; font-size: 13px; letter-spacing: 0.2px; }
.offer-badge.sm { padding: 5px 9px; font-size: 11px; font-weight: 700; }
.qr-card .offer-badge { align-self: center; }
.small-note { font-size: 11px; line-height: 15px; color: var(--primary); }
.offer-photo { width: 100%; height: 134px; object-fit: cover; border-radius: 8px; }
.offer-head { display: flex; flex-direction: column; gap: 4px; color: var(--primary); }
.offer-head h2 { font-weight: 800; font-size: 26px; line-height: 30px; }
.offer-head span { font-size: 13px; }
.offer-lines { font-size: 13px; line-height: 18px; color: var(--primary); margin-top: -8px; }
.about-card { background: var(--accent-soft); border: 1px solid #C5CCBE; border-radius: 10px; padding: 12px 15px; color: var(--primary); display: flex; flex-direction: column; gap: 6px; }
.about-card h3 { font-weight: 700; font-size: 16px; }
.about-card ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 3px; font-weight: 700; font-size: 12px; }
.about-card .small { font-size: 10.5px; }
.link-block { display: flex; flex-direction: column; gap: 6px; }
.menu-link { display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border: 1px solid var(--primary); border-radius: 6px; background: #FFFCF5; color: var(--primary); font-weight: 700; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.menu-link svg, .dir-link svg { width: 14px; height: 14px; }
.dir-link { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; min-height: 32px; color: var(--primary); font-weight: 700; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.place-lines { display: flex; flex-direction: column; gap: 2px; color: var(--primary); font-size: 12px; }
.place-lines strong { font-weight: 700; font-size: 14px; }
.place-lines .gap { margin-top: 6px; }
.offer-sum { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; padding: 16px; border: 1px solid var(--primary); border-radius: 8px; background: var(--accent-soft); color: var(--primary); }
.offer-sum strong { font-weight: 700; font-size: 21px; }
.backup-form { display: flex; flex-direction: column; gap: 10px; }
.field-label { font-weight: 700; font-size: 14px; color: var(--primary); }
.backup-form .field { border: 1px solid var(--primary); background: #FFFCF5; border-radius: 6px; }
.field-error { font-size: 13px; font-weight: 700; color: var(--danger-ink); }
.mail-note { display: flex; gap: 12px; align-items: center; padding: 14px 16px; background: var(--accent-soft); border-radius: 8px; color: var(--primary); font-size: 12px; }
.mail-note svg { width: 20px; height: 20px; flex-shrink: 0; }
.qr-card { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 20px 16px 16px; border: 1px solid var(--primary); border-radius: 10px; color: var(--primary); text-align: center; }
.qr-card h2 { font-weight: 800; font-size: 22px; }
.qr-box { width: 200px; height: 200px; background: #fff; display: flex; align-items: center; justify-content: center; margin: 4px 0; }
.qr-box .qr { width: 200px; height: 200px; display: block; }
.qr-card .small { font-size: 10.5px; }
.qr-code { font-weight: 800; font-size: 16px; letter-spacing: 0.5px; }
.qr-window { font-weight: 800; font-size: 15px; }
.info-panel { background: var(--accent-soft); border-radius: 8px; padding: 14px 16px; color: var(--primary); font-weight: 700; font-size: 13px; line-height: 20px; }
.info-panel h3 { font-weight: 800; font-size: 16px; margin-bottom: 4px; }
.info-panel p { font-weight: 500; font-size: 13px; line-height: 19px; }
.btn.link-text { text-decoration: underline; text-underline-offset: 3px; font-size: 14px; }
.demo-box { display: flex; flex-direction: column; align-items: center; gap: 2px; padding-top: 4px; border-top: 1px dashed #C5CCBE; }
.demo-box .text-link { color: var(--primary); min-height: 44px; }
.window-box { display: flex; flex-direction: column; gap: 2px; padding: 12px; border: 1px solid var(--primary); border-radius: 8px; color: var(--primary); font-size: 11px; }
.window-box strong { font-weight: 800; font-size: 15px; }
.mk-sub { font-weight: 700; font-size: 19px; color: var(--primary); }
.steps { margin: 0; padding: 14px; list-style: none; background: var(--accent-soft); border-radius: 10px; display: flex; flex-direction: column; gap: 14px; color: var(--primary); }
.steps li { display: flex; gap: 12px; align-items: flex-start; }
.step-n { width: 26px; height: 26px; border-radius: 999px; background: var(--primary); color: var(--bg); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; flex-shrink: 0; }
.steps li > span:last-child { display: flex; flex-direction: column; gap: 2px; font-size: 12px; }
.steps strong { font-weight: 700; font-size: 14px; }
.place-card { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid #C5CCBE; border-radius: 8px; color: var(--primary); font-size: 11px; }
.place-card strong { font-weight: 700; font-size: 14px; }
.terms { margin: -8px 0 0; padding: 0 0 0 16px; color: var(--primary); font-size: 12px; display: flex; flex-direction: column; gap: 2px; }
.done-mark { align-self: center; width: 72px; height: 72px; border-radius: 999px; border: 1.5px solid var(--primary); background: var(--accent-soft); color: var(--primary); display: flex; align-items: center; justify-content: center; }
.done-mark svg { width: 38px; height: 38px; }
.done-head { display: flex; flex-direction: column; gap: 10px; text-align: center; color: var(--primary); }
.done-head p { font-size: 14px; line-height: 20px; }
.redeem-card { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; padding: 16px 18px; border: 1px solid var(--primary); border-radius: 10px; color: var(--primary); }
.redeem-card h2 { font-weight: 800; font-size: 22px; }
.r-offer { font-weight: 800; font-size: 17px; }
.status-pill { padding: 5px 12px; border-radius: 999px; background: var(--accent-soft); font-weight: 700; font-size: 11px; }
.redeem-card dl { margin: 4px 0 0; width: 100%; border-top: 1px solid #C5CCBE; padding-top: 8px; display: flex; flex-direction: column; gap: 6px; font-size: 12px; }
.redeem-card dl div { display: flex; justify-content: space-between; gap: 12px; }
.redeem-card dd { margin: 0; font-weight: 800; }
.redeem-card .small { font-size: 10px; }
.text-link.center { align-self: center; color: var(--primary); min-height: 44px; }
.enjoy { text-align: center; font-weight: 700; font-size: 15px; color: var(--primary); }

/* ---------- user-testing build (public/test-mode.js) ---------- */
.test-bar { flex-shrink: 0; display: flex; align-items: center; gap: 8px; padding: calc(6px + env(safe-area-inset-top, 0px)) 12px 6px 16px; background: var(--primary); color: var(--bg); font-size: 12px; }
.test-bar .tb-id { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.test-bar .tb-q { font-weight: 700; }
.tb-btn { min-height: 32px; padding: 0 10px; border: 1px solid var(--bg); border-radius: 6px; background: transparent; color: var(--bg); font-weight: 700; font-size: 12px; }
.tb-btn.solid { background: var(--bg); color: var(--primary); }
.test-bar + .ph-main { padding-top: 24px; }
.test-bar + .ph-main.tall { padding-top: 48px; }
.test-head { display: flex; flex-direction: column; gap: 8px; }
.tester-chip { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border: 1.5px solid var(--primary); border-radius: var(--r-md); background: var(--accent-soft); color: var(--primary); font-size: 14px; }
.tester-chip strong { font-weight: 800; font-size: 20px; letter-spacing: 0.5px; }
.consent-list { margin: 0; padding: 16px 18px; list-style: none; display: flex; flex-direction: column; gap: 12px; background: var(--card); border: 1.5px solid var(--text); border-radius: var(--r-md); }
.consent-item { display: flex; flex-direction: column; gap: 2px; padding-left: 14px; position: relative; }
.consent-item::before { content: ''; position: absolute; left: 0; top: 8px; width: 6px; height: 6px; border-radius: 999px; background: var(--primary); }
.consent-item strong { font-weight: 700; font-size: 15px; }
.consent-item span { font-size: 14px; line-height: 19px; color: var(--text-2); }
.consent-all { font-weight: 700; }
.device-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.device-pick button { min-height: 64px; padding: 8px 6px; border: 1.5px solid var(--primary); border-radius: 8px; background: var(--bg); color: var(--primary); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; font-weight: 600; text-align: center; }
.device-pick button strong { font-size: 15px; font-weight: 800; }
.device-pick button[aria-pressed="true"] { background: var(--primary); color: var(--bg); }
.test-stats { font-size: 14px; font-weight: 600; }
.test-data { min-height: 160px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11px; line-height: 15px; white-space: pre; }

/* =====================================================================
   v0.4 web app: mode strip, header with a menu, no bottom tabs.
   A centred column (max 480 px) instead of a framed phone.
   ===================================================================== */
:root {
  --border-card: #D9D2BF;
  --scheduled: #E6EEF6; /* partner "Scheduled" pill only; text #2E4A6B */
  --scrim: rgba(26, 26, 26, 0.38);
  --r-lg: 8px;
  --r-xl: 10px;
  --r-sheet: 20px;
  --r-pill: 999px;
  --shadow-hero: 4px 4px 0 rgba(0, 0, 0, 0.5);
}
@media (min-width: 600px) {
  .phone-stage { padding: 0; }
  .phone { max-width: 480px; height: 100%; border: none; border-left: 1px solid var(--border-card); border-right: 1px solid var(--border-card); border-radius: 0; }
}
.toast { bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }

.topbar { flex-shrink: 0; position: relative; z-index: 30; background: var(--bg); padding-top: env(safe-area-inset-top, 0px); }
.mode-strip { height: 36px; display: flex; align-items: center; gap: 10px; padding: 0 max(24px, env(safe-area-inset-right, 0px)) 0 max(24px, env(safe-area-inset-left, 0px)); font-weight: 700; font-size: 13px; }
.mode-strip.staff { background: var(--staff); color: var(--on-primary); }
.mode-strip.partner { background: var(--card); color: var(--staff); }
.strip-badge { height: 22px; display: inline-flex; align-items: center; padding: 0 8px; border-radius: 3px; font-weight: 800; font-size: 11px; letter-spacing: 0.5px; }
.staff .strip-badge { background: var(--card); color: var(--staff); }
.partner .strip-badge { background: var(--staff); color: var(--card); }
.strip-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.strip-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
.strip-status .dot { width: 8px; height: 8px; background: var(--accent); }
.partner .strip-status .dot { background: var(--primary); }
.strip-status svg { width: 14px; height: 14px; }
.strip-exit { border: none; background: none; padding: 0; min-height: 36px; color: inherit; font-weight: 700; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }

.app-header { height: 64px; display: flex; align-items: center; gap: 6px; padding: 0 24px; border-bottom: 1px solid var(--border); }
.app-header:has(.menu-btn) { padding-left: 14px; }
.menu-btn { width: 44px; height: 44px; border: none; background: none; color: var(--primary); display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r-sm); }
.menu-btn svg { width: 24px; height: 24px; }
.hd-title { font-weight: 700; font-size: 20px; line-height: 24px; color: var(--primary); }
.app-menu { position: absolute; left: 0; right: 0; top: 100%; z-index: 32; background: var(--bg); border: 1.5px solid var(--primary); overflow: hidden; } /* Figma 768:1748 / 774:3744: full width, no dividers */
.app-menu ul { margin: 0; padding: 0; list-style: none; }
.app-menu button { width: 100%; min-height: 48px; padding: 0 16px; border: none; border-radius: var(--r-nav); background: none; display: flex; align-items: center; gap: 8px; text-align: left; font-weight: 600; font-size: 15px; color: var(--primary); }
.app-menu button[aria-current="page"] { background: var(--sage); }
.app-menu button:disabled { color: var(--disabled-ink); }
.app-menu .nav-badge { position: static; margin-left: auto; }
.menu-note { margin-left: auto; font-weight: 500; font-size: 12px; }
.menu-scrim { position: absolute; left: 0; right: 0; top: 100%; height: 100vh; z-index: 31; border: none; padding: 0; background: transparent; cursor: default; }

.ph-main { padding-top: 20px; }
.ph-main.bare { padding-top: calc(28px + env(safe-area-inset-top, 0px)); }
.ph-banner { padding: 10px 16px 10px 24px; }
.ph-banner + .ph-main { padding-top: 20px; }
.ph-main.partner { gap: 14px; }
.page-head { display: flex; flex-direction: column; gap: 6px; }
.page-head.row { flex-direction: row; justify-content: space-between; align-items: center; gap: 12px; }
.page-head .meta { font-size: 13px; }

/* sign in: three ways in */
.role-pick { border: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.role-pick legend { padding: 0; margin-bottom: 8px; font-weight: 700; font-size: 13px; }
.mode-switch.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mode-switch.three button { min-height: 52px; font-size: 14px; line-height: 17px; padding: 4px 6px; }

/* home */
.hero-card { box-shadow: var(--shadow-hero); }
/* Home Marketplace card (Figma 772:1833): cream with a thick mustard frame. */
.market-card { background: var(--bg); border: 8px solid var(--card); border-radius: 8px; box-shadow: var(--shadow-card); padding: 10px 2px 18px; display: flex; flex-direction: column; gap: 12px; color: var(--primary); }
.market-card h2 { padding: 0 6px; font-weight: 700; font-size: 22px; line-height: 27px; }
.market-card p { margin-top: 1px; padding: 0 6px; max-width: 300px; font-size: 13px; line-height: 16px; color: var(--primary); }
.market-card .btn { min-height: 44px; border-radius: var(--r-sm); font-size: 19px; }
.home-foot { margin-top: 10px; }

/* S4 */
.updated-pill { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; padding: 4px 10px; border-radius: var(--r-pill); background: var(--card); color: var(--primary-ink); font-weight: 700; font-size: 12px; }
.updated-pill svg { width: 14px; height: 14px; }
.help-banner { background: var(--accent-soft); border-radius: var(--r-md); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; color: var(--primary-ink); }
.help-banner p { font-size: 14px; line-height: 19px; }
.help-banner .small { font-size: 12px; }
.yn { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.yn button { min-height: 44px; border: 1.5px solid var(--primary); border-radius: var(--r-sm); background: var(--surface); color: var(--primary); font-weight: 700; font-size: 15px; }
.yn button[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); }

/* tiers: sponsorship only */
.tier { display: inline-flex; align-items: center; gap: 3px; height: 20px; padding: 0 5px 0 4px; border-radius: 4px; border: 0.7px solid var(--primary); color: var(--primary); background: var(--bg); font-weight: 600; font-size: 10px; line-height: 12px; vertical-align: middle; white-space: nowrap; }
.tier img { width: 16px; height: 16px; flex-shrink: 0; }
.tier-hero { background: var(--primary); color: var(--bg); }
.tier-champion { background: var(--sage); }
.offer-badge.none { background: var(--tag); color: var(--text-2); }
.offer-desc { font-size: 14px; line-height: 20px; }

/* Marketplace extras */
.impact-link { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 58px; padding: 0 12px; border: 1px solid var(--primary); border-radius: 8px; background: var(--bg); color: var(--primary); text-align: left; }
.impact-link > span { display: flex; flex-direction: column; gap: 2px; }
.impact-link strong { font-weight: 700; font-size: 15px; line-height: 20px; }
.impact-link span span { font-size: 11px; line-height: 15px; color: var(--primary); }
.impact-link img { flex-shrink: 0; }
.metric-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.metric-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metric-card { background: var(--surface); border: 1px solid var(--primary); border-radius: var(--r-md); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; color: var(--primary-ink); }
.metric-n { font-weight: 900; font-size: 32px; line-height: 36px; font-variant-numeric: tabular-nums; }
.metric-label { font-weight: 700; font-size: 13px; }
.metric-card .small { font-size: 11px; color: var(--text-2); }
.partner-list { margin: 0; padding: 0; list-style: none; background: var(--surface); border: 1px solid var(--primary); border-radius: var(--r-md); }
.partner-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; font-weight: 700; font-size: 15px; }
.partner-list li + li { border-top: 1px solid var(--border); }
.pending-note { background: var(--pending-soft); border-radius: var(--r-md); padding: 10px 14px; font-weight: 700; font-size: 13px; line-height: 18px; color: var(--text); }
.donate-card { background: var(--surface); border: 1.5px solid var(--text); border-radius: var(--r-md); padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.donate-card strong { font-weight: 800; font-size: 18px; }
.donate-card .small { font-size: 12px; color: var(--text-2); }
.donate-card .btn { margin-top: 6px; }
.mono { font-family: var(--mono); }
.qr-card.expired .qr-box { opacity: 0.35; }

/* buttons */
.btn.small { min-height: 44px; padding: 0 14px; font-size: 15px; }
.btn.small svg { width: 18px; height: 18px; }
.btn-danger-outline { background: var(--surface); color: var(--danger-ink); border-color: var(--danger); font-size: 16px; }
.btn-danger-outline:disabled { background: var(--disabled); color: var(--disabled-ink); border-color: var(--disabled); }
.action-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* partner: dashboard, listings */
.store-hero { color: var(--primary); }
.store-photo { width: 100%; height: 120px; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--primary); }
.store-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.store-line strong { font-weight: 900; font-size: 22px; line-height: 26px; color: var(--primary-ink); }
.open-line.closed { color: var(--text-2); }
.store-hero .btn { align-self: flex-start; }
.listing-list { display: flex; flex-direction: column; gap: 8px; }
.listing-row { width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--primary); border-radius: var(--r-md); padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; color: var(--text); }
.listing-row strong { font-weight: 800; font-size: 16px; color: var(--primary-ink); }
.listing-row .small, .claim-line { font-size: 12px; color: var(--text-2); }
.lr-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.status-pill.st-live { background: var(--accent-soft); color: var(--primary-ink); }
.status-pill.st-scheduled { background: var(--scheduled); color: #2E4A6B; }
.status-pill.st-draft { background: var(--tag); color: var(--text); }
.status-pill.st-paused { background: var(--pending-soft); color: var(--text); }
.status-pill.st-ended { background: var(--disabled); color: var(--disabled-ink); }
.claim-line { display: flex; flex-direction: column; gap: 4px; }
.claim-bar { display: block; height: 8px; border-radius: var(--r-pill); background: var(--border); overflow: hidden; }
.claim-bar > span { display: block; height: 100%; background: var(--primary); }
.tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1.5px solid var(--border-card); }
.tabs button { min-height: 44px; border: none; border-bottom: 3px solid transparent; background: none; font-weight: 700; font-size: 14px; color: var(--text-2); }
.tabs button[aria-selected="true"] { color: var(--primary-ink); border-bottom-color: var(--primary); }

/* partner: forms */
.type-pick { border: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.type-card { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border: 1.5px solid var(--primary); border-radius: var(--r-md); background: var(--surface); color: var(--primary-ink); cursor: pointer; }
.type-card:has(input:checked) { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--primary); }
.type-card input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--primary); flex-shrink: 0; }
.type-card > span { display: flex; flex-direction: column; gap: 4px; }
.type-card strong { font-weight: 800; font-size: 16px; }
.type-card span span { font-size: 13px; line-height: 18px; color: var(--text); }
.p-form { display: flex; flex-direction: column; gap: 14px; }
.p-form fieldset { margin: 0; min-width: 0; padding: 12px 14px 14px; border: 1px solid var(--border-card); border-radius: var(--r-md); background: var(--surface); display: flex; flex-direction: column; gap: 8px; }
.p-form legend { padding: 0 6px; font-weight: 800; font-size: 15px; color: var(--primary); }
.field.area { height: auto; padding: 10px 14px; resize: vertical; line-height: 20px; }
.field:disabled, .p-form input:disabled { background: var(--disabled); color: var(--disabled-ink); border-color: var(--disabled); }
.amount-row { display: flex; gap: 8px; }
.amount-row .field { flex: 1; min-width: 0; }
.segmented.small { grid-template-columns: repeat(2, 48px); }
.segmented.small button { min-height: 48px; font-size: 16px; }
.time-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.time-row > span { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.win-check { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; }
.win-check svg { width: 16px; height: 16px; flex-shrink: 0; }
.win-check.ok { color: var(--primary); }
.win-check.bad { color: var(--danger-ink); }
.check-line { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14px; font-weight: 600; }
.check-line input { width: 20px; height: 20px; margin: 0; accent-color: var(--primary); flex-shrink: 0; }
.allergen-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.qty-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.preview-frame { border: 1.5px dashed var(--primary); border-radius: var(--r-lg); padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.preview-frame .small { font-size: 12px; color: var(--text-2); }
.merchant-card.as-preview { cursor: default; }
.merchant-card.as-preview:hover { border-color: #C5CCBE; }
.store-sum { display: flex; gap: 12px; align-items: center; background: var(--card); border: 1.5px solid var(--primary); border-radius: var(--r-md); padding: 12px; color: var(--primary-ink); }
.store-sum img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--r-sm); flex-shrink: 0; }
.store-sum > span { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.store-sum strong { font-weight: 900; font-size: 18px; }
.store-sum .small { font-size: 12px; }
.card-title { font-weight: 800; font-size: 16px; margin-bottom: 10px; }
.field-group { display: flex; flex-direction: column; gap: 6px; }
.photo-pick { position: relative; display: block; cursor: pointer; border: 1px solid var(--primary); border-radius: var(--r-md); overflow: hidden; }
.photo-pick img { width: 100%; height: 120px; object-fit: cover; }
.photo-pick > span { position: absolute; right: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; background: var(--surface); border: 1.5px solid var(--text); border-radius: var(--r-sm); font-weight: 700; font-size: 13px; }
.photo-pick svg { width: 16px; height: 16px; }
.photo-pick:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }
.hours { display: flex; flex-direction: column; }
.hours-row { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 8px; row-gap: 4px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.hours-row:last-child { border-bottom: none; }
.hours-row .day { font-weight: 800; font-size: 14px; }
.hours-row .slots, .hours-row .closed-word { grid-column: 1 / -1; }
.hours-row .closed-word { font-size: 13px; color: var(--text-2); }
.slots { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.slot { display: flex; align-items: center; gap: 6px; width: 100%; }
.slot input[type="time"] { flex: 1; min-width: 0; height: 40px; padding: 0 8px; border: 1.5px solid var(--text); border-radius: var(--r-sm); background: var(--surface); font-size: 14px; }
.slot .icon-btn { margin: 0; }
.closed-toggle { grid-row: 1; grid-column: 2; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; font-weight: 600; font-size: 13px; }
.closed-toggle input { width: 18px; height: 18px; margin: 0; accent-color: var(--primary); }
.text-link.small { font-size: 12px; min-height: 32px; }

/* partner: scan */
.viewfinder { position: relative; aspect-ratio: 1 / 1; max-height: 320px; background: #1A1A1A; border-radius: var(--r-md); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.viewfinder video { width: 100%; height: 100%; object-fit: cover; }
.vf-frame { position: absolute; inset: 18%; border: 3px solid var(--card); border-radius: 8px; }
.viewfinder.off { aspect-ratio: auto; min-height: 170px; padding: 20px; background: var(--backdrop); border: 1.5px dashed var(--primary); flex-direction: column; gap: 10px; text-align: center; color: var(--primary-ink); font-size: 14px; line-height: 20px; }
.viewfinder.off svg { width: 36px; height: 36px; color: var(--primary); }
.viewfinder.off .small { font-size: 12px; color: var(--text-2); }
.or-line { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 13px; color: var(--text-2); }
.or-line::before, .or-line::after { content: ""; flex: 1; height: 1px; background: var(--border-card); }
.form-card.plain { background: var(--surface); }
.scan-card { border: 1.5px solid; border-radius: var(--r-md); padding: 18px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.scan-card h2 { font-weight: 800; font-size: 20px; line-height: 26px; }
.scan-card strong.mono { font-size: 16px; }
.scan-card .small { font-size: 13px; line-height: 18px; }
.scan-card.ok { background: var(--accent-soft); border-color: var(--primary); color: var(--primary-ink); }
.scan-card.bad { background: var(--danger-soft); border-color: var(--danger); color: var(--danger-ink); }
.scan-card.wait { background: var(--pending-soft); border-color: var(--text); color: var(--text); }
.scan-icon { width: 36px; height: 36px; border-radius: var(--r-pill); background: var(--surface); border: 1.5px solid currentColor; display: inline-flex; align-items: center; justify-content: center; font-weight: 900; font-size: 18px; }
.scan-icon svg { width: 20px; height: 20px; }
.segmented button:disabled { opacity: 0.55; cursor: not-allowed; }

/* staff: scan a barcode on Add food, and the label students see */
.photo-scan { position: relative; cursor: pointer; }
.photo-scan:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }
.vf-frame.wide { inset: 32% 8%; }
.listed-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 10px; background: var(--surface); border: 1px solid var(--primary); border-radius: var(--r-md); }
.listed-row img { width: 48px; height: 48px; object-fit: cover; border-radius: 3px; flex-shrink: 0; }
.listed-row .body { flex: 1; min-width: 120px; display: flex; flex-direction: column; gap: 2px; }
.listed-row .body strong { font-weight: 800; font-size: 15px; }
.listed-row .small { font-size: 12px; color: var(--text-2); }
.label-set { margin: 0; min-width: 0; padding: 10px 12px 12px; border: 1px solid var(--text); border-radius: var(--r-sm); background: var(--surface); display: flex; flex-direction: column; gap: 6px; }
.label-set legend { padding: 0 6px; font-weight: 800; font-size: 14px; background: var(--surface); border-radius: 3px; }
.add-form .label-set .field.area { height: auto; padding: 10px; }
.label-panel { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border: 1px solid #D9D2BF; border-radius: var(--r-md); background: var(--surface); font-size: 13px; line-height: 19px; overflow-wrap: anywhere; }
.label-panel .label-contains { padding: 8px 10px; border-radius: var(--r-sm); background: var(--pending-soft); }
.label-panel .label-warn { font-weight: 700; }

/* offline: banner, what's waiting (Butter, never red), new version, add to home screen */
.ph-banner.stale { background: var(--pending-soft); align-items: flex-start; }
.ph-banner.stale svg { margin-top: 2px; }
.pending-chip { display: flex; gap: 8px; align-items: flex-start; padding: 10px 14px; border-radius: var(--r-md); background: var(--pending-soft); font-size: 13px; line-height: 18px; }
.pending-chip > svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
.pending-chip > span { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pending-chip strong { font-weight: 700; }
.chip-actions { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-weight: 500; }
.pending-chip .text-link, .pending-note .text-link, .chip-actions .text-link { min-height: 44px; }
.waiting-tag { align-self: flex-start; padding: 4px 10px; border-radius: var(--r-pill); background: var(--pending-soft); font-weight: 700; font-size: 12px; }
.mine.wait { background: var(--pending-soft); }
.line-list .note.plain { color: var(--text-2); }
.new-version { flex-shrink: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 0 24px; background: var(--accent-soft); font-weight: 600; font-size: 13px; }
.new-version .text-link { min-height: 44px; }
.bottom-sheet.install .steps { margin: 0; }
.install-art { width: 240px; max-width: 100%; height: auto; align-self: center; }

/* Food details, final design (Figma 783:4457, Nov 26 revision). Scoped names: fd-. */
.app-header:has(.menu-btn) { padding-left: 6px; gap: 2px; border-bottom-color: transparent; }
.app-header .hd-title { font-weight: 600; }
.ph-main.item {
  --fd-ink: #15231C;
  --fd-activity: #FFF0B9;
  --fd-track: #C0D8BF;
  --fd-row: #FFFEFA;
  --fd-line: #D3D2C6;
  --fd-sage: #E5EEDC;
  gap: 8px;
  padding-top: 0;
  color: var(--fd-ink);
}
.ph-banner + .ph-main.item, .new-version + .ph-main.item { padding-top: 8px; }
/* Small controls keep their drawn size and get a 44 px touch area. */
.fd-back, .fd-update, .fd-report, .fd-label-toggle, .fd-source { position: relative; }
.fd-back::after, .fd-update::after, .fd-report::after, .fd-label-toggle::after, .fd-source::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 44px; transform: translateY(-50%); }
.back-link.fd-back { min-height: 15px; gap: 0.3em; font-weight: 700; font-size: 12px; line-height: 15px; color: var(--fd-ink); }
.fd-title { font-weight: 800; font-size: 26px; line-height: 31px; color: var(--fd-ink); }
.fd-photo { width: 100%; height: 135px; object-fit: cover; border-radius: 4px; }
.fd-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.fd-name { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
.fd-pills { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fd-name h2 { font-weight: 800; font-size: 22px; line-height: 27px; color: var(--fd-ink); overflow-wrap: anywhere; }
.fd-avail { white-space: nowrap; height: 25px; display: inline-flex; align-items: center; gap: 8px; padding: 0 12px 0 10px; border-radius: 12px; background: var(--primary); color: var(--on-primary); font-weight: 700; font-size: 14px; line-height: 17px; }
.fd-avail::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.fd-avail.none { background: var(--tag); color: var(--primary); }
.fd-name .waiting-tag { margin-top: 4px; }
.fd-update { flex-shrink: 0; width: 126px; height: 32px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0; border: 1px solid var(--primary); border-radius: 6px; background: var(--accent); color: var(--primary); font-weight: 700; font-size: 12px; line-height: 16px; }
.fd-updated { min-width: 202px; height: 25px; display: inline-flex; align-items: center; gap: 7px; padding: 0 10px; border-radius: 16px; background: var(--card); color: var(--primary); font-weight: 400; font-size: 14px; line-height: 17px; }
.fd-updated strong { font-weight: 700; }
.fd-estimate { display: flex; flex-direction: column; gap: 8px; padding: 11px 13px; border: 1px solid var(--primary); border-radius: 8px; background: var(--card); color: var(--primary); font-weight: 400; font-size: 12px; line-height: 17px; }
.fd-est-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 20px; }
.fd-est-head h3 { font-weight: 700; font-size: 15px; line-height: 20px; }
.fd-est-head strong { font-weight: 700; font-size: 24px; line-height: 29px; }
.fd-meter { display: block; height: 10px; border-radius: 5px; background: var(--fd-track); overflow: hidden; }
.fd-meter > span { display: block; height: 100%; background: var(--primary); }
.fd-fine { font-size: 11px; line-height: 16px; }
.fd-activity { border: 1px solid var(--primary); border-radius: 8px; background: var(--fd-activity); color: var(--primary); font-weight: 400; font-size: 12px; line-height: 17px; }
.fd-rows { display: flex; flex-direction: column; gap: 8px; }
.fd-activity-toggle { width: 100%; height: 54px; display: flex; align-items: center; justify-content: space-between; padding: 0 15px; border: none; border-radius: 8px; background: none; color: inherit; font-weight: 700; font-size: 16px; text-align: left; }
.fd-activity-panel { display: flex; flex-direction: column; gap: 12px; padding: 1px 15px 15px; }
.fd-activity-panel::before, .fd-label-panel::before { content: ""; height: 1px; background: var(--primary); opacity: 0.25; }
.fd-bars { display: flex; align-items: flex-end; gap: 12px; height: 69px; }
.fd-bar-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.fd-plot { height: 48px; display: flex; align-items: flex-end; justify-content: center; }
.fd-bar { width: 42px; max-width: 100%; background: var(--primary); }
.fd-bar-label { text-align: center; }
.fd-row { width: 100%; min-height: 36px; display: flex; align-items: center; gap: 12px; padding: 6px 13px; border: 1px solid var(--fd-line); border-radius: 8px; background: var(--fd-row); color: var(--primary); font-weight: 400; font-size: 13px; line-height: 18px; text-align: left; }
.fd-row img { flex-shrink: 0; }
.fd-label-toggle { justify-content: space-between; font-weight: 700; }
.fd-label-toggle > span { text-decoration: underline; text-underline-position: from-font; }
.fd-label.open { border-radius: 8px; background: var(--fd-row); }
.fd-label.open .fd-label-toggle { border-radius: 8px 8px 0 0; }
.fd-label-panel { display: flex; flex-direction: column; gap: 12px; padding: 0 16px 16px; color: var(--primary); font-weight: 400; font-size: 13px; line-height: 18.85px; overflow-wrap: anywhere; }
.fd-label-panel::before { opacity: 0.2; }
.fd-label-panel .fd-fine { line-height: 15.95px; }
.fd-strong { font-weight: 700; }
.fd-contains { font-weight: 700; font-size: 14px; line-height: 20.3px; }
.fd-small { font-size: 12px; line-height: 17.4px; }
.fd-allergens { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 8px; background: var(--fd-sage); }
.fd-source { align-self: flex-start; font-weight: 700; font-size: 12px; line-height: 17.4px; color: inherit; text-decoration: underline; text-underline-position: from-font; }
.fd-note { text-align: center; font-weight: 400; font-size: 11px; line-height: 13px; color: var(--fd-ink); }
.fd-report { align-self: center; border: none; padding: 0; background: none; color: var(--fd-ink); font-weight: 700; font-size: 12px; line-height: 15px; text-decoration: underline; text-underline-position: from-font; }

/* Our campus impact (Figma 799:2009). Scoped names: im-. */
.im-head { display: flex; flex-direction: column; gap: 4px; color: var(--primary); }
.im-head h1 { font-weight: 700; font-size: 27px; line-height: 36px; }
.im-head p { font-size: 14px; line-height: 19px; }
.im-period { display: flex; flex-direction: column; gap: 3px; color: var(--primary); }
.im-period strong { font-weight: 700; font-size: 13px; line-height: 18px; }
.im-period span { font-size: 12px; line-height: 16px; }
.im-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.im-metric { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: var(--r-nav); background: var(--sage); color: var(--primary); }
.im-metric h2 { font-weight: 700; font-size: 14px; line-height: 19px; }
.im-n { font-weight: 700; font-size: 34px; line-height: 46px; font-variant-numeric: tabular-nums; }
.im-metric > span:last-child { font-size: 12px; line-height: 16px; }
.im-status { display: flex; flex-direction: column; gap: 4px; color: var(--primary); font-size: 11px; line-height: 15px; }
.im-status p { font-size: 12px; line-height: 16px; }
.im-panel { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: var(--r-nav); background: var(--sage); color: var(--primary); }
.im-panel h2 { font-weight: 700; font-size: 17px; line-height: 23px; }
.im-panel p { font-size: 13px; line-height: 18px; }
.im-partners { display: flex; flex-direction: column; gap: 8px; color: var(--primary); }
.im-partners h2 { font-weight: 700; font-size: 18px; line-height: 24px; }
.im-partners ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.im-partners li { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 0 12px; border: 1px solid #CDD4C7; border-radius: var(--r-nav); font-weight: 700; font-size: 16px; line-height: 22px; }
.im-partners > p { font-size: 11px; line-height: 15px; }
.im-method { display: flex; flex-direction: column; gap: 6px; padding: 12px 16px; border: 1px solid #CDD4C7; border-radius: var(--r-nav); color: var(--primary); font-size: 12px; line-height: 16px; }
.im-method h2 { font-weight: 700; font-size: 15px; line-height: 20px; }
.im-fine { font-size: 10px; line-height: 14px; color: var(--primary); }

/* Pay it forward (Figma 789:1968). Scoped names: dn-. */
.dn-hero { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; min-height: 86px; color: var(--primary); }
.dn-hero h1 { font-weight: 700; font-size: 28px; line-height: 39px; }
.dn-hero p { margin-top: 4px; font-size: 13px; line-height: 18px; }
.dn-hero img { flex-shrink: 0; margin: -6px -1px 0 0; object-fit: cover; }
.dn-panel { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: var(--r-nav); background: var(--sage); color: var(--primary); font-size: 12px; line-height: 16.8px; }
.dn-panel h2 { font-weight: 700; font-size: 15px; line-height: 21px; }
.dn-panel h2.sm { font-size: 14px; line-height: 19.6px; }
.dn-panel h2.sm + p { margin-top: -2px; }
.dn-card { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border: 1px solid var(--primary); border-radius: var(--r-nav); color: var(--primary); font-size: 12px; line-height: 16.8px; }
.dn-card h2 { font-weight: 700; font-size: 21px; line-height: 29.4px; }
.dn-preview { padding: 6px 10px; border-radius: 6px; background: var(--activity); font-weight: 700; font-size: 11px; line-height: 15.4px; }
.dn-field { display: flex; flex-direction: column; gap: 2px; font-size: 11px; line-height: 15.4px; }
.dn-field strong { font-weight: 700; font-size: 14px; line-height: 19.6px; overflow-wrap: anywhere; }
.dn-field .dn-email { font-size: 15px; line-height: 21px; }
.dn-copy { min-height: 44px; border: 1px solid var(--primary); border-radius: var(--r-nav); background: none; color: var(--primary); font-weight: 700; font-size: 14px; }
.dn-copy:hover { background: var(--sage); }
.dn-how { display: flex; flex-direction: column; gap: 5px; color: var(--primary); }
.dn-how h2 { font-weight: 700; font-size: 20px; line-height: 28px; }
.dn-how ol { margin: 0; padding: 0; list-style: none; counter-reset: dn; font-size: 13px; line-height: 26px; }
.dn-how li { counter-increment: dn; }
.dn-how li::before { content: counter(dn); display: inline-block; width: 1.4em; margin-right: 0.4em; }
.dn-how p { font-size: 11px; line-height: 15.4px; }
.dn-q { align-self: flex-start; min-height: 24px; padding: 0; border: none; background: none; color: var(--primary); font-weight: 700; font-size: 12px; line-height: 16.8px; text-decoration: underline; text-underline-position: from-font; }
.dn-q:disabled { opacity: 1; cursor: default; }

/* Marketplace list (Figma 786:4667). */
.mk-title { font-weight: 700; font-size: 24px; line-height: 29px; color: var(--primary); }
.search.mk-search { height: 40px; border: 1px solid var(--line-soft); border-radius: 7px; background: #FFF; padding: 0 12px; gap: 8px; }
.search.mk-search svg { width: 18px; height: 18px; }
.search.mk-search input { font-size: 13px; color: var(--primary); }

/* Page rhythm per screen, from the frames (default gap is 18 px). */
.ph-main.screen-market { gap: 14px; }
.ph-main.screen-impact { gap: 8px; }
.ph-main.screen-donate { gap: 10px; }
.ph-main.screen-impact, .ph-main.screen-donate, .ph-main.screen-offer, .ph-main.screen-qr, .ph-main.screen-backup { padding-top: 12px; }
/* Figma 777:3981: bold (not black) title, airy paragraphs. */
.ph-main.screen-helpAsk .help-copy h1 { font-weight: 700; font-size: 26px; line-height: 37px; color: var(--primary); }
.ph-main.screen-helpAsk .help-copy { gap: 20px; }
.ph-main.screen-helpAsk .help-copy p { font-size: 14px; line-height: 20px; }
