/* Ledger delivery: monochrome shell, semantic category colors, local input. */
body[data-page=ledger] .workspace,body[data-page=ledger] #scroll-area{background:#f7f7f7}
body[data-page=ledger] #scroll-area{padding:0!important;scrollbar-width:none}
body[data-page=ledger] #view{padding:0!important;margin:0!important;max-width:none}
body[data-page=ledger] #quick-nav,body[data-page=ledger] #record-write,body[data-page=ledger] #record-dock-surface,body[data-page=ledger] .record-dock-surface,body[data-page=ledger] .bottom-area,body[data-page=ledger] .preview-status{display:none!important}
.lg-screen,.lg-dialog{font-family:-apple-system,BlinkMacSystemFont,'PingFang SC','Helvetica Neue',sans-serif;color:#202020;font-size:15px;line-height:24px;font-variant-numeric:tabular-nums}
.lg-screen *,.lg-dialog *{box-sizing:border-box;scrollbar-width:none}.lg-screen *::-webkit-scrollbar,.lg-dialog *::-webkit-scrollbar{display:none}
.lg-screen button,.lg-dialog button{font:inherit;color:inherit;cursor:pointer;border:0;background:transparent;touch-action:manipulation}.lg-screen button:disabled{opacity:.3;cursor:default}.lg-screen button:focus-visible,.lg-dialog button:focus-visible{outline:2px solid #202020;outline-offset:2px}.lg-screen input,.lg-dialog input{font:inherit;min-width:0;outline:0}.lg-screen input:focus-visible,.lg-dialog input:focus-visible{box-shadow:inset 0 -2px #626262}
.lg-screen h1,.lg-screen h2,.lg-screen h3,.lg-screen p,.lg-dialog h2,.lg-dialog h3,.lg-dialog p,.lg-dialog dl{margin:0}.lg-screen svg,.lg-dialog svg{width:22px;height:22px;flex-shrink:0}.lg-screen small{display:block;font-size:13px;line-height:20px;color:#8a8a8a}
.lg-screen{min-height:100%;background:#f7f7f7;padding-bottom:40px}.lg-list{padding-bottom:110px}.lg-header{display:flex;align-items:center;height:128px;padding:56px 8px 0 4px;gap:0}.lg-header h1{font-size:20px;line-height:28px;font-weight:600;flex:1}.lg-header .icon-button,.lg-entry-header .icon-button{width:44px;height:44px;display:flex;align-items:center;justify-content:center;padding:0}.lg-header svg{width:24px;height:24px}
.lg-content{padding:0 16px}.lg-budget{padding:16px 16px 20px;border-radius:28px;background:#fff}.lg-card-heading{display:flex;align-items:center;justify-content:space-between}.lg-card-heading h2{font-size:17px;line-height:24px;font-weight:600}.lg-card-heading button{display:flex;align-items:center;gap:6px;height:44px;padding:0;color:#626262}.lg-card-heading svg{width:18px;height:18px}.lg-ring{width:180px;height:158px;position:relative;margin:6px auto 10px}.lg-ring>svg{width:100%;height:100%;fill:none;stroke:#FFF0B5;stroke-width:12;stroke-linecap:round}.lg-ring>svg .lg-ring-progress{stroke:#FFB300}.lg-ring>div{position:absolute;left:-30px;right:-30px;top:39px;text-align:center}.lg-ring small{font-size:13px;color:#626262}.lg-ring strong{display:block;font-size:28px;line-height:36px;overflow-wrap:anywhere;letter-spacing:-.025em}.lg-ring span,.lg-ring span button{font-size:13px;line-height:22px;color:#8a8a8a}.lg-ring span button{min-height:32px;text-decoration:underline;text-underline-offset:3px}.lg-budget.is-over .lg-ring>svg{stroke:#FCE3E3}.lg-budget.is-over .lg-ring-progress{stroke:#E5484D}.lg-budget.is-over .lg-ring strong,.lg-budget.is-over .lg-ring small{color:#C92A2A}.lg-stats{border-top:1px solid #eee;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));text-align:center;padding-top:10px;gap:4px}.lg-stats b{font-size:16px;line-height:24px;display:block;overflow-wrap:anywhere}.lg-section-title{font-size:17px;line-height:24px;padding:22px 4px 14px;font-weight:600}.lg-segments{display:flex;background:#ebebeb;border-radius:999px;padding:4px;gap:4px;min-height:48px}.lg-segments button{flex:1;min-width:0;border-radius:999px;min-height:40px;color:#626262;font-size:17px;font-weight:600;padding:0 8px}.lg-segments button[aria-pressed=true]{background:#fff;color:#202020;box-shadow:0 2px 5px #00000012}.lg-period{display:flex;align-items:center;gap:12px;margin:18px 4px 2px;min-height:42px}.lg-period strong{font-size:20px;line-height:28px;font-weight:600}.lg-period .icon-button{width:36px;height:36px;min-width:36px;min-height:36px;border-radius:50%;background:#e8e8e8;display:grid;place-items:center;padding:0}.lg-period svg{width:20px;height:20px}.lg-subtotal{font-size:13px;line-height:20px;color:#8a8a8a;padding:0 4px 14px!important}.lg-day,.lg-summary{background:#fff;border-radius:24px;padding:4px 16px;margin-bottom:12px}.lg-group-title{display:flex;justify-content:space-between;gap:8px;padding:16px 0 8px;color:#8a8a8a;font-size:13px;line-height:20px}.lg-entry-row{display:flex;gap:12px;align-items:center;min-height:72px;width:100%;text-align:left;padding:10px 0;border-bottom:1px solid #eee!important}.lg-entry-row:last-child{border-bottom:0!important}.lg-cat-icon{width:38px;height:38px;border:1px solid var(--cat);border-radius:50%;display:flex;justify-content:center;align-items:center;color:var(--cat);flex-shrink:0}.lg-cat-icon svg{width:22px;height:22px}.lg-row-copy{flex:1;min-width:0}.lg-row-copy strong{display:block;font-size:16px;line-height:24px;font-weight:400;overflow-wrap:anywhere}.lg-row-copy small{overflow-wrap:anywhere}.lg-entry-row>b{font-size:16px;font-weight:600;max-width:46%;overflow-wrap:anywhere}.lg-income{color:#259568!important}.lg-account-link{background:#fff!important;border-radius:24px;width:100%;display:flex;justify-content:space-between;align-items:center;gap:8px;padding:16px;margin:16px 0 4px;text-align:left}.lg-account-link>span:first-child{font-weight:500}.lg-account-link>span:last-child{display:flex;gap:4px;align-items:center;font-size:13px;color:#626262;min-width:0;overflow-wrap:anywhere}.lg-account-link svg{width:16px;height:16px}.lg-trash-link{min-height:44px;color:#8a8a8a!important;font-size:13px!important}.lg-empty{text-align:center;color:#8a8a8a;background:#fff;border-radius:24px;padding:40px 16px}.lg-summary-row{display:flex;width:100%;align-items:center;gap:10px;min-height:84px;border-bottom:1px solid #eee!important;padding:12px 0;text-align:left}.lg-summary-row:last-child{border-bottom:0!important}.lg-summary-row>span{min-width:0;flex:1}.lg-summary-row strong{font-size:16px;font-weight:500}.lg-summary-row small{font-size:12px}.lg-summary-row>b{font-size:15px;max-width:42%;overflow-wrap:anywhere}.lg-summary-row>svg{width:16px;color:#aaa}
.lg-footer{position:absolute;left:0;right:0;bottom:0;background:#fff;border-top:1px solid #eee;padding:12px 16px calc(18px + env(safe-area-inset-bottom));z-index:8}.lg-footer button{height:52px;width:100%;border-radius:999px;background:#202020;color:#fff;font-size:17px;font-weight:600}
.lg-entry-screen{height:100%;min-height:100%;padding:0 16px calc(20px + env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:0}.lg-entry{height:100%;padding-bottom:0}.lg-entry-header{display:flex;justify-content:space-between;align-items:center;flex-shrink:0;height:116px;padding:56px 0 16px;margin:0 -12px}.lg-entry-header .lg-segments{width:148px;min-height:44px;border-radius:12px;background:#f0f0f0}.lg-entry-header .lg-segments button{min-height:36px;border-radius:9px;font-size:15px}.lg-entry-header>span{width:44px}
.lg-entry-card{background:white;border-radius:20px;display:flex;flex-direction:column;flex:1;min-height:310px;overflow:hidden}.lg-amount-row{display:flex;align-items:center;gap:12px;padding:18px 16px 12px;flex-shrink:0}.lg-amount-row>.lg-cat-icon{width:40px;height:40px;border-width:2px}.lg-amount-row>strong{font-size:17px;white-space:nowrap}.lg-amount-row>output{flex:1;text-align:right;font-size:34px;line-height:40px;font-weight:600;min-width:0;overflow-x:auto;white-space:nowrap}.lg-amount-row>output.is-empty{color:#b5b5b5}
.lg-category-scroll{overflow-y:auto;flex:1;min-height:150px;padding:8px 12px 16px;overscroll-behavior:contain}.lg-categories{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px 4px;align-content:start}.lg-categories>button{display:flex;flex-direction:column;align-items:center;gap:4px;padding:0;min-height:68px;min-width:0;font-size:13px;color:#626262}.lg-categories .lg-cat-icon{width:46px;height:46px;border:2px solid transparent;background:color-mix(in srgb,var(--cat) 10%,white);color:var(--cat)}.lg-categories .lg-cat-icon svg{width:24px;height:24px}.lg-categories [aria-pressed=true] .lg-cat-icon{background:white;border-color:var(--cat)}.lg-categories [aria-pressed=true]{color:var(--cat);font-weight:600}.lg-categories button>span:last-child{line-height:20px;overflow-wrap:anywhere;max-width:100%}.lg-category-add>span:first-child{width:46px;height:46px;border:1px dashed #b5b5b5;border-radius:50%;display:grid;place-items:center;color:#8a8a8a}.lg-category-add>span:first-child svg{width:24px;height:24px}
.lg-entry-info{display:flex;gap:10px;align-items:center;border-top:1px solid #eee;min-height:49px;padding:0 16px;flex-shrink:0}.lg-entry-info svg{width:20px;height:20px;color:#8a8a8a}.lg-date-label{position:relative;display:flex;gap:8px;align-items:center;white-space:nowrap;min-height:44px;font-size:15px}.lg-date-label input{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%}.lg-date-label input::-webkit-calendar-picker-indicator{position:absolute;inset:0;width:100%;height:100%;cursor:pointer}.lg-note-label{border-left:1px solid #e5e5e5;display:flex;align-items:center;gap:8px;padding-left:10px;flex:1;min-width:0}.lg-note-label input{border:0;background:transparent;padding:0;width:100%;font-size:16px;height:44px}.lg-note-label input::placeholder{color:#8a8a8a}.lg-accounts-strip{display:flex;align-items:center;padding:4px 16px 8px;gap:8px;border-top:1px solid #eee;flex-shrink:0}.lg-accounts-strip>span{display:flex;color:#8a8a8a}.lg-accounts-strip>div{display:flex;gap:4px;overflow-x:auto;white-space:nowrap;min-width:0;flex:1}.lg-accounts-strip button{padding:0 12px;min-height:36px;color:#8a8a8a;flex-shrink:0;font-size:15px;border-radius:999px}.lg-accounts-strip button.selected{background:#ebebeb;font-weight:600;color:#202020}
.lg-error{font-size:13px;line-height:20px;color:#c92a2a;min-height:16px;flex-shrink:0}.lg-error:empty{height:16px}.lg-keypad{display:grid;grid-template-columns:repeat(3,minmax(0,1fr)) minmax(0,1.78fr);gap:8px;flex-shrink:0}.lg-keypad button{height:48px;border-radius:16px;background:#fff;font-size:24px;font-weight:500;padding:0;display:flex;align-items:center;justify-content:center}.lg-keypad [data-lg-key=again]{font-size:15px;font-weight:400}.lg-keypad [data-lg-key=again]:disabled{visibility:hidden}.lg-keypad .lg-key-gray{background:#ebebeb}.lg-keypad .lg-key-ok{border-radius:999px;background:#202020;color:#fff;font-size:22px;font-weight:600}.lg-keypad svg{width:25px;height:25px}
.lg-assets{background:#fff;border-radius:24px;padding:16px;margin-bottom:12px}.lg-assets>strong{font-size:30px;line-height:40px;display:block;overflow-wrap:anywhere}.lg-assets>p{font-size:13px;line-height:20px;color:#8a8a8a}.lg-account-list{border-radius:24px;padding:0 16px;background:#fff}.lg-account-list>button{display:flex;align-items:center;width:100%;gap:10px;min-height:64px;text-align:left;border-bottom:1px solid #eee!important;padding:10px 0}.lg-account-list>button:last-child{border-bottom:0!important}.lg-account-list>button>span{flex:1;min-width:0}.lg-account-list strong{font-size:16px;line-height:24px;font-weight:400;overflow-wrap:anywhere}.lg-account-list b{font-size:16px;max-width:50%;overflow-wrap:anywhere}.lg-account-list svg{width:16px;height:16px;color:#b5b5b5}.lg-new-account{margin-top:28px;background:#fff!important;border-radius:24px;width:100%;min-height:52px;font-size:17px!important;font-weight:600!important}.lg-preference{display:flex;align-items:center;justify-content:space-between;min-height:58px;padding:0 16px;width:100%;background:#fff!important;border-radius:20px;font-size:16px!important}.lg-preference>span:last-child{display:flex;align-items:center;color:#626262;gap:4px}.lg-preference svg{width:18px}.lg-help{font-size:13px;line-height:20px;color:#8a8a8a;padding:10px 4px!important}
#ledger-dialog{border:0;padding:20px 20px 0;max-height:calc(100dvh - 32px);overflow-y:auto;background:#fff;box-shadow:none;outline:0;width:min(370px,calc(100% - 32px));border-radius:28px;margin:auto auto 24px}#ledger-dialog::backdrop{background:rgba(0,0,0,.35)}#ledger-dialog.lg-center{width:min(314px,calc(100% - 48px));margin:auto}#ledger-dialog.lg-menu{margin:104px 16px auto auto;width:220px;padding:10px 16px}.lg-modal-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.lg-modal-head h2{font-size:17px;line-height:24px;font-weight:600}.lg-modal-head>.icon-button{width:36px;height:36px;display:grid;place-items:center;padding:0;border-radius:50%;background:#f7f7f7}.lg-modal-head svg{width:18px;height:18px}.lg-center .lg-modal-head>.icon-button{display:none}.lg-dialog label{display:block;font-size:15px;line-height:24px;color:#626262;margin:10px 0 6px}.lg-dialog input{border:0;border-radius:12px;background:#f2f2f2;height:48px;width:100%;padding:0 14px;font-size:16px}.lg-field-line{display:flex;gap:10px;align-items:center;padding:4px 0 8px}.lg-field-line span{font-size:15px;color:#626262;white-space:nowrap}.lg-dialog-actions{border-top:1px solid #f0f0f0;display:flex;height:60px;align-items:center;margin-top:8px}.lg-dialog-actions>button{height:48px;flex:1;font-size:17px;font-weight:600}.lg-dialog-actions>button+button{border-left:1px solid #e6e6e6}.lg-form-error{font-size:13px;line-height:20px;color:#c92a2a}.lg-form-error:not(:empty){padding:10px 0!important}.lg-danger{color:#c92a2a!important}.lg-delete-account{width:100%;min-height:52px;border-top:1px solid #eee!important}.lg-detail-title{display:flex;align-items:center;flex-direction:column;gap:6px;padding:0 0 16px}.lg-detail-title>span:not(.lg-cat-icon){font-size:15px;color:#626262;overflow-wrap:anywhere}.lg-detail-title strong{font-size:32px;line-height:40px;max-width:100%;overflow-wrap:anywhere}.lg-detail-fields{border-top:1px solid #eee}.lg-detail-fields>div{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:48px;border-bottom:1px solid #eee}.lg-detail-fields>div:last-child{border:0}.lg-detail-fields dt{font-size:15px;color:#8a8a8a;white-space:nowrap}.lg-detail-fields dd{margin:0;text-align:right;font-size:15px;overflow-wrap:anywhere}.lg-menu .lg-modal-head{display:none}.lg-menu button{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:48px}.lg-menu svg{width:18px;height:18px}.lg-icon-groups{max-height:45dvh;overflow:auto;padding:4px 0}.lg-icon-groups h3{font-size:13px;color:#626262;font-weight:500;padding:14px 0 6px}.lg-icon-groups section>div{display:flex;flex-wrap:wrap;gap:8px}.lg-icon-groups button{width:44px;height:44px;display:grid;place-items:center;background:#f2f2f2;border-radius:50%}.lg-icon-groups button[aria-pressed=true]{background:#202020;color:#fff}.lg-deleted-list{max-height:50dvh;overflow:auto}.lg-deleted-list>div{display:flex;align-items:center;gap:12px;min-height:56px}.lg-deleted-list>div>span{flex:1;overflow-wrap:anywhere}.lg-deleted-list button{min-height:44px}
#ledger-notice{position:fixed;z-index:100;left:50%;bottom:calc(104px + env(safe-area-inset-bottom));transform:translateX(-50%);max-width:calc(100% - 32px);width:max-content;display:flex;align-items:center;gap:16px;padding:12px 16px;background:#202020;color:#fff;border-radius:16px;font-size:14px;line-height:22px;box-shadow:0 6px 24px #0002}#ledger-notice[hidden]{display:none}#ledger-notice button{border:0;background:transparent;color:#fff;font:inherit;font-weight:600;min-height:32px;white-space:nowrap;padding:0}#ledger-dialog #ledger-notice{position:sticky;transform:none;left:auto;bottom:12px;max-width:100%;margin:8px auto 12px}.lg-entry-screen ::selection,.lg-dialog ::selection{background:#ddd;color:#202020}
@media(max-width:360px){.lg-period{gap:8px}.lg-period strong{font-size:18px}.lg-entry-screen{padding-left:12px;padding-right:12px}.lg-amount-row{gap:8px;padding-left:12px;padding-right:12px}.lg-amount-row>output{font-size:29px}.lg-category-scroll{padding-left:6px;padding-right:6px}.lg-categories .lg-cat-icon,.lg-category-add>span:first-child{width:42px;height:42px}.lg-categories{gap:8px 2px}.lg-entry-info{padding:0 12px;gap:8px}.lg-note-label{gap:6px;padding-left:8px}.lg-date-label{gap:6px;font-size:14px}.lg-note-label>svg{display:none}.lg-accounts-strip{padding-left:12px;padding-right:12px}.lg-accounts-strip button{padding:0 10px;font-size:14px}.lg-accounts-strip{gap:6px}.lg-keypad{gap:8px}.lg-keypad button{height:44px}.lg-keypad [data-lg-key=again]{font-size:14px}.lg-entry-header{height:112px}.lg-account-link{padding:14px 12px}.lg-account-link>span:last-child{font-size:12px}.lg-stats b{font-size:14px}.lg-entry-row{gap:8px}.lg-entry-row>b{font-size:15px}.lg-row-copy strong{font-size:15px}.lg-ring{height:158px}.lg-group-title{font-size:12px}}
@media(max-height:660px){.lg-entry-header{height:80px;padding-top:20px}.lg-entry-screen{height:auto;min-height:100%;padding-bottom:16px}.lg-entry-card{min-height:310px;flex:none}.lg-category-scroll{max-height:200px}.lg-keypad button{height:44px}}
@media(min-width:762px){.lg-screen{max-width:520px;margin:auto}.lg-entry{height:100%}.lg-footer{left:50%;right:auto;transform:translateX(-50%);width:min(520px,100%)}.lg-entry-header{padding-top:24px;height:92px}}
/* The shared dock reserves 88px in #view; this screen owns its footer. */
body[data-page=ledger] #view{height:auto!important;min-height:100%}
.lg-entry-screen{height:100dvh;min-height:100dvh}
.lg-date-label .local-date-control{position:absolute;inset:0;opacity:0;width:100%;height:44px;min-width:0}
.lg-date-label .local-date-control input{position:absolute;inset:0;width:100%;height:44px;padding:0;border:0;cursor:pointer}
.lg-date-label .local-date-control>svg{display:none}
@media(max-height:660px){.lg-entry-screen{height:auto}}
.lg-budget{padding-bottom:16px}.lg-ring{height:150px;margin:4px auto}.lg-stats{padding-top:12px}.lg-stats small{font-size:12px;line-height:16px}.lg-stats b{font-size:15px;line-height:22px}
@media(max-width:360px){.lg-ring{height:150px}.lg-stats b{font-size:14px}}
@media(min-width:361px) and (max-width:761px){.lg-entry-header{height:132px;padding-top:68px;padding-bottom:20px}}
body[data-ledger-screen=entry]>#ledger-notice{top:12px;bottom:auto}
/* Delivery 12: full-width category sheet and six-column icon groups. */
#ledger-dialog.lg-category-modal{width:min(480px,100%);max-width:480px!important;height:min(640px,calc(100dvh - 64px));max-height:calc(100dvh - 64px);padding:20px 16px 0;margin:auto auto 0;border-radius:28px 28px 0 0;overflow:hidden}
.lg-category-modal .lg-modal-head{justify-content:center;margin-bottom:12px;height:24px;flex:none}.lg-category-modal .lg-modal-head>.icon-button{display:none}
#lg-category-form{display:flex;flex-direction:column;height:calc(100% - 36px);min-height:0}
.lg-category-name-line{height:76px;flex:none;display:flex;align-items:center;gap:12px;border-bottom:1px solid #eee;padding-bottom:12px}
.lg-category-preview{width:44px;height:44px;flex-shrink:0;display:grid;place-items:center;border:1px dashed #b5b5b5;border-radius:50%;color:#b5b5b5}.lg-category-preview>svg{width:24px;height:24px}.lg-category-preview.chosen{border-style:solid;color:#626262}
.lg-category-name-line input{padding:0;border-radius:0;background:none;font-size:16px}
.lg-category-modal .lg-icon-groups{max-height:none;min-height:0;flex:1;overflow:auto;padding:24px 4px 16px}
.lg-category-modal .lg-icon-groups h3{font-size:13px;font-weight:400;color:#8a8a8a;padding:14px 0 16px}
.lg-category-modal .lg-icon-groups section>div{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:16px 10px;padding:0 4px}
.lg-category-modal .lg-icon-groups button{width:44px;height:44px;background:#f5f5f5;color:#626262;justify-self:center}.lg-category-modal .lg-icon-groups button[aria-pressed=true]{background:#202020;color:white}.lg-category-modal .lg-icon-groups svg{width:24px;height:24px}
.lg-category-modal .lg-dialog-actions{flex:none;gap:12px;height:84px;margin:0;border-top:1px solid #eee;background:#fff;padding:12px 0 20px}
.lg-category-modal .lg-dialog-actions button{height:52px;border-radius:999px;background:#f2f2f2;border:0!important}.lg-category-modal .lg-dialog-actions button[type=submit]{background:#202020;color:#fff}
/* Delivery 19/20: compact centered account dialog with inline actions. */
#ledger-dialog.lg-account-modal{width:min(338px,calc(100% - 48px));margin:auto;padding:20px 20px 0}
.lg-account-modal .lg-modal-head{height:24px;margin-bottom:12px;padding:0 4px}.lg-account-modal .lg-modal-head>.icon-button{display:none}
.lg-account-fields{display:flex;flex-direction:column;gap:10px}.lg-account-fields input{background:#f6f6f6}.lg-account-fields .lg-field-line{padding:0;gap:8px}.lg-account-fields .lg-form-error{min-height:18px;line-height:18px;padding:0 4px!important}.lg-account-fields .lg-form-error:not(:empty){padding:0 4px!important}.lg-account-modal .lg-dialog-actions{margin-top:4px}
@media(max-width:360px){.lg-category-modal .lg-icon-groups section>div{gap:12px 2px;padding:0}.lg-category-modal .lg-icon-groups button{width:40px;height:40px}.lg-category-modal .lg-icon-groups svg{width:22px;height:22px}.lg-account-modal .lg-dialog-actions button{font-size:16px}}
.lg-category-name-line{height:58px}.lg-category-modal .lg-dialog-actions{height:88px;padding-bottom:24px}
