/* Gastador: muted green and yellow, minimal. */
@font-face { font-family: 'Inter'; src: url('../fonts/inter.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  --forest: #1f4d3a;
  --forest-deep: #173a2c;
  --sage: #dde5d3;
  --sage-soft: #eef2e8;
  --mustard: #d4a93a;
  --mustard-soft: #f3e7c0;
  --bg: #f6f5ef;
  --surface: #ffffff;
  --ink: #17261e;
  --ink-2: #52635a;
  --ink-3: #8a968e;
  --line: #e4e6dc;
  --bad: #b4513a;
  --warn: #d9822b;
  --bad-soft: #f6e4de;
  --good: #22824f;
  /* chart series (validated for colour-blind separation) */
  --c-needs: #22824f;
  --c-wants: #c9a227;
  --c-savings: #1f9aa6;
  --radius: 18px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --safe-top: var(--safe-area-inset-top, env(safe-area-inset-top, 0px));
  --safe-bottom: var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px));
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); }
/* Scrollbars: a thin, quiet line instead of the full-width bar. */
/* Firefox only: in Chromium these two properties would switch off the slimmer custom scrollbar below. */
@supports not selector(::-webkit-scrollbar) { * { scrollbar-width: thin; scrollbar-color: rgb(23 38 30 / 28%) transparent; } }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgb(23 38 30 / 28%); border-radius: 3px; }
::-webkit-scrollbar-button { display: none; }
body { margin: 0; font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; font-size: 15px; line-height: 1.45; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.ic { width: 22px; height: 22px; flex: none; }
:focus-visible { outline: 2px solid var(--forest); outline-offset: 2px; border-radius: 8px; }

#app, .sheet { max-width: 480px; margin: 0 auto; }
#app { min-height: 100dvh; padding-bottom: calc(92px + var(--safe-bottom)); }
#app.enter .page { animation: rise .35s var(--ease) both; }
@keyframes rise { from { transform: translateY(8px); } }

/* ---------- top bar ---------- */
.top { display: flex; align-items: center; gap: 8px; padding: calc(14px + var(--safe-top)) 16px 40px; background: var(--sage); }
.top-title { flex: 1; text-align: center; min-width: 0; }
.top h1 { font-size: 19px; font-weight: 650; letter-spacing: -.01em; }
.top-title p { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.top.tall { padding-top: calc(40px + var(--safe-top)); padding-bottom: 52px; }
.top.tall h1 { font-size: 24px; }
.home-top { justify-content: space-between; }
.hello small { display: block; font-size: 13px; color: var(--ink-2); }
.hello b { font-size: 20px; font-weight: 650; letter-spacing: -.01em; }
.icon-btn { position: relative; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; color: var(--ink); }
.icon-btn:active { background: rgb(23 38 30 / 8%); }
.icon-btn.ghost { pointer-events: none; }
.icon-btn.sm { width: 34px; height: 34px; }
.icon-btn.solid { background: var(--forest); color: #fff; }
.badge { position: absolute; top: 3px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--mustard); color: var(--ink); font-size: 10.5px; font-weight: 700; font-style: normal; display: grid; place-items: center; }

.page { padding: 0 16px; margin-top: -26px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }

/* ---------- cards ---------- */
.card { background: var(--surface); border-radius: var(--radius); padding: 16px; box-shadow: 0 1px 2px rgb(23 38 30 / 4%), 0 6px 20px rgb(23 38 30 / 5%); min-width: 0; }
.card.flush { padding: 4px 16px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.card-head h2, .card-head h3 { font-size: 15px; font-weight: 650; }
.card-head small { display: block; font-size: 12.5px; }
.card-head .right { text-align: right; }
.link { font-size: 13px; font-weight: 600; color: var(--forest); padding: 2px 0; }
.more { display: block; text-align: center; font-size: 13px; color: var(--ink-2); padding-top: 10px; }
.pad { padding: 4px 0 6px; font-size: 13.5px; }
.hint { font-size: 12.5px; color: var(--ink-3); text-align: center; padding: 0 12px; }
.hint.in { text-align: left; padding: 0; display: flex; gap: 8px; align-items: flex-start; }
.hint .ic { width: 16px; height: 16px; margin-top: 1px; }
.lead { font-size: 14px; color: var(--ink-2); }
.lead.center { text-align: center; }
.lead b { color: var(--ink); }

/* ---------- hero ---------- */
.hero { background: var(--forest); color: #fff; border-radius: 22px; padding: 18px; position: relative; overflow: hidden; }
.hero-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; color: rgb(255 255 255 / 78%); }
.chip { background: rgb(255 255 255 / 12%); border-radius: 999px; padding: 4px 10px; font-size: 12px; color: #fff; white-space: nowrap; }
.hero-amt { font-size: 38px; font-weight: 650; letter-spacing: -.025em; margin: 6px 0 12px; line-height: 1.1; }
.hero-amt.neg { color: #f0c9bd; }
.hero-bar { height: 4px; border-radius: 4px; background: rgb(255 255 255 / 16%); overflow: hidden; }
.hero-bar i { display: block; height: 100%; border-radius: 4px; background: var(--mustard); }
.hero-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.hero-row.two { grid-template-columns: repeat(2, 1fr); margin-top: 4px; }
.hero-row small { display: block; font-size: 12px; color: rgb(255 255 255 / 70%); }
.hero-row b { font-size: 15px; font-weight: 600; }

.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.tiles a { background: var(--surface); border-radius: 16px; padding: 12px 4px 10px; display: grid; justify-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); box-shadow: 0 1px 2px rgb(23 38 30 / 4%); }
.tiles a .ic { color: var(--forest); }
.tiles a:active { background: var(--sage-soft); }

/* ---------- lists ---------- */
.list > li + li { border-top: 1px solid var(--line); }
.row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 0; min-height: 56px; }
.grow { flex: 1; min-width: 0; display: block; }
.grow b { display: block; font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grow small { display: block; font-size: 12.5px; color: var(--ink-3); }
.tips .grow b, .alert .grow b { white-space: normal; }
.plain { text-align: left; }
.circ { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--sage-soft); color: var(--forest); }
.circ.sm { width: 34px; height: 34px; }
.circ .ic { width: 20px; height: 20px; }
.circ.wants, .circ.warn { background: var(--mustard-soft); color: #7a5c0c; }
.circ.savings { background: #dff0f1; color: #17717a; }
.circ.in, .circ.good { background: #dcefe3; color: var(--good); }
.circ.bad { background: var(--bad-soft); color: var(--bad); }
.circ.info { background: var(--sage-soft); color: var(--ink-2); }
.amt { font-size: 14.5px; font-weight: 600; white-space: nowrap; }
.pos { color: var(--good); }
.bad-t { color: var(--bad) !important; }
.chev { width: 18px; height: 18px; color: var(--ink-3); }
.alert.seen { opacity: .6; }
.pill { height: 34px; padding: 0 14px; border-radius: 999px; background: var(--forest); color: #fff; font-size: 13px; font-weight: 600; flex: none; display: grid; place-items: center; }
.pill.done { width: 34px; padding: 0; background: #dcefe3; color: var(--good); }
.pill .ic { width: 18px; height: 18px; }
.foot-line { display: flex; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 12px; font-size: 13.5px; color: var(--ink-2); }
.foot-line b { color: var(--ink); }

.empty { display: grid; justify-items: center; text-align: center; gap: 4px; padding: 18px 8px 10px; }
.empty > .ic { width: 30px; height: 30px; color: var(--ink-3); margin-bottom: 4px; }
.empty b { font-size: 14.5px; }
.empty p { font-size: 13px; color: var(--ink-3); max-width: 30ch; }
.empty .btn { margin-top: 10px; }

/* ---------- controls ---------- */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 52px; padding: 0 20px; border-radius: 14px; background: var(--forest); color: #fff; font-weight: 600; font-size: 15px; }
.btn:active { background: var(--forest-deep); }
.btn.soft { background: var(--sage-soft); color: var(--forest); }
.btn.soft:active { background: var(--sage); }
.btn.danger { color: var(--bad); background: var(--bad-soft); }
.btn.sm { width: auto; min-height: 40px; padding: 0 14px; font-size: 13.5px; border-radius: 12px; }
.btn .ic { width: 18px; height: 18px; }
.actions { display: flex; gap: 8px; margin-top: 12px; }
.actions.wrap { flex-wrap: wrap; }

.seg { display: flex; background: var(--sage-soft); border-radius: 12px; padding: 3px; }
.page > .seg { background: var(--surface); box-shadow: 0 1px 2px rgb(23 38 30 / 4%); }
.seg button { flex: 1; min-height: 38px; border-radius: 10px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); text-align: center; }
.seg button.on { background: var(--forest); color: #fff; }
.seg i { font-style: normal; opacity: .7; font-weight: 500; }
.switcher { display: flex; align-items: center; justify-content: space-between; background: var(--surface); border-radius: 14px; padding: 5px; box-shadow: 0 1px 2px rgb(23 38 30 / 4%); text-align: center; }
.switcher b { font-size: 14.5px; font-weight: 650; display: block; }
.switcher small { font-size: 12px; color: var(--ink-3); }

.stat-row { display: flex; gap: 10px; }
.stat-row.in { margin: 14px 0 6px; }
.stat { flex: 1; min-width: 0; background: var(--surface); border-radius: 14px; padding: 10px 12px; box-shadow: 0 1px 2px rgb(23 38 30 / 4%); }
.stat-row.in .stat { background: var(--sage-soft); box-shadow: none; }
.stat small { display: block; font-size: 12px; color: var(--ink-3); }
.stat b { font-size: 16px; font-weight: 650; letter-spacing: -.01em; }
.stat em { display: block; font-style: normal; font-size: 11.5px; color: var(--ink-3); }

.form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; min-width: 0; }
.field > span { font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.field > small { font-size: 12px; color: var(--ink-3); }
.input, .select { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.input:focus-within, .select:focus-within { border-color: var(--forest); box-shadow: 0 0 0 3px rgb(31 77 58 / 10%); }
.input input, .select select { flex: 1; min-width: 0; border: 0; outline: 0; background: none; height: 50px; font-size: 16px; }
.input.big input { font-size: 19px; font-weight: 600; }
.select select { appearance: none; -webkit-appearance: none; padding-right: 4px; }
.select > .ic { width: 18px; height: 18px; color: var(--ink-2); pointer-events: none; }
.select.with-icon { padding-left: 8px; }
.cur { font-style: normal; font-weight: 600; font-size: 17px; color: var(--ink-2); }
.clear { font-size: 12.5px; color: var(--ink-2); padding: 8px 2px; }
textarea { width: 100%; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; font-size: 14.5px; resize: vertical; outline: 0; background: var(--surface); }
textarea:focus { border-color: var(--forest); }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: start; }
.error { color: var(--bad); font-size: 13px; }
.error:empty { display: none; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.toggle b { display: block; font-size: 14.5px; font-weight: 600; }
.toggle small { display: block; font-size: 12.5px; color: var(--ink-3); }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle i { width: 46px; height: 28px; border-radius: 14px; background: var(--line); position: relative; flex: none; transition: background .2s; }
.toggle i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / 20%); transition: transform .2s var(--ease); }
.toggle input:checked + i { background: var(--forest); }
.toggle input:checked + i::after { transform: translateX(18px); }
.toggle input:focus-visible + i { outline: 2px solid var(--forest); outline-offset: 2px; }

/* ---------- wishlist ---------- */
.wish-head { display: flex; align-items: center; gap: 12px; }
.pick input { position: absolute; opacity: 0; }
.pick span { width: 26px; height: 26px; border-radius: 8px; border: 1.5px solid var(--ink-3); display: grid; place-items: center; color: transparent; }
.pick span .ic { width: 16px; height: 16px; stroke-width: 2.4; }
.pick input:checked + span { background: var(--forest); border-color: var(--forest); color: #fff; }
.pick input:focus-visible + span { outline: 2px solid var(--forest); outline-offset: 2px; }
.preview { background: var(--sage-soft); border-radius: 14px; padding: 12px; margin-top: 12px; display: grid; gap: 8px; }
.pv-row { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--ink-2); }
.pv-row b { color: var(--ink); font-weight: 650; }
.pv-bar { height: 6px; border-radius: 6px; background: var(--c-needs); overflow: hidden; display: flex; justify-content: flex-end; }
.pv-bar i { background: var(--mustard); border-left: 2px solid var(--sage-soft); }
.preview.bad .pv-bar i { background: var(--bad); }
.pv-note { display: flex; gap: 6px; align-items: flex-start; font-size: 12.5px; color: var(--ink-2); }
.pv-note .ic { width: 16px; height: 16px; margin-top: 1px; }
.preview.bad .pv-note { color: var(--bad); }
.preview.good .pv-note .ic { color: var(--good); }

/* ---------- charts ---------- */
.donut-wrap { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: center; padding: 6px 0 4px; }
.donut { width: 160px; height: 160px; }
.donut-num { font-size: 26px; font-weight: 650; fill: var(--ink); letter-spacing: -.02em; }
.donut-sub { font-size: 12px; fill: var(--ink-3); }
.arc { transition: opacity .15s; }
.legend { display: grid; gap: 10px; flex: 1; min-width: 130px; }
.legend li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); }
.legend b { margin-left: auto; color: var(--ink); font-weight: 650; }
.dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }
.meters { display: grid; gap: 12px; margin-top: 14px; }
.meters + .hint { margin-top: 12px; }
.hb-top { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; margin-bottom: 5px; }
.hb-label { display: flex; align-items: center; gap: 7px; color: var(--ink-2); min-width: 0; }
.hb-label .ic { width: 16px; height: 16px; }
.hb-val { font-weight: 650; white-space: nowrap; }
.hb-val .muted { font-weight: 500; }
.hb-track { position: relative; height: 8px; border-radius: 4px; background: var(--sage-soft); }
.hb-track i { display: block; height: 100%; border-radius: 4px; min-width: 2px; }
.hb-track .plan { position: absolute; top: -3px; width: 2px; height: 14px; background: var(--ink); border-radius: 1px; }
.meter-note { font-size: 12px; color: var(--bad); margin-top: 3px; }
.hbars { display: grid; gap: 12px; }
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 3; }
.chart .base { stroke: var(--line); stroke-width: 1; }
.chart .axis { font-size: 9.5px; fill: var(--ink-3); }
.chart .ref { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 4 3; }
.chart .ref-t { fill: var(--ink-2); }
[data-tip] { cursor: pointer; outline: none; }
.tipbox { position: absolute; z-index: 60; line-height: 1.4; background: var(--ink); color: #fff; font-size: 12.5px; padding: 6px 10px; border-radius: 8px; pointer-events: none; opacity: 0; max-width: 240px; top: 0; left: 0; }
.tipbox.show { opacity: 1; }

/* ---------- wallet ---------- */
.paycard { position: relative; overflow: hidden; aspect-ratio: 1.62; border-radius: 18px; padding: 16px 18px; color: #fff; background: linear-gradient(140deg, #2a6a50 0%, var(--forest) 45%, var(--forest-deep) 100%); display: flex; flex-direction: column; }
.paycard.alt { background: linear-gradient(140deg, #3b4a2a 0%, #2b3a22 50%, #1d2a1a 100%); }
.pc-arcs { position: absolute; inset: 0; width: 100%; height: 100%; }
.pc-arcs circle { fill: none; stroke: var(--mustard); stroke-opacity: .28; stroke-width: 1; }
.pc-top, .pc-bot { display: flex; justify-content: space-between; font-size: 12px; position: relative; color: rgb(255 255 255 / 80%); }
.pc-chip { width: 34px; height: 25px; border-radius: 6px; background: linear-gradient(135deg, #e9d48f, var(--mustard)); margin-top: auto; position: relative; }
.pc-num { font-size: 18px; letter-spacing: .08em; margin: 12px 0 8px; position: relative; white-space: pre; }
.pc-bot { font-size: 12.5px; letter-spacing: .04em; }
#card-preview { max-width: 340px; margin: 0 auto; width: 100%; }

/* ---------- coach ---------- */
.chat { display: flex; flex-direction: column; gap: 8px; max-height: 46vh; overflow-y: auto; padding: 4px 0 8px; }
.msg { max-width: 88%; padding: 10px 13px; border-radius: 16px; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.user { align-self: flex-end; background: var(--forest); color: #fff; border-bottom-right-radius: 5px; }
.msg.assistant { align-self: flex-start; background: var(--sage-soft); border-bottom-left-radius: 5px; }
.msg.thinking { color: var(--ink-3); }
.msg.thinking::after { content: '...'; animation: blink 1.2s steps(4) infinite; display: inline-block; overflow: hidden; vertical-align: bottom; width: 0; }
@keyframes blink { to { width: 1.2em; } }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 10px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip-btn { flex: none; border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; font-size: 12.5px; color: var(--ink-2); background: var(--surface); }
.chat-form { display: flex; gap: 8px; align-items: center; }
.chat-form input { flex: 1; min-width: 0; height: 46px; border: 1px solid var(--line); border-radius: 23px; padding: 0 16px; font-size: 16px; outline: 0; }
.chat-form input:focus { border-color: var(--forest); }
.chat-form .icon-btn { width: 46px; height: 46px; }

/* ---------- tab bar ---------- */
.tabbar { position: fixed; z-index: 20; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 480px; display: grid; grid-template-columns: 1fr 1fr 72px 1fr 1fr; align-items: center; background: var(--forest); padding: 8px 6px calc(8px + var(--safe-bottom)); border-radius: 22px 22px 0 0; }
.tabbar a, .tabbar button:not(.fab) { display: grid; justify-items: center; gap: 2px; padding: 6px 0; font-size: 11px; color: rgb(255 255 255 / 55%); text-align: center; }
.tabbar .on { color: #fff; }
.tabbar .on .ic { color: var(--mustard); }
.fab { width: 54px; height: 54px; border-radius: 50%; background: var(--mustard); color: var(--ink); display: grid; place-items: center; justify-self: center; margin-top: -26px; border: 4px solid var(--bg); box-sizing: content-box; }
.fab:active { transform: scale(.95); }
.fab .ic { width: 24px; height: 24px; stroke-width: 2; }

/* ---------- sheet ---------- */
.sheet { position: fixed; inset: 0; z-index: 40; background: var(--bg); display: flex; flex-direction: column; transform: translateY(100%); visibility: hidden; transition: transform .32s var(--ease), visibility 0s .32s; }
.sheet.open { transform: none; visibility: visible; transition: transform .32s var(--ease); }
.sheet-body { flex: 1; overflow-y: auto; margin: -26px 16px 0; padding: 18px 16px calc(24px + var(--safe-bottom)); background: var(--surface); border-radius: var(--radius) var(--radius) 0 0; box-shadow: 0 1px 2px rgb(23 38 30 / 4%), 0 6px 20px rgb(23 38 30 / 5%); display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-content: start; }

.toast { position: fixed; z-index: 70; left: 50%; bottom: calc(100px + var(--safe-bottom)); transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 14px; font-size: 13.5px; display: flex; gap: 8px; align-items: center; opacity: 0; pointer-events: none; transition: .25s var(--ease); max-width: min(92vw, 440px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast .ic { width: 18px; height: 18px; color: var(--mustard); }

.select { cursor: pointer; }
.select select { pointer-events: none; text-overflow: ellipsis; }
.picker { position: fixed; inset: 0; z-index: 75; background: rgb(23 38 30 / 45%); display: flex; align-items: flex-end; justify-content: center; }
.picker-panel { width: 100%; max-width: 480px; max-height: 72vh; display: flex; flex-direction: column; background: var(--surface); border-radius: 24px 24px 0 0; padding: 8px 12px calc(12px + var(--safe-bottom)); box-shadow: 0 -10px 40px rgb(23 38 30 / 18%); animation: sheet-up .28s var(--ease) both; }
.picker-grip { width: 38px; height: 4px; border-radius: 4px; background: var(--line); margin: 2px auto 10px; flex: none; }
.picker-panel h2 { font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); padding: 0 10px 8px; }
#picker-list { overflow-y: auto; display: grid; gap: 2px; padding-bottom: 4px; }
.picker-opt { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 7px 10px; border-radius: 14px; font-size: 15.5px; color: var(--ink); }
.picker-opt span { flex: 1; min-width: 0; }
.picker-opt:active { background: var(--sage-soft); }
.picker-opt.on { background: var(--sage-soft); font-weight: 600; }
.picker-opt.on .circ { background: linear-gradient(135deg, #2a6a50, var(--forest-deep)); color: #fff; }
.pick-check { width: 20px; height: 20px; color: var(--forest); stroke-width: 2.2; }
@keyframes sheet-up { from { transform: translateY(40px); } }
form:not([data-kind="bill"]) .only-bill, form[data-kind="deduction"] .not-ded, form:not([data-kind="deduction"]) .only-ded,
form:not([data-kind="possible"]) .h-possible, form:not([data-kind="deduction"]) .h-deduction { display: none; }
.pill.ghost { background: var(--sage-soft) !important; color: var(--forest); }
.amt.muted { color: var(--ink-3); }
/* The small "i" help button. Scoped to that button: "info" is also an alert level name. */
button.info { display: inline-grid; place-items: center; width: 24px; height: 24px; margin: -4px 0 -4px 2px; vertical-align: middle; color: var(--ink-3); border-radius: 50%; }
button.info .ic { width: 16px; height: 16px; }
.hero button.info { color: rgb(255 255 255 / 70%); }
.calc { display: grid; gap: 7px; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px; }
.calc.flat { border-top: 0; margin-top: 0; padding-top: 0; }
.calc > div { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); }
.calc b { color: var(--ink); font-weight: 600; white-space: nowrap; }
.calc .total { border-top: 1px solid var(--line); padding-top: 9px; margin-top: 2px; color: var(--ink); font-weight: 600; }
.calc .total b { font-size: 17px; font-weight: 650; }
.month-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.month-chip { position: relative; display: block; }
.month-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.month-chip span { display: grid; place-items: center; min-height: 44px; border: 1px solid var(--line); border-radius: 12px; font-size: 13.5px; color: var(--ink-2); background: var(--surface); }
.month-chip input:checked + span { background: linear-gradient(135deg, #2a6a50 0%, var(--forest) 55%, var(--forest-deep) 100%); border-color: transparent; color: #fff; font-weight: 600; }
.month-chip input:focus-visible + span { outline: 2px solid var(--forest); outline-offset: 2px; }
.field.once-only > span { font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.confirm { position: fixed; inset: 0; z-index: 80; background: rgb(23 38 30 / 45%); display: grid; place-items: center; padding: 24px; }
.confirm-box { width: 100%; max-width: 360px; background: var(--surface); border-radius: 20px; padding: 20px; display: grid; gap: 16px; box-shadow: 0 20px 50px rgb(23 38 30 / 25%); }
.confirm-box p { font-size: 15px; white-space: pre-line; }
.confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.confirm-actions .btn { min-height: 48px; padding: 0 10px; }
.btn.danger-solid { background: var(--bad); color: #fff; }
.pv-row.total { border-top: 1px solid var(--line); padding-top: 8px; font-weight: 600; color: var(--ink); }
.pv-row.total b { font-size: 17px; }
.card > .preview { margin-top: 4px; }
.foot-line + .foot-line { border-top: 0; margin-top: 0; padding-top: 6px; }

.onboard { padding-bottom: 24px; }

/* ---------- splash ---------- */
.splash { position: fixed; inset: 0; z-index: 100; background: var(--forest); color: #f6f5ef; display: grid; place-content: center; justify-items: center; overflow: hidden; transition: opacity .45s ease; }
.splash.leaving { opacity: 0; }
.splash-stage { position: relative; width: 100vw; height: 190px; }
.snake-word { position: absolute; inset: 0; white-space: nowrap; font-size: clamp(44px, 14vw, 68px); font-weight: 700; letter-spacing: -.01em; line-height: 1; }
.snake-word span { display: inline-block; opacity: 0; will-change: transform; }
.snake-word span.free { position: absolute; top: 0; }
.snake-line { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.snake-line path { fill: none; stroke: var(--mustard); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.splash-tag { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: rgb(246 245 239 / 70%); opacity: 0; transform: translateY(6px); transition: .5s var(--ease); margin-top: -18px; }
.splash.settled .splash-tag { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media (min-width: 481px) { body { background: #e9e9e1; } #app { background: var(--bg); box-shadow: 0 0 0 1px var(--line); } }

/* ---------- green-to-gold gradient with a card-like shine ---------- */
.hero, .paycard {
  background:
    radial-gradient(130% 150% at 100% 0%, rgb(212 169 58 / 62%) 0%, rgb(212 169 58 / 18%) 34%, transparent 60%),
    linear-gradient(135deg, #2a6a50 0%, var(--forest) 42%, var(--forest-deep) 100%);
  box-shadow: 0 10px 26px rgb(23 58 44 / 22%), inset 0 1px 0 rgb(255 255 255 / 14%);
}
.paycard.alt {
  background:
    radial-gradient(130% 150% at 100% 0%, rgb(212 169 58 / 78%) 0%, rgb(212 169 58 / 24%) 36%, transparent 62%),
    linear-gradient(135deg, #46562c 0%, #2b3a22 48%, #1d2a1a 100%);
}
.hero::after, .paycard::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(108deg, transparent 38%, rgb(255 255 255 / 5%) 44%, rgb(255 244 200 / 26%) 50%, rgb(255 255 255 / 5%) 56%, transparent 62%) no-repeat;
  background-size: 260% 100%; background-position: 130% 0;
  animation: sheen 7s ease-in-out infinite;
}
.paycard::after { animation-delay: 1.2s; }
@keyframes sheen { 0%, 62% { background-position: 130% 0; } 86%, 100% { background-position: -40% 0; } }
.hero > *, .paycard > * { position: relative; z-index: 1; }
.paycard > .pc-arcs { position: absolute; z-index: 0; }
.hero .chip { background: rgb(15 34 26 / 38%); }
.hero-bar i { background: linear-gradient(90deg, #b88f2a, #ecd27a); }
.fab { background: linear-gradient(145deg, #ecd27a 0%, var(--mustard) 48%, #b88f2a 100%); }
.btn:not(.soft):not(.danger-solid), .pill:not(.done), .seg button.on, .icon-btn.solid { background: linear-gradient(135deg, #2a6a50 0%, var(--forest) 55%, var(--forest-deep) 100%); }
.tabbar { background: linear-gradient(180deg, var(--forest) 0%, var(--forest-deep) 100%); }
.splash { background: radial-gradient(90% 60% at 85% 8%, rgb(212 169 58 / 32%) 0%, transparent 60%), linear-gradient(160deg, #2a6a50 0%, var(--forest) 45%, var(--forest-deep) 100%); }
@media (prefers-reduced-motion: reduce) { .hero::after, .paycard::after { display: none; } }

/* ---------- home quick actions, eye, receipts, lock ---------- */
.top-actions { display: flex; gap: 2px; }
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick .btn { width: 100%; background: var(--surface); box-shadow: 0 1px 2px rgb(23 38 30 / 4%); }
.receipt-box { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.receipt-box .btn { width: 100%; cursor: pointer; }
.receipt-box.has { display: flex; align-items: center; gap: 12px; padding: 8px; border: 1px solid var(--line); border-radius: 14px; }
.receipt-thumb { width: 52px; height: 52px; border-radius: 10px; overflow: hidden; background: var(--sage-soft); color: var(--ink-3); display: grid; place-items: center; flex: none; }
.receipt-thumb.lg { width: 64px; height: 64px; }
.receipt-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.receipt-card { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px; }
.viewer { position: fixed; inset: 0; z-index: 78; background: rgb(23 38 30 / 60%); display: grid; place-items: center; padding: 16px; }
.viewer-box { width: 100%; max-width: 480px; max-height: 92vh; display: flex; flex-direction: column; background: var(--surface); border-radius: 20px; overflow: hidden; }
.viewer-box header { display: flex; align-items: center; gap: 8px; padding: 10px 8px 10px 16px; border-bottom: 1px solid var(--line); }
.viewer-scroll { overflow-y: auto; padding: 14px 16px 18px; display: grid; gap: 14px; }
.viewer-scroll img { width: 100%; height: auto; border-radius: 12px; background: var(--sage-soft); }
.viewer-scroll .calc { border-top: 0; margin: 0; padding: 0; }
.lock { min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: var(--sage); }
.lock-box { width: 100%; max-width: 340px; display: grid; gap: 16px; justify-items: center; text-align: center; }
.lock-box form { width: 100%; }
.lock-box h1 { font-size: 26px; font-weight: 700; letter-spacing: -.01em; }
.lock-mark { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #2a6a50, var(--forest-deep)); }
.lock-box .input input { text-align: center; }
.desk { display: none !important; }

/* ---------- desktop: sidebar navigation, two-column pages, dialogs ---------- */
@media (min-width: 900px) {
  body { background: var(--bg); }
  #app { max-width: none; margin: 0; padding: 0 0 48px 248px; box-shadow: none; }
  .desk { display: flex !important; }
  .mob { display: none !important; }
  .tabbar { left: 0; top: 0; bottom: 0; transform: none; width: 248px; max-width: none; display: flex; flex-direction: column; align-items: stretch; gap: 3px; padding: 22px 14px; border-radius: 0; overflow-y: auto; }
  .tabbar > * { order: 2; }
  .tabbar .brand { order: 0; font-size: 22px; font-weight: 700; letter-spacing: -.01em; color: #fff !important; padding: 2px 12px 18px !important; }
  .tabbar a, .tabbar button:not(.fab) { display: flex; align-items: center; justify-items: start; gap: 12px; padding: 11px 12px; border-radius: 12px; font-size: 14px; text-align: left; color: rgb(255 255 255 / 68%); }
  .tabbar a:hover, .tabbar button:not(.fab):hover { background: rgb(255 255 255 / 7%); }
  .tabbar .on { background: rgb(255 255 255 / 12%); }
  .fab { order: 1; width: auto; height: 46px; margin: 0 0 12px; border: 0; border-radius: 14px; display: flex; gap: 8px; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; }
  .top { padding: 22px 32px 46px; }
  .top-title { text-align: left; }
  .top h1 { font-size: 22px; }
  .top > .icon-btn.ghost { display: none; }
  .top.tall .top-title { text-align: center; }
  .page { max-width: 1120px; margin: -26px auto 0; padding: 0 32px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
  .page > .hero, .page > .switcher, .page > .seg, .page > .stat-row, .page > .hint, .page > .quick { grid-column: 1 / -1; }
  .page > .tiles { display: none; }
  .page > .quick { max-width: 420px; }
  .page.onboard { grid-template-columns: minmax(0, 520px); justify-content: center; }
  .hero-amt { font-size: 44px; }
  .sheet { inset: auto; left: calc(50% + 124px); top: 50%; width: 520px; max-width: calc(100vw - 300px); max-height: 88vh; margin: 0; border-radius: 22px; overflow: hidden; transform: translate(-50%, -46%); opacity: 0; box-shadow: 0 0 0 100vmax rgb(23 38 30 / 45%), 0 30px 80px rgb(23 38 30 / 30%); transition: transform .25s var(--ease), opacity .2s ease, visibility 0s .25s; }
  .sheet.open { transform: translate(-50%, -50%); opacity: 1; transition: transform .25s var(--ease), opacity .2s ease; }
  .sheet .top { padding: 16px 16px 40px; }
  .sheet .top-title { text-align: center; }
  .sheet-body { margin: -26px 16px 16px; border-radius: var(--radius); }
  .picker { align-items: center; }
  .picker-panel { max-width: 420px; border-radius: 22px; }
  .picker-grip { display: none; }
  .toast { left: calc(50% + 124px); bottom: 28px; }
  .chat { max-height: 52vh; }
}

/* ---------- account ---------- */
.or { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--ink-3); }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.link.center { justify-self: center; }

/* ---------- receipt thumbnails in history, fund pages ---------- */
.receipt-thumb.sm { width: 40px; height: 40px; }
.card-head.as-btn { width: 100%; text-align: left; }
.card-head.as-btn h2 { display: flex; align-items: center; gap: 2px; }
.calc b.wrap { white-space: normal; text-align: right; font-weight: 500; }
.calc small { font-size: 12px; }

/* ---------- fixes: eye beside the amount, fixed-size text boxes, sign-in screen ---------- */
textarea { resize: none; }
.hero-amt { display: flex; align-items: center; gap: 10px; }
.eye { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: rgb(255 255 255 / 78%); flex: none; }
.eye:active { background: rgb(255 255 255 / 12%); }
.eye .ic { width: 22px; height: 22px; }
.lock-box.wide { max-width: 380px; padding: 28px 24px; background: var(--surface); border-radius: 22px; box-shadow: 0 10px 40px rgb(23 38 30 / 10%); }
.lock-box.wide .field { text-align: left; }
.lock-box.wide .input input { text-align: left; }
.lock-box > .btn { width: 100%; }
#side-open { display: none; }

/* ---------- desktop, second pass ---------- */
@media (min-width: 900px) {
  body { font-size: 15px; }
  #app { transition: padding-left .25s var(--ease); }
  #app.bare { padding-left: 0; }
  .tabbar { transition: transform .25s var(--ease); padding: 20px 14px; gap: 2px; }
  body.side-off #app { padding-left: 0; }
  body.side-off .tabbar { transform: translateX(-100%); }
  body.side-off #side-open { display: grid; position: fixed; z-index: 21; top: 16px; left: 16px; background: var(--surface); box-shadow: 0 1px 2px rgb(23 38 30 / 8%), 0 4px 14px rgb(23 38 30 / 8%); }
  #app.bare ~ #side-open { display: none !important; }
  body.side-off .top { padding-left: 76px; }
  body.side-off .sheet { left: 50%; }
  body.side-off .toast { left: 50%; }

  /* sidebar */
  .tabbar .brand { display: flex !important; align-items: center; justify-content: space-between; padding: 0 4px 18px 12px !important; }
  .tabbar .brand a { display: block; padding: 0; font-size: 21px; font-weight: 700; letter-spacing: -.02em; color: #fff; background: none !important; }
  .tabbar .brand .icon-btn { display: grid; padding: 0; color: rgb(255 255 255 / 60%); }
  .tabbar .brand .icon-btn:hover { color: #fff; background: rgb(255 255 255 / 10%); }
  .tabbar a, .tabbar button:not(.fab):not(.icon-btn) { font-size: 14.5px; font-weight: 500; padding: 10px 12px; }
  .tabbar .on { color: #fff; font-weight: 600; }
  .fab { height: 44px; margin: 0 0 14px; padding: 0 14px; justify-content: flex-start; gap: 10px; border-radius: 12px; font-size: 14.5px; font-weight: 600; box-shadow: 0 1px 0 rgb(255 255 255 / 30%) inset, 0 6px 16px rgb(0 0 0 / 18%); }
  .fab .ic { width: 20px; height: 20px; }

  /* page: header and content share one left edge; cards flow into as many columns as fit */
  .top { padding: 26px 40px 50px; }
  .top h1 { font-size: 24px; letter-spacing: -.02em; }
  .hello b { font-size: 24px; }
  .page { display: block; max-width: 1360px; margin: -30px 0 0; padding: 0 40px; column-width: 400px; column-gap: 20px; }
  .page > * { margin: 0 0 20px; break-inside: avoid; }
  .page > .hero, .page > .switcher, .page > .seg, .page > .stat-row, .page > .hint, .page > .quick { column-span: all; }
  .page > .switcher, .page > .seg { max-width: 420px; }
  .page > .quick { max-width: 420px; }
  .page > .stat-row { max-width: 860px; }
  .card { padding: 20px; border-radius: 20px; }
  .card-head h2, .card-head h3 { font-size: 16px; }
  .grow b { font-size: 15px; }
  .hero { padding: 26px 28px; border-radius: 24px; }
  .hero-top { font-size: 14px; }
  .hero-amt { font-size: 52px; margin: 8px 0 16px; }
  .hero-row { max-width: 640px; margin-top: 18px; }
  .hero-row small { font-size: 13px; }
  .hero-row b { font-size: 18px; }
  .hero-bar { height: 5px; }
  .stat { padding: 14px 16px; }
  .stat b { font-size: 19px; }
  .quick .btn { min-height: 46px; font-size: 14.5px; }
  .page.onboard { display: grid; column-width: auto; grid-template-columns: minmax(0, 1fr); max-width: 560px; margin: -30px auto 0; gap: 16px; }
  .page.onboard > * { margin: 0; }

  /* coach: tips on the left, a tall chat on the right */
  .page.coach { display: grid; column-width: auto; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 20px; align-items: start; }
  .page.coach > * { margin: 0; }
  .page.coach > .card:last-child { display: flex; flex-direction: column; height: calc(100dvh - 130px); min-height: 420px; }
  .page.coach .chat { flex: 1; max-height: none; min-height: 0; padding: 6px 4px 12px; }
  .page.coach .chips { flex-wrap: wrap; overflow: visible; }
  .page.coach .msg { font-size: 15px; max-width: 72%; padding: 12px 16px; }
  .page.coach .chat-form input { height: 50px; }
  .page.coach .chat-form .icon-btn { width: 50px; height: 50px; }
  .page.coach .empty { margin: auto; }

  /* dialogs size to their content instead of collapsing */
  .sheet { height: auto; }
  .sheet-body { flex: 0 1 auto; min-height: 120px; }
}
@media (min-width: 900px) and (max-width: 1180px) {
  .page.coach { grid-template-columns: minmax(0, 1fr); }
  .page.coach > .card:last-child { height: 70dvh; }
}
.lock-box .or { width: 100%; }
@media (min-width: 900px) { .page { max-width: 1640px; } }

/* ---------- header actions (eye on every page), typing dots, sign out ---------- */
.top:not(.home-top) { display: grid; grid-template-columns: 1fr auto 1fr; }
.top:not(.home-top) > :first-child { justify-self: start; }
.top:not(.home-top) > :last-child { justify-self: end; }
.top-actions { display: flex; align-items: center; gap: 2px; }
.msg.thinking { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-2); }
.msg.thinking::after { content: none; }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--forest); opacity: .35; animation: dot 1.2s ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.side-foot { display: none; }
button.row { text-align: left; }

/* older browsers: 100vh before the newer dynamic unit */
#app { min-height: 100vh; min-height: 100dvh; }
.lock { min-height: 100vh; min-height: 100dvh; }

@media (min-width: 900px) {
  .top:not(.home-top) { display: flex; }
  .top:not(.home-top) .top-title { flex: 1; }
  .tabbar .side-foot { display: grid !important; order: 3; margin-top: auto; gap: 6px; padding: 14px 4px 0; border-top: 1px solid rgb(255 255 255 / 12%); }
  .tabbar .side-foot small { padding: 0 12px; font-size: 12.5px; color: rgb(255 255 255 / 55%); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tabbar .side-foot button { width: 100%; }
  .page.coach > .card:last-child { height: calc(100vh - 130px); height: calc(100dvh - 130px); }
}

/* ---------- eye beside the page title; warning colours on bars ---------- */
.top h1 { display: inline-flex; align-items: center; gap: 4px; }
.top h1 .icon-btn { color: var(--ink-2); }
.top h1 .icon-btn .ic { width: 20px; height: 20px; }
.hb-track i { transition: background-color .2s; }
.meter-note.warn { color: #a55f14; }
.meter-note.good { color: var(--good); }
.preview.warn .pv-bar i { background: var(--warn); }

/* ---------- footer and legal pages ---------- */
.foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 18px; padding: 26px 16px 8px; font-size: 12.5px; color: var(--ink-3); text-align: center; }
.foot span { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; }
.foot .link, .agree .link { font-size: inherit; font-weight: 600; color: var(--ink-2); padding: 0; }
.agree { font-size: 12px; color: var(--ink-3); }
.lock + .foot { margin-top: -84px; padding-bottom: 24px; position: relative; }
.lock { padding-bottom: 96px; }
.legal { display: grid; gap: 10px; font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.legal h3 { font-size: 15px; font-weight: 650; color: var(--ink); margin-top: 8px; }
.legal ul { list-style: disc; padding-left: 20px; display: grid; gap: 6px; }
.legal b { color: var(--ink); font-weight: 600; }
@media (min-width: 900px) {
  .foot { justify-content: space-between; max-width: 1640px; padding: 34px 40px 0; }
  #app.bare .foot { justify-content: center; max-width: none; }
}

/* ---------- intro: settled state is laid out by CSS, so it survives a resize ---------- */
.splash.settled .snake-word { display: flex; align-items: center; justify-content: center; }
.splash.settled .snake-word span { opacity: 1; }
/* ---------- Google's sign-in button slot ---------- */
.g-btn { width: 100%; min-height: 44px; display: grid; justify-items: center; }
.g-btn > .btn { width: 100%; }

/* ---------- search ---------- */
.search { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px; border-radius: 14px; background: var(--surface); box-shadow: 0 1px 2px rgb(23 38 30 / 4%), 0 6px 20px rgb(23 38 30 / 5%); color: var(--ink-3); }
.search input { flex: 1; min-width: 0; height: 46px; border: 0; outline: 0; background: none; font-size: 16px; color: var(--ink); }
.search input::-webkit-search-cancel-button { cursor: pointer; }
.search:focus-within { box-shadow: 0 0 0 2px var(--forest); color: var(--forest); }
.flow { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.flow:empty { display: none; }
.side-user { display: none; }

@media (min-width: 900px) {
  .page > .search { column-span: all; max-width: 520px; }
  /* wrappers step aside so their cards join the page's columns */
  .page > .flow { display: contents; }
  .page > .flow > * { margin: 0 0 20px; break-inside: avoid; }
  .page > .flow > .switcher, .page > .flow > .stat-row { column-span: all; max-width: 420px; }
  .page > .flow > .stat-row { max-width: 860px; }

  /* account button at the foot of the sidebar, with its menu */
  .tabbar .side-user { display: block !important; order: 3; margin-top: auto; position: relative; padding-top: 12px; border-top: 1px solid rgb(255 255 255 / 12%); }
  .side-user summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; cursor: pointer; font-size: 14.5px; font-weight: 500; color: rgb(255 255 255 / 80%); }
  .side-user summary::-webkit-details-marker { display: none; }
  .side-user summary:hover, .side-user[open] summary { background: rgb(255 255 255 / 10%); color: #fff; }
  .side-user summary span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .side-user summary .chev { color: inherit; transform: rotate(180deg); transition: transform .2s; }
  .side-user[open] summary .chev { transform: none; }
  .user-menu { position: absolute; left: 0; right: 0; bottom: calc(100% - 4px); display: grid; gap: 2px; padding: 6px; border-radius: 14px; background: var(--surface); box-shadow: 0 10px 30px rgb(0 0 0 / 28%); }
  .tabbar .user-menu a, .tabbar .user-menu button { color: var(--ink) !important; background: none; width: 100%; padding: 10px 12px; font-weight: 500; }
  .tabbar .user-menu a:hover, .tabbar .user-menu button:hover { background: var(--sage-soft); }
  .tabbar .user-menu .ic { color: var(--forest) !important; }
  .tabbar .user-menu button { color: var(--bad) !important; }
  .tabbar .user-menu button .ic { color: var(--bad) !important; }
}

/* ==========================================================================
   Desktop only: a minimal theme in the style of shadcn/ui (flat headers,
   bordered cards, small radii, light sidebar). Phones keep the original look.
   ========================================================================== */
@media (min-width: 900px) {
  :root { --bg: #fafaf8; --line: #e6e7e1; --radius: 12px; --muted-bg: #f2f3ee; }
  html, body { background: var(--bg); }

  /* surfaces */
  .card, .stat, .switcher, .tiles a, .search, .quick .btn { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 1px 2px rgb(16 24 20 / 4%); }
  .card { padding: 16px; }
  .stat-row.in .stat { border: 0; box-shadow: none; background: var(--muted-bg); }
  .circ { border-radius: 10px; }
  .receipt-thumb { border-radius: 8px; }
  .hero { border-radius: 14px; }
  .preview { border-radius: 10px; background: var(--muted-bg); }

  /* headers: plain, no coloured band */
  .top { background: transparent; padding: calc(14px + var(--safe-top)) 16px 12px; }
  .top h1 { font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
  .top.tall { padding: calc(36px + var(--safe-top)) 16px 20px; }
  .page { margin-top: 0; }
  .hello b { font-size: 19px; font-weight: 600; }
  .icon-btn { border-radius: 10px; }
  .icon-btn:hover { background: var(--muted-bg); }

  /* buttons */
  .btn { min-height: 44px; border-radius: 10px; font-size: 14.5px; font-weight: 550; }
  .btn:not(.soft):not(.danger-solid), .pill:not(.done), .icon-btn.solid { background: var(--forest); }
  .btn:not(.soft):not(.danger-solid):hover { background: var(--forest-deep); }
  .btn.soft { background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
  .btn.soft:hover, .btn.soft:active { background: var(--muted-bg); }
  .btn.soft.danger, .btn.danger { background: var(--surface); border: 1px solid #edd5ce; color: var(--bad); }
  .btn.sm { min-height: 36px; border-radius: 9px; font-size: 13.5px; }
  .quick .btn { box-shadow: none; }
  .pill { height: 32px; border-radius: 8px; padding: 0 12px; }
  .pill.done { width: 32px; }
  .pill.ghost { border: 1px solid var(--line); background: var(--surface) !important; }
  .chip-btn { border-radius: 8px; }
  .link { font-weight: 550; }

  /* form controls */
  .input, .select { min-height: 44px; border-radius: 10px; }
  .input input, .select select { height: 42px; }
  .input.big input { font-size: 18px; }
  .input:focus-within, .select:focus-within { box-shadow: 0 0 0 3px rgb(31 77 58 / 12%); }
  textarea { border-radius: 10px; }
  .field > span { font-size: 12.5px; font-weight: 550; letter-spacing: 0; text-transform: none; color: var(--ink); }
  .field.once-only > span { font-size: 12.5px; font-weight: 550; letter-spacing: 0; text-transform: none; color: var(--ink); }
  .month-chip span { border-radius: 9px; min-height: 40px; }
  .month-chip input:checked + span { background: var(--forest); }
  .seg, .page > .seg { background: var(--muted-bg); border: 0; box-shadow: none; border-radius: 10px; padding: 3px; }
  .seg button { min-height: 34px; border-radius: 8px; font-weight: 550; }
  .seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgb(16 24 20 / 10%); }
  .toggle i { width: 42px; height: 24px; }
  .toggle i::after { width: 18px; height: 18px; }
  .pick span { border-radius: 6px; width: 22px; height: 22px; }

  /* bottom navigation (phones) */
  .tabbar { background: var(--surface); border-top: 1px solid var(--line); border-radius: 0; }
  .tabbar a, .tabbar button:not(.fab) { color: var(--ink-3); }
  .tabbar .on { color: var(--forest); }
  .tabbar .on .ic { color: var(--forest); }
  .fab { background: var(--forest); color: #fff; border-color: var(--surface); box-shadow: 0 4px 12px rgb(31 77 58 / 28%); }

  /* full-screen form page (phones) */
  .sheet { background: var(--surface); }
  .sheet .top { border-bottom: 1px solid var(--line); }
  .sheet-body { margin: 0; padding: 16px 16px calc(24px + var(--safe-bottom)); border-radius: 0; box-shadow: none; background: var(--surface); }

  /* overlays */
  .picker, .confirm, .viewer { background: rgb(10 16 13 / 50%); }
  .picker-panel { border-radius: 14px 14px 0 0; }
  .picker-panel h2 { font-size: 13px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--ink); }
  .picker-opt { border-radius: 8px; min-height: 44px; font-size: 15px; }
  .picker-opt.on .circ { background: var(--forest); }
  .confirm-box, .viewer-box { border: 1px solid var(--line); border-radius: 14px; }
  .toast { border-radius: 10px; }
  .tipbox { border-radius: 8px; }
  .lock { background: var(--bg); }
  .lock-box.wide { border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 1px 2px rgb(16 24 20 / 4%), 0 12px 32px rgb(16 24 20 / 6%); }
  .lock-mark { border-radius: 12px; background: var(--forest); width: 48px; height: 48px; }
  body { background: var(--bg); }
  #app { box-shadow: none; }

  /* light sidebar */
    .tabbar { background: var(--surface); border-top: 0; border-right: 1px solid var(--line); padding: 16px 12px; }
    .tabbar .brand { padding: 4px 4px 14px 10px !important; }
    .tabbar .brand a { color: var(--ink) !important; font-size: 19px; }
    .tabbar .brand .icon-btn { color: var(--ink-3); }
    .tabbar .brand .icon-btn:hover { color: var(--ink); background: var(--muted-bg); }
    .tabbar a, .tabbar button:not(.fab):not(.icon-btn) { color: var(--ink-2); border-radius: 8px; padding: 8px 10px; font-size: 14px; }
    .tabbar a:hover, .tabbar button:not(.fab):not(.icon-btn):hover { background: var(--muted-bg); color: var(--ink); }
    .tabbar .on { background: var(--muted-bg); color: var(--ink); font-weight: 600; }
    .tabbar .on .ic { color: var(--forest); }
    .fab { height: 40px; margin: 0 0 12px; border-radius: 10px; justify-content: center; background: var(--forest); color: #fff; box-shadow: none; font-size: 14px; }
    .fab:hover { background: var(--forest-deep); }
    .tabbar .side-user { border-top: 1px solid var(--line); }
    .side-user summary { color: var(--ink-2); border-radius: 8px; padding: 8px 10px; font-size: 14px; }
    .side-user summary:hover, .side-user[open] summary { background: var(--muted-bg); color: var(--ink); }
    .user-menu { border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgb(16 24 20 / 12%); }
    body.side-off #side-open { border: 1px solid var(--line); box-shadow: 0 1px 2px rgb(16 24 20 / 6%); top: 18px; }
  
    /* header and page */
    .top { padding: 24px 32px 16px; }
    .top h1 { font-size: 22px; font-weight: 650; }
    .hello b { font-size: 22px; }
    .page { margin: 0; padding: 0 32px; }
    .page.onboard { margin: 0 auto; }
    .card { padding: 18px; border-radius: var(--radius); }
    .hero { border-radius: 14px; padding: 24px 26px; }
    .hero-amt { font-size: 44px; }
    .foot { padding: 28px 32px 0; }
  
    /* dialog */
    .sheet { border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 0 0 100vmax rgb(10 16 13 / 50%), 0 24px 60px rgb(10 16 13 / 22%); }
    .sheet .top { padding: 14px 16px; }
    .sheet .top h1 { font-size: 17px; }
    .sheet-body { margin: 0; padding: 18px 20px 22px; border-radius: 0; }
    .picker-panel { border-radius: 14px; border: 1px solid var(--line); }
}

/* ---------- footer pinned to the bottom, version, drawn copyright mark ---------- */
#app { display: flex; flex-direction: column; }
.foot { margin-top: auto; }
.foot-c { display: inline-flex; align-items: center; gap: 5px; }
.foot-c .ic { width: 14px; height: 14px; }
.foot-v { color: var(--ink-3); }
.lock { flex: 1; min-height: 0; padding-bottom: 24px; }
.lock + .foot { margin-top: 0; padding-bottom: 24px; }
.hero-row { grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); }
.hero-row.two { grid-template-columns: repeat(2, 1fr); }

/* ---------- switches pause after use ---------- */
.toggle i, .pick span, .eye, [data-act="toggle-money"] { transition: opacity .2s; }
.toggles-wait .toggle, .toggles-wait .pick, .toggles-wait .eye, .toggles-wait [data-act="toggle-money"] { opacity: .45; pointer-events: none; cursor: progress; }

/* text stays text: no emoji-style rendering of symbols */
body { font-variant-emoji: text; }
.foot .foot-c { gap: 5px; }

/* ---------- search sheet ---------- */
#sheet-body .search { box-shadow: none; border: 1px solid var(--line); }
#search-results { display: grid; gap: 18px; }
.result-group .card-head { margin-bottom: 2px; }

/* ---------- phones: white bottom bar (the rest of the phone design is unchanged) ---------- */
@media (max-width: 899px) {
  .tabbar { background: var(--surface); border-top: 1px solid var(--line); border-radius: 0; }
  .tabbar a, .tabbar button:not(.fab) { color: var(--ink-3); }
  .tabbar .on { color: var(--forest); }
  .tabbar .on .ic { color: var(--forest); }
  .fab { background: var(--forest); color: #fff; border-color: var(--surface); box-shadow: 0 4px 12px rgb(31 77 58 / 28%); }
}

/* ---------- dialogs ---------- */
.sheet-x { visibility: hidden; }
::-webkit-scrollbar-thumb { border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgb(23 38 30 / 45%); }

@media (min-width: 900px) {
  /* Desktop dialog: title on the left, close on the right, roomy body, soft entrance. */
  .sheet { width: 480px; max-height: min(86vh, 780px); border-radius: 16px; border: 1px solid var(--line); background: var(--surface);
    box-shadow: 0 0 0 100vmax rgb(10 16 13 / 55%), 0 24px 64px rgb(10 16 13 / 28%); transform: translate(-50%, -48%) scale(.97); }
  .sheet.open { transform: translate(-50%, -50%) scale(1); }
  .sheet.wide { width: 660px; }
  .sheet .top { display: flex; align-items: center; gap: 12px; padding: 18px 16px 16px 24px; border-bottom: 1px solid var(--line); background: var(--surface); }
  .sheet .top > [aria-label="Back"] { display: none; }
  .sheet .top-title { flex: 1; text-align: left; }
  .sheet .top h1 { font-size: 18px; font-weight: 650; letter-spacing: -.01em; }
  .sheet-x { visibility: visible; color: var(--ink-3); }
  .sheet-x:hover { color: var(--ink); }
  .sheet-body { padding: 22px 24px 26px; gap: 16px; }
  .sheet .form { gap: 16px; }
  .sheet .lead { font-size: 14.5px; line-height: 1.55; }

  /* long reading */
  .legal { gap: 12px; font-size: 14.5px; line-height: 1.7; color: var(--ink-2); }
  .legal > p:first-child { font-size: 13px; }
  .legal h3 { margin-top: 10px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 15.5px; }
  .legal ul { gap: 8px; padding-left: 22px; }
  .legal li::marker { color: var(--ink-3); }

  /* the smaller overlays match */
  .confirm-box { max-width: 420px; padding: 24px; border-radius: 16px; gap: 20px; box-shadow: 0 24px 64px rgb(10 16 13 / 28%); }
  .confirm-box p { font-size: 15px; line-height: 1.55; }
  .confirm-actions .btn { min-height: 42px; }
  .picker-panel { padding: 14px; border-radius: 16px; box-shadow: 0 24px 64px rgb(10 16 13 / 28%); }
  .picker-panel h2 { padding: 4px 10px 10px; font-size: 14px; }
  .viewer-box { border-radius: 16px; box-shadow: 0 24px 64px rgb(10 16 13 / 28%); }
  .viewer-box header { padding: 14px 12px 14px 20px; }
  .picker, .confirm, .viewer { background: rgb(10 16 13 / 55%); }
}

/* Dialogs and toasts sit in the centre of the whole window, not the area beside the sidebar. */
@media (min-width: 900px) {
  .sheet { left: 50%; max-width: calc(100vw - 48px); }
  .toast { left: 50%; }
}

/* ---------- pay schedule fields: only the ones for the chosen frequency show ---------- */
.pay .pt { display: none; }
.pay[data-type="semi"] .pt-semi, .pay[data-type="monthly"] .pt-monthly, .pay[data-type="weekly"] .pt-weekly, .pay[data-type="biweekly"] .pt-biweekly { display: block; }

/* ---------- eye beside an amount (never beside a title) ---------- */
.eye-in { display: inline-grid; place-items: center; width: 26px; height: 26px; margin: -4px 0 -4px 4px; vertical-align: middle; border-radius: 50%; color: var(--ink-3); }
.eye-in .ic { width: 16px; height: 16px; }
.toggles-wait .eye-in { opacity: .45; pointer-events: none; }

/* ---------- file chooser ---------- */
input[type="file"] { width: 100%; font-size: 13.5px; color: var(--ink-2); }
input[type="file"]::file-selector-button { margin-right: 12px; height: 38px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
input[type="file"]::file-selector-button:hover { background: var(--sage-soft); }

/* ---------- sign-in: layered logo and card ---------- */
.lock { isolation: isolate; }
.brand-stack { position: relative; width: 72px; height: 72px; margin: 6px 0 8px; }
.brand-stack i, .brand-stack span { position: absolute; inset: 0; border-radius: 20px; }
.brand-stack i:nth-child(1) { background: var(--mustard); transform: rotate(-13deg) translate(-9px, 5px); }
.brand-stack i:nth-child(2) { background: #8fb39a; transform: rotate(10deg) translate(9px, 4px); }
.brand-stack span { display: grid; place-items: center; background: linear-gradient(145deg, #2a6a50, var(--forest-deep)); box-shadow: 0 12px 26px rgb(23 58 44 / 32%), inset 0 1px 0 rgb(255 255 255 / 18%); }
.brand-stack svg { width: 48px; height: 48px; }
.auth-card { position: relative; }
.auth-card::before, .auth-card::after { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--surface); border: 1px solid var(--line); }
.auth-card::before { transform: rotate(-2.4deg) translateY(8px); opacity: .75; }
.auth-card::after { transform: rotate(2deg) translateY(14px); opacity: .5; }
.auth-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; width: 100%; }
.auth-card .lead.center { font-size: 17px; font-weight: 650; color: var(--ink); }
.auth-card .muted b { color: var(--ink); }

/* ---------- phones: compact, even action buttons under a card ---------- */
@media (max-width: 899px) {
  .card > .actions { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }
  .card > .actions .btn { width: 100%; min-height: 40px; padding: 0 6px; gap: 6px; border-radius: 10px; font-size: 13px; font-weight: 600; white-space: nowrap; background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
  .card > .actions .btn .ic { width: 15px; height: 15px; color: var(--ink-3); }
  .card > .actions .btn:not(.soft) { background: var(--forest); border-color: var(--forest); color: #fff; }
  .card > .actions .btn:not(.soft) .ic { color: #fff; }
  .card > .actions .btn.danger { color: var(--bad); border-color: #edd5ce; }
  .card > .actions .btn.danger .ic { color: var(--bad); }
}

/* ---------- iPhone walkthrough: three frames that loop like a short video ---------- */
.ios-demo { display: grid; place-items: center; padding: 8px 0 4px; }
.ios-phone { position: relative; width: 210px; height: 330px; border-radius: 30px; border: 6px solid var(--ink); background: var(--bg); overflow: hidden; box-shadow: 0 14px 34px rgb(23 38 30 / 18%); }
.ios-frame { position: absolute; inset: 0; opacity: 0; animation: ios-show 9s infinite; }
.ios-frame.f2 { animation-delay: 3s; }
.ios-frame.f3 { animation-delay: 6s; }
@keyframes ios-show { 0% { opacity: 0; } 4%, 30% { opacity: 1; } 34%, 100% { opacity: 0; } }
.ios-url { margin: 12px 12px 0; padding: 6px 10px; border-radius: 9px; background: var(--sage-soft); font-size: 10.5px; color: var(--ink-2); text-align: center; }
.ios-page { display: grid; gap: 8px; padding: 12px; }
.ios-page i { display: block; height: 46px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
.ios-page i:first-child { height: 76px; background: var(--forest); border: 0; }
.ios-bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-around; align-items: center; height: 44px; background: var(--surface); border-top: 1px solid var(--line); color: var(--ink-3); }
.ios-bar .ic { width: 18px; height: 18px; }
.ios-bar .tap { color: var(--forest); }
.tap { position: relative; }
.ios-bar .tap::after, .ios-row.tap::after { content: ''; position: absolute; inset: -9px; border-radius: 50%; border: 2px solid var(--mustard); animation: ios-pulse 1.2s ease-out infinite; }
.ios-row.tap::after { inset: 0; border-radius: 9px; }
@keyframes ios-pulse { from { transform: scale(.85); opacity: 1; } to { transform: scale(1.25); opacity: 0; } }
.ios-row.tap::after { animation-name: ios-glow; }
@keyframes ios-glow { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
.ios-sheet { position: absolute; left: 8px; right: 8px; bottom: 8px; display: grid; gap: 6px; padding: 10px; border-radius: 16px; background: var(--surface); box-shadow: 0 -6px 20px rgb(23 38 30 / 12%); }
.ios-sheet-head { display: flex; align-items: center; gap: 8px; padding: 2px 2px 8px; border-bottom: 1px solid var(--line); font-size: 12px; }
.ios-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border-radius: 9px; background: var(--sage-soft); font-size: 11.5px; color: var(--ink-2); }
.ios-row .ic { width: 15px; height: 15px; }
.ios-row.tap { color: var(--ink); font-weight: 600; background: var(--mustard-soft); }
.ios-home { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 10px; padding: 26px 16px; }
.ios-home i { display: block; aspect-ratio: 1; border-radius: 10px; background: var(--line); }
.ios-app { display: grid; justify-items: center; gap: 3px; min-width: 0; animation: ios-pop 9s infinite; animation-delay: 6s; }
.ios-app small { font-size: 8px; color: var(--ink-2); white-space: nowrap; }
@keyframes ios-pop { 0%, 3% { transform: scale(.4); } 8%, 100% { transform: scale(1); } }
.mini-mark { display: grid; place-items: center; width: 100%; aspect-ratio: 1; max-width: 36px; border-radius: 10px; background: linear-gradient(145deg, #2a6a50, var(--forest-deep)); }
.mini-mark svg { width: 70%; height: 70%; }
.ios-sheet-head .mini-mark { width: 26px; border-radius: 7px; }
.ios-steps { display: grid; gap: 10px; padding-left: 22px; font-size: 14px; color: var(--ink-2); }
.ios-steps b { color: var(--ink); }
.ios-steps .ic { width: 16px; height: 16px; vertical-align: -3px; color: var(--forest); }
.ios-steps li { padding: 6px 8px; border-radius: 9px; animation: ios-step 9s infinite; }
.ios-steps .s2 { animation-delay: 3s; }
.ios-steps .s3 { animation-delay: 6s; }
@keyframes ios-step { 0%, 33% { background: var(--sage-soft); } 34%, 100% { background: transparent; } }
.auth-card .link .ic { width: 15px; height: 15px; vertical-align: -3px; }

/* ---------- phones: the tab bar ends above the system navigation area ---------- */
@media (max-width: 899px) {
  .tabbar { bottom: var(--safe-bottom); padding-bottom: 6px; }
  /* the strip under it takes the page colour, so it reads as the system bar, not a tall white chin */
  .tabbar::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: var(--safe-bottom); background: var(--bg); }
  /* four figures on the balance card sit two by two instead of leaving one alone */
  .hero-row:has(> :nth-child(4)) { grid-template-columns: repeat(2, 1fr); gap: 12px 8px; }
}

/* ---------- install buttons on the sign-in screen (Apple / Android marks) ---------- */
svg.brand { width: 18px; height: 18px; flex: none; }
.get-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; width: 100%; }
.get { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font-size: 12.5px; font-weight: 600; line-height: 1.2; text-align: left; transition: border-color .2s, background .2s, transform .2s var(--ease); }
.get:hover { border-color: var(--forest); background: var(--sage-soft); }
.get:active { transform: scale(.97); }
.get svg.brand { color: var(--forest); }
.get-hero { display: grid; place-items: center; width: 64px; height: 64px; margin: 4px auto 14px; border-radius: 20px; background: var(--sage-soft); color: var(--forest); }
.get-hero svg.brand { width: 32px; height: 32px; }
.ios-steps.still li { animation: none; }
.ios-steps + .btn { margin-top: 14px; text-decoration: none; }

/* ---------- receipt scanning: scan line over the photo, steps lighting up in turn ---------- */
.receipt-box.scan { align-items: stretch; padding: 10px; background: var(--sage-soft); border-color: transparent; }
.receipt-box.scan .icon-btn { align-self: flex-start; }
.scan-photo { position: relative; flex: none; width: 76px; height: 104px; border-radius: 10px; overflow: hidden; background: var(--surface); color: var(--ink-3); display: grid; place-items: center; }
.scan-photo img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(.7) brightness(.96); }
.scan-photo::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1.5px rgb(31 77 58 / 35%); }
.scan-line { position: absolute; left: 0; right: 0; top: 0; height: 34%; background: linear-gradient(to bottom, transparent, rgb(212 169 58 / 38%)); border-bottom: 2px solid var(--mustard); animation: scan-sweep 1.8s cubic-bezier(.45, 0, .55, 1) infinite alternate; }
@keyframes scan-sweep { from { transform: translateY(-100%); } to { transform: translateY(294%); } }
.scan-info { display: flex; flex-direction: column; justify-content: center; gap: 7px; min-width: 0; }
.scan-info > b { font-size: 14px; }
.scan-dots { display: inline-flex; gap: 3px; margin-left: 5px; }
.scan-dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--forest); animation: scan-dot 1.2s infinite; }
.scan-dots i:nth-child(2) { animation-delay: .2s; }
.scan-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes scan-dot { 0%, 60%, 100% { opacity: .25; transform: none; } 30% { opacity: 1; transform: translateY(-2px); } }
.scan-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; font-size: 12.5px; }
.scan-steps li { display: flex; align-items: center; gap: 7px; color: var(--ink-3); animation: scan-step 5.4s infinite; }
.scan-steps li:nth-child(2) { animation-delay: 1.8s; }
.scan-steps li:nth-child(3) { animation-delay: 3.6s; }
.scan-steps .ic { width: 14px; height: 14px; flex: none; }
@keyframes scan-step { 0%, 33% { color: var(--forest); font-weight: 600; } 34%, 100% { color: var(--ink-3); font-weight: 400; } }
.scan-bar { height: 3px; border-radius: 2px; background: rgb(31 77 58 / 12%); overflow: hidden; }
.scan-bar i { display: block; width: 40%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--forest), var(--mustard)); animation: scan-bar 1.4s ease-in-out infinite; }
@keyframes scan-bar { from { transform: translateX(-110%); } to { transform: translateX(260%); } }
@media (prefers-reduced-motion: reduce) { .scan-line { transform: translateY(100%); } .scan-steps li { color: var(--forest); } }
.qr { display: flex; align-items: center; gap: 14px; margin-top: 14px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; }
.qr img { flex: none; width: 104px; height: 104px; border-radius: 8px; display: block; }
.qr span { font-size: 13px; color: var(--ink-2); line-height: 1.4; }
.qr b { display: block; color: var(--ink); font-size: 14px; margin-bottom: 2px; }
.qr + .link { display: block; margin: 14px auto 0; text-align: center; text-decoration: none; }

/* Phone card buttons: sized by their text, so a longer label ("Add expense") never spills over. */
@media (max-width: 899px) {
  .card > .actions { display: flex; flex-wrap: nowrap; gap: 6px; }
  .card > .actions .btn { flex: 1 1 auto; width: auto; min-width: 0; padding: 0 10px; gap: 5px; font-size: 12.5px; }
  .card > .actions .btn .ic { flex: none; width: 14px; height: 14px; }
}

/* ---------- contact / report a problem ---------- */
.fb-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.fb-head b { display: block; font-size: 15px; }
.fb-head small { color: var(--ink-2); font-size: 13px; }
.fb-mark { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--sage-soft); color: var(--forest); }
.fb-mark .ic { width: 22px; height: 22px; }
.fb-mark.warn { background: var(--mustard-soft); color: #8a6a14; }
.fb-mark.good { background: #dcefe3; color: var(--good); width: 56px; height: 56px; border-radius: 50%; }
.fb-done { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 18px 0 4px; }
.fb-done b { font-size: 17px; }
.fb-done .btn { margin-top: 10px; }
.form textarea { min-height: 120px; line-height: 1.45; }
.shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; position: relative; padding-bottom: 20px; }
.shot { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--sage-soft); }
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot button { position: absolute; top: 5px; right: 5px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: rgb(23 38 30 / 72%); color: #fff; }
.shot button .ic { width: 13px; height: 13px; }
.shot.add { display: grid; place-content: center; justify-items: center; gap: 4px; border: 1.5px dashed #c9cfbf; background: none; color: var(--ink-3); font-size: 12px; font-weight: 600; cursor: pointer; transition: border-color .2s, color .2s, background .2s; }
.shot.add:hover { border-color: var(--forest); color: var(--forest); background: var(--sage-soft); }
.shot.add .ic { width: 22px; height: 22px; }
.shots-n { position: absolute; right: 2px; bottom: 0; font-size: 11.5px; color: var(--ink-3); }
.side-help { display: none; }
@media (min-width: 900px) {
  /* small, quiet link just above the line over the account name */
  .tabbar .side-help { order: 3; margin-top: auto; margin-bottom: 6px; gap: 8px !important; padding: 6px 12px !important; font-size: 12.5px !important; font-weight: 500 !important; opacity: .62; background: none; }
  .tabbar .side-help:hover { opacity: 1; }
  .tabbar .side-help .ic { width: 15px; height: 15px; }
  .tabbar .side-help + .side-user { margin-top: 0; }
}

/* Eye toggle in the small figure tiles: beside the label on phones, beside the amount on desktop. */
.eye-in.eye-lab { display: none; }
@media (max-width: 899px) {
  .eye-in.eye-amt { display: none; }
  .eye-in.eye-lab { display: inline-grid; width: 22px; height: 22px; margin: -5px 0 -5px 2px; vertical-align: middle; }
  .eye-in.eye-lab .ic { width: 14px; height: 14px; }
  .stat small { white-space: nowrap; }
}

/* Phones: the tab bar sits flush against the bottom edge and stays put while the page scrolls. */
html, body { overscroll-behavior-y: none; }
@media (max-width: 899px) {
  .tabbar { bottom: 0; padding-bottom: calc(6px + min(var(--safe-bottom), 18px)); }
  .tabbar::after { display: none; }
  #app { padding-bottom: calc(92px + min(var(--safe-bottom), 18px)); }
}

/* Phones and the installed app: white bar right down to the bottom edge. A small allowance keeps the
   labels clear of the gesture line; phones with three on-screen buttons (a tall inset) get the full height. */
@media (max-width: 899px) {
  .tabbar { bottom: 0; padding-bottom: calc(6px + min(var(--safe-bottom), 18px) + clamp(0px, (var(--safe-bottom) - 40px) * 999, 30px)); }
  #app { padding-bottom: calc(92px + min(var(--safe-bottom), 18px) + clamp(0px, (var(--safe-bottom) - 40px) * 999, 30px)); }
}

/* ---------- the coach character ---------- */
.buddy { position: fixed; z-index: 30; width: 68px; height: 72px; --ex: 0px; --ey: 0px; transition: top .45s var(--ease), left .45s var(--ease), right .45s var(--ease), transform .45s var(--ease), opacity .3s; touch-action: none; user-select: none; -webkit-user-select: none; }
.buddy[hidden] { display: none; }
.buddy.drag { transition: none; }
.buddy-body { display: block; width: 100%; height: 100%; padding: 0; background: none; cursor: grab; touch-action: none; filter: drop-shadow(0 6px 10px rgb(23 58 44 / 22%)); -webkit-tap-highlight-color: transparent; }
.buddy.drag .buddy-body { cursor: grabbing; transform: scale(1.08) rotate(-6deg); }
.buddy svg { width: 100%; height: 100%; display: block; overflow: visible; }
.bd-skin { fill: url(#bd-body); stroke: var(--forest-deep); stroke-width: 3; stroke-linejoin: round; }
.bd-shade { fill: #9dbfa8; opacity: .28; }
.bd-shine { fill: #fff; opacity: .95; }
.bd-arm { fill: #f1f6ee; stroke: var(--forest-deep); stroke-width: 3; stroke-linejoin: round; transform-box: fill-box; }
.bd-arm-l { transform-origin: 100% 100%; }
.bd-arm-r { transform-origin: 0 100%; }
.bd-shadow { fill: rgb(23 58 44 / 20%); transform-box: fill-box; transform-origin: center; animation: bd-shadow 3.2s ease-in-out infinite; }
.bd-float { animation: bd-float 3.2s ease-in-out infinite; transform-origin: 60px 60px; }
.bd-face { transform: translate(var(--ex), var(--ey)); transition: transform .18s ease-out; }
.bd-eye ellipse { fill: var(--ink); }
.bd-glint { fill: #fff; }
.bd-eye { transform-box: fill-box; transform-origin: center; animation: bd-blink 4.6s infinite; }
.bd-eye + .bd-eye { animation-delay: .04s; }
.bd-eyes-happy, .bd-mouth, .bd-dots { display: none; }
.bd-eyes-happy path, .bd-smile { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.bd-mouth path { fill: #6d2a2a; stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; }
.bd-tongue { fill: #e8776d; }
.bd-mouth { transform-box: fill-box; transform-origin: 50% 0; }
.bd-blush { fill: #ef9a90; opacity: .55; transform-box: fill-box; transform-origin: center; animation: bd-blush 3.2s ease-in-out infinite; }
.bd-orbit { transform-origin: 60px 62px; animation: bd-orbit 7s linear infinite; }
.bd-coin { transform-box: fill-box; transform-origin: center; animation: bd-coin 1.6s linear infinite; }
.bd-dots circle { fill: var(--forest); animation: bd-dot 1.1s infinite; }
.bd-dots circle:nth-child(2) { animation-delay: .18s; }
.bd-dots circle:nth-child(3) { animation-delay: .36s; }
@keyframes bd-float { 0%, 100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-7px) rotate(1.5deg); } }
@keyframes bd-shadow { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.78); opacity: .6; } }
@keyframes bd-blink { 0%, 93%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.08); } }
@keyframes bd-blush { 0%, 100% { opacity: .45; transform: scale(1); } 50% { opacity: .8; transform: scale(1.12); } }
@keyframes bd-orbit { to { transform: rotate(360deg); } }
@keyframes bd-coin { 0%, 100% { transform: scaleX(1); } 50% { transform: scaleX(.15); } }
@keyframes bd-dot { 0%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@keyframes bd-talk { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(.45); } }
@keyframes bd-wave { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(22deg); } }
@keyframes bd-wave-l { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-22deg); } }
@keyframes bd-think { 0%, 100% { transform: translateY(-2px) rotate(-7deg); } 50% { transform: translateY(-6px) rotate(-3deg); } }
@keyframes bd-spin { 0% { transform: perspective(300px) rotateY(0) scale(.5); opacity: 0; } 60% { opacity: 1; } 100% { transform: perspective(300px) rotateY(720deg) scale(1); opacity: 1; } }
@keyframes bd-nudge { 0%, 100% { transform: translateX(0) rotate(0); } 25% { transform: translateX(-7px) rotate(-8deg); } 60% { transform: translateX(3px) rotate(4deg); } }
.buddy.spin .buddy-body { animation: bd-spin .9s var(--ease); }
/* thinking: looks up, tilts, dots rise */
.buddy[data-mood="think"] .bd-float { animation: bd-think 1.4s ease-in-out infinite; }
.buddy[data-mood="think"] .bd-face { transform: translate(3px, -4px); }
.buddy[data-mood="think"] .bd-dots { display: block; }
.buddy[data-mood="think"] .bd-smile { d: path('M55 65q5 2 10 0'); }
/* talking and happy: open mouth, curved eyes, waving arms, warmer blush */
.buddy[data-mood="talk"] .bd-smile, .buddy[data-mood="happy"] .bd-smile, .buddy[data-mood="happy"] .bd-eyes-open { display: none; }
.buddy[data-mood="talk"] .bd-mouth, .buddy[data-mood="happy"] .bd-mouth, .buddy[data-mood="happy"] .bd-eyes-happy { display: block; }
.buddy[data-mood="talk"] .bd-mouth { animation: bd-talk .38s ease-in-out infinite; }
.buddy[data-mood="talk"] .bd-arm-r, .buddy[data-mood="happy"] .bd-arm-r { animation: bd-wave .7s ease-in-out infinite; }
.buddy[data-mood="happy"] .bd-arm-l { animation: bd-wave-l .7s ease-in-out infinite; }
.buddy[data-mood="happy"] .bd-float { animation-duration: .8s; }
.buddy[data-mood="talk"] .bd-blush, .buddy[data-mood="happy"] .bd-blush { opacity: .9; }
/* tucked against an edge: only a sliver shows */
.buddy.peek { opacity: .92; }
.buddy.peek[data-side="right"] { transform: translateX(62%) rotate(-14deg); }
.buddy.peek[data-side="left"] { transform: translateX(-62%) rotate(14deg); }
.buddy.peek .bd-orbit, .buddy.peek .bd-shadow { display: none; }
.buddy.peek.has-news .buddy-body { animation: bd-nudge 1.2s ease-in-out 3; }
.buddy-dot { display: none; position: absolute; top: 6px; width: 11px; height: 11px; border-radius: 50%; background: var(--mustard); border: 2px solid var(--surface); }
.buddy[data-side="right"] .buddy-dot { left: 2px; }
.buddy[data-side="left"] .buddy-dot { right: 2px; }
.buddy.has-news .buddy-dot { display: block; }
/* speech bubble */
.buddy-bubble { position: absolute; bottom: 62%; width: min(250px, calc(100vw - 110px)); padding: 11px 13px 9px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 10px 30px rgb(23 58 44 / 18%); font-size: 13px; line-height: 1.4; color: var(--ink); animation: bd-pop .35s var(--ease); touch-action: auto; }
.buddy[data-side="right"] .buddy-bubble { right: 86%; border-bottom-right-radius: 4px; transform-origin: 100% 100%; }
.buddy[data-side="left"] .buddy-bubble { left: 86%; border-bottom-left-radius: 4px; transform-origin: 0 100%; }
.buddy-bubble small { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #8a6a14; margin-bottom: 2px; }
.buddy-bubble p { margin: 0; }
.buddy-bubble div { display: flex; gap: 14px; margin-top: 7px; }
.buddy-bubble button { font-size: 12.5px; font-weight: 600; color: var(--forest); padding: 2px 0; }
.buddy-bubble button + button { color: var(--ink-3); }
@keyframes bd-pop { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: scale(1); } }
.bd-h { display: flex; align-items: center; gap: 8px; margin: 18px 0 8px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.bd-h .count { font-style: normal; min-width: 18px; padding: 1px 6px; border-radius: 9px; background: var(--mustard-soft); color: #8a6a14; font-size: 11px; text-align: center; letter-spacing: 0; }
.bd-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.bd-stats .stat { padding: 10px; border: 1px solid var(--line); border-radius: 12px; }
.bd-stats .stat b { display: block; font-size: 15px; }
.bd-stats .stat small { font-size: 11.5px; color: var(--ink-3); }
.bd-stats + .pad { margin-top: 10px; }
#sheet-body > .list + .btn, #sheet-body > .btn { margin-top: 16px; text-decoration: none; }
@media (min-width: 900px) { .buddy { width: 78px; height: 82px; } }
@media (prefers-reduced-motion: reduce) { .buddy.peek[data-side="right"] { transform: translateX(62%); } .buddy.peek[data-side="left"] { transform: translateX(-62%); } }

.buddy.flip .buddy-bubble { bottom: auto; top: 62%; }
.buddy.flip[data-side="right"] .buddy-bubble { border-radius: 16px 4px 16px 16px; transform-origin: 100% 0; }
.buddy.flip[data-side="left"] .buddy-bubble { border-radius: 4px 16px 16px 16px; transform-origin: 0 0; }

/* ---------- in-app update ---------- */
.update-card.new { border: 1px solid var(--mustard); background: linear-gradient(180deg, #fbf5df, var(--surface) 70%); }
.chip.new { background: var(--mustard); color: var(--ink); font-weight: 700; }
.up-bar { height: 6px; margin: 12px 0 4px; }
.up-bar i { animation: none; transition: width .3s; background: linear-gradient(90deg, var(--forest), var(--mustard)); }
.up-dot { position: absolute; top: 4px; right: calc(50% - 18px); width: 9px; height: 9px; border-radius: 50%; background: var(--mustard); box-shadow: 0 0 0 2px var(--surface); animation: up-pulse 1.6s ease-in-out infinite; }
.tabbar a, .tabbar button { position: relative; }
@media (min-width: 900px) { .up-dot { position: static; margin-left: auto; box-shadow: none; } }
@keyframes up-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.35); } }

/* Screens without the tab bar (loading, sign-in, lock, setup) use the whole height: no empty strip at the bottom. */
#app.bare { padding-bottom: 0; }

/* ---------- loading screen ---------- */
.lock.loading { padding-bottom: 24px; background: radial-gradient(120% 80% at 80% 0%, #f3e7c0 0%, transparent 55%), radial-gradient(120% 90% at 0% 100%, #c9dccb 0%, transparent 60%), var(--sage); background-size: 140% 140%; animation: ld-bg 7s ease-in-out infinite alternate; }
.lock.loading .lock-box { gap: 14px; }
.ld-mark { position: relative; width: 92px; height: 92px; margin-bottom: 10px; animation: ld-bob 2.4s ease-in-out infinite; }
.ld-mark i, .ld-mark span { position: absolute; inset: 0; border-radius: 26px; }
.ld-mark i:nth-child(1) { background: var(--mustard); animation: ld-fan-a 2.4s var(--ease) infinite; }
.ld-mark i:nth-child(2) { background: #8fb39a; animation: ld-fan-b 2.4s var(--ease) infinite; }
.ld-mark span { display: grid; place-items: center; background: linear-gradient(145deg, #2a6a50, var(--forest-deep)); box-shadow: 0 16px 34px rgb(23 58 44 / 34%), inset 0 1px 0 rgb(255 255 255 / 18%); overflow: hidden; }
.ld-mark span::after { content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 35%, rgb(255 255 255 / 28%) 50%, transparent 65%); transform: translateX(-120%); animation: ld-shine 2.4s ease-in-out infinite; }
.ld-mark svg { width: 62px; height: 62px; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ld-g { stroke: #f6f5ef; stroke-width: 38; stroke-dasharray: 1; animation: ld-draw 2.4s ease-in-out infinite; }
.ld-wave { stroke: var(--mustard); stroke-width: 24; stroke-dasharray: .34 .16; animation: ld-flow 1.1s linear infinite; }
.ld-coins { display: flex; gap: 9px; height: 22px; align-items: flex-end; }
.ld-coins i { width: 11px; height: 11px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #f6e3a0, #c2972c); box-shadow: 0 0 0 1.5px #8a6a14 inset; animation: ld-hop 1s ease-in-out infinite; }
.ld-coins i:nth-child(2) { animation-delay: .15s; }
.ld-coins i:nth-child(3) { animation-delay: .3s; }
@keyframes ld-bg { from { background-position: 0% 0%; } to { background-position: 100% 100%; } }
@keyframes ld-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes ld-fan-a { 0%, 100% { transform: rotate(0) translate(0, 0); } 45%, 70% { transform: rotate(-16deg) translate(-12px, 6px); } }
@keyframes ld-fan-b { 0%, 100% { transform: rotate(0) translate(0, 0); } 45%, 70% { transform: rotate(13deg) translate(12px, 5px); } }
@keyframes ld-shine { 0%, 40% { transform: translateX(-120%); } 80%, 100% { transform: translateX(120%); } }
@keyframes ld-draw { 0% { stroke-dashoffset: 1; } 45%, 80% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -1; } }
@keyframes ld-flow { to { stroke-dashoffset: -.5; } }
@keyframes ld-hop { 0%, 100% { transform: translateY(0) scaleX(1); } 40% { transform: translateY(-11px) scaleX(.35); } 70% { transform: translateY(0) scaleX(1); } }

/* "more to load" marker at the end of a long list */
.more { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 14px; margin-top: 4px; font-size: 13px; font-weight: 600; color: var(--ink-3); background: none; }
.more .scan-dots { margin: 0; }

/* ---------- no accidental zoom ---------- */
/* Double-tap never zooms; and iPhone zooms into any field whose text is under 16px, so fields are 16px on phones. */
html { touch-action: manipulation; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (max-width: 899px) { input, select, textarea { font-size: 16px !important; } }

/* ---------- phones: figure tiles ---------- */
@media (max-width: 899px) {
  .stat { position: relative; }
  .stat small { white-space: normal; overflow-wrap: anywhere; }
  .stat:has(.eye-lab) small { padding-right: 22px; }
  .eye-in.eye-lab { position: absolute; top: 5px; right: 4px; margin: 0; }
  .stat b { font-size: 15px; overflow-wrap: anywhere; }
  .stat-row { gap: 8px; }
  .stat-row .stat { padding: 10px; }
}

/* ---------- phones: the header stays at the top once the page is scrolled ---------- */
.top-fixed { display: none; }
@media (max-width: 899px) {
  .top.top-fixed { position: fixed; z-index: 19; left: 0; right: 0; top: 0; padding: calc(6px + var(--safe-top)) 12px 6px; background: var(--surface); box-shadow: 0 1px 0 var(--line), 0 6px 18px rgb(23 38 30 / 7%); transform: translateY(-105%); transition: transform .22s var(--ease); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
  .top.top-fixed.home-top { display: flex; justify-content: space-between; }
  .top.top-fixed[hidden] { display: none; }
  body.scrolled .top.top-fixed { transform: none; }
  .top.top-fixed h1 { font-size: 17px; }
  .top.top-fixed.home-top p, .top.top-fixed.home-top small { font-size: 11.5px; }
}

/* ---------- small fixes ---------- */
/* Home shortcuts: every label on one centred line, even on narrow phones. */
.tiles a { min-width: 0; padding: 12px 2px 10px; }
.tiles a span { display: block; width: 100%; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11.5px; letter-spacing: -.01em; }
@media (max-width: 360px) { .tiles { gap: 6px; } .tiles a span { font-size: 10.5px; } }
/* Mistakes: a quieter message, and the field itself outlined so it is easy to find. */
.error { font-size: 12px; line-height: 1.35; }
.invalid { border-color: var(--bad) !important; background: #fdf4f1 !important; box-shadow: 0 0 0 3px rgb(180 81 58 / 14%); animation: bad-shake .32s; }
textarea.invalid { outline: 0; }
@keyframes bad-shake { 0%, 100% { transform: none; } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* ---------- "What's new" banner on Home ---------- */
.news { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); text-align: left; }
.news-ic { flex: none; display: grid; place-items: center; color: var(--forest); }
.news-ic .ic { width: 20px; height: 20px; }
.news b { display: block; font-size: 14px; }
.news small { font-size: 12.5px; color: var(--ink-2); }
.news .chev { color: var(--ink-3); }
.news-list { list-style: none; padding: 0; margin: 4px 0 16px; display: grid; gap: 12px; }
.news-list li { display: flex; gap: 10px; font-size: 13.5px; color: var(--ink-2); line-height: 1.4; }
.news-list .ic { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--good); }
.news-list b { display: block; color: var(--ink); font-size: 14px; }
@media (min-width: 900px) { .page > .news { grid-column: 1 / -1; column-span: all; max-width: 720px; } }

/* ---------- Coach: language, voice, plans ---------- */
.coach-opts { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 4px 0 10px; }
.seg.mini { display: inline-flex; width: auto; padding: 3px; }
.seg.mini button { padding: 6px 14px; font-size: 12.5px; min-height: 0; }
.chip-btn .ic { width: 15px; height: 15px; vertical-align: -3px; margin-right: 5px; }
.chip-btn.on { background: var(--forest); color: #fff; border-color: var(--forest); }
.say { display: inline-flex; align-items: center; gap: 5px; align-self: flex-start; margin: -4px 0 6px 6px; padding: 3px 8px; border-radius: 10px; font-size: 11.5px; font-weight: 600; color: var(--ink-3); }
.say .ic { width: 14px; height: 14px; }
.say:hover { color: var(--forest); background: var(--sage-soft); }
.plans { display: grid; gap: 8px; margin: 6px 0 4px; }
.plan { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; }
.plan.on { border-color: var(--forest); background: var(--sage-soft); }
.plan b { font-size: 14.5px; }
.plan small { display: block; font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.plan .chip { margin-left: 8px; padding: 2px 8px; border-radius: 8px; background: var(--forest); color: #fff; font-size: 10.5px; font-style: normal; font-weight: 700; vertical-align: 2px; }
.plan-price { text-align: right; flex: none; }
.plan-price b { font-size: 17px; }
.pay-steps { padding-left: 20px; display: grid; gap: 10px; font-size: 13.5px; color: var(--ink-2); margin-bottom: 14px; }
.pay-how { margin-top: 6px; padding: 10px 12px; border-radius: 12px; background: var(--mustard-soft); color: var(--ink); font-weight: 600; white-space: pre-wrap; overflow-wrap: anywhere; user-select: text; -webkit-user-select: text; }
.hint.good { color: var(--good); }

/* ---------- account setup, step by step ---------- */
.st-bar { display: flex; gap: 6px; }
.st-bar i { flex: 1; height: 4px; border-radius: 2px; background: var(--line); transition: background .3s; }
.st-bar i.on { background: var(--forest); }
.st-count { font-size: 12px; color: var(--ink-3); margin: -4px 0 2px; }
.st { display: grid; gap: 14px; animation: st-in .32s var(--ease); }
.st[hidden] { display: none; }
.st h2 { font-size: 21px; letter-spacing: -.02em; line-height: 1.2; }
.st > .muted { margin-top: -8px; font-size: 13.5px; }
@keyframes st-in { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
form.steps { display: flex; flex-direction: column; gap: 14px; width: 100%; min-height: 100vh; min-height: 100dvh; max-width: 520px; margin: 0 auto; padding: calc(28px + var(--safe-top)) 22px calc(14px + env(safe-area-inset-bottom, 0px)); background: var(--bg); }
.st-head { margin-bottom: 6px; }
.st-head h1 { font-size: 24px; letter-spacing: -.02em; line-height: 1.2; }
.st-head p { font-size: 13.5px; color: var(--ink-2); margin-top: 4px; }
.st-recover { font-size: 13px; color: var(--ink-2); }
.st-recover .link { font-size: inherit; }
/* Back and Next: plain words with an arrow, at the bottom of the screen. */
.st-nav { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 18px; }
.st-nav button { display: inline-flex; align-items: center; gap: 6px; padding: 12px 4px; font-size: 15px; font-weight: 600; color: var(--ink-2); }
.st-nav button[hidden] { display: none; }
.st-nav button .ic { width: 18px; height: 18px; transition: transform .2s var(--ease); }
.st-nav .go { margin-left: auto; color: var(--forest); font-weight: 700; }
.st-nav .go:hover .ic, .st-nav .go:active .ic { transform: translateX(3px); }
.opts { display: grid; gap: 8px; flex: 1; }
.opt { display: block; cursor: pointer; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt span { display: block; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: 14px; transition: border-color .2s, background .2s; }
.opt b { display: block; font-size: 15px; }
.opt small { display: block; font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
.opt input:checked + span { border-color: var(--forest); background: var(--sage-soft); box-shadow: inset 0 0 0 1px var(--forest); }
.opt input:focus-visible + span { outline: 2px solid var(--forest); outline-offset: 2px; }
.st-coach { display: flex; align-items: center; gap: 14px; }
.buddy.lp-ghost { position: relative; inset: auto; z-index: auto; width: 84px; height: 90px; flex: none; transition: none; touch-action: auto; }

/* ---------- Coach: one chat; "Ways to save" is its first message ---------- */
.msg.tipsmsg { max-width: 100%; white-space: normal; padding: 12px 14px; }
.tipsmsg > b { display: block; font-size: 14.5px; }
.tipsmsg > small { display: block; font-size: 12px; color: var(--ink-3); }
.tipsmsg ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 10px; }
.tipsmsg li { display: flex; gap: 10px; align-items: flex-start; }
.tipsmsg .circ { flex: none; width: 28px; height: 28px; background: var(--surface); }
.tipsmsg .circ .ic { width: 15px; height: 15px; }
.tipsmsg li b { display: block; font-size: 13.5px; }
.tipsmsg li small { display: block; font-size: 12.5px; color: var(--ink-2); line-height: 1.4; }
.chat-start { font-size: 12.5px; padding: 4px 2px 0; }
.chat-signin { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-2); }
.chat-signin .btn { width: auto; flex: none; }
/* Phones: the chat fills the screen between the title and the tab bar; only the messages scroll. */
@media (max-width: 899px) {
  #app:has(.page.coach) { height: 100vh; height: 100dvh; min-height: 0; }
  .page.coach { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 0 10px; }
  .page.coach .chatcard { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 14px 14px 12px; }
  .page.coach .chat { flex: 1; min-height: 0; max-height: none; }
  .page.coach .coach-opts { margin: 2px 0 8px; }
  .page.coach .chips { flex: none; padding: 8px 0; }
}

/* ---------- typing on a phone: the tab bar and the Coach character step aside ---------- */
@media (max-width: 899px) {
  body.typing .tabbar, body.typing #buddy { display: none !important; }
  body.typing #app { padding-bottom: 12px; }
  body.typing #app:has(.page.coach) { height: var(--vvh, 100dvh); }
}
.head-links { display: inline-flex; gap: 14px; flex: none; }
.say.go { color: var(--forest); background: var(--sage-soft); padding: 6px 12px; margin-top: 0; }
.up-auto { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }

/* ---------- plans: the QR code to pay with ---------- */
.payqr { display: grid; gap: 10px; justify-items: center; text-align: center; }
.payqr img { width: min(100%, 300px); height: auto; border-radius: 14px; border: 1px solid var(--line); background: #fff; }
.payqr small { font-size: 12.5px; line-height: 1.45; color: var(--ink-2); max-width: 32em; }

/* ---------- the page behind an open panel stays still ---------- */
html { scrollbar-gutter: stable; }
body.held { position: fixed; left: 0; right: 0; width: 100%; overflow: hidden; }
.sheet-body, #picker-list, .picker-panel, .confirm-box, .viewer { overscroll-behavior: contain; }

/* ---------- "your plan is on": the Coach cheers ---------- */
.cheer { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 24px; background: rgb(23 38 30 / 55%); animation: cheer-in .25s ease both; }
.cheer[hidden] { display: none; }
.cheer-box { position: relative; width: min(100%, 360px); padding: 30px 24px 20px; border-radius: 24px; background: var(--surface); text-align: center; display: grid; gap: 10px; justify-items: center; overflow: hidden; box-shadow: 0 30px 80px rgb(0 0 0 / 35%); animation: cheer-pop .45s var(--ease) both; }
.cheer-box h2 { font-size: 22px; letter-spacing: -.02em; }
.cheer-box p { font-size: 14.5px; color: var(--ink-2); line-height: 1.45; margin-bottom: 6px; }
.cheer-box p b { color: var(--ink); }
.cheer-box .btn { position: relative; }
.cheer-box .link { position: relative; padding: 8px; }
.buddy.cheer-ghost { width: 104px; height: 112px; margin-bottom: 4px; animation: cheer-hop 1.1s ease-in-out infinite; }
.cheer-coins { position: absolute; inset: 0; pointer-events: none; }
.cheer-coins i { position: absolute; top: -20px; width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #f6e3a0, #c2972c); box-shadow: inset 0 0 0 1.5px #8a6a14; animation: cheer-fall 2.6s linear infinite; }
@keyframes cheer-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes cheer-pop { from { opacity: 0; transform: scale(.85) translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes cheer-hop { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-12px) rotate(3deg); } }
@keyframes cheer-fall { 0% { transform: translateY(0) rotate(0); opacity: 0; } 10% { opacity: 1; } 100% { transform: translateY(460px) rotate(540deg); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cheer-coins { display: none; } .buddy.cheer-ghost { animation: none; } }

/* ---------- "Upgrade your Coach" panel ---------- */
.offer { position: fixed; inset: 0; z-index: 88; display: grid; place-items: center; padding: 20px; background: rgb(23 38 30 / 55%); animation: cheer-in .25s ease both; }
.offer[hidden] { display: none; }
.offer-box { position: relative; width: min(100%, 1000px); max-height: 100%; overflow-y: auto; overscroll-behavior: contain; padding: 28px 28px 18px; border-radius: 24px; background: var(--bg); text-align: center; box-shadow: 0 30px 80px rgb(0 0 0 / 35%); animation: cheer-pop .4s var(--ease) both; }
.offer-x { position: absolute; right: 14px; top: 14px; }
.offer-box > h2 { font-size: 24px; letter-spacing: -.02em; padding: 0 44px; }
.offer-sub { margin: 6px auto 22px; max-width: 34em; font-size: 14px; color: var(--ink-2); }
.offer-sub b { color: var(--ink); }
.offer-grid { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; text-align: left; }
.offer-grid[data-n="2"] { grid-template-columns: repeat(2, minmax(0, 320px)); justify-content: center; }
.offer-grid[data-n="1"] { grid-template-columns: minmax(0, 340px); justify-content: center; }
.offer-card { position: relative; display: flex; flex-direction: column; padding: 24px 22px 22px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.offer-card.hot { border-color: var(--mustard); box-shadow: 0 0 0 3px rgb(212 169 58 / 20%); }
.offer-badge { position: absolute; right: 16px; top: 16px; padding: 3px 10px; border-radius: 10px; background: var(--mustard-soft); color: #6f560f; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.offer-card h3 { font-size: 19px; letter-spacing: -.02em; color: var(--forest); padding-right: 96px; }
.offer-tag { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.offer-price { display: flex; align-items: baseline; gap: 8px; margin: 18px 0 16px; }
.offer-price b { font-size: 40px; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.offer-price span { font-size: 13px; color: var(--ink-3); }
.offer-card .btn { min-height: 46px; }
.offer-card .btn .ic { width: 18px; height: 18px; }
.offer-card h4 { margin: 18px 0 10px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; font-weight: 600; }
.offer-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.offer-card li { display: flex; gap: 9px; font-size: 13.5px; line-height: 1.4; color: var(--ink-2); }
.offer-card li .ic { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--good); }
.offer-card li b { color: var(--ink); font-weight: 600; }
.offer-later { display: inline-block; margin-top: 16px; padding: 8px 12px; color: var(--ink-2); }
@media (max-width: 760px) {
  .offer { padding: 0; place-items: end center; }
  .offer-box { width: 100%; max-height: 92dvh; padding: 22px 16px calc(14px + env(safe-area-inset-bottom, 0px)); border-radius: 22px 22px 0 0; animation-name: sheet-up; }
  .offer-grid, .offer-grid[data-n="2"], .offer-grid[data-n="1"] { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .offer-card { padding: 18px 16px; }
  .offer-price { margin: 12px 0 12px; }
  .offer-price b { font-size: 34px; }
  .offer-card h4 { margin-top: 14px; padding-top: 12px; }
}

/* ---------- name, legal links and version, under Sign out ---------- */
.about { display: grid; gap: 6px; justify-items: center; padding: 18px 8px 4px; font-size: 12px; color: var(--ink-3); text-align: center; }
.about > span:first-child { display: inline-flex; align-items: center; gap: 5px; }
.about .ic { width: 13px; height: 13px; }
.about-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; }
.about .link { font-size: inherit; font-weight: 600; color: var(--ink-2); padding: 0; }
.user-menu .about { margin-top: 4px; padding: 10px 6px 6px; border-top: 1px solid var(--line); font-size: 11.5px; }
.tabbar .user-menu .about button { width: auto; padding: 0; color: var(--ink-2) !important; font-weight: 600; }
.tabbar .user-menu .about .ic { color: var(--ink-3) !important; }

/* ---------- landing page (website) ---------- */
/* Plain type on a plain background: no cards, badges or gradients. Sections are told apart by space and a hairline. */
.lp { --pad: clamp(20px, 5vw, 56px); --rule: #dfe1d8; background: var(--bg); color: var(--ink); overflow-x: clip; }
.lp h1, .lp h2 { font-weight: 700; letter-spacing: -.03em; line-height: 1.08; }
.lp h1 { font-size: clamp(38px, 5.6vw, 68px); }
.lp h2 { font-size: clamp(26px, 3.2vw, 38px); }
.lp h3 { font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.lp p { color: var(--ink-2); font-size: clamp(15px, 1.35vw, 17px); line-height: 1.6; }
.lp section { max-width: 1120px; margin: 0 auto; padding: clamp(48px, 7vw, 96px) var(--pad); }
.lp section + section { border-top: 1px solid var(--rule); }
.lp .btn { width: auto; min-height: 48px; padding: 0 22px; border-radius: 12px; background: var(--forest); background-image: none; box-shadow: none; }
.lp .btn.sm { min-height: 38px; padding: 0 16px; border-radius: 10px; font-size: 14px; }
.lp .btn.ghost { background: transparent !important; color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule); transition: background .15s, box-shadow .15s; }
.lp .btn.ghost:hover, .lp .btn.ghost:active { background: var(--sage-soft) !important; color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink-3); }

/* top bar: stays at the top; a hairline appears once the page has scrolled */
.lp-nav { position: sticky; top: 0; z-index: 12; background: rgb(246 245 239 / 88%); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.lp-nav.on { border-bottom-color: var(--rule); }
.lp-bar { display: flex; align-items: center; gap: 8px; max-width: 1120px; height: 60px; margin: 0 auto; padding: var(--safe-top) var(--pad) 0; box-sizing: content-box; }
.lp-brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 17px; letter-spacing: -.02em; }
.lp-brand i { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--forest); }
.lp-brand svg { width: 20px; height: 20px; }
.lp-nav nav { display: flex; gap: 2px; margin: 0 auto; }
.lp-nav nav button, .lp-login { padding: 8px 12px; font-size: 14px; font-weight: 500; color: var(--ink-2); border-radius: 8px; transition: color .15s; }
.lp-nav nav button:hover, .lp-login:hover { color: var(--ink); }
.lp-login { margin-left: auto; }
.lp-nav nav + .lp-login { margin-left: 0; }
@media (max-width: 680px) { .lp-nav nav { display: none; } .lp-nav nav + .lp-login { margin-left: auto; } }

/* hero */
.lp-hero { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: clamp(24px, 5vw, 72px); }
.lp-copy { display: grid; gap: 20px; justify-items: start; }
.lp-hero p { max-width: 34em; }
.lp-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.lp-actions { display: grid; gap: 8px; justify-items: center; }
.lp-actions .lp-cta { margin-top: 4px; }
.lp-get { display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--ink-3); }
.lp-get .get-row { display: flex; gap: 2px; width: auto; }
.lp-get .get { min-height: 30px; padding: 4px 8px; gap: 6px; border: 0; border-radius: 8px; background: transparent; box-shadow: none; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.lp-get .get:hover { background: var(--sage-soft); color: var(--ink); border: 0; }
.lp-get .get svg.brand { width: 15px; height: 15px; color: currentColor; }
.lp-art { position: relative; display: grid; place-items: center; }
.lp-phone { position: relative; width: min(280px, 64vw); aspect-ratio: 390 / 844; border-radius: 38px; background: #101a15; padding: 8px; box-shadow: 0 30px 60px -34px rgb(23 38 30 / 45%); }
.lp-phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 30px; display: block; background: var(--sage); }
.lp-phone.sm { width: min(220px, 58vw); border-radius: 32px; padding: 7px; }
.lp-phone.sm img { border-radius: 25px; }
.buddy.lp-ghost-hero { position: absolute !important; right: 4%; bottom: 6%; width: 96px !important; height: 103px !important; }

/* tour video */
.lp-video { text-align: center; }
.lp-frame { max-width: 920px; margin: 0 auto; border-radius: 16px; overflow: hidden; background: #0b1711; border: 1px solid var(--rule); }
.lp-frame video { width: 100%; display: block; aspect-ratio: 16 / 9; }
.lp-note { margin-top: 16px; font-size: 14px !important; color: var(--ink-3) !important; }

/* a heading on the left, the detail on the right */
.lp-split { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(24px, 5vw, 80px); align-items: start; }
.lp-list { list-style: none; margin: 0; padding: 0; }
.lp-list li { display: grid; grid-template-columns: 44px 1fr; padding: 20px 0; border-top: 1px solid var(--rule); }
.lp-list li:first-child { border-top: 0; padding-top: 4px; }
.lp-list span { font-size: 13px; font-weight: 500; color: var(--ink-3); font-variant-numeric: tabular-nums; padding-top: 2px; }
.lp-list p { margin-top: 4px; font-size: 15px; }
.lp-private div { display: grid; gap: 12px; }

/* coach */
.lp-coach { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(24px, 5vw, 72px); }
.lp-coach-art { position: relative; min-height: 400px; border-radius: 16px; background: var(--sage-soft); }
.buddy.lp-ghost-big { position: absolute !important; left: 7%; top: 14%; width: 124px !important; height: 133px !important; }
.lp-say { position: absolute; left: 36%; right: 6%; padding: 12px 16px; border-radius: 14px 14px 14px 4px; background: var(--surface); border: 1px solid var(--rule); font-size: 14px; font-weight: 500; line-height: 1.4; opacity: 0; animation: lp-say 9s var(--ease) infinite both; }
.lp-say small { display: block; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 2px; }
.lp-say.s1 { top: 14%; }
.lp-say.s2 { top: 42%; animation-delay: 1.4s; }
.lp-say.s3 { top: 66%; animation-delay: 2.8s; }
@keyframes lp-say { 0% { opacity: 0; transform: translateY(10px); } 8%, 80% { opacity: 1; transform: none; } 92%, 100% { opacity: 0; transform: translateY(-6px); } }
.lp-coach ul { list-style: none; margin: 4px 0 0; padding: 0; width: 100%; }
.lp-coach li { padding: 12px 0; border-top: 1px solid var(--rule); font-size: 15px; color: var(--ink); }

/* screens */
.lp-shots h2 { text-align: center; }
.lp-row { display: flex; justify-content: center; gap: clamp(16px, 4vw, 56px); margin-top: 36px; flex-wrap: wrap; }
.lp-row figure { display: grid; gap: 14px; justify-items: center; margin: 0; }
.lp-row figcaption { font-size: 14px; color: var(--ink-2); }

/* plans: a plain price list */
.lp-sub { max-width: 34em; margin-top: 12px; }
.lp-price { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 36px; border-top: 1px solid var(--ink); }
.lp-price > div { padding: 22px 24px 4px 0; }
.lp-price > div + div { padding-left: 24px; border-left: 1px solid var(--rule); }
.lp-price h3 { font-size: 14px; font-weight: 500; color: var(--ink-2); }
.lp-price b { display: block; margin: 6px 0 8px; font-size: 32px; font-weight: 700; letter-spacing: -.03em; }
.lp-price p { font-size: 14px; line-height: 1.5; }
.lp-plans .lp-note { margin-top: 28px; }

/* closing */
.lp-final { text-align: center; }
.lp-final p { margin: 12px 0 24px; }
.lp-final .lp-cta { justify-content: center; }

/* sections ease in as they come into view */
.rv { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease) var(--d, 0ms), transform .6s var(--ease) var(--d, 0ms); }
.rv.in { opacity: 1; transform: none; }

@media (max-width: 860px) {
  .lp-hero, .lp-coach, .lp-split { grid-template-columns: 1fr; }
  .lp-hero .lp-copy { justify-items: center; text-align: center; }
  .lp-hero .lp-cta { justify-content: center; }
  .lp-hero .lp-actions { width: 100%; }
  .lp-coach-art { min-height: 360px; }
  .lp-say { left: 32%; font-size: 13px; }
  .buddy.lp-ghost-big { width: 96px !important; height: 103px !important; left: 3%; }
  .lp-price { grid-template-columns: 1fr 1fr; }
  .lp-price > div { border-top: 1px solid var(--rule); }
  .lp-price > div:nth-child(-n+2) { border-top: 0; }
  .lp-price > div:nth-child(odd) { padding-left: 0; border-left: 0; }
}
@media (max-width: 520px) {
  .lp-cta .btn { flex: 1 1 100%; }
  .lp-price { grid-template-columns: 1fr; }
  .lp-price > div, .lp-price > div + div { padding: 18px 0 14px; border-left: 0; border-top: 1px solid var(--rule); }
  .lp-price > div:first-child { border-top: 0; }
}
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; } .lp-say { opacity: 1; animation: none; } }

/* ---------- desktop fixes ---------- */
@media (min-width: 900px) {
  /* The phone-only fixed header must never show here (it was appearing at the bottom of the page). */
  .top.top-fixed { display: none !important; }
  /* Coach: one wide chat instead of a narrow column. */
  .page.coach { grid-template-columns: minmax(0, 1fr); max-width: 1040px; }
  .page.coach > .chatcard { height: calc(100vh - 120px); height: calc(100dvh - 120px); min-height: 460px; }
  .page.coach .tipsmsg { max-width: 560px; }
  .page.coach .msg { max-width: 78%; }
  /* Small print above "Report a problem": quiet and compact. */
  .tabbar .side-about { order: 3; margin-top: auto; display: block !important; padding: 0 12px 2px; }
  .tabbar .side-about .about { justify-items: start; text-align: left; gap: 3px; padding: 0; font-size: 10.5px; line-height: 1.35; color: var(--ink-3); opacity: .85; }
  .tabbar .side-about .about-links { justify-content: flex-start; gap: 2px 10px; }
  .tabbar .side-about .about button { display: inline; width: auto; padding: 0 !important; background: none !important; font-size: inherit !important; font-weight: 500 !important; color: var(--ink-3) !important; border-radius: 0; }
  .tabbar .side-about .about button:hover { color: var(--ink) !important; text-decoration: underline; }
  .tabbar .side-about .about .ic { width: 11px; height: 11px; color: var(--ink-3) !important; }
  .tabbar .side-about + .side-help { margin-top: 6px; }
}

/* Coach on a computer: the chat fills the page, edge to edge. */
@media (min-width: 900px) {
  .page.coach { max-width: none; }
  .page.coach .msg { max-width: min(78%, 900px); }
  .page.coach .tipsmsg { max-width: min(78%, 720px); }
}
