:root {
  color-scheme: light;
  --ink: #1b3025;
  --muted: #58695f;
  --green: #265a3c;
  --line: #e3e9df;
  --surface: #f8faf4;
  --lime: #d1ed90;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic UI", Meiryo, sans-serif;
  font-synthesis: none;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: #e6eee0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { appearance: none; padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { opacity: .48; cursor: default; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid #589555; outline-offset: 3px; }
svg { width: 22px; height: 22px; display: block; flex: none; }
[hidden] { display: none !important; }
.stage { --frame-gutter: 18px; isolation: isolate; min-height: 100dvh; display: grid; place-items: center; position: relative; overflow: hidden; padding: var(--frame-gutter) 11px; background: radial-gradient(ellipse at 51% 34%, #f4f5e7 0%, #eaf0e1 42%, #dce8db 100%); }
.stage::before { position: absolute; inset: 0; content: ''; z-index: -2; background-image: radial-gradient(#70887341 .8px, transparent .8px); background-size: 21px 21px; mask-image: radial-gradient(ellipse, transparent 7%, #000 84%); }
.orbit { position: absolute; aspect-ratio: 1; border: 1px solid #6f906d31; border-radius: 50%; z-index: -1; pointer-events: none; }
.orbit-outer { width: clamp(520px, 91vw, 920px); }
.orbit-inner { width: clamp(456px, 71vw, 725px); background: #f5f7e22b; }
.device {
  --bezel: 8px;
  --corner: clamp(32px, 6.4dvh, 49px);
  container: phone / inline-size;
  width: min(100%, 414px, max(258px, calc((100dvh - var(--frame-gutter) * 2) * .49)));
  aspect-ratio: 49 / 100;
  position: relative;
  padding: var(--bezel);
  border: 1px solid #58645d;
  border-radius: var(--corner);
  background: linear-gradient(132deg, #a9b4ad 0%, #4b5750 18%, #222a25 45%, #626d65 76%, #29312b 100%);
  box-shadow: inset 1px 1px 1px #e1e7e2a8, inset -1px -1px 2px #0a110c, 0 0 0 1px #1a251e, 3px 4px 0 #202a23, 6px 11px 18px -7px #172c23b8, 14px 26px 44px -15px #24432e92;
}
.device::before, .device::after { content: ''; position: absolute; width: 4px; border-radius: 2px; background: linear-gradient(to bottom, #bac5bd, #4c5b52 20%, #344039 86%, #1b251e); }
.device::before { left: -5px; top: 16%; height: 22px; box-shadow: 0 34px #4c5b52, 0 67px #4c5b52; }
.device::after { right: -5px; top: 26%; height: 48px; }
.screen { overflow: hidden; isolation: isolate; position: relative; border-radius: calc(var(--corner) - var(--bezel) - 1px); box-shadow: 0 0 0 3px #0b100d, 0 0 0 4px #10181280; height: 100%; background: var(--surface); display: flex; flex-direction: column; }
.device-status { height: 40px; flex: none; position: relative; display: flex; align-items: center; justify-content: space-between; padding: 0 27px; color: #17251d; }
.device-time { font: 700 13px/1 system-ui, sans-serif; letter-spacing: .015em; }
.island { position: absolute; height: 22px; width: 91px; left: calc(50% - 45.5px); top: 8px; border-radius: 22px; background: #131715; }
.island::after { content: ''; position: absolute; width: 6px; height: 6px; border-radius: 50%; right: 10px; top: 8px; background: radial-gradient(circle at 70% 37%, #374050, #181924 52%, #131715 70%); }
.device-indicators { display: flex; gap: 5px; align-items: center; }
.signal { display: flex; align-items: end; gap: 1px; height: 11px; }
.signal b { width: 2.5px; border-radius: 1px; background: currentColor; }
.signal b:nth-child(1) { height: 4px; }.signal b:nth-child(2) { height: 6px; }.signal b:nth-child(3) { height: 8px; }.signal b:nth-child(4) { height: 10px; }
.wifi { width: 12px; height: 10px; border: 2px solid transparent; border-top-color: currentColor; border-radius: 50%; position: relative; top: 2px; }
.wifi::before { content: ''; position: absolute; width: 7px; left: .4px; top: 1px; height: 7px; border: 1.6px solid transparent; border-top-color: currentColor; border-radius: 50%; }
.wifi::after { content: ''; width: 2.3px; height: 2.3px; background: currentColor; position: absolute; top: 4px; left: 2.8px; border-radius: 50%; }
.battery { width: 17px; height: 8px; border: 1px solid currentColor; border-radius: 2px; position: relative; }
.battery::before { content: ''; position: absolute; inset: 1px; background: currentColor; border-radius: 1px; }.battery::after { content: ''; position: absolute; right: -3px; top: 2px; width: 1.5px; height: 2px; background: currentColor; }
.app { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.topbar { flex: none; display: flex; align-items: center; justify-content: space-between; min-height: 57px; padding: 0 17px 8px; }
.brand { display: flex; align-items: center; gap: 9px; font-size: 1.25rem; line-height: 1.25; font-weight: 800; letter-spacing: .025em; }
.brand-icon { display: grid; place-items: center; width: 35px; height: 35px; background: #e0edda; color: #2b5f40; border-radius: 11px; }
.brand-icon svg { width: 20px; height: 20px; stroke-width: 1.8; }
.brand-icon img { width: 100%; height: 100%; display: block; border-radius: inherit; }
.icon-button { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; border: 1px solid var(--line); background: #fff; color: #335342; }
.icon-button:hover { background: #eff4eb; }
.menu-button { width: 40px; height: 40px; border-radius: 50%; }
.main { flex: 1; min-height: 0; padding: 0 17px 17px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #c4d5c2 transparent; overscroll-behavior: contain; }
.hero { position: relative; isolation: isolate; overflow: hidden; min-height: 156px; padding: 13px 16px 16px; border-radius: 22px; color: #f9fbea; background: radial-gradient(ellipse at 90% 60%, #45734b, transparent 47%), linear-gradient(110deg, #183b2b 1%, #245339 100%); }
.hero::before, .hero::after { content: ''; z-index: -1; pointer-events: none; width: 196px; height: 196px; border-radius: 50%; border: 1px solid #c5e58b36; position: absolute; top: -31px; right: -38px; }
.hero::after { width: 160px; height: 160px; top: -13px; right: -20px; border-color: #c5e58b24; }
.basket-art { position: absolute; object-fit: contain; width: 43%; height: 93%; top: 4%; right: -1%; pointer-events: none; filter: drop-shadow(0 6px 6px #0d261c57); z-index: -1; }
.list-switch { display: flex; align-items: center; gap: 5px; min-height: 29px; width: fit-content; max-width: 67%; padding: 2px 8px 3px; border-radius: 7px; background: #ffffff1b; color: #e5f1d7; font-size: .875rem; font-weight: 700; }
.list-switch:hover { background: #ffffff2b; }
.list-switch span:first-child { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.list-switch svg { width: 14px; height: 14px; }
h1, h2, h3, p { margin: 0; }
.hero h1 { margin-top: 5px; font-size: clamp(1.6rem, 8vw, 2.03rem); line-height: 1.29; letter-spacing: .025em; font-weight: 800; }
.progress-block { display: grid; gap: 6px; margin-top: 13px; max-width: 56%; }
.progress-copy { display: flex; justify-content: space-between; align-items: center; gap: 4px; color: #e5f1db; font-weight: 700; font-size: .84rem; white-space: nowrap; }
#progress-percent { color: #e0f5a9; font-variant-numeric: tabular-nums; }
progress { appearance: none; height: 6px; width: 100%; overflow: hidden; border: 0; border-radius: 20px; color: var(--lime); background: #f0f9cf36; }
progress::-webkit-progress-bar { border-radius: 20px; background: transparent; }
progress::-webkit-progress-value { border-radius: 20px; background: var(--lime); transition: width .22s ease; }
progress::-moz-progress-bar { border-radius: 20px; background: var(--lime); }
.budget-strip { width: 100%; display: flex; align-items: center; gap: 9px; min-height: 54px; margin-top: 10px; padding: 6px 9px; text-align: left; border-radius: 15px; border: 1px solid #e1eadb; background: #edf4e7; }
.budget-strip:hover { background: #e6f0df; }
.budget-icon { display: grid; place-items: center; width: 33px; height: 33px; background: #dcead4; color: #356346; border-radius: 9px; flex: none; }
.budget-icon svg { width: 18px; height: 18px; }
.budget-text { font-size: .89rem; font-weight: 800; }
.budget-text small { display: block; margin-top: 1px; color: var(--muted); font-size: .72rem; font-weight: 600; }
.budget-amount { margin-left: auto; text-align: right; font-size: .96rem; font-weight: 850; font-variant-numeric: tabular-nums; }
.budget-chevron { color: #5d755f; }.budget-chevron svg { width: 15px; height: 15px; }
.search-line { display: flex; gap: 8px; margin-top: 13px; }
.search-box { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 13px; background: white; color: #627365; }
.search-box:focus-within { border-color: #7ca785; box-shadow: 0 0 0 2px #c9e4ce; }.search-box svg { width: 18px; height: 18px; }
.search-box input { min-width: 0; width: 100%; height: 100%; padding: 0; outline: none; border: 0; background: transparent; font-size: 1rem; }.search-box input:focus-visible { outline: none; }
.search-box input::placeholder { color: #63736a; }
.sort-button svg { width: 19px; height: 19px; }
.filters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; margin: 10px 0 11px; padding: 3px; border-radius: 12px; background: #eaf0e7; }
.filters button { white-space: nowrap; font-size: .88rem; font-weight: 750; padding: 7px 0; min-height: 33px; border-radius: 9px; color: #475e50; }
.filters button span { margin-left: 2px; font-size: .74rem; font-weight: 750; color: #537260; }
.filters button[aria-pressed='true'] { background: #fff; color: #24583b; box-shadow: 0 1px 4px #3151381c; }
.item-group { margin-bottom: 9px; overflow: hidden; background: white; border: 1px solid var(--line); border-radius: 15px; }
.category-button { width: 100%; display: flex; align-items: center; gap: 8px; padding: 6px 11px; min-height: 42px; text-align: left; font-size: .94rem; font-weight: 800; }
.category-button:hover { background: #f8faf6; }
.category-mark { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--tint, #ebeee7); color: var(--accent, #526956); flex: none; }
.category-mark svg { width: 16px; height: 16px; }
.category-count { margin-left: auto; font-size: .77rem; color: #5f7265; font-weight: 650; font-variant-numeric: tabular-nums; }
.category-chevron { color: #66816c; }.category-chevron svg { width: 14px; height: 14px; }.category-button[aria-expanded='false'] .category-chevron { transform: rotate(-90deg); }
.item-row { display: flex; align-items: center; min-height: 40px; margin: 0 10px; border-top: 1px solid #edf0e9; }
.item-group .item-row:first-child { border-top: 0; }
.item-check { display: grid; place-items: center; width: 30px; min-height: 40px; flex: none; margin-right: 2px; }
.check-ring { width: 19px; height: 19px; display: grid; place-items: center; border: 1.5px solid #a0b4a4; border-radius: 50%; color: white; }
.check-ring svg { width: 13px; height: 13px; stroke-width: 2.8; visibility: hidden; }
.item-check[aria-pressed='true'] .check-ring { background: #43805a; border-color: #43805a; }.item-check[aria-pressed='true'] .check-ring svg { visibility: visible; }
.item-edit { display: flex; flex: 1; min-width: 0; align-items: center; gap: 7px; min-height: 40px; text-align: left; padding: 1px 0; }
.grocery-image { width: 30px; height: 30px; display: block; flex: none; object-fit: contain; border-radius: 9px; background: #f2f6ed; }
.item-row.done .grocery-image { opacity: .68; }
.item-name-wrap { flex: 1; min-width: 0; }.item-name { display: block; overflow-wrap: anywhere; font-size: .9rem; font-weight: 750; }.item-note { display: block; color: var(--muted); font-size: .76rem; overflow-wrap: anywhere; }
.item-row.done .item-name { text-decoration: line-through; color: #617367; }
.item-meta { display: grid; text-align: right; align-items: center; color: #4d6456; font-size: .79rem; white-space: nowrap; flex: none; }
.item-meta strong { font-weight: 750; }.item-meta small { font-size: .73rem; }
.row-more { color: #7a8f80; flex: none; }.row-more svg { width: 15px; height: 15px; }
.favorite-mark { color: #578462; padding-right: 1px; }.favorite-mark svg { width: 13px; height: 13px; fill: #c8e1c8; }
.tabbar { flex: none; display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; padding: 4px 10px 0; min-height: 61px; gap: 2px; border-top: 1px solid #e6ece2; background: #fff; z-index: 1; }
.tabbar button { display: grid; align-content: center; justify-items: center; gap: 3px; min-height: 49px; padding: 2px 0; color: #556b5d; font-size: .72rem; font-weight: 750; white-space: nowrap; border-radius: 10px; }
.tabbar button:hover { background: #f1f6ee; }.tabbar button[aria-current] { color: #295d3e; }
.tabbar button[aria-current] span:first-child { background: #e7f0e0; }.tabbar button span:first-child { display: grid; place-items: center; padding: 4px 9px; border-radius: 10px; }.tabbar svg { width: 20px; height: 20px; }
.tabbar .add-tab { align-self: start; margin-top: -15px; position: relative; z-index: 2; color: #295d3e; gap: 1px; }.tabbar .add-tab:hover { background: transparent; }
.tabbar .add-orb { display: grid; place-items: center; width: 47px; height: 47px; color: #f4fcea; background: #2d6544; box-shadow: 0 3px 8px #28523946; border: 3px solid #fff; border-radius: 15px; }.tabbar .add-tab:hover .add-orb { background: #215335; }.add-orb svg { width: 23px; height: 23px; stroke-width: 2.2; }
.home-indicator { position: relative; height: 17px; background: #fff; flex: none; }.home-indicator::after { content: ''; position: absolute; width: 112px; height: 4px; border-radius: 4px; bottom: 6px; left: calc(50% - 56px); background: #1c251f; }
.secondary-view { padding: 8px 0; }.secondary-view h1 { font-size: 1.7rem; margin: 0 0 5px; }.secondary-view > p { color: var(--muted); font-size: .95rem; margin-bottom: 16px; }
.feature-list { display: grid; gap: 7px; }.feature-row { display: flex; align-items: center; gap: 9px; padding: 9px; min-height: 58px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }.feature-row .feature-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }.feature-row strong, .feature-row small { display: block; }.feature-row small { color: var(--muted); margin-top: 2px; }
.feature-row .icon-button { width: 39px; height: 39px; }.feature-row .icon-button svg { width: 18px; height: 18px; }
.feature-button { text-align: left; width: 100%; }.feature-button:hover { background: #edf4e9; }
.empty { display: grid; justify-items: center; gap: 7px; padding: 23px 13px; text-align: center; border: 1px dashed #cbdac9; border-radius: 16px; background: #fbfcf9; }.empty > span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; background: #e7f0e3; color: var(--green); }.empty p { color: var(--muted); font-size: .88rem; }
.text-button { min-height: 39px; padding: 3px 8px; color: var(--green); font-weight: 800; }
.trip-button { width: 100%; margin-top: 3px; border: 1px solid #dce7d9; border-radius: 12px; background: #edf4e9; }
.scrim { position: absolute; z-index: 4; inset: 0; background: #122b2180; }
.sheet { z-index: 5; position: absolute; inset: auto 0 0; margin: 0; padding: 0; width: 100%; max-width: none; max-height: min(86%, 650px); color: var(--ink); background: #fbfcf9; border: 0; border-radius: 22px 22px 0 0; box-shadow: 0 -9px 36px #172c2338; overflow: auto; overscroll-behavior: contain; }
.sheet::backdrop { background: #122b2180; }.sheet-content { padding: 8px 16px 20px; padding-bottom: max(20px, env(safe-area-inset-bottom)); }
.sheet-handle { width: 35px; height: 4px; margin: 0 auto 5px; background: #c9d5c8; border-radius: 3px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }.sheet-head h2 { font-size: 1.25rem; overflow-wrap: anywhere; }.sheet-head .icon-button { width: 40px; height: 40px; }.sheet-head .icon-button svg { width: 18px; height: 18px; }
.modal-copy { color: var(--muted); font-size: .94rem; margin-bottom: 12px; overflow-wrap: anywhere; }
.sheet-form { display: grid; gap: 10px; }.fields-two { display: grid; gap: 8px; grid-template-columns: repeat(2,minmax(0,1fr)); }
.field { display: grid; align-content: start; min-width: 0; gap: 4px; font-size: .86rem; font-weight: 700; }.field input, .field select, .field textarea { display: block; width: 100%; min-height: 44px; min-width: 0; padding: 8px 9px; border: 1px solid #d7e1d5; border-radius: 10px; background: white; font-size: 1rem; font-weight: 500; }.field textarea { resize: vertical; }.field select { appearance: none; padding-right: 25px; background: linear-gradient(45deg, transparent 50%, #567261 51%) right 14px center/5px 5px no-repeat, linear-gradient(135deg, #567261 50%, transparent 51%) right 9px center/5px 5px no-repeat, #fff; }
.favorite-field { display: flex; align-items: center; gap: 7px; min-height: 40px; font-size: .91rem; font-weight: 700; }.favorite-field input { width: 18px; height: 18px; accent-color: var(--green); }
.primary-button { width: 100%; display: flex; justify-content: center; align-items: center; gap: 6px; min-height: 45px; padding: 8px 11px; border-radius: 12px; background: #2b6040; color: #fff; font-weight: 800; }.primary-button:hover { background: #234e36; }.primary-button svg { width: 19px; height: 19px; }
.danger { color: #a33937 !important; }.muted { color: var(--muted); }.menu-stack { display: grid; gap: 7px; }.menu-row { display: flex; align-items: center; min-height: 45px; gap: 9px; width: 100%; padding: 7px 10px; text-align: left; border-radius: 10px; border: 1px solid var(--line); background: white; font-weight: 700; overflow-wrap: anywhere; }.menu-row:hover { background: #edf4e9; }.menu-row svg { width: 19px; height: 19px; }.menu-row .menu-end { margin-left: auto; color: #4f755a; }.menu-row span + small { margin-left: auto; color: var(--muted); }.menu-row[aria-pressed='true'] { background: #e8f2e4; }.sheet .menu-stack + .primary-button, .sheet .menu-stack + .menu-stack, .sheet .feature-list + .primary-button { margin-top: 9px; }
.quick-add { display: flex; gap: 5px; overflow-x: auto; padding: 1px 1px 5px; scrollbar-width: thin; }.quick-chip { white-space: nowrap; padding: 6px 9px; min-height: 34px; border-radius: 20px; background: #eaf1e5; color: #315d3e; font-size: .84rem; font-weight: 700; }
.catalog-result { display: flex; align-items: center; min-height: 53px; padding: 6px 8px; gap: 8px; background: #eaf2e6; border: 1px solid #dce9d8; border-radius: 12px; }
.catalog-result .grocery-image { width: 40px; height: 40px; background: #f6faf2; }
.catalog-result > div { flex: 1; min-width: 0; }
.catalog-result p { font-size: .78rem; color: var(--muted); }
.catalog-result .text-button { flex: none; font-size: .78rem; padding-inline: 3px; }
.catalog-suggestions { display: grid; gap: 4px; }
.catalog-suggestions button { display: flex; align-items: center; gap: 7px; padding: 4px 7px; min-height: 43px; text-align: left; background: #f0f5ec; border-radius: 9px; font-size: .88rem; font-weight: 700; }
.catalog-suggestions .grocery-image { width: 29px; height: 29px; }.catalog-suggestions small { margin-left: auto; white-space: nowrap; color: var(--muted); }
.price-sources { display: grid; gap: 8px; margin: 0; padding-left: 22px; font-size: .9rem; }.price-sources a { color: var(--green); }
.install-icon { display: block; border-radius: 16px; margin: 2px 0 12px; }
.budget-summary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; margin-bottom: 12px; }.budget-stat { display: grid; gap: 3px; background: #ebf3e6; border-radius: 11px; padding: 9px; font-size: .84rem; }.budget-stat strong { font-size: 1.12rem; font-variant-numeric: tabular-nums; }.budget-breakdown { display: grid; gap: 7px; margin: 0 0 12px; padding: 0; list-style: none; }.budget-breakdown li { display: flex; align-items: center; justify-content: space-between; gap: 7px; font-size: .91rem; color: var(--muted); }.budget-breakdown strong { color: var(--ink); }
.toast { position: absolute; z-index: 3; bottom: 89px; left: 12px; right: 12px; display: flex; align-items: center; justify-content: space-between; min-height: 43px; gap: 9px; padding: 8px 11px; border-radius: 12px; background: #1c3b2b; color: #fff; box-shadow: 0 4px 14px #1c36274a; font-size: .89rem; pointer-events: none; }.toast button { color: #e1f5a9; font-weight: 800; min-height: 27px; white-space: nowrap; pointer-events: auto; }
@media (max-width: 510px) {
  html:not(.force-frame) .stage { display: block; padding: 0; background: var(--surface); }
  html:not(.force-frame) .stage::before, html:not(.force-frame) .orbit, html:not(.force-frame) .device::before, html:not(.force-frame) .device::after, html:not(.force-frame) .device-status { display: none; }
  html:not(.force-frame) .device { width: 100%; aspect-ratio: auto; border: 0; border-radius: 0; padding: 0; background: var(--surface); box-shadow: none; height: 100dvh; }
  html:not(.force-frame) .screen { border-radius: 0; box-shadow: none; padding-top: env(safe-area-inset-top); }
  html:not(.force-frame) .topbar { padding-top: 5px; }
  html:not(.force-frame) .home-indicator { height: env(safe-area-inset-bottom); }
  html:not(.force-frame) .home-indicator::after { display: none; }
  html:not(.force-frame) .toast { bottom: calc(73px + env(safe-area-inset-bottom)); }
}
@media (max-height: 640px) { .stage { --frame-gutter: 12px; }.device-status { height: 34px; }.topbar { min-height: 51px; } }
@container phone (max-width: 345px) {
  .main, .topbar { padding-inline: 12px; }
  .device-status { padding-inline: 19px; }
  .hero { padding-inline: 12px; }
  .hero h1 { font-size: clamp(1.28rem, 8.6cqi, 1.78rem); }
  .basket-art { width: 39%; right: -.5%; }
  .progress-copy { font-size: .75rem; }
  .budget-amount { font-size: .86rem; }
  .item-edit { gap: 5px; }
  .item-edit .grocery-image { width: 27px; height: 27px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
