:root{--bg:#0d0f11;--panel:#15181b;--panel2:#1b1f23;--line:#2a3035;--text:#f4f6f7;--muted:#96a0a9;--accent:#61c7a5;--accentText:#07130f;--warn:#e5b75c;--danger:#ff6b6b;--shadow:0 18px 55px rgba(0,0,0,.3)}body.light{--bg:#f3f5f7;--panel:#fff;--panel2:#f8fafb;--line:#e1e6ea;--text:#171a1d;--muted:#74808a;--accent:#167a62;--accentText:#fff;--warn:#a57514;--danger:#c73e3e;--shadow:0 16px 45px rgba(20,30,40,.1)}*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:var(--bg);color:var(--text);font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",Tahoma,Arial,sans-serif}button,input,select{font:inherit}.hidden{display:none!important}.offline{position:fixed;top:0;left:0;right:0;z-index:100;background:#7c5a19;color:#fff;text-align:center;padding:7px;font-size:11px}.login-view{min-height:100dvh;display:grid;place-items:center;padding:20px}.login-card{width:min(420px,100%);background:var(--panel);border:1px solid var(--line);border-radius:28px;padding:26px;box-shadow:var(--shadow)}.appmark{width:64px;height:64px;border-radius:20px;background:var(--accent);color:var(--accentText);display:grid;place-items:center;font-size:32px;font-weight:900;margin-bottom:18px}.login-card h1{margin:0 0 4px}.login-card p{margin:0 0 24px;color:var(--muted)}label{display:block;font-size:12px;color:var(--muted);margin:12px 2px 7px}input,select{width:100%;border:1px solid var(--line);background:var(--panel2);color:var(--text);border-radius:15px;padding:13px 14px;outline:0}.primary,.secondary{width:100%;border-radius:16px;padding:14px 16px;font-weight:800}.primary{border:0;background:var(--accent);color:var(--accentText);margin-top:16px}.secondary{border:1px solid var(--line);background:var(--panel);color:var(--text)}.danger{color:var(--danger)}.error-text{color:var(--danger);font-size:12px;margin-top:10px;min-height:16px}.app{max-width:540px;margin:0 auto;min-height:100dvh;padding-bottom:92px}.topbar{position:sticky;top:0;z-index:30;display:flex;align-items:center;justify-content:space-between;padding:calc(14px + env(safe-area-inset-top)) 16px 12px;background:color-mix(in srgb,var(--bg) 92%,transparent);backdrop-filter:blur(18px)}.topbar h1{font-size:21px;margin:0 0 2px}.topbar p{font-size:11px;margin:0;color:var(--muted)}.head-actions{display:flex;gap:8px}.iconbtn{position:relative;width:42px;height:42px;border:1px solid var(--line);border-radius:14px;background:var(--panel);color:var(--text)}.ncount{position:absolute;top:-6px;left:-5px;min-width:19px;height:19px;border-radius:10px;background:var(--danger);color:#fff;font-size:10px;display:grid;place-items:center;padding:0 5px}main{padding:7px 15px 22px}.screen{display:none}.screen.active{display:block}.hero,.card,.metric,.row,.notification{background:var(--panel);border:1px solid var(--line)}.hero{border-radius:25px;padding:18px}.eyebrow{display:block;color:var(--muted);font-size:11px;margin-bottom:6px}.hero b{font-size:29px}.badge{float:left;margin-top:-36px;background:color-mix(in srgb,var(--accent) 14%,transparent);color:var(--accent);font-size:10px;font-weight:800;padding:7px 9px;border-radius:999px}.progress{height:8px;background:var(--panel2);border-radius:99px;overflow:hidden;margin:16px 0 8px}.progress i{display:block;height:100%;background:var(--accent);width:0;border-radius:99px;transition:.25s}.hero-foot{display:flex;justify-content:space-between;color:var(--muted);font-size:11px}.grid4{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:10px}.metric{border-radius:19px;padding:13px}.metric span,.metric small{display:block;color:var(--muted);font-size:10px}.metric b{display:block;font-size:20px;margin:6px 0 2px}.section-head{display:flex;align-items:center;justify-content:space-between;margin:20px 2px 9px}.section-head h2{font-size:16px;margin:0}.linkbtn{border:0;background:none;color:var(--accent);font-weight:700}.quick{display:grid;grid-template-columns:repeat(4,1fr);gap:7px}.quick button{border:1px solid var(--line);background:var(--panel);color:var(--text);border-radius:17px;padding:11px 4px}.quick button:disabled{opacity:.4}.quick i{display:grid;place-items:center;width:37px;height:37px;border-radius:12px;background:var(--panel2);font-style:normal;font-size:18px;margin:0 auto 6px}.quick span{font-size:10px;color:var(--muted)}.hint{font-size:10px;color:var(--muted);text-align:center;margin-top:8px}.searchbar{position:sticky;top:82px;z-index:15;background:var(--bg);padding-bottom:8px}.list{display:flex;flex-direction:column;gap:8px}.row{display:flex;align-items:center;gap:11px;border-radius:18px;padding:12px}.num{width:39px;height:39px;border-radius:12px;background:var(--panel2);display:grid;place-items:center;color:var(--accent);font-weight:900;flex:none}.rowmain{flex:1;min-width:0}.rowtitle{font-size:13px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.rowsub{font-size:10px;color:var(--muted);margin-top:4px}.money{text-align:left}.money b{display:block;font-size:13px}.money small{display:block;color:var(--muted);font-size:9px;margin-top:3px}.state-dot{width:9px;height:9px;border-radius:50%;background:var(--muted);flex:none}.state-dot.wail{background:var(--accent)}.state-dot.safaa{background:var(--warn)}.notification{border-radius:18px;padding:13px}.notification p{margin:0;font-size:12px;line-height:1.55}.notification small{color:var(--muted);font-size:9px}.card{border-radius:22px;padding:17px;margin-bottom:10px}.card h2,.card h3{margin-top:0}.muted{color:var(--muted)}.bottomnav{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:min(540px,100%);display:grid;grid-template-columns:repeat(5,1fr);padding:7px 8px calc(7px + env(safe-area-inset-bottom));background:color-mix(in srgb,var(--bg) 90%,transparent);backdrop-filter:blur(22px);border-top:1px solid var(--line);z-index:40}.bottomnav button{border:0;background:transparent;color:var(--muted);padding:5px}.bottomnav button.on{color:var(--accent)}.bottomnav i{display:block;font-style:normal;font-size:20px}.bottomnav span{font-size:9px}.modal{position:fixed;inset:0;background:rgba(0,0,0,.52);display:flex;align-items:flex-end;justify-content:center;z-index:80}.modal-sheet{width:min(540px,100%);background:var(--panel);border-radius:28px 28px 0 0;padding:10px 18px calc(20px + env(safe-area-inset-bottom));box-shadow:var(--shadow)}.grab{width:42px;height:5px;background:var(--line);border-radius:9px;margin:0 auto 8px}.modal-head{display:flex;align-items:center;justify-content:space-between}.modal-head h2{font-size:19px}.modal-head button{width:36px;height:36px;border:0;border-radius:12px;background:var(--panel2);color:var(--text);font-size:23px}.selected-family{background:var(--panel2);border-radius:15px;padding:12px;font-size:12px}.amount-input{font-size:24px;font-weight:850}.edit-check{display:flex;align-items:center;gap:8px;background:color-mix(in srgb,var(--warn) 8%,transparent);border:1px solid color-mix(in srgb,var(--warn) 22%,transparent);padding:11px;border-radius:14px;color:var(--text)}.edit-check input{width:auto}.toast{position:fixed;bottom:105px;left:50%;transform:translateX(-50%) translateY(10px);background:var(--text);color:var(--bg);padding:10px 14px;border-radius:999px;font-size:11px;font-weight:800;opacity:0;transition:.2s;z-index:120;pointer-events:none}.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}@media(min-width:760px){body{padding:18px}.app{min-height:calc(100dvh - 36px);border:1px solid var(--line);border-radius:32px;overflow:hidden;box-shadow:var(--shadow)}.bottomnav{bottom:18px;border-radius:0 0 32px 32px}}

/* v0.1.1 — receipt identity optimized for sponsor-led entry */
.receipt-kicker{display:block;color:var(--muted);font-size:10px;margin-bottom:5px}.receipt-sponsor{display:block;font-size:18px;line-height:1.45}.receipt-meta{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:10px;padding-top:9px;border-top:1px solid var(--line);font-size:11px;color:var(--muted)}.receipt-meta strong{font-size:17px;color:var(--accent);direction:ltr}.receipt-state{display:block;margin-top:7px;font-size:10px}


/* v0.1.4 — terminology, grouped sponsorship list, family PWA mark */
.family-appmark{font-size:36px;font-weight:400;line-height:1;background:var(--panel2);border:1px solid var(--line);overflow:hidden}
.sponsorship-group{margin-top:2px}
.list-section-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:12px 2px 9px}
.list-section-title h2{font-size:16px;margin:0}
.list-section-title p{font-size:10px;color:var(--muted);margin:3px 0 0}
.count-pill{min-width:30px;height:27px;padding:0 9px;border-radius:999px;background:var(--panel2);border:1px solid var(--line);display:inline-grid;place-items:center;color:var(--accent);font-size:11px;font-weight:850}
.received-fold{margin-top:16px;border:1px solid var(--line);background:var(--panel);border-radius:20px;overflow:hidden}
.received-fold>summary{list-style:none;cursor:pointer;padding:14px 15px;display:flex;align-items:center;justify-content:space-between;gap:12px;user-select:none}
.received-fold>summary::-webkit-details-marker{display:none}
.received-fold>summary span:first-child{display:flex;flex-direction:column;gap:3px}
.received-fold>summary b{font-size:14px}
.received-fold>summary small{font-size:9px;color:var(--muted);font-weight:500}
.received-fold[open]>summary{border-bottom:1px solid var(--line)}
.received-list{padding:9px}
.received-list .row{background:var(--panel2)}
.empty-list{padding:18px 12px;text-align:center;color:var(--muted);font-size:11px;border:1px dashed var(--line);border-radius:16px}
.sponsorship-row .rowtitle{font-size:14px}
.sponsorship-row .rowsub{margin-top:5px}


/* Sprint 2 v0.2.0 */
button:disabled{cursor:not-allowed}.operation-screen{padding-bottom:24px}.op-head{display:flex;align-items:center;gap:11px;margin:4px 0 14px}.op-head h2{margin:0;font-size:18px}.op-head p{margin:3px 0 0;color:var(--muted);font-size:10px}.backbtn{width:40px;height:40px;flex:none;border:1px solid var(--line);border-radius:13px;background:var(--panel);color:var(--text);font-size:28px;line-height:1}.notice-box{padding:12px 13px;border:1px solid color-mix(in srgb,var(--accent) 22%,var(--line));background:color-mix(in srgb,var(--accent) 7%,var(--panel));border-radius:16px;color:var(--muted);font-size:11px;line-height:1.65}.form-card{background:var(--panel);border:1px solid var(--line);border-radius:20px;padding:14px;margin-bottom:8px}.two-fields{display:grid;grid-template-columns:1.1fr .9fr;gap:9px}.form-card label{margin-top:0}.selectable-row{width:100%;color:var(--text);text-align:inherit;cursor:pointer}.opcheck{width:24px;height:24px;display:grid;place-items:center;border:1.5px solid var(--line);border-radius:8px;background:var(--panel2);color:var(--accentText);font-weight:900;flex:none}.selectable-row.picked{border-color:color-mix(in srgb,var(--accent) 58%,var(--line));background:color-mix(in srgb,var(--accent) 7%,var(--panel))}.selectable-row.picked .opcheck{background:var(--accent);border-color:var(--accent);color:var(--accentText)}.selection-summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 4px 0;color:var(--muted);font-size:10px}.selection-summary b{color:var(--text);font-size:12px}.manage-fold{margin-top:18px;border:1px solid var(--line);border-radius:20px;background:var(--panel);overflow:hidden}.manage-fold>summary{list-style:none;cursor:pointer;padding:14px 15px;display:flex;align-items:center;justify-content:space-between;gap:12px}.manage-fold>summary::-webkit-details-marker{display:none}.manage-fold>summary span:first-child{display:flex;flex-direction:column;gap:3px}.manage-fold>summary b{font-size:13px}.manage-fold>summary small{font-size:9px;color:var(--muted)}.manage-fold[open]>summary{border-bottom:1px solid var(--line)}.manage-list{padding:9px}.manage-row{position:relative}.manage-btn{border:1px solid var(--line);background:var(--panel2);color:var(--accent);border-radius:10px;padding:7px 8px;font-size:9px;font-weight:800;flex:none}.action-gap{margin-top:9px}.field-note{font-size:9px;color:var(--muted);margin:5px 2px 10px}.manage-row .money{min-width:74px}.quick button:not(:disabled):active,.selectable-row:active,.manage-btn:active{transform:scale(.985)}
@media(max-width:370px){.two-fields{grid-template-columns:1fr}.manage-row{gap:7px}.manage-row .money{min-width:60px}}


/* v0.2.1 stability / iPhone interaction polish */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{overscroll-behavior-y:none;-webkit-font-smoothing:antialiased}
button,.row,.iconbtn,.linkbtn{-webkit-tap-highlight-color:transparent;touch-action:manipulation}
button{transition:opacity .12s ease,transform .08s ease}
button:active:not(:disabled){transform:scale(.985)}
button:disabled{opacity:.56;cursor:default}
input,select{font-size:16px}
.is-loading{pointer-events:none;opacity:.72}
.modal-sheet{max-height:92dvh;overflow:auto;-webkit-overflow-scrolling:touch}
.row{min-height:62px}
.primary,.secondary{min-height:50px}
.iconbtn{min-width:42px;min-height:42px}
@media (prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}


/* v0.2.4 — iPhone pull-to-refresh */
.pull-refresh{
  position:fixed;
  top:calc(env(safe-area-inset-top) + 7px);
  left:50%;
  z-index:75;
  transform:translate(-50%,-70px);
  min-width:132px;
  height:38px;
  padding:0 13px;
  border:1px solid var(--line);
  border-radius:999px;
  background:color-mix(in srgb,var(--panel) 94%,transparent);
  box-shadow:var(--shadow);
  backdrop-filter:blur(18px);
  display:flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  opacity:0;
  pointer-events:none;
  transition:transform .12s ease,opacity .12s ease;
}
.pull-refresh.visible{transform:translate(-50%,calc(var(--pull,38px) - 54px));opacity:1}
.pull-refresh span{font-size:17px;color:var(--accent);transition:transform .18s ease}
.pull-refresh b{font-size:10px;white-space:nowrap}
.pull-refresh.armed span{transform:rotate(180deg)}
.pull-refresh.busy span{animation:ffspin .8s linear infinite}
@keyframes ffspin{to{transform:rotate(360deg)}}


