/* SectorZero Finance: the SectorZero look. Near-black panels, hairline borders, Inter, one rose
   accent used sparingly, tabular numbers. Calm by default; colour only where it means something. */
:root {
  --bg: #0b0c10;
  --bg2: #15171d;
  --card: #111318;
  --soft: #191c23;
  --fg: #eceef2;
  --mut: #8d94a1;
  --line: #22252e;
  --line2: #2d313c;
  --acc: #f43f5e;
  --acc2: #ec4899;
  --acc-soft: rgba(244, 63, 94, 0.12);
  --acc-ink: #fda4af;
  --good: #4ade80;
  --bad: #fb7185;
  --warn: #fbbf24;
  --ice: #7dd3fc;
  --r: 16px;
  --rs: 10px;
  --nav: 64px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f7f9;
    --bg2: #eef0f3;
    --card: #ffffff;
    --soft: #f3f4f6;
    --fg: #0f1115;
    --mut: #5f6672;
    --line: #e4e6eb;
    --line2: #d6d9e0;
    --acc: #e11d48;
    --acc2: #db2777;
    --acc-soft: rgba(225, 29, 72, 0.08);
    --acc-ink: #be123c;
    --good: #15803d;
    --bad: #dc2626;
    --warn: #b45309;
    --ice: #0284c7;
    color-scheme: light;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 15px/1.5 Inter, system-ui, -apple-system, 'Segoe UI', sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; font-feature-settings: 'cv11', 'ss01'; }
