:root{font-family:system-ui,sans-serif;color:#25372e;background:#f4f4ec;font-size:15px;line-height:1.5}*{box-sizing:border-box}body{margin:0}main{max-width:640px;margin:auto;padding:26px 22px 100px;background:#fffdf8;min-height:100vh}header,.row{display:flex;align-items:center;justify-content:space-between;gap:12px}header{margin-bottom:26px}.brand{font-size:32px;font-weight:750;letter-spacing:-1.5px;text-decoration:none;color:inherit;line-height:1.15}.brand span{color:#76913e}.brand small{display:block;font-size:12px;font-weight:400;letter-spacing:0;margin-top:5px}.muted,small{color:#69756b;font-size:12px}h1{font-size:24px}h2{font-size:18px;margin:0}h3{font-size:16px}p{margin:7px 0 14px}button,.button{font:inherit;border:1px solid #dfe4d7;border-radius:12px;padding:11px 14px;background:#fffdf8;color:#25372e;cursor:pointer;min-height:44px;text-decoration:none;display:inline-block}button:disabled{opacity:.55;cursor:wait}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #76913e;outline-offset:2px}.primary{background:#25372e;color:#fffdf8;border:0;width:100%;margin:12px 0}.card{padding:24px;border-radius:22px;background:#d6ed9c;margin:22px 0}.card .amount{font-size:40px;letter-spacing:-1px;font-weight:650}.quick{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0 28px}.item{padding:16px 0;border-bottom:1px solid #e5e7dd}.item button{border:0;text-align:left;padding:0;background:none;flex:1}.money{white-space:nowrap;font-weight:650}.tag{font-size:11px;background:#edf0e5;border-radius:5px;padding:2px 6px}nav{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:min(640px,100%);display:flex;padding:12px 10px max(12px,env(safe-area-inset-bottom));background:#fffdf8f5;border-top:1px solid #e5e7dd;gap:3px;z-index:2}nav button{flex:1;padding:10px 4px;border:0;font-size:13px}nav button.active{background:#edf0e5}label{display:block;margin:14px 0 6px;flex:1;min-width:0}input,select,textarea{font:inherit;display:block;width:100%;padding:12px;border:1px solid #dfe4d7;border-radius:10px;background:#fffdf8;color:inherit;min-width:0;margin-top:5px}input[type=checkbox]{width:auto;display:inline-block}.check{display:flex;gap:10px;align-items:center}dialog{border:1px solid #dfe4d7;border-radius:22px;background:#fffdf8;color:inherit;width:calc(100% - 24px);max-width:580px;padding:24px;max-height:92dvh}dialog::backdrop{background:#25372e80}dialog header{margin-bottom:12px}fieldset{border:1px solid #e5e7dd;border-radius:12px;margin:18px 0;padding:12px}.person{display:grid;grid-template-columns:1fr 80px 110px;gap:8px;align-items:center}.person label{font-size:12px;margin:4px 0}.danger{color:#a2342d}#error,#form-error,#options-error{color:#9c3028;white-space:pre-line}table{width:100%;border-collapse:collapse;font-size:13px}td,th{text-align:left;padding:10px 4px;border-bottom:1px solid #e5e7dd}.filters{display:grid;grid-template-columns:1fr 1fr;gap:8px}.filters label{margin:0}[hidden]{display:none!important}.empty{padding:30px 0;color:#69756b}.section{margin-top:24px}@media(max-width:360px){main{padding:20px 14px 95px}.person{grid-template-columns:1fr 65px 95px}dialog{padding:16px}.card .amount{font-size:34px}}
/* Mobile form: readable fields prevent focus magnification; pinch zoom stays available. */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
input,select,textarea{font-size:16px;line-height:1.25;min-height:44px}
body.editor-open{overflow:hidden}
#editor{padding:0;overflow:hidden;max-height:calc(100dvh - 24px);width:calc(100% - 24px)}
#entry{display:flex;flex-direction:column;max-height:calc(100dvh - 26px);min-height:0}
.entry-header{flex:none;margin:0;padding:12px 16px;border-bottom:1px solid #e5e7dd}
.entry-header button{padding:8px 10px}
.entry-body{padding:6px 16px 10px;overflow-y:auto;overscroll-behavior:contain;min-height:0}
.entry-body>label{margin:8px 0}
.entry-body label{font-size:13px;line-height:1.3}
.entry-body input,.entry-body select{margin-top:4px;padding:9px 10px}
.entry-body .row label{margin:4px 0 8px}
.amount-row .currency-label{flex:0 0 100px}
.entry-quick{margin:6px 0 8px;gap:6px;flex-wrap:nowrap;overflow-x:auto;padding:2px 0}
.entry-quick button{flex:none;padding:8px 12px;white-space:nowrap}
#split{margin:10px 0;padding:8px 10px}
#split legend{font-size:13px;padding:0 4px}
.split-buttons{display:flex;gap:6px}
.split-buttons button{flex:1;padding:8px 6px;font-size:13px;white-space:nowrap}
.split-buttons [aria-pressed=true]{background:#edf0e5;border-color:#76913e}
#split-preview{display:flex;flex-wrap:wrap;gap:6px 16px;padding:10px 0 6px}
#split-preview>span{display:flex;flex:1;min-width:110px;justify-content:space-between;gap:8px;font-size:13px}
#split-preview strong{white-space:nowrap}
#split details summary,#more-options summary{cursor:pointer;min-height:40px;display:list-item;align-content:center;font-size:13px}
#entry-date-summary{display:block;color:#69756b;font-size:11px;padding-left:14px}
#remaining{font-size:12px;line-height:1.3;margin:4px 0 0;color:#69756b}
#form-error:empty{display:none}
#form-error{font-size:13px;margin:8px 0 0}
.entry-footer{display:flex;flex:none;gap:10px;padding:8px 16px max(10px,env(safe-area-inset-bottom));border-top:1px solid #e5e7dd;background:#fffdf8}
.entry-footer .primary{margin:0;flex:1;width:auto}
#more-options{border-top:1px solid #e5e7dd;padding-top:2px}
#more-options[open]{padding-bottom:8px}
#more-options summary{padding:4px 0}
@media(max-width:360px){.entry-header{padding:8px 12px}.entry-body{padding:4px 12px 8px}.entry-footer{padding:8px 12px}.entry-body>label{margin:6px 0}#split{margin:8px 0}.split-buttons button{font-size:12px}}
#editor{max-height:calc(var(--entry-viewport,100dvh) - 24px)}
#entry{max-height:calc(var(--entry-viewport,100dvh) - 26px)}
.entry-header{padding-top:8px;padding-bottom:8px}
#entry-date-summary{display:inline;padding-left:6px;font-size:11px;white-space:nowrap}
#more-options summary{min-height:40px}
.entry-body>label{margin:6px 0}
.entry-quick{margin-top:4px;margin-bottom:6px}
/* Use a plain decimal keypad field, with an explicit comfortable text size on iPhone. */
#entry input[name=original]{font-size:20px!important;line-height:1.2;min-height:46px}
input,select,textarea{font-size:18px}
button,a,summary{touch-action:manipulation}
nav button{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#profile-settings{padding-bottom:16px;border-bottom:1px solid #e5e7dd;margin-bottom:16px}
#profile-status{font-size:13px}
.card.balance-negative{background:#f8dbd6;color:#622e27}
.card.balance-negative small{color:#793e36}
.card.balance-positive{background:#d6ed9c;color:#25372e}
.card.balance-neutral{background:#edf0e5;color:#25372e}
.group-heading h1{min-width:0;overflow-wrap:anywhere}
.group-default{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:-6px 0 14px}
.group-default button{font-size:13px;padding:8px 12px;max-width:100%;white-space:normal}
.group-default button:disabled{opacity:1;cursor:default;background:#edf0e5}
#group-default-status{font-size:12px;color:#69756b}
nav{display:grid;grid-template-columns:repeat(4,minmax(0,1fr))}
nav button{display:block;width:100%;max-width:100%;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
button.card{display:block;width:100%;border:0;text-align:left;font:inherit;cursor:pointer}
.card .balance-title,.card .amount,.card .card-action{display:block}
.card .balance-title{margin-top:6px}
.card .card-action{font-size:13px;margin-top:14px;font-weight:600}
button.card:hover{filter:brightness(.98)}
.currency-label{flex:1!important;min-width:0;align-self:flex-end;margin-bottom:8px}
.field-label{display:block;font-size:13px;margin-bottom:4px}
.currency-buttons{display:flex;gap:5px;flex-wrap:wrap}
.currency-buttons button{padding:8px 10px;font-size:14px;min-height:44px}
.currency-buttons [aria-pressed=true]{background:#edf0e5;border-color:#76913e}
.amount-row{align-items:flex-end}
.amount-row>label{flex:1;min-width:90px}
.currency-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(90px,1fr));gap:4px 10px}
.currency-options .check{margin:2px 0;min-height:44px;font-size:14px}
input[type=range]{padding:0;accent-color:#76913e;border:0;min-height:44px}
output{font-weight:650;margin-left:8px}
#push-status{font-size:14px}
.person-balance{text-align:right;padding:6px 10px;border-radius:10px;min-width:112px}
.person-balance strong,.person-balance small{display:block}
.person-balance.positive{background:#edf4df;color:#355314}
.person-balance.positive small{color:#355314}
.person-balance.negative{background:#fbe6e2;color:#8a3026}
.person-balance.negative small{color:#8a3026}
.person-balance.neutral{background:#edf0e5;color:#596459}
.group-list-item{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 0;border-bottom:1px solid #e5e7dd}
.group-name-link{flex:1;min-width:0;color:inherit;text-decoration:none;overflow-wrap:anywhere}
.group-name-link strong,.group-name-link small{display:block}
.group-list-item>.button{font-size:12px;flex:none;padding:10px}
.group-settings-link{display:inline-block;color:#536744;font-size:13px;margin:6px 0 0;min-height:32px}
.settings-section{margin:28px 0;padding-top:20px;border-top:1px solid #e5e7dd}
.settings-section h2,.settings-title{overflow-wrap:anywhere}
.back-groups{margin:8px 0 4px}

.stat-table{table-layout:fixed}
.stat-table th:first-child{width:26%}
.stat-table td:first-child{overflow-wrap:anywhere}
.stat-table td{padding:8px 3px}
.statbar{display:block;position:relative;isolation:isolate;border-radius:7px;padding:8px 5px;text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap;font-size:12px;overflow:hidden}
.statbar::before{content:"";position:absolute;inset:0 auto 0 0;border-radius:7px;z-index:-1}
.statbar>span{position:relative}
.stat-tone-0::before{background:#dce4f7}.stat-tone-1::before{background:#ece1f2}.stat-tone-2::before{background:#f7e4cf}.stat-tone-3::before{background:#d3e9ec}.stat-tone-4::before{background:#e4e5f4}.stat-tone-5::before{background:#f1dfe8}.stat-tone-6::before{background:#e8e7cf}.stat-tone-7::before{background:#dee9f5}
.settlement-quality{font-size:13px;color:#536744}
.entry-footer{display:grid;grid-template-columns:minmax(0,1fr)}
.entry-footer.home-saves{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.entry-footer button{min-width:0;font-size:13px;padding:10px 5px;white-space:nowrap}
.entry-footer #delete{grid-column:1/-1}
.entry-footer .save-preset{background:#edf0e5;border-color:#a3b58a}
.bar-p0::before{width:0%}
.bar-p1::before{width:1%}
.bar-p2::before{width:2%}
.bar-p3::before{width:3%}
.bar-p4::before{width:4%}
.bar-p5::before{width:5%}
.bar-p6::before{width:6%}
.bar-p7::before{width:7%}
.bar-p8::before{width:8%}
.bar-p9::before{width:9%}
.bar-p10::before{width:10%}
.bar-p11::before{width:11%}
.bar-p12::before{width:12%}
.bar-p13::before{width:13%}
.bar-p14::before{width:14%}
.bar-p15::before{width:15%}
.bar-p16::before{width:16%}
.bar-p17::before{width:17%}
.bar-p18::before{width:18%}
.bar-p19::before{width:19%}
.bar-p20::before{width:20%}
.bar-p21::before{width:21%}
.bar-p22::before{width:22%}
.bar-p23::before{width:23%}
.bar-p24::before{width:24%}
.bar-p25::before{width:25%}
.bar-p26::before{width:26%}
.bar-p27::before{width:27%}
.bar-p28::before{width:28%}
.bar-p29::before{width:29%}
.bar-p30::before{width:30%}
.bar-p31::before{width:31%}
.bar-p32::before{width:32%}
.bar-p33::before{width:33%}
.bar-p34::before{width:34%}
.bar-p35::before{width:35%}
.bar-p36::before{width:36%}
.bar-p37::before{width:37%}
.bar-p38::before{width:38%}
.bar-p39::before{width:39%}
.bar-p40::before{width:40%}
.bar-p41::before{width:41%}
.bar-p42::before{width:42%}
.bar-p43::before{width:43%}
.bar-p44::before{width:44%}
.bar-p45::before{width:45%}
.bar-p46::before{width:46%}
.bar-p47::before{width:47%}
.bar-p48::before{width:48%}
.bar-p49::before{width:49%}
.bar-p50::before{width:50%}
.bar-p51::before{width:51%}
.bar-p52::before{width:52%}
.bar-p53::before{width:53%}
.bar-p54::before{width:54%}
.bar-p55::before{width:55%}
.bar-p56::before{width:56%}
.bar-p57::before{width:57%}
.bar-p58::before{width:58%}
.bar-p59::before{width:59%}
.bar-p60::before{width:60%}
.bar-p61::before{width:61%}
.bar-p62::before{width:62%}
.bar-p63::before{width:63%}
.bar-p64::before{width:64%}
.bar-p65::before{width:65%}
.bar-p66::before{width:66%}
.bar-p67::before{width:67%}
.bar-p68::before{width:68%}
.bar-p69::before{width:69%}
.bar-p70::before{width:70%}
.bar-p71::before{width:71%}
.bar-p72::before{width:72%}
.bar-p73::before{width:73%}
.bar-p74::before{width:74%}
.bar-p75::before{width:75%}
.bar-p76::before{width:76%}
.bar-p77::before{width:77%}
.bar-p78::before{width:78%}
.bar-p79::before{width:79%}
.bar-p80::before{width:80%}
.bar-p81::before{width:81%}
.bar-p82::before{width:82%}
.bar-p83::before{width:83%}
.bar-p84::before{width:84%}
.bar-p85::before{width:85%}
.bar-p86::before{width:86%}
.bar-p87::before{width:87%}
.bar-p88::before{width:88%}
.bar-p89::before{width:89%}
.bar-p90::before{width:90%}
.bar-p91::before{width:91%}
.bar-p92::before{width:92%}
.bar-p93::before{width:93%}
.bar-p94::before{width:94%}
.bar-p95::before{width:95%}
.bar-p96::before{width:96%}
.bar-p97::before{width:97%}
.bar-p98::before{width:98%}
.bar-p99::before{width:99%}
.bar-p100::before{width:100%}

/* Compact persistent app header; modal dialogs remain in the browser top layer. */
.app-header{position:sticky;top:0;z-index:3;background:#eeefeb;border-bottom:1px solid #dce0d7;margin:-26px -22px 20px;padding:12px 22px}.app-header .brand{font-size:28px}.app-header .brand small{font-size:11px;margin-top:3px}.app-header #settings{flex:none;padding:8px 12px}@media(max-width:360px){.app-header{margin:-20px -14px 18px;padding:10px 14px}}

.app-header .brand{min-width:0}.app-header .brand small{line-height:1.3}


.entry-note{display:block;overflow-wrap:anywhere}#merchant-field label{margin:6px 0}#new-merchant{font-size:12px;padding:4px 8px;min-height:32px;margin:2px 0}#open-merchants{margin:10px 0}#view details form{padding:6px 0}

.history-summary{display:flex;flex-wrap:wrap;justify-content:space-between;gap:4px 12px;align-items:baseline;margin:16px 0 4px;font-size:13px}.history-summary strong{white-space:nowrap}


/* Grouped lists keep full days together and reserve detail for the editor. */
nav{grid-template-columns:repeat(4,minmax(0,1fr))}nav button{font-size:11px;padding-left:2px;padding-right:2px}
.day-group{margin-top:16px}.day-heading{margin:0 0 4px;padding:8px 10px;border-radius:9px;background:#eeefeb;gap:6px;flex-wrap:wrap}.day-heading h3{margin:0;font-size:13px}.day-heading>span{font-size:11px;color:#69756b;white-space:nowrap}
.day-entry{display:flex;align-items:flex-start;gap:12px;border-bottom:1px solid #e5e7dd;padding:12px 0}.day-entry>button{border:0;border-radius:0;background:none;text-align:left;padding:2px 0;flex:1;min-width:0;min-height:44px}.day-entry strong{display:block;font-size:15px;overflow-wrap:anywhere}.day-entry .money{padding-top:3px;flex:none}.entry-meta{display:block;font-size:12px;color:#69756b;margin-top:4px;line-height:1.4}.compact-entry{padding:7px 0;gap:8px}.compact-entry>button{padding:2px 0}.compact-entry strong{font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.compact-entry .entry-meta{font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.compact-entry .money{font-size:14px}.review-flag{color:#9c3028;font-weight:600}#entry-audit{overflow-wrap:anywhere}

.about-intro h1{margin-bottom:4px}.about-version{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;background:#eeefeb;padding:16px 18px;border-radius:16px;margin:22px 0}.version-label{display:block;color:#69756b;font-size:12px}.about-version strong{display:block;font-size:27px;line-height:1.3}.about-version time{font-size:13px;color:#536051}.release-title{display:flex;gap:12px;align-items:center;justify-content:space-between}.release-new{font-size:11px;font-weight:650;background:#d6ed9c;border-radius:20px;padding:3px 10px}.release-items{padding:0;list-style:none;margin:0}.release-items li{padding:18px 0;border-bottom:1px solid #e5e7dd}.release-items h3{margin:8px 0 5px;font-size:15px;overflow-wrap:anywhere}.release-items p{font-size:14px;margin:0;line-height:1.6}.release-tags{display:flex;flex-wrap:wrap;gap:5px}.release-tag{font-size:11px;padding:3px 9px;border-radius:20px;color:#35433b;font-weight:600}.tag-green{background:#e5efd4}.tag-blue{background:#e3ecf6}.tag-sand{background:#f2e9d9}.tag-purple{background:#eee6f5}.tag-neutral{background:#eeefeb}.older-releases{margin-top:24px}.older-releases>summary{padding:12px 0;cursor:pointer;font-weight:650;min-height:44px}.older-releases>summary>span{font-size:13px;color:#69756b}.release-older{border-top:1px solid #e5e7dd}.release-older>summary{cursor:pointer;padding:14px 0;min-height:48px}.release-older time{display:block;font-size:12px;color:#69756b;margin:3px 0 0 16px}.release-older .release-items{padding-left:12px}.version-guide{margin-top:30px;padding-top:20px;border-top:1px solid #dce0d7}.version-guide h2{margin-bottom:10px}.version-guide p,.version-guide dl{font-size:13px}.version-guide dl{margin:12px 0 18px}.version-guide dl>div{margin:10px 0}.version-guide dt{font-weight:650}.version-guide dd{margin:0;color:#536051}.about-intro,.release-current,.older-releases,.version-guide{overflow-wrap:anywhere}

/* History: keep the merchant prominent and distinguish the optional description. */
.compact-entry .entry-heading{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;line-height:1.5}.compact-entry .entry-heading strong{display:inline;font-size:14px;font-weight:650;white-space:inherit}.compact-entry .entry-description{font-size:12px;font-weight:400;color:#69756b}

.release-recent{margin-top:28px;overflow-wrap:anywhere}.release-recent .release-title{flex-wrap:wrap;gap:4px 12px}.release-recent time{font-size:12px;color:#69756b}

.standard-weight-row{display:grid;grid-template-columns:minmax(0,1fr) 110px 52px;gap:10px;align-items:center}.standard-weight-row input{width:100%;font-size:18px}.standard-weight-row>span:nth-child(2){font-size:12px}.standard-weight-row output{text-align:right;font-size:13px}.history-statistics{margin:16px 0}.history-statistics>summary{font-weight:650;cursor:pointer;min-height:44px;padding:12px 0}

.history-highlights{margin-top:22px}.merchant-ranking{padding-left:22px}.merchant-ranking li{padding:10px 0;border-bottom:1px solid #e5e7dd}.merchant-ranking li>div{display:inline-block;width:calc(100% - 115px);vertical-align:top;overflow-wrap:anywhere}.merchant-ranking li>strong{display:inline-block;width:105px;text-align:right;vertical-align:top}.history-highlights small{display:block;font-size:12px;font-weight:400;color:#69756b;margin-top:3px}.costliest-day,.highlight-total{background:#eeefeb;padding:12px;border-radius:10px}.costliest-day{display:flex;justify-content:space-between;gap:12px;margin-bottom:8px}.costliest-day>strong{white-space:nowrap}

html{overscroll-behavior-y:contain}.refresh-controls{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:0 0 12px}.refresh-controls button{font-size:12px;padding:5px 10px;min-height:32px}.refresh-controls span,.merchant-count{font-size:12px;color:#69756b}#copy-entry{margin-bottom:12px;font-size:13px}

.history-tools{gap:10px;flex-wrap:wrap}.history-tools h2{margin:0}.history-tools button{font-size:13px;min-height:44px}.history-period-note{font-size:12px;margin:8px 0 16px}

.merchant-item{border-bottom:1px solid #e5e7dd;padding:0}.merchant-item>summary{padding:10px 0;min-height:44px;cursor:pointer}.merchant-item[open]{padding-bottom:10px}.merchant-inline{display:flex;align-items:flex-end;gap:8px;margin:8px 0}.merchant-inline label{flex:1;min-width:0;margin:0}.merchant-inline button{flex:none;margin:0;min-height:44px}.merchant-delete{font-size:12px;margin-top:4px;padding:6px 10px;min-height:44px}.merchant-help{font-size:12px;margin:8px 0 16px}@media(max-width:360px){.merchant-inline{flex-wrap:wrap}.merchant-inline label{flex-basis:100%}}
