:root {
  --ink: #233126;
  --muted: #718075;
  --cream: #f7f2e8;
  --paper: #fffdf8;
  --line: #e8e0d3;
  --green: #2f6847;
  --green-dark: #214d35;
  --mint: #dcebdc;
  --orange: #e46d3f;
  --shadow: 0 18px 50px rgba(65, 52, 32, 0.08);
  --radius: 26px;
}

[hidden] { display: none !important; }

* { box-sizing: border-box; }

html { background: var(--cream); }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 88% 8%, rgba(231, 188, 121, 0.16), transparent 28%),
    var(--cream);
  font-family: ui-rounded, "SF Pro Rounded", "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select { font: inherit; }
button { color: inherit; }

.app-shell { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 268px;
  padding: 30px 22px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(94, 79, 55, 0.11);
  background: rgba(255, 253, 248, 0.75);
  backdrop-filter: blur(18px);
  z-index: 5;
}

.brand, .mobile-brand { display: flex; align-items: center; gap: 12px; }
.brand-mark, .mobile-brand span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 15px;
  color: #fff;
  background: var(--green);
  font-family: Georgia, serif;
  font-size: 23px;
}
.brand strong { display: block; font-size: 19px; }
.brand small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }

.nav-list { display: grid; gap: 8px; margin-top: 46px; }
.nav-item {
  border: 0;
  border-radius: 16px;
  background: transparent;
  padding: 13px 14px;
  display: flex;
  align-items: center;
  gap: 13px;
  color: #647267;
  cursor: pointer;
  text-align: left;
}
.nav-item span { width: 22px; font-size: 20px; text-align: center; }
.nav-item:hover, .nav-item.active { color: var(--green-dark); background: var(--mint); font-weight: 700; }