/* v0.2.5 — persistent smart system update */
.system-update{
  position:fixed;
  z-index:150;
  top:calc(env(safe-area-inset-top) + 8px);
  left:50%;
  transform:translateX(-50%);
  width:min(516px,calc(100% - 24px));
  min-height:54px;
  padding:8px 9px 8px 13px;
  border-radius:18px;
  border:1px solid color-mix(in srgb,var(--accent) 38%,var(--line));
  background:color-mix(in srgb,var(--panel) 96%,transparent);
  box-shadow:0 14px 38px rgba(0,0,0,.28);
  backdrop-filter:blur(22px);
  display:flex;
  align-items:center;
  gap:10px;
}
.system-update.hidden{display:none}
.system-update-copy{flex:1;min-width:0}
.system-update-copy b{display:block;font-size:12px;color:var(--text)}
.system-update-copy small{display:block;margin-top:3px;font-size:9px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.system-update button{
  flex:none;
  min-height:38px;
  padding:0 12px;
  border:0;
  border-radius:12px;
  background:var(--accent);
  color:var(--accentText);
  font-weight:850;
  font-size:10px;
}
.system-update button:disabled{opacity:.72}


/* v0.2.6 — visual refinement */
#notifyBtn{font-size:18px}
.bottomnav button[data-screen="notificationsScreen"] i{font-size:18px}
.sponsorship-row{width:100%;text-align:inherit;color:var(--text);position:relative;overflow:hidden}
.sponsorship-row .rowtitle{font-size:15px;font-weight:900;color:var(--text)}
.sponsorship-row .rowsub{font-size:10px;color:var(--muted);margin-top:4px}
.sponsorship-row .money{min-width:84px}
.sponsorship-row .money b{font-size:17px;font-weight:900}
.sponsorship-row .money small{font-size:10px}
.row-unreceived{background:color-mix(in srgb,var(--warn) 10%,var(--panel));border-color:color-mix(in srgb,var(--warn) 34%,var(--line))}
.row-unreceived .num{background:color-mix(in srgb,var(--warn) 16%,var(--panel2));color:var(--warn)}
.row-unreceived .money b{color:color-mix(in srgb,var(--warn) 72%,var(--text))}
.row-received{background:color-mix(in srgb,var(--accent) 10%,var(--panel));border-color:color-mix(in srgb,var(--accent) 34%,var(--line))}
.row-received .num{background:color-mix(in srgb,var(--accent) 16%,var(--panel2));color:var(--accent)}
.row-received .money b{color:var(--accent)}
.compact-form{margin-top:12px}
.fx-modal-summary{display:flex;align-items:center;justify-content:space-between;border:1px solid var(--line);background:var(--panel2);border-radius:15px;padding:13px;margin-top:10px}
.fx-modal-summary span{color:var(--muted);font-size:11px}
.fx-modal-summary b{font-size:18px;color:var(--accent)}


/* v0.2.7 — iOS polish, unified icons, unread states, push */
:root{--unread:#e5b75c;--unreadText:#17120a}
body.light{--unread:#c84d4d;--unreadText:#fff}
.ui-icon,.quick-svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;display:block;margin:auto}
.quick-svg{width:20px;height:20px}
.quick i{display:grid;place-items:center}
.iconbtn.has-unread{background:var(--unread);border-color:var(--unread);color:var(--unreadText);box-shadow:0 7px 20px color-mix(in srgb,var(--unread) 22%,transparent)}
.iconbtn.has-unread .ncount{background:var(--danger);color:#fff;border:2px solid var(--bg)}
.bottomnav button[data-screen="notificationsScreen"].has-unread i{width:34px;height:28px;margin:0 auto;border-radius:10px;background:color-mix(in srgb,var(--unread) 20%,transparent);color:var(--unread);display:grid;place-items:center}
.bottomnav .ui-icon{width:20px;height:20px}
.notification-item{width:100%;text-align:right;color:var(--text);display:flex;align-items:flex-start;gap:11px;cursor:pointer}
.notification-copy{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1}
.notification-copy b{font-size:13px;color:var(--text)}
.notification-copy span{font-size:11px;line-height:1.55;color:var(--muted)}
.notification-copy small{font-size:9px;color:var(--muted)}
.notification-dot{width:9px;height:9px;border-radius:50%;background:var(--line);margin-top:5px;flex:none}
.notification-item.unread{background:color-mix(in srgb,var(--unread) 11%,var(--panel));border-color:color-mix(in srgb,var(--unread) 38%,var(--line))}
.notification-item.unread .notification-dot{background:var(--unread);box-shadow:0 0 0 4px color-mix(in srgb,var(--unread) 12%,transparent)}
.notification-item.unread .notification-copy b{color:var(--unread)}
.push-card{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:4px 0 15px;padding:14px;border:1px solid var(--line);border-radius:19px;background:var(--panel)}
.push-card>div:first-child{min-width:0;flex:1}.push-card b{font-size:13px}.push-card p{margin:5px 0 0;color:var(--muted);font-size:10px;line-height:1.5}
.push-actions{display:flex;flex-direction:column;align-items:flex-end;gap:6px;flex:none}.secondary.compact{width:auto;min-height:38px;padding:8px 11px;font-size:10px}
.fx-sheet{padding-inline:18px}
.ios-group{background:var(--panel2);border:1px solid var(--line);border-radius:17px;overflow:hidden;margin:11px 0}
.ios-row{min-height:54px;padding:11px 13px;display:flex;align-items:center;justify-content:space-between;gap:14px;margin:0;color:var(--text)}
.ios-row+ .ios-row{border-top:1px solid var(--line)}
.ios-row>span{font-size:11px;color:var(--muted)}
.ios-row>b,.ios-row>strong{font-size:17px;color:var(--text)}
.fx-selection-group .ios-row:last-child strong{color:var(--accent)}
.ios-inline-input{width:min(48%,190px);padding:0;border:0!important;background:transparent!important;border-radius:0!important;text-align:left;font-size:17px;font-weight:750;color:var(--text);min-height:32px}
.ios-inline-input:focus{outline:none}
.fx-usd-output{color:var(--accent)!important;font-size:20px!important}
.pull-refresh{pointer-events:none}
@media(max-width:390px){.push-card{align-items:flex-start;flex-direction:column}.push-actions{width:100%;flex-direction:row;justify-content:flex-end}.ios-row{gap:8px}.ios-inline-input{width:50%}}


/* v0.3.0 — month closing, archive, delivery PDF */
.archive-current{background:var(--panel);border:1px solid var(--line);border-radius:22px;padding:16px;margin-bottom:16px}
.archive-current-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.archive-current h2{margin:3px 0 0;font-size:21px}
.close-state{font-size:10px;font-weight:850;padding:7px 9px;border-radius:999px;background:var(--panel2);color:var(--muted);white-space:nowrap}
.close-state.ready{background:color-mix(in srgb,var(--accent) 14%,var(--panel));color:var(--accent)}.close-state.blocked{background:color-mix(in srgb,var(--warn) 14%,var(--panel));color:var(--warn)}
.blockers{margin:10px 0 0;padding:10px 12px;border-radius:13px;background:color-mix(in srgb,var(--warn) 8%,var(--panel2));color:var(--warn);font-size:10px;line-height:1.5}
.archive-month{width:100%;text-align:inherit;color:var(--text);cursor:pointer}.archive-icon{width:39px;height:39px;border-radius:12px;background:color-mix(in srgb,var(--accent) 12%,var(--panel2));color:var(--accent);display:grid;place-items:center;flex:none}.archive-icon .ui-icon{width:19px;height:19px}
.archive-summary-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-bottom:10px}.archive-actions{display:grid;grid-template-columns:1fr;gap:8px;margin:8px 0 16px}.archive-actions .primary{margin-top:0}
.archive-report-row .rowtitle{font-size:13px}.archive-report-row .money b{font-size:15px}.archive-report-row.archive-paid{border-color:color-mix(in srgb,var(--accent) 28%,var(--line));background:color-mix(in srgb,var(--accent) 7%,var(--panel))}.archive-report-row.archive-paid .money b{color:var(--accent)}.archive-report-row.archive-zero{opacity:.72}
.close-warning{font-size:11px;line-height:1.65;color:var(--muted);padding:0 2px}.bottomnav span{font-size:8.5px}
@media(max-width:370px){.bottomnav{padding-inline:4px}.bottomnav span{font-size:8px}.bottomnav button{padding-inline:1px}}


/* v0.3.1 — sponsorship review filters */
.review-switch{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:4px;
  padding:4px;
  margin:2px 0 12px;
  border:1px solid var(--line);
  border-radius:15px;
  background:var(--panel2);
}
.review-switch button{
  min-height:38px;
  border:0;
  border-radius:11px;
  background:transparent;
  color:var(--muted);
  font-size:11px;
  font-weight:800;
}
.review-switch button.on{
  background:var(--panel);
  color:var(--text);
  box-shadow:0 3px 12px rgba(0,0,0,.12);
}
.person-tabs{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin-bottom:9px;
}
.person-tabs button{
  min-height:48px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:9px;
  border:1px solid var(--line);
  border-radius:16px;
  padding:0 13px;
  background:var(--panel);
  color:var(--muted);
}
.person-tabs button span{font-size:12px;font-weight:800}
.person-tabs button b{
  min-width:28px;
  height:26px;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:var(--panel2);
  color:var(--muted);
  font-size:10px;
}
.person-tabs button.on{
  border-color:color-mix(in srgb,var(--accent) 45%,var(--line));
  background:color-mix(in srgb,var(--accent) 8%,var(--panel));
  color:var(--text);
}
.person-tabs button.on b{
  background:color-mix(in srgb,var(--accent) 16%,var(--panel2));
  color:var(--accent);
}
.person-review-summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:0 2px 10px;
  padding:11px 12px;
  border-radius:15px;
  background:var(--panel2);
  color:var(--muted);
  font-size:10px;
}
.person-review-summary b{
  color:var(--text);
  font-size:12px;
}


/* v0.3.2 — separate closed vs archived month lifecycle */
.month-kind{
  flex:none;
  min-width:58px;
  padding:7px 8px;
  border-radius:999px;
  text-align:center;
  font-size:9px;
  font-weight:850;
}
.month-kind.closed{
  background:color-mix(in srgb,var(--warn) 12%,var(--panel2));
  color:var(--warn);
}
.month-kind.archived{
  background:color-mix(in srgb,var(--accent) 12%,var(--panel2));
  color:var(--accent);
}
.month-closed-row{
  border-color:color-mix(in srgb,var(--warn) 30%,var(--line));
}
.month-archived-row{
  border-color:color-mix(in srgb,var(--accent) 24%,var(--line));
}
.archive-eligibility{
  margin:10px 0;
  padding:12px 13px;
  border-radius:15px;
  font-size:10px;
  line-height:1.6;
}
.archive-eligibility.ready{
  background:color-mix(in srgb,var(--accent) 8%,var(--panel));
  border:1px solid color-mix(in srgb,var(--accent) 28%,var(--line));
  color:var(--accent);
}
.archive-eligibility.blocked{
  background:color-mix(in srgb,var(--warn) 8%,var(--panel));
  border:1px solid color-mix(in srgb,var(--warn) 28%,var(--line));
  color:var(--warn);
}
.archive-actions{display:flex;flex-direction:column;gap:8px}
.archive-actions .primary,.archive-actions .secondary{margin-top:0}


/* v0.3.3 — simplified navigation, settings, and sponsorship readability */
.bottomnav{grid-template-columns:repeat(3,1fr);padding-inline:18px}
.bottomnav button{padding:6px 5px}
.bottomnav span{font-size:9px}
.sponsorship-row .rowmain{display:block}
.sponsorship-row .rowtitle{display:block;line-height:1.45}
.sponsorship-row .rowbeneficiary,.selectable-row .rowbeneficiary,.manage-row .rowbeneficiary,#selectedFamily>.rowbeneficiary,#manageInfo>.rowbeneficiary{display:block;margin-top:8px;color:var(--muted);font-size:11px;line-height:1.5}
.sponsorship-row .rowsub{display:block;margin-top:5px;line-height:1.45}
.settings-profile{margin-bottom:10px}
.settings-card h3{margin:0 0 12px;font-size:14px}
.theme-settings{display:grid;grid-template-columns:1fr 1fr;gap:7px;padding:4px;border:1px solid var(--line);border-radius:16px;background:var(--panel2)}
.theme-settings button{min-height:44px;display:flex;align-items:center;justify-content:center;gap:8px;border:0;border-radius:12px;background:transparent;color:var(--muted);font-size:11px;font-weight:850}
.theme-settings button .ui-icon{width:18px;height:18px}
.theme-settings button.on{background:var(--panel);color:var(--accent);box-shadow:0 4px 15px rgba(0,0,0,.13)}
.settings-link{width:100%;min-height:58px;display:flex;align-items:center;gap:11px;padding:8px 4px;border:0;background:transparent;color:var(--text);text-align:inherit}
.settings-link-icon{width:42px;height:42px;flex:none;display:grid;place-items:center;border-radius:13px;background:color-mix(in srgb,var(--accent) 10%,var(--panel2));color:var(--accent)}
.settings-link-icon .ui-icon{width:21px;height:21px}
.settings-link-copy{flex:1;min-width:0}
.settings-link-copy b{display:block;font-size:13px}
.settings-link-copy small{display:block;margin-top:4px;color:var(--muted);font-size:9px}
.settings-chevron{font-size:25px;color:var(--muted);transform:rotate(180deg)}


/* v0.3.6 — update modes */
:root{--system-update:#f59e0b;--system-update-text:#1b1204}
body.light{--system-update:#e98608;--system-update-text:#fff}

.system-update{
  top:calc(env(safe-area-inset-top) + 10px);
  width:min(516px,calc(100% - 20px));
  min-height:112px;
  padding:14px;
  border-radius:21px;
  border:2px solid color-mix(in srgb,var(--system-update) 72%,var(--line));
  background:color-mix(in srgb,var(--system-update) 16%,var(--panel));
  box-shadow:0 18px 50px color-mix(in srgb,var(--system-update) 20%,rgba(0,0,0,.36));
  display:grid;
  grid-template-columns:1fr;
  gap:11px;
}
.system-update-copy b{
  display:block;
  font-size:16px;
  line-height:1.35;
  color:var(--system-update);
}
.system-update-copy small{
  display:block;
  margin-top:5px;
  font-size:11px;
  line-height:1.5;
  color:var(--text);
  white-space:normal;
  overflow:visible;
}
.system-update button{
  width:100%;
  min-height:54px;
  padding:0 18px;
  border:0;
  border-radius:15px;
  background:var(--system-update);
  color:var(--system-update-text);
  font-weight:950;
  font-size:15px;
  box-shadow:0 8px 22px color-mix(in srgb,var(--system-update) 25%,transparent);
}
.system-update button:disabled{opacity:.72}

.update-success{
  position:fixed;
  z-index:155;
  top:calc(env(safe-area-inset-top) + 10px);
  left:50%;
  transform:translateX(-50%);
  width:min(500px,calc(100% - 24px));
  min-height:66px;
  display:flex;
  align-items:center;
  gap:11px;
  padding:12px 14px;
  border-radius:18px;
  border:1px solid color-mix(in srgb,var(--accent) 44%,var(--line));
  background:color-mix(in srgb,var(--accent) 13%,var(--panel));
  box-shadow:0 14px 38px rgba(0,0,0,.28);
  backdrop-filter:blur(22px);
}
.update-success.hidden{display:none}
.update-success-icon{
  width:38px;
  height:38px;
  flex:none;
  display:grid;
  place-items:center;
  border-radius:12px;
  background:var(--accent);
  color:var(--accentText);
  font-size:21px;
  font-weight:950;
}
.update-success b{display:block;font-size:13px}
.update-success small{display:block;margin-top:4px;color:var(--muted);font-size:10px}

.auto-update-setting{
  min-height:58px;
  display:flex;
  align-items:center;
  gap:14px;
}
.auto-update-copy{flex:1;min-width:0}
.auto-update-copy b{display:block;font-size:13px}
.auto-update-copy small{
  display:block;
  margin-top:5px;
  color:var(--muted);
  font-size:10px;
  line-height:1.55;
}
.settings-note{
  margin:10px 0 0;
  color:var(--muted);
  font-size:9px;
  line-height:1.55;
}
.ios-switch{
  position:relative;
  width:52px;
  height:31px;
  flex:none;
  display:block;
}
.ios-switch input{
  position:absolute;
  opacity:0;
  pointer-events:none;
}
.ios-switch span{
  position:absolute;
  inset:0;
  border-radius:999px;
  background:var(--line);
  transition:.2s;
}
.ios-switch span::after{
  content:"";
  position:absolute;
  width:27px;
  height:27px;
  top:2px;
  right:2px;
  border-radius:50%;
  background:#fff;
  box-shadow:0 2px 7px rgba(0,0,0,.26);
  transition:.2s;
}
.ios-switch input:checked + span{background:var(--accent)}
.ios-switch input:checked + span::after{transform:translateX(-21px)}


/* v0.3.7 — Push controls moved to Settings */
.notifications-clean-head{
  margin-top:8px;
  margin-bottom:12px;
}
.notifications-list{
  gap:9px;
}
.push-settings{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}
.push-settings-copy{
  flex:1;
  min-width:0;
}
.push-settings-copy b{
  display:block;
  font-size:13px;
}
.push-settings-copy p{
  margin:5px 0 0;
  color:var(--muted);
  font-size:10px;
  line-height:1.55;
}
.push-settings .push-actions{
  flex:none;
}
@media(max-width:390px){
  .push-settings{
    align-items:flex-start;
    flex-direction:column;
  }
  .push-settings .push-actions{
    width:100%;
    flex-direction:row;
    justify-content:flex-end;
  }
}


/* v0.4.0 — publication messages */
.publication-entry{
  width:100%;min-height:64px;margin-top:10px;display:flex;align-items:center;gap:11px;
  padding:10px 12px;border:1px solid color-mix(in srgb,var(--accent) 28%,var(--line));
  border-radius:18px;background:color-mix(in srgb,var(--accent) 6%,var(--panel));color:var(--text);text-align:inherit
}
.publication-entry-icon{width:42px;height:42px;flex:none;display:grid;place-items:center;border-radius:13px;background:color-mix(in srgb,var(--accent) 13%,var(--panel2));color:var(--accent)}
.publication-entry-icon .ui-icon{width:21px;height:21px}
.publication-entry-copy{flex:1;min-width:0}
.publication-entry-copy b{display:block;font-size:13px}
.publication-entry-copy small{display:block;margin-top:4px;color:var(--muted);font-size:9px}
.publication-entry-arrow{font-size:25px;color:var(--muted);transform:rotate(180deg)}
.publication-safety{display:flex;align-items:center;gap:8px;padding:10px 12px;margin-bottom:12px;border-radius:14px;border:1px solid color-mix(in srgb,var(--accent) 22%,var(--line));background:color-mix(in srgb,var(--accent) 6%,var(--panel));color:var(--muted);font-size:10px}
.publication-safety .ui-icon{width:18px;height:18px;color:var(--accent);flex:none}
.publication-list{display:flex;flex-direction:column;gap:14px}
.publication-month-group{display:flex;flex-direction:column;gap:8px}
.publication-month-head{display:flex;justify-content:space-between;align-items:center;padding:0 3px}
.publication-month-head b{font-size:13px}
.publication-month-head span{font-size:9px;color:var(--muted)}
.publication-card{width:100%;display:grid;grid-template-columns:1fr auto;gap:4px 10px;padding:13px 14px;border:1px solid var(--line);border-radius:17px;background:var(--panel);color:var(--text);text-align:inherit}
.publication-type{grid-column:1;font-size:9px;font-weight:850;color:var(--accent)}
.publication-subject{grid-column:1;margin-top:2px;font-size:13px;font-weight:850}
.publication-preview{grid-column:1 / -1;margin-top:5px;color:var(--muted);font-size:10px;line-height:1.6}
.publication-foot{grid-column:1 / -1;display:flex;justify-content:space-between;gap:10px;margin-top:6px;padding-top:8px;border-top:1px solid var(--line);color:var(--muted);font-size:8px}
.publication-sheet{max-height:88dvh}
.publication-modal-meta{margin:0 0 9px;color:var(--muted);font-size:10px}
.publication-text{width:100%;min-height:290px;max-height:48dvh;resize:none;border:1px solid var(--line);border-radius:16px;background:var(--panel2);color:var(--text);padding:15px;outline:0;font:500 14px/1.85 -apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",Tahoma,Arial,sans-serif;direction:rtl;text-align:right;white-space:pre-wrap}
.publication-copy-btn{margin-top:10px}
.publication-copy-status{min-height:18px;margin-top:7px;text-align:center;color:var(--accent);font-size:10px}


/* v0.4.1 — receipt batch publication */
.pending-publication-group{
  padding:10px;
  border:1px solid color-mix(in srgb,var(--system-update) 32%,var(--line));
  border-radius:18px;
  background:color-mix(in srgb,var(--system-update) 6%,var(--panel));
}
.pending-publication-group .publication-card{
  border-color:color-mix(in srgb,var(--system-update) 32%,var(--line));
}
.pending-publication-group .publication-type{color:var(--system-update)}
.publication-batch-hint{
  margin-top:8px;
  padding:10px 12px;
  border-radius:13px;
  background:var(--panel2);
  color:var(--muted);
  font-size:9px;
  line-height:1.55;
  text-align:center;
}

.staging-marker{position:fixed;z-index:9999;left:8px;top:calc(env(safe-area-inset-top) + 6px);padding:4px 7px;border-radius:999px;background:#8a5a00;color:#fff;font:700 10px system-ui;opacity:.92}

.startup-view{position:fixed;inset:0;z-index:90;display:grid;place-items:center;padding:24px;background:#0d0f11;color:#f3f5f7}.startup-card{width:min(360px,100%);text-align:center}.startup-card .appmark{margin:0 auto 20px}.startup-card h1{font-size:26px;margin:0 0 12px}.startup-card p{color:#a8b0b8;font-size:14px;line-height:1.8;margin:0}

/* Boxes shell: the existing Families screens remain within the same app. */
.boxes-appmark{background:color-mix(in srgb,var(--accent) 12%,var(--panel));color:var(--accent);border:1px solid color-mix(in srgb,var(--accent) 25%,var(--line))}.boxes-appmark .ui-icon{width:32px;height:32px}.startup-card .boxes-appmark{background:#182b25;color:#61c7a5;border-color:#2a5144}
.boxes-shell{padding-bottom:calc(24px + env(safe-area-inset-bottom))}.boxes-shell .topbar{padding-bottom:20px}.boxes-home{padding-top:14px}.boxes-intro{margin:0 2px 25px}.boxes-intro .eyebrow{font-size:12px;color:var(--accent);margin-bottom:9px}.boxes-intro h2{margin:0 0 9px;font-size:27px;line-height:1.4;letter-spacing:-.5px}.boxes-intro p{margin:0;color:var(--muted);font-size:13px;line-height:1.8}
.boxes-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.box-card{display:flex;flex-direction:column;align-items:stretch;min-height:183px;min-width:0;padding:17px 15px;border:1px solid var(--line);border-radius:24px;background:var(--panel);color:var(--text);text-align:right;cursor:pointer}.box-card:disabled{opacity:1;cursor:default;background:color-mix(in srgb,var(--panel) 72%,var(--bg));color:var(--muted)}.box-card-top{display:flex;align-items:center;justify-content:space-between;gap:6px}.box-icon{width:44px;height:44px;border-radius:15px;display:grid;place-items:center;background:var(--panel2);color:var(--muted);flex:none}.box-icon .ui-icon{width:26px;height:26px}.box-state{font-size:10px;padding:5px 8px;border:1px solid var(--line);border-radius:999px;white-space:nowrap;color:var(--muted)}.box-name{display:block;margin:22px 0 12px;font-size:17px;font-weight:750;line-height:1.5}.box-card-foot{display:flex;align-items:center;justify-content:space-between;font-size:11px;color:var(--muted);margin-top:auto}.box-card-active{background:color-mix(in srgb,var(--accent) 7%,var(--panel));border-color:color-mix(in srgb,var(--accent) 42%,var(--line))}.box-card-active .box-icon{background:color-mix(in srgb,var(--accent) 15%,var(--panel));color:var(--accent)}.box-card-active .box-state{border-color:transparent;background:color-mix(in srgb,var(--accent) 14%,var(--panel));color:var(--accent);font-weight:700}.box-card-active .box-card-foot{color:var(--accent);font-weight:650}.box-card-foot>span{font-size:23px;line-height:14px}.box-card:focus-visible,.boxes-back:focus-visible{outline:2px solid var(--accent);outline-offset:4px}.boxes-note{margin:23px 8px 0;color:var(--muted);text-align:center;font-size:11px;line-height:1.9}
.boxes-back{display:flex;align-items:center;justify-content:center;gap:6px;min-height:42px;padding:0 11px;border:1px solid var(--line);border-radius:14px;background:var(--panel);color:var(--accent);font-size:11px;font-weight:750;flex:none}.boxes-back .ui-icon{width:17px;height:17px}.topbar>div:first-child{min-width:0}.topbar .head-actions{flex:none}.topbar h1{overflow-wrap:anywhere}
@media(max-width:360px){.boxes-grid{gap:9px}.box-card{padding:15px 12px;min-height:174px}.box-icon{width:36px;height:36px;border-radius:12px}.box-state{padding:4px 6px;font-size:9px}.box-name{font-size:16px}.topbar:has(.boxes-back:not(.hidden)) h1{font-size:18px}.head-actions{gap:6px}.boxes-back{padding-inline:8px}}
@media(max-width:759px){.app .topbar{padding-top:calc(37px + env(safe-area-inset-top))}}
.serial-arrow{color:var(--accent);font-size:26px;padding-inline:8px}.archive-phone{display:block;width:max-content;max-width:100%;margin-top:6px;color:var(--accent);font-size:12px;overflow-wrap:anywhere}.archive-report-row .rowmain{min-width:0}#serialIdentity{overflow-wrap:anywhere}#serialNumber{direction:ltr;text-align:center}

/* Home presentation only. Families screens retain the approved 1.2.6 styles. */
.boxes-deposit-mark,.boxes-title-en,.boxes-profile-name{display:none}
body:has(.boxes-home-shell:not(.hidden)){background:#12171a}
body.light:has(.boxes-home-shell:not(.hidden)){background:#faf6f0}
.boxes-home-shell{--home-ink:#edf5f1;--home-muted:#b0c1bc;--home-line:rgba(205,227,217,.16);--home-shadow:0 12px 26px rgba(0,0,0,.17);max-width:640px;min-height:100dvh;padding:16px 14px calc(28px + env(safe-area-inset-bottom));background:radial-gradient(ellipse at 0 0,rgba(78,99,75,.10),transparent 55%),var(--bg)}
body.light .boxes-home-shell{--home-ink:#123e40;--home-muted:#647572;--home-line:rgba(54,81,72,.13);--home-shadow:0 12px 28px rgba(67,52,35,.09);background:radial-gradient(ellipse at 0 0,rgba(208,191,159,.16),transparent 60%),#faf6f0}
.boxes-home-shell .topbar{padding-top:calc(25px + env(safe-area-inset-top));padding-bottom:18px;margin-bottom:0;color:var(--home-ink)}
.boxes-home-shell .topbar>div:first-child{position:relative;padding-right:66px;min-height:56px;display:flex;flex-direction:column;justify-content:center}
.boxes-home-shell .topbar h1{font-size:29px;font-weight:800;letter-spacing:-.8px;line-height:1.25}
.boxes-home-shell .boxes-deposit-mark{position:absolute;right:0;top:0;display:grid;place-items:center;width:54px;height:54px;border:1px solid var(--home-line);border-radius:18px;background:rgba(255,255,255,.05);box-shadow:var(--home-shadow)}
body.light .boxes-home-shell .boxes-deposit-mark{background:rgba(255,255,255,.78);border-color:#fff}
.boxes-deposit-mark svg{width:38px;height:38px}.boxes-home-shell .boxes-title-en{display:block;font-size:15px;font-weight:600;letter-spacing:.3px;color:var(--home-muted);line-height:1.25}.boxes-home-shell #subtitle{display:none}
.boxes-home-shell #globalAccountBtn{display:flex;flex-direction:column;gap:6px;border:0;background:none;width:auto;height:auto;min-width:49px;padding:0;color:var(--home-ink);border-radius:14px}
.boxes-home-shell #globalAccountBtn svg{border:1px solid var(--home-line);background:rgba(255,255,255,.05);border-radius:50%;box-sizing:content-box;padding:11px;width:23px;height:23px}
body.light .boxes-home-shell #globalAccountBtn svg{background:rgba(255,255,255,.65)}
.boxes-home-shell .boxes-profile-name{display:block;font-size:11px;font-weight:700;line-height:1.3;max-width:100px;overflow-wrap:anywhere}
.boxes-home-shell .boxes-home{padding-top:2px}.boxes-home-shell .boxes-intro{margin:4px 3px 18px}.boxes-home-shell .boxes-intro h2{margin:0 0 7px;font-size:23px;line-height:1.4;color:var(--home-ink);letter-spacing:-.6px}.boxes-home-shell .boxes-intro p{margin:0;color:var(--home-muted);font-size:12px;line-height:1.7}
.boxes-account-section{margin-bottom:17px}.boxes-balance-month{font-size:10px;font-weight:500;color:var(--home-muted);margin:0 3px 9px}
.boxes-accounts{display:grid;grid-template-columns:minmax(0,1.85fr) minmax(0,1fr);direction:ltr;gap:10px}
.home-account{direction:rtl;min-width:0;padding:12px 9px 13px;border:1px solid var(--home-line);border-radius:23px;box-shadow:var(--home-shadow);overflow:hidden}
.home-account-wail{color:#cfe2ff;background:linear-gradient(125deg,rgba(76,125,176,.11),transparent 75%),#172531}.home-account-safaa{color:#e4d5ee;background:linear-gradient(135deg,rgba(134,95,156,.13),transparent 70%),#251f2d}
body.light .home-account-wail{color:#133865;background:linear-gradient(125deg,#e7f3ff,#f8fbff 75%);border-color:rgba(255,255,255,.9)}body.light .home-account-safaa{color:#352752;background:linear-gradient(135deg,#f4eefa,#fdfbff);border-color:rgba(255,255,255,.9)}
.home-account-head{display:flex;align-items:center;gap:7px;margin-bottom:14px}.home-account-head h3{margin:0;font-size:15px;line-height:1.3}.home-account-person{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:rgba(133,174,235,.18);flex:none}.home-account-safaa .home-account-person{background:rgba(151,116,182,.17)}.home-account-person svg{width:21px;height:21px}
.home-account-balances{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.home-account-safaa .home-account-balances{grid-template-columns:minmax(0,1fr)}
.home-currency{display:flex;align-items:center;flex-direction:column;min-width:0;gap:4px;text-align:center}.home-account-balances .home-currency+.home-currency{border-right:1px solid rgba(135,163,190,.25)}
.home-currency-label{font-size:10px;line-height:1.4;min-height:28px;display:flex;align-items:center;color:inherit;opacity:.8}.home-balance-value{font-size:clamp(11px,3.15vw,18px);font-weight:800;line-height:1.2;letter-spacing:-.35px;white-space:nowrap;font-variant-numeric:tabular-nums;max-width:100%}.home-currency-code{font-size:9px;letter-spacing:.7px;color:inherit;opacity:.6;line-height:1.4}
.home-currency-icon{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;margin-top:2px;background:rgba(124,185,159,.14);color:#62b89f}.home-currency-icon svg{width:20px;height:20px}.home-currency-digital .home-currency-icon{color:#7dadff;background:rgba(126,173,255,.12)}.home-currency-cash .home-currency-icon{color:#c5a26e;background:rgba(198,159,98,.12)}
body.light .home-currency-iqd .home-currency-icon{color:#167d60;background:#dcf0e5}body.light .home-currency-digital .home-currency-icon{color:#2479dd;background:#dfedff}body.light .home-currency-cash .home-currency-icon{color:#a9854d;background:#f1e7d5}
.boxes-home-shell .boxes-grid{gap:12px}.boxes-home-shell .box-card{position:relative;isolation:isolate;overflow:hidden;min-height:240px;padding:15px 13px 13px;border-radius:26px;border:1px solid var(--fund-line);background:linear-gradient(135deg,var(--fund-wash),transparent 70%),var(--fund-panel);color:var(--fund-ink);box-shadow:var(--home-shadow);gap:0;text-align:right}
.box-theme-families{--fund-ink:#f7dce8;--fund-panel:#301b2d;--fund-wash:rgba(217,140,168,.16);--fund-line:rgba(217,140,168,.6);--fund-accent:#d98ca8;--fund-icon:#8e4a7f;--fund-leaf:rgba(217,140,168,.12)}
.box-theme-general{--fund-ink:#bbcfcc;--fund-panel:#202b2b;--fund-wash:rgba(143,198,184,.08);--fund-line:rgba(143,198,184,.14);--fund-accent:#709994;--fund-icon:#48716c;--fund-leaf:rgba(143,198,184,.07)}
body.light .box-theme-families{--fund-ink:#4b1d4e;--fund-panel:#fff7f2;--fund-wash:rgba(247,200,216,.65);--fund-line:#eda8c6;--fund-accent:#8e4a7f;--fund-icon:#8e4a7f;--fund-leaf:rgba(217,140,168,.15)}
body.light .box-theme-general{--fund-ink:#395a5b;--fund-panel:#f7f4eb;--fund-wash:rgba(143,198,184,.3);--fund-line:rgba(255,255,255,.9);--fund-accent:#63837d;--fund-icon:#648782;--fund-leaf:rgba(47,168,161,.10)}
.boxes-home-shell .box-card::before{content:"";position:absolute;z-index:-1;pointer-events:none;width:150%;height:100%;top:-44%;left:-75%;border-radius:50%;background:linear-gradient(130deg,var(--fund-leaf),transparent 65%);border:1px solid rgba(255,255,255,.09);transform:rotate(-29deg)}
.boxes-home-shell .box-card::after{content:"";position:absolute;z-index:-1;pointer-events:none;width:90%;height:65%;top:-35%;left:-40%;border:1px solid rgba(255,255,255,.17);border-radius:50%;transform:rotate(-35deg)}
.boxes-home-shell .box-card-active{border-width:2px;box-shadow:0 0 0 3px rgba(217,140,168,.07),0 9px 23px rgba(126,48,100,.14);cursor:pointer;transition:transform .16s,box-shadow .16s}
.boxes-home-shell .box-card:disabled{cursor:default;opacity:1;background:linear-gradient(135deg,var(--fund-wash),transparent 70%),var(--fund-panel);color:var(--fund-ink)}
.boxes-home-shell .box-card:not(:disabled):active{transform:scale(.985)}.boxes-home-shell .box-card:not(:disabled):focus-visible{outline:2px solid var(--fund-accent);outline-offset:4px}
.boxes-home-shell .box-card-top{margin-bottom:9px;justify-content:flex-start}.boxes-home-shell .box-icon{width:44px;height:44px;border-radius:15px;background:var(--fund-icon);color:#fff;box-shadow:0 6px 12px rgba(25,39,36,.10);border:1px solid rgba(255,255,255,.36)}.boxes-home-shell .box-icon svg{width:28px;height:28px}
.boxes-home-shell .box-name{margin:0 0 6px;font-size:20px;line-height:1.35;font-weight:800;letter-spacing:-.55px}.boxes-home-shell .box-description{font-size:10px;line-height:1.6;min-height:32px;color:var(--fund-ink);opacity:.7}
.box-balances{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));margin:11px 0 12px;padding-top:12px;border-top:1px solid var(--fund-line)}.box-balances .home-currency{position:relative;padding-inline:3px}.box-balances .home-currency+.home-currency{border-right:1px solid var(--fund-line)}.box-balances .home-currency-label{font-size:10px;min-height:15px}.box-balances .home-balance-value{font-size:clamp(13px,3.45vw,19px)}.box-balances .home-currency-icon{position:absolute;top:22px;right:-1px;width:22px;height:22px;opacity:.65;display:none}.box-balances .home-currency-icon svg{width:16px;height:16px}
.boxes-home-shell .box-card-foot{margin-top:auto;display:flex;flex-direction:row-reverse;align-items:center;color:var(--fund-accent);font-size:12px;min-height:33px;font-weight:750}.boxes-home-shell .box-card-arrow{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;color:#fff;background:var(--fund-accent);font-size:27px;line-height:1}.boxes-home-shell .box-card:disabled .box-card-arrow{opacity:.42}.boxes-home-shell .box-card-active .box-card-arrow{box-shadow:0 3px 9px rgba(142,74,127,.22)}
@media(min-width:480px){.boxes-home-shell .boxes-grid{gap:16px}.boxes-home-shell .box-card{padding:20px;min-height:268px}.boxes-home-shell .box-name{font-size:25px}.home-account{padding:17px 14px}.home-account-head h3{font-size:19px}.home-currency-label{font-size:12px;min-height:18px}.home-balance-value{font-size:20px}.boxes-home-shell .box-balances .home-currency-icon{display:grid;position:static;width:27px;height:27px}.boxes-home-shell .box-balances .home-balance-value{font-size:21px}}
@media(max-width:359px){.boxes-home-shell{padding-inline:10px}.boxes-home-shell .box-card{padding:12px 10px;min-height:222px;border-radius:23px}.boxes-home-shell .box-name{font-size:18px}.boxes-home-shell .box-description{font-size:9px}.boxes-home-shell .boxes-grid,.boxes-accounts{gap:9px}.home-account{padding-inline:6px;border-radius:20px}.home-account-head{gap:4px}.home-account-head h3{font-size:12px}.home-account-person{width:25px;height:25px}.home-account-person svg{width:18px;height:18px}.home-currency-label{font-size:9px}.home-balance-value{font-size:11px}.boxes-home-shell .box-balances .home-balance-value{font-size:13px}.boxes-home-shell .boxes-intro h2{font-size:21px}}
@media(prefers-reduced-motion:reduce){.boxes-home-shell .box-card-active{transition:none}}

.boxes-home-shell main{padding:7px 0 0}
.boxes-home-shell .topbar{padding-inline:3px;background:rgba(13,15,17,.95);backdrop-filter:none}
body.light .boxes-home-shell .topbar{background:rgba(250,246,240,.95)}
.home-account-safaa .home-account-head h3{font-size:13px}
.boxes-home-shell .box-card-action{font-size:12px;line-height:1.5;white-space:nowrap}
.boxes-home-shell .box-card-foot{flex-direction:row;gap:6px}
.boxes-home-shell .box-card-arrow{flex:none}
.home-balance-value{white-space:normal;overflow-wrap:anywhere}
.boxes-home-shell .box-balances .home-currency-iqd .home-balance-value{font-size:clamp(10px,3vw,19px)}
.boxes-home-shell .box-balances .home-currency-icon{display:grid;position:static;width:24px;height:24px;margin-top:3px}
@media(max-width:359px){.boxes-home-shell .box-balances .home-balance-value{font-size:11px}.home-account-safaa .home-account-head h3{font-size:11px}}

/* Families presentation layer. Activation follows the existing module shell;
   no DOM, data, routes, preferences or workflow changes are required. */
body:has(#appView:not(.hidden):not(.boxes-shell)){
  --bg:#0c0d0f;--panel:#181619;--panel2:#211923;--line:rgba(224,140,175,.24);
  --text:#fff7fb;--muted:#cdb8c4;--accent:#e08caf;--accentText:#291421;
  --shadow:0 12px 28px rgba(0,0,0,.22);
  --family-card:linear-gradient(135deg,rgba(157,85,126,.14),transparent 62%),#181619;
  --family-hero:linear-gradient(125deg,rgba(157,85,126,.32),transparent 60%),linear-gradient(155deg,#2d1928,#181619 78%);
  --family-control:linear-gradient(135deg,#43253b,#241c26);
  --family-primary:linear-gradient(135deg,#f0a9c4,#d684aa);
  --family-edge:rgba(224,140,175,.38);--family-glow:rgba(157,85,126,.12);
  --family-success:#79d7bf;--family-success-panel:#19392f;
  --family-received:linear-gradient(130deg,#173029,#17191a 78%);
  --family-success-edge:rgba(121,215,191,.35);
  --family-pending:linear-gradient(130deg,#2d1928,#1a1619 78%);
  --family-pending-panel:#3a2033;
  background:radial-gradient(ellipse at 0 0,rgba(142,74,127,.14),transparent 55%),var(--bg);
}
body.light:has(#appView:not(.hidden):not(.boxes-shell)){
  --bg:#faf5f8;--panel:#fffafd;--panel2:#f4eaf0;--line:rgba(142,74,127,.22);
  --text:#3d2339;--muted:#795d72;--accent:#8e4a7f;--accentText:#fff7fb;
  --shadow:0 10px 24px rgba(75,29,78,.07);
  --family-card:linear-gradient(135deg,rgba(247,200,216,.30),transparent 65%),#fffafd;
  --family-hero:linear-gradient(125deg,rgba(247,200,216,.65),transparent 65%),#fff7fb;
  --family-control:linear-gradient(135deg,#f2dce9,#fff7fb);
  --family-primary:linear-gradient(135deg,#9d557e,#7d3c6c);
  --family-edge:rgba(157,85,126,.35);--family-glow:rgba(157,85,126,.08);
  --family-success:#246e59;--family-success-panel:#e1f1e9;
  --family-received:linear-gradient(130deg,#e3f2ea,#f9fdfa 78%);
  --family-success-edge:rgba(36,110,89,.30);
  --family-pending:linear-gradient(130deg,#f7e3ed,#fff9fc 78%);
  --family-pending-panel:#f2d8e6;
}
.app:not(.boxes-shell){background:radial-gradient(ellipse at 0 8%,var(--family-glow),transparent 45%),var(--bg)}
.app:not(.boxes-shell) .topbar{background:color-mix(in srgb,var(--bg) 96%,transparent)}
.app:not(.boxes-shell) .topbar h1{color:var(--text);font-weight:850}
.app:not(.boxes-shell) :is(.iconbtn,.boxes-back,.backbtn){background:var(--family-control);border:1px solid var(--family-edge);color:var(--accent);box-shadow:inset 0 1px 0 rgba(255,255,255,.04)}
.app:not(.boxes-shell) .ncount{background:var(--accent);color:var(--accentText)}
.app:not(.boxes-shell) :is(.hero,.card,.metric,.form-card,.archive-current,.notification,.publication-card,.publication-entry){background:var(--family-card);border-color:var(--family-edge);box-shadow:var(--shadow),inset 0 1px 0 rgba(255,255,255,.025)}
.app:not(.boxes-shell) .hero{position:relative;isolation:isolate;overflow:hidden;border-radius:22px;background:var(--family-hero);border-color:var(--family-edge)}
.app:not(.boxes-shell) .hero::before,.app:not(.boxes-shell) .publication-entry::before{content:"";position:absolute;width:250px;height:170px;left:-155px;top:-95px;border:1px solid color-mix(in srgb,var(--accent) 20%,transparent);border-radius:50%;transform:rotate(-28deg);pointer-events:none;z-index:-1}
.app:not(.boxes-shell) .hero::after{content:"";position:absolute;width:200px;height:180px;right:-150px;bottom:-140px;border:1px solid color-mix(in srgb,var(--accent) 17%,transparent);border-radius:50%;pointer-events:none;z-index:-1}
.app:not(.boxes-shell) .hero .eyebrow{font-size:12px;color:var(--muted);margin-bottom:10px}
.app:not(.boxes-shell) #receivedCount{font-size:40px;line-height:1.15;color:var(--family-success);font-variant-numeric:tabular-nums}
.app:not(.boxes-shell) .hero .badge{background:color-mix(in srgb,var(--family-success) 12%,var(--panel));color:var(--family-success);border:1px solid var(--family-success-edge)}
.app:not(.boxes-shell) .progress{background:color-mix(in srgb,var(--accent) 18%,var(--panel2))}
.app:not(.boxes-shell) .progress i{background:linear-gradient(90deg,color-mix(in srgb,var(--family-success) 75%,var(--panel)),var(--family-success))}
.app:not(.boxes-shell) .hero-foot{padding-top:11px;border-top:1px solid var(--line)}
.app:not(.boxes-shell) .hero-foot b{font-size:18px;font-variant-numeric:tabular-nums}
.app:not(.boxes-shell) #receivedSmall{color:var(--family-success)}
.app:not(.boxes-shell) #unreceivedSmall{color:var(--accent)}
.app:not(.boxes-shell) .metric{position:relative;border-radius:19px}
.app:not(.boxes-shell) #dashboardWrap .metric>span{padding-left:38px;min-height:29px;display:flex;align-items:center;font-size:11px;line-height:1.5}
.app:not(.boxes-shell) .metric>b{font-size:clamp(18px,5.2vw,24px);color:var(--text);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.app:not(.boxes-shell) #dashboardWrap .metric::before{content:"";position:absolute;left:12px;top:12px;width:31px;height:31px;border-radius:12px;background:var(--family-control);border:1px solid var(--family-edge)}
.app:not(.boxes-shell) #dashboardWrap .metric::after{content:"";position:absolute;left:18px;top:18px;width:21px;height:21px;background:var(--accent);mask:var(--family-metric-icon) center/contain no-repeat;-webkit-mask:var(--family-metric-icon) center/contain no-repeat;pointer-events:none}
.app:not(.boxes-shell) #dashboardWrap .metric:nth-child(1){--family-metric-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3Cpath d='M4 21v-3a8 8 0 0 1 16 0v3'/%3E%3C/svg%3E")}
.app:not(.boxes-shell) #dashboardWrap .metric:nth-child(2){--family-metric-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Cpath d='m2 9 10-5 10 5-10 5Z M6 11v6c4 3 8 3 12 0v-6 M22 9v8'/%3E%3C/svg%3E")}
.app:not(.boxes-shell) #dashboardWrap .metric:nth-child(3){--family-metric-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Cpath d='M16 6h-6a3 3 0 0 0 0 6h4a3 3 0 0 1 0 6H8 M12 2v20'/%3E%3C/svg%3E")}
.app:not(.boxes-shell) #dashboardWrap .metric:nth-child(4){--family-metric-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='3' y='3' width='18' height='18' rx='6'/%3E%3Cpath d='m7 12 3 3 7-7'/%3E%3C/svg%3E")}
.app:not(.boxes-shell) #dashboardWrap .metric:nth-child(4)::before{background:var(--family-success-panel);border-color:var(--family-success-edge)}
.app:not(.boxes-shell) #dashboardWrap .metric:nth-child(4)::after{background:var(--family-success)}
.app:not(.boxes-shell) .section-head h2{color:var(--text);font-weight:850}
.app:not(.boxes-shell) .quick button{background:var(--family-card);border-color:var(--family-edge);border-radius:18px;box-shadow:inset 0 1px 0 rgba(255,255,255,.025)}
.app:not(.boxes-shell) .quick i{background:var(--family-control);border:1px solid var(--family-edge);color:var(--accent);border-radius:14px}
.app:not(.boxes-shell) .quick span{color:var(--text);line-height:1.5}
.app:not(.boxes-shell) #sendQuick i{background:var(--family-success-panel);border-color:var(--family-success-edge);color:var(--family-success)}
.app:not(.boxes-shell) .publication-entry{position:relative;isolation:isolate;overflow:hidden;background:var(--family-hero);border-radius:20px}
.app:not(.boxes-shell) :is(.publication-entry-icon,.settings-link-icon,.archive-icon){background:var(--family-control);color:var(--accent);border:1px solid var(--family-edge)}
.app:not(.boxes-shell) :is(.primary,.secondary){border-radius:16px}
body:has(#appView:not(.hidden):not(.boxes-shell)) .primary{background:var(--family-primary);color:var(--accentText);box-shadow:0 6px 16px var(--family-glow)}
body:has(#appView:not(.hidden):not(.boxes-shell)) .secondary{background:var(--family-card);border-color:var(--family-edge)}
.app:not(.boxes-shell) :is(.review-switch,.theme-settings,.person-review-summary,.notice-box,.selected-family,.ios-group,.form-card){background:var(--panel2);border-color:var(--line)}
.app:not(.boxes-shell) :is(.review-switch button.on,.person-tabs button.on,.theme-settings button.on){background:var(--family-control);box-shadow:inset 0 0 0 1px var(--family-edge),0 4px 12px var(--family-glow);color:var(--text)}
.app:not(.boxes-shell) :is(.person-tabs button,.received-fold,.manage-fold){background:var(--family-card);border-color:var(--family-edge)}
.app:not(.boxes-shell) .count-pill{background:var(--family-pending-panel);color:var(--accent)}
.app:not(.boxes-shell) #receivedFold{border-color:var(--family-success-edge)}
.app:not(.boxes-shell) #receivedFold .count-pill{background:var(--family-success-panel);color:var(--family-success)}
.app:not(.boxes-shell) .row{background:var(--family-card);border-color:var(--line);border-radius:18px}
.app:not(.boxes-shell) .sponsorship-row.row-unreceived{background:var(--family-pending);border-color:var(--family-edge);box-shadow:inset 0 1px 0 rgba(255,255,255,.025)}
.app:not(.boxes-shell) .sponsorship-row.row-unreceived .num{background:var(--family-pending-panel);color:var(--accent);border:1px solid var(--family-edge)}
.app:not(.boxes-shell) .sponsorship-row.row-unreceived .money b{color:var(--accent)}
.app:not(.boxes-shell) .sponsorship-row.row-received{background:var(--family-received);border-color:var(--family-success-edge);box-shadow:inset 0 1px 0 rgba(255,255,255,.025)}
.app:not(.boxes-shell) .sponsorship-row.row-received .num{background:var(--family-success-panel);color:var(--family-success);border:1px solid var(--family-success-edge)}
.app:not(.boxes-shell) .sponsorship-row.row-received .money b{color:var(--family-success)}
.app:not(.boxes-shell) :is(.sponsorship-row .money b,.selection-summary b,.person-review-summary b){font-variant-numeric:tabular-nums}
.app:not(.boxes-shell) .selectable-row.picked{background:var(--family-control);border-color:var(--accent)}
.app:not(.boxes-shell) :is(.close-state.ready,.archive-report-row.archive-paid .money b){color:var(--family-success)}
.app:not(.boxes-shell) .close-state.ready{background:var(--family-success-panel)}
.app:not(.boxes-shell) .archive-report-row.archive-paid{background:var(--family-received);border-color:var(--family-success-edge)}
.app:not(.boxes-shell) .searchbar{background:var(--bg)}
body:has(#appView:not(.hidden):not(.boxes-shell)) :is(input,select,textarea):not([type="checkbox"]):not([type="radio"]){background:var(--panel2);border-color:var(--line);color:var(--text)}
body:has(#appView:not(.hidden):not(.boxes-shell)) :is(input,textarea)::placeholder{color:var(--muted);opacity:.7}
body:has(#appView:not(.hidden):not(.boxes-shell)) :is(input,select,textarea):focus-visible{outline:2px solid color-mix(in srgb,var(--accent) 48%,transparent);outline-offset:1px;border-color:var(--accent)}
body:has(#appView:not(.hidden):not(.boxes-shell)) :is(button,summary):focus-visible{outline:2px solid var(--accent);outline-offset:2px}
body:has(#appView:not(.hidden):not(.boxes-shell)) input[type="checkbox"]{accent-color:var(--accent)}
body:not(.light):has(#appView:not(.hidden):not(.boxes-shell)) :is(input,select){color-scheme:dark}
.app:not(.boxes-shell) .bottomnav{background:color-mix(in srgb,var(--panel) 97%,transparent);border-top-color:var(--family-edge);box-shadow:0 -8px 22px var(--family-glow)}
.app:not(.boxes-shell) .bottomnav button{border-radius:16px;min-height:46px}
.app:not(.boxes-shell) .bottomnav button.on{background:var(--family-control);box-shadow:inset 0 -2px 0 var(--accent),0 0 12px var(--family-glow);color:var(--accent)}
body:has(#appView:not(.hidden):not(.boxes-shell)) .modal{background:rgba(7,5,8,.72)}
body:has(#appView:not(.hidden):not(.boxes-shell)) .modal-sheet{background:var(--family-card);border:1px solid var(--family-edge);border-bottom:0;box-shadow:0 -12px 35px rgba(0,0,0,.25)}
body:has(#appView:not(.hidden):not(.boxes-shell)) .modal-head button{background:var(--family-control);color:var(--accent);border:1px solid var(--family-edge)}
body:has(#appView:not(.hidden):not(.boxes-shell)) :is(.modal .selected-family,.modal .ios-group,.publication-text){background:var(--panel2);border-color:var(--line)}
body:has(#appView:not(.hidden):not(.boxes-shell)) .grab{background:color-mix(in srgb,var(--accent) 45%,var(--panel2))}
@media(max-width:359px){.app:not(.boxes-shell) .metric>b{font-size:18px}.app:not(.boxes-shell) .metric>span{font-size:10px}.app:not(.boxes-shell) #receivedCount{font-size:35px}}

/* Compact Boxes home only; the approved Families presentation stays intact. */
.boxes-home-shell{padding-top:10px;padding-bottom:calc(16px + env(safe-area-inset-bottom))}
.boxes-home-shell .topbar{padding-top:calc(16px + env(safe-area-inset-top));padding-bottom:6px}
.boxes-home-shell .topbar>div:first-child{padding:0;width:44px;min-height:44px}
.boxes-home-shell .topbar h1,.boxes-home-shell .boxes-title-en,.boxes-home-shell .boxes-profile-name{display:none}
.boxes-home-shell .boxes-deposit-mark{width:44px;height:44px;border-radius:14px}
.boxes-home-shell .boxes-deposit-mark svg{width:32px;height:32px}
.boxes-home-shell #globalAccountBtn{width:44px;height:44px;min-width:44px;justify-content:center}
.boxes-home-shell #globalAccountBtn svg{width:22px;height:22px;padding:10px}
.boxes-home-shell main{padding:0}
.boxes-home-shell .boxes-account-section{padding-bottom:8px;margin-bottom:10px;border-bottom:1px solid var(--home-line)}
.boxes-home-shell .boxes-accounts{grid-template-columns:minmax(0,1fr);direction:rtl;gap:8px}
.boxes-home-shell .home-account{color:#f0f2f5;background:#23272d;border:1px solid #3a4149;border-radius:14px;padding:6px 10px;box-shadow:none}
body.light .boxes-home-shell .home-account{color:#252b33;background:#fff;border-color:#d8dcdf}
.boxes-home-shell .home-account-head{gap:7px;margin-bottom:4px}
.boxes-home-shell .home-account-head h3{font-size:14px;line-height:1.3}
.boxes-home-shell .home-account-person{width:26px;height:26px;background:rgba(156,165,179,.16);border-radius:8px}
.boxes-home-shell .home-account-person svg{width:18px;height:18px}
.boxes-home-shell .home-account-balances .home-currency{gap:2px}
.boxes-home-shell .home-account-balances .home-currency+.home-currency{border-color:rgba(145,154,166,.22)}
.boxes-home-shell .home-account .home-currency-label{font-size:10px;min-height:0;line-height:1.4}
.boxes-home-shell .home-account .home-balance-value{font-size:clamp(16px,4.8vw,21px);line-height:1.2;letter-spacing:-.3px}
.boxes-home-shell .home-account .home-currency-code{font-size:9px;line-height:1.3}
.boxes-home-shell .home-currency-icon{display:none}
.boxes-home-shell .home-account-safaa{display:flex;align-items:center;justify-content:space-between;gap:8px}
.boxes-home-shell .home-account-safaa .home-account-head{margin:0}
.boxes-home-shell .home-account-safaa .home-account-balances{width:46%;flex:none}
.boxes-home-shell .home-account-safaa .home-currency{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 4px;text-align:left}
.boxes-home-shell .home-account-safaa .home-currency-label{grid-column:1/-1}
.boxes-home-shell .home-account-safaa .home-currency-code{align-self:end}
.boxes-home-shell .home-account-safaa .home-balance-value{font-size:21px}
.boxes-home-shell .boxes-grid{gap:10px}
.boxes-home-shell .box-card{display:grid;grid-template-columns:32px minmax(0,1fr);align-content:start;align-items:center;column-gap:6px;min-height:136px;padding:9px;border-radius:22px}
.boxes-home-shell .box-card-top{margin:0}
.boxes-home-shell .box-icon{width:32px;height:32px;border-radius:11px}
.boxes-home-shell .box-icon svg{width:23px;height:23px}
.boxes-home-shell .box-name{font-size:clamp(14px,4.35vw,18px);margin:0;line-height:1.35;letter-spacing:-.4px}
.boxes-home-shell .box-balances{grid-column:1/-1;display:flex;flex-direction:column;gap:4px;margin:6px 0 0;padding-top:6px}
.boxes-home-shell .box-balances .home-currency{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 5px;padding:0;text-align:right}
.boxes-home-shell .box-balances .home-currency+.home-currency{border:0}
.boxes-home-shell .box-balances .home-currency-label{grid-column:1/-1;min-height:0;font-size:10px;line-height:1.3}
.boxes-home-shell .box-balances .home-balance-value,.boxes-home-shell .box-balances .home-currency-iqd .home-balance-value{font-size:clamp(16px,4.5vw,21px);line-height:1.2;letter-spacing:-.35px;text-align:right}
.boxes-home-shell .box-balances .home-currency-code{font-size:9px;align-self:end;line-height:1.4}
.boxes-home-shell .box-balances .home-currency-icon{display:none}

/* Balanced home spacing follows available viewport height, including safe areas. */
.boxes-settings-label{display:none}
.boxes-home-shell{--home-breath:clamp(0px,calc((100dvh - 600px - env(safe-area-inset-top) - env(safe-area-inset-bottom))/12),20px);--account-digit:clamp(16px,5vw,22px)}
.boxes-home-shell .topbar{justify-content:flex-end;padding-bottom:10px}
.boxes-home-shell .topbar>div:first-child{display:none}
.boxes-home-shell #globalAccountBtn{flex-direction:row;align-items:center;width:auto;min-width:118px;height:48px;gap:9px;padding:0 14px;border:1px solid var(--home-line);border-radius:16px;background:#23272d;font-size:14px;font-weight:700}
body.light .boxes-home-shell #globalAccountBtn{background:#fff;border-color:#d8dcdf}
.boxes-home-shell #globalAccountBtn svg{width:23px;height:23px;padding:0;border:0;border-radius:0;background:none;box-sizing:border-box}
.boxes-home-shell .boxes-settings-label{display:inline}
.boxes-home-shell #boxesScreen{display:flex;flex-direction:column;min-height:calc(100dvh - 102px - env(safe-area-inset-top) - env(safe-area-inset-bottom))}
.boxes-home-shell .home-account{display:block;padding:calc(5px + var(--home-breath)/2) 10px;min-height:0}
.boxes-home-shell .home-account-head,.boxes-home-shell .home-account-safaa .home-account-head{margin:0 0 calc(2px + var(--home-breath)/2);gap:7px}
.boxes-home-shell .home-account-head h3{font-size:clamp(14px,4vw,17px)}
.boxes-home-shell .home-account-person{width:22px;height:22px}
.boxes-home-shell .home-account-balances{padding-block:calc(var(--home-breath)/2)}
.boxes-home-shell .home-account-safaa .home-account-balances{width:auto;grid-template-columns:minmax(0,1fr)}
.boxes-home-shell .home-account .home-currency{display:flex;flex-direction:column;gap:2px;text-align:center}
.boxes-home-shell .home-account .home-currency-label{grid-column:auto;justify-content:center}
.boxes-home-shell .home-account .home-currency-code{align-self:auto}
.boxes-home-shell .home-account .home-balance-value,.boxes-home-shell .home-account-safaa .home-balance-value{font-size:var(--account-digit)}
.boxes-home-shell .boxes-account-section{margin-bottom:calc(10px + var(--home-breath)/2);padding-bottom:calc(8px + var(--home-breath)/2)}
.boxes-home-shell .boxes-grid{flex:1;grid-template-rows:repeat(2,minmax(0,1fr));gap:calc(10px + var(--home-breath)/2)}
.boxes-home-shell .box-card{min-height:128px;padding:calc(8px + var(--home-breath)/3) 9px;align-content:normal;grid-template-rows:auto 1fr}
.boxes-home-shell .box-balances{justify-content:space-around;gap:4px;margin-top:6px}
@media(max-height:620px){
.boxes-home-shell{padding-bottom:calc(12px + env(safe-area-inset-bottom))}
.boxes-home-shell #globalAccountBtn{height:44px}
.boxes-home-shell .home-account{padding-block:4px}
.boxes-home-shell .home-account-head,.boxes-home-shell .home-account-safaa .home-account-head{margin-bottom:1px}
.boxes-home-shell .box-card{grid-template-columns:28px minmax(0,1fr);padding-block:6px;min-height:120px}
.boxes-home-shell .box-icon{width:28px;height:28px}
.boxes-home-shell .box-icon svg{width:21px;height:21px}
}

/* Functional fund screens reuse the original Boxes palette and controls. */
body:has(.general-fund-shell:not(.hidden)){--bg:#0d0f11;--panel:#15181b;--panel2:#1b1f23;--line:#2a3035;--text:#f4f6f7;--muted:#96a0a9;--accent:#61c7a5;--accentText:#07130f;--danger:#ff6b6b;background:var(--bg)}
body.light:has(.general-fund-shell:not(.hidden)){--bg:#f3f5f7;--panel:#fff;--panel2:#f8fafb;--line:#e1e6ea;--text:#171a1d;--muted:#74808a;--accent:#167a62;--accentText:#fff;--danger:#c73e3e;background:var(--bg)}
.general-fund-shell .topbar,.general-fund-shell .bottomnav{background:var(--bg);border-color:var(--line);box-shadow:none;color:var(--text)}
.general-fund-shell .topbar h1{color:var(--text)}
.general-fund-shell .bottomnav button.on{background:var(--panel2);color:var(--accent);box-shadow:inset 0 -2px 0 var(--accent)}
.general-screen .card{background:var(--panel);border:1px solid var(--line)}
.gf-summary,.gf-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.gf-summary .card{margin:0;padding:14px;min-width:0}.gf-summary span{display:block;font-size:12px;color:var(--muted)}.gf-summary b{display:block;font-size:23px;margin-top:8px;overflow-wrap:anywhere;direction:ltr;text-align:right}
.gf-actions .secondary{margin:0;padding:12px;font-size:13px;min-height:44px}
.gf-row{padding:14px;margin-top:10px;white-space:normal}.gf-row-head{display:flex;justify-content:space-between;gap:8px}.gf-row time{font-size:11px;color:var(--muted);direction:ltr}.gf-effects{display:flex;gap:12px;flex-wrap:wrap;margin:9px 0}.gf-effects span{font-size:12px}.gf-effects b{display:block;font-size:18px;direction:ltr;text-align:right}.gf-positive{color:var(--accent)}.gf-negative{color:var(--danger)}.gf-notes{white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;line-height:1.7;margin:8px 0}.gf-details{color:var(--muted);font-size:11px}.gf-cancelled{opacity:.65}.gf-row button{margin-left:10px;min-height:44px}.general-screen details{margin:10px 0}.general-screen summary{padding:12px;font-weight:700;cursor:pointer}.gf-publication{width:100%;min-height:130px;white-space:pre-wrap}.gf-account-label{font-size:12px}
#gfModal textarea{width:100%;border:1px solid var(--line);background:var(--panel2);color:var(--text);border-radius:14px;padding:12px;margin-top:10px}
.board-observer #gfActions,.board-observer .gf-admin,.board-observer #gfSave,.board-observer #gfCancel,.board-observer #gfRestore{display:none!important}
.board-observer #homeScreen .quick,.board-observer #openMonthBtn,.board-observer #publicationQuick,.board-observer #transferScreen,.board-observer #fxScreen,.board-observer #sendScreen,.board-observer #saveReceipt,.board-observer #manageSave,.board-observer #manageUndo,.board-observer #copyPublication,.board-observer #continuePublicationBatch,.board-observer #clearNotifications,.board-observer [data-theme-choice]{display:none!important}
.board-observer #listScreen .sponsorship-row{pointer-events:none}.board-observer #receiptModal input,.board-observer #receiptModal select{pointer-events:none}
@media(max-width:359px){.gf-summary b{font-size:19px}.gf-summary .card{padding:11px}.gf-row-head{flex-wrap:wrap}}

.board-only{display:none}.board-observer .board-only{display:block}

.board-observer #notifyBtn,.board-observer .section-head:has(+ #gfActions),.board-observer #homeScreen .section-head:has(+ .quick){display:none!important}

/* Shared mobile inputs and General Fund layout corrections. */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
html body :is(input,select,textarea):not([type="checkbox"]):not([type="radio"]){font-size:16px}
html body input:is([inputmode="numeric"],[inputmode="decimal"]):not([type="checkbox"]):not([type="radio"]){font-size:18px;direction:ltr;text-align:left;font-variant-numeric:tabular-nums}
html body input.amount-input:not([type="checkbox"]):not([type="radio"]){font-size:24px}
.general-fund-shell{padding-bottom:calc(100px + env(safe-area-inset-bottom))}
#generalNav{grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-flow:column}
#generalNav button{min-width:0}
#gfReportsEntry{margin-top:12px}
#gfForm,#gfForm>div{min-width:0}
#gfModal .modal-sheet{max-width:100%;overflow-x:hidden}
#gfForm :is(input:not([type="checkbox"]),select,textarea){max-width:100%;min-width:0;box-sizing:border-box}
#gfForm input[type="datetime-local"]{display:block;width:100%;min-height:50px;appearance:none;-webkit-appearance:none;text-align:left;direction:ltr}
#gfForm input[type="datetime-local"]::-webkit-date-and-time-value{min-width:0;text-align:left}
#gfForm input[type="datetime-local"]::-webkit-datetime-edit{padding:0;min-width:0}
#gfForm details{margin:18px 0 4px;border:1px solid var(--line);border-radius:15px;background:var(--panel2)}
#gfForm summary{min-height:48px;padding:13px 14px;cursor:pointer;line-height:1.5;font-size:15px;list-style-position:inside}
#gfForm details[open]{padding-bottom:12px}
#gfForm details[open] summary{margin-bottom:8px;border-bottom:1px solid var(--line)}
#gfForm .gf-notes-field{padding:0 12px;min-width:0}
#gfNotes{display:block;width:100%;margin:0;min-height:96px;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--panel);color:var(--text);font-family:inherit;resize:vertical}
#gfForm :is(#gfCancel,#gfRestore){margin-top:10px}

/* Shared settings registration and active Boxes state; existing theme retained. */
.central-settings-group{margin:14px 0;border:1px solid var(--line);border-radius:22px;background:var(--panel);overflow:hidden}
.central-settings-group>summary{min-height:60px;padding:16px 18px;cursor:pointer;font-size:18px;font-weight:750;line-height:1.5}
.central-settings-group[open]>summary{border-bottom:1px solid var(--line)}
.central-settings-group>.card{margin:12px;border-radius:16px}
.central-settings-group>p{padding:0 18px;line-height:1.8}
#accountScreen{padding-bottom:calc(30px + env(safe-area-inset-bottom))}
#accountScreen input{width:100%;min-width:0;max-width:100%;box-sizing:border-box}
#accountScreen #gfPinResult{overflow-wrap:anywhere;user-select:text}
.boxes-home-shell .box-theme-general.box-card-active{border-color:var(--fund-accent);box-shadow:0 0 0 3px rgba(112,153,148,.12),0 7px 20px rgba(71,131,121,.18)}
.boxes-home-shell .box-card-inactive{opacity:.55;box-shadow:none}
.boxes-home-shell .box-coming-soon{position:absolute;inset-inline-start:12px;bottom:10px;color:var(--fund-ink);font-size:11px;font-weight:650}

/* Account focus and reachable header navigation, without a theme redesign. */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.boxes-home-shell button.home-account{width:100%;font:inherit;color:inherit;text-align:right;cursor:pointer;transition:border-color .15s,box-shadow .15s}
.boxes-home-shell .home-account.account-focused{border-color:var(--accent);box-shadow:0 0 0 2px color-mix(in srgb,var(--accent) 22%,transparent),0 3px 14px color-mix(in srgb,var(--accent) 14%,transparent)}
.boxes-home-shell .home-account:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.box-focus-label{position:absolute;inset-inline-end:13px;bottom:9px;font-size:11px;font-weight:700;color:var(--fund-accent)}
.topbar:has(>#boxesHomeBtn:not(.hidden)){display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:10px}
.topbar:has(>#boxesHomeBtn:not(.hidden))>.header-title{text-align:left;min-width:0}
.topbar>#boxesHomeBtn{min-width:94px;min-height:48px;padding:0 12px;font-size:13px;font-weight:800;border-color:color-mix(in srgb,var(--accent) 60%,var(--line));background:color-mix(in srgb,var(--accent) 9%,var(--panel))}
.topbar>#boxesHomeBtn .ui-icon{width:21px;height:21px}
.boxes-home-shell .topbar>.header-title{display:none}
html{overscroll-behavior-x:contain}
@media(max-width:359px){.topbar:has(>#boxesHomeBtn:not(.hidden)){gap:6px;padding-inline:10px}.topbar>#boxesHomeBtn{min-width:86px;padding-inline:9px}.topbar:has(>#boxesHomeBtn:not(.hidden)) h1{font-size:18px}}
@media(prefers-reduced-motion:reduce){.boxes-home-shell button.home-account{transition:none}}

/* Structural account administration uses existing controls and theme. */
.account-list-row small{display:block;line-height:1.8;overflow-wrap:anywhere}
#accountForm label{display:block;margin-top:16px}
#accountForm select{width:100%;max-width:100%;min-width:0;min-height:48px;font-size:16px}
#accountForm .edit-check,#notificationPreferences .edit-check{display:flex;align-items:center;gap:12px;min-height:48px}
#accountScreen input[type="checkbox"]{width:22px;height:22px;flex-shrink:0}
.notification-preference-module{border:1px solid var(--line);border-radius:14px;margin-block:12px}
.notification-preference-module>summary{padding:12px;min-height:48px}
.notification-preference-module>summary label{display:inline-flex;gap:12px;align-items:center}
.notification-preference-module>div{padding:0 14px 14px}
.board-observer #notifyBtn:not(.hidden){display:flex!important}
#accountsAdmin,#sessionsAdmin,#personalNotifications{overflow-wrap:anywhere}

/* Daily UX hierarchy: existing theme/colors, no financial visibility changes. */
:is(.grid4,.gf-summary){align-items:stretch}
[data-prominence="primary"]{order:-2}
:is(.grid4,.gf-summary)>[data-prominence="primary"]{border-color:color-mix(in srgb,var(--accent) 60%,var(--line))!important}
[data-prominence="summary"]{order:-1}
[data-prominence="secondary"]{order:1}
:is(.grid4,.gf-summary)>[data-prominence="primary"] b{font-size:clamp(25px,7vw,34px)}
:is(.grid4,.gf-summary)>[data-prominence="secondary"]{background:var(--panel)!important;box-shadow:none!important}
body[data-ui-role="operator"] #unreceivedSmall{color:var(--accent);font-size:24px}
body[data-ui-role="viewer"] :is(.quick,#gfActions){display:none}
.quick{grid-template-columns:repeat(auto-fit,minmax(110px,1fr))}
.record-action{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:8px 14px;width:auto;border:1px solid var(--line);border-radius:13px;background:var(--panel2);color:var(--text);font-size:14px;font-weight:750}
.record-action .ui-icon{width:18px;height:18px}
.record-action.on{color:var(--accent);border-color:var(--accent);background:color-mix(in srgb,var(--accent) 10%,var(--panel))}
.archive-disclosure{border:1px solid var(--line);border-radius:18px;margin-block:12px;overflow:hidden;background:var(--panel)}
.archive-disclosure>summary,#currentMonthArchiveCard>summary{padding:16px;min-height:52px;cursor:pointer;font-weight:750;list-style:revert}
.archive-disclosure-body{padding:12px;min-width:0}
.archive-disclosure .archive-disclosure{margin-block:8px}
#masterForm label{display:block;margin-top:14px}
#masterForm :is(input,textarea){max-width:100%;min-width:0;font-size:16px}
#masterForm .field-note{line-height:1.7}
#masterDeactivate{margin-top:14px}
#masterList .row{gap:10px;align-items:center}
#masterList .rowmain{min-width:0;overflow-wrap:anywhere}
.topbar:has(>#boxesHomeBtn:not(.hidden)){direction:rtl;grid-template-columns:auto minmax(0,1fr) auto}
.topbar>#boxesHomeBtn{grid-column:1;grid-row:1;order:0;min-height:50px}
.topbar:has(>#boxesHomeBtn:not(.hidden))>.header-title{grid-column:2;grid-row:1;text-align:center}
.topbar:has(>#boxesHomeBtn:not(.hidden))>.head-actions{grid-column:3;grid-row:1;order:0}
@media(max-width:359px){.topbar>#boxesHomeBtn{min-width:82px;padding-inline:8px}.topbar:has(>#boxesHomeBtn:not(.hidden)) h1{font-size:16px}.record-action{padding-inline:10px}}

.daily-family-row{display:grid;grid-template-columns:max-content minmax(0,1fr) auto;gap:10px;margin-block:8px}
.daily-family-row .num,#masterList .num{width:auto;min-width:39px;padding-inline:8px;font-size:13px}
.daily-family-row .rowmain>b,.daily-family-row .rowmain>small,#masterList .rowmain>b,#masterList .rowsub{display:block;overflow-wrap:anywhere;line-height:1.5}
.daily-family-row> b{white-space:nowrap;font-size:13px;direction:ltr}


.operation-success{position:fixed;top:calc(env(safe-area-inset-top) + 86px);left:50%;transform:translateX(-50%);width:min(500px,calc(100% - 28px));z-index:110;display:flex;align-items:center;gap:12px;padding:14px;border:1px solid var(--family-success-edge,var(--accent));border-radius:18px;background:var(--panel);color:var(--family-success,var(--accent));box-shadow:var(--shadow)}
.operation-success>b{flex:1;font-size:16px;line-height:1.6}.operation-success>svg{flex:none;width:26px;height:26px}.operation-success>button{border:0;background:transparent;color:inherit;font-size:26px;min-width:40px;min-height:44px}
.inbox-actions{display:flex;gap:10px;margin-block:8px 16px}.inbox-actions button{display:flex;align-items:center;justify-content:center;gap:8px;min-height:44px;flex:1;padding:10px;font-size:14px}
.notification-item{width:100%;text-align:start;cursor:pointer}.notification-item.unread{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 10%,var(--panel));box-shadow:0 0 16px color-mix(in srgb,var(--accent) 16%,transparent)}
.notification-item:focus-visible{outline:2px solid var(--accent);outline-offset:3px}.notification-item small{display:block}.notification-item .ui-icon{width:20px;height:20px}

.daily-family-row .archive-phone{display:inline-flex;align-items:center;min-height:44px;max-width:100%;margin-top:2px;font-size:13px}

/* Shared transient message generator; existing module themes remain unchanged. */
.message-new{display:flex;align-items:center;justify-content:center;gap:10px}
.message-new svg{width:24px;height:24px;flex:0 0 24px}
.publication-sheet #closePublication{width:auto;min-width:68px;padding:8px 12px;font-size:16px;flex:0 0 auto}
.message-selection{margin-top:18px}.message-choice{display:flex;align-items:center;gap:14px;cursor:pointer;min-height:64px;margin:10px 0;padding:16px}
.message-choice input[type=checkbox]{flex:0 0 24px;width:24px;height:24px;margin:0;accent-color:var(--accent)}
.message-choice span{min-width:0;overflow-wrap:anywhere}.message-choice small{display:block;color:var(--muted);margin-top:6px;font-size:13px}
.message-month{margin-top:22px}.message-month-actions{display:grid;gap:10px}.message-status{min-height:24px;color:var(--muted)}
.message-more,.message-preview{margin-top:12px}#startupRetry{margin-top:14px}

/* Boxes 1.3.9 — shared presentation tokens, with module-owned palettes.
   Existing routes, role attributes, forms and state remain authoritative. */
:root{
 --ds-space-1:4px;--ds-space-2:8px;--ds-space-3:12px;--ds-space-4:16px;--ds-space-5:24px;
 --ds-radius-control:14px;--ds-radius-card:22px;--ds-radius-sheet:28px;
 --ds-font-meta:12px;--ds-font-label:13px;--ds-font-body:15px;--ds-font-section:17px;--ds-font-title:21px;
 --ds-font-money:clamp(23px,6.5vw,29px);--ds-weight-label:650;--ds-weight-title:750;--ds-weight-money:800;
 --ds-icon:22px;--ds-touch:44px;--ds-nav-height:64px;
 --ds-neutral-bg:#101718;--ds-neutral-card:#1a2527;--ds-neutral-soft:#202e30;
 --ds-neutral-text:#f1f8f6;--ds-neutral-muted:#a9bdb9;--ds-neutral-line:#354849;
 --ds-teal:#85d3c6;--ds-teal-soft:#244b47;--ds-teal-edge:#497c75;
 --ds-sand:#e6c993;--ds-sand-soft:#342e24;--ds-sand-edge:#68593d;
 --ds-general-hero:linear-gradient(125deg,#19453f,#192728 82%);
 --ds-general-wail:linear-gradient(145deg,#1d3936,#182b2b);
 --ds-general-safaa:linear-gradient(145deg,#372e20,#262721);
 --ds-general-primary:linear-gradient(130deg,#9bddca,#68c3b4);
 --ds-family-hero:linear-gradient(135deg,#49283c,#221b25 82%);
 --ds-positive:#9ae0c6;--ds-negative:#ffabae;--ds-success-soft:#19382f;
 --ds-shadow:0 7px 22px rgba(0,0,0,.16);--ds-glow:rgba(91,175,158,.13);
 --ds-selected:color-mix(in srgb,var(--accent) 13%,var(--panel));
 --ds-surface-gradient:linear-gradient(135deg,rgba(255,255,255,.025),transparent);
}
body.light{
 --ds-neutral-bg:#f6f4ee;--ds-neutral-card:#fffefb;--ds-neutral-soft:#f0f4f0;
 --ds-neutral-text:#183d41;--ds-neutral-muted:#4b6466;--ds-neutral-line:#d8e2dd;
 --ds-teal:#006d77;--ds-teal-soft:#dcefe8;--ds-teal-edge:#9bc5bb;
 --ds-sand:#795b23;--ds-sand-soft:#f6eedd;--ds-sand-edge:#d6c6a6;
 --ds-general-hero:linear-gradient(125deg,#cfeae4,#fff9ef 85%);
 --ds-general-wail:linear-gradient(145deg,#ddf1ec,#f1f8f4);
 --ds-general-safaa:linear-gradient(145deg,#f4e7cf,#fbf6ea);
 --ds-general-primary:linear-gradient(130deg,#087780,#00646e);
 --ds-family-hero:linear-gradient(135deg,#f5d6e5,#fff8fc 82%);
 --ds-positive:#17674d;--ds-negative:#a63844;--ds-success-soft:#e1f2e9;
 --ds-shadow:0 7px 20px rgba(41,71,65,.065);--ds-glow:rgba(0,109,119,.09);
 --ds-surface-gradient:linear-gradient(135deg,rgba(255,255,255,.75),transparent);
}
/* Shared shell and Settings use a neutral identity; Families retains its pink. */
body:has(#appView.boxes-shell){
 --bg:var(--ds-neutral-bg);--panel:var(--ds-neutral-card);--panel2:var(--ds-neutral-soft);
 --text:var(--ds-neutral-text);--muted:var(--ds-neutral-muted);--line:var(--ds-neutral-line);
 --accent:var(--ds-teal);--accentText:#102b28;--shadow:var(--ds-shadow);
 background:radial-gradient(ellipse at 100% 0,var(--ds-glow),transparent 48%),var(--bg);
}
body.light:has(#appView.boxes-shell){--accentText:#fff}
/* Scoped after the historical Families layer: the General card expands into
   the same teal/sand identity, including the sheets outside the app root. */
body:not(.light):has(#appView.general-fund-shell:not(.hidden)),
body.light:has(#appView.general-fund-shell:not(.hidden)){
 --bg:var(--ds-neutral-bg);--panel:var(--ds-neutral-card);--panel2:var(--ds-neutral-soft);
 --text:var(--ds-neutral-text);--muted:var(--ds-neutral-muted);--line:var(--ds-neutral-line);
 --accent:var(--ds-teal);--accentText:#102b28;--shadow:var(--ds-shadow);
 --family-card:var(--ds-surface-gradient),var(--panel);--family-hero:var(--ds-general-hero);
 --family-control:var(--ds-teal-soft);--family-primary:var(--ds-general-primary);
 --family-edge:var(--ds-neutral-line);--family-glow:var(--ds-glow);
 --family-success:var(--ds-positive);--family-success-panel:var(--ds-success-soft);
 --family-success-edge:var(--ds-teal-edge);--family-pending-panel:var(--ds-sand-soft);
 background:radial-gradient(ellipse at 100% 0,var(--ds-glow),transparent 48%),var(--bg);
}
body.light:has(#appView.general-fund-shell:not(.hidden)){--accentText:#fff}
body:not(.light):has(#appView:not(.boxes-shell):not(.general-fund-shell):not(.hidden)),
body.light:has(#appView:not(.boxes-shell):not(.general-fund-shell):not(.hidden)){
 --shadow:var(--ds-shadow);--ds-glow:rgba(196,119,163,.12);--ds-teal-soft:var(--family-success-panel);
 --ds-positive:var(--family-success);--ds-success-soft:var(--family-success-panel);
}
body{--ds-selected:color-mix(in srgb,var(--accent) 13%,var(--panel))}
body.light:has(#appView:not(.boxes-shell):not(.general-fund-shell):not(.hidden)){--muted:#725367}
html,body{font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",Tahoma,Arial,sans-serif;line-height:1.5}
#appView{font-size:var(--ds-font-body);background:radial-gradient(ellipse at 100% 0,var(--ds-glow),transparent 48%),var(--bg);padding-bottom:calc(var(--ds-nav-height) + env(safe-area-inset-bottom) + 16px)}
#appView main{padding:8px 16px 16px}
#appView :is(.card,.metric,.hero,.form-card,.notification,.archive-current,.archive-disclosure,.central-settings-group,.received-fold,.manage-fold){
 border-radius:var(--ds-radius-card);border:1px solid var(--line);background:var(--ds-surface-gradient),var(--panel);box-shadow:var(--ds-shadow);
}
#appView .card{padding:14px;margin-bottom:10px}
#appView :is(h2,h3){line-height:1.45;font-weight:var(--ds-weight-title)}
#appView h2{font-size:var(--ds-font-section)}
#appView h3{font-size:var(--ds-font-body)}
#appView .muted{color:var(--muted);line-height:1.7}
#appView :is(.eyebrow,.field-note,.settings-note,.rowsub,.rowbeneficiary,.gf-details,.settings-link-copy small){font-size:var(--ds-font-meta);line-height:1.6}
#appView :is(.section-head,.op-head){margin-block:14px 10px}
#appView .section-head h2{margin:0}
#appView :is(.rowtitle,.rowmain>b){font-size:14px;line-height:1.5}
#appView :is(.metric b,.money b,.home-balance-value,.gf-summary b,.gf-effects b){font-variant-numeric:tabular-nums;font-weight:var(--ds-weight-money);letter-spacing:-.25px}
.ui-icon,.quick-svg,#appView :is(.box-icon,.home-account-person,.home-currency-icon,.balance-icon) svg{width:var(--ds-icon);height:var(--ds-icon);stroke-width:1.8;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round}
#appView :is(.iconbtn,.boxes-back,.backbtn){min-height:var(--ds-touch);min-width:var(--ds-touch);border-radius:var(--ds-radius-control)}
#appView .topbar{padding:calc(12px + env(safe-area-inset-top)) 16px 10px;background:color-mix(in srgb,var(--bg) 96%,transparent);border-bottom:1px solid color-mix(in srgb,var(--line) 65%,transparent)}
#appView .topbar h1{font-size:var(--ds-font-title);line-height:1.4;font-weight:var(--ds-weight-title);letter-spacing:-.4px}
#appView .topbar p{font-size:var(--ds-font-meta);margin:2px 0 0;color:var(--muted)}
#appView .topbar #boxesHomeBtn{min-width:88px;min-height:46px;font-size:13px;gap:7px;padding-inline:10px}
#appView .topbar #notifyBtn{display:grid;place-items:center;width:44px;height:44px}
#appView .topbar #notifyBtn.hidden{display:none}
#appView .ncount{font-size:11px;min-width:20px;min-height:20px;background:var(--accent);color:var(--accentText);box-shadow:0 0 0 2px var(--bg)}
#appView .bottomnav{grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;padding:6px 12px calc(6px + env(safe-area-inset-bottom));background:color-mix(in srgb,var(--panel) 95%,transparent);border-top:1px solid var(--line);box-shadow:0 -5px 18px rgba(0,0,0,.06);z-index:40}
#appView .bottomnav button{display:flex;flex-direction:column;justify-content:center;gap:3px;min-height:52px;min-width:0;border-radius:16px;color:var(--muted);padding:5px 4px}
#appView .bottomnav .ui-icon{width:22px;height:22px}
#appView .bottomnav span{font-size:12px;line-height:1.4;font-weight:var(--ds-weight-label)}
#appView .bottomnav button.on{color:var(--accent);background:var(--ds-selected);box-shadow:inset 0 -2px 0 var(--accent)}
#appView :is(.primary,.secondary,.record-action){font-weight:var(--ds-weight-title);font-size:14px;min-height:var(--ds-touch);border-radius:var(--ds-radius-control)}
#appView :is(.linkbtn,.theme-settings button,.person-tabs button,.review-switch button){min-height:var(--ds-touch);font-size:13px}
body:has(#appView) :is(input,select,textarea):not([type=checkbox]):not([type=radio]){border-radius:var(--ds-radius-control);font-size:16px;min-height:48px;line-height:1.5}
body:has(#appView) label{font-size:13px;line-height:1.5;margin-block:12px 6px}
body:has(#appView) textarea{font-family:inherit;line-height:1.7;resize:vertical}
body:has(#appView) :is(button,summary,input,select,textarea):focus-visible{outline:2px solid var(--accent);outline-offset:3px}
body:has(#appView) .modal-sheet{max-height:calc(100dvh - env(safe-area-inset-top) - 16px);overflow-y:auto;overscroll-behavior-y:contain;padding:10px 16px calc(18px + env(safe-area-inset-bottom));border-radius:var(--ds-radius-sheet) var(--ds-radius-sheet) 0 0}
body:has(#appView) .modal-head{gap:12px;margin-bottom:8px}
body:has(#appView) .modal-head h2{font-size:20px;line-height:1.5;margin:6px 0}
body:has(#appView) .modal-head button{min-width:44px;min-height:44px;display:grid;place-items:center;border-radius:var(--ds-radius-control)}
body:has(#appView) .modal-head .ui-icon{width:22px;height:22px}
body:has(#appView) .publication-sheet #closePublication{font-size:14px;min-height:44px}
body:has(#appView) .error-text{font-size:13px;line-height:1.6}
body:has(#appView) .publication-text{font-size:16px;line-height:1.85;min-height:180px}
body:has(#appView) .operation-success{color:var(--ds-positive);background:var(--panel);border-color:var(--ds-positive);border-radius:var(--ds-radius-card);box-shadow:var(--ds-shadow);top:calc(env(safe-area-inset-top) + 82px)}
body:has(#appView) .operation-success>b{font-size:15px;line-height:1.6}
body:has(#appView) .operation-success>button{display:grid;place-items:center;min-width:44px;min-height:44px}
/* Summary and account cards retain all existing data IDs and role attributes. */
#appView .gf-summary{gap:10px;grid-template-columns:repeat(2,minmax(0,1fr))}
#appView .gf-summary .card{padding:12px;margin:0;min-width:0;position:relative;overflow:hidden}
#appView .gf-summary .gf-total-card{grid-column:1/-1;order:-3;background:var(--ds-general-hero);border-color:var(--ds-teal-edge)}
.gf-total-card:before{content:"";position:absolute;width:180px;height:140px;border:1px solid color-mix(in srgb,var(--accent) 16%,transparent);border-radius:50%;top:-80px;left:-65px;pointer-events:none}
#appView .balance-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px;position:relative}
#appView .balance-heading h2,#appView .balance-heading h3{margin:0;font-size:15px;font-weight:var(--ds-weight-title)}
#appView .gf-total-card .balance-heading h2{font-size:17px}
#appView .balance-icon{display:grid;place-items:center;width:34px;height:34px;border-radius:11px;background:var(--ds-teal-soft);color:var(--accent);flex:none}
#appView .gf-total-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0;position:relative}
#appView .balance-cell{padding:0 8px;text-align:center;min-width:0}
#appView .balance-cell+.balance-cell{border-inline-start:1px solid var(--line)}
#appView .balance-cell span{font-size:12px;color:var(--muted)}
#appView .balance-cell b{font-size:var(--ds-font-money);line-height:1.25;margin-top:3px;text-align:center;white-space:nowrap;direction:ltr;display:block}
#appView .balance-cell small{font-size:11px;color:var(--muted);display:block}
#appView .gf-account-wail{background:var(--ds-general-wail)}
#appView .gf-account-safaa{background:var(--ds-general-safaa)}
#appView .gf-account-safaa .balance-icon{background:var(--ds-sand-soft);color:var(--ds-sand)}
#appView .balance-line{margin:5px 0 0;padding:3px 0;min-width:0}
#appView .balance-line+.balance-line{border-top:1px solid var(--line);padding-top:7px;margin-top:7px}
#appView .balance-line span{font-size:12px;color:var(--muted)}
#appView .balance-line b{font-size:24px;line-height:1.2;margin:3px 0 0;white-space:nowrap;display:block;direction:ltr;text-align:right}
#appView .gf-account-safaa .balance-line b{font-size:28px}
#appView .gf-summary>[data-prominence=primary]{border-color:var(--accent);box-shadow:0 0 0 1px color-mix(in srgb,var(--accent) 25%,transparent),var(--ds-shadow)}
#appView .gf-summary>[data-prominence=secondary]{background:var(--ds-general-safaa)!important;box-shadow:none;opacity:.92}
#appView .gf-summary>.gf-account-wail[data-prominence=secondary]{background:var(--ds-general-wail)!important}
#appView .gf-summary>[data-prominence=primary] .balance-line b{font-size:28px}
/* One quick-action component. Business visibility is supplied by existing JS. */
#appView :is(.quick,.gf-actions){display:grid;grid-template-columns:repeat(auto-fit,minmax(96px,1fr));gap:8px}
#appView :is(.quick,.gf-actions)>button{margin:0;padding:9px 6px;min-height:78px;border:1px solid var(--line);border-radius:17px;background:var(--ds-surface-gradient),var(--panel);color:var(--text);box-shadow:var(--ds-shadow);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px}
#appView :is(.quick,.gf-actions)>button i{display:grid;place-items:center;width:34px;height:34px;border-radius:11px;background:var(--ds-selected);color:var(--accent);margin:0;border:0;font-style:normal}
#appView :is(.quick,.gf-actions)>button span{font-size:12px;line-height:1.4;font-weight:var(--ds-weight-label);color:var(--text)}
#appView :is(.quick,.gf-actions)>button:disabled{opacity:.5}
#appView #receiveQuick,#appView #gfActions [data-gf-new=deposit_iqd]{border-color:color-mix(in srgb,var(--accent) 42%,var(--line))}
#appView .publication-entry{min-height:58px;padding:10px 12px;margin-top:10px;border-radius:var(--ds-radius-card);background:var(--ds-surface-gradient),var(--panel);border:1px solid var(--line);box-shadow:var(--ds-shadow);gap:10px}
#appView .publication-entry-icon{width:34px;height:34px;flex:none;border-radius:11px;background:var(--ds-selected);color:var(--accent)}
#appView .publication-entry-copy b{font-size:15px}
#appView .publication-entry-copy small{font-size:12px;color:var(--muted);line-height:1.5}
#appView .publication-entry-arrow{display:grid;place-items:center;width:22px}
#appView .fund-activity{margin:10px 0 0;padding:12px}
#appView .fund-activity .section-head{margin:0 0 6px}
#appView .fund-activity h2{font-size:15px}
#appView .activity-row{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 0;min-width:0}
#appView .activity-row+.activity-row{border-top:1px solid var(--line)}
#appView .activity-row>div:first-child{min-width:0}
#appView .activity-row b{font-size:13px;font-weight:750;display:block}
#appView .activity-row time{display:block;font-size:11px;color:var(--muted);font-variant-numeric:tabular-nums}
#appView .activity-amounts{text-align:left;flex:none}
#appView .activity-amounts b{font-size:15px;white-space:nowrap}
#appView .activity-amounts small{font-size:10px;font-weight:650}
#appView .activity-empty{font-size:13px;color:var(--muted);margin:8px 0 0}
/* The existing Families identity shares dimensions and hierarchy. */
#appView:not(.general-fund-shell) #homeScreen .hero{background:var(--ds-family-hero);padding:14px;border-color:var(--family-edge)}
#appView #homeScreen .eyebrow{font-size:13px}
#appView #receivedCount{font-size:38px;line-height:1.15}
#appView #homeScreen .hero-foot{font-size:13px}
#appView #homeScreen .badge{font-size:12px;padding:6px 10px}
#appView #homeScreen .progress{margin-block:12px;height:9px}
#appView #homeScreen .grid4{gap:9px;margin-top:10px}
#appView #homeScreen .metric{padding:12px;min-height:96px}
#appView #homeScreen .metric>b{font-size:var(--ds-font-money);line-height:1.2;margin-block:8px 3px}
#appView #homeScreen .metric>span{font-size:13px}
#appView #homeScreen .metric>small{font-size:12px;color:var(--muted)}
#appView #homeScreen [data-prominence=primary]{border-color:var(--accent)!important;background:var(--family-hero);box-shadow:0 0 0 1px color-mix(in srgb,var(--accent) 16%,transparent),var(--ds-shadow)}
#appView #homeScreen [data-prominence=secondary]{opacity:.91}
#appView #homeScreen .metric[data-prominence=primary]>b{font-size:29px}
/* Home account selectors are neutral; only boxes use module identities. */
#appView.boxes-home-shell{padding:0 0 calc(12px + env(safe-area-inset-bottom))}
#appView.boxes-home-shell .topbar{padding-bottom:8px;border:0}
#appView.boxes-home-shell #globalAccountBtn{background:var(--panel);border-color:var(--line);color:var(--text);height:46px;min-height:46px;border-radius:var(--ds-radius-control);font-size:14px;box-shadow:var(--ds-shadow)}
#appView.boxes-home-shell #boxesScreen{min-height:calc(100dvh - 114px - env(safe-area-inset-top) - env(safe-area-inset-bottom))}
#appView.boxes-home-shell .boxes-account-section{margin-bottom:12px;padding-bottom:12px;border-color:var(--line)}
#appView.boxes-home-shell .boxes-accounts{gap:8px}
#appView.boxes-home-shell .home-account{padding:8px 12px;color:var(--text);background:var(--ds-surface-gradient),var(--panel);border-color:var(--line);border-radius:18px;box-shadow:var(--ds-shadow)}
#appView.boxes-home-shell .home-account-head{margin:0 0 4px}
#appView.boxes-home-shell .home-account-head h3{font-size:15px;color:var(--text)}
#appView.boxes-home-shell .home-account-person{width:28px;height:28px;background:var(--panel2);color:var(--muted);border-radius:9px}
#appView.boxes-home-shell .home-account-person svg{width:19px;height:19px}
#appView.boxes-home-shell .home-account-balances{padding:3px 0}
#appView.boxes-home-shell .home-account .home-currency-label{font-size:12px;color:var(--muted)}
#appView.boxes-home-shell .home-account .home-balance-value{font-size:clamp(20px,5.5vw,27px);line-height:1.25;color:var(--text)}
#appView.boxes-home-shell .home-account .home-currency-code{font-size:11px;color:var(--muted)}
#appView.boxes-home-shell .home-account.account-focused{border-color:var(--accent);background:var(--ds-selected);box-shadow:0 0 0 2px color-mix(in srgb,var(--accent) 18%,transparent),0 5px 20px var(--ds-glow)}
#appView.boxes-home-shell .home-account.account-focused .home-account-person{background:var(--ds-selected);color:var(--accent)}
#appView.boxes-home-shell .boxes-grid{gap:10px}
#appView.boxes-home-shell .box-card{min-height:150px;padding:12px;grid-template-columns:34px minmax(0,1fr);border-radius:var(--ds-radius-card);color:var(--fund-ink);border-color:var(--fund-line);background:var(--fund-panel);box-shadow:var(--ds-shadow);position:relative}
#appView.boxes-home-shell .box-theme-general{--fund-ink:var(--ds-neutral-text);--fund-panel:var(--ds-general-hero);--fund-line:var(--ds-teal-edge);--fund-accent:var(--ds-teal);--fund-icon:var(--ds-teal-soft);--fund-leaf:transparent;--fund-wash:var(--ds-glow)}
#appView.boxes-home-shell .box-theme-families{--fund-panel:var(--ds-family-hero)}
#appView.boxes-home-shell .box-card-active{border-color:var(--fund-accent);box-shadow:0 0 0 1px color-mix(in srgb,var(--fund-accent) 16%,transparent),0 7px 23px color-mix(in srgb,var(--fund-accent) 14%,transparent)}
#appView.boxes-home-shell .box-card-inactive{opacity:.62;box-shadow:none;border-color:color-mix(in srgb,var(--fund-line) 60%,transparent)}
#appView.boxes-home-shell .box-icon{width:34px;height:34px;background:var(--fund-icon);color:var(--fund-ink);border-radius:11px}
#appView.boxes-home-shell .box-icon svg{width:23px;height:23px}
#appView.boxes-home-shell .box-name{font-size:clamp(15px,4.2vw,18px);line-height:1.5;font-weight:750;letter-spacing:-.25px}
#appView.boxes-home-shell .box-balances{padding-top:8px;gap:7px;justify-content:space-around}
#appView.boxes-home-shell .box-balances .home-currency-label{font-size:12px;color:var(--fund-ink);opacity:.85}
#appView.boxes-home-shell .box-balances .home-balance-value,#appView.boxes-home-shell .box-balances .home-currency-iqd .home-balance-value{font-size:clamp(21px,5.5vw,27px);line-height:1.2;overflow-wrap:anywhere}
#appView.boxes-home-shell .box-balances .home-currency-code{font-size:11px;color:var(--fund-ink);opacity:.8}
#appView.boxes-home-shell :is(.box-coming-soon,.box-focus-label){font-size:12px;bottom:8px}
/* Shared lists: readable metadata, semantic money, quieter cancelled records. */
#appView .gf-row{padding:14px;margin-top:10px;border-radius:var(--ds-radius-card)}
#appView .gf-row-head{align-items:flex-start;gap:10px}
#appView .gf-row-head>b{font-size:15px}
#appView .gf-row time{font-size:12px;white-space:nowrap;color:var(--muted)}
#appView .gf-effects{gap:14px;margin:10px 0}
#appView .gf-effects span{font-size:13px;color:var(--muted)}
#appView .gf-effects b{font-size:24px;line-height:1.3;margin-top:3px}
#appView .gf-positive{color:var(--ds-positive)}
#appView .gf-negative{color:var(--ds-negative)}
#appView .gf-notes{font-size:14px;line-height:1.7;margin-block:8px}
#appView .gf-cancelled{opacity:.72;border-style:dashed;box-shadow:none;background:var(--panel2)}
#appView #gfCancelledEntry{margin-top:12px;color:var(--muted);background:var(--panel2)}
#appView :is(.received-fold,.manage-fold,.archive-disclosure,.central-settings-group)>summary{min-height:52px;padding:14px;font-size:15px;font-weight:750;line-height:1.6}
#appView .archive-disclosure{margin-block:10px;box-shadow:none}
#appView .archive-disclosure .archive-disclosure{border-radius:16px;background:var(--panel2)}
#appView .archive-disclosure-body{padding:12px}
#appView .archive-disclosure .daily-family-row{font-size:14px}
#appView .central-settings-group{margin-block:10px}
#appView .central-settings-group>.card{margin:10px;border-radius:16px;box-shadow:none}
#appView .settings-card>summary{padding:7px 0;min-height:44px;font-size:15px;font-weight:750;cursor:pointer;line-height:1.6}
#appView .settings-card[open]>summary{border-bottom:1px solid var(--line);margin-bottom:12px}
#appView .settings-profile h2{font-size:24px;margin-bottom:4px}
#appView .settings-profile p{margin:0;color:var(--muted);font-size:13px}
#appView .settings-link{gap:12px;min-height:58px}
#appView .settings-link-copy b{font-size:15px}
#appView .account-list-row{padding:12px;border-bottom:1px solid var(--line)}
#appView .account-list-row:last-child{border-bottom:0}
#appView .account-list-row b{font-size:15px}
#appView .account-list-row small{font-size:13px;line-height:1.7;color:var(--muted)}
#appView #accountForm .edit-check,#appView #notificationPreferences .edit-check{font-size:14px;border-radius:var(--ds-radius-control)}
#appView .inbox-actions{gap:8px;margin-block:8px 12px}
#appView .inbox-actions button{min-height:44px;font-size:13px}
#appView .notification-item{padding:14px;border-radius:var(--ds-radius-card);color:var(--text);background:var(--panel);border-color:var(--line);box-shadow:none}
#appView .notification-item p{font-size:14px;line-height:1.75}
#appView .notification-item small{font-size:12px;color:var(--muted);margin-top:8px}
#appView .notification-copy>b{font-size:15px;line-height:1.5;color:var(--text)}
#appView .notification-copy>span{font-size:14px;line-height:1.7;color:var(--muted)}
#appView .notification-item.unread .notification-copy>b{color:var(--accent)}
#appView .notification-item.unread .notification-dot{background:var(--accent);box-shadow:0 0 0 4px color-mix(in srgb,var(--accent) 12%,transparent)}
#appView .notification-item.unread{border-color:var(--accent);background:var(--ds-selected);box-shadow:0 0 14px var(--ds-glow)}
#appView .message-selection{margin-top:14px}
#appView .message-choice{padding:14px;gap:12px;min-height:64px;border-color:var(--line);background:var(--panel);transition:border-color .12s,background .12s}
#appView .message-choice:has(input:checked){border-color:var(--accent);background:var(--ds-selected);box-shadow:0 0 0 1px color-mix(in srgb,var(--accent) 14%,transparent)}
#appView .message-choice b{font-size:15px;font-weight:750}
#appView .message-choice small{font-size:12px;line-height:1.6;color:var(--muted)}
#appView .message-choice input[type=checkbox]{width:24px;height:24px;margin:0;accent-color:var(--accent)}
#appView .message-month-actions{gap:8px}
#appView .message-month{margin-top:16px}
/* Small screens remain scrollable; never clip financial controls to fit. */
@media(max-width:359px){
 :root{--ds-font-money:22px;--ds-font-title:18px}
 #appView main{padding-inline:12px}
 #appView .topbar{padding-inline:12px;gap:6px}
 #appView .topbar #boxesHomeBtn{min-width:80px}
 #appView .gf-summary{gap:8px}
 #appView .balance-line b,#appView .gf-summary>[data-prominence=primary] .balance-line b{font-size:22px}
 #appView .gf-account-safaa .balance-line b{font-size:24px}
 #appView .balance-heading h3{font-size:14px}
 #appView :is(.quick,.gf-actions){grid-template-columns:repeat(2,minmax(0,1fr))}
 #appView .gf-row-head{flex-wrap:wrap}
 #appView.boxes-home-shell .box-card{padding:10px;grid-template-columns:28px minmax(0,1fr);gap:5px}
 #appView.boxes-home-shell .box-icon{width:28px;height:28px}
 #appView.boxes-home-shell .box-name{font-size:14px}
 #appView.boxes-home-shell .home-account .home-balance-value{font-size:20px}
 #appView.boxes-home-shell .box-balances .home-balance-value,#appView.boxes-home-shell .box-balances .home-currency-iqd .home-balance-value{font-size:22px}
}
@media(max-height:740px){
 #appView .gf-summary .card{padding:10px}
 #appView .balance-heading{margin-bottom:6px}
 #appView .balance-line{margin-top:3px}
 #appView .balance-line+.balance-line{margin-top:4px;padding-top:4px}
 #appView :is(.quick,.gf-actions)>button{min-height:72px;padding-block:7px}
 #appView .publication-entry{min-height:54px;margin-top:8px}
 #appView.boxes-home-shell .box-card{min-height:138px}
}
@media(prefers-reduced-motion:reduce){
 #appView :is(.home-account,.message-choice,.progress i){transition:none}
}
/* Home density: keep the amounts, touch targets and complete activity page. */
#appView .gf-summary .card{padding:10px}
#appView .balance-heading{margin-bottom:5px}
#appView .balance-icon{width:28px;height:28px;border-radius:9px}
#appView .balance-icon svg{width:19px;height:19px}
#appView .balance-line{padding:0;margin-top:3px}
#appView .balance-line span{line-height:1.25}
#appView .balance-line b,#appView .gf-summary>[data-prominence=primary] .balance-line b{font-size:24px;line-height:1.15;margin-top:2px}
#appView .balance-line+.balance-line{padding-top:5px;margin-top:5px}
#appView .gf-summary>.gf-account-card[data-prominence=primary] .balance-line b{font-size:26px}
#appView :is(.balance-line,.balance-cell) b{white-space:normal;overflow-wrap:anywhere}
#appView #gfActions>button{min-height:68px;gap:5px;padding:7px 5px}
#appView #gfActions>button i{width:28px;height:28px;border-radius:9px}
#appView #gfActions>button i svg{width:20px;height:20px}
#appView .quick{grid-template-columns:repeat(4,minmax(0,1fr))}
body[data-ui-role=operator] #appView .quick{grid-template-columns:repeat(2,minmax(0,1fr))}
#appView .home-destinations{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:10px}
#appView .home-destinations .publication-entry{margin:0;min-height:54px;gap:8px;padding:8px 10px}
#appView .home-destinations .publication-entry-copy small{display:none}
#appView .home-destinations .publication-entry-copy b{font-size:14px;line-height:1.4}
#appView .home-destinations .publication-entry-icon{width:28px;height:28px}
#appView .home-destinations .publication-entry-icon svg{width:19px;height:19px}
#appView .fund-activity{padding:8px 12px}
#appView .fund-activity .section-head{margin-bottom:0}
#appView .fund-activity .activity-row{padding:3px 0 7px}
#appView .activity-amounts b{font-size:14px;line-height:1.4}
@media(max-width:359px){
 #appView .quick{grid-template-columns:repeat(2,minmax(0,1fr))}
 #appView .balance-line b,#appView .gf-summary>[data-prominence=primary] .balance-line b{font-size:22px}
 #appView .gf-summary>.gf-account-card[data-prominence=primary] .balance-line b{font-size:22px}
 #appView .home-destinations .publication-entry{gap:6px;padding-inline:8px}
 #appView .home-destinations .publication-entry-copy b{font-size:13px}
}

/* Boxes 1.3.10: scoped UX corrections, preserving the 1.3.9 design tokens. */
body:has(#appView) #publicationModal .publication-sheet{
 display:grid;grid-template-rows:auto auto auto minmax(0,1fr) auto;gap:10px;
 height:min(82dvh,760px);max-height:calc(100dvh - env(safe-area-inset-top) - 16px);
 min-height:0;overflow:hidden;padding:10px 16px calc(16px + env(safe-area-inset-bottom));
}
body:has(#appView) #publicationModal .grab{margin:0 auto;height:5px}
body:has(#appView) #publicationModal .modal-head{margin:0;min-height:36px}
body:has(#appView) #publicationModal .publication-modal-meta{margin:0;max-height:70px;overflow-y:auto}
body:has(#appView) #publicationModal .publication-text{
 height:100%;min-height:0;max-height:none;margin:0;width:100%;padding:14px;
 resize:none;overflow-y:auto;overscroll-behavior:contain;line-height:1.85;white-space:pre-wrap;
}
body:has(#appView) #publicationModal .publication-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;background:var(--panel);padding-top:8px;border-top:1px solid var(--line)}
body:has(#appView) #publicationModal .publication-actions button{margin:0;min-height:48px;font-size:15px}
body:has(#appView) #publicationModal .publication-copy-status{grid-column:1/-1;margin:0;min-height:0}
/* Explicit user decision: copying read-only text is available to Viewers. */
body.board-observer #publicationModal #copyPublication{display:block!important}
#appView [data-message-root].selecting .message-new,#appView [data-message-root].selecting .message-month{display:none}
#appView .message-flow-header{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}
#appView .message-flow-back{display:flex;align-items:center;gap:8px}
#appView .message-selected-count{font-size:13px;color:var(--muted)}
#appView .message-preview-action{
 position:fixed;bottom:calc(var(--ds-nav-height) + env(safe-area-inset-bottom) + 4px);
 inset-inline:16px;max-width:648px;margin-inline:auto;z-index:42;background:var(--panel);
 padding:10px;border:1px solid var(--line);border-radius:var(--ds-radius-card);box-shadow:var(--ds-shadow);
}
#appView .message-preview-action button{margin:0;min-height:48px}
body.message-selecting #appView{padding-bottom:calc(var(--ds-nav-height) + env(safe-area-inset-bottom) + 110px)}
body.message-selecting #appView :is(#publicationScreen,#generalPublicationsScreen)>p{display:none}
body.message-selecting #appView :is(#publicationScreen,#generalPublicationsScreen)>.screen-back-row{display:none}
body.message-selecting #appView #publicationScreen>.op-head{display:none}
#appView .message-status{font-size:14px;line-height:1.6}
#appView .screen-back-row{display:flex;margin:4px 0 12px}
#appView .screen-back-row button{display:flex;align-items:center;gap:8px;font-size:14px;min-height:44px}
#appView .boxes-overview{display:flex;justify-content:flex-start;margin-bottom:8px}
#appView #boxesOverall{width:auto;min-height:44px;margin:0;padding:8px 14px;font-size:13px}
#appView #boxesOverall.on{border-color:var(--accent);background:var(--ds-selected);color:var(--accent)}
#appView.boxes-home-shell .boxes-overview:has(#boxesOverall.hidden){display:none}
#appView.boxes-home-shell .home-account-balances{grid-template-columns:repeat(auto-fit,minmax(90px,1fr))}
#appView .operational-actions{grid-template-columns:repeat(4,minmax(0,1fr));margin:10px 0 16px;align-items:start}
#appView .operational-actions>button,#appView .operational-menu>summary{min-height:84px;font-size:12px}
#appView .operational-menu{position:relative;min-width:0}
#appView .operational-menu>summary{
 display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;padding:9px 6px;
 border:1px solid var(--line);border-radius:17px;background:var(--ds-surface-gradient),var(--panel);box-shadow:var(--ds-shadow);cursor:pointer;
}
#appView .operational-menu>summary::-webkit-details-marker{display:none}
#appView .operational-menu>summary i{display:grid;place-items:center;width:34px;height:34px;border-radius:11px;background:var(--ds-selected);color:var(--accent)}
#appView .operational-menu>summary span{font-size:12px;font-weight:var(--ds-weight-label)}
#appView .operational-options{position:absolute;top:calc(100% + 6px);inset-inline-start:0;width:min(220px,70vw);z-index:12;background:var(--panel);padding:8px;border-radius:14px;border:1px solid var(--line);box-shadow:var(--ds-shadow)}
#appView .operational-options button{margin:0 0 6px;font-size:14px}
body[data-ui-role=operator] #appView .operational-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
@media(max-width:359px){#appView .operational-actions{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Boxes 1.3.11: in-flow balance rows and labels; no financial behavior changes. */
#appView.boxes-home-shell .boxes-grid{grid-template-rows:repeat(2,minmax(min-content,1fr))}
#appView.boxes-home-shell .box-card{grid-template-rows:auto minmax(min-content,1fr) auto;row-gap:8px;min-width:0}
#appView.boxes-home-shell .box-card-top{grid-column:1;grid-row:1}
#appView.boxes-home-shell .box-name{grid-column:2;grid-row:1;min-width:0}
#appView.boxes-home-shell .box-balances{
 grid-column:1/-1;grid-row:2;display:grid;grid-template-columns:minmax(0,1fr);
 grid-auto-rows:minmax(min-content,auto);align-content:space-evenly;justify-content:normal;
 gap:8px;margin:0;min-width:0;
}
#appView.boxes-home-shell .box-balances .home-currency{
 position:static;display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto;
 column-gap:6px;row-gap:3px;align-items:baseline;min-height:48px;min-width:0;
}
#appView.boxes-home-shell .box-balances .home-currency-label{
 grid-column:1;grid-row:1;min-height:17px;min-width:0;line-height:1.4;
}
#appView.boxes-home-shell .box-balances .home-currency-code{
 grid-column:2;grid-row:1;align-self:baseline;direction:ltr;white-space:nowrap;line-height:1.4;
}
#appView.boxes-home-shell .box-balances .home-balance-value,
#appView.boxes-home-shell .box-balances .home-currency-iqd .home-balance-value{
 grid-column:1/-1;grid-row:2;min-width:0;max-width:100%;font-size:clamp(19px,5.5vw,27px);
 line-height:1.3;white-space:normal;overflow-wrap:anywhere;
}
#appView.boxes-home-shell :is(.box-coming-soon,.box-focus-label){
 position:static;inset:auto;grid-column:1/-1;grid-row:3;align-self:end;
 margin:0;min-height:17px;line-height:1.4;white-space:normal;text-align:right;
}

.boxes-report-button{display:flex;align-items:center;justify-content:center;gap:9px;width:100%;margin-top:14px;min-height:46px;font-size:16px}
.boxes-report-button .ui-icon{width:21px;height:21px;flex:0 0 21px}

/* Equal shared action cards, including the deposit menu trigger. */
#appView :is(.quick,.gf-actions,#gfActions){align-items:stretch;grid-auto-rows:104px}
#appView :is(.quick,.gf-actions,#gfActions)>button,
#appView :is(.quick,.gf-actions,#gfActions)>.operational-menu>summary{
 box-sizing:border-box;width:100%;height:104px;min-height:104px;max-height:104px;
 margin:0;padding:10px 6px;border-radius:17px;display:flex;flex-direction:column;
 align-items:center;justify-content:center;gap:8px;min-width:0;
}
#appView :is(.quick,.gf-actions,#gfActions)>.operational-menu{height:104px;min-width:0}
#appView :is(.quick,.gf-actions,#gfActions)>button i,
#appView :is(.quick,.gf-actions,#gfActions)>.operational-menu>summary i{
 box-sizing:border-box;width:34px;height:34px;min-width:34px;min-height:34px;
 flex:0 0 34px;margin:0;border-radius:11px;display:grid;place-items:center;
}
#appView :is(.quick,.gf-actions,#gfActions)>button i svg,
#appView :is(.quick,.gf-actions,#gfActions)>.operational-menu>summary i svg{width:20px;height:20px}
#appView :is(.quick,.gf-actions,#gfActions)>button>span,
#appView :is(.quick,.gf-actions,#gfActions)>.operational-menu>summary>span{
 box-sizing:border-box;width:100%;height:34px;min-height:34px;flex:0 0 34px;
 display:grid;align-content:center;text-align:center;font-size:12px;line-height:17px;
 white-space:normal;word-break:normal;overflow-wrap:normal;
}
#appView .families-report-entry{display:flex}

/* Fixed Families positions retain role highlighting without sorting the cards. */
#appView #homeScreen .grid4>.metric{order:0;min-width:0}
#appView #homeScreen .grid4>.metric:nth-child(1){grid-row:1;grid-column:1}
#appView #homeScreen .grid4>.metric:nth-child(2){grid-row:1;grid-column:2}
#appView #homeScreen .grid4>.metric:nth-child(3){grid-row:2;grid-column:1}
#appView #homeScreen .grid4>.metric:nth-child(4){grid-row:2;grid-column:2}

#gfCancelledCleanup{display:flex;align-items:center;justify-content:center;gap:10px;margin-bottom:12px;min-height:48px}

/* One shared bell and a compact central inbox; existing module palettes remain. */
#appView .topbar #notifyBtn{width:44px;height:44px;flex:none}
#appView .inbox-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:12px}
#appView .inbox-filters>div{min-width:0}
#appView #inboxMore{margin-top:12px}
#deleteReceipt{margin-top:12px;min-height:48px}

/* Shared financial semantics are independent of each box's identity. */
:root{
 --tx-incoming-bg:rgba(27,49,38,.94);--tx-incoming-border:#477759;--tx-incoming-accent:#a1e0bc;
 --tx-transfer-bg:rgba(51,43,29,.94);--tx-transfer-border:#8b7545;--tx-transfer-accent:#f2d393;
 --tx-exchange-bg:rgba(44,35,56,.94);--tx-exchange-border:#806999;--tx-exchange-accent:#d5b9f4;
 --tx-payout-bg:rgba(53,35,39,.94);--tx-payout-border:#a46775;--tx-payout-accent:#ffb0ba;
 --tx-neutral-bg:rgba(36,42,46,.94);--tx-neutral-border:#697780;--tx-neutral-accent:#c2cbd2;
 --tx-text:#f3f6f5;--tx-muted:#c0cbc8;--tx-accent-text:#15201a;
}
body.light{
 --tx-incoming-bg:#edf6f0;--tx-incoming-border:#91b39c;--tx-incoming-accent:#236744;
 --tx-transfer-bg:#faf3e4;--tx-transfer-border:#c6ac77;--tx-transfer-accent:#79551b;
 --tx-exchange-bg:#f3eef9;--tx-exchange-border:#b2a0c7;--tx-exchange-accent:#6c438e;
 --tx-payout-bg:#faeef0;--tx-payout-border:#cda0a8;--tx-payout-accent:#a23847;
 --tx-neutral-bg:#f1f3f4;--tx-neutral-border:#adb7bc;--tx-neutral-accent:#53616b;
 --tx-text:#24352e;--tx-muted:#516059;--tx-accent-text:#fff;
}
#appView [data-tx-semantic="incoming"]{--tx-bg:var(--tx-incoming-bg);--tx-border:var(--tx-incoming-border);--tx-accent:var(--tx-incoming-accent)}
#appView [data-tx-semantic="transfer"]{--tx-bg:var(--tx-transfer-bg);--tx-border:var(--tx-transfer-border);--tx-accent:var(--tx-transfer-accent)}
#appView [data-tx-semantic="exchange"]{--tx-bg:var(--tx-exchange-bg);--tx-border:var(--tx-exchange-border);--tx-accent:var(--tx-exchange-accent)}
#appView [data-tx-semantic="payout"]{--tx-bg:var(--tx-payout-bg);--tx-border:var(--tx-payout-border);--tx-accent:var(--tx-payout-accent)}
#appView [data-tx-semantic="neutral"]{--tx-bg:var(--tx-neutral-bg);--tx-border:var(--tx-neutral-border);--tx-accent:var(--tx-neutral-accent)}
#appView [data-tx-semantic]{background:var(--tx-bg);border-color:var(--tx-border);color:var(--tx-text);box-shadow:none}
#appView [data-tx-semantic] :is(.rowtitle,.gf-row-head>b,.activity-row>div>b){color:var(--tx-text)}
#appView [data-tx-semantic] :is(.money b,.gf-effects b,.activity-amounts b,.gf-negative,.gf-positive){color:var(--tx-accent)}
#appView [data-tx-semantic] :is(.rowsub,.rowbeneficiary,.money small,.gf-effects span,.gf-details,.gf-notes,time,small){color:var(--tx-muted);opacity:1}
#appView [data-tx-semantic] :is(.linkbtn,.manage-btn){color:var(--tx-accent)}
#appView [data-tx-semantic] .num{background:color-mix(in srgb,var(--tx-accent) 9%,var(--tx-bg));color:var(--tx-accent);border:1px solid var(--tx-border)}
#appView [data-tx-semantic] .tx-kind{display:inline-flex;align-items:center;gap:6px;max-width:100%;width:fit-content;padding:4px 8px;margin-block:7px 0;border:1px solid var(--tx-border);border-radius:10px;background:color-mix(in srgb,var(--tx-accent) 8%,var(--tx-bg));color:var(--tx-accent);font-size:12px;font-weight:700;line-height:1.5}
#appView [data-tx-semantic] .tx-kind span{color:inherit;font-size:inherit;line-height:inherit}
#appView [data-tx-semantic] .tx-kind svg{width:16px;height:16px;flex:0 0 16px}
#appView :is(.gf-row,.activity-row)[data-tx-semantic]>.tx-kind{margin-block:0 10px}
#appView [data-tx-semantic].picked{border-color:var(--tx-accent);box-shadow:0 0 0 2px color-mix(in srgb,var(--tx-accent) 22%,transparent)}
#appView [data-tx-semantic] .opcheck{border-color:var(--tx-border)}
#appView [data-tx-semantic].picked .opcheck{background:var(--tx-accent);border-color:var(--tx-accent);color:var(--tx-accent-text)}
#appView [data-tx-semantic][data-tx-cancelled]{opacity:1;border-style:dashed;box-shadow:none}
#appView .fund-activity .activity-row[data-tx-semantic]{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;padding:10px;border:1px solid var(--tx-border);border-radius:14px}
#appView .activity-row[data-tx-semantic]>.tx-kind{grid-column:1/-1;margin-block:0}
#appView .activity-row[data-tx-semantic]>div{min-width:0}

/* Families operational cards: approved compact status/timeline layout, shared semantic tokens. */
:is(#listScreen,#fxScreen) .family-primary-filter{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;border:1px solid var(--line);border-radius:14px;padding:4px;margin-bottom:14px;background:var(--panel)}
:is(#listScreen,#fxScreen) .family-primary-filter button{min-width:0;min-height:42px;border:1px solid transparent;border-radius:10px;background:transparent;color:var(--text);padding:7px 4px;font-size:13px;line-height:1.4}
:is(#listScreen,#fxScreen) .family-primary-filter button.on{background:var(--tx-neutral-bg);border-color:var(--tx-neutral-border);color:var(--tx-neutral-accent)}
:is(#listScreen,#fxScreen) .family-operational-list{display:grid;gap:9px}
#appView :is(#listScreen,#fxScreen) .family-journey-card{border:1px solid var(--tx-border);border-radius:15px;background:var(--tx-bg);overflow:hidden;color:var(--tx-text)}
:is(#listScreen,#fxScreen) .family-journey-head{list-style:none;display:grid;grid-template-columns:32px minmax(0,1fr) 22px;column-gap:9px;row-gap:8px;align-items:start;padding:12px;cursor:pointer}
:is(#listScreen,#fxScreen) .family-journey-head::-webkit-details-marker{display:none}
:is(#listScreen,#fxScreen) .family-serial{display:grid;place-items:center;min-height:32px;border:1px solid var(--tx-border);border-radius:10px;font-size:15px;font-weight:800;background:var(--panel);color:var(--tx-accent)}
:is(#listScreen,#fxScreen) .family-identity{min-width:0;display:grid;gap:3px}
:is(#listScreen,#fxScreen) .family-identity>b{font-size:16px;line-height:1.45;overflow-wrap:anywhere;color:var(--tx-text)}
:is(#listScreen,#fxScreen) .family-identity .rowbeneficiary{color:var(--tx-muted);font-size:11px;line-height:1.6;white-space:normal;overflow-wrap:anywhere}
:is(#listScreen,#fxScreen) .family-expand-icon{width:20px;height:20px;margin-top:5px;color:var(--tx-accent);transition:transform .15s}
:is(#listScreen,#fxScreen) .family-journey-card[open] .family-expand-icon{transform:rotate(180deg)}
:is(#listScreen,#fxScreen) .family-state-line{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:7px;min-width:0}
:is(#listScreen,#fxScreen) .family-current-amount{margin-inline-start:auto;flex-shrink:0;font-size:17px;font-weight:800;line-height:1.5;white-space:nowrap;font-variant-numeric:tabular-nums;color:var(--tx-accent)}
:is(#listScreen,#fxScreen) .family-status-chips{display:flex;flex-wrap:wrap;align-items:center;gap:4px;min-width:0;max-width:100%}
#appView :is(#listScreen,#fxScreen) .family-status-chip{display:inline-flex;align-items:center;gap:3px;padding:3px 5px;margin:0;border:1px solid var(--tx-border);border-radius:7px;color:var(--tx-accent);font-size:10.5px;font-weight:700;line-height:1.55;max-width:100%;min-width:0;box-shadow:none}
:is(#listScreen,#fxScreen) .family-status-chip svg{width:12px;height:12px;flex:0 0 12px}
:is(#listScreen,#fxScreen) .family-status-chip span{overflow-wrap:anywhere;color:inherit}
:is(#listScreen,#fxScreen) .family-journey-body{padding:0 12px 12px;border-top:1px solid var(--tx-border)}
:is(#listScreen,#fxScreen) .family-journey-body>h3{font-size:13px;line-height:1.6;margin:12px 0 7px;color:var(--tx-text)}
:is(#listScreen,#fxScreen) .family-journey-body>p{font-size:12px;line-height:1.7;color:var(--tx-muted)}
:is(#listScreen,#fxScreen) .family-timeline{position:relative;display:grid;gap:0}
:is(#listScreen,#fxScreen) .family-timeline:before{content:"";position:absolute;inset-inline-start:16px;top:20px;bottom:24px;width:1px;background:var(--line);pointer-events:none}
#appView :is(#listScreen,#fxScreen) .family-log-event{position:relative;display:grid;grid-template-columns:34px minmax(0,1fr) auto;gap:8px;align-items:start;width:100%;border:0;border-radius:0;padding:11px 0;text-align:right;min-width:0;font-size:12px;background:transparent;box-shadow:none;min-height:44px}
:is(#listScreen,#fxScreen) .family-log-event+.family-log-event{border-top:1px solid var(--line)}
:is(#listScreen,#fxScreen) .family-event-icon{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;border:1px solid var(--tx-border);background:var(--tx-bg);position:relative}
:is(#listScreen,#fxScreen) .family-event-icon svg{width:18px;height:18px;color:var(--tx-accent)}
:is(#listScreen,#fxScreen) .family-event-copy{min-width:0;display:grid;gap:3px}
:is(#listScreen,#fxScreen) .family-event-copy>b{font-size:13px;line-height:1.6;color:var(--tx-text);overflow-wrap:anywhere}
:is(#listScreen,#fxScreen) .family-event-copy :is(time,small){font-size:11px;line-height:1.6;color:var(--tx-muted);overflow-wrap:anywhere}
:is(#listScreen,#fxScreen) .family-event-amount{font-size:12px;line-height:1.6;font-variant-numeric:tabular-nums;color:var(--tx-accent);white-space:nowrap}
:is(#listScreen,#fxScreen) .family-event-action{display:inline-flex;align-items:center;gap:3px;align-self:center;border:1px solid var(--tx-border);background:var(--panel);border-radius:8px;padding:6px;color:var(--tx-accent);font-size:11px;font-weight:700}
:is(#listScreen,#fxScreen) .family-event-action svg{width:13px;height:13px}
:is(#listScreen,#fxScreen) .family-record-receipt{width:100%;margin-top:8px;min-height:44px}
:is(#listScreen,#fxScreen) .family-journey-head:focus-visible,:is(#listScreen,#fxScreen) .family-log-event:focus-visible{outline:2px solid var(--tx-neutral-accent);outline-offset:-3px}
@media(max-width:360px){:is(#listScreen,#fxScreen) .family-journey-head{column-gap:7px;padding:10px}:is(#listScreen,#fxScreen) .family-identity>b{font-size:15px}:is(#listScreen,#fxScreen) .family-current-amount{font-size:16px}:is(#listScreen,#fxScreen) .family-status-chip{font-size:10px}:is(#listScreen,#fxScreen) .family-log-event{gap:6px}:is(#listScreen,#fxScreen) .family-event-action{padding:5px}}

/* Complete light/dark identity tokens; transaction semantics remain global. */
[data-box-theme]{--box-hue:173;--box-panel:hsl(var(--box-hue) 20% 15%);--box-border:hsl(var(--box-hue) 24% 34%);--box-ink:hsl(var(--box-hue) 35% 88%);--box-accent:hsl(var(--box-hue) 36% 70%);--box-soft:hsl(var(--box-hue) 20% 22%)}
body.light [data-box-theme]{--box-panel:hsl(var(--box-hue) 34% 96%);--box-border:hsl(var(--box-hue) 26% 75%);--box-ink:hsl(var(--box-hue) 35% 20%);--box-accent:hsl(var(--box-hue) 42% 30%);--box-soft:hsl(var(--box-hue) 26% 88%)}
[data-box-theme="aqua"]{--box-hue:195}[data-box-theme="cobalt"]{--box-hue:216}[data-box-theme="emerald"]{--box-hue:150}[data-box-theme="teal"]{--box-hue:173}[data-box-theme="indigo"]{--box-hue:242}[data-box-theme="plum"]{--box-hue:318}[data-box-theme="amber"]{--box-hue:38}[data-box-theme="copper"]{--box-hue:22}
.box-card[data-box-theme]:not(.box-theme-families){background:linear-gradient(145deg,var(--box-soft),var(--box-panel));border-color:var(--box-border);color:var(--box-ink)}
.general-fund-shell[data-box-theme] .app-head{border-color:var(--box-border)}
.box-manager-row{display:grid;gap:14px;margin-block:14px}.box-manager-row>div:first-child{display:flex;align-items:center;flex-wrap:wrap;gap:12px}.box-manager-row small{flex-basis:100%}.box-manager-controls{display:flex;flex-wrap:wrap;gap:8px}.box-manager-controls button{min-height:44px;width:auto;padding:8px 14px}
.box-wizard-controls{display:flex;flex-wrap:wrap;gap:10px;margin-block:18px}.box-wizard-controls button{flex:1;min-width:85px;min-height:48px}.box-wizard-preview{background:var(--box-soft);border:1px solid var(--box-border);color:var(--box-accent);border-radius:18px;padding:20px;margin-block:14px}.box-wizard-preview svg{width:52px;height:52px}
#boxWizardBody .edit-check{padding:12px;min-height:48px}#boxWizardBody fieldset{min-width:0}#boxWizardBody input:not([type="checkbox"]),#boxWizardBody textarea,#boxWizardBody select{width:100%;box-sizing:border-box;min-width:0;font-size:16px}#boxWizardBody input[type="checkbox"]{width:22px;height:22px;margin-inline:8px}
#gfDynamicSummary .balance-line{display:flex;flex-wrap:wrap;gap:10px}#gfDynamicSummary .balance-line b{font-size:clamp(22px,6vw,32px);overflow-wrap:anywhere}#gfDynamicSummary .balance-line small{flex-basis:100%}
#boxManagerScreen,#boxWizardScreen{padding-bottom:calc(32px + env(safe-area-inset-bottom))}#gfActions svg{width:22px;height:22px}#gfDestinationWrap{margin-bottom:16px}

.general-fund-shell[data-box-theme]:not([data-box-theme="teal"]) .topbar{border-color:var(--box-border)}
.general-fund-shell[data-box-theme]:not([data-box-theme="teal"]) .topbar h1{color:var(--box-accent)}
.general-fund-shell[data-box-theme]:not([data-box-theme="teal"]) .gf-account-card,.general-fund-shell[data-box-theme]:not([data-box-theme="teal"]) .home-destinations .publication-entry{background:var(--box-panel);border-color:var(--box-border);color:var(--box-ink)}
.box-card[data-box-theme]:not(.box-theme-families){--fund-ink:var(--box-ink);--fund-panel:var(--box-panel);--fund-line:var(--box-border);--fund-accent:var(--box-accent);--fund-icon:var(--box-soft)}

#gfDynamicSummary:has(.gf-account-card:only-child){grid-template-columns:1fr}

/* Optional account/original-receiver filters share the existing compact controls. */
.operational-person-filters{display:flex;flex-wrap:wrap;gap:8px;margin-block:12px;direction:rtl}
.operational-person-filters button{width:auto;min-height:44px;padding:8px 16px;border:1px solid var(--line);border-radius:12px;background:var(--panel);color:var(--muted);font-size:14px}
.operational-person-filters button.on{color:var(--accent);border-color:var(--accent);background:var(--panel2)}
.family-log-navigation{justify-content:space-between}
.family-trace-card{position:relative;display:grid;gap:9px;min-width:0;margin-block:12px}
.family-trace-card :is(p,h3){margin:0}.family-log-identity{display:grid;gap:4px}.family-log-identity>b{font-size:17px;overflow-wrap:anywhere}.family-log-identity>span{font-size:12px;color:var(--muted)}
.family-trace-amount{font-size:21px;color:var(--tx-accent);font-variant-numeric:tabular-nums;justify-self:start}.family-trace-cancelled{opacity:.72}
.family-trace-card .record-action{justify-self:start;min-height:44px;margin-top:4px}.family-trace-card .gf-row-head{gap:10px;flex-wrap:wrap}.family-trace-card time{font-size:12px}
.ledger-balance{background:var(--panel);border-color:var(--line);color:var(--text);margin-block:16px}
.ledger-balance h3{margin:0 0 12px;font-size:17px}.ledger-balance-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(180px,100%),1fr));gap:14px}
.ledger-balance-grid>div{display:grid;gap:6px;min-width:0}.ledger-balance-grid span{font-size:12px;color:var(--muted);overflow-wrap:anywhere}.ledger-balance-grid b{font-size:19px;overflow-wrap:anywhere;font-variant-numeric:tabular-nums;justify-self:start}.ledger-balance-grid small{font-size:11px;color:var(--muted)}
.ledger-month{min-width:0}.ledger-month-separator{font-size:17px;margin-block:24px 12px;padding-block:12px;border-block:1px solid var(--line);color:var(--muted)}
.ledger-previous{width:100%;min-height:52px;margin-top:16px}.ledger-history-end{text-align:center;font-size:12px}.gf-transfer-direction{font-size:13px;color:var(--muted);overflow-wrap:anywhere}


/* v1.4.2: scoped corrective presentation; approved glass elsewhere is retained. */
#appView .topbar{background:var(--bg);backdrop-filter:none;-webkit-backdrop-filter:none}
#appView :is(#listScreen,#fxScreen) .family-journey-card.family-quiet{background:#232930;border-color:#505e6b;color:var(--tx-text)}
#appView :is(#listScreen,#fxScreen) .family-journey-card[data-current-semantic="incoming"]{background:#203b2c;border-color:#719b7f}
body.light #appView :is(#listScreen,#fxScreen) .family-journey-card.family-quiet{background:#f0f3f7;border-color:#b9c3cd}
body.light #appView :is(#listScreen,#fxScreen) .family-journey-card[data-current-semantic="incoming"]{background:#e3f1e8;border-color:#7aa78a}
#appView :is(#listScreen,#fxScreen) .family-journey-card[data-family-owner-emphasis="true"]{box-shadow:0 0 0 2px color-mix(in srgb,var(--tx-accent) 23%,transparent),0 3px 12px color-mix(in srgb,var(--tx-accent) 9%,transparent)}
#appView .family-trace-card{display:block;padding:0;margin-block:9px;min-width:0;text-align:start;font:inherit;width:100%;border-radius:15px;overflow:hidden}
#appView .family-trace-summary,#appView button.family-trace-card{padding:11px 13px;cursor:pointer;list-style:none;display:grid;gap:7px;min-width:0}
#appView .family-trace-summary::-webkit-details-marker{display:none}
.family-trace-title{display:flex;align-items:center;justify-content:space-between;gap:8px;color:var(--tx-accent);font-size:13px;line-height:1.4}
.family-trace-chevron{width:17px;height:17px;flex:none}
details[open]>.family-trace-summary .family-trace-chevron{transform:rotate(180deg)}
.family-trace-person{display:flex;align-items:baseline;justify-content:space-between;gap:8px;min-width:0}
.family-trace-person>b{font-size:15px;line-height:1.5;overflow-wrap:anywhere}
.family-trace-person>small{flex:none;font-size:11px;color:var(--tx-muted)}
.family-trace-meta{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:4px 10px;min-width:0}
#appView .family-trace-meta .family-trace-amount{font-size:17px;line-height:1.5;overflow-wrap:anywhere}
.family-trace-meta time{font-size:11px;color:var(--tx-muted)}
.family-trace-details{padding:12px 13px;border-top:1px solid var(--tx-border);font-size:13px;line-height:1.7}
.family-trace-details dl{display:grid;gap:8px;margin:0}
.family-trace-details dl>div{display:grid;grid-template-columns:minmax(70px,1fr) minmax(0,2fr);gap:10px}
.family-trace-details dt{color:var(--tx-muted)}
.family-trace-details dd{margin:0;overflow-wrap:anywhere}
.family-trace-details .record-action{margin-top:12px}
.family-trace-summary:focus-visible,button.family-trace-card:focus-visible{outline:2px solid var(--tx-accent);outline-offset:-3px}
#appView [data-financial-new] .financial-action-icon{color:var(--box-accent,var(--accent));background:var(--box-soft,var(--panel2));width:34px;height:34px;display:grid;place-items:center;border-radius:11px;flex:none}
@media(max-width:359px){.family-trace-person{flex-wrap:wrap;gap:2px 8px}}

/* Capability-count layout shared by all financial boxes; no role-specific grid. */
#appView .financial-actions-adaptive,#appView .quick.financial-actions-adaptive{grid-template-columns:repeat(var(--financial-action-columns,2),minmax(0,1fr));grid-auto-rows:104px}
#appView .financial-actions-adaptive.financial-primary-wide>button:first-child{grid-column:1/-1}
#appView .financial-actions-adaptive>button{min-width:0;height:104px}
#appView .financial-actions-adaptive>button>span{overflow-wrap:anywhere}
#appearanceToggle{flex:none}
#notificationPreferences>.edit-check{margin-block:8px}
body.board-observer #appView [data-theme-choice]{display:inline-flex!important}

/* Shared explicit 12-hour input; preserves the financial form's canonical ISO value. */
.boxes-datetime{width:100%;min-width:0;margin-bottom:14px}.boxes-datetime>input{width:100%;min-width:0;box-sizing:border-box;margin-bottom:8px}.boxes-clock{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr) auto minmax(0,1fr) minmax(90px,1.5fr);align-items:center;gap:5px}.boxes-clock select{min-width:0;width:100%;height:48px;padding:8px 4px;font-size:16px;text-align:center;margin:0}.boxes-datetime output{display:block;font-size:13px;color:var(--muted);padding-top:6px;text-align:right;font-variant-numeric:tabular-nums}.family-trace-meta time{max-width:100%;white-space:normal;overflow-wrap:normal}.gf-row-head time{white-space:normal;overflow-wrap:normal}

/* Shared date/time hierarchy; native timestamps remain authoritative. */
.boxes-date-time{font-weight:400;line-height:1.5}.boxes-date-time strong{font-weight:650}.boxes-time-separator{font-weight:400;opacity:.75}

/* Compact amounts from immutable central event metadata, never inferred from body text. */
.notice-heading{display:flex;justify-content:space-between;align-items:baseline;gap:10px}.notice-heading>small{flex:none}.notification-copy{min-width:0}.notice-financial{display:block;margin-block:5px}.notice-amount{display:block;font-size:20px;line-height:1.45;font-weight:750;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.notice-amount bdi{white-space:nowrap}.notice-change{display:block;font-size:14px;line-height:1.65;margin-top:7px}.notice-change.hidden{display:none}.notification-copy>small,.notice-financial>small{display:block}.push-actions{display:flex;flex-wrap:wrap;gap:8px}.push-actions button{min-height:44px}
#appView .notification-copy{gap:3px}#appView .notification-copy small{margin-top:2px;font-size:12px;line-height:1.45}#appView .notification-copy .notice-heading>b{font-size:15px;line-height:1.45}#appView .notification-copy .notice-financial{margin-block:3px}#appView .notice-amount{color:var(--text);line-height:1.4}#appView .notice-change{line-height:1.5}#appView .notice-heading>small{margin:0}.notice-money-pair{direction:ltr;unicode-bidi:isolate;display:inline}

/* Current-device controls in the central Notifications settings section. */
#pushDeviceSection #pushStatus{font-size:15px;font-weight:650;color:var(--text);line-height:1.6}#pushDeviceSection .push-actions button{font-size:14px;line-height:1.5;min-height:44px;white-space:normal;max-width:100%}

.push-diagnostic{padding-block:12px;border-bottom:1px solid var(--line);display:grid;gap:5px;overflow-wrap:anywhere}.push-diagnostic small,.push-diagnostic time{font-size:12px;line-height:1.6;color:var(--muted)}

/* Shared compact operational card master. Only card-local semantic tokens change. */
#appView{--op-pad:10px;--op-gap:6px;--op-radius:19px;--op-space:9px;--op-surface:rgba(27,39,37,.9);--op-text:#eef6f3;--op-muted:#aab9b5;--op-shadow:0 8px 24px rgba(0,0,0,.15);--op-incoming:#a1d9b7;--op-incoming-soft:#173226;--op-incoming-line:#396d52;--op-transfer:#e4c472;--op-transfer-soft:#302713;--op-transfer-line:#6d5820;--op-exchange:#c6a6df;--op-exchange-soft:#292035;--op-exchange-line:#59456f;--op-payout:#e2a1a1;--op-payout-soft:#321e1e;--op-payout-line:#6b3d3d;--op-neutral:#b1bfba;--op-neutral-soft:#232d2b;--op-neutral-line:#485754}
body.light #appView{--op-surface:rgba(255,255,255,.84);--op-text:#173735;--op-muted:#71817f;--op-shadow:0 8px 24px rgba(38,63,58,.07);--op-incoming:#177a4b;--op-incoming-soft:#edf8f1;--op-incoming-line:#9ccbb1;--op-transfer:#9a6800;--op-transfer-soft:#fff8e8;--op-transfer-line:#e2c77b;--op-exchange:#7448a4;--op-exchange-soft:#f6f0fb;--op-exchange-line:#c9afe0;--op-payout:#a44141;--op-payout-soft:#fcf0ef;--op-payout-line:#dfb0ab;--op-neutral:#667573;--op-neutral-soft:#f1f4f3;--op-neutral-line:#c8d1cf}
#appView .op-card{--op-accent:var(--op-neutral);--op-soft:var(--op-neutral-soft);--op-line:var(--op-neutral-line);position:relative;display:block;min-width:0;width:100%;padding:0;margin:0 0 var(--op-space);border:1px solid var(--op-line);border-radius:var(--op-radius);text-align:start;font:inherit;overflow:hidden;background:var(--op-surface);color:var(--op-text);box-shadow:var(--op-shadow)}
#appView .op-card[data-tx-semantic="incoming"]{--op-accent:var(--op-incoming);--op-soft:var(--op-incoming-soft);--op-line:var(--op-incoming-line)}
#appView .op-card[data-tx-semantic="transfer"]{--op-accent:var(--op-transfer);--op-soft:var(--op-transfer-soft);--op-line:var(--op-transfer-line)}
#appView .op-card[data-tx-semantic="exchange"]{--op-accent:var(--op-exchange);--op-soft:var(--op-exchange-soft);--op-line:var(--op-exchange-line)}
#appView .op-card[data-tx-semantic="payout"]{--op-accent:var(--op-payout);--op-soft:var(--op-payout-soft);--op-line:var(--op-payout-line)}
#appView .op-card::after{content:"";position:absolute;inset-block:10px;inset-inline-start:0;width:3px;border-radius:4px;background:var(--op-accent);opacity:.82;pointer-events:none}
#appView .op-card>.op-summary,#appView .op-card>.family-trace-summary,#appView .op-card>span.op-summary{display:grid;gap:var(--op-gap);padding:var(--op-pad) 13px 9px;min-height:86px;min-width:0;list-style:none;cursor:pointer}
#appView .op-summary::-webkit-details-marker{display:none}
#appView .op-row{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0}
#appView .op-top{min-height:29px}
#appView .op-identity{display:flex;align-items:center;gap:8px;min-width:0;flex:1 1 auto;font-size:12px;line-height:1.4;color:var(--op-text)}
#appView .op-pill{display:inline-flex;align-items:center;gap:4px;flex:0 0 auto;max-width:min(48vw,140px);border:1px solid var(--op-line);border-radius:999px;padding:4px 8px;background:var(--op-soft);color:var(--op-accent);font-size:12px;font-weight:800;line-height:1.25;white-space:nowrap}
#appView .op-pill b{overflow:hidden;text-overflow:ellipsis;font-weight:800}
#appView .op-pill .ui-icon{width:13px;height:13px;flex:none;stroke-width:2.3;color:inherit}
#appView .op-context{display:block;min-width:0;color:var(--op-text);font-size:12px;font-weight:700;line-height:1.4;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
#appView .op-context>*{white-space:inherit}
#appView .op-time{flex:none;font-size:10.5px;line-height:1.5;font-variant-numeric:tabular-nums;color:var(--op-muted);text-align:left;white-space:nowrap}
#appView .op-time .op-date{font-size:11.5px;color:var(--op-text);font-weight:850}
#appView .op-time .op-clock{font-weight:500;color:var(--op-muted)}
#appView .op-bottom{min-height:36px;flex-wrap:wrap;gap:2px 8px}
#appView .op-amounts{display:flex;align-items:baseline;flex-wrap:wrap;gap:3px 9px;min-width:0;flex:1;color:var(--op-accent);font-size:25px;font-weight:850;line-height:1.15;letter-spacing:-.4px;font-variant-numeric:tabular-nums}
#appView .op-amounts bdi{white-space:nowrap;max-width:100%}
#appView .op-card .op-amounts small{display:inline;margin:0;color:var(--op-accent);font-size:12px;font-weight:800;letter-spacing:0}
#appView .op-actions{display:flex;align-items:center;gap:0;flex-wrap:nowrap;margin-inline-start:auto}
#appView .op-card .op-text-action{font-size:11.5px;font-weight:700;min-height:44px;min-width:44px;padding:7px 6px;width:auto;background:transparent;color:var(--op-accent);border:0;box-shadow:none;border-radius:10px;margin:0;white-space:nowrap}
#appView .op-card .op-action-dot{color:var(--op-muted);font-size:11px}
#appView .op-card [data-gf-audit]{color:var(--op-muted)}
#appView .op-notes{display:block;margin-top:1px;padding-top:7px;border-top:1px dashed var(--op-line);color:var(--op-muted);font-size:12px;line-height:1.65;overflow-wrap:anywhere;white-space:normal;font-weight:400}
#appView .op-notes strong{color:var(--op-text);font-weight:750}
#appView .op-notes .rowbeneficiary,#appView .op-secondary{display:block;font-size:12px;color:var(--op-muted);overflow-wrap:anywhere}
#appView .op-details{padding:9px 13px;border-top:1px solid var(--op-line);font-size:13px;line-height:1.65;overflow-wrap:anywhere}
#appView .op-details:empty{display:none}
#appView .op-details p{margin:3px 0}
#appView .op-summary:focus-visible,#appView .op-text-action:focus-visible{outline:2px solid var(--op-accent);outline-offset:-2px}
#appView .op-card.op-mini>.op-summary{min-height:74px;padding-block:8px;gap:5px}
#appView .op-mini .op-amounts{font-size:22px}
#appView .family-log-event.op-card{display:block;padding:0}
#appView .op-card.family-trace-cancelled{opacity:1}
#appView .op-recent-viewer{max-height:320px;overflow-y:auto;overscroll-behavior-y:contain;scrollbar-width:thin;padding:2px 3px;min-width:0;-webkit-overflow-scrolling:touch}
#appView .op-recent-viewer>.op-card{margin-bottom:6px}
#appView .op-more,#appView .op-target-reset{min-height:44px;margin:5px 0 8px;font-size:13px}
#appView .op-target-highlight{outline:3px solid var(--accent);outline-offset:1px;box-shadow:0 0 0 5px color-mix(in srgb,var(--accent) 18%,transparent);animation:op-target-emphasis 2.7s ease-out 1}
@keyframes op-target-emphasis{0%,100%{outline-color:var(--accent)}45%{outline-color:var(--text)}}
@media(prefers-reduced-motion:reduce){#appView .op-target-highlight{animation:none}}
#appView .op-card .family-trace-details{padding:9px 10px}
#appView #listScreen .op-card>.family-journey-head{padding:var(--op-pad) 10px;row-gap:4px;column-gap:7px}
#appView :is(#listScreen,#fxScreen) .family-state-line{gap:4px;margin-top:0}
#appView :is(#listScreen,#fxScreen) .family-status-chips{gap:3px}
#appView :is(#listScreen,#fxScreen) .family-status-chip{padding:3px 6px}
#appView :is(#listScreen,#fxScreen) .family-journey-body{padding:0 10px 9px}
#appView .op-delete{width:44px;min-height:44px;height:44px;align-self:end;padding:10px;margin:0 0 5px;background:transparent;color:var(--tx-muted,var(--muted));border:0;box-shadow:none}
#appView .op-delete .ui-icon{width:19px;height:19px}
#appView .op-notice-body{font-size:13px;font-weight:500;color:var(--tx-muted,var(--muted))}
#appView .op-read-state{font-size:11px;color:var(--muted)}
#appView .notification-item.unread{border-color:var(--accent);box-shadow:0 0 0 1px color-mix(in srgb,var(--accent) 28%,transparent),0 0 10px var(--ds-glow)}
#appView :is(.quick,.gf-actions,.financial-actions-adaptive).op-action-rail{display:flex;flex-wrap:nowrap;align-items:stretch;gap:7px;overflow-x:auto;overscroll-behavior-x:contain;direction:rtl;padding:6px;margin:7px 0 10px;border:1px solid var(--line);border-radius:15px;background:var(--panel);grid-auto-rows:unset;scrollbar-width:thin;-webkit-overflow-scrolling:touch}
#appView .op-action-rail>button{flex:1 0 88px;min-width:88px;max-width:none;width:auto;min-height:76px;height:76px;padding:7px 5px;border-radius:11px;gap:4px;margin:0;background:var(--tx-bg,var(--panel2));border-color:var(--tx-border,var(--line));box-shadow:none}
#appView .op-action-rail[data-action-count="2"]>button{flex-basis:0;min-width:0}
#appView .op-action-rail[data-action-count="3"]>button{flex-basis:0;min-width:0}
#appView .op-action-rail>button>i{width:26px;height:26px;background:transparent;color:var(--tx-accent,var(--accent));border:0;border-radius:7px}
#appView .op-action-rail>button>i>.ui-icon{width:23px;height:23px;color:inherit}
#appView .op-action-rail>button>span{font-size:12px;line-height:1.4;color:var(--tx-accent,var(--text));overflow-wrap:anywhere}
#appView .op-action-rail>button.op-primary{border-width:2px;border-color:var(--tx-incoming-accent);background:color-mix(in srgb,var(--tx-incoming-accent) 17%,var(--tx-incoming-bg));box-shadow:0 2px 6px color-mix(in srgb,var(--tx-incoming-accent) 12%,transparent)}
#appView .op-filter-row{display:flex;align-items:center;flex-wrap:wrap;gap:5px 8px;margin:6px 0 9px;min-width:0}
#appView .op-filter-row .operational-person-filters{flex:1;margin:0;gap:4px;flex-wrap:nowrap}
#appView .op-filter-row .operational-person-filters button{padding:6px 9px;min-height:44px;font-size:13px;margin:0}
#appView .op-filter-row select{width:auto;flex:1 1 132px;min-width:120px;max-width:100%;height:44px;margin:0;padding:6px 9px;font-size:16px}
#appView #listScreen .op-filter-row .family-primary-filter{flex:1 1 230px;margin:0;min-width:0}
#appView :is(#listScreen,#generalTransactionsScreen) .searchbar{margin:6px 0}
#appView :is(#listScreen,#generalTransactionsScreen) .searchbar input{height:46px;margin:0;padding:8px 12px;font-size:16px}
#appView .op-navigation-row{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:3px 0 5px}
#appView .op-navigation-row #gfCancelledEntry{width:auto;min-height:44px;margin:0;padding:7px 10px;font-size:13px}
#appView .inbox-filters{gap:7px;margin-bottom:7px}
#appView .inbox-filters select{height:44px;margin-bottom:0;font-size:16px}
#appView .inbox-actions{gap:6px;margin:5px 0 8px}
#appView .inbox-actions button{min-height:44px;font-size:13px;padding:7px 10px}
@media(max-width:359px){#appView .op-time{max-width:100px}#appView .op-filter-row{gap:4px}#appView .op-filter-row .operational-person-filters button{padding-inline:7px}#appView .op-notification-main .op-time{max-width:90px}}
#appView .op-expand-icon{width:18px;height:18px;transition:transform .15s}#appView details[open]>.op-summary .op-expand-icon{transform:rotate(180deg)}#appView .op-card.selectable-row{display:block}#appView .op-action-rail .quick-svg{width:23px;height:23px}#appView .op-batch-count{flex-basis:100%}
#appView :is(.quick,.gf-actions,#gfActions).op-action-rail>button{height:76px;min-height:76px;padding:7px 5px;border-radius:11px;flex:1 0 88px;min-width:88px;max-width:none;width:auto}#appView :is(.quick,.gf-actions,#gfActions).op-action-rail[data-action-count="2"]>button{flex:0 0 calc((100% - 7px)/2);min-width:0}#appView :is(.quick,.gf-actions,#gfActions).op-action-rail[data-action-count="3"]>button{flex:0 0 calc((100% - 14px)/3);min-width:0}#appView :is(.quick,.gf-actions,#gfActions).op-action-rail>button>i{width:26px;height:26px;color:var(--tx-accent,var(--accent));background:transparent;border:0}#appView :is(.quick,.gf-actions,#gfActions).op-action-rail>button>span{font-size:12px;line-height:1.4;color:var(--tx-accent,var(--text))}
#appView :is(.quick,.gf-actions,#gfActions).op-action-rail>button{padding:5px;gap:4px}#appView :is(.quick,.gf-actions,#gfActions).op-action-rail>button>i{width:24px;height:24px;min-width:24px;min-height:24px;flex:0 0 24px}#appView :is(.quick,.gf-actions,#gfActions).op-action-rail>button>i svg{width:22px;height:22px}#appView :is(.quick,.gf-actions,#gfActions).op-action-rail>button>span{height:auto;min-height:30px;flex:0 1 auto;line-height:1.4}

/* Notification buttons are siblings, never nested. Both opening areas use the same handler. */
#appView .notification-item>.op-summary{cursor:default}
#appView .notification-item .notification-open.op-top{display:flex;width:100%;min-height:29px;padding:0;margin:0;border:0;border-radius:0;background:transparent;color:inherit;box-shadow:none;font:inherit;text-align:start}
#appView .notification-item .op-delete{min-width:44px;width:44px;height:44px;margin:0;padding:10px;color:var(--op-muted);align-self:center}
#appView .notification-item .op-time{max-width:none}
#appView .notification-item .op-notice-body{color:var(--op-muted);line-height:1.5}
#appView .notification-item .op-batch-count{font-size:12px;color:var(--op-muted)}
#appView :is(#listScreen,#fxScreen) .family-current-amount{font-size:22px;line-height:1.2;color:var(--op-accent)}
#appView :is(#listScreen,#fxScreen) .family-current-amount small{font-size:12px;color:inherit}
#appView .family-log-event.op-card time{color:var(--op-muted)}
@media(max-width:385px){#appView{--op-radius:17px}#appView .op-card>.op-summary{padding-inline:10px}#appView .op-context{font-size:11px}#appView .op-identity{gap:5px}#appView .op-time{font-size:9.5px;max-width:none}#appView .op-time .op-date{font-size:10.5px}#appView .op-amounts{font-size:22px}#appView .op-card .op-text-action{padding-inline:4px;font-size:10.5px}#appView .op-pill{padding-inline:6px;font-size:11px}#appView .op-mini .op-amounts{font-size:21px}}

#appView .op-card .op-date{font-weight:850}#appView .op-card .op-clock{font-weight:500}

#appView .op-card.op-mini .op-bottom{min-height:26px}


/* v1.4.15 — approved Final Theme Master. Presentation tokens/surfaces only.
   Existing dimensions, hierarchy, routes, capabilities and semantic colors stay authoritative. */
html body:has(#appView):has(#appView){
 --theme-bg:#070707;--theme-bg2:#101010;--theme-ink:#f6f1e7;--theme-muted:#b5ab96;
 --theme-surface:#141414;--theme-strong:#191919;--theme-stroke:#2b2416;
 --theme-brand:#d6b25e;--theme-gold:#d6b25e;--theme-gold-bright:#f1d889;--theme-gold-edge:#3a2d13;
 --theme-general:#28b892;--theme-families:#df6b9b;--theme-water:#4ca3e6;--theme-well:#8c7be7;
 --theme-shadow:0 18px 46px rgba(0,0,0,.48);
 --theme-glass:linear-gradient(180deg,#151515,#101010);
 --theme-control:linear-gradient(180deg,#1a1a1a,#101010);
 --theme-icon:linear-gradient(180deg,#1b1710,#11100d);
 --theme-canvas:radial-gradient(850px 390px at 15% -10%,rgba(214,178,94,.09),transparent 56%),radial-gradient(700px 420px at 100% 22%,rgba(214,178,94,.05),transparent 60%),linear-gradient(180deg,var(--theme-bg),var(--theme-bg2));
 --bg:var(--theme-bg);--panel:var(--theme-surface);--panel2:var(--theme-strong);
 --text:var(--theme-ink);--muted:var(--theme-muted);--line:var(--theme-stroke);
 --accent:var(--theme-brand);--accentText:#171208;--shadow:var(--theme-shadow);
 --home-ink:var(--text);--home-muted:var(--muted);--home-line:var(--line);--home-shadow:var(--shadow);
 --ds-neutral-bg:var(--bg);--ds-neutral-card:var(--panel);--ds-neutral-soft:var(--panel2);
 --ds-neutral-text:var(--text);--ds-neutral-muted:var(--muted);--ds-neutral-line:var(--line);
 --ds-teal:var(--theme-brand);--ds-teal-soft:var(--theme-icon);--ds-teal-edge:var(--theme-gold-edge);
 --ds-sand:var(--theme-brand);--ds-sand-soft:var(--panel2);--ds-sand-edge:var(--line);
 --ds-general-hero:var(--theme-glass);--ds-general-wail:var(--theme-glass);--ds-general-safaa:var(--theme-glass);
 --ds-general-primary:linear-gradient(135deg,#e5c879,#cba454);--ds-family-hero:var(--theme-glass);
 --ds-shadow:var(--shadow);--ds-glow:rgba(214,178,94,.07);
 --ds-selected:color-mix(in srgb,var(--accent) 9%,var(--panel));
 --ds-surface-gradient:linear-gradient(180deg,rgba(255,255,255,.018),transparent);
 --family-card:var(--theme-glass);--family-hero:var(--theme-glass);--family-control:var(--theme-icon);
 --family-primary:var(--ds-general-primary);--family-edge:var(--line);--family-glow:rgba(214,178,94,.07);
 --family-success:var(--tx-incoming-accent);--family-success-panel:var(--tx-incoming-bg);
 --family-success-edge:var(--tx-incoming-border);--family-received:var(--tx-incoming-bg);
 --family-pending:var(--theme-glass);--family-pending-panel:var(--panel2);
 background:var(--theme-canvas);color:var(--text);
}
html body.light:has(#appView):has(#appView){
 --theme-bg:#f3f0e8;--theme-bg2:#edf5f3;--theme-ink:#102b30;
 --theme-muted:#53666a; /* Same warm master palette, stronger secondary-text contrast. */
 --theme-surface:rgba(255,255,255,.64);--theme-strong:rgba(255,255,255,.84);
 --theme-stroke:rgba(28,74,78,.14);--theme-brand:#117f81;
 --theme-general:#108d72;--theme-families:#c04d7f;--theme-water:#267fc0;--theme-well:#5753a8;
 --theme-shadow:0 18px 44px rgba(24,58,61,.11);
 --theme-glass:linear-gradient(145deg,rgba(255,255,255,.10),rgba(255,255,255,0)),var(--theme-surface);
 --theme-control:var(--theme-strong);--theme-icon:color-mix(in srgb,var(--accent) 10%,var(--theme-strong));
 --theme-canvas:radial-gradient(850px 420px at 92% -5%,color-mix(in srgb,var(--theme-brand) 14%,transparent),transparent 60%),radial-gradient(650px 380px at -10% 50%,rgba(213,178,94,.08),transparent 65%),linear-gradient(150deg,var(--theme-bg),var(--theme-bg2));
 --accentText:#fff;--ds-glow:rgba(17,127,129,.07);
 --ds-teal-edge:color-mix(in srgb,var(--theme-general) 30%,var(--line));
 --ds-general-primary:linear-gradient(135deg,#117f81,#096b70);
 --family-primary:var(--ds-general-primary);--family-glow:rgba(192,77,127,.07);
}
/* One appearance state; the module identity can accent Light controls only. */
html body.light:has(#appView:not(.boxes-shell):not(.general-fund-shell)):has(#appView){--accent:#a13a68;--family-primary:linear-gradient(135deg,#b44474,#96345f)}
html body.light:has(#appView.general-fund-shell[data-box-theme="aqua"]):has(#appView),
html body.light:has(#appView.general-fund-shell[data-box-theme="cobalt"]):has(#appView){--accent:#236fa8;--family-primary:linear-gradient(135deg,#267fc0,#226a9e)}
html body.light:has(#appView.general-fund-shell[data-box-theme="indigo"]):has(#appView){--accent:var(--theme-well);--family-primary:linear-gradient(135deg,#6861b5,#5753a8)}
html body.light:has(#appView.general-fund-shell[data-box-theme="plum"]):has(#appView){--accent:#a13a68;--family-primary:linear-gradient(135deg,#b44474,#96345f)}
html body.light:has(#appView.general-fund-shell[data-box-theme="emerald"]):has(#appView){--accent:#087b61;--family-primary:linear-gradient(135deg,#108d72,#087b61)}
html body.light:has(#appView.general-fund-shell[data-box-theme="amber"]):has(#appView){--accent:#8a651c;--family-primary:linear-gradient(135deg,#9a7424,#805d18)}
html body.light:has(#appView.general-fund-shell[data-box-theme="copper"]):has(#appView){--accent:#9a5535;--family-primary:linear-gradient(135deg,#a66040,#8c4e32)}

#appView{background:var(--theme-canvas);--op-surface:var(--theme-surface);--op-text:var(--text);--op-muted:var(--muted);--op-shadow:0 8px 24px rgba(0,0,0,.15)}
body.light #appView{--op-shadow:0 8px 24px rgba(38,63,58,.07)}
#appView .topbar{background:var(--bg);border-color:var(--line);backdrop-filter:none;-webkit-backdrop-filter:none}
#appView .searchbar{background:var(--bg)}
#appView :is(.card,.metric,.hero,.form-card,.archive-current,.archive-disclosure,.central-settings-group,.received-fold,.manage-fold,.home-account,.gf-account-card,.publication-entry,.settings-link,.push-card,.box-manager-card){background:var(--theme-glass);border-color:var(--line);color:var(--text);box-shadow:var(--shadow)}
body.light #appView :is(.home-account,.gf-account-card,.metric,.hero,.publication-entry){backdrop-filter:blur(24px) saturate(148%);-webkit-backdrop-filter:blur(24px) saturate(148%)}
body:not(.light) #appView :is(.card,.metric,.hero,.home-account,.gf-account-card,.publication-entry){backdrop-filter:none;-webkit-backdrop-filter:none}
#appView :is(.home-account-head h3,.home-balance-value,.gf-account-card b,.metric>b){color:var(--text)}
#appView .home-account :is(.home-currency-label,.home-currency-code){color:var(--muted);opacity:1}
body:not(.light) #appView .home-account .home-currency-code{color:var(--theme-gold)}
#appView :is(.home-account-person,.settings-link-icon,.publication-entry-icon,.archive-icon,.balance-icon){color:var(--accent);background:var(--theme-icon);border-color:var(--line);box-shadow:none}
#appView :is(.box-manager-row .box-icon,.box-wizard-preview,#boxWizardBody .box-icon){color:var(--accent);background:var(--theme-icon);border-color:var(--line)}
body:not(.light) #appView .home-currency-icon{color:var(--theme-gold);background:var(--theme-icon)}
#appView .home-account.account-focused{background:var(--theme-glass);border-color:var(--accent);box-shadow:0 0 0 2px color-mix(in srgb,var(--accent) 18%,transparent),var(--shadow)}
#appView .home-account.account-focused .home-account-person{background:var(--theme-icon);color:var(--accent)}
#appView :is(.iconbtn,.boxes-back,.backbtn,#globalAccountBtn){background:var(--theme-control);border-color:var(--line);color:var(--accent);box-shadow:0 8px 22px rgba(0,0,0,.07)}
#appView .bottomnav{background:var(--theme-strong);border-color:var(--line);box-shadow:0 -5px 18px rgba(0,0,0,.06)}
body:not(.light) #appView .bottomnav{background:var(--theme-glass);backdrop-filter:none;-webkit-backdrop-filter:none}
#appView .bottomnav button.on{background:var(--ds-selected);color:var(--accent);box-shadow:inset 0 -2px 0 var(--accent)}

/* Identity is independent of global dark Gold. No box-sized color glow. */
:is(#appView [data-box-theme],.financial-ui[data-box-theme]){--theme-identity:var(--theme-general);--box-panel:var(--panel);--box-border:var(--line);--box-ink:var(--text);--box-accent:var(--theme-identity);--box-soft:var(--panel2)}
:is(#appView [data-box-theme="aqua"],.financial-ui[data-box-theme="aqua"]),:is(#appView [data-box-theme="cobalt"],.financial-ui[data-box-theme="cobalt"]){--theme-identity:var(--theme-water)}
:is(#appView [data-box-theme="indigo"],.financial-ui[data-box-theme="indigo"]){--theme-identity:var(--theme-well)}
:is(#appView [data-box-theme="plum"],.financial-ui[data-box-theme="plum"]),#appView .box-theme-families{--theme-identity:var(--theme-families)}
:is(#appView [data-box-theme="amber"],.financial-ui[data-box-theme="amber"]){--theme-identity:#d6b25e}
:is(#appView [data-box-theme="copper"],.financial-ui[data-box-theme="copper"]){--theme-identity:#ce906d}
body.light :is(#appView [data-box-theme="amber"],.financial-ui[data-box-theme="amber"]){--theme-identity:#8a651c}
body.light :is(#appView [data-box-theme="copper"],.financial-ui[data-box-theme="copper"]){--theme-identity:#9a5535}
#appView.boxes-home-shell .box-card{--fund-ink:var(--text);--fund-panel:var(--panel);--fund-line:var(--line);--fund-accent:var(--theme-identity);--fund-icon:var(--theme-icon);--fund-leaf:transparent;--fund-wash:transparent;background:var(--theme-glass);color:var(--text);border-color:var(--line);box-shadow:var(--shadow)}
body.light #appView.boxes-home-shell .box-card{background:linear-gradient(145deg,color-mix(in srgb,var(--theme-identity) 9%,transparent),transparent 58%),var(--theme-surface);border-color:color-mix(in srgb,var(--theme-identity) 34%,var(--line));box-shadow:0 16px 36px color-mix(in srgb,var(--theme-identity) 9%,transparent);backdrop-filter:blur(24px) saturate(148%);-webkit-backdrop-filter:blur(24px) saturate(148%)}
#appView.boxes-home-shell .box-card::before,#appView.boxes-home-shell .box-card::after{background:none;border-color:transparent;box-shadow:none}
#appView.boxes-home-shell .box-name{color:var(--theme-identity);text-shadow:none;text-decoration-line:underline;text-decoration-color:color-mix(in srgb,var(--theme-identity) 55%,transparent);text-decoration-thickness:2px;text-underline-offset:5px}
#appView.boxes-home-shell .box-icon{color:var(--accent);background:var(--theme-icon);border-color:var(--line);box-shadow:none}
body.light #appView.boxes-home-shell .box-icon{color:var(--theme-identity);background:color-mix(in srgb,var(--theme-identity) 10%,var(--theme-strong));border-color:color-mix(in srgb,var(--theme-identity) 24%,transparent)}
#appView.boxes-home-shell .box-balances{border-color:var(--line)}
#appView.boxes-home-shell .box-balances .home-currency-label{color:var(--muted);opacity:1}
#appView.boxes-home-shell .box-balances .home-currency-code{color:var(--accent);opacity:1}
#appView.boxes-home-shell :is(.box-focus-label,.box-coming-soon){color:var(--muted)}
#appView.general-fund-shell{--box-panel:var(--panel);--box-ink:var(--text);--box-border:var(--line);--box-soft:var(--panel2);--box-accent:var(--accent)}
#appView.general-fund-shell .topbar h1{color:var(--text)}
#appView :is(.home-destinations .publication-entry,.operational-options,.op-action-rail,.manage-list,.account-list,.archive-disclosure .archive-disclosure,.opening-balance){background:var(--theme-glass);border-color:var(--line)}

/* Shared compact cards retain all dimensions, semantic pills and amounts. */
#appView .op-card{background:var(--op-surface);color:var(--op-text);box-shadow:var(--op-shadow)}
#appView :is(#listScreen,#fxScreen) .family-journey-card.family-quiet{background:#17191c;border-color:#46505a;color:var(--tx-text)}
#appView :is(#listScreen,#fxScreen) .family-journey-card[data-current-semantic="incoming"]{background:#15291d;border-color:#719b7f}
body.light #appView :is(#listScreen,#fxScreen) .family-journey-card.family-quiet{background:rgba(240,243,247,.88);border-color:#b9c3cd}
body.light #appView :is(#listScreen,#fxScreen) .family-journey-card[data-current-semantic="incoming"]{background:rgba(227,241,232,.9);border-color:#7aa78a}
#appView .notification-item.unread{background:var(--op-surface);border-color:var(--accent);box-shadow:0 0 0 1px color-mix(in srgb,var(--accent) 28%,transparent),0 0 10px var(--ds-glow)}
/* These selectors intentionally do not override --tx-* or --op semantic tokens. */
#appView .op-action-rail>button{background:var(--tx-bg,var(--panel2));border-color:var(--tx-border,var(--line))}
#appView .op-action-rail>button.op-primary{background:color-mix(in srgb,var(--tx-incoming-accent) 17%,var(--tx-incoming-bg));border-color:var(--tx-incoming-accent)}

/* Sheets and controls outside #appView share the same live appearance tokens. */
html body:has(#appView):has(#appView) .modal-sheet{background:var(--theme-glass);color:var(--text);border-color:var(--line)}
html body:has(#appView):has(#appView) :is(.modal-head button,.pull-refresh,.system-update){background:var(--theme-control);border-color:var(--line);color:var(--accent)}
html body:has(#appView):has(#appView) :is(input,select,textarea):not([type=checkbox]):not([type=radio]){background:var(--theme-strong);color:var(--text);border-color:var(--line)}
html body:has(#appView):has(#appView) :is(input,textarea)::placeholder{color:var(--muted);opacity:1}
html body:has(#appView):has(#appView) :is(.primary,.system-update button){background:var(--family-primary);color:var(--accentText)}
html body:has(#appView):has(#appView) .secondary{background:var(--theme-glass);color:var(--accent);border-color:var(--line)}
html body:has(#appView):has(#appView) .secondary.danger{color:var(--danger)}
html body:has(#appView):has(#appView) :is(.selected-family,.ios-group,.publication-text,.notice-box,.theme-settings,.review-switch,.person-review-summary){background:var(--theme-strong);border-color:var(--line);color:var(--text)}
html body:not(.light):has(#appView):has(#appView) :is(.modal-sheet,.pull-refresh,.system-update){backdrop-filter:none;-webkit-backdrop-filter:none}
html body.light:has(#appView):has(#appView) .modal-sheet{backdrop-filter:blur(24px) saturate(148%);-webkit-backdrop-filter:blur(24px) saturate(148%)}
html body:has(#appView):has(#appView) .system-update-copy b{color:var(--text)}
html body:has(#appView):has(#appView) .system-update-copy small{color:var(--muted)}

/* Compact timeline headers wrap as complete words at narrow widths. */
#appView :is(#listScreen,#fxScreen) .family-event-header{display:flex;flex-wrap:wrap;justify-content:space-between;min-width:0}
#appView :is(#listScreen,#fxScreen) .family-event-header .op-pill{max-width:100%;white-space:normal}
#appView :is(#listScreen,#fxScreen) .family-event-header .op-pill b{overflow:visible;overflow-wrap:break-word;text-overflow:clip}
#appView :is(#listScreen,#fxScreen) .family-event-header .op-time{margin-inline-start:auto;max-width:100%;white-space:normal}
#appView :is(#listScreen,#fxScreen) .family-event-header .op-time bdi{display:inline-flex;flex-wrap:wrap;column-gap:3px}

/* Families candidate: compact inline audit timeline, scoped to the specialized module. */
#appView :is(#listScreen,#fxScreen) .family-timeline{display:block;margin-top:8px}
#appView :is(#listScreen,#fxScreen) .family-timeline-event.op-card{display:block;padding:9px 0;margin:0;min-width:0;width:100%;border:0;border-bottom:1px solid var(--line);border-radius:8px;background:transparent;overflow:visible}
#appView :is(#listScreen,#fxScreen) .family-timeline-event:not(.op-target-highlight){box-shadow:none}
#appView :is(#listScreen,#fxScreen) .family-timeline-event:last-child{border-bottom:0}
#appView :is(#listScreen,#fxScreen) .family-event-summary{display:block;width:100%;min-width:0;list-style:none;cursor:pointer}
#appView :is(#listScreen,#fxScreen) .family-event-summary::-webkit-details-marker{display:none}
#appView :is(#listScreen,#fxScreen) .family-event-header{gap:5px 8px;align-items:center}
#appView :is(#listScreen,#fxScreen) .family-event-header .op-pill{font-size:11px;padding:5px 7px}
#appView :is(#listScreen,#fxScreen) .family-event-header .op-time{font-size:10px}
#appView :is(#listScreen,#fxScreen) .family-event-result{display:flex;flex-wrap:wrap;gap:5px 8px;margin-top:5px}
#appView :is(#listScreen,#fxScreen) .family-event-result .op-amounts{font-size:20px;line-height:1.3}
#appView :is(#listScreen,#fxScreen) .family-event-context{flex:1;min-width:0;overflow-wrap:anywhere;font-size:11px;color:var(--muted)}
#appView :is(#listScreen,#fxScreen) .family-event-result .family-expand-icon{width:16px;height:16px;flex:none;margin:0}
#appView :is(#listScreen,#fxScreen) .family-timeline-event[open] .family-expand-icon{transform:rotate(180deg)}
#appView :is(#listScreen,#fxScreen) .family-event-detail-body{padding:9px 4px 2px;font-size:12px;line-height:1.7;min-width:0}
#appView :is(#listScreen,#fxScreen) .family-event-detail-body dl{display:grid;grid-template-columns:minmax(0,1fr);gap:6px;margin:0 0 8px}
#appView :is(#listScreen,#fxScreen) .family-event-detail-body dl>div{display:flex;flex-wrap:wrap;gap:4px 8px;min-width:0}
#appView :is(#listScreen,#fxScreen) .family-event-detail-body dt{color:var(--muted)}
#appView :is(#listScreen,#fxScreen) .family-event-detail-body dd{margin:0;min-width:0;max-width:100%;overflow-wrap:anywhere;white-space:pre-wrap}

/* In-flow sticky summary leaves the list below it; its offset follows the actual header. */
#appView #fxScreen .family-purchase-summary{position:sticky;top:var(--family-purchase-top,100px);z-index:20;border:1px solid var(--tx-incoming-border,var(--line));border-radius:18px;padding:12px;background:var(--bg);box-shadow:var(--shadow);margin:12px 0}
#appView #fxScreen .family-purchase-main{display:grid;grid-template-columns:minmax(0,1fr) 88px;gap:9px;align-items:stretch}
#appView #fxScreen .family-purchase-figures{display:flex;align-items:flex-end;justify-content:space-between;gap:8px;min-width:0}
#appView #fxScreen .family-purchase-net{flex:1;min-width:0}
#appView #fxScreen .family-purchase-net small{display:block;font-size:11px;color:var(--muted);margin-bottom:5px}
#appView #fxScreen .family-purchase-net strong{display:block;font-size:clamp(23px,6.5vw,30px);line-height:1.2;font-weight:900;color:var(--tx-incoming-accent);letter-spacing:-.5px;text-align:right;overflow-wrap:anywhere}
#appView #fxScreen .family-purchase-net>span{font-size:10px;color:var(--tx-incoming-accent)}
#appView #fxScreen .family-purchase-original{text-align:left;color:var(--muted);font-size:10px;min-width:0}
#appView #fxScreen .family-purchase-original :is(b,small){display:block;font-size:10px;font-weight:500;overflow-wrap:anywhere}
#appView #fxScreen .family-purchase-original b{font-size:12px;margin-top:3px}
#appView #fxScreen .family-purchase-fee{font-size:10px;color:var(--muted);margin:5px 0 0}
html body:has(#appView):has(#appView) #fxScreen .family-purchase-action{display:flex;flex-direction:column;gap:7px;align-items:center;justify-content:center;min-height:78px;height:100%;padding:9px 4px;font-size:12px;background:var(--tx-incoming-accent);color:var(--bg);border-radius:14px}
#appView #fxScreen .family-purchase-action .ui-icon{width:23px;height:23px}
#appView #fxScreen .family-purchase-foot{display:flex;flex-wrap:wrap;justify-content:space-between;gap:4px;padding-top:8px;margin-top:8px;border-top:1px solid var(--line);font-size:10px;color:var(--muted)}
#appView #fxScreen .family-purchase-foot small{font-size:9px}
#fxAuthoritativeSummary .ios-row{flex-wrap:wrap;gap:5px 10px}
#fxAuthoritativeSummary b{min-width:0;overflow-wrap:anywhere}
@media(max-width:375px){#appView #fxScreen .family-purchase-main{grid-template-columns:minmax(0,1fr) 76px}#appView #fxScreen .family-purchase-figures{flex-wrap:wrap}#appView #fxScreen .family-purchase-original{flex-basis:100%;display:flex;gap:5px;align-items:center;justify-content:flex-start;text-align:right}#appView #fxScreen .family-purchase-original b{margin:0}}

#appView .family-message-day{margin:14px 0}
#appView .family-message-day h3{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--muted);margin:8px 0}
#appView .family-message-day h3:after{content:'';flex:1;height:1px;background:var(--line)}
#appView .family-message-day h3 small{font-size:10px;font-weight:500}
#appView .family-message-choice{display:flex;gap:9px;align-items:center;border:0;border-bottom:1px solid var(--line);padding:11px 0;min-width:0}
#appView .family-message-person{flex:1;min-width:0;font-size:13px;overflow-wrap:anywhere}
#appView .family-message-person small{display:block;font-size:10px;color:var(--muted);margin-top:3px}
#appView .family-message-receipt{display:flex;flex-direction:column;align-items:flex-end;gap:4px;font-size:12px;min-width:0;max-width:40%}
#appView .family-message-receipt small{font-size:10px;color:var(--muted)}

/* Purchase selection reuses the operational sponsorship header and semantic state. */
#appView #fxScreen .family-journey-head{display:grid;grid-template-columns:34px minmax(0,1fr) 18px;gap:8px;padding:10px;text-align:right;min-width:0}
#appView #fxScreen .family-state-line{grid-column:1/-1;display:flex;flex-wrap:wrap;align-items:center;gap:8px;justify-content:space-between}
#appView #fxScreen .family-status-chips{display:flex;flex-wrap:wrap;gap:4px}
#appView #fxScreen .family-identity{min-width:0;overflow-wrap:break-word}
#appView #fxScreen .family-expand-icon{visibility:hidden}
#appView #fxScreen .family-purchase-summary{padding-bottom:max(10px,env(safe-area-inset-bottom))}
.family-purchase-rate{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:6px;font-size:11px}
.family-purchase-rate input{width:100px;min-height:36px;padding:6px;font-size:16px}
.family-purchase-rate strong{margin-inline-start:auto}
/* Compact read-only projections use the existing theme and semantic tokens. */
.balance-preview{margin:12px 0;padding:10px 12px;border:1px solid var(--line);border-radius:16px;background:var(--panel2);font-size:12px}
.balance-preview:empty{display:none}.preview-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.preview-head small,.preview-caption{opacity:.75;font-size:11px}.preview-account{padding:8px 0;border-bottom:1px solid var(--line)}.preview-account:last-child{border-bottom:0}.preview-values{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:6px}.preview-values span{display:grid;gap:3px;min-width:0;font-size:11px}.preview-values b{font-size:14px;overflow-wrap:anywhere}.preview-warning{font-size:12px;color:var(--danger,#b73b52);margin:8px 0 0}.preview-caption{line-height:1.7;margin:6px 0 0}
.unified-home{margin-top:18px}.unified-card{width:100%;text-align:start;cursor:pointer}.unified-card .op-bottom{align-items:center}.unified-badge{display:inline-flex;gap:5px;align-items:center;max-width:130px;font-size:11px;white-space:normal}.unified-badge .ui-icon{width:19px;height:19px;flex-shrink:0}.unified-badge b{overflow-wrap:anywhere}.unified-card .op-amounts{min-width:0}.unified-card .op-actions{margin-inline-start:auto}.unified-card .op-context{white-space:normal}.unified-card .op-time{flex-shrink:0}
@media(max-width:390px){.unified-card .op-time{font-size:10px}.unified-badge{max-width:108px}.preview-values b{font-size:13px}}
.guest-login-open #loginForm{display:none!important}.guest-login-open #guestLoginForm:not(.hidden){display:block!important}.guest-session #notificationSettingsGroup,.guest-session #accountsSettingsGroup,.guest-session #financialSettingsGroup,.guest-session #advancedAdminSettings,.guest-session #boxManagerEntry,.guest-session #notifyBtn{display:none!important}#guestAdmin{padding:12px 0;border-top:1px solid var(--line)}#guestAdminList small{display:block}.guest-session #settingsReadOnly{font-size:12px}

/* Settings remain the same shared area; diagnostics are collapsed and privileged. */
#accountScreen .settings-profile{padding:12px 14px;margin-bottom:8px}#accountScreen .settings-profile h2{font-size:19px;margin:0 0 3px}#accountScreen .settings-profile p{margin:0;font-size:12px}#accountScreen .central-settings-group{margin:8px 0;border-radius:16px}#accountScreen .central-settings-group>summary{padding:12px 14px;font-size:14px}#accountScreen .settings-card{padding:12px;margin:8px}#accountScreen .settings-card h3{margin:0 0 8px;font-size:14px}#accountScreen .settings-note{font-size:11px;line-height:1.6}#accountScreen .theme-settings button{padding:10px}#platformSettingsGroup #boxManagerEntry{margin:8px;width:calc(100% - 16px);padding:12px 14px;font-size:14px;min-height:44px}.settings-version{text-align:center;opacity:.6;font-size:11px;font-weight:500;margin:14px 0 4px}#advancedAdminSettings #pushDiagnosticsSection{margin:8px}#boardFamiliesReportsScreen #familiesReportPdfBtn{margin:8px 0 14px;min-height:48px}
#appView .unified-card .op-actions{flex:0 0 auto;max-width:108px}#appView .unified-badge{flex:0 0 auto;min-width:76px;max-width:108px;white-space:nowrap}#appView .unified-badge b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;overflow-wrap:normal}
#appView .unified-badge>svg{display:block;width:19px;height:19px;flex:0 0 19px}#appView .unified-badge{max-width:120px}#appView .unified-card .op-actions{max-width:120px}


/* Approved compact purchase panel. Every rule is scoped to this form mode. */
html body:has(#appView):has(#appView) .financial-ui .modal-sheet{width:min(100%,446px);padding:15px 15px 18px;background:linear-gradient(145deg,#1c3941ed,#071b24fa 66%,#113130f2);color:#f6faf9;border:1px solid #abe2df2b;border-radius:30px 30px 0 0;--fx-muted:#a9bec1;--fx-line:#b8e7e329;--fx-glass:linear-gradient(145deg,#31535a87,#0d252ead);--fx-gold:#ffe09a;--fx-teal:#5ff0df;--fx-input:#fff}
html body:has(#appView):has(#appView) .financial-ui .grab{margin:0 auto 8px}html body:has(#appView):has(#appView) .financial-ui .modal-head{margin:0 0 13px;padding:0;gap:10px}html body:has(#appView):has(#appView) .financial-ui .financial-title{font-size:23px;line-height:1.22}html body:has(#appView):has(#appView) .financial-ui .financial-title:before{content:'₮';display:inline-grid;place-items:center;width:39px;height:39px;margin-inline-end:9px;border-radius:14px;background:linear-gradient(140deg,#05caa9,#076f75);color:white;font-size:25px;vertical-align:middle}
html body:has(#appView):has(#appView) .financial-ui .financial-close{width:39px;height:39px;min-height:39px;border-radius:13px;background:#c2dce014;color:inherit;border:1px solid var(--fx-line);padding:9px;flex-shrink:0}
html body:has(#appView):has(#appView) .financial-ui .financial-form{display:block}html body:has(#appView):has(#appView) .financial-ui .financial-form label{color:var(--fx-muted);font-size:11px;margin:0 0 5px;line-height:1.4;font-weight:600}html body:has(#appView):has(#appView) .financial-ui input,.financial-ui select{min-width:0;color:var(--fx-input);font-variant-numeric:tabular-nums}
html body:has(#appView):has(#appView) .financial-ui .fx-account{display:flex;gap:8px;align-items:center;border:1px solid var(--fx-line);background:var(--fx-glass);border-radius:17px;padding:10px 12px;margin-bottom:13px}html body:has(#appView):has(#appView) .financial-ui .financial-account-main{flex:1;min-width:0}html body:has(#appView):has(#appView) .financial-ui .financial-account-select{margin:0;padding:0;min-height:25px;border:0;background:transparent;font-size:16px;font-weight:700;box-shadow:none}html body:has(#appView):has(#appView) .financial-ui select option{background:#17323b;color:#fff}
html body:has(#appView):has(#appView) .financial-ui .fx-current{text-align:left;border-inline-start:1px solid var(--fx-line);padding-inline-start:11px;min-width:113px}html body:has(#appView):has(#appView) .financial-ui .fx-current strong{display:block;font-size:16px;white-space:nowrap}html body:has(#appView):has(#appView) .financial-ui small{color:var(--fx-muted);font-size:10px}
html body:has(#appView):has(#appView) .financial-ui .fx-entry{display:grid;grid-template-columns:minmax(0,1.58fr) minmax(0,.84fr) 43px;gap:7px;margin-bottom:7px}html body:has(#appView):has(#appView) .financial-ui .fx-field{border:1px solid var(--fx-line);background:var(--fx-glass);border-radius:17px;padding:10px 11px 8px;min-width:0}html body:has(#appView):has(#appView) .financial-ui .fx-gross{border-color:#fdd47ad4;background:linear-gradient(130deg,#735f354d,#0e292dcf);box-shadow:0 0 0 1px #fccd6c29}html body:has(#appView):has(#appView) .financial-ui .fx-field label{white-space:nowrap}
html body:has(#appView):has(#appView) .financial-ui .fx-field input{width:100%;padding:0;margin:0;min-height:34px;outline:none;border:0;background:transparent;font-size:28px;font-weight:800;letter-spacing:-.8px;direction:ltr;text-align:right;box-shadow:none}html body:has(#appView):has(#appView) .financial-ui .fx-rate input{font-size:22px}html body:has(#appView):has(#appView) .financial-ui #fxLock{min-height:0;padding:0;border:1px solid #f6ca6487;background:linear-gradient(150deg,#997b336b,#433719b3);border-radius:15px;color:#ffe5a5;font-size:23px}html body:has(#appView):has(#appView) .financial-ui #fxLock[aria-pressed=false]{background:linear-gradient(160deg,#1781865c,#0c343a8c);border-color:#4fd6ca99}
html body:has(#appView):has(#appView) .financial-ui .fx-fee-note{display:flex;justify-content:space-between;gap:8px;margin:7px 2px 12px;font-size:11px;color:var(--fx-muted)}html body:has(#appView):has(#appView) .financial-ui .financial-fee-factor{color:var(--fx-gold)}
html body:has(#appView):has(#appView) .financial-ui .fx-net{border:1px solid #f2c6726b;border-radius:20px;padding:15px 16px 13px;background:linear-gradient(130deg,#7065414d,#103133bd 67%);margin-bottom:9px;font-size:13px;font-weight:800}html body:has(#appView):has(#appView) .financial-ui .fx-net-value{color:var(--fx-gold);margin-top:5px;line-height:1.2;overflow-wrap:anywhere}html body:has(#appView):has(#appView) .financial-ui .financial-net-value{font-size:38px;letter-spacing:-1px;font-variant-numeric:tabular-nums}html body:has(#appView):has(#appView) .financial-ui .fx-net-value small{font-size:13px}html body:has(#appView):has(#appView) .financial-ui .fx-net-sub{display:flex;justify-content:space-between;gap:10px;margin-top:8px;border-top:1px solid #f3d5962b;padding-top:8px;color:var(--fx-muted);font-size:12px;font-weight:400}html body:has(#appView):has(#appView) .financial-ui .fx-net-sub b{color:#f7c9bf;display:inline-block;direction:rtl}
html body:has(#appView):has(#appView) .financial-ui .fx-expected{border:1px solid #53d7c947;border-radius:18px;background:linear-gradient(110deg,#0b6f6b38,#0a394573);padding:11px 14px;display:flex;align-items:center;justify-content:space-between;margin-bottom:9px;gap:10px}html body:has(#appView):has(#appView) .financial-ui .financial-usd-slot{min-width:0;flex:1}html body:has(#appView):has(#appView) .financial-ui .financial-usd-field label{color:var(--fx-muted)}html body:has(#appView):has(#appView) .financial-ui .financial-usd-input{width:100%;padding:0;margin:0;border:1px solid #5befdea6;background:#042a30cc;border-radius:8px;color:var(--fx-teal);font-size:25px;font-weight:800;direction:ltr;text-align:right;min-height:36px;box-shadow:none}html body:has(#appView):has(#appView) .financial-ui .financial-usd-input[readonly]{border-color:transparent;background:transparent;font-size:29px}html body:has(#appView):has(#appView) .financial-ui .fx-coin{display:grid;place-items:center;height:39px;width:39px;border-radius:50%;background:linear-gradient(140deg,#00c59f,#047f82);color:white;font-size:24px;font-weight:800}
html body:has(#appView):has(#appView) .financial-ui .fx-balances{border-radius:17px;overflow:hidden;border:1px solid var(--fx-line);background:#2a4c5147;margin-bottom:8px}html body:has(#appView):has(#appView) .financial-ui .fx-balance-row{display:grid;grid-template-columns:60px minmax(0,1fr) 18px minmax(0,1fr);align-items:center;gap:5px;padding:10px 11px}html body:has(#appView):has(#appView) .financial-ui .fx-balance-row+.fx-balance-row{border-top:1px solid var(--fx-line)}html body:has(#appView):has(#appView) .financial-ui .fx-balance-row small{display:block;margin-bottom:4px}html body:has(#appView):has(#appView) .financial-ui .fx-what{font-size:11px;font-weight:800}html body:has(#appView):has(#appView) .financial-ui .fx-balance-row b{display:block;font-size:15px;overflow-wrap:anywhere}html body:has(#appView):has(#appView) .financial-ui .fx-after b{color:var(--fx-gold)}html body:has(#appView):has(#appView) .financial-ui .fx-usdt .fx-after b{color:var(--fx-teal)}html body:has(#appView):has(#appView) .financial-ui .fx-arrow{color:var(--fx-muted);text-align:center}
html body:has(#appView):has(#appView) .financial-ui .financial-preview-status{font-size:12px;color:#ffaeb0;margin:5px 2px}html body:has(#appView):has(#appView) .financial-ui .financial-preview-status:empty{display:none}html body:has(#appView):has(#appView) .financial-ui details{margin:0 0 8px;border:1px solid var(--fx-line);border-radius:15px;background:#9ac5c413;overflow:hidden}html body:has(#appView):has(#appView) .financial-ui summary{display:flex;justify-content:space-between;align-items:center;min-height:42px;padding:10px 13px;color:inherit;font-size:12px;font-weight:700;cursor:pointer}html body:has(#appView):has(#appView) .financial-ui .financial-date-body{padding:0 12px 12px}html body:has(#appView):has(#appView) .financial-ui .financial-date-body>label{display:none}html body:has(#appView):has(#appView) .financial-ui .financial-date-body input,.financial-ui .financial-date-body select{font-size:16px;background:#15333b;border-color:var(--fx-line)}html body:has(#appView):has(#appView) .financial-ui .financial-submit{width:100%;min-height:54px;border:1px solid #8dfff47d;border-radius:16px;background:linear-gradient(110deg,#0ad3c4,#078891 72%,#056974);color:#fff;font-size:17px;font-weight:800;margin:3px 0 0;box-shadow:0 11px 28px #00958e3d}html body:has(#appView):has(#appView) .financial-ui .financial-submit:disabled{opacity:.42;box-shadow:none}
html body.light:has(#appView):has(#appView) .financial-ui .modal-sheet{background:linear-gradient(145deg,#f5faf8,#e9f2f1);color:#153d43;--fx-muted:#526c70;--fx-line:#476f702f;--fx-glass:linear-gradient(145deg,#ffffffcf,#e6f1f1db);--fx-gold:#806019;--fx-teal:#08796f;--fx-input:#163f45}html body:has(#appView):has(#appView) .financial-ui :is(input,select):focus-visible{outline:2px solid #61c8c4;outline-offset:2px}html body.light:has(#appView):has(#appView) .financial-ui .fx-gross{background:#fff6df}html body.light:has(#appView):has(#appView) .financial-ui .fx-net{background:linear-gradient(130deg,#fff0c9,#f3f4e7);border-color:#b18c4a7a}html body.light:has(#appView):has(#appView) .financial-ui .fx-net-sub b{color:#805540}html body.light:has(#appView):has(#appView) .financial-ui .financial-usd-input{background:#e2f3ee}html body.light:has(#appView):has(#appView) .financial-ui .financial-usd-input[readonly]{background:transparent}html body.light:has(#appView):has(#appView) .financial-ui .fx-balances{background:#ffffff80}html body.light:has(#appView):has(#appView) .financial-ui .financial-preview-status{color:#a32d35}html body.light:has(#appView):has(#appView) .financial-ui .financial-date-body :is(input,select){background:#fff;color:#163f45}html body.light:has(#appView):has(#appView) .financial-ui select option{background:#fff;color:#163f45}
@media(max-width:370px){html body:has(#appView):has(#appView) .financial-ui .financial-title{font-size:21px}html body:has(#appView):has(#appView) .financial-ui .fx-field{padding:9px 8px}html body:has(#appView):has(#appView) .financial-ui .fx-field input{font-size:24px}html body:has(#appView):has(#appView) .financial-ui .fx-rate input{font-size:20px}html body:has(#appView):has(#appView) .financial-ui .financial-net-value{font-size:34px}html body:has(#appView):has(#appView) .financial-ui .fx-balance-row{grid-template-columns:52px minmax(0,1fr) 14px minmax(0,1fr);padding:9px 8px;gap:3px}html body:has(#appView):has(#appView) .financial-ui .fx-balance-row b{font-size:13px}html body:has(#appView):has(#appView) .financial-ui .fx-net-sub{font-size:11px;gap:5px}}

.financial-ui .fx-usdt-unit{text-align:center}.financial-ui .fx-usdt-unit small{display:block;margin-top:3px}.financial-ui .financial-destination:has(.hidden){display:none}.financial-ui .financial-destination{margin-bottom:9px}
html body:has(#appView):has(#appView) .financial-ui #gfCompactPurchase{line-height:1.35}
html body:has(#appView):has(#appView) .financial-ui .financial-title{margin:0}
html body:has(#appView):has(#appView) .financial-ui .fx-field input,html body:has(#appView):has(#appView) .financial-ui .financial-usd-input{line-height:1.2}
html body:has(#appView):has(#appView) .financial-ui .financial-form-error:empty{display:none}


/* One shared financial form language. Modules supply identity, never accounting rules. */
.financial-ui{--fu-identity:#168775;--fu-icon:'+';--fx-muted:#a9bec1;--fx-line:#b8e7e329;--fx-glass:linear-gradient(145deg,#31535a87,#0d252ead);--fx-gold:#ffe09a;--fx-teal:#5ff0df;--fx-input:#fff;--fu-surface:linear-gradient(145deg,color-mix(in srgb,var(--fu-identity) 14%,#1c3941),#071b24 66%,#113130)}
html body:has(#appView):has(#appView) .financial-ui .modal-sheet,html body:has(#appView):has(#appView) .financial-ui.financial-panel{background:var(--fu-surface);color:#f6faf9;--fx-muted:#a9bec1;--fx-line:#b8e7e329;--fx-glass:linear-gradient(145deg,#31535a87,#0d252ead);--fx-gold:#ffe09a;--fx-teal:#5ff0df;--fx-input:#fff;line-height:1.35}
html body.light:has(#appView):has(#appView) .financial-ui .modal-sheet,html body.light:has(#appView):has(#appView) .financial-ui.financial-panel{background:linear-gradient(145deg,#f9fcfb,color-mix(in srgb,var(--fu-identity) 5%,#edf4f3));color:#153d43;--fx-muted:#526c70;--fx-line:#476f702f;--fx-glass:linear-gradient(145deg,#ffffffcf,#e6f1f1db);--fx-gold:#806019;--fx-teal:#08796f;--fx-input:#163f45}
html body:has(#appView):has(#appView) .financial-ui .financial-title:before{content:var(--fu-icon);background:linear-gradient(140deg,color-mix(in srgb,var(--fu-identity) 80%,#fff),var(--fu-identity));color:#fff}
html body:has(#appView):has(#appView) .financial-ui .financial-title{margin:0;font-size:23px;line-height:1.22}
html body:has(#appView):has(#appView) .financial-ui label{display:block;color:var(--fx-muted);font-size:11px;margin:0 0 5px;line-height:1.4}
html body:has(#appView):has(#appView) .financial-ui .fu-account{border:1px solid var(--fx-line);background:var(--fx-glass);border-radius:17px;padding:10px 12px;margin-bottom:10px}
html body:has(#appView):has(#appView) .financial-ui .fu-account select{min-height:30px;font-size:16px;background:transparent;color:var(--fx-input);border:0;padding:0;margin:0;width:100%;box-shadow:none}
html body:has(#appView):has(#appView) .financial-ui.compact-fx .fu-account{padding:0;margin:0;border:0;background:transparent}
html body:has(#appView):has(#appView) .financial-ui .fu-amount{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.35fr) minmax(0,.9fr);gap:7px;align-items:center;border:1px solid var(--fx-line);background:var(--fx-glass);border-radius:18px;padding:12px;margin-bottom:10px}
html body:has(#appView):has(#appView) .financial-ui .fu-amount>label{grid-column:1/-1}
html body:has(#appView):has(#appView) .financial-ui .fu-amount>input{min-width:0;width:100%;background:var(--fu-input-bg,#102a32);border:1px solid var(--fu-input-border,#759b9f);box-shadow:inset 0 1px 3px #0001;border-radius:10px;min-height:46px;line-height:1.2;color:var(--fx-input);font-size:25px;font-weight:800;text-align:center;direction:ltr;padding:6px 4px;margin:0;letter-spacing:-.6px}
html body:has(#appView):has(#appView) .financial-ui .fu-amount-side{min-width:0;text-align:right;font-variant-numeric:tabular-nums}.financial-ui .fu-amount-side small{display:block;color:var(--fx-muted);font-size:10px;margin-bottom:5px}.financial-ui .fu-amount-side b{display:block;font-size:14px;overflow-wrap:anywhere}.financial-ui [data-balance=after] b{color:var(--fx-gold)}.financial-ui .fu-negative [data-balance=after] b{color:#f7a0a8}
html body:has(#appView):has(#appView) .financial-ui.compact-fx .fu-amount{display:block;border:0;border-radius:0;padding:0;margin:0;background:transparent}
.financial-ui.compact-fx .fu-amount-side,.financial-ui .fu-amount-simple .fu-amount-side{display:none}
html body:has(#appView):has(#appView) .financial-ui .fu-amount-simple{display:block}
html body:has(#appView):has(#appView) .financial-ui .fu-amount-simple>input{width:100%;text-align:right}
html body:has(#appView):has(#appView) .financial-ui .balance-preview{border:0;padding:0;margin:7px 0;background:transparent}
html body:has(#appView):has(#appView) .financial-ui .financial-footer{display:grid;gap:7px;margin:10px 0 0}
html body:has(#appView):has(#appView) .financial-ui .financial-footer .financial-submit{margin:0;width:100%;min-height:50px;padding:12px 16px;border-radius:16px;background:linear-gradient(110deg,color-mix(in srgb,var(--fu-identity) 85%,#fff),var(--fu-identity));box-shadow:0 8px 22px color-mix(in srgb,var(--fu-identity) 18%,transparent);font-size:17px;font-weight:800;color:#fff;border:1px solid color-mix(in srgb,var(--fu-identity) 70%,#fff)}
html body:has(#appView):has(#appView) .financial-ui .financial-secondary{min-height:44px;padding:9px 12px;border:1px solid var(--fx-line);background:var(--fx-glass);color:inherit;border-radius:14px;font-size:14px;margin:0}
html body:has(#appView):has(#appView) .financial-ui .financial-details,html body:has(#appView):has(#appView) .financial-ui .financial-date{border:1px solid var(--fx-line);border-radius:15px;background:#9ac5c413;margin:8px 0;overflow:hidden}
html body:has(#appView):has(#appView) .financial-ui .financial-date summary{color:inherit;min-height:42px;display:flex;align-items:center;justify-content:space-between;cursor:pointer;padding:10px 13px;font-size:12px}
.financial-ui .financial-date-body>label{display:none!important}.financial-ui .financial-date-body{padding:0 12px 12px}.financial-ui .financial-detail-body{padding:4px 12px 12px}
html body:has(#appView):has(#appView) .financial-ui .financial-date-body input,html body:has(#appView):has(#appView) .financial-ui .financial-date-body select{font-size:16px;background:var(--fx-glass);color:var(--fx-input);border:1px solid var(--fx-line);border-radius:10px;min-height:44px}
.financial-ui .financial-reverse{display:flex;align-items:center;justify-content:center;gap:7px;width:100%;font-size:13px;padding:9px;margin:0 0 10px;background:transparent;color:var(--fx-gold);border:1px solid var(--fx-line);border-radius:13px}.financial-ui .financial-reverse svg{width:19px;height:19px}
.financial-ui .fu-display,.financial-ui .fu-display>b{font-size:28px;font-weight:800;line-height:1.2;color:var(--fx-input);font-variant-numeric:tabular-nums;direction:ltr;text-align:right}
html body:has(#appView):has(#appView) .financial-ui .fx-entry [data-family-lock]{padding:0;border:1px solid #f6ca6487;background:linear-gradient(150deg,#997b336b,#433719b3);border-radius:15px;font-size:23px;min-height:0}.financial-ui [data-family-lock][aria-pressed=false]{border-color:#4fd6ca99;background:#1781865c}
html body:has(#appView):has(#appView) .financial-ui .financial-usd-output{font-size:29px;font-weight:800;line-height:1.2;color:var(--fx-teal);font-variant-numeric:tabular-nums;display:block}.financial-ui .financial-usd-output>strong,.financial-ui .financial-net-value>strong,.financial-ui .financial-net-value>b{font:inherit;color:inherit}
.financial-ui .financial-preview-status:empty{display:none}.financial-ui .financial-footer>small{font-size:11px;color:var(--fx-muted)}.financial-ui .financial-form-error{font-size:12px}.financial-ui .financial-form-error:empty{display:none}
html body:has(#appView):has(#appView) #fxScreen .family-purchase-summary.financial-panel{padding:12px;border:1px solid var(--fx-line);border-radius:22px;--fu-icon:'₮';box-shadow:0 9px 24px #0002}
#fxScreen .financial-panel .financial-net-value{font-size:34px}#fxScreen .financial-panel .fx-net{padding:11px 13px 10px}#fxScreen .financial-panel .fx-net-sub{margin-top:6px;padding-top:6px}#fxScreen .financial-panel .fx-account{margin-bottom:9px;padding:8px 10px}#fxScreen .financial-panel .fx-current strong{font-size:15px}#fxScreen .financial-panel .fx-entry{margin-bottom:6px}#fxScreen .financial-panel .fx-field{padding:8px 9px}#fxScreen .financial-panel .fx-fee-note{margin-bottom:8px}#fxScreen .financial-panel .fx-expected{padding:8px 12px}#fxScreen .financial-panel .fx-balance-row{padding:7px 9px}#fxScreen .financial-panel .financial-footer{margin-top:7px;gap:4px}#fxScreen .financial-panel .financial-footer button{width:100%}
html body:has(#appView):has(#appView) .financial-ui .selected-family{padding:10px 12px;margin:0 0 10px;border:1px solid var(--fx-line);border-radius:16px;background:var(--fx-glass)}.financial-ui .selected-family .receipt-sponsor{font-size:18px}.financial-ui .selected-family .receipt-meta{font-size:12px;padding:4px 0}.financial-ui .selected-family .receipt-state{font-size:11px}.financial-ui .selected-family .receipt-beneficiary{font-size:12px}
.financial-operation .financial-secondary-copy{font-size:11px;color:var(--muted);margin:5px 0;line-height:1.5}.financial-operation .selection-summary{padding:10px 12px;font-size:13px;margin:10px 0}.financial-operation .form-card:has(.financial-date){padding:0;margin:10px 0;background:transparent;border:0}.financial-operation .manage-fold{margin-top:14px}
#financialConfirmModal{z-index:2000;align-items:center;padding:16px}#financialConfirmModal .modal-sheet{border-radius:24px;max-height:85dvh}#financialConfirmText{white-space:pre-line;line-height:1.7;font-size:14px;padding:12px;border:1px solid var(--fx-line);background:var(--fx-glass);border-radius:16px;margin:10px 0;overflow-wrap:anywhere}#financialConfirmModal.financial-danger #financialConfirmAccept{background:#9d354b;border-color:#be6073}
html body:has(#appView):has(#appView) #fxScreen .family-purchase-summary.financial-panel{position:relative;top:auto;z-index:auto}
html body:has(#appView):has(#appView) .financial-ui .financial-footer button{display:flex;align-items:center;justify-content:center;gap:8px}
.financial-ui .financial-footer button svg{width:22px;height:22px;flex:0 0 22px}
@media(max-width:370px){html body:has(#appView):has(#appView) .financial-ui .fu-amount>input{font-size:23px}.financial-ui .fu-amount-side b{font-size:12px}.financial-ui .fu-amount{gap:4px}.financial-ui .fx-net-sub{flex-wrap:wrap}.financial-ui .fu-display,.financial-ui .fu-display>b{font-size:24px}}

.financial-ui .financial-usd-output{text-align:right}

/* Shared selection and targeted compact financial refinements. */
#appView .op-card.selectable-row{display:grid;grid-template-columns:24px minmax(0,1fr);gap:10px;align-items:center;padding:10px}
#appView .op-card.selectable-row>.op-summary,#appView .op-card.selectable-row>.family-journey-head{min-width:0;width:100%;padding:0}
#appView #fxScreen .selectable-row>.family-journey-head{grid-template-columns:34px minmax(0,1fr);padding:0}
#appView #fxScreen .selectable-row .family-expand-icon{display:none}
#appView .sponsorship-checkbox{appearance:none;display:block;flex:0 0 24px;width:24px;height:24px;min-height:24px;margin:0;border:2px solid var(--muted);border-radius:5px;background:var(--panel);box-shadow:none;background-position:center;background-repeat:no-repeat;background-size:19px;cursor:pointer}
#appView .sponsorship-checkbox:is(:checked,[data-selected=true]){border-color:var(--accent);background-color:var(--accent);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m5 12 4 4 10-10' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")}
#appView .sponsorship-checkbox:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
#appView .family-message-choice{display:grid;grid-template-columns:24px minmax(0,1fr) auto}
#transferSelectedSummary{font-size:12px;color:var(--muted);font-weight:600;text-align:center}
html body:has(#appView):has(#appView) .financial-ui .financial-purchase-result{border:1px solid var(--fx-line);border-radius:17px;background:var(--fx-glass);padding:11px 13px;margin-bottom:8px}
html body:has(#appView):has(#appView) .financial-ui .financial-purchase-result>.fx-net,html body:has(#appView):has(#appView) .financial-ui .financial-purchase-result>.fx-expected{border:0;border-radius:0;background:none;box-shadow:none;padding:0;margin:0}
html body:has(#appView):has(#appView) .financial-ui .financial-purchase-result>.fx-net{font-size:12px}
html body:has(#appView):has(#appView) .financial-ui .financial-purchase-result>.fx-expected{margin-top:8px;padding-top:8px;border-top:1px solid var(--fx-line)}
html body:has(#appView):has(#appView) .financial-ui .financial-purchase-result .financial-net-value{font-size:31px}
html body:has(#appView):has(#appView) .financial-ui .financial-purchase-result .financial-usd-output{font-size:23px;color:var(--fx-input)}
.financial-purchase-result .fx-coin{display:none!important}.financial-purchase-result .fx-net-sub{margin-top:5px!important;padding-top:5px!important;font-size:11px!important}
html body:has(#appView):has(#appView) .financial-ui .financial-balances-inline{border:0;border-radius:0;background:transparent;margin:4px 0}
html body:has(#appView):has(#appView) .financial-ui .financial-balances-inline .fx-balance-row{grid-template-columns:70px minmax(0,1fr) 14px minmax(0,1fr);gap:4px;padding:6px 0}
html body:has(#appView):has(#appView) .financial-ui .financial-balances-inline .fx-what{display:flex;align-items:center;gap:4px;font-weight:600}
html body:has(#appView):has(#appView) .financial-ui .financial-balances-inline small{font-size:10px;margin:0}
html body:has(#appView):has(#appView) .financial-ui .financial-balances-inline .fx-balance-row>div:not(.fx-what){display:flex;flex-wrap:wrap;align-items:center;gap:4px}
html body:has(#appView):has(#appView) .financial-ui .financial-balances-inline b{font-size:12px;color:var(--fx-input)}
.financial-ui{--fu-input-bg:#102a32;--fu-input-border:#759b9f}
body.light .financial-ui{--fu-input-bg:#fff;--fu-input-border:#789698}
html body:has(#appView):has(#appView) .financial-ui .fx-field input:not([readonly]),html body:has(#appView):has(#appView) .financial-ui .financial-usd-input:not([readonly]){border:1px solid var(--fu-input-border);background:var(--fu-input-bg);border-radius:10px;min-height:44px;padding:6px 5px}
html body:has(#appView):has(#appView) .financial-ui :is(.fu-amount>input,.fx-field input,.financial-usd-input):focus{border-color:var(--fu-identity);outline:2px solid color-mix(in srgb,var(--fu-identity) 65%,white);outline-offset:1px;box-shadow:0 0 0 3px color-mix(in srgb,var(--fu-identity) 12%,transparent)}
.financial-ui .financial-footer .financial-submit:not(:disabled):hover{filter:brightness(1.07)}
.financial-ui .financial-footer .financial-submit:not(:disabled):active{transform:scale(.99);filter:brightness(.95)}
.financial-ui .financial-footer .financial-submit.is-loading{cursor:progress;opacity:.7}
#fxAuthoritativeSummary:has(.financial-purchase-result){background:transparent;border:0;padding:0}


/* Login presentation is scoped so approved authenticated screens stay unchanged. */
#loginView{--login-accent:#287a58;--login-ink:#173e2d;--login-border:rgba(39,104,76,.2);position:relative;isolation:isolate;display:flex;flex-direction:column;justify-content:center;gap:25px;min-height:100dvh;padding:calc(22px + env(safe-area-inset-top)) 20px calc(22px + env(safe-area-inset-bottom));background:radial-gradient(ellipse at 88% 16%,rgba(87,171,131,.14),transparent 50%),radial-gradient(ellipse at 8% 90%,rgba(109,185,181,.1),transparent 45%),#f5f6f0;color:#203c30;}
#loginView.guest-login-open{--login-accent:#147b83;--login-ink:#16484e;--login-border:rgba(25,124,132,.23);background:radial-gradient(ellipse at 88% 16%,rgba(88,184,191,.16),transparent 50%),radial-gradient(ellipse at 8% 90%,rgba(101,164,176,.1),transparent 45%),#f2f7f6;gap:18px;}
#loginView .login-card{width:min(420px,100%);margin:0 auto;background:rgba(255,255,255,.79);border:1px solid rgba(255,255,255,.95);border-radius:30px;padding:30px;box-shadow:0 22px 65px rgba(31,69,49,.08),inset 0 0 0 1px var(--login-border);backdrop-filter:blur(16px);}
#loginView .login-brand{text-align:center;margin-bottom:27px;}
#loginView .login-logo{display:block;object-fit:contain;width:100px;height:100px;margin:0 auto 15px;padding:9px;border:1px solid #e6eee7;border-radius:25px;background:#fff;box-shadow:0 9px 24px rgba(21,80,42,.06);}
#loginView .login-brand h1{font-size:31px;line-height:1.3;margin:0;font-weight:850;color:var(--login-ink);}
#loginView label{color:#53685e;font-size:13px;margin:17px 2px 8px;font-weight:650;}
#loginView input{font-size:16px;min-height:52px;color:#203c30;background:rgba(255,255,255,.83);border:1px solid var(--login-border);border-radius:15px;padding:13px 15px;box-shadow:inset 0 1px 2px rgba(25,60,40,.02);}
#loginView input:focus-visible{outline:3px solid color-mix(in srgb,var(--login-accent) 15%,transparent);outline-offset:2px;border-color:var(--login-accent);}
#loginView .primary{color:#fff;background:var(--login-accent);border:1px solid transparent;border-radius:15px;min-height:52px;font-size:16px;margin-top:23px;box-shadow:0 7px 18px color-mix(in srgb,var(--login-accent) 15%,transparent);}
#loginView .login-board-entry{display:flex;align-items:center;justify-content:center;gap:9px;width:100%;min-height:49px;margin-top:14px;padding:10px 15px;border:1px solid #bfd6d6;border-radius:15px;background:#edf6f5;color:#266269;font-size:14px;font-weight:750;}
#loginView .error-text{margin:10px 0 0;line-height:1.6;min-height:0;color:#ad3544;}
#loginView .error-text:empty{display:none;}
#loginView #loginForm:not(.hidden){display:block!important;}
#loginView .login-install{display:flex;align-items:center;gap:12px;width:min(420px,100%);margin:0 auto;padding:10px 14px;min-height:64px;border-radius:20px;border:1px solid #d6c498;background:linear-gradient(120deg,#fffaf0,#f1ead7);color:#74602d;box-shadow:0 7px 24px rgba(159,129,57,.12),0 0 0 4px rgba(207,177,104,.06);font-weight:800;font-size:15px;animation:loginInstallIn .4s ease-out;}
#loginView .login-install>span:nth-child(2){flex:1;text-align:right;}
#loginView .install-logo{display:grid;place-items:center;width:42px;height:42px;background:#fff;border:1px solid #e9e4d5;border-radius:12px;flex:none;}
#loginView .install-logo img{width:31px;height:31px;object-fit:contain;}
#loginView #guestLoginForm h2{text-align:center;font-size:18px;margin:0 0 20px;color:var(--login-accent);}
#loginView #guestLoginPin{letter-spacing:.65em;text-indent:.65em;text-align:center;font-size:25px;font-weight:750;height:56px;}
#loginView .login-keypad{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:14px;}
#loginView .login-keypad button{display:grid;place-items:center;min-height:47px;border:1px solid var(--login-border);border-radius:13px;background:rgba(255,255,255,.8);color:var(--login-ink);font-size:21px;font-weight:650;}
#loginView .login-keypad .key-utility{font-size:12px;background:#edf5f4;}
#loginView .login-return{width:100%;padding:12px 4px;margin-top:9px;border:0;background:none;color:var(--login-accent);font-size:13px;font-weight:700;min-height:44px;}
#loginView button:focus-visible,.login-install-dialog button:focus-visible{outline:3px solid #71a6a8;outline-offset:3px;}
.login-install-dialog{width:min(420px,calc(100% - 28px));max-height:85dvh;overflow:auto;padding:22px;border:1px solid #d6e5dc;border-radius:26px;background:#fafcf9;color:#203c30;box-shadow:0 20px 70px rgba(0,0,0,.2);}
.login-install-dialog:not([open]){display:none;}
.login-install-dialog::backdrop{background:rgba(12,30,23,.42);backdrop-filter:blur(5px);}
.install-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:15px;}
.install-dialog-head h2{font-size:20px;margin:0;}.install-dialog-head button{display:grid;place-items:center;min-width:42px;height:42px;border:1px solid #d9e3dc;border-radius:13px;color:#345b49;background:#fff;}
.login-install-dialog ol{padding-inline-start:24px;margin:23px 0;line-height:1.8;font-size:15px;}.login-install-dialog li+li{margin-top:12px;}.login-install-dialog p{font-size:12px;color:#617568;line-height:1.7;}.login-install-dialog .secondary{background:#eff6f0;color:#24563d;border-color:#cedfd2;}
@keyframes loginInstallIn{from{opacity:0;transform:translateY(-9px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:380px){#loginView{padding-inline:16px;gap:20px;}#loginView .login-card{padding:24px;}#loginView.guest-login-open .login-card{padding:22px;}#loginView.guest-login-open .login-logo{width:80px;height:80px;margin-bottom:10px;}#loginView.guest-login-open .login-brand{margin-bottom:18px;}}
@media(min-width:760px){#loginView{min-height:calc(100dvh - 36px);border-radius:28px;}}
@media(prefers-reduced-motion:reduce){#loginView .login-install{animation:none;}}
/* The existing platform theme also targets hidden app shells; isolate login controls. */
html body:has(#appView):has(#appView) #loginView input{background:rgba(255,255,255,.83);color:#203c30;border-color:var(--login-border);}
html body:has(#appView):has(#appView) #loginView input:focus-visible{border-color:var(--login-accent);}
html body:has(#appView):has(#appView) #loginView .primary{background:var(--login-accent);color:#fff;}
#loginView.guest-login-open .login-card{padding:24px;}
#loginView.guest-login-open .login-logo{width:80px;height:80px;margin-bottom:10px;}
#loginView.guest-login-open .login-brand{margin-bottom:18px;}
#loginView.guest-login-open .login-brand h1{font-size:28px;}
#loginView #guestLoginForm h2{margin-bottom:12px;}
#loginView{justify-content:flex-start;}
#loginView .login-card{margin-block:auto;}


body[data-stage5] #familyHomeActions,body[data-stage5] #gfActions,body[data-stage5] [data-operational-module="general"]{display:none!important}
.s5-controls{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin:12px 0;align-items:stretch}
.s5-control{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;min-width:0;min-height:72px;padding:8px 3px;border:1px solid var(--line,#d7dfdc);border-radius:17px;background:var(--card,rgba(255,255,255,.65));box-shadow:0 3px 12px #122b2320;cursor:pointer;font-size:12px;font-weight:700;color:inherit}
.s5-control:disabled{opacity:.42;cursor:default}.s5-control .ui-icon{height:22px;width:22px;color:var(--accent,#b45c79)}
.s5-options{display:grid;gap:8px;margin:12px 0}.s5-options button{min-height:48px;text-align:right;margin:0!important}
.s5-sheet .modal-head{display:flex;align-items:center;gap:8px}.s5-sheet .modal-head h2{flex:1;min-width:0;font-size:18px;line-height:1.3;margin:0;text-align:center}.s5-sheet #s5Back,.s5-sheet #s5Close{flex:0 0 auto;width:auto;min-width:50px;min-height:38px;margin:0;padding:6px 8px;font-size:13px;line-height:1.2}
.s5-sheet{max-width:560px;max-height:92dvh;overflow:auto}.s5-sheet input,.s5-sheet select{min-height:44px}.s5-sheet label{font-size:13px;margin-top:10px}
.s5-sheet .boxes-clock select{min-width:0}.s5-sheet .boxes-datetime input{margin:0}.s5-sheet .financial-date>input[type=hidden]{display:none}
.s5-selections{max-height:min(38dvh,330px);overflow-y:auto;overscroll-behavior:contain;border-block:1px solid var(--line,#d7dfdc)}
.s5-sheet #s5Save{position:sticky;bottom:0;z-index:3;box-shadow:0 -8px 16px rgba(0,0,0,.12)}
.s5-selection{display:grid;grid-template-columns:1fr auto;align-items:center;gap:6px;padding:8px 0;border-bottom:1px solid var(--line,#d7dfdc)}
.s5-selection label{display:flex;align-items:center;gap:6px;margin:0}.s5-selection input[type=checkbox]{width:20px;min-height:20px;flex-shrink:0;margin:0}.s5-selection>input{grid-column:1/-1;max-width:180px;margin:0;min-height:38px}
#s5RecipientOptions select{max-height:48px}
.s5-sticky{position:sticky;bottom:0;z-index:2;background:var(--card,#f5f4ef);border:1px solid var(--accent,#b45c79);padding:12px;border-radius:14px;font-weight:700}
.s5-event{margin:7px 0}.s5-event>summary{list-style:none;cursor:pointer}.s5-event .op-summary{display:block;padding:10px}.s5-event .family-trace-details{padding:10px}.s5-inline-history{margin-top:10px}
.s5-balances{margin:8px 0;padding:12px;font-size:12px}.s5-balances p{margin:7px 0}.s5-blocker{display:grid;gap:6px;border-bottom:1px solid var(--line,#ddd);padding:8px}.s5-blocker button{min-height:44px}
body:not(.light) .s5-control,body:not(.light) .s5-sticky{background:#141414;color:#f6eee4;border-color:#665538}
html body:not(.light):has(#appView):has(#appView) #s5Modal .s5-sheet{background:#171719;color:#f6eee4;border:1px solid #5a4a36}
html body.light:has(#appView):has(#appView) #s5Modal .s5-sheet{background:#fbfbf9;color:#263238;border:1px solid #d8ddd9}
@media(max-width:600px){.s5-sheet{max-width:100%;width:100%;max-height:90dvh;border-radius:22px 22px 0 0}}
@media(max-width:350px){.s5-controls{gap:4px}.s5-control{font-size:11px}}


/* Local operation dialogs: preserve the approved palette and homepage components. */
html body[data-stage5] :is(#s5Modal,#gfModal,#receiptModal,#fxModal,#manageModal,#financialConfirmModal,#publicationModal,#uxWorkflowModal):not(.hidden){display:flex!important;align-items:center!important;justify-content:center!important;inset:auto 0!important;top:var(--ux-view-top,0px)!important;height:var(--ux-view-height,100dvh)!important;padding:12px!important;background:rgba(0,0,0,.48);box-sizing:border-box}
html body[data-stage5] :is(#s5Modal,#gfModal,#receiptModal,#fxModal,#manageModal,#financialConfirmModal,#publicationModal,#uxWorkflowModal)>.modal-sheet{position:relative!important;inset:auto!important;transform:none!important;margin:0!important;width:min(480px,100%)!important;max-width:480px!important;max-height:calc(var(--ux-view-height,100dvh) - 24px)!important;overflow:auto!important;overscroll-behavior:contain;border-radius:22px!important;padding:14px!important;min-height:0!important}
html body[data-stage5] .modal .grab{display:none}
html body[data-stage5] .modal.ux-covered{visibility:hidden!important;pointer-events:none!important}
html body.ux-modal-open{position:fixed;top:var(--ux-scroll-top,0);left:0;right:0;width:100%;overflow:hidden;overscroll-behavior:none}
#uxWorkflowModal .ux-native-workflow{display:block!important;padding:0;margin:0;animation:none;min-height:0}
#uxWorkflowModal .ux-native-workflow>.op-head{display:none}
#uxWorkflowModal .family-purchase-summary{position:static;top:auto;margin:0 0 8px}
#uxWorkflowModal .modal-head{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:10px}
#uxWorkflowModal .modal-head h2{font-size:18px;margin:0}
#uxWorkflowClose{width:auto;margin:0;min-height:36px}
#uxReceiptChoice{margin-bottom:8px}#uxReceiptChoice label{font-size:13px}
#uxTransferAccounts{display:grid;grid-template-columns:minmax(0,1fr) 32px minmax(0,1fr);align-items:center;gap:5px}
#uxTransferAccounts>.fu-account{min-width:0;margin:0!important;padding:0!important}
#uxTransferAccounts select{width:100%;min-width:0;font-size:16px;padding-inline:5px}
html body[data-stage5] #financialReverseTransfer{display:flex;align-items:center;justify-content:center;min-height:32px!important;height:32px!important;width:32px!important;min-width:32px!important;padding:4px!important;margin:15px 0 0!important;border-radius:50%;font-size:0!important;box-shadow:none}
#financialReverseTransfer.hidden{display:none!important}#financialReverseTransfer .ui-icon{height:20px;width:20px}
#s5Options:has([data-s5-action^="currency:"]){grid-template-columns:repeat(auto-fit,minmax(90px,1fr));gap:8px}
#s5Options [data-s5-action^="currency:"]{text-align:center;min-height:46px}
#s5Accounts{margin:10px 0;border:1px solid var(--line);border-radius:12px}#s5Accounts summary{display:flex;justify-content:space-between;gap:8px;padding:10px;font-size:13px;cursor:pointer}#s5Accounts small{font-size:12px}#s5Endpoints{padding:0 10px 10px}
.ux-amount{position:relative}.ux-amount input{padding-inline-end:68px!important}.ux-amount>b{position:absolute;inset-inline-end:12px;top:50%;transform:translateY(-50%);font-size:13px;pointer-events:none}
#s5Preview{white-space:pre-line;font-size:12px;line-height:1.65;margin:8px 0}
html body[data-stage5] #s5Save{position:static;box-shadow:none;margin-top:8px;min-height:44px}
@media(max-height:500px){html body[data-stage5] .modal>.modal-sheet{border-radius:16px!important;padding:10px!important}}

/* LOCAL VISUAL CORRECTIONS */
/* Shared selection controls must not inherit text-field padding or backgrounds. */
html body[data-stage5]:has(#appView) :is(input[type="checkbox"],.sponsorship-checkbox){
 appearance:none;-webkit-appearance:none;display:block;box-sizing:border-box;
 flex:0 0 24px;width:24px;height:24px;min-width:24px;min-height:24px;max-width:24px;max-height:24px;
 padding:0;margin:0;border:2px solid var(--muted);border-radius:5px;
 background:var(--panel2);box-shadow:none;cursor:pointer;
 background-position:center;background-repeat:no-repeat;background-size:19px;
 --selection-mark:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m5 12 4 4 10-10' fill='none' stroke='%2315130d' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
html body.light[data-stage5]:has(#appView) :is(input[type="checkbox"],.sponsorship-checkbox){
 --selection-mark:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m5 12 4 4 10-10' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
html body[data-stage5]:has(#appView) :is(input[type="checkbox"],.sponsorship-checkbox):is(:checked,[data-selected="true"]){
 border-color:var(--accent);background-color:var(--accent);background-image:var(--selection-mark);
}
html body[data-stage5]:has(#appView) input[type="checkbox"]:indeterminate{
 border-color:var(--accent);background:var(--panel2) linear-gradient(var(--accent),var(--accent)) center/12px 3px no-repeat;
}
html body[data-stage5]:has(#appView) :is(input[type="checkbox"],.sponsorship-checkbox):focus-visible{outline:2px solid var(--accent);outline-offset:3px}
html body[data-stage5]:has(#appView) input[type="checkbox"]:disabled{cursor:not-allowed;opacity:.5}

/* The hidden grab handle is not a grid row. Text owns the flexible space. */
html body[data-stage5]:has(#appView) #publicationModal>.publication-sheet{
 display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;grid-template-columns:minmax(0,1fr);
 gap:10px;height:min(82dvh,760px);overflow:hidden!important;
}
html body[data-stage5]:has(#appView) #publicationModal .modal-head{grid-row:1;min-width:0}
html body[data-stage5]:has(#appView) #publicationModal .publication-modal-meta{grid-row:2;min-width:0;overflow-wrap:anywhere}
html body[data-stage5]:has(#appView) #publicationModal .publication-text{grid-row:3;height:100%;min-height:0;min-width:0;max-height:none;overflow:auto;font-size:16px}
html body[data-stage5]:has(#appView) #publicationModal .publication-actions{
 grid-row:4;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:auto;
 align-content:start;align-items:start;gap:8px;min-width:0;
}
html body[data-stage5]:has(#appView) #publicationModal .publication-actions button{
 height:44px;min-height:44px;max-height:44px;width:100%;min-width:0;margin:0;padding:8px 12px;
 display:flex;align-items:center;justify-content:center;line-height:1.4;font-size:15px;
}
html body[data-stage5]:has(#appView) #publicationModal .publication-copy-status{grid-column:1/-1;overflow-wrap:anywhere;line-height:1.5}
html body[data-stage5]:has(#appView) #publicationModal .publication-copy-status:empty{display:none}
/* A percentage cap inside an auto grid column was splitting amounts and AM/PM. */
html body[data-stage5] #appView .family-message-receipt{max-width:none;min-width:0}
html body[data-stage5] #appView .family-message-receipt :is(b,small){white-space:nowrap;overflow-wrap:normal;font-variant-numeric:tabular-nums}
@media(forced-colors:active){
 html body[data-stage5]:has(#appView) input[type="checkbox"]{appearance:auto;-webkit-appearance:auto;background:none;forced-color-adjust:auto}
 html body[data-stage5]:has(#appView) .sponsorship-checkbox[data-selected="true"]{forced-color-adjust:none;background-color:Highlight;border-color:Highlight;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m5 12 4 4 10-10' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")}
}

/* Independent sponsorship periods: color is paired with a written state. */
.family-period-toolbar h2{font-size:17px;margin:0 0 12px}.family-period-toolbar select{width:100%;min-height:46px;background:var(--panel2);color:var(--text);border:1px solid var(--line);border-radius:12px;padding:10px}.family-period-toolbar label{display:block;font-size:12px;color:var(--muted);margin-bottom:6px}.family-period-toolbar p{font-size:12px;line-height:1.8;margin:10px 0 0}.family-period-settings{padding:14px}.family-period-year{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}.family-period-year select{width:125px;padding:9px;border:1px solid var(--line);background:var(--panel2);color:var(--text);border-radius:10px}.family-period-legend{display:flex;flex-wrap:wrap;gap:12px;font-size:12px;margin-bottom:14px}.family-period-legend span:before{content:"";display:inline-block;width:8px;height:8px;border-radius:50%;margin-inline-end:5px;background:currentColor}.period-legend-open{color:#22b57c}.period-legend-closed{color:var(--danger)}.period-legend-unopened{color:var(--muted)}.family-month-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin-bottom:15px}.family-month-tile{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:6px;min-height:87px;border-radius:13px;padding:10px 5px;border:1px solid var(--line);background:var(--panel2);color:var(--text)}.family-month-tile b{font-size:13px}.family-month-tile span,.family-month-tile small{font-size:11px}.family-month-open{background:rgba(28,167,112,.13);border-color:#29996d;color:#53d6a0}.family-month-closed{background:rgba(207,67,67,.12);border-color:#b74a4a;color:#ff9292}.family-month-unopened{background:var(--panel2);color:var(--muted);border-style:dashed}.family-month-tile:disabled{opacity:.7;cursor:default}.family-month-selected{outline:2px solid var(--accent);outline-offset:2px}.family-period-settings>.primary{width:100%;min-height:45px}.family-period-settings>.field-note{font-size:12px;line-height:1.8}.light .family-month-open{color:#126d49;background:#e5f5ed}.light .family-month-closed{color:#a32424;background:#fbeaea}.family-month-tile:focus-visible{outline:3px solid var(--accent);outline-offset:2px}@media(min-width:640px){.family-month-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}

.receipt-period{padding:12px 14px;border:1px solid var(--line,#78818b);border-radius:14px;margin:12px 0;background:var(--card-bg,transparent)}.receipt-period label{display:block;font-weight:700;margin-bottom:6px}.receipt-period select{width:100%;max-width:100%;font:inherit}.receipt-period p{margin:8px 0 0;font-size:.88rem;line-height:1.6}.receipt-period[data-early="true"]{border-color:#ca8a04;background:rgba(202,138,4,.1)}.receipt-period[data-early="true"] p{color:var(--text,#f1f5f9);font-weight:700}

.receipt-month-sheet h3{font-size:1.35rem;margin:16px 0 8px;line-height:1.6}
.receipt-step-label{font-size:.85rem;opacity:.8;margin:8px 0}
.receipt-month-instruction,#receiptMonthChoiceStatus{font-size:.93rem;line-height:1.8}
.receipt-month-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:20px 0}
.receipt-month-choice{display:flex;flex-direction:column;align-items:center;gap:8px;min-width:0;min-height:194px;padding:18px 8px;border-radius:18px;border:2px solid #64748b;background:rgba(100,116,139,.09);color:inherit;font:inherit;cursor:pointer}
.receipt-month-choice-current{border-color:#2b9b77;background:rgba(43,155,119,.1)}
.receipt-month-choice-advance{border-color:#ca9b36;background:rgba(202,155,54,.1)}
.receipt-month-choice:hover{filter:brightness(1.15)}
.receipt-month-choice:focus-visible{outline:3px solid var(--accent,#e8c76e);outline-offset:4px}
.receipt-month-calendar{position:relative;display:block;width:52px;height:54px;color:inherit}
.receipt-month-calendar svg{width:52px;height:54px;fill:none;stroke:currentColor;stroke-width:1.5}
.receipt-month-calendar b{position:absolute;inset:22px 0 auto;font-size:1rem;line-height:1}
.receipt-month-name{font-size:1.15rem;font-weight:800;text-align:center;line-height:1.5}
.receipt-month-year{font-size:1rem;opacity:.85}
.receipt-month-badge{font-size:.8rem;font-weight:700;padding:4px 9px;border-radius:20px;background:rgba(100,116,139,.16);text-align:center}
.receipt-month-choice-current .receipt-month-badge{color:#5de0b0;background:rgba(43,155,119,.15)}
.receipt-month-choice-advance .receipt-month-badge{color:#edc86c;background:rgba(202,155,54,.15)}
[data-theme="light"] .receipt-month-choice-current .receipt-month-badge{color:#146747}
[data-theme="light"] .receipt-month-choice-advance .receipt-month-badge{color:#805900}
.receipt-month-summary{display:flex;gap:10px;align-items:center;justify-content:space-between;margin-top:6px}
.receipt-month-summary strong{flex:1;min-width:0;font-size:1.1rem;line-height:1.6;overflow-wrap:anywhere}
.receipt-month-summary button{flex:0 0 auto;width:auto;max-width:45%;padding:8px 10px;min-height:40px}
.receipt-month-caption{display:block;font-size:.85rem;opacity:.8}
@media(max-width:340px){.receipt-month-choices{grid-template-columns:1fr}.receipt-month-summary{align-items:flex-start;flex-direction:column}}

.receipt-month-choices{margin:12px 0 0}.receipt-month-choice{min-height:156px;padding:16px 8px;gap:12px}.receipt-month-name{font-size:1rem}.receipt-month-sheet [role="status"]:empty{display:none}.family-month-tile b{line-height:1.6;overflow-wrap:anywhere}

.maintenance-banner{margin:8px 16px 12px;padding:11px 14px;border:1px solid #c59032;border-radius:12px;background:rgba(197,144,50,.12);font-size:.92rem;line-height:1.6;text-align:center}.maintenance-settings p{line-height:1.7;font-size:.92rem}.maintenance-settings button{width:100%}#receiptMonthHint:empty{display:none}

/* The period selector appears only when there is a choice. */
.family-period-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:8px 0 18px}
html body #appView #homeScreen .family-period-heading h2{font-size:clamp(25px,6.4vw,34px);font-weight:800;line-height:1.5;margin:0;min-width:0;overflow-wrap:anywhere}
.family-period-heading .badge{flex:0 0 auto;white-space:nowrap}
.family-period-toolbar{padding:10px 12px;margin-bottom:14px}
.family-period-toolbar select{font-size:17px;font-weight:700}
.family-period-actions{display:flex;flex-wrap:wrap;gap:10px;margin:0 0 16px}
.family-period-actions button{flex:1;min-height:46px;font-size:15px}
.family-period-actions.hidden{display:none}

#appView .box-name-row{display:flex;align-items:center;justify-content:space-between;gap:6px;min-width:0;flex-wrap:wrap}
#appView .families-launcher-badges{display:flex;align-items:center;gap:4px;flex-wrap:wrap;justify-content:flex-end}
#appView .families-launcher-badge{font-size:10px;font-weight:700;line-height:1.4;padding:3px 6px;border-radius:999px;background:color-mix(in srgb,var(--theme-identity) 17%,transparent);color:var(--text);white-space:nowrap}
#appView .families-launcher-early{color:var(--theme-identity)}
#appView .families-closed{display:block;margin-top:14px;padding:10px;border-radius:12px;background:rgba(35,160,110,.13);color:var(--text);font-weight:700;text-align:center;font-size:13px}

#appView.boxes-home-shell .box-card .families-closed{grid-column:1 / -1;justify-self:stretch;width:100%;box-sizing:border-box;min-width:0;white-space:normal;word-break:normal;overflow-wrap:normal;line-height:1.7;display:flex;align-items:center;justify-content:center;gap:7px}
#familyCloseCompleted{width:100%;margin:14px 0;min-height:44px}

/* Persistent family month status and accessible switch. */
#familyMonthStatusCard{margin-bottom:16px}
#familyMonthStatusCard .eyebrow{display:block;margin-bottom:8px}
#appView #familyMonthToggle{display:inline-flex;align-items:center;justify-content:center;gap:9px;width:auto;min-height:44px;flex:0 0 auto;padding:7px 12px;border:1px solid var(--line);border-radius:999px;font-size:13px;font-weight:700;white-space:nowrap;background:var(--theme-icon);color:var(--text)}
#appView #familyMonthToggle:disabled{opacity:.8;cursor:default}
#familyMonthToggle .family-month-toggle-track{display:block;direction:ltr;width:32px;height:19px;padding:3px;border-radius:99px;background:color-mix(in srgb,var(--text) 20%,transparent)}
#familyMonthToggle .family-month-toggle-track i{display:block;width:13px;height:13px;border-radius:50%;background:var(--text);transition:transform .15s}
#familyMonthToggle[aria-checked="true"] .family-month-toggle-track{background:#267b59}
#familyMonthToggle[aria-checked="true"] .family-month-toggle-track i{transform:translateX(13px);background:#fff}
#familyMonthClosedNote{grid-column:1/-1;margin:6px 0 0;font-size:13px}

.campaign-home .section-head {gap:.75rem;flex-wrap:wrap}
.campaign-home h2 {margin:0}
.campaign-home progress {display:block;width:100%;height:.65rem;margin:.65rem 0;accent-color:var(--accent,#d4ad55)}
.campaign-home small {display:block}
#campaignPublication img {display:block;width:min(100%,19rem);margin:.65rem auto;border-radius:.7rem}
#campaignPublication img[hidden] {display:none}
#campaignDownloadPng {display:inline-flex;align-items:center;text-decoration:none}
#campaignDownloadPng.hidden {display:none}

#campaignHome {padding:12px 14px;margin-block:0 8px}
#campaignHome .section-head {margin:0;gap:6px}
#campaignHome .section-head button {width:auto;margin:0;min-height:44px;padding:6px 12px}
#campaignHome h2 {font-size:1.04rem}
#campaignDescription {margin:0 0 6px;color:var(--muted);font-size:.84rem}
.campaign-progress-line {display:flex;justify-content:space-between;align-items:baseline;gap:8px;font-size:.88rem}
#campaignPercent {font-size:1.25rem;font-variant-numeric:tabular-nums}
#campaignHome progress {direction:rtl;appearance:none;-webkit-appearance:none;border:0;border-radius:8px;background:var(--line);margin:4px 0 6px}
#campaignHome progress::-webkit-progress-bar {border-radius:8px;background:var(--line)}
#campaignHome progress::-webkit-progress-value {border-radius:8px;background:var(--accent)}
#campaignHome progress::-moz-progress-bar {border-radius:8px;background:var(--accent)}
#campaignRemaining {color:var(--muted);font-size:.83rem}
#appView #gfDynamicSummary.campaign-holders {grid-template-columns:repeat(auto-fit,minmax(min(100%,9rem),1fr));gap:6px;margin-block:0 8px}
#appView .campaign-holders .gf-account-card {min-width:0;margin:0;padding:9px 10px}
#appView .campaign-holders .gf-account-card h3 {margin:0 0 4px;font-size:.875rem;line-height:1.35}
.campaign-currency {display:flex;flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:2px 7px;padding:3px 0;font-size:.78rem}
.campaign-currency + .campaign-currency {border-top:1px solid var(--line)}
.campaign-currency span {color:var(--muted)}
.campaign-currency b {min-width:0;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}

#campaignTextPanel {display:contents}
#publicationModal [hidden] {display:none!important}
html body:has(#appView) #publicationModal[data-campaign-tab]>.publication-sheet {
 display:block;height:auto;max-height:calc(100vh - 16px);max-height:calc(100dvh - env(safe-area-inset-top) - 12px);
 overflow:auto!important;overscroll-behavior:contain;
}
#publicationModal[data-campaign-tab] .modal-head {display:flex;justify-content:space-between;gap:8px}
#publicationModal .modal-head #campaignClosePublication {width:auto;margin:0;min-height:44px;font-size:.9rem;padding:6px 12px}
#publicationModal[data-campaign-tab] #publicationModalMeta:empty {display:none}
#campaignPublication label {display:block;margin:8px 0 3px;font-size:.85rem}
#campaignTemplate {width:100%;margin:0;min-height:44px;font-size:1rem}
.campaign-tabs {display:flex;gap:4px;margin:8px 0;background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:3px}
.campaign-tabs button {flex:1;min-width:0;min-height:44px;margin:0;background:transparent;color:var(--muted);border:1px solid transparent;border-radius:9px}
.campaign-tabs button[aria-selected=true] {color:var(--text);background:var(--card,var(--panel));border-color:var(--line);font-weight:700}
.campaign-image-actions {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.campaign-image-actions :is(button,a) {width:100%;min-width:0;min-height:44px;margin:0;display:flex;justify-content:center;align-items:center;padding:6px;font-size:.9rem;text-align:center}
#campaignPublication img {display:block;width:100%;height:auto;margin:8px 0 0;border-radius:8px}
html body:has(#appView) #publicationModal[data-campaign-tab] .publication-actions {margin:6px 0 0;padding:0;border:0;background:none;grid-template-columns:minmax(0,1fr)}
#publicationModal[data-campaign-tab] #closePublication,
#publicationModal[data-campaign-tab=image] #copyPublication {display:none!important}
html body:has(#appView) #publicationModal[data-campaign-tab=image] .publication-actions:has(.publication-copy-status:empty) {display:none}
html body:has(#appView) #publicationModal[data-campaign-tab=text] .publication-text {display:block;height:clamp(160px,43vh,430px);min-height:0;margin:0;font-size:16px}

#campaignImageLoading{display:flex;align-items:center;justify-content:center;gap:.6rem;margin:12px 0;color:var(--muted)}
#campaignImageLoading span{width:1em;height:1em;border:2px solid currentColor;border-inline-end-color:transparent;border-radius:50%;animation:campaign-image-spin .8s linear infinite}
@keyframes campaign-image-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){#campaignImageLoading span{animation:none}}

.audit-summary b,.audit-summary small{display:block;margin-block:4px}.audit-summary{padding:10px 12px;cursor:pointer}

.movement-history-entry{border-block-start:1px solid var(--line);padding-block:8px}.movement-history-entry small{display:block;color:var(--muted)}.movement-history-entry p{margin:4px 0}

.movement-facts{margin:0}
.movement-facts>div{display:grid;grid-template-columns:minmax(5rem,auto) minmax(0,1fr);gap:.5rem;padding:5px 0}
.movement-facts dt{color:var(--muted)}
.movement-facts dd{margin:0;overflow-wrap:anywhere;white-space:pre-wrap}
.movement-changes{padding:0;margin:8px 0;list-style:none}
.movement-changes li{padding:8px 0;border-block-start:1px solid var(--line)}
.movement-changes small{display:block;color:var(--muted)}

/* Receipt family picker */
#receiptModal :is(#uxReceiptChoice,#receiptFamilyOptions,.receipt-family-results,.receipt-family-empty,#selectedFamily)[hidden]{display:none!important}
#receiptModal .receipt-family-picker{min-inline-size:0;border:0;margin:0;padding:0}
#receiptModal .receipt-family-picker legend{padding:0;margin:0 0 4px;color:var(--muted);font-size:.85rem}
#receiptModal .receipt-family-toggle,
#receiptModal .receipt-family-option{min-inline-size:0;width:100%;min-height:48px;text-align:start}
#receiptModal .receipt-family-toggle{display:flex;align-items:center;justify-content:space-between;gap:9px;margin:0;padding:10px 12px}
#receiptModal .receipt-family-toggle svg{width:20px;height:20px;flex:none;fill:none;stroke:currentColor;stroke-width:2}
#receiptModal .receipt-family-toggle[aria-expanded=true] svg{transform:rotate(180deg)}
#receiptModal .receipt-family-toggle .receipt-family-identity{flex:1}
#receiptModal .receipt-family-change{font-size:.78rem;white-space:nowrap}
#receiptModal .receipt-family-options{margin-top:6px;padding:8px;border:1px solid var(--line);border-radius:14px;background:var(--panel)}
#receiptModal #receiptFamilySearch{min-height:44px;width:100%;margin:0 0 5px;padding:8px 10px;font-size:16px}
#receiptModal .receipt-family-results{list-style:none;margin:0;padding:0;max-height:240px;max-height:min(34dvh,240px);overflow:auto}
#receiptModal .receipt-family-results li+li{border-block-start:1px solid var(--line)}
#receiptModal .receipt-family-option{display:block;border:0;border-radius:8px;margin:0;padding:9px 8px;background:transparent;color:var(--text)}
#receiptModal .receipt-family-option[aria-current=true],
#receiptModal .receipt-family-option:focus-visible{background:var(--panel2,var(--panel));outline:2px solid currentColor;outline-offset:-2px}
#receiptModal .receipt-family-identity{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;min-width:0;gap:3px 10px;text-align:start}
#receiptModal .receipt-family-name{font-size:1rem;font-weight:750;line-height:1.4;overflow-wrap:anywhere;justify-self:start}
#receiptModal .receipt-family-number{font-size:.8rem;font-variant-numeric:tabular-nums;padding:2px 6px;border:1px solid var(--line);border-radius:7px;white-space:nowrap}
#receiptModal .receipt-family-sponsor{grid-column:1/-1;color:var(--muted);font-size:.79rem;line-height:1.4;overflow-wrap:anywhere}
#receiptModal .receipt-family-empty{margin:6px 0;padding:8px;color:var(--muted)}
