/* ============================================================
   Ngwe Hmat — design system
   Mobile-first. Tokens drive light / dark. iPhone 16 Pro (393×852).
   ============================================================ */

:root {
  /* brand */
  --brand-900: #14532E;
  --brand-800: #1B5E20;
  --brand-700: #1C6739;
  --brand-600: #237943;
  --brand-500: #16A34A;
  --brand-400: #22C55E;
  --brand-100: #DCFCE7;
  --brand-050: #ECFDF3;

  /* semantic — light */
  --bg: #FBFAF3;
  --bg-elev: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #F4F3EA;
  --surface-sunken: #F1F0E6;
  --card-shadow: 0 6px 20px -8px rgba(24, 40, 30, .18), 0 2px 6px -3px rgba(24, 40, 30, .10);
  --text: #17211C;
  --text-muted: #6B7770;
  --text-faint: #9AA39D;
  --border: #E9E7DA;
  --border-strong: #D9D6C6;
  --field-bg: #FFFDF9;
  --field-border: #E6E3D5;

  --income: #15803D;
  --income-bg: #E9F7EE;
  --expense: #DC2626;
  --expense-bg: #FDECEC;
  --warn: #B45309;
  --warn-bg: #FCF1DF;
  --danger: #DC2626;

  --on-brand: #F7FBF6;

  /* spacing / radius / type */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-7: 32px; --sp-8: 40px;
  --r-sm: 10px; --r-md: 14px; --r-lg: 20px; --r-xl: 26px; --r-pill: 999px;
  --tap: 44px;

  --font: "Noto Sans Myanmar", "Padauk", "Myanmar Text", -apple-system,
          BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --nav-h: 64px;
}

:root[data-theme="dark"],
@media (prefers-color-scheme: dark) {
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1512;
    --bg-elev: #16201B;
    --surface: #18231D;
    --surface-2: #1F2C25;
    --surface-sunken: #121B16;
    --card-shadow: 0 8px 24px -10px rgba(0, 0, 0, .55);
    --text: #E9EFEA;
    --text-muted: #9DAAA2;
    --text-faint: #6E7C74;
    --border: #26332C;
    --border-strong: #33463B;
    --field-bg: #131D18;
    --field-border: #2C3A32;
    --income: #4ADE80;
    --income-bg: #14251B;
    --expense: #F87171;
    --expense-bg: #2A1717;
    --warn: #FBBF24;
    --warn-bg: #2A2110;
    --brand-900: #1B6638;
    --on-brand: #F7FBF6;
  }
}

:root[data-theme="dark"] {
  --bg: #0E1512;
  --bg-elev: #16201B;
  --surface: #18231D;
  --surface-2: #1F2C25;
  --surface-sunken: #121B16;
  --card-shadow: 0 8px 24px -10px rgba(0, 0, 0, .55);
  --text: #E9EFEA;
  --text-muted: #9DAAA2;
  --text-faint: #6E7C74;
  --border: #26332C;
  --border-strong: #33463B;
  --field-bg: #131D18;
  --field-border: #2C3A32;
  --income: #4ADE80;
  --income-bg: #14251B;
  --expense: #F87171;
  --expense-bg: #2A1717;
  --warn: #FBBF24;
  --warn-bg: #2A2110;
  --brand-900: #1B6638;
  --on-brand: #F7FBF6;
}

/* ---------- reset ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  height: 100%;
  overflow: hidden;              /* only .screen__body scrolls */
  overscroll-behavior: none;
  width: 100%;
  max-width: 100%;
}
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
  overflow-x: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
a { color: var(--brand-600); }
ul { list-style: none; }
:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 2px; border-radius: 6px; }
input, textarea, select { font-size: 16px; } /* avoid iOS zoom */

.lang-en { --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
.lang-zh { --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans SC", "Segoe UI", Roboto, sans-serif; }

/* ---------- app frame ---------- */
/* The shell is a fixed-height viewport; only .screen__body scrolls, so the
   chrome never drifts and there's no page-level rubber-band on iOS. */
#app {
  height: 100vh;
  height: 100dvh;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

/* Frosted status-bar / Dynamic Island zone. Only has height when the OS
   reports a top inset (installed PWA on a notched iPhone); a no-op in a
   browser tab. Keeps the white status glyphs legible over any screen. */
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--safe-t);
  z-index: 500;
  background: rgba(10, 15, 13, .28);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  pointer-events: none;
}

.screen {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding-top: calc(var(--safe-t));
}
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.screen__body {
  flex: 1;
  min-height: 0;
  padding: var(--sp-4) var(--sp-4) calc(var(--sp-6) + var(--safe-b));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.has-nav .screen__body { padding-bottom: calc(var(--nav-h) + var(--safe-b) + var(--sp-6)); }
.has-cta .screen__body { padding-bottom: calc(96px + var(--safe-b)); }

/* ---------- top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4) var(--sp-2);
  min-height: 52px;
}
.topbar__title { font-size: 20px; font-weight: 800; letter-spacing: -.01em; flex: 1; }
.topbar__sub { font-size: 12.5px; color: var(--text-muted); font-weight: 500; }
.topbar .iconbtn { flex: none; }
.iconbtn {
  width: var(--tap); height: var(--tap);
  display: grid; place-items: center;
  border-radius: var(--r-pill);
  color: var(--text);
}
.iconbtn:active { background: var(--surface-2); }
.iconbtn svg { width: 22px; height: 22px; }
.topbar__back { margin-left: -8px; }

.page-head { margin-bottom: var(--sp-4); }
.page-head h1 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.page-head p { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* ---------- cards ---------- */
.card {
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--card-shadow);
  padding: var(--sp-4);
}
.card + .card { margin-top: var(--sp-3); }
.section-title {
  font-size: 14px; font-weight: 700;
  margin: var(--sp-5) 0 var(--sp-3);
  display: flex; align-items: center; justify-content: space-between;
}
.section-title:first-child { margin-top: 0; }
.link-btn { color: var(--brand-600); font-size: 13px; font-weight: 600; }

