:root{--bg:#f4f2ec;--surface:#fff;--surface-2:#efece4;--text:#17201c;--muted:#5f6a64;--faint:#8a948e;--border:#e4e0d6;--brand:#1d5c4a;--brand-soft:#e2efe9;--brand-ink:#fff;--accent:#e9b949;--good:#1f7a55;--good-bg:#e6f3ec;--tight:#9a5b06;--tight-bg:#fbf0dc;--bad:#b23a2e;--bad-bg:#fbe7e3;--line-safe:#1d5c4a;--line-usual:#c0573f;--shadow:0 1px 2px #17201c0a, 0 2px 12px #17201c0a;--radius:20px;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}@media (prefers-color-scheme:dark){:root{--bg:#101513;--surface:#181f1c;--surface-2:#212a26;--text:#e8ede9;--muted:#9ca8a1;--faint:#75817a;--border:#28322d;--brand:#5cbf9d;--brand-soft:#1b3129;--brand-ink:#0b1310;--accent:#e9b949;--good:#66d1a3;--good-bg:#16302a;--tight:#f0b75a;--tight-bg:#33281a;--bad:#f08a7c;--bad-bg:#3a1f1b;--line-safe:#66d1a3;--line-usual:#f08a7c;--shadow:none;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}}*{box-sizing:border-box}html,body{margin:0}body{background:var(--bg);color:var(--text);-webkit-font-smoothing:antialiased;font:16px/1.45 system-ui,-apple-system,Segoe UI,Roboto,sans-serif}button,input,select,textarea{font:inherit;color:inherit}button{cursor:pointer}:focus-visible{outline:3px solid var(--accent);outline-offset:2px}h1,h2,h3{letter-spacing:-.01em}.app{max-width:480px;min-height:100dvh;padding:0 16px calc(96px + env(safe-area-inset-bottom));margin:0 auto}.topbar{justify-content:space-between;align-items:center;gap:12px;padding:20px 2px 14px;display:flex}.topbar h1{margin:0;font-size:1.375rem;font-weight:750}.topbar .sub{color:var(--muted);font-size:.875rem}.pill-btn{border:1px solid var(--border);background:var(--surface);color:var(--muted);white-space:nowrap;border-radius:999px;align-items:center;gap:6px;min-height:36px;padding:7px 12px;font-size:.8125rem;font-weight:600;display:inline-flex}.card{background:var(--surface);border-radius:var(--radius);box-shadow:var(--shadow);margin-bottom:12px;padding:18px}@media (prefers-color-scheme:dark){.card{border:1px solid var(--border)}}.card h2{margin:0;font-size:1rem;font-weight:700}.card p{color:var(--muted);margin:0}.card-head{flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:12px;margin-bottom:10px;display:flex}.hero{text-align:center;box-shadow:none;padding:24px 20px 18px;border:none!important}.hero.good{background:var(--good-bg)}.hero.tight{background:var(--tight-bg)}.hero.survival{background:var(--bad-bg)}.hero .label{color:var(--muted);font-size:.9375rem;font-weight:600}.hero .amount{letter-spacing:-.03em;font-variant-numeric:tabular-nums;margin:6px 0 8px;font-size:3.75rem;font-weight:800;line-height:1.05}.hero .amount-note{color:var(--muted);margin:-6px 0 10px;font-size:.875rem}.workings{text-align:left;max-width:380px;margin:12px auto 0;font-size:.875rem}.workings summary{cursor:pointer;text-align:center;color:var(--muted);text-underline-offset:3px;padding:6px;font-weight:600;text-decoration:underline;list-style:none}.workings summary::-webkit-details-marker{display:none}.workings .lookahead{text-align:center;margin:4px 0 0}.workings dl{gap:6px;margin:8px 0 6px;display:grid}.workings dl>div{justify-content:space-between;gap:12px;display:flex}.workings dt{color:var(--muted)}.workings dd{font-variant-numeric:tabular-nums;white-space:nowrap;margin:0;font-weight:700}.workings .total{border-top:1px solid var(--border);padding-top:6px}.workings .total dt{color:var(--text);font-weight:600}.workings p{color:var(--muted);font-size:.8125rem}.hero .status{background:var(--surface);border-radius:999px;padding:4px 12px;font-size:.8125rem;font-weight:700;display:inline-block}.hero.good .amount,.hero.good .status{color:var(--good)}.hero.tight .amount,.hero.tight .status{color:var(--tight)}.hero.survival .amount,.hero.survival .status{color:var(--bad)}.hero .reason{max-width:30ch;color:var(--text);margin:12px auto 0;font-size:.9375rem}.hero-stats{border-top:1px solid #00000012;grid-template-columns:repeat(3,1fr);margin:18px 0 0;padding-top:14px;display:grid}@media (prefers-color-scheme:dark){.hero-stats{border-top-color:#ffffff14}}.hero-stats div+div{border-left:1px solid #00000012}@media (prefers-color-scheme:dark){.hero-stats div+div{border-left-color:#ffffff14}}.hero-stats dt{color:var(--muted);font-size:.75rem}.hero-stats dd{font-variant-numeric:tabular-nums;margin:2px 0 0;font-weight:700}.hero-stats .of{color:var(--faint);font-size:.75rem;font-weight:500}.action{align-items:center;gap:14px;display:flex}.action .body{flex:1;min-width:0}.action h2{font-size:.9375rem}.action p{font-size:.875rem}.action.asking{flex-direction:column;align-items:stretch;gap:6px}.save-amount{border:1.5px solid var(--border);background:var(--bg);border-radius:14px;align-items:center;gap:6px;margin:8px 0 4px;padding:0 14px;font-size:1.5rem;font-weight:700;display:flex}.save-amount:focus-within{border-color:var(--brand)}.save-amount span{color:var(--muted)}.save-amount input{background:0 0;border:none;outline:none;flex:1;min-width:0;padding:10px 0;font-size:1.5rem;font-weight:700}.action p.save-warn{color:var(--bad)}.action-choices{grid-template-columns:1fr 1.4fr;gap:10px;margin-top:10px;display:grid}.action-icon{background:var(--brand-soft);width:40px;height:40px;color:var(--brand);border-radius:12px;flex:none;place-items:center;display:grid}.action-icon.good{background:var(--good-bg);color:var(--good)}.action-icon.warn{background:var(--tight-bg);color:var(--tight)}.action-icon.bad{background:var(--bad-bg);color:var(--bad)}.btn{background:var(--brand);color:var(--brand-ink);border:none;border-radius:14px;min-height:48px;padding:12px 18px;font-weight:650}.btn.small{white-space:nowrap;border-radius:12px;min-height:44px;padding:10px 14px;font-size:.875rem}.btn.secondary{background:var(--surface-2);color:var(--text)}.btn.ghost{color:var(--brand);background:0 0;align-items:center;gap:6px;min-height:0;padding:8px 4px;display:inline-flex}.btn.danger{background:var(--bad-bg);color:var(--bad)}.btn.block{width:100%}.btn:disabled{opacity:.45;cursor:default}.chart svg{touch-action:pan-y;width:100%;height:auto;display:block}.legend{color:var(--muted);flex-wrap:wrap;gap:12px;font-size:.75rem;display:flex}.legend i{vertical-align:middle;border-radius:2px;width:14px;height:3px;margin-right:6px;display:inline-block}.legend i.dashed{border-top:2px dashed;border-radius:0;height:0}.chart-note{font-size:.875rem;margin-top:10px!important}.chart-note b{color:var(--line-usual)}.chart-hint{text-align:center;font-size:.75rem;color:var(--faint)!important;margin-top:6px!important}.day-detail{background:var(--surface-2);border-radius:12px;margin-top:8px;padding:10px 12px;font-size:.875rem}.day-detail b{font-variant-numeric:tabular-nums}.list{margin:0;padding:0;list-style:none}.list li{border-bottom:1px solid var(--border);align-items:center;gap:12px;padding:10px 0;display:flex}.list li:last-child{border-bottom:none;padding-bottom:0}.list li:first-child{padding-top:0}.list .what{flex:1;min-width:0}.list .what div:first-child{text-overflow:ellipsis;white-space:nowrap;font-weight:600;overflow:hidden}.list .what div:last-child{color:var(--muted);font-size:.8125rem}.list .amt{font-variant-numeric:tabular-nums;font-weight:700}.amt.in{color:var(--good)}.icon-btn{color:var(--faint);background:0 0;border:none;border-radius:8px;place-items:center;min-width:36px;min-height:36px;padding:8px;display:grid}.insight-list{margin:0;padding:0;list-style:none}.insight-list li{border-bottom:1px solid var(--border);gap:14px;padding:14px 0;display:flex}.insight-list li:first-child{padding-top:0}.insight-list li:last-child{border-bottom:none;padding-bottom:0}.insight-list h3{margin:0 0 2px;font-size:.9375rem}.insight-list p{font-size:.875rem}.how summary{cursor:pointer;justify-content:space-between;align-items:center;min-height:28px;font-weight:700;list-style:none;display:flex}.how summary::-webkit-details-marker{display:none}.how summary svg{color:var(--muted);transition:transform .15s}.how[open] summary svg{transform:rotate(90deg)}.how ol{color:var(--muted);margin:12px 0 0;padding-left:20px;font-size:.9375rem}.how li+li{margin-top:6px}.dow-bars{grid-template-columns:repeat(7,1fr);align-items:end;gap:8px;height:110px;display:grid}.dow-bars .bar{background:var(--brand);border-radius:6px 6px 3px 3px;min-height:2px;position:relative}.dow-bars .bar.cautious{background:var(--accent);border-radius:6px 6px 3px 3px;position:absolute;bottom:0;left:0;right:0}.dow-labels{text-align:center;color:var(--muted);grid-template-columns:repeat(7,1fr);gap:8px;margin-top:6px;font-size:.75rem;display:grid}.field{margin-bottom:14px;display:block}.field>span{margin-bottom:6px;font-size:.875rem;font-weight:600;display:block}.field input,.field select,.field textarea{border:1px solid var(--border);background:var(--surface);border-radius:12px;width:100%;min-height:48px;padding:12px 14px}.field textarea{resize:vertical;min-height:96px}.field .hint{color:var(--muted);margin-top:4px;font-size:.8125rem}.amount-input{text-align:center;font-weight:700;font-size:2rem!important}.segmented{background:var(--surface-2);border-radius:14px;grid-template-columns:1fr 1fr;margin-bottom:16px;padding:4px;display:grid}.segmented button{color:var(--muted);background:0 0;border:none;border-radius:10px;min-height:44px;padding:10px;font-weight:600}.segmented button.on{background:var(--surface);color:var(--text);box-shadow:var(--shadow)}.chips{flex-wrap:wrap;gap:8px;display:flex}.chip{border:1px solid var(--border);background:var(--surface);border-radius:999px;min-height:40px;padding:8px 14px;font-size:.875rem}.quick-amounts{margin:-6px 0 16px}.chip.on{background:var(--brand);color:var(--brand-ink);border-color:var(--brand)}.row{align-items:flex-end;gap:8px;display:flex}.row>*{flex:1}.row>.shrink{flex:none}.warnings{background:var(--bad-bg);color:var(--bad);border-radius:12px;margin-top:10px;padding:12px 14px}.warnings strong{margin-bottom:4px;display:block}.warnings ul{margin:0;padding-left:18px}.nav{background:var(--surface);border-top:1px solid var(--border);padding-bottom:env(safe-area-inset-bottom);z-index:10;justify-content:center;display:flex;position:fixed;bottom:0;left:0;right:0}.nav-inner{grid-template-columns:repeat(4,1fr);width:100%;max-width:480px;display:grid}.nav button{color:var(--faint);background:0 0;border:none;flex-direction:column;align-items:center;gap:3px;min-height:62px;padding:10px 4px 12px;font-size:.75rem;display:flex}.nav button .ico{place-items:center;height:26px;display:grid}.nav button.on{color:var(--brand);font-weight:700}.nav .add-btn .ico{background:var(--brand);color:var(--brand-ink);border-radius:12px;width:44px;height:32px}.welcome{text-align:center;padding-top:48px}.welcome .logo{width:80px;height:80px;margin:0 auto 16px;display:block}.welcome h1{margin:0 0 8px;font-size:2rem}.welcome .tagline{color:var(--muted);max-width:30ch;margin:0 auto 28px;font-size:1.125rem}.welcome .features{text-align:left;gap:14px;margin:24px 0 28px;display:grid}.welcome .features>div{color:var(--muted);align-items:flex-start;gap:14px;display:flex}.welcome .features b{color:var(--text)}.feature-icon{background:var(--brand-soft);width:36px;height:36px;color:var(--brand);border-radius:10px;flex:none;place-items:center;display:grid}.stack{gap:10px;display:grid}.fine{color:var(--muted);text-align:center;margin-top:16px;font-size:.8125rem}.toast{left:50%;bottom:calc(84px + env(safe-area-inset-bottom));background:var(--text);color:var(--bg);z-index:20;text-align:center;border-radius:999px;max-width:calc(100% - 32px);padding:10px 18px;font-size:.875rem;font-weight:600;position:fixed;transform:translate(-50%)}.section-title{color:var(--muted);margin:22px 4px 8px;font-size:.8125rem;font-weight:700}.empty{text-align:center;color:var(--muted);padding:12px 0}.sr-only{clip:rect(0 0 0 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.topbar-actions{gap:8px;display:flex}.lock-screen{max-width:420px;min-height:100dvh;padding:48px 24px calc(24px + env(safe-area-inset-bottom));text-align:center;flex-direction:column;justify-content:center;align-items:center;margin:0 auto;display:flex}.lock-screen.overlay{background:var(--bg);z-index:50;max-width:none;position:fixed;inset:0}.lock-logo{width:56px;height:56px;margin-bottom:20px}.pinpad{flex-direction:column;align-items:center;width:100%;max-width:320px;display:flex}.pinpad h1{margin:0 0 4px;font-size:1.375rem;font-weight:750}.pin-sub{color:var(--muted);margin:0}.pin-dots{gap:18px;margin:28px 0 8px;display:flex}.pin-dots span{border:2px solid var(--muted);border-radius:50%;width:14px;height:14px;transition:background .1s,border-color .1s}.pin-dots span.on{background:var(--brand);border-color:var(--brand)}.pin-dots.shake{animation:.35s shake}@keyframes shake{20%,60%{transform:translate(-8px)}40%,80%{transform:translate(8px)}}@media (prefers-reduced-motion:reduce){.pin-dots.shake{animation:none}}.pin-error{min-height:2.9em;color:var(--bad);margin:0 0 8px;font-size:.875rem}.keys{grid-template-columns:repeat(3,1fr);gap:14px 22px;width:100%;display:grid}.keys button{aspect-ratio:1;background:var(--surface);max-height:76px;box-shadow:var(--shadow);border:none;border-radius:50%;justify-self:center;place-items:center;width:100%;max-width:76px;font-size:1.625rem;font-weight:550;display:grid}.keys button:active:not(:disabled){background:var(--brand-soft)}.keys button:disabled{opacity:.4}.keys .key-back,.keys .key-cancel{box-shadow:none;color:var(--muted);background:0 0}.keys .key-cancel{aspect-ratio:auto;border-radius:12px;height:100%;font-size:.9375rem;font-weight:600}.key-extra{display:grid}.forgot{margin-top:20px}@media (prefers-color-scheme:dark){.keys button:not(.key-back):not(.key-cancel){border:1px solid var(--border)}}
