/* Steady — warm, calm, ADHD-friendly design. No red anywhere. */
@font-face { font-family: 'Inter'; src: url('../fonts/inter-regular.woff') format('woff'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../fonts/inter-medium.woff') format('woff'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../fonts/inter-semibold.woff') format('woff'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../fonts/inter-bold.woff') format('woff'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Libre Baskerville'; src: url('../fonts/baskerville.woff') format('woff'); font-weight: 400; font-display: swap; }
:root {
  --bg: #f6f4f9;
  --surface: #ffffff;
  --surface-2: #faf8fc;
  --text: #24222c;
  --muted: #5f5b6c;
  --border: #e6e2ee;
  --primary: #7353b3;
  --primary-ink: #ffffff;
  --primary-soft: #efe9fb;
  --accent: #7353b3;
  --accent-soft: #efe9fb;
  --pay: #4f9a80;
  --amber: #9a5f1c;
  --amber-soft: #fbeedd;
  --sky-soft: #e6eefb;
  --hero: linear-gradient(140deg, #f1ebfc 0%, #ecf5f1 52%, #fdf0e6 100%);
  --hero-border: rgba(122, 95, 192, 0.12);
  --shadow: 0 1px 2px rgba(60, 40, 90, 0.05), 0 8px 24px rgba(60, 40, 90, 0.07);
  --radius: 20px;
  --radius-sm: 14px;
  --font-scale: 1;
  --nav-h: 68px;
  --serif: 'Libre Baskerville', Baskerville, Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  /* category colours: background / text */
  --c-food: #fde4ec; --c-food-t: #a23e62;
  --c-groceries: #dff3e8; --c-groceries-t: #2c7653;
  --c-transport: #e2eefc; --c-transport-t: #2d65a0;
  --c-shopping: #fdeadd; --c-shopping-t: #a15524;
  --c-fun: #ede6fc; --c-fun-t: #6a4cb2;
  --c-home: #f7efd8; --c-home-t: #86661a;
  --c-health: #e2f1ea; --c-health-t: #3b7a67;
  --c-other: #eeedf3; --c-other-t: #5a5667;
  --c-later: #f1eff5; --c-later-t: #6b6779;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #14131a; --surface: #1e1c26; --surface-2: #1a1922; --text: #efebf7; --muted: #aaa5b9; --border: #2e2b39;
    --primary: #b9a2f3; --primary-ink: #1c1530; --primary-soft: #2b2442; --accent: #b9a2f3; --accent-soft: #2a2440; --pay: #7fc8b1;
    --amber: #e8b673; --amber-soft: #382d1f; --sky-soft: #1f2a38;
    --hero: linear-gradient(140deg, #2a2342 0%, #1d2d29 55%, #33261f 100%); --hero-border: rgba(180, 160, 240, 0.14);
    --shadow: none; color-scheme: dark;
    --c-food: #3a2430; --c-food-t: #f3a9c3; --c-groceries: #1e3329; --c-groceries-t: #9fdcbc; --c-transport: #1f2b3b; --c-transport-t: #a8c8f2;
    --c-shopping: #3a2a20; --c-shopping-t: #f2bb94; --c-fun: #2b2441; --c-fun-t: #c9b7f5; --c-home: #33301f; --c-home-t: #e5d08c;
    --c-health: #1f3330; --c-health-t: #9fd6c3; --c-other: #2a2833; --c-other-t: #bdb8cb; --c-later: #2a2833; --c-later-t: #bdb8cb;
  }
}
:root[data-theme='dark'] {
  --bg: #14131a; --surface: #1e1c26; --surface-2: #1a1922; --text: #efebf7; --muted: #aaa5b9; --border: #2e2b39;
  --primary: #b9a2f3; --primary-ink: #1c1530; --primary-soft: #2b2442; --accent: #b9a2f3; --accent-soft: #2a2440; --pay: #7fc8b1;
  --amber: #e8b673; --amber-soft: #382d1f; --sky-soft: #1f2a38;
  --hero: linear-gradient(140deg, #2a2342 0%, #1d2d29 55%, #33261f 100%); --hero-border: rgba(180, 160, 240, 0.14);
  --shadow: none; color-scheme: dark;
  --c-food: #3a2430; --c-food-t: #f3a9c3; --c-groceries: #1e3329; --c-groceries-t: #9fdcbc; --c-transport: #1f2b3b; --c-transport-t: #a8c8f2;
  --c-shopping: #3a2a20; --c-shopping-t: #f2bb94; --c-fun: #2b2441; --c-fun-t: #c9b7f5; --c-home: #33301f; --c-home-t: #e5d08c;
  --c-health: #1f3330; --c-health-t: #9fd6c3; --c-other: #2a2833; --c-other-t: #bdb8cb; --c-later: #2a2833; --c-later-t: #bdb8cb;
}
:root[data-text='large'] { --font-scale: 1.15; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--text);
  font-family: var(--sans);
  font-size: calc(16px * var(--font-scale)); line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
:root[data-motion='reduce'] * { animation: none !important; transition: none !important; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
input, select, textarea {
  width: 100%; padding: 14px 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--border);
  background: var(--surface); outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

.app { max-width: 520px; margin: 0 auto; min-height: 100vh; padding: 0 16px calc(var(--nav-h) + 28px + env(safe-area-inset-bottom)); }

/* ---------- top bar ---------- */
.top { display: flex; align-items: center; justify-content: space-between; padding: calc(14px + env(safe-area-inset-top)) 2px 6px; }
.top h1 { font-size: 1.15rem; margin: 0; font-weight: 700; letter-spacing: -0.01em; }
.top .date { color: var(--muted); font-size: 0.9rem; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); }
.icon-btn:active { background: var(--primary-soft); }
.icon-btn.on { color: var(--primary); background: var(--primary-soft); }
.icon-btn svg { width: 22px; height: 22px; }

/* ---------- banners ---------- */
.banner { background: var(--sky-soft); border-radius: var(--radius-sm); padding: 10px 14px; margin: 8px 0; display: flex; gap: 10px; align-items: center; justify-content: space-between; font-size: 0.92rem; }
.banner button { color: var(--primary); font-weight: 650; white-space: nowrap; }

/* ---------- hero number ---------- */
.hero { text-align: center; padding: 26px 16px 22px; background: var(--surface); border-radius: 24px; box-shadow: var(--shadow); margin: 10px 0 14px; }
.hero .label { color: var(--muted); font-size: 0.95rem; margin: 0; font-weight: 550; }
.hero .big { font-size: calc(64px * var(--font-scale)); font-weight: 750; letter-spacing: -0.03em; margin: 4px 0 2px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.hero .sub { color: var(--muted); margin: 6px 0 0; font-size: 0.95rem; }
.hero .note { margin: 12px auto 0; max-width: 34ch; font-size: 0.95rem; background: var(--amber-soft); border-radius: var(--radius-sm); padding: 10px 12px; }
.hero.over .big, .hero.short .big { color: var(--amber); }
.link { color: var(--primary); font-weight: 650; padding: 10px 8px; margin-top: 6px; display: inline-block; }

/* ---------- main log button ---------- */
.log-btn { width: 100%; background: var(--primary); color: var(--primary-ink); font-weight: 700; font-size: 1.1rem; border-radius: var(--radius); padding: 18px; display: flex; align-items: center; justify-content: center; gap: 8px; box-shadow: var(--shadow); }
.log-btn:active { transform: scale(0.99); }
.log-btn svg { width: 22px; height: 22px; }

/* ---------- cards ---------- */
.card { background: var(--surface); border-radius: var(--radius); padding: 16px; margin: 14px 0; box-shadow: var(--shadow); }
.card h2 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 0 0 10px; font-weight: 650; }
.card h3 { margin: 0; font-size: 1.05rem; }
.card p { margin: 4px 0; }
.muted { color: var(--muted); }
.small { font-size: 0.88rem; }

.step { border: 2px solid var(--primary-soft); }
.step .step-text { font-size: 1.08rem; font-weight: 600; margin: 2px 0 12px; }
.row { display: flex; gap: 8px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.btn { border-radius: 999px; padding: 11px 18px; font-weight: 650; background: var(--primary-soft); color: var(--primary); min-height: 44px; }
.btn.solid { background: var(--primary); color: var(--primary-ink); }
.btn.quiet { background: transparent; color: var(--muted); }
.btn.block { width: 100%; padding: 15px; font-size: 1.02rem; }
.btn:disabled { opacity: 0.45; }

.progress { height: 10px; background: var(--primary-soft); border-radius: 99px; overflow: hidden; margin: 10px 0 4px; }
.progress > span { display: block; height: 100%; background: var(--primary); border-radius: 99px; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 2px; border-bottom: 1px solid var(--border); }
.list li:last-child { border-bottom: 0; }
.list .main { min-width: 0; flex: 1; }
.list .title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .meta { color: var(--muted); font-size: 0.85rem; }
.list .amt { font-variant-numeric: tabular-nums; font-weight: 650; white-space: nowrap; }
.list button.item { display: flex; width: 100%; text-align: left; align-items: center; gap: 10px; }
.emoji { width: 38px; height: 38px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; font-size: 1.15rem; flex: none; border: 1px solid var(--border); }
.pill { display: inline-block; font-size: 0.78rem; padding: 3px 9px; border-radius: 99px; background: var(--amber-soft); color: var(--amber); font-weight: 650; }
.pill.calm { background: var(--primary-soft); color: var(--primary); }
.day-head { font-size: 0.85rem; color: var(--muted); margin: 18px 4px 4px; font-weight: 650; }
.empty { text-align: center; padding: 26px 12px; color: var(--muted); }
.empty .big-emoji { font-size: 2.2rem; display: block; margin-bottom: 6px; }

/* ---------- bottom nav ---------- */
.nav { position: fixed; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom); z-index: 20; }
.nav .inner { max-width: 520px; margin: 0 auto; display: grid; grid-template-columns: repeat(6, 1fr); height: var(--nav-h); }
.nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: 0.75rem; font-weight: 600; }
.nav button svg { width: 24px; height: 24px; }
.nav button.active { color: var(--primary); }

/* ---------- bottom sheet ---------- */
.scrim { position: fixed; inset: 0; background: rgba(15, 20, 20, 0.38); z-index: 40; animation: fade 0.18s ease; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-width: 520px; margin: 0 auto; background: var(--surface); border-radius: 24px 24px 0 0; padding: 10px 18px calc(20px + env(safe-area-inset-bottom)); max-height: 92vh; overflow-y: auto; animation: up 0.22s ease; }
.sheet .grab { width: 40px; height: 5px; border-radius: 9px; background: var(--border); margin: 0 auto 10px; }
.sheet h2 { margin: 4px 0 4px; font-size: 1.25rem; }
.sheet .lead { color: var(--muted); margin: 0 0 14px; }
.field { margin: 12px 0; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.95rem; }
.field .hint { color: var(--muted); font-size: 0.85rem; margin-top: 4px; }
@keyframes up { from { transform: translateY(30px); opacity: 0.6; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1.5px solid var(--border); background: var(--surface); border-radius: 99px; padding: 9px 14px; font-weight: 600; min-height: 42px; }
.chip.on { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.chip.fav { background: var(--surface-2); }

/* keypad */
.amount-display { text-align: center; font-size: calc(46px * var(--font-scale)); font-weight: 750; font-variant-numeric: tabular-nums; margin: 4px 0 10px; letter-spacing: -0.02em; min-height: 58px; }
.amount-display.placeholder { color: var(--border); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.keypad button { background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; height: 56px; font-size: 1.4rem; font-weight: 600; }
.keypad button:active { background: var(--primary-soft); }

/* math explainer */
.math { width: 100%; border-collapse: collapse; margin: 6px 0 10px; }
.math td { padding: 10px 2px; border-bottom: 1px solid var(--border); }
.math td:last-child { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.math tr.total td { border-bottom: 0; font-weight: 750; font-size: 1.05rem; }

/* toast */
.toast { position: fixed; left: 16px; right: 16px; margin: 0 auto; width: fit-content; max-width: 488px; justify-content: space-between; bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom)); background: var(--text); color: var(--bg); padding: 12px 16px; border-radius: 14px; z-index: 60; display: flex; gap: 14px; align-items: center; box-shadow: 0 6px 20px rgba(0,0,0,.18); animation: up 0.2s ease; }
.toast button { color: var(--primary-soft); font-weight: 700; }

/* onboarding */
.onboard { position: fixed; inset: 0; background: var(--bg); z-index: 50; overflow-y: auto; }
.onboard .wrap { max-width: 480px; margin: 0 auto; padding: calc(28px + env(safe-area-inset-top)) 22px 32px; min-height: 100%; display: flex; flex-direction: column; }
.onboard .dots { display: flex; gap: 6px; margin-bottom: 26px; }
.onboard .dots span { height: 6px; flex: 1; border-radius: 9px; background: var(--border); }
.onboard .dots span.on { background: var(--primary); }
.onboard h1 { font-size: 1.7rem; line-height: 1.2; margin: 0 0 10px; letter-spacing: -0.02em; }
.onboard p.lead { color: var(--muted); font-size: 1.05rem; margin: 0 0 22px; }
.onboard .grow { flex: 1; }
.onboard .actions { display: grid; gap: 10px; margin-top: 24px; }
.big-input { font-size: 2rem; font-weight: 700; text-align: center; padding: 18px; }
.logo { width: 64px; height: 64px; border-radius: 20px; background: var(--primary); display: grid; place-items: center; margin-bottom: 22px; }
.logo svg { width: 34px; height: 34px; }

.focus-hint { text-align: center; color: var(--muted); font-size: 0.88rem; margin-top: 18px; }
.section-title { font-size: 1.4rem; margin: 10px 2px 4px; letter-spacing: -0.01em; }
.section-lead { color: var(--muted); margin: 0 2px 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- phase 2: calendar, subscriptions, payday ---------- */
.log-btn.alt { background: var(--primary-soft); color: var(--primary); box-shadow: none; }
.note-calm { background: var(--primary-soft); border-radius: var(--radius-sm); padding: 10px 12px; margin: 4px 0 8px; font-size: 0.95rem; }
.pay-card { border-color: var(--primary); background: var(--primary-soft); }
.pay-card .btn:not(.solid):not(.quiet) { background: var(--surface); }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-top: 8px; }
.cal-h { text-align: center; font-size: 0.75rem; color: var(--muted); font-weight: 650; padding: 4px 0; }
.cal-d { aspect-ratio: 1 / 1.05; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-weight: 600; font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.cal-d:active { background: var(--primary-soft); }
.cal-d.today { background: var(--primary); color: var(--primary-ink); }
.cal-d.sel { outline: 2px solid var(--primary); outline-offset: -2px; }
.dots { display: flex; gap: 3px; height: 6px; }
.dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.dot.pay { background: var(--primary); }
.cal-d.today .dot.pay { background: var(--primary-ink); }
.dot.bill { background: var(--amber); }
.dot.paid { background: var(--border); border: 1px solid var(--muted); }
.cal-key { display: flex; gap: 14px; justify-content: center; font-size: 0.8rem; color: var(--muted); margin-top: 10px; }
.cal-key .dot { margin-right: 4px; vertical-align: middle; }
.cal-detail { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
.icon-btn { font-size: 1.5rem; line-height: 1; }
.ded { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px; margin-bottom: 8px; display: grid; gap: 8px; background: var(--surface-2); }

/* ---------- phase 3 ---------- */
.add-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.add-grid .log-btn { padding: 15px 10px; font-size: 1rem; }
.fit-btn { width: 100%; text-align: center; padding: 14px 10px; margin-top: 10px; color: var(--muted); border: 1.5px dashed var(--border); border-radius: var(--radius); font-size: 0.95rem; }
.fit-btn b { color: var(--primary); }
.note-amber { background: var(--amber-soft); border-radius: var(--radius-sm); padding: 10px 12px; margin: 4px 0 8px; font-size: 0.95rem; }
.alert-card { border-color: var(--amber-soft); background: var(--surface); }
.alert-card h2 { color: var(--amber); }
.saved-card { text-align: center; background: var(--primary-soft); }
.saved-big { font-size: 2.6rem; font-weight: 750; margin: 0; color: var(--primary); letter-spacing: -0.02em; }
.progress.soft-over > span { background: var(--amber); }
.has-sheet .toast { bottom: auto; top: calc(14px + env(safe-area-inset-top)); }
.paywith { margin: 4px 0 0; } .paywith label { font-size: 0.85rem; color: var(--muted); margin-bottom: 4px; }

/* ---------- phase 4 ---------- */
.help-btn { font-weight: 750; font-size: 1.05rem; border: 1.5px solid var(--border); width: 36px; height: 36px; }
.chev { color: var(--muted); font-size: 1.4rem; }
.tour { position: fixed; inset: 0; z-index: 70; }
.tour-spot { position: fixed; border-radius: 18px; box-shadow: 0 0 0 9999px rgba(10, 15, 15, 0.6); transition: all 0.25s ease; pointer-events: none; }
.tour-bubble { position: fixed; left: 16px; right: 16px; max-width: 488px; margin: 0 auto; background: var(--surface); border-radius: 18px; padding: 16px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.tour-bubble p { margin: 0 0 12px; font-size: 1.05rem; }
.timer { text-align: center; font-size: 2rem; font-weight: 750; font-variant-numeric: tabular-nums; color: var(--primary); margin: 4px 0 8px; }
.check-list { padding-left: 20px; margin: 0 0 14px; }
.check-list li { padding: 10px 0; border-bottom: 1px solid var(--border); }
.check-list li label { font-weight: 600; }
.check-list input[type=checkbox] { width: auto; margin-right: 8px; transform: scale(1.2); }
.check-list .btn { padding: 6px 12px; min-height: 34px; margin-left: 6px; font-size: 0.9rem; }
.note-row { display: flex; gap: 10px; align-items: flex-start; flex: 1; }
.note-row input { width: auto; margin-top: 4px; transform: scale(1.25); }
.note-row.done span { text-decoration: line-through; color: var(--muted); }
textarea { resize: vertical; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.badge { text-align: center; padding: 10px 6px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); opacity: 0.55; }
.badge.got { opacity: 1; background: var(--primary-soft); border-color: transparent; }
.badge span { font-size: 1.5rem; display: block; }
.badge small { display: block; font-size: 0.72rem; line-height: 1.25; margin-top: 4px; color: var(--muted); }
.badge.got small { color: var(--text); }
.lock { position: fixed; inset: 0; z-index: 90; background: var(--bg); display: grid; place-items: center; padding: 24px; }
.lock-inner { width: 100%; max-width: 340px; text-align: center; }
.lock-inner .logo { margin: 0 auto 16px; }
.sheet .lock-inner { margin: 0 auto; }
.pin-dots { display: flex; gap: 14px; justify-content: center; margin: 18px 0; }
.pin-dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--primary); }
.pin-dots i.on { background: var(--primary); }
.pin-keys button { height: 62px; font-size: 1.5rem; }

/* ---------- phase 5 ---------- */
.pair-code { text-align: center; font-size: 2.6rem; font-weight: 750; letter-spacing: 0.12em; font-variant-numeric: tabular-nums; margin: 16px 0 8px; color: var(--primary); }
.tick { display: flex; gap: 10px; align-items: center; padding: 8px 0; font-weight: 500; }
.tick input { width: auto; transform: scale(1.2); }
.demo-banner { background: var(--amber-soft); }
.demo-banner a { color: var(--amber); font-weight: 700; white-space: nowrap; text-decoration: none; }


/* ---------- redesign: warm Today screen ---------- */
.top .eyebrow-date { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.top h1.greet { font-family: var(--serif); font-weight: 400; font-size: 1.85rem; letter-spacing: -0.01em; margin-top: 2px; }
.section-title, .onboard h1, .sheet h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; }
.hero2 { background: var(--hero); border: 1px solid var(--hero-border); border-radius: 26px; padding: 20px 18px 18px; margin: 10px 0 14px; box-shadow: var(--shadow); }
.hero2 .label { display: flex; align-items: center; gap: 8px; font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); font-weight: 700; margin: 0; }
.hero2 .label .mini-help { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--hero-border); display: inline-grid; place-items: center; font-size: 0.75rem; color: var(--muted); letter-spacing: 0; background: rgba(255,255,255,0.35); }
.big2 { font-family: var(--serif); font-weight: 400; font-size: calc(58px * var(--font-scale)); line-height: 1.05; letter-spacing: -0.02em; margin: 8px 0 6px; font-variant-numeric: lining-nums tabular-nums; color: var(--text); }
.big2 .cur { font-size: 0.5em; vertical-align: 0.62em; margin-right: 2px; font-weight: 500; }
.big2 .cents { color: var(--accent); }
.big2.soft { color: var(--text); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.pill2 { background: rgba(255, 255, 255, 0.72); border: 1px solid var(--hero-border); border-radius: 99px; padding: 6px 12px; font-size: 0.85rem; color: var(--text); font-weight: 600; white-space: nowrap; }
:root[data-theme='dark'] .pill2 { background: rgba(255, 255, 255, 0.06); }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .pill2 { background: rgba(255, 255, 255, 0.06); } }
.pill2 span { color: var(--muted); font-weight: 600; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; margin-right: 6px; }
.daybar { height: 10px; border-radius: 99px; background: rgba(122, 95, 192, 0.12); overflow: hidden; margin: 4px 0 6px; }
.daybar > span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #9a82dc, var(--primary)); transition: width 0.5s ease; }
.daybar-cap { font-size: 0.86rem; color: var(--muted); margin: 0 0 12px; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; }
.qchip { border-radius: 99px; padding: 10px 15px; font-weight: 600; font-size: 0.95rem; min-height: 44px; border: 1px solid transparent; }
.qchip:active { transform: scale(0.97); }
.qchip.more { background: rgba(255,255,255,0.6); border-color: var(--hero-border); color: var(--muted); }
.hero2 .link { padding: 8px 0 0; margin: 0; font-size: 0.92rem; }
.soft-note { background: rgba(255,255,255,0.6); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 0.92rem; margin: 6px 0 12px; color: var(--text); }
.cat-food { background: var(--c-food); color: var(--c-food-t); } .cat-groceries { background: var(--c-groceries); color: var(--c-groceries-t); }
.cat-transport { background: var(--c-transport); color: var(--c-transport-t); } .cat-shopping { background: var(--c-shopping); color: var(--c-shopping-t); }
.cat-fun { background: var(--c-fun); color: var(--c-fun-t); } .cat-home { background: var(--c-home); color: var(--c-home-t); }
.cat-health { background: var(--c-health); color: var(--c-health-t); } .cat-other { background: var(--c-other); color: var(--c-other-t); } .cat-later { background: var(--c-later); color: var(--c-later-t); }
.emoji.cat-food, .emoji.cat-groceries, .emoji.cat-transport, .emoji.cat-shopping, .emoji.cat-fun, .emoji.cat-home, .emoji.cat-health, .emoji.cat-other, .emoji.cat-later { border-color: transparent; }
.chip[data-cat].on { box-shadow: inset 0 0 0 2px currentColor; border-color: transparent; }
.runbars { display: flex; gap: 4px; align-items: stretch; height: 34px; margin: 10px 0 6px; }
.runbars i { flex: 1; border-radius: 6px; background: var(--accent-soft); }
.runbars i.past { background: rgba(115, 83, 179, 0.30); }
.runbars i.today { background: var(--accent); }
.runbars i.pay { background: var(--pay); }
.run-cap { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--muted); }
.card h2 { color: var(--accent); }
.log-btn { background: var(--primary); }
.step { border: 1px solid var(--hero-border); }
.add-choice { display: grid; gap: 10px; }
.add-choice button { display: flex; gap: 14px; align-items: center; text-align: left; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; background: var(--surface); }
.add-choice button b { display: block; font-size: 1.02rem; }
.add-choice button span.d { color: var(--muted); font-size: 0.88rem; }
.add-choice .emoji { width: 44px; height: 44px; font-size: 1.3rem; }
.top h1 { font-family: var(--serif); font-weight: 400; font-size: 1.5rem; }
.saved-big, .amount-display, .pair-code, .timer { font-family: var(--serif); }
:root[data-theme='dark'] .qchip.more { background: rgba(255,255,255,0.08); color: var(--text); }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .qchip.more { background: rgba(255,255,255,0.08); color: var(--text); } }

/* ---------- editorial look (v1.3) ---------- */
.saved-big, .amount-display, .pair-code, .timer, .big2, .top h1, .sheet h2, .onboard h1 { font-weight: 400; font-synthesis: style; }
.page-head { align-items: flex-start; padding-top: 14px; }
.page-head .eyebrow-date { color: var(--accent); }
.top h1.headline { font-family: var(--serif); font-weight: 400; font-size: calc(1.8rem * var(--font-scale)); line-height: 1.18; letter-spacing: -0.015em; margin: 6px 0 4px; text-wrap: balance; }
.subline { font-family: var(--serif); font-style: italic; color: var(--muted); margin: 0; font-size: 0.98rem; }
.card { border-radius: 22px; padding: 18px; border: 1px solid var(--border); box-shadow: 0 1px 2px rgba(60,40,90,0.04); }
.card h2 { font-size: 0.72rem; letter-spacing: 0.12em; font-weight: 700; }
.list .title { font-weight: 600; }
.serif-title { font-family: var(--serif); font-weight: 400 !important; font-size: 1.12rem; letter-spacing: -0.01em; white-space: normal !important; }
.helper { display: block; font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 0.9rem; margin-top: 3px; }
.tiles { display: grid; gap: 10px; margin: 14px 0; grid-template-columns: repeat(2, 1fr); }
.tiles.t3 { grid-template-columns: repeat(2, 1fr); }
.tiles.t3 .tile:last-child { grid-column: 1 / -1; }
.tiles.t1 { grid-template-columns: 1fr; }
@media (min-width: 560px) { .tiles.t3 { grid-template-columns: repeat(3, 1fr); } .tiles.t3 .tile:last-child { grid-column: auto; } }
.card .tiles { margin: 4px 0 12px; }
.tile { border-radius: 18px; padding: 14px 14px 13px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tile .tl { font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700; opacity: 0.9; }
.tile .tv { font-family: var(--serif); font-size: calc(1.45rem * var(--font-scale)); line-height: 1.15; color: var(--text); letter-spacing: -0.01em; font-variant-numeric: lining-nums; overflow-wrap: anywhere; }
.tile .tn { font-family: var(--serif); font-style: italic; font-size: 0.85rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile.violet { background: #efe9fb; color: #5b3f9e; }
.tile.mint { background: #e3f3ec; color: #24684f; }
.tile.peach { background: #fcebdc; color: #9a5521; }
.tile.sky { background: #e4edfa; color: #2f5f99; }
:root[data-theme='dark'] .tile.violet { background: #2a2440; color: #c9b7f5; }
:root[data-theme='dark'] .tile.mint { background: #1d3129; color: #9fdcbc; }
:root[data-theme='dark'] .tile.peach { background: #382a1f; color: #f2bb94; }
:root[data-theme='dark'] .tile.sky { background: #1f2a3b; color: #a8c8f2; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .tile.violet { background: #2a2440; color: #c9b7f5; }
  :root:not([data-theme='light']) .tile.mint { background: #1d3129; color: #9fdcbc; }
  :root:not([data-theme='light']) .tile.peach { background: #382a1f; color: #f2bb94; }
  :root:not([data-theme='light']) .tile.sky { background: #1f2a3b; color: #a8c8f2; }
}
.goal-row .item { align-items: center; gap: 14px; }
.ring { position: relative; width: 62px; height: 62px; flex: none; display: inline-grid; place-items: center; }
.ring svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ring .rt { fill: none; stroke: var(--accent-soft); stroke-width: 6; }
.ring .rf { fill: none; stroke: var(--accent); stroke-width: 6; stroke-linecap: round; transition: stroke-dasharray 0.6s ease; }
.ring.peach .rf { stroke: #d98a4e; } .ring.peach .rt { stroke: #fcebdc; }
.ring.done .rf { stroke: var(--pay); }
:root[data-theme='dark'] .ring.peach .rt { stroke: #382a1f; }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .ring.peach .rt { stroke: #382a1f; } }
.ring b { position: relative; font-family: var(--serif); font-weight: 400; font-size: 0.92rem; color: var(--text); }
.saved-card .saved-big { font-size: 2.6rem; }
.saved-card h2 { color: var(--accent); }
.list .amt { font-family: var(--serif); font-weight: 400; font-size: 1.02rem; font-variant-numeric: lining-nums tabular-nums; }
.day-head { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; }
.section-title { font-size: 1.4rem; margin: 22px 4px 6px; }
@media (prefers-reduced-motion: reduce) { .ring .rf { transition: none; } }
:root[data-motion='reduce'] .ring .rf { transition: none; }

/* ---------- month tabs (phone: a swipe row above the calendar) ---------- */
.month-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: -2px -4px 12px; padding: 2px 4px; scroll-snap-type: x proximity; }
.month-tabs::-webkit-scrollbar { display: none; }
.mt { flex: none; scroll-snap-align: start; border-radius: 10px; padding: 7px 11px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #4a4458; background: var(--mtc); min-height: 34px; }
.mt.on { background: var(--primary); color: var(--primary-ink); }
.mt.now:not(.on) { box-shadow: inset 0 0 0 1.5px var(--primary); }
.mt1 { --mtc: #f9dfe6; } .mt2 { --mtc: #fbe5d6; } .mt3 { --mtc: #fbefcf; } .mt4 { --mtc: #e7f2d6; } .mt5 { --mtc: #d8efe4; } .mt6 { --mtc: #d6ecef; }
.mt7 { --mtc: #dbe6fa; } .mt8 { --mtc: #e5defa; } .mt9 { --mtc: #f1dcf5; } .mt10 { --mtc: #f9dcea; } .mt11 { --mtc: #ece7df; } .mt12 { --mtc: #e1e4ec; }
:root[data-theme='dark'] .mt:not(.on) { color: #1f1b29; filter: saturate(0.9) brightness(0.86); }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .mt:not(.on) { color: #1f1b29; filter: saturate(0.9) brightness(0.86); } }
.cal-d .cl { display: none; }
.cols > * { break-inside: avoid; }
.dayblock { break-inside: avoid; }


/* ---------- the purple band (v1.4) ---------- */
.band { --bt: #ffffff; --bm: #ddd5f2; --bl: #cdc0f6;
  margin: 0 -16px 0; padding: calc(14px + env(safe-area-inset-top)) 18px 22px; color: var(--bt);
  background: radial-gradient(120% 140% at 85% 0%, #5a3fa0 0%, #33245c 48%, #1f1734 100%);
  border-radius: 0 0 28px 28px; position: relative; overflow: hidden; }
.band::after { content: ""; position: absolute; right: -140px; top: -170px; width: 460px; height: 460px; border-radius: 50%; border: 1px solid rgba(255,255,255,.07); box-shadow: 0 0 0 56px rgba(255,255,255,.022), 0 0 0 130px rgba(255,255,255,.016); pointer-events: none; }
.band-in { position: relative; z-index: 1; }
.band-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.band-eb { font-size: 0.7rem; letter-spacing: 0.15em; text-transform: uppercase; font-weight: 700; color: var(--bl); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.band .mini-help { width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); display: inline-grid; place-items: center; font-size: 0.72rem; color: var(--bm); letter-spacing: 0; }
.band .icon-btn { color: var(--bm); width: 40px; height: 40px; }
.band .icon-btn.on { background: rgba(255,255,255,.14); color: #fff; }
.band .help-btn { border: 1px solid rgba(255,255,255,.2); width: 34px; height: 34px; font-size: 0.85rem; }
.band .band-tools { gap: 4px; margin: -6px -8px 0 0; flex: none; }
.band h1.headline { font-family: var(--serif); font-weight: 400; font-size: calc(1.85rem * var(--font-scale)); line-height: 1.15; margin: 8px 0 4px; color: #fff; letter-spacing: -0.015em; text-wrap: balance; }
.band-sub { font-family: var(--serif); font-style: italic; color: var(--bm); margin: 0; font-size: 0.98rem; line-height: 1.45; }
.band .big2 { color: #fff; font-size: calc(64px * var(--font-scale)); margin: 10px 0 8px; }
.band .big2 .cur { color: var(--bl); }
.band .big2 .cents { color: var(--bl); }
.band .big2.soft { color: #fff; }
.big-unit { font-family: var(--sans); font-size: 0.24em; font-weight: 600; margin-left: 8px; color: var(--bm); letter-spacing: 0; }
.eb-date { flex-basis: 100%; color: var(--bm); letter-spacing: 0.1em; margin-bottom: 2px; }
.eb-sep { display: none; }
@media (min-width: 1000px) { .eb-date { flex-basis: auto; color: inherit; letter-spacing: inherit; margin: 0; } .eb-sep { display: inline; } }
.hero3 { display: flex; flex-direction: column; gap: 18px; }
.stats { display: flex; gap: 22px; margin-top: 16px; flex-wrap: wrap; }
.stats div { font-size: 0.75rem; color: #b5aacd; }
.stats b { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.2rem; color: #fff; margin-top: 3px; }
.h3-side .band-eb { margin-bottom: 10px; }
.band .quick { gap: 8px; }
.band .qchip { background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.14); }
.band .qchip.more { background: transparent; color: var(--bm); border-color: rgba(255,255,255,.18); }
.band .link { color: var(--bl); padding: 12px 0 0; margin: 0; font-size: 0.9rem; }
.band .tiles { margin: 18px 0 0; }
.band .tile { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.11); }
.band .tile .tv { color: #fff; } .band .tile .tn { color: var(--bm); }
.band .tile.violet .tl { color: #cdbdf7; } .band .tile.mint .tl { color: #9fe3c4; } .band .tile.peach .tl { color: #f6c39d; } .band .tile.sky .tl { color: #a9cbf6; }
.bn-cta { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px; border-radius: 999px; background: #c9f0de; color: #173d2f; font-weight: 700; font-size: 0.9rem; }
.bn-cta svg { width: 16px; height: 16px; }
.bn-ghost { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.2); color: #e8e2f7; font-weight: 500; font-size: 0.86rem; }
.bn-ghost svg { width: 15px; height: 15px; }
.bn-ghost .tog { width: 26px; height: 15px; border-radius: 8px; background: rgba(255,255,255,.22); position: relative; transition: background .2s; }
.bn-ghost .tog::after { content: ""; position: absolute; left: 2px; top: 2px; width: 11px; height: 11px; border-radius: 50%; background: #fff; transition: transform .2s; }
.bn-ghost.on .tog { background: #8fe0bd; } .bn-ghost.on .tog::after { transform: translateX(11px); }
:root[data-theme='dark'] .band, :root:not([data-theme='light']) .band { }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .band { background: radial-gradient(120% 140% at 85% 0%, #4a3488 0%, #2a1f4b 48%, #17112a 100%); } }
:root[data-theme='dark'] .band { background: radial-gradient(120% 140% at 85% 0%, #4a3488 0%, #2a1f4b 48%, #17112a 100%); }
.app-body { padding-top: 14px; }
.banner { margin-top: 12px; }

/* runway */
.runway .rw-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.runway .rw-head h2 { margin: 0; }
.rw-note { font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 0.9rem; }
.days { display: grid; grid-auto-flow: column; grid-auto-columns: 112px; gap: 8px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; padding-bottom: 2px; }
.days::-webkit-scrollbar { display: none; }
.day { scroll-snap-align: start; border-radius: 14px; padding: 10px 11px 11px; height: 138px; display: flex; flex-direction: column; justify-content: space-between; background: var(--surface-2); border: 1px solid var(--border); position: relative; overflow: hidden; }
.day > div:first-child, .day .amt { position: relative; z-index: 1; }
.day .d { font-size: 0.66rem; font-weight: 700; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }
.day .n { font-family: var(--serif); font-size: 1.3rem; color: var(--text); line-height: 1.2; }
.day .fill { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(180deg, rgba(115,83,179,.08), rgba(115,83,179,.17)); }
.day .amt { font-size: 0.74rem; color: var(--muted); line-height: 1.3; }
.day .tag { display: block; width: fit-content; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.68rem; font-weight: 600; border-radius: 6px; padding: 2px 6px; margin-top: 5px; background: #fcebdc; color: #9a5521; }
.day .tag.more { background: transparent; color: var(--muted); padding-left: 0; }
.day.past { opacity: 0.6; }
.day.today { background: #2a2140; border-color: #2a2140; }
.day.today .d { color: #bfaef0; } .day.today .n { color: #fff; } .day.today .amt { color: #e6defa; }
.day.today .fill { background: linear-gradient(180deg, rgba(185,162,243,.22), rgba(185,162,243,.45)); }
.day.gap { background: transparent; border-style: dashed; }
.day.pay { background: #e7f4ee; border-color: #cfe8dc; }
.day.pay .n { color: #1f5e47; } .day.pay .tag { background: #2f7a5f; color: #fff; } .day.pay .amt { color: #2f7a5f; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; font-size: 0.76rem; color: var(--muted); }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.lg-today { background: #2a2140; } .lg-day { background: #d9cdf3; } .lg-bill { background: #f6cfae; } .lg-pay { background: #2f7a5f; }
:root[data-theme='dark'] .day.today { background: #3a2d63; border-color: #4a3a7a; }
:root[data-theme='dark'] .day.pay { background: #1d3129; border-color: #2a4a3c; } :root[data-theme='dark'] .day.pay .n, :root[data-theme='dark'] .day.pay .amt { color: #9fdcbc; }
:root[data-theme='dark'] .day .tag:not(.more) { background: #382a1f; color: #f2bb94; } :root[data-theme='dark'] .day.pay .tag { background: #2f7a5f; color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .day.today { background: #3a2d63; border-color: #4a3a7a; }
  :root:not([data-theme='light']) .day.pay { background: #1d3129; border-color: #2a4a3c; } :root:not([data-theme='light']) .day.pay .n, :root:not([data-theme='light']) .day.pay .amt { color: #9fdcbc; }
  :root:not([data-theme='light']) .day .tag:not(.more) { background: #382a1f; color: #f2bb94; } :root:not([data-theme='light']) .day.pay .tag { background: #2f7a5f; color: #fff; } }
.mini-goal { margin: 10px 0 4px; } .mini-goal b { font-weight: 600; font-size: 0.92rem; } .mini-goal .progress { height: 6px; margin: 7px 0 0; }
.step { border: 1px solid var(--border); }
.step:not(.pay-card):not(.alert-card) { background: #fffaf2; border-color: #f3e3c9; }
.step:not(.pay-card):not(.alert-card) h2 { color: #9a5521; }
:root[data-theme='dark'] .step:not(.pay-card):not(.alert-card) { background: #241f1a; border-color: #3a3024; }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .step:not(.pay-card):not(.alert-card) { background: #241f1a; border-color: #3a3024; } }
.step .step-text { font-family: var(--serif); font-weight: 400; font-size: 1.18rem; line-height: 1.4; }

/* ---------- laptop layout ---------- */
.cols > * { break-inside: avoid; }
@media (min-width: 1000px) {
  :root { --side-w: 0px; }
  .nav { display: none; }
  .app { max-width: none; margin: 0; padding: 0 0 56px; }
  .band { margin: 0; border-radius: 0; padding: 20px max(56px, calc((100vw - 1240px) / 2)) 92px; }
  .band-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; position: relative; z-index: 2; margin-bottom: 34px; }
  .bn-brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 1.25rem; color: #fff; }
  .bn-logo { width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,.14); display: grid; place-items: center; }
  .bn-logo svg { width: 18px; height: 18px; }
  .bn-links { display: flex; gap: 2px; background: rgba(255,255,255,.07); padding: 4px; border-radius: 999px; border: 1px solid rgba(255,255,255,.1); }
  .bn-links button { padding: 8px 16px; border-radius: 999px; font-size: 0.86rem; font-weight: 500; color: #d8cff0; }
  .bn-links button:hover { color: #fff; background: rgba(255,255,255,.06); }
  .bn-links button.on { background: #fff; color: #2a1f45; font-weight: 600; }
  .bn-acts { display: flex; align-items: center; gap: 10px; }
  .band-eb { font-size: 0.7rem; }
  .band h1.headline { font-size: 2.6rem; margin-top: 10px; }
  .band-sub { font-size: 1.08rem; }
  .band .tiles { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; max-width: 980px; margin-top: 24px; }
  .band .tiles .tile:last-child { grid-column: auto; }
  .band .tile { padding: 16px 18px; } .band .tile .tv { font-size: 1.7rem; }
  .hero3 { flex-direction: row; justify-content: space-between; align-items: flex-end; gap: 48px; margin-top: 4px; }
  .h3-main { flex: 1; min-width: 0; }
  .h3-side { width: 380px; flex: none; padding-bottom: 6px; }
  .band .big2 { font-size: 7.2rem; margin: 6px 0 10px; line-height: 1; }
  .band .big2 .cur { font-size: 0.36em; vertical-align: 1.35em; }
  .stats { gap: 40px; margin-top: 22px; }
  .stats b { font-size: 1.5rem; }
  .app-body { max-width: calc(1240px + 112px); margin: -60px auto 0; padding: 0 56px; position: relative; z-index: 3; }
  .app-body > *:first-child { margin-top: 0; }
  .body-today .runway { box-shadow: 0 1px 2px rgba(30,20,60,.05), 0 18px 40px rgba(30,20,60,.10); border: 0; }
  .days { grid-auto-flow: row; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); grid-auto-columns: auto; overflow: visible; }
  .days { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  .day { height: 150px; padding: 12px 13px; }
  .day .n { font-size: 1.45rem; }
  .card { padding: 22px 24px; margin: 0 0 20px; }
  .app-body > .card, .app-body > .tiles { margin-bottom: 20px; }
  .cols { columns: 2; column-gap: 20px; }
  .cols > .card, .cols > section, .cols > .fit-btn { display: block; width: 100%; break-inside: avoid; margin-top: 0; margin-bottom: 20px; }
  .cols > .log-btn { display: flex; margin-bottom: 20px; }
  .cols-today { columns: 3; }
  .cols-today > .log-btn { display: none; }
  .cols-goals { columns: 3; }
  .cols-notes { columns: 1; max-width: 760px; }
  .body-money > .cols:first-child .card, .body-bills > .cols:first-child > .card:first-child { }
  .app-body > :first-child.cols > :first-child, .app-body > .cols:first-child > * { }
  .app-body > .cols:first-child .card, .app-body > .card:first-child { box-shadow: 0 1px 2px rgba(30,20,60,.05), 0 18px 40px rgba(30,20,60,.10); border-color: transparent; }
  .fit-btn { margin: 0 0 20px; }
  .section-title.span-all { margin: 30px 4px 12px; }
  .cal { gap: 6px; }
  .cal-d { aspect-ratio: auto; min-height: 78px; align-items: flex-start; justify-content: flex-start; padding: 7px 8px; background: var(--surface-2); border: 1px solid var(--border); font-size: 0.85rem; }
  .cal-d:hover { border-color: var(--accent); }
  .cal-d.today { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 2px var(--primary); }
  .cal-d.sel { box-shadow: inset 0 0 0 2px var(--accent); }
  .cal-d .dots { display: none; }
  .cal-d .cl { display: flex; flex-direction: column; gap: 3px; width: 100%; margin-top: 4px; }
  .lab { font-style: normal; font-size: 0.7rem; font-weight: 600; border-radius: 6px; padding: 2px 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
  .lab.pay { background: #dcefe6; color: #22634b; } .lab.bill { background: #e9e2fa; color: #5b3f9e; } .lab.paid { background: var(--c-other); color: var(--muted); text-decoration: line-through; } .lab.more { color: var(--muted); padding-left: 2px; }
  :root[data-theme='dark'] .lab.pay { background: #1d3129; color: #9fdcbc; } :root[data-theme='dark'] .lab.bill { background: #2a2440; color: #c9b7f5; }
  .sheet { bottom: 24px; border-radius: 24px; max-height: calc(100vh - 48px); }
  .btn { min-height: 38px; padding: 8px 16px; font-size: 0.88rem; }
  .btn.solid { background: #2a1f45; color: #fff; }
  :root[data-theme='dark'] .btn.solid { background: #b9a2f3; color: #1c1530; }
  .btn.block { padding: 12px; font-size: 0.92rem; }
  .list li { padding-top: 11px; padding-bottom: 11px; }
  .list .title { font-size: 0.94rem; }
  .list .meta { font-size: 0.8rem; }
  .emoji { width: 34px; height: 34px; border-radius: 10px; font-size: 1rem; }
  .card h2 { margin-bottom: 12px; }
  .log-btn { font-size: 1rem; padding: 14px; }
  .field label { font-size: 0.88rem; }
  input, select, textarea { font-size: 0.92rem; }
  .toast { bottom: 24px; }
}

.nav button { font-size: 0.7rem; }
@media (min-width: 1000px) { .cols-debt { columns: 2; } }

/* ---------- month planner ---------- */
.plan .month-tabs { margin-top: 6px; }
.plan-grid { display: grid; gap: 18px; }
.plan-h { font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700; color: var(--muted); margin-bottom: 10px; }
.plan-sum { display: flex; gap: 16px; align-items: center; }
.plan-ring { position: relative; width: 108px; height: 108px; flex: none; }
.plan-ring .donut { width: 100%; height: 100%; }
.plan-ring > div { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.plan-ring b { font-family: var(--serif); font-weight: 400; font-size: 1.35rem; }
.plan-ring small { font-size: 0.7rem; color: var(--muted); }
.plan-tiles { flex: 1; display: grid; gap: 8px; min-width: 0; }
.pt { border-radius: 14px; padding: 9px 12px; display: grid; grid-template-columns: 1fr auto; align-items: baseline; column-gap: 8px; }
.pt small { font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700; }
.pt b { font-family: var(--serif); font-weight: 400; font-size: 1.15rem; color: var(--text); }
.pt i { grid-column: 1 / -1; font-family: var(--serif); font-size: 0.8rem; color: var(--muted); }
.pt.in { background: #e3f3ec; } .pt.in small { color: #24684f; }
.pt.out { background: #fcebdc; } .pt.out small { color: #9a5521; }
.pt.kept { background: #efe9fb; } .pt.kept small { color: #5b3f9e; }
:root[data-theme='dark'] .pt.in { background: #1d3129; } :root[data-theme='dark'] .pt.out { background: #382a1f; } :root[data-theme='dark'] .pt.kept { background: #2a2440; }
:root[data-theme='dark'] .pt.in small { color: #9fdcbc; } :root[data-theme='dark'] .pt.out small { color: #f2bb94; } :root[data-theme='dark'] .pt.kept small { color: #c9b7f5; }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .pt.in { background: #1d3129; } :root:not([data-theme='light']) .pt.out { background: #382a1f; } :root:not([data-theme='light']) .pt.kept { background: #2a2440; }
  :root:not([data-theme='light']) .pt.in small { color: #9fdcbc; } :root:not([data-theme='light']) .pt.out small { color: #f2bb94; } :root:not([data-theme='light']) .pt.kept small { color: #c9b7f5; } }
.hm-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.hm-grid .hd { font-size: 0.66rem; font-weight: 700; color: var(--muted); text-align: center; }
.hm { aspect-ratio: 1; border-radius: 8px; font-size: 0.74rem; font-weight: 600; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); display: grid; place-items: center; min-height: 30px; }
.hm.l1 { background: #efe9fb; border-color: #e2d8f7; } .hm.l2 { background: #d9cbf5; border-color: #cbb9f0; } .hm.l3 { background: #b9a2f3; border-color: #a98fe9; color: #231e31; } .hm.l4 { background: #7353b3; border-color: #7353b3; color: #fff; }
.hm.fut { opacity: 0.55; }
.hm.today { box-shadow: inset 0 0 0 2px #2f9a72; }
.hm.sel { outline: 2px solid var(--accent); outline-offset: 1px; }
.hm-key { display: flex; align-items: center; gap: 4px; justify-content: flex-end; margin-top: 8px; font-size: 0.7rem; color: var(--muted); }
.hm-key i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.hm-key .l1 { background: #efe9fb; } .hm-key .l2 { background: #d9cbf5; } .hm-key .l3 { background: #b9a2f3; } .hm-key .l4 { background: #7353b3; }
.hm-day { margin-top: 10px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); }
.hm-day .spread { padding: 6px 0 0; }
:root[data-theme='dark'] .hm.l1 { background: #2a2440; border-color: #3a3157; color: var(--text); } :root[data-theme='dark'] .hm.l2 { background: #3d3270; border-color: #4a3d85; color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .hm.l1 { background: #2a2440; border-color: #3a3157; } :root:not([data-theme='light']) .hm.l2 { background: #3d3270; border-color: #4a3d85; color: #fff; } }
.plan-ev { list-style: none; margin: 0; padding: 0; }
.plan-ev li { display: grid; grid-template-columns: 58px 1fr auto; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--border); }
.plan-ev li:last-child { border-bottom: 0; }
.plan-ev li.fut { opacity: 0.75; }
.plan-ev .pd { font-size: 0.78rem; color: var(--muted); font-weight: 600; }
.plan-ev .pn { font-weight: 600; font-size: 0.92rem; min-width: 0; }
.plan-ev .pn small { display: block; font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--muted); font-size: 0.8rem; }
.plan-ev .pa { font-family: var(--serif); font-size: 1rem; white-space: nowrap; }
.plan-ev .pa.in { color: #2f7a5f; }
:root[data-theme='dark'] .plan-ev .pa.in { color: #9fdcbc; }
@media (min-width: 1000px) {
  .plan-grid { grid-template-columns: 1.05fr 1fr 1.1fr; gap: 26px; align-items: start; }
  .plan-sum { flex-direction: column; align-items: stretch; }
  .plan-ring { align-self: center; width: 130px; height: 130px; }
  .hm { min-height: 34px; }
}
