:root{color-scheme:light dark;--bg: #f4f3ef;--surface: #ffffff;--surface-2: #eceae4;--ink: #151513;--ink-2: #55534d;--ink-3: #85827a;--line: #e2dfd7;--accent: #12372a;--accent-ink: #ffffff;--accent-soft: #dcebe3;--pos: #0b6b3a;--warn: #8a5200;--warn-soft: #fbefd6;--danger: #b3261e;--danger-soft: #fbe4e1;--series-1: #2a78d6;--series-2: #eb6834;--radius: 14px;--tabbar-h: 58px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,sans-serif;font-size:16px;line-height:1.4;-webkit-text-size-adjust:100%}@media(prefers-color-scheme:dark){:root{--bg: #141413;--surface: #1e1e1c;--surface-2: #2a2a27;--ink: #f0efec;--ink-2: #c3c2b7;--ink-3: #908e85;--line: #34332f;--accent: #8fd3b0;--accent-ink: #0d2019;--accent-soft: #1d3329;--pos: #6fcf97;--warn: #e0a84a;--warn-soft: #3a2e17;--danger: #f28b82;--danger-soft: #3d1f1c;--series-1: #3987e5;--series-2: #d95926}}*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}html,body,#root{height:100%}body{margin:0;background:var(--bg);color:var(--ink);overscroll-behavior-y:none}h1,h2,h3,p{margin:0}button,input,select,textarea{font:inherit;color:inherit}.app{display:flex;flex-direction:column;height:100%;max-width:640px;margin:0 auto}.topbar{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:calc(env(safe-area-inset-top) + 10px) 16px 8px}.topbar h1{font-size:1.5rem;font-weight:700;letter-spacing:-.02em}.main{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:4px 16px calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 84px);display:flex;flex-direction:column;gap:14px}.tabbar{position:fixed;left:0;right:0;bottom:0;display:flex;justify-content:center;background:color-mix(in srgb,var(--surface) 92%,transparent);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);border-top:1px solid var(--line);padding-bottom:env(safe-area-inset-bottom);z-index:10}.tabbar-inner{display:flex;width:100%;max-width:640px}.tab{flex:1;min-width:0;height:var(--tabbar-h);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;background:none;border:0;color:var(--ink-3);font-size:.66rem;font-weight:600;position:relative}.tab[aria-current=page]{color:var(--accent)}.tab svg{width:22px;height:22px}.tab .dot{position:absolute;top:7px;left:calc(50% + 6px);min-width:17px;height:17px;padding:0 5px;border-radius:9px;background:var(--danger);color:#fff;font-size:.65rem;line-height:17px;text-align:center}.fab{position:fixed;right:max(16px,calc(50% - 304px));bottom:calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 16px);height:52px;padding:0 20px;border-radius:26px;border:0;background:var(--accent);color:var(--accent-ink);font-weight:700;box-shadow:0 6px 18px #00000038;z-index:9}.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:14px;min-width:0}.card>h2,.section-title{font-size:.78rem;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:var(--ink-3);margin-bottom:10px}.stack{display:flex;flex-direction:column;gap:10px;min-width:0}.row{display:flex;align-items:center;gap:10px;min-width:0}.row.wrap{flex-wrap:wrap}.spread{justify-content:space-between}.grow{flex:1;min-width:0}.muted{color:var(--ink-2);font-size:.86rem}.small{font-size:.8rem}.num{font-variant-numeric:tabular-nums;white-space:nowrap}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;padding:0 16px;border-radius:12px;border:1px solid var(--line);background:var(--surface);font-weight:600;cursor:pointer}.btn:disabled{opacity:.5}.btn.primary{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}.btn.danger{color:var(--danger)}.btn.block{width:100%}.btn.sm{min-height:36px;padding:0 12px;font-size:.86rem;border-radius:10px}.btn.ghost{background:none;border-color:transparent;color:var(--accent);padding:0 8px}.field{display:flex;flex-direction:column;gap:5px;min-width:0}.field>span{font-size:.8rem;font-weight:600;color:var(--ink-2)}.input,select.input,textarea.input{width:100%;min-height:44px;padding:10px 12px;border-radius:12px;border:1px solid var(--line);background:var(--surface);font-size:16px;appearance:none;-webkit-appearance:none}select.input{padding-right:34px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%2385827a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center;background-size:12px 8px;text-overflow:ellipsis}textarea.input{min-height:120px;resize:vertical}.input:focus-visible,.btn:focus-visible,.tab:focus-visible{outline:2px solid var(--series-1);outline-offset:2px}.seg{display:flex;background:var(--surface-2);border-radius:12px;padding:3px;gap:3px}.seg button{flex:1;min-height:38px;border:0;border-radius:9px;background:none;font-weight:600;color:var(--ink-2)}.seg button[aria-pressed=true]{background:var(--surface);color:var(--ink);box-shadow:0 1px 3px #0000001f}.chips{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;margin:0 -16px;padding:0 16px}.chip{flex:none;min-height:34px;padding:0 13px;border-radius:17px;border:1px solid var(--line);background:var(--surface);font-size:.86rem;font-weight:600;color:var(--ink-2)}.chip[aria-pressed=true]{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}.tag{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;border-radius:8px;font-size:.72rem;font-weight:700;background:var(--surface-2);color:var(--ink-2);white-space:nowrap}.tag.warn{background:var(--warn-soft);color:var(--warn)}.tag.danger{background:var(--danger-soft);color:var(--danger)}.tag.ok{background:var(--accent-soft);color:var(--pos)}.banner{display:flex;gap:10px;align-items:flex-start;padding:12px 14px;border-radius:var(--radius);background:var(--warn-soft);color:var(--warn);font-size:.88rem}.banner.danger{background:var(--danger-soft);color:var(--danger)}.banner.ok{background:var(--accent-soft);color:var(--pos)}.banner .btn{flex:none}.toggle{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px}.toggle input{appearance:none;-webkit-appearance:none;flex:none;width:50px;height:30px;border-radius:15px;background:var(--surface-2);border:1px solid var(--line);position:relative;transition:background .15s;margin:0}.toggle input:after{content:"";position:absolute;top:2px;left:2px;width:24px;height:24px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #0000004d;transition:transform .15s}.toggle input:checked{background:var(--pos);border-color:var(--pos)}.toggle input:checked:after{transform:translate(20px)}.list{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden}.list-item{display:flex;align-items:center;gap:10px;width:100%;padding:11px 14px;background:none;border:0;border-bottom:1px solid var(--line);text-align:left;min-height:56px}.list-item:last-child{border-bottom:0}.list-item .title{font-weight:600}.date-head{font-size:.78rem;font-weight:700;color:var(--ink-3);padding:4px 2px 0}.amount{font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}.amount.in{color:var(--pos)}.sync-dot{width:8px;height:8px;border-radius:50%;flex:none;background:var(--warn)}.sync-dot.conflict{background:var(--danger)}.empty{text-align:center;color:var(--ink-2);padding:28px 16px}.empty strong{display:block;color:var(--ink);margin-bottom:4px}.month-switch{display:flex;align-items:center;justify-content:space-between}.month-switch strong{font-size:1.05rem}.icon-btn{width:44px;height:44px;border-radius:12px;border:1px solid var(--line);background:var(--surface);font-size:1.2rem}.tiles{display:grid;grid-template-columns:1fr 1fr;gap:10px}.tile{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:12px 14px;min-width:0}.tile.wide{grid-column:1 / -1}.tile .label{font-size:.78rem;font-weight:600;color:var(--ink-2)}.tile .value{font-size:clamp(1rem,5.2vw,1.25rem);font-weight:700;letter-spacing:-.01em;font-variant-numeric:tabular-nums;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tile.wide .value{font-size:1.7rem}.cat-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 10px;align-items:baseline;padding:7px 0}.cat-row .track{grid-column:1 / -1;height:8px}.cat-row .bar{height:8px;min-width:4px;border-radius:0 4px 4px 0;background:var(--series-1)}.legend{display:flex;gap:14px;font-size:.8rem;color:var(--ink-2)}.legend i{display:inline-block;width:10px;height:10px;border-radius:3px;margin-right:5px}.trend svg{display:block;width:100%;height:auto;touch-action:manipulation}.trend text{fill:var(--ink-3);font-size:11px;font-variant-numeric:tabular-nums}.trend .sel text{fill:var(--ink);font-weight:700}.sheet-backdrop{position:fixed;inset:0;background:#00000073;z-index:20;display:flex;align-items:flex-end;justify-content:center}.sheet{width:100%;max-width:640px;max-height:94%;display:flex;flex-direction:column;background:var(--bg);border-radius:20px 20px 0 0;animation:rise .2s ease-out}@keyframes rise{0%{transform:translateY(24px);opacity:0}}@media(prefers-reduced-motion:reduce){.sheet{animation:none}}.sheet-head{display:flex;align-items:center;justify-content:space-between;padding:14px 16px 8px}.sheet-head h2{font-size:1.15rem}.sheet-body{overflow-y:auto;-webkit-overflow-scrolling:touch;padding:6px 16px calc(env(safe-area-inset-bottom) + 20px);display:flex;flex-direction:column;gap:12px}.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:10px}@media(max-width:359px){.grid-2{grid-template-columns:1fr}}.diff{width:100%;border-collapse:collapse;font-size:.84rem;table-layout:fixed}.diff th,.diff td{text-align:left;vertical-align:top;padding:7px 6px;border-bottom:1px solid var(--line);overflow-wrap:anywhere}.diff th{font-size:.74rem;color:var(--ink-3);text-transform:uppercase;letter-spacing:.04em}.pre{white-space:pre-wrap;overflow-wrap:anywhere;background:var(--surface-2);border-radius:10px;padding:10px;font-size:.86rem}ol.steps{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:6px;font-size:.9rem;color:var(--ink-2)}details>summary{font-weight:600;min-height:44px;display:flex;align-items:center;justify-content:space-between;cursor:pointer;list-style:none}details>summary::-webkit-details-marker{display:none}details>summary:after{content:"›";color:var(--ink-3);font-size:1.3rem;transition:transform .15s}details[open]>summary:after{transform:rotate(90deg)}.kv{display:grid;grid-template-columns:auto minmax(0,1fr);gap:4px 12px;font-size:.88rem}.kv dt{color:var(--ink-2)}.kv dd{margin:0;text-align:right;overflow-wrap:anywhere}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