/* ---------- balance / hero card ---------- */
.hero {
  background: linear-gradient(155deg, var(--brand-600), var(--brand-900));
  color: var(--on-brand);
  border-radius: var(--r-xl);
  padding: var(--sp-5);
  box-shadow: 0 14px 30px -12px rgba(20, 83, 46, .5);
}
.hero__label { font-size: 12.5px; opacity: .82; font-weight: 500; }
.hero__amount { font-size: 34px; font-weight: 800; letter-spacing: -.02em; margin-top: 2px; }
.hero__row { display: flex; gap: var(--sp-5); margin-top: var(--sp-4); padding-top: var(--sp-4); border-top: 1px solid rgba(255,255,255,.16); }
.hero__stat { font-size: 12px; opacity: .9; }
.hero__stat b { display: block; font-size: 15px; font-weight: 700; opacity: 1; margin-top: 2px; }

/* ---------- stat tiles ---------- */
.tile { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--card-shadow); padding: var(--sp-4); }
.tile__label { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.tile__value { font-size: 22px; font-weight: 800; letter-spacing: -.01em; margin-top: 4px; }
.tile__delta { font-size: 12px; margin-top: 6px; display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.tile__delta.up { color: var(--income); }
.tile__delta.down { color: var(--expense); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.grid-2 > * { margin: 0; }

/* ---------- quick actions ---------- */
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); margin-top: var(--sp-3); }
.quick {
  background: var(--surface); border-radius: var(--r-md); box-shadow: var(--card-shadow);
  padding: 14px var(--sp-4); font-size: 14px; font-weight: 600;
  display: flex; align-items: center; gap: var(--sp-2); min-height: var(--tap);
}
.quick .badge { font-size: 16px; }
.quick--expense { color: var(--expense); }
.quick--income { color: var(--income); }

/* ---------- list rows ---------- */
.rows { display: flex; flex-direction: column; gap: var(--sp-2); }
.date-group + .date-group { margin-top: var(--sp-4); }
.date-group__label { font-size: 12.5px; color: var(--text-muted); font-weight: 600; margin: 0 0 var(--sp-2) 4px; }

.row {
  display: flex; align-items: center; gap: var(--sp-3);
  background: var(--surface); border-radius: var(--r-md);
  box-shadow: var(--card-shadow); padding: 12px var(--sp-4);
  min-height: 60px; width: 100%; text-align: left;
}
.row__icon {
  width: 40px; height: 40px; flex: none; border-radius: 12px;
  display: grid; place-items: center; font-size: 20px;
  background: var(--surface-2);
}
.row__main { flex: 1; min-width: 0; }
.row__title { font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row__meta { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row__amt { font-size: 14.5px; font-weight: 700; flex: none; }
.row__amt.income { color: var(--income); }
.row__amt.expense { color: var(--expense); }
.row__chev { color: var(--text-faint); flex: none; }
.row__chev svg { width: 18px; height: 18px; display: block; }

/* compact list on cards */
.mini-row { display: flex; align-items: center; gap: var(--sp-3); padding: 10px 0; }
.mini-row + .mini-row { border-top: 1px solid var(--border); }
.mini-row__title { flex: 1; font-size: 14px; font-weight: 500; }
.mini-row__amt { font-size: 14px; font-weight: 700; }

/* ---------- chips / segmented ---------- */
.chips { display: flex; gap: var(--sp-2); overflow-x: auto; padding: 2px 0 var(--sp-1); -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; padding: 8px 14px; border-radius: var(--r-pill);
  background: var(--surface); box-shadow: var(--card-shadow);
  font-size: 13px; font-weight: 600; color: var(--text-muted);
  min-height: 36px; white-space: nowrap;
}
.chip[aria-pressed="true"], .chip.is-active { background: var(--brand-050); color: var(--brand-700); box-shadow: inset 0 0 0 1.5px var(--brand-400); }

.segmented { display: flex; background: var(--surface-sunken); border-radius: var(--r-pill); padding: 4px; gap: 4px; }
.segmented button { flex: 1; padding: 8px 6px; border-radius: var(--r-pill); font-size: 13px; font-weight: 600; color: var(--text-muted); min-height: 38px; }
.segmented button.is-active { background: var(--surface); color: var(--brand-700); box-shadow: var(--card-shadow); }

/* ---------- forms ---------- */
.field { margin-bottom: var(--sp-4); }
.field > label, .field-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: var(--sp-2); }
.field-hint { font-size: 12px; color: var(--text-muted); font-weight: 400; }
.input, .select, textarea.input {
  width: 100%; background: var(--field-bg);
  border: 1px solid var(--field-border); border-radius: var(--r-md);
  padding: 13px var(--sp-4); min-height: var(--tap);
  box-shadow: var(--card-shadow);
}
.input::placeholder { color: var(--text-faint); }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7770' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
textarea.input { min-height: 76px; resize: vertical; }
.field-error { color: var(--danger); font-size: 12.5px; margin-top: 6px; font-weight: 500; }
.input.invalid, .select.invalid { border-color: var(--danger); }

/* amount input — big centered */
.amount-input {
  width: 100%; text-align: center; border: none; background: none; box-shadow: none;
  font-size: 40px; font-weight: 800; letter-spacing: -.02em; padding: var(--sp-4) 0;
  color: var(--text);
}
.amount-input.expense { color: var(--expense); }
.amount-input.income { color: var(--income); }
.amount-input::placeholder { color: var(--text-faint); }

/* category picker grid */
.cat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--sp-2); }
.cat-cell {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 8px 2px; border-radius: var(--r-md);
}
.cat-cell__icon {
  width: 48px; height: 48px; border-radius: var(--r-pill); background: var(--surface);
  box-shadow: var(--card-shadow); display: grid; place-items: center; font-size: 22px;
}
.cat-cell__label { font-size: 10.5px; color: var(--text-muted); text-align: center; line-height: 1.2; max-width: 64px; }
.cat-cell.is-active .cat-cell__icon { box-shadow: inset 0 0 0 2px var(--brand-500); background: var(--brand-050); }
.cat-cell.is-active .cat-cell__label { color: var(--brand-700); font-weight: 700; }

