:root{font-family:"DM Sans","Noto Sans JP",sans-serif;color:#27332f;background:#f6f7f3;--green:#286b56;--ink:#27332f;--muted:#84908b;--line:#e8ebe5}
*{box-sizing:border-box}body{margin:0;min-width:320px;background:radial-gradient(ellipse at 8% 0%,#edf4eb,transparent 34rem),#f6f7f3}button,input,select,textarea{font:inherit}button{cursor:pointer}.app-shell{max-width:1120px;margin:auto;padding:0 36px}
.topbar{height:78px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #e9ede7}.brand{display:flex;align-items:center;gap:11px;color:var(--ink);font-size:15px;font-weight:700;text-decoration:none}.brand-mark{display:grid;place-items:center;background:var(--green);color:white;border-radius:11px;width:33px;height:33px}.privacy{font-size:11px;color:#75847b;display:flex;align-items:center;gap:8px}.privacy span{font-size:8px;color:#5f9b76}
.welcome{display:flex;justify-content:space-between;align-items:flex-end;padding:42px 0 27px}.eyebrow{font-size:9px;letter-spacing:.18em;color:#829189;font-weight:700;margin:0 0 9px}.welcome h1{font-size:27px;line-height:1.5;margin:0;font-weight:600}.welcome h1 span{color:var(--green)}.intro{font-size:12px;color:#7d8983;margin:8px 0 0}.button{border:0;border-radius:9px;min-height:40px;padding:0 17px;font-size:12px;font-weight:600;white-space:nowrap}.button-primary{color:white;background:var(--green);box-shadow:0 4px 12px #286b5621}.button-primary:hover{background:#1c5342}.button-primary span{font-size:16px;margin-right:3px}.button-secondary{background:#eff5ef;color:var(--green);border:1px solid #dbe9dd}.button-quiet{background:transparent;color:#7a8780}.button-quiet:hover{background:#f0f2ee}
.summary-grid{display:grid;grid-template-columns:1fr 1.25fr;gap:16px}.summary-card{background:white;border:1px solid #edf0eb;border-radius:14px;padding:20px 22px;box-shadow:0 5px 20px #2c42350a;min-height:143px}.card-heading{display:flex;align-items:center;justify-content:space-between;font-size:11px;font-weight:600;color:#626f68}.icon-bubble{width:26px;height:26px;border-radius:8px;display:grid;place-items:center;background:#edf5ed;color:#568367}.total-value{font-size:32px;font-weight:600;letter-spacing:-.035em;margin:8px 0 0;color:#25332d}.card-foot,.muted{font-size:10px;color:#95a099}.category-summary{display:flex;gap:24px;margin-top:20px;align-items:center;flex-wrap:wrap}.category-item{min-width:92px}.category-item-top{display:flex;gap:7px;align-items:center;font-size:10px;color:#79857f}.category-dot{width:7px;height:7px;border-radius:50%;background:#78a887}.category-item:nth-child(2) .category-dot{background:#e6ae69}.category-item:nth-child(3) .category-dot{background:#8299bc}.category-item:nth-child(4) .category-dot{background:#c287a7}.category-item strong{display:block;color:#34413b;font-size:14px;margin:4px 0 0 14px;font-weight:600}.empty-inline{font-size:11px;color:#9aa49e;margin:0}
.list-section{margin-top:40px}.list-heading-row{display:flex;align-items:flex-end;justify-content:space-between}.list-heading-row h2{font-size:18px;margin:0;font-weight:600}.add-inline{display:none}.toolbar{display:flex;align-items:center;gap:12px;margin:20px 0 12px}.search-box{display:flex;align-items:center;gap:9px;width:min(330px,50%);height:38px;border:1px solid #e6eae3;background:white;border-radius:8px;padding:0 11px;color:#829087}.search-box span{font-size:19px}.search-box input{border:0;outline:0;width:100%;font-size:11px;background:transparent}.search-box input::placeholder{color:#a2aaa4}.month-filter{display:flex;align-items:center;gap:8px;color:#7e8983;font-size:10px;margin-left:auto}.month-filter input{height:36px;border:1px solid #e6eae3;border-radius:8px;background:white;padding:0 9px;font-size:11px}.toolbar>.button{font-size:10px;padding:0 10px}.table-wrap{background:white;border:1px solid #e9ede7;border-radius:12px;overflow:hidden;min-height:210px}table{width:100%;border-collapse:collapse;text-align:left}thead{background:#fafbf8}th{height:39px;font-size:9px;color:#929c96;font-weight:600}th,td{padding:0 18px}td{height:56px;border-top:1px solid #eff1ed;font-size:11px;color:#56635c}.amount-heading,td.amount{text-align:right}.merchant{font-weight:600;color:#34413b;font-size:11px}.note-preview{font-size:9px;color:#99a39d;margin-top:3px;max-width:300px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.category-pill{display:inline-block;padding:5px 9px;background:#f2f6f1;color:#668271;border-radius:20px;font-size:9px}.amount{font-weight:600;color:#34413b;font-size:12px;white-space:nowrap}.row-actions{white-space:nowrap;text-align:right}.text-action{border:0;background:transparent;color:#74847a;font-size:10px;padding:6px 5px}.text-action:hover{color:var(--green);text-decoration:underline}.text-action.delete:hover{color:#bd655f}
.empty-state{text-align:center;padding:34px 12px 27px;display:none}.empty-state.visible{display:block}.empty-illustration{display:grid;place-items:center;margin:0 auto 9px;width:38px;height:38px;border-radius:12px;background:#eef5ed;color:#79a182;font-size:22px}.empty-state h3{font-size:13px;margin:0 0 5px}.empty-state p{color:#89958e;font-size:10px;margin:0 0 13px}.empty-state .button{min-height:34px;font-size:10px}.record-count{min-height:24px;font-size:9px;color:#9aa49e;text-align:right;margin:10px 4px 0}footer{display:flex;justify-content:space-between;border-top:1px solid #e9ede7;padding:18px 0 24px;margin-top:28px;font-size:9px;color:#9aa39d}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
dialog{border:0;border-radius:16px;padding:0;width:min(500px,calc(100% - 30px));box-shadow:0 20px 70px #1c33274a;color:var(--ink)}dialog::backdrop{background:#19251f66;backdrop-filter:blur(2px)}#expense-form{padding:25px 28px 24px}.dialog-heading{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:17px}.dialog-heading h2{margin:0;font-size:19px}.close-button{border:0;background:#f3f5f1;border-radius:8px;width:30px;height:30px;color:#68766e;font-size:21px}.field{display:block;font-size:11px;font-weight:600;color:#66736b;margin:13px 0}.field input,.field select,.field textarea{display:block;width:100%;margin-top:6px;min-height:41px;border:1px solid #e2e8e0;border-radius:8px;background:white;padding:9px 11px;color:#34413b;font-size:12px;outline:none}.field input:focus,.field select:focus,.field textarea:focus{border-color:#8aaf94;box-shadow:0 0 0 3px #edf5ed}.field textarea{resize:vertical}.field-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}.optional{font-weight:400;color:#9aa39d}.form-error{min-height:16px;color:#b85952;font-size:10px;margin:4px 0}.dialog-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:8px}.dialog-actions .button{min-width:100px}.toast{position:fixed;bottom:22px;left:50%;transform:translate(-50%,16px);opacity:0;pointer-events:none;padding:11px 17px;border-radius:9px;color:white;background:#263a30;font-size:11px;transition:.2s;z-index:5}.toast.show{opacity:1;transform:translate(-50%,0)}
@media(max-width:700px){html,body{max-width:100%;overflow-x:hidden}.app-shell{width:100%;max-width:100%;padding:0 17px}.topbar{height:64px}.brand{font-size:13px}.brand-mark{width:30px;height:30px}.privacy{font-size:0;gap:0}.privacy span{font-size:9px}.welcome{align-items:flex-start;padding:30px 0 20px}.welcome h1{font-size:21px}.intro{font-size:10px;max-width:240px;line-height:1.7}.add-top{display:none}.summary-grid{grid-template-columns:1fr;gap:10px}.summary-card{min-height:124px;padding:16px 17px}.total-value{font-size:28px}.category-summary{gap:15px;margin-top:15px}.category-item{min-width:calc(50% - 10px)}.list-section{margin-top:29px}.list-heading-row{align-items:center}.list-heading-row h2{font-size:16px}.add-inline{display:inline-block;padding:0 11px;min-height:36px;font-size:10px}.toolbar{gap:6px;flex-wrap:wrap;margin-top:15px}.search-box{width:100%;height:38px}.month-filter{margin-left:0;margin-right:auto}.month-filter span{font-size:9px}.month-filter input{height:33px}.toolbar>.button{height:33px}.table-wrap{width:100%;max-width:100%;overflow-x:auto}table{min-width:590px}.empty-state{padding:34px 12px 27px}th,td{padding:0 11px}footer{font-size:8px;gap:12px;line-height:1.6}footer span:last-child{text-align:right}#expense-form{padding:21px 20px}.field-row{gap:9px}}
.list-actions{display:flex;align-items:center;gap:8px}.button-secondary{font-size:11px}.dialog-content{padding:25px 28px 24px}.import-explanation{font-size:11px;line-height:1.8;color:#748179;margin:0 0 17px}.file-drop{display:flex;min-height:145px;flex-direction:column;align-items:center;justify-content:center;gap:7px;border:1px dashed #aabfae;border-radius:12px;background:#f7faf6;color:#5f7467;cursor:pointer}.file-drop:hover{background:#eff6ef}.file-drop strong{font-size:12px;color:#365846}.file-drop span:last-of-type{font-size:10px;color:#929d95}.file-drop input{max-width:230px;font-size:10px}.file-icon{width:27px;height:27px;display:grid;place-items:center;border-radius:8px;background:#e8f1e7;color:#4e815f;font-size:17px}.import-progress{margin-top:17px}.progress-track{height:6px;border-radius:9px;background:#e9eee8;overflow:hidden}.progress-track span{display:block;width:5%;height:100%;background:#5c926b;border-radius:9px;transition:width .2s}.import-progress p{font-size:10px;color:#748179;margin:7px 0}.wide-dialog{width:min(1000px,calc(100% - 28px));max-width:1000px}.wide-dialog .dialog-content{padding:24px 25px}.review-summary{font-size:11px;color:#607167;margin:0 0 10px}.review-table-wrap{max-height:min(52vh,500px);overflow:auto;border:1px solid #e8ece6;border-radius:9px}.review-table{min-width:850px;table-layout:fixed}.review-table th,.review-table td{padding:7px 8px;height:auto;border-bottom:1px solid #edf0eb;font-size:10px}.review-table th{position:sticky;top:0;z-index:1;background:#f8faf6}.review-table td input,.review-table td select{width:100%;min-height:32px;padding:5px 7px;border:1px solid #e0e7de;border-radius:6px;background:white;font-size:10px;color:#34413b}.review-table th:nth-child(1){width:58px}.review-table th:nth-child(2){width:125px}.review-table th:nth-child(3){width:230px}.review-table th:nth-child(4){width:125px}.review-table th:nth-child(5){width:140px}.review-table th:nth-child(6){width:150px}.review-check{width:16px;height:16px;accent-color:#286b56}.review-status{display:inline-flex;padding:4px 7px;border-radius:12px;background:#f0f2ed;color:#6f7d73;white-space:nowrap}.review-status.ready{background:#edf5ed;color:#477554}.review-status.needs-review{background:#fff3df;color:#95691a}.duplicate-note{display:block;margin-top:4px;color:#b35c42;white-space:normal;line-height:1.4}.confidence-note{font-size:9px;color:#808d84}.dialog-content .dialog-actions{margin-top:12px}.dialog-content .form-error{margin-top:8px}
@media(max-width:700px){.list-actions{gap:5px}.list-actions .button{font-size:9px;min-height:34px;padding:0 9px}.dialog-content{padding:20px 17px}.wide-dialog .dialog-content{padding:20px 14px}.wide-dialog .dialog-heading h2{font-size:16px}.review-table-wrap{max-height:48vh}.dialog-actions .button{padding:0 10px;font-size:10px}}
.budget-section{margin-top:24px;padding:22px;background:#fff;border:1px solid #edf0eb;border-radius:14px;box-shadow:0 5px 20px #2c42350a}.budget-heading{display:flex;align-items:flex-end;justify-content:space-between;margin-bottom:16px}.budget-heading h2{font-size:18px;margin:0;font-weight:600}.budget-month-label,.budget-hint{font-size:10px;color:#84908b;margin:6px 0 0}.budget-hint{margin:0 0 3px}.budget-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.budget-card{min-width:0;padding:15px;border:1px solid #e9ede7;border-radius:11px;background:#fbfcfa}.budget-card.warning{border-color:#edd9ad;background:#fffdf8}.budget-card.over{border-color:#edc8c2;background:#fffafa}.budget-card-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}.budget-card-heading h3{font-size:12px;margin:0;font-weight:650}.budget-status{font-size:9px;padding:4px 7px;border-radius:20px;white-space:nowrap;background:#eef5ef;color:#477554}.budget-status.warning{background:#fff1d4;color:#906719}.budget-status.over{background:#fde9e6;color:#a64f46}.budget-status.unbudgeted{background:#f0f2ed;color:#7d8982}.budget-metrics{display:grid;grid-template-columns:1fr 1fr;gap:10px 8px;margin:15px 0 11px}.budget-metrics div{min-width:0}.budget-metrics span{display:block;font-size:9px;color:#87938b}.budget-metrics strong{display:block;margin-top:3px;font-size:12px;font-weight:650;color:#34413b;overflow-wrap:anywhere}.budget-card.over .budget-metrics div:nth-child(3) strong{color:#a64f46}.budget-progress{height:7px;border-radius:8px;background:#e9eee8;overflow:hidden}.budget-progress span{display:block;height:100%;border-radius:8px;background:#72a17b;transition:width .2s}.budget-card.warning .budget-progress span{background:#dda84f}.budget-card.over .budget-progress span{background:#d2786e}.budget-edit{display:flex;align-items:flex-end;gap:8px;margin-top:12px}.budget-edit label{display:block;flex:1;font-size:9px;color:#84908b}.budget-edit input{display:block;width:100%;height:34px;margin-top:5px;border:1px solid #e2e8e0;border-radius:7px;padding:0 9px;font-size:11px;color:#34413b;background:white}.budget-edit .button{min-height:34px;padding:0 12px;font-size:10px}.budget-message{min-height:14px;margin:8px 0 0;font-size:10px;color:#b85952}
@media(max-width:900px){.budget-list{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.budget-section{margin-top:14px;padding:16px 13px}.budget-heading{align-items:flex-start}.budget-heading h2{font-size:16px}.budget-hint{max-width:115px;text-align:right;font-size:9px;line-height:1.6}.budget-list{grid-template-columns:1fr;gap:9px}.budget-card{padding:13px}}
.comparison-section{margin-top:22px;padding:22px;background:#fff;border:1px solid #edf0eb;border-radius:14px;box-shadow:0 5px 20px #2c42350a}.comparison-heading h2{font-size:18px;margin:0;font-weight:600}.comparison-month-label{font-size:10px;color:#84908b;margin:6px 0 0}.comparison-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:16px 0}.comparison-metric{min-width:0;padding:13px;border:1px solid #e9ede7;border-radius:10px;background:#fbfcfa}.comparison-metric>span,.comparison-metric small{display:block;font-size:9px;color:#84908b}.comparison-metric strong{display:block;margin:7px 0 4px;font-size:17px;font-weight:650;color:#34413b;overflow-wrap:anywhere}.comparison-metric strong.no-data{font-size:12px;color:#84908b}.comparison-metric small{line-height:1.5}.comparison-metric .increase,.comparison-table .increase{color:#b15c4e}.comparison-metric .decrease,.comparison-table .decrease{color:#438064}.comparison-metric .neutral,.comparison-table .neutral{color:#69766f}.comparison-note{margin:8px 0;color:#95691a;font-size:10px;line-height:1.6}.comparison-table-wrap{overflow-x:auto;border:1px solid #e9ede7;border-radius:9px}.comparison-table{min-width:610px}.comparison-table th,.comparison-table td{height:42px;padding:7px 12px;font-size:10px;white-space:nowrap}.comparison-table th{text-align:right}.comparison-table th:first-child,.comparison-table td:first-child{text-align:left}.comparison-table td{text-align:right}.comparison-table td:first-child{font-weight:600;color:#56635c}.comparison-no-data{color:#929c96;font-size:9px!important}
@media(max-width:700px){.comparison-section{margin-top:14px;padding:16px 13px}.comparison-heading h2{font-size:16px}.comparison-summary{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:13px 0}.comparison-metric{padding:11px}.comparison-metric strong{font-size:15px}.comparison-table th,.comparison-table td{padding:7px 9px}}
.email-import-panel{padding:15px;border:1px solid #e5ebe3;border-radius:10px;background:#fbfcfa}.email-import-panel h3{margin:0 0 8px;font-size:12px;color:#34413b}.email-import-panel .import-explanation{margin-bottom:8px}.email-import-panel .field{margin:8px 0 10px}.email-import-panel .field textarea{min-height:125px;font-size:11px;line-height:1.7}.email-import-panel>.button{min-height:36px;font-size:11px}.import-divider{display:flex;align-items:center;gap:12px;margin:17px 0;color:#929d95;font-size:10px}.import-divider::before,.import-divider::after{content:"";height:1px;flex:1;background:#e9ede7}
@media(max-width:700px){.email-import-panel{padding:12px}.email-import-panel .field textarea{min-height:110px}}
/* Shared target-month controls near the page heading. */
.welcome-actions{display:flex;flex-direction:column;align-items:flex-end;gap:9px}.top-month-control{display:flex;align-items:center;gap:7px;padding:6px 8px;background:#fff;border:1px solid #e6eae3;border-radius:10px;box-shadow:0 3px 12px #2c423508}.top-month-control label{font-size:10px;color:#718078;font-weight:600;margin:0 4px}.top-month-control input{height:34px;min-width:145px;padding:0 8px;border:1px solid #e6eae3;border-radius:7px;background:#fbfcfa;color:#34413b;font-size:12px}.month-step{width:32px;height:32px;padding:0;border:0;border-radius:7px;background:#eff5ef;color:#286b56;font-size:22px;line-height:1}.month-step:hover{background:#e4efe4}@media(max-width:700px){.welcome{flex-direction:column;gap:16px}.welcome-actions{width:100%;align-items:stretch}.top-month-control{justify-content:space-between;width:100%;padding:5px}.top-month-control input{flex:1;min-width:0}.top-month-control label{margin-left:5px;margin-right:3px}}
.comparison-category-row{cursor:pointer}.comparison-category-row:hover{background:#fbfcfa}.comparison-category-toggle{display:inline-flex;align-items:center;gap:8px;max-width:100%;padding:8px 0;border:0;background:transparent;color:inherit;font-size:inherit;font-weight:600;text-align:left}.comparison-category-toggle:focus-visible{outline:2px solid #75a384;outline-offset:2px;border-radius:3px}.comparison-chevron{display:inline-block;color:#718078;font-size:16px;line-height:1;transform:rotate(0deg);transition:transform .15s}.comparison-category-toggle[aria-expanded="true"] .comparison-chevron{transform:rotate(90deg)}.comparison-details-row>td{height:auto!important;padding:0 10px 10px!important;white-space:normal!important;background:#fbfcfa}.comparison-details{padding:12px;border:1px solid #e8ede7;border-radius:8px;background:white}.comparison-details-heading{margin-bottom:8px;color:#65736a;font-size:10px;font-weight:600}.comparison-detail-table{width:100%;min-width:480px;border-collapse:collapse}.comparison-detail-table th,.comparison-detail-table td{height:auto;padding:7px 9px;border-top:1px solid #eff1ed;font-size:9px;white-space:normal;text-align:left}.comparison-detail-table th:last-child,.comparison-detail-table td:last-child{text-align:right;white-space:nowrap}.comparison-detail-table td small{display:block;margin-top:3px;color:#929c96;line-height:1.4}.comparison-detail-table td strong{font-weight:600}.comparison-detail-table tbody tr:first-child td{border-top:0}@media(max-width:700px){.comparison-details-row>td{padding:0 6px 8px!important}.comparison-details{padding:9px}.comparison-detail-table{min-width:420px}}
.backup-section{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px 20px;margin-top:22px;padding:18px 22px;background:#fff;border:1px solid #edf0eb;border-radius:14px;box-shadow:0 5px 20px #2c42350a}.backup-section h2{margin:0;font-size:16px;font-weight:600}.backup-section>div:first-child>p:last-child{margin:6px 0 0;color:#84908b;font-size:10px;line-height:1.7}.backup-actions{display:flex;align-items:center;gap:8px}.backup-actions .button{min-height:36px;font-size:10px}.backup-file-label{position:relative;display:inline-flex;align-items:center;justify-content:center;margin:0;overflow:hidden;border-radius:9px}.backup-file-label input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}.backup-message{grid-column:1/-1;margin:0;color:#617367;font-size:10px;line-height:1.6}.restore-dialog{width:min(540px,calc(100% - 28px))}.restore-dialog .dialog-content{padding:24px}.restore-warning{margin:0 0 12px;color:#a14d43;font-size:11px;line-height:1.8}.restore-preview{padding:10px 12px;border-radius:8px;background:#f6f8f4;color:#546359;font-size:10px;line-height:1.7;overflow-wrap:anywhere}.restore-confirm{display:flex;align-items:flex-start;gap:8px;margin:12px 0;color:#5e6e63;font-size:10px;line-height:1.6}.restore-confirm input{margin:1px 0 0;accent-color:#286b56}.restore-dialog .form-error{min-height:0;margin:8px 0;color:#95691a;line-height:1.7}.restore-dialog .dialog-actions{display:flex;justify-content:flex-end;gap:8px}.restore-dialog button:disabled{cursor:not-allowed;opacity:.5}@media(max-width:700px){.backup-section{grid-template-columns:1fr;padding:16px 13px}.backup-actions{display:grid;grid-template-columns:1fr 1fr}.backup-actions .button{padding:0 8px}.restore-dialog .dialog-content{padding:20px 16px}}
