:root{--bg:#f6f6ef;--surface:#fff;--ink:#25352f;--muted:#6f7770;--line:#e5e8de;--green:#294e3b;--lime:#d8eea5;--tint:#edf2e4;--red:#a74331;--orange:#be7944;--shadow:0 12px 35px #21372a08;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-synthesis:none;color:var(--ink);background:var(--bg)}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button{cursor:pointer;color:inherit}button:disabled{cursor:default;opacity:.5}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #91ab63;outline-offset:3px}button{touch-action:manipulation}a{color:var(--green)}input,select,textarea{font-size:16px}h1,h2,h3,p{margin:0}h1{font-size:30px;line-height:1.15;font-weight:650;letter-spacing:-1px}h2{font-size:19px;font-weight:650;letter-spacing:-.4px}h3{font-size:16px;font-weight:650}small{font-size:12px}.muted{color:var(--muted)}.eyebrow{font-size:10px;font-weight:750;letter-spacing:1.7px;text-transform:uppercase}.app-shell{max-width:620px;min-height:100dvh;margin:0 auto;padding:calc(env(safe-area-inset-top) + 18px) 22px calc(102px + env(safe-area-inset-bottom))}.app-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:27px}.wordmark{display:flex;align-items:center;gap:8px;font-size:25px;letter-spacing:-1.2px;font-weight:750}.brand-icon{width:30px;height:33px;color:var(--green)}.header-actions{display:flex;align-items:center;gap:8px}.icon-btn{width:43px;height:43px;border:1px solid var(--line);border-radius:50%;background:var(--surface);display:inline-flex;align-items:center;justify-content:center}.icon{width:21px;height:21px;flex-shrink:0}.intro{display:flex;justify-content:space-between;align-items:flex-end;gap:12px;margin-bottom:21px}.intro .eyebrow{color:var(--muted);margin-bottom:8px}.intro h1{max-width:350px}.subtitle{font-size:13px;color:var(--muted);line-height:1.6;margin-top:8px}.month-picker{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:20px 0 15px}.month-picker label{display:flex;gap:7px;align-items:center;font-size:13px;font-weight:650}.month-picker input{color:var(--ink);font-size:13px;border:0;background:transparent;max-width:178px;min-height:35px;font-weight:650}.month-arrow{border:0;background:transparent;width:34px;height:34px;display:flex;align-items:center;justify-content:center;border-radius:50%}.month-arrows{display:flex}.pill{display:inline-flex;align-items:center;gap:5px;font-size:10px;letter-spacing:.4px;border-radius:99px;padding:6px 9px;background:var(--tint);color:var(--green);font-weight:700;white-space:nowrap}.pill .dot{height:5px;width:5px;border-radius:50%;background:#708b4f}.hero{padding:25px 24px 22px;border-radius:24px;background:var(--green);color:#fff;position:relative;overflow:hidden;box-shadow:0 8px 24px #294e3b14}.hero:after{content:"";position:absolute;width:155px;height:155px;right:-67px;top:-40px;border:28px solid #ffffff05;border-radius:50%;pointer-events:none}.hero .eyebrow{color:#dbe6c5}.hero-money{font-size:clamp(30px,8vw,46px);font-weight:550;letter-spacing:-1.8px;margin:11px 0 6px;line-height:1.17;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.hero-money .currency{font-size:17px;letter-spacing:0;font-weight:400;margin-right:6px;color:#dbe6c5}.hero-caption{font-size:12px;color:#d2dfce;line-height:1.6}.hero .budget-track{height:6px;background:#ffffff26;border-radius:9px;margin:20px 0 10px;overflow:hidden}.budget-fill{height:100%;background:var(--lime);border-radius:9px;min-width:0}.budget-fill.over{background:#f3b19a}.hero-bottom{display:flex;justify-content:space-between;gap:8px;font-size:11px;color:#deead8}.hero-bottom strong{font-weight:600;color:#fff}.hero-empty-link{display:inline-flex;align-items:center;gap:6px;border:1px solid #ffffff55;background:transparent;color:#fff;padding:9px 12px;border-radius:12px;margin-top:16px;font-size:12px}.stats{display:grid;grid-template-columns:1fr 1fr;gap:11px;margin-top:12px}.stat{padding:16px 17px;border:1px solid var(--line);background:var(--surface);border-radius:18px;min-width:0}.stat-label{font-size:11px;color:var(--muted);display:flex;align-items:center;gap:6px}.stat-label .icon{width:14px;height:14px}.stat-value{font-size:19px;font-weight:650;letter-spacing:-.5px;margin-top:9px;overflow-wrap:anywhere}.stat-note{font-size:10px;color:var(--muted);margin-top:6px;line-height:1.5}.quick-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:20px 0 25px}.quick-action{min-height:77px;background:var(--surface);border:1px solid var(--line);border-radius:17px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:7px;font-size:11px;font-weight:650}.quick-action:first-child{background:var(--lime);border-color:var(--lime)}.quick-action .icon{width:23px;height:23px}.section{margin-top:26px}.section-header{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:15px}.text-btn{background:transparent;border:0;padding:7px 0 7px 9px;font-size:12px;color:var(--green);font-weight:650}.panel{background:var(--surface);border:1px solid var(--line);border-radius:20px;padding:19px;box-shadow:var(--shadow)}.category-row+.category-row{margin-top:19px}.category-top{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:12px;margin-bottom:9px}.category-name{display:flex;align-items:center;gap:8px}.category-name .icon{width:16px;height:16px}.category-numbers{display:flex;align-items:baseline;gap:8px;white-space:nowrap}.category-numbers small{font-size:10px;color:var(--muted);min-width:26px;text-align:right}.category-numbers strong{font-size:12px;font-weight:650}.category-track{height:6px;background:#f0f1eb;border-radius:8px;overflow:hidden}.category-fill{height:100%;border-radius:8px}.empty{padding:27px 16px;text-align:center;border-radius:20px;border:1px dashed #d4dbca;color:var(--muted)}.empty .icon{width:29px;height:29px;margin-bottom:9px;color:#78925d}.empty h3{font-weight:600;font-size:14px;color:var(--ink);margin-bottom:7px}.empty p{font-size:12px;line-height:1.7;max-width:295px;margin:0 auto}.empty .text-btn{margin-top:8px;padding:8px}.cash-note{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-top:13px;padding:16px 18px;border:1px solid var(--line);border-radius:16px}.cash-note p{font-size:11px;line-height:1.6;color:var(--muted)}.cash-note strong{font-size:15px;white-space:nowrap}.tx-list{border:1px solid var(--line);background:var(--surface);border-radius:20px;overflow:hidden}.tx{display:flex;width:100%;align-items:center;gap:11px;text-align:left;background:var(--surface);border:0;padding:16px}.tx+.tx{border-top:1px solid #f0f1eb}.tx-icon{height:40px;width:40px;display:flex;align-items:center;justify-content:center;border-radius:13px;background:var(--tint);color:var(--green);flex-shrink:0}.tx-text{flex:1;min-width:0}.tx-title{font-size:13px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tx-meta{font-size:10px;color:var(--muted);margin-top:5px;line-height:1.5}.tx-amount{text-align:right;max-width:45%;flex-shrink:0}.tx-amount strong{font-size:12px;font-weight:650;overflow-wrap:anywhere}.tx-amount small{display:block;font-size:10px;margin-top:5px;color:var(--muted)}.positive{color:#3b7247}.negative{color:var(--red)}.tabbar{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:100%;max-width:620px;display:grid;grid-template-columns:repeat(4,1fr);padding:10px 15px calc(12px + env(safe-area-inset-bottom));background:#fbfcf8f5;border-top:1px solid var(--line);z-index:5;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px)}.tab{border:0;background:transparent;display:flex;flex-direction:column;align-items:center;gap:6px;font-size:10px;color:#7d847d;padding:5px;border-radius:12px;min-height:50px}.tab .icon{width:22px;height:22px}.tab.active{color:var(--green);font-weight:700}.tab.active .tab-icon{background:var(--lime)}.tab-icon{display:flex;align-items:center;justify-content:center;width:48px;height:27px;border-radius:16px}.local-note{margin:26px 0 6px;text-align:center;color:#848b80;font-size:10px;line-height:1.6}.local-note .icon{width:11px;height:11px;vertical-align:-2px;margin-right:4px}.notice{font-size:12px;line-height:1.65;padding:14px 15px;border-radius:14px;background:var(--tint);margin:15px 0}.notice.warning{background:#fff0db;color:#87531e}.notice.danger{background:#ffebe4;color:#943521}.search{position:relative;margin:17px 0 12px}.search .icon{position:absolute;left:14px;top:14px;width:18px;height:18px;color:var(--muted)}.search input{width:100%;padding:14px 14px 14px 41px;border:1px solid var(--line);border-radius:14px;background:#fff}.filter-chips{display:flex;gap:7px;overflow-x:auto;padding:2px 0 12px;margin-bottom:5px;scrollbar-width:none}.filter-chip{padding:10px 13px;min-height:39px;border:1px solid var(--line);border-radius:99px;background:transparent;font-size:11px;white-space:nowrap}.filter-chip.active{background:var(--green);border-color:var(--green);color:white}.friends-hero{background:var(--lime);border-radius:22px;padding:23px;margin-top:21px}.friends-hero .hero-money{font-size:37px;margin-top:10px}.friends-hero .hero-money .currency{color:var(--green)}.friends-hero p{font-size:12px;line-height:1.6}.friend-card{margin-top:15px;border:1px solid var(--line);border-radius:20px;background:var(--surface);overflow:hidden}.friend-head{padding:18px;display:flex;align-items:center;gap:10px}.avatar{width:37px;height:37px;display:flex;align-items:center;justify-content:center;border-radius:50%;background:var(--tint);font-size:14px;font-weight:650}.friend-name{flex:1;min-width:0}.friend-name h3{overflow-wrap:anywhere;font-size:15px}.friend-name p{font-size:10px;color:var(--muted);margin-top:4px}.friend-head>strong{font-size:14px}.owed-bill{border-top:1px solid #f0f1eb;padding:15px 18px;display:flex;gap:12px;align-items:center}.owed-info{flex:1;min-width:0}.owed-info h3{font-size:12px;font-weight:600;overflow-wrap:anywhere}.owed-info p{font-size:10px;color:var(--muted);line-height:1.6;margin-top:5px}.small-btn{border:1px solid var(--line);background:var(--tint);border-radius:10px;padding:11px 12px;font-size:11px;font-weight:650;white-space:nowrap}.small-btn .icon{height:14px;width:14px;vertical-align:-2px}.settled-tag{font-size:10px;background:var(--tint);color:var(--green);padding:7px 9px;border-radius:9px}.metric-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 0;font-size:12px}.metric-row+.metric-row{border-top:1px solid var(--line)}.metric-row strong{font-size:13px}.field{display:flex;flex-direction:column;gap:8px;margin-bottom:18px}.field>label,.field-label{font-size:12px;font-weight:650}.field input,.field select,.field textarea{width:100%;min-height:49px;border:1px solid #dce1d5;background:#fff;border-radius:12px;padding:13px 14px;color:var(--ink);line-height:1.4}.field textarea{min-height:74px;resize:vertical}.field input[readonly]{background:#f3f5ed;color:#59634e}.field small{font-size:11px;color:var(--muted);line-height:1.6}.field-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.field-grid .field{min-width:0}.field-grid input[type=date]{min-width:0;padding:12px 9px}.primary-btn{width:100%;padding:16px 18px;border:0;border-radius:14px;background:var(--green);color:white;font-size:14px;font-weight:650;display:flex;justify-content:center;align-items:center;gap:8px;min-height:51px}.secondary-btn{width:100%;padding:14px;border:1px solid var(--line);border-radius:13px;background:#fff;font-size:13px;font-weight:550;display:flex;justify-content:center;align-items:center;gap:8px;min-height:49px}.secondary-btn+.secondary-btn{margin-top:10px}.delete-btn{border:0;background:transparent;color:var(--red);font-size:12px;padding:15px;width:100%;margin-top:8px}.settings-section{margin-top:27px}.settings-section h2{margin-bottom:16px}.settings-section .panel{padding:19px}.privacy-copy{font-size:12px;line-height:1.85;color:var(--muted)}.privacy-copy p+p{margin-top:10px}.file-input{display:none}.split-participants{margin:10px 0}.person-row{display:grid;grid-template-columns:minmax(0,1fr) 92px 32px;gap:9px;align-items:center;margin:10px 0}.person-row input{min-width:0;width:100%;padding:12px 10px;border:1px solid #dce1d5;border-radius:11px;font-size:14px;background:#fff;color:var(--ink);height:45px}.person-row input[readonly]{background:#f3f5ed}.person-row .icon-btn{height:31px;width:31px;border:0;background:#f2f3ed}.person-row .icon{height:16px;width:16px}.person-labels{display:grid;grid-template-columns:minmax(0,1fr) 92px 32px;gap:9px;color:var(--muted);font-size:10px}.split-summary{font-size:12px;line-height:1.65;padding:12px 14px;background:var(--tint);border-radius:12px;margin:13px 0 20px}.split-summary.error{background:#fff0db;color:#87531e}.split-mode{display:flex;gap:8px;margin-bottom:15px}.mode-option{flex:1;position:relative}.mode-option input{position:absolute;opacity:0}.mode-option span{display:block;text-align:center;border:1px solid var(--line);padding:12px;border-radius:11px;font-size:12px}.mode-option input:checked+span{border-color:var(--green);background:var(--tint);font-weight:650}.mode-option input:focus-visible+span{outline:3px solid #91ab63}.form-error{color:var(--red);background:#fff0eb;border-radius:12px;padding:12px 14px;font-size:12px;line-height:1.65;margin-bottom:15px}.form-error:empty{display:none}dialog{border:0;padding:0;position:fixed;top:auto;bottom:0;margin:0 auto;width:100%;max-width:620px;max-height:92dvh;border-radius:25px 25px 0 0;background:var(--bg);color:var(--ink);overscroll-behavior:contain}dialog::backdrop{background:#16291f88;backdrop-filter:blur(3px)}#sheet-body{padding:12px 23px calc(26px + env(safe-area-inset-bottom))}.sheet-handle{width:36px;height:4px;border-radius:9px;background:#c7cfc0;margin:0 auto 16px}.sheet-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:22px;gap:12px}.sheet-header h2{font-size:24px;letter-spacing:-.7px}.sheet-header .icon-btn{width:35px;height:35px}.sheet-subtitle{font-size:12px;color:var(--muted);line-height:1.7;margin:-12px 0 21px}.amount-field{position:relative}.amount-field .amount-currency{position:absolute;left:16px;bottom:17px;font-size:14px;color:var(--muted);font-weight:650}.amount-field input{padding:17px 16px 17px 66px;font-size:29px;letter-spacing:-.7px;min-height:73px;font-variant-numeric:tabular-nums}.form-type-tabs{display:grid;grid-template-columns:repeat(3,1fr);background:#e8ecdf;border-radius:12px;padding:4px;margin-bottom:23px;gap:4px}.form-type-tabs button{padding:10px 8px;border:0;background:transparent;border-radius:9px;font-size:12px}.form-type-tabs button.active{background:white;font-weight:650;box-shadow:0 2px 5px #00000006}.toast{position:fixed;bottom:calc(95px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%) translateY(15px);background:#233a2d;color:white;max-width:min(90%,500px);padding:13px 18px;border-radius:13px;font-size:12px;line-height:1.65;opacity:0;pointer-events:none;z-index:100;transition:.2s}.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}.helper-link{background:transparent;border:0;padding:8px 0;color:var(--green);font-size:11px;text-decoration:underline}.fine-print{font-size:10px;color:var(--muted);line-height:1.7;margin-top:13px}.loading{padding:40px;text-align:center}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.tx:hover,.quick-action:hover,.small-btn:hover{filter:brightness(.98)}.summary-chip{background:var(--tint);color:var(--green);font-size:11px;border-radius:11px;padding:12px 14px;margin-bottom:16px;line-height:1.7}.trend{display:flex;align-items:flex-end;gap:13px;height:135px;padding-top:15px}.trend-item{flex:1;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;height:100%;gap:8px;min-width:0}.trend-bar{width:100%;max-width:43px;background:#c4d4ab;border-radius:6px 6px 3px 3px;min-height:3px}.trend-bar.current{background:var(--green)}.trend-label{font-size:10px;color:var(--muted)}.report-total{font-size:31px;letter-spacing:-1px;margin:9px 0 5px}.insight-caption{font-size:11px;color:var(--muted);line-height:1.7}.checkbox-line{display:flex;gap:10px;align-items:center;font-size:12px;margin:19px 0}.checkbox-line input{accent-color:var(--green);height:18px;width:18px}.bill-detail{padding:12px 0;border-top:1px solid var(--line)}.bill-detail-title{display:flex;justify-content:space-between;gap:10px;font-size:13px}.bill-detail p{font-size:11px;color:var(--muted);margin:6px 0 0;line-height:1.6}.repay-line{display:flex;justify-content:space-between;gap:10px;align-items:center;font-size:11px;margin-top:8px}.repay-line button{font-size:11px}.all-time{font-size:11px;color:var(--muted);font-weight:400}.status-line{font-size:11px;color:var(--muted);margin:12px 0;line-height:1.6}@media(min-width:700px){body{background:#e8ecdf}.app-shell{background:var(--bg);border-left:1px solid #d8dfcd;border-right:1px solid #d8dfcd;padding-left:30px;padding-right:30px}.tabbar{border-left:1px solid #d8dfcd;border-right:1px solid #d8dfcd}dialog{bottom:22px;border-radius:25px;width:calc(100% - 40px);max-width:530px;max-height:90dvh}.hero-money{font-size:46px}}@media(max-width:355px){.app-shell{padding-left:15px;padding-right:15px}.stat{padding:14px 12px}.stat-value{font-size:17px}.tx{padding:13px 11px}.tx-icon{width:33px;height:33px}.tx-amount strong{font-size:11px}.friend-head{padding:14px}.owed-bill{padding:13px}.small-btn{padding:10px;font-size:10px}#sheet-body{padding-left:17px;padding-right:17px}.field-grid{grid-template-columns:1fr}.person-row,.person-labels{grid-template-columns:minmax(0,1fr) 80px 26px;gap:6px}}@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}

/* Dated opening-balance checkpoint and historical-entry labels. */
.historical-tag{display:inline-block;max-width:100%;font-size:9px;line-height:1.55;font-weight:500;color:var(--green);background:var(--tint);border-radius:5px;padding:3px 6px;margin-top:5px;white-space:normal;overflow-wrap:anywhere}
.checkpoint-preview{padding:15px;border-radius:13px;background:var(--tint);margin:4px 0 15px;font-size:11px;line-height:1.7;color:var(--green)}
.checkpoint-total{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:6px 12px;margin-bottom:8px}
.checkpoint-total>span{font-size:11px}.checkpoint-total>strong{font-size:17px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.checkpoint-preview p+p{margin-top:7px}#entry-cash-hint strong{font-size:12px}
#opening-balance-date{min-width:0;max-width:100%}.cash-note>div{min-width:0}.cash-note>strong{flex-shrink:0}
@media(max-width:355px){.cash-note{flex-wrap:wrap;gap:10px}.historical-tag{font-size:8px}}

/* v1.2: loans and readable full-width income/category selectors. */
.quick-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
.form-type-tabs{grid-template-columns:repeat(4,minmax(0,1fr))}
.form-type-tabs button{padding:11px 4px;font-size:11px;min-height:40px}
.entry-fields .field{min-width:0}
.entry-fields input[type=date]{max-width:100%;min-width:0}
.friend-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:15px}
.friend-actions button{font-size:13px;padding:14px 10px}
.debt-totals{display:flex;gap:20px;border-top:1px solid #bbcfa8;margin-top:15px;padding-top:13px;font-size:10px}
.debt-totals span{flex:1;min-width:0}
.debt-totals strong{display:block;font-size:14px;margin-top:5px;overflow-wrap:anywhere}
.debt-tag{display:inline-block;font-size:9px;font-weight:650;color:var(--green);background:var(--tint);border-radius:6px;padding:4px 7px;margin-bottom:7px}
.loan-summary{margin-bottom:18px}
.metric-row small{color:var(--muted);font-size:10px}
@media(max-width:355px){.form-type-tabs{grid-template-columns:repeat(2,minmax(0,1fr))}.friend-actions button{font-size:12px}.debt-totals strong{font-size:12px}}
/* v1.3: borrowing stays visually separate from money owed to you. */
.you-owe-summary{width:100%;display:flex;align-items:center;justify-content:space-between;gap:12px;text-align:left;border:1px solid var(--line);border-radius:17px;padding:15px 17px;margin-top:11px;background:var(--surface);font-size:13px}
.you-owe-summary>span{display:block;min-width:0}.you-owe-summary>span>.icon{width:15px;height:15px;vertical-align:-3px}.you-owe-summary small{display:block;font-size:10px;color:var(--muted);margin-top:5px}.you-owe-summary>strong{display:flex;gap:8px;align-items:center;text-align:right;font-size:16px;overflow-wrap:anywhere}.you-owe-summary>strong .icon{width:15px;height:15px;flex-shrink:0}
.borrow-quick{grid-column:1/-1;min-height:55px;flex-direction:row}
.debt-switch{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:22px}.debt-switch button{padding:13px 10px;background:var(--surface);border:1px solid var(--line);border-radius:15px;font-size:12px;min-width:0;text-align:left}.debt-switch button strong{display:block;font-size:16px;margin-top:6px;overflow-wrap:anywhere}.debt-switch button.active{background:var(--green);border-color:var(--green);color:white}
.borrowing-hero{background:#f0e5d6}.borrow-caption{margin-top:12px}.friend-actions .split-action{grid-column:1/-1}.owed-bill .small-btn{max-width:118px;flex-shrink:0;white-space:normal;line-height:1.4}.owed-info{min-width:0;overflow-wrap:anywhere}
.form-type-tabs{grid-template-columns:repeat(3,minmax(0,1fr))}.form-type-tabs button:last-child{grid-column:span 2}.form-type-tabs button{min-height:42px}
@media(max-width:350px){.you-owe-summary{padding:13px;gap:8px}.you-owe-summary>strong{font-size:14px}.debt-switch button strong{font-size:14px}.owed-bill .small-btn{max-width:100px}.form-type-tabs button{font-size:10px}}
