:root{--brand: #0fa37f;--brand-strong: #0b7f63;--brand-soft: rgba(15, 163, 127, .12);--on-brand: #ffffff;--prize: #c07a06;--prize-soft: rgba(245, 165, 36, .16);--danger: #d32f34;--danger-soft: rgba(211, 47, 52, .12);--bg: #f6f7f5;--surface: #ffffff;--surface-2: #eff1ee;--text: #14181a;--muted: #6b7472;--border: #e2e5e1;--track: #e7eae6;--header-bg: #101413;--header-text: #f2f5f3;--tabbar-bg: rgba(255, 255, 255, .92);--shadow: 0 1px 2px rgba(16, 20, 19, .05), 0 10px 26px rgba(16, 20, 19, .06);--radius: 20px;color-scheme:light}[data-theme=dark]{--brand: #17c79a;--brand-strong: #17c79a;--brand-soft: rgba(23, 199, 154, .16);--on-brand: #06231b;--prize: #ffb940;--prize-soft: rgba(255, 185, 64, .16);--danger: #ff6b6f;--danger-soft: rgba(255, 107, 111, .16);--bg: #0b0e0d;--surface: #14181a;--surface-2: #1c2220;--text: #f1f4f2;--muted: #98a3a0;--border: #262c2a;--track: #232927;--header-bg: #0b0e0d;--header-text: #f1f4f2;--tabbar-bg: rgba(20, 24, 26, .92);--shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px rgba(0, 0, 0, .35);color-scheme:dark}*,*:before,*:after{box-sizing:border-box}html,body,#root{min-height:100%}body{margin:0;background:var(--bg);color:var(--text);font-family:-apple-system,BlinkMacSystemFont,SF Pro Text,Segoe UI,Roboto,Helvetica,Arial,sans-serif;font-size:17px;line-height:1.4;-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:transparent;overscroll-behavior-y:none}button,input,textarea{font:inherit;color:inherit}button{cursor:pointer;touch-action:manipulation}h1,h2,h3,p,dl,dd,ul{margin:0}.app{max-width:520px;margin:0 auto;min-height:100dvh;display:flex;flex-direction:column}.app-header{position:sticky;top:0;z-index:20;display:flex;align-items:center;gap:12px;padding:calc(env(safe-area-inset-top) + 12px) 16px 12px;background:var(--header-bg);color:var(--header-text);border-bottom:3px solid var(--brand)}.brand-mark{width:36px;height:36px;flex:none;border-radius:11px;background:var(--brand);color:#06231b;display:grid;place-items:center;font-size:20px;font-weight:800}.brand-text{display:flex;flex-direction:column;line-height:1.15;min-width:0}.brand-name{font-size:15px;font-weight:700;letter-spacing:.02em}.brand-month{font-size:12px;opacity:.68;text-transform:capitalize}.theme-toggle{margin-left:auto;width:44px;height:44px;border-radius:13px;border:1px solid rgba(255,255,255,.16);background:#ffffff0f;font-size:18px;display:grid;place-items:center}.app-main{flex:1;display:flex;flex-direction:column;gap:14px;padding:16px 16px calc(96px + env(safe-area-inset-bottom))}.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:16px;box-shadow:var(--shadow);animation:rise .22s ease-out both}.card-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}.card-title{font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}.card-footnote{margin-top:12px;font-size:12.5px;color:var(--muted)}.center{text-align:center}.pill{min-width:26px;height:26px;padding:0 8px;border-radius:13px;background:var(--surface-2);color:var(--muted);font-size:13px;font-weight:700;display:grid;place-items:center}.today-label{font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}.today-amount{font-size:clamp(2.5rem,13vw,3.3rem);font-weight:800;letter-spacing:-.035em;line-height:1.05;margin:6px 0 12px;font-variant-numeric:tabular-nums}.is-ok{color:var(--brand-strong)}.is-over{color:var(--danger)}.is-prize{color:var(--prize)}.today-meta{display:flex;justify-content:space-between;gap:12px;margin-top:12px;font-size:14px;color:var(--muted)}.today-meta strong{display:block;color:var(--text);font-size:17px;font-variant-numeric:tabular-nums}.today-footnote{margin-top:10px;font-size:12.5px;color:var(--muted)}.base-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.base-item{display:flex;flex-direction:column;gap:4px;min-width:0}.base-value{font-size:17px;font-variant-numeric:tabular-nums;letter-spacing:-.01em}.base-value.is-over{color:var(--danger)}.left-month{display:flex;flex-direction:column;gap:3px}.left-month-label{font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}.left-month-amount{font-size:clamp(1.75rem,8.5vw,2.15rem);font-weight:800;letter-spacing:-.03em;line-height:1.1;color:var(--brand-strong);font-variant-numeric:tabular-nums}.left-month-amount.is-over{color:var(--danger)}.left-month-hint{font-size:12.5px;color:var(--muted)}.progress{height:10px;border-radius:6px;background:var(--track);overflow:hidden}.progress-fill{height:100%;border-radius:6px;transition:width .35s ease-out,background .2s}.progress-fill.is-ok{background:var(--brand)}.progress-fill.is-over{background:var(--danger)}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.stat{background:var(--surface);border:1px solid var(--border);border-radius:16px;padding:12px 10px;display:flex;flex-direction:column;gap:4px;min-width:0}.stat-label{font-size:10.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}.stat-value{font-size:17px;font-variant-numeric:tabular-nums;letter-spacing:-.01em}.stat-hint{font-size:11px;color:var(--muted);line-height:1.25}.stat.is-ok .stat-value{color:var(--brand-strong)}.stat.is-prize .stat-value{color:var(--prize)}.motivation{font-size:14.5px;color:var(--muted);padding:0 4px}.quick-entry{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow);padding:12px;display:flex;flex-direction:column;gap:10px;animation:rise .22s ease-out both}.quick-row{display:flex;gap:10px;align-items:stretch}.quick-input{flex:1;min-height:84px;resize:none;border-radius:14px;border:1.5px solid var(--border);background:var(--surface-2);padding:12px;font-size:17px;line-height:1.35}.quick-input::placeholder{color:var(--muted);font-size:15px}.quick-input:focus{outline:none;border-color:var(--brand);background:var(--surface)}.mic{width:76px;flex:none;border-radius:14px;border:1.5px solid var(--border);background:var(--surface-2);font-size:28px;display:grid;place-items:center}.mic.is-listening{border-color:var(--danger);background:var(--danger-soft);animation:pulse 1.2s ease-in-out infinite}.btn{min-height:52px;padding:0 18px;border-radius:14px;border:1.5px solid transparent;font-size:17px;font-weight:700;display:inline-flex;align-items:center;justify-content:center;gap:8px;transition:transform .12s ease-out,opacity .15s}.btn:active{transform:scale(.985)}.btn-block{width:100%}.btn-primary{background:var(--brand-strong);color:var(--on-brand)}.btn-primary:disabled{opacity:.45}.btn-ghost{background:transparent;border-color:var(--border);color:var(--text)}.btn-danger{background:var(--danger-soft);border-color:var(--danger);color:var(--danger)}.icon-btn{width:42px;height:42px;border:0;border-radius:12px;background:transparent;font-size:17px;display:grid;place-items:center}.icon-btn:active{background:var(--surface-2)}.notice{font-size:14px;padding:10px 12px;border-radius:12px;background:var(--danger-soft);color:var(--danger);font-weight:600}.notice-soft{background:var(--surface-2);color:var(--muted);font-weight:500}.notice-ok{background:var(--brand-soft);color:var(--brand-strong)}.notice-warn{background:var(--prize-soft);color:var(--prize)}.help-trigger{align-self:stretch;margin-top:4px;padding:11px 12px;border:1px solid var(--border);border-radius:12px;background:var(--surface-2);color:var(--brand-strong);font-size:13.5px;font-weight:600;text-align:center}.help-trigger:active{transform:translateY(1px)}.help-intro{font-size:14.5px;color:var(--muted);line-height:1.5}.help-list{list-style:none;padding:0;display:flex;flex-direction:column;gap:8px}.help-list li{border:1px solid var(--border);border-radius:14px;padding:10px 12px;background:var(--surface-2)}.help-cat{display:flex;align-items:center;gap:7px;font-size:14px;font-weight:700;margin-bottom:4px}.help-words{font-size:13.5px;color:var(--muted);line-height:1.55}.help-note{font-size:13px;color:var(--muted)}.money-field{display:flex;align-items:center;gap:8px;background:var(--surface-2);border:1.5px solid var(--border);border-radius:14px;padding:0 14px;min-height:58px;margin-bottom:12px}.money-field:focus-within{border-color:var(--brand);background:var(--surface)}.money-input{flex:1;min-width:0;border:0;background:transparent;padding:12px 0;font-size:24px;font-weight:700;font-variant-numeric:tabular-nums}.money-input:focus{outline:none}.money-suffix{font-size:20px;font-weight:700;color:var(--muted)}.chips{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.chip{display:flex;align-items:center;gap:8px;min-height:48px;padding:0 12px;border-radius:14px;border:1.5px solid var(--border);background:var(--surface);font-size:14px;font-weight:600;text-align:left;min-width:0}.chip.is-on{border-color:var(--chip);box-shadow:inset 0 0 0 1px var(--chip);background:var(--surface-2)}.chip-icon{font-size:18px}.chip-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.expenses{list-style:none;padding:0}.expense{display:flex;align-items:center;gap:10px;padding:10px 0;border-bottom:1px solid var(--border)}.expense:last-child{border-bottom:0;padding-bottom:0}.expense-icon{width:42px;height:42px;flex:none;border-radius:13px;border:1px solid;display:grid;place-items:center;font-size:19px}.expense-main{flex:1;min-width:0;display:flex;flex-direction:column}.expense-category{font-size:15px}.expense-time{font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}.expense-amount{font-size:16px;font-weight:700;font-variant-numeric:tabular-nums}.expense-tools{display:flex;gap:2px;flex:none}.expense.is-editing{flex-direction:column;align-items:stretch;gap:10px;padding:12px 0}.expense-actions{display:flex;gap:8px}.expense-actions .btn{flex:1}.sheet-layer{position:fixed;inset:0;z-index:40;display:flex;align-items:flex-end;justify-content:center}.sheet-backdrop{position:absolute;inset:0;background:#080a0a80}.sheet{position:relative;width:100%;max-width:520px;max-height:88dvh;overflow-y:auto;background:var(--surface);border-radius:26px 26px 0 0;padding:10px 16px calc(18px + env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:12px;animation:sheet-up .22s ease-out both}.sheet-grip{width:42px;height:4px;border-radius:2px;background:var(--border);margin:4px auto 6px}.sheet-preview{font-size:21px;letter-spacing:-.01em}.sheet-question{font-size:17px;color:var(--muted);font-weight:600}.sheet-actions{display:flex;flex-direction:column;gap:8px;margin-top:4px}.sheet-actions-row{display:flex;gap:8px}.sheet-actions-row .btn{flex:1}.totals{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.total{background:var(--surface);border:1px solid var(--border);border-radius:18px;padding:14px;display:flex;flex-direction:column;gap:4px;box-shadow:var(--shadow)}.total-value{font-size:21px;font-weight:800;font-variant-numeric:tabular-nums;letter-spacing:-.02em}.total-extra{grid-column:1 / -1;background:var(--brand-soft);border-color:var(--brand)}.total-extra .total-value{font-size:28px;color:var(--brand-strong)}.pie-wrap{display:flex;flex-direction:column;align-items:center;gap:14px}.pie{width:180px;height:180px}.pie-total{font-size:19px;font-weight:800;fill:var(--text);font-variant-numeric:tabular-nums}.pie-caption{font-size:10px;fill:var(--muted);letter-spacing:.08em;text-transform:uppercase}.legend{list-style:none;padding:0;width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 14px}.legend li{display:flex;align-items:center;gap:7px;font-size:13.5px;min-width:0}.legend-dot{width:10px;height:10px;border-radius:50%;flex:none}.legend-label{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.legend-value{font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}.legend-value small{color:var(--muted);font-weight:500;margin-left:4px}.bars-wrap{display:flex;flex-direction:column;gap:8px}.bars{width:100%;height:150px;display:block}.bar-track{fill:var(--track);opacity:.6}.bar.is-ok{fill:var(--brand)}.bar.is-over{fill:var(--danger)}.bars-limit{stroke:var(--muted);stroke-width:1.4;opacity:.9}.bar-today-ring{fill:none;stroke:var(--text);stroke-width:1.2;opacity:.5}.bars-axis{display:flex;justify-content:space-between;gap:8px;font-size:11.5px;color:var(--muted)}.bars-legend{list-style:none;padding:0;display:flex;gap:16px;font-size:12.5px;color:var(--muted)}.bars-legend li{display:flex;align-items:center;gap:6px}.history{list-style:none;padding:0;display:flex;flex-direction:column;gap:10px}.history-item{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;border-radius:16px;background:var(--surface-2)}.history-main{display:flex;flex-direction:column;min-width:0}.history-range{font-size:12px;color:var(--muted)}.history-value{display:flex;flex-direction:column;align-items:flex-end;font-variant-numeric:tabular-nums}.history-extra{font-size:12.5px;color:var(--brand-strong);font-weight:700}.facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:14px 0 0}.facts-wide{grid-template-columns:repeat(2,minmax(0,1fr));margin:0 0 14px}.facts dt{font-size:10.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}.facts dd{margin:2px 0 0;font-size:16px;font-weight:700;font-variant-numeric:tabular-nums}.empty{font-size:14.5px;color:var(--muted);line-height:1.45}.empty-title{font-size:19px;font-weight:700;margin-bottom:8px}.card .empty+.btn,.card .empty-title+.empty+.btn{margin-top:14px}.tabbar{position:fixed;left:0;right:0;bottom:0;z-index:30;display:flex;max-width:520px;margin:0 auto;background:var(--tabbar-bg);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);border-top:1px solid var(--border);padding-bottom:env(safe-area-inset-bottom)}.tab{flex:1;min-height:58px;border:0;background:transparent;color:var(--muted);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:6px 0}.tab-icon{font-size:19px;line-height:1}.tab-svg{width:24px;height:24px}.tab-label{font-size:11.5px;font-weight:700;letter-spacing:.02em}.tab.is-active{color:var(--brand-strong)}.tab.is-active .tab-icon{transform:translateY(-1px)}@keyframes rise{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}@keyframes sheet-up{0%{transform:translateY(18px);opacity:.6}to{transform:none;opacity:1}}@keyframes pulse{0%,to{transform:scale(1)}50%{transform:scale(1.04)}}@media (prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}.text-input{width:100%;min-height:54px;padding:12px 14px;border-radius:14px;border:1.5px solid var(--border);background:var(--surface-2);color:var(--text);font-size:17px;font-weight:600;font-family:inherit;margin-bottom:10px}.text-input:focus{outline:none;border-color:var(--brand);background:var(--surface)}.text-input-day{max-width:116px;text-align:center;font-variant-numeric:tabular-nums}.chips-pay{grid-template-columns:repeat(2,minmax(0,1fr));margin-bottom:12px}.chip-pay-item.is-on{border-color:var(--brand);box-shadow:inset 0 0 0 1px var(--brand);color:var(--brand-strong);background:var(--brand-soft)}.today-amount.is-fixed{color:var(--text)}.fixed-form-row{display:flex;align-items:flex-start;gap:10px}.fixed-form-row .money-field{flex:1;min-width:0}.fixed-list{list-style:none;padding:0;margin:0}.fixed-row{display:flex;align-items:center;gap:10px;padding:12px 0;border-bottom:1px solid var(--border)}.fixed-row:last-child{border-bottom:0}.fixed-row.is-editing{display:block;padding:14px 0}.fixed-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.fixed-name{font-size:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.fixed-meta{font-size:12.5px;color:var(--muted)}.fixed-amount{font-size:17px;font-weight:700;font-variant-numeric:tabular-nums}.payment-list{list-style:none;padding:0;margin:0}.payment-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid var(--border)}.payment-row:last-child{border-bottom:0}.payment-name{font-size:15px;display:flex;align-items:center;gap:8px;min-width:0}.payment-amount{font-size:17px;font-variant-numeric:tabular-nums}.base-grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}.base-item-wide{grid-column:1 / -1;padding-top:10px;border-top:1px solid var(--border)}.cards-form{margin-top:10px}.card-footnote.no-margin{margin-top:0}
