/* Light design: purple gradient headers, white cards, colourful category icons. Dark is an opt-in override. */
/* Dark is the default look; light is the opt-in override. Headers keep the purple gradient in both. */
:root {
  --grad: linear-gradient(135deg, #a23cf4 0%, #8a3ff3 45%, #6b4ef6 100%);
  --bg: #0f1020;
  --card: #1a1b2e;
  --input: #202238;
  --text: #eef0fb;
  --muted: #8e93b2;
  --faint: #5d6283;
  --line: #262840;
  --track: #25273f;
  --blue: #5b7bff;
  --blue-soft: #232a52;
  --purple: #a66cff;
  --green: #22c997;
  --red: #ff6378;
  --shadow: 0 8px 28px rgb(0 0 0 / .35);
  --radius: 22px;
  --radius-sm: 14px;
  --font: "Circular Std", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, system-ui, sans-serif;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f3f5fa;
  --card: #ffffff;
  --input: #ffffff;
  --text: #1d2236;
  --muted: #8a90a6;
  --faint: #b5b9c9;
  --line: #eceef5;
  --track: #f1f2f7;
  --blue: #4a6cf7;
  --blue-soft: #eef1fe;
  --purple: #8a3ff3;
  --green: #1fbf8f;
  --red: #f5576c;
  --shadow: 0 6px 24px rgb(36 44 92 / .07);
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font: 15px/1.45 var(--font); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; text-align: inherit; }
a { color: var(--blue); }
h1, h2, p { margin: 0; }
h1 { font-size: 1.1rem; font-weight: 600; }
h2 { font-size: 1.12rem; font-weight: 650; }
small, .small { font-size: .82rem; }
.muted { color: var(--muted); }
.warn { color: var(--red) !important; }
.pos { color: var(--green); }
.center { text-align: center; display: block; margin-inline: auto; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 10px; }
.ico { width: 20px; height: 20px; flex: none; }

/* ---------- Layout ---------- */
.shell { max-width: 1120px; margin: 0 auto; display: flex; }
.sidebar { display: none; }
main { flex: 1; min-width: 0; max-width: 720px; margin: 0 auto; outline: none; padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
.body { padding: 16px; }
.body > * + * { margin-top: 18px; }

.tabbar {
  position: fixed; inset: auto 0 0 0; z-index: 20; display: flex; justify-content: space-around;
  background: var(--card); border-top: 1px solid var(--line); padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
}
.nav-item { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 58px; color: var(--muted); text-decoration: none; font-size: .7rem; font-weight: 500; }
.nav-item .ico { width: 23px; height: 23px; }
.nav-item.active { color: var(--blue); }
.nav-item.active .ico { fill: color-mix(in srgb, var(--blue) 20%, transparent); }

.fab {
  position: fixed; right: 18px; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 21;
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: var(--blue); color: #fff; box-shadow: 0 10px 24px rgb(74 108 247 / .4); transition: transform .15s;
}
.fab svg { width: 24px; height: 24px; }
.fab:active { transform: scale(.94); }
body[data-route="settings"] .fab, body[data-route="home"] .fab, body.onboarding .fab, body.onboarding .tabbar { display: none; }

@media (min-width: 900px) {
  .shell { padding: 0 24px; gap: 28px; }
  .sidebar { display: block; position: sticky; top: 24px; align-self: flex-start; width: 230px; margin-top: 24px; padding: 20px 12px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
  .brand { display: flex; align-items: center; gap: 10px; font-weight: 700; margin: 0 8px 20px; }
  .brand img { border-radius: 10px; }
  #sidenav { display: grid; gap: 2px; }
  #sidenav .nav-item { flex-direction: row; gap: 12px; padding: 11px 14px; font-size: .95rem; border-radius: 12px; }
  #sidenav .nav-item:hover { background: var(--track); }
  #sidenav .nav-item.active { background: var(--blue-soft); }
  .tabbar { display: none; }
  main { margin: 24px 0 0; padding-bottom: 60px; }
  .phead { border-radius: var(--radius); }
  .body { padding: 18px 0; }
  .fab { bottom: 32px; right: max(32px, calc(50vw - 540px)); }
  body.onboarding .sidebar { display: none; }
  body.onboarding main { margin: 0 auto; padding-bottom: 0; }
}

/* ---------- Purple header ---------- */
.phead { background: var(--grad); color: #fff; padding: calc(10px + env(safe-area-inset-top)) 16px 14px; border-radius: 0 0 26px 26px; overflow: hidden; }
.phead-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; }
.phead-bar h1 { flex: 1; text-align: center; font-weight: 500; }
.phead-bar h1 b { font-weight: 700; }
.phead-spacer { width: 38px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none; background: rgb(255 255 255 / .2); color: #fff; font-weight: 700; text-decoration: none; }
.avatar .glyph { width: 20px; height: 20px; }
.hbtn { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgb(255 255 255 / .15); }
.phead-big { text-align: center; padding: 14px 0 4px; display: grid; gap: 2px; }
.phead-label { font-size: .85rem; opacity: .8; }
.phead-amount { font-size: clamp(2.4rem, 12vw, 3rem); font-weight: 700; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.phead-amount small { font-size: .5em; font-weight: 600; }
.phead-sub { font-size: .85rem; opacity: .85; }
.phead-big.low .phead-sub { background: rgb(255 255 255 / .2); justify-self: center; padding: 3px 12px; border-radius: 99px; opacity: 1; }
.spark { margin: 8px -16px -14px; }
.spark svg { display: block; width: 100%; height: 92px; }
.spark-days { display: flex; justify-content: space-between; padding: 6px 20px 14px; font-size: .72rem; opacity: .75; }

.mtabs { display: flex; gap: 22px; overflow-x: auto; margin: 6px -16px -14px; padding: 4px 24px 0; scrollbar-width: none; }
.mtabs::-webkit-scrollbar { display: none; }
.mtabs button { flex: none; padding: 8px 2px 12px; color: rgb(255 255 255 / .6); font-size: .95rem; border-bottom: 3px solid transparent; }
.mtabs button.on { color: #fff; font-weight: 600; border-color: #fff; }

/* ---------- Building blocks ---------- */
.card { display: block; width: 100%; background: var(--card); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.card.tight { padding: 12px 16px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.sec-link { font-size: .86rem; font-weight: 500; color: var(--muted); text-decoration: none; }
.eyebrow { color: var(--muted); font-size: .82rem; }
.card-big { font-size: 1.75rem; font-weight: 700; letter-spacing: -.01em; margin: 2px 0 12px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.card-big small { font-size: .6em; }
.card-big-label { font-size: .82rem; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.stack { display: grid; gap: 12px; }
@media (min-width: 640px) { .stack.two-col { grid-template-columns: 1fr 1fr; } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 0 20px; border-radius: 14px; font-weight: 600; transition: transform .1s; text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn .ico { width: 18px; height: 18px; }
.btn.primary { background: var(--blue); color: #fff; }
.btn.soft { background: var(--blue-soft); color: var(--blue); }
.btn.ghost { background: var(--track); color: var(--text); }
.btn.danger { background: var(--red); color: #fff; }
.btn.danger-ghost { color: var(--red); background: transparent; min-height: 42px; padding: 0 10px; }
.btn.sm { min-height: 38px; padding: 0 14px; font-size: .86rem; border-radius: 11px; }
.btn.block { width: 100%; margin-top: 10px; }
.btn.grow { flex: 1; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.link-btn { display: inline-flex; align-items: center; gap: 4px; color: var(--blue); font-weight: 600; font-size: .88rem; padding: 6px 2px; }
.link-btn .ico { width: 16px; height: 16px; }
.link-btn.center { display: flex; margin: 10px auto 0; }
.icon-btn { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: var(--muted); }
.icon-btn:hover { background: var(--track); }

.bar { height: 8px; border-radius: 99px; background: var(--track); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: inherit; background: var(--blue); }

/* Pill bar: coloured fill holding the amount, total on the right */
.pbar { position: relative; height: 26px; border-radius: 99px; background: var(--track); display: flex; align-items: center; }
.pbar-fill { height: 100%; min-width: 74px; max-width: 100%; border-radius: 99px; background: var(--c); color: #fff; font-size: .72rem; font-weight: 600; display: flex; align-items: center; padding: 0 10px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pbar.zero .pbar-fill { background: transparent; color: var(--muted); }
.pbar-total { margin-left: auto; padding: 0 12px; font-size: .74rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pbars { display: grid; gap: 10px; }
.pbar-label { display: block; font-size: .76rem; color: var(--muted); margin-bottom: 4px; }

.status { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--muted); margin-top: 12px; }
.status .ico { width: 16px; height: 16px; border-radius: 50%; padding: 2px; color: #fff; stroke-width: 3; }
.status.ok .ico { background: var(--green); }
.status.bad .ico { background: var(--red); }

.glyph { width: 22px; height: 22px; display: block; }
/* Solid square with a white glyph (lists), or a tinted square with a coloured glyph (cards) */
.ibox { width: 44px; height: 44px; flex: none; border-radius: 13px; display: grid; place-items: center; background: var(--c); color: #fff; box-shadow: 0 6px 14px color-mix(in srgb, var(--c) 30%, transparent); }
.ibox.soft { background: color-mix(in srgb, var(--c) 16%, var(--card)); color: var(--c); box-shadow: none; }
.ibox.lg { width: 58px; height: 58px; border-radius: 17px; }
.ibox.lg .glyph { width: 26px; height: 26px; }

.notice { background: var(--blue-soft); border-radius: var(--radius-sm); padding: 12px 14px; font-size: .9rem; margin: 10px 0; }
.notice.warn { background: color-mix(in srgb, var(--red) 12%, var(--card)); }
.tip { background: var(--track); padding: 10px 14px; border-radius: 12px; }

.demo-banner { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--card); box-shadow: var(--shadow); border-radius: 16px; padding: 10px 10px 10px 14px; font-size: .84rem; color: var(--muted); }
.demo-banner span { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.demo-cta { flex: none; }
.demo-banner b { color: var(--text); }
.demo-banner .ico { width: 16px; height: 16px; color: var(--purple); }
.demo-cta { background: var(--grad); color: #fff; font-weight: 600; padding: 7px 14px; border-radius: 10px; }

/* Expense / Income switch-style buttons from the reference */
.duo { display: flex; border: 1.5px solid var(--blue); border-radius: 12px; padding: 3px; background: var(--card); }
.duo button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; border-radius: 9px; color: var(--blue); font-weight: 600; font-size: .92rem; }
.duo button .ico { width: 17px; height: 17px; }
.duo button.on { background: var(--blue); color: #fff; }
.duo.small button { min-height: 36px; font-size: .86rem; }
.simple-next { text-align: center; color: var(--muted); }

/* ---------- Home pieces ---------- */
.hscroll { display: flex; gap: 12px; overflow-x: auto; margin: -6px -16px; padding: 6px 16px 14px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { scroll-snap-align: start; flex: none; }
.cats { gap: 14px; }
.cat { display: grid; justify-items: center; gap: 6px; width: 72px; font-size: .78rem; text-align: center; }
.cat span { width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat small { color: var(--muted); font-size: .72rem; margin-top: -4px; }
.env-card.compact { width: 250px; }
.env-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; width: 100%; }
.env-head > div { display: grid; min-width: 0; flex: 1; }
.env-head b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.env-head small { color: var(--muted); font-size: .78rem; }
.goal-pct { font-weight: 700; color: var(--purple); }

/* ---------- Rows ---------- */
.rows { display: grid; }
.row { display: flex; align-items: center; gap: 14px; padding: 11px 0; width: 100%; }
.row + .row { border-top: 1px solid var(--line); }
.row-main { flex: 1; min-width: 0; }
@media (max-width: 360px) { .row { gap: 10px; } .row .ibox { width: 38px; height: 38px; font-size: 1.05rem; } .card { padding: 16px 14px; } }
.row-title { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub { color: var(--muted); font-size: .78rem; }
.row-amt { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.row.is-done .row-title, .row.is-done .row-amt { color: var(--muted); text-decoration: line-through; }
.check { width: 32px; height: 32px; flex: none; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; color: transparent; transition: all .15s; }
.check:hover { border-color: var(--green); color: var(--green); }
.check.on { background: var(--green); border-color: var(--green); color: #fff; }
.check .ico { width: 17px; height: 17px; stroke-width: 2.6; }
.day-head { display: flex; justify-content: space-between; font-weight: 600; font-size: .86rem; padding: 2px 0 4px; }

.empty { text-align: center; padding: 14px 8px 6px; color: var(--muted); }
.empty-ico { width: 52px; height: 52px; margin: 0 auto 8px; border-radius: 16px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); }
.empty-ico .glyph { width: 26px; height: 26px; }
.empty p { margin-bottom: 8px; }

/* ---------- Budget ---------- */
.donut-wrap { display: flex; align-items: center; gap: 22px; }
.donut { width: 140px; height: 140px; flex: none; border-radius: 50%; display: grid; place-items: center; }
.donut-hole { width: 64%; height: 64%; border-radius: 50%; background: var(--card); display: grid; place-content: center; text-align: center; }
.donut-hole small { color: var(--muted); font-size: .72rem; }
.donut-hole b { font-size: 1.15rem; }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; flex: 1; min-width: 0; font-size: .84rem; }
.legend li { display: flex; align-items: center; gap: 8px; }
.legend i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.legend span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.legend b { font-weight: 600; font-size: .8rem; }
.mini-stats { display: flex; justify-content: space-between; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.mini-stats span { display: grid; font-variant-numeric: tabular-nums; }
.mini-stats small { color: var(--muted); font-size: .74rem; }
.mini-stats b { font-size: .95rem; }

/* Underlined tabs ("CATEGORIES / MERCHANTS") */
.utabs { display: flex; border-bottom: 1px solid var(--line); }
.utabs button { flex: 1; text-align: center; padding: 10px 0 12px; font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border-bottom: 2.5px solid transparent; margin-bottom: -1px; }
.utabs button[aria-selected="true"] { color: var(--purple); border-color: var(--purple); }

/* ---------- Calendar ---------- */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-head { text-align: center; font-size: .72rem; font-weight: 600; color: var(--muted); padding-bottom: 6px; }
.cal-cell { aspect-ratio: 1 / 1.05; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding-top: 7px; gap: 3px; font-size: .84rem; cursor: default; }
.cal-cell.has { background: var(--blue-soft); cursor: pointer; }
.cal-cell.today .cal-num { background: var(--grad); color: #fff; border-radius: 99px; padding: 0 7px; }
.cal-num { font-weight: 600; }
.cal-amt { font-size: .62rem; font-weight: 600; color: var(--blue); white-space: nowrap; }
.cal-amt.paid { color: var(--green); text-decoration: line-through; }
.cal-amt.late { color: var(--red); }
@media (max-width: 400px) { .cal-amt { font-size: 0; width: 6px; height: 6px; border-radius: 50%; background: currentColor; } }

/* ---------- Goals & debt ---------- */
.goal .env-head { text-align: left; }
.goal-actions { display: flex; gap: 8px; margin-top: 14px; }
.plan { background: var(--track); border-radius: 18px; padding: 16px; margin-bottom: 8px; display: grid; gap: 10px; }
.plan-big { font-size: 1.15rem; }
.plan-big b { color: var(--purple); }
.order { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: .88rem; }
.order li span:first-child { font-weight: 600; }
.order li span + span { float: right; }

/* ---------- Forms ---------- */
.form-card { display: grid; gap: 14px; }
.balance-card { background: var(--grad); color: #fff; }
.balance-card .eyebrow { color: rgb(255 255 255 / .8); }
.balance-card .btn.primary { background: #fff; color: var(--purple); }
.field { display: grid; gap: 7px; font-weight: 600; font-size: .86rem; }
.field > span small { font-weight: 400; color: var(--muted); }
.field.inline { grid-template-columns: 1fr 130px; align-items: center; }
input:not([type="checkbox"]):not([type="hidden"]), select {
  width: 100%; min-height: 48px; padding: 11px 14px; border-radius: 12px; border: 1.5px solid var(--line);
  background: var(--input); font-weight: 500; font-size: 16px; outline: none; transition: border-color .15s;
}
input:focus, select:focus { border-color: var(--blue); }
input::placeholder { color: var(--faint); }
.amount-input { font-size: 1.5rem !important; font-weight: 700 !important; font-variant-numeric: tabular-nums; }
.amount-row { display: flex; gap: 8px; margin: 14px 0; }
.amount-row select { width: 96px; flex: none; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px 7px 9px; border-radius: 99px; background: var(--track); font-size: .86rem; font-weight: 500; border: 1.5px solid transparent; }
.chip .glyph { width: 17px; height: 17px; color: var(--c); }
.chip.on { background: color-mix(in srgb, var(--c) 18%, var(--card)); border-color: var(--c); }
.icon-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 8px; }
.icon-opt { aspect-ratio: 1; border-radius: 13px; display: grid; place-items: center; background: var(--track); color: var(--muted); transition: all .15s; }
.icon-opt.on { background: var(--c); color: #fff; box-shadow: 0 6px 14px color-mix(in srgb, var(--c) 35%, transparent); }

/* Sheet forms use the reference's Expense/Income switch for their tabs */
.seg { display: flex; border: 1.5px solid var(--blue); border-radius: 12px; padding: 3px; }
.seg button { flex: 1; text-align: center; min-height: 40px; border-radius: 9px; color: var(--blue); font-weight: 600; font-size: .92rem; }
.seg button[aria-selected="true"] { background: var(--blue); color: #fff; }

.switch { display: flex; gap: 12px; align-items: center; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-ui { width: 48px; height: 28px; border-radius: 99px; background: var(--line); position: relative; flex: none; transition: background .2s; }
.switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgb(0 0 0 / .2); }
.switch input:checked + .switch-ui { background: var(--blue); }
.switch input:checked + .switch-ui::after { transform: translateX(20px); }
.switch input:focus-visible + .switch-ui { outline: 2px solid var(--blue); outline-offset: 2px; }
.about { text-align: center; color: var(--muted); font-size: .8rem; padding: 10px 0; }

/* ---------- Sheet ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 50; background: rgb(20 22 40 / .45); display: flex; align-items: flex-end; justify-content: center; opacity: 0; transition: opacity .18s; }
.sheet-backdrop.open { opacity: 1; }
.sheet { background: var(--card); width: 100%; max-width: 520px; max-height: 92vh; overflow: auto; border-radius: 26px 26px 0 0; padding: 8px 18px calc(18px + env(safe-area-inset-bottom)); transform: translateY(24px); transition: transform .2s ease; }
.sheet-backdrop.open .sheet { transform: none; }
@media (min-width: 640px) { .sheet-backdrop { align-items: center; } .sheet { border-radius: 26px; padding-bottom: 20px; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; background: var(--card); padding: 8px 0; z-index: 1; }
.sheet-head h2 { font-size: 1.15rem; }
.sheet-body form, .sheet-body { display: grid; gap: 16px; }
.sheet-actions { display: flex; gap: 10px; align-items: center; margin-top: 4px; }
.sheet-amount { text-align: center; font-size: 2rem; font-weight: 700; }
.calc-line { display: flex; justify-content: space-between; padding: 7px 0; font-size: .92rem; color: var(--muted); }
.calc-line b { color: var(--text); font-variant-numeric: tabular-nums; }
.calc-line.total { border-top: 1px solid var(--line); color: var(--text); font-weight: 600; padding-top: 11px; }
.calc-line.total:last-of-type b { background: var(--grad); color: #fff; padding: 2px 10px; border-radius: 99px; }
.perks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }

.toast { position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); z-index: 60; background: var(--text); color: var(--card); padding: 11px 18px; border-radius: 12px; font-weight: 600; font-size: .9rem; opacity: 0; pointer-events: none; transition: all .2s; max-width: calc(100vw - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 900px) { .toast { bottom: 40px; } }

/* ---------- Onboarding ---------- */
.ob { min-height: 100vh; min-height: 100dvh; position: relative; display: grid; place-items: center; padding: 24px 16px; }
.ob-top { position: absolute; inset: 0 0 auto 0; height: 46vh; background: var(--grad); border-radius: 0 0 32px 32px; }
.ob-card { position: relative; max-width: 460px; display: grid; gap: 16px; padding: 24px; }
.ob-card h1 { font-size: 1.7rem; font-weight: 700; line-height: 1.2; }
.ob-emoji { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; background: var(--grad); color: #fff; }
.ob-emoji .glyph { width: 30px; height: 30px; }
.ob-dots { display: flex; gap: 6px; }
.ob-dots i { width: 22px; height: 6px; border-radius: 99px; background: var(--line); }
.ob-dots i.on { background: var(--purple); }
.choices { display: grid; gap: 8px; }
.choice { display: grid; padding: 12px 16px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--card); width: 100%; }
.choice small { color: var(--muted); }
.choice.on { border-color: var(--blue); background: var(--blue-soft); }

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

/* ---------- Install nudge ---------- */
.install-card { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: var(--radius); padding: 12px 10px 12px 14px; box-shadow: var(--shadow); border: 1.5px solid color-mix(in srgb, var(--purple) 35%, transparent); }
.install-card > div { flex: 1; display: grid; min-width: 0; line-height: 1.3; }
.install-card small { color: var(--muted); }
.install-card .ibox { width: 40px; height: 40px; }
.install-steps { margin: 0; padding-left: 22px; display: grid; gap: 12px; }
.install-steps li { padding-left: 4px; }
.install-steps .ico { width: 18px; height: 18px; vertical-align: -3px; color: var(--blue); }
