:root {
  --brand: #0e9f6e; --brand-d: #0b7f58; --brand-soft: #e3f5ee;
  --inc: #12a36f; --exp: #f0526b;
  --bg: #f4f7f5; --card: #ffffff; --ink: #0f1a16; --muted: #66756f; --line: #e5ebe8; --input: #f2f5f4;
  --shadow: 0 1px 2px rgba(16, 40, 30, .05), 0 6px 24px -12px rgba(16, 40, 30, .14);
  --r: 18px; --r-s: 12px;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
[data-theme=dark] {
  --brand: #22c58b; --brand-d: #1aa574; --brand-soft: #12332a;
  --inc: #34d399; --exp: #fb7185;
  --bg: #0b1210; --card: #131c19; --ink: #e8f0ec; --muted: #8fa199; --line: #223029; --input: #1a2521;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .6);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
body.noscroll { overflow: hidden; }
a { color: var(--brand); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
h1 { font-size: 22px; } h2 { font-size: 19px; margin: 8px 0 4px; } h3 { font-size: 15px; }
small, .small { font-size: 12.5px; }
.muted { color: var(--muted); } .center { text-align: center; } .pos { color: var(--inc); } .neg { color: var(--exp); }
.mt { margin-top: 14px; } .mt-s { margin-top: 8px; }
.row { display: flex; align-items: center; } .row.between { justify-content: space-between; } .gap { gap: 10px; } .wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; } .stack { display: flex; flex-direction: column; gap: 12px; }
.ic { flex: none; display: block; }

/* ---------- buttons & inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 18px; border-radius: 14px; font-weight: 700; transition: transform .08s, background .15s, opacity .15s; white-space: nowrap; }
.btn:active { transform: scale(.98); } .btn:disabled { opacity: .6; pointer-events: none; }
.btn.block { display: flex; width: 100%; } .btn.sm { height: 38px; font-size: 13.5px; padding: 0 14px; border-radius: 11px; }
.btn.primary { background: var(--brand); color: #fff; box-shadow: 0 6px 16px -8px var(--brand); } .btn.primary:hover { background: var(--brand-d); }
.btn.ghost { background: var(--input); color: var(--ink); } .btn.ghost:hover { background: var(--line); }
.btn.danger { background: var(--exp); color: #fff; } .btn.danger-ghost { background: color-mix(in srgb, var(--exp) 12%, transparent); color: var(--exp); width: 52px; padding: 0; }
.btn.google { background: var(--card); border: 1.5px solid var(--line); color: var(--ink); }
.link { color: var(--brand); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; display: inline-grid; place-items: center; color: var(--ink); }
.icon-btn:hover { background: var(--input); } .icon-btn.sm { width: 30px; height: 30px; }
.fld { display: flex; flex-direction: column; gap: 6px; } .fld > span { font-size: 12.5px; font-weight: 600; color: var(--muted); }
input:not([type=checkbox]):not([type=radio]), select { width: 100%; height: 46px; padding: 0 14px; border-radius: 12px; border: 1.5px solid transparent; background: var(--input); outline: none; transition: border .15s, background .15s; min-width: 0; }
input:focus, select:focus { border-color: var(--brand); background: var(--card); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2366756f' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 34px !important; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 500; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--brand); }
details summary { cursor: pointer; font-weight: 600; color: var(--brand); padding: 6px 0; list-style: none; }
details[open] summary { margin-bottom: 10px; }
.spin { width: 18px; height: 18px; border: 2.5px solid rgba(255, 255, 255, .4); border-top-color: #fff; border-radius: 50%; animation: sp .7s linear infinite; display: inline-block; }
.spin.dark { border-color: var(--line); border-top-color: var(--brand); width: 26px; height: 26px; }
@keyframes sp { to { transform: rotate(360deg); } }
.pill { display: inline-block; padding: 3px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 700; background: var(--input); color: var(--muted); }
.pill.ok { background: var(--brand-soft); color: var(--brand); } .pill.bad { background: color-mix(in srgb, var(--exp) 14%, transparent); color: var(--exp); }
.pill.warn { background: #fef3c7; color: #92400e; }
.pill.save { background: #fde68a; color: #78350f; margin-left: 4px; }

/* ---------- splash / gate ---------- */
.splash { min-height: 100dvh; display: grid; place-items: center; align-content: center; gap: 24px; }
.gate { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px 18px calc(18px + var(--safe-b));
  background: radial-gradient(120% 60% at 50% -10%, var(--brand-soft), transparent 70%), var(--bg); }
.gate-card { width: 100%; max-width: 410px; background: var(--card); border-radius: 26px; padding: 28px 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 14px; }
.gate-brand { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 6px; }
.gate-brand h1 { font-size: 26px; font-weight: 800; } .gate-brand p { margin: 0; color: var(--muted); }
.gate-card h2 { text-align: center; } .gate-card > p { margin: 0; text-align: center; }
.gate-foot { margin-top: 16px; color: var(--muted); font-size: 12px; display: flex; gap: 8px; align-items: center; }
.gate-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 13.5px; color: var(--muted); }
.gate-links.center { justify-content: center; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12.5px; } .or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.buy-link { text-align: center; font-weight: 600; font-size: 14px; padding: 10px; border-radius: 12px; background: var(--brand-soft); }
.lang-sw { display: flex; justify-content: center; gap: 4px; } .lang-sw button { padding: 4px 12px; border-radius: 8px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.lang-sw button.on { background: var(--input); color: var(--ink); }
.big-e { font-size: 46px; text-align: center; line-height: 1; }
.code-in { text-align: center; font-weight: 800; letter-spacing: .12em; font-size: 18px !important; text-transform: uppercase; height: 54px !important; }
.steps { display: flex; justify-content: space-between; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.steps div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.steps b { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.acct-chip { display: flex; align-items: center; gap: 8px; background: var(--input); border-radius: 12px; padding: 8px 12px; font-size: 13px; }
.acct-chip span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan { border: 2px solid var(--brand); border-radius: 18px; padding: 16px; display: flex; gap: 14px; align-items: center; background: var(--brand-soft); }
.plan > div b { font-size: 22px; white-space: nowrap; font-weight: 800; display: block; line-height: 1.1; } .plan ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 13px; }
.plan li { display: flex; gap: 6px; align-items: center; } .plan li .ic { color: var(--brand); }

/* ---------- shell ---------- */
.shell { min-height: 100dvh; }
.main { max-width: 560px; margin: 0 auto; padding: 0 16px calc(110px + var(--safe-b)); }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: calc(10px + env(safe-area-inset-top, 0px)) 0 6px; position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); }
.brand { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 800; }
.top-r { display: flex; align-items: center; gap: 4px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 800; margin-left: 4px; }
.avatar.lg { width: 64px; height: 64px; font-size: 26px; margin: 0; display: flex; align-items: center; justify-content: center; color: #fff; line-height: 1; }
.side .brand { display: none; }
.tabbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(10px + var(--safe-b)); width: min(540px, calc(100% - 20px)); z-index: 20;
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(16px);
  border-radius: 22px; padding: 6px; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .25), 0 0 0 1px var(--line); }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; color: var(--muted); font-size: 11px; font-weight: 600; border-radius: 14px; }
