/* Look from docs/mockups. No inline styles in HTML (the CSP blocks them); classes only. */
:root {
  --bg: #FBF7F1;
  --card: #FFFFFF;
  --border: #EAE3D8;
  --border-strong: #D9CFC1;
  --text: #2A2622;
  --muted: #6B635A;
  --tomato: #B8482B;
  --tomato-dark: #8F3520;
  --tomato-soft: #F6E3DA;
  --photo-placeholder: #F3DDD2;
  --sage: #3D6B4E;
  --sage-dark: #2F5A3E;
  --sage-soft: #E3EEE6;
  --neutral-soft: #F0EBE3;
  --radius: 18px;
  --tabbar-h: 78px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--tomato); }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Page shell ---------- */
.page { max-width: 560px; margin: 0 auto; padding: max(28px, env(safe-area-inset-top)) 20px 24px; }
.page.with-tabbar { padding-bottom: calc(var(--tabbar-h) + 24px + env(safe-area-inset-bottom)); }
.page-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.page-title { margin: 0; font-size: 30px; font-weight: 800; line-height: 1.1; }
.brand { font-weight: 800; font-size: 30px; color: var(--tomato); letter-spacing: -0.5px; margin: 0 0 20px; }
.muted { color: var(--muted); font-weight: 600; }
.small { font-size: 14px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.card h2 { margin: 0 0 6px; font-size: 20px; font-weight: 800; }
.card p { margin: 0 0 18px; color: var(--muted); font-weight: 600; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; min-width: 44px; padding: 0 24px;
  border-radius: 999px; border: 0;
  font-weight: 800; font-size: 17px; cursor: pointer; text-decoration: none;
}
.btn-block { width: 100%; }
.btn-primary { background: var(--tomato); color: #fff; }
.btn-primary:active { background: var(--tomato-dark); }
.btn-secondary { background: var(--tomato-soft); color: var(--tomato-dark); }
.btn-quiet { background: var(--card); color: var(--text); border: 1px solid var(--border-strong); }
.btn-danger { background: #fff; color: var(--tomato-dark); border: 1px solid var(--tomato); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
.btn:focus-visible, .icon-btn:focus-visible, .chip:focus-visible, .rating-btn:focus-visible, .tab:focus-visible, .recipe-card:focus-visible {
  outline: 3px solid var(--tomato-dark); outline-offset: 2px;
}
.icon-btn {
  width: 44px; height: 44px; border-radius: 22px; border: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff; color: var(--text); cursor: pointer; text-decoration: none; flex: none;
}
.icon-btn.primary { background: var(--tomato); color: #fff; }
.account-btn { font-weight: 800; font-size: 17px; color: #fff; background: var(--tomato); }

/* ---------- Search + chips ---------- */
.search {
  display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px;
  background: #fff; border: 1px solid var(--border); border-radius: 23px; margin-bottom: 14px;
}
.search input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 16px; min-width: 0; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.chip {
  height: 36px; padding: 0 14px; border-radius: 18px; border: 1px solid var(--border-strong);
  background: #fff; font-size: 14px; font-weight: 700; cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--text); color: #fff; border-color: var(--text); }
.list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.sort-select {
  font-size: 13px; font-weight: 700; color: var(--muted); background: transparent; border: 0;
  min-height: 44px; padding: 0 4px; cursor: pointer;
}

/* ---------- Recipe cards ---------- */
.recipe-list { display: flex; flex-direction: column; gap: 10px; }
.recipe-card {
  display: flex; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px; text-decoration: none; color: var(--text);
}
.thumb {
  width: 84px; height: 84px; border-radius: 14px; flex: none; overflow: hidden;
  background: var(--photo-placeholder); display: flex; align-items: center; justify-content: center;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.recipe-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.recipe-card-title { font-size: 17px; font-weight: 800; overflow-wrap: anywhere; }
.recipe-card-meta { font-size: 14px; color: var(--muted); }
.badges { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.badge { font-size: 12px; font-weight: 700; border-radius: 10px; padding: 2px 8px; background: var(--neutral-soft); color: var(--muted); }
.badge.healthy { color: var(--sage-dark); background: var(--sage-soft); }
.badge.rating { font-weight: 800; color: var(--tomato-dark); background: var(--tomato-soft); }
.empty { text-align: center; padding: 32px 12px; }

/* ---------- Recipe detail ---------- */
.hero {
  position: relative; height: 210px; background: var(--photo-placeholder);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  max-width: 560px; margin: 0 auto; /* phone-width on desktop so the buttons stay near the content */
}
@media (min-width: 561px) { .hero { border-radius: 0 0 var(--radius) var(--radius); } }
.hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero .icon-btn { position: absolute; top: max(20px, env(safe-area-inset-top)); }
.hero .back { left: 16px; }
.hero .edit { right: 16px; }
.detail { max-width: 560px; margin: 0 auto; padding: 18px 20px calc(var(--tabbar-h) + 24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 16px; }
.detail h1 { margin: 0; font-size: 26px; font-weight: 800; line-height: 1.15; overflow-wrap: anywhere; }
.meta-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.meta-row .meta { font-size: 14px; color: var(--muted); font-weight: 600; }
.section-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.section-card h2 { margin: 0; font-size: 15px; font-weight: 800; }
.raters { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.rater { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; }
.initial {
  width: 32px; height: 32px; border-radius: 16px; display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; background: var(--tomato-soft); color: var(--tomato-dark); flex: none;
}
.rating-row { display: flex; gap: 6px; }
.rating-btn {
  flex: 1; min-height: 44px; border-radius: 12px; border: 1px solid var(--border-strong);
  background: #fff; font-size: 13px; font-weight: 700; cursor: pointer; padding: 0 4px;
}
.rating-btn.wide { flex: 1.5; }
.rating-btn[aria-pressed="true"] { background: var(--tomato); color: #fff; border-color: var(--tomato); font-weight: 800; }
.block h2 { margin: 0 0 8px; font-size: 18px; font-weight: 800; }
.ingredients { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 16px; }
.ingredients li { display: flex; gap: 10px; }
.ingredients li::before {
  content: ""; width: 6px; height: 6px; border-radius: 3px; background: var(--tomato); margin-top: 9px; flex: none;
}
.steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; font-size: 16px; }
.link-btn { background: none; border: 0; padding: 0; min-height: 44px; color: var(--tomato); font-weight: 800; cursor: pointer; text-align: left; }
.notes { white-space: pre-wrap; margin: 0; }
.actions { display: flex; flex-direction: column; gap: 10px; }
.source { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }

/* ---------- Cook mode ---------- */
.cook {
  position: fixed; inset: 0; z-index: 50; background: var(--bg); overflow-y: auto;
  padding: max(20px, env(safe-area-inset-top)) 20px max(32px, env(safe-area-inset-bottom));
}
.cook-inner { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
.cook-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cook h1 { margin: 0; font-size: 30px; font-weight: 800; line-height: 1.15; }
.cook h2 { margin: 0 0 10px; font-size: 24px; font-weight: 800; }
.cook-wake { font-size: 14px; font-weight: 700; color: var(--sage-dark); }
.cook-wake.off { color: var(--muted); }
.cook-ingredients { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cook-ingredients label {
  display: flex; align-items: flex-start; gap: 14px; font-size: 24px; line-height: 1.35;
  min-height: 52px; padding: 8px 0; cursor: pointer;
}
.cook-ingredients input { width: 28px; height: 28px; margin-top: 4px; accent-color: var(--sage); flex: none; }
.cook-ingredients input:checked + span { color: var(--muted); text-decoration: line-through; }
.cook-steps { margin: 0; padding-left: 34px; display: flex; flex-direction: column; gap: 18px; font-size: 26px; line-height: 1.45; }

/* ---------- Forms ---------- */
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .field > .label { font-size: 14px; font-weight: 800; }
.field .hint { font-size: 13px; color: var(--muted); font-weight: 600; }
.input, .textarea {
  width: 100%; background: #fff; border: 1px solid var(--border-strong); border-radius: 12px;
  padding: 12px 14px; font-size: 16px; min-height: 48px;
}
.textarea { min-height: 140px; resize: vertical; line-height: 1.45; }
.input:focus, .textarea:focus { outline: 3px solid var(--tomato-soft); border-color: var(--tomato); }
.row { display: flex; gap: 10px; }
.row > .field { flex: 1; min-width: 0; }
.toggle-chip { display: inline-flex; align-items: center; gap: 8px; }
.photo-field { display: flex; gap: 12px; align-items: center; }
.photo-preview { width: 96px; height: 96px; }
.photo-buttons { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.photo-buttons .btn { min-height: 44px; font-size: 15px; padding: 0 16px; }
.file-input { display: none; }
.parsed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.parsed li { color: var(--muted); font-weight: 600; }
.parsed li .part { color: var(--text); font-weight: 800; }
.parsed li.unparsed { color: var(--tomato-dark); }
.errors { background: var(--tomato-soft); color: var(--tomato-dark); border-radius: 12px; padding: 12px 14px; font-weight: 700; font-size: 15px; }
.errors ul { margin: 0; padding-left: 18px; }
.form-actions { display: flex; gap: 10px; }
.form-actions .btn { flex: 1; }

/* ---------- Add recipe choices ---------- */
.lead { margin: 0 0 18px; color: var(--muted); font-weight: 600; }
.choices { display: flex; flex-direction: column; gap: 12px; }
.choice {
  display: flex; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; color: var(--text); text-decoration: none;
}
.choice-icon { width: 48px; height: 48px; border-radius: 14px; background: var(--tomato-soft); color: var(--tomato); display: flex; align-items: center; justify-content: center; flex: none; }
.choice strong { display: block; font-size: 17px; font-weight: 800; }
.choice span { font-size: 14px; color: var(--muted); font-weight: 600; }
.choice.soon { opacity: 0.6; }
.soon-badge { font-size: 11px; font-weight: 800; color: var(--muted); background: var(--neutral-soft); border-radius: 8px; padding: 1px 6px; margin-left: 6px; }

/* ---------- Tab bar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border); background: #fff;
  display: flex; justify-content: space-around; align-items: center;
}
.tab {
  display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 72px; min-height: 44px;
  justify-content: center; text-decoration: none; color: var(--muted); font-size: 12px; font-weight: 700;
}
.tab[aria-current="page"] { color: var(--tomato); font-weight: 800; }
.tab.soon { opacity: 0.55; cursor: default; }
.tab .soon-label { font-size: 10px; font-weight: 700; }

/* ---------- Dialog + toast ---------- */
dialog.confirm {
  border: 0; border-radius: var(--radius); padding: 22px 20px; max-width: 340px; width: calc(100% - 40px);
  background: #fff; color: var(--text);
}
dialog.confirm::backdrop { background: rgba(42, 38, 34, 0.45); }
dialog.confirm h2 { margin: 0 0 8px; font-size: 20px; font-weight: 800; }
dialog.confirm p { margin: 0 0 18px; color: var(--muted); font-weight: 600; }
.dialog-actions { display: flex; gap: 10px; }
.dialog-actions .btn { flex: 1; min-height: 48px; }
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--text); color: #fff; padding: 12px 18px; border-radius: 999px; font-weight: 700; font-size: 15px;
  z-index: 60; max-width: calc(100% - 40px);
}

/* ---------- Stage 5: imports, nutrition, suggestions ---------- */
.choice-panel {
  background: #fff; border: 1px solid var(--border); border-radius: 20px; padding: 18px;
  display: flex; flex-direction: column; gap: 12px;
}
.choice-panel.selected { border: 2px solid var(--tomato); }
.choice-head { display: flex; align-items: center; gap: 12px; }
.choice-head strong { display: block; font-size: 18px; font-weight: 800; }
.choice-head span { font-size: 14px; color: var(--muted); font-weight: 600; }
.choice-head.as-button {
  width: 100%; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; min-height: 48px;
}
.choice-icon.sage { background: var(--sage-soft); color: var(--sage); }
.choice-icon.neutral { background: var(--neutral-soft); color: var(--muted); }
.form-tight { display: flex; flex-direction: column; gap: 12px; }
.input-cream { background: var(--bg); }
.page-previews { display: flex; gap: 10px; flex-wrap: wrap; }
.page-preview { position: relative; width: 96px; height: 128px; border-radius: 12px; overflow: hidden; background: var(--neutral-soft); }
.page-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.page-preview button {
  position: absolute; top: 4px; right: 4px; width: 44px; height: 44px; border-radius: 22px; border: 0;
  background: rgba(42, 38, 34, 0.7); color: #fff; font-size: 20px; font-weight: 800; cursor: pointer;
}
.progress { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; margin-top: 14px; }
.progress p { margin: 0; }
#progress-text { font-weight: 800; color: var(--text); }
.spinner {
  width: 36px; height: 36px; border-radius: 50%; border: 4px solid var(--tomato-soft); border-top-color: var(--tomato);
  animation: spin 0.9s linear infinite; margin-bottom: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }
#import-error { margin-top: 14px; }
.banner {
  background: var(--sage-soft); color: var(--sage-dark); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px;
  display: flex; flex-direction: column; gap: 2px; font-size: 15px; font-weight: 600;
}
.banner strong { font-weight: 800; }
.suggestion {
  background: var(--sage-soft); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px;
}
.suggestion p { margin: 0; font-weight: 600; color: var(--sage-dark); }
.btn-small { min-height: 44px; padding: 0 18px; font-size: 15px; }
.btn-sage { background: var(--sage); color: #fff; }
.btn-sage:active { background: var(--sage-dark); }
.nutrition { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.nutrition h2 { margin: 0 0 10px; font-size: 15px; font-weight: 800; }
.nutrition-values { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; text-align: center; }
.nutrition-values .value { font-size: 20px; font-weight: 800; }
.nutrition-values .unit { font-size: 12px; color: var(--muted); font-weight: 700; }
.nutrition-pending { font-size: 14px; color: var(--muted); font-weight: 600; }

/* ---------- Stage 6: week planner, sheets, settings (values from docs/mockups/Main.dc.html) ---------- */
.week-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.week-heading { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.week-range-row { display: flex; align-items: center; gap: 2px; margin-left: -12px; }
.week-range {
  font-size: 14px; font-weight: 700; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase;
  white-space: nowrap;
}
.icon-btn.small-icon { background: transparent; color: var(--muted); }
.btn-pill { min-height: 44px; padding: 0 18px; font-size: 16px; font-weight: 700; }
.btn-dark { background: var(--text); color: #fff; }
.week-message { margin: 0 0 10px; padding: 10px 14px; border-radius: 12px; font-weight: 700; font-size: 14px; }
.week-message.ok { background: var(--sage-soft); color: var(--sage-dark); }
.week-message.warn, .week-message.info { background: var(--neutral-soft); color: var(--text); }
.nights { display: flex; flex-direction: column; gap: 8px; touch-action: pan-y; }
.night {
  display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 14px; min-height: 52px; width: 100%;
  text-align: left; color: var(--text); cursor: pointer;
}
.night.today { background: #FFF6F1; border: 2px solid var(--tomato); padding: 9px 13px; }
.night.empty {
  background: transparent; border: 2px dashed var(--border-strong); padding: 9px 13px; min-height: 56px;
}
.night-day { width: 44px; flex: none; display: flex; flex-direction: column; align-items: center; }
.night-day .dow { font-size: 12px; font-weight: 700; color: var(--muted); }
.night-day .dom { font-size: 20px; font-weight: 800; }
.night.today .night-day .dow, .night.today .night-day .dom { color: var(--tomato); font-weight: 800; }
.night-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.night-title { font-size: 17px; font-weight: 700; overflow-wrap: anywhere; }
.night-title.note { color: var(--muted); font-style: italic; }
.night-title.removed { color: var(--muted); }
.night-add { flex: 1; font-size: 16px; font-weight: 700; color: var(--muted); }
.night-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.night-meta .family { font-size: 12px; font-weight: 700; color: var(--muted); }
.badge.suggested { color: var(--tomato-dark); background: var(--tomato-soft); }
.night-end { flex: none; display: flex; align-items: center; }
.made-it {
  font-size: 13px; font-weight: 700; color: var(--tomato); background: none; border: 0; padding: 0 4px;
  min-height: 44px; min-width: 44px; cursor: pointer;
}
.grocery-btn { margin-top: 14px; }

/* Bottom sheets (dialogs) */
dialog.sheet {
  border: 0; padding: 18px 18px max(18px, env(safe-area-inset-bottom)); margin: auto auto 0; width: 100%; max-width: 560px;
  max-height: 85vh; border-radius: 22px 22px 0 0; background: var(--bg); color: var(--text); overflow-y: auto;
}
dialog.sheet::backdrop { background: rgba(42, 38, 34, 0.45); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.sheet-head h2 { margin: 0; font-size: 20px; font-weight: 800; }
.sheet-head .icon-btn { font-size: 24px; font-weight: 700; }
.note-form { display: flex; gap: 8px; margin: 4px 0 14px; }
.note-form .input { flex: 1; }
.pick-list, .night-list { display: flex; flex-direction: column; gap: 8px; }
.pick-item, .night-option {
  display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--border);
  border-radius: 14px; padding: 8px; min-height: 56px; width: 100%; text-align: left; color: var(--text); cursor: pointer;
}
.pick-item .thumb { width: 48px; height: 48px; border-radius: 10px; }
.pick-item .pick-title, .night-option .pick-title { font-weight: 800; font-size: 16px; overflow-wrap: anywhere; }
.pick-item .pick-sub, .night-option .pick-sub { font-size: 13px; color: var(--muted); font-weight: 600; }
.night-option .night-day { width: 44px; }
.night-option.filled { opacity: 0.85; }

/* Settings */
.fieldset { border: 0; padding: 0; margin: 0; }
.swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.swatch {
  min-height: 56px; border-radius: 14px; border: 3px solid transparent; color: #fff; font-weight: 800; font-size: 13px;
  cursor: pointer; display: flex; align-items: flex-end; justify-content: flex-start; padding: 6px 8px;
}
.swatch[aria-checked="true"] { border-color: var(--text); box-shadow: 0 0 0 2px #fff inset; }
.swatch:focus-visible { outline: 3px solid var(--tomato-dark); outline-offset: 2px; }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper-input { width: 90px; text-align: center; }
.stepper-btn { border: 1px solid var(--border-strong); font-size: 22px; font-weight: 800; }
.signout-card { margin-top: 18px; }
.signout-card p { margin: 0 0 10px; }

/* ---------- Stage 7: grocery list (values from docs/mockups/List.dc.html) ---------- */
.list-header { display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; }
.list-heading { display: flex; flex-direction: column; gap: 2px; }
.mode-toggle { display: flex; background: #EFE8DD; border-radius: 24px; padding: 4px; }
.mode-toggle button {
  flex: 1; height: 42px; border: 0; border-radius: 20px; font-size: 15px; font-weight: 800;
  background: transparent; color: var(--muted); cursor: pointer;
}
.mode-toggle button[aria-pressed="true"] { background: #fff; color: var(--text); }
.mode-hint { margin: 0; font-size: 14px; color: var(--muted); font-weight: 600; }
.list-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.add-item { margin-bottom: 14px; }
.sync-status { margin: 0 0 10px; font-size: 13px; font-weight: 700; color: var(--tomato-dark); }
.list-groups { display: flex; flex-direction: column; gap: 14px; }
.list-group { display: flex; flex-direction: column; gap: 6px; }
.list-group h2 {
  margin: 0 4px; font-size: 13px; font-weight: 800; color: var(--muted); letter-spacing: 0.05em; text-transform: uppercase;
}
.list-group.pick-store h2 { color: var(--tomato-dark); }
.item-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.item-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-bottom: 1px solid #F2ECE3; min-height: 44px;
}
.item-row:last-child { border-bottom: 0; }
.item-check {
  width: 44px; height: 44px; margin: -6px; border: 0; background: transparent; display: flex;
  align-items: center; justify-content: center; flex: none; cursor: pointer;
}
.item-body {
  flex: 1; min-width: 0; display: flex; flex-direction: column; background: none; border: 0; padding: 0;
  text-align: left; color: var(--text); cursor: pointer; min-height: 44px; justify-content: center;
}
.item-body.faded { opacity: 0.55; }
.item-name { font-size: 16px; font-weight: 700; overflow-wrap: anywhere; }
.item-row.got .item-name { text-decoration: line-through; }
.item-detail { font-size: 13px; color: var(--muted); }
.item-detail .amount-line { display: block; }
.have-btn {
  height: 36px; padding: 0 14px; border-radius: 18px; font-size: 14px; font-weight: 800; flex: none; cursor: pointer;
  border: 1px solid #C9BFAF; background: #fff; color: var(--text); min-width: 44px;
}
.have-btn[aria-pressed="true"] { border-color: var(--sage); background: var(--sage); color: #fff; }
.have-group {
  display: flex; align-items: center; justify-content: space-between; width: 100%; height: 50px; padding: 0 16px; margin-top: 14px;
  border: 1px dashed #C9BFAF; border-radius: 16px; background: transparent; font-size: 15px; font-weight: 700;
  color: var(--text); cursor: pointer;
}
.have-group[aria-expanded="true"] svg { transform: rotate(180deg); }
#have-list { margin-top: 8px; }
.night-option input[type="checkbox"] { width: 24px; height: 24px; accent-color: var(--tomato); flex: none; }
.night-option.disabled { opacity: 0.55; cursor: default; }
#build-go { margin-top: 14px; }
#item-dialog .field { margin-bottom: 12px; }
.chip[aria-checked="true"] { background: var(--text); color: #fff; border-color: var(--text); }
.servings-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.servings-row .label { font-size: 14px; font-weight: 800; }
.servings-value { min-width: 70px; text-align: center; font-weight: 800; font-size: 18px; }
.link-btn.small { font-size: 14px; }
.settings-card { margin-top: 18px; }
.settings-card h2 { margin: 0 0 4px; font-size: 18px; font-weight: 800; }
.settings-card > p { margin: 0 0 12px; }
.store-rows, .staple-rows { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.store-row, .staple-row { display: flex; align-items: center; gap: 6px; }
.store-row .input { flex: 1; min-width: 0; }
.store-row .icon-btn, .staple-row .icon-btn { border: 1px solid var(--border-strong); }
.staple-row span { flex: 1; font-weight: 700; }
