:root{--green:#184d3a;--dark:#102f25;--cream:#f7f5ed;--ink:#16231e;--muted:#68766f;--gold:#f4b942;--line:#dce5df;--white:#fff}*{box-sizing:border-box}html{background:var(--cream)}body{margin:0;min-height:100vh;background:linear-gradient(155deg,#eaf4ed,var(--cream) 32%);color:var(--ink);font:15px/1.35 "DM Sans",sans-serif}button,input,select{font:inherit}button{cursor:pointer}.app-header{position:sticky;top:0;z-index:10;padding:calc(13px + env(safe-area-inset-top)) 14px 10px;background:#f7f5edf2;border-bottom:1px solid var(--line);backdrop-filter:blur(14px)}.app-title,.toolbar,.add-form,.content{width:min(780px,100%);margin-inline:auto}.app-title{display:flex;align-items:center;gap:9px}.back{width:34px;height:34px;display:grid;place-items:center;border-radius:10px;background:white;color:var(--dark);font-size:20px;text-decoration:none}.cart{width:37px;height:37px;display:grid;place-items:center;border-radius:10px;background:var(--green)}.app-title div{flex:1}.app-title h1{margin:0;color:var(--dark);font:800 1.42rem/1 Manrope,sans-serif}.app-title p{margin:5px 0 0;color:var(--muted);font-size:.73rem}.app-title p i{display:inline-block;width:7px;height:7px;border-radius:50%;background:#38a56b}.app-title>strong{color:var(--muted);font-size:.78rem;white-space:nowrap}.add-form{display:grid;grid-template-columns:1fr 175px auto;gap:6px;margin-top:10px}.add-form input,.add-form select,.search{height:41px;border:1px solid var(--line);border-radius:11px;background:white;color:var(--ink)}.add-form input,.add-form select{min-width:0;padding:0 11px}.add-form button,.toolbar>button{height:41px;padding:0 12px;border:0;border-radius:11px;background:var(--gold);color:#28352e;font-weight:800}.toolbar{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}.toolbar .mode,.toolbar .dark{background:var(--green);color:white}.toolbar .mode.active{flex:1;background:#9b433b}.search{display:flex;align-items:center;gap:5px;flex:1;padding:0 10px}.search input{width:100%;border:0;outline:0;background:transparent}.content{padding:13px 14px calc(35px + env(safe-area-inset-bottom))}.hint{margin:0 0 11px;padding:8px 10px;border-radius:10px;background:#edf4f0;color:#4e6258;font-size:.81rem}section{margin-bottom:16px}h2{margin:0 0 7px 2px;color:var(--green);font-size:.77rem;letter-spacing:.06em;text-transform:uppercase}.favorites,.to-buy,.weekly{padding:9px;border-radius:15px}.favorites{border:2px solid #efc65c;background:#fff9e6}.to-buy{border:2px solid var(--green);background:#eaf5ee}.weekly{border:2px solid #72a98f;background:#eff8f2}.section-title{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:7px}.section-title h2{margin:0}.section-title button{padding:6px 8px;border:0;border-radius:8px;background:var(--green);color:white;font-size:.68rem;font-weight:800}.favorites .section-title button{background:#efc65c;color:#604300}.grid{display:grid;gap:5px}.aisle+.aisle{margin-top:10px}.aisle h3,.catalog-group h2{margin:0 0 4px 3px;color:#527064;font-size:.71rem;letter-spacing:.05em;text-transform:uppercase}.catalog-group{margin-bottom:15px}.product{min-height:49px;display:flex;align-items:center;overflow:hidden;border:1px solid var(--line);border-radius:12px;background:white;box-shadow:0 2px 8px #163c2d08}.product.selected{border-color:#4b8a70;background:#f7fff9}.product.purchased{background:#edf4f0;color:var(--muted)}.check{width:24px;height:24px;display:grid;place-items:center;flex:0 0 auto;margin-left:10px;padding:0;border:2px solid #96a79f;border-radius:7px;background:transparent;color:white}.selected .check,.purchased .check{border-color:var(--green);background:var(--green)}.name{align-self:stretch;flex:1;min-width:50px;padding:7px 5px 7px 9px;border:0;background:transparent;color:inherit;text-align:left;font-weight:700}.purchased .name{text-decoration:line-through;text-decoration-thickness:2px}.quantity{display:flex;align-items:center;gap:1px;padding:0 3px}.quantity button{width:24px;height:28px;padding:0;border:1px solid var(--line);border-radius:7px;background:white;color:var(--green);font-weight:800}.quantity strong{min-width:19px;text-align:center;font-size:.8rem}.buy,.star{align-self:stretch;display:flex;flex-direction:column;align-items:center;justify-content:center;flex:0 0 auto;border:0;border-left:1px solid #edf0ee}.buy{width:54px;background:#f2f7f4;color:#49705f}.buy.active{background:var(--green);color:white}.star{width:58px;background:#fafbfa;color:#7f8d86}.star.active{background:#fff6d8;color:#c47d00}.buy small,.star small{font-size:.58rem;font-weight:800}.delete{width:34px;align-self:stretch;border:0;border-left:1px solid #edf0ee;background:#fff;color:#a34b43;font-size:19px}.empty{margin:0;padding:7px 3px;color:var(--muted);font-size:.84rem}.shopping-empty{display:grid;justify-items:center;gap:5px;padding:30px 15px;border:2px dashed #a7beb3;border-radius:16px;color:var(--muted);text-align:center}.shopping-empty>span{font-size:28px}.shopping-empty strong{color:var(--green)}.hidden{display:none!important}#toast{position:fixed;left:50%;bottom:calc(20px + env(safe-area-inset-bottom));z-index:20;max-width:calc(100% - 32px);padding:11px 15px;border-radius:11px;background:#16231e;color:white;opacity:0;pointer-events:none;transform:translate(-50%,15px);transition:.25s}#toast.show{opacity:1;transform:translate(-50%,0)}body.shopping .add-form,body.shopping .search,body.shopping #shareList,body.shopping #resetAll,body.shopping #hint,body.shopping #favoritesSection,body.shopping #catalog,body.shopping .star,body.shopping .delete{display:none!important}
@media(min-width:650px){.grid{grid-template-columns:1fr 1fr}.content,.app-header{padding-left:22px;padding-right:22px}}
@media(max-width:600px){.add-form{grid-template-columns:1fr auto}.add-form select{grid-column:1/-1;grid-row:2}.search{flex-basis:100%;order:-1}.toolbar>button{flex:1}.app-title>strong{display:none}}
@media(max-width:390px){.app-title h1{font-size:1.22rem}.product{min-height:47px}.name{font-size:.87rem}.quantity{padding:0 1px}.quantity button{width:21px}.buy{width:48px}.star{width:52px}}
.app-title p[data-state="syncing"] i{background:#f4b942;animation:pulse 1s infinite}.app-title p[data-state="offline"] i{background:#b85a4f}.app-title p[data-state="shared"]{color:#286747;font-weight:700}@keyframes pulse{50%{opacity:.35}}