.sidebar-card {
  margin-top: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper);
}
.sidebar-card p { margin: 8px 0 14px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.sidebar-actions { display: flex; gap: 14px; }

.main-content { margin-left: 268px; padding: 0 44px 56px; max-width: 1500px; }
.topbar {
  min-height: 116px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.topbar-copy p { margin: 0 0 6px; color: var(--muted); font-size: 13px; }
.topbar-copy h1 { margin: 0; font-size: clamp(27px, 3vw, 38px); letter-spacing: -0.04em; }
.mobile-brand { display: none; border: 0; background: none; font-weight: 800; }

.avatar-button {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 13px 6px 6px;
  background: var(--paper);
  cursor: pointer;
}

.cloud-status {
  margin-left: auto;
  margin-right: 10px;
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--paper);
  font-size: 10px;
  font-weight: 750;
  cursor: pointer;
}
.cloud-status i { width: 7px; height: 7px; border-radius: 50%; background: #b1aaa0; }
.cloud-status.online i { background: #45a267; box-shadow: 0 0 0 4px rgba(69,162,103,.12); }
.cloud-status.syncing i { background: #e3a246; }
.cloud-status.error i { background: #d35f49; }
.avatar-button > span:first-child, .member-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  background: var(--orange);
  font-size: 13px;
  font-weight: 800;
}

.view { display: none; animation: rise 0.26s ease; }
.view.active { display: block; }
@keyframes rise { from { opacity: 0; transform: translateY(7px); } }

.hero-card {
  min-height: 340px;
  padding: 44px clamp(28px, 5vw, 66px);
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  align-items: center;
  gap: 20px;
  border-radius: 34px;
  color: #fff;
  background: linear-gradient(125deg, #2f6847 0%, #397f58 58%, #74a370 100%);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}
.hero-card::before {
  content: "";
  position: absolute;
  width: 340px;
  height: 340px;
  right: -100px;
  top: -140px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%;
}
.hero-copy { position: relative; z-index: 1; }
.hero-copy h2 { margin: 10px 0 12px; font-size: clamp(36px, 5vw, 61px); line-height: 1.06; letter-spacing: -0.055em; }
.hero-copy > p { max-width: 560px; margin: 0; color: rgba(255,255,255,.78); line-height: 1.7; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.hero-meta span { padding: 7px 11px; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; background: rgba(255,255,255,.08); font-size: 12px; }
.hero-actions { display: flex; gap: 10px; margin-top: 30px; }
.hero-visual { display: grid; place-items: center; position: relative; font-size: clamp(130px, 17vw, 230px); filter: drop-shadow(0 20px 25px rgba(9, 35, 21, .22)); transform: rotate(3deg); }

.eyebrow { color: #8b6d3d; font-size: 10px; font-weight: 850; letter-spacing: .18em; text-transform: uppercase; }
.eyebrow.light { color: rgba(255,255,255,.67); }
.primary-button, .secondary-button, .text-button, .icon-button, .close-button {
  border: 0;
  cursor: pointer;
}
.primary-button, .secondary-button {
  min-height: 42px;
  padding: 0 17px;
  border-radius: 13px;
  font-weight: 750;
}
.primary-button { color: #fff; background: var(--green); }
.primary-button:hover { background: var(--green-dark); }
.secondary-button { border: 1px solid var(--line); background: var(--paper); }
.light-button { color: var(--green-dark); background: #fff; }
.light-button:hover { background: #eff5ed; }
.light-secondary { color: #fff; border-color: rgba(255,255,255,.35); background: transparent; }
.text-button { padding: 0; color: var(--green); background: transparent; font-weight: 750; }
.icon-button { width: 35px; height: 35px; border-radius: 50%; background: #edf3ec; color: var(--green); }

.section-heading, .panel-heading, .shopping-header, .toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.section-heading { margin: 44px 0 18px; }
.section-heading h2, .shopping-header h2 { margin: 5px 0 0; font-size: 27px; letter-spacing: -.035em; }

.recipe-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.recipe-card {
  min-width: 0;
  border: 1px solid rgba(72, 56, 38, .08);
  border-radius: var(--radius);
  background: var(--paper);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(65, 52, 32, 0.045);
  transition: transform .18s ease, box-shadow .18s ease;
}
.recipe-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.recipe-art {
  height: 170px;
  display: grid;
  place-items: center;
  position: relative;
  font-size: 76px;
  overflow: hidden;
}
.recipe-art::after { content: ""; width: 120px; height: 120px; position: absolute; border: 1px solid rgba(255,255,255,.5); border-radius: 50%; }
.recipe-art span { position: relative; z-index: 1; filter: drop-shadow(0 12px 12px rgba(35,49,38,.14)); }
.tone-tomato { background: linear-gradient(135deg, #f6b38f, #e8684a); }
.tone-green { background: linear-gradient(135deg, #bcd9b0, #629568); }
.tone-gold { background: linear-gradient(135deg, #f6d699, #e8a949); }
.tone-purple { background: linear-gradient(135deg, #d8bfda, #8f669a); }
.tone-blue { background: linear-gradient(135deg, #c5dfe1, #6fa4ab); }
.recipe-body { padding: 18px; }
.recipe-topline { display: flex; justify-content: space-between; gap: 12px; }
.recipe-topline h3 { margin: 0; font-size: 18px; }
.match-badge { flex: none; color: var(--green); font-size: 11px; font-weight: 800; }
.recipe-description { height: 41px; margin: 8px 0 14px; color: var(--muted); font-size: 12px; line-height: 1.55; overflow: hidden; }
.recipe-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 5px 8px; border-radius: 8px; color: #6e705c; background: #f1eee5; font-size: 10px; }
.recipe-footer { margin-top: 16px; display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 11px; }
.card-actions { display: flex; gap: 8px; }
.card-actions button { border: 0; color: var(--green); background: transparent; cursor: pointer; font-size: 11px; font-weight: 750; }
.card-actions button.selected-action { color: var(--orange); }
.recipe-grid.compact-grid { display: flex; gap: 18px; overflow-x: auto; padding: 2px 2px 14px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.compact-grid .recipe-card { flex: 0 0 clamp(280px, 31vw, 360px); scroll-snap-align: start; }

.home-columns { margin-top: 22px; display: grid; grid-template-columns: 1fr; gap: 20px; }
.panel { padding: 24px; border: 1px solid rgba(72,56,38,.08); border-radius: var(--radius); background: var(--paper); }
.panel-heading h3 { margin: 5px 0 0; font-size: 20px; }
.expiry-list { margin-top: 18px; display: grid; gap: 10px; }
.expiry-item { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid #f0eae0; }
.expiry-item:first-child { border-top: 0; }
.food-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: #f1eee5; font-size: 22px; }
.expiry-item strong { display: block; font-size: 13px; }
.expiry-item small { color: var(--muted); }
.days-badge { padding: 6px 9px; border-radius: 999px; color: #a4452f; background: #fae5dc; font-size: 10px; font-weight: 800; }

.vote-mini-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; margin-top: 15px; }
.vote-mini-row strong { font-size: 13px; }
.vote-mini-row span { color: var(--orange); font-size: 12px; font-weight: 800; }
.mini-track { grid-column: 1 / -1; height: 7px; background: #eee9df; border-radius: 99px; overflow: hidden; }
.mini-track i { display: block; height: 100%; border-radius: inherit; background: var(--orange); }
.today-menu-list { margin-top: 15px; display: grid; gap: 9px; }
.today-menu-row { display: flex; align-items: center; gap: 9px; padding: 9px 0; border-top: 1px solid #f0eae0; }
.today-menu-row:first-child { border-top: 0; }
.today-menu-row span { font-size: 22px; }
.today-menu-row strong { font-size: 13px; }
.today-menu-row button { margin-left: auto; border: 0; color: #b15d48; background: transparent; cursor: pointer; }
.panel-action { width: 100%; margin-top: 16px; }
.today-menu-wide { margin-top: 22px; }
.today-menu-wide .empty-state { padding: 24px 10px 8px; }

.toolbar { margin-bottom: 22px; flex-wrap: wrap; }
.search-box { min-width: 260px; flex: 1; display: flex; align-items: center; gap: 9px; padding: 0 14px; height: 45px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; }
.filter-pills { display: flex; flex-wrap: wrap; gap: 7px; }
.filter-pill { border: 1px solid var(--line); border-radius: 999px; padding: 8px 11px; background: var(--paper); color: var(--muted); cursor: pointer; font-size: 11px; }
.filter-pill.active { color: #fff; border-color: var(--green); background: var(--green); }

.stats-row { margin-bottom: 20px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.stat-card { padding: 20px; border-radius: 20px; background: var(--paper); border: 1px solid var(--line); }
.stat-card strong { display: block; font-size: 28px; }
.stat-card span { color: var(--muted); font-size: 11px; }
.table-panel { padding: 5px 18px; overflow: hidden; }
.pantry-row { display: grid; grid-template-columns: minmax(150px, 1.5fr) .8fr minmax(120px, .8fr) auto; gap: 12px; align-items: center; padding: 14px 5px; border-top: 1px solid #eee8de; font-size: 12px; }
.pantry-row:first-child { border-top: 0; }
.pantry-name { display: flex; align-items: center; gap: 10px; font-weight: 750; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #58a16d; }
.status-dot.low { background: #e6a04b; }
.pantry-status { border: 1px solid var(--line); border-radius: 10px; padding: 8px 9px; color: var(--ink); background: #fff; }
.status-label { padding: 5px 8px; border-radius: 999px; font-size: 10px; font-weight: 800; }
.status-label.enough { color: #31704a; background: #e4f1e6; }
.status-label.low { color: #9a641f; background: #faedcf; }
.status-label.expiring { color: #a4452f; background: #fae5dc; }
.status-label.empty { color: #777; background: #eceae5; }
.row-muted { color: var(--muted); }
.delete-button { border: 0; background: transparent; color: #b15d48; cursor: pointer; }

.vote-header-card { padding: 35px; border-radius: 30px; display: flex; justify-content: space-between; align-items: center; color: #fff; background: linear-gradient(135deg, #9b5c42, #d37b51); }
.vote-header-card h2 { margin: 8px 0 7px; font-size: 32px; }
.vote-header-card p { margin: 0; color: rgba(255,255,255,.72); }
.member-stack { display: flex; }
.member-stack .member-avatar { margin-left: -8px; border: 3px solid rgba(255,255,255,.8); }
.vote-grid { margin-top: 20px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 17px; }
.vote-card { position: relative; border: 2px solid transparent; border-radius: 24px; padding: 15px; background: var(--paper); cursor: pointer; text-align: left; }
.vote-card.selected { border-color: var(--orange); box-shadow: 0 12px 32px rgba(180,91,54,.14); }
.vote-card .recipe-art { height: 145px; border-radius: 17px; }
.vote-card h3 { margin: 13px 2px 4px; }
.vote-card p { margin: 0 2px; color: var(--muted); font-size: 11px; }
.vote-count { position: absolute; right: 25px; top: 25px; z-index: 2; padding: 6px 9px; border-radius: 999px; background: rgba(255,255,255,.9); font-size: 10px; font-weight: 800; }
.vote-result { margin-top: 20px; display: flex; justify-content: space-between; align-items: center; }
.vote-result h3 { margin: 0 0 4px; }
.vote-result p { margin: 0; color: var(--muted); font-size: 12px; }

.menu-header-card { padding: 35px; border-radius: 30px; display: flex; justify-content: space-between; align-items: center; color: #fff; background: linear-gradient(135deg, #315f47, #6f9971); }
.menu-header-card h2 { margin: 8px 0 7px; font-size: 32px; }
.menu-header-card p { margin: 0; color: rgba(255,255,255,.75); }
.menu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 17px; }
.menu-choice { position: relative; border: 2px solid transparent; border-radius: 24px; padding: 15px; background: var(--paper); cursor: pointer; text-align: left; }
.menu-choice.selected { border-color: var(--green); box-shadow: 0 12px 32px rgba(47,104,71,.14); }
.menu-choice .recipe-art { height: 145px; border-radius: 17px; }
.menu-choice h3 { margin: 13px 2px 4px; }
.menu-choice p { margin: 0 2px; color: var(--muted); font-size: 11px; }
.menu-choice-badge { position: absolute; right: 25px; top: 25px; z-index: 2; padding: 6px 9px; border-radius: 999px; background: rgba(255,255,255,.92); color: var(--green); font-size: 10px; font-weight: 800; }
.today-menu-result { margin-top: 20px; }
.today-menu-result-header { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.today-menu-result h3 { margin: 5px 0 0; }

.shopping-header { align-items: flex-end; margin-bottom: 20px; }
.shopping-header p { margin: 7px 0 0; color: var(--muted); }
.shopping-actions { display: flex; gap: 9px; }
.progress-track { height: 9px; background: #e7e0d5; border-radius: 99px; overflow: hidden; }
.progress-track span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--green); transition: width .25s ease; }
.shopping-suggestion-panel { margin-top: 20px; padding: 20px 22px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border: 1px solid #eadcbf; border-radius: 20px; background: #fff8e9; }
.shopping-suggestion-panel h3 { margin: 5px 0 3px; font-size: 17px; }
.shopping-suggestion-panel p { margin: 0; color: var(--muted); font-size: 11px; }
.suggestion-chips { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.suggestion-chips button { min-height: 34px; padding: 0 11px; border: 1px solid #dfc999; border-radius: 999px; color: #795d25; background: #fff; cursor: pointer; font-size: 11px; font-weight: 750; }
.suggestion-chips button:disabled { color: #a9a18f; border-color: #e5dfd3; background: #f4f1ea; cursor: default; }
.shopping-groups { margin-top: 22px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.shopping-group { padding: 22px; border-radius: 24px; background: var(--paper); border: 1px solid var(--line); }
.shopping-group h3 { margin: 0 0 14px; font-size: 16px; }
.shopping-group-title h3 { margin-bottom: 4px; }
.shopping-group-title p { min-height: 32px; margin: 0 0 12px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.shopping-type-required { border-top: 4px solid var(--green); }
.shopping-type-suggested { border-top: 4px solid #d3a34d; }
.shopping-item { display: grid; grid-template-columns: auto 1fr auto; gap: 11px; align-items: center; min-height: 43px; border-top: 1px solid #f0eae0; }
.shopping-item:first-of-type { border-top: 0; }
.shopping-item input { width: 18px; height: 18px; accent-color: var(--green); }
.shopping-item.done .shopping-name { text-decoration: line-through; color: #a3aaa4; }
.shopping-name small { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; font-weight: 400; }
.shopping-empty { padding: 28px 5px; color: var(--muted); text-align: center; font-size: 11px; }
.shopping-amount { color: var(--muted); font-size: 11px; }

.modal { width: min(680px, calc(100vw - 28px)); border: 0; border-radius: 27px; padding: 0; color: var(--ink); background: var(--paper); box-shadow: 0 30px 90px rgba(30,35,30,.25); }
.modal::backdrop { background: rgba(28,36,30,.48); backdrop-filter: blur(4px); }
.modal form { padding: 27px; }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 24px; }
.modal-header h2 { margin: 5px 0 0; }
.close-button { width: 34px; height: 34px; border-radius: 50%; background: #f0ece4; font-size: 21px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field span { color: var(--muted); font-size: 11px; font-weight: 700; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; outline: 0; background: #fff; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: #6e9879; box-shadow: 0 0 0 3px rgba(80,130,93,.1); }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; }
.small-modal { width: min(480px, calc(100vw - 28px)); }
.simple-fields { display: grid; gap: 14px; }
.file-button input { display: none; }
.auth-modal form { padding: 30px; }
.auth-tabs { margin-bottom: 20px; padding: 4px; display: grid; grid-template-columns: 1fr 1fr; border-radius: 13px; background: #f0ece4; }
.auth-tabs button { min-height: 36px; border: 0; border-radius: 10px; color: var(--muted); background: transparent; cursor: pointer; }
.auth-tabs button.active { color: var(--green-dark); background: #fff; box-shadow: 0 3px 12px rgba(40,45,38,.08); font-weight: 800; }
.form-message { min-height: 18px; margin: 13px 0 0; color: #b15743; font-size: 11px; line-height: 1.5; }
.split-actions { justify-content: space-between; align-items: center; }
.household-options { margin: 17px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.option-card { position: relative; padding: 15px; display: grid; gap: 4px; border: 1px solid var(--line); border-radius: 15px; cursor: pointer; }
.option-card.selected { border-color: var(--green); background: #edf4ed; }
.option-card input { position: absolute; opacity: 0; }
.option-card strong { font-size: 12px; }
.option-card small { color: var(--muted); font-size: 9px; line-height: 1.4; }
.invite-code-card { padding: 20px; display: grid; justify-items: center; gap: 7px; border-radius: 19px; background: #edf4ed; }
.invite-code-card > span { color: var(--muted); font-size: 10px; }
.invite-code-card strong { color: var(--green-dark); font-size: 28px; letter-spacing: .15em; }
.family-member-list { margin-top: 18px; display: grid; gap: 8px; }
.family-member-row { padding: 9px 0; display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); }
.family-member-row:first-child { border-top: 0; }
.family-member-row strong { font-size: 12px; }
.family-member-row small { margin-left: auto; color: var(--muted); font-size: 9px; }
.danger-text { color: #b15743; }

.toast { position: fixed; left: 50%; bottom: 28px; z-index: 20; transform: translate(-50%, 20px); padding: 11px 16px; border-radius: 999px; color: #fff; background: #26392d; opacity: 0; pointer-events: none; transition: .2s ease; font-size: 12px; box-shadow: var(--shadow); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.empty-state { padding: 50px 20px; grid-column: 1 / -1; color: var(--muted); text-align: center; }
.mobile-nav { display: none; }

@media (max-width: 1050px) {
  .recipe-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .sidebar { display: none; }
  .main-content { margin: 0; padding: 0 16px 34px; }
  .topbar { min-height: 88px; }
  .mobile-brand { display: flex; }
  .mobile-brand span { width: 34px; height: 34px; border-radius: 11px; font-size: 18px; }
  .topbar-copy { display: none; }
  .cloud-status { margin-left: auto; }
  .cloud-status span { display: none; }
  .cloud-status { width: 34px; padding: 0; justify-content: center; }
  .avatar-button > span:last-child { display: none; }
  .hero-card { min-height: 465px; grid-template-columns: 1fr; padding: 31px 25px; }
  .hero-visual { grid-row: 1; font-size: 120px; height: 140px; }
  .hero-copy h2 { font-size: 38px; }
  .hero-actions { flex-wrap: wrap; }
  .recipe-grid, .vote-grid, .menu-grid, .shopping-groups, .home-columns { grid-template-columns: 1fr; }
  .compact-grid { display: flex; overflow-x: auto; padding: 0 2px 10px; scroll-snap-type: x mandatory; }
  .compact-grid .recipe-card { min-width: 82%; flex-basis: 82%; display: block !important; scroll-snap-align: start; }
  .section-heading { margin-top: 32px; }
  .section-heading h2 { font-size: 22px; }
  .toolbar { align-items: stretch; }
  .toolbar > * { width: 100%; }
  .search-box { min-width: 0; }
  .filter-pills { overflow-x: auto; flex-wrap: nowrap; }
  .filter-pill { flex: none; }
  .stats-row { grid-template-columns: repeat(3, 1fr); gap: 7px; }
  .stat-card { padding: 14px 11px; }
  .stat-card strong { font-size: 22px; }
  .pantry-row { grid-template-columns: 1fr auto auto; }
  .pantry-row .pantry-category { display: none; }
  .vote-header-card { padding: 27px 23px; align-items: flex-start; }
  .vote-header-card h2 { font-size: 27px; }
  .member-stack { display: none; }
  .vote-result, .today-menu-result-header, .shopping-header { align-items: flex-start; flex-direction: column; }
  .shopping-actions { width: 100%; }
  .shopping-actions button { flex: 1; }
  .shopping-suggestion-panel { align-items: flex-start; flex-direction: column; }
  .suggestion-chips { justify-content: flex-start; }
  .form-grid { grid-template-columns: 1fr; }
  .household-options { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .mobile-nav {
    position: fixed;
    inset: auto 0 0;
    z-index: 10;
    height: calc(64px + env(safe-area-inset-bottom));
    padding: 6px 8px env(safe-area-inset-bottom);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid rgba(60,50,37,.12);
    background: rgba(255,253,248,.92);
    backdrop-filter: blur(18px);
  }
  .mobile-nav button { border: 0; background: transparent; color: #899089; font-size: 9px; }
  .mobile-nav button span { display: block; margin-bottom: 3px; font-size: 20px; }
  .mobile-nav button.active { color: var(--green); font-weight: 800; }
  .toast { bottom: 84px; }
}

@media (max-width: 390px) {
  .hero-card { padding: 27px 21px; }
  .hero-copy h2 { font-size: 34px; }
  .panel { padding: 20px; }
}
