:root{--bg:#f7f5f0;--surface:#fff;--text:#1f2a24;--muted:#667269;--line:#e4e0d6;--primary:#2e7d4f;--primary-ink:#fff;--accent:#c2410c;--buy:#2563eb;--soon:#d97706;--have:#2e7d4f;--danger:#b91c1c;--radius:14px;--shadow:0 1px 2px #0000000f, 0 2px 8px #0000000d;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}@media (prefers-color-scheme:dark){:root:not([data-theme=light]){--bg:#141916;--surface:#1d241f;--text:#e8efe9;--muted:#9aa89e;--line:#2d3731;--primary:#4fb37a;--primary-ink:#0d1510;--buy:#60a5fa;--soon:#fbbf24;--have:#4fb37a;--danger:#f87171;--shadow:none;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}}*{box-sizing:border-box}html,body,#root{min-height:100%;margin:0}body{background:var(--bg);color:var(--text);-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:transparent;overscroll-behavior-y:none;font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:17px;line-height:1.4}h1,h2,h3{margin:.2em 0 .4em;line-height:1.2}h1{font-size:1.6rem}h2{font-size:1.25rem}h3{font-size:1rem}button,input,select,textarea{font:inherit;color:inherit}input,select,textarea{border:1px solid var(--line);background:var(--surface);border-radius:12px;width:100%;min-height:48px;padding:10px 12px;font-size:17px}textarea{resize:vertical;min-height:80px}input:focus-visible,select:focus-visible,textarea:focus-visible,button:focus-visible{outline:3px solid color-mix(in srgb, var(--primary) 55%, transparent);outline-offset:2px}.muted{color:var(--muted)}.small{font-size:.85rem}.error{color:var(--danger);font-weight:600}.grow{flex:auto;min-width:0}.right{text-align:right}.row{align-items:flex-end;gap:10px;display:flex}.row.between{justify-content:space-between;align-items:center}.stack{flex-direction:column;gap:12px;display:flex}.field{color:var(--muted);border:0;flex-direction:column;gap:6px;margin:0;padding:0;font-size:.95rem;display:flex}.field legend{padding:0 0 6px}.icon-field{flex:0 0 84px}.icon-field input{text-align:center}.details summary{color:var(--primary);cursor:pointer;padding:8px 0;font-weight:600}.btn{cursor:pointer;white-space:nowrap;border:1px solid #0000;border-radius:12px;justify-content:center;align-items:center;gap:6px;min-height:48px;padding:10px 18px;font-weight:600;text-decoration:none;display:inline-flex}.btn:disabled{opacity:.5;cursor:default}.btn-xl{width:100%;min-height:56px;font-size:1.05rem}.btn-primary{background:var(--primary);color:var(--primary-ink)}.btn-secondary{background:var(--surface);border-color:var(--line);color:var(--text)}.btn-ghost{color:var(--primary);background:0 0;padding-left:6px;padding-right:6px}.btn-danger{background:var(--danger);color:#fff;width:100%}.btn-danger-ghost{color:var(--danger);background:0 0;min-height:44px;padding:6px 10px}.icon-btn{cursor:pointer;background:0 0;border:0;border-radius:12px;min-width:48px;min-height:48px;font-size:1.3rem}.page-narrow{max-width:520px;margin:0 auto;padding:24px 16px 40px}.page-header{align-items:center;gap:4px;display:flex}.card{background:var(--surface);border-radius:var(--radius);box-shadow:var(--shadow);margin-bottom:14px;padding:16px}.card.highlight{border:2px solid var(--primary)}.plain-list{margin:0;padding:0;list-style:none}.member-row{border-bottom:1px solid var(--line);flex-wrap:wrap;align-items:center;gap:10px;padding:8px 0;display:flex}.member-row:last-child{border-bottom:0}.avatar{background:color-mix(in srgb, var(--primary) 18%, transparent);width:36px;height:36px;color:var(--primary);border-radius:50%;flex:none;place-items:center;font-weight:700;display:inline-grid}.badge{background:var(--line);color:var(--muted);border-radius:999px;padding:2px 8px;font-size:.8rem}.inline-form{flex-wrap:wrap;gap:8px;margin-top:8px;display:flex}.inline-form input{flex:200px}.segmented{background:var(--line);border-radius:12px;gap:6px;padding:4px;display:flex}.seg{cursor:pointer;min-height:44px;color:var(--text);background:0 0;border:0;border-radius:9px;flex:1;font-weight:600}.seg.active{background:var(--surface);box-shadow:var(--shadow)}.seg-buy.active{color:var(--buy)}.seg-running_out.active{color:var(--soon)}.seg-have.active{color:var(--have)}.app{flex-direction:column;min-height:100dvh;display:flex}.topbar{z-index:5;padding:calc(env(safe-area-inset-top) + 12px) 16px 10px;background:color-mix(in srgb, var(--bg) 92%, transparent);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);border-bottom:1px solid var(--line);justify-content:space-between;align-items:baseline;gap:8px;display:flex;position:sticky;top:0}.content{padding:12px 12px calc(96px + env(safe-area-inset-bottom));flex:1;width:100%;max-width:760px;margin:0 auto}.screen{flex-direction:column;gap:14px;display:flex}.tabbar{z-index:10;padding:6px 6px calc(6px + env(safe-area-inset-bottom));background:var(--surface);border-top:1px solid var(--line);grid-template-columns:repeat(4,1fr);display:grid;position:fixed;bottom:0;left:0;right:0}.tab{min-height:56px;color:var(--muted);cursor:pointer;background:0 0;border:0;border-radius:12px;flex-direction:column;align-items:center;gap:2px;font-size:.8rem;display:flex}.tab.active{color:var(--primary);font-weight:700}.tab-icon{font-size:1.4rem;line-height:1}.splash{text-align:center;flex-direction:column;justify-content:center;align-items:center;gap:12px;min-height:100dvh;padding:24px;display:flex}.spinner{border:4px solid var(--line);border-top-color:var(--primary);border-radius:50%;width:36px;height:36px;animation:.9s linear infinite spin}.waiting{text-align:center;flex-direction:column;align-items:center;gap:12px;padding:12px 0;display:flex}@keyframes spin{to{transform:rotate(360deg)}}.toast{left:50%;bottom:calc(84px + env(safe-area-inset-bottom));z-index:20;color:#fff;background:#1f2a24;border-radius:14px;align-items:center;gap:12px;max-width:calc(100% - 32px);padding:12px 16px;animation:.2s ease-out rise;display:flex;position:fixed;transform:translate(-50%);box-shadow:0 6px 24px #00000040}.toast-action{color:#86efac;cursor:pointer;background:0 0;border:0;min-height:40px;padding:4px 6px;font-weight:700}@keyframes rise{0%{opacity:0;transform:translate(-50%,8px)}}.sheet-backdrop{z-index:30;background:#00000059;justify-content:center;align-items:flex-end;display:flex;position:fixed;inset:0}.sheet{background:var(--surface);border-radius:20px 20px 0 0;flex-direction:column;width:100%;max-width:620px;max-height:92dvh;animation:.22s ease-out rise-sheet;display:flex;box-shadow:0 -6px 30px #0003}.sheet-header{justify-content:space-between;align-items:center;padding:14px 12px 6px 18px;display:flex}.sheet-header h2{text-overflow:ellipsis;white-space:nowrap;margin:0;overflow:hidden}.sheet-body{padding:8px 18px calc(24px + env(safe-area-inset-bottom));overflow-y:auto}@keyframes rise-sheet{0%{opacity:0;transform:translateY(40px)}}.quick-add{background:var(--surface);border-radius:var(--radius);box-shadow:var(--shadow);z-index:4;padding:12px;position:sticky;top:64px}.search-row{gap:8px;display:flex}.search-input{min-height:52px;font-size:1.05rem}.results{flex-wrap:wrap;gap:8px;margin-top:10px;display:flex}.chip-row{margin-top:10px}.chip-row h3{color:var(--muted);text-transform:uppercase;letter-spacing:.03em;margin:4px 0 6px;font-size:.85rem;font-weight:600}.chips{scrollbar-width:none;-webkit-overflow-scrolling:touch;gap:8px;padding-bottom:4px;display:flex;overflow-x:auto}.chips::-webkit-scrollbar{display:none}.results .chip,.chip-row .chips{flex-wrap:wrap}.chip{border:1px solid var(--line);background:var(--bg);cursor:pointer;border-radius:999px;flex:none;align-items:center;gap:6px;min-height:44px;padding:6px 14px 6px 8px;font-weight:600;display:inline-flex}.chip-icon{font-size:1.3rem}.chip-on{border-color:var(--primary);color:var(--primary)}.chip-check{font-weight:800}.hint{margin:8px 0 0;font-size:.9rem}.group{flex-direction:column;gap:6px;display:flex}.group-title,.day{text-transform:uppercase;letter-spacing:.04em;color:var(--muted);align-items:center;gap:8px;margin:8px 4px 2px;font-size:.9rem;display:flex}.count{font-weight:700}.dot{border-radius:50%;width:10px;height:10px;display:inline-block}.dot-buy{background:var(--buy)}.dot-running_out{background:var(--soon)}.dot-have{background:var(--have)}.items{flex-direction:column;gap:8px;margin:0;padding:0;list-style:none;display:flex}.item{background:var(--surface);border-radius:var(--radius);box-shadow:var(--shadow);border-left:4px solid #0000;align-items:center;gap:6px;padding:6px 8px 6px 6px;display:flex}.item-buy{border-left-color:var(--buy)}.item-running_out{border-left-color:var(--soon)}.item-have{border-left-color:var(--have);opacity:.8}.item-high .prio{background:var(--accent);color:#fff;vertical-align:1px;border-radius:50%;place-items:center;width:20px;height:20px;margin-right:6px;font-size:.8rem;font-weight:800;display:inline-grid}.check{border:2px solid var(--muted);cursor:pointer;background:0 0;border-radius:50%;flex:0 0 48px;place-items:center;width:48px;height:48px;padding:0;display:grid}.check:active{background:color-mix(in srgb, var(--primary) 20%, transparent);border-color:var(--primary)}.item-main{text-align:left;cursor:pointer;background:0 0;border:0;flex:1;align-items:center;gap:10px;min-width:0;min-height:56px;padding:6px 4px;display:flex}.item .icon,.history-row .icon{text-align:center;flex:none;width:36px;font-size:1.6rem}.text{flex-direction:column;min-width:0;display:flex}.name{text-overflow:ellipsis;white-space:nowrap;font-weight:600;overflow:hidden}.meta{color:var(--muted);text-overflow:ellipsis;white-space:nowrap;font-size:.88rem;overflow:hidden}.status{cursor:pointer;background:0 0;border:1px solid;border-radius:999px;flex:none;min-height:40px;padding:6px 10px;font-size:.82rem;font-weight:700}.status-buy{color:var(--buy)}.status-running_out{color:var(--soon);background:color-mix(in srgb, var(--soon) 12%, transparent)}.status-have{color:var(--have)}.item-bought{opacity:.6;box-shadow:none;padding:10px 12px}.bought-head{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:6px;display:flex}.empty{text-align:center;padding:24px 12px}.empty-icon{font-size:3rem}.category-grid{grid-template-columns:repeat(2,1fr);gap:10px;display:grid}.category{border-radius:var(--radius);background:var(--surface);min-height:96px;box-shadow:var(--shadow);text-align:left;cursor:pointer;border:0;flex-direction:column;justify-content:space-between;align-items:flex-start;gap:8px;padding:14px;font-weight:700;display:flex}.category-icon{font-size:2rem}.tile-grid{grid-template-columns:repeat(auto-fill,minmax(118px,1fr));gap:10px;display:grid}.tile{background:var(--surface);border-radius:var(--radius);box-shadow:var(--shadow);flex-direction:column;min-height:116px;display:flex;position:relative}.tile-main{cursor:pointer;text-align:center;background:0 0;border:0;flex-direction:column;flex:1;justify-content:center;align-items:center;gap:6px;padding:12px 8px;display:flex}.tile-icon{font-size:2.2rem;line-height:1}.tile-name{font-size:.92rem;font-weight:600}.tile-on{outline:2px solid var(--primary)}.tile-badge{color:var(--primary);font-weight:800;position:absolute;top:6px;left:8px}.star,.tile-edit{cursor:pointer;width:40px;height:40px;color:var(--muted);background:0 0;border:0;font-size:1.2rem;position:absolute;top:2px}.star{right:0}.star.on{color:#f59e0b}.tile-edit{font-size:1rem;right:36px}.tile-new{border:2px dashed var(--line);box-shadow:none;cursor:pointer;color:var(--muted);background:0 0;justify-content:center;align-items:center}.tile-new .tile-icon{color:var(--primary)}.history{flex-direction:column;gap:6px;margin:0;padding:0;list-style:none;display:flex}.history-row{background:var(--surface);border-radius:12px;align-items:center;gap:8px;padding:10px 12px;display:flex}.scanner{flex-direction:column;align-items:center;gap:10px;margin:12px 0;display:flex}.scanner-video{aspect-ratio:1;object-fit:cover;border-radius:var(--radius);background:#000;width:100%;max-width:420px}.scanner-video.hidden{display:none}.invite-box{text-align:center;flex-direction:column;align-items:center;gap:10px;margin-top:14px;display:flex}.qr{background:#fff;border-radius:12px;width:min(260px,80vw);height:auto;padding:10px}@media (width>=760px){.tabbar{border-radius:18px 18px 0 0;width:520px;left:50%;right:auto;transform:translate(-50%)}.sheet{border-radius:20px;margin-bottom:24px}.sheet-backdrop{align-items:center}}
