:root{--bg: #f6f5f1;--surface: #ffffff;--text: #1c1f1d;--muted: #6b716d;--line: #e3e1da;--accent: #1f6f8b;--accent-bg: #e3f0f5;--deal: #1f6b45;--deal-bg: #e2f1e7;--danger: #b3261e;--primary: #1c1f1d;--primary-text: #ffffff;color-scheme:light dark}@media(prefers-color-scheme:dark){:root{--bg: #141614;--surface: #1e211f;--text: #eceeeb;--muted: #9aa19c;--line: #2e3230;--accent: #7cc4de;--accent-bg: #1d3640;--deal: #8fd3ab;--deal-bg: #1d3a2a;--danger: #ff8a80;--primary: #eceeeb;--primary-text: #141614}}*{box-sizing:border-box}html,body,#root{height:100%}body{margin:0;background:var(--bg);color:var(--text);font:16px/1.4 system-ui,-apple-system,Segoe UI,sans-serif;-webkit-text-size-adjust:100%}h1{margin:0 0 10px;font-size:1.35rem;font-weight:600}h2{margin:18px 4px 6px;font-size:.8rem;font-weight:500;color:var(--muted)}a{color:var(--accent)}input,select,button{font:inherit;color:inherit}input:not([type=checkbox]),select{width:100%;min-height:44px;padding:0 12px;background:var(--surface);border:1px solid var(--line);border-radius:10px}button{cursor:pointer;border:0;background:none;padding:0}button.primary{min-height:44px;padding:0 16px;border-radius:10px;background:var(--primary);color:var(--primary-text);font-weight:600}button.primary:disabled{opacity:.4}button.secondary{min-height:44px;padding:0 16px;border:1px solid var(--line);border-radius:10px;background:var(--surface)}button.wide{width:100%;margin-top:16px}button.link{padding:8px 4px;color:var(--accent);font-size:.9rem;white-space:nowrap}button.link.strong{color:var(--text);font-size:1rem;font-weight:500}.danger,button.link.danger{color:var(--danger)}.muted,button.link.muted{color:var(--muted)}.small{font-size:.8rem}.status{margin:28px 12px;text-align:center;color:var(--muted)}.error{margin:0 0 12px;color:var(--danger)}.error.banner{margin:0;padding:10px 16px;background:var(--surface);border-bottom:1px solid var(--line)}.login{max-width:380px;margin:0 auto;padding:15vh 20px 20px}.login form,.form{display:grid;gap:14px}.login label,.form label{display:grid;gap:5px;font-size:.85rem;color:var(--muted)}.form .two{display:grid;grid-template-columns:1fr 1fr;gap:10px}.form label.switch{display:flex;align-items:center;gap:10px;color:var(--text);font-size:.95rem}input[type=checkbox]{flex:none;width:22px;height:22px;accent-color:var(--accent)}.app{display:flex;flex-direction:column;max-width:560px;height:100%;margin:0 auto}.app header{padding:calc(env(safe-area-inset-top) + 14px) 16px 6px}.app main{flex:1;overflow-y:auto;padding:4px 16px 16px}.tabbar{display:flex;padding:6px 8px calc(env(safe-area-inset-bottom) + 6px);background:var(--surface);border-top:1px solid var(--line)}.tabbar button{flex:1;display:grid;justify-items:center;gap:2px;padding:4px 0;color:var(--muted);font-size:.7rem}.tabbar button.on{color:var(--accent)}svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}.chips{display:flex;flex-wrap:wrap;gap:6px}.chips.filter{margin:4px 0 8px}.chip{display:inline-flex;align-items:center;min-height:30px;padding:0 10px;border-radius:8px;background:var(--surface);border:1px solid var(--line);color:var(--muted);font-size:.82rem;white-space:nowrap}.chip.sel{background:var(--accent-bg);border-color:transparent;color:var(--accent)}.chip.deal{background:var(--deal-bg);border-color:transparent;color:var(--deal)}.items{margin:0;padding:0;list-style:none;background:var(--surface);border-radius:12px}.items:empty{display:none}.item{display:flex;align-items:center;gap:8px;padding-right:10px;border-bottom:1px solid var(--line)}.item:last-child{border-bottom:0}.item label{flex:1;display:flex;align-items:center;gap:12px;min-width:0;min-height:50px;padding:8px 0 8px 12px}.item.plan{min-height:50px;padding:8px 10px 8px 12px}.item .name{flex:1;min-width:0;overflow-wrap:anywhere}.item .rowbtn{text-align:left}.item>input[type=checkbox]{margin:0 0 0 12px}.item>.rowbtn{align-self:stretch;min-height:50px;padding:8px 0 8px 4px}.title-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}.title-picker{display:flex;align-items:center;gap:4px;min-width:0;text-align:left}.title-picker h1{margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.title-picker svg{flex:none;width:20px;height:20px;color:var(--muted)}.form .two.wide-first{grid-template-columns:2fr 1fr}.form .field{display:grid;gap:6px;font-size:.85rem;color:var(--muted)}.sheet .form+h2{margin-top:22px}.photos{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0}.thumb{position:relative;width:72px;height:96px;border-radius:8px;overflow:hidden;background:var(--surface);border:1px solid var(--line)}.thumb img{width:100%;height:100%;object-fit:cover}.thumb button{position:absolute;top:2px;right:2px;width:24px;height:24px;border-radius:50%;background:#0000008c;color:#fff;line-height:1}.add-photo{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-width:140px;min-height:96px;padding:10px;border:1px dashed var(--muted);border-radius:10px;color:var(--muted);font-size:.85rem;text-align:center}.receipts .secondary{margin-top:4px}.receipt-full{display:block;width:100%;border-radius:10px}.receipt-full.short{max-height:40vh;object-fit:contain;background:var(--surface);margin-bottom:10px}.thumb.small{flex:none;width:40px;height:54px}.review{margin-top:6px}.review-line{gap:6px;padding:6px 8px}.review-line input{min-height:38px}.review-line .price{flex:none;width:76px;text-align:right}.review-line .link{font-size:1.2rem;padding:4px 6px}.error-note{background:var(--surface);color:var(--danger)}.switch-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;background:var(--surface);border-radius:12px}.switch-row .hint{display:block;color:var(--muted);font-size:.8rem}.title-row .chips{flex-wrap:nowrap}.chat{display:flex;flex-direction:column;gap:8px}.examples{display:grid;gap:8px}.examples .secondary{text-align:left}.bubble{max-width:88%;padding:8px 12px;border-radius:14px;background:var(--surface);overflow-wrap:anywhere}.bubble p{margin:0;white-space:pre-wrap}.bubble.user{align-self:flex-end;background:var(--accent-bg);color:var(--text)}.bubble.assistant{align-self:flex-start}.bubble .sources{margin-top:6px;color:var(--muted);font-size:.8rem}.bubble .link{padding:6px 0 0}.proposal{margin-top:8px;padding-top:8px;border-top:1px solid var(--line)}.proposal ul{margin:0 0 4px;padding-left:18px}.proposal .actions{margin:8px 0 0}.research{margin-bottom:14px}.research p{margin:0 4px;white-space:pre-wrap;overflow-wrap:anywhere}.item .quantity{color:var(--muted)}.item .hint{display:block;color:var(--muted);font-size:.8rem}.item.is-done .name{color:var(--muted);text-decoration:line-through}.item select{width:auto;min-height:34px;padding:0 6px;font-size:.85rem}.row-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.done{margin-top:10px}.note{display:flex;align-items:center;gap:8px;margin:8px 0;padding:6px 12px;border-radius:10px;background:var(--accent-bg);color:var(--accent);font-size:.9rem}.note.inset{margin:0 16px 8px}.note span{flex:1}.actions{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin:14px 0 4px}.add{display:flex;gap:8px;padding:10px 16px;border-top:1px solid var(--line)}.add input{flex:1;min-width:0}.mic{flex:none;display:grid;place-items:center;width:44px;height:44px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--muted)}.mic.on{background:var(--accent-bg);color:var(--accent)}.sheet-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:10;display:flex;align-items:flex-end;justify-content:center;background:#0006}.sheet{width:100%;max-width:560px;max-height:88%;overflow-y:auto;padding:14px 16px calc(env(safe-area-inset-bottom) + 18px);background:var(--bg);border-radius:16px 16px 0 0}.sheet-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}.sheet-head h2{margin:0;color:var(--text);font-size:1.05rem;font-weight:600}.options{margin:0;padding:0;list-style:none;background:var(--surface);border-radius:12px}.options li{border-bottom:1px solid var(--line)}.options li:last-child{border-bottom:0}.options button{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;min-height:48px;padding:0 14px;text-align:left}
