:root{--bg:#f5f6f2;--paper:#fff;--text:#253b34;--muted:#79867f;--green:#215b49;--light:#e6eee5;--lime:#e5efbb;--orange:#c37a47;--line:#e8ece6;--red:#b95244;--shadow:0 8px 28px #24473506;font-family:system-ui,-apple-system,'Segoe UI','Noto Sans SC',sans-serif;color:var(--text);font-size:15px;font-synthesis:none}
.fx-controls{padding:14px;background:#edf1e6;border-radius:14px;margin:-4px 0 18px}.fx-controls[hidden]{display:none}.fx-controls select{min-width:0;flex:1;font-size:12px;background:white}.fx-controls button{font-size:12px;flex-shrink:0;padding:10px 12px}.fx-controls p{margin-top:10px}.fx-controls .hint.bad{color:var(--red)}.transaction .amount{max-width:51%}input[readonly]{color:#567164}
*{box-sizing:border-box}body{margin:0;background:var(--bg);-webkit-tap-highlight-color:transparent}button,input,select,textarea{font:inherit;color:inherit}button{cursor:pointer;border:0;background:none;touch-action:manipulation}button:disabled{opacity:.45;cursor:default}input,select,textarea{border:1px solid var(--line);background:#fafbf8;border-radius:12px;padding:12px;width:100%;outline:none;min-height:46px}input:focus,select:focus,textarea:focus{border-color:var(--green);box-shadow:0 0 0 3px #215b4910}input[type=month]{min-width:0}input[type=datetime-local]{min-width:0}textarea{resize:vertical;min-height:85px}input::placeholder,textarea::placeholder{color:#a0aaa3}svg{display:block;width:22px;height:22px;flex-shrink:0}button:focus-visible{outline:2px solid var(--green);outline-offset:3px}h1,h2,h3,p{margin:0}h1{font-size:25px;font-weight:750;letter-spacing:-.7px}h2{font-size:17px}h3{font-size:15px}small{font-size:12px}strong{font-weight:700}.muted{color:var(--muted)}.tiny{font-size:12px;line-height:1.6}.label{font-size:13px;color:var(--muted)}.good{color:var(--green)}.bad{color:var(--red)}.income{color:var(--green)}.expense{color:var(--orange)}.money{font-variant-numeric:tabular-nums;letter-spacing:-.3px}.row{display:flex;align-items:center;gap:12px}.spread{justify-content:space-between}.stack{display:flex;flex-direction:column;gap:16px}.flex1{flex:1;min-width:0}.top{padding:24px 22px 16px;display:flex;align-items:center;justify-content:space-between}.brand{display:flex;gap:10px;align-items:center}.brand-icon{display:grid;place-items:center;width:38px;height:38px;border-radius:13px;background:var(--green);color:var(--lime);font-size:20px;font-weight:650}.brand strong{font-size:19px;letter-spacing:1px}.brand small{display:block;color:var(--muted);font-size:10px;margin-top:1px;letter-spacing:1px}.local{font-size:11px;display:flex;align-items:center;gap:5px;color:var(--muted)}.local i{background:#6a9372;border-radius:50%;width:5px;height:5px}#app{max-width:620px;margin:auto}main{padding:12px 22px 115px;min-height:calc(100vh - 90px)}.heading{margin:4px 0 20px}.heading p{color:var(--muted);font-size:12px;margin-top:6px}.seg{display:flex;border-radius:12px;background:#e9ede6;padding:4px;gap:3px}.seg button{flex:1;padding:8px 12px;border-radius:9px;color:#6f7f73;white-space:nowrap;font-size:13px}.seg button.active{background:white;box-shadow:0 2px 7px #264d3d0c;color:var(--green);font-weight:650}.period{display:flex;align-items:center;justify-content:space-between;margin:18px 0;gap:8px}.period .arrow{width:38px;height:38px;display:grid;place-items:center;background:#e9ede5;border-radius:12px;flex-shrink:0}.period input,.period select{width:auto;max-width:200px;background:transparent;border:0;text-align:center;font-weight:700;padding:8px;min-height:38px}.period input::-webkit-calendar-picker-indicator{opacity:.5}.hero{position:relative;overflow:hidden;background:var(--green);color:#fff;border-radius:24px;padding:25px 24px;box-shadow:var(--shadow)}.hero:after{content:'';position:absolute;width:160px;height:160px;right:-70px;top:-60px;border-radius:50%;border:27px solid #ffffff06;pointer-events:none}.hero .label{color:#cfdecc}.hero .balance{font-size:38px;line-height:1.3;font-weight:650;margin:12px 0 22px;overflow-wrap:anywhere;letter-spacing:-1.5px}.hero .balance small{font-size:22px;vertical-align:3px;margin-right:7px;color:var(--lime);font-weight:400}.hero .foot{display:flex;justify-content:space-between;gap:12px;border-top:1px solid #ffffff20;padding-top:14px;font-size:11px;color:#c2d4c3}.pill{border-radius:20px;background:#ffffff18;padding:4px 9px;font-size:10px;color:var(--lime)}.twocol{display:grid;grid-template-columns:1fr 1fr;gap:12px}.metric{background:white;border:1px solid var(--line);border-radius:18px;padding:18px 16px}.metric .value{display:block;font-size:21px;font-weight:700;margin-top:10px;overflow-wrap:anywhere}.metric .label{display:flex;align-items:center;gap:6px}.metric .label svg{width:15px;height:15px}.card{background:white;border:1px solid var(--line);border-radius:20px;padding:20px;box-shadow:var(--shadow)}.card-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px;gap:8px}.link{color:var(--green);font-size:12px;padding:4px 0;white-space:nowrap}.btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;border-radius:13px;padding:13px 16px;background:var(--green);color:#fff;font-weight:600;min-height:46px}.btn svg{width:18px;height:18px}.btn.secondary{background:var(--light);color:var(--green)}.btn.ghost{background:transparent;border:1px solid var(--line);color:var(--text)}.btn.danger{background:#f7e8e2;color:var(--red)}.btn.full{width:100%}.track{height:6px;background:#edf1e9;overflow:hidden;border-radius:8px}.track i{display:block;height:100%;background:#72946b;border-radius:8px}.track.over i{background:var(--red)}.budget-line{display:flex;justify-content:space-between;gap:10px;margin:12px 0 10px;font-size:12px;line-height:1.5}.budget-line b{font-size:16px}.budget-line span{color:var(--muted)}.empty{text-align:center;padding:28px 10px;color:var(--muted);font-size:13px;line-height:1.8}.empty svg{margin:0 auto 12px;width:36px;height:36px;color:#a9ba9f}.empty .btn{margin-top:18px}.chart{height:145px;display:flex;align-items:flex-end;gap:4px;padding:12px 0 22px;position:relative;border-bottom:1px solid var(--line);margin-bottom:18px}.bar-group{flex:1;height:100%;display:flex;align-items:flex-end;gap:2px;position:relative;min-width:0}.bar-group .bar{flex:1;min-width:1px;border-radius:3px 3px 0 0;background:#a2b78e;max-height:100%}.bar-group .bar.income-bar{background:var(--green)}.bar-group .bar.expense-bar{background:#cba77f}.bar-label{position:absolute;left:50%;transform:translateX(-50%);bottom:-19px;font-size:9px;color:var(--muted)}.legend{display:flex;justify-content:flex-end;gap:12px;font-size:10px;color:var(--muted)}.legend i{display:inline-block;width:7px;height:7px;margin-right:4px;border-radius:2px}.category-row{margin-bottom:18px}.category-row:last-child{margin-bottom:0}.category-row .row{gap:9px;margin-bottom:8px;font-size:13px}.category-row small{color:var(--muted);font-weight:400;margin-left:7px}.cat-icon{width:32px;height:32px;flex-shrink:0;background:#eef1e8;border-radius:11px;display:grid;place-items:center;color:#6b8564;font-size:13px;font-weight:650}.category-row .track{margin-left:41px;height:4px}.details{border-top:1px solid var(--line);margin-top:12px;padding-top:12px}.month-table{width:100%;font-size:11px;border-collapse:collapse;font-variant-numeric:tabular-nums}.month-table th{color:var(--muted);font-weight:400;text-align:right;padding-bottom:10px}.month-table td{text-align:right;padding:13px 0;border-top:1px solid var(--line)}.month-table th:first-child,.month-table td:first-child{text-align:left}.month-table .clickable{cursor:pointer}.section-title{display:flex;align-items:center;justify-content:space-between;margin:22px 0 14px}.search{position:relative;margin-top:16px}.search input{padding-left:42px;background:#fff}.search svg{position:absolute;left:14px;top:13px;color:var(--muted);width:19px;height:19px}.filters{display:flex;gap:7px;align-items:center;margin:14px 0;flex-wrap:wrap}.chip{font-size:12px;padding:9px 14px;background:#e9ede5;border-radius:20px;white-space:nowrap}.chip.active{background:var(--green);color:white}.filters select{width:auto;flex:1;max-width:160px;font-size:12px;min-height:34px;padding:7px 10px;border-radius:20px}.ledger-summary{font-size:12px;display:flex;justify-content:space-between;gap:8px;color:var(--muted);line-height:1.8;flex-wrap:wrap}.day{margin:22px 0 5px;display:flex;justify-content:space-between;font-size:11px;color:var(--muted)}.transaction{display:flex;align-items:center;text-align:left;width:100%;padding:15px 0;border-bottom:1px solid var(--line);gap:12px}.transaction .cat-icon{width:40px;height:40px;font-size:16px;border-radius:14px}.transaction h3{font-weight:600;font-size:14px}.transaction p{font-size:11px;color:var(--muted);margin-top:5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:95%}.transaction .amount{font-size:16px;font-weight:650;text-align:right;flex-shrink:0;max-width:46%;overflow-wrap:anywhere}.transaction .amount small{display:block;font-size:10px;color:var(--muted);font-weight:400;margin-top:4px}.hint{font-size:12px;color:var(--muted);line-height:1.8}.notice{padding:14px 16px;background:#edf1e6;border-radius:13px;font-size:12px;line-height:1.8;color:#697d59}.budget-card{padding:18px;border:1px solid var(--line);border-radius:18px;background:#fff}.budget-card h3{font-size:15px}.budget-card .number{font-size:22px;font-weight:650;margin:12px 0 2px}.settings-action{display:flex;gap:13px;align-items:center;text-align:left;width:100%;padding:17px 0;border-bottom:1px solid var(--line)}.settings-action:last-child{border-bottom:0}.settings-action>svg:first-child{color:var(--green);background:#edf1e8;width:40px;height:40px;padding:10px;border-radius:12px}.settings-action p{font-size:11px;color:var(--muted);margin-top:4px;line-height:1.6}.settings-action strong{font-size:14px;font-weight:600}.settings-action>svg:last-child{width:16px;height:16px;color:var(--muted)}.about{text-align:center;color:var(--muted);font-size:11px;padding:22px 0;line-height:1.8}nav{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:100%;max-width:620px;display:grid;grid-template-columns:1fr 1fr 1fr 1fr 1fr;background:#fffffff5;border-top:1px solid #e4e9df;padding:10px 10px max(12px,env(safe-area-inset-bottom));z-index:10;backdrop-filter:blur(15px)}nav button{display:flex;flex-direction:column;align-items:center;gap:5px;font-size:10px;color:#8c978c;padding:4px 0}nav button.active{color:var(--green);font-weight:700}nav button.new{display:grid;place-items:center;padding:0;background:var(--green);color:var(--lime);width:52px;height:48px;border-radius:16px;justify-self:center}nav button.new svg{width:24px;height:24px}#overlay{position:fixed;inset:0;background:#152e2666;z-index:30;display:flex;align-items:flex-end;justify-content:center;backdrop-filter:blur(3px)}#overlay[hidden]{display:none}#sheet{background:var(--bg);width:100%;max-width:620px;border-radius:26px 26px 0 0;padding:24px 22px max(25px,env(safe-area-inset-bottom));max-height:94vh;max-height:94dvh;overflow:auto;overscroll-behavior:contain;box-shadow:0 -10px 50px #132e2710}.sheet-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:21px}.close{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#e9ede5}.close svg{width:18px;height:18px}.field{margin-bottom:16px}.field label{display:block;font-size:12px;color:#6e7d72;margin-bottom:7px}.field.amount input{font-size:32px;font-weight:600;letter-spacing:-.6px;padding:15px 16px;background:white}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.form-grid>*{min-width:0}.suggestions{display:flex;gap:7px;overflow:auto;margin:10px 0 0;padding-bottom:5px}.suggestions button{font-size:11px;background:#e9ede5;padding:7px 12px;border-radius:9px;white-space:nowrap}.error{font-size:12px;color:var(--red);line-height:1.6;white-space:pre-wrap;margin:12px 0}.actions{display:flex;gap:10px;margin-top:20px}.actions>*{flex:1}.source{font-size:11px;color:var(--muted);line-height:1.8;overflow-wrap:anywhere;margin-top:18px}.source summary{cursor:pointer}.source p{margin:5px 0}.preview-number{font-size:32px;font-weight:650;margin:12px 0}.confirm-text{font-size:14px;line-height:1.8;white-space:pre-wrap}.budget-input{display:grid;grid-template-columns:1fr 125px 28px;gap:10px;align-items:center;margin-bottom:10px}.budget-input input{padding:10px;min-height:42px}.budget-input label{font-size:13px;overflow-wrap:anywhere}.budget-input button{padding:6px;color:var(--muted)}.budget-input svg{width:16px;height:16px}#toast{position:fixed;left:50%;bottom:105px;transform:translateX(-50%);max-width:88%;background:#254435f2;color:white;font-size:13px;padding:12px 18px;border-radius:12px;z-index:60;box-shadow:0 4px 16px #0002;white-space:pre-wrap;line-height:1.5}.lock-error{padding:24px;background:#fff4ef;border-radius:16px;color:var(--red);line-height:1.8}.file-note{margin-top:14px}.annual-hint{font-size:10px;color:var(--muted);margin-top:10px}@media(min-width:621px){#app{border-left:1px solid var(--line);border-right:1px solid var(--line);min-height:100vh}.top{padding-top:30px}main{padding-left:28px;padding-right:28px}#sheet{margin-bottom:20px;border-radius:25px;max-height:90vh}nav{border-left:1px solid var(--line);border-right:1px solid var(--line)}}@media(max-width:360px){main{padding:10px 15px 110px}.top{padding:20px 15px 12px}.hero{padding:21px}.hero .balance{font-size:31px}.metric{padding:15px 12px}.metric .value{font-size:19px}.card{padding:17px}.month-table{font-size:10px}#sheet{padding-left:16px;padding-right:16px}}
/* Date-range insight card and independent monthly calendar. */
.range-control{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;margin:16px 0;padding:14px 12px;border-radius:12px;background:#e9ede5;font-size:12px;font-weight:600}.range-control small{color:var(--muted);font-weight:400;padding:0 4px}.range-control>span:last-child{font-weight:400;color:var(--green);font-size:11px;white-space:nowrap}.range-presets{display:flex;gap:8px;margin:18px 0}.field input[type=date]{min-width:0;max-width:100%;font-size:13px}
.trend-card{padding:22px 20px 16px;overflow:hidden}.currency-tag{background:#edf2eb;border-radius:20px;color:#63816e;font-size:9px;padding:4px 8px}.trend-balance{font-size:36px;font-weight:650;letter-spacing:-1px;color:var(--green);margin:10px 0 14px;overflow-wrap:anywhere;line-height:1.25}.trend-balance.bad{color:var(--red)}.trend-balance small{font-size:20px;margin-right:6px;font-weight:400;vertical-align:3px}.trend-totals{display:flex;flex-wrap:wrap;gap:6px 22px;font-size:11px;color:var(--muted);line-height:1.8}.trend-totals b{font-size:13px;margin-left:5px;overflow-wrap:anywhere}.trend-divider{height:1px;background:var(--line);margin:17px 0 10px}.trend-title{font-size:13px;font-weight:600}.trend-tabs{display:flex;gap:3px}.trend-tabs button{font-size:11px;border-radius:8px;padding:8px 10px;color:var(--muted);min-height:32px}.trend-tabs button.active{background:#e9f0e7;color:var(--green);font-weight:650}.trend-plot{margin-top:12px}.trend-plot svg{width:100%;height:auto;overflow:visible;touch-action:pan-y;cursor:crosshair}.plot-grid{stroke:#edf1eb;stroke-width:.8;stroke-dasharray:3 3}.plot-grid.zero{stroke:#bbcbbd;stroke-dasharray:none}.plot-axis{font-size:8px;fill:#7e8d82;font-family:inherit;font-variant-numeric:tabular-nums}.plot-cursor{stroke:#9eb7a6;stroke-width:.8;stroke-dasharray:3 3}
#trend-scrubber{appearance:none;-webkit-appearance:none;display:block;padding:0;margin:0;width:100%;height:28px;min-height:28px;border:0;border-radius:0;background:transparent;accent-color:var(--green);touch-action:pan-y}#trend-scrubber::-webkit-slider-runnable-track{height:3px;border-radius:3px;background:#e4ece2}#trend-scrubber::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;background:var(--green);height:14px;width:14px;border:3px solid white;box-shadow:0 0 0 1px #9ab8a4;border-radius:50%;margin-top:-5.5px}.trend-selection{background:#f4f7f0;border-radius:12px;padding:12px;margin-top:4px}.trend-selection strong{font-size:12px;font-weight:600}.selected-totals{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin-top:9px}.selected-totals>span{font-size:10px;color:var(--muted)}.selected-totals b{display:block;margin-top:4px;font-size:12px;overflow-wrap:anywhere;font-weight:600}.chart-caption{font-size:10px;color:var(--muted);line-height:1.7;margin-top:12px}
.calendar-card{padding:20px 12px}.calendar-card>.card-head{margin:0 6px 12px}.calendar-period{display:flex;align-items:center;justify-content:space-between;gap:7px;margin:0 4px 14px}.calendar-period .arrow{width:34px;height:34px;border-radius:10px;background:#f1f4ee;display:grid;place-items:center}.calendar-period input{max-width:165px;width:auto;min-width:0;text-align:center;font-weight:600;font-size:15px;background:transparent;border:0;padding:8px;min-height:36px}.calendar-period input::-webkit-calendar-picker-indicator{opacity:.4}.calendar-legend{display:flex;gap:10px;font-size:9px;margin:0 6px 16px;align-items:center}.calendar-legend>span:last-child{margin-left:auto;color:var(--muted)}.calendar-week,.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px}.calendar-week{text-align:center;font-size:10px;color:var(--muted);margin-bottom:8px}.calendar-week span:nth-last-child(-n+2){color:#b28a7a}.calendar-day{padding:7px 0 6px;min-height:67px;min-width:0;border:1px solid transparent;border-radius:10px;display:flex;flex-direction:column;align-items:center;font-variant-numeric:tabular-nums;gap:2px}.calendar-day .day-number{font-size:13px;line-height:21px;height:21px;font-weight:500}.calendar-day.weekend .day-number{color:#ac8074}.calendar-day.today .day-number{color:var(--green);font-weight:750;border-bottom:2px solid #8ab49a}.calendar-day.selected{background:#edf4e9;border-color:#abc5ac}.calendar-day.selected .day-number{color:var(--green);font-weight:750}.day-amount{font-size:8px;line-height:12px;letter-spacing:-.25px;white-space:nowrap}.calendar-note{font-size:9px;line-height:1.7;color:var(--muted);margin:12px 6px 0}.calendar-detail{margin:16px 6px 0;padding-top:18px;border-top:1px solid var(--line)}.calendar-detail h3{font-size:13px;margin-bottom:4px}.day-summary{display:flex;flex-wrap:wrap;gap:10px 16px;font-size:10px;color:var(--muted);margin-top:12px}.day-summary b{font-size:12px;margin-left:4px}.day-transactions .day{display:none}.day-transactions .transaction{gap:8px;padding:14px 0}.day-transactions .cat-icon{width:32px;height:32px;border-radius:11px;font-size:13px}.day-transactions .amount{font-size:13px;max-width:48%}.day-transactions h3{font-size:12px}.day-filter{display:flex;align-items:center;justify-content:space-between;padding:10px 12px;border-radius:11px;background:#e8efe4;font-size:12px}.day-filter button{font-size:11px;color:var(--green);min-height:28px}.calendar-detail .empty{padding:24px 0 12px}
@media(max-width:360px){.trend-card{padding:19px 16px 15px}.trend-balance{font-size:32px}.trend-tabs button{padding:8px}.calendar-card{padding:18px 10px}.calendar-grid{gap:2px}.calendar-legend{gap:8px}.selected-totals b{font-size:11px}}

.web-banner{margin:0 20px 12px;padding:12px 14px;background:#e7eedb;border-radius:12px;font-size:12px;display:flex;gap:10px;align-items:center;justify-content:space-between}.web-banner[hidden]{display:none}.web-banner button{color:var(--green);font-weight:650;white-space:nowrap;min-height:30px}.install-guide{font-size:14px;line-height:1.9}.install-guide h3{margin-top:22px}.install-guide ol{padding-left:22px}.install-guide .hint{margin-top:18px}#saving-indicator{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:#f5f6f2bb;z-index:80;color:var(--green);font-weight:650}#saving-indicator[hidden]{display:none}.local{font-size:9px}input,textarea,select{font-size:16px}.top{padding-top:max(24px,env(safe-area-inset-top))}nav{padding-bottom:max(12px,env(safe-area-inset-bottom))}.field input[type=date]{font-size:16px}.calendar-period input{font-size:16px}
