@font-face {
  font-family: "Savings Round";
  src: url("./assets/savings-round.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --ink: #263238;
  --ink-soft: #64717a;
  --paper: #fff9fc;
  --surface: #ffffff;
  --line: #cbd5da;
  --lime: #d2ef78;
  --mint: #bcebd5;
  --sky: #b9ddff;
  --coral: #ffaaa6;
  --yellow: #ffe17c;
  --lavender: #d8c6ff;
  --danger: #a83c3e;
  --shadow: 0 6px 0 rgba(69, 82, 88, .11), 0 16px 34px rgba(69, 82, 88, .12);
  font-family: "Savings Round", ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: weight;
  line-height: 1.5;
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body { margin: 0; min-width: 0; background: var(--paper); }
button, input, select { font: inherit; }
button { color: inherit; }

.app-shell { position: relative; isolation: isolate; width: min(100%, 720px); min-height: 100vh; margin: 0 auto; padding: max(18px, env(safe-area-inset-top)) 18px 0; }
.app-shell::before { content: ""; position: absolute; z-index: 0; inset: 0; background-image: url("./assets/pet-finance-pattern.png"), url("./assets/paw-savings-pattern.png"); background-position: -55px 118px, 22px 94px; background-size: 430px 430px, 280px 280px; opacity: .035; pointer-events: none; }
.app-shell > * { position: relative; z-index: 1; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin: 2px 2px 20px; }
.topbar-actions { display: flex; align-items: center; flex-shrink: 0; gap: 7px; padding-block: 4px; }
.topbar-mascots { width: 70px; height: auto; display: block; margin: 0; object-fit: contain; filter: drop-shadow(0 3px 0 rgba(38,50,56,.14)); transform-origin: 50% 82%; animation: mascotHello 5.4s ease-in-out infinite; user-select: none; }
.eyebrow, .section-kicker { margin: 0 0 4px; color: var(--ink-soft); font-size: .78rem; font-weight: 700; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 1.625rem; line-height: 1.3; letter-spacing: 0; }
h2 { margin-bottom: 0; font-size: 1.0625rem; line-height: 1.4; letter-spacing: 0; }
.icon-button { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); cursor: pointer; }
.icon-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.view { display: none; }
.view.active { display: block; animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: .35; transform: translateY(4px); } }

