:root{--bg: #f5f5f2;--surface: #ffffff;--line: #eaeae6;--line-soft: #f0f0ec;--text: #1e1e1e;--muted: #6a6a66;--muted-2: #55554f;--accent: #c7bff6;--accent-soft: #ece9fd;--accent-deep: #4a3db5;--pos: #23643f;--pos-bg: #dcefe3;--neg: #a93850;--neg-bg: #f8d3da;--radius-lg: 22px;--radius: 18px;--radius-sm: 12px;--font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;color-scheme:light}*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}html,body{margin:0;background:var(--bg);color:var(--text);font-family:var(--font);font-variant-numeric:tabular-nums}body{min-height:100dvh;overscroll-behavior-y:none}button,input,select,textarea{font:inherit;color:inherit}button{cursor:pointer}h1,h2,h3,p{margin:0}a{color:var(--accent-deep)}:focus-visible{outline:2px solid var(--accent-deep);outline-offset:2px}.app{max-width:480px;margin:0 auto;min-height:100dvh;position:relative}.screen{padding:calc(18px + env(safe-area-inset-top)) 16px calc(112px + env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:14px}.screen.modal{padding-bottom:calc(24px + env(safe-area-inset-bottom))}.top{display:flex;align-items:center;gap:12px;min-height:48px}.top .titles{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.cap{font-size:13px;font-weight:600;color:var(--muted)}.title-xl{font-size:28px;font-weight:800;letter-spacing:-.02em;line-height:1.15}.title-l{font-size:20px;font-weight:800;display:flex;align-items:center;gap:8px}.title-m{font-size:18px;font-weight:800}.month-nav{display:flex;align-items:center;gap:2px}.icon-btn{width:44px;height:44px;border:0;border-radius:22px;background:var(--surface);display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}.icon-btn.ghost{background:transparent}.icon-btn.sm{width:36px;height:36px}.card{background:var(--surface);border-radius:var(--radius-lg);padding:16px;display:flex;flex-direction:column;gap:10px}.card.tight{gap:0;padding-bottom:6px}.card-head{display:flex;justify-content:space-between;align-items:center;gap:8px;min-height:28px}.card-head h2{font-size:15px;font-weight:700}.pill{font-size:11px;font-weight:700;color:var(--accent-deep);background:var(--accent-soft);padding:3px 8px;border-radius:8px;white-space:nowrap}.chip-pos{font-size:12px;font-weight:700;color:var(--pos);background:var(--pos-bg);padding:4px 9px;border-radius:10px;white-space:nowrap}.chip-neg{font-size:12px;font-weight:700;color:var(--neg);background:var(--neg-bg);padding:4px 9px;border-radius:10px;white-space:nowrap}.row{display:flex;align-items:center;gap:12px;padding:10px 0;width:100%;background:none;border:0;text-align:left}.row+.row{border-top:1px solid var(--line-soft)}.row.tap{cursor:pointer}.row .body{flex:1;min-width:0}.t-main{display:block;font-size:15px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.t-sub{display:block;font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.amt{font-size:15px;font-weight:700;white-space:nowrap}.amt.pos{color:var(--pos)}.amt.muted{color:var(--muted)}.group-label{font-size:12px;font-weight:700;color:var(--muted);margin:10px 0 0}.tile{width:40px;height:40px;border-radius:12px;display:flex;align-items:center;justify-content:center;flex-shrink:0;font-weight:800}.tile.sm{width:34px;height:34px;border-radius:11px}.tile.lg{width:38px;height:38px}.big-amount{font-size:40px;font-weight:800;letter-spacing:-.03em;line-height:1.1}.mid-amount{font-size:22px;font-weight:800}.note{font-size:12px;color:var(--muted)}.stats3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;background:var(--surface);border-radius:var(--radius);padding:14px 16px}.stat{display:flex;flex-direction:column;gap:3px;min-width:0}.stat .lbl{display:flex;align-items:center;gap:6px;font-size:12px;font-weight:600;color:var(--muted)}.stat .val{font-size:16px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dot{width:8px;height:8px;border-radius:4px;flex-shrink:0}.bar-track{height:6px;border-radius:3px;background:var(--line-soft)}.bar-fill{height:6px;border-radius:3px}.filters{display:flex;gap:6px}.fbtn{flex:1 1 auto;min-width:0;height:42px;padding:7px 8px 0;border:1px solid var(--line);border-radius:12px;background:var(--surface);font-size:12px;font-weight:600;display:flex;flex-direction:column;justify-content:space-between;white-space:nowrap;overflow:hidden}.fbtn .bar{height:3px;border-radius:2px;margin-bottom:6px}.fbtn[aria-pressed=true]{background:var(--text);color:#fff;border-color:var(--text);font-weight:700}.btn{height:52px;border:0;border-radius:16px;background:var(--text);color:#fff;font-size:16px;font-weight:800;padding:0 18px;display:inline-flex;align-items:center;justify-content:center;gap:8px}.btn.soft{background:var(--surface);color:var(--text);font-size:14px;font-weight:700;height:48px}.btn.accent{background:var(--accent);color:var(--text)}.btn.danger{background:var(--neg-bg);color:var(--neg);font-size:14px;height:48px}.btn.block{width:100%}.btn:disabled{opacity:.45;cursor:default}.link-btn{border:0;background:none;color:var(--accent-deep);font-weight:700;font-size:13px;padding:10px 0}.nav-row{display:flex;align-items:center;gap:12px;min-height:60px;padding:10px 14px;border:0;border-radius:var(--radius);background:var(--surface);text-align:left;width:100%}.nav-row .body{flex:1;min-width:0}.seg{display:grid;grid-auto-columns:minmax(0,1fr);grid-auto-flow:column;gap:4px;padding:4px;background:#ebebe7;border-radius:14px}.seg button{height:38px;border:0;border-radius:11px;background:transparent;font-size:14px;font-weight:600;color:var(--muted-2)}.seg button[aria-pressed=true]{background:var(--surface);color:var(--text);font-weight:700;box-shadow:0 1px 3px #00000014}.choices{display:flex;gap:6px;flex-wrap:wrap}.choices.scroll{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;margin:0 -16px;padding:0 16px}.choices.scroll::-webkit-scrollbar{display:none}.choice{flex-shrink:0;height:40px;padding:0 14px;border:0;border-radius:12px;background:var(--surface);font-size:13px;font-weight:600;display:inline-flex;align-items:center;gap:7px;white-space:nowrap}.choice[aria-pressed=true]{background:var(--text);color:#fff;font-weight:700}.cat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.cat{height:72px;border:2px solid transparent;border-radius:16px;background:var(--surface);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;padding:4px}.cat[aria-pressed=true]{border-color:var(--text)}.cat .ic{width:32px;height:32px;border-radius:16px;display:flex;align-items:center;justify-content:center}.cat .nm{font-size:11px;font-weight:600;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.amount-display{display:flex;flex-direction:column;align-items:center;gap:2px;padding:4px 0}.amount-display .v{font-size:46px;font-weight:800;letter-spacing:-.03em;line-height:1.05}.keypad{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.keypad button{height:48px;border:0;border-radius:14px;background:var(--surface);font-size:21px;font-weight:600;display:flex;align-items:center;justify-content:center}.keypad button.flat{background:transparent}.keypad button:active{background:var(--line)}.field{display:flex;flex-direction:column;gap:6px}.field>span{font-size:12px;font-weight:700;color:var(--muted)}.input{height:48px;border:1px solid var(--line);border-radius:14px;background:var(--surface);padding:0 14px;font-size:15px;width:100%}.input.big{font-size:22px;font-weight:700;height:56px}select.input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236a6a66' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 14px center;padding-right:40px}.inline-field{display:flex;align-items:center;gap:10px;height:48px;padding:0 14px;background:var(--surface);border-radius:14px}.inline-field input{flex:1;min-width:0;border:0;background:transparent;font-size:14px;outline:none;height:100%}.swatches{display:flex;gap:8px;flex-wrap:wrap}.swatch{width:36px;height:36px;border-radius:18px;border:2px solid transparent;display:inline-flex;align-items:center;justify-content:center}.swatch[aria-pressed=true]{border-color:var(--text)}.icon-pick{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:6px}.icon-pick button{height:44px;border:2px solid transparent;border-radius:12px;background:var(--surface);display:flex;align-items:center;justify-content:center}.icon-pick button[aria-pressed=true]{border-color:var(--text)}.switch{width:48px;height:28px;border-radius:14px;border:0;background:var(--line);position:relative;flex-shrink:0;padding:0}.switch:after{content:"";position:absolute;top:3px;left:3px;width:22px;height:22px;border-radius:11px;background:#fff;box-shadow:0 1px 3px #0003;transition:left .15s ease}.switch[aria-checked=true]{background:var(--text)}.switch[aria-checked=true]:after{left:23px}.bottom-nav{position:fixed;left:50%;transform:translate(-50%);bottom:0;width:100%;max-width:480px;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));align-items:center;background:var(--surface);border-top:1px solid var(--line);padding:8px 8px calc(12px + env(safe-area-inset-bottom));z-index:10}.nav-item{border:0;background:none;display:flex;flex-direction:column;align-items:center;gap:3px;min-height:48px;color:var(--muted);font-size:11px;font-weight:600}.nav-item .ico{width:44px;height:28px;border-radius:14px;display:flex;align-items:center;justify-content:center}.nav-item[aria-current=page]{color:var(--text);font-weight:700}.nav-item[aria-current=page] .ico{background:var(--accent-soft)}.fab-wrap{display:flex;justify-content:center}.fab{width:58px;height:58px;border:0;border-radius:20px;background:var(--accent);display:flex;align-items:center;justify-content:center;margin-top:-26px;box-shadow:0 6px 16px #4a3db538}.sheet{position:fixed;top:0;right:0;bottom:0;left:0;z-index:30;background:var(--bg);overflow-y:auto}.sheet .inner{max-width:480px;margin:0 auto}.empty{text-align:center;padding:24px 12px;color:var(--muted);font-size:14px}.legend{display:flex;gap:14px;font-size:12px;color:var(--muted);flex-wrap:wrap}.legend span{display:inline-flex;align-items:center;gap:6px}.leg-toggle{display:inline-flex;align-items:center;gap:6px;min-height:32px;padding:0 10px;border:1px solid var(--line);border-radius:16px;background:var(--surface);font-size:12px;font-weight:600;color:var(--muted)}.leg-toggle[aria-pressed=false]{opacity:.5;text-decoration:line-through;border-style:dashed}.leg-toggle[aria-pressed=false] span{opacity:.4}.axis{display:flex;justify-content:space-between;font-size:11px;font-weight:600;color:var(--muted)}.sync-dot{width:8px;height:8px;border-radius:4px;display:inline-block}.toast{position:fixed;left:50%;transform:translate(-50%);bottom:calc(96px + env(safe-area-inset-bottom));background:var(--text);color:#fff;padding:10px 16px;border-radius:14px;font-size:14px;font-weight:600;z-index:40;max-width:90vw}.demo-banner{background:var(--accent-soft);color:var(--accent-deep);font-size:12px;font-weight:700;text-align:center;padding:6px 12px}@media (min-width: 520px){.app{box-shadow:0 0 0 1px var(--line)}}.login{min-height:100dvh;display:flex;align-items:center;justify-content:center;padding:calc(24px + env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left))}.login-card{width:100%;max-width:400px;background:var(--surface);border-radius:26px;padding:28px 22px;display:flex;flex-direction:column;gap:16px}.login-logo{width:60px;height:60px;border-radius:20px;background:var(--accent);display:inline-flex;align-items:center;justify-content:center}.login-msg{font-size:14px;font-weight:600;padding:10px 14px;border-radius:14px;line-height:1.4}.login-msg.err{background:var(--neg-bg);color:var(--neg)}.login-msg.info{background:var(--accent-soft);color:var(--accent-deep)}.space-bar{position:sticky;top:0;z-index:9;width:100%;display:flex;align-items:center;gap:8px;border:0;border-bottom:1px solid var(--line);background:var(--surface);padding:calc(8px + env(safe-area-inset-top)) 16px 8px;text-align:left;min-height:44px}.space-bar .space-name{flex:1;min-width:0;font-size:13px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.space-bar .space-switch{font-size:12px;font-weight:700;color:var(--accent-deep)}.has-space-bar .screen{padding-top:14px}.notice{margin:10px 16px 0;display:flex;align-items:center;gap:10px;justify-content:space-between;background:var(--accent-soft);color:var(--accent-deep);font-size:13px;font-weight:600;padding:10px 14px;border-radius:14px}.pin-wrap{min-height:100dvh;display:flex;flex-direction:column;justify-content:space-between;gap:20px;padding:calc(40px + env(safe-area-inset-top)) max(24px,env(safe-area-inset-right)) calc(20px + env(safe-area-inset-bottom)) max(24px,env(safe-area-inset-left));max-width:420px;margin:0 auto}.screen.modal .pin-wrap{min-height:calc(100dvh - 40px);padding-top:12px}.pin-head{display:flex;flex-direction:column;align-items:center;gap:12px}.pin-dots{display:flex;gap:18px;margin-top:18px}.pin-dot{width:16px;height:16px;border-radius:8px;border:2px solid var(--text);background:transparent;transition:background .1s ease}.pin-dot.on{background:var(--text)}.pin-dots.shake{animation:pin-shake .35s ease}@keyframes pin-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:40px;font-size:13px;font-weight:600;color:var(--neg);text-align:center;max-width:300px}.pin-keypad{gap:10px}.pin-keypad button{height:64px;font-size:26px;border-radius:20px}.pin-footer{display:flex;justify-content:center}
