:root {
  color-scheme: light;
  --paper: #f5f7f2;
  --surface: #ffffff;
  --ink: #17201d;
  --muted: #66716c;
  --line: #dfe5df;
  --teal: #087f78;
  --teal-deep: #05655f;
  --teal-soft: #d9efeb;
  --coral: #dd5d4b;
  --coral-soft: #fae3df;
  --yellow: #e5a92e;
  --yellow-soft: #f9edc8;
  --blue: #4d77ba;
  --blue-soft: #e4ebf7;
  --green: #347456;
  --green-soft: #dfede4;
  --shadow: 0 14px 38px rgba(23, 32, 29, 0.16);
  --radius: 14px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html { background: #dde2dd; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: "Noto Sans SC", "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button, input, select { font: inherit; letter-spacing: 0; }
button { color: inherit; }
button, select { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid rgba(8, 127, 120, 0.28);
  outline-offset: 2px;
}
::selection { background: var(--teal); color: #fff; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #aeb8b2; border-radius: 999px; }
::-webkit-scrollbar-track { background: transparent; }

.app-shell {
  width: 100%;
  min-height: 100vh;
  background: var(--paper);
  padding-bottom: calc(92px + var(--safe-bottom));
}

.topbar {
  height: 68px;
  padding: 10px 20px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(245, 247, 242, 0.94);
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(223, 229, 223, 0.72);
  backdrop-filter: blur(16px);
}

.brand-lockup { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: #fff;
  border-radius: 11px;
  font-weight: 800;
  font-size: 17px;
}
.brand-lockup div { display: flex; flex-direction: column; gap: 1px; }
.brand-lockup strong { font-size: 17px; line-height: 1.2; }
.brand-lockup span:last-child { color: var(--muted); font-size: 11px; }

.icon-button, .visibility-button {
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  display: grid;
  place-items: center;
  border-radius: 12px;
}
.icon-button:hover, .visibility-button:hover { background: #e9eee9; }
.icon-button svg, .visibility-button svg { width: 21px; height: 21px; stroke-width: 2; }
.notification-dot {
  position: absolute;
  width: 7px;
  height: 7px;
  background: var(--coral);
  border: 2px solid var(--paper);
  border-radius: 50%;
  transform: translate(7px, -8px);
}

.main-content { max-width: 760px; margin: 0 auto; }
.view { display: none; padding: 18px 18px 28px; }
.view.is-active { display: block; animation: view-in 280ms cubic-bezier(.16, 1, .3, 1); }
@keyframes view-in { from { opacity: .5; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

.month-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.month-switch { border: 0; background: transparent; display: flex; align-items: center; gap: 6px; padding: 7px 0; font-weight: 700; }
.month-switch svg { width: 16px; }
.privacy-label { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12px; }
.privacy-label svg { width: 15px; }
.demo-notice { min-height: 42px; margin: -3px 0 14px; padding: 8px 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--yellow-soft); color: #72520e; border-radius: 10px; font-size: 11px; }
.demo-notice span { display: flex; align-items: center; gap: 6px; }
.demo-notice svg { width: 16px; }
.demo-notice button { min-height: 32px; padding: 0 10px; border: 1px solid rgba(114,82,14,.24); border-radius: 999px; background: rgba(255,255,255,.64); color: #604408; font-size: 11px; font-weight: 700; }

.balance-stage {
  position: relative;
  overflow: hidden;
  padding: 24px 22px 20px;
  color: #fff;
  background: var(--ink);
  border-radius: 16px;
  box-shadow: 0 15px 35px rgba(23, 32, 29, .18);
}
.balance-stage::after {
  content: "";
  position: absolute;
  right: -54px;
  top: -72px;
  width: 180px;
  height: 180px;
  border: 28px solid rgba(75, 191, 168, .13);
  border-radius: 50%;
}
.balance-stage p { margin: 0 0 6px; color: #cbd3ce; font-size: 13px; }
.balance-line { display: flex; align-items: center; gap: 8px; position: relative; z-index: 1; }
.balance-line > span { font-size: 20px; color: #d9e1dc; }
.balance-line strong { font-size: clamp(34px, 11vw, 46px); line-height: 1; font-variant-numeric: tabular-nums; }
.balance-line .visibility-button { color: #d9e1dc; margin-left: auto; }
.balance-line .visibility-button:hover { background: rgba(255,255,255,.09); }

.income-expense-strip { display: grid; grid-template-columns: 1fr 1fr 1.1fr; gap: 12px; margin-top: 24px; position: relative; z-index: 1; }
.income-expense-strip div { min-width: 0; }
.income-expense-strip span { display: block; color: #aeb9b2; font-size: 11px; margin-bottom: 5px; white-space: nowrap; }
.income-expense-strip strong { display: block; color: #fff; font-size: 14px; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; }
.income-expense-strip strong.income { color: #8adacb; }
.income-expense-strip strong.expense { color: #ffab9e; }
.budget-track { height: 4px; background: rgba(255,255,255,.12); margin-top: 17px; border-radius: 999px; overflow: hidden; }
.budget-track span { display: block; height: 100%; width: 100%; background: #58bfae; border-radius: inherit; transform: scaleX(0); transform-origin: left; transition: transform 500ms cubic-bezier(.16, 1, .3, 1); }
.budget-track.is-over span { background: #ff8f7d; }
.income-expense-strip .budget-over strong { color: #ffab9e; }

.section-heading, .page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.section-heading { margin: 32px 2px 14px; }
.section-heading.compact { margin: 0 0 18px; }
.section-heading h1, .section-heading h2, .page-heading h1 { margin: 0; font-size: 21px; line-height: 1.2; }
.section-heading h2 { font-size: 18px; }
.section-heading p, .page-heading p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.page-heading { align-items: center; margin: 4px 0 20px; }
.page-heading h1 { font-size: 28px; }
.text-button { border: 0; background: transparent; color: var(--teal-deep); padding: 8px 0; display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.text-button svg { width: 15px; }

.transaction-list { background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.transaction-item {
  width: 100%;
  min-height: 70px;
  padding: 13px 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  text-align: left;
}
.transaction-item:last-child { border-bottom: 0; }
.transaction-item:hover { background: #fafcfa; }
.transaction-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; }
.transaction-icon svg { width: 20px; height: 20px; }
.transaction-icon.food { background: var(--coral-soft); color: #b64335; }
.transaction-icon.transport { background: var(--blue-soft); color: #355f9f; }
.transaction-icon.shopping { background: var(--yellow-soft); color: #976a0e; }
.transaction-icon.salary { background: var(--teal-soft); color: var(--teal-deep); }
.transaction-icon.housing { background: #e9e3f2; color: #655181; }
.transaction-icon.other { background: #e8ece9; color: #4d5953; }
.transaction-main { min-width: 0; }
.transaction-main strong { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.transaction-main span { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.transaction-amount { text-align: right; }
.transaction-amount strong { display: block; font-size: 15px; font-variant-numeric: tabular-nums; }
.transaction-amount strong.income { color: var(--teal-deep); }
.transaction-amount span { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }

.empty-state { padding: 44px 20px; text-align: center; color: var(--muted); }
.empty-state svg { width: 34px; height: 34px; margin-bottom: 10px; color: #89948e; }
.empty-state strong { display: block; color: var(--ink); font-size: 15px; }
.empty-state p { margin: 6px 0 0; font-size: 12px; }

.search-field { height: 48px; padding: 0 12px; display: flex; align-items: center; gap: 9px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.search-field > svg { width: 19px; color: var(--muted); }
.search-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); }
.search-field input::placeholder { color: #7b8580; }
.search-field button { width: 34px; height: 34px; border: 0; background: transparent; display: grid; place-items: center; color: var(--muted); }
.search-field button svg { width: 16px; }
.filter-row { display: flex; gap: 8px; overflow-x: auto; padding: 14px 0; scrollbar-width: none; }
.filter-row::-webkit-scrollbar { display: none; }
.filter-chip { min-height: 38px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); white-space: nowrap; }
.filter-chip.is-active { color: #fff; border-color: var(--ink); background: var(--ink); }
.full-list { background: transparent; border-radius: 0; }
.full-list .date-group { margin: 10px 2px 8px; color: var(--muted); font-size: 12px; font-weight: 700; }
.full-list .transaction-item { margin-bottom: 8px; border-bottom: 0; border-radius: 12px; }

.stat-band { background: var(--ink); color: #fff; padding: 22px; border-radius: 16px; display: grid; grid-template-columns: 1fr 1px 1fr; gap: 20px; }
.stat-band span, .stat-band small { display: block; color: #bdc7c1; font-size: 11px; }
.stat-band strong { display: block; margin: 6px 0; font-size: 23px; font-variant-numeric: tabular-nums; }
.vertical-rule { background: rgba(255,255,255,.16); }
.chart-section { padding: 22px 18px; margin-top: 18px; background: var(--surface); border-radius: var(--radius); }
.bar-chart { height: 174px; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.bar-item { flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 8px; }
.bar-item span { width: min(26px, 80%); height: 130px; background: var(--teal); border-radius: 4px 4px 1px 1px; transform: scaleY(var(--bar-scale, .04)); transform-origin: bottom; transition: transform 500ms cubic-bezier(.16, 1, .3, 1); }
.bar-item b { color: var(--muted); font-size: 10px; font-weight: 500; }
.category-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; margin-bottom: 15px; }
.category-row:last-child { margin-bottom: 0; }
.category-row .transaction-icon { width: 34px; height: 34px; border-radius: 10px; }
.category-row .transaction-icon svg { width: 16px; }
.category-meta { min-width: 0; }
.category-meta div { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; font-size: 12px; }
.category-meta div span:last-child { color: var(--muted); }
.category-bar { height: 5px; background: #edf0ed; overflow: hidden; border-radius: 999px; }
.category-bar span { display: block; height: 100%; background: var(--teal); border-radius: inherit; }
.category-row > strong { min-width: 70px; text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; }

.profile-summary { padding: 20px 2px 24px; display: grid; grid-template-columns: 54px 1fr 44px; gap: 13px; align-items: center; border-bottom: 1px solid var(--line); }
.avatar { width: 54px; height: 54px; border-radius: 16px; background: var(--teal); color: #fff; display: grid; place-items: center; font-size: 21px; font-weight: 800; }
.profile-summary strong, .profile-summary span { display: block; }
.profile-summary span { margin-top: 5px; color: var(--muted); font-size: 12px; }
.settings-list { margin-top: 16px; background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.setting-row { width: 100%; min-height: 70px; padding: 12px 14px; display: grid; grid-template-columns: 40px 1fr 20px; align-items: center; gap: 12px; border: 0; border-bottom: 1px solid var(--line); background: var(--surface); text-align: left; }
.setting-row:last-child { border-bottom: 0; }
.setting-row:hover { background: #fafcfa; }
.setting-icon { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; }
.setting-icon svg { width: 19px; }
.setting-icon.teal { background: var(--teal-soft); color: var(--teal-deep); }
.setting-icon.coral { background: var(--coral-soft); color: #b64335; }
.setting-icon.yellow { background: var(--yellow-soft); color: #976a0e; }
.setting-icon.blue { background: var(--blue-soft); color: #355f9f; }
.setting-icon.ink { background: #e5e9e6; color: #3d4943; }
.setting-icon.green { background: var(--green-soft); color: var(--green); }
.setting-row strong, .setting-row small { display: block; }
.setting-row strong { font-size: 14px; }
.setting-row small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.setting-row > svg { width: 18px; color: #8a948e; }

.bottom-nav {
  position: fixed;
  z-index: 40;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 760px;
  height: calc(72px + var(--safe-bottom));
  padding: 7px 12px var(--safe-bottom);
  background: rgba(255,255,255,.97);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 1fr 72px 1fr 1fr;
  align-items: start;
  backdrop-filter: blur(18px);
}
.nav-item { min-width: 0; height: 58px; border: 0; background: transparent; color: #738078; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 10px; }
.nav-item svg { width: 21px; height: 21px; stroke-width: 2; }
.nav-item.is-active { color: var(--teal-deep); font-weight: 700; }
.capture-button { width: 58px; height: 58px; justify-self: center; margin-top: -22px; border: 5px solid var(--surface); border-radius: 50%; background: var(--teal); color: #fff; display: grid; place-items: center; box-shadow: 0 9px 22px rgba(8, 127, 120, .28); }
.capture-button:hover { background: var(--teal-deep); }
.capture-button svg { width: 26px; height: 26px; stroke-width: 2.5; }

.sheet-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(16, 24, 21, .52); backdrop-filter: blur(3px); }
.bottom-sheet {
  position: fixed;
  z-index: 70;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(100%, 620px);
  max-height: min(88vh, 760px);
  overflow-y: auto;
  padding: 8px 20px calc(22px + var(--safe-bottom));
  background: var(--surface);
  border-radius: 18px 18px 0 0;
  box-shadow: var(--shadow);
  animation: sheet-up 330ms cubic-bezier(.16, 1, .3, 1);
}
@keyframes sheet-up { from { transform: translate(-50%, 100%); } to { transform: translate(-50%, 0); } }
.sheet-handle { width: 40px; height: 4px; margin: 2px auto 12px; background: #c8d0cb; border-radius: 999px; }
.sheet-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.sheet-header h2 { margin: 0; font-size: 22px; }
.sheet-header p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }

.capture-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.capture-option { min-width: 0; min-height: 150px; padding: 16px 8px; border: 0; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #eef2ee; }
.capture-option:hover { filter: brightness(.98); }
.capture-option > span { width: 50px; height: 50px; margin-bottom: 12px; border-radius: 14px; display: grid; place-items: center; }
.capture-option svg { width: 24px; height: 24px; }
.capture-option strong { font-size: 15px; }
.capture-option small { margin-top: 5px; color: #5f6b65; font-size: 10px; }
.capture-option.voice { background: var(--teal-soft); }
.capture-option.voice > span { background: var(--teal); color: #fff; }
.capture-option.image { background: var(--coral-soft); }
.capture-option.image > span { background: var(--coral); color: #fff; }
.capture-option.manual { background: var(--yellow-soft); }
.capture-option.manual > span { background: var(--yellow); color: #fff; }

.voice-stage { padding: 24px 8px 12px; text-align: center; }
.waveform { height: 48px; display: flex; align-items: center; justify-content: center; gap: 5px; margin-bottom: 18px; }
.waveform span { width: 4px; height: 42px; border-radius: 999px; background: var(--teal); transform: scaleY(.24); transition: transform 180ms ease; }
.waveform.is-recording span { animation: wave 800ms ease-in-out infinite alternate; }
.waveform.is-recording.has-live-level span { animation: none; }
.waveform.is-recording span:nth-child(2), .waveform.is-recording span:nth-child(6) { animation-delay: -300ms; }
.waveform.is-recording span:nth-child(3), .waveform.is-recording span:nth-child(5) { animation-delay: -500ms; }
.waveform.is-recording span:nth-child(4) { animation-delay: -150ms; }
@keyframes wave { from { transform: scaleY(.22); } to { transform: scaleY(1); } }
.record-button { min-width: 210px; min-height: 58px; padding: 0 22px; border: 5px solid var(--teal-soft); border-radius: 14px; background: var(--teal); color: #fff; display: inline-flex; align-items: center; justify-content: center; gap: 9px; margin: 0 auto; font-weight: 700; }
.record-button.is-recording { background: var(--coral); border-color: var(--coral-soft); }
.record-button svg { width: 23px; height: 23px; }
.record-button span { white-space: nowrap; }
.voice-stage p { min-height: 44px; margin: 20px auto 0; max-width: 330px; font-size: 17px; line-height: 1.6; }
.voice-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.voice-actions .secondary-action { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.voice-actions svg { width: 18px; height: 18px; }
.secondary-action, .primary-action, .danger-action { width: 100%; min-height: 48px; border-radius: 12px; font-weight: 700; }
.secondary-action { border: 1px solid var(--line); background: var(--surface); }
.primary-action { border: 0; background: var(--teal); color: #fff; display: flex; align-items: center; justify-content: center; gap: 8px; }
.primary-action:hover { background: var(--teal-deep); }
.primary-action svg { width: 19px; }
.danger-action { border: 1px solid #ecc9c3; background: #fff; color: #b43c2f; margin-top: 10px; }

.image-preview-wrap { height: 236px; position: relative; overflow: hidden; border-radius: 14px; background: #e9eeea; }
.image-preview-wrap img { width: 100%; height: 100%; object-fit: contain; }
.scan-beam { position: absolute; left: 7%; right: 7%; top: 10%; height: 2px; background: var(--teal); box-shadow: 0 0 16px rgba(8,127,120,.8); animation: scan 1.8s ease-in-out infinite alternate; }
@keyframes scan { to { top: 88%; } }
.processing-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 16px; }
.processing-steps span { display: flex; align-items: center; justify-content: center; gap: 4px; min-height: 38px; color: var(--muted); font-size: 10px; }
.processing-steps span.is-active { color: var(--teal-deep); font-weight: 700; }
.processing-steps svg { width: 14px; }
.processing-steps span:nth-child(2).is-active svg { animation: rotate 1s linear infinite; }
@keyframes rotate { to { transform: rotate(360deg); } }

.type-segment { display: grid; grid-template-columns: repeat(3, 1fr); padding: 4px; background: #edf1ed; border-radius: 12px; }
.type-segment button { height: 40px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); }
.type-segment button.is-active { background: var(--surface); color: var(--ink); font-weight: 700; box-shadow: 0 3px 10px rgba(23,32,29,.09); }
.amount-field { display: block; padding: 22px 0 16px; border-bottom: 1px solid var(--line); }
.amount-field > span, .form-grid label > span, .note-field > span { display: block; color: var(--muted); font-size: 11px; margin-bottom: 7px; }
.amount-field div { display: flex; align-items: baseline; gap: 7px; }
.amount-field b { font-size: 23px; }
.amount-field input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 36px; font-weight: 800; font-variant-numeric: tabular-nums; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin-top: 16px; }
.form-grid input, .form-grid select, .note-field input, .settings-form input, .settings-form select { width: 100%; height: 45px; padding: 0 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); }
.note-field { display: block; margin: 14px 0; }
.source-proof { min-height: 42px; padding: 9px 11px; margin-bottom: 14px; display: grid; grid-template-columns: 20px 1fr auto; align-items: center; gap: 7px; background: var(--teal-soft); color: var(--teal-deep); border-radius: 10px; font-size: 11px; }
.source-proof svg { width: 16px; }
.source-proof strong { padding: 4px 7px; background: var(--surface); border-radius: 999px; font-size: 10px; }

.edit-overview { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px; margin-bottom: 16px; background: var(--paper); border-radius: 14px; }
.edit-overview strong { font-size: 25px; font-variant-numeric: tabular-nums; }
.edit-overview span { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }
.edit-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.edit-meta div { padding: 13px; background: var(--paper); border-radius: 11px; }
.edit-meta span { display: block; color: var(--muted); font-size: 10px; margin-bottom: 5px; }
.edit-meta strong { font-size: 13px; }
.edit-actions { margin-top: 18px; }

.settings-form { display: grid; gap: 13px; }
.settings-form label > span { display: block; color: var(--muted); font-size: 11px; margin-bottom: 7px; }
.info-panel { padding: 16px; background: var(--paper); border-radius: 12px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.info-panel strong { display: block; color: var(--ink); margin-bottom: 5px; }
.account-list { display: grid; gap: 8px; }
.account-item { min-height: 56px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; background: var(--paper); border-radius: 11px; }
.account-item span { font-size: 13px; font-weight: 700; }
.account-item small { color: var(--muted); }
.account-item button { width: 36px; height: 36px; border: 0; border-radius: 10px; background: transparent; color: #a33c31; display: grid; place-items: center; }
.account-item button:hover { background: var(--coral-soft); }
.account-item button svg { width: 17px; }
.manager-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 18px 0 8px; }
.manager-heading strong { font-size: 13px; }
.manager-heading span { color: var(--muted); font-size: 11px; }

.toast { position: fixed; z-index: 100; left: 50%; bottom: calc(88px + var(--safe-bottom)); transform: translateX(-50%); min-width: 210px; max-width: calc(100% - 36px); min-height: 48px; padding: 10px 15px; display: flex; align-items: center; justify-content: center; gap: 8px; border-radius: 12px; background: var(--ink); color: #fff; box-shadow: var(--shadow); font-size: 13px; animation: toast-in 250ms cubic-bezier(.16,1,.3,1); }
.toast svg { width: 18px; color: #8adacb; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 12px); } }

[hidden] { display: none !important; }
.is-masked .money-value, .is-masked #monthBalance, .is-masked #monthIncome, .is-masked #monthExpense, .is-masked #budgetRemaining { color: transparent !important; text-shadow: 0 0 10px rgba(255,255,255,.6); user-select: none; }

@media (min-width: 761px) {
  body { padding: 24px 0; }
  .app-shell { max-width: 760px; margin: 0 auto; min-height: calc(100vh - 48px); border-radius: 18px; overflow: hidden; box-shadow: 0 20px 60px rgba(23,32,29,.14); }
  .topbar { position: relative; }
  .bottom-nav { bottom: 24px; border-radius: 0 0 18px 18px; }
}

@media (max-width: 370px) {
  .view { padding-left: 14px; padding-right: 14px; }
  .balance-stage { padding: 21px 17px 18px; }
  .income-expense-strip { gap: 8px; }
  .income-expense-strip strong { font-size: 12px; }
  .capture-options { grid-template-columns: 1fr; }
  .capture-option { min-height: 92px; flex-direction: row; justify-content: flex-start; padding: 12px 16px; text-align: left; display: grid; grid-template-columns: 50px 1fr; column-gap: 12px; }
  .capture-option > span { grid-row: span 2; margin: 0; }
  .capture-option small { margin-top: 1px; }
  .form-grid { grid-template-columns: 1fr; }
}

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