/* Family Expense Tracker — original Couple Expense Tracker look & feel */
:root{
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;
  color:#18211e;background:#f3f5f1;
  --green:#175c4c;--mint:#dcebe5;--ink:#18211e;--muted:#66736d;
  --line:#dfe5e1;--danger:#b42318;--shadow:0 12px 34px rgba(30,55,45,.09);
}
*{box-sizing:border-box}
body{margin:0;min-height:100vh;min-height:100dvh;background:linear-gradient(145deg,#edf4ef,#f8f5ee);padding:0 0 calc(96px + env(safe-area-inset-bottom));overscroll-behavior-y:none}
button,input,select,textarea{font:inherit}
button{cursor:pointer}
.hidden{display:none!important}

/* shell + topbar */
.shell{width:min(100%,560px);margin:auto;padding:18px 16px 28px}
.topbar{position:relative;display:flex;align-items:center;justify-content:space-between;padding:6px 2px 20px}
.brand{display:flex;align-items:center;gap:11px}
.mark{display:grid;place-items:center;width:42px;height:42px;border-radius:14px;background:var(--green);color:#fff;font-size:20px;font-weight:800}
.mark.big{width:56px;height:56px;font-size:28px;border-radius:18px;margin:6px auto 12px}
.brand h1{font-size:19px;margin:0}
.eyebrow{margin:2px 0 0;color:var(--muted);font-size:12px}
.topbar-actions{display:flex;align-items:center;gap:8px}
.icon-btn{position:relative;background:none;border:none;font-size:22px;cursor:pointer;padding:6px;line-height:1}
.badge{position:absolute;top:0;right:0;background:#e5484d;color:#fff;font-size:10px;font-weight:700;min-width:18px;height:18px;border-radius:9px;display:flex;align-items:center;justify-content:center;padding:0 4px}
.avatar{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;background:#f6d79a;color:#674814;font-weight:800;overflow:hidden;cursor:pointer}
.avatar img{width:100%;height:100%;border-radius:50%;object-fit:cover;display:block}
/* Profile popup (v1.1.47): the avatar opens a small card under it —
   display name + family, then Switch family and Sign out (moved out
   of the Members card). About is the last button in that card. */
.profile-popup-backdrop{position:fixed;inset:0;z-index:29;background:transparent}
.profile-popup{position:absolute;right:2px;top:calc(100% - 12px);min-width:230px;max-width:calc(100vw - 24px);background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow);padding:6px 0;z-index:30}
.profile-popup-header{padding:10px 16px 8px}
.profile-popup-name{font-size:15px;font-weight:700;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.profile-popup-sub{font-size:12px;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.profile-popup-divider{height:1px;background:var(--line);margin:4px 16px}
.profile-row{display:flex;align-items:center;gap:12px;width:100%;border:0;background:none;padding:11px 16px;font-size:15px;color:var(--ink);cursor:pointer;text-align:left}
.profile-row:hover{background:#f2f6f3}
.profile-row-icon{font-size:18px;line-height:1;width:22px;text-align:center;color:var(--muted)}
.profile-row.danger-row{color:var(--danger)}
.profile-row.danger-row .profile-row-icon{color:var(--danger)}

/* views */
.view{display:none}
.view.active{display:block}
.fam-view.hidden{display:none}

/* hero (original) */
.hero{padding:25px;border-radius:25px;background:var(--green);color:#fff;box-shadow:var(--shadow);overflow:hidden;position:relative}
.hero:after{content:"₹";position:absolute;right:-12px;bottom:-45px;font-size:150px;font-weight:900;opacity:.08}
.hero small{opacity:.74}
.hero .total{font-size:40px;font-weight:850;letter-spacing:-1.5px;margin:8px 0 22px}
.stats{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.stat{padding:14px;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.15);border-radius:16px}
.stat b{display:block;font-size:18px;margin-top:4px}
.who-split{font-size:12px;opacity:.85;margin-top:10px}

/* sections + quick actions (original) */
.section-title{display:flex;align-items:center;justify-content:space-between;margin:24px 2px 12px}
.section-title h2{font-size:17px;margin:0}
.section-title p{margin:2px 0 0}
.text-btn{border:0;background:none;color:var(--green);font-weight:800;padding:6px}
.actions{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.action{border:0;border-radius:19px;padding:18px;text-align:left;min-height:120px;color:var(--ink);box-shadow:var(--shadow)}
.action.add{background:#d8eee5}
.action.view-expenses{background:#f3e6c9}
.action .icon{font-size:25px}
.action b{display:block;font-size:16px;margin:15px 0 3px}
.action small{color:var(--muted)}

/* person filter chips (expenses tab) */
.filter-row{display:flex;gap:8px;flex-wrap:wrap;margin:12px 2px}
.filter-btn{border:1px solid rgba(210,219,214,.9);background:#fff;border-radius:999px;padding:8px 16px;font-size:13px;font-weight:700;color:var(--ink)}
.filter-btn.active{background:var(--green);border-color:var(--green);color:#fff}
.filter-row.scroll-x{flex-wrap:nowrap;overflow-x:auto;padding-bottom:6px;scrollbar-width:thin}
.filter-row.scroll-x .filter-btn{flex:0 0 auto}

/* cards (original) */
.card{background:#fff;border:1px solid rgba(210,219,214,.78);border-radius:20px;box-shadow:0 8px 25px rgba(35,57,48,.05)}
.card-list{display:flex;flex-direction:column;gap:10px}
.form-card{padding:20px;margin-bottom:14px}
.form-card h3{margin:0 0 12px;font-size:16px}
.muted{color:var(--muted)}
.small{font-size:12px}
.center{text-align:center}

/* chart (original) */
.chart-card{padding:18px}
.chart-grid{display:grid;grid-template-columns:minmax(150px,180px) 1fr;align-items:center;gap:18px}
.chart-wrap{display:grid;place-items:center;min-height:170px}
.chart-wrap canvas{display:block;width:min(100%,180px);height:auto;aspect-ratio:1}
.chart-legend{display:flex;flex-direction:column;gap:10px;min-width:0;max-height:280px;overflow:auto;padding-right:2px}
.legend-row{display:grid;grid-template-columns:10px minmax(0,1fr) auto;gap:8px;align-items:center;font-size:13px}
.legend-dot{width:10px;height:10px;border-radius:50%}
.legend-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.legend-value{text-align:right}
.legend-value b{display:block;font-size:13px}
.legend-value small{color:var(--muted)}
.chart-empty{color:var(--muted);text-align:center;padding:26px 10px}
.chart-summary{margin:3px 0 0;color:var(--muted);font-size:12px}
@media(max-width:390px){.chart-grid{grid-template-columns:135px 1fr;gap:12px}.chart-wrap{min-height:145px}.legend-row{font-size:12px}.chart-card{padding:14px}}

/* forms (original) */
.page-head{display:flex;align-items:center;gap:12px;margin-bottom:18px}
.page-head h2{margin:0;font-size:23px}
.page-head p{margin:2px 0 0;color:var(--muted);font-size:13px}
label{display:block;font-weight:750;margin:17px 0 7px}
.amount-wrap{position:relative}
.rupee{position:absolute;left:15px;top:10px;font-size:27px;font-weight:850}
input,select,textarea{width:100%;min-height:52px;border:1px solid #ccd5d0;border-radius:13px;background:#fff;padding:12px 14px;color:var(--ink)}
#amount,.edit-amount{padding-left:43px;font-size:27px;font-weight:850}
textarea{min-height:82px;resize:vertical}
/* "Improve SMS reading" preview (v1.11.15): read-only anonymised text
   under the box — same box shape, greyed, wraps like the textarea. */
#sms-research-preview{white-space:pre-wrap;word-break:break-word;background:#f4f7f5;border:1px solid #ccd5d0;border-radius:13px;padding:12px 14px;margin:0 0 4px;min-height:52px;font:inherit;color:var(--ink)}
.primary{width:100%;min-height:54px;margin-top:20px;border:0;border-radius:14px;background:var(--green);color:#fff;font-weight:850}
.primary:disabled{opacity:.55}
.btn{border:1px solid #ccd5d0;background:#fff;border-radius:12px;padding:10px 16px;font-weight:750;color:var(--ink)}
.btn.small{min-height:40px;padding:7px 14px;font-size:13px;border-radius:10px}
.btn.primary{background:var(--green);border-color:var(--green);color:#fff}
.btn.danger{color:var(--danger);border-color:#e5b8b2;width:100%}
.btn.danger.inline{width:auto}
.paste-row{margin-bottom:14px}
.paste-row .btn{width:100%}
#btn-switch-family{width:100%;margin-bottom:10px}
#btn-signout{width:100%;margin-top:10px}
.status{min-height:21px;margin:12px 0 0;text-align:center;font-size:14px;font-weight:700}
.success{color:#137333}
.error{color:var(--danger)}
.error-box{background:#fdecea;border:1px solid #f5c6c0;color:var(--danger);border-radius:12px;padding:12px;margin-bottom:12px;font-size:14px}
.row{display:flex;gap:10px;align-items:center}
.row .btn{flex-shrink:0}
.hint{font-size:12px;color:var(--muted);font-weight:400}
.check{display:flex;align-items:center;gap:10px;font-weight:600}
.check input{width:auto;min-height:0}

/* month bar */
.month-bar{display:flex;align-items:center;justify-content:space-between;padding:8px 10px;margin-bottom:10px}
.month-label{border:0;background:none;font-weight:800;font-size:16px;color:var(--ink)}
.icon-btn{border:0;background:#eef2ef;border-radius:12px;min-width:42px;min-height:42px;font-size:20px;color:var(--ink);display:grid;place-items:center}
/* family name display row + rename sheet */
.family-name-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:4px 0}
.family-name-text{font-size:20px;font-weight:800;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#renameModal .sheet input{margin:8px 0 12px}
#btn-save-rename{width:100%}
.summary-line{margin:2px 2px 12px;color:var(--muted);font-size:14px}
.summary-line strong{color:var(--ink)}

/* expense rows (original style) */
.expense{padding:15px;display:grid;grid-template-columns:44px 1fr auto;gap:12px;align-items:center}
.expense-icon{width:44px;height:44px;border-radius:14px;background:#edf4ef;display:grid;place-items:center;font-size:20px;flex-shrink:0}
.expense-main{min-width:0}
.expense-main b{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.meta{font-size:12px;color:var(--muted);margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.expense-side{text-align:right;display:flex;flex-direction:column;align-items:flex-end;gap:6px}
.expense-side strong{display:block;font-size:16px}
.expense-tools{display:flex;gap:2px;align-items:center}
.edit-btn{border:0;background:none;color:var(--green);font-weight:800;font-size:12px;padding:6px 4px}
.del-btn{border:0;background:none;color:var(--danger);font-weight:800;font-size:12px;padding:6px 4px;opacity:.8}
.empty{text-align:center;padding:40px 20px;color:var(--muted)}

/* emote (original) */
.emote-btn{border:0;background:rgba(23,92,76,.08);color:#0f7a5e;width:32px;height:32px;border-radius:50%;display:grid;place-items:center;font-size:16px;font-weight:900;opacity:.75;transition:.15s}
.emote-btn.has-emote{opacity:1;background:#d8eee5}
.emote-btn:active{transform:scale(.92);opacity:1}
.emote-badge{display:inline-flex;align-items:center;gap:4px;background:#e6f1ec;color:#174e40;border:1px solid #cfe3da;border-radius:999px;padding:2px 8px;font-size:11px;font-weight:800;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:5px}
.emote-badge small{opacity:.8;font-weight:600}
.emote-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:10px;margin:16px 0 8px}
.emote-opt{border:1px solid #dde5e0;background:#f7faf8;border-radius:14px;min-height:58px;font-size:26px;display:grid;place-items:center;transition:.12s;padding:4px}
.emote-opt small{display:block;font-size:9px;color:var(--muted);font-weight:700}
.emote-opt.sel{background:#d8eee5;border-color:#8cc4ad;box-shadow:0 0 0 2px rgba(23,92,76,.15)}
.emote-opt:active{transform:scale(.92);background:#e2efe8}
.emote-clear{margin-top:12px;width:100%;min-height:44px;border:1px dashed #c9d6cf;background:#fff;border-radius:12px;color:var(--muted);font-weight:700}

/* bottom nav (original, 5 items) */
.bottom-nav{position:fixed;left:50%;bottom:0;transform:translateX(-50%);width:min(100%,560px);display:grid;grid-template-columns:repeat(5,1fr);padding:8px 10px calc(8px + env(safe-area-inset-bottom));background:rgba(255,255,255,.96);border-top:1px solid var(--line);backdrop-filter:blur(14px);z-index:20}
.nav-btn{border:0;background:none;color:#738078;padding:7px 2px;border-radius:12px;font-size:11px;font-weight:700}
.nav-btn span{display:block;font-size:21px;margin-bottom:2px}
.nav-btn.active{color:var(--green);background:#edf4ef}
.nav-btn.add-btn{color:#fff;background:var(--green);width:52px;height:52px;border-radius:50%;padding:0;justify-self:center;align-self:center;transform:translateY(-14px);box-shadow:0 8px 18px rgba(23,92,76,.35)}
.nav-btn.add-btn span{display:grid;place-items:center;font-size:28px;font-weight:900;margin:0;line-height:1}
.nav-btn.add-btn.active{background:var(--green);color:#fff}
.nav-btn.add-btn.disabled{background:#c3cdc8;color:#f2f5f3;box-shadow:none;cursor:default}

/* modal bottom sheets (original) */
.modal{position:fixed;inset:0;background:rgba(15,25,21,.48);display:none;place-items:end center;z-index:30}
.modal.open{display:grid}
.sheet{width:min(100%,560px);max-height:92vh;overflow:auto;background:#fff;border-radius:25px 25px 0 0;padding:22px 18px calc(22px + env(safe-area-inset-bottom))}
.sheet-head{display:flex;justify-content:space-between;align-items:center}
.sheet-head h2{margin:0;font-size:20px}
.close{border:0;background:#eef2ef;border-radius:50%;width:38px;height:38px;font-size:20px}

/* budget */
.cat-row{display:flex;align-items:center;gap:10px;padding:9px 0;border-bottom:1px solid #eef2ef;font-size:14px}
.cat-row:last-child{border-bottom:none}
.cat-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cat-amt{font-weight:750;white-space:nowrap}
.progress{height:10px;border-radius:999px;background:#eef2ef;overflow:hidden;margin:6px 0}
.progress>div{height:100%;border-radius:999px;background:var(--green);transition:width .3s}
.progress.warn>div{background:#e6a817}
.progress.over>div{background:var(--danger)}
.budget-flag{font-size:12px;font-weight:700}
.budget-flag.ok{color:#137333}
.budget-flag.warn{color:#9a6b00}
.budget-flag.over{color:var(--danger)}

/* members */
.invite-row{display:flex;gap:10px;align-items:center}
.invite-row .btn{flex:none}
.invite-code{font-size:26px;font-weight:850;letter-spacing:3px;background:#f1f5f2;border-radius:12px;padding:10px 16px;flex:1;text-align:center}
.member-row{display:flex;align-items:center;gap:10px;padding:10px 0;border-bottom:1px solid #eef2ef}
.member-row:last-child{border-bottom:none}
.member-info{flex:1;min-width:0}
.member-name{font-weight:750;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.member-sub{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.role-badge{display:inline-block;background:#edf4ef;color:var(--green);font-size:11px;font-weight:800;border-radius:999px;padding:2px 9px;margin-left:8px}
.request-row{display:flex;flex-wrap:wrap;gap:8px;align-items:center;padding:10px 0;border-bottom:1px solid #eef2ef}
.request-row:last-child{border-bottom:none}
.request-row .member-info{flex:1 1 100%;min-width:0}
.request-row .btn{flex:1 1 0;min-height:34px;padding:5px 10px;font-size:12px;border-radius:9px}
.request-actions{display:flex;gap:8px;flex:1 1 100%;margin-top:2px}
.request-actions .btn{flex:1 1 0}
.toggle{position:relative;display:inline-block;width:44px;height:26px;flex-shrink:0}
.toggle input{opacity:0;width:0;height:0;position:absolute}
.slider{position:absolute;inset:0;background:#ccd5d0;border-radius:999px;transition:.2s}
.slider:before{content:"";position:absolute;width:20px;height:20px;left:3px;top:3px;background:#fff;border-radius:50%;transition:.2s;box-shadow:0 1px 3px rgba(0,0,0,.25)}
.toggle input:checked + .slider{background:var(--green)}
.toggle input:checked + .slider:before{transform:translateX(18px)}
.notif-filter-row{margin:2px 0 10px}
.notif-filter-label{font-size:14px;font-weight:600;color:var(--muted)}
.fixed-row{display:flex;align-items:center;gap:10px;padding:12px 16px}
.fixed-info{flex:1;min-width:0}
.fixed-sub{font-size:12px;color:var(--muted);margin-top:3px}

/* toast */
#toast{position:fixed;left:50%;bottom:calc(104px + env(safe-area-inset-bottom));transform:translateX(-50%);background:#18211e;color:#fff;padding:12px 20px;border-radius:14px;font-size:14px;font-weight:600;z-index:50;max-width:min(92%,520px);text-align:center;box-shadow:var(--shadow)}

/* small layout helpers (replaces scattered inline styles) */
.member-row.flat{border:none;padding:12px 16px}
.cat-row.flat{border:none;padding:0}
.budget-bar{margin:10px 0}
.budget-bar.tappable{cursor:pointer}
.budget-bar.tappable:active{opacity:.75}
.budget-remove-row{display:flex;justify-content:flex-end;margin:2px 0 8px}
.tappable-note{cursor:pointer;color:var(--green);font-weight:700}
.budget-flag.tap-hint{display:block;color:var(--muted);font-weight:600;margin-top:2px}

/* "+" fan-out menu on the Budget screen: labelled circles fanning up
   from the green centre button (FAB speed-dial pattern). The circle
   column sits exactly on the centre button's axis: the menu's right
   edge is 22px right of viewport centre, so each 44px circle's centre
   lands on the axis, with the label pill to its left. */
.add-submenu-backdrop{position:fixed;inset:0;z-index:24;background:rgba(15,25,21,.45)}
/* While the fan-out is open the bottom nav rides above the scrim so the
   centre button's white × stays bright (not dimmed through the scrim),
   like the reference screenshot. Tapping another nav tab still navigates
   and the menu closes via showFamilyView(). */
.bottom-nav.menu-open{z-index:26}
.add-submenu{position:fixed;right:calc(50% - 22px);bottom:96px;max-width:min(92vw,340px);z-index:25;display:flex;flex-direction:column;align-items:flex-end;gap:14px}
.add-submenu-item{display:flex;align-items:center;gap:10px;border:0;background:none;padding:0;cursor:pointer}
.add-submenu-label{background:#fff;color:var(--ink);font-size:13px;font-weight:700;padding:7px 12px;border-radius:999px;box-shadow:var(--shadow);white-space:nowrap}
.add-submenu-circle{flex:none;width:44px;height:44px;border-radius:50%;background:var(--green);color:#fff;display:grid;place-items:center;font-size:20px;font-weight:800;box-shadow:0 6px 14px rgba(23,92,76,.35)}
.add-submenu-item:active .add-submenu-circle{transform:scale(.94)}
.add-submenu-item:active .add-submenu-label{background:#edf4ef}
.row.tight{margin:8px 0}
.grow{flex:1}
.signout-note{margin:0 0 10px}
#btn-signout-home{width:100%}
#btn-export-data{width:100%}

/* purchase plans */
.action.plans{background:#e3ecf7}
.action.yearly{background:#e9e4f5}

/* notification banners (top of the family home screen) */
#plan-banners{display:flex;flex-direction:column;gap:10px;margin-bottom:14px}
#plan-banners:empty{margin-bottom:0}
.banner{display:flex;align-items:center;gap:12px;background:#fff;border:1px solid var(--line);
  border-left:5px solid var(--green);border-radius:16px;padding:12px 14px;box-shadow:var(--shadow);font-size:13px}
.banner-main{flex:1;min-width:0}
.banner-main b{display:block;font-size:14px}
.banner.vote{border-left-color:#2f6fed}
.banner.warn{border-left-color:#e6a817}
.banner.over{border-left-color:var(--danger)}
.banner{flex-wrap:wrap;row-gap:10px}
.banner-main{flex:1 1 100%;min-width:0}
.banner .row{margin-left:auto;flex-wrap:wrap;row-gap:8px}
.banner .row .btn{flex:1 1 auto}
/* compact tappable vote notification: single row, no wasted space */
.banner.vote.tappable{flex-wrap:nowrap;cursor:pointer}
.banner.vote.tappable .banner-main{flex:1 1 auto;min-width:0}
.banner-chev{font-size:24px;line-height:1;color:var(--muted);flex-shrink:0;padding:0 2px}
/* vote review actions: stacked, full-width, always visible */
.vote-actions{display:flex;flex-direction:column;gap:10px;margin-top:16px}
.vote-actions .btn{width:100%;padding:14px 16px;font-size:15px}

/* plan rows */
.plan-row{padding:15px;display:flex;gap:12px;align-items:center;cursor:pointer;-webkit-touch-callout:none;user-select:none}
.plan-main{flex:1;min-width:0}
.plan-title{display:flex;align-items:center;gap:8px}
.plan-title b{font-size:16px}
.plan-rank{font-size:11px;font-weight:800;color:var(--muted);background:#eef2ef;border-radius:999px;padding:2px 9px}
.plan-sub{margin-top:6px}
.plan-tools{display:flex;flex-direction:column;gap:6px;flex-shrink:0}
.icon-btn.small{min-width:36px;min-height:36px;font-size:16px}
.icon-btn:disabled{opacity:.35}

/* sticky vote confirm bar */
.vote-bar{position:sticky;bottom:calc(84px + env(safe-area-inset-bottom));z-index:15;
  background:#18211e;color:#fff;border-radius:16px;padding:14px 16px;
  box-shadow:var(--shadow);margin-top:14px}
.vote-bar-label{font-weight:700;margin-bottom:10px}
.vote-bar-buttons{display:flex;gap:10px}
.vote-btn{flex:1;border:1px solid #ccd5d0;background:#fff;border-radius:12px;
  padding:12px 16px;font-weight:700;font-size:14px;color:var(--ink);cursor:pointer}
.vote-btn-primary{background:var(--green);border-color:var(--green);color:#fff}
.vote-btn span{display:block;line-height:1.4}
.req-btn{flex:1;border:1px solid #ccd5d0;background:#fff;border-radius:10px;
  padding:8px 12px;font-weight:700;font-size:12px;color:var(--ink);cursor:pointer}
.req-btn-primary{background:var(--green);border-color:var(--green);color:#fff}
.req-btn span{display:block;line-height:1.4}

/* contribution chip on the add-expense form */
.contrib-chip{display:flex;align-items:center;gap:8px;background:#e3ecf7;border:1px solid #c3d4ee;
  border-radius:14px;padding:10px 14px;margin-bottom:14px;font-size:14px;color:#1c3a63}
.contrib-chip b{flex:1}

.row.wrap{flex-wrap:wrap;gap:10px}
.row.wrap .btn{flex:1;min-width:120px}
/* Category modal: Delete / Cancel / Save in one row, equal widths
   (Kavin, 2026-10-31) — min-width:0 so all three fit on a phone
   instead of wrapping to a dangling second row. */
#categoryModal .row .btn{flex:1;min-width:0}
#btn-plan-delete{flex:1;min-width:120px;width:auto}

@media(min-width:700px){
  body{padding-bottom:25px}
  .shell{padding-top:28px}
  .bottom-nav{bottom:22px;border:1px solid var(--line);border-radius:20px;padding:8px;box-shadow:var(--shadow)}
  .modal{place-items:center}
  .sheet{border-radius:24px;max-width:520px}
}

.notif-item{display:flex;gap:12px;padding:12px 0;border-bottom:1px solid #eef2ef;cursor:pointer}
.notif-item:last-child{border-bottom:none}
.notif-icon{font-size:24px;flex-shrink:0;margin-top:2px}
.notif-item.unread{background:#f6fbf7;border-radius:10px;padding:12px;margin:0 -8px}
.notif-dot{width:8px;height:8px;border-radius:50%;background:#2e7d32;margin-top:6px;flex-shrink:0}
.notif-dot.read{background:#ccc}
.notif-content{flex:1;min-width:0}
.notif-title{font-weight:700;font-size:14px}
.notif-body{font-size:13px;color:var(--muted);margin-top:2px}
.notif-time{font-size:11px;color:#999;margin-top:4px}

/* yearly review charts */
.series-toggles{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0 2px}
.series-chip{display:inline-flex;align-items:center;gap:7px;border:1.5px solid var(--line);background:#fff;border-radius:999px;padding:7px 12px;font-size:13px;font-weight:700;color:var(--ink)}
.series-chip small{font-weight:600;color:var(--muted)}
.series-chip.off{opacity:.42}
.bar-chart{display:block;width:100%;margin-top:8px}
.chart-readout{min-height:20px;margin-top:8px}
.year-chart-card select{margin-top:10px}

/* amount expression preview */
.expr-preview{font-size:13px;font-weight:700;color:var(--green);margin-top:6px}
.expr-preview:empty{display:none}
.expr-preview.bad{color:var(--danger);font-weight:600}

/* amount expression mode toggle */
.amount-row{display:flex;gap:8px;align-items:stretch;width:100%}
.amount-row>.amount-wrap{flex:1;min-width:0}
.amount-row>input{flex:1;min-width:0}
.fx-toggle{flex:none;border:1px solid #ccd5d0;background:#fff;color:var(--muted);border-radius:13px;padding:0 15px;font-size:16px;font-weight:800;cursor:pointer}
.fx-toggle.active{background:var(--green);border-color:var(--green);color:#fff}
input.expr-on{border-color:var(--green);box-shadow:0 0 0 3px rgba(23,92,76,.16)}

/* Splash screen (v1.11.7): full-screen loading page shown from the first
   paint, while sign-in and family data load. Same cream/green palette as
   the rest of the app; one screen, no scrolling. */
.splash{position:fixed;inset:0;z-index:9999;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;background:linear-gradient(145deg,#edf4ef,#f8f5ee);text-align:center;padding:24px}
.splash-icon{width:96px;height:96px;border-radius:24px;box-shadow:var(--shadow)}
.splash-title{margin:0;font-size:24px;font-weight:850;color:var(--ink)}
.splash-version{margin:0;color:var(--muted);font-size:14px}
.splash-spinner{width:28px;height:28px;border-radius:50%;border:3px solid var(--mint);border-top-color:var(--green);animation:splash-spin .9s linear infinite}
@keyframes splash-spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.splash-spinner{animation:none}}

/* Family Tasks (v1.11.8) */
.action.tasks{background:#e3ecf7}
.action.manage-cat{background:#efe6f3}
.task-row{cursor:pointer}
.task-title-row{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.task-title-row b{font-size:15px}
.task-detail-title{margin:0;font-size:18px}
.task-status{flex:none;font-size:11px;font-weight:800;padding:4px 9px;border-radius:999px;white-space:nowrap}
.task-status.pending{background:#fdf0d3;color:#8a6d00}
.task-status.active{background:#d8eee5;color:var(--green)}
.task-status.done{background:#e6e9e7;color:var(--muted)}
.task-status.rejected{background:#fde8e5;color:var(--danger)}
.task-overdue-label{color:var(--danger);font-weight:700}
.task-detail{margin:10px 0 4px;font-size:14px;line-height:1.5;white-space:pre-wrap}
.task-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}
/* tasks empty state (v1.1.39 parity): centred icon + message + action,
   using the vertical space instead of one line at the top */
.task-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;min-height:340px;padding:48px 24px}
.task-empty-icon{font-size:44px;line-height:1;background:var(--mint);border-radius:20px;width:76px;height:76px;display:grid;place-items:center;margin-bottom:18px}
.task-empty p{color:var(--muted);font-size:15px;line-height:1.5;margin:0 0 20px;max-width:340px}
.task-empty .btn{width:100%;max-width:340px;margin-top:0}
.note-row{padding:12px 0;border-bottom:1px solid #eef2ef}
.note-row:last-of-type{border-bottom:none}
.note-head{display:flex;justify-content:space-between;gap:10px;align-items:baseline}
.note-text{font-size:14px;line-height:1.5;margin-top:4px;white-space:pre-wrap}
.note-edit-input{width:100%;margin-top:8px}
.note-foot{display:flex;gap:4px;margin-top:6px}
.note-like.liked{color:#e5484d}
.note-add{margin-top:14px}
.note-add textarea{width:100%;margin-bottom:10px}
.history-row{display:flex;justify-content:space-between;gap:10px;padding:8px 0;border-bottom:1px solid #eef2ef;font-size:13px}
.history-row:last-child{border-bottom:none}

/* Encryption (v1.11.10, TEST ONLY) */
.info-box{background:#e8f5e9;border:1px solid #a5d6a7;color:#1b5e20;border-radius:12px;padding:12px;margin-bottom:12px;font-size:14px}
.info-box p{margin:4px 0}
#encProgressModal .sheet{text-align:left}