/* quick amount buttons */
.quick-amts { display: flex; gap: var(--sp-2); overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.quick-amts::-webkit-scrollbar { display: none; }
.quick-amt { flex: none; padding: 8px 14px; border-radius: var(--r-pill); background: var(--surface); box-shadow: var(--card-shadow); font-size: 13px; font-weight: 600; min-height: 36px; }
.quick-amt.is-active { background: var(--brand-050); color: var(--brand-700); box-shadow: inset 0 0 0 1.5px var(--brand-400); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  width: 100%; min-height: 52px; padding: 14px var(--sp-5);
  border-radius: var(--r-md); font-size: 15.5px; font-weight: 700;
}
.btn--primary { background: linear-gradient(160deg, var(--brand-600), var(--brand-900)); color: var(--on-brand); box-shadow: 0 12px 24px -12px rgba(20,83,46,.6); }
.btn--primary:active { filter: brightness(.95); }
.btn--ghost { background: var(--surface); color: var(--text); box-shadow: var(--card-shadow); }
.btn--danger-soft { background: var(--expense-bg); color: var(--expense); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--expense) 22%, transparent); }
.btn--sm { min-height: 40px; font-size: 13.5px; width: auto; padding: 8px 16px; }
.btn[disabled] { opacity: .5; pointer-events: none; }

.cta-bar {
  position: fixed; left: 0; right: 0; bottom: 0;
  max-width: 480px; margin: 0 auto;
  padding: var(--sp-3) var(--sp-4) calc(var(--sp-3) + var(--safe-b));
  background: linear-gradient(to top, var(--bg) 62%, transparent);
  display: flex; flex-direction: column; gap: var(--sp-2);
  z-index: 30;
}

