:root{font-family:'DM Sans','Noto Sans TC',-apple-system,BlinkMacSystemFont,sans-serif;color:#22251f;background:#f7f5f0;font-synthesis:none;font-optical-sizing:auto;--ink:#22251f;--muted:#85877f;--line:#eceae4;--green:#426b52;--red:#bd6457;--paper:#fffefa;--safe-bottom:env(safe-area-inset-bottom,0px)}*{box-sizing:border-box}body{margin:0;min-height:100vh;background:#f7f5f0}.app-shell{width:min(100%,520px);min-height:100vh;margin:0 auto;padding:calc(18px + env(safe-area-inset-top,0px)) 22px calc(28px + var(--safe-bottom));position:relative}.topbar{display:flex;align-items:center;justify-content:space-between;margin:8px 0 22px}.eyebrow{margin:0 0 4px;color:#92948c;font-size:10px;letter-spacing:.17em;font-weight:700}.topbar h1{font-size:24px;letter-spacing:-.04em;margin:0;font-weight:700}.offline-dot{display:inline-block;width:7px;height:7px;margin:0 0 3px 7px;border-radius:50%;background:#78a483;box-shadow:0 0 0 3px #78a48320}.icon-button,.month-arrow,.close-button{border:0;background:transparent;color:var(--ink);cursor:pointer}.icon-button{width:40px;height:40px;border:1px solid #e9e6de;border-radius:50%;font-size:22px;line-height:1;background:var(--paper)}.summary-card{background:#e6ecdf;border-radius:22px;padding:16px 20px 20px;margin-bottom:27px}.month-row{display:flex;align-items:center;justify-content:center;gap:11px;position:relative}.month-arrow{font-family:inherit;font-size:24px;color:#526655;padding:2px 8px}.month-label{border:0;background:none;font:600 14px -apple-system,BlinkMacSystemFont,'Noto Sans TC',sans-serif;font-size:14px;color:#405444}.today-button{position:absolute;right:0;border:1px solid #ccd6c7;border-radius:20px;background:transparent;color:#536655;padding:5px 9px;font:500 11px -apple-system,BlinkMacSystemFont,'Noto Sans TC',sans-serif}.balance-label{text-align:center;font-size:12px;color:#6c786d;margin:23px 0 3px}.balance{text-align:center;font-size:38px;font-weight:600;letter-spacing:-.05em;color:#283b2e}.summary-pair{display:flex;justify-content:center;gap:48px;margin-top:20px}.summary-pair div{display:grid;gap:4px;text-align:center}.summary-pair span{font-size:11px;color:#7b8276}.summary-pair strong{font-size:14px;font-weight:600}.income{color:#527b5a}.expense{color:#ad655a}.toolbar{display:flex;justify-content:space-between;align-items:center;margin:0 1px 9px}.toolbar h2{font-size:16px;margin:0;font-weight:600}.toolbar select{border:0;background:transparent;color:#72746e;font:500 12px -apple-system,BlinkMacSystemFont,'Noto Sans TC',sans-serif;outline:none}.transaction-list{display:flex;flex-direction:column}.day-heading{display:flex;justify-content:space-between;align-items:center;padding:13px 2px 7px;color:#96988f;font-size:11px}.day-heading span:last-child{color:#aaa99f}.transaction{display:grid;grid-template-columns:42px 1fr auto 30px;align-items:center;gap:11px;padding:12px 0;border-bottom:1px solid var(--line)}.category-icon{width:40px;height:40px;border-radius:13px;background:#eeeee8;display:grid;place-items:center;font-size:17px}.transaction-title{font-size:13px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:210px}.transaction-sub{font-size:10px;color:#999b93;margin-top:4px}.transaction-amount{font-size:13px;font-weight:600;white-space:nowrap}.transaction-amount.negative{color:#41443e}.transaction-amount.positive{color:#568060}.delete-entry{border:0;background:transparent;color:#b4b4ac;font-size:18px;padding:4px;cursor:pointer}.empty-state{text-align:center;padding:62px 10px 90px;color:#82847b}.empty-icon{font-size:31px;color:#a3b09d;margin-bottom:10px}.empty-state strong{font-size:14px;color:#585c54}.empty-state p{font-size:12px;margin-top:7px}.add-button{position:sticky;bottom:calc(20px + var(--safe-bottom));display:flex;align-items:center;justify-content:center;gap:8px;width:100%;height:54px;margin:18px 0 10px;border:0;border-radius:17px;background:#3f634b;color:#fff;font:600 14px -apple-system,BlinkMacSystemFont,'Noto Sans TC',sans-serif;box-shadow:0 8px 22px #36543b24;cursor:pointer}.add-button span{font-size:19px;font-weight:400}footer{display:flex;justify-content:space-between;color:#a0a198;font-size:10px;padding:5px 2px}footer button{border:0;background:none;color:#768674;font:500 10px -apple-system,BlinkMacSystemFont,'Noto Sans TC',sans-serif;cursor:pointer}.backup-notice{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:12px 13px;background:#f0ead9;border-radius:14px;margin:-8px 0 15px}.backup-notice strong{font-size:12px}.backup-notice p{margin:3px 0 0;color:#89836f;font-size:10px}.small-button{background:#fffefa;border:0;border-radius:10px;padding:8px 10px;color:#5d674f;font-size:11px;font-weight:600;white-space:nowrap;cursor:pointer}dialog{width:min(calc(100% - 28px),430px);max-height:90vh;border:0;border-radius:24px;padding:24px;background:var(--paper);color:var(--ink);box-shadow:0 20px 70px #1d241e30}dialog::backdrop{background:#1e251f66;backdrop-filter:blur(3px)}.dialog-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:19px}.dialog-heading h2{font-size:20px;margin:0;letter-spacing:-.03em}.close-button{font-size:27px;color:#92948c;padding:0 0 4px 12px}.segmented{display:flex;padding:4px;border-radius:12px;background:#f1f0eb;margin-bottom:19px}.segmented button{flex:1;border:0;border-radius:9px;padding:10px;background:transparent;color:#85877f;font:600 13px -apple-system,BlinkMacSystemFont,'Noto Sans TC',sans-serif;cursor:pointer}.segmented button.selected{background:white;color:#425f49;box-shadow:0 1px 4px #22251f13}.field-label,.field-grid label{display:block;font-size:11px;font-weight:600;color:#73766e;margin-bottom:8px}.muted{font-weight:400;color:#aaa}.amount-input{display:flex;align-items:center;border-bottom:1px solid #deded6;margin-bottom:19px;padding:0 1px 9px}.amount-input span{font-size:18px;color:#a1a197;margin-right:8px}.amount-input input{width:100%;border:0;outline:0;background:transparent;font:600 32px -apple-system,BlinkMacSystemFont,'Noto Sans TC',sans-serif;color:#262923}.amount-input input::placeholder{color:#d6d6ce}.field-grid{display:grid;grid-template-columns:1fr 1fr;gap:13px;margin:0 0 17px}.field-grid select,.field-grid input,.text-input{width:100%;height:43px;border:1px solid #e8e7df;border-radius:11px;padding:0 11px;background:#fffefa;color:#353831;font:500 12px -apple-system,BlinkMacSystemFont,'Noto Sans TC',sans-serif;outline-color:#9caf9f}.field-grid label{margin:0}.field-grid select,.field-grid input{display:block;margin-top:7px}.text-input{margin:0 0 19px}.primary-button,.secondary-button,.danger-button{display:flex;align-items:center;justify-content:center;width:100%;height:47px;border:0;border-radius:13px;font:600 13px -apple-system,BlinkMacSystemFont,'Noto Sans TC',sans-serif;cursor:pointer;text-decoration:none}.primary-button{background:#42674d;color:white}.secondary-button{background:#f1f0eb;color:#5e625a;margin-top:9px}.danger-button{background:#bd6457;color:white}.dialog-copy{font-size:12px;line-height:1.65;color:#74766e;margin:-5px 0 17px}.backup-status{font-size:11px;color:#85877f;margin:0 0 16px}.fine-print{font-size:10px;line-height:1.55;color:#a0a198;margin:13px 3px 0}.import-label{position:relative;overflow:hidden}.import-label input{position:absolute;inset:0;opacity:0;width:100%;cursor:pointer}.confirm-actions{display:flex;gap:9px}.confirm-actions>*{margin:0}.toast{position:fixed;z-index:10;bottom:calc(95px + var(--safe-bottom));left:50%;transform:translate(-50%,15px);background:#2f3930;color:white;border-radius:12px;padding:11px 16px;font-size:12px;opacity:0;pointer-events:none;transition:.2s;white-space:nowrap}.toast.show{opacity:1;transform:translate(-50%,0)}[hidden]{display:none!important}
@media(min-width:600px){body{padding:25px 0}.app-shell{min-height:calc(100vh - 50px);border-radius:28px;background:#fbfaf6;box-shadow:0 12px 55px #24291c12}.add-button{bottom:22px}}
.view-switch{display:flex;padding:4px;border-radius:13px;background:#edede7;margin:-10px 0 17px}.view-switch button{flex:1;border:0;border-radius:10px;padding:9px;background:transparent;color:#85877f;font:600 12px -apple-system,BlinkMacSystemFont,'Noto Sans TC',sans-serif;cursor:pointer}.view-switch button.active{background:#fffefa;color:#3f634b;box-shadow:0 1px 4px #22251f12}.calendar-card{background:var(--paper);border:1px solid #eeece5;border-radius:19px;padding:14px 10px 11px;margin:0 0 22px}.calendar-weekdays,.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px}.calendar-weekdays{margin-bottom:6px}.calendar-weekdays span{text-align:center;color:#999b93;font-size:10px;padding:4px 0}.calendar-day{min-width:0;height:59px;padding:5px 1px 4px;border:1px solid transparent;border-radius:10px;background:transparent;color:#383b35;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:4px;cursor:pointer;font-family:inherit}.calendar-day:not(:disabled):active{background:#eef2e9}.calendar-day.outside{visibility:hidden}.calendar-day.selected{background:#e8eee4;border-color:#cbd8c7}.calendar-day.today .day-number{width:22px;height:22px;display:grid;place-items:center;border-radius:50%;background:#42674d;color:white}.day-number{font-size:11px;line-height:22px;height:22px}.day-spend{max-width:100%;padding:2px 3px;border-radius:5px;background:#f5e9e3;color:#a6574c;font-size:8px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.day-spend.empty{height:14px;background:transparent}.calendar-legend{display:flex;align-items:center;justify-content:space-between;margin:8px 3px 0;color:#a0a198;font-size:9px}.calendar-legend i{display:inline-block;width:7px;height:7px;border-radius:50%;background:#d98b79;margin-right:4px}.clear-day{border:0;background:transparent;color:#6c806b;font:500 10px -apple-system,BlinkMacSystemFont,'Noto Sans TC',sans-serif;padding:4px;cursor:pointer}
.calendar-month-total{display:flex;align-items:center;justify-content:space-between;border-top:1px solid #eeece5;margin:10px 3px 0;padding:12px 1px 1px;color:#777a71;font-size:11px}.calendar-month-total strong{color:#a6574c;font-size:15px;font-weight:700}.date-field{grid-template-columns:1fr}
.calendar-day-results{background:var(--paper);border:1px solid #eeece5;border-radius:18px;padding:15px 14px 5px;margin:-8px 0 18px}.calendar-day-title{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:3px}.calendar-day-title span{font-size:10px;color:#989a92}.calendar-day-title h2{font-size:15px;margin:3px 0 8px;font-weight:600}.calendar-day-title strong{font-size:11px;color:#a6574c;white-space:nowrap}.calendar-day-results .transaction{grid-template-columns:40px 1fr auto 26px;gap:9px}.calendar-day-empty{color:#9b9d95;font-size:12px;text-align:center;padding:16px 0 20px;margin:0}
.report-view{display:grid;gap:13px}.report-intro{padding:1px 2px 2px}.report-intro>span{font-size:9px;letter-spacing:.16em;font-weight:700;color:#96988f}.report-intro h2{font-size:18px;margin:4px 0 1px}.report-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.report-summary article{display:grid;gap:8px;padding:13px 10px;border-radius:14px;background:var(--paper);border:1px solid #eeece5}.report-summary article span{font-size:10px;color:#8b8d85}.report-summary article strong{font-size:14px;letter-spacing:-.03em;white-space:nowrap}.income-value{color:#568060}.expense-value{color:#ad655a}.report-card{background:var(--paper);border:1px solid #eeece5;border-radius:17px;padding:15px 14px}.report-section-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.report-section-heading h3{font-size:13px;margin:0;font-weight:600}.report-section-heading p{font-size:10px;color:#a0a198;margin:4px 0 0}.report-section-heading>strong{font-size:12px;color:#a6574c}.daily-chart{height:103px;display:grid;grid-template-columns:repeat(31,minmax(0,1fr));align-items:end;gap:2px;padding:0 0 1px;border-bottom:1px solid #ebe9e2}.daily-bar-column{height:100%;min-width:0;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:4px}.daily-bar{width:min(100%,8px);min-height:2px;border-radius:4px 4px 1px 1px;background:#e6eadf}.daily-bar.has-value{background:#719178}.daily-bar-column span{height:10px;color:#a0a198;font-size:7px;line-height:10px}.category-report{display:grid;gap:13px}.category-report-row{display:grid;gap:7px}.category-report-label{display:flex;align-items:center;justify-content:space-between;font-size:11px;color:#5d6058}.category-report-label strong{font-size:11px;font-weight:600;color:#353831}.category-track{height:6px;background:#f0efe9;border-radius:8px;overflow:hidden}.category-fill{height:100%;background:#86a28a;border-radius:8px}.report-empty,.report-footnote{font-size:10px;color:#9c9e96}.report-empty{margin:3px 0}.report-footnote{text-align:center;margin:0 0 5px}
.report-period-controls{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px}.report-period-controls label{display:grid;gap:5px;color:#8b8d85;font-size:10px}.report-period-controls select{width:100%;height:39px;border:1px solid #e8e7df;border-radius:10px;background:var(--paper);color:#353831;padding:0 9px;font:500 12px -apple-system,BlinkMacSystemFont,'Noto Sans TC',sans-serif}.report-period-controls [hidden]{display:none}.daily-chart.yearly{grid-template-columns:repeat(12,minmax(0,1fr))}
.currency-fields{margin-bottom:14px}.currency-fields label{font-size:10px}.currency-fields label span{white-space:nowrap}.amount-preview{margin:-12px 1px 15px;text-align:right;color:#71836e;font-size:11px;font-weight:500}
.rate-actions{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:-8px 1px 15px}.rate-fetch-button{border:0;background:transparent;color:#4f7859;padding:3px 0;font:600 11px -apple-system,BlinkMacSystemFont,'Noto Sans TC',sans-serif;cursor:pointer}.rate-fetch-button:disabled{opacity:.55}.rate-actions span{font-size:9px;color:#8c9085;text-align:right}
.category-report-row{gap:0}.category-report-toggle{width:100%;display:grid;grid-template-columns:1fr auto auto 16px;align-items:center;gap:8px;border:0;padding:0;background:transparent;text-align:left;font:inherit;cursor:pointer}.category-report-toggle>span:first-child{font-size:11px;color:#5d6058}.category-report-toggle strong,.category-subreport-row strong{font-size:11px;font-weight:600;color:#353831;white-space:nowrap}.category-percent{min-width:39px;text-align:right;color:#8b8e85;font-size:10px;white-space:nowrap}.category-caret{font-size:14px;color:#9a9c94;transition:transform .18s}.category-report-row.expanded .category-caret{transform:rotate(180deg)}.category-report-row .category-track{margin-top:7px}.category-subreport{display:grid;gap:9px;padding:11px 4px 1px 11px}.category-subreport-row{display:grid;grid-template-columns:1fr auto auto;align-items:center;gap:8px;color:#888b82;font-size:10px}.category-subreport[hidden]{display:none}
:root{color-scheme:dark;--ink:#edf0e9;--muted:#a0a69b;--line:#30352e;--green:#8eae91;--red:#df8c7b;--paper:#20241f}
body{background:#121511;color:var(--ink)}.app-shell{background:#181b17}.topbar h1,.toolbar h2,.dialog-heading h2{color:#edf0e9}.eyebrow,.balance-label,.summary-pair span,.day-heading,.transaction-sub,.empty-state,.calendar-weekdays span,.calendar-legend,.report-footnote,.report-section-heading p,.report-period-controls label,.field-label,.field-grid label,.dialog-copy,.fine-print,.backup-status{color:#a1a69d}.icon-button{background:#232821;border-color:#343a32;color:#e6e9e2}.summary-card{background:#293b2d}.month-arrow,.month-label{color:#bbceb9}.today-button{border-color:#4c5e4d;color:#c1d1bd}.balance{color:#e0eadb}.summary-pair span{color:#b0bbae}.income{color:#a7c9a8}.expense{color:#e09a88}.toolbar select{color:#c0c4bb}.transaction{border-bottom-color:#30352e}.category-icon{background:#292e27}.transaction-title{color:#e3e6df}.transaction-amount.negative{color:#e1e4dc}.transaction-amount.positive{color:#a8cba9}.delete-entry{color:#858b80}.empty-icon{color:#819b82}.empty-state strong{color:#d3d8ce}.add-button,.primary-button{background:#4d7657;color:#fff}.add-button{box-shadow:0 8px 22px #0005}.backup-notice{background:#3a3424}.backup-notice strong{color:#e9e2ce}.backup-notice p{color:#c2b899}.small-button{background:#242820;color:#d9dfd1}footer{color:#8f9689}footer button,.clear-day{color:#a9c1a5}dialog{background:#20241f;color:#edf0e9}dialog::backdrop{background:#090c09bd}.close-button{color:#a3a99e}.segmented,.view-switch{background:#292e27}.segmented button,.view-switch button{color:#a7ada2}.segmented button.selected,.view-switch button.active{background:#3a4037;color:#e5eadf;box-shadow:0 1px 5px #0006}.amount-input{border-bottom-color:#4a5047}.amount-input span{color:#adb4a8}.amount-input input{color:#edf0e9}.amount-input input::placeholder{color:#747b70}.field-grid select,.field-grid input,.text-input,.report-period-controls select{background:#272c25;border-color:#3a4138;color:#e2e6dd}.field-grid select,.field-grid input,.text-input{outline-color:#739277}.secondary-button{background:#30362e;color:#d8ded3}.danger-button{background:#a95148;color:white}.calendar-card,.calendar-day-results,.report-card,.report-summary article{background:#20241f;border-color:#30362e}.calendar-day{color:#e0e4db}.calendar-day.selected{background:#344136;border-color:#596e59}.calendar-day.today .day-number{background:#628468;color:#fff}.day-spend{background:#4a3029;color:#f0aa98}.calendar-month-total{border-top-color:#333930;color:#b5bbaf}.calendar-month-total strong,.calendar-day-title strong,.report-section-heading>strong{color:#e39a87}.calendar-day-title h2,.report-intro h2,.report-summary article strong{color:#e7ebe2}.calendar-day-empty,.report-empty{color:#a6ada1}.report-intro>span{color:#9da498}.report-summary article span{color:#a7ada3}.report-summary .income-value{color:#a7c9a8}.report-summary .expense-value{color:#e09a88}.report-section-heading h3{color:#e0e4db}.daily-chart{border-bottom-color:#383e36}.daily-bar{background:#353c33}.daily-bar.has-value{background:#83a588}.daily-bar-column span{color:#a1a89c}.category-report-toggle>span:first-child,.category-report-toggle strong,.category-subreport-row strong{color:#e0e4dc}.category-percent,.category-subreport-row{color:#a5ab9f}.category-caret{color:#aab2a5}.category-track{background:#353b33}.category-fill{background:#83a588}.rate-fetch-button{color:#afd0ad}.rate-actions span,.amount-preview{color:#a8b99e}.toast{background:#dce8d8;color:#20251f}
