:root{--bg:#f6f7f4;--surface:#fff;--text:#1c2421;--muted:#65706b;--line:#e2e6e2;--accent:#0f766e;--accent-strong:#0b5f58;--accent-soft:#e3f2ef;--on-accent:#fff;--warn:#9a5b00;--warn-soft:#fff4dd;--danger:#b42318;--success-soft:#e4f6e8;--radius:16px;--shadow:0 1px 2px #0000000a, 0 2px 10px #0000000a;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;color:var(--text);-webkit-tap-highlight-color:transparent;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;font-size:17px;line-height:1.45}@media (prefers-color-scheme:dark){:root{--bg:#111614;--surface:#1a211e;--text:#e8ece9;--muted:#97a39d;--line:#2b3430;--accent:#2bb3a3;--accent-strong:#4cc9b9;--accent-soft:#163a35;--on-accent:#06221f;--warn:#f0b44c;--warn-soft:#3a2c12;--danger:#f97066;--success-soft:#16351f;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}}*{box-sizing:border-box}body{background:var(--bg);min-height:100dvh;margin:0}body.no-scroll{overflow:hidden}h1{margin:0;font-size:1.6rem;line-height:1.2}h2{margin:0 0 .5rem;font-size:1.05rem}p{margin:0}button,input,select{font:inherit;color:inherit}button{cursor:pointer}#root{max-width:560px;margin:0 auto}.app main{padding:calc(16px + env(safe-area-inset-top)) 16px calc(96px + env(safe-area-inset-bottom))}.stack{flex-direction:column;gap:14px;display:flex}.grow{flex:1}.center{text-align:center;align-items:center}.row-2{grid-template-columns:1fr 1fr;gap:12px;display:grid}.muted{color:var(--muted)}.small{font-size:.85rem}.lead{font-size:1.1rem}.card{background:var(--surface);border-radius:var(--radius);box-shadow:var(--shadow);padding:16px}details.card summary{cursor:pointer;font-weight:600}details.card[open] summary{margin-bottom:12px}.headline{letter-spacing:-.02em;font-size:2.2rem;font-weight:700;line-height:1.1}.btn{background:var(--accent-soft);color:var(--accent-strong);border:none;border-radius:12px;min-height:48px;padding:12px 18px;font-weight:600}.btn.primary{background:var(--accent);color:var(--on-accent)}.btn.secondary{background:var(--accent-soft);color:var(--accent-strong)}.btn.ghost{color:var(--muted);background:0 0}.btn.danger{background:var(--danger);color:#fff}.btn.small{min-height:38px;padding:6px 14px;font-size:.9rem}.btn.wide{width:100%}.btn.big{min-height:58px;font-size:1.1rem}.btn:disabled{opacity:.45;cursor:default}.icon-btn{width:44px;height:44px;color:var(--muted);background:0 0;border:none;font-size:1.6rem;line-height:1}.payday-btn{background:linear-gradient(140deg, var(--accent), var(--accent-strong));color:var(--on-accent);border:none;border-radius:24px;flex-direction:column;align-items:center;gap:4px;padding:28px 20px;display:flex;box-shadow:0 8px 24px #0f766e4d}.payday-btn .big-label{font-size:1.8rem;font-weight:800}.payday-btn:active{transform:scale(.98)}.field{flex-direction:column;gap:6px;display:flex}.field-label,.toggle-label{font-size:.95rem;font-weight:600}.field-hint{color:var(--muted);font-size:.82rem;display:block}input:not([type=checkbox]):not([type=range]),select{border:1.5px solid var(--line);background:var(--surface);border-radius:12px;width:100%;min-height:48px;padding:10px 12px;font-size:1rem}input:focus,select:focus{border-color:var(--accent);outline:none}input[type=range]{width:100%;accent-color:var(--accent)}.money-input{border:1.5px solid var(--line);background:var(--surface);border-radius:12px;align-items:center;padding:0 12px;display:flex}.money-input:focus-within{border-color:var(--accent)}.money-input input:not([type=checkbox]){background:0 0;border:none;padding-left:4px}.money-prefix{color:var(--muted)}.money-input.large{padding:8px 16px}.money-input.large input:not([type=checkbox]),.money-input.large .money-prefix{font-size:2.2rem;font-weight:700}.toggle{justify-content:space-between;align-items:center;gap:12px;display:flex}.toggle input{appearance:none;background:var(--line);border-radius:16px;flex-shrink:0;width:52px;height:32px;transition:background .15s;position:relative}.toggle input:after{content:"";background:#fff;border-radius:50%;width:26px;height:26px;transition:transform .15s;position:absolute;top:3px;left:3px}.toggle input:checked{background:var(--accent)}.toggle input:checked:after{transform:translate(20px)}.segmented{background:var(--line);border-radius:12px;padding:3px;display:flex}.segmented button{color:var(--muted);background:0 0;border:none;border-radius:10px;flex:1;padding:9px;font-weight:600}.segmented button.on{background:var(--surface);color:var(--text);box-shadow:var(--shadow)}.choice-list{flex-direction:column;gap:8px;display:flex}.choice{text-align:left;border:1.5px solid var(--line);background:var(--surface);border-radius:14px;padding:14px 16px;font-weight:600}.choice.rich{flex-direction:column;gap:2px;font-weight:400;display:flex}.choice.on{border-color:var(--accent);background:var(--accent-soft)}.tag{text-transform:uppercase;letter-spacing:.04em;background:var(--accent);color:var(--on-accent);vertical-align:2px;border-radius:6px;margin-left:8px;padding:2px 7px;font-size:.72rem;font-weight:700}.actions{justify-content:flex-end;gap:10px;display:flex}.actions .btn.primary{flex:1}.list{flex-direction:column;gap:8px;margin:0;padding:0;list-style:none;display:flex}.list-item,.history-item summary{text-align:left;background:var(--surface);width:100%;box-shadow:var(--shadow);border:none;border-radius:14px;justify-content:space-between;align-items:center;gap:12px;padding:14px 16px;display:flex}.history-item summary{cursor:pointer;list-style:none}.history-item summary::-webkit-details-marker{display:none}.history-item .plan-list{padding:8px 16px}.list-item>span:first-child,.history-item summary>span:first-child,.plan-list li>span:first-child,.due-list li>span:first-child,.checklist .grow{flex-direction:column;min-width:0;display:flex}.amount{white-space:nowrap;font-weight:700}.amount.paid{color:var(--accent)}.plan-list,.due-list{margin:0;padding:0;list-style:none}.plan-list li,.due-list li{border-top:1px solid var(--line);justify-content:space-between;align-items:center;gap:12px;padding:10px 0;display:flex}.plan-list li:first-child,.due-list li:first-child{border-top:none}.plan-list li.warn .amount-btn{color:var(--warn)}.plan-list li.skipped{color:var(--muted)}.due-list li.overdue strong{color:var(--danger)}.amount-btn{border:1.5px dashed var(--line);white-space:nowrap;background:0 0;border-radius:10px;padding:6px 10px;font-weight:700}.amount-btn.inline{border-style:solid;border-color:#0000;align-self:flex-start;margin-top:4px;padding:0;font-size:1.15rem}.amount-btn:disabled{cursor:default}.edit-amount{align-items:center;gap:6px;max-width:190px;display:flex}.checklist{flex-direction:column;gap:8px;margin:0;padding:0;list-style:none;display:flex}.checklist li{background:var(--surface);box-shadow:var(--shadow);border-radius:14px;align-items:center;gap:14px;padding:14px;display:flex}.checklist li.done{opacity:.6}.checklist li.done strong{text-decoration:line-through}.check{border:2px solid var(--accent);width:36px;height:36px;color:var(--on-accent);background:0 0;border-radius:50%;flex-shrink:0;font-weight:800}.checklist li.done .check{background:var(--accent)}.checklist-head{align-items:baseline;gap:8px;display:flex}.banner{text-align:left;background:var(--accent-soft);color:var(--text);border:none;border-radius:14px;padding:12px 14px;font-size:.92rem}.banner.warn{background:var(--warn-soft)}.banner.success{background:var(--success-soft);font-weight:600}.payoff{margin-top:10px;font-size:.95rem}.progress{background:var(--line);border-radius:6px;height:12px;margin:10px 0 6px;overflow:hidden}.progress>div{background:var(--accent);border-radius:6px;height:100%;transition:width .4s}.screen-header{grid-template-columns:44px 1fr 44px;align-items:center;margin:-8px -8px 4px;display:grid}.screen-header h1{text-align:center;font-size:1.05rem}.screen-header .icon-btn{font-size:2.2rem}.home-head h1{font-size:1.9rem}.flow,.setup{min-height:100dvh;padding:calc(16px + env(safe-area-inset-top)) 16px calc(20px + env(safe-area-inset-bottom));flex-direction:column;gap:14px;display:flex}.setup-progress{gap:6px;display:flex}.setup-progress span{background:var(--line);border-radius:3px;flex:1;height:5px}.setup-progress span.on{background:var(--accent)}.setup-nav{justify-content:space-between;margin-top:auto;padding-top:12px;display:flex}.setup-nav .btn.primary{min-width:140px}.hero-icon{border-radius:22px;width:88px;height:88px;margin-top:40px}.sticky-total{background:var(--surface);border-radius:14px;justify-content:space-between;padding:12px 16px;display:flex;position:sticky;bottom:8px;box-shadow:0 4px 18px #0000001a}.sticky-total.over{color:var(--danger)}.confetti{margin-top:40px;font-size:4rem}.sheet-backdrop{z-index:20;background:#0006;justify-content:center;align-items:flex-end;display:flex;position:fixed;inset:0}.sheet{background:var(--bg);width:100%;max-width:560px;max-height:92dvh;padding:8px 16px calc(20px + env(safe-area-inset-bottom));border-radius:22px 22px 0 0;animation:.2s ease-out up;overflow-y:auto}.sheet-head{background:var(--bg);z-index:1;justify-content:space-between;align-items:center;padding:8px 0;display:flex;position:sticky;top:-8px}.sheet-head h2{margin:0;font-size:1.2rem}@keyframes up{0%{opacity:0;transform:translateY(40px)}}.tabbar{background:var(--surface);border-top:1px solid var(--line);width:100%;max-width:560px;padding-bottom:env(safe-area-inset-bottom);z-index:10;display:flex;position:fixed;bottom:0;left:50%;transform:translate(-50%)}.tabbar button{color:var(--muted);background:0 0;border:none;flex-direction:column;flex:1;align-items:center;padding:8px 0 10px;font-size:.75rem;display:flex}.tabbar button.on{color:var(--accent);font-weight:600}.tab-icon{font-size:1.35rem;line-height:1.2}.edit-amount.link-form{max-width:none;margin-top:6px}.indent{border-left:3px solid var(--accent-soft);padding-left:12px}.accent{color:var(--accent-strong)}.link-btn{color:var(--accent-strong);background:0 0;border:none;padding:8px 0 0;font-weight:600}.big-name{margin:0;font-size:1.5rem}.plan-list.wide{text-align:left;width:100%}.trophy{font-weight:600}.sr-only{clip:rect(0 0 0 0);width:1px;height:1px;position:absolute;overflow:hidden}.tips{text-align:left;background:var(--surface);border-radius:var(--radius);box-shadow:var(--shadow);padding:14px 16px}.tips h3{margin:0 0 6px;font-size:1rem}.tips ul{flex-direction:column;gap:6px;margin:0 0 6px;padding-left:18px;font-size:.9rem;display:flex}.compare{flex-direction:column;gap:6px;margin:8px 0 0;padding:0;list-style:none;display:flex}.compare button{text-align:left;border:1.5px solid var(--line);background:var(--surface);border-radius:12px;flex-direction:column;align-items:flex-start;gap:2px;width:100%;padding:10px 12px;display:flex}.compare button.on{border-color:var(--accent);background:var(--accent-soft)}.chart{margin:12px 0 0}.chart-box{position:relative}.chart svg{touch-action:pan-y;width:100%;height:auto;display:block}.chart .grid{stroke:var(--line);stroke-width:1px}.chart .axis{fill:var(--muted);font-size:10px}.chart .line{fill:none;stroke:var(--accent);stroke-width:2px;stroke-linejoin:round;stroke-linecap:round}.chart .line.comparison{stroke:var(--muted);stroke-dasharray:4 4}.chart .crosshair{stroke:var(--muted);stroke-width:1px}.chart .dot{fill:var(--accent);stroke:var(--surface);stroke-width:2px}.legend{color:var(--muted);gap:14px;margin-bottom:4px;font-size:.8rem;display:flex}.legend span{align-items:center;gap:6px;display:flex}.swatch{border-top:2px solid var(--accent);width:16px;height:0}.swatch.comparison{border-top:2px dashed var(--muted)}.tooltip{background:var(--surface);border:1px solid var(--line);pointer-events:none;white-space:nowrap;box-shadow:var(--shadow);border-radius:8px;flex-direction:column;padding:4px 8px;font-size:.78rem;display:flex;position:absolute;top:0;transform:translate(-50%)}