body.locked { overflow: hidden; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.02em; }
h1 { font-size: 24px; }
h2 { font-size: 15px; display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
h3 { font-size: 13px; font-weight: 600; color: var(--mut); margin: 4px 0 8px; display: flex; justify-content: space-between; gap: 8px; text-transform: none; }
p { margin: 0 0 8px; }
a { color: var(--acc-ink); }
button, input, select { font: inherit; color: inherit; }
input, select { width: 100%; height: 44px; padding: 0 13px; border: 1px solid var(--line2); border-radius: var(--rs); background: var(--bg); outline: none; transition: border-color 0.12s; }
input:focus, select:focus { border-color: var(--acc); }
input[type='date'], input[type='time'] { width: auto; height: 38px; padding: 0 10px; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.ico { flex: none; display: block; }
.muted { color: var(--mut); }
.small { font-size: 13px; }
.good { color: var(--good); }
.bad, .neg { color: var(--bad); }
.grow { flex: 1; min-width: 0; }
.center { display: block; text-align: center; margin: 12px auto; }
.pad { margin: 4px 2px; }
.dim { opacity: 0.5; }
.money, .big, .tile b, .split3 b, .amt-show, .ob-big, .nw-split b, .ring b, .donut-c b, .sumline, .row b { font-variant-numeric: tabular-nums; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 16px; border: 1px solid var(--line2); border-radius: var(--rs); background: var(--soft); font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; color: var(--fg); transition: background 0.12s, border-color 0.12s, transform 0.06s; white-space: nowrap; }
.btn:hover { border-color: var(--mut); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.btn.primary { background: linear-gradient(90deg, var(--acc), var(--acc2)); color: #fff; border-color: transparent; }
.btn.primary:hover { filter: brightness(1.07); }
.btn.good { background: var(--good); color: #052e16; border-color: transparent; }
.btn.danger { color: var(--bad); background: transparent; }
.btn.danger.grow { background: var(--bad); color: #fff; border-color: transparent; }
.btn.small { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn.xl { height: 50px; font-size: 15px; padding: 0 20px; }
.btn.wide { width: 100%; }
.btn.on { border-color: var(--acc); color: var(--acc-ink); }
.link { background: none; border: 0; color: var(--acc-ink); font-weight: 500; cursor: pointer; padding: 4px; font-size: 13px; }
.icon { width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--line); background: var(--soft); cursor: pointer; display: inline-grid; place-items: center; flex: none; color: var(--fg); }
.icon:disabled { opacity: 0.3; }

/* layout */
.splash { min-height: 100vh; display: grid; place-items: center; }
.splash .logo { animation: breathe 1.4s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: 0.45; } }
.app { min-height: 100vh; }
main { max-width: 720px; margin: 0 auto; padding: 0 16px calc(var(--nav) + 28px + env(safe-area-inset-bottom)); }
.page { padding-top: 20px; display: flex; flex-direction: column; gap: 12px; animation: fade 0.18s ease; }
@keyframes fade { from { opacity: 0; } }
.ph { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; }
.card { background: var(--card); border-radius: var(--r); padding: 16px; border: 1px solid var(--line); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .grid2 { grid-template-columns: 1fr; } }

/* nav: bottom bar on phones, sidebar on wide screens */
.nav { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; height: calc(var(--nav) + env(safe-area-inset-bottom)); padding: 0 6px env(safe-area-inset-bottom); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(16px); -webkit-backdrop-filter: saturate(1.4) blur(16px); border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-around; }
.nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; text-decoration: none; color: var(--mut); font-size: 11px; padding: 6px 4px; border-radius: 10px; min-width: 54px; transition: color 0.12s; }
.nav a b { font-weight: 500; }
.nav a.on { color: var(--fg); }
.nav a.on .ico { color: var(--acc); }
.fab { width: 48px; height: 48px; border-radius: 14px; border: 0; background: linear-gradient(135deg, var(--acc), var(--acc2)); color: #fff; cursor: pointer; flex: none; display: grid; place-items: center; box-shadow: 0 6px 20px rgba(244, 63, 94, 0.3); transition: transform 0.08s; }
.fab:active { transform: scale(0.94); }
.fab span, .fab kbd { display: none; }
.brand, .side-only { display: none !important; }
@media (min-width: 960px) {
  .nav { top: 0; right: auto; width: 232px; height: 100vh; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 2px; padding: 20px 12px; border-top: 0; border-right: 1px solid var(--line); background: var(--bg); }
  .nav a { flex-direction: row; gap: 12px; font-size: 14px; padding: 9px 12px; }
  .nav a:hover { background: var(--soft); color: var(--fg); }
  .nav a.on { background: var(--soft); }
  .brand { order: -2; display: flex !important; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; letter-spacing: -0.02em; padding: 2px 10px 18px; }
  .brand span { color: var(--mut); font-weight: 500; }
  .side-only { display: flex !important; }
  .fab { order: -1; width: 100%; height: 42px; margin: 0 0 14px; border-radius: var(--rs); display: flex; gap: 8px; justify-content: center; font-weight: 600; font-size: 14px; box-shadow: none; }
  .fab .ico { width: 18px; height: 18px; }
  .fab span { display: inline; }
  .fab kbd { display: inline; font: 600 11px Inter, sans-serif; padding: 1px 6px; border-radius: 5px; background: rgba(255, 255, 255, 0.2); }
  .sync { margin-top: auto; align-items: center; gap: 8px; font-size: 12px; padding: 8px 12px; color: var(--mut); text-decoration: none; }
  .sync i { width: 7px; height: 7px; border-radius: 50%; background: var(--warn); }
  .sync.ok i { background: var(--good); }
  .sync.bad i { background: var(--bad); }
  main { margin-left: max(256px, calc(50vw - 360px + 116px)); padding-bottom: 48px; }
}

/* home */
.hello { display: flex; justify-content: space-between; align-items: flex-end; }
.hello h1 { font-size: 22px; }
.hello p { margin: 0; font-size: 13px; }
.streak { display: flex; align-items: center; gap: 5px; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--mut); font-size: 13px; }
.streak b { color: var(--fg); font-weight: 600; }
.streak.lit .ico { color: #fb923c; }
.hero { display: flex; align-items: center; gap: 20px; cursor: pointer; padding: 20px; background: radial-gradient(600px 200px at 0% 0%, var(--acc-soft), transparent 70%), var(--card); transition: border-color 0.12s; }
.hero:hover { border-color: var(--line2); }
.hero-t { flex: 1; min-width: 0; }
.hero-t p { margin: 0; }
.big { font-size: 34px; font-weight: 600; letter-spacing: -0.035em; line-height: 1.1; margin: 4px 0; }
.quick { display: flex; gap: 8px; }
.quick .btn.xl:not(.primary) { flex: none; }
.banner { display: flex; align-items: center; gap: 12px; cursor: pointer; padding: 14px 16px; }
.banner > .ico { color: var(--mut); }
.banner p { margin: 0; flex: 1; font-size: 14px; }
.banner.ok { border-color: color-mix(in srgb, var(--ice) 35%, var(--line)); }
.banner.ok > .ico:first-child { color: var(--ice); }
.tips { display: flex; flex-direction: column; gap: 6px; }
.tip { padding: 11px 14px; border-radius: var(--rs); background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--mut); font-size: 14px; margin: 6px 0 0; }
.tips .tip { margin: 0; }
.tip.warn { border-left-color: var(--warn); }
.tip.good { border-left-color: var(--good); }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 640px) { .tiles:not(.two) { grid-template-columns: repeat(4, 1fr); } }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px; display: flex; flex-direction: column; gap: 2px; text-align: left; cursor: pointer; min-width: 0; transition: border-color 0.12s; }
.tile:hover { border-color: var(--line2); }
div.tile { cursor: default; }
.tile span { color: var(--mut); font-size: 12px; font-weight: 500; }
.tile b { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile em { font-style: normal; font-size: 12px; color: var(--mut); }

/* rows */
.row { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border: 0; border-bottom: 1px solid var(--line); background: none; width: 100%; text-align: left; cursor: pointer; }
.row:last-child { border-bottom: 0; }
div.row { cursor: default; }
button.row:hover { background: var(--soft); border-radius: 10px; }
.row-main { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; }
.row .grow > b, .row-main .grow > b { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .grow > span, .row-main .grow > span { display: block; font-size: 12px; color: var(--mut); }
.row > b, .row-main > b { font-weight: 600; }
.row-t { display: flex; justify-content: space-between; gap: 8px; }
.row-t b { font-weight: 500; }
.dot { width: 38px; height: 38px; flex: none; display: grid; place-items: center; font-size: 18px; border-radius: 11px; background: color-mix(in srgb, var(--cc, var(--mut)) 14%, var(--soft)); color: var(--mut); }
.dot.ok { color: var(--good); }
.dot.num { font-weight: 600; font-size: 13px; }
.money { font-weight: 600; white-space: nowrap; }
.money.income { color: var(--good); }
.money.transfer { color: var(--mut); }
.tag { font-style: normal; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 6px; flex: none; }
.tag.imp { color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); }
.mini { height: 6px; border-radius: 99px; background: var(--soft); overflow: hidden; margin: 6px 0 4px; }
.mini i { display: block; height: 100%; border-radius: 99px; transition: width 0.4s; }
.link-card { border: 1px solid var(--line) !important; border-radius: var(--r) !important; padding: 12px 14px; }
.link-card:hover { background: var(--card) !important; border-color: var(--line2) !important; }
.day { padding: 10px 14px; }
.day h3 { margin: 4px 0 2px; }

/* regret check-in */
.regret { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--line); }
.regret:last-child { border-bottom: 0; }
.regret-t { display: flex; gap: 12px; align-items: center; min-width: 0; }
.regret-t span.muted { display: block; font-size: 12px; }
.regret-t b { font-weight: 500; }
.regret-b { display: flex; gap: 6px; align-items: center; }
.regret-b button:not(.link) { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line2); background: var(--soft); font-size: 19px; cursor: pointer; transition: border-color 0.12s, transform 0.08s; }
.regret-b button:not(.link):hover { border-color: var(--acc); transform: translateY(-1px); }

/* inputs */
.fld { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; }
.fld > span { font-weight: 500; font-size: 13px; color: var(--mut); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip { height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line2); background: var(--soft); font-size: 13px; font-weight: 500; cursor: pointer; transition: 0.12s; white-space: nowrap; }
.chip:hover { border-color: var(--mut); }
.chip.on { background: var(--acc-soft); border-color: var(--acc); color: var(--acc-ink); }
.seg { display: flex; background: var(--soft); border: 1px solid var(--line); border-radius: 11px; padding: 3px; gap: 2px; }
.seg button { flex: 1 1 0; min-width: 0; height: 34px; border: 0; background: none; border-radius: 8px; font-weight: 500; font-size: 14px; cursor: pointer; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 8px; }
.seg button[aria-pressed='true'] { background: var(--card); color: var(--fg); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); }
.seg.sm { display: inline-flex; padding: 2px; }
.seg.sm button { height: 28px; font-size: 13px; flex: none; }
.switch { display: flex; align-items: center; gap: 12px; margin: 12px 0; cursor: pointer; font-size: 14px; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch span { width: 40px; height: 24px; border-radius: 99px; background: var(--line2); position: relative; flex: none; transition: 0.18s; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: 0.18s; }
.switch input:checked + span { background: var(--acc); }
.switch input:checked + span::after { left: 19px; }
.switch input:focus-visible + span { outline: 2px solid var(--acc); outline-offset: 2px; }
.emoji-in { font-size: 22px; text-align: center; max-width: 80px; }
.searchbar { display: flex; gap: 8px; }
.sumline { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; font-weight: 500; font-size: 13px; padding: 0 2px; color: var(--mut); }
.sumline .bad, .sumline .good { font-weight: 600; }
.mswitch { display: flex; align-items: center; justify-content: space-between; }
.mswitch b { font-size: 15px; font-weight: 600; }
.btnrow { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.sw { width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; box-shadow: inset 0 0 0 2px var(--card); }
.sw.on { border-color: var(--fg); }
.catlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 4px; margin-top: 10px; }
.catrow { display: flex; align-items: center; gap: 10px; padding: 6px; border: 0; background: none; border-radius: 10px; cursor: pointer; text-align: left; }
.catrow:hover { background: var(--soft); }
.catrow b { flex: 1; min-width: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.catrow em { font-style: normal; font-size: 12px; }
.catrow .dot { width: 32px; height: 32px; font-size: 16px; }
.danger-zone { border-color: color-mix(in srgb, var(--bad) 30%, var(--line)); }
.empty { text-align: center; padding: 28px 12px; }
.empty-e { font-size: 30px; margin-bottom: 8px; opacity: 0.8; }
.empty b { font-size: 15px; font-weight: 600; display: block; margin-bottom: 4px; }
.empty p { color: var(--mut); max-width: 340px; margin: 0 auto; font-size: 14px; }

/* sheet */
.sheet-bg { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, 0.55); display: flex; align-items: flex-end; justify-content: center; animation: bgin 0.16s; }
@keyframes bgin { from { opacity: 0; } }
.sheet { width: 100%; max-width: 520px; max-height: 92vh; background: var(--card); border: 1px solid var(--line); border-bottom: 0; border-radius: 20px 20px 0 0; display: flex; flex-direction: column; animation: up 0.22s cubic-bezier(0.2, 0.8, 0.2, 1); padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.35); }
@keyframes up { from { transform: translateY(24px); opacity: 0; } }
.sheet-h { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 4px; font-size: 16px; }
.sheet-h b { font-weight: 600; }
.sheet-b { overflow-y: auto; padding: 4px 16px 16px; overscroll-behavior: contain; }
@media (min-width: 700px) { .sheet-bg { align-items: center; } .sheet { border-radius: 20px; border-bottom: 1px solid var(--line); } }
.add-act { display: flex; gap: 8px; margin-top: 14px; position: sticky; bottom: 0; background: var(--card); padding-top: 8px; }