.balance-panel { position: relative; overflow: hidden; padding: 22px; border-radius: 8px; color: #f8fff9; background: var(--ink); box-shadow: var(--shadow); }
.balance-panel::before { content: ""; position: absolute; inset: 0; background-image: url("./assets/pet-finance-pattern.png"), url("./assets/paw-savings-pattern.png"); background-position: right -54px top -44px, center; background-size: 390px 390px, 250px 250px; background-repeat: no-repeat, repeat; opacity: .08; pointer-events: none; }
.balance-panel > * { position: relative; z-index: 1; }
.balance-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: .9rem; color: #d5ded9; }
.currency-switch { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border: 1px solid rgba(255,255,255,.18); border-radius: 7px; background: rgba(255,255,255,.08); }
.currency-option { min-width: 56px; padding: 7px 9px; border: 0; border-radius: 5px; background: transparent; color: #d7dfda; font-size: .76rem; font-weight: 700; cursor: pointer; }
.currency-option.active { color: var(--ink); background: var(--lime); }
.total-value { margin: 26px 0 4px; font-size: 3.6rem; line-height: 1.1; font-weight: 800; letter-spacing: 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.secondary-value { color: #c6d2cb; font-size: .95rem; font-variant-numeric: tabular-nums; }
.native-balances { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 20px; }
.native-balance { min-width: 0; padding: 11px 12px; border: 1px solid rgba(255,255,255,.13); border-radius: 7px; background: rgba(255,255,255,.07); }
.native-balance span { display: block; margin-bottom: 5px; color: #aebbb4; font-size: .72rem; font-weight: 700; }
.native-balance strong { display: block; overflow: hidden; color: #f8fff9; font-size: .98rem; line-height: 1.2; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.rate-card { margin-top: 17px; padding: 12px; border: 1.5px solid rgba(255,255,255,.2); border-radius: 7px; background: rgba(9,32,27,.2); color: #eef8f4; }
.rate-card-main { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.rate-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 4px rgba(255,225,124,.18); flex: 0 0 auto; }
.rate-copy { min-width: 0; display: grid; gap: 2px; }
.rate-copy strong { font-size: .83rem; line-height: 1.35; font-variant-numeric: tabular-nums; }
.rate-copy span, .rate-time { color: #cfe2dc; font-size: .68rem; line-height: 1.45; }
.rate-refresh { width: 34px; height: 34px; display: grid; place-items: center; border: 1.5px solid rgba(255,255,255,.34); border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; cursor: pointer; transition: transform .16s ease, background-color .16s ease; }
.rate-refresh svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rate-refresh:active { transform: scale(.93); }
.rate-refresh:disabled { cursor: wait; opacity: .7; }
.rate-card[data-state="loading"] .rate-refresh svg { animation: rateSpin 1s linear infinite; }
.rate-card[data-state="error"] .rate-dot, .rate-card[data-state="stale"] .rate-dot { background: var(--coral); box-shadow: 0 0 0 4px rgba(255,170,166,.18); }
.rate-card[data-state="manual"] .rate-dot { background: var(--sky); box-shadow: 0 0 0 4px rgba(185,221,255,.18); }
.rate-time { margin: 7px 0 0 19px; }
.rate-notice { margin-top: 8px; padding: 7px 9px; border-radius: 5px; background: rgba(255,255,255,.08); color: #e3f0eb; font-size: .69rem; line-height: 1.5; }
.rate-card[data-state="error"] .rate-notice, .rate-card[data-state="stale"] .rate-notice { background: rgba(255,170,166,.13); color: #ffe2df; }
.rate-manual { display: flex; align-items: stretch; flex-direction: column; gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed rgba(255,255,255,.28); }
.rate-manual[hidden] { display: none; }
.rate-manual span { color: #f4fbf8; font-size: .7rem; line-height: 1.45; }
.rate-manual button { flex: 0 0 auto; width: 100%; min-height: 36px; padding: 0 12px; border: 1.5px solid #a88d35; border-radius: 6px; background: var(--yellow); color: var(--ink); font-size: .75rem; font-weight: 800; cursor: pointer; }
.rate-unavailable { color: #ffe8aa; }

.action-row { position: relative; isolation: isolate; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 16px 0 28px; }
.action-row::before { content: ""; position: absolute; z-index: 0; inset: -2px 0 -5px; border-radius: 8px; background: url("./assets/pet-finance-pattern.png") center 42% / 420px 420px; opacity: .06; pointer-events: none; }
.quick-action { position: relative; z-index: 1; display: grid; justify-items: center; gap: 8px; padding: 12px 4px 10px; border: 0; border-radius: 7px; background: transparent; font-size: .8rem; font-weight: 700; cursor: pointer; }
.quick-action:active { transform: translateY(1px); }
.action-mark { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); font-size: 1.15rem; box-shadow: 0 4px 14px rgba(35,55,46,.06); }
.action-mark.plus { background: var(--lime); border-color: var(--lime); }

.saving-reminders { margin: -6px 0 26px; }
.reminder-heading { display: flex; align-items: center; justify-content: space-between; margin: 0 2px 9px; }
.reminder-heading strong { font-size: .9rem; }
.reminder-heading span { color: var(--ink-soft); font-size: .74rem; }
.saving-reminder { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 11px; padding: 13px; border: 1px solid #d8dfb7; border-radius: 8px; background: #f4f8de; }
.saving-reminder + .saving-reminder { margin-top: 8px; }
.reminder-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--lime); font-size: .76rem; font-weight: 900; }
.reminder-name { margin-bottom: 3px; font-size: .88rem; font-weight: 800; }
.reminder-meta { color: var(--ink-soft); font-size: .72rem; }
.reminder-action { min-width: 74px; min-height: 38px; padding: 0 12px; border: 0; border-radius: 7px; background: var(--ink); color: white; font-size: .8rem; font-weight: 800; cursor: pointer; }

.section-block { margin-top: 26px; }
.section-title-row { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin: 0 2px 12px; }
.section-heading { position: relative; min-height: 44px; display: grid; align-content: center; padding-left: 48px; }
.section-heading::before { left: 0; top: 50%; transform: translateY(-50%); animation: stickerPop .48s cubic-bezier(.2,.9,.25,1.2) both; }
.goal-heading::before { animation-delay: .05s; }
.ledger-heading::before, .daily-ledger-heading::before { animation-delay: .1s; }
.section-actions { display: flex; align-items: center; gap: 14px; }
.asset-title-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; }
.asset-spend-button, .goal-add-button, .budget-add-button { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border: 1.5px solid #c77681; border-radius: 8px; background: #df6876; color: white; box-shadow: inset 0 0 0 3px rgba(255,255,255,.25), 0 4px 0 #efc4cc; font-size: .9375rem; font-weight: 700; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease; }
.asset-spend-button { grid-column: 2; min-width: 112px; justify-self: center; }
.asset-spend-button strong { font: inherit; }
.asset-spend-button img { filter: brightness(0) invert(1); }
.goal-add-button { min-width: 98px; min-height: 44px; border-color: #91b6a5; background: #e0f4e9; color: #315b4c; box-shadow: inset 0 0 0 3px #f6fff9, 0 4px 0 #cde6d8; }
.budget-add-button { min-width: 86px; min-height: 44px; padding: 0 12px; gap: 5px; border-color: #d9bf76; background: #fff0ba; color: #665320; box-shadow: inset 0 0 0 3px #fff9e5, 0 3px 0 #eadbb0; white-space: nowrap; flex-shrink: 0; }
.asset-spend-button:active, .goal-add-button:active, .budget-add-button:active { transform: translateY(3px) scale(.98); box-shadow: inset 0 0 0 3px rgba(255,255,255,.25), 0 1px 0 #d9c6ce; }
.budget-title-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; }
.budget-heading { min-width: 0; justify-self: start; }
.budget-secondary-actions { justify-self: end; gap: 8px; }
.budget-secondary-actions .text-button { white-space: nowrap; flex-shrink: 0; }
.budget-spend-button { min-width: 110px; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; justify-self: center; padding: 0 18px; border: 2px solid var(--ink); border-radius: 8px; background: #eb6862; color: #fff; box-shadow: 0 4px 0 #8d332f, 0 10px 18px rgba(141,51,47,.16); font-size: .94rem; font-weight: 900; cursor: pointer; animation: gentleBob 4.6s ease-in-out infinite; transition: transform .16s ease, box-shadow .16s ease, background .16s ease; }
.budget-spend-button span { width: 25px; height: 25px; display: grid; place-items: center; border: 2px solid rgba(255,255,255,.9); border-radius: 50%; background: rgba(255,255,255,.18); font-size: 1.15rem; line-height: 1; }
.budget-spend-button strong { font: inherit; }
.budget-spend-button:active { animation: none; transform: translateY(3px) scale(.98); box-shadow: 0 1px 0 #8d332f; }
.budget-spend-button:focus-visible { outline: 3px solid #b9a9e8; outline-offset: 3px; }
.text-button { min-height: 38px; padding: 0 2px; border: 0; background: transparent; color: #315d4b; font-size: .86rem; font-weight: 800; cursor: pointer; }
.text-button.expense { min-width: 88px; min-height: 44px; padding: 0 16px; border: 1px solid #913329; border-radius: 7px; background: var(--danger); color: #fff; font-size: .92rem; box-shadow: 0 5px 14px rgba(168, 61, 49, .18); }
.text-button.expense:active { transform: translateY(1px); box-shadow: 0 2px 8px rgba(168, 61, 49, .16); }
.text-button.distribute { position: relative; min-width: 72px; min-height: 40px; padding: 0 11px; border: 1px solid #63879a; border-radius: 7px; background: #eaf6ff; color: #244b5d; }
.text-button.distribute.has-pending::after { content: ""; position: absolute; top: -4px; right: -4px; width: 9px; height: 9px; border: 2px solid #fff; border-radius: 50%; background: #eb6862; animation: pendingPulse 1.8s ease-in-out infinite; }
.muted-count { color: var(--ink-soft); font-size: .8rem; }
.asset-list, .goal-list, .transaction-list, .budget-list { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.asset-row { width: 100%; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto 12px; align-items: center; gap: 12px; min-height: 74px; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--line); background: var(--surface); color: var(--ink); text-align: left; font: inherit; cursor: pointer; }
.asset-row:last-child, .goal-row:last-child, .transaction-row:last-child, .budget-row:last-child { border-bottom: 0; }
.asset-row:focus-visible { position: relative; z-index: 1; outline: 3px solid #806aa7; outline-offset: -3px; }
.asset-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 7px; font-size: .76rem; font-weight: 900; }
.asset-icon.fixed { background: var(--yellow); }
.asset-icon.flex { background: var(--mint); }
.asset-icon.hu { background: var(--coral); }
.asset-icon.lin { background: var(--sky); }
.asset-icon.vault { background: #d9c8ee; }
.asset-icon.custom { background: #e4d7f2; }
.asset-copy, .asset-name, .asset-note, .asset-amount, .asset-share { display: block; }
.asset-name { margin-bottom: 3px; font-size: .94rem; font-weight: 800; }
.asset-note { color: var(--ink-soft); font-size: .74rem; }
.asset-amount { text-align: right; font-size: .92rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.asset-share { margin-top: 5px; color: var(--ink-soft); font-size: .7rem; font-weight: 600; }
.asset-open { color: #7b6a91; font-size: 1.35rem; line-height: 1; }

.goal-row { width: 100%; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 14px; border: 0; border-bottom: 1px solid var(--line); background: var(--surface); color: var(--ink); text-align: left; font: inherit; cursor: pointer; }
.goal-row:active { background: #f5f2fa; }
.goal-row-content, .goal-row-name, .goal-home-grid span, .goal-home-grid small, .goal-home-grid strong { display: block; }
.goal-row-name { margin-bottom: 10px; font-size: .94rem; font-weight: 900; }
.goal-home-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 12px; }
.goal-home-grid small { margin-bottom: 3px; color: var(--ink-soft); font-size: .7rem; }
.goal-home-grid strong { overflow: hidden; font-size: .82rem; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.goal-row-arrow { color: #7b6a91; font-size: 1.7rem; line-height: 1; }

.transaction-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 11px; min-height: 66px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.transaction-name, .transaction-meta { overflow-wrap: anywhere; }
.transaction-symbol { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: #edf0ec; font-size: 1rem; font-weight: 700; }
.transaction-symbol.income { color: #246045; background: #dff3e7; }
.transaction-symbol.expense { color: var(--danger); background: #fde7e2; }
.transaction-symbol.move { color: #315a6c; background: #e2f0f6; }
.transaction-name { margin-bottom: 3px; font-size: .88rem; font-weight: 800; }
.transaction-meta { color: var(--ink-soft); font-size: .72rem; }
.transaction-side { display: grid; justify-items: end; gap: 7px; }
.transaction-amount { text-align: right; font-size: .86rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.transaction-amount.positive { color: #24704d; }
.transaction-amount.negative { color: var(--danger); }
.transaction-edit, .record-edit { min-height: 30px; padding: 4px 9px; border: 1.5px solid #536d66; border-radius: 6px; background: #ecf7f3; color: #315f53; font-size: .7rem; font-weight: 900; cursor: pointer; }
.transaction-edit:active, .record-edit:active { transform: translateY(1px); }

.person-summary { padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.person-identity { display: flex; align-items: center; gap: 12px; }
.person-identity > div { min-width: 0; }
.avatar { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 50%; font-weight: 900; }
.avatar.hu { background: var(--coral); }
.avatar.lin { background: var(--sky); }
.avatar.small { width: 28px; height: 28px; font-size: .72rem; }
.person-identity h2 { font-size: 1.2rem; line-height: 1.25; overflow-wrap: anywhere; }
.person-identity p { margin: 4px 0 0; color: var(--ink-soft); font-size: .75rem; line-height: 1.6; }
.person-identity p > span { display: block; }
.person-period { white-space: nowrap; }
.person-balance { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 18px; }
.person-stat { padding: 13px; border-radius: 7px; background: #f1f3ef; }
.person-stat span { display: block; color: var(--ink-soft); font-size: .72rem; }
.person-stat strong { display: block; margin-top: 6px; white-space: nowrap; font-size: 1rem; font-variant-numeric: tabular-nums; }
.person-stat strong.negative { color: var(--danger); }
.next-week-strip { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.next-week-mark { min-width: 44px; height: 38px; display: grid; place-items: center; padding: 0 7px; border-radius: 7px; background: #cfe8f6; font-size: .72rem; font-weight: 900; }
.next-week-strip span:not(.next-week-mark), .next-week-strip small { display: block; }
.next-week-strip span:not(.next-week-mark) { font-size: .78rem; font-weight: 900; }
.next-week-strip small { margin-top: 3px; color: var(--ink-soft); font-size: .7rem; line-height: 1.35; }
.next-week-strip strong { white-space: nowrap; font-size: .94rem; font-variant-numeric: tabular-nums; }
.vault-strip { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 14px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.vault-summary { display: flex; align-items: center; gap: 10px; min-width: 0; }
.vault-mark { --portrait-size: 46px; --portrait-x: 245; --portrait-y: 529; --portrait-w: 118; --portrait-h: 115; width: 50px; height: 50px; flex: 0 0 auto; display: grid; place-items: center; }
.vault-summary > div > span { display: block; color: var(--ink-soft); font-size: .8125rem; font-weight: 700; }
.vault-summary strong { display: block; margin-top: 3px; font-size: 1rem; font-variant-numeric: tabular-nums; }
.vault-actions { display: flex; gap: 8px; }
.vault-actions button { min-height: 38px; padding: 0 11px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: #315d4b; font-size: .76rem; font-weight: 800; cursor: pointer; }
.budget-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 45%); gap: 8px 16px; padding: 14px 18px; border-bottom: 1px solid var(--line); isolation: isolate; }
.budget-name { font-size: 1.125rem; font-weight: 700; line-height: 1.5; }
.budget-frequency { margin-top: 4px; color: #65746f; font-size: .8125rem; line-height: 1.5; }
.budget-status { position: relative; z-index: 1; grid-column: 1 / -1; color: #52605a; font-size: .78125rem; line-height: 1.75; font-variant-numeric: tabular-nums; }
.budget-side { display: grid; justify-items: end; gap: 4px; }
.budget-side-label { padding: 2px 7px; border-radius: 5px; background: rgba(255,255,255,.64); color: var(--ink-soft); font-size: .8125rem; font-weight: 700; line-height: 1.4; }
.budget-amount { font-weight: 800; font-variant-numeric: tabular-nums; }
.budget-side-label.over, .budget-amount.over, .budget-side-label.underfunded, .budget-amount.underfunded { color: var(--danger); }
.budget-side-actions { display: flex; justify-content: flex-end; gap: 6px; }
.budget-edit { min-width: 48px; min-height: 30px; padding: 0 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: #315d4b; font-size: .74rem; font-weight: 800; cursor: pointer; }
.budget-undo { min-width: 48px; min-height: 30px; padding: 0 9px; border: 1px solid #a7772c; border-radius: 6px; background: #fff4c7; color: #79501f; font-size: .74rem; font-weight: 800; cursor: pointer; }
.budget-row.over, .budget-row.underfunded { background: #fff2f1; box-shadow: inset 5px 0 0 var(--danger); }
.budget-row.over .budget-name, .budget-row.over .budget-status, .budget-row.underfunded .budget-name, .budget-row.underfunded .budget-status { color: #a33d38; }
.budget-transfer-panel { padding: 14px; border: 1px solid #d5b13f; border-radius: 7px; background: #fffbea; }
.budget-transfer-panel .helper-card { margin-top: 10px; background: #fff; }
.empty-state { padding: 24px 16px 28px; text-align: center; color: var(--ink-soft); font-size: .84rem; }
.empty-state::before { content: ""; width: 92px; height: 74px; display: block; margin: 0 auto 9px; background: url("./assets/cat-dog-mascots.png") center / contain no-repeat; }

.bottom-space { height: calc(102px + env(safe-area-inset-bottom)); }
.bottom-nav { position: fixed; z-index: 20; left: 50%; bottom: 0; width: min(100%, 720px); transform: translateX(-50%); display: grid; grid-template-columns: repeat(3, 1fr); padding: 9px 18px calc(9px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(23,37,32,.12); background: rgba(255,255,255,.93); backdrop-filter: blur(18px); }
.nav-item { min-height: 56px; display: grid; place-items: center; align-content: center; gap: 3px; border: 0; background: transparent; color: #7b8580; font-size: .7rem; font-weight: 800; cursor: pointer; }
.nav-item.active { color: var(--ink); }

.modal-backdrop { position: fixed; z-index: 50; inset: 0; display: grid; align-items: end; justify-items: center; background: rgba(10,20,16,.48); backdrop-filter: blur(3px); }
.modal-backdrop[hidden] { display: none; }
.sheet { width: min(100%, 720px); max-height: 88vh; overflow-y: auto; padding: 9px 18px calc(20px + env(safe-area-inset-bottom)); border-radius: 12px 12px 0 0; background: var(--surface); box-shadow: 0 -20px 55px rgba(0,0,0,.18); animation: sheetUp .25s ease; }
@keyframes sheetUp { from { transform: translateY(40px); opacity: .7; } }
.sheet-handle { width: 42px; height: 5px; margin: 0 auto 8px; border-radius: 9px; background: #d6dbd7; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.sheet-head h2 { font-size: 1.25rem; }
.icon-button.close { border: 0; background: #f0f2ef; font-size: 1.5rem; font-weight: 300; }
.field { margin-bottom: 15px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.schedule-row.single { grid-template-columns: 1fr; }
.field label, .field-label { display: block; margin-bottom: 7px; font-size: .8rem; font-weight: 800; }
.field input, .field select { width: 100%; min-height: 48px; padding: 0 12px; border: 1px solid #cfd6d1; border-radius: 7px; outline: none; background: #fbfcfa; color: var(--ink); font-size: 1rem; }
.field input:focus, .field select:focus { border-color: #426b59; box-shadow: 0 0 0 3px rgba(66,107,89,.1); }
.amount-field { position: relative; }
.amount-field span { position: absolute; left: 13px; top: 14px; color: var(--ink-soft); font-weight: 800; }
.amount-field input { padding-left: 38px; font-size: 1.28rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.keypad-amount-field input { background: #f7fbff; caret-color: transparent; cursor: default; }
.amount-keypad { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 9px 0 2px; }
.keypad-key { min-width: 0; min-height: 48px; border: 2px solid var(--ink); border-radius: 7px; background: #fff; color: var(--ink); box-shadow: 0 3px 0 #b8c8cf; font-size: 1.08rem; font-weight: 900; cursor: pointer; touch-action: manipulation; user-select: none; transition: transform .12s ease, box-shadow .12s ease, background .12s ease; }
.keypad-key[data-amount-key="00"] { background: #fff7cd; }
.keypad-key[data-amount-key="decimal"] { background: #dff5ea; }
.keypad-key.utility { background: #ffe2e1; color: #8d332f; }
.keypad-key[data-amount-key="clear"] { background: #fff0bd; color: #755c0c; }
.keypad-key.zero { grid-column: span 3; background: #eaf6ff; }
.keypad-key:active { transform: translateY(2px) scale(.98); box-shadow: 0 1px 0 #b8c8cf; }
.keypad-key:focus-visible { outline: 3px solid #b9a9e8; outline-offset: 2px; }
.helper-card { margin: 4px 0 15px; padding: 13px; border: 1px solid #dce3d7; border-radius: 7px; background: #f4f8eb; color: #3b4d3a; font-size: .78rem; line-height: 1.55; }
.helper-card strong { color: var(--ink); }
.helper-card.warning-card { border-color: #d75953; background: #fff0ef; color: #943d38; }
.allocation-calculation { padding: 0; overflow: hidden; }
.goal-allocation-summary { margin: 0 0 16px; padding: 0 2px 12px; border-bottom: 1px dashed #d6c5d9; }
.goal-allocation-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; margin: 0; }
.goal-allocation-facts > div { min-width: 0; }
.goal-allocation-facts dt, .goal-allocation-dates span { color: var(--ink-soft); font-size: .75rem; line-height: 1.5; }
.goal-allocation-facts dd { margin: 4px 0 0; color: var(--ink); font-size: .9375rem; font-weight: 700; line-height: 1.45; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.goal-allocation-facts small { display: block; margin-top: 3px; color: var(--ink-soft); font-size: .6875rem; line-height: 1.5; }
.goal-allocation-gap dd { color: #8d5771; }
.goal-allocation-balances { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 12px; color: var(--ink-soft); font-size: .75rem; line-height: 1.5; }
.goal-allocation-balances strong { color: #41584d; font-weight: 700; overflow-wrap: anywhere; }
.goal-allocation-preview { margin-top: 12px; padding: 12px; border-left: 3px solid #8dc4ac; border-radius: 0 6px 6px 0; background: #eef9f2; }
.goal-allocation-dates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.goal-allocation-dates > div { min-width: 0; }
.goal-allocation-dates strong { display: block; margin-top: 4px; color: var(--ink); font-size: .875rem; line-height: 1.5; overflow-wrap: anywhere; }
.goal-allocation-after strong { color: #28654f; }
.goal-allocation-status { margin: 8px 0 0; color: #496353; font-size: .75rem; line-height: 1.6; overflow-wrap: anywhere; }
.goal-allocation-preview.invalid { border-color: #d9787d; background: #fff0f0; }
.goal-allocation-preview.invalid .goal-allocation-status { color: #a63c43; }
.goal-allocation-summary[hidden], .goal-allocation-preview[hidden] { display: none; }
.allocation-calc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: #fffdf5; }
.allocation-calc-grid div { min-width: 0; padding: 11px 9px; text-align: center; }
.allocation-calc-grid div + div { border-left: 1px dashed #b9cc96; }
.allocation-calc-grid span, .allocation-calc-grid strong { display: block; }
.allocation-calc-grid span { margin-bottom: 3px; color: var(--ink-soft); font-size: .67rem; font-weight: 800; }
.allocation-calc-grid strong { overflow-wrap: anywhere; color: var(--ink); font-size: .94rem; font-variant-numeric: tabular-nums; }
.allocation-calc-status { margin: 0; padding: 10px 12px 5px; color: var(--ink); font-weight: 800; }
.allocation-calc-detail { margin: 0; padding: 0 12px 11px; color: var(--ink-soft); font-size: .72rem; line-height: 1.5; }
.budget-allocation-summary { display: grid; gap: 7px; margin-bottom: 12px; padding: 14px; border: 2px solid #806aa7; border-radius: 8px; background: #f7efff; box-shadow: 0 4px 0 #ddcfeb; }
.budget-allocation-summary div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.budget-allocation-summary span { color: var(--ink-soft); font-size: .78rem; font-weight: 800; }
.budget-allocation-summary strong { font-size: 1.16rem; font-variant-numeric: tabular-nums; }
.budget-allocation-summary small { color: var(--ink-soft); font-size: .72rem; line-height: 1.45; }
.budget-fill-button { margin-bottom: 16px; }
.budget-allocation-list { overflow: hidden; border: 2px solid #aebdc4; border-radius: 8px; background: #fff; }
.field .budget-allocation-row { display: grid; grid-template-columns: minmax(0, 1fr) 122px; align-items: center; gap: 10px; min-height: 68px; margin: 0; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.budget-allocation-row:last-child { border-bottom: 0; }
.budget-allocation-copy strong, .budget-allocation-copy small { display: block; }
.budget-allocation-copy strong { margin-bottom: 4px; font-size: .86rem; }
.budget-allocation-copy small { color: var(--ink-soft); font-size: .7rem; line-height: 1.4; }
.budget-allocation-amount { position: relative; display: block; }
.budget-allocation-amount b { position: absolute; z-index: 1; left: 10px; top: 12px; color: var(--ink-soft); font-size: .8rem; }
.budget-allocation-amount input { width: 100%; min-height: 42px; padding: 0 9px 0 30px; border: 2px solid #acbac1; border-radius: 7px; outline: none; background: #fff; color: var(--ink); font-size: .94rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.budget-allocation-amount input:focus { border-color: #6d5aa7; box-shadow: 0 0 0 3px #e9e0ff; }
.budget-allocation-row.disabled { background: #f3f4f2; }
.budget-allocation-row.disabled input { color: #89918d; background: #e7eae7; }
.goal-detail-hero { display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; gap: 12px; padding: 14px; border: 1px solid #cfc3dc; border-radius: 7px; background: #f7f1ff; }
.goal-detail-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 7px; background: #e4d7f2; font-size: .76rem; font-weight: 900; }
.goal-detail-hero span, .goal-detail-hero strong { display: block; }
.goal-detail-hero span { margin-bottom: 4px; color: var(--ink-soft); font-size: .72rem; }
.goal-detail-hero strong { font-size: 1rem; font-variant-numeric: tabular-nums; }
.goal-detail-hero b { font-size: 1rem; }
.goal-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.goal-detail-grid > div { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 7px; background: #fbfcfa; }
.goal-detail-grid span, .goal-detail-grid strong { display: block; }
.goal-detail-grid span { margin-bottom: 5px; color: var(--ink-soft); font-size: .72rem; }
.goal-detail-grid strong { overflow: hidden; font-size: .9rem; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.goal-final-note { margin-top: 8px; padding: 9px 11px; border-radius: 7px; background: #fff8d9; color: #665b35; font-size: .74rem; line-height: 1.45; }
.goal-date-panel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.goal-date-panel > div { padding: 12px; border-radius: 7px; background: #eef7fb; }
.goal-date-panel span, .goal-date-panel strong { display: block; }
.goal-date-panel span { margin-bottom: 5px; color: var(--ink-soft); font-size: .72rem; }
.goal-date-panel strong { font-size: .88rem; }
.goal-spent-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 15px 2px 12px; padding-top: 13px; border-top: 1px dashed #c7cfd2; font-size: .82rem; }
.goal-spent-line span { color: var(--ink-soft); }
.goal-spent-line strong { font-variant-numeric: tabular-nums; }
.goal-action-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.goal-spend-button { width: 100%; min-height: 46px; margin-bottom: 12px; border: 1px solid #a94b46; border-radius: 7px; background: #fff0ef; color: #943d38; font-size: .88rem; font-weight: 900; cursor: pointer; }
.goal-action-row .goal-spend-button { margin: 0; }
.goal-spend-button:disabled { opacity: .45; cursor: not-allowed; }
.goal-withdraw-button { min-width: 0; min-height: 46px; border: 1px solid #527f73; border-radius: 7px; background: #e7f7f1; color: #315f53; font-size: .88rem; font-weight: 900; cursor: pointer; }
.goal-withdraw-button:disabled { opacity: .45; cursor: not-allowed; }
.goal-rule-note { margin-bottom: 18px; }
.goal-spend-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; padding: 14px; border: 1px solid #cfc3dc; border-radius: 7px; background: #f7f1ff; }
.goal-spend-summary span { color: var(--ink-soft); font-size: .8rem; font-weight: 800; }
.goal-spend-summary strong { font-size: 1.08rem; font-variant-numeric: tabular-nums; }
.asset-detail-native { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 22px; }
.asset-detail-native > div { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 7px; background: #fbfcfa; }
.asset-detail-native span, .asset-detail-native strong, .asset-detail-native small { display: block; }
.asset-detail-native span { margin-bottom: 6px; color: var(--ink-soft); font-size: .76rem; font-weight: 800; }
.asset-detail-native strong { overflow: hidden; font-size: 1.08rem; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.asset-detail-native small { margin-top: 7px; color: var(--ink-soft); font-size: .7rem; }
.fixed-fields { min-width: 0; margin: 0; padding: 0; border: 0; }
#allocationFixedFields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 12px; }
.fixed-fields[hidden] { display: none !important; }
.fixed-projects { margin: 0 0 20px; }
.fixed-projects .deposit-history-head { gap: 12px; }
.fixed-projects .budget-add-button { display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; border: 1.5px solid #d9bf76; background: #fff0ba; color: #665320; white-space: nowrap; }
.fixed-item-list { border-block: 1px dashed #bfd4c9; }
.fixed-item-row { width: 100%; display: grid; grid-template-columns: 44px minmax(0, 1fr) 18px; gap: 12px; align-items: center; padding: 14px 8px; border: 0; border-bottom: 1px dashed #cdded5; background: #f3fbf7; color: var(--ink); text-align: left; cursor: pointer; transition: background-color .2s ease; }
.fixed-item-row:nth-child(even) { background: #fff9ea; }
.fixed-item-row:last-child { border-bottom: 0; }
.fixed-item-row:active { background: #e0f2e8; }
.fixed-item-copy { min-width: 0; }
.fixed-item-copy > strong { display: block; margin-bottom: 8px; font-size: 1rem; overflow-wrap: anywhere; }
.fixed-item-copy > span { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.fixed-item-copy > span > span { display: grid; gap: 3px; color: var(--ink-soft); font-size: .75rem; }
.fixed-item-copy b { color: var(--ink); font-size: .875rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.fixed-item-chevron { transform: rotate(-90deg); opacity: .65; }
.fixed-detail-tools { display: flex; justify-content: space-between; gap: 12px; margin: -6px 0 16px; }
.fixed-detail-tools button { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; }
.deposit-record-copy .fixed-record-project { margin: 4px 0; color: #4c7768; font-size: .75rem; overflow-wrap: anywhere; }
.deposit-history { margin-top: 4px; }
.deposit-history-head { display: flex; align-items: center; justify-content: space-between; margin: 0 2px 9px; }
.deposit-history-head h3 { margin: 0; font-size: .96rem; }
.deposit-history-head span { color: var(--ink-soft); font-size: .74rem; font-weight: 700; }
.deposit-record-list { overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.deposit-record { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 70px; padding: 12px; border-bottom: 1px solid var(--line); }
.deposit-record:last-child { border-bottom: 0; }
.deposit-record-copy strong, .deposit-record-copy span, .deposit-record-value strong, .currency-badge { display: block; }
.deposit-record-copy strong { margin-bottom: 5px; font-size: .84rem; }
.deposit-record-copy span { color: var(--ink-soft); font-size: .72rem; }
.deposit-record-value { text-align: right; }
.deposit-record-value strong { margin-bottom: 5px; color: #24704d; font-size: .86rem; font-variant-numeric: tabular-nums; }
.record-edit { display: block; margin: 7px 0 0 auto; }
.expense-history { margin-top: 18px; }
.expense-record .deposit-record-value strong { color: #b33f39; }
.withdrawal-history { margin-top: 18px; }
.withdrawal-record .deposit-record-value strong { color: #526fa0; }
.currency-badge { width: fit-content; margin-left: auto; padding: 3px 6px; border-radius: 5px; color: #47545b; background: #edf2f4; font-size: .64rem; font-weight: 800; white-space: nowrap; }
.currency-badge.cny { background: #fff1c2; }
.currency-badge.aud { background: #dff2ff; }
.deposit-empty { padding: 20px 14px; color: var(--ink-soft); text-align: center; font-size: .78rem; line-height: 1.5; }
.frequency-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border: 1px solid #cfd6d1; border-radius: 7px; background: #f1f3ef; }
.goal-frequency-picker { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.frequency-picker label { margin: 0; cursor: pointer; }
.frequency-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.frequency-picker span { min-height: 40px; display: grid; place-items: center; border-radius: 5px; color: var(--ink-soft); font-size: .84rem; font-weight: 800; }
.frequency-picker input:checked + span { color: var(--ink); background: var(--surface); box-shadow: 0 2px 8px rgba(28,45,38,.1); }
.frequency-picker input:focus-visible + span { outline: 2px solid #426b59; outline-offset: 1px; }
.direction-picker { grid-template-columns: repeat(2, 1fr); }
.settlement-list { overflow: hidden; border: 1px solid var(--line); border-radius: 7px; }
.field .settlement-row { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 62px; margin: 0; padding: 10px 12px; border-bottom: 1px solid var(--line); cursor: pointer; }
.settlement-row:last-child { border-bottom: 0; }
.settlement-row input { width: 18px; height: 18px; min-height: 0; margin: 0; accent-color: var(--ink); }
.settlement-copy strong, .settlement-copy small { display: block; }
.settlement-copy strong { margin-bottom: 3px; font-size: .84rem; }
.settlement-copy small { color: var(--ink-soft); font-size: .72rem; }
.settlement-row b { white-space: nowrap; font-size: .82rem; font-variant-numeric: tabular-nums; }
.settlement-row.disabled { color: #8b948f; background: #f5f6f3; cursor: default; }
.secondary-button { width: 100%; min-height: 42px; margin-bottom: 15px; border: 1px solid var(--ink); border-radius: 7px; background: var(--surface); font-weight: 800; cursor: pointer; }
.budget-delete-zone { display: grid; gap: 7px; margin: 20px 0 4px; padding-top: 18px; border-top: 1px dashed #d9c7c7; }
.budget-delete-zone small { color: var(--ink-soft); text-align: center; font-size: .72rem; }
.goal-delete-zone { display: grid; gap: 7px; margin: 20px 0 4px; padding-top: 18px; border-top: 1px dashed #d9c7c7; }
.goal-delete-zone small { color: var(--ink-soft); text-align: center; font-size: .72rem; }
.goal-delete-summary { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding: 14px; border: 2px solid #b96a65; border-radius: 8px; background: #fff1f0; }
.goal-delete-summary span, .goal-delete-summary strong { display: block; }
.goal-delete-summary span:not(.goal-delete-mark) { color: var(--ink-soft); font-size: .76rem; font-weight: 800; }
.goal-delete-summary strong { margin-top: 4px; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.goal-delete-mark { width: 38px; height: 38px; display: grid !important; flex: 0 0 auto; place-items: center; border: 2px solid var(--ink); border-radius: 8px; background: #ffaaa5; font-size: .74rem; font-weight: 900; }
.edit-expense-fixed { margin-bottom: 16px; padding: 13px 14px; border: 1.5px solid #b9cbd4; border-radius: 7px; background: #edf8ff; }
.edit-expense-fixed span, .edit-expense-fixed strong, .edit-expense-fixed small { display: block; }
.edit-expense-fixed span { color: var(--ink-soft); font-size: .74rem; font-weight: 800; }
.edit-expense-fixed strong { margin-top: 4px; font-size: .98rem; }
.edit-expense-fixed small { margin-top: 6px; color: var(--ink-soft); font-size: .7rem; }
.danger-button { width: 100%; min-height: 46px; border: 1px solid #b54c47; border-radius: 7px; background: #fff1f0; color: #a33d38; font-size: .88rem; font-weight: 900; cursor: pointer; }
.danger-button:active { transform: translateY(1px); }
.primary-button { width: 100%; min-height: 52px; border: 0; border-radius: 7px; background: var(--ink); color: white; font-size: 1rem; font-weight: 800; cursor: pointer; }
.primary-button:disabled { background: #9ba49f; cursor: not-allowed; }
.primary-button:active { transform: translateY(1px); }
.form-message { min-height: 20px; margin-bottom: 8px; color: var(--danger); font-size: .78rem; }
.toast { position: fixed; z-index: 80; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); transform: translate(-50%, 16px); min-width: 180px; padding: 11px 16px; border-radius: 7px; background: var(--ink); color: white; text-align: center; font-size: .84rem; font-weight: 700; opacity: 0; pointer-events: none; transition: .2s ease; box-shadow: var(--shadow); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Sticker-pop theme: visual changes only, with the original layout and flows intact. */
.app-shell { background: var(--paper); }
.topbar { margin-bottom: 22px; }
.eyebrow, .section-kicker { width: fit-content; padding: 3px 8px; border: 1.5px solid #d8c9f2; border-radius: 999px; background: #f7f0ff; color: #6d579c; font-weight: 900; }
h1 { color: #1f2c31; font-weight: 900; }
.icon-button { border: 2px solid #a9bfca; background: #fff; box-shadow: inset 0 0 0 3px #f1f8fc, 0 3px 0 #dce8ee; transition: transform .16s ease, box-shadow .16s ease; }
.icon-button:active { transform: translateY(2px) scale(.97); box-shadow: 0 1px 0 #c8d6dd; }

.view.active { animation: viewIn .32s cubic-bezier(.2, .8, .25, 1); }
.balance-panel { border: 2px solid #608d81; background: #315a52; box-shadow: inset 0 0 0 4px rgba(213,245,226,.1), 0 6px 0 #b7ddd2, 0 14px 28px rgba(45,72,66,.1); animation: cardPop .48s cubic-bezier(.2, .9, .25, 1.18); }
.balance-head { color: #edf8f4; font-weight: 800; }
.currency-switch { border: 2px solid rgba(255,255,255,.42); background: rgba(255,255,255,.1); }
.currency-option { color: #e8f2ef; transition: transform .16s ease, background-color .16s ease; }
.currency-option.active { background: var(--yellow); color: var(--ink); box-shadow: 0 2px 0 rgba(25,43,38,.3); }
.currency-option:active { transform: scale(.95); }
.secondary-value { color: #d6e9e3; }
.native-balance { border: 1.5px dashed rgba(255,255,255,.46); background: rgba(255,255,255,.1); box-shadow: inset 0 0 0 3px rgba(255,255,255,.03); }
.native-balance span { color: #d7e8e2; }
.rate-dot { animation: dotPulse 2s ease-in-out infinite; }

.action-row { margin-top: 20px; }
.quick-action { font-weight: 900; transition: transform .16s ease; }
.quick-action:active { transform: translateY(2px) scale(.96); }
.action-mark { border: 2px solid #788e95; border-radius: 8px; background: #fff; box-shadow: inset 0 0 0 3px rgba(255,255,255,.45), 0 4px 0 #d2dfe4; font-weight: 900; animation: gentleBob 3.8s ease-in-out infinite; }
.quick-action:nth-child(1) .action-mark { background: var(--lime); }
.quick-action:nth-child(2) .action-mark { background: var(--sky); animation-delay: -.9s; }
.quick-action:nth-child(3) .action-mark { background: var(--coral); animation-delay: -1.8s; }
.quick-action:nth-child(4) .action-mark { background: var(--lavender); animation-delay: -2.7s; }
.action-mark.plus { border-color: #8ea25b; }

.saving-reminder { border: 2px solid #8fa447; background: #f7ffd9; box-shadow: 0 4px 0 #dae8a9; }
.reminder-mark { border: 2px solid var(--ink); border-radius: 8px; }
.reminder-action { border: 2px solid var(--ink); background: var(--yellow); color: var(--ink); box-shadow: 0 3px 0 #b79b3e; }

.section-title-row h2 { position: relative; display: inline-block; font-weight: 900; }
.section-title-row h2::after { content: ""; position: absolute; left: 0; bottom: -6px; width: 42px; height: 4px; border-radius: 4px; background: repeating-linear-gradient(90deg, #ffd86b 0 8px, transparent 8px 12px); }
.muted-count { padding: 4px 8px; border: 1px dashed #b7c9d7; border-radius: 6px; background: #f1f8ff; font-weight: 700; }
.text-button { color: #376b60; font-weight: 900; transition: transform .16s ease; }
.text-button:active { transform: scale(.95); }
.text-button.expense, .budget-spend-button { border: 2px solid #b85b5b; background: #d95859; color: #fff; box-shadow: inset 0 0 0 3px rgba(255,255,255,.18), 0 4px 0 #f3bcbb, 0 7px 12px rgba(184,91,91,.1); }
.text-button.expense:active { transform: translateY(3px) scale(.98); box-shadow: 0 1px 0 #8d332f; }
.text-button.distribute { border: 2px solid #8aaec3; background: #d0eaff; box-shadow: inset 0 0 0 2px rgba(255,255,255,.58), 0 3px 0 #c6dfe9; }
.text-button.distribute:active { transform: translateY(2px) scale(.98); box-shadow: 0 1px 0 #9ab8c7; }

.asset-list, .goal-list, .transaction-list, .budget-list { --frame-color: #a7c9bb; --frame-shadow: #e0eee7; border: 2px solid var(--frame-color); box-shadow: 0 4px 0 var(--frame-shadow), 0 8px 14px rgba(69,82,88,.035); }
.goal-list { --frame-color: #cfb5d8; --frame-shadow: #eee2f2; }
.transaction-list { --frame-color: #b1c9dc; --frame-shadow: #e1edf6; }
.budget-list { --frame-color: #d5bfd1; --frame-shadow: #efe1ed; }
.asset-row, .goal-row, .transaction-row, .budget-row { border-bottom-style: dashed; border-bottom-color: var(--frame-color); }
.asset-list::after, .goal-list::after, .transaction-list::after, .budget-list::after { content: ""; position: absolute; z-index: 2; inset: 2px; border: 1px solid rgba(255,255,255,.85); border-radius: 5px; pointer-events: none; }
.asset-row, .goal-row, .transaction-row, .budget-row { animation: rowIn .34s both cubic-bezier(.2, .75, .25, 1); }
.asset-row:nth-child(2), .goal-row:nth-child(2), .transaction-row:nth-child(2), .budget-row:nth-child(2) { animation-delay: .035s; }
.asset-row:nth-child(3), .goal-row:nth-child(3), .transaction-row:nth-child(3), .budget-row:nth-child(3) { animation-delay: .07s; }
.asset-row:nth-child(4), .goal-row:nth-child(4), .transaction-row:nth-child(4), .budget-row:nth-child(4) { animation-delay: .105s; }
.asset-row:nth-child(5), .goal-row:nth-child(5), .transaction-row:nth-child(5), .budget-row:nth-child(5) { animation-delay: .14s; }
.asset-row:nth-child(6), .goal-row:nth-child(6), .transaction-row:nth-child(6), .budget-row:nth-child(6) { animation-delay: .175s; }
.asset-row:nth-child(5n+1) { background: #fffdf4; }
.asset-row:nth-child(5n+2) { background: #f6fffb; }
.asset-row:nth-child(5n+3) { background: #fff8f8; }
.asset-row:nth-child(5n+4) { background: #f5fbff; }
.asset-row:nth-child(5n) { background: #fbf8ff; }
.asset-row { transition: transform .16s ease, filter .16s ease; }
.asset-row:active { transform: scale(.992); filter: saturate(1.08); }
.asset-icon { border: 2px solid #8b9a9f; border-radius: 8px; box-shadow: inset 0 0 0 3px rgba(255,255,255,.5), 0 3px 0 rgba(99,127,126,.13); }
.asset-icon.vault { background: var(--lavender); }
.asset-icon.custom { background: #f0c8ef; }
.goal-row:nth-child(odd) { background: #fffaff; }
.goal-row:nth-child(even) { background: #f7fcff; }
.goal-row { transition: transform .16s ease, background-color .16s ease; }
.goal-row:active { transform: scale(.992); }
.goal-row { --progress-color: #e4d4f2; --balance-progress-color: #c3a9df; isolation: isolate; overflow: hidden; }
.goal-row:nth-child(even) { --progress-color: #d3eee2; --balance-progress-color: #a4d2bc; }
.goal-row > :not(.progress-a11y) { position: relative; z-index: 1; min-width: 0; }
.goal-progress-legend { display: flex; flex-wrap: wrap; gap: 5px 14px; margin: 0 0 12px; }
.goal-progress-label { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 800; line-height: 1.5; color: var(--ink); }
.goal-progress-label::before { content: ""; flex: 0 0 10px; width: 10px; height: 10px; border: 1px solid #79628e; border-radius: 2px; background: var(--progress-color); }
.goal-progress-label.available::before { background: var(--balance-progress-color); }
.transaction-symbol { border: 1.5px dashed #8ea6aa; border-radius: 8px; box-shadow: inset 0 0 0 3px rgba(255,255,255,.45), 0 2px 0 #e5edf0; }
.transaction-symbol.income { background: var(--mint); }
.transaction-symbol.expense { background: #ffd4d0; }
.transaction-symbol.move { background: var(--sky); }

.person-summary { position: relative; overflow: hidden; border: 2px solid #aebdc4; box-shadow: inset 0 0 0 4px #f6faff, 0 5px 0 #dcebf3; animation: cardPop .45s cubic-bezier(.2, .9, .25, 1.15); }
.person-summary::after { content: ""; position: absolute; z-index: 0; inset: 4px; border-radius: 4px; background-image: url("./assets/pet-finance-pattern.png"); background-position: center; background-size: 320px 320px; background-repeat: repeat; opacity: .045; pointer-events: none; }
.person-summary > * { position: relative; z-index: 1; }
.person-summary[data-person="xiaohu"] { border-color: #ddb1b6; box-shadow: inset 0 0 0 4px #fff2f4, 0 5px 0 #fae1e3; }
.person-summary[data-person="xiaolin"] { border-color: #9dbed6; box-shadow: inset 0 0 0 4px #f0f8ff, 0 5px 0 #d7edfa; }
.avatar { position: relative; isolation: isolate; border: 2px solid var(--ink); border-radius: 8px; box-shadow: 0 3px 0 rgba(38,50,56,.16); }
.profile-avatar { --portrait-size: 64px; display: grid; place-items: center; flex: 0 0 68px; width: 68px; height: 68px; }
.profile-avatar.hu, .nav-portrait.hu, .asset-illustration.hu { --portrait-x: 246; --portrait-y: 4; --portrait-w: 114; --portrait-h: 106; }
.profile-avatar.lin, .nav-portrait.lin, .asset-illustration.lin { --portrait-x: 397; --portrait-y: 338; --portrait-w: 122; --portrait-h: 86; }
.nav-portrait { --portrait-size: 36px; width: 42px; height: 36px; display: grid; place-items: center; }
.nav-portrait.savings { --portrait-size: 35px; --portrait-x: 58; --portrait-y: 254; --portrait-w: 130; --portrait-h: 114; }
.nav-portrait.savings .profile-pet { clip-path: polygon(22% 0, 100% 0, 100% 100%, 0 100%, 0 25%); }
.goal-mascot { --portrait-size: 40px; --portrait-x: 312; --portrait-y: 161; --portrait-w: 90; --portrait-h: 100; display: grid; place-items: center; width: 44px; height: 52px; }
.asset-icon.asset-illustration { --portrait-size: 40px; width: 44px; height: 48px; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.asset-illustration.fixed { --portrait-size: 36px; --portrait-x: 312; --portrait-y: 161; --portrait-w: 90; --portrait-h: 100; }
.asset-illustration.flex { --portrait-size: 36px; --portrait-x: 18; --portrait-y: 72; --portrait-w: 60; --portrait-h: 60; }
.asset-illustration.vault { --portrait-x: 245; --portrait-y: 529; --portrait-w: 118; --portrait-h: 115; }
.profile-pet { display: block; width: var(--portrait-size); height: calc(var(--portrait-size) * var(--portrait-h) / var(--portrait-w)); background: url("./assets/pet-finance-pattern.png") no-repeat; background-size: calc(var(--portrait-size) * 768 / var(--portrait-w)) auto; background-position: calc(var(--portrait-size) * var(--portrait-x) / var(--portrait-w) * -1) calc(var(--portrait-size) * var(--portrait-y) / var(--portrait-w) * -1); filter: drop-shadow(0 3px 0 rgba(163,131,106,.13)); }
.vault-mark .profile-pet, .asset-illustration.vault .profile-pet { clip-path: polygon(28% 0, 100% 0, 100% 100%, 0 100%, 0 28%); }
.person-stat { border: 1.5px dashed #d5ba6b; background: #fff7cd; box-shadow: inset 0 0 0 3px rgba(255,255,255,.5); }
.person-stat:nth-child(2) { border-color: #daa9b3; background: #ffe9ec; }
.person-stat:nth-child(3) { border-color: #9fc9b6; background: #e3f6ed; }
.next-week-strip { border-top: 2px dashed #c5cfd4; }
.next-week-mark { border: 2px solid var(--ink); background: var(--sky); box-shadow: 0 3px 0 #bed4df; }
.vault-strip { border-top: 2px dashed #dbc9e5; }
.vault-actions button { border: 1.5px solid #a5bdd0; background: #f1f9ff; box-shadow: inset 0 0 0 2px #fff, 0 2px 0 #dceaf3; transition: transform .16s ease, box-shadow .16s ease; }
.vault-actions button:active { transform: translateY(2px); box-shadow: none; }

.budget-row { --progress-color: #d3eee2; }
.budget-row:nth-child(odd), .budget-row:nth-child(even) { background: #fbfffd; }
.budget-row::before, .goal-row::before, .goal-detail-hero::before { content: ""; position: absolute; z-index: 0; inset: 0 auto 0 0; width: var(--row-progress, 0%); background: var(--progress-color); pointer-events: none; transform-origin: left center; animation: barGrow .65s cubic-bezier(.2,.8,.25,1) both; }
.goal-row::after, .goal-detail-hero::after { content: ""; position: absolute; z-index: 0; inset: 0 auto 0 0; width: var(--balance-progress, 0%); background: var(--balance-progress-color); pointer-events: none; transform-origin: left center; animation: barGrow .65s cubic-bezier(.2,.8,.25,1) both; }
.budget-copy, .budget-side { position: relative; z-index: 1; min-width: 0; }
.budget-copy { align-self: center; }
.budget-side { align-content: center; }
.budget-row.over, .budget-row.underfunded { --progress-color: #f8cfce; background: #fff6f5; box-shadow: inset 4px 0 0 #d75953; }
.budget-row.settled { background: #f3f5f6; }
.budget-row.settled .budget-frequency, .budget-row.settled .budget-status { color: #6b727a; }
.budget-list { border-width: 1px; box-shadow: 0 3px 0 var(--frame-shadow); }
.budget-row { transition: background-color .2s ease; animation: budgetRowIn .38s cubic-bezier(.2,.8,.25,1) var(--budget-delay, 0ms) both; }
.budget-row.details-open { background-color: #f5faf7; }
.budget-row.over.details-open, .budget-row.underfunded.details-open { background-color: #ffefed; }
.budget-row.settled.details-open { background-color: #edf1f4; }
.budget-name { overflow-wrap: anywhere; }
.budget-side { max-width: 100%; text-align: right; overflow-wrap: anywhere; }
.budget-footer { position: relative; z-index: 1; grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.budget-brief { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; color: #5b6e66; font-size: .875rem; line-height: 1.5; font-variant-numeric: tabular-nums; }
.budget-brief > span { overflow-wrap: anywhere; }
.budget-metric { display: grid; gap: 2px; min-width: 0; }
.budget-metric small { color: #64736e; font-size: .8125rem; }
.budget-brief strong { color: #344b42; font-weight: 700; }
.budget-brief .budget-overspend { color: var(--danger); font-weight: 700; }
.budget-side-actions { align-items: center; gap: 4px; }
.budget-side-actions .budget-icon-button { position: relative; min-width: 40px; width: 40px; min-height: 40px; padding: 0; display: grid; place-items: center; border: 1px solid rgba(164,184,174,.45); border-radius: 7px; background: rgba(255,255,255,.6); color: var(--ink); box-shadow: 0 2px 0 rgba(155,179,166,.1); cursor: pointer; transition: background-color .18s ease, transform .18s ease; }
.budget-icon-button img { display: block; opacity: .78; }
.budget-side-actions .budget-icon-button:active { background: rgba(255,255,255,.65); transform: scale(.92); }
.budget-icon-button::after { content: attr(data-tooltip); position: absolute; right: 0; bottom: calc(100% + 2px); padding: 4px 7px; border: 1px solid #c6d4cb; border-radius: 5px; background: #fff; color: #33483f; font-size: .6875rem; line-height: 1.4; white-space: nowrap; opacity: 0; pointer-events: none; transform: translateY(3px); transition: opacity .15s ease, transform .15s ease; }
.budget-icon-button:focus-visible::after { opacity: 1; transform: none; }
.budget-details-toggle img { transition: transform .24s cubic-bezier(.2,.8,.25,1); }
.budget-details-toggle[aria-expanded="true"] img { transform: rotate(180deg); }
.budget-side-actions .budget-undo { min-height: 40px; border-style: dashed; box-shadow: none; }
.budget-details { position: relative; z-index: 1; grid-column: 1 / -1; display: grid; grid-template-rows: 0fr; visibility: hidden; opacity: 0; transition: grid-template-rows .24s cubic-bezier(.2,.8,.25,1), opacity .2s ease, visibility .24s; }
.budget-details > div { min-height: 0; overflow: hidden; }
.budget-details .budget-status { padding-top: 8px; margin-top: 3px; border-top: 1px dashed rgba(116,141,129,.3); font-size: .8125rem; line-height: 1.8; }
.details-open .budget-details { grid-template-rows: 1fr; visibility: visible; opacity: 1; }
.budget-reveal { animation: budgetRowIn .4s cubic-bezier(.2,.8,.25,1) var(--budget-delay, 0ms) both !important; }
.progress-a11y { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.budget-edit { border: 1.5px solid #a0bbc9; background: #edf8ff; box-shadow: inset 0 0 0 2px #fff, 0 2px 0 #d6e5ed; transition: transform .16s ease, box-shadow .16s ease; }
.budget-edit:active { transform: translateY(2px); box-shadow: none; }
.budget-undo { border: 1.5px solid #c9b274; box-shadow: inset 0 0 0 2px #fffbe6, 0 2px 0 #e9dda8; transition: transform .16s ease, box-shadow .16s ease; }
.budget-undo:active { transform: translateY(2px); box-shadow: none; }
.budget-transfer-panel { border: 2px solid #c4a33a; background: #fff8d4; box-shadow: 0 4px 0 #ead995; }

.bottom-nav { --nav-inset: 18px; --nav-position: 1; border-top: 2px dashed #d7becf; background: rgba(255,253,254,.97); box-shadow: 0 -4px 0 #f5e9f1, 0 -8px 22px rgba(94,81,98,.045); }
.bottom-nav::after { content: ""; position: absolute; z-index: 0; top: 9px; left: var(--nav-inset); width: calc((100% - var(--nav-inset) * 2) / 3); height: 56px; border: 1.5px solid #e6d28a; border-radius: 8px; background: #fff4c9; box-shadow: inset 0 0 0 3px rgba(255,255,255,.65), 0 2px 0 #f3e8bf; transform: translateX(calc(var(--nav-position) * 100%)); transition: transform .38s cubic-bezier(.22,.8,.28,1), background-color .25s ease, border-color .25s ease; pointer-events: none; }
.bottom-nav[data-active="xiaohu"]::after { border-color: #e7b7c2; background: #ffe6ed; box-shadow: inset 0 0 0 3px rgba(255,255,255,.65), 0 2px 0 #f5dce3; }
.bottom-nav[data-active="xiaolin"]::after { border-color: #a9cce1; background: #e1f2ff; box-shadow: inset 0 0 0 3px rgba(255,255,255,.65), 0 2px 0 #d9eaf5; }
.nav-item { border-radius: 8px; transition: color .16s ease, transform .16s ease, background-color .16s ease; }
.nav-item:active { transform: scale(.94); }
.nav-item.active { background: transparent; }
.nav-item.active .nav-portrait { animation: navPop .38s cubic-bezier(.2, .9, .25, 1.35); }

.modal-backdrop { background: rgba(37,48,53,.46); }
.sheet { position: relative; isolation: isolate; border: 2px solid #baa8bd; border-bottom: 0; background: #fffafd; box-shadow: inset 0 0 0 4px #fff, 0 -6px 0 #efddeb, 0 -24px 60px rgba(38,50,56,.18); animation: sheetBounce .38s cubic-bezier(.2, .85, .25, 1.12); }
.sheet::before { content: ""; position: absolute; z-index: 0; inset: 0 0 auto; height: 124px; background: url("./assets/pet-finance-pattern.png") right -24px top -58px / 360px 360px; opacity: .065; pointer-events: none; -webkit-mask-image: linear-gradient(#000 0%, transparent 100%); mask-image: linear-gradient(#000 0%, transparent 100%); }
.sheet > * { position: relative; z-index: 1; }
.sheet .sheet-head { position: sticky; top: -9px; z-index: 3; padding-block: 10px; background: #fffafd; }
.sheet-handle { width: 46px; height: 6px; background: repeating-linear-gradient(90deg, #d1b6ce 0 7px, #f2e4ef 7px 10px); }
.icon-button.close { border: 2px solid var(--ink); background: #ffe2e1; }
.field input, .field select { border: 2px solid #bcced8; background: #fff; box-shadow: inset 0 -3px 0 #f0f6fa; transition: border-color .16s ease, box-shadow .16s ease; }
.field input:focus, .field select:focus { border-color: #a78ebd; box-shadow: inset 0 -3px 0 #f3edfa, 0 0 0 3px #eee4f7; }
.keypad-amount-field input { border-style: dashed; border-color: #94bfad; background: #f1fcf5; box-shadow: inset 0 0 0 3px #fff; }
.keypad-key { border-color: #b4c8d5; box-shadow: inset 0 0 0 3px #f5faff, 0 3px 0 #d5e4ee; }
.keypad-key.utility { border-color: #dbb2b2; box-shadow: inset 0 0 0 3px #fff0ef, 0 3px 0 #f0d3d3; }
.keypad-key.zero, .keypad-key[data-amount-key="decimal"], .keypad-key[data-amount-key="00"], .keypad-key[data-amount-key="clear"] { box-shadow: inset 0 0 0 3px rgba(255,255,255,.55), 0 3px 0 #d5e4ee; }
.money-keypad-panel { margin: 0 0 18px; padding-top: 8px; border-top: 1px dashed #c7d8d0; scroll-margin-block: 12px; }
.money-keypad-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; color: var(--ink-soft); font-size: .8125rem; }
.money-keypad-heading select { min-width: 0; max-width: 65%; min-height: 36px; padding: 4px 8px; border: 1px solid #b8cfda; border-radius: 6px; background: #f1f9ff; color: var(--ink); font: inherit; }
.money-keypad-heading output { min-width: 0; overflow-wrap: anywhere; text-align: right; font-size: 1rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ink); }
input[data-money-input] { cursor: pointer; caret-color: transparent; }
input.money-input-active { border-color: #648e80; background: #effaf4; box-shadow: 0 0 0 2px #cae6d9; }
.goal-action-row:empty { display: none; }
.goal-action-row > :only-child { grid-column: 1 / -1; }
.helper-card { border: 1.5px dashed #b7c991; background: #f5fadd; box-shadow: inset 0 0 0 3px rgba(255,255,255,.55); }
.goal-detail-hero, .goal-spend-summary { border: 2px solid #806aa7; background: #f7efff; box-shadow: 0 4px 0 #ddcfeb; }
.goal-detail-mark { border: 2px solid var(--ink); background: #f0c8ef; box-shadow: 0 3px 0 #caa5cb; }
.goal-detail-hero { --progress-color: #e4d4f2; --balance-progress-color: #c3a9df; position: relative; isolation: isolate; overflow: hidden; margin-bottom: 20px; background: #fcf9ff; border-color: #baa7cb; }
.goal-detail-hero > :not(.progress-a11y) { position: relative; z-index: 1; min-width: 0; }
.goal-detail-hero .goal-detail-mark { display: grid; place-items: center; margin-bottom: 0; }
.goal-progress-metric { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); align-items: center; gap: 3px 10px; }
.goal-detail-hero .goal-progress-label { display: inline-flex; grid-column: 1; margin: 0; color: var(--ink); }
.goal-progress-metric strong { grid-column: 2; text-align: right; font-variant-numeric: tabular-nums; }
.goal-use-option { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 54px; padding: 12px 0; margin-bottom: 15px; border-block: 1px dashed #ccb9da; font-size: .875rem; font-weight: 800; cursor: pointer; }
.goal-use-option input { flex: 0 0 24px; width: 24px; height: 24px; margin: 0; accent-color: #8064a3; cursor: pointer; }
.goal-use-option input:focus-visible { outline: 2px solid #8064a3; outline-offset: 3px; }
.goal-use-status { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 12px 0; color: var(--ink-soft); font-size: .8125rem; }
.goal-use-status span { flex-shrink: 0; }
.goal-use-status strong { text-align: right; color: var(--ink); overflow-wrap: anywhere; }
.goal-detail-grid > div { border: 1.5px solid #c2ccd0; }
.goal-detail-grid > div:nth-child(3n+1) { background: #fff7cd; }
.goal-detail-grid > div:nth-child(3n+2) { background: #e9f8f1; }
.goal-detail-grid > div:nth-child(3n) { background: #eaf6ff; }
.goal-date-panel > div { border: 1.5px solid #b9cbd4; background: #edf8ff; }
.goal-spend-button { border: 2px solid var(--ink); background: #ffd9d6; color: #8d332f; box-shadow: 0 3px 0 #d69c98; transition: transform .16s ease, box-shadow .16s ease; }
.goal-spend-button:not(:disabled):active { transform: translateY(2px); box-shadow: 0 1px 0 #d69c98; }
.goal-withdraw-button { border: 2px solid var(--ink); background: #d9f5e9; box-shadow: 0 3px 0 #9ccab9; transition: transform .16s ease, box-shadow .16s ease; }
.goal-withdraw-button:not(:disabled):active { transform: translateY(2px); box-shadow: 0 1px 0 #9ccab9; }
.asset-detail-native > div { border: 2px solid #aebdc4; box-shadow: 0 4px 0 #dcebf3; }
.asset-detail-native > div:first-child { background: #fff7cd; }
.asset-detail-native > div:last-child { background: #eaf6ff; }
.deposit-record-list { border: 2px solid #bdceda; box-shadow: 0 4px 0 #e5eff6; }
.deposit-record { border-bottom-style: dashed; }
.deposit-record:nth-child(odd) { background: #fffdf7; }
.deposit-record:nth-child(even) { background: #f7fcff; }
.expense-history .deposit-record:nth-child(odd) { background: #fff7f6; }
.expense-history .deposit-record:nth-child(even) { background: #fffafa; }
.frequency-picker { border: 2px solid #acbac1; background: #edf3f6; }
.frequency-picker input:checked + span { border: 1.5px solid var(--ink); background: var(--yellow); box-shadow: 0 2px 0 #c3a84a; }
.settlement-list { border: 2px solid #aebdc4; }
.settlement-row input { accent-color: #6a58a0; }
.secondary-button { border: 2px solid var(--ink); background: #eaf6ff; box-shadow: 0 3px 0 #b9ceda; }
.danger-button { border: 2px solid var(--ink); background: #ffd9d6; color: #8d332f; box-shadow: 0 3px 0 #d69c98; transition: transform .16s ease, box-shadow .16s ease; }
.danger-button:active { transform: translateY(2px); box-shadow: 0 1px 0 #d69c98; }
.primary-button { border: 2px solid #50796c; background: #3c6d5f; box-shadow: inset 0 0 0 3px rgba(255,255,255,.15), 0 4px 0 #adcebf; transition: transform .16s ease, box-shadow .16s ease; }
.primary-button:disabled { border-color: #7e898e; background: #aeb8bc; box-shadow: 0 4px 0 #7e898e; }
.primary-button:active { transform: translateY(3px) scale(.99); box-shadow: 0 1px 0 #203a35; }
.toast { border: 2px solid var(--ink); background: var(--yellow); color: var(--ink); box-shadow: 0 5px 0 #a9913f, 0 16px 28px rgba(38,50,56,.18); }
.toast.show { animation: toastPop .35s cubic-bezier(.2, .9, .25, 1.25); }

/* Each sticker uses its complete source bounds, independently of display size. */
.asset-heading, .budget-heading, .quick-action:nth-child(2) { --sticker-x: 246; --sticker-y: 4; --sticker-w: 114; --sticker-h: 106; }
.goal-heading, .quick-action:nth-child(1) { --sticker-x: 58; --sticker-y: 254; --sticker-w: 120; --sticker-h: 114; }
.ledger-heading, .quick-action:nth-child(4) { --sticker-x: 397; --sticker-y: 338; --sticker-w: 122; --sticker-h: 86; }
.daily-ledger-heading, .quick-action:nth-child(3) { --sticker-x: 101; --sticker-y: 88; --sticker-w: 94; --sticker-h: 74; }
.section-heading, .budget-heading { --sticker-size: 40px; }
.quick-action { --sticker-size: 27px; padding-top: 44px; }
.section-heading::before, .budget-heading::before, .quick-action::before {
  content: "";
  position: absolute;
  width: var(--sticker-size);
  height: calc(var(--sticker-size) * var(--sticker-h) / var(--sticker-w));
  background-image: url("./assets/pet-finance-pattern.png");
  background-repeat: no-repeat;
  background-size: calc(var(--sticker-size) * 768 / var(--sticker-w)) auto;
  background-position: calc(var(--sticker-size) * var(--sticker-x) / var(--sticker-w) * -1) calc(var(--sticker-size) * var(--sticker-y) / var(--sticker-w) * -1);
  filter: drop-shadow(0 2px 0 rgba(38,50,56,.14));
  pointer-events: none;
}
.quick-action::before { z-index: 2; top: 6px; left: calc(50% - var(--sticker-size) / 2); transform-origin: center; }
.quick-action:hover::before, .quick-action:focus-visible::before { animation: stickerWiggle .42s ease; }

.asset-list, .goal-list, .transaction-list, .budget-list { position: relative; isolation: isolate; }
.asset-row, .goal-row, .transaction-row, .budget-row { position: relative; z-index: 1; }

.asset-row::before { content: ""; position: absolute; left: 6px; bottom: 5px; width: 13px; height: 13px; border-radius: 50%; background: var(--row-sticker, var(--yellow)); opacity: .34; transform: rotate(-12deg); clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 56%, 80% 94%, 50% 71%, 20% 94%, 32% 56%, 2% 35%, 39% 35%); pointer-events: none; }
.asset-row:nth-child(2) { --row-sticker: var(--mint); }
.asset-row:nth-child(3) { --row-sticker: var(--coral); }
.asset-row:nth-child(4) { --row-sticker: var(--sky); }
.asset-row:nth-child(5) { --row-sticker: var(--lavender); }
.transaction-row:nth-child(3n+1) { background-color: rgba(255,253,244,.96); }
.transaction-row:nth-child(3n+2) { background-color: rgba(247,252,255,.96); }
.transaction-row:nth-child(3n) { background-color: rgba(255,248,250,.96); }

.budget-heading { position: relative; min-height: 42px; display: grid; align-content: center; padding-left: 48px; }
.budget-heading::before { left: 0; top: 50%; transform: translateY(-50%); animation: stickerPop .48s cubic-bezier(.2,.9,.25,1.2) both; }
.person-stat { position: relative; min-width: 0; }
.person-stat strong { white-space: normal; overflow-wrap: anywhere; }

.bottom-nav { isolation: isolate; overflow: visible; }
.bottom-nav::before { content: ""; position: absolute; z-index: 0; inset: 0; background: url("./assets/paw-savings-pattern.png") center 36% / 148px 148px; opacity: .035; pointer-events: none; }
.nav-item { position: relative; z-index: 1; }
.nav-item::after { content: ""; position: absolute; left: calc(50% + 22px); top: 7px; width: 16px; height: 18px; background: url("./assets/pet-finance-pattern.png") -105px -25px / 223px 223px no-repeat; opacity: 0; pointer-events: none; }
.nav-item.active::after { animation: pawPop .42s cubic-bezier(.2,.9,.25,1.3) both; }

.money-pop { animation: moneyFlip .45s cubic-bezier(.2,.8,.25,1.15) both !important; }
.scroll-enter { animation: scrollReveal .55s cubic-bezier(.2,.75,.25,1) both; }
.scroll-enter .section-heading::before { animation: stickerPop .55s cubic-bezier(.2,.9,.25,1.2) both; }
.tap-animate { animation: tapBounce .32s cubic-bezier(.2,.9,.25,1.28) both !important; }
.asset-row.tap-animate, .goal-row.tap-animate { animation-name: rowTap !important; }
.keypad-key.tap-animate { animation-name: keyPress !important; }
.tap-burst { position: fixed; z-index: 120; inset: 0; overflow: hidden; pointer-events: none; }
.tap-burst::before { content: ""; position: absolute; left: var(--tap-x); top: var(--tap-y); width: 32px; height: 32px; border: 2px solid #da9bad; border-radius: 50%; animation: tapRing .48s ease-out both; }
.tap-burst::after { content: "✦"; position: absolute; left: var(--tap-x); top: var(--tap-y); color: #f1b73f; font-size: 14px; line-height: 1; transform: translate(-50%, -50%); animation: tapStar .48s ease-out both; }
.tap-burst i { position: absolute; left: calc(var(--tap-x) - 4px); top: calc(var(--tap-y) - 4px); width: 8px; height: 8px; border: 1px solid rgba(90,108,117,.45); border-radius: 50%; background: var(--spark-color); transform: rotate(var(--spark-angle)) translateX(4px) scale(.9); animation: tapSpark .5s ease-out forwards; }
.tap-burst.compact::before { width: 20px; height: 20px; border-color: #9dbfac; }
.tap-burst.compact::after { content: none; }
.eyebrow, .section-kicker, .goal-home-grid small, .transaction-meta { font-size: .75rem; }
.asset-note, .goal-detail-grid span, .goal-date-panel span { font-size: .75rem; line-height: 1.6; }
.asset-name, .goal-row-name, .transaction-name { font-size: .9375rem; line-height: 1.5; }
.asset-amount, .transaction-amount, .goal-home-grid strong { font-size: .9375rem; line-height: 1.4; }
.budget-amount { font-size: 1.25rem; line-height: 1.4; }
h1, h2, .section-title-row h2, .eyebrow, .section-kicker, .budget-name, .text-button, .quick-action, .budget-spend-button { font-weight: 700; }
.field label { font-size: .875rem; line-height: 1.5; }
.person-stat strong, .vault-summary strong { font-size: 1.0625rem; }
.person-stat span, .nav-item { font-size: .75rem; }
.budget-title-row .section-kicker { white-space: nowrap; }
.goal-detail-hero strong { overflow-wrap: anywhere; }
button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button:focus-visible { outline: 3px solid #9b7cb5; outline-offset: 3px; }

.pending-fund-strip { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; padding: 10px 12px; border: 1.5px dashed #c0a84a; border-radius: 7px; background: #fff9d9; }
.pending-fund-strip span, .pending-fund-strip small { display: block; }
.pending-fund-strip span { color: #6a5722; font-size: .78rem; font-weight: 800; }
.pending-fund-strip small { margin-top: 2px; color: #80724d; font-size: .68rem; }
.pending-fund-strip strong { color: #59491d; font-size: .94rem; font-variant-numeric: tabular-nums; }
.vault-actions { flex-wrap: wrap; justify-content: flex-end; }
.budget-row.pending { --progress-color: #fff0ad; background: #fffdf1; box-shadow: inset 4px 0 0 #d5b446; }
.budget-row.pending .budget-name, .budget-row.pending .budget-side-label { color: #765f1e; }

.goal-strategy-field { margin: 0 0 16px; padding: 0; border: 0; }
.goal-strategy-field[hidden] { display: none; }
.goal-strategy-field legend { margin-bottom: 8px; font-size: .82rem; font-weight: 800; }
.goal-strategy-picker { display: grid; gap: 7px; }
.goal-strategy-picker label { position: relative; margin: 0; cursor: pointer; }
.goal-strategy-picker input { position: absolute; opacity: 0; pointer-events: none; }
.goal-strategy-picker span { display: block; min-height: 44px; padding: 11px 13px; border: 1.5px solid #bbc5c8; border-radius: 7px; background: #f8fbfc; color: #42535a; font-size: .8rem; font-weight: 700; line-height: 1.45; }
.goal-strategy-picker input:checked + span { border-color: #7f69a7; background: #f3eaff; box-shadow: inset 0 0 0 2px #fff, 0 2px 0 #d7c8e8; color: #594579; }
.goal-strategy-picker input:focus-visible + span { outline: 3px solid #b9a9e8; outline-offset: 2px; }

.purpose-tags { margin: -4px 0 15px; }
.purpose-tags-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.purpose-tags-head span { color: var(--ink-soft); font-size: .75rem; font-weight: 700; }
.purpose-tags-head button, .purpose-tag-add button, .purpose-tag-edit-row button { min-height: 32px; padding: 0 10px; border: 1px solid #b9c7c3; border-radius: 6px; background: #f7fbf9; color: #345c4d; font-size: .72rem; font-weight: 800; cursor: pointer; }
.purpose-tag-list { display: flex; flex-wrap: wrap; gap: 7px; }
.purpose-tag { min-height: 34px; padding: 0 12px; border: 1.5px solid #b9cdbf; border-radius: 17px; background: #eef8f2; color: #335d4b; font-size: .78rem; font-weight: 700; cursor: pointer; transition: transform .15s ease, background-color .15s ease; }
.purpose-tag:active { transform: scale(.96); background: #dff1e7; }
.purpose-tags-empty { color: var(--ink-soft); font-size: .75rem; }
.purpose-tag-manager { margin-top: 10px; padding-top: 10px; border-top: 1px dashed #c9d5d0; }
.purpose-tag-add, .purpose-tag-edit-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; margin-bottom: 7px; }
.purpose-tag-edit-row { grid-template-columns: minmax(0, 1fr) auto 34px; }
.purpose-tag-add input, .purpose-tag-edit-row input { width: 100%; min-height: 38px; padding: 0 10px; border: 1px solid #c9d3cf; border-radius: 6px; background: #fff; font: inherit; }
.purpose-tag-edit-row .purpose-tag-delete { width: 34px; padding: 0; background: #fff0ef; color: #a3433e; font-size: 1rem; }

/* Private cloud mode */
.cloud-mode #resetButton { display: none; }
.cloud-controls[hidden], .cloud-gate[hidden], .update-banner[hidden] { display: none; }
.cloud-controls { position: relative; z-index: 8; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; margin: -10px 2px 16px; padding: 7px 8px 7px 12px; border: 1px dashed #b8c9c1; border-radius: 8px; background: rgba(246,253,249,.94); }
.cloud-sync-button { min-width: 0; display: inline-flex; align-items: center; gap: 8px; padding: 5px 8px; border: 0; background: transparent; color: #3b6655; font-size: .75rem; font-weight: 800; cursor: pointer; }
.cloud-sync-button svg, .cloud-account-menu summary svg { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cloud-sync-button:active svg { transform: rotate(45deg); }
#cloudSyncStatus[data-state="offline"], #cloudSyncStatus[data-state="error"] { color: var(--danger); }
#cloudSyncStatus[data-state="saving"], #cloudSyncStatus[data-state="loading"] { color: #66551c; }
.cloud-account-menu { position: relative; flex: 0 0 auto; }
.cloud-account-menu summary { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid #b8c9c1; border-radius: 50%; background: #fff; color: #315b4c; cursor: pointer; list-style: none; }
.cloud-account-menu summary::-webkit-details-marker { display: none; }
.cloud-menu-panel { position: absolute; z-index: 30; top: 42px; right: 0; width: min(290px, calc(100vw - 48px)); overflow: hidden; padding: 10px; border: 1px solid #aebeb7; border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
.cloud-menu-panel strong { display: block; padding: 7px 8px 10px; color: #315b4c; font-size: .82rem; }
.cloud-menu-panel button { width: 100%; min-height: 42px; padding: 0 10px; border: 0; border-top: 1px dashed #d5ddda; background: #fff; text-align: left; font-size: .78rem; font-weight: 700; cursor: pointer; }
.cloud-menu-panel button:hover { background: #f2faf5; }
.cloud-menu-panel .cloud-logout { color: var(--danger); }

.cloud-gate { position: fixed; z-index: 100; inset: 0; min-height: 100dvh; overflow-y: auto; display: grid; place-items: center; padding: max(22px, env(safe-area-inset-top)) 18px max(22px, env(safe-area-inset-bottom)); background-color: #f4fbff; background-image: url("./assets/pet-finance-pattern.png"); background-position: center; background-size: 380px 380px; }
.cloud-gate::before { content: ""; position: fixed; inset: 0; background: rgba(255,249,252,.88); pointer-events: none; }
.cloud-gate-panel { position: relative; width: min(100%, 520px); padding: 26px 22px; border: 1px solid #b8c9c1; border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
.cloud-gate-panel h1 { margin-bottom: 8px; }
.cloud-gate-brand { display: flex; justify-content: center; height: 82px; margin: -14px 0 8px; }
.cloud-gate-brand img { width: auto; height: 82px; object-fit: contain; }
.cloud-kicker { margin: 0 0 5px; color: #6e5ba0; font-size: .76rem; font-weight: 900; }
.cloud-gate-copy { margin-bottom: 20px; color: var(--ink-soft); font-size: .84rem; line-height: 1.7; }
.cloud-auth-form { display: grid; gap: 13px; }
.cloud-auth-form label { display: grid; gap: 6px; color: #4c5c63; font-size: .77rem; font-weight: 800; }
.cloud-auth-form input { width: 100%; min-height: 48px; padding: 0 13px; border: 1.5px solid #bdcbd0; border-radius: 7px; background: #fff; font-size: 1rem; }
.cloud-auth-form input:focus { outline: 3px solid rgba(185,221,255,.65); border-color: #7195a8; }
.cloud-auth-form .cloud-remember-check { display: flex; align-items: center; gap: 9px; min-height: 32px; color: #30483f; font-size: .84rem; cursor: pointer; }
.cloud-auth-form .cloud-remember-check input { width: 19px; height: 19px; min-height: 19px; margin: 0; padding: 0; accent-color: #3c7568; }
.cloud-device-note { margin: -8px 0 1px 28px; color: #68777d; font-size: .72rem; line-height: 1.55; }
.cloud-form-message { min-height: 1.5em; margin: 0; color: var(--danger); font-size: .76rem; line-height: 1.5; }
.cloud-link-button { min-height: 38px; border: 0; background: transparent; color: #315d4b; font-size: .78rem; font-weight: 800; cursor: pointer; }
.cloud-choice-grid { display: grid; gap: 12px; }
.cloud-choice { display: grid; gap: 8px; padding: 15px; border: 1px solid #c8d4cf; border-radius: 8px; background: #f8fcfa; }
.cloud-choice:nth-child(2) { background: #fffaf0; }
.cloud-choice strong { font-size: .92rem; }
.cloud-choice span { color: var(--ink-soft); font-size: .76rem; line-height: 1.55; }
.cloud-choice button { min-height: 42px; border: 1px solid #6f9383; border-radius: 7px; background: #dff3e8; color: #315b4c; font-size: .8rem; font-weight: 900; cursor: pointer; }
.cloud-choice button:disabled { cursor: not-allowed; filter: grayscale(.5); opacity: .55; }
.cloud-choice.is-disabled { opacity: .68; }
.cloud-confirm-check { display: grid; grid-template-columns: 20px 1fr; align-items: start; gap: 8px; color: #5d542f; font-size: .72rem; line-height: 1.5; }
.cloud-confirm-check input { width: 18px; height: 18px; margin: 1px 0 0; }

.cloud-dialog { width: min(calc(100% - 32px), 500px); padding: 0; border: 1px solid #aebeb7; border-radius: 8px; color: var(--ink); background: #fff; box-shadow: var(--shadow); }
.cloud-dialog::backdrop { background: rgba(38,50,56,.56); backdrop-filter: blur(3px); }
.cloud-dialog form { padding: 22px; }
.cloud-dialog h2 { margin-bottom: 10px; font-size: 1.1rem; }
.cloud-dialog p { color: var(--ink-soft); font-size: .82rem; line-height: 1.7; }
.cloud-dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 18px; }
.cloud-dialog-actions button { min-height: 44px; border: 1px solid #b8c5c0; border-radius: 7px; background: #fff; font-size: .8rem; font-weight: 800; cursor: pointer; }
.cloud-dialog-actions .primary-button { border-color: var(--ink); background: var(--ink); color: #fff; }
.update-banner { position: fixed; z-index: 70; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom)); width: min(calc(100% - 28px), 650px); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px 11px 15px; border: 1px solid #947d38; border-radius: 8px; background: #fff1b8; box-shadow: var(--shadow); transform: translateX(-50%); font-size: .76rem; font-weight: 800; }
.update-banner button { flex: 0 0 auto; min-height: 36px; padding: 0 12px; border: 1px solid #6d5a23; border-radius: 7px; background: #fff; font: inherit; cursor: pointer; }
.cloud-locked .app-shell, .cloud-locked .bottom-nav { visibility: hidden; }
.cloud-mode[data-cloud-state="offline"] [data-action], .cloud-mode[data-cloud-state="offline"] [data-vault-action], .cloud-mode[data-cloud-state="offline"] [data-edit-expense], .cloud-mode[data-cloud-state="offline"] [data-budget-edit] { opacity: .58; }

@media (hover: hover) {
  .asset-spend-button:hover, .goal-add-button:hover, .budget-add-button:hover { transform: translateY(-2px); }
  .nav-item:hover .profile-pet, .goal-row:hover .goal-mascot .profile-pet, .asset-row:hover .asset-illustration .profile-pet { animation: stickerWiggle .48s ease; }
  .asset-row:hover, .goal-row:hover { filter: saturate(1.06); }
  .quick-action:hover .action-mark { transform: translateY(-3px) rotate(-3deg); }
  .vault-actions button:hover, .budget-edit:hover, .budget-undo:hover { transform: translateY(-1px); }
  .budget-side-actions .budget-icon-button:hover { background: rgba(255,255,255,.72); }
  .budget-icon-button:hover::after { opacity: 1; transform: none; }
  .budget-row:hover::before { filter: saturate(1.12); }
}

@keyframes viewIn { from { opacity: .45; transform: translateY(7px); } }
@keyframes scrollReveal { from { opacity: .5; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes cardPop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes rowIn { from { opacity: 0; transform: translateY(7px); } }
@keyframes budgetRowIn { from { opacity: .45; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes barGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes gentleBob { 0%, 82%, 100% { transform: translateY(0); } 88% { transform: translateY(-3px) rotate(-2deg); } 94% { transform: translateY(1px) rotate(1deg); } }
@keyframes dotPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.35); } }
@keyframes navPop { from { transform: scale(.78) rotate(-4deg); } to { transform: scale(1) rotate(0); } }
@keyframes sheetBounce { from { transform: translateY(55px); opacity: .65; } }
@keyframes toastPop { from { transform: translate(-50%, 12px) scale(.92); } to { transform: translate(-50%, 0) scale(1); } }
@keyframes pendingPulse { 0%, 100% { transform: scale(.82); } 50% { transform: scale(1.18); } }
@keyframes mascotHello { 0%, 76%, 100% { transform: translateY(0) rotate(0); } 82% { transform: translateY(-3px) rotate(-2deg); } 88% { transform: translateY(0) rotate(2deg); } 94% { transform: translateY(-1px) rotate(-1deg); } }
@keyframes stickerPop { from { opacity: 0; transform: translateY(-50%) scale(.7) rotate(-8deg); } to { opacity: 1; transform: translateY(-50%) scale(1) rotate(0); } }
@keyframes stickerWiggle { 0%, 100% { transform: rotate(0) scale(1); } 35% { transform: rotate(-9deg) scale(1.08); } 70% { transform: rotate(9deg) scale(1.02); } }
@keyframes pawPop { from { opacity: 0; transform: translateY(5px) scale(.35); } to { opacity: .6; transform: translateY(0) scale(1); } }
@keyframes rowTap { 0%, 100% { transform: scale(1); } 45% { transform: scale(.985); } }
@keyframes moneyFlip { 0% { opacity: .55; transform: translateY(7px) scale(.97); } 65% { transform: translateY(-2px) scale(1.025); } 100% { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes tapBounce { 0% { transform: scale(1); } 42% { transform: scale(.94) rotate(-1deg); } 76% { transform: scale(1.035) rotate(.5deg); } 100% { transform: scale(1) rotate(0); } }
@keyframes keyPress { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(2px) scale(.97); } }
@keyframes tapRing { from { opacity: .65; transform: translate(-50%, -50%) scale(.4); } to { opacity: 0; transform: translate(-50%, -50%) scale(1.7); } }
@keyframes tapStar { from { opacity: 1; transform: translate(-50%, -50%) scale(.65) rotate(0); } to { opacity: 0; transform: translate(-50%, -50%) scale(1.65) rotate(28deg); } }
@keyframes tapSpark { from { opacity: 1; transform: rotate(var(--spark-angle)) translateX(4px) scale(.9); } to { opacity: 0; transform: rotate(var(--spark-angle)) translateX(var(--spark-distance)) scale(.15); } }
@keyframes rateSpin { to { transform: rotate(360deg); } }

@media (min-width: 720px) {
  body { background: #e6f2fb; }
  .app-shell { padding-left: 28px; padding-right: 28px; background: var(--paper); box-shadow: 0 0 0 2px #cfdee6, 0 0 80px rgba(53,74,84,.14); }
  .bottom-nav { --nav-inset: 28px; padding-left: 28px; padding-right: 28px; }
  .balance-panel { padding: 28px; }
  .action-row { gap: 20px; }
}

@media (max-width: 520px) {
  .budget-title-row { gap: 12px 8px; margin-right: 0; margin-left: 0; }
  .budget-heading { grid-column: 1 / -1; grid-row: 1; }
  .budget-spend-button { grid-column: 2; grid-row: 2; }
  .budget-secondary-actions { display: contents; }
  .budget-secondary-actions .distribute { grid-column: 1; grid-row: 2; justify-self: start; }
  .budget-secondary-actions .text-button.distribute { min-width: 78px; min-height: 44px; padding: 0 9px; font-size: .875rem; }
  .budget-add-button { grid-column: 3; grid-row: 2; justify-self: end; min-width: 78px; padding: 0 9px; }
}

@media (max-width: 430px) {
  .asset-title-row { grid-template-columns: minmax(0, 1fr) 96px minmax(0, 1fr); }
  .asset-title-row .section-heading { padding-left: 0; }
  .asset-title-row .section-heading::before { content: none; }
  .asset-spend-button { min-width: 96px; padding: 0 12px; }
  .goal-add-button { min-width: 90px; padding: 0 12px; }
  .total-value { font-size: 2.65rem; }
  .rate-manual { align-items: center; flex-direction: row; justify-content: space-between; }
  .rate-manual button { width: auto; }
  .topbar-actions { gap: 4px; }
  .topbar-mascots { width: 64px; }
  .person-summary { padding: 16px 12px; }
  .person-stat { padding: 12px 6px; }
  .person-stat strong { font-size: .88rem; }
  .section-actions { gap: 8px; }
  .budget-spend-button { min-width: 92px; min-height: 46px; gap: 6px; padding: 0 11px; }
  .budget-spend-button span { width: 23px; height: 23px; font-size: 1rem; }
  .text-button.expense { min-width: 78px; padding: 0 12px; }
  .text-button.distribute { min-width: 66px; padding: 0 9px; }
  .next-week-strip { grid-template-columns: auto minmax(0, 1fr); }
  .next-week-strip strong { grid-column: 2; }
  .vault-strip { grid-template-columns: 1fr; }
  .vault-actions button { flex: 1; }
  .section-heading { padding-left: 44px; }
  .section-heading { --sticker-size: 36px; }
  .budget-heading { --sticker-size: 28px; padding-left: 34px; }
  .budget-row { padding: 13px 14px; gap: 8px 12px; }
  .budget-brief { gap: 8px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media (max-width: 360px) {
  .total-value { font-size: 2.2rem; }
  .app-shell { padding-left: 14px; padding-right: 14px; }
  .sheet { padding-left: 14px; padding-right: 14px; }
  .topbar { gap: 8px; }
  .topbar-mascots { width: 48px; }
  .person-balance { gap: 5px; }
  .person-stat span { font-size: .68rem; }
  .person-stat strong { font-size: .8125rem; }
  .profile-avatar { --portrait-size: 56px; width: 60px; height: 64px; flex-basis: 60px; }
  .person-identity { gap: 8px; }
  .budget-row { padding: 12px; gap: 8px 10px; }
  .asset-amount, .transaction-amount { font-size: .875rem; }
  .asset-row { gap: 8px; padding: 12px 10px; grid-template-columns: 38px minmax(0, 1fr) auto 8px; }
  .asset-icon { width: 36px; height: 38px; }
  .asset-icon.asset-illustration { --portrait-size: 32px; width: 38px; height: 44px; }
  .budget-heading { padding-left: 0; }
  .budget-heading::before { content: none; }
  .budget-spend-button { min-width: 84px; padding: 0 8px; }
  .native-balance { padding: 10px; }
  .native-balance strong { font-size: .88rem; }
  #budgetCalculator .field-row { grid-template-columns: 1fr; gap: 0; }
}