.tabbar a.on { color: var(--brand); }
.fab { justify-self: center; width: 54px; height: 54px; border-radius: 18px; background: var(--brand); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 20px -6px var(--brand); margin-top: -26px; transition: transform .1s; }
.fab:active { transform: scale(.94); } .fab-l { display: none; }
#view.fade { animation: fade .22s ease; } @keyframes fade { from { opacity: 0; transform: translateY(4px); } }
.banner { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: var(--brand-soft); color: var(--ink); margin: 4px 0 8px; font-size: 13.5px; }
.banner span { flex: 1; } .banner.warn { background: #fef3c7; color: #78350f; } .banner.warn b { color: #b45309; }
[data-theme=dark] .banner.warn { background: #3a2a0a; color: #fde68a; }

/* ---------- common blocks ---------- */
.hello { display: flex; flex-direction: column; margin: 6px 0 2px; } .hello small { color: var(--muted); } .hello b { font-size: 20px; }
.pnav { display: flex; align-items: center; justify-content: space-between; margin: 8px 0 10px; background: var(--card); border-radius: 14px; padding: 4px; box-shadow: var(--shadow); }
.pnav-l { font-weight: 700; font-size: 14.5px; text-transform: capitalize; }
.phead { display: flex; align-items: center; gap: 6px; margin: 6px 0 10px; min-height: 40px; } .phead h1 { flex: 1; } .phead-r { display: flex; }
.card { background: var(--card); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); margin-bottom: 12px; }
.card.tight { padding: 8px 8px 4px; } .card.stack { display: flex; }
.card-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; gap: 8px; } .card-h a { font-size: 13px; font-weight: 600; }
.two { display: grid; gap: 0 12px; grid-template-columns: minmax(0, 1fr); } .two > * { min-width: 0; }
.hero { border-radius: 22px; padding: 20px; color: #fff; margin-bottom: 12px; position: relative; overflow: hidden;
  background: radial-gradient(130% 120% at 100% 0%, #34d399 0%, transparent 55%), linear-gradient(135deg, #0b7f58, #0e9f6e 60%, #14b885); box-shadow: 0 14px 30px -16px #0b7f58; }
.hero::after { content: ''; position: absolute; right: -40px; bottom: -60px; width: 180px; height: 180px; border-radius: 50%; border: 28px solid rgba(255, 255, 255, .08); }
.hero.alt { background: linear-gradient(135deg, #1e3a34, #0f5c44); }
.hero small { opacity: .85; } .hero-v { font-size: 32px; font-weight: 800; letter-spacing: -.02em; margin: 2px 0 12px; }
.hero-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; background: rgba(0, 0, 0, .14); border-radius: 14px; padding: 10px 12px; position: relative; z-index: 1; }
.hero-row div { display: flex; flex-direction: column; min-width: 0; } .hero-row b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-note { margin: 10px 0 0; font-size: 13px; position: relative; z-index: 1; }
.bar { height: 8px; background: var(--input); border-radius: 99px; overflow: hidden; margin: 6px 0 4px; }
.bar i { display: block; height: 100%; background: var(--brand); border-radius: 99px; transition: width .4s; }
.bar.light { background: rgba(255, 255, 255, .2); } .bar.light i { background: #fff; }
.chips { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 12px; scrollbar-width: none; } .chips::-webkit-scrollbar { display: none; }
.chip { flex: none; background: var(--card); border-radius: 14px; padding: 10px 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; min-width: 110px; }
.chip small { color: var(--muted); } .chip b { font-size: 15px; }
.empty { text-align: center; padding: 18px 8px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.empty-e { font-size: 40px; } .empty p { margin: 0 0 8px; color: var(--muted); font-size: 13.5px; max-width: 280px; }

/* tx rows */
.tx, .li { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 8px; border-radius: 14px; text-align: left; color: inherit; }
button.tx:hover, a.tx:hover { background: var(--input); } .tx.off { opacity: .5; }
.tx-i { flex: none; width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; font-size: 20px; background: color-mix(in srgb, var(--c, #94a3b8) 16%, transparent); }
.tx-m { flex: 1; min-width: 0; display: flex; flex-direction: column; } .tx-m b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-m small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-a { font-weight: 700; white-space: nowrap; } .tx-a.income { color: var(--inc); } .tx-a.expense { color: var(--ink); }
.day-h { display: flex; justify-content: space-between; padding: 6px 8px 2px; font-size: 13px; color: var(--muted); } .day-h b { color: var(--ink); font-weight: 700; }
.searchbar { display: flex; align-items: center; gap: 8px; background: var(--card); border-radius: 14px; padding: 0 12px; box-shadow: var(--shadow); margin-bottom: 10px; color: var(--muted); }
.searchbar input { background: transparent !important; border: 0 !important; padding: 0 !important; }
.seg { display: flex; background: var(--input); border-radius: 13px; padding: 4px; margin-bottom: 10px; gap: 2px; }
.seg button { flex: 1; min-width: 0; height: 36px; padding: 0 4px; border-radius: 10px; font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); transition: background .15s; }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.type-seg button.on.expense { background: var(--exp); color: #fff; } .type-seg button.on.income { background: var(--inc); color: #fff; } .type-seg button.on.transfer { background: #64748b; color: #fff; }
.filters { margin-bottom: 10px; } .filters select { height: 40px; font-size: 13.5px; background-color: var(--card); }
.sumline { display: flex; gap: 14px; font-size: 13px; font-weight: 600; margin: 0 4px 10px; } .sumline span:first-child { flex: 1; color: var(--muted); }

/* charts */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .tick { font-size: 9px; fill: var(--muted); } .chart .grid { stroke: var(--line); stroke-dasharray: 3 4; } .chart .axis { stroke: var(--line); }
.donut-wrap { display: flex; align-items: center; gap: 16px; } .donut-wrap.center-d { justify-content: center; margin-bottom: 6px; }
.donut { flex: none; } .donut-c { font-size: 17px; font-weight: 800; fill: var(--ink); } .donut-s { font-size: 10.5px; fill: var(--muted); }
.ring-t { font-size: 12px; font-weight: 800; fill: var(--ink); }
.legend { list-style: none; margin: 0; padding: 0; flex: 1; display: grid; gap: 7px; font-size: 13px; min-width: 0; }
.legend { grid-template-columns: minmax(0, 1fr); } .legend li { min-width: 0; display: flex; align-items: center; gap: 8px; } .legend i { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.legend span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lg { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); } .lg i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; margin-left: 6px; }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 12px; }
.kpi { background: var(--card); border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; min-width: 0; }
.kpi > small:first-child { color: var(--muted); } .kpi b { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ctable { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; } .ctable li { display: flex; gap: 12px; align-items: center; }
.ct-m { flex: 1; min-width: 0; } .ct-m b { font-size: 14px; } .ct-m small { color: var(--muted); } .ct-m .pos, .ct-m .neg { font-weight: 600; }
.insights .ins { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--line); } .insights .ins:first-of-type { border-top: 0; }
.ins span { font-size: 20px; } .ins p { margin: 0; font-size: 13.5px; }
.li-s { padding: 6px 2px; font-size: 13.5px; }
.tbl-wrap { overflow-x: auto; margin: 0 -4px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; } .tbl th { text-align: right; color: var(--muted); font-weight: 600; font-size: 12px; padding: 6px; }
.tbl td { text-align: right; padding: 7px 6px; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; } .tbl td:first-child, .tbl th:first-child { text-align: left; }
.tbl tfoot td { font-weight: 800; border-top: 2px solid var(--line); } .tbl code { font-weight: 700; font-size: 12.5px; }

/* budgets / goals */
.bud { display: block; width: 100%; text-align: left; padding: 8px 4px; border-radius: 12px; font-size: 14px; color: inherit; }
.bud + .bud { border-top: 1px solid var(--line); border-radius: 0; } .bud small { color: var(--muted); }
.bud.near .bar i { background: #f59e0b; } .bud.over .bar i { background: var(--exp); }
.goal-top { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; } .goal p { margin: 0 0 10px; } .goal-done { color: var(--brand); font-weight: 700; }

/* more */
.menu { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 12px; }
.menu-i { background: var(--card); border-radius: 18px; padding: 16px; box-shadow: var(--shadow); color: var(--ink); display: flex; flex-direction: column; gap: 2px; transition: transform .1s; }
.menu-i:active { transform: scale(.98); } .menu-i small { color: var(--muted); font-size: 12px; }
.menu-ic { width: 42px; height: 42px; border-radius: 13px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin-bottom: 8px; }
.install .ic { color: var(--brand); } .install p { margin: 2px 0 10px; }
.acct { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.acct form { width: 100%; } .sub-card { display: flex; flex-direction: column; gap: 10px; } .sub-card p { margin: 0; }
.sub-days { display: flex; align-items: center; gap: 12px; } .sub-days b { font-size: 42px; font-weight: 800; color: var(--brand); line-height: 1; }
.gen-out .code-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); }
.code-row code { font-weight: 800; letter-spacing: .06em; font-size: 15px; }
.msg-prev { white-space: pre-wrap; background: var(--input); border-radius: 12px; padding: 12px; font: 12.5px/1.5 var(--font); margin: 10px 0 0; }

/* sheet */
.sheet-ov { position: fixed; inset: 0; z-index: 100; background: rgba(5, 15, 10, .45); display: flex; align-items: flex-end; justify-content: center; opacity: 0; transition: opacity .2s; }
.sheet-ov.open { opacity: 1; }
.sheet { width: 100%; max-width: 520px; max-height: 92dvh; overflow-y: auto; background: var(--card); border-radius: 26px 26px 0 0; padding: 8px 18px calc(20px + var(--safe-b)); transform: translateY(40px); transition: transform .22s cubic-bezier(.2, .8, .2, 1); overscroll-behavior: contain; }
.sheet-ov.open .sheet { transform: none; }
.grab { width: 40px; height: 5px; border-radius: 9px; background: var(--line); margin: 4px auto 10px; }
.sheet-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.sheet-title { font-size: 17px; margin-bottom: 4px; } .sheet > .sheet-title { margin-bottom: 14px; } .sheet > p { margin: 0 0 14px; }
.amt { display: flex; align-items: center; gap: 8px; background: var(--input); border-radius: 18px; padding: 6px 16px; border: 2px solid transparent; }
.amt:focus-within { border-color: var(--exp); } .amt.income:focus-within { border-color: var(--inc); } .amt.transfer:focus-within { border-color: #64748b; }
.amt .cur { font-weight: 800; color: var(--muted); font-size: 15px; }
.amt input { font-size: 30px !important; font-weight: 800; height: 58px !important; background: transparent !important; border: 0 !important; padding: 0 !important; }
.amt.expense input { color: var(--exp); } .amt.income input { color: var(--inc); }
.calc-h { margin-top: -6px; }
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.cat-grid > * { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 2px; border-radius: 14px; border: 2px solid transparent; color: inherit; text-align: center; }
.cat-grid > * span { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; font-size: 20px; background: color-mix(in srgb, var(--c, #94a3b8) 16%, transparent); }
.cat-grid small { font-size: 11px; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cat-grid button.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 8%, transparent); }
.cat-add span { background: var(--input) !important; color: var(--muted); }
.chips-sel { display: flex; flex-wrap: wrap; gap: 6px; }
.chips-sel button { padding: 8px 12px; border-radius: 12px; background: var(--input); font-size: 13.5px; font-weight: 600; border: 2px solid transparent; }
.chips-sel button.on { border-color: var(--brand); background: var(--brand-soft); }
.quick-d { display: flex; gap: 4px; align-self: flex-end; } .quick-d button { height: 46px; padding: 0 10px; border-radius: 12px; background: var(--input); font-size: 12.5px; font-weight: 600; }
.pick-emoji { display: flex; flex-wrap: wrap; gap: 4px; } .pick-emoji label, .pick-color label { cursor: pointer; }
.pick-emoji input, .pick-color input { position: absolute; opacity: 0; pointer-events: none; }
.pick-emoji span { width: 38px; height: 38px; display: grid; place-items: center; font-size: 19px; border-radius: 11px; border: 2px solid transparent; background: var(--input); }
.pick-emoji input:checked + span { border-color: var(--brand); background: var(--brand-soft); }
.pick-color { display: flex; flex-wrap: wrap; gap: 8px; } .pick-color span { width: 30px; height: 30px; border-radius: 50%; display: block; border: 3px solid var(--card); box-shadow: 0 0 0 2px transparent; }
.pick-color input:checked + span { box-shadow: 0 0 0 2px var(--ink); }

/* toast */
#toasts { position: fixed; left: 0; right: 0; top: calc(12px + env(safe-area-inset-top, 0px)); z-index: 200; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { background: #10201a; color: #fff; padding: 11px 16px; border-radius: 14px; font-size: 13.5px; font-weight: 600; max-width: 92vw; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .4); opacity: 0; transform: translateY(-8px); transition: all .25s; }
.toast.show { opacity: 1; transform: none; } .toast.ok { background: var(--brand-d); } .toast.err { background: #c2334a; }

/* ---------- desktop ---------- */
@media (min-width: 900px) {
  .shell { display: grid; grid-template-columns: 240px 1fr; }
  .side { position: sticky; top: 0; height: 100dvh; padding: 22px 14px; border-right: 1px solid var(--line); background: var(--card); display: flex; flex-direction: column; gap: 20px; }
  .side .brand { display: flex; padding: 0 8px; }
  .m-only { visibility: hidden; }
  .tabbar { position: static; transform: none; width: auto; display: flex; flex-direction: column; align-items: stretch; background: none; box-shadow: none; padding: 0; gap: 4px; backdrop-filter: none; }
  .tabbar a { flex-direction: row; gap: 12px; padding: 11px 12px; font-size: 14.5px; }
  .tabbar a:hover { background: var(--input); } .tabbar a.on { background: var(--brand-soft); }
  .fab { order: -1; width: 100%; height: 46px; border-radius: 14px; margin: 0 0 10px; display: flex; gap: 8px; justify-content: center; }
  .fab .ic { width: 20px; height: 20px; } .fab-l { display: inline; font-weight: 700; }
  .main { max-width: 1000px; width: 100%; padding: 0 32px 40px; }
  .two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .two > .card { align-self: start; }
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .menu { grid-template-columns: repeat(4, 1fr); }
  .sheet-ov { align-items: center; } .sheet { border-radius: 24px; padding-bottom: 20px; }
}
@media (max-width: 360px) { .hero-v { font-size: 27px; } .cat-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------- v2 premium ---------- */
.hero-link { color: #fff; font-size: 12px; opacity: .9; text-align: right; } .hero-link b { font-weight: 700; }
.hero-row.two-col { grid-template-columns: 1fr 1fr; }
.chart .zero { stroke: var(--exp); stroke-dasharray: 4 3; opacity: .6; }
.fc-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0 4px; }
.fc-row div { display: flex; flex-direction: column; background: var(--input); border-radius: 12px; padding: 8px 10px; min-width: 0; }
.fc-row small { color: var(--muted); font-size: 11.5px; } .fc-row b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card p.small { margin: 6px 0 0; }
.health-mini { display: flex; align-items: center; gap: 14px; color: var(--ink); }
.health-mini > div { display: flex; flex-direction: column; } .health-mini b { font-size: 16px; } .health-mini .ic { color: var(--muted); }
.health-top { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px; }
.health-top .ring-t { font-size: 34px; } .health-top p { margin: 0; max-width: 320px; }
.factor .tip { margin: 10px 0 0; font-size: 13px; background: var(--input); border-radius: 12px; padding: 10px 12px; }
.save-banner { background: var(--brand-soft); color: var(--ink); border-radius: 14px; padding: 12px 14px; font-size: 13.5px; font-weight: 600; margin-bottom: 12px; }
.save-banner.bad { background: color-mix(in srgb, var(--exp) 14%, transparent); }
.step-n { width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.bk { padding: 6px 0 10px; } .bk + .bk { border-top: 1px solid var(--line); padding-top: 10px; }
.bar.tgt { position: relative; overflow: visible; } .bar.tgt em { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); opacity: .45; border-radius: 2px; }
.ab-row { display: flex; align-items: center; gap: 10px; } .ab-row > input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--brand); flex: none; }
.ab-row .grow { display: flex; flex-direction: column; } .ab-amt { width: 96px !important; text-align: right; font-weight: 700; }
.cal-h, .cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-h span { text-align: center; font-size: 11.5px; font-weight: 700; color: var(--muted); padding-bottom: 4px; }
.cd { aspect-ratio: 1 / 1.15; border-radius: 10px; background: var(--input); display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 4px 2px; gap: 1px; min-width: 0; }
.cd.empty { background: none; } .cd.has { background: color-mix(in srgb, var(--exp) 9%, var(--input)); }
.cd.today { outline: 2px solid var(--brand); } .cd-n { font-size: 12px; font-weight: 700; } .cd-i { font-size: 11px; line-height: 1; }
.cd-a { font-size: 10px; font-weight: 700; white-space: nowrap; }
.ob-dots { display: flex; justify-content: center; gap: 6px; } .ob-dots i { width: 28px; height: 5px; border-radius: 9px; background: var(--line); } .ob-dots i.on { background: var(--brand); }
.center-chips { justify-content: center; }
.ob-acc { display: flex; align-items: center; gap: 12px; background: var(--input); border-radius: 14px; padding: 4px 6px 4px 14px; }
.ob-acc span { font-size: 20px; } .ob-acc input { width: 130px !important; text-align: right; font-weight: 700; background: var(--card) !important; }
.pin-dots { display: flex; justify-content: center; gap: 14px; margin: 6px 0 10px; }
.pin-dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--muted); } .pin-dots i.on { background: var(--brand); border-color: var(--brand); }
.pin-dots.shake { animation: shake .35s; } @keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.keypad { display: grid; grid-template-columns: repeat(3, 72px); gap: 12px; justify-content: center; }
.keypad button { height: 64px; border-radius: 50%; background: var(--input); font-size: 24px; font-weight: 700; } .keypad button:active { background: var(--line); }
#pin-forgot { justify-content: center; font-size: 13px; }
.imp-steps { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 4px; }
.tbl.imp td, .tbl.imp th { text-align: left; vertical-align: middle; } .tbl.imp td:last-child, .tbl.imp th:last-child { text-align: right; white-space: nowrap; }
.tbl.imp select { height: 34px; font-size: 12.5px; padding: 0 26px 0 8px !important; border-radius: 9px; min-width: 130px; background-position: right 8px center; }
.imp-n { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .tbl tr.skip { opacity: .4; }
.print-only { display: none; }
@media print {
  .side, .tabbar, .topbar, #banner, .no-print, .pnav button, .seg, .fab, #toasts { display: none !important; }
  .print-only { display: block !important; } .print-h { font-size: 18px; margin-bottom: 12px; }
  body, html { background: #fff !important; } .main { max-width: none; padding: 0; } .card, .kpi, .hero { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
  .shell { display: block; } .two { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) { .grid2 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- v2.2 currency picker & launch price ---------- */
.cur-btn { display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 10px; border-radius: 99px; background: var(--card); box-shadow: 0 0 0 1px var(--line); font-size: 13px; }
.cur-btn b { font-weight: 700; } .cur-btn:hover { background: var(--input); }
.country-list { display: flex; flex-direction: column; gap: 6px; }
.country, .cur-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 14px; background: var(--input); border: 2px solid transparent; text-align: left; color: var(--ink); }
.country.on { border-color: var(--brand); background: var(--brand-soft); }
.country .tick { color: var(--brand); visibility: hidden; } .country.on .tick { visibility: visible; }
.cur-flag { font-size: 22px; line-height: 1; } .cur-row .ic { color: var(--muted); }
.launch-box { display: flex; gap: 12px; align-items: flex-start; background: linear-gradient(135deg, #fef3c7, #fde68a); color: #78350f; border-radius: 16px; padding: 12px 14px; font-size: 20px; margin-bottom: 12px; }
.launch-box > div { flex: 1; display: flex; flex-direction: column; font-size: 14px; } .launch-box small { font-size: 12.5px; opacity: .85; }
.launch-box .bar { background: rgba(120, 53, 15, .15); margin-bottom: 0; } .launch-box .bar i { background: #b45309; }
[data-theme=dark] .launch-box { background: linear-gradient(135deg, #3a2a0a, #4a3410); color: #fde68a; }
.top-r .pill.warn { white-space: nowrap; }
@media (max-width: 440px) { .top-r .pill.warn { display: none; } }
@media (max-width: 360px) { .cur-btn { padding: 0 8px; } }

/* =====================================================================
   v3 IDENTITY — "the cove": harbour teal, sea-mist ground, buoy-yellow accent
   ===================================================================== */
:root {
  --brand: #0f766e; --brand-d: #0b5f59; --brand-soft: #dcf0ec; --buoy: #f6c344;
  --inc: #0e9f6e; --exp: #e5484d;
  --bg: #eef4f3; --card: #ffffff; --ink: #0e2a2f; --muted: #5b7175; --line: #dce6e5; --input: #f1f6f5;
  --shadow: 0 1px 0 rgba(14, 42, 47, .04), 0 10px 30px -18px rgba(14, 42, 47, .28);
  --font: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Bricolage Grotesque', 'Figtree', system-ui, sans-serif;
  --r: 20px;
}
[data-theme=dark] {
  --brand: #2bb3a3; --brand-d: #1f978a; --brand-soft: #123a38;
  --inc: #34d399; --exp: #fb7185;
  --bg: #08171a; --card: #0f2327; --ink: #e3f0ee; --muted: #8aa6a8; --line: #1d373b; --input: #15302f;
  --shadow: 0 1px 0 rgba(255, 255, 255, .03), 0 12px 30px -18px rgba(0, 0, 0, .7);
}
h1, h2, h3, .hero-v, .kpi b, .chip b, .sub-days b, .brand b, .gate-brand h1, .donut-c, .ring-t, .tx-a, .sheet-title, .hello b { font-family: var(--display); }
h1 { font-size: 26px; font-weight: 700; letter-spacing: -.02em; } h3 { font-size: 15.5px; font-weight: 700; }
.tx-a, .kpi b, .chip b, .hero-v, .hero-row b, .tbl td, .legend b { font-variant-numeric: tabular-nums; }

/* hero: the one memorable thing */
.hero { background: linear-gradient(160deg, #0d3a40 0%, #0f5f5a 55%, #0f766e 100%); border-radius: 28px; padding: 22px 22px 18px; box-shadow: 0 20px 40px -24px #0d3a40; }
.hero::after { display: none; }
.hero .wave { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 70px; pointer-events: none; }
.hero-top { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 1; }
.hero-top small { font-size: 13.5px; font-weight: 600; opacity: .9; }
.hero-q { width: 26px; height: 26px; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; font-weight: 700; font-size: 13px; }
.hero-v { font-size: 46px; font-weight: 800; letter-spacing: -.035em; margin: 2px 0 2px; line-height: 1.05; position: relative; z-index: 1; }
.hero-unit { font-size: 18px; font-weight: 600; opacity: .75; letter-spacing: 0; }
.hero-sub { margin: 4px 0 16px; font-size: 13.5px; opacity: .85; position: relative; z-index: 1; }
.hero-row { background: rgba(4, 25, 28, .28); border-radius: 16px; position: relative; z-index: 1; }
.hero-row a { display: flex; flex-direction: column; min-width: 0; color: #fff; } .hero-row a b { text-decoration: underline; text-decoration-color: var(--buoy); text-underline-offset: 3px; }
.hero.alt { background: linear-gradient(160deg, #13343a, #1a4b4f); }
.hero-v .hero-unit { color: var(--buoy); opacity: 1; }

/* quieter surfaces: hairline + soft shadow, varied radius by hierarchy */
.card { border-radius: var(--r); box-shadow: var(--shadow); border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.card.tight { border-radius: 18px; }
.chip, .kpi { box-shadow: none; border: 1px solid var(--line); border-radius: 16px; }
.pnav { box-shadow: none; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.pnav .icon-btn { border-radius: 50%; }
.tx { border-radius: 12px; } .tx-i { border-radius: 14px; }
.tx-a.expense { color: var(--ink); } .tx-a.income { color: var(--inc); }
.seg { border-radius: 999px; } .seg button { border-radius: 999px; }
.btn { border-radius: 999px; } .btn.sm { border-radius: 999px; }
.btn.primary { background: var(--brand); box-shadow: 0 8px 18px -10px var(--brand); }
.menu-i { box-shadow: none; border: 1px solid var(--line); }
.menu-ic { background: var(--brand-soft); color: var(--brand); border-radius: 14px; }
.hello small { font-size: 13.5px; } .hello b { font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.brand b { font-weight: 800; letter-spacing: -.02em; font-size: 19px; }

/* tab bar: floating, with a buoy-yellow plus */
.tabbar { border-radius: 26px; box-shadow: 0 14px 34px -14px rgba(14, 42, 47, .45), 0 0 0 1px var(--line); }
.tabbar a.on { color: var(--brand); } .tabbar a.on .ic { stroke-width: 2.4; }
.fab { background: var(--buoy); color: #0e2a2f; border-radius: 20px; box-shadow: 0 10px 22px -8px rgba(246, 195, 68, .9); }
@media (min-width: 900px) {
  .side { background: var(--card); }
  .fab { border-radius: 999px; }
  .tabbar a.on { background: var(--brand-soft); }
}

/* set-up checklist */
.setup .card-h { align-items: flex-start; } .setup h3 { margin-top: 2px; }
.setup-list { display: flex; flex-direction: column; gap: 2px; }
.setup-i { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-radius: 12px; color: var(--ink); text-align: left; width: 100%; font-size: 14px; }
.setup-i:hover { background: var(--input); } .setup-i .ic { color: var(--muted); }
.setup-i .chk { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; flex: none; }
.setup-i.ok { color: var(--muted); } .setup-i.ok span.grow { text-decoration: line-through; text-decoration-color: var(--line); }
.setup-i.ok .chk { background: var(--brand); border-color: var(--brand); color: #fff; }

/* quick add */
.quick { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; } .quick::-webkit-scrollbar { display: none; }
.quick button { flex: none; padding: 8px 12px; border-radius: 999px; background: var(--input); border: 1.5px solid transparent; font-size: 13px; font-weight: 600; white-space: nowrap; }
.quick button b { color: var(--muted); font-weight: 600; margin-left: 4px; } .quick button.on { border-color: var(--brand); background: var(--brand-soft); }

/* safe-to-spend explainer + conversion sheet */
.calc-list { display: flex; flex-direction: column; background: var(--input); border-radius: 16px; padding: 6px 14px; margin-bottom: 12px; }
.calc-list > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; font-size: 14px; }
.calc-list > div + div { border-top: 1px solid var(--line); } .calc-list .tot { font-weight: 700; }
.calc-list b { font-family: var(--display); font-variant-numeric: tabular-nums; }
.opt-card { display: flex; flex-direction: column; gap: 3px; text-align: left; width: 100%; padding: 14px 16px; border-radius: 16px; background: var(--input); border: 2px solid var(--line); color: var(--ink); }
.opt-card:hover { border-color: var(--brand); } .opt-card small { color: var(--muted); font-size: 13px; }
#cv-yes { border-color: var(--brand); background: var(--brand-soft); }

/* toast with action */
.toast.has-act { display: flex; align-items: center; gap: 14px; pointer-events: auto; }
.toast button { color: var(--buoy); font-weight: 800; }

.cur-btn { border-radius: 999px; font-family: var(--font); }
.empty-e { filter: saturate(.9); }
:focus-visible { outline: 2.5px solid var(--buoy); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
@media (max-width: 380px) { .hero-v { font-size: 38px; } }
@media (min-width: 900px) {
  .tabbar { box-shadow: none; border-radius: 0; }
  .chart { max-height: 240px; }
}

/* ---- devices ---- */
.dev-list{display:grid;gap:8px;margin:4px 0 14px;text-align:left}
.dev{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:14px;background:var(--surface-2,rgba(15,118,110,.06))}
#dev-card .dev{margin-top:8px}
.dev>span{font-size:22px;line-height:1}
.dev b{display:block;font-size:.95rem}
.dev small{color:var(--muted)}
.my-code{margin-top:14px;padding:12px;border:1.5px dashed var(--brand);border-radius:14px}
.my-code code{font-size:1.05rem;font-weight:700;letter-spacing:.04em}
.my-code small{display:block}

/* =====================================================================
   v4 "COVE CALM" — fewer boxes, more air, docked navigation
   ===================================================================== */
:root {
  --brand: #0f6b64; --brand-d: #0b5550; --brand-soft: #e0efec; --buoy: #f5be3c;
  --inc: #138a5e; --exp: #d4544c;
  --bg: #f1f5f4; --card: #ffffff; --ink: #10292c; --muted: #627a7c; --line: #e4ebea; --input: #eef3f2;
  --shadow: 0 1px 2px rgba(16, 41, 44, .04), 0 2px 12px -6px rgba(16, 41, 44, .08);
  --r: 22px;
}
[data-theme=dark] {
  --brand: #3bb7a8; --brand-d: #2b9a8d; --brand-soft: #143936;
  --inc: #3fcf95; --exp: #f27a73;
  --bg: #0a1a1d; --card: #11262a; --ink: #e4f0ee; --muted: #8ba5a7; --line: #1d373b; --input: #183134;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3);
}
html, body { font-size: 15px; }
.main { padding-bottom: calc(104px + var(--safe-b)); }

/* surfaces */
.card { border: 0; box-shadow: var(--shadow); border-radius: var(--r); padding: 18px; margin-bottom: 14px; }
.card.tight { padding: 6px 8px; border-radius: var(--r); }
.card-h { margin-bottom: 12px; } .card-h h3 { font-size: 16.5px; }
.card-h a { color: var(--brand); }
.chip, .kpi { border: 0; box-shadow: var(--shadow); background: var(--card); border-radius: 18px; }
.chip { padding: 12px 16px; min-width: 118px; gap: 2px; } .kpi { padding: 14px 16px; gap: 2px; }
.chip small, .kpi > small:first-child { font-size: 12.5px; }
.chip b, .kpi b { font-size: 17px; font-weight: 700; }
.kpis { gap: 12px; }
.pnav { border: 0; box-shadow: var(--shadow); background: var(--card); margin: 10px 0 14px; }
.searchbar { box-shadow: var(--shadow); border-radius: 16px; }
.filters select { box-shadow: var(--shadow); border: 0; }
.seg { background: color-mix(in srgb, var(--ink) 6%, transparent); }
[data-theme=dark] .seg { background: var(--input); }
.seg button.on { box-shadow: 0 1px 3px rgba(16, 41, 44, .12); }
.sumline { margin: 2px 6px 12px; }
.hello { margin: 10px 0 4px; } .hello b { font-size: 26px; }
.topbar { padding-bottom: 8px; }
.cur-btn { background: var(--card); box-shadow: var(--shadow); border: 0; }

/* hero: deep cove water, one calm statement */
.hero { background: radial-gradient(120% 90% at 100% 0%, rgba(59, 183, 168, .35) 0%, transparent 60%), #0c2f34; border-radius: 28px; padding: 22px 22px 20px; box-shadow: 0 18px 36px -26px #0c2f34; margin-bottom: 14px; }
.hero.alt { background: radial-gradient(120% 90% at 100% 0%, rgba(245, 190, 60, .18) 0%, transparent 60%), #15363b; }
.hero .wave { opacity: .55; }
.hero-v { font-size: 48px; }
.hero-row { background: none; border-radius: 0; padding: 14px 0 0; border-top: 1px solid rgba(255, 255, 255, .14); gap: 0; }
.hero-row > * { padding: 0 12px; } .hero-row > *:first-child { padding-left: 0; }
.hero-row > * + * { border-left: 1px solid rgba(255, 255, 255, .14); }
.hero-row small { font-size: 12px; opacity: .75; } .hero-row b { font-size: 15px; font-family: var(--display); }

/* rows: round tinted icons, hairline separators inset past the icon */
.tx, .li { position: relative; padding: 11px 8px; border-radius: 14px; }
.tx-i { width: 40px; height: 40px; border-radius: 50%; font-size: 19px; background: color-mix(in srgb, var(--c, #9aa8b3) 14%, transparent); }
.tx-m b { font-size: 14.5px; } .tx-m small { font-size: 12.5px; margin-top: 1px; }
.tx-a { font-size: 15px; }
.card .tx + .tx::before, .card .li + .li::before, .card .tx + .li::before { content: ''; position: absolute; top: 0; left: 60px; right: 8px; border-top: 1px solid var(--line); }
button.tx:hover, a.tx:hover { background: color-mix(in srgb, var(--ink) 4%, transparent); }
.day-h { padding: 10px 8px 4px; font-size: 13px; } .day-h b { font-size: 13.5px; }
.tx-list-gap, .card.tight + .card.tight { margin-top: 0; }
.bud { padding: 12px 4px; } .bar { height: 7px; }
.legend { gap: 9px; } .legend i { width: 10px; height: 10px; border-radius: 50%; }

/* More: one grouped list instead of a wall of tiles */
.menu { grid-template-columns: 1fr; gap: 0; background: var(--card); border-radius: var(--r); padding: 6px; box-shadow: var(--shadow); margin-bottom: 14px; }
.menu-i { display: grid; grid-template-columns: 40px minmax(0, 1fr) 16px; column-gap: 14px; align-items: center; padding: 12px 10px; border: 0; box-shadow: none; background: none; border-radius: 14px; position: relative; }
.menu-i:hover { background: color-mix(in srgb, var(--ink) 4%, transparent); }
.menu-ic { grid-row: 1 / 3; grid-column: 1; width: 40px; height: 40px; margin: 0; border-radius: 12px; }
.menu-i b { grid-column: 2; font-size: 15px; font-weight: 600; } .menu-i small { grid-column: 2; font-size: 12.5px; }
.menu-i::after { content: ''; grid-column: 3; grid-row: 1 / 3; width: 8px; height: 8px; border: solid var(--muted); border-width: 2px 2px 0 0; transform: rotate(45deg); justify-self: center; opacity: .6; }
.menu-i + .menu-i::before { content: ''; position: absolute; top: 0; left: 64px; right: 10px; border-top: 1px solid var(--line); }

/* docked tab bar with a raised buoy-yellow plus */
@media (max-width: 899px) {
  .tabbar { left: 0; right: 0; transform: none; width: auto; bottom: 0; border-radius: 22px 22px 0 0; padding: 6px 10px calc(8px + var(--safe-b));
    background: color-mix(in srgb, var(--card) 96%, transparent); box-shadow: 0 -1px 0 var(--line), 0 -10px 30px -20px rgba(16, 41, 44, .35); }
  .tabbar a { gap: 4px; padding: 4px 0; font-size: 11px; }
  .tabbar a .ic { box-sizing: content-box; padding: 4px 16px; border-radius: 99px; transition: background .15s; }
  .tabbar a.on { color: var(--brand); font-weight: 700; } .tabbar a.on .ic { background: var(--brand-soft); }
  .fab { width: 58px; height: 58px; border-radius: 50%; margin-top: -34px; box-shadow: 0 0 0 6px var(--card), 0 12px 22px -8px rgba(200, 140, 20, .7); }
}
@media (min-width: 900px) {
  .side { border-right: 0; box-shadow: 1px 0 0 var(--line); }
  .tabbar a.on { color: var(--brand); font-weight: 700; }
  .menu { grid-template-columns: repeat(2, 1fr); }
  .menu-i:nth-child(2)::before { display: none; }
}

/* buttons, inputs, sheets */
.btn { height: 48px; } .btn.sm { height: 38px; }
.btn.ghost { background: var(--input); }
input:not([type=checkbox]):not([type=radio]), select { border-radius: 14px; }
.sheet { border-radius: 28px 28px 0 0; } .grab { margin-bottom: 14px; }
.amt { border-radius: 20px; }
.cat-grid > * span { border-radius: 50%; }
.pill { font-weight: 700; }
.toast { border-radius: 16px; }
.banner { border-radius: 16px; }
.hero-row > * { padding: 0 10px; } .hero-row b { font-size: 14.5px; }
@media (max-width: 380px) { .hero-row b { font-size: 13.5px; } .hero-row > * { padding: 0 7px; } }
[data-theme=dark] .hero { background: radial-gradient(120% 90% at 100% 0%, rgba(59, 183, 168, .32) 0%, transparent 60%), #134046; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
[data-theme=dark] .hero.alt { background: radial-gradient(120% 90% at 100% 0%, rgba(245, 190, 60, .16) 0%, transparent 60%), #1a3f44; }
/* language switch on login / onboarding screens */
.gate-lang { display: flex; justify-content: center; gap: 4px; margin: 14px auto 0; padding: 4px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 6%, transparent); width: max-content; }
.gate-lang button { padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); }
.gate-lang button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(16, 41, 44, .12); }
.hero-row { display: flex; } .hero-row > * { flex: 1 1 auto; min-width: 0; padding: 0 9px; }
.hero-row small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.hero-row b { font-size: 14px; letter-spacing: -.01em; }
.hero-row > *:last-child { padding-right: 0; }
.demo-hint { margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; background: #fef3c7; color: #78350f; font-size: 13.5px; text-align: center; }
[data-theme=dark] .demo-hint { background: #3a2a0a; color: #fde68a; }

/* ---- plans ---- */
.perks { list-style: none; padding: 0; margin: 6px 0 14px; display: grid; gap: 6px; text-align: left; }
.perks li { display: flex; gap: 8px; align-items: center; font-size: 14px; } .perks svg { color: var(--inc); flex: none; }
.plans { display: grid; gap: 10px; margin: 6px 0 4px; }
.plan-card { position: relative; display: grid; gap: 6px; padding: 14px 16px; border-radius: 18px; background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); color: inherit; text-decoration: none; text-align: left; }
.plan-card:hover { box-shadow: inset 0 0 0 1.5px var(--brand); }
.plan-card.hero-plan { box-shadow: inset 0 0 0 2px var(--brand), 0 10px 26px -18px var(--brand); background: linear-gradient(180deg, var(--brand-soft), var(--card) 70%); padding-top: 22px; }
.plan-badge { position: absolute; top: -10px; left: 14px; background: var(--buoy); color: #3b2a00; font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 99px; }
.plan-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; } .plan-top b { font-size: 16px; }
.plan-price { font-family: var(--display); font-size: 22px; font-weight: 800; white-space: nowrap; } .plan-price small { font-size: 13px; font-weight: 600; color: var(--muted); } .plan-price s { color: var(--muted); font-size: 15px; font-weight: 600; }
.plan-card .btn { margin-top: 4px; pointer-events: none; }
.final-note { margin-top: 8px; }
.lifetime-note { padding: 12px 14px; border-radius: 14px; background: var(--brand-soft); font-weight: 600; margin: 8px 0; }

/* ---- v3 features ---- */
.menu-h { margin: 18px 6px 8px; font-size: 13px; font-weight: 700; color: var(--muted); }
.menu-h:first-of-type { margin-top: 6px; }
.smart-add { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 16px; background: linear-gradient(90deg, var(--brand-soft), var(--input)); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--brand) 35%, transparent); }
.smart-add span { font-size: 18px; } .smart-add input { border: 0; background: none; padding: 4px 0; flex: 1; min-width: 0; font-size: 15px; box-shadow: none; outline: none; }
.smart-out { display: block; margin: -2px 4px 0; color: var(--muted); min-height: 1.2em; }
.tag-sugg { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tag-sugg button { padding: 4px 10px; border-radius: 99px; background: var(--input); font-size: 12.5px; font-weight: 600; color: var(--muted); }
.tag-sugg button.on { background: var(--brand-soft); color: var(--brand); }
.smart-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(132px, 1fr); gap: 10px; overflow-x: auto; margin: 0 -2px 14px; padding: 2px 2px 4px; scrollbar-width: none; }
.smart-strip::-webkit-scrollbar { display: none; }
.smart-tile { display: grid; gap: 2px; padding: 12px 14px; border-radius: 18px; background: var(--card); box-shadow: var(--shadow); color: inherit; text-decoration: none; }
.smart-tile span { font-size: 22px; } .smart-tile b { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .smart-tile small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sub-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 12px 6px; position: relative; }
.sub-row + .sub-row::before { content: ''; position: absolute; top: 0; left: 58px; right: 6px; border-top: 1px solid var(--line); }
.sub-row .tx-a { display: grid; text-align: right; } .sub-row .tx-a small { font-size: 11px; color: var(--muted); font-weight: 600; }
.sub-acts { grid-column: 2 / 4; display: flex; gap: 8px; flex-wrap: wrap; }
.sub-row.is-cancel .tx-m b { text-decoration: line-through; opacity: .7; }
.warn-card { background: color-mix(in srgb, var(--buoy) 18%, var(--card)); }
.afford-res .aff-v { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; } .aff-v > span { font-size: 34px; } .aff-v b { display: block; font-size: 18px; } .aff-v small { color: var(--muted); }
.afford-res.ok { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--inc) 45%, transparent), var(--shadow); }
.afford-res.warn { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--buoy) 70%, transparent), var(--shadow); }
.afford-res.bad { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--exp) 45%, transparent), var(--shadow); }
.aff-facts { margin: 10px 0; padding-left: 18px; display: grid; gap: 4px; font-size: 14px; }
.ns-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 4px 0 10px; }
.ns-cal span { aspect-ratio: 1; display: grid; place-items: center; border-radius: 10px; font-size: 13px; font-weight: 700; background: var(--input); color: var(--muted); }
.ns-cal .free { background: color-mix(in srgb, var(--inc) 20%, var(--card)); color: var(--inc); } .ns-cal .today { box-shadow: inset 0 0 0 2px var(--brand); }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.badge { display: grid; justify-items: center; text-align: center; gap: 2px; padding: 12px 6px; border-radius: 16px; background: var(--input); opacity: .45; filter: grayscale(1); }
.badge.on { opacity: 1; filter: none; background: color-mix(in srgb, var(--buoy) 22%, var(--card)); }
.badge span { font-size: 28px; } .badge b { font-size: 13px; } .badge small { font-size: 11px; color: var(--muted); }
.kpi.streak b { font-size: 19px; }
.wrap-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 14px; }
.wrap-card { border-radius: 22px; padding: 16px; color: #fff; display: grid; gap: 4px; align-content: start; min-height: 150px; box-shadow: 0 14px 26px -22px #0c2f34; }
.wrap-card .wrap-e { font-size: 28px; } .wrap-card small { opacity: .85; font-weight: 600; } .wrap-card b { font-family: var(--display); font-size: 22px; line-height: 1.15; word-break: break-word; } .wrap-card p { margin: 0; font-size: 12.5px; opacity: .9; }
.wrap-card.c1 { background: #0c2f34; grid-column: span 2; } .wrap-card.c1 b { font-size: 34px; }
.wrap-card.c2 { background: #138a5e; } .wrap-card.c3 { background: #7c68cf; } .wrap-card.c4 { background: #d46a92; }
.wrap-card.c5 { background: #e07b45; } .wrap-card.c6 { background: #3e8ec8; } .wrap-card.c7 { background: #a27b4c; }
.tag-pick { margin: 0 0 12px; }
.ics-card .row svg { color: var(--brand); flex: none; }
@media print { .phead .icon-btn, .tag-pick, .pnav, .btn { display: none !important; } }
.c52-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.c52-opt { display: grid; gap: 2px; padding: 10px 6px; border-radius: 14px; background: var(--input); text-align: center; }
.c52-opt b { font-size: 16px; } .c52-opt small { font-size: 11.5px; color: var(--muted); }
.c52-opt:hover { box-shadow: inset 0 0 0 1.5px var(--brand); }
.demo-banner { background: linear-gradient(90deg, #fdf0c8, #fff7e0); color: #4a3500; }
[data-theme=dark] .demo-banner { background: #3a2a0a; color: #fde68a; }
.afford-res .fc-row { grid-template-columns: 1fr 1fr; }

/* ---------- v4: Free + Pro, daily budget, grocery budget ---------- */
button.plan-card { width: 100%; font: inherit; cursor: pointer; border: 0; }
.pro-tag { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .04em; padding: 2px 6px; border-radius: 6px; background: var(--buoy, #f6c344); color: #3b2a00; vertical-align: 2px; }
.pro-lock { text-align: center; display: grid; gap: 8px; justify-items: center; padding: 26px 18px; }
.pro-lock h2 { margin: 2px 0 0; } .pro-lock p { margin: 0 0 6px; max-width: 36ch; } .pro-lock .btn { max-width: 320px; }
.pro-page { text-align: center; } .pro-page h2 { margin: 6px 0 4px; } .pro-page > p.muted { max-width: 40ch; margin: 0 auto 12px; } .pro-page .plans { text-align: left; }
.cmp { width: 100%; border-collapse: collapse; font-size: 14px; }
.cmp th, .cmp td { padding: 9px 6px; border-bottom: 1px solid var(--line); text-align: center; }
.cmp th:first-child, .cmp td:first-child { text-align: left; } .cmp th { font-size: 12.5px; color: var(--muted); } .cmp th:last-child, .cmp td:last-child { color: var(--brand); }
.cmp tr:last-child td { border-bottom: 0; }
.pay-opt { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--input); cursor: pointer; }
.pay-opt input { width: 20px; height: 20px; accent-color: var(--brand); flex: none; } .pay-opt span { display: flex; flex-direction: column; } .pay-opt small { color: var(--muted); }
.pay-opt:has(input:checked) { box-shadow: inset 0 0 0 2px var(--brand); background: var(--brand-soft); }
.daily-two { margin-bottom: 0; } @media (min-width: 700px) { .daily-two { grid-template-columns: 1fr 1fr; } }
.daily-mini { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.daily-mini .grow { display: flex; flex-direction: column; min-width: 0; } .daily-mini b { font-size: 17px; } .daily-mini.over b { color: var(--exp); }
.daily-hero { background: linear-gradient(135deg, var(--brand-d), var(--brand)); } .daily-hero.over { background: linear-gradient(135deg, #8f2f2b, #d4544c); }
.daily-hero .bar { margin: -4px 0 12px; position: relative; z-index: 1; }
.cd.dd { justify-content: center; } .cd.dd.good { background: color-mix(in srgb, var(--inc) 16%, var(--input)); } .cd.dd.bad { background: color-mix(in srgb, var(--exp) 18%, var(--input)); }
.cd.dd.bad .cd-a { color: var(--exp); } .cd.dd.future { opacity: .45; }
.chips-sel { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.chip-sel input { position: absolute; opacity: 0; pointer-events: none; }
.chip-sel span { display: inline-block; padding: 7px 11px; border-radius: 99px; background: var(--input); font-size: 13px; font-weight: 600; cursor: pointer; }
.chip-sel input:checked + span { background: var(--brand-soft); box-shadow: inset 0 0 0 1.5px var(--brand); }
.chip-sel input:focus-visible + span { outline: 2px solid var(--brand); }
.seg-opt { flex: 1; } .seg-opt input { position: absolute; opacity: 0; } .seg-opt span { display: block; text-align: center; height: 36px; line-height: 36px; border-radius: 10px; font-weight: 600; font-size: 13px; color: var(--muted); cursor: pointer; }
.seg-opt input:checked + span { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.groc-hero .big { display: block; font-size: 22px; } .groc-hero .grow { display: flex; flex-direction: column; } .groc-hero p { margin: 10px 0 0; }
.warn-note { color: #a76a00; } [data-theme=dark] .warn-note { color: #f5be3c; }
.gi-add { display: grid; grid-template-columns: minmax(0, 1fr) 64px 84px auto; gap: 6px; margin-bottom: 8px; align-items: center; } .gi-add input { min-width: 0; width: 100% !important; }
@media (max-width: 520px) { .gi-add { grid-template-columns: 1fr 1fr auto; } .gi-add [name=name] { grid-column: 1 / -1; } }
.gi-list { list-style: none; padding: 0; margin: 0; }
.gi-list li { display: flex; align-items: center; gap: 4px; border-bottom: 1px solid var(--line); }
.gi-chk { display: flex; align-items: center; gap: 12px; flex: 1; padding: 10px 0; cursor: pointer; min-width: 0; }
.gi-chk input { width: 22px; height: 22px; accent-color: var(--brand); flex: none; } .gi-chk .grow { display: flex; flex-direction: column; min-width: 0; }
.gi-list li.done b { text-decoration: line-through; color: var(--muted); }
.gi-foot { padding-top: 10px; align-items: center; }
.chips.wrap { flex-wrap: wrap; overflow: visible; }
.chip-btn { padding: 7px 12px; border-radius: 99px; background: var(--input); font-size: 13px; font-weight: 600; cursor: pointer; } .chip-btn small { color: var(--muted); font-weight: 500; }
.chip-btn:hover { background: var(--brand-soft); }

/* ---------- v4.1: Bright & easy on the eyes (default) ---------- */
:root, [data-theme=light] {
  --brand: #0d9488; --brand-d: #0f766e; --brand-soft: #e3f6f3; --buoy: #f5b52e;
  --inc: #0f9d6b; --exp: #e0565b;
  --bg: #f7fafc; --card: #ffffff; --ink: #1f2d3d; --muted: #66778a; --line: #e5ecf1; --input: #f2f6f9;
  --shadow: 0 1px 2px rgba(31, 45, 61, .04), 0 6px 20px -12px rgba(31, 45, 61, .12);
}
[data-theme=light] body { background: var(--bg); color: var(--ink); }
[data-theme=light] .hero { background: linear-gradient(135deg, #e3f6f3 0%, #edf4ff 100%); color: var(--ink); box-shadow: inset 0 0 0 1px #d8ebe8; }
[data-theme=light] .hero.alt { background: linear-gradient(135deg, #fff6e0 0%, #eef6f4 100%); }
[data-theme=light] .hero::after { border-color: rgba(13, 148, 136, .07); }
[data-theme=light] .hero .wave { opacity: .9; }
[data-theme=light] .hero small, [data-theme=light] .hero-sub { color: var(--muted); opacity: 1; }
[data-theme=light] .hero-v { color: #12343b; }
[data-theme=light] .hero-v .hero-unit { color: #c27c00; }
[data-theme=light] .hero-row { border-top-color: rgba(31, 45, 61, .1); }
[data-theme=light] .hero-row > * + * { border-left-color: rgba(31, 45, 61, .1); }
[data-theme=light] .hero-row a { color: var(--ink); } [data-theme=light] .hero-row b { color: var(--ink); }
[data-theme=light] .hero-q { background: rgba(31, 45, 61, .07); color: var(--ink); }
[data-theme=light] .bar.light { background: rgba(31, 45, 61, .08); } [data-theme=light] .bar.light i { background: var(--brand); }
[data-theme=light] .daily-hero { background: linear-gradient(135deg, #e3f6f3, #edf4ff); }
[data-theme=light] .daily-hero.over { background: linear-gradient(135deg, #fff0f0, #fff6ea); box-shadow: inset 0 0 0 1px #f6d9d9; }
[data-theme=light] .daily-hero.over .hero-v { color: var(--exp); } [data-theme=light] .daily-hero.over .bar.light i { background: var(--exp); }
.lang-btn { min-width: 46px; justify-content: center; }
.daily-hero .hero-v .hero-unit { display: block; font-size: 16px; margin-top: 2px; }
.lang-btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 34px; min-width: 46px; padding: 0 10px; border-radius: 999px; background: var(--card); box-shadow: var(--shadow); border: 0; font-family: var(--font); font-size: 13px; }
.lang-btn b { font-weight: 700; } .lang-btn:hover { background: var(--input); }

/* ---------- v4.2: Clear, friendly sections (easy to read for every age) ---------- */
:root, [data-theme=light] {
  --bg: #eef3f7; --edge: #dfe7ee;
  --shadow: 0 1px 2px rgba(31, 45, 61, .06), 0 10px 26px -12px rgba(31, 45, 61, .2);
  --r: 20px;
}
[data-theme=light] html, [data-theme=light] body { font-size: 16px; }
[data-theme=light] .card, [data-theme=light] .smart-tile, [data-theme=light] .chip, [data-theme=light] .kpi,
[data-theme=light] .menu, [data-theme=light] .searchbar, [data-theme=light] .pnav, [data-theme=light] .plan-card:not(.hero-plan) {
  background: var(--card); border: 1px solid var(--edge); box-shadow: var(--shadow);
}
[data-theme=light] .card { padding: 18px; margin-bottom: 16px; }
[data-theme=light] .hero { box-shadow: inset 0 0 0 1px #cfe6e2, 0 12px 28px -16px rgba(13, 148, 136, .35); }
[data-theme=light] .cur-btn, [data-theme=light] .lang-btn { border: 1px solid var(--edge); box-shadow: 0 2px 6px -2px rgba(31, 45, 61, .12); }
@media (max-width: 899px) { [data-theme=light] .tabbar { box-shadow: 0 -2px 18px -6px rgba(31, 45, 61, .18), 0 0 0 1px var(--edge); } }
@media (min-width: 900px) { [data-theme=light] .tabbar { box-shadow: none; border: 0; } [data-theme=light] .side { background: #ffffff; box-shadow: 1px 0 0 var(--edge), 6px 0 24px -18px rgba(31, 45, 61, .25); } }
.card-h h3 { font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.menu-h { font-size: 13.5px; font-weight: 700; color: var(--muted); margin: 20px 4px 8px; }
small, .small { font-size: 13px; } .muted { color: var(--muted); }
.tx-m b, .menu-i b { font-size: 15.5px; } .tx-a { font-size: 15.5px; }
.btn { min-height: 46px; } .btn.sm { min-height: 38px; }
input, select, textarea { font-size: 16px; }
/* clickable sections lift a little when pointed at */
a.card, .smart-tile, .menu-i, .daily-mini { transition: transform .15s, box-shadow .15s; }
@media (hover: hover) { a.card:hover, .smart-tile:hover, .daily-mini:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(31, 45, 61, .06), 0 16px 30px -14px rgba(31, 45, 61, .26); } }
@media (prefers-reduced-motion: reduce) { a.card, .smart-tile, .menu-i, .daily-mini { transition: none; } a.card:hover, .smart-tile:hover, .daily-mini:hover { transform: none; } }
.daily-mini b { font-size: 18px; }
.notify-opts { display: grid; gap: 12px; margin: 12px 0 0 6px; padding-left: 14px; border-left: 2px solid var(--line); }
.notify-opt input:disabled + span { opacity: .55; }
.card .check + .check, .card > .check { margin-top: 6px; }
.pro-promo { display: grid; gap: 10px; text-decoration: none; color: inherit; background: linear-gradient(180deg, #fff8e6, var(--card) 70%) !important; border-color: #f3dfa6 !important; }
.pro-promo p { margin: 0; }
.promo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; font-size: 14.5px; font-weight: 600; }
.pro-promo .btn { pointer-events: none; }
[data-theme=dark] .pro-promo { background: linear-gradient(180deg, #3a2e12, var(--card) 70%) !important; border-color: #5a4720 !important; }
.pro-promo { display: grid; gap: 10px; text-decoration: none; color: inherit; background: linear-gradient(180deg, #fff8e6, var(--card) 70%) !important; border-color: #f3dfa6 !important; }
.pro-promo p { margin: 0; }
.promo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; font-size: 14.5px; font-weight: 600; }
.pro-promo .btn { pointer-events: none; }
[data-theme=dark] .pro-promo { background: linear-gradient(180deg, #3a2e12, var(--card) 70%) !important; border-color: #5a4720 !important; }

/* ---------- v5 offline edition: buy box, license key ---------- */
.buy-box { display: grid; gap: 12px; text-align: left; margin-top: 8px; }
.buy-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; justify-content: center; }
.buy-price s { color: var(--muted); font-size: 18px; } .buy-price b { font: 800 40px/1 var(--display, inherit); letter-spacing: -.02em; color: var(--ink); }
.buy-price span { flex-basis: 100%; text-align: center; color: var(--muted); font-size: 14px; }
.buy-box .perks { margin: 4px 0; }
.key-form textarea, .key-out { width: 100%; font: 13px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; padding: 12px; border-radius: 12px; border: 1px solid var(--edge, var(--line)); background: var(--input); color: var(--ink); resize: vertical; word-break: break-all; }
.key-out { margin: 10px 0; }

/* Home shortcut tiles: all on one screen (no sideways scrolling) */
.smart-strip { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; }
.smart-strip .smart-tile:last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (min-width: 640px) { .smart-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); } .smart-strip .smart-tile:last-child:nth-child(odd) { grid-column: auto; } }
@media (min-width: 1100px) { .smart-strip { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.smart-tile b, .smart-tile small { white-space: normal; overflow: visible; text-overflow: clip; }

/* No sideways scrolling anywhere: rows of chips wrap into a grid on one screen */
.chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; gap: 10px; }
@media (min-width: 640px) { .chips { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .chips { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.chips .chip { min-width: 0; } .chips .chip b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chips.wrap { display: flex; flex-wrap: wrap; }
.quick, .chips-sel, .quick-d { flex-wrap: wrap; overflow: visible; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }

/* ---- Quick log (2-tap entry) ---- */
.qk-amt { text-align: center; font-size: 40px; font-weight: 800; letter-spacing: -.02em; padding: 6px 0 10px; color: var(--exp); font-variant-numeric: tabular-nums; }
.qk-amt.income { color: var(--inc); } .qk-amt.muted { opacity: .45; }
.qk-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 360px; margin: 0 auto; }
.qk-pad button { height: 52px; border-radius: 16px; background: var(--input); font-size: 22px; font-weight: 700; color: inherit; border: 0; box-shadow: 0 2px 0 rgba(15, 40, 50, .08); }
.qk-pad button:active { transform: translateY(1px); box-shadow: none; background: var(--brand-soft); }
.qk-hint { margin: 12px 0 6px; }
.qk-cats button { background: var(--card, #fff); box-shadow: 0 3px 10px -6px rgba(15, 40, 50, .35); }
.qk-cats button:active { border-color: var(--c); }
.qk-more { margin-top: 8px; } .qk-more summary { cursor: pointer; font-weight: 600; font-size: 13.5px; padding: 6px 0; color: var(--brand-d); }
.shake { animation: qk-shake .35s; }
@keyframes qk-shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@media (prefers-reduced-motion: reduce) { .shake { animation: none; } }
/* ---- Shortcuts page ---- */
.sc-hero { text-align: center; } .sc-hero h2 { margin: 6px 0 4px; } .sc-big { font-size: 28px; letter-spacing: .1em; }
.sc-code { font: 700 19px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .06em; text-align: center; padding: 14px 8px; border-radius: 14px; background: var(--input); word-break: break-all; user-select: all; }
.sc-steps { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 12px; }
.sc-steps li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.5; }
.sc-steps li > div { min-width: 0; overflow-wrap: anywhere; } .sc-steps .btn { margin-top: 8px; }
.sc-steps code { font-size: 12px; background: var(--input); padding: 1px 5px; border-radius: 6px; word-break: break-all; }
.sc-n { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.sc-dim { opacity: .75; }
/* ---- Home: start here ---- */
.start-card h3 { margin: 0 0 4px; font-size: 18px; }
.start-bar { height: 10px; border-radius: 99px; background: var(--input); overflow: hidden; margin: 12px 0 6px; }
.start-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), #34d399); min-width: 6px; transition: width .5s; }
.start-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.start-link { display: grid; gap: 2px; padding: 12px; border-radius: 16px; background: var(--input); color: inherit; text-decoration: none; min-width: 0; }
.start-link span { font-size: 22px; } .start-link b { font-size: 14px; } .start-link small { color: var(--muted); font-size: 12px; }
.hero-v-sm { font-size: 30px !important; }
.hero-btn { margin-top: 14px; background: var(--brand); color: #fff; position: relative; z-index: 1; }
.launch-tag { display: inline-block; font-size: 12.5px; font-weight: 700; color: #92400e; background: #fef3c7; border-radius: 99px; padding: 4px 10px; margin-bottom: 6px; }
/* iPhone: inputs under 16px make Safari zoom in on focus */
@media (pointer: coarse) { .smart-add input, .filters select, .tbl.imp select { font-size: 16px; } }
.ios-share { display: inline-grid; place-items: center; vertical-align: middle; width: 26px; height: 26px; border-radius: 8px; background: var(--input); color: #0a84ff; }
.warn-card { background: #fff7e6; box-shadow: none; border: 1px solid #fde3a7; margin: 10px 0; } .warn-card p { margin: 4px 0 10px; }
.banner.ios-inst { margin-top: 6px; }
.start-ios { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 12px; border-radius: 16px; background: #eef6ff; border: 1.5px solid #bfdbfe; color: inherit; }
.start-ios > span:first-child { font-size: 22px; } .start-ios > span:nth-child(2) { flex: 1; display: grid; } .start-ios small { color: var(--muted); }
/* small phones (iPhone SE and similar): keep the three hero figures readable instead of cut off */
@media (max-width: 380px) {
  .hero-row { gap: 4px; padding: 9px 8px; }
  .hero-row b { font-size: 12px; letter-spacing: -.02em; overflow: visible; text-overflow: clip; }
  .hero-row small, .hero-row span { font-size: 10.5px; }
}
@media (max-width: 380px) { .hero-row small { white-space: normal; line-height: 1.15; } }
/* ---- Move to another device ---- */
.mv-code { font: 800 34px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .14em; text-align: center; padding: 14px 8px; margin: 6px 0; border-radius: 16px; background: var(--brand-soft, #e6f4f1); color: var(--brand-d, #0f5f58); user-select: all; }
#mv-out:not(:empty) { margin-bottom: 12px; }
.mv-input { font: 700 22px ui-monospace, SFMono-Regular, Menlo, monospace !important; letter-spacing: .18em; text-align: center; text-transform: uppercase; }
button.link.block { display: block; width: 100%; }
