:root{--bg:#eef2f0;--surface:#fff;--text:#1a2421;--muted:#5b6863;--line:#dde4e1;--primary:#0b6e4f;--primary-soft:#e3f1eb;--regular:#2f6db5;--irregular:#c27c0e;--everyday:#c2410c;--out:#1a2421;--in:#0b6e4f;--radius:16px;color:var(--text);-webkit-text-size-adjust:100%;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;font-size:16px;line-height:1.45}*{box-sizing:border-box}html,body,#root{height:100%;margin:0}body{background:#d6ddda}button,input{font:inherit;color:inherit}button{cursor:pointer}h1,h2{margin:0}.phone{background:var(--bg);flex-direction:column;max-width:430px;height:100%;margin:0 auto;display:flex;box-shadow:0 0 40px #0000001f}.topbar{padding:14px 16px 12px;padding-top:max(14px, env(safe-area-inset-top));background:var(--primary);color:#fff;align-items:baseline;gap:8px;display:flex}.brand{font-size:1.25rem;font-weight:700}.subtitle{opacity:.85;font-size:.9rem}.mock-banner{color:#6b4e00;text-align:center;background:#fff4d6;padding:4px 8px;font-size:.85rem}.content{flex:1;min-height:0;overflow-y:auto}.content[hidden]{display:none}.tabbar{border-top:1px solid var(--line);background:var(--surface);padding-bottom:env(safe-area-inset-bottom);display:flex}.tabbar button{min-height:56px;color:var(--muted);background:0 0;border:0;flex-direction:column;flex:1;justify-content:center;align-items:center;gap:2px;font-weight:600;display:flex}.tabbar button.active{color:var(--primary)}.chat{flex-direction:column;height:100%;display:flex}.messages{flex-direction:column;flex:1;gap:10px;padding:16px;display:flex;overflow-y:auto}.welcome{margin:auto 0 8px}.welcome h1{margin-bottom:6px;font-size:1.6rem}.welcome p{color:var(--muted);margin:0}.bubble{border-radius:var(--radius);max-width:88%;padding:10px 14px}.bubble p{margin:0}.bubble.user{background:var(--primary);color:#fff;border-bottom-right-radius:4px;align-self:flex-end}.bubble.assistant{background:var(--surface);border-bottom-left-radius:4px;align-self:flex-start;box-shadow:0 1px 2px #0000000f}.bubble.error{color:#8a1c12;background:#fdecea}.typing{gap:4px;padding:14px;display:flex}.typing span{background:var(--muted);border-radius:50%;width:8px;height:8px;animation:1.2s infinite blink}.typing span:nth-child(2){animation-delay:.2s}.typing span:nth-child(3){animation-delay:.4s}@keyframes blink{0%,80%,to{opacity:.25}40%{opacity:1}}.how{border-top:1px solid var(--line);margin-top:8px;padding-top:6px;font-size:.9rem}.how summary{color:var(--primary);cursor:pointer;align-items:center;min-height:32px;font-weight:600;display:flex}.figures{gap:6px;margin:6px 0;padding:0;list-style:none;display:grid}.figures li{background:var(--primary-soft);border-radius:10px;grid-template-columns:1fr auto;padding:6px 10px;display:grid}.fig-value{font-weight:700}.fig-source{color:var(--muted);grid-column:1/-1;font-size:.8rem}.tools{color:var(--muted);flex-wrap:wrap;align-items:center;gap:4px;margin-top:4px;display:flex}.tools code{word-break:break-word;background:#f2f4f3;border-radius:6px;padding:2px 6px;font-size:.8rem}.model{color:var(--muted);margin-top:4px;font-size:.8rem}.chips{flex-wrap:wrap;gap:8px;padding:4px 16px 8px;display:flex}.chip{text-align:left;white-space:normal;border:1px solid var(--primary);background:var(--surface);max-width:100%;min-height:44px;color:var(--primary);border-radius:22px;flex:0 auto;padding:8px 14px;font-weight:600}.chip:disabled{opacity:.5}.composer{background:var(--bg);gap:8px;padding:8px 16px 12px;display:flex}.composer input{border:1px solid var(--line);background:var(--surface);border-radius:24px;flex:1;min-height:48px;padding:0 16px}.composer input:focus{outline:2px solid var(--primary);outline-offset:1px}.composer button{background:var(--primary);color:#fff;border:0;border-radius:50%;width:48px;height:48px;font-size:1.1rem}.composer button:disabled{opacity:.4}.baskets{flex-direction:column;gap:14px;padding:16px;display:flex}.status{color:var(--muted);text-align:center;padding:24px 16px}.muted{color:var(--muted);font-size:.875rem}.card{background:var(--surface);border-radius:var(--radius);padding:16px;box-shadow:0 1px 2px #0000000f}.card h2{font-size:1.1rem}.card-head{justify-content:space-between;align-items:baseline;margin-bottom:12px;display:flex}.safe-card{background:linear-gradient(135deg, var(--primary), #138a64);color:#fff;border-radius:var(--radius);flex-direction:column;gap:2px;padding:18px 16px;display:flex}.safe-label{opacity:.95;font-weight:600}.safe-amount{letter-spacing:-.02em;font-size:2.4rem;font-weight:800}.safe-note{opacity:.9;font-size:.875rem}.stackbar{border-radius:7px;gap:2px;height:14px;margin-bottom:8px;display:flex;overflow:hidden}.seg.MANDATORY_REGULAR,.dot.MANDATORY_REGULAR{background:var(--regular)}.seg.MANDATORY_IRREGULAR,.dot.MANDATORY_IRREGULAR{background:var(--irregular)}.seg.EVERYDAY,.dot.EVERYDAY{background:var(--everyday)}.basket-list,.cat-list,.tx-list{margin:0;padding:0;list-style:none}.basket-row{border:0;border-bottom:1px solid var(--line);text-align:left;background:0 0;align-items:center;gap:12px;width:100%;min-height:64px;padding:10px 0;display:flex}.basket-list li:last-child .basket-row{border-bottom:0}.dot{border-radius:50%;flex:none;width:12px;height:12px}.basket-name,.basket-amount,.tx-main{flex-direction:column;display:flex}.basket-name{flex:1}.basket-amount{text-align:right;font-size:1.15rem}.chev{color:var(--muted);font-size:1.4rem}.source{color:var(--muted);margin:8px 0 0;font-size:.8rem}.cat-list li,.income-row,.tx-list li{border-bottom:1px solid var(--line);justify-content:space-between;align-items:center;gap:12px;min-height:44px;display:flex}.cat-list{margin-top:8px}.income-row:last-child,.tx-list li:last-child{border-bottom:0}.income-row{color:var(--muted)}.income-row strong{color:var(--text)}.back{min-height:44px;color:var(--primary);background:0 0;border:0;align-self:flex-start;padding:0;font-weight:600}.basket-title{font-size:1.5rem}.tx-list{padding:4px 16px}.tx-list li{padding:8px 0}.out{color:var(--out)}.in{color:var(--in)}.segmented{background:var(--bg);border-radius:12px;gap:4px;margin-bottom:12px;padding:4px;display:flex}.segmented button{min-height:44px;color:var(--muted);background:0 0;border:0;border-radius:9px;flex:1;font-weight:600}.segmented button[aria-pressed=true]{background:var(--surface);color:var(--primary);box-shadow:0 1px 3px #0000001f}.segmented button:disabled{opacity:.5}.badge{color:#6b4e00;background:#fff4d6;border:1px dashed #c9a23a;border-radius:999px;align-self:flex-start;padding:2px 10px;font-size:.8rem;font-weight:700;display:inline-block}.receipt-insight{background:#fbf7ee;border-radius:12px;flex-direction:column;gap:6px;margin-top:12px;padding:12px;display:flex}.receipt-insight p{margin:0}.receipt-insight h3,.butler h3{margin:8px 0 0;font-size:1rem}.split-list,.leak-list{margin:0;padding:0;list-style:none}.split-list li,.leak-list li{justify-content:space-between;align-items:center;gap:12px;min-height:36px;display:flex}.split-list .dot{vertical-align:middle;display:inline-block}.leak-list li,.leak-list li strong{color:var(--everyday)}.receipt-hint{background:var(--primary-soft);border-radius:12px;margin:12px 0 0;padding:10px 12px;font-size:.95rem}.tx-button{text-align:left;background:0 0;border:0;justify-content:space-between;align-items:center;gap:12px;width:100%;min-height:44px;padding:0;display:flex}.tx-button .tx-main{flex:1}.receipt{background:var(--surface);border-top:6px dotted var(--bg);border-radius:4px;flex-direction:column;gap:4px;padding:20px 18px;display:flex;box-shadow:0 2px 10px #00000014}.receipt-store{margin-top:6px;font-size:1.3rem}.receipt-items{border-top:1px dashed var(--line);margin:10px 0 0;padding:0;list-style:none}.receipt-items li{border-bottom:1px dashed var(--line);border-radius:6px;align-items:center;gap:10px;padding:8px 6px;display:flex}.receipt-items li.leak{background:#fdeee6}.receipt-items li.leak strong{color:var(--everyday)}.receipt-items .dot{align-self:flex-start;margin-top:6px}.item-name{flex-direction:column;flex:1;display:flex}.tag{color:var(--primary);background:var(--primary-soft);border-radius:6px;align-self:flex-start;margin:2px 0;padding:0 6px;font-size:.75rem;font-weight:600}.receipt-total{justify-content:space-between;padding:12px 6px 0;font-size:1.2rem;display:flex}.butler .welcome{margin:0}.butler-input{background:0 0;padding:0}.butler .chips{padding:0}.butler-loading{align-items:center;gap:8px;display:flex}.butler-loading p{margin:0}.butler-answer{flex-direction:column;gap:6px;display:flex}.butler-answer>p{margin:0}.butler-task{font-style:italic}.steps,.sources{flex-direction:column;gap:6px;margin:4px 0 0;padding-left:22px;display:flex}.steps label{align-items:flex-start;gap:8px;min-height:32px;display:flex}.steps input{width:20px;height:20px;accent-color:var(--primary);flex:none;margin-top:2px}.sources li a{color:var(--primary);word-break:break-word;font-weight:600}.sources li span{display:block}.draft{white-space:pre-wrap;font:inherit;background:#f6f8f7;border-radius:10px;margin:6px 0;padding:10px;font-size:.9rem}.link-button{background:var(--primary);color:#fff;border-radius:22px;align-items:center;min-height:44px;padding:0 16px;font-weight:600;text-decoration:none;display:inline-flex}
