:root {
  --bg: #f5f6f1;
  --surface: #ffffff;
  --ink: #1d2823;
  --muted: #6f7973;
  --line: #dfe3dc;
  --green: #236b4e;
  --green-dark: #174d38;
  --mint: #dcebdd;
  --coral: #e56f51;
  --yellow: #f2c75c;
  --blue: #5d83b3;
  --shadow: 0 12px 32px rgba(32, 52, 42, .08);
  --radius: 8px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; min-height: 100%; min-height: 100dvh; background: var(--bg); }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--ink); font-family: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif; letter-spacing: 0; }
button, input, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(35, 107, 78, .25); outline-offset: 2px; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 224px; padding: 32px 22px; background: #193d30; color: #fff; display: flex; flex-direction: column; z-index: 20; }
.brand { color: #fff; text-decoration: none; display: flex; align-items: center; gap: 11px; font-size: 23px; font-weight: 700; }
.brand-mark { display: block; width: 40px; height: 40px; overflow: hidden; border: 2px solid rgba(255,255,255,.72); border-radius: 8px; box-shadow: 0 5px 14px rgba(0,0,0,.16); }
.brand-mark img { display: block; width: 100%; height: 100%; object-fit: cover; }
.main-nav { display: grid; gap: 8px; margin-top: 55px; }
.nav-item { border: 0; background: transparent; color: rgba(255,255,255,.68); height: 48px; padding: 0 16px; display: flex; align-items: center; gap: 14px; border-radius: 6px; cursor: pointer; font-weight: 600; }
.nav-item span { font-size: 21px; width: 22px; line-height: 1; }
.nav-item:hover, .nav-item.active { color: #fff; background: rgba(255,255,255,.11); }
.sidebar-foot { margin-top: auto; border-top: 1px solid rgba(255,255,255,.15); padding-top: 22px; }
.sidebar-foot p { color: rgba(255,255,255,.62); margin: 0 0 5px; font-size: 13px; }
.sidebar-foot strong { font-size: 24px; }
.week-dots { display: flex; gap: 7px; margin-top: 16px; }
.week-dots span { width: 18px; height: 18px; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; display: grid; place-items: center; font-size: 10px; }
.week-dots span.done { background: var(--yellow); color: #193d30; border-color: var(--yellow); }

.main-content { margin-left: 224px; max-width: 1440px; padding: 32px 48px 64px; }
.topbar { min-height: 72px; margin-bottom: 28px; display: flex; align-items: flex-start; justify-content: space-between; }
.topbar h1 { font-size: clamp(25px, 3vw, 34px); margin: 3px 0 0; line-height: 1.25; }
.eyebrow { text-transform: uppercase; color: var(--green); font-size: 12px; font-weight: 700; margin: 0; letter-spacing: 0; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.local-status { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid #cfdacf; border-radius: 999px; color: var(--green); background: #edf4eb; font-size: 11px; font-weight: 700; }
.local-status i { width: 7px; height: 7px; border-radius: 50%; background: #35a16b; box-shadow: 0 0 0 3px rgba(53,161,107,.13); }
.local-status.error { color: #a84b39; background: #f9e8e2; border-color: #efd0c6; }
.local-status.error i { background: #d65f48; box-shadow: 0 0 0 3px rgba(214,95,72,.13); }
.avatar-btn { width: 44px; height: 44px; padding: 0; overflow: hidden; border-radius: 8px; border: 1px solid #cad1ca; background: var(--surface); cursor: pointer; box-shadow: 0 3px 10px rgba(35,55,45,.08); }
.avatar-btn img { display: block; width: 100%; height: 100%; object-fit: cover; }
.view { display: none; animation: appear .25s ease; }
.view.active { display: block; }
@keyframes appear { from { opacity: 0; transform: translateY(5px); } }

.home-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(290px, .85fr); gap: 20px; }
.dream-hero { min-height: 400px; position: relative; overflow: hidden; border-radius: var(--radius); color: #fff; background: #425b4e; }
.dream-hero img { position: absolute; width: 100%; height: 100%; object-fit: cover; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(16,28,23,.06) 28%, rgba(13,30,22,.86) 100%); }
.hero-content { position: absolute; inset: auto 32px 30px; }
.hero-tag { display: inline-block; border: 1px solid rgba(255,255,255,.45); padding: 5px 9px; border-radius: 4px; font-size: 12px; }
.hero-content h2 { max-width: 620px; margin: 12px 0 20px; font-size: clamp(25px, 3vw, 38px); line-height: 1.22; }
.hero-progress-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.hero-progress-row div { display: flex; align-items: baseline; gap: 12px; }
.hero-progress-row strong { font-size: 20px; }
.hero-progress-row div strong { font-size: 24px; }
.hero-progress-row span { color: rgba(255,255,255,.68); font-size: 13px; }
.hero-content > p { margin: 9px 0 0; font-size: 13px; color: rgba(255,255,255,.75); }
.progress-track { height: 7px; background: #e4e8e2; overflow: hidden; border-radius: 4px; }
.progress-track span { display: block; height: 100%; background: var(--green); border-radius: inherit; transition: width .5s ease; }
.progress-track.light { margin-top: 9px; background: rgba(255,255,255,.28); }
.progress-track.light span { background: var(--yellow); }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 3px 15px rgba(35,55,45,.03); }
.today-panel { padding: 27px; display: flex; flex-direction: column; }
.panel-heading { display: flex; justify-content: space-between; gap: 15px; align-items: flex-start; }
.panel-heading h2 { margin: 5px 0 0; font-size: 20px; }
.status-pill { background: #f0eee5; color: #7b735f; border-radius: 999px; padding: 6px 10px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.status-pill.done { background: var(--mint); color: var(--green); }
.amount-orbit { flex: 1; min-height: 190px; display: grid; place-items: center; position: relative; }
.amount-orbit::before, .amount-orbit::after { content: ""; position: absolute; border-radius: 50%; border: 1px solid #d9e4da; }
.amount-orbit::before { width: 145px; height: 145px; }
.amount-orbit::after { width: 112px; height: 112px; border-style: dashed; border-color: #b3cbb8; }
.orbit-copy { text-align: center; position: relative; z-index: 1; display: grid; }
.orbit-copy span { color: var(--muted); font-size: 13px; }
.orbit-copy strong { font-size: 34px; color: var(--green); }
.primary-btn { border: 0; background: var(--green); color: #fff; min-height: 48px; border-radius: 6px; padding: 0 20px; font-weight: 700; cursor: pointer; transition: background .2s, transform .2s; }
.primary-btn:hover { background: var(--green-dark); transform: translateY(-1px); }
.primary-btn.full { width: 100%; }
.primary-btn.compact { min-height: 42px; }
.secondary-btn { border: 1px solid var(--green); background: #fff; color: var(--green); min-height: 44px; border-radius: 6px; padding: 0 16px; font-weight: 700; cursor: pointer; }
.secondary-btn.compact { min-height: 42px; }.secondary-btn.full { width: 100%; }
.heading-actions { display: flex; gap: 9px; }
.text-btn { border: 0; background: transparent; color: var(--green); padding: 12px; cursor: pointer; font-weight: 600; }
.text-btn.inline { padding: 8px 0; }

.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); margin: 20px 0 40px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.stat-block { min-width: 0; padding: 22px 24px; display: flex; align-items: center; gap: 15px; }
.stat-block + .stat-block { border-left: 1px solid var(--line); }
.stat-icon { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; border-radius: 50%; font-size: 17px; }
.stat-icon.coral { background: #f9e3dc; color: #b9553d; }.stat-icon.yellow { background: #f8edc9; }.stat-icon.blue { background: #dfe8f2; color: #456b99; }
.stat-block p { margin: 0 0 3px; color: var(--muted); font-size: 12px; }
.stat-block strong { font-size: 21px; }
.stat-block small { display: block; color: #88918b; margin-top: 2px; font-size: 11px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.section-heading h2 { margin: 4px 0 0; font-size: 23px; }
.page-section-heading { margin-bottom: 24px; }
.activity-list { display: grid; gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--line); }
.activity-item { background: var(--surface); padding: 16px 18px; display: grid; grid-template-columns: 42px minmax(0, 1fr) auto auto; align-items: center; gap: 14px; }
.delete-item { width: 30px; height: 30px; border: 0; background: transparent; color: #ad5947; cursor: pointer; border-radius: 50%; }.delete-item:hover { background: #fae9e4; }
.activity-symbol, .record-symbol { width: 38px; height: 38px; display: grid; place-items: center; background: var(--mint); color: var(--green); border-radius: 50%; }
.activity-item strong { font-size: 14px; }.activity-item p { color: var(--muted); font-size: 12px; margin: 3px 0 0; }.activity-amount { color: var(--green); font-weight: 700; white-space: nowrap; }

.dream-detail-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); gap: 20px; }
.dream-switcher { display: flex; gap: 10px; overflow-x: auto; padding: 2px 0 18px; }
.dream-chip { min-width: 165px; border: 1px solid var(--line); background: #fff; border-radius: var(--radius); padding: 12px 14px; cursor: pointer; text-align: left; }
.dream-chip.active { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); background: #edf4eb; }
.dream-chip strong,.dream-chip small { display: block; }.dream-chip small { color: var(--muted); margin-top: 4px; }.dream-chip.archived { opacity: .55; }
.plan-summary { overflow: hidden; }
.plan-visual { aspect-ratio: 16 / 8; overflow: hidden; }
.plan-visual img { width: 100%; height: 100%; object-fit: cover; }
.plan-copy { padding: 28px; }
.category-label { color: var(--green); font-size: 12px; font-weight: 700; }
.plan-copy h2 { font-size: 27px; margin: 7px 0 25px; }
.big-progress { display: flex; align-items: baseline; gap: 9px; margin-bottom: 8px; }.big-progress strong { font-size: 34px; }.big-progress span { color: var(--muted); }
.amount-split { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; margin-top: 10px; }
.dream-actions { display: flex; gap: 8px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }.dream-actions button { border: 0; background: #eef1ed; border-radius: 5px; padding: 8px 12px; cursor: pointer; font-size: 12px; }.danger-text { color: #b04f3c !important; }
.milestone-column { display: grid; gap: 20px; }
.insight-panel { padding: 24px; background: #e6eee3; border-color: #d0dfcf; }.insight-panel h3 { margin: 9px 0; line-height: 1.4; }.insight-panel > p:last-child { color: #52655b; line-height: 1.6; margin-bottom: 0; }
.milestone-panel { padding: 24px; }.milestone-panel .panel-heading { align-items: center; margin-bottom: 22px; }.milestone-panel h3 { margin: 0; }.milestone-panel .panel-heading span { font-size: 12px; color: var(--green); }
.milestone-line { display: flex; gap: 13px; position: relative; padding-bottom: 22px; }.milestone-line:last-child { padding-bottom: 0; }
.milestone-line > span { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%; display: grid; place-items: center; border: 1px solid #cad2ca; background: #fff; font-size: 10px; color: #839087; position: relative; z-index: 1; }
.milestone-line:not(:last-child)::after { content: ""; position: absolute; left: 14px; top: 30px; width: 1px; height: calc(100% - 30px); background: #d8ddd7; }
.milestone-line > span.done { background: var(--green); border-color: var(--green); color: white; }.milestone-line > span.current { background: var(--yellow); border-color: var(--yellow); color: var(--ink); font-weight: 700; }
.milestone-line strong { font-size: 14px; }.milestone-line p { margin: 3px 0 0; font-size: 12px; color: var(--muted); }

.collection-count { font-size: 15px; color: var(--muted); }.collection-count b { font-size: 28px; color: var(--ink); }
.card-filter { display: flex; gap: 8px; margin-bottom: 20px; overflow-x: auto; }.filter-btn { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 8px 17px; cursor: pointer; white-space: nowrap; }.filter-btn.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.collection-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.collect-card { aspect-ratio: 3 / 4; border-radius: var(--radius); border: 1px solid rgba(0,0,0,.1); padding: 18px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; box-shadow: var(--shadow); }
.collect-card::after { content: ""; width: 110px; height: 110px; border: 1px solid currentColor; opacity: .18; border-radius: 50%; position: absolute; right: -24px; top: 44px; }
.collect-card.common { background: #e6ede2; color: #294d3a; }.collect-card.rare { background: #f4d26e; color: #453a1e; }.collect-card.hidden { background: #344d65; color: #fff; }
.collect-card.locked { background: #e8e9e5; color: #959b96; filter: grayscale(.7); box-shadow: none; }.collect-card.locked::before { content: "?"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 48px; opacity: .28; }
.card-number { font-size: 11px; font-weight: 700; }.card-art { font-size: 46px; position: relative; z-index: 1; }.collect-card h3 { margin: 0; font-size: 17px; }.collect-card p { margin: 4px 0 0; font-size: 11px; opacity: .75; }

.ledger-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 20px; }.ledger-summary article { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }.ledger-summary p { margin: 0 0 7px; color: var(--muted); font-size: 12px; }.ledger-summary strong { font-size: 23px; }.ledger-summary .income { color: var(--green); }.ledger-summary small { display: block; margin-top: 4px; color: rgba(255,255,255,.72); }.ledger-summary .accent-summary { background: var(--green); color: #fff; border-color: var(--green); }.ledger-summary .accent-summary p { color: rgba(255,255,255,.7); }
.ledger-panel { overflow: hidden; }.ledger-tools { padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }.ledger-tools h3 { margin: 0; }.ledger-tools select { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 7px 10px; }.ledger-tool-actions { display: flex; gap: 8px; }.danger-outline { border: 1px solid #e2b8ae; background: #fff; color: #a54c3a; border-radius: 6px; padding: 7px 10px; cursor: pointer; }
.record-list { display: grid; }.record-item { padding: 14px 20px; display: grid; grid-template-columns: 40px 1fr auto auto; gap: 13px; align-items: center; }.record-item + .record-item { border-top: 1px solid #edf0eb; }.record-symbol.expense { background: #f7e6df; color: var(--coral); }.record-symbol.income { background: var(--mint); color: var(--green); }.record-item strong { font-size: 14px; }.record-item p { font-size: 11px; color: var(--muted); margin: 3px 0 0; }.record-value { text-align: right; font-weight: 700; }.record-value.income { color: var(--green); }

.mobile-nav { display: none; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(17,27,22,.62); z-index: 100; padding: 22px; display: grid; place-items: center; backdrop-filter: blur(4px); }
.modal-backdrop[hidden], .modal[hidden] { display: none; }
.modal { width: min(460px, 100%); max-height: calc(100vh - 44px); overflow-y: auto; background: var(--surface); border-radius: var(--radius); padding: 30px; position: relative; box-shadow: 0 24px 80px rgba(0,0,0,.24); }
.modal h2 { margin: 7px 0 24px; font-size: 25px; }.close-btn { position: absolute; right: 17px; top: 14px; width: 34px; height: 34px; border: 0; background: transparent; font-size: 27px; color: var(--muted); cursor: pointer; }
.field-label, .form-grid label span { display: block; font-size: 12px; color: var(--muted); font-weight: 600; margin: 16px 0 7px; }.money-input { height: 58px; border: 1px solid #ccd3cc; border-radius: 6px; display: flex; align-items: center; padding: 0 15px; }.money-input span { font-size: 24px; color: var(--muted); }.money-input input { width: 100%; min-width: 0; border: 0; outline: 0; font-size: 28px; font-weight: 700; padding: 0 8px; color: var(--ink); }.quick-amounts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 0; }.quick-amounts button { border: 1px solid var(--line); border-radius: 5px; background: #fff; padding: 8px 4px; cursor: pointer; }.quick-amounts button:hover { border-color: var(--green); color: var(--green); }.text-input { width: 100%; height: 44px; border: 1px solid #ccd3cc; border-radius: 6px; padding: 0 12px; background: #fff; }.modal .primary-btn { margin-top: 22px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }.form-grid input { width: 100%; height: 44px; border: 1px solid #ccd3cc; border-radius: 6px; padding: 0 10px; }.calculation-box { background: #edf3ea; margin-top: 20px; padding: 16px; border-radius: 6px; display: grid; grid-template-columns: 1fr auto; align-items: baseline; }.calculation-box span { font-size: 13px; }.calculation-box strong { font-size: 22px; color: var(--green); }.calculation-box p { grid-column: 1 / -1; margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; background: #eef0ec; padding: 4px; border-radius: 6px; }.segmented button { border: 0; background: transparent; border-radius: 4px; padding: 9px; cursor: pointer; }.segmented button.active { background: #fff; color: var(--green); font-weight: 700; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.reward-modal { background: #1e4435; color: white; text-align: center; overflow: hidden; }.reward-modal .eyebrow { color: #e8ca6c; }.reward-modal h2 { margin-bottom: 18px; }.light-close { color: rgba(255,255,255,.7); }.reward-card { width: 210px; aspect-ratio: 3 / 4; border: 0; background: transparent; padding: 0; perspective: 800px; cursor: pointer; position: relative; margin: 0 auto; display: block; }.card-back, .card-front { position: absolute; inset: 0; backface-visibility: hidden; transition: transform .6s; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; }.card-back { background: #e8c65f; color: #284536; border: 8px double rgba(40,69,54,.35); }.card-back b { font-size: 64px; }.card-back small { margin-top: 28px; }.card-front { transform: rotateY(180deg); background: #f5d878; color: #2f4a3d; border: 8px double rgba(47,74,61,.35); padding: 18px; }.card-front::before { content: "⌁"; font-size: 72px; line-height: 1; }.card-front small { position: absolute; top: 16px; }.card-front b { font-size: 22px; margin: 10px 0; }.card-front em { font-size: 11px; font-style: normal; }.reward-card.flipped .card-back { transform: rotateY(-180deg); }.reward-card.flipped .card-front { transform: rotateY(0); }.reward-hint { font-size: 12px; color: rgba(255,255,255,.65); margin: 15px 0 0; }.reward-done { background: #e6c65f; color: #234333; }.reward-done:hover { background: #f0d573; }
.toast { position: fixed; z-index: 200; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: #172b22; color: #fff; padding: 11px 18px; border-radius: 6px; opacity: 0; pointer-events: none; transition: .25s; box-shadow: var(--shadow); font-size: 13px; }.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }.toast .undo-button { border: 0; background: transparent; color: #f2d06d; margin-left: 12px; font-weight: 700; cursor: pointer; }
.empty-state { padding: 42px 20px; text-align: center; color: var(--muted); }
.empty-onboarding { background: #fff; border: 1px dashed #b7c7ba; padding: 54px 24px; text-align: center; border-radius: var(--radius); margin-bottom: 20px; }.empty-onboarding h2 { margin: 8px 0; }.empty-onboarding p { color: var(--muted); }.empty-onboarding button { margin-top: 10px; }
.data-action-list { display: grid; gap: 8px; }.data-action-list button { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 13px; text-align: left; cursor: pointer; }.data-action-list span,.data-action-list small { display: block; }.data-action-list small { color: var(--muted); margin-top: 3px; }.danger-zone { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); display: grid; gap: 9px; }.danger-zone h3 { margin: 0 0 4px; color: #a54c3a; }.danger-zone p { font-size: 11px; color: var(--muted); margin: 0; }.danger-btn { border: 0; background: #b9533f; color: #fff; min-height: 44px; border-radius: 6px; font-weight: 700; cursor: pointer; }.danger-btn.full { width: 100%; }

@media (max-width: 1040px) {
  .main-content { padding-inline: 30px; }
  .home-grid { grid-template-columns: 1fr; }
  .today-panel { min-height: 360px; }
  .dream-detail-grid { grid-template-columns: 1fr; }
  .collection-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 760px) {
  body { padding-bottom: calc(70px + var(--safe-bottom)); }
  .sidebar { display: none; }
  .main-content { margin: 0; padding: calc(22px + var(--safe-top)) calc(16px + var(--safe-right)) 38px calc(16px + var(--safe-left)); }
  .topbar { min-height: 61px; margin-bottom: 18px; }
  .topbar h1 { font-size: 25px; }
  .home-grid { gap: 14px; }
  .dream-hero { min-height: 360px; }
  .hero-content { inset: auto 20px 22px; }
  .hero-content h2 { font-size: 27px; }
  .hero-progress-row div { display: grid; gap: 0; }
  .today-panel { min-height: 320px; padding: 22px; }
  .today-panel .amount-orbit { min-height: 155px; }
  .stats-row { grid-template-columns: 1fr; margin: 14px 0 32px; }
  .stat-block + .stat-block { border-left: 0; border-top: 1px solid var(--line); }
  .stat-block { padding: 17px 19px; }
  .activity-item { padding: 14px; }
  .page-section-heading { align-items: center; }
  .page-section-heading h2 { font-size: 20px; }
  .heading-actions { display: grid; gap: 5px; }.heading-actions button { min-height: 36px; padding: 0 10px; font-size: 11px; }
  .collection-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .collect-card { padding: 13px; }
  .card-art { font-size: 38px; }
  .ledger-summary { grid-template-columns: 1fr 1fr; }
  .ledger-summary .accent-summary { grid-column: 1 / -1; }
  .mobile-nav { position: fixed; display: grid; grid-template-columns: repeat(4, 1fr); inset: auto 0 0; height: calc(66px + var(--safe-bottom)); background: rgba(255,255,255,.97); border-top: 1px solid var(--line); z-index: 50; padding: 5px calc(8px + var(--safe-right)) calc(7px + var(--safe-bottom)) calc(8px + var(--safe-left)); }
  .mobile-nav .nav-item { color: #7c857f; height: auto; display: grid; justify-items: center; gap: 1px; padding: 2px; font-size: 10px; }
  .mobile-nav .nav-item span { font-size: 20px; width: auto; }
  .mobile-nav .nav-item.active { color: var(--green); background: transparent; }
  .toast { bottom: calc(82px + var(--safe-bottom)); width: max-content; max-width: calc(100% - 32px); text-align: center; }
}

@media (max-width: 430px) {
  .local-status { display: none; }
  .hero-progress-row div strong { font-size: 21px; }
  .hero-progress-row > strong { font-size: 18px; }
  .section-heading { align-items: center; }
  .section-heading h2 { font-size: 19px; }
  .form-grid { grid-template-columns: 1fr; }
  .modal { padding: 25px 20px; }
  .plan-copy { padding: 22px 20px; }
  .amount-split { font-size: 11px; }
  .ledger-summary strong { font-size: 19px; }
  .record-item { padding-inline: 14px; }
  .activity-item, .record-item { grid-template-columns: 36px minmax(0, 1fr) auto; gap: 10px; }
  .activity-amount, .record-value { grid-column: 2; text-align: left; }
  .activity-item .delete-item, .record-item .delete-item { grid-column: 3; grid-row: 1 / span 2; }
  .ledger-tools { align-items: flex-start; gap: 8px; }.ledger-tool-actions { display: grid; }
}

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