:root{--header:#f8bc77;--background:#fef5eb;--surface:#faebda;--control:#f1dec8;--text:#404040;--muted:gray;--green:#6a8e7f;--red:#b85c5c;--line:#ebdac6;--soft:#f0e8df;--warm:#fff8f1;--header-height:56px;--tab-height:56px;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;color:var(--text);background:var(--background);-webkit-tap-highlight-color:transparent;font-family:system-ui,-apple-system,Segoe UI,Roboto,PingFang SC,Noto Sans CJK SC,sans-serif}*{box-sizing:border-box}html,body,#root{height:100%;margin:0}html,body{overscroll-behavior:none;overflow:hidden}body{background:var(--background);touch-action:manipulation;position:fixed;inset:0}button{font:inherit;color:inherit;cursor:pointer}input,select{font:inherit;color:inherit}a{color:var(--green)}.app{background:var(--background);flex-direction:column;max-width:720px;height:100dvh;margin:0 auto;display:flex}.header{min-height:calc(var(--header-height) + env(safe-area-inset-top));padding:env(safe-area-inset-top) 12px 0;background:var(--header);color:#fff;flex:none;align-items:center;gap:8px;display:flex}.header h1{text-align:center;white-space:nowrap;text-overflow:ellipsis;flex:1;margin:0;font-size:18px;font-weight:700;overflow:hidden}.header-side{align-items:center;width:64px;display:flex}.header-side.end{justify-content:flex-end}.header-button{color:#fff;background:0 0;border:0;justify-content:center;align-items:center;min-width:44px;min-height:44px;padding:8px;font-size:16px;display:inline-flex}.header-button svg{width:26px;height:26px}.main{flex-direction:column;flex:1;min-width:0;min-height:0;display:flex}.content{overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;flex:1;overflow-y:auto}.page{padding:14px 18px 32px}.tabbar{background:var(--surface);border-top:.5px solid var(--line);padding-bottom:env(safe-area-inset-bottom);flex:none;display:flex}.tabbar a{height:var(--tab-height);color:var(--muted);flex-direction:column;flex:1;justify-content:center;align-items:center;gap:2px;font-size:11px;text-decoration:none;display:flex}.tabbar a.active{color:var(--header)}.tabbar svg{width:24px;height:24px}.banner{text-align:center;flex:none;justify-content:center;align-items:center;gap:10px;padding:7px 16px;font-size:13px;display:flex}.banner.offline{background:var(--soft);color:var(--text)}.banner.issue{color:var(--red);background:#f6dede}.banner.update{background:var(--green);color:#fff}.banner button{color:inherit;background:0 0;border:1px solid;border-radius:12px;padding:2px 10px;font-size:12px}.muted{color:var(--muted)}.error{color:var(--red)}.center{text-align:center}.small{font-size:12px}.breadcrumb{flex-wrap:wrap;align-items:center;gap:2px 6px;margin-bottom:6px;display:flex}.breadcrumb button{color:var(--green);background:0 0;border:0;padding:2px 0}.breadcrumb button[aria-current]{color:var(--text);cursor:default;font-weight:700}.breadcrumb .separator{color:var(--muted)}.card{background:var(--surface);border-radius:10px;padding:12px}.button{background:var(--green);color:#fff;text-align:center;border:0;border-radius:12px;width:100%;padding:12px;font-size:18px;font-weight:700;display:block}.button:disabled{background:var(--muted);cursor:default}.button.secondary{background:var(--header)}.button.ghost{color:var(--green);background:0 0;font-size:15px;font-weight:400}.button.ghost:disabled{color:var(--muted);background:0 0}.button.danger{color:var(--red);border:1px solid var(--red);background:0 0;font-size:15px;font-weight:400}.boxed-input{background:var(--surface);border:0;border-radius:8px;width:100%;padding:11px;font-size:16px}.segmented{margin-bottom:20px;display:flex}.segmented button{background:var(--control);border:0;flex:1;padding:12px}.segmented button:first-child{border-radius:10px 0 0 10px}.segmented button:last-child{border-radius:0 10px 10px 0}.segmented button.selected{background:var(--header);color:#fff}.segmented button:disabled{cursor:default}.segmented.compact{margin-bottom:14px}.segmented.compact button{padding:7px;font-size:14px}.list-row{border-bottom:.5px solid var(--line);align-items:center;gap:8px;min-height:44px;padding:2px 0;display:flex}.list-row .grow{flex:1;min-width:0}.list-row .name{text-overflow:ellipsis;white-space:nowrap;font-size:17px;overflow:hidden}.check-row{cursor:pointer}.check-row input{width:20px;height:20px;accent-color:var(--green);flex:none;margin:0}.check-row:last-child{border-bottom:0}.icon-button{color:var(--muted);background:0 0;border:0;justify-content:center;align-items:center;min-width:40px;min-height:40px;padding:6px;display:inline-flex}.icon-button svg{width:24px;height:24px}.link-button{color:var(--green);background:0 0;border:0;padding:4px 0}.pill{background:var(--soft);color:var(--muted);vertical-align:middle;border-radius:8px;padding:1px 6px;font-size:11px;display:inline-block}.pill.pending{color:#8a5a1c;background:#fce7cc}.range{align-items:center;gap:8px;display:flex}.range input{flex:1;min-width:0}.range input,.date-input{height:36px;padding:0 10px}@supports (-webkit-touch-callout:none){.range input,.date-input{appearance:none;line-height:36px}.range input::-webkit-date-and-time-value{text-align:left}.date-input::-webkit-date-and-time-value{text-align:left}}.presets{gap:7px;margin-top:10px;padding-bottom:2px;display:flex;overflow-x:auto}.presets button{background:var(--surface);color:var(--muted);border:0;border-radius:16px;flex:none;padding:7px 13px;font-size:12px;font-weight:700}.presets button.active{background:var(--green);color:#fff}.total-label{color:var(--muted);font-size:13px}.total{margin-top:5px;font-size:28px;font-weight:700}.legend-dot{border-radius:6px;flex:none;width:12px;height:12px}.child-row{border:0;border-bottom:.5px solid var(--line);text-align:left;background:0 0;align-items:center;width:100%;padding:13px 0;display:flex}.child-row .name{flex:1;margin-left:10px;font-weight:700}.child-row .percent{text-align:right;width:52px;color:var(--muted);margin-right:10px}.child-row .amounts{text-align:right}.child-row.own{cursor:default}.notice{background:var(--warm);border-radius:12px;margin-bottom:20px;padding:16px;line-height:1.5}.fade-in{animation:.28s ease-out fade-in}@keyframes fade-in{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}.trend svg{touch-action:pan-y;-webkit-user-select:none;user-select:none;display:block}.trend-placeholder{justify-content:center;align-items:center;display:flex}.trend-controls{flex-wrap:wrap;align-items:center;gap:10px 8px;display:flex}.trend-controls .segmented.mini button{padding:6px 12px}.switch-label{align-items:center;gap:8px;display:inline-flex}.switch{background:var(--control);border:0;border-radius:14px;flex:none;width:46px;height:28px;padding:0;transition:background .15s;position:relative}.switch:after{content:"";background:#fff;border-radius:50%;width:22px;height:22px;transition:transform .15s;position:absolute;top:3px;left:3px;box-shadow:0 1px 2px #00000040}.switch[aria-checked=true]{background:var(--header)}.switch[aria-checked=true]:after{transform:translate(18px)}.switch:disabled{opacity:.5}.segmented button:disabled:not(.selected){color:var(--muted);opacity:.5}.transaction-row{border:0;border-bottom:.5px solid var(--line);text-align:left;background:0 0;align-items:center;gap:8px;width:100%;padding:8px 4px;display:flex}.transaction-row .date{flex:none;width:62px;font-size:13px}.transaction-row .title{white-space:nowrap;text-overflow:ellipsis;flex:1;min-width:0;font-size:15px;font-weight:700;overflow:hidden}.transaction-row .amount{text-align:right;flex:none;width:96px;font-size:15px}.month-header{background:var(--background);color:var(--muted);z-index:1;justify-content:space-between;gap:8px;padding:8px 4px 4px;font-size:12px;display:flex;position:sticky;top:0}.transaction-row{scroll-margin-top:30px}.journal-row{flex-wrap:wrap;row-gap:0}.journal-row .sub-ledger{text-align:right;color:var(--muted);white-space:nowrap;text-overflow:ellipsis;flex-basis:100%;font-size:12px;overflow:hidden}.toolbar{border-bottom:.5px solid var(--line);flex:none;align-items:center;gap:10px;padding:8px 14px;display:flex}.toolbar .date-input{flex:1;min-width:0}.section-title{color:var(--muted);margin:20px 4px 6px;font-size:13px;font-weight:400}.form-card{background:var(--surface);border-radius:10px;padding:0 14px}.form-row{border-bottom:.5px solid var(--line);align-items:center;gap:12px;min-height:48px;display:flex}.form-row:last-child{border-bottom:0}.form-row .label{color:var(--muted);flex:none}.form-row .value{text-align:right;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;overflow:hidden}.form-row .value.wrap{white-space:normal;overflow-wrap:anywhere;padding:12px 0}.form-row .value.placeholder{color:var(--muted)}.value-button{text-align:right;width:100%;color:var(--green);background:0 0;border:0;padding:12px 0}.value-button.placeholder{color:var(--muted)}.date-field{color:var(--green);padding:12px 0;position:relative}.date-field .placeholder{color:var(--muted)}.date-field input{opacity:0;appearance:none;cursor:pointer;border:0;width:100%;height:100%;margin:0;padding:0;font-size:16px;position:absolute;inset:0}.select-field{color:var(--green);padding:12px 0;position:relative}.select-field select{opacity:0;appearance:none;cursor:pointer;border:0;width:100%;height:100%;margin:0;padding:0;font-size:16px;position:absolute;inset:0}.plain-input{text-align:right;min-width:0;color:var(--text);background:0 0;border:0;flex:1;padding:12px 0;font-size:16px}.plain-input:focus{outline:none}.form-hint{color:var(--muted);margin:6px 4px 0;font-size:12px;line-height:1.4}.form-card .date-input{background:var(--background);flex:none;width:150px}.period-edit{justify-content:flex-end;align-items:center;gap:10px;padding:6px 0;display:flex}.segmented.mini{vertical-align:middle;margin:0;display:inline-flex}.segmented.mini button{flex:none;padding:6px 16px;font-size:14px}.segmented.mini.fill{flex:1;display:flex}.segmented.mini.fill button{flex:1;padding:6px 4px}.form-actions{margin-top:24px}.form-actions+.form-actions{margin-top:12px}.day-grid{flex:1;grid-template-columns:repeat(7,1fr);gap:6px;padding:10px 0;display:grid}.day-grid button{background:var(--soft);min-width:0;color:var(--text);border:0;border-radius:8px;padding:8px 0;font-size:14px}.day-grid button.selected{background:var(--header);color:#fff}.form-row .year-day{justify-content:flex-end;gap:14px;display:flex}.form-row .year-day .select-field{flex:none}.recurring-mark{color:var(--muted);margin-left:4px;font-weight:400}.entry-row .ledger{text-align:left;text-overflow:ellipsis;white-space:nowrap;background:0 0;border:0;flex:1;min-width:0;padding:12px 0;font-size:16px;overflow:hidden}.entry-row button.ledger{color:var(--text)}.entry-row button.ledger.placeholder{color:var(--green)}.entry-row .amount{flex:none;align-items:center;gap:2px;display:flex}.entry-row input{text-align:right;background:0 0;border:0;width:6.5em;padding:12px 0;font-size:16px}.entry-row input:focus{outline:none}.entry-row .remove{min-width:32px;min-height:32px;margin-right:-8px;padding:4px}.add-row{width:100%;color:var(--green);text-align:left;background:0 0;border:0;padding:0}.modal-backdrop{z-index:10;background:#00000059;justify-content:center;align-items:flex-end;display:flex;position:fixed;inset:0}.modal{background:var(--background);width:100%;max-width:720px;height:min(67dvh,100% - 24px);padding-bottom:env(safe-area-inset-bottom);border-radius:14px 14px 0 0;flex-direction:column;display:flex}.modal-header{background:var(--header);color:#fff;border-radius:14px 14px 0 0;align-items:center;padding:12px 14px;display:flex}.modal-header h2{text-align:center;flex:1;margin:0;font-size:18px}.modal-body{overscroll-behavior:contain;flex:1;min-height:0;padding:10px 14px;overflow-y:auto}.auth{min-height:100%;padding:24px 24px calc(24px + env(safe-area-inset-bottom));flex-direction:column;justify-content:center;display:flex}.auth-brand{text-align:center;margin-bottom:28px}.auth-brand img{border-radius:18px;width:72px;height:72px}.auth-brand h1{margin:10px 0 2px;font-size:26px}.auth form{flex-direction:column;gap:14px;display:flex}.auth .links{justify-content:space-between;margin-top:14px;font-size:14px;display:flex}.code-input{letter-spacing:8px;text-align:center;font-size:24px}@media (min-width:744px){.app.signed-in{flex-direction:row;max-width:none}.main{padding:env(safe-area-inset-top) env(safe-area-inset-right) 0 0;--gutter:max(0px, (100% - 960px) / 2)}.main>.content{padding-inline:var(--gutter);padding-bottom:env(safe-area-inset-bottom)}.tabbar{width:184px;padding:calc(env(safe-area-inset-top) + 16px) 10px calc(env(safe-area-inset-bottom) + 16px) calc(env(safe-area-inset-left) + 10px);border-top:0;border-right:.5px solid var(--line);flex-direction:column;order:-1;gap:2px;overflow-y:auto}.tabbar a{height:42px;color:var(--text);border-radius:10px;flex-direction:row;flex:none;justify-content:flex-start;gap:12px;padding:0 12px;font-size:15px}.tabbar a svg{width:22px;height:22px;color:var(--muted)}.tabbar a.active{background:var(--header);color:#fff}.tabbar a.active svg{color:#fff}.brand{align-items:center;gap:10px;padding:0 6px 18px;font-size:18px;font-weight:700;display:flex}.brand img{border-radius:8px}.new-transaction{background:var(--green);color:#fff;border:0;border-radius:10px;justify-content:center;align-items:center;gap:6px;margin-bottom:14px;padding:10px;font-weight:700;display:flex}.new-transaction svg{width:20px;height:20px}@media (hover:hover){.tabbar a:not(.active):hover{background:var(--control)}.transaction-row:hover{background:var(--soft)}}.header{min-height:56px;padding:4px calc(var(--gutter) + 10px) 0;color:var(--text);background:0 0}.header h1{text-align:left;font-size:22px}.header-side{width:auto}.header-side:empty{display:none}.header .header-button{color:var(--green)}.toolbar{padding-inline:calc(var(--gutter) + 16px)}.toolbar .date-input{flex:none;width:180px}.icon-button.add{color:var(--green)}.transaction-row,.month-header.columns{grid-template-columns:96px minmax(0,3fr) minmax(0,2fr) minmax(0,2fr) 128px;gap:12px;display:grid}.transaction-row{padding:11px 8px}.transaction-row .date,.transaction-row .amount{width:auto}.transaction-row .amount{font-variant-numeric:tabular-nums}.transaction-row .ledgers{white-space:nowrap;text-overflow:ellipsis;font-size:14px;overflow:hidden}.month-header{padding:10px 8px 4px}.month-header.columns>:first-child{grid-column:1/3}.journal-row{grid-template-columns:96px minmax(0,3fr) minmax(0,2fr) 128px}.journal-row>*{grid-row:1}.journal-row .date{grid-column:1}.journal-row .title{grid-column:2}.journal-row .sub-ledger{text-align:left;grid-column:3;font-size:14px}.journal-row .amount{grid-column:4}}@media (min-width:744px) and (max-width:999px){.tabbar{width:76px;padding-inline:calc(env(safe-area-inset-left) + 8px) 8px}.tabbar a{flex-direction:column;justify-content:center;gap:3px;height:58px;padding:0;font-size:11px}.brand{justify-content:center;padding-inline:0}.new-transaction{padding:10px 0}.brand span,.new-transaction span{clip-path:inset(50%);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}}.blocked{text-align:center;flex-direction:column;justify-content:center;align-items:center;gap:12px;height:100dvh;padding:24px;display:flex}
