:root{font-family:-apple-system,BlinkMacSystemFont,'Hiragino Kaku Gothic ProN','Yu Gothic',sans-serif;font-size:18px;line-height:1.65;color:#202923;background:#fff;--ink:#202923;--muted:#526158;--green:#235c43;--line:#ccd4ce;--surface:#f3f6f3;--radius:8px;font-synthesis:none}*{box-sizing:border-box}body{margin:0;padding-bottom:110px}button,select{font:inherit}button{min-height:60px;padding:14px 22px;border:1px solid #9ba99f;border-radius:var(--radius);background:#fff;color:var(--ink);font-weight:600;cursor:pointer;touch-action:manipulation;line-height:1.4;transition:background-color .15s ease,border-color .15s ease}button:hover{background:#edf3ee;border-color:var(--green)}button:active{background:#dce8df}button:focus-visible,select:focus-visible,[tabindex]:focus-visible{outline:3px solid #b65c00;outline-offset:4px}button:disabled{color:#677269;background:#eef1ee;border-color:#ced6cf;cursor:default}button.primary,button.active{background:var(--green);border-color:var(--green);color:#fff}button.primary:hover{background:#194632}button.primary:disabled{background:#e3e9e3;border-color:#cdd7cd;color:#647166}.primary{font-size:20px}h1,h2,h3,p{margin:0}h1{font-size:22px;line-height:1.4;font-weight:700}h2{font-size:30px;line-height:1.45;font-weight:700;text-wrap:balance}h3{font-size:22px;line-height:1.5;font-weight:650;text-wrap:balance}p{margin:12px 0 20px;max-width:70ch}small{font-size:16px;line-height:1.6;color:var(--muted)}strong{font-weight:700}.muted{color:var(--muted)}header{border-bottom:1px solid var(--line);padding:20px max(24px,calc((100vw - 1080px)/2));display:flex;align-items:center;justify-content:space-between;gap:16px;background:var(--surface)}header>button{min-height:48px;padding:10px 18px;font-size:16px}main{max-width:1000px;margin:0 auto;padding:40px 32px 32px}.page-heading{display:flex;align-items:baseline;justify-content:space-between;gap:16px;margin-bottom:32px}.page-heading time{color:var(--muted);font-size:16px;font-variant-numeric:tabular-nums}.purchase{margin-bottom:48px}.purchase h3{margin-bottom:16px}.purchase-options{display:grid;grid-template-columns:1fr 1fr;gap:20px}.purchase-button{min-height:166px;text-align:left;display:flex;flex-direction:column;align-items:flex-start;padding:24px 28px;border:1px solid var(--green);background:#f6f9f6;color:#1b4732;gap:6px}.purchase-name{font-size:27px;font-weight:700}.purchase-detail{font-size:18px;font-weight:400}.purchase-next{font-size:16px;font-weight:500;margin-top:auto;padding-top:16px}.purchase-button:hover{background:#e5efe7}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:6px}.text-button{min-height:48px;padding:10px 16px;background:transparent;border-color:transparent;color:var(--green);text-decoration:underline;text-underline-offset:5px}.ledger-totals{margin:0}.ledger-totals>div{display:flex;justify-content:space-between;gap:20px;padding:16px 4px;border-bottom:1px solid var(--line);align-items:center}.ledger-totals dt{font-size:18px}.ledger-totals dd{margin:0;font-size:22px;font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap}.ledger-totals .sum-row{border-top:1px solid var(--ink);border-bottom:2px solid var(--ink);font-weight:700}.sum-row dd{font-size:30px}.month-overview{max-width:100%}.storage-note{font-size:16px;color:var(--muted);margin-top:28px}.inline-button{font-size:16px;min-height:48px;border:0;padding:10px 4px;color:var(--green);text-decoration:underline;text-underline-offset:4px}.card{border:0;border-radius:0;background:white;padding:28px 0;margin:16px 0;border-top:1px solid var(--line)}.card h3{margin-bottom:12px}.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.categories{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.categories button{min-height:80px;text-align:left;padding:18px;font-size:20px}.steps{display:flex;gap:0;margin-bottom:24px;border-bottom:1px solid var(--line)}.steps span{padding:12px 16px;color:var(--muted);font-size:16px;flex:1;text-align:center;border-bottom:3px solid transparent;white-space:nowrap}.steps .current{font-weight:700;color:var(--green);border-bottom-color:var(--green)}.tag{display:inline-block;font-size:16px;color:#235c43;background:#edf3ee;padding:4px 10px;border-radius:4px}.tag.cash{background:#f2f2f0;color:#444c43}.amount{border:1px solid var(--line);border-radius:var(--radius);text-align:right;padding:16px 22px;font-size:40px;font-weight:700;margin:20px 0;font-variant-numeric:tabular-nums}.keypad{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.keypad button{font-size:28px;min-height:68px}.actions{display:flex;gap:12px;margin-top:24px}.actions>*{flex:1;min-width:0}.line{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:16px 0;border-bottom:1px solid var(--line)}.line:last-child{border-bottom:0}.checklist{margin-top:24px}.checklist .line{align-items:flex-start}.checklist strong{text-align:right;font-size:22px}.monthbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:24px 0}.monthbar strong{font-size:25px;font-variant-numeric:tabular-nums}.monthbar button{padding:12px 18px}.summary-totals{margin:0 0 40px}.cumulative-row{margin-top:8px}.cumulative-row small{display:block;margin-top:4px;font-weight:400}.category-summary{margin:0 0 24px}.category-summary h3{margin-bottom:12px}.table-hint{font-size:16px;color:var(--muted);display:none}.tablewrap{overflow:auto;overscroll-behavior-x:contain}table{border-collapse:separate;border-spacing:0;width:100%;white-space:nowrap;font-size:17px;font-variant-numeric:tabular-nums}th,td{padding:18px 14px;text-align:right;border-bottom:1px solid var(--line)}th:first-child,td:first-child{text-align:left}thead th{font-weight:600;background:var(--surface)}tbody th{font-weight:500;background:white}thead th:first-child,tbody th,tfoot th{position:sticky;left:0;z-index:1;border-right:1px solid var(--line)}tbody tr:nth-child(even)>*{background:#f8faf8}tfoot th,tfoot td{font-weight:700;background:#edf3ee;border-bottom:2px solid var(--green)}.calendar{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px}.calendar button{min-height:54px;padding:8px}.calendar span{text-align:center;padding:8px;color:var(--muted)}.history-row{display:flex;justify-content:space-between;gap:20px;padding:24px 0;border-bottom:1px solid var(--line)}.history-row strong{font-size:24px}.empty{text-align:left;padding:32px 0}.empty h3{margin-bottom:12px}.empty .primary{min-width:220px}.danger{color:#9d3025}label{display:block;margin:16px 0}select{min-height:60px;border:1px solid #9ba99f;border-radius:var(--radius);padding:12px;background:white;color:var(--ink);margin-left:12px;max-width:100%}footer{font-size:16px;color:var(--muted);line-height:1.8;margin-top:24px}nav{position:fixed;bottom:0;left:0;right:0;border-top:1px solid var(--line);background:#fff;display:flex;justify-content:center;padding:8px 16px calc(8px + env(safe-area-inset-bottom));gap:8px;z-index:5}nav button{width:180px;min-height:68px;border:0;border-radius:6px;background:white;padding:8px 16px;display:flex;align-items:center;justify-content:center;gap:12px;font-size:18px}nav button.active{background:#edf3ee;color:#18492f;box-shadow:inset 0 -3px #235c43}nav svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}dialog{border:1px solid var(--line);border-radius:12px;max-width:560px;width:calc(100% - 32px);padding:28px;max-height:85vh;overflow:auto;color:var(--ink)}dialog::backdrop{background:#17291e80}dialog>button{width:100%;margin-top:24px}dialog h3{margin-top:28px}#toast{position:fixed;top:16px;left:50%;transform:translateX(-50%);background:#193f2b;color:white;padding:16px 24px;border-radius:8px;z-index:10;display:none;max-width:calc(100% - 32px);width:max-content}[data-view="entry"] .card{border-top:0;padding-top:8px;margin-top:16px}[data-view="entry"]:has(.keypad),[data-view="entry"]:has(.calendar),[data-view="entry"]:has(.checklist){max-width:720px}::selection{background:#d5e7d8;color:#153e28}@media(min-width:761px){.storage-note .inline-button{margin-left:8px}}@media(max-width:760px){body{padding-bottom:100px}header{padding:16px 20px}h1{font-size:20px}h2{font-size:26px}h3{font-size:21px}main{padding:28px 20px}.page-heading{margin-bottom:24px;align-items:flex-start;flex-direction:column;gap:6px}.purchase{margin-bottom:36px}.purchase-options{grid-template-columns:1fr;gap:14px}.purchase-button{min-height:122px;padding:18px 22px;position:relative}.purchase-name{font-size:26px}.purchase-next{padding-top:8px}.purchase-detail{font-size:18px}.section-heading{margin-bottom:0}.ledger-totals>div{padding:14px 0}.ledger-totals dd{font-size:23px}.sum-row dd{font-size:30px}.card{padding:24px 0}.categories{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.categories button{font-size:19px;min-height:82px;padding:14px 12px}.steps span{font-size:15px;padding:12px 4px}.steps{margin-bottom:20px}.monthbar strong{font-size:22px}.monthbar button{padding:12px;min-height:56px}.cumulative-row{align-items:flex-start!important;flex-direction:column;gap:8px!important}.cumulative-row dd{align-self:flex-end;font-size:28px}.cumulative-row small{font-size:16px}.table-hint{display:block}.tablewrap{margin-right:-20px}th,td{padding:16px 12px;font-size:17px}.tablewrap th:first-child{max-width:156px;white-space:normal;min-width:140px}.history-row{flex-wrap:wrap}.history-row>div:last-child{margin-left:auto;text-align:right}.actions{gap:10px}.actions button{padding:14px 12px;font-size:18px}.calendar{gap:4px}.calendar button{min-height:48px;padding:6px}.calendar span{padding:4px}.keypad{gap:10px}.keypad button{min-height:64px}.checklist .line{flex-wrap:wrap}.checklist .line strong{margin-left:auto}.grid:has([data-action="backup"]){grid-template-columns:1fr}.storage-note{margin-top:24px}nav{padding:6px 6px calc(6px + env(safe-area-inset-bottom));gap:4px}nav button{flex:1;width:auto;min-width:0;min-height:68px;font-size:16px;flex-direction:column;gap:4px;padding:6px 2px}nav svg{width:23px;height:23px}dialog{padding:24px}}@media(prefers-reduced-motion:reduce){*{transition:none!important}}@media print{header>button,nav,[data-action],.storage-note{display:none!important}body{padding:0}main{max-width:none;padding:0}.tablewrap{overflow:visible}th,td{font-size:12px;padding:8px}.table-hint{display:none}}

/* Opaque backgrounds belong to each sticky cell, including the total row. */
.tablewrap{isolation:isolate}tfoot th{background-color:#edf3ee;z-index:2}tfoot td{background-color:#edf3ee}.storage-error{border:1px solid #9d3025;border-radius:8px;padding:20px;margin-bottom:28px}.storage-error strong{color:#9d3025}

[hidden]{display:none!important}.connection-bar{max-width:1000px;margin:0 auto;padding:20px 32px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:20px}.connection-bar strong,.connection-bar span{display:block}.connection-bar span{font-size:16px;color:var(--muted);overflow-wrap:anywhere}.connection-actions{display:flex;gap:12px;flex-shrink:0}.connection-actions button{font-size:17px;padding:12px 16px}.account-panel{max-width:560px;margin:12px auto 0}.account-panel h2{margin-bottom:16px}.account-panel label{margin:24px 0 8px;font-weight:600}.account-panel input{width:100%;min-height:64px;padding:14px 16px;border:1px solid #9ba99f;border-radius:var(--radius);font:inherit;font-size:20px;background:#fff;color:var(--ink)}.account-panel input:focus-visible{outline:3px solid #b65c00;outline-offset:3px}.account-panel input:disabled{background:#eef1ee}.account-panel form>.primary{width:100%;margin-top:8px}.account-message{color:#9d3025;min-height:28px;margin:16px 0 8px;overflow-wrap:anywhere}.auth-links,.auth-actions{display:grid;gap:12px;margin-top:24px}.password-toggle{display:block;margin:8px 0 0 auto}.account-note{font-size:16px;margin-top:28px}@media(max-width:760px){.connection-bar{padding:16px 20px;align-items:stretch;flex-direction:column;gap:12px}.connection-actions{gap:10px}.connection-actions button{flex:1;font-size:17px}.account-panel{margin-top:0}.account-panel h2{font-size:27px}}@media print{.connection-bar{display:none}}

.account-panel .remember-choice{display:flex;align-items:flex-start;gap:12px;font-weight:400;margin-top:20px;padding:12px 0}.account-panel .remember-choice input{width:26px;height:26px;min-height:26px;flex-shrink:0;margin:3px 0 0;accent-color:var(--green)}.remember-choice span{font-size:17px}

/* The same task frame is used for every expense-entry step. */
.home-account{padding:0 0 24px;border-bottom:1px solid var(--line)}.home-account h3{margin-bottom:12px}.home-email{margin:0 0 8px;overflow-wrap:anywhere;font-weight:600}.home-account p{margin:8px 0 16px}.home-account-actions{display:flex;gap:12px;flex-wrap:wrap}.home-account-actions button{flex:1}.home-shortcuts{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:28px 0 40px}
[data-entry]:not([data-entry=""]) body{padding-bottom:0}
[data-entry]:not([data-entry=""]) header,[data-entry]:not([data-entry=""]) #connection,[data-entry]:not([data-entry=""]) nav{display:none!important}
[data-entry]:not([data-entry=""]) main{width:100%;max-width:720px;height:100vh;height:100dvh;padding:16px 20px max(16px,env(safe-area-inset-bottom));margin:0 auto;box-sizing:border-box}
.entry-screen{height:100%;display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;gap:12px}
.entry-screen-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}.entry-screen-heading h2{display:flex;align-items:center;gap:12px;font-size:26px;white-space:nowrap}.entry-progress{font-size:16px;font-weight:500;color:var(--muted)}.entry-cancel{min-height:48px;padding:10px 12px;font-size:17px}
.entry-context{display:flex;align-items:baseline;gap:4px 12px;flex-wrap:wrap;margin:0;font-size:16px;line-height:1.4}.entry-context span{color:var(--muted)}
.entry-body{min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;scrollbar-color:#9ba99f #f3f6f3}.entry-body:has(.entry-amount){scrollbar-gutter:auto}.entry-instruction{font-size:16px;line-height:1.5;color:var(--muted);margin:0 0 16px}.entry-body .categories button{min-height:72px}
.entry-actions{display:grid;grid-template-columns:1fr 1.3fr;gap:12px;border-top:1px solid var(--line);padding-top:12px}.entry-actions button{min-height:60px;padding:12px 10px;font-size:20px}
.date-shortcuts{display:grid;grid-template-columns:1fr 1fr;gap:12px}.date-shortcuts button{min-height:56px}.date-selection{font-size:16px;margin:12px 0;color:var(--muted)}.date-selection strong{color:var(--ink);font-variant-numeric:tabular-nums}.entry-body .monthbar{margin:12px 0;display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:8px;text-align:center}.entry-body .monthbar button{min-height:48px;min-width:56px;font-size:17px;padding:10px 8px;white-space:nowrap}.entry-body .monthbar strong{font-size:20px;white-space:nowrap}
.entry-amount{display:grid;grid-template-rows:auto minmax(216px,1fr);gap:12px;height:100%;min-height:290px}.entry-amount .amount{margin:0;padding:8px 16px;font-size:36px;line-height:1.35}.entry-amount .keypad{grid-template-rows:repeat(4,minmax(48px,1fr));gap:10px;min-height:0}.entry-amount .keypad button{min-height:48px;font-size:30px;padding:8px 12px}
.entry-confirmation{margin:0}.entry-confirmation>div{padding:16px 0;border-bottom:1px solid var(--line);display:flex;align-items:baseline;justify-content:space-between;gap:12px}.entry-confirmation dt{font-size:17px;color:var(--muted);flex-shrink:0}.entry-confirmation dd{margin:0;font-size:22px;font-weight:600;text-align:right}.entry-confirmation .confirmation-amount{border-bottom:2px solid var(--ink);align-items:center}.confirmation-amount dd{font-size:32px;font-variant-numeric:tabular-nums}
@media(max-width:760px){.home-shortcuts{grid-template-columns:1fr}.entry-body .categories{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.entry-body .categories button{font-size:19px;padding:14px 12px}.entry-screen-heading h2{font-size:24px}.entry-confirmation>div{flex-wrap:wrap}.entry-confirmation dd{margin-left:auto}}
@media(max-height:650px){[data-entry]:not([data-entry=""]) main{padding:10px 12px max(10px,env(safe-area-inset-bottom))}.entry-screen{gap:8px}.entry-actions{padding-top:8px;gap:10px}.entry-actions button{min-height:56px;font-size:19px}.entry-amount{gap:8px}.entry-amount .amount{padding:6px 12px;font-size:32px}.entry-amount .keypad{gap:8px}}
@media(max-height:500px) and (orientation:landscape){[data-entry]:not([data-entry=""]) main{max-width:1000px}.entry-screen[data-step="2"]{grid-template-columns:1fr 1.15fr;grid-template-rows:auto auto 1fr auto;column-gap:20px}.entry-screen[data-step="2"] .entry-screen-heading{grid-column:1}.entry-screen[data-step="2"] .entry-context{grid-column:1}.entry-screen[data-step="2"] .entry-body,.entry-screen[data-step="2"] .entry-amount{display:contents}.entry-screen[data-step="2"] .amount{grid-column:1;align-self:start}.entry-screen[data-step="2"] .keypad{grid-column:2;grid-row:1/5}.entry-screen[data-step="2"] .entry-actions{grid-column:1}.entry-screen[data-step="2"] .entry-actions button{font-size:17px}}
@media(max-width:350px){.entry-screen[data-step="1"] .entry-body{width:calc(100% + 24px);margin-inline:-12px;scrollbar-gutter:auto}.entry-screen[data-step="1"] .date-shortcuts,.entry-screen[data-step="1"] .date-selection,.entry-screen[data-step="1"] .monthbar{margin-left:12px;margin-right:12px}.entry-screen[data-step="1"] .calendar{grid-template-columns:repeat(7,minmax(44px,1fr));gap:2px}}
