*,:after,:before{box-sizing:border-box;margin:0;padding:0}html{font-size:17px}@media (max-width:480px){html{font-size:19px}}:root{--brand:#16a34a;--brand-light:#dcfce7;--brand-dark:#15803d;--red:#dc2626;--gray-50:#f9fafb;--gray-100:#f3f4f6;--gray-200:#e5e7eb;--gray-400:#9ca3af;--gray-500:#6b7280;--gray-700:#374151;--gray-900:#111827;--radius:12px;--shadow:0 1px 3px rgba(0,0,0,.1),0 1px 2px rgba(0,0,0,.06);--shadow-lg:0 10px 15px -3px rgba(0,0,0,.1)}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;background:var(--gray-50);color:var(--gray-900);-webkit-tap-highlight-color:transparent}.auth-wrap,body{min-height:100dvh}.auth-wrap{display:flex;align-items:center;justify-content:center;padding:1rem;background:linear-gradient(135deg,#f0fdf4,#dcfce7)}.auth-card{background:#fff;border-radius:var(--radius);box-shadow:var(--shadow-lg);padding:2rem;width:100%;max-width:400px}.auth-logo{text-align:center;margin-bottom:1.5rem}.auth-logo .logo-icon{font-size:3rem;display:block}.auth-logo h1{font-size:1.5rem;font-weight:700;color:var(--brand-dark)}.auth-logo p{color:var(--gray-500);font-size:.875rem}.tab-row{display:flex;background:var(--gray-100);border-radius:8px;padding:3px;margin-bottom:1.5rem}.tab-row button{flex:1 1;padding:.5rem;border:none;background:transparent;border-radius:6px;font-size:.875rem;font-weight:500;cursor:pointer;color:var(--gray-500);transition:all .15s}.tab-row button.active{background:#fff;color:var(--brand-dark);box-shadow:var(--shadow)}label{display:block;font-size:.875rem;font-weight:500;color:var(--gray-700);margin-bottom:.375rem}input,select,textarea{display:block;width:100%;padding:.625rem .875rem;border:1.5px solid var(--gray-200);border-radius:8px;font-size:1rem;font-family:inherit;color:var(--gray-900);background:#fff;outline:none;transition:border-color .15s;margin-bottom:1rem}textarea{resize:vertical}input:focus,select:focus,textarea:focus{border-color:var(--brand)}.btn{display:inline-flex;align-items:center;justify-content:center;gap:.375rem;padding:.625rem 1rem;border:none;border-radius:8px;font-size:.9375rem;font-weight:600;cursor:pointer;transition:all .15s}.btn-primary{background:var(--brand);color:#fff;width:100%}.btn-primary:hover{background:var(--brand-dark)}.btn-primary:disabled{opacity:.6;cursor:default}.btn-ghost{background:transparent;color:var(--gray-500)}.btn-ghost:hover{background:var(--gray-100);color:var(--gray-700)}.btn-sm{padding:.375rem .75rem;font-size:.8125rem}.btn-outline{background:#fff;border:1.5px solid var(--brand);color:var(--brand-dark);width:100%}.error-msg{background:#fef2f2;color:var(--red);padding:.625rem .875rem;border-radius:8px;font-size:.8125rem;margin-bottom:1rem}.spinner{width:1rem;height:1rem;border:2px solid hsla(0,0%,100%,.4);border-top-color:#fff;border-radius:50%;animation:spin .6s linear infinite;display:inline-block}@keyframes spin{to{transform:rotate(1turn)}}.app{max-width:560px;margin:0 auto;min-height:100dvh;display:flex;flex-direction:column}.topbar{display:flex;align-items:center;gap:.625rem;padding:.875rem 1rem;background:#fff;border-bottom:1px solid var(--gray-200);position:-webkit-sticky;position:sticky;top:0;z-index:10}.topbar-title{font-weight:700;font-size:1.0625rem;flex:1 1}.icon-btn{background:none;border:none;font-size:1.125rem;cursor:pointer;padding:.375rem;border-radius:8px;line-height:1}.icon-btn:hover{background:var(--gray-100)}.icon-btn.del:hover{background:#fef2f2}.tab-bar{display:flex;background:#fff;border-bottom:1px solid var(--gray-200);overflow-x:auto}.tab-btn{flex:1 1;min-width:4.5rem;display:flex;flex-direction:column;align-items:center;gap:.125rem;padding:.5rem .25rem;background:none;font-size:.6875rem;color:var(--gray-400);cursor:pointer;border:none;border-bottom:2px solid transparent}.tab-btn span:first-child{font-size:1.125rem}.tab-btn.active{color:var(--brand-dark);border-bottom-color:var(--brand)}.main{flex:1 1;padding:1rem 1rem 5rem}.empty{text-align:center;padding:3rem 1rem;color:var(--gray-400)}.empty-icon{font-size:2.5rem;display:block;margin-bottom:.5rem}.section-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:.75rem}.section-head h2{font-size:1.125rem}.progress-bar{background:var(--gray-200);border-radius:99px;height:6px;margin:.75rem 0;overflow:hidden}.progress-fill{height:100%;background:var(--brand);border-radius:99px;transition:width .4s ease}.category-group{margin-bottom:1.25rem}.category-label{font-size:.75rem;font-weight:600;color:var(--gray-400);text-transform:uppercase;letter-spacing:.05em;padding:0 .25rem;margin-bottom:.375rem}.item-row{background:#fff;border-radius:10px;box-shadow:var(--shadow);display:flex;align-items:center;gap:.75rem;padding:.75rem;margin-bottom:.5rem;transition:opacity .2s}.item-row.checked{opacity:.55}.item-checkbox{width:1.5rem;height:1.5rem;border:2px solid var(--gray-200);border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer;flex-shrink:0;transition:all .15s;color:#fff;font-size:.875rem}.item-checkbox.checked{background:var(--brand);border-color:var(--brand)}.item-body{flex:1 1;min-width:0}.item-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.item-name.checked{text-decoration:line-through}.item-qty{font-size:.8125rem;color:var(--gray-500);margin-top:.1rem}.item-store-tag{color:var(--brand-dark);font-weight:500}.item-actions{display:flex;align-items:center;gap:.25rem}.tag-filter-row{display:flex;flex-wrap:wrap;gap:.375rem;margin-bottom:.75rem}.tag-chip{border:1.5px solid var(--gray-200);background:#fff;border-radius:99px;padding:.3rem .75rem;font-size:.8125rem;cursor:pointer;color:var(--gray-700)}.tag-chip.active{border-color:var(--brand);background:var(--brand-light);color:var(--brand-dark)}.fab{position:fixed;bottom:1.25rem;left:50%;transform:translateX(-50%);z-index:20;background:var(--brand);color:#fff;border:none;border-radius:99px;padding:.875rem 1.5rem;font-weight:600;font-size:.9375rem;box-shadow:var(--shadow-lg);cursor:pointer;max-width:calc(560px - 2rem);width:calc(100% - 2rem)}.modal-overlay{position:fixed;inset:0;background:rgba(0,0,0,.4);display:flex;align-items:flex-end;justify-content:center;z-index:30}.modal{background:#fff;border-radius:var(--radius) var(--radius) 0 0;padding:1.5rem;width:100%;max-width:560px;max-height:85dvh;overflow-y:auto}.modal h3{margin-bottom:1rem}.modal-actions{display:flex;gap:.625rem;margin-top:.25rem}.modal-actions .btn{flex:1 1}.form-row{display:grid;grid-template-columns:1fr 1fr;grid-gap:.75rem;gap:.75rem}@media (min-width:560px){.modal-overlay{align-items:center}.modal{border-radius:var(--radius)}}