/* quick add */
.add { display: flex; flex-direction: column; gap: 10px; }
.amt-show { text-align: center; font-size: 46px; font-weight: 600; letter-spacing: -0.04em; padding: 4px 0 0; color: var(--fg); }
.amt-show span { font-size: 24px; color: var(--mut); margin-right: 4px; vertical-align: 0.45em; }
.amt-show.income { color: var(--good); }
.amt-show.transfer { color: var(--ice); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.keypad button { height: 50px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); font-size: 20px; font-weight: 500; cursor: pointer; transition: background 0.08s; font-variant-numeric: tabular-nums; }
.keypad button:active { background: var(--line2); }
@media (min-height: 860px) { .keypad button { height: 56px; } }
.cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
@media (min-width: 480px) { .cats { grid-template-columns: repeat(5, 1fr); } }
.cat { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 2px 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--soft); cursor: pointer; position: relative; transition: border-color 0.1s, background 0.1s; }
.cat:hover { border-color: var(--line2); }
.cat span { font-size: 21px; }
.cat b { font-size: 11px; font-weight: 500; color: var(--mut); line-height: 1.2; text-align: center; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cat.on { border-color: var(--cc); background: color-mix(in srgb, var(--cc) 16%, var(--soft)); }
.cat.on b { color: var(--fg); }
.cat.danger::after { content: ''; position: absolute; top: 6px; right: 6px; width: 5px; height: 5px; border-radius: 50%; background: var(--warn); }
.add-row { display: flex; flex-direction: column; gap: 6px; }
.add-row label { font-weight: 500; font-size: 13px; color: var(--mut); }
.nudge { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--ice) 8%, var(--card)); border: 1px solid color-mix(in srgb, var(--ice) 30%, var(--line)); animation: fade 0.2s; }
.nudge > .ico { color: var(--ice); }
.nudge p { margin: 0; font-size: 13px; flex: 1; }
.nudge b { font-weight: 600; }
.more { align-self: flex-start; }

