@font-face{font-family:"Instrument Sans";font-style:normal;font-weight:400 700;font-display:swap;
  src:url(fonts/instrument-sans-latin.woff2) format("woff2");
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Instrument Sans";font-style:normal;font-weight:400 700;font-display:swap;
  src:url(fonts/instrument-sans-latin-ext.woff2) format("woff2");
  unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF}

:root{
  --bg:#FFFFFF;--card:#FFFFFF;--tint:#EEF6F2;--surface:#F5F6F5;--ink:#16211E;--ink-2:#3A4743;--muted:#5B6964;--faint:#8D9893;
  --line:rgba(22,33,30,.08);--line-2:rgba(22,33,30,.14);--fill:rgba(22,33,30,.05);--fill-2:rgba(22,33,30,.09);
  --pos:#2F6F5E;--pos-soft:rgba(47,111,94,.12);--over:#A83E33;--over-soft:rgba(168,62,51,.1);
  --hero:#16211E;--hero-ink:#FFFFFF;--hero-muted:rgba(255,255,255,.64);--hero-fill:rgba(255,255,255,.1);
  --btn:#16211E;--btn-ink:#FFFFFF;--bar:rgba(255,255,255,.86);--scrim:rgba(8,14,12,.36);
  --r-lg:22px;--r:16px;
  --ease:cubic-bezier(.2,.8,.2,1);--spring:cubic-bezier(.32,.72,0,1);
  color-scheme:light;
}
@media (prefers-color-scheme:dark){:root{
  --bg:#0A0E0D;--card:#141B18;--tint:rgba(103,193,163,.1);--surface:#141B18;--ink:#ECF1EF;--ink-2:#C8D1CD;--muted:#9AA6A1;--faint:#6D7974;
  --line:rgba(255,255,255,.07);--line-2:rgba(255,255,255,.12);--fill:rgba(255,255,255,.06);--fill-2:rgba(255,255,255,.1);
  --pos:#67C1A3;--pos-soft:rgba(103,193,163,.15);--over:#E9846F;--over-soft:rgba(233,132,111,.14);
  --hero:#1C2723;--hero-fill:rgba(255,255,255,.09);
  --btn:#ECF1EF;--btn-ink:#0A0E0D;--bar:rgba(10,14,13,.82);--scrim:rgba(0,0,0,.55);
  color-scheme:dark;
}}

*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html{background:var(--bg)}
body{margin:0;background:var(--bg);color:var(--ink);font-family:"Instrument Sans",-apple-system,system-ui,sans-serif;font-size:16px;
  line-height:1.4;font-variant-numeric:tabular-nums;-webkit-font-smoothing:antialiased;-webkit-text-size-adjust:100%}
button{font:inherit;color:inherit;background:none;border:0;padding:0;margin:0;cursor:pointer;text-align:inherit}
input,select,textarea{font:inherit;color:inherit}
h1,h2,h3,p{margin:0}
:focus-visible{outline:2px solid var(--pos);outline-offset:2px;border-radius:10px}
.vh{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.i{width:24px;height:24px;flex:none}

#app{max-width:560px;margin:0 auto;min-height:100vh;min-height:100dvh;padding:0 16px calc(100px + env(safe-area-inset-bottom))}

/* ---- top bar + large title ---- */
.topbar{position:sticky;top:0;z-index:20;margin:0 -16px;padding:env(safe-area-inset-top) 6px 0;height:calc(48px + env(safe-area-inset-top));
  display:grid;grid-template-columns:1fr auto 1fr;align-items:center;transition:background-color .2s,box-shadow .2s}
.topbar.solid{background:var(--bar);-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px);box-shadow:0 .5px 0 var(--line-2)}
.topbar .t{font-size:17px;font-weight:600;opacity:0;transform:translateY(4px);transition:opacity .2s,transform .2s;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:56vw}
.topbar.solid .t,.topbar.pushed .t{opacity:1;transform:none}
.topbar .l{justify-self:start;display:flex}
.topbar .r{justify-self:end;display:flex}
.navbtn{display:inline-flex;align-items:center;gap:1px;height:44px;padding:0 10px;color:var(--pos);font-size:17px;font-weight:500;border-radius:12px}
.navbtn .i{width:26px;height:26px;margin-left:-6px;stroke-width:2.1}
.navbtn:active{opacity:.5}

.lt{padding:2px 2px 18px}
.lt h1{font-size:34px;font-weight:700;letter-spacing:-.032em;line-height:1.1}
.lt .eyebrow{font-size:14px;color:var(--muted);font-weight:500;margin-bottom:2px;display:flex;align-items:center;gap:6px}
.tripbtn{display:block;width:100%;text-align:left;border-radius:14px}
.tripbtn h1{display:flex;align-items:center;gap:4px}
.tripbtn h1 .i{width:26px;height:26px;color:var(--faint);stroke-width:2.2;margin-top:3px}
.tripbtn:active{opacity:.6}

