:root {
  color-scheme: light;
  --ink: #1d2a24;
  --muted: #6e766f;
  --paper: #f7f4ec;
  --surface: #fffdf8;
  --line: rgba(43, 58, 49, 0.12);
  --green: #285f43;
  --green-dark: #194530;
  --lime: #d9eb9e;
  --warm: #e8a35f;
  --shadow: 0 18px 50px rgba(39, 51, 43, 0.1);
  font-family: Inter, ui-rounded, "SF Pro Rounded", "SF Pro Display", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { width: 100%; max-width: 100%; overflow-x: hidden; overflow-x: clip; }
html { background: var(--paper); scroll-behavior: smooth; overscroll-behavior-x: none; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-width: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% -10%, rgba(217, 235, 158, 0.55), transparent 32rem),
    var(--paper);
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-x: none;
}
button, input { font: inherit; touch-action: manipulation; }
button { color: inherit; }
[hidden] { display: none !important; }
button:focus-visible, input:focus-visible { outline: 3px solid rgba(40, 95, 67, 0.28); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.app-shell { width: min(100%, 740px); min-height: 100vh; margin: 0 auto; padding: 0 22px 116px; }

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: calc(76px + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
  background: linear-gradient(to bottom, rgba(247, 244, 236, .97) 65%, rgba(247, 244, 236, 0));
  backdrop-filter: blur(16px);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; }
.brand-mark { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 14px; color: #fff; background: var(--green); box-shadow: 0 9px 20px rgba(40, 95, 67, .2); }
.brand-mark svg { width: 26px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 17px; letter-spacing: -.02em; }
.brand small { margin-top: 1px; color: var(--muted); font-size: 11px; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.family-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 99px; color: #2c6044; background: #e1eee5; font-size: 9px; font-weight: 800; }
.family-badge::before { width: 6px; height: 6px; border-radius: 50%; background: currentColor; content: ""; }
.family-badge.connecting { color: #7b6327; background: #f5edce; }
.family-badge.offline { color: #9b463e; background: #f8e4df; }
.icon-button { display: grid; width: 42px; height: 42px; padding: 0; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: rgba(255, 253, 248, .78); cursor: pointer; }
.icon-button svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.view { display: none; animation: view-in .35s ease both; }
.view.active { display: block; }
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } }
.eyebrow { display: block; color: var(--green); font-size: 10px; font-weight: 800; letter-spacing: .18em; }
.voice-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px;
  align-items: center;
  min-height: 214px;
  margin-top: 10px;
  padding: 32px;
  overflow: hidden;
  border-radius: 32px;
  background:
    radial-gradient(circle at 89% 19%, rgba(255,255,255,.68) 0 12%, transparent 12.4%),
    linear-gradient(135deg, #deeca8, #c6dd84);
  box-shadow: var(--shadow);
}
.voice-card::after { content: ""; position: absolute; right: -56px; bottom: -96px; width: 220px; height: 220px; border: 1px solid rgba(42, 84, 57, .16); border-radius: 50%; box-shadow: 0 0 0 24px rgba(255,255,255,.08), 0 0 0 50px rgba(255,255,255,.06); pointer-events: none; }
.voice-copy { position: relative; z-index: 2; }
.voice-card h1 { max-width: 360px; margin: 6px 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(26px, 6vw, 36px); font-weight: 500; line-height: 1; letter-spacing: -.04em; }
.voice-card p { max-width: 340px; margin: 0; color: rgba(29, 42, 36, .7); font-size: 11px; line-height: 1.35; }
.live-transcript { min-height: 16px; margin-top: 5px; font-size: 12px; font-weight: 750; }
.mic-button { position: relative; z-index: 3; display: grid; width: 72px; height: 72px; margin-left: auto; place-items: center; border: 0; border-radius: 50%; color: #fff; background: var(--green-dark); box-shadow: 0 12px 24px rgba(25, 69, 48, .25); cursor: pointer; transition: transform .2s ease, background .2s ease; }
.mic-button:active { transform: scale(.94); }
.mic-button svg { width: 34px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.mic-ripple { position: absolute; inset: -10px; border: 1px solid rgba(25,69,48,.22); border-radius: 50%; }
.listening .mic-button { background: #c25d49; }
.listening .mic-ripple { animation: listen 1.35s ease-out infinite; }
@keyframes listen { to { opacity: 0; transform: scale(1.45); } }

.quick-add { display: flex; gap: 9px; margin: 15px 0 32px; padding: 7px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255, 253, 248, .86); box-shadow: 0 8px 28px rgba(39,51,43,.05); }
.quick-add input { min-width: 0; flex: 1; padding: 8px 12px; border: 0; color: var(--ink); background: transparent; font-size: 16px; }
.quick-add input::placeholder { color: #969b96; }
.quick-add input:focus { outline: none; }
.quick-add button, .shopping-start { border: 0; border-radius: 12px; font-weight: 750; cursor: pointer; }
.quick-add button { padding: 11px 17px; color: #fff; background: var(--green); }

.list-selector-row { display: flex; align-items: center; gap: 9px; margin: 17px 0 10px; }
.list-switcher { display: flex; min-width: 0; flex: 1; gap: 7px; overflow-x: auto; padding: 2px 0; scrollbar-width: none; }
.list-switcher::-webkit-scrollbar { display: none; }
.list-switcher button, .list-create-button { min-height: 38px; flex: 0 0 auto; padding: 0 13px; border: 1px solid var(--line); border-radius: 99px; background: rgba(255,253,248,.82); font-size: 11px; font-weight: 780; cursor: pointer; }
.list-switcher button.active { border-color: var(--green); color: #fff; background: var(--green); }
.list-create-button { color: var(--green); background: rgba(40,95,67,.08); }
.special-list-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 13px; padding: 11px 13px; border: 1px solid #d8dfc3; border-radius: 15px; background: #f0f4df; }
.special-list-actions > span { color: var(--muted); font-size: 9px; line-height: 1.35; }
.special-list-actions > div { display: flex; flex: 0 0 auto; gap: 6px; }
.special-list-actions button { min-height: 32px; padding: 0 10px; border: 0; border-radius: 10px; color: var(--green); background: rgba(40,95,67,.1); font-size: 9px; font-weight: 800; cursor: pointer; }
.special-list-actions button.share { color: #fff; background: var(--green); }
.special-list-actions button.delete { color: #9b463e; background: #f8e4df; }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 15px; }
.section-heading h2 { margin: 5px 0 0; font-family: Georgia, "Times New Roman", serif; font-size: 30px; font-weight: 500; letter-spacing: -.035em; }
.count-badge { display: inline-grid; min-width: 25px; height: 25px; padding: 0 7px; place-items: center; vertical-align: 4px; border-radius: 99px; color: #fff; background: var(--green); font-family: Inter, system-ui, sans-serif; font-size: 12px; font-weight: 800; }
.shopping-start { display: flex; align-items: center; gap: 7px; padding: 11px 13px; color: var(--green); background: rgba(40,95,67,.08); font-size: 12px; }
.shopping-start:disabled { opacity: .4; cursor: default; }
.shopping-start svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.category-list { display: grid; gap: 14px; }
.category-group { overflow: hidden; border: 1px solid var(--line); border-radius: 21px; background: rgba(255,253,248,.9); box-shadow: 0 8px 28px rgba(39,51,43,.045); }
.category-heading { display: flex; align-items: center; gap: 10px; padding: 13px 15px 10px; }
.category-heading h3 { flex: 1; margin: 0; font-size: 13px; font-weight: 800; }
.category-heading > span:last-child { color: var(--muted); font-size: 11px; font-weight: 750; }
.category-icon { display: grid; width: 29px; height: 29px; place-items: center; border-radius: 10px; color: var(--category-color); background: color-mix(in srgb, var(--category-color) 12%, white); }
.category-icon svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.item-list { padding: 0 10px 8px; }
.shopping-item { display: flex; min-height: 56px; align-items: center; gap: 10px; padding: 7px 5px; border-top: 1px solid rgba(43,58,49,.075); transition: opacity .2s ease; }
.item-check { display: grid; width: 28px; height: 28px; flex: 0 0 auto; place-items: center; border: 1.5px solid #c3c8c3; border-radius: 50%; background: #fff; cursor: pointer; }
.item-check svg { width: 17px; fill: none; stroke: transparent; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.shopping-item.checked { opacity: .52; }
.shopping-item.checked .item-check { border-color: var(--green); background: var(--green); }
.shopping-item.checked .item-check svg { stroke: #fff; }
.shopping-item.checked .item-copy strong { text-decoration: line-through; }
.item-edit-trigger { display: flex; min-width: 0; flex: 1; align-items: center; gap: 9px; padding: 4px 0; border: 0; color: inherit; background: transparent; font: inherit; text-align: left; cursor: pointer; }
.item-edit-trigger:focus-visible { border-radius: 9px; outline: 3px solid rgba(40, 95, 67, .23); }
.item-photo-thumb { width: 38px; height: 38px; flex: 0 0 auto; overflow: hidden; border-radius: 11px; background: #edf0e5; }
.item-photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.item-copy { min-width: 0; flex: 1; }
.item-copy strong, .item-copy small { display: block; }
.item-copy strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.item-copy small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.quantity-control { display: none; align-items: center; gap: 5px; }
.shopping-item:hover .quantity-control, .shopping-mode .quantity-control { display: flex; }
.quantity-control button { width: 27px; height: 27px; padding: 0; border: 0; border-radius: 8px; background: #f0eee8; font-weight: 800; cursor: pointer; }
.quantity-control span { min-width: 16px; text-align: center; font-size: 12px; font-weight: 750; }
.item-remove { width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; color: #9a9e9a; background: transparent; font-size: 20px; cursor: pointer; }

.empty-state, .ideas-empty, .history-empty { padding: 42px 24px; border: 1px dashed rgba(43,58,49,.17); border-radius: 24px; text-align: center; }
.empty-state h3, .ideas-empty h3, .history-empty h3 { margin: 16px 0 6px; font-family: Georgia, serif; font-size: 21px; font-weight: 500; }
.empty-state p, .ideas-empty p, .history-empty p { max-width: 360px; margin: 0 auto; color: var(--muted); font-size: 13px; line-height: 1.55; }
.empty-illustration { position: relative; width: 88px; height: 72px; margin: 0 auto; }
.empty-illustration svg { position: absolute; left: 19px; bottom: 0; width: 50px; fill: none; stroke: var(--green); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.empty-illustration span { position: absolute; bottom: 22px; width: 17px; height: 30px; border-radius: 12px 12px 5px 5px; background: #d9eb9e; transform: rotate(-8deg); }
.empty-illustration span:nth-child(1) { left: 20px; }
.empty-illustration span:nth-child(2) { left: 37px; height: 38px; background: #e8a35f; transform: rotate(4deg); }
.empty-illustration span:nth-child(3) { left: 53px; height: 26px; background: #aecbd2; transform: rotate(11deg); }

.page-intro { padding: 34px 4px 27px; }
.page-intro h1 { margin: 8px 0 9px; font-family: Georgia, serif; font-size: clamp(36px, 9vw, 50px); font-weight: 500; line-height: 1; letter-spacing: -.045em; }
.page-intro p { max-width: 480px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.suggestion-section { margin-bottom: 34px; }
.suggestion-heading h2 { margin: 0; font-family: Georgia, serif; font-size: 25px; font-weight: 500; letter-spacing: -.025em; }
.suggestion-heading p { margin: 4px 0 14px; color: var(--muted); font-size: 12px; }
.suggestion-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.suggestion-card { position: relative; display: flex; min-height: 178px; flex-direction: column; padding: 17px; overflow: hidden; border-radius: 22px; background: #e7efca; }
.suggestion-card.history { background: #e7ebe5; }
.suggestion-card::after { content: ""; position: absolute; width: 100px; height: 100px; top: -45px; right: -35px; border: 1px solid rgba(40,95,67,.1); border-radius: 50%; box-shadow: 0 0 0 16px rgba(255,255,255,.12); pointer-events: none; }
.suggestion-dismiss { position: absolute; z-index: 2; top: 8px; right: 8px; width: 28px; height: 28px; border: 0; border-radius: 50%; color: rgba(29,42,36,.55); background: rgba(255,255,255,.38); font-size: 18px; cursor: pointer; }
.suggestion-art { display: grid; width: 45px; height: 45px; margin-bottom: 17px; place-items: center; border-radius: 15px; color: var(--green); background: rgba(255,255,255,.58); }
.suggestion-art svg { width: 25px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.suggestion-card strong, .suggestion-card small { display: block; }
.suggestion-card strong { font-family: Georgia, serif; font-size: 18px; font-weight: 600; }
.suggestion-card small { min-height: 30px; margin-top: 3px; color: rgba(29,42,36,.62); font-size: 10px; line-height: 1.4; }
.suggestion-add { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-top: auto; padding: 9px 11px; border: 0; border-radius: 11px; color: #fff; background: var(--green); font-size: 11px; font-weight: 800; cursor: pointer; }
.suggestion-add span { font-size: 17px; line-height: .7; }
.ideas-empty > svg { width: 44px; fill: none; stroke: var(--green); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.expiration-add-form { display: grid; grid-template-columns: minmax(0, 1fr) 155px auto; align-items: end; gap: 10px; margin-bottom: 24px; padding: 15px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,253,248,.84); }
.expiration-add-form label span { display: block; margin: 0 0 6px 2px; color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.expiration-add-form input { width: 100%; min-height: 45px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: #fff; }
.expiration-add-form button { min-height: 45px; padding: 0 15px; border: 0; border-radius: 12px; color: #fff; background: var(--green); font-size: 11px; font-weight: 800; cursor: pointer; }
.expiration-empty { margin-top: 8px; }
.expiration-section { margin-bottom: 34px; }
.expiration-list { display: grid; gap: 10px; }
.expiration-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 13px; padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,253,248,.88); }
.expiration-card.soon { border-color: #e7c888; background: #fff7e5; }
.expiration-card.urgent { border-color: #e1a59a; background: #fcece8; }
.expiration-clock { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 14px; color: var(--green); background: #e5edce; }
.expiration-card.soon .expiration-clock { color: #8f6724; background: #f6e4b8; }
.expiration-card.urgent .expiration-clock { color: #a64538; background: #f7d5ce; }
.expiration-clock svg { width: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.expiration-card strong, .expiration-card b, .expiration-card small { display: block; }
.expiration-card strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.expiration-card b { margin-top: 2px; color: var(--green); font-size: 11px; }
.expiration-card.soon b { color: #8f6724; }
.expiration-card.urgent b { color: #a64538; }
.expiration-card small { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.35; }
.expiration-card-actions { display: grid; gap: 6px; }
.expiration-card-actions button { min-height: 36px; padding: 0 11px; border: 0; border-radius: 11px; color: var(--green); background: #edf0e5; font-size: 10px; font-weight: 800; cursor: pointer; }
.expiration-card-actions .expiration-edit { color: #fff; background: var(--green); }
.suggestion-card.purchased { background: linear-gradient(145deg, #fffdf8, #edf3e2); }

.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin-bottom: 28px; }
.stats-grid article { padding: 19px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,253,248,.8); }
.stats-grid article.wide { grid-column: 1 / -1; }
.stats-grid strong, .stats-grid span { display: block; }
.stats-grid strong { overflow: hidden; color: var(--green); font-family: Georgia, serif; font-size: 27px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.stats-grid span { margin-top: 4px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; }
.history-list { display: grid; gap: 18px; }
.history-list section { padding: 17px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,253,248,.82); }
.history-list h3 { margin: 0 0 10px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .09em; }
.history-list section > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid rgba(43,58,49,.07); font-size: 13px; }
.history-list small { color: var(--muted); }

.bottom-nav { position: fixed; z-index: 30; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); display: grid; width: min(calc(100% - 28px), 560px); grid-template-columns: repeat(4, 1fr); padding: 7px; border: 1px solid rgba(43,58,49,.11); border-radius: 23px; background: rgba(255,253,248,.9); box-shadow: 0 16px 45px rgba(35,48,40,.15); backdrop-filter: blur(18px); transform: translateX(-50%); }
.bottom-nav button { position: relative; display: flex; min-height: 53px; align-items: center; justify-content: center; gap: 7px; border: 0; border-radius: 17px; color: var(--muted); background: transparent; font-size: 11px; font-weight: 750; cursor: pointer; }
.bottom-nav button.active { color: #fff; background: var(--green); }
.bottom-nav svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bottom-nav i { position: absolute; top: 8px; right: 22%; display: none; width: 7px; height: 7px; border: 2px solid var(--surface); border-radius: 50%; background: #e47755; }
.bottom-nav i.visible { display: block; }

.shopping-dock { position: fixed; z-index: 35; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); display: none; width: min(calc(100% - 28px), 560px); align-items: center; justify-content: space-between; gap: 12px; padding: 10px 10px 10px 18px; border-radius: 22px; color: #fff; background: var(--green-dark); box-shadow: 0 15px 42px rgba(25,69,48,.28); transform: translateX(-50%); }
.shopping-mode .shopping-dock { display: flex; }
.shopping-mode .bottom-nav { display: none; }
.shopping-dock strong, .shopping-dock small { display: block; }
.shopping-dock strong { font-size: 15px; }
.shopping-dock small { margin-top: 1px; color: rgba(255,255,255,.62); font-size: 9px; }
.shopping-dock button { padding: 12px 15px; border: 0; border-radius: 14px; color: var(--green-dark); background: var(--lime); font-size: 11px; font-weight: 850; cursor: pointer; }
.shopping-mode .voice-card, .shopping-mode .quick-add, .shopping-mode .shopping-start { display: none; }
.shopping-mode .list-section { padding-top: 18px; }

.app-dialog, .settings-sheet { width: min(calc(100% - 32px), 420px); border: 0; color: var(--ink); background: var(--surface); box-shadow: 0 25px 80px rgba(25,40,31,.25); }
.app-dialog { padding: 28px; border-radius: 28px; text-align: center; }
dialog::backdrop { background: rgba(26,35,29,.42); backdrop-filter: blur(5px); }
.dialog-icon { display: grid; width: 58px; height: 58px; margin: 0 auto 20px; place-items: center; border-radius: 20px; }
.dialog-icon svg { width: 29px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.duplicate-icon { color: #9a632f; background: #f8e6c7; }
.finish-icon { color: var(--green); background: #e2edbf; }
.app-dialog h2 { margin: 9px 0; font-family: Georgia, serif; font-size: 26px; font-weight: 500; line-height: 1.05; }
.app-dialog p { margin: 0 auto 22px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.item-edit-dialog { max-height: calc(var(--visible-viewport-height, 100dvh) - max(24px, env(safe-area-inset-top))); overflow-y: auto; text-align: left; }
.item-edit-dialog > .eyebrow, .item-edit-dialog > h2, .item-edit-dialog > p { display: block; text-align: center; }
.item-edit-fields { display: grid; gap: 12px; margin-bottom: 17px; }
.item-edit-fields label { display: block; min-width: 0; }
.item-edit-fields label > span { display: block; margin: 0 0 6px 2px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.item-edit-fields input, .item-edit-fields select { width: 100%; min-height: 47px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: #fff; font: inherit; }
.item-edit-row { display: grid; grid-template-columns: 95px minmax(0, 1fr); gap: 10px; }
.item-photo-editor { display: grid; grid-template-columns: 88px minmax(0, 1fr); align-items: center; gap: 14px; margin-bottom: 19px; padding: 12px; border: 1px solid var(--line); border-radius: 17px; background: #f5f5ee; }
.item-photo-preview { display: grid; width: 88px; height: 88px; place-items: center; overflow: hidden; border-radius: 15px; color: var(--green); background: #e3ead2; }
.item-photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.item-photo-preview span { display: grid; place-items: center; }
.item-photo-preview svg { width: 33px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.item-photo-copy strong, .item-photo-copy small { display: block; }
.item-photo-copy strong { font-size: 12px; }
.item-photo-copy small { margin: 3px 0 9px; color: var(--muted); font-size: 9px; line-height: 1.35; }
.item-photo-picker, .item-photo-remove { display: inline-flex; min-height: 34px; align-items: center; justify-content: center; padding: 0 10px; border: 0; border-radius: 9px; font-size: 9px; font-weight: 800; cursor: pointer; }
.item-photo-picker { color: #fff; background: var(--green); }
.item-photo-picker.loading { opacity: .6; pointer-events: none; }
.item-photo-picker input { display: none; }
.item-photo-remove { margin-top: 6px; color: #9b463e; background: #f8e4df; }
.item-edit-dialog .dialog-actions button:disabled { opacity: .55; cursor: wait; }
.special-list-icon { color: var(--green); background: #e5edce; }
.special-list-name-field { display: block; margin: 0 0 18px; text-align: left; }
.special-list-name-field span { display: block; margin: 0 0 6px 2px; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.special-list-name-field input { width: 100%; min-height: 48px; padding: 0 13px; border: 1px solid var(--line); border-radius: 13px; color: var(--ink); background: #fff; }
.password-icon { color: var(--green); background: #e5edce; }
.password-guidance { display: block; margin: -7px 2px 18px; color: var(--muted); font-size: 9px; line-height: 1.45; text-align: left; }
.shared-password-dialog .special-list-name-field { margin-bottom: 12px; }
.account-icon { color: var(--green); background: #e1eee5; }
.account-provider-actions { display: grid; gap: 10px; margin: 18px 0 11px; }
.provider-button { display: flex; min-height: 50px; align-items: center; justify-content: center; gap: 11px; border: 1px solid var(--line); border-radius: 14px; font-size: 13px; font-weight: 800; cursor: pointer; }
.provider-button span { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; font-size: 13px; }
.provider-button.google { color: #27352d; background: #fff; }
.provider-button.google span { color: #fff; background: #4285f4; }
.provider-button.apple { color: #fff; border-color: #111; background: #111; }
.provider-button.apple span { color: #111; background: #fff; }
.provider-button:disabled { opacity: .55; cursor: wait; }
.account-guidance { display: block; color: var(--muted); font-size: 9px; line-height: 1.45; }
.account-cancel { width: 100%; margin-top: 14px; }
.members-list { display: grid; gap: 8px; max-height: 260px; margin: 15px 0 18px; overflow-y: auto; text-align: left; }
.member-row { display: flex; min-height: 50px; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.member-row .account-avatar { flex: 0 0 auto; }
.member-copy { min-width: 0; flex: 1; }
.member-copy strong, .member-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-copy small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.member-role { color: var(--green); font-size: 9px; font-weight: 800; }
.member-remove { min-height: 30px; padding: 0 9px; border: 0; border-radius: 9px; color: #9b463e; background: #f8e4df; font-size: 9px; font-weight: 800; }

.standalone-special-list .bottom-nav,
.standalone-special-list #settingsButton,
.standalone-special-list #familyBadge,
.standalone-special-list #listSelectorRow,
.standalone-special-list #specialListActions,
.standalone-special-list #shoppingStart { display: none !important; }
.standalone-special-list .app-shell { padding-bottom: 38px; }

.dialog-actions { display: grid; gap: 8px; }
.dialog-actions button { min-height: 48px; border: 0; border-radius: 14px; font-size: 12px; font-weight: 800; cursor: pointer; }
.dialog-actions .primary { color: #fff; background: var(--green); }
.dialog-actions .secondary { color: var(--ink); background: #f0eee8; }
.expiration-icon { color: var(--green); background: #e2edbf; }
.expiration-warning-icon { color: #a64538; background: #f7d5ce; }
.expiration-date-dialog { max-height: calc(100dvh - 24px); padding: 0; overflow: auto; text-align: left; }
.expiration-dialog-header { position: sticky; z-index: 2; top: 0; padding: 21px 23px 19px; border-bottom: 1px solid rgba(40,95,67,.1); background: #eff4df; }
.expiration-dialog-kicker { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; color: var(--green); font-size: 9px; font-weight: 850; letter-spacing: .11em; }
.expiration-dialog-kicker span:last-child { color: var(--muted); letter-spacing: 0; text-transform: none; }
.expiration-product-card { display: flex; align-items: center; gap: 14px; min-width: 0; }
.expiration-product-card .dialog-icon { width: 48px; height: 48px; flex: 0 0 auto; margin: 0; border-radius: 16px; background: rgba(255,255,255,.72); }
.expiration-product-card .dialog-icon svg { width: 25px; }
.expiration-product-copy { min-width: 0; }
.expiration-product-copy > span { display: block; margin-bottom: 3px; color: var(--muted); font-size: 8px; font-weight: 850; letter-spacing: .1em; }
.expiration-date-dialog .expiration-product-copy h2 { margin: 0; overflow-wrap: anywhere; color: var(--green-dark); font-family: inherit; font-size: 23px; font-weight: 850; line-height: 1.08; }
.expiration-product-copy small { display: block; margin-top: 3px; color: var(--green); font-size: 11px; font-weight: 750; }
.expiration-dialog-body { padding: 20px 23px 23px; }
.expiration-dialog-body h3 { margin: 0 0 6px; font-family: Georgia, serif; font-size: 24px; font-weight: 500; }
.expiration-date-dialog .expiration-dialog-body > p { margin: 0 0 16px; font-size: 12px; }
.expiration-quick-dates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 17px; }
.expiration-quick-dates button { min-height: 42px; padding: 0 10px; border: 1px solid var(--line); border-radius: 12px; color: var(--green); background: #f3f5eb; font-size: 11px; font-weight: 800; cursor: pointer; }
.expiration-quick-dates button.selected { border-color: var(--green); color: #fff; background: var(--green); box-shadow: 0 6px 16px rgba(40,95,67,.18); }
.expiration-date-field { display: block; margin: 0 0 18px; text-align: left; }
.expiration-date-field span { display: block; margin: 0 0 7px 2px; color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.expiration-date-field input { width: 100%; min-height: 50px; padding: 0 13px; border: 1px solid var(--line); border-radius: 13px; color: var(--ink); background: #fff; font: inherit; font-weight: 700; }
.expiration-alert-dialog h2 { font-size: 24px; }
.extra-purchase-fields { display: grid; gap: 11px; margin: -4px 0 20px; text-align: left; }
.extra-purchase-fields label span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 10px; font-weight: 750; }
.extra-purchase-fields input { width: 100%; min-height: 47px; padding: 0 13px; border: 1px solid var(--line); border-radius: 13px; color: var(--ink); background: #fff; font: inherit; }

.settings-sheet { position: fixed; top: auto; right: auto; bottom: 0; left: 50%; max-height: 88vh; max-height: calc(var(--visible-viewport-height, 100dvh) - max(24px, env(safe-area-inset-top))); margin: 0; padding: 14px 23px calc(26px + env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain; border-radius: 28px 28px 0 0; transform: translateX(-50%); }
.sheet-handle { width: 43px; height: 5px; margin: 0 auto 18px; border-radius: 99px; background: #d2d2cc; }
.sheet-heading { position: sticky; z-index: 4; top: -14px; display: flex; align-items: center; justify-content: space-between; margin: -14px -7px 16px; padding: 14px 7px 10px; background: linear-gradient(to bottom, var(--surface) 78%, rgba(255,253,248,0)); }
.sheet-heading h2 { margin: 4px 0 0; font-family: Georgia, serif; font-size: 29px; font-weight: 500; }
.sheet-heading .icon-button { font-size: 25px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.setting-row strong, .setting-row small { display: block; }
.setting-row strong { font-size: 13px; }
.setting-row small { max-width: 260px; margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.4; }
input[role="switch"] { width: 44px; height: 26px; flex: 0 0 auto; appearance: none; border-radius: 99px; background: #d5d6d1; cursor: pointer; transition: .2s; }
input[role="switch"]::after { content: ""; display: block; width: 22px; height: 22px; margin: 2px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.18); transition: .2s; }
input[role="switch"]:checked { background: var(--green); }
input[role="switch"]:checked::after { transform: translateX(18px); }
.settings-group { padding: 20px 0; }
.settings-group > strong { font-size: 13px; }
.settings-group > p { margin: 4px 0 13px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.settings-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.settings-actions button, .import-button { display: grid; min-height: 44px; place-items: center; border: 1px solid var(--line); border-radius: 12px; background: #f4f2ec; font-size: 11px; font-weight: 750; cursor: pointer; }
.family-settings { border-bottom: 1px solid var(--line); }
.family-actions { display: flex; }
.family-actions button { flex: 1; padding: 8px 12px; }
.family-actions .family-share-button { border-color: transparent; color: #fff; background: var(--green); }
.family-privacy { display: block; margin-top: 10px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.account-settings { border-bottom: 1px solid var(--line); }
.account-summary { display: flex; align-items: center; gap: 10px; margin: 11px 0; }
.account-avatar { display: grid; width: 38px; height: 38px; place-items: center; overflow: hidden; border-radius: 50%; color: #fff; background: var(--green); font-size: 14px; font-weight: 850; }
.account-avatar img { width: 100%; height: 100%; object-fit: cover; }
.account-summary > span:last-child { min-width: 0; }
.account-summary b, .account-summary small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-summary small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.account-actions { display: flex; }
.account-actions button { flex: 1; }
.account-list-memberships { display: grid; gap: 6px; margin-top: 10px; }
.account-list-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 9px; border-radius: 10px; background: #f4f5ef; }
.account-list-row span { min-width: 0; overflow: hidden; font-size: 9px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.account-list-row span small { display: block; margin-top: 2px; color: var(--muted); font-size: 8px; font-weight: 600; }
.account-list-row button { min-height: 28px; padding: 0 9px; border: 0; border-radius: 8px; color: var(--green); background: #e1eee5; font-size: 9px; font-weight: 800; }
.account-delete { margin-top: 8px; }
.import-button input { display: none; }
.danger-button { width: 100%; min-height: 44px; border: 0; border-radius: 12px; color: #a63d32; background: #fae9e5; font-size: 11px; font-weight: 800; cursor: pointer; }
.legal-links { margin: 16px 0 0; color: var(--muted); font-size: 10px; text-align: center; }
.legal-links a { color: var(--green); font-weight: 750; }
.toast { position: fixed; z-index: 100; left: 50%; top: calc(18px + env(safe-area-inset-top)); max-width: calc(100% - 40px); padding: 11px 16px; border-radius: 99px; color: #fff; background: rgba(25,40,31,.92); box-shadow: 0 10px 28px rgba(0,0,0,.18); font-size: 12px; font-weight: 700; opacity: 0; pointer-events: none; transform: translate(-50%, -18px); transition: .25s ease; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 520px) {
  input:not([type="checkbox"]):not([type="file"]) { font-size: 16px; }
  select { font-size: 16px; }
  .app-shell { padding-right: 15px; padding-left: 15px; }
  .voice-card { grid-template-columns: minmax(0, 1fr) 58px; min-height: 128px; padding: 15px 17px; border-radius: 23px; }
  .voice-card h1 { margin: 4px 0; font-size: 24px; }
  .voice-card p { max-width: 230px; font-size: 9px; line-height: 1.3; }
  .voice-card .eyebrow { font-size: 8px; }
  .live-transcript { min-height: 13px; margin-top: 3px; font-size: 10px; }
  .mic-button { width: 52px; height: 52px; }
  .mic-button svg { width: 23px; }
  .section-heading { align-items: center; }
  .shopping-start { padding: 10px; }
  .shopping-start svg { width: 17px; }
  .family-badge { max-width: 88px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .list-selector-row { align-items: center; flex-wrap: nowrap; }
  .list-switcher { flex: 1 1 auto; flex-wrap: wrap; overflow-x: visible; touch-action: pan-y; }
  .list-create-button { flex: 0 0 auto; padding: 0 10px; }
  .special-list-actions { align-items: stretch; flex-direction: column; }
  .special-list-actions > div { display: grid; grid-template-columns: 1fr 1.35fr .85fr; }
  .expiration-add-form { grid-template-columns: minmax(0, 1fr) 145px; }
  .expiration-add-form button { grid-column: 1 / -1; }
  .bottom-nav button { flex-direction: column; gap: 2px; font-size: 9px; }
  .bottom-nav svg { width: 18px; }
  .suggestion-card { min-height: 170px; padding: 14px; }
  .suggestion-card strong { font-size: 16px; }
  .bottom-nav { width: calc(100% - 22px); }
  .quantity-control { display: flex; }
  .expiration-card { grid-template-columns: auto minmax(0, 1fr); }
  .expiration-card-actions { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
  .expiration-date-dialog { width: calc(100% - 20px); max-height: calc(100dvh - max(20px, env(safe-area-inset-top))); margin: max(10px, env(safe-area-inset-top)) auto auto; border-radius: 24px; }
  .expiration-dialog-header { padding: 18px 19px 16px; }
  .expiration-dialog-body { padding: 17px 19px calc(19px + env(safe-area-inset-bottom)); }
  .expiration-date-dialog .expiration-product-copy h2 { font-size: 21px; }
  .item-edit-dialog { width: calc(100% - 20px); max-height: calc(var(--visible-viewport-height, 100dvh) - max(20px, env(safe-area-inset-top))); padding: 22px 19px calc(20px + env(safe-area-inset-bottom)); }
  .item-photo-editor { grid-template-columns: 76px minmax(0, 1fr); gap: 11px; padding: 10px; }
  .item-photo-preview { width: 76px; height: 76px; }
}

@media (min-width: 760px) {
  .app-shell { padding-right: 30px; padding-left: 30px; }
  .voice-card { min-height: 230px; }
  .suggestion-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