/* charts */
.ring { border-radius: 50%; background: conic-gradient(var(--c) var(--p), var(--soft) 0); display: grid; place-items: center; flex: none; }
.ring > div { width: calc(100% - 10px); height: calc(100% - 10px); border-radius: 50%; background: var(--card); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15; }
.ring b { font-size: 18px; font-weight: 600; }
.ring span { font-size: 11px; color: var(--mut); }
.ring .e { font-size: 20px; color: inherit; }
.donut { position: relative; flex: none; }
.donut svg { width: 100%; height: 100%; }
.donut-c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut-c b { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
.donut-c span { font-size: 11px; color: var(--mut); }
.donut-wrap { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; justify-content: center; padding: 4px 0; }
.legend { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 7px; font-size: 13px; }
.legend li { display: flex; align-items: center; gap: 8px; }
.legend i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.legend b { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }
.bars { display: flex; align-items: flex-end; gap: 3px; position: relative; padding-bottom: 18px; }
.bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; min-width: 0; }
.bar i { display: block; width: 100%; max-width: 22px; border-radius: 4px 4px 1px 1px; transition: height 0.4s; opacity: 0.85; }
.bar span { position: absolute; bottom: -18px; font-size: 10px; color: var(--mut); white-space: nowrap; }
.bars-mark { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--mut); font-style: normal; pointer-events: none; }
.bars-mark span { position: absolute; right: 0; top: -18px; font-size: 10px; color: var(--mut); background: var(--card); padding: 0 4px; }
.heat { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.heat-h { text-align: center; font-size: 11px; color: var(--mut); font-weight: 500; }
.heat-c { aspect-ratio: 1; border: 0; border-radius: 7px; background: var(--soft); font-size: 12px; font-weight: 500; cursor: pointer; position: relative; color: var(--mut); font-variant-numeric: tabular-nums; }
.heat-c[style] { background: color-mix(in srgb, var(--acc) calc(var(--a) * 85%), var(--soft)); color: var(--fg); }
.heat-c.now { box-shadow: inset 0 0 0 1.5px var(--fg); }
.heat-c.free::after { content: ''; position: absolute; width: 4px; height: 4px; border-radius: 50%; background: var(--good); right: 4px; bottom: 4px; }
.picked { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); animation: fade 0.2s; }
.split3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 10px; }
.split3 > div { display: flex; flex-direction: column; min-width: 0; }
.split3 span { font-size: 12px; }
.split3 b { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; }
.split3 em { font-style: normal; font-size: 12px; color: var(--mut); }
.stack { display: flex; height: 8px; border-radius: 99px; overflow: hidden; background: var(--soft); gap: 2px; }
.stack i { display: block; background: var(--line2); }
.stack i.need { background: #60a5fa; }
.stack i.want { background: var(--acc2); }
.key { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 12px; color: var(--mut); margin: 10px 0 0; }
.key i { width: 8px; height: 8px; border-radius: 2px; margin-left: 8px; }
.key i:first-child { margin-left: 0; }
.trend { display: flex; gap: 6px; height: 150px; }
.trend-m { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; border: 0; background: none; cursor: pointer; border-radius: 10px; padding: 6px 0 4px; min-width: 0; }
.trend-m:hover { background: var(--soft); }
.trend-m.on { background: var(--soft); box-shadow: inset 0 0 0 1px var(--line2); }
.trend-m span { font-size: 11px; font-weight: 500; color: var(--mut); }
.trend-b { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; }
.trend-b i { width: 32%; max-width: 14px; border-radius: 3px 3px 1px 1px; display: flex; flex-direction: column; overflow: hidden; }
.trend-b .inc { background: color-mix(in srgb, var(--good) 65%, transparent); }
.trend-b .exp { background: color-mix(in srgb, var(--acc) 45%, transparent); }
.trend-b .exp em { display: block; background: var(--acc); }
.nw { display: flex; flex-direction: column; gap: 12px; }
.nw > div:first-child { display: flex; flex-direction: column; }
.nw-split { display: grid; grid-template-columns: 1fr 1fr; }
.nw-split div { display: flex; flex-direction: column; font-size: 13px; }
.nw-split b { font-size: 18px; font-weight: 600; }
.nw-bar { height: 6px; border-radius: 99px; background: color-mix(in srgb, var(--bad) 45%, var(--soft)); overflow: hidden; }
.nw-bar i { display: block; height: 100%; background: var(--good); }

/* goals and wishlist */
.goal { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.goal:last-child { border-bottom: 0; }
.goal .grow > b { font-weight: 500; }
.goal .grow > span { display: block; font-size: 12px; color: var(--mut); }
.cool { cursor: default; background: radial-gradient(600px 200px at 0% 0%, color-mix(in srgb, var(--ice) 10%, transparent), transparent 70%), var(--card); }
.wish { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.wish:last-child { border-bottom: 0; }
.wish .grow > b { font-weight: 500; }
.wish .grow > span { display: block; font-size: 12px; color: var(--mut); }
.wish.ready p { margin: 4px 0 0; }
.wish-b { display: flex; gap: 8px; flex-wrap: wrap; }

/* toasts and confetti */
.toasts { position: fixed; z-index: 80; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav) + 16px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; width: min(420px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; justify-content: space-between; background: var(--fg); color: var(--bg); padding: 11px 14px; border-radius: 12px; font-size: 14px; font-weight: 500; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35); animation: up 0.2s; }
.toast.bad { background: var(--bad); color: #fff; }
.toast button { background: none; border: 0; color: var(--acc); font-weight: 600; cursor: pointer; padding: 4px 6px; }
@media (min-width: 960px) { .toasts { bottom: 24px; left: calc(50% + 116px); } }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 90; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 6px; height: 10px; border-radius: 1px; animation: fall linear forwards; }
@keyframes fall { to { top: 105vh; transform: rotate(540deg) translateX(30px); } }

/* sign in */
.login { min-height: 100vh; display: flex; flex-direction: column; background: radial-gradient(1200px 500px at 50% -200px, rgba(244, 63, 94, 0.13), transparent), var(--bg); }
.login-top { display: flex; align-items: center; gap: 10px; padding: 22px 24px; font-weight: 600; font-size: 17px; letter-spacing: -0.02em; }
.login-top b { color: var(--mut); font-weight: 500; }
.login-card { max-width: 460px; width: 100%; margin: 4vh auto 40px; padding: 0 16px; display: flex; flex-direction: column; gap: 14px; }
.login h1 { font-size: 32px; line-height: 1.15; letter-spacing: -0.035em; }
.lead { font-size: 15px; color: var(--mut); }
.perks { list-style: none; padding: 0; margin: 4px 0 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.perks li { display: flex; gap: 10px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.perks .ico { color: var(--acc); margin-top: 1px; }
.perks b { display: block; font-size: 13px; font-weight: 600; }
.perks span { font-size: 12px; color: var(--mut); }
@media (max-width: 380px) { .perks { grid-template-columns: 1fr; } }
.err { margin: 0; padding: 10px 12px; border-radius: 10px; background: rgba(248, 113, 113, 0.12); color: #fca5a5; font-size: 14px; }

/* onboarding */
.ob { min-height: 100vh; max-width: 540px; margin: 0 auto; padding: 16px 16px calc(20px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 18px; }
.ob-top { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; gap: 12px; }
.ob-top .link { justify-self: end; color: var(--mut); }
.ob-progress { height: 4px; background: var(--soft); border-radius: 99px; overflow: hidden; }
.ob-progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--acc), var(--acc2)); border-radius: 99px; transition: width 0.35s cubic-bezier(0.3, 1, 0.4, 1); }
.ob-say { display: flex; flex-direction: column; gap: 6px; padding-top: 12px; animation: fade 0.25s; }
.ob-n { font-size: 12px; color: var(--mut); font-weight: 500; font-variant-numeric: tabular-nums; }
.ob-say h1 { font-size: 26px; line-height: 1.2; letter-spacing: -0.03em; }
.ob-say p { margin: 0; color: var(--mut); font-size: 14px; }
.ob-screen { flex: 1; animation: slideR 0.25s ease; }
.ob-screen.in-l { animation-name: slideL; }
@keyframes slideR { from { opacity: 0; transform: translateX(16px); } }
@keyframes slideL { from { opacity: 0; transform: translateX(-16px); } }
.ob-hero { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding-top: 12vh; }
.ob-hero h1 { font-size: 30px; line-height: 1.15; letter-spacing: -0.035em; }
.ob-hero p { color: var(--mut); font-size: 15px; max-width: 420px; margin: 0; }
.ob-check { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: color-mix(in srgb, var(--good) 14%, var(--card)); color: var(--good); border: 1px solid color-mix(in srgb, var(--good) 30%, var(--line)); }
.ob-q { display: flex; flex-direction: column; gap: 14px; }
.ob-input { font-size: 20px; font-weight: 500; height: 56px; border-radius: 12px; }
.ob-hint { color: var(--mut); font-size: 14px; margin: 8px 0 0; }
.ob-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.ob-grid.tiles { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
.ob-card, .ob-tile { min-height: 64px; border: 1px solid var(--line2); background: var(--card); border-radius: 12px; padding: 12px; cursor: pointer; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; text-align: left; transition: border-color 0.12s, background 0.12s; }
.ob-card b { font-size: 15px; font-weight: 600; }
.ob-card span { font-size: 12px; color: var(--mut); }
.ob-tile { align-items: center; text-align: center; min-height: 88px; }
.ob-tile span { font-size: 26px; }
.ob-tile b { font-size: 13px; font-weight: 500; }
.ob-card:hover, .ob-tile:hover { border-color: var(--mut); }
.ob-card.on, .ob-tile.on { border-color: var(--acc); background: var(--acc-soft); }
.ob-acc { display: flex; flex-direction: column; gap: 8px; }
.ob-accrow { border: 1px solid var(--line2); border-radius: 12px; background: var(--card); overflow: hidden; transition: border-color 0.12s; }
.ob-accrow.on { border-color: var(--acc); }
.ob-acctog { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 0; background: none; cursor: pointer; text-align: left; font-size: 15px; }
.ob-acctog .e { font-size: 20px; }
.ob-acctog b { flex: 1; font-weight: 500; }
.ob-acctog i { font-style: normal; width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; border: 1px solid var(--line2); font-size: 13px; color: var(--mut); }
.ob-accrow.on .ob-acctog i { background: var(--acc); border-color: var(--acc); color: #fff; }
.ob-bal { display: flex; flex-direction: column; gap: 5px; padding: 0 14px 14px; }
.ob-bal.wide { padding: 0; }
.ob-bal span { font-size: 12px; font-weight: 500; color: var(--mut); }
.money-in { display: flex; align-items: center; border: 1px solid var(--line2); border-radius: var(--rs); background: var(--bg); padding-left: 13px; }
.money-in:focus-within { border-color: var(--acc); }
.money-in em { font-style: normal; font-weight: 500; color: var(--mut); }
.money-in input { border: 0; background: none; }
.ob-budget { display: flex; flex-direction: column; gap: 16px; }
.ob-big { font-size: 42px; font-weight: 600; letter-spacing: -0.04em; }
.ob-big small { font-size: 15px; color: var(--mut); margin-left: 6px; letter-spacing: 0; font-weight: 400; }
.ob-budget input[type='range'] { padding: 0; border: 0; height: 32px; accent-color: var(--acc); background: none; }
.ob-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ob-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
.ob-summary div { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; }
.ob-summary span { font-size: 12px; color: var(--mut); }
.ob-summary b { font-size: 18px; font-weight: 600; }
.ob-foot { display: flex; align-items: center; justify-content: space-between; position: sticky; bottom: 0; padding: 12px 0 4px; background: linear-gradient(transparent, var(--bg) 35%); }
.ob-foot .btn { min-width: 140px; height: 48px; font-size: 15px; }
@media (pointer: coarse) { .ob-foot .muted { visibility: hidden; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