/* ---- views ---- */
.view{animation:fadeUp .3s var(--ease) both}
.view.push{animation:pushIn .42s var(--spring) both}
.view.pop{animation:popIn .42s var(--spring) both}
.view.still{animation:none}
@keyframes fadeUp{from{opacity:0;transform:translateY(8px)}}
@keyframes pushIn{from{opacity:0;transform:translateX(28%)}}
@keyframes popIn{from{opacity:0;transform:translateX(-18%)}}

/* ---- cards, sections, lists ---- */
.card{background:var(--card);border-radius:var(--r-lg);padding:18px}
.section{margin-top:28px}
.sh{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin:0 4px 10px}
.sh h2{font-size:20px;font-weight:650;letter-spacing:-.02em}
.link{color:var(--pos);font-size:15px;font-weight:550;padding:6px 0}
.link:active{opacity:.5}

.list{margin:0 -16px}
.row{display:flex;align-items:center;gap:13px;width:100%;min-height:62px;padding:11px 16px;position:relative;text-align:left;background:var(--bg);transition:background-color .2s}
.row::before{content:"";position:absolute;top:0;left:69px;right:0;height:1px;background:var(--line)}
.row.noicon::before{left:16px}
.list > .row:first-child::before,.list > .swipe:first-child .row::before,.list > :first-child::before{display:none}
button.row:active,label.row:active{background:color-mix(in srgb,var(--ink) 6%,var(--bg));transition:none}
.row .main{flex:1;min-width:0;display:flex;flex-direction:column}
.row .ttl{font-size:16px;font-weight:550;letter-spacing:-.005em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.row .sub{font-size:13.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:1px}
.row .end{text-align:right;flex:none;display:flex;flex-direction:column;align-items:flex-end}
.row .amt{font-size:16px;font-weight:600;letter-spacing:-.01em}
.row .amt.pos{color:var(--pos)}
.row .amt2{font-size:13px;color:var(--muted);margin-top:1px}
.row .chev{width:18px;height:18px;color:var(--faint);stroke-width:2.2;flex:none;margin-right:-4px}
.row .tick{width:22px;height:22px;color:var(--pos);stroke-width:2.4}
.row .val{color:var(--muted);font-size:16px;white-space:nowrap}
.row.danger .ttl,.row.danger{color:var(--over)}
.row.center{justify-content:center;min-height:52px}
.row.center .ttl{color:var(--pos)}

.ic{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;flex:none;
  background:color-mix(in srgb,var(--h,#5B6964) 15%,transparent);color:var(--h,#5B6964)}
.ic .i{width:20px;height:20px}
.ic .letter{font-size:16px;font-weight:650}
.ic.plain{background:var(--fill);color:var(--ink-2)}
@media (prefers-color-scheme:dark){
  .ic{background:color-mix(in srgb,var(--h,#5B6964) 30%,transparent);color:color-mix(in srgb,var(--h,#5B6964) 50%,white)}
}

.bar{height:5px;border-radius:3px;background:var(--fill-2);overflow:hidden;margin-top:8px}
.bar i{display:block;height:100%;border-radius:3px;background:var(--h);transition:width .5s var(--ease)}
.bar i.over{background:var(--over)}

/* ---- hero balance card ---- */
.hero{background:var(--hero);color:var(--hero-ink);border-radius:26px;padding:22px 20px 20px}
.hero .lbl{font-size:14.5px;color:var(--hero-muted);font-weight:500}
.hero .big{font-size:48px;font-weight:700;letter-spacing:-.04em;line-height:1.05;margin-top:6px;white-space:nowrap}
.hero .big .cur{font-size:22px;font-weight:600;letter-spacing:-.01em;margin-right:7px;color:var(--hero-muted)}
.hero .big.over{color:#F29B8A}
.hero .meta{font-size:14.5px;color:var(--hero-muted);margin-top:8px}
.hero .meta b{color:var(--hero-ink);font-weight:600}
.alloc{display:flex;gap:3px;height:10px;margin-top:22px}
.alloc .s{--h:#888;position:relative;border-radius:3px;overflow:hidden;background:color-mix(in srgb,var(--h) 50%,var(--hero));min-width:6px;filter:saturate(1.15) brightness(1.15)}
.alloc .s i{position:absolute;left:0;top:0;bottom:0;background:var(--h)}
.alloc.empty{background:var(--hero-fill);border-radius:3px}
.legend{display:flex;flex-wrap:wrap;gap:6px 14px;margin-top:12px;font-size:12.5px;color:var(--hero-muted)}
.legend span{--h:#888;display:inline-flex;align-items:center;gap:6px}
.legend span::before{content:"";width:8px;height:8px;border-radius:2px;background:var(--h)}
.hero-actions{display:flex;gap:8px;margin-top:18px}
.hero-actions button{flex:1;height:44px;border-radius:999px;background:var(--hero-fill);color:var(--hero-ink);font-weight:600;font-size:15px;
  display:flex;align-items:center;justify-content:center;gap:6px}
.hero-actions button .i{width:19px;height:19px}
.hero-actions button:active{opacity:.7}

/* ---- pace + stat cards ---- */
.pace{margin-top:12px}
.pace .top{display:flex;justify-content:space-between;align-items:center;gap:10px}
.pace .lbl{font-size:14.5px;color:var(--muted);font-weight:500}
.pace .big{font-size:34px;font-weight:700;letter-spacing:-.032em;margin-top:4px;line-height:1.1}
.pace .big small{font-size:16px;font-weight:500;color:var(--muted);letter-spacing:0;margin-left:6px}
.pace .big.over{color:var(--over)}
.pace .note{font-size:14px;color:var(--muted);margin-top:8px;line-height:1.45}
.days{display:flex;gap:3px;margin-top:16px}
.days i{flex:1;height:5px;border-radius:3px;background:var(--fill-2)}
.days i.done{background:var(--ink-2)}
.days i.today{background:var(--pos)}
.chip{display:inline-flex;align-items:center;gap:5px;height:28px;padding:0 11px;border-radius:999px;font-size:13px;font-weight:600;white-space:nowrap;flex:none}
.chip.pos{background:var(--pos-soft);color:var(--pos)}
.chip.over{background:var(--over-soft);color:var(--over)}
.chip.neutral{background:var(--fill);color:var(--muted)}

.stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.stat{background:var(--card);border-radius:var(--r);padding:13px 14px}
.stat .v{font-size:17px;font-weight:650;letter-spacing:-.015em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.stat .l{font-size:12.5px;color:var(--muted);margin-top:1px}

.tripcard{display:flex;align-items:center;gap:14px;width:100%;text-align:left}
.tripcard .main{flex:1;min-width:0}
.tripcard .ttl{font-size:18px;font-weight:650;letter-spacing:-.015em}
.tripcard .facts{display:flex;flex-wrap:wrap;gap:4px 12px;margin-top:6px;font-size:14px;color:var(--muted)}
.tripcard .facts span{display:inline-flex;align-items:center;gap:5px}
.tripcard .facts .i{width:16px;height:16px}
.tripcard:active{opacity:.6}

/* ---- buttons ---- */
.btn{display:flex;align-items:center;justify-content:center;gap:8px;height:54px;border-radius:999px;background:var(--btn);color:var(--btn-ink);
  font-weight:600;font-size:16.5px;width:100%;transition:transform .16s var(--ease),opacity .16s}
.btn:active{transform:scale(.97)}
.btn:disabled{opacity:.28;transform:none;cursor:default}
.btn.secondary{background:var(--fill-2);color:var(--ink)}
.btn.destructive{background:var(--over);color:#fff}
.btn .i{width:20px;height:20px}
.btns{display:flex;flex-direction:column;gap:10px;margin-top:16px}
.txtbtn{color:var(--pos);font-weight:500;font-size:17px;padding:10px 6px;border-radius:10px}
.txtbtn.strong{font-weight:650}
.txtbtn:disabled{opacity:.3}
.txtbtn:active{opacity:.5}
.danger{color:var(--over)}

/* ---- activity ---- */
.hscroll{display:flex;gap:8px;overflow-x:auto;margin:0 -16px;padding:2px 16px;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.hscroll::-webkit-scrollbar{display:none}
.fchip{--h:transparent;height:36px;padding:0 14px;border-radius:999px;background:var(--fill);font-size:14.5px;font-weight:550;white-space:nowrap;
  display:inline-flex;align-items:center;gap:7px;flex:none}
.fchip .dot{width:8px;height:8px;border-radius:50%;background:var(--h)}
.fchip[aria-pressed=true]{background:var(--btn);color:var(--btn-ink)}
.dayh{display:flex;justify-content:space-between;margin:24px 6px 8px;font-size:14px;font-weight:600;color:var(--muted)}
.dayh:first-of-type{margin-top:18px}

.swipe{position:relative;overflow:hidden}
.swipe .del{visibility:hidden;position:absolute;top:0;right:0;bottom:0;width:96px;background:var(--over);color:#fff;font-weight:600;font-size:15px;
  display:flex;align-items:center;justify-content:center}
.swipe .row{transition:transform .3s var(--spring);touch-action:pan-y}
.swipe .row.dragging{transition:none}
.swipe:has(.row.dragging) .del,.swipe:has(.row.open) .del{visibility:visible}

.emptystate{text-align:center;color:var(--muted);font-size:15px;padding:44px 24px;line-height:1.5}
.emptystate .ic{margin:0 auto 14px;width:56px;height:56px}
.emptystate .ic .i{width:26px;height:26px}
.emptystate h3{font-size:18px;font-weight:650;color:var(--ink);margin-bottom:4px}
.emptystate .btn{max-width:260px;margin:20px auto 0}

/* ---- welcome ---- */
.welcome{padding:28px 22px 22px;text-align:left}
.welcome .ic{width:52px;height:52px;margin-bottom:18px}
.welcome .ic .i{width:26px;height:26px}
.welcome h2{font-size:26px;font-weight:700;letter-spacing:-.03em;line-height:1.15}
.welcome p{color:var(--muted);margin-top:8px;font-size:15.5px;line-height:1.5}

/* ---- category detail ---- */
.dhead{display:flex;flex-direction:column;align-items:center;text-align:center;padding:4px 0 22px}
.dhead .ic{width:64px;height:64px}
.dhead .ic .i{width:30px;height:30px}
.dhead .ic .letter{font-size:26px}
.dhead h1{font-size:22px;font-weight:650;letter-spacing:-.02em;margin-top:12px}
.dhead .big{font-size:40px;font-weight:700;letter-spacing:-.035em;margin-top:6px;line-height:1.1}
.dhead .big.over{color:var(--over)}
.dhead .sub{color:var(--muted);font-size:15px;margin-top:4px}
.dhead .bar{width:100%;max-width:300px;margin-top:16px;height:6px}

/* ---- sheets ---- */
#sheets{position:relative;z-index:50}
.sheet-wrap{position:fixed;inset:0;z-index:50}
.scrim{position:absolute;inset:0;background:var(--scrim);opacity:0;transition:opacity .35s var(--ease)}
.sheet-wrap.open .scrim{opacity:1}
.sheet{position:absolute;left:0;right:0;bottom:0;max-width:560px;margin:0 auto;max-height:calc(100% - env(safe-area-inset-top) - 10px);
  background:var(--bg);border-radius:24px 24px 0 0;display:flex;flex-direction:column;transform:translateY(100%);
  transition:transform .48s var(--spring);padding-bottom:env(safe-area-inset-bottom);outline:none}
.sheet-wrap.open .sheet{transform:none}
.sheet.dragging{transition:none}
.sheet.plain{background:var(--card)}
.sheet.tall{height:calc(100% - env(safe-area-inset-top) - 10px)}
.grabber{width:38px;height:5px;border-radius:3px;background:var(--fill-2);margin:7px auto 0;flex:none}
.sheet-head{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;padding:2px 10px 4px;flex:none;min-height:50px;touch-action:none}
.sheet-head h2{font-size:17px;font-weight:650;text-align:center;white-space:nowrap}
.sheet-head .l{justify-self:start}
.sheet-head .r{justify-self:end}
.sheet-body{flex:1;min-height:0;overflow-y:auto;padding:6px 16px 20px;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.sheet.compact .sheet-body{padding:18px 20px 16px}

.confirm{text-align:center}
.confirm h2{font-size:19px;font-weight:650;letter-spacing:-.015em}
.confirm p{color:var(--muted);font-size:15px;margin:8px 0 20px;line-height:1.45}
.confirm .btn + .btn{margin-top:10px}

.searchbar{display:flex;align-items:center;gap:8px;margin:2px 16px 8px;height:40px;border-radius:12px;background:var(--fill-2);padding:0 12px;flex:none}
.searchbar .i{width:18px;height:18px;color:var(--muted)}
.searchbar input{flex:1;border:0;background:none;font-size:16px;outline:none;min-width:0}
.searchbar input::-webkit-search-cancel-button{-webkit-appearance:none}

/* ---- forms in sheets ---- */
.ftitle{font-size:13px;color:var(--muted);margin:0 16px 7px;font-weight:550;letter-spacing:.01em}
.form{background:var(--card);border-radius:var(--r);overflow:hidden;margin-bottom:24px}
.form .row{min-height:52px;padding:0 16px}
.frow{display:flex;align-items:center;gap:12px;min-height:52px;padding:0 16px;position:relative;background:var(--card)}
.frow + .frow::before,.frow + .row::before,.row + .frow::before{content:"";position:absolute;top:0;left:16px;right:0;height:1px;background:var(--line)}
.frow .k{flex:none;font-size:16px}
.frow input{flex:1;min-width:0;border:0;background:none;text-align:right;font-size:16px;padding:15px 0;outline:none;color:var(--ink)}
.frow input::placeholder{color:var(--faint)}
.frow input[type=date]{-webkit-appearance:none;appearance:none;min-height:24px;color:var(--ink)}
.frow input[type=date]::-webkit-date-and-time-value{text-align:right}
.frow.big input{font-size:22px;font-weight:600;text-align:left}
.frow .pick{display:flex;align-items:center;gap:4px;color:var(--muted);margin-left:auto}
.frow .pick .i{width:18px;height:18px;stroke-width:2.2}
.ffoot{font-size:13px;color:var(--muted);margin:-16px 16px 24px;line-height:1.45}
.stepper{display:flex;align-items:center;gap:4px;margin-left:auto}
.stepper button{width:36px;height:32px;border-radius:9px;background:var(--fill-2);font-size:20px;font-weight:500;display:grid;place-items:center}
.stepper button:disabled{opacity:.35}
.stepper output{min-width:30px;text-align:center;font-weight:600}
.seg{display:flex;background:var(--fill-2);border-radius:11px;padding:2px;gap:2px;margin-left:auto}
.seg button{height:32px;padding:0 14px;border-radius:9px;font-size:14px;font-weight:550;color:var(--ink-2)}
.seg button[aria-pressed=true]{background:var(--card);color:var(--ink)}
@media (prefers-color-scheme:dark){.seg button[aria-pressed=true]{background:var(--fill-2)}}
.preview{text-align:center;color:var(--muted);font-size:14.5px;margin:-8px 0 22px}
.preview b{color:var(--ink);font-weight:650}
.rateedit{display:flex;align-items:baseline;justify-content:center;gap:10px;padding:26px 0 8px;font-size:20px;font-weight:600}
.rateedit input{width:150px;border:0;border-bottom:2px solid var(--line-2);background:none;text-align:center;font-size:34px;font-weight:700;
  letter-spacing:-.02em;padding:2px 0;outline:none}
.rateedit input:focus{border-bottom-color:var(--pos)}

/* ---- expense entry sheet ---- */
.entry .sheet-body{padding-top:0;display:flex;flex-direction:column}
.datepill{position:relative;display:inline-flex;align-items:center;gap:5px;height:32px;padding:0 11px;border-radius:999px;background:var(--fill);
  font-size:14px;font-weight:550;color:var(--ink-2);overflow:hidden}
.datepill .i{width:16px;height:16px}
.datepill input{position:absolute;inset:0;opacity:0;width:100%;height:100%;border:0;-webkit-appearance:none;appearance:none}
.amt-area{text-align:center;padding:6px 0 2px}
.curpill{display:inline-flex;align-items:center;gap:4px;height:34px;padding:0 10px 0 14px;border-radius:999px;background:var(--fill);font-weight:650;font-size:15px}
.curpill .i{width:17px;height:17px;stroke-width:2.2;color:var(--muted)}
.curpill:active{opacity:.6}
.amt-big{font-size:62px;font-weight:700;letter-spacing:-.045em;line-height:1.12;margin-top:6px;white-space:nowrap}
.amt-big.zero{color:var(--faint)}
.amt-big::after{content:"";display:inline-block;width:3px;height:.72em;margin-left:5px;border-radius:2px;background:var(--pos);vertical-align:-.03em;animation:blink 1.1s steps(1) infinite}
@keyframes blink{50%{opacity:0}}
.conv{font-size:15px;color:var(--muted);min-height:22px;margin-top:2px}
.conv.warn{color:var(--over)}
.conv input{width:86px;border:0;border-bottom:1.5px solid var(--line-2);background:none;text-align:center;font-weight:650;font-size:16px;color:var(--ink);outline:none}
.catrow{margin-top:16px;padding-bottom:2px}
.catchip{display:inline-flex;align-items:center;gap:9px;height:48px;padding:0 17px 0 6px;border-radius:999px;background:var(--fill);
  font-size:15.5px;font-weight:550;white-space:nowrap;flex:none;transition:background-color .15s,color .15s}
.catchip .ic{width:36px;height:36px}
.catchip .ic .i{width:18px;height:18px}
.catchip[aria-checked=true]{background:var(--btn);color:var(--btn-ink)}
.catchip[aria-checked=true] .ic{background:color-mix(in srgb,var(--btn-ink) 16%,transparent);color:var(--btn-ink)}
.linerow{margin-top:8px}
.linerow:empty{display:none}
.linechip{height:34px;padding:0 13px;border-radius:999px;border:1.5px solid var(--line-2);font-size:14px;font-weight:550;white-space:nowrap;flex:none;color:var(--ink-2)}
.linechip[aria-checked=true]{border-color:var(--ink);color:var(--ink)}
.hint{color:var(--muted);font-size:14.5px;padding:12px 0}
.noterow{display:flex;align-items:center;gap:10px;height:48px;border-radius:14px;background:var(--fill);padding:0 14px;margin-top:14px;flex:none}
.noterow .i{width:19px;height:19px;color:var(--muted)}
.noterow input{flex:1;border:0;background:none;font-size:16px;outline:none;min-width:0}
.noterow input::placeholder{color:var(--faint)}
.entry-foot{flex:none;padding:0 12px 10px}
.keypad{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:2px;margin-bottom:8px}
.keypad button{height:56px;border-radius:16px;font-size:28px;font-weight:500;display:grid;place-items:center;touch-action:manipulation;
  -webkit-user-select:none;user-select:none;transition:background-color .1s}
.keypad button:active{background:var(--fill-2)}
.keypad .i{width:28px;height:28px;stroke-width:1.7}
.delbtn{display:block;margin:6px auto 0;font-size:15.5px}

/* ---- tab bar ---- */
.tabbar{position:fixed;left:0;right:0;bottom:0;z-index:30;background:var(--bar);-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px);
  box-shadow:0 -.5px 0 var(--line-2);padding-bottom:env(safe-area-inset-bottom)}
.tabbar .in{max-width:560px;margin:0 auto;display:grid;grid-template-columns:repeat(5,1fr);height:58px;align-items:center}
.tab{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;height:100%;font-size:10.5px;font-weight:600;color:var(--muted);
  transition:color .15s}
.tab .i{width:25px;height:25px}
.tab[aria-current=page]{color:var(--ink)}
.tab.add span{width:52px;height:52px;border-radius:50%;background:var(--btn);color:var(--btn-ink);display:grid;place-items:center;transition:transform .18s var(--ease)}
.tab.add:active span{transform:scale(.9)}
.tab.add .i{width:26px;height:26px}

/* ---- toast ---- */
.toast{position:fixed;left:50%;bottom:calc(74px + env(safe-area-inset-bottom));z-index:60;transform:translate(-50%,16px);opacity:0;pointer-events:none;
  display:flex;align-items:center;gap:18px;padding:13px 18px;border-radius:16px;background:var(--ink);color:var(--bg);font-size:15px;font-weight:550;
  white-space:nowrap;max-width:calc(100% - 32px);transition:opacity .25s var(--ease),transform .35s var(--spring)}
.toast.show{opacity:1;transform:translate(-50%,0);pointer-events:auto}
.toast.raised{bottom:calc(24px + env(safe-area-inset-bottom))}
.toast span{overflow:hidden;text-overflow:ellipsis}
.toast button{color:inherit;font-weight:700;opacity:.85}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation:none!important;transition-duration:.01ms!important}
}
@media (max-height:700px){
  .amt-big{font-size:50px}
  .keypad button{height:48px}
  .btn{height:50px}
}
.btn.danger{color:var(--over)}
.form .row.noicon .ttl{font-weight:450}
.entry .sheet-body > *{flex-shrink:0}
.pace .big .over{color:var(--over)}

/* ---- v3: white page, flat lists, guided setup ---- */
.lt{padding:4px 2px 20px}
.lt .eyebrow.linkish{display:inline-flex;align-items:center;gap:2px;border-radius:8px}
.lt .eyebrow.linkish .i{width:16px;height:16px;stroke-width:2.2}
.lt .eyebrow.linkish:active{opacity:.5}
.row .set{color:var(--pos);font-weight:600;font-size:15.5px}
.row.center{justify-content:flex-start;min-height:54px}
.row.center .ttl{display:inline-flex;align-items:center;gap:13px;color:var(--pos);font-weight:550}
.row.center .ttl .i{width:22px;height:22px;margin:0 9px;stroke-width:2}
.row.noicon.center .ttl .i{margin:0}
.sh .count{font-size:14px;color:var(--muted);font-weight:600}
.foot{font-size:13.5px;color:var(--muted);margin:12px 2px 0;line-height:1.45}
.ftitle{margin:30px 2px 4px;font-size:13.5px}
.lt + .ftitle{margin-top:4px}
.section{margin-top:30px}

.tint,.plainblock{display:block;width:100%;text-align:left;border-radius:22px;padding:18px;margin-top:12px;transition:transform .16s var(--ease)}
.tint{background:var(--tint)}
.plainblock{background:var(--surface)}
button.tint:active,button.plainblock:active{transform:scale(.985)}
.tint .link,.plainblock .link{display:inline-block;margin-top:10px;padding:0}
.hero{margin-top:2px}
.hero-actions button{transition:transform .16s var(--ease),opacity .16s}
.hero-actions button:active{transform:scale(.97)}

/* budget summary */
.bsum{padding:0 2px 6px}
.bsum .big{font-size:42px;font-weight:700;letter-spacing:-.04em;line-height:1.05}
.bsum .sub{color:var(--muted);font-size:15px;margin-top:4px}
.bsum.center{text-align:center;padding:8px 0 20px}
.split{display:flex;gap:3px;height:8px;margin-top:18px}
.split i{border-radius:4px;min-width:4px}
.split .b{background:var(--ink-2)}
.split .f{background:var(--pos)}
.legend2{display:flex;gap:18px;margin-top:10px;font-size:14px;color:var(--muted)}
.legend2 span{display:inline-flex;align-items:center;gap:7px}
.legend2 span::before{content:"";width:9px;height:9px;border-radius:3px}
.legend2 .b::before{background:var(--ink-2)}
.legend2 .f::before{background:var(--pos)}
.legend2 b{color:var(--ink);font-weight:650}

/* welcome */
.hello{min-height:calc(100dvh - 190px);display:flex;flex-direction:column;justify-content:center;padding:10px 6px 0}
.hello-art{display:flex;flex-direction:column;gap:0;width:92px;height:124px;padding:0;border-radius:24px;overflow:hidden;margin-bottom:34px;
  animation:rise .7s var(--spring) both}
.hello-art i{background:var(--h);display:block;position:relative}
.hello-art i::after{content:"";position:absolute;left:0;top:0;bottom:0;width:var(--w,50%);background:rgba(255,255,255,.28)}
.hello h1{font-size:36px;font-weight:700;letter-spacing:-.035em;line-height:1.08;animation:rise .7s .06s var(--spring) both}
.hello p{color:var(--muted);font-size:17px;line-height:1.5;margin-top:14px;max-width:420px;animation:rise .7s .12s var(--spring) both}
.hello .btn{margin-top:34px;animation:rise .7s .18s var(--spring) both}
.hello .txtbtn{margin:10px auto 0;font-size:16px;animation:rise .7s .22s var(--spring) both}
@keyframes rise{from{opacity:0;transform:translateY(14px)}}

/* fields */
.bigfield{display:block;width:100%;height:60px;border:0;border-radius:16px;background:var(--fill);padding:0 18px;font-size:22px;font-weight:600;
  letter-spacing:-.015em;outline:none;margin-bottom:20px;color:var(--ink)}
.bigfield::placeholder{color:var(--faint);font-weight:500}
.bigfield:focus{background:color-mix(in srgb,var(--pos) 9%,var(--bg));box-shadow:inset 0 0 0 1.5px var(--pos)}
.amtfield{display:flex;align-items:center;gap:6px;flex:none}
.amtfield input{width:104px;height:40px;border:0;border-radius:11px;background:var(--fill);padding:0 12px;text-align:right;font-size:17px;font-weight:600;outline:none;color:var(--ink)}
.amtfield input:focus{box-shadow:inset 0 0 0 1.5px var(--pos)}
.amtfield em{font-style:normal;color:var(--muted);font-size:14px}
.chipwrap{display:flex;flex-wrap:wrap;gap:8px}
.basisrow{margin-top:18px;justify-content:center}
.linechip[aria-checked=true]{background:var(--btn);border-color:var(--btn);color:var(--btn-ink)}
.switchrow{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 0 4px;margin-top:10px}
.switchrow .ttl{font-size:16px;font-weight:550}
.switchrow .sub{font-size:13px;color:var(--muted);margin-top:1px}
.switch{position:relative;width:51px;height:31px;border-radius:999px;background:var(--fill-2);flex:none;transition:background-color .25s var(--ease)}
.switch i{position:absolute;left:2px;top:2px;width:27px;height:27px;border-radius:50%;background:#fff;box-shadow:0 2px 5px rgba(0,0,0,.18);transition:transform .3s var(--spring)}
.switch[aria-checked=true]{background:var(--pos)}
.switch[aria-checked=true] i{transform:translateX(20px)}
.entry .switchrow{margin-top:14px}

/* new-trip flow */
.wiz .sheet-head .dots{display:flex;gap:6px}
.wiz .dots i{width:22px;height:4px;border-radius:2px;background:var(--fill-2);transition:background-color .3s}
.wiz .dots i.on{background:var(--ink)}
.wiz .sheet-head .r .txtbtn{color:var(--muted)}
.wiz-step{padding:4px 4px 10px}
.wiz-step.fwd{animation:stepIn .38s var(--spring) both}
.wiz-step.bwd{animation:stepBack .38s var(--spring) both}
@keyframes stepIn{from{opacity:0;transform:translateX(36px)}}
@keyframes stepBack{from{opacity:0;transform:translateX(-36px)}}
.wiz-q{font-size:30px;font-weight:700;letter-spacing:-.032em;line-height:1.12;margin:10px 0 18px}
.wiz-sub{color:var(--muted);font-size:15.5px;line-height:1.45;margin:-8px 0 18px}
.wiz-sub.center{text-align:center;margin-top:8px}
.wiz-hint{display:block;color:var(--muted);font-size:15px;margin-top:-6px;text-align:left}
.wiz-hint b{color:var(--ink);font-weight:600}
.wiz-hint span{color:var(--pos);font-weight:550}
.wiz-foot{flex:none;padding:8px 16px 12px}
.wiz-sum{text-align:center;color:var(--muted);font-size:14.5px;min-height:20px;margin-bottom:10px}
.wiz-sum:empty{display:none}
.wiz-sum b{color:var(--ink);font-weight:650}
.bigstep{display:flex;align-items:center;justify-content:center;gap:30px;margin:44px 0 18px}
.bigstep button{width:62px;height:62px;border-radius:50%;background:var(--fill);font-size:30px;font-weight:400;display:grid;place-items:center;transition:transform .15s var(--ease)}
.bigstep button:active{transform:scale(.92)}
.bigstep button:disabled{opacity:.3}
.bigstep div{text-align:center;min-width:100px}
.bigstep output{display:block;font-size:64px;font-weight:700;letter-spacing:-.04em;line-height:1}
.bigstep span{color:var(--muted);font-size:15px}
.budgetlist .row{min-height:68px}

/* calendar */
.cal-wd{position:sticky;top:-6px;z-index:2;display:grid;grid-template-columns:repeat(7,1fr);background:var(--bg);padding:6px 0 8px;
  font-size:12px;font-weight:600;color:var(--muted);text-align:center;box-shadow:0 1px 0 var(--line)}
.cal-m h3{font-size:17px;font-weight:650;letter-spacing:-.01em;margin:20px 6px 8px}
.cal-grid{display:grid;grid-template-columns:repeat(7,1fr);row-gap:4px}
.cal .d{position:relative;height:46px;display:grid;place-items:center;font-size:16px;font-weight:500}
.cal .d span{position:relative;z-index:1;width:42px;height:42px;border-radius:50%;display:grid;place-items:center;transition:background-color .15s,color .15s}
.cal .d.today span{color:var(--pos);font-weight:700}
.cal .d.in::before,.cal .d.start:not(.single)::before,.cal .d.end:not(.single)::before{content:"";position:absolute;top:3px;bottom:3px;left:0;right:0;background:var(--tint)}
.cal .d.start:not(.single)::before{left:50%}
.cal .d.end:not(.single)::before{right:50%}
.cal .d.start span,.cal .d.end span{background:var(--btn);color:var(--btn-ink);font-weight:650}
.cal .d:not(.start):not(.end):active span{background:var(--fill-2)}
.datesum{text-align:center;color:var(--muted);font-size:15px;margin:0 16px 4px;min-height:21px}
.sheet .stepper{margin-left:auto}
/* keep sheets above the on-screen keyboard (--kb is set from visualViewport) */
.sheet{bottom:var(--kb,0px);max-height:calc(100% - env(safe-area-inset-top) - 10px - var(--kb,0px));transition:transform .48s var(--spring),bottom .25s var(--ease)}
.sheet.tall{height:calc(100% - env(safe-area-inset-top) - 10px - var(--kb,0px))}
.kb-open .sheet{padding-bottom:0}

/* bank import */
.ltrow{display:flex;align-items:flex-end;justify-content:space-between;gap:12px}
.ltrow .link{display:inline-flex;align-items:center;gap:5px;padding-bottom:6px}
.ltrow .link .i{width:18px;height:18px}
.imp-sum{color:var(--muted);font-size:14.5px;margin:0 2px 8px}
.imp-switch{padding:12px 16px;margin:0}
.imp-list{margin-top:10px}
.imp-row{cursor:pointer;align-items:flex-start;padding-top:13px;padding-bottom:13px}
.imp-row .main{gap:2px}
.imp-row .sub em{font-style:normal;color:var(--over)}
.imp-row:not(.on) .main .ttl,.imp-row:not(.on) .end{opacity:.45}
.tick{width:26px;height:26px;border-radius:50%;border:2px solid var(--line-2);display:grid;place-items:center;flex:none;margin-top:6px;color:transparent;
  transition:background-color .15s,border-color .15s}
.tick .i{width:16px;height:16px;stroke-width:3}
.tick[aria-checked=true]{background:var(--pos);border-color:var(--pos);color:#fff}
.catpick{display:inline-flex;align-items:center;gap:6px;align-self:flex-start;height:30px;padding:0 12px 0 4px;border-radius:999px;background:var(--fill);
  font-size:13.5px;font-weight:550;margin-top:6px;color:var(--ink-2)}
.catpick:not([style]){padding-left:12px;color:var(--pos)}
.catpick .ic{width:22px;height:22px}
.catpick .ic .i{width:13px;height:13px}
.catpick .ic .letter{font-size:11px}
.row select{border:0;background:var(--fill);border-radius:10px;height:36px;padding:0 10px;font-size:15px;max-width:55%;color:var(--ink)}
.pace .big .perweek{display:block;font-size:15px;font-weight:550;color:var(--muted);letter-spacing:0;margin-top:4px}

/* split costs */
.toolrow{display:flex;gap:8px;margin-top:14px;flex:none}
.toolrow .noterow{flex:1;margin-top:0;min-width:0}
.splitbtn{display:flex;align-items:center;gap:6px;height:48px;padding:0 14px;border-radius:14px;background:var(--fill);font-weight:600;font-size:15px;flex:none;
  transition:background-color .15s,color .15s}
.splitbtn .i{width:19px;height:19px}
.splitbtn.on{background:var(--btn);color:var(--btn-ink)}
.split-total{text-align:center;color:var(--muted);font-size:15.5px;margin-top:8px}
.split-total + .bigstep{margin-top:22px}
.shared{margin:0 0 16px}
.shared .top .i{width:20px;height:20px;color:var(--pos)}
.shared .big{font-size:24px;font-weight:700;letter-spacing:-.02em;margin-top:4px}
.shared .note:empty{display:none}
.fchip .i{width:16px;height:16px}
.shared .top{display:flex;justify-content:space-between;align-items:center;gap:10px}
.shared .lbl{font-size:14.5px;color:var(--muted);font-weight:500}
.shared .note{font-size:14px;color:var(--muted);margin-top:6px;line-height:1.45}
.sheet .switchrow + .preview{margin:16px 0 20px}

/* settling up */
.settlerow{margin-top:10px;padding-top:12px}
.settlerow[hidden]{display:none}
.row .sub .st{font-weight:600}
.row .sub .st.owe{color:var(--over)}
.row .sub .st.owed{color:var(--pos)}
.row .sub .st.ok{color:var(--muted);display:inline-flex;align-items:center;gap:3px}
.row .sub .st .i{width:13px;height:13px;stroke-width:2.6}

/* today's allowance */
.pace .todaybox{margin-top:12px}
.pace .todaybox .bar{height:8px;margin-top:0;background:color-mix(in srgb,var(--pos) 16%,transparent)}
.pace .todaylbl{display:flex;justify-content:space-between;font-size:13.5px;color:var(--muted);margin-top:7px}
.pace .todaylbl b{color:var(--ink);font-weight:650}
.pace .todaybox + .days{margin-top:14px}
.pace .note b{color:var(--ink);font-weight:650}