/* ---------- bottom nav + FAB ---------- */
/* Persistent chrome in #nav-root — truly fixed (no transformed ancestor),
   so it never moves during screen transitions. */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0;
  max-width: 480px; margin: 0 auto;
  height: calc(var(--nav-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: var(--bg-elev);
  border-top: 1px solid var(--border);
  display: flex; align-items: stretch; z-index: 40;
  transition: transform .32s cubic-bezier(.32,.72,0,1);
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.bottom-nav.is-hidden { transform: translateY(115%); }
.bottom-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; font-size: 10px; font-weight: 600; color: var(--text-faint); text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.bottom-nav a svg { width: 22px; height: 22px; }
.bottom-nav a.is-active { color: var(--brand-600); }
.bottom-nav .nav-fab { position: relative; }
.fab {
  position: fixed; left: 50%;
  bottom: calc(var(--nav-h) + var(--safe-b) - 24px);
  width: 56px; height: 56px; border-radius: var(--r-pill);
  background: var(--brand-500); color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 10px 22px -6px rgba(22,163,74,.55); z-index: 45;
  transform: translateX(-50%);
  transition: transform .32s cubic-bezier(.32,.72,0,1), opacity .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.fab.is-hidden { transform: translateX(-50%) translateY(160px); opacity: 0; pointer-events: none; }
.fab svg { width: 26px; height: 26px; }
.fab:active { transform: translateX(-50%) scale(.94); }

/* ---------- progress ---------- */
.bar { height: 8px; border-radius: var(--r-pill); background: var(--surface-sunken); overflow: hidden; }
.bar__fill { height: 100%; border-radius: var(--r-pill); background: var(--brand-500); transition: width .3s ease; }
.bar__fill.warn { background: var(--warn); }
.bar__fill.over { background: var(--expense); }
.bar--on-dark { background: rgba(255,255,255,.22); }
.bar--on-dark .bar__fill { background: #fff; }

.budget-card { display: flex; flex-direction: column; gap: var(--sp-3); }
.budget-row__head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-2); }
.budget-row__name { font-size: 14px; font-weight: 600; display: flex; gap: 8px; align-items: center; }
.budget-row__nums { font-size: 12.5px; color: var(--text-muted); }
.budget-row__pct { font-size: 12.5px; font-weight: 700; }
.pct-ok { color: var(--income); } .pct-warn { color: var(--warn); } .pct-over { color: var(--expense); }

/* accessible budget meter (name · state pill · bar · numbers) */
.meter-list { display: flex; flex-direction: column; gap: var(--sp-2); }
.meter {
  display: block; width: 100%; padding: var(--sp-3) var(--sp-4);
  background: var(--surface); border-radius: var(--r-lg);
  box-shadow: var(--elev-1), var(--edge-hi);
}
.meter:active { transform: scale(.99); }
.meter__head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.meter__name { font-size: 13.5px; font-weight: 700; display: flex; align-items: center; gap: 7px; min-width: 0; }
.meter__ico { flex: none; }
.meter__bar { margin: 9px 0 7px; }
.meter__nums { display: flex; justify-content: space-between; gap: var(--sp-3); font-size: 12px; color: var(--text-muted); }
.meter__line { text-align: right; }

/* state pill — icon + word, so it never depends on colour alone */
.state-pill {
  flex: none; display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: var(--r-pill);
  font-size: 10.5px; font-weight: 700; letter-spacing: .01em;
  background: var(--surface-2); color: var(--text-muted);
}
.state-pill svg { width: 12px; height: 12px; }
.state-pill--normal { background: var(--income-bg); color: var(--income); }
.state-pill--approaching { background: var(--warn-bg); color: var(--warn); }
.state-pill--warning { background: var(--warn-bg); color: var(--warn); }
.state-pill--exceeded { background: var(--expense-bg); color: var(--expense); }

.bar[data-level="approaching"] .bar__fill,
.bar[data-level="warning"] .bar__fill { background: var(--warn); }
.bar[data-level="exceeded"] .bar__fill { background: var(--expense); }

/* needs-attention card on the budget screen */
.attn { margin-bottom: var(--sp-2); border-left: 3px solid var(--border-strong); }
.attn--approaching, .attn--warning { border-left-color: var(--warn); background: var(--warn-bg); }
.attn--exceeded { border-left-color: var(--expense); background: var(--expense-bg); }
.attn__row { display: flex; gap: 10px; align-items: flex-start; }
.attn__row svg { flex: none; margin-top: 1px; }
.attn__text { font-size: 13px; font-weight: 600; line-height: 1.4; }
.attn__actions { display: flex; gap: 8px; margin-top: 10px; }
.attn__actions .btn { flex: 1; }

/* ---------- donut / chart ---------- */
.donut-wrap { display: flex; gap: var(--sp-4); align-items: center; }
.donut { width: 128px; height: 128px; flex: none; position: relative; }
.donut svg { transform: rotate(-90deg); width: 100%; height: 100%; }
.donut__center { position: absolute; inset: 0; display: grid; place-items: center; font-size: 18px; font-weight: 800; }
.legend { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.legend__item { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.legend__dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.legend__pct { font-weight: 700; min-width: 34px; }
.legend__name { color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.chart-bars { display: flex; align-items: flex-end; gap: 6px; height: 120px; padding-top: var(--sp-2); }
.chart-bars__col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.chart-bars__bar { width: 100%; max-width: 26px; border-radius: 6px 6px 3px 3px; background: var(--brand-100); min-height: 4px; }
.chart-bars__bar.is-peak { background: var(--brand-500); }
.chart-bars__lbl { font-size: 9.5px; color: var(--text-faint); }

.insight { display: flex; gap: var(--sp-3); padding: 12px 0; }
.insight + .insight { border-top: 1px solid var(--border); }
.insight__icon { font-size: 18px; flex: none; }
.insight__text { font-size: 13px; }
.insight__text b { font-weight: 700; }

/* ---------- calendar ---------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-3); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-dow { text-align: center; font-size: 11px; color: var(--text-faint); padding: 6px 0; font-weight: 600; }
.cal-day {
  aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; border-radius: 10px; font-size: 13px; position: relative;
}
.cal-day.is-today { background: var(--brand-050); color: var(--brand-700); font-weight: 800; }
.cal-day.is-selected { box-shadow: inset 0 0 0 2px var(--brand-500); }
.cal-day.is-muted { color: var(--text-faint); }
.cal-day__dot { width: 5px; height: 5px; border-radius: 999px; background: var(--expense); }
.cal-day__dot.income { background: var(--income); }
.cal-dots { display: flex; gap: 2px; height: 5px; }

/* ---------- settings ---------- */
.settings-list { display: flex; flex-direction: column; gap: var(--sp-5); }
.settings-group { display: flex; flex-direction: column; }
.settings-group__label {
  font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-faint); margin: 0 0 var(--sp-2) 6px;
}
.settings-group__card {
  background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--card-shadow);
  overflow: hidden;
}
.settings-row {
  display: flex; align-items: center; gap: var(--sp-3); width: 100%; text-align: left;
  background: var(--surface); padding: 13px var(--sp-4); min-height: 58px;
}
.settings-group__card .settings-row + .settings-row { border-top: 1px solid var(--border); }
.settings-row__icon {
  width: 30px; height: 30px; flex: none; border-radius: 9px;
  display: grid; place-items: center; font-size: 15px;
  background: var(--brand-050); color: var(--brand-700);
}
.settings-row__icon svg { width: 17px; height: 17px; display: block; }
.settings-row__icon--danger { background: var(--expense-bg); color: var(--expense); }
.settings-row__main { flex: 1; min-width: 0; }
.settings-row__title { font-size: 14.5px; font-weight: 600; }
.settings-row__sub { font-size: 12px; color: var(--text-muted); margin-top: 1px; }
.settings-row__val { font-size: 13px; color: var(--text-muted); }

/* toggle */
.switch { width: 46px; height: 28px; border-radius: 999px; background: var(--border-strong); position: relative; flex: none; transition: background .2s; }
.switch[aria-checked="true"] { background: var(--brand-500); }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 999px; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.switch[aria-checked="true"]::after { transform: translateX(18px); }

/* ---------- empty state ---------- */
.empty { text-align: center; padding: var(--sp-8) var(--sp-5); display: flex; flex-direction: column; align-items: center; gap: var(--sp-3); }
.empty__art { width: 96px; height: 96px; border-radius: 28px; background: radial-gradient(circle at 50% 35%, var(--brand-100), var(--brand-050)); display: grid; place-items: center; font-size: 40px; }
.empty__art svg { width: 40px; height: 40px; color: var(--brand-600); }
.empty h2 { font-size: 17px; font-weight: 700; }
.empty p { font-size: 13.5px; color: var(--text-muted); max-width: 260px; }

/* ---------- onboarding ---------- */
.onb { min-height: 100dvh; display: flex; flex-direction: column; padding: calc(var(--safe-t) + var(--sp-6)) var(--sp-5) calc(var(--safe-b) + var(--sp-5)); text-align: center; }
.onb__art { width: 128px; height: 128px; border-radius: 34px; background: radial-gradient(circle at 50% 30%, var(--brand-100), var(--brand-050)); display: grid; place-items: center; margin: var(--sp-7) auto var(--sp-6); font-size: 56px; box-shadow: var(--card-shadow); }
.onb__art svg { width: 56px; height: 56px; color: var(--brand-600); }
.onb__art--logo { background: none; box-shadow: none; padding: 0; overflow: hidden; animation: logoPop .6s cubic-bezier(.34,1.56,.64,1) both; }
.onb__art--logo img { width: 100%; height: 100%; object-fit: contain; border-radius: 30px; }
@keyframes logoPop { from { opacity: 0; transform: scale(.6) translateY(10px); } to { opacity: 1; transform: none; } }
.onb__body { flex: 1; display: flex; flex-direction: column; }
.onb h1 { font-size: 26px; font-weight: 800; line-height: 1.3; letter-spacing: -.02em; }
.onb p { font-size: 14px; color: var(--text-muted); margin-top: var(--sp-3); }
.onb__spacer { flex: 1; }
.onb__foot { font-size: 12px; color: var(--text-faint); margin-top: var(--sp-3); }
.onb__dots { display: flex; gap: 6px; justify-content: center; margin: var(--sp-4) 0; }
.onb__dots span { width: 7px; height: 7px; border-radius: 999px; background: var(--border-strong); }
.onb__dots span.is-active { background: var(--brand-500); width: 20px; }
.onb__form { text-align: left; margin-top: var(--sp-5); }

/* ---------- sheet / modal ---------- */
.sheet-backdrop {
  position: fixed; inset: 0; background: rgba(15, 23, 19, .45);
  z-index: 100; display: flex; align-items: flex-end; justify-content: center;
  animation: fade .15s ease;
  padding: 0 env(safe-area-inset-right, 0px) 0 env(safe-area-inset-left, 0px);
}
.sheet {
  background: var(--bg); width: 100%; max-width: 480px;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: var(--sp-3) var(--sp-4) calc(var(--sp-5) + var(--safe-b));
  max-height: 88dvh; overflow-y: auto; overflow-x: hidden;
  animation: slideup .22s cubic-bezier(.2,.7,.3,1);
}
.sheet * { max-width: 100%; }
@keyframes slideup { from { transform: translateY(100%); } to { transform: none; } }
.sheet__grip { width: 38px; height: 4px; border-radius: 999px; background: var(--border-strong); margin: 4px auto var(--sp-3); }
.sheet__title { font-size: 17px; font-weight: 700; margin-bottom: var(--sp-3); }
.sheet__list button {
  display: flex; align-items: center; gap: var(--sp-3); width: 100%; text-align: left;
  padding: 14px var(--sp-2); border-radius: var(--r-sm); font-size: 15px; min-height: var(--tap);
}
.sheet__list button:active { background: var(--surface-2); }
.sheet__list button.is-active { color: var(--brand-700); font-weight: 700; }
.sheet__list button .check { margin-left: auto; color: var(--brand-600); }
.sheet__list + .sheet__actions { margin-top: var(--sp-3); }

.dialog { text-align: center; padding: var(--sp-4) var(--sp-2) 0; }
.dialog h3 { font-size: 17px; font-weight: 700; }
.dialog p { font-size: 13.5px; color: var(--text-muted); margin-top: var(--sp-2); }
.dialog__actions { display: flex; flex-direction: column; gap: var(--sp-2); margin-top: var(--sp-5); }

/* ---------- toast ---------- */
#toast-root { position: fixed; left: 0; right: 0; bottom: 0; z-index: 200; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0 var(--sp-4) calc(var(--safe-b) + var(--nav-h) + 16px); pointer-events: none; }
.toast {
  background: var(--text); color: var(--bg);
  padding: 12px 18px; border-radius: var(--r-pill); font-size: 13.5px; font-weight: 600;
  box-shadow: 0 8px 20px -6px rgba(0,0,0,.4); max-width: 92%;
  animation: toastin .2s ease; pointer-events: auto;
}
.toast.err { background: var(--expense); color: #fff; }
@keyframes toastin { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- misc ---------- */
.amt-private { letter-spacing: .06em; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--border); border-top-color: var(--brand-500); border-radius: 999px; animation: spin .7s linear infinite; margin: var(--sp-8) auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.text-c { text-align: center; }
.mt-2 { margin-top: var(--sp-2); } .mt-4 { margin-top: var(--sp-4); } .mt-6 { margin-top: var(--sp-6); }
.muted { color: var(--text-muted); font-size: 13px; }
.divider { height: 1px; background: var(--border); margin: var(--sp-4) 0; }
.badge-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--surface-2); color: var(--text-muted); }
.badge-pill.income { background: var(--income-bg); color: var(--income); }
.badge-pill.expense { background: var(--expense-bg); color: var(--expense); }

/* ============================================================
   Interaction & motion — makes the app feel native, not a demo
   ============================================================ */

/* springy press feedback on every tappable surface */
.row, .settings-row, .quick, .chip, .cat-cell, .quick-amt,
.btn, .tile, .mini-row, .sheet__list button, .segmented button,
.legend__item, .cal-day, .iconbtn {
  transition: transform .16s cubic-bezier(.2,.7,.3,1),
              box-shadow .16s ease, background-color .16s ease, opacity .16s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.row:active, .quick:active, .tile:active, .mini-row:active,
.settings-row:active { transform: scale(.975); }
.chip:active, .quick-amt:active, .segmented button:active { transform: scale(.94); }
.cat-cell:active { transform: scale(.9); }
.btn:active { transform: scale(.97); }
.btn--primary:active { transform: scale(.97); filter: brightness(.94); }
button:has(> .settings-row):active .settings-row { transform: scale(.975); }
.settings-row { transition: transform .16s cubic-bezier(.2,.7,.3,1), background-color .16s ease; }
.settings-row:active { background: var(--surface-2); }

/* staggered entrance for list rows */
@keyframes rowIn {
  from { opacity: 0; transform: translate3d(0, 10px, 0); }
  to   { opacity: 1; transform: none; }
}
.rows > .row, .date-group { animation: rowIn .34s cubic-bezier(.2,.7,.3,1) both; }
.rows > .row:nth-child(1) { animation-delay: .02s; }
.rows > .row:nth-child(2) { animation-delay: .06s; }
.rows > .row:nth-child(3) { animation-delay: .10s; }
.rows > .row:nth-child(4) { animation-delay: .14s; }
.rows > .row:nth-child(5) { animation-delay: .18s; }
.rows > .row:nth-child(n+6) { animation-delay: .22s; }
.date-group:nth-child(2) { animation-delay: .08s; }
.date-group:nth-child(3) { animation-delay: .16s; }

/* cards / hero settle in on first paint */
@keyframes cardIn { from { opacity: 0; transform: translate3d(0, 12px, 0); } to { opacity: 1; transform: none; } }
.screen__body > .hero,
.screen__body > .tile,
.screen__body > .card,
.screen__body > .quick-grid,
.screen__body > .settings-list { animation: cardIn .4s cubic-bezier(.2,.7,.3,1) both; }
.screen__body > .section-title + .tile,
.screen__body > .quick-grid { animation-delay: .05s; }

/* hero balance — tappable to toggle privacy, subtle sheen */
.hero { position: relative; overflow: hidden; }
.hero::after {
  content: ""; position: absolute; top: -40%; left: -30%;
  width: 60%; height: 200%; transform: rotate(18deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.10), transparent);
  animation: heroSheen 6s ease-in-out 1s infinite;
}
@keyframes heroSheen { 0%, 70%, 100% { left: -40%; } 22%, 48% { left: 120%; } }
.hero__amount { transition: opacity .2s ease; }

/* bottom nav — active pill + icon pop, press tick */
.bottom-nav a { position: relative; transition: color .2s ease; }
.bottom-nav a svg { transition: transform .28s cubic-bezier(.2,.7,.3,1); }
.bottom-nav a:active svg { transform: scale(.82); }
.bottom-nav a.is-active svg { transform: translateY(-1px) scale(1.08); }
.bottom-nav a.is-active::before {
  content: ""; position: absolute; top: 6px; left: 50%;
  width: 30px; height: 30px; border-radius: 999px;
  background: var(--brand-050); transform: translateX(-50%);
  z-index: -1; animation: navPop .3s cubic-bezier(.2,.7,.3,1);
}
@keyframes navPop { from { transform: translateX(-50%) scale(.4); opacity: 0; } to { transform: translateX(-50%) scale(1); opacity: 1; } }

/* FAB — press + idle breathing shadow */
.fab { transition: transform .18s cubic-bezier(.2,.7,.3,1), box-shadow .2s ease, opacity .2s ease; }
.fab:active { transform: translateX(-50%) scale(.9) rotate(90deg); }
.fab.is-hidden { transform: translateX(-50%) translateY(160px); opacity: 0; pointer-events: none; }
.fab svg { transition: transform .2s ease; }

/* toggle switch — bouncier knob */
.switch::after { transition: transform .24s cubic-bezier(.34,1.56,.64,1), background .2s; }
.switch:active::after { width: 26px; }
.switch[aria-checked="true"]:active::after { transform: translateX(14px); }

/* sheet — spring up + drag affordance */
.sheet { animation: sheetUp .34s cubic-bezier(.22,1,.36,1); will-change: transform; }
@keyframes sheetUp { from { transform: translateY(101%); } to { transform: none; } }
.sheet__grip { cursor: grab; transition: background .2s, width .2s; }
.sheet.is-dragging { animation: none; transition: none; }
.sheet.is-dragging .sheet__grip { background: var(--text-faint); width: 48px; }
.sheet-backdrop { transition: background .2s ease; }

/* toast — spring in from bottom, stack */
.toast { animation: toastPop .38s cubic-bezier(.22,1.2,.36,1); }
@keyframes toastPop { from { transform: translateY(20px) scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-delay: 0s !important; transition-duration: .001s !important; }
  .hero::after { display: none; }
  .onb__track { scroll-behavior: auto; }
}

/* ============================================================
   Depth / soft-3D — layered elevation, tactile press, subtle
   highlights. Token-driven so light & dark both stay balanced.
   ============================================================ */
:root {
  --elev-1: 0 1px 2px rgba(24,40,30,.06), 0 3px 8px -2px rgba(24,40,30,.10);
  --elev-2: 0 2px 4px rgba(24,40,30,.06), 0 10px 24px -6px rgba(24,40,30,.16), inset 0 1px 0 rgba(255,255,255,.55);
  --elev-3: 0 8px 18px -6px rgba(24,40,30,.18), 0 24px 48px -12px rgba(24,40,30,.24), inset 0 1px 0 rgba(255,255,255,.6);
  --edge-hi: inset 0 1px 0 rgba(255,255,255,.55);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --elev-1: 0 1px 2px rgba(0,0,0,.4), 0 3px 10px -2px rgba(0,0,0,.5);
    --elev-2: 0 2px 6px rgba(0,0,0,.45), 0 12px 28px -8px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.05);
    --elev-3: 0 10px 24px -8px rgba(0,0,0,.6), 0 28px 56px -14px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,255,255,.06);
    --edge-hi: inset 0 1px 0 rgba(255,255,255,.05);
  }
}
:root[data-theme="dark"] {
  --elev-1: 0 1px 2px rgba(0,0,0,.4), 0 3px 10px -2px rgba(0,0,0,.5);
  --elev-2: 0 2px 6px rgba(0,0,0,.45), 0 12px 28px -8px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.05);
  --elev-3: 0 10px 24px -8px rgba(0,0,0,.6), 0 28px 56px -14px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,255,255,.06);
  --edge-hi: inset 0 1px 0 rgba(255,255,255,.05);
}

