:root{--red: #c0392b;--bg: #faf7f2;--card: #fff;--text: #222;--muted: #888;--line: #eee;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;color:var(--text);background:var(--bg)}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}.muted{color:var(--muted)}.small{font-size:.9em;margin:4px 0}.error{color:var(--red)}.center{text-align:center;padding:40px 16px}.pre{white-space:pre-wrap}.app{min-height:100vh;padding-bottom:calc(64px + env(safe-area-inset-bottom))}.page{max-width:640px;margin:0 auto;padding:16px}header{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:8px 0 16px}h1{font-size:1.4rem;margin:0}h2{font-size:1rem;margin:20px 0 8px}.tabs{position:fixed;bottom:0;left:0;right:0;display:flex;background:var(--card);border-top:1px solid var(--line);padding-bottom:env(safe-area-inset-bottom)}.tabs button{flex:1;padding:14px 0;border:0;background:none;color:var(--muted);font-weight:600}.tabs button.active{color:var(--red)}.login{max-width:320px;margin:18vh auto 0;display:flex;flex-direction:column;gap:12px;padding:16px;text-align:center}.login-logo{font-size:3rem}input,select{padding:10px 12px;border:1px solid #ddd;border-radius:10px;background:#fff;min-width:0}button{cursor:pointer}.login button,.add button{padding:10px 16px;border:0;border-radius:10px;background:var(--red);color:#fff;font-weight:600}button:disabled{opacity:.5}.add{display:flex;gap:8px;margin-bottom:8px}.add input{flex:1}.add select{max-width:40%}form.add{flex-direction:column;margin-bottom:12px}.add-row{display:flex;gap:8px;align-items:center}.add-row input.qty{flex:0 0 72px}.aisle-row select{flex:1;max-width:none}section li>input[type=checkbox]{width:22px;height:22px;accent-color:var(--red);margin:0 12px 0 0;flex-shrink:0}.item-text{flex:1;text-align:left;border:0;background:none;padding:0;color:inherit;cursor:pointer}.chev{color:#ccc;font-size:1.3rem;padding-left:8px}section li.done .item-text span{text-decoration:line-through;color:var(--muted)}.sheet-bg{position:fixed;top:0;right:0;bottom:0;left:0;background:#00000059;display:flex;align-items:flex-end;justify-content:center;z-index:10}.sheet{background:var(--card);width:100%;max-width:640px;border-radius:18px 18px 0 0;padding:16px 16px calc(20px + env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:12px}.sheet h2{margin:4px 0}.sheet label{display:flex;flex-direction:column;gap:4px;font-size:.85em;color:var(--muted)}.sheet label input,.sheet label select{color:var(--text);font-size:1rem}.sheet-actions{display:flex;gap:8px;align-items:center}.sheet-actions span{flex:1}.sheet-actions button{padding:10px 16px;border:0;border-radius:10px;font-weight:600;background:var(--red);color:#fff}.sheet-actions .secondary{background:#eee;color:var(--text)}.sheet-actions .danger{background:none;color:var(--red);padding-left:0}section{background:var(--card);border-radius:14px;padding:4px 14px 8px;margin-bottom:12px;box-shadow:0 1px 2px #0000000a}section.today{outline:2px solid var(--red)}section ul{list-style:none;margin:0;padding:0}section li{display:flex;align-items:center;justify-content:space-between;border-top:1px solid var(--line);padding:10px 0}section li:first-child{border-top:0}section li.clickable{cursor:pointer}section li label{display:flex;align-items:flex-start;gap:12px;flex:1;cursor:pointer}section li input[type=checkbox]{width:22px;height:22px;accent-color:var(--red);margin:0;flex-shrink:0}section li small{display:block;color:var(--muted);font-size:.78em;margin-top:2px}section li.done span{text-decoration:line-through;color:var(--muted)}.icon{border:0;background:none;color:#ccc;font-size:1rem;padding:4px 8px}.link{border:0;background:none;color:var(--red);padding:8px 0;font-weight:600;font-size:1.1rem}.cards{list-style:none;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px}.cards li{background:var(--card);border-radius:14px;overflow:hidden;cursor:pointer;box-shadow:0 1px 2px #0000000f}.cards img,.cards .noimg{width:100%;aspect-ratio:4/3;object-fit:cover;display:block}.cards .noimg{display:grid;place-items:center;font-size:2rem;background:#f1ece4}.cards div{padding:8px 10px}.cards strong{display:block;font-size:.92em}.cards small{color:#e0a800}.recipe ol,.recipe .plain{padding-left:20px;line-height:1.5}.recipe ol li{margin-bottom:8px}input,select{font-size:16px}.app{padding-bottom:env(safe-area-inset-bottom)}.weeks{display:flex;gap:8px;overflow-x:auto;margin:-4px 0 14px;padding-bottom:2px}.weeks button{flex-shrink:0;border:1px solid #ddd;background:var(--card);border-radius:999px;padding:6px 14px;font-weight:600;color:var(--text);display:flex;gap:6px;align-items:baseline}.weeks button small{color:var(--muted);font-weight:400;font-size:.8em}.weeks button.active{background:#2b6b4c;border-color:#2b6b4c;color:#fff}.weeks button.active small{color:#d6eadf}.sticky-top{position:sticky;top:0;z-index:5;background:var(--bg);margin:-16px -16px 12px;padding:calc(8px + env(safe-area-inset-top)) 16px 4px;border-bottom:1px solid var(--line)}.sticky-top header{margin:8px 0 10px}.sticky-top .weeks{margin:0 0 8px}.sticky-top header h1{line-height:1.2}.add-btn{border:0;border-radius:999px;background:var(--red);color:#fff;font-weight:600;padding:8px 14px;flex-shrink:0}.seg{display:flex;background:#ece7df;border-radius:10px;padding:3px;margin:0 0 10px}.seg button{flex:1;border:0;background:none;padding:7px 0;border-radius:8px;font-weight:600;color:var(--muted)}.seg button.active{background:var(--card);color:var(--text);box-shadow:0 1px 2px #00000014}.recipe-list li{cursor:pointer;gap:12px;justify-content:flex-start!important}.recipe-list img,.recipe-list .noimg{width:56px;height:56px;border-radius:10px;object-fit:cover;flex-shrink:0}.recipe-list .noimg{display:grid;place-items:center;background:#f1ece4;font-size:1.4rem}.recipe-list div:not(.noimg){flex:1}.recipe-list strong{display:block;font-size:.95em}.recipe-list small{color:var(--muted)}.recipe .hero{width:100%;border-radius:14px;margin-bottom:12px}.recipe h1{font-size:1.3rem}.recipe .back{font-size:1rem;padding:4px 0 10px}.scale-row{display:flex;gap:6px;align-items:center;flex-wrap:wrap;margin:8px 0}.scale-row button{border:1px solid #ddd;background:var(--card);border-radius:999px;padding:5px 11px;font-weight:600}.scale-row button.active{background:#2b6b4c;border-color:#2b6b4c;color:#fff}.ingredients{list-style:none;padding:0;line-height:1.5}.ingredients li{padding:3px 0}.ingredients li.sub{font-weight:700;margin-top:8px}.ingredients li.gap{height:4px}.directions{padding-left:20px;line-height:1.5}.directions li{margin-bottom:10px}.macros{display:flex;flex-wrap:wrap;gap:4px 10px;font-size:.78em;color:var(--muted);margin-top:3px}.macros b{color:var(--text);font-weight:600}.macros.big{font-size:.95em;gap:8px;margin:2px 0 10px}.macros.big span{background:var(--card);border:1px solid var(--line);border-radius:10px;padding:6px 10px}.macros .m-protein b{color:#2b6b4c}.per{margin:8px 0 0}.seg button:disabled{opacity:.35}section li>input[type=checkbox]{margin:0 12px 0 0}section li small.for-recipe{opacity:.8;font-weight:400}.shoppers{display:flex;gap:6px;align-items:center;margin:0 0 8px}.shoppers span{flex:1}.shoppers button{border:1px solid #ddd;background:var(--card);border-radius:999px;padding:5px 11px;font-weight:600;color:var(--text);font-size:.9em}.shoppers button.active{background:#2b6b4c;border-color:#2b6b4c;color:#fff}.shoppers .split-btn{border-color:var(--red);color:var(--red)}.who-tag{flex-shrink:0;width:28px;height:28px;border-radius:50%;border:0;font-weight:700;font-size:.8em;margin-left:8px;padding:0}.who-tag.forrest{background:#dbe8f7;color:#1f5a99}.who-tag.huong{background:#f8dfe8;color:#a63a62}.who-tag.none{background:none;border:1px dashed #ccc;color:#bbb}.unassigned{margin:0 0 10px}.inline-link{border:0;background:none;padding:0;color:var(--red);font-weight:600;font-size:inherit}.levelbar{display:flex;align-items:center;gap:8px;width:100%;border:0;background:none;padding:0 0 8px;color:var(--text)}.levelbar .lv{font-weight:800;font-size:.85em;color:#2b6b4c;flex-shrink:0}.bar{flex:1;height:8px;border-radius:99px;background:#e4ded3;overflow:hidden;display:block}.bar>span{display:block;height:100%;border-radius:99px;background:linear-gradient(90deg,#f0b43c,#e8743b);transition:width .5s ease}.bar.big{height:12px;flex:none;width:100%}.levelbar .xp{font-size:.75em;color:var(--muted);flex-shrink:0;font-variant-numeric:tabular-nums}.levelbar .gift{font-size:.9em;animation:wiggle 1.6s ease-in-out infinite}@keyframes wiggle{0%,80%,to{transform:rotate(0)}85%{transform:rotate(-14deg)}90%{transform:rotate(12deg)}95%{transform:rotate(-6deg)}}.toasts{position:fixed;left:0;right:0;bottom:calc(24px + env(safe-area-inset-bottom));display:flex;flex-direction:column;align-items:center;gap:6px;pointer-events:none;z-index:20}.toast{background:#2b6b4c;color:#fff;font-weight:700;padding:8px 16px;border-radius:99px;box-shadow:0 4px 14px #0000002e;animation:pop 2.2s ease forwards}.toast.half{background:#e8743b}.toast.trip{background:#c0392b;font-size:1.05em}.toast.neg{background:#888}@keyframes pop{0%{transform:translateY(16px) scale(.8);opacity:0}12%{transform:translateY(0) scale(1.06);opacity:1}20%{transform:scale(1)}80%{opacity:1}to{transform:translateY(-14px);opacity:0}}.levelup-bg{align-items:center;z-index:30}.levelup{background:var(--card);border-radius:22px;padding:24px 20px 20px;width:min(340px,90vw);text-align:center;animation:rise .35s ease}.levelup h2{font-size:1.6rem;margin:4px 0}.levelup .burst{font-size:3.2rem;animation:spin .9s ease}.levelup .primary{margin-top:14px;width:100%;padding:12px;border:0;border-radius:12px;background:var(--red);color:#fff;font-weight:700}@keyframes rise{0%{transform:scale(.85);opacity:0}to{transform:scale(1);opacity:1}}@keyframes spin{0%{transform:rotate(-30deg) scale(.4)}to{transform:rotate(0) scale(1)}}.reward-card{display:flex;align-items:center;gap:12px;background:#fbf3e4;border-radius:14px;padding:10px 12px;text-align:left}.reward-card>span{font-size:1.8rem}.reward-card div{flex:1;display:flex;flex-direction:column}.reward-card small{color:var(--muted);font-size:.75em}.reward-card.locked{background:#f1efeb;opacity:.7}.reward-card.used{background:#f1efeb}.reward-card.used strong{text-decoration:line-through;color:var(--muted)}.reward-card .use{border:0;border-radius:99px;padding:6px 12px;background:#2b6b4c;color:#fff;font-weight:600;font-size:.85em;flex-shrink:0}.reward-card .use.secondary{background:#e4ded3;color:var(--text)}.game-sheet{max-height:88vh;overflow-y:auto}.game-sheet h3{margin:6px 0 0;font-size:1rem}.game-head{display:flex;align-items:center;gap:12px}.game-head h2{margin:0}.lv-big{width:52px;height:52px;border-radius:50%;display:grid;place-items:center;font-size:1.5rem;font-weight:800;color:#fff;background:linear-gradient(135deg,#f0b43c,#e8743b);flex-shrink:0}.stats{display:flex;gap:10px;align-items:center}.stats>div:not(.split-stat){background:var(--bg);border-radius:12px;padding:8px 12px;display:flex;flex-direction:column}.stats small{color:var(--muted);font-size:.75em}.split-stat{flex:1;display:flex;height:12px;border-radius:99px;overflow:hidden}.split-stat .f{background:#8db3e2}.split-stat .h{background:#eaa3bd}.center-text{text-align:center;margin:0}.small-link{font-size:.9rem;text-align:left}section.cost{margin-top:16px;padding-bottom:10px}.cost-head{display:flex;align-items:baseline;justify-content:space-between}.cost-head strong{font-size:1.25rem}section.cost li{gap:10px}.cost-note{flex:1}.cost-note small{color:var(--muted)}.cost-del{border:0;background:none;color:#bbb;font-size:1rem;padding:0 0 0 6px;cursor:pointer}section.cost .link{margin:6px 0 0;padding:0}section.cost p{margin:6px 0 0}.sheet label.photo-pick{align-items:center;justify-content:center;border:1.5px dashed #ccc;border-radius:12px;min-height:64px;padding:8px;cursor:pointer;color:var(--muted);font-size:.95em}.sheet label.photo-pick input{display:none}.sheet label.photo-pick img{max-height:160px;max-width:100%;border-radius:8px}.sheet small .link{font-size:1em;padding:0 0 0 6px;margin:0}section.cost .link.cost-photo{margin:0;color:inherit;text-decoration:underline dotted;font-size:inherit}.sheet-bg.photo-view{align-items:center;background:#000000d9;padding:16px}.sheet-bg.photo-view img{max-width:100%;max-height:100%;border-radius:8px}
