:root{--bg: #f6f5f1;--surface: #ffffff;--surface-2: #f0efea;--ink: #1d211f;--ink-2: #535a56;--line: #e2e0d9;--accent: #1f5e4a;--accent-ink: #ffffff;--accent-soft: #e3efe9;--warn: #8a5a00;--warn-soft: #fbf1dc;--danger: #a3271f;--danger-soft: #fbe7e5;--ok: #24663f;--ok-soft: #e4f2e8;--income: #2f6f9f;--expense: #c0703a;--radius: 14px;--tap: 44px;--font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;color-scheme:light}*{box-sizing:border-box}html{-webkit-text-size-adjust:100%}body{margin:0;background:var(--bg);color:var(--ink);font-family:var(--font);font-size:16px;line-height:1.5;-webkit-font-smoothing:antialiased}body.no-scroll{overflow:hidden}h1,h2,h3{line-height:1.25;margin:0}h1{font-size:1.6rem;font-weight:650;letter-spacing:-.01em}h2{font-size:1.1rem;font-weight:620;margin-bottom:8px}a{color:var(--accent)}a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid #5c9c86;outline-offset:2px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);border:0}.muted{color:var(--ink-2)}.small{font-size:.875rem}.center{text-align:center}.neg{color:var(--danger)}.pos{color:var(--ok)}.pre{white-space:pre-wrap;word-break:break-word}.block{width:100%}.shell{min-height:100vh;padding-bottom:calc(84px + env(safe-area-inset-bottom))}.screen{max-width:760px;margin:0 auto;padding:20px 16px 32px;display:flex;flex-direction:column;gap:18px}.screen-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.section-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px}.back{display:inline-flex;align-items:center;min-height:var(--tap);text-decoration:none;font-weight:550}.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:18px;display:flex;flex-direction:column;gap:12px}.eyebrow{margin:0;font-size:.8rem;text-transform:uppercase;letter-spacing:.06em;color:var(--ink-2);font-weight:600}.row-2{display:grid;grid-template-columns:1fr 1fr;gap:12px}.row-between{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap}.actions{display:flex;gap:8px;flex-wrap:wrap}@media(max-width:400px){.row-2{grid-template-columns:1fr}}.btn{min-height:var(--tap);padding:10px 18px;border-radius:10px;border:1px solid transparent;font:inherit;font-weight:600;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:8px}.btn-primary{background:var(--accent);color:var(--accent-ink)}.btn-primary:hover:not(:disabled){background:#184d3c}.btn-secondary{background:var(--surface);color:var(--ink);border-color:#c9c6bc}.btn-secondary:hover:not(:disabled){background:var(--surface-2)}.btn-ghost{background:transparent;color:var(--accent);padding:10px}.btn-danger{background:var(--surface);color:var(--danger);border-color:#e3b5b0}.btn:disabled{opacity:.5;cursor:not-allowed}.field{display:flex;flex-direction:column;gap:6px;min-width:0}.field>label,.field>.label{font-weight:600;font-size:.92rem}.hint{font-size:.85rem;color:var(--ink-2)}.error-text{font-size:.875rem;color:var(--danger);font-weight:550}.error-text:before{content:"\26a0  "}input,select,textarea{font:inherit;color:var(--ink);background:var(--surface);border:1px solid #c9c6bc;border-radius:10px;min-height:var(--tap);padding:9px 12px;width:100%;min-width:0}textarea{resize:vertical}input[type=checkbox]{width:22px;height:22px;min-height:0;accent-color:var(--accent);flex:none}.has-error input,.has-error select,input[aria-invalid=true]{border-color:var(--danger)}.check{display:flex;align-items:center;gap:10px;min-height:var(--tap);cursor:pointer}.static-value{min-height:var(--tap);display:flex;align-items:center;font-weight:600}.segmented{display:inline-flex;background:var(--surface-2);border-radius:12px;padding:4px;gap:4px;width:100%}.segmented button{flex:1;white-space:nowrap;padding:0 8px;min-height:40px;border:0;border-radius:9px;background:transparent;font:inherit;font-weight:600;color:var(--ink-2);cursor:pointer}.segmented button.on{background:var(--surface);color:var(--ink);box-shadow:0 1px 2px #0000001f}.segmented button.on:before{content:"\2713";font-weight:700;margin-right:4px;font-size:.85em}.inline-form{display:flex;gap:8px;align-items:stretch;flex-wrap:wrap}.inline-form input{flex:1 1 140px}.copy-row{display:flex;gap:8px;margin-top:8px}.chips{display:flex;flex-wrap:wrap;gap:8px}.chip{min-height:40px;padding:6px 14px;border-radius:999px;border:1px dashed #b7b3a7;background:var(--surface);font:inherit;font-weight:600;color:var(--ink-2);cursor:pointer}.chip.on{border-style:solid;border-color:var(--accent);background:var(--accent-soft);color:var(--accent)}.notice{display:flex;gap:10px;padding:12px 14px;border-radius:12px;background:var(--accent-soft);font-size:.93rem}.notice-icon{flex:none;width:22px;height:22px;border-radius:50%;display:grid;place-items:center;font-weight:800;font-size:.8rem;background:var(--accent);color:#fff}.notice-warn{background:var(--warn-soft)}.notice-warn .notice-icon{background:var(--warn)}.notice-danger{background:var(--danger-soft)}.notice-danger .notice-icon{background:var(--danger)}.notice-ok{background:var(--ok-soft)}.notice-ok .notice-icon{background:var(--ok)}.notice .inline-form{margin-top:8px}.badge{display:inline-block;font-size:.75rem;font-weight:650;padding:2px 8px;border-radius:999px;background:var(--surface-2);color:var(--ink-2);margin-left:6px;vertical-align:middle}.badge-danger{background:var(--danger-soft);color:var(--danger)}.badge-ok{background:var(--ok-soft);color:var(--ok)}.center-state{display:flex;flex-direction:column;align-items:center;gap:10px;padding:40px 16px;text-align:center;color:var(--ink-2)}.error-state strong{color:var(--danger)}.empty{padding:22px 16px;text-align:center;color:var(--ink-2);background:var(--surface);border:1px dashed var(--line);border-radius:var(--radius);display:flex;flex-direction:column;gap:6px}.empty strong{color:var(--ink)}.spinner{width:16px;height:16px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;display:inline-block;animation:spin .8s linear infinite}.spinner.lg{width:28px;height:28px;border-width:3px;color:var(--accent)}@keyframes spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.spinner{animation-duration:2s}}.offline-banner,.warn-banner{position:sticky;top:0;z-index:20;padding:10px 16px;text-align:center;font-weight:600;font-size:.9rem}.offline-banner{background:#2b2f2d;color:#fff}.warn-banner{background:var(--warn-soft);color:var(--warn)}.toast{position:fixed;left:50%;transform:translate(-50%);top:calc(12px + env(safe-area-inset-top));z-index:60;background:#232826;color:#fff;padding:12px 18px;border-radius:12px;font-weight:600;max-width:calc(100% - 32px);box-shadow:0 6px 20px #0003}.month-picker{display:flex;align-items:center;justify-content:space-between;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:4px}.month-picker .btn-ghost{font-size:1.5rem;min-width:var(--tap)}.summary-main{display:flex;flex-direction:column;gap:2px}.summary-main .label{font-weight:600;color:var(--ink-2)}.amount{font-variant-numeric:tabular-nums}.amount.big{font-size:2.4rem;font-weight:700;letter-spacing:-.02em;line-height:1.1}.amount.neg{color:var(--danger)}.summary-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:0}.summary-grid dt{color:var(--ink-2);font-size:.875rem}.summary-grid dd{margin:0;font-size:1.2rem;font-weight:650;font-variant-numeric:tabular-nums}.budget-list{display:flex;flex-direction:column;gap:10px}.budget-row{display:flex;flex-direction:column;gap:10px;text-decoration:none;color:inherit;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:16px}.budget-row:hover{border-color:#c9c6bc}.budget-row-head{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;align-items:baseline}.budget-figures{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:0}.budget-figures dt{font-size:.8rem;color:var(--ink-2)}.budget-figures dd{margin:0;font-weight:650;font-variant-numeric:tabular-nums}.usage{display:flex;flex-direction:column;gap:4px}.bar{height:10px;background:var(--surface-2);border-radius:999px;overflow:hidden}.bar span{display:block;height:100%;background:var(--accent);border-radius:999px}.bar-near span{background:#b7791f}.bar-over span{background:repeating-linear-gradient(45deg,var(--danger),var(--danger) 6px,#c4473e 6px,#c4473e 12px)}.usage-label{font-size:.85rem;font-weight:600;color:var(--ink-2)}.usage-label.near{color:var(--warn)}.usage-label.over{color:var(--danger)}.usage-label.at{color:var(--warn)}.card>h2{margin-bottom:0}.cat-bars{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}.cat-bars-head{display:flex;justify-content:space-between;font-size:.93rem}.cat-bars-track{height:8px;background:var(--surface-2);border-radius:999px;overflow:hidden}.cat-bars-track span{display:block;height:100%;background:var(--expense)}.six-months{margin:0;display:flex;flex-direction:column;gap:10px}.six-months svg{width:100%;height:auto;max-height:220px}.six-months .axis{stroke:var(--line)}.six-months .tick{font-size:10px;fill:var(--ink-2)}.bar-income{fill:var(--income)}.bar-expense{fill:var(--expense)}.legend{display:flex;gap:16px;font-size:.85rem;color:var(--ink-2)}.key{display:inline-block;width:12px;height:12px;border-radius:3px;margin-right:4px;vertical-align:-1px}.key-income{background:var(--income)}.key-expense{background:var(--expense)}.totals-table{width:100%;border-collapse:collapse;font-size:.9rem;font-variant-numeric:tabular-nums}.totals-table th,.totals-table td{text-align:right;padding:8px 4px;border-bottom:1px solid var(--line)}.totals-table th:first-child,.totals-table td:first-child{text-align:left}.totals-table thead th{color:var(--ink-2);font-weight:600;font-size:.8rem}.totals-table tbody th{font-weight:550}.row-actions{display:flex;gap:2px;justify-content:flex-end;flex-wrap:wrap}.filters{display:flex;flex-direction:column;gap:10px;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:14px}.filters .btn-ghost{align-self:flex-start}.tx-list{list-style:none;margin:0;padding:0;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden}.tx-list li+li{border-top:1px solid var(--line)}.tx-item{width:100%;display:flex;align-items:center;gap:12px;padding:12px 14px;min-height:60px;background:none;border:0;font:inherit;color:inherit;text-align:left;cursor:pointer}.tx-item:hover{background:var(--surface-2)}.tx-type{flex:none;width:34px;height:34px;border-radius:50%;display:grid;place-items:center;font-weight:700;background:var(--surface-2)}.tx-income{background:#e2edf6;color:var(--income)}.tx-refund{background:var(--ok-soft);color:var(--ok)}.tx-main{flex:1;min-width:0;display:flex;flex-direction:column}.tx-title{font-weight:600}.tx-sub{font-size:.85rem;color:var(--ink-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tx-amt{display:flex;flex-direction:column;align-items:flex-end;font-weight:650;font-variant-numeric:tabular-nums;flex:none}.tx-orig{font-size:.8rem;font-weight:500;color:var(--ink-2)}.detail{margin:0;display:flex;flex-direction:column}.detail>div{display:flex;flex-direction:column;padding:10px 0;border-bottom:1px solid var(--line)}.detail.compact>div{flex-direction:row;justify-content:space-between;gap:12px;padding:8px 0}.detail.compact dd{text-align:right}.detail dt{font-size:.85rem;color:var(--ink-2)}.detail dd{margin:0;font-weight:550}.big-figure{font-size:1.6rem;font-weight:700;margin:0}.sheet-backdrop{position:fixed;inset:0;z-index:50;background:#14181673;display:flex;align-items:flex-end;justify-content:center}.sheet{background:var(--surface);width:100%;max-width:560px;max-height:94vh;max-height:94dvh;border-radius:18px 18px 0 0;display:flex;flex-direction:column;box-shadow:0 -10px 40px #0000002e}@media(min-width:700px){.sheet-backdrop{align-items:center}.sheet{border-radius:18px}}.sheet-head{display:flex;align-items:center;justify-content:space-between;padding:14px 16px 8px 20px}.sheet-close{width:var(--tap);height:var(--tap);border:0;background:var(--surface-2);border-radius:50%;font-size:1rem;cursor:pointer}.sheet-body{padding:8px 20px 16px;overflow-y:auto;-webkit-overflow-scrolling:touch}.sheet-body form,.sheet-body{display:flex;flex-direction:column;gap:14px}.sheet-foot{display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap;padding:12px 20px calc(12px + env(safe-area-inset-bottom));border-top:1px solid var(--line)}.sheet-foot .btn{flex:1 1 auto}.offline-note{flex-basis:100%;margin:0;color:var(--danger);font-weight:600;font-size:.9rem}.row-amount{display:grid;grid-template-columns:1.4fr 1fr;gap:12px;align-items:start}.input-amount{font-size:1.5rem;font-weight:650;font-variant-numeric:tabular-nums}.conversion{display:flex;flex-direction:column;gap:6px;margin-top:-4px}.usd-preview{margin:0}.suggestion,.remember{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;background:var(--accent-soft);padding:8px 12px;border-radius:12px}.remember{background:var(--surface-2);flex-direction:column;align-items:stretch}.confirm-body p{margin:0}.settings-list,.plain-list,.member-list,.cat-list{list-style:none;margin:0;padding:0}.settings-list{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden}.settings-list li+li{border-top:1px solid var(--line)}.settings-list a{display:grid;grid-template-columns:1fr auto;padding:14px 16px;text-decoration:none;color:inherit;min-height:60px}.settings-list a span.small{grid-column:1}.settings-list .chev{grid-row:1 / span 2;grid-column:2;align-self:center;font-size:1.4rem;color:var(--ink-2)}.member-list li,.cat-list li{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:8px 0;border-bottom:1px solid var(--line);flex-wrap:wrap}.plain-list li{padding:6px 0}.defaults summary{cursor:pointer;font-weight:600;min-height:var(--tap);display:flex;align-items:center}.defaults ul{margin:0;padding-left:20px;color:var(--ink-2);font-size:.93rem}.auth{max-width:440px;margin:0 auto;padding:32px 16px;display:flex;flex-direction:column;gap:16px}.auth form{display:flex;flex-direction:column;gap:14px}.brand{display:flex;align-items:center;gap:12px}.brand img{border-radius:14px}.auth-links{display:flex;flex-wrap:wrap;justify-content:center}.bottom-nav{position:fixed;bottom:0;left:0;right:0;z-index:30;display:grid;grid-template-columns:repeat(5,1fr);align-items:end;background:#fffffff7;border-top:1px solid var(--line);padding:6px 4px calc(6px + env(safe-area-inset-bottom));-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}.bottom-nav a{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:52px;font-size:.72rem;font-weight:600;color:var(--ink-2);text-decoration:none;gap:2px}.bottom-nav a svg{display:block}.nowrap{white-space:nowrap}.bottom-nav a[aria-current=page]{color:var(--accent)}.bottom-nav a[aria-current=page]:after{content:"";width:18px;height:3px;border-radius:2px;background:var(--accent)}.add-btn{justify-self:center;width:64px;height:64px;margin-top:-26px;border-radius:50%;border:4px solid var(--bg);background:var(--accent);color:#fff;font:inherit;cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;box-shadow:0 6px 16px #1f5e4a59}.add-btn span:first-child{font-size:1.9rem;line-height:1;font-weight:400}.add-label{font-size:.65rem;font-weight:700}@media(min-width:900px){.bottom-nav{left:50%;transform:translate(-50%);max-width:640px;border:1px solid var(--line);border-bottom:0;border-radius:18px 18px 0 0}}.alerts{background:var(--warn-soft);border:1px solid #ecd5a3;border-radius:var(--radius);padding:14px 16px;display:flex;flex-direction:column;gap:8px}.alerts ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}.alert-item{display:flex;gap:12px;background:var(--surface);border-radius:12px;padding:12px}.alert-icon{flex:none;width:28px;height:28px;border-radius:50%;display:grid;place-items:center;font-weight:800;font-size:.85rem;background:var(--warn);color:#fff}.alert-over .alert-icon{background:var(--danger)}.alert-body{display:flex;flex-direction:column;gap:2px;min-width:0}.alert-actions{display:flex;align-items:center;gap:12px;margin-top:4px}.alert-actions .btn-ghost{padding-left:4px}