.card, .tile, .settings-group__card {
  box-shadow: var(--elev-2);
  background-image: linear-gradient(180deg, color-mix(in srgb, var(--surface) 92%, #fff), var(--surface));
}
.tile:active, .card:active { box-shadow: var(--elev-1); }

.hero {
  box-shadow: var(--elev-3), 0 18px 40px -14px color-mix(in srgb, var(--brand-700) 55%, transparent);
  transform: translateZ(0);
  transition: transform .18s cubic-bezier(.2,.7,.3,1), box-shadow .2s ease;
}
.hero:active { transform: scale(.985); box-shadow: var(--elev-2); }

.btn--primary {
  box-shadow: 0 10px 22px -10px rgba(20,83,46,.55), 0 2px 4px rgba(20,83,46,.35), inset 0 1px 0 rgba(255,255,255,.28);
}
.btn--primary:active { transform: translateY(1px) scale(.985); box-shadow: 0 4px 12px -6px rgba(20,83,46,.5), inset 0 1px 0 rgba(255,255,255,.2); }
.btn--ghost { box-shadow: var(--elev-1), var(--edge-hi); }
.btn--ghost:active { box-shadow: none; transform: translateY(1px) scale(.985); }

.fab {
  box-shadow: 0 12px 28px -8px rgba(20,83,46,.5), 0 4px 10px -2px rgba(20,83,46,.4), inset 0 2px 0 rgba(255,255,255,.3);
}
.bottom-nav { box-shadow: 0 -1px 0 var(--border), 0 -10px 30px -14px rgba(24,40,30,.18); }
.quick { box-shadow: var(--elev-1), var(--edge-hi); }
.chip { box-shadow: var(--elev-1), var(--edge-hi); }

/* ============================================================
   Onboarding — auto-advancing carousel
   ============================================================ */
.onb {
  height: 100dvh; height: 100svh;
  display: flex; flex-direction: column;
  padding: 0; text-align: center; overflow: hidden;
}
.onb__track {
  flex: 1; min-height: 0;
  display: flex;
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.onb__track::-webkit-scrollbar { display: none; }
.onb__slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  display: flex;
  min-width: 100%; height: 100%;
  overflow-y: auto;
  padding: calc(var(--safe-t) + var(--sp-7)) var(--sp-5) var(--sp-5);
}
.onb__slide-inner {
  display: flex; flex-direction: column; align-items: center;
  flex: 1; width: 100%; max-width: 420px; margin: 0 auto;
}
.onb__slide h1 { font-size: 25px; font-weight: 800; line-height: 1.3; letter-spacing: -.02em; margin-top: var(--sp-6); }
.onb__slide p { font-size: 14.5px; color: var(--text-muted); margin-top: var(--sp-3); max-width: 34ch; }
.onb__slide .btn { margin-top: var(--sp-4); display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.onb__spacer { flex: 1; min-height: var(--sp-6); }
.onb__foot { font-size: 12px; color: var(--text-faint); margin-top: var(--sp-3); }
.onb__footer {
  padding: var(--sp-4) var(--sp-5) calc(var(--safe-b) + var(--sp-5));
  display: flex; justify-content: center;
}
.onb__dots { display: flex; gap: 8px; align-items: center; }
.onb__dot {
  width: 7px; height: 7px; border-radius: 999px; background: var(--border-strong);
  transition: width .28s cubic-bezier(.2,.7,.3,1), background .2s;
}
.onb__dot.is-active { background: var(--brand-500); width: 22px; }

.onb__meaning {
  margin-top: var(--sp-5); width: 100%;
  background: var(--surface); border-radius: var(--r-lg);
  box-shadow: var(--elev-2); padding: var(--sp-3) var(--sp-4);
  display: flex; flex-direction: column; gap: 2px;
}
.onb__meaning-row { display: flex; align-items: baseline; justify-content: space-between; padding: 8px 0; }
.onb__meaning-row + .onb__meaning-row { border-top: 1px solid var(--border); }
.onb__meaning-word { font-size: 19px; font-weight: 800; color: var(--brand-700); }
.onb__meaning-gloss { font-size: 13.5px; color: var(--text-muted); }
.onb__note { display: flex; gap: 12px; align-items: center; margin-top: var(--sp-5); text-align: left; box-shadow: var(--elev-2); }
.onb__note p { margin: 0; font-size: 13.5px; color: var(--text); }
.onb__note-ico { flex: none; color: var(--brand-600); display: flex; }
.onb__form { text-align: left; margin-top: var(--sp-5); width: 100%; }

/* ============================================================
   Hangout split
   ============================================================ */
.chip { display: inline-flex; align-items: center; gap: 6px; }
.chip svg { width: 14px; height: 14px; }
.chip__x { display: inline-flex; margin-left: 2px; opacity: .55; }
.chip__x:active { opacity: 1; }
.sp-people { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); }
.sp-step {
  flex: none; width: 44px; height: 44px; border-radius: var(--r-pill);
  display: grid; place-items: center; color: var(--brand-700);
  background: var(--brand-050); box-shadow: var(--elev-1), var(--edge-hi);
}
.sp-step:active { transform: scale(.9); }
.sp-people__n { display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.sp-people__num { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.sp-people__lbl { font-size: 12px; color: var(--text-muted); font-weight: 500; margin-top: 2px; }
.sp-per .tile__value { color: var(--brand-600); }

/* money request / receipt */
.rc-total {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md);
  background: var(--surface-sunken); font-weight: 700; font-size: 14px;
  border: 1px dashed var(--border-strong);
}
.rc-total__v { font-size: 20px; font-weight: 800; letter-spacing: -.01em; }

/* currency converter */
.cv-box { padding: var(--sp-3) var(--sp-4); }
.cv-row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.cv-lbl { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.cv-row .select { width: auto; min-width: 128px; }
.cv-amt { margin-top: var(--sp-2); font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.cv-result { margin-top: var(--sp-2); font-size: 24px; font-weight: 800; letter-spacing: -.01em; color: var(--brand-600); min-height: 32px; }
.cv-swap-wrap { display: flex; justify-content: center; margin: -6px 0; position: relative; z-index: 1; }
.cv-swap {
  width: 40px; height: 40px; border-radius: var(--r-pill);
  display: grid; place-items: center; color: var(--brand-700);
  background: var(--bg-elev); box-shadow: var(--elev-2);
}
.cv-swap:active { transform: rotate(180deg) scale(.9); }
.cv-rate { text-align: center; font-size: 13px; color: var(--text-muted); font-weight: 600; margin-top: var(--sp-3); }

/* ---------- dashboard: nudges ---------- */
.nudge {
  margin-top: var(--sp-3); padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-lg); background: var(--surface);
  box-shadow: var(--elev-1), var(--edge-hi);
  border-left: 3px solid var(--border-strong);
}
.nudge--warning { border-left-color: var(--warn); }
.nudge--exceeded { border-left-color: var(--expense); }
.nudge--positive { border-left-color: var(--income); }
.nudge--info { border-left-color: var(--brand-500); }
.nudge__row { display: flex; align-items: flex-start; gap: 10px; }
.nudge__icon { flex: none; color: var(--text-muted); margin-top: 1px; }
.nudge--warning .nudge__icon { color: var(--warn); }
.nudge--exceeded .nudge__icon { color: var(--expense); }
.nudge--positive .nudge__icon { color: var(--income); }
.nudge__text { flex: 1; font-size: 13px; font-weight: 600; line-height: 1.4; }
.nudge__x { flex: none; color: var(--text-faint); padding: 2px; margin: -2px -2px 0 0; }
.nudge__actions { display: flex; gap: 8px; margin-top: 10px; }
.nudge__actions .btn { flex: 1; }

/* ---------- dashboard: budget overview ---------- */
.bov-month { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-muted); padding-bottom: 10px; margin-bottom: 6px; border-bottom: 1px solid var(--border); }
.bov-month > span:first-child { font-weight: 600; }
.bov-month > span:last-child { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.bov-month b { font-weight: 600; color: var(--text); }
.bov-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px 0; }
.bov-row__name { flex: none; width: 38%; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bov-row__bar { flex: 1; }
.bov-row__pct { flex: none; font-size: 12px; font-weight: 700; width: 40px; text-align: right; }

/* ---------- dashboard: insight + cta + goal ---------- */
.home-insight { display: flex; gap: 10px; align-items: flex-start; }
.home-insight__ico { flex: none; color: var(--brand-600); margin-top: 1px; }
.home-insight p { font-size: 13px; font-weight: 500; line-height: 1.45; }

.home-cta { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; }
.home-cta__ico { flex: none; width: 38px; height: 38px; border-radius: var(--r-md); display: grid; place-items: center; background: var(--brand-050); color: var(--brand-600); }
.home-cta__title { font-size: 13.5px; font-weight: 700; }
.home-cta__sub { font-size: 12px; color: var(--text-muted); margin-top: 1px; }
.home-cta .row__chev { margin-left: auto; color: var(--text-faint); }

.goal-card { display: block; width: 100%; text-align: left; }
.goal-card__head { display: flex; align-items: center; gap: 10px; }
.goal-card__main { flex: 1; min-width: 0; }
.goal-card__name { font-size: 14px; font-weight: 700; }
.goal-card__nums { font-size: 12px; color: var(--text-muted); margin-top: 1px; }
.goal-card__pct { font-weight: 800; color: var(--brand-600); }
.goal-card__pace { font-size: 12px; color: var(--text-muted); margin-top: 6px; }

/* completed / archived savings goals */
.sv-archive { margin-top: var(--sp-4); }
.sv-archive summary {
  font-size: 13px; font-weight: 700; color: var(--text-muted);
  padding: 10px 0; cursor: pointer; list-style: none;
}
.sv-archive summary::-webkit-details-marker { display: none; }
.sv-archive summary::after { content: " ▾"; color: var(--text-faint); }
.sv-archive[open] summary::after { content: " ▴"; }

/* ---------- gamification ---------- */
.streak-chip {
  display: flex; align-items: center; gap: var(--sp-3); width: 100%;
  margin-top: var(--sp-3); padding: 12px var(--sp-4);
  border-radius: var(--r-lg); background: var(--surface);
  box-shadow: var(--elev-1), var(--edge-hi); text-align: left;
}
.streak-chip:active { transform: scale(.985); }
.streak-chip__flame { display: flex; color: var(--text-faint); flex: none; }
.streak-chip__flame.is-lit { color: #F97316; }
.streak-chip__text { flex: 1; font-size: 13.5px; font-weight: 600; }
.streak-chip .row__chev { color: var(--text-faint); }

.streak-hero { display: flex; align-items: center; gap: var(--sp-4); }
.streak-hero__flame {
  width: 52px; height: 52px; border-radius: var(--r-md); flex: none;
  display: grid; place-items: center;
  background: rgba(255,255,255,.16); color: #FFE8D4;
}
.streak-hero__best { margin-left: auto; text-align: right; font-size: 11.5px; opacity: .85; }
.streak-hero__best b { display: block; font-size: 15px; margin-top: 2px; }

.ach-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.ach {
  padding: var(--sp-4) var(--sp-3); border-radius: var(--r-lg);
  background: var(--surface); box-shadow: var(--elev-1);
  text-align: center; opacity: .55; filter: grayscale(1);
  transition: opacity .2s, filter .2s, transform .2s;
}
.ach.is-on { opacity: 1; filter: none; box-shadow: var(--elev-2); }
.ach__icon {
  width: 44px; height: 44px; border-radius: var(--r-pill); margin: 0 auto var(--sp-2);
  display: grid; place-items: center;
  background: var(--surface-sunken); color: var(--text-muted);
}
.ach.is-on .ach__icon { background: var(--brand-050); color: var(--brand-600); }
.ach__name { font-size: 13px; font-weight: 700; }
.ach__desc { font-size: 11.5px; color: var(--text-muted); margin-top: 3px; line-height: 1.35; }
.ach__date { font-size: 10.5px; color: var(--brand-600); font-weight: 600; margin-top: 6px; }
.sp-transfer {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 0; font-size: 14px; font-weight: 600;
}
.sp-transfer + .sp-transfer { border-top: 1px solid var(--border); }
.sp-transfer svg { color: var(--text-faint); flex: none; }
.sp-transfer__to { flex: 1; }
.sp-transfer__amt { font-weight: 800; }
.sp-person { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; font-size: 13.5px; }
.sp-person + .sp-person { border-top: 1px solid var(--border); }
.sp-person__name { color: var(--text-muted); }
.sp-person__net { font-weight: 700; text-align: right; }
.sp-transfer__from { font-weight: 700; }

/* savings reached row */
.sv-reached { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.sv-reached .link-btn { display: inline-flex; align-items: center; gap: 4px; }

/* share sheet list rows with icons */
.sheet__list button svg { flex: none; color: var(--brand-600); }
