/* ===== THEME: every colour, radius and font of the screen lives in this one block. =====
   Restyle by editing these values, or put overrides into web/themes/<name>.css and open ?theme=<name>. */
:root {
  --sto-ink: #004b5a;         /* task 0050: the year story's own palette (same in both app themes) */
  --sto-mint: #e6f3f5;
  --sto-brand: #ffcc00;
  --sto-white: #fff;
  --sto-faint-ink: rgba(230, 243, 245, .16);
  --sto-faint-light: rgba(0, 75, 90, .14);
  --sto-shadow: rgba(0, 0, 0, .15);
  --sto-ring: rgba(230, 243, 245, .3);
  --sto-r-cell: 8px;
  --accent: #0b6b4f;          /* accent TEXT colour: links, active chips, focus ring (must read on --card) */
  --accent-soft: #e3f2ec;     /* icon chips, badges */
  --on-accent: #fff;          /* text on --accent */
  --primary: #0b6b4f;         /* the primary button (one per card) */
  --on-primary: #fff;
  --outline: #0b6b4f;         /* thin outline of secondary buttons */
  --bg: #f4f6f8;              /* page colour */
  --panel: #f4f6f8;           /* list rows and inner panels drawn on a card */
  --bg-top: #f4f6f8;          /* page gradient */
  --bg-bottom: #f4f6f8;
  --wave-1: transparent;      /* the two large, barely visible wavy shapes behind the page */
  --wave-2: transparent;
  --card: #ffffff;            /* tiles and cards (may be translucent) */
  --card-solid: #ffffff;      /* sheets, menu, bottom bar: never translucent */
  --calm-bg: #f7f9fb;         /* the quiet pillar-3a card */
  --text: #17202a;
  --title: #17202a;           /* screen title */
  --muted: #5d6b7a;
  --line: #e1e6eb;
  --neg: #b3261e;             /* negative amounts */
  --warn: #b3261e;            /* destructive button, error text */
  --on-warn: #fff;
  --warn-soft: #fbe9e7;
  --good: #1e8e5a;
  --note-bg: #fff7e0;         /* "Demo" notes and lock badges */
  --note-text: #6b5200;
  --ai-bg: #eef0fb;           /* "explained by AI" badge */
  --ai-text: #3b4aa8;
  --chip-bg: #ffffff;         /* pill controls (filters, EN/DE) */
  --chip-text: #17202a;
  --nav-bg: #ffffff;          /* bottom navigation */
  --nav-text: #5d6b7a;
  --nav-pill: #e3f2ec;        /* active item */
  --nav-text-on: #0b6b4f;
  --chart-in: #1e8e5a;        /* charts: income, spending, highlight, negative, outline ("without") */
  --chart-out: #6b7c8f;
  --chart-hi: #8fd3b6;
  --chart-neg: #b3261e;
  --chart-ghost: #1e8e5a;
  --chart-grid: #e1e6eb;
  --seg-0: #6b7c8f;           /* salary split: bills */
  --seg-1: #0b6b4f;           /* salary split: set aside */
  --seg-2: #8fd3b6;           /* salary split: free */
  --board-bg: #14181d;        /* bills departure board (dark in every theme) */
  --board-text: #f2f4f6;
  --board-hi: #ffd166;
  --board-muted: #9aa6b2;
  --board-ok: #7ee2a8;
  --story-bg: #10231c;        /* story viewer */
  --story-bg-2: #10231c;
  --story-text: #fff;
  --story-good-text: #8fe3bd;
  --story-bar: #fff;          /* story progress */
  --banner-bg: #10231c;       /* story banner in the feed */
  --banner-bg-2: #0b6b4f;
  --banner-text: #fff;
  --banner-btn: #fff;
  --on-banner-btn: #10231c;
  --hero-bg: #e3f2ec;         /* deposit meter tile */
  --hero-text: #0b6b4f;
  --toast-bg: #17202a;
  --toast-text: #fff;
  --range: #0b6b4f;           /* sliders and checkboxes */
  --glass-08: rgba(255,255,255,.08);  /* white veils on dark panels */
  --glass-12: rgba(255,255,255,.12);
  --glass-15: rgba(255,255,255,.15);
  --glass-20: rgba(255,255,255,.2);
  --glass-25: rgba(255,255,255,.25);
  --shadow-soft: rgba(0,0,0,.04);
  --shadow-sheet: rgba(0,0,0,.18);
  --backdrop: rgba(10,15,20,.45);
  --skeleton-a: #e8ecef;
  --skeleton-b: #f4f6f8;
  --radius: 14px;             /* cards, story banner */
  --radius-lg: 18px;          /* bottom sheet */
  --radius-md: 12px;          /* pots, totals, list tiles */
  --radius-sm: 10px;          /* inner panels, icon chips */
  --radius-xs: 5px;           /* bars, small notes */
  --radius-btn: 10px;         /* primary button */
  --radius-pill: 999px;       /* chips, badges, nav pill */
  --radius-round: 50%;        /* round icon buttons */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  --track: 0;                 /* letter-spacing of body text */
  --w-strong: 700;            /* heaviest weight used (titles, amounts) */
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg-bottom); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.45;
       letter-spacing: var(--track); overflow-x: hidden; padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
body::before { content: ""; position: fixed; inset: 0; z-index: -2; background: linear-gradient(180deg, var(--bg-top), var(--bg-bottom)); }
body.no-scroll { overflow: hidden; }
[hidden] { display: none !important; }
.waves { position: fixed; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }
.waves .w1 { fill: var(--wave-1); }
.waves .w2 { fill: var(--wave-2); }
svg.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; display: block; }
.num, .amount, .row-amt, .lg-amt, .tot-v, .pot-bal, .b-amt, .ev-amt, .bar-val, .sheet-facts dd, .meter-big { font-variant-numeric: tabular-nums; }

/* header: back chevron · centred title · theme toggle + options */
.top { position: sticky; top: 0; z-index: 5; background: var(--bg-top); padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 6px; }
.top > *, .subbar > * { max-width: 720px; margin-left: auto; margin-right: auto; }
.subbar { padding: 4px 16px 0; }
.top-row { display: grid; grid-template-columns: 72px minmax(0, 1fr) 72px; align-items: center; gap: 4px; }
.top-left { display: flex; align-items: center; }
.top-tools { position: relative; display: flex; align-items: center; justify-content: flex-end; gap: 2px; flex: none; }
h1 { font-size: clamp(1.05rem, 4.8vw, 1.25rem); line-height: 1.2; margin: 0; text-align: center; font-weight: 500; color: var(--title); overflow-wrap: anywhere; }
.icon-btn { border: 0; background: none; color: var(--title); border-radius: var(--radius-round); width: 36px; height: 40px; display: grid; place-items: center; cursor: pointer; padding: 0; font: inherit; }
.icon-btn.invisible { visibility: hidden; }
.menu-btn[aria-expanded="true"] { background: var(--accent-soft); }
.menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 10; width: min(300px, 86vw); background: var(--card-solid); border-radius: var(--radius-md); box-shadow: 0 8px 28px var(--shadow-sheet); padding: 12px 14px; font-size: 16px; }
.menu-label { margin: 0 0 8px; font-size: .78rem; color: var(--muted); font-weight: 500; }
.menu-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.menu .linkish { margin-top: 12px; }
.top-sub { display: flex; justify-content: center; gap: 8px; margin-top: 4px; }
.brand { margin: 0 0 2px; text-align: center; font-size: .72rem; letter-spacing: .06em; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 6px; }
.brand-logo { height: 22px; width: auto; border-radius: var(--radius-sm, var(--radius)); }
.demo-foot { max-width: 720px; margin: 0 auto; text-align: center; padding: 8px 16px 20px; font-size: .75rem; line-height: 1.4; color: var(--muted); }
.demo-foot-inline { margin: 20px 0 0; font-size: .72rem; line-height: 1.4; opacity: .7; }
.summary { margin: 2px auto 8px; color: var(--muted); font-size: .9rem; text-align: center; }

/* pill controls: EN/DE switch, filter chips, segment chips */
.lang { display: inline-flex; background: var(--chip-bg); border-radius: var(--radius-pill); padding: 3px; flex: none; }
.lang-btn { border: 0; background: none; padding: 4px 12px; font: inherit; font-size: .82rem; font-weight: 500; letter-spacing: .04em; cursor: pointer; color: var(--muted); border-radius: var(--radius-pill); min-height: 28px; }
.lang-btn[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.chip { flex: none; border: 0; background: var(--chip-bg); border-radius: var(--radius-pill); padding: 7px 14px; font: inherit; font-size: .85rem; font-weight: 500; cursor: pointer; color: var(--chip-text); min-height: 34px; }
.chip[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }

/* stage view (?stage=1): only #stage (built by stage.js) is shown; the rest is styled in stage.css */
html.is-stage body > *:not(#stage):not(script) { display: none !important; }
/* the paste-the-demo-link field of the "open the demo link" state */
.paste { display: grid; gap: 8px; width: 100%; max-width: 420px; margin-top: 12px; text-align: left; }
.paste-label { font-size: .85rem; color: var(--muted); }
.paste-input { min-height: 44px; width: 100%; border: 1px solid var(--line); border-radius: var(--radius-btn); padding: 8px 12px; font: inherit; color: var(--text); background: var(--card-solid); }
.paste .paste-bad { color: var(--neg); font-size: .85rem; }
.paste button { margin-top: 0; }

/* bottom navigation: our tabs */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; background: var(--nav-bg); box-shadow: 0 -2px 16px var(--shadow-soft); padding: 6px calc(8px + env(safe-area-inset-right, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)) calc(8px + env(safe-area-inset-left, 0px)); display: flex; justify-content: center; gap: 2px; }
.tab { flex: 1 1 0; max-width: 140px; min-width: 0; border: 0; background: none; padding: 4px 2px; font: inherit; font-size: .72rem; font-weight: 500; color: var(--nav-text); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.tab .tab-ic { display: grid; place-items: center; width: 56px; height: 30px; border-radius: var(--radius-pill); }
.tab .tab-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tab[aria-selected="true"] { color: var(--nav-text-on); font-weight: 600; }
.tab[aria-selected="true"] .tab-ic { background: var(--nav-pill); }

/* deposit meter: the hero tile */
.meter { margin: 4px auto 10px; padding: 14px 16px; border-radius: var(--radius); background: var(--hero-bg); color: var(--hero-text); display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; align-items: center; }
.meter .chipicon { grid-row: 1 / span 3; }
.meter-k { margin: 0; font-size: .82rem; color: var(--muted); font-weight: 500; }
.meter-big { margin: 0; font-size: 2rem; font-weight: 500; letter-spacing: -.01em; line-height: 1.15; overflow-wrap: anywhere; }
.meter-sub { margin: 2px 0 0; font-size: .85rem; color: var(--muted); }
.meter-sub.inv { color: var(--text); }

/* amounts in the app's style: small currency prefix, then the number */
.cur { font-size: .7em; font-weight: 500; margin-right: .3em; letter-spacing: .02em; }
.neg { color: var(--neg); }

/* feed + card */
.feed { max-width: 720px; margin: 0 auto; padding: 6px 16px 24px; display: grid; gap: 12px; }
.card { background: var(--card); border-radius: var(--radius); padding: 16px; box-shadow: 0 1px 3px var(--shadow-soft); min-width: 0; }
.card.calm { background: var(--calm-bg); box-shadow: none; }
.card.calm .amount { color: var(--text); font-size: 1.4rem; }
.card-head { display: flex; gap: 12px; align-items: flex-start; }
.chipicon, .icon { flex: none; width: 36px; height: 36px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--text); display: grid; place-items: center; }
.card[data-type="warning"] .icon { background: var(--warn-soft); }
.card-title { margin: 0; font-size: 1.02rem; flex: 1; min-width: 0; overflow-wrap: anywhere; padding-top: 6px; }
/* compact card: the title is the expand button (keyboard: Tab + Enter/Space) */
.card-toggle { display: flex; width: 100%; gap: 8px; align-items: flex-start; justify-content: space-between; border: 0; background: none; padding: 0; margin: 0; font: inherit; font-weight: 600; color: inherit; text-align: left; cursor: pointer; border-radius: var(--radius-xs); }
.card-toggle::after { content: ""; flex: none; width: 8px; height: 8px; margin: 5px 4px 0 0; border-right: 1.6px solid var(--muted); border-bottom: 1.6px solid var(--muted); transform: rotate(45deg); transition: transform .2s ease; }
.card.is-open .card-toggle::after { transform: rotate(-135deg); margin-top: 9px; }
/* two-second card (task 0038): headline (max 2 lines), big amount, gain strip, yellow button; the rest on a tap */
.card { cursor: pointer; }
.card-headline { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; min-width: 0; }
.card.is-open .card-headline { display: block; }
.card > .amount, .card > .free { margin: 10px 0 0; white-space: nowrap; }
.card > .amount { font-size: 1.75rem; }
.card > .free { text-align: left; }
.card > .free .free-num { font-size: 1.75rem; margin: 0; }
.card > .free .free-per { font-size: .85rem; }
.card.is-collapsed > .free .basis { display: none; }
.lead { margin: 4px 0 0; color: var(--muted); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.gain { margin: 12px 0 0; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--accent-soft); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.gain-main { display: flex; flex-direction: column; min-width: 0; }
.gain-k { font-size: .7rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.gain-text { font-weight: 500; color: var(--text); overflow-wrap: anywhere; line-height: 1.3; }
.gain-amt { margin: 0; flex: none; font-size: 1.15rem; font-weight: 600; color: var(--text); white-space: nowrap; font-variant-numeric: tabular-nums; }
.card-more { cursor: default; }
.points { margin: 12px 0 4px; padding-left: 1.2em; display: grid; gap: 4px; }
.points li { overflow-wrap: anywhere; }
.points li::marker { color: var(--accent); }
.more-links { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 8px 0 0; }
button.quiet { border: 0; background: none; padding: 6px 0; min-height: 36px; font: inherit; font-size: .88rem; font-weight: 500; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
button.quiet[aria-expanded="true"] { text-decoration: none; }
.fulltext, .why { margin: 6px 0 0; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--panel); font-size: .92rem; }
.fulltext .body { margin: 0 0 8px; }
.card-name { margin: 0 0 4px; font-weight: 600; }
.plain-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fulltext .plain { padding: 0; margin: 8px 0; background: none; }
.why .evidence { margin-top: 0; }
.why .evidence li { background: var(--card-solid); }
.lang-note { margin: -4px auto 8px; text-align: center; font-size: .78rem; color: var(--muted); }
.speak { flex: none; border: 0; background: var(--accent-soft); color: var(--text); border-radius: var(--radius-round); width: 36px; height: 36px; cursor: pointer; display: grid; place-items: center; padding: 0; }
.speak svg.ic { width: 18px; height: 18px; }
.speak[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.amount { margin: 12px 0 0; font-size: 1.9rem; font-weight: 500; color: var(--text); letter-spacing: -.01em; }
.card[data-type="warning"] .amount { color: var(--neg); }
.peryear { margin: 2px 0 0; color: var(--muted); font-size: .9rem; }
.body { margin: 8px 0; overflow-wrap: anywhere; }
.basis { margin: 6px 0; color: var(--muted); font-size: .82rem; }
.basis.strong { color: var(--text); font-weight: 500; }
.plain { margin: 10px 0; padding: 12px; background: var(--panel); border-radius: var(--radius-sm); font-size: .92rem; }
.plain h3 { margin: 0 0 4px; font-size: .78rem; font-weight: 500; color: var(--muted); }
.plain p { margin: 0; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.badge { font-size: .74rem; padding: 3px 10px; border-radius: var(--radius-pill); background: var(--accent-soft); color: var(--accent); font-weight: 500; }
.badge.ai { background: var(--ai-bg); color: var(--ai-text); }
details { margin: 6px 0; font-size: .9rem; }
summary { cursor: pointer; color: var(--accent); font-weight: 500; }
.evidence { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.evidence li { display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px; background: var(--panel); border-radius: var(--radius-sm); }
.evidence .ev-main { color: var(--muted); min-width: 0; overflow-wrap: anywhere; }
.action { margin-top: 12px; width: 100%; min-height: 48px; border: 0; border-radius: var(--radius-btn); background: var(--primary); color: var(--on-primary); padding: 12px 20px; font: inherit; font-weight: 600; cursor: pointer; letter-spacing: .01em; }
.action.done { background: var(--accent-soft); color: var(--accent); cursor: default; }
.action.warn { background: var(--warn); color: var(--on-warn); }
.action:disabled:not(.done) { opacity: .6; cursor: progress; }

/* generic rows: separate rounded tiles, amount right-aligned */
.rows { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 8px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; background: var(--panel); border-radius: var(--radius-md); }
.row-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.row-date { font-size: .78rem; color: var(--muted); }
.row-label { overflow-wrap: anywhere; }
.row-text { font-size: .85rem; color: var(--muted); }
.row-amt { font-weight: 500; white-space: nowrap; }
.row-amt.neg { color: var(--neg); }

/* bills departure board (own design: dark panel, monospace, yellow dates) */
.board { margin: 12px 0; background: var(--board-bg); color: var(--board-text); border-radius: var(--radius-md); padding: 10px 12px; font-family: var(--mono); font-size: .86rem; letter-spacing: 0; }
.board-row { display: grid; grid-template-columns: 4.2em 1fr auto 1.4em; gap: 8px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--glass-08); }
.board-row:last-of-type { border-bottom: 0; }
.board-head { font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: var(--board-muted); padding-top: 2px; }
.board-head .b-time { color: var(--board-muted); }
.b-time { display: flex; flex-direction: column; line-height: 1.15; color: var(--board-hi); font-variant-numeric: tabular-nums; }
.b-wd { font-size: .7rem; opacity: .85; }
.b-dest { display: flex; flex-direction: column; min-width: 0; }
.b-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-transform: uppercase; letter-spacing: .03em; }
.b-kind { font-size: .7rem; color: var(--board-muted); }
.b-amt { text-align: right; }
.b-check { text-align: center; }
.b-check.on { color: var(--board-ok); font-weight: 700; }
.board-row.info .b-name { white-space: normal; text-transform: none; color: var(--board-hi); }
.board-row.covered .b-name { color: var(--board-ok); }
.board .basis { color: var(--board-muted); font-family: var(--font); margin: 6px 0 0; }

/* one-off months: diverging bars around zero */
.oneoff { margin: 12px 0; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .78rem; color: var(--muted); margin: 0 0 6px; }
.key::before { content: ""; display: inline-block; width: 12px; height: 10px; border-radius: var(--radius-xs); margin-right: 5px; vertical-align: -1px; box-sizing: border-box; }
.key.neg { color: var(--muted); }
.key.neg::before { background: var(--chart-neg); }
.key.key-ghost::before { border: 2px solid var(--chart-ghost); }
.oneoff-month { padding: 8px 0; border-bottom: 1px solid var(--chart-grid); }
.oneoff-month:last-child { border-bottom: 0; }
.oneoff-head { margin: 0 0 4px; display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; font-size: .9rem; }
.oneoff-head strong { font-weight: 600; }
.oneoff-cause { color: var(--muted); font-size: .8rem; overflow-wrap: anywhere; }
.track { position: relative; height: 22px; margin: 3px 0; }
.track .zero { position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: var(--muted); }
.bar { position: absolute; top: 3px; height: 16px; border-radius: var(--radius-xs); box-sizing: border-box; }
.bar.left { right: 50%; }
.bar.right { left: 50%; }
.bar.neg { background: var(--chart-neg); }
.bar.ghost { background: transparent; border: 2px solid var(--chart-ghost); }
.bar-val { position: absolute; top: 2px; font-size: .75rem; color: var(--muted); }
.bar-val.left { left: calc(50% + 6px); }   /* value of a left (negative) bar sits in the empty right half */
.bar-val.right { right: calc(50% + 6px); }

/* salary split */
.split { margin: 12px 0; }
.stack { display: flex; height: 22px; border-radius: var(--radius-pill); overflow: hidden; background: var(--chart-grid); gap: 2px; }
.stack .seg { height: 100%; }
.s0 { background: var(--seg-0); } .s1 { background: var(--seg-1); } .s2 { background: var(--seg-2); }
.split-legend { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; font-size: .9rem; }
.split-legend li { display: flex; align-items: center; gap: 8px; }
.dot { width: 10px; height: 10px; border-radius: var(--radius-round); flex: none; }
.lg-label { flex: 1; min-width: 0; }
.lg-amt { font-weight: 500; }

/* free to spend */
.free { margin: 8px 0; text-align: center; }
.free-num { margin: 4px 0 0; font-size: 3rem; font-weight: 500; color: var(--text); letter-spacing: -.01em; }
.free-per { margin: 0; color: var(--muted); }
.free-after { margin: 6px auto 0; display: inline-block; padding: 4px 12px; border-radius: var(--radius-pill); background: var(--accent-soft); color: var(--accent); font-weight: 600; }

/* what-if */
.whatif { margin: 12px 0; }
.wi-live { display: grid; gap: 12px; padding: 12px; background: var(--panel); border-radius: var(--radius-md); margin-bottom: 8px; }
.wi-group { display: grid; gap: 6px; }
.wi-label { margin: 0; font-size: .85rem; color: var(--muted); }
.wi-label strong { color: var(--text); font-weight: 600; }
.wi-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.wi-range { width: 100%; accent-color: var(--range); }
.wi-toggle { display: flex; gap: 8px; align-items: center; font-size: .9rem; }
.wi-toggle input { accent-color: var(--range); width: 18px; height: 18px; }
.wi-out { text-align: center; padding: 6px 0 0; }
.wi-line { margin: 0; color: var(--muted); font-size: .85rem; }
.wi-num { margin: 0; font-size: 2.2rem; font-weight: 500; color: var(--text); }
.wi-out[aria-busy="true"] .wi-num { opacity: .5; }
.wi-paused { margin: 0; font-size: .85rem; color: var(--muted); min-height: 1.2em; }
.wi-sub { margin: 4px 0 0; font-size: .8rem; font-weight: 500; color: var(--muted); }
.wi-scen.small .rows { font-size: .88rem; }

/* story banner + viewer */
.story-banner { background: linear-gradient(135deg, var(--banner-bg), var(--banner-bg-2)); color: var(--banner-text); border-radius: var(--radius); padding: 18px 16px 16px; }
.story-kicker { margin: 0; font-size: .8rem; font-weight: 500; letter-spacing: .04em; opacity: .9; display: flex; align-items: center; gap: 6px; }
.story-kicker svg.ic { width: 18px; height: 18px; }
.story-title { margin: 6px 0 4px; font-size: 1.35rem; font-weight: 600; }
.story-body { margin: 0 0 14px; opacity: .92; }
.story-open { border: 0; border-radius: var(--radius-pill); background: var(--banner-btn); color: var(--on-banner-btn); font: inherit; font-weight: 600; min-height: 48px; padding: 10px 22px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.story-open svg.ic { width: 18px; height: 18px; }
.story-viewer { position: fixed; inset: 0; z-index: 20; background: linear-gradient(170deg, var(--story-bg), var(--story-bg-2)); color: var(--story-text); display: flex; flex-direction: column; padding: 12px 16px 16px; outline: none; touch-action: pan-y; user-select: none; }
.story-progress { display: flex; gap: 4px; max-width: 720px; width: 100%; margin: 0 auto; }
.pseg { flex: 1; height: 4px; border-radius: var(--radius-pill); background: var(--glass-25); overflow: hidden; }
.pfill { display: block; height: 100%; width: 0; background: var(--story-bar); transition: width .3s ease; }
.pseg.done .pfill, .pseg.active .pfill { width: 100%; }
.story-close { position: absolute; top: 24px; right: 16px; border: 0; background: var(--glass-15); color: var(--story-text); border-radius: var(--radius-round); width: 40px; height: 40px; cursor: pointer; display: grid; place-items: center; padding: 0; }
.story-stage { flex: 1; display: flex; align-items: center; justify-content: center; max-width: 720px; width: 100%; margin: 0 auto; }
.story-screen { width: 100%; text-align: left; padding: 12px 4px; animation: rise .35s ease both; }
.story-stage { overflow-y: auto; min-height: 0; }
.story-screen.tone-good .story-big { color: var(--story-good-text); }
.story-screen.no-num .story-text { font-size: clamp(1.5rem, 4.6vh, 2.6rem); line-height: 1.25; margin-top: 2.2vh; }
.story-count { margin: 0 0 8px; font-size: .85rem; opacity: .75; }
.story-headline { margin: 0; font-size: clamp(1.4rem, 4.2vh, 2.4rem); line-height: 1.2; font-weight: 500; }
.story-big { margin: 2.2vh 0 1vh; font-size: clamp(2.6rem, min(11vw, 9vh), 5.2rem); font-weight: 600; letter-spacing: -.02em; line-height: 1; overflow-wrap: anywhere; }
.story-big.neg { color: var(--story-good-text); }
.story-text { margin: 1.4vh 0 0; font-size: clamp(1.1rem, 3vh, 1.9rem); line-height: 1.3; opacity: .95; }
.story-action { margin-top: 26px; background: var(--primary); color: var(--on-primary); border-radius: var(--radius-pill); }
.story-action.done { background: var(--glass-20); color: var(--story-text); }
.story-nav { display: flex; justify-content: space-between; max-width: 720px; width: 100%; margin: 0 auto; }
.story-nav button { border: 0; background: var(--glass-12); color: var(--story-text); border-radius: var(--radius-pill); padding: 10px 18px; min-height: 44px; font: inherit; cursor: pointer; }
.story-nav button:disabled { opacity: .3; cursor: default; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* sheets */
.sheet-back { position: fixed; inset: 0; z-index: 30; background: var(--backdrop); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 520px; background: var(--card-solid); color: var(--text); border-radius: var(--radius-lg) var(--radius-lg) 0 0; padding: 10px 16px 22px; box-shadow: 0 -6px 24px var(--shadow-sheet); animation: up .2s ease both; }
.sheet::before { content: ""; display: block; width: 40px; height: 4px; border-radius: var(--radius-pill); background: var(--line); margin: 0 auto 14px; }
.sheet-kicker { margin: 0; font-size: .8rem; font-weight: 500; color: var(--muted); }
.sheet-name { margin: 6px 0 12px; font-size: 1.25rem; font-weight: 600; overflow-wrap: anywhere; display: flex; align-items: center; gap: 10px; }
.sheet-line { margin: 0 0 8px; font-size: 1.1rem; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.sheet-lock { margin: 0 0 8px; display: flex; align-items: center; gap: 6px; color: var(--note-text); background: var(--note-bg); border-radius: var(--radius-pill); padding: 3px 10px 3px 8px; width: fit-content; font-size: .85rem; font-weight: 500; }
.sheet-lock svg.ic { width: 15px; height: 15px; }
.sheet-more { display: block; margin: 0 0 8px; }
.sheet-details { margin: 0 0 8px; }
.sheet-facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 0 0 12px; padding: 12px; background: var(--panel); border-radius: var(--radius-md); }
.sheet-facts dt { color: var(--muted); }
.sheet-facts dd { margin: 0; font-weight: 600; text-align: right; }
.sheet-demo { margin: 0 0 12px; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--note-bg); color: var(--note-text); font-size: .85rem; font-weight: 500; }
.sheet-error { margin: 0 0 12px; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--warn-soft); color: var(--warn); font-size: .9rem; }
.sheet-btns { display: flex; gap: 8px; align-items: center; }
.sheet-btns .action { margin-top: 0; flex: 2; }
button.ghost { flex: 1; min-height: 48px; border: 1.5px solid var(--outline); background: none; border-radius: var(--radius-btn); padding: 10px 12px; font: inherit; font-weight: 500; cursor: pointer; color: var(--text); }
@keyframes up { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }

/* coins into a jar (<= 1.3 s; off with prefers-reduced-motion) */
.jar-anim { position: fixed; inset: 0; z-index: 40; pointer-events: none; display: grid; place-items: center; }
.jar-anim .jar { width: 96px; height: 96px; color: var(--text); animation: pop 1.3s ease both; }
.jar-anim .jar svg.ic { width: 96px; height: 96px; stroke-width: 1.2; }
.jar-anim .coin { position: absolute; width: 26px; height: 26px; border-radius: var(--radius-round); background: var(--primary); top: 30%; opacity: 0; animation: drop .8s ease-in both; }
.jar-anim .c0 { margin-left: -40px; animation-delay: .05s; }
.jar-anim .c1 { animation-delay: .2s; }
.jar-anim .c2 { margin-left: 40px; animation-delay: .35s; }
.jar-anim .jar-ok { position: absolute; font-size: 2.2rem; color: var(--good); font-weight: 700; opacity: 0; animation: ok 1.3s ease both; margin-top: 130px; }
@keyframes drop { 0% { opacity: 0; transform: translateY(-60px); } 20% { opacity: 1; } 90% { opacity: 1; } 100% { opacity: 0; transform: translateY(90px) scale(.6); } }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 15% { transform: scale(1); opacity: 1; } 80% { transform: scale(1.05); opacity: 1; } 100% { opacity: 0; } }
@keyframes ok { 0%, 60% { opacity: 0; } 75%, 90% { opacity: 1; } 100% { opacity: 0; } }

/* pots tab */
.pots-title { margin: 0 0 10px; font-size: 1.1rem; font-weight: 600; }
.pots-totals { display: grid; grid-template-columns: 1fr; gap: 8px; margin-bottom: 12px; }
.tot { background: var(--card); border-radius: var(--radius-md); padding: 10px 14px; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; min-width: 0; }
.tot-k { font-size: .9rem; color: var(--muted); }
.tot-v { margin: 0; font-size: 1.05rem; font-weight: 500; white-space: nowrap; }
/* task 0059: compact two-column pot rows: [chip 28] [name / one quiet line] [amount] [pencil 44]; progress under the row */
.pot-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pot { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 10px; row-gap: 1px; align-items: center; background: var(--card); border-radius: var(--radius-md); padding: 8px 12px 8px 10px; min-height: 56px; box-sizing: border-box; }
.pot:has(> .pot-edit) { grid-template-columns: 28px minmax(0, 1fr) auto 34px; padding-right: 6px; column-gap: 8px; }
.pot > .pot-main { display: contents; }
.pot > .chipicon.pot-icon { grid-column: 1; grid-row: 1 / 3; }
.pot .pot-line { grid-column: 2; grid-row: 1; }
.pot > .pot-bal { grid-column: 3; grid-row: 1; }
.pot .pot-sub { grid-column: 2 / 4; grid-row: 2; }
.pot > .pot-edit { grid-column: 4; grid-row: 1 / 3; }
.pot > .chipicon.pot-icon { width: 28px; height: 28px; border-radius: var(--radius-xs); }
.pot > .chipicon.pot-icon svg.ic { width: 16px; height: 16px; }
.pot > .pot-bal { margin: 0; white-space: nowrap; text-align: right; line-height: 1.2; font-size: 1rem; }
.pot > .pot-bal .cur { font-size: .7rem; font-weight: 600; color: var(--muted); margin-right: .25em; }
.pot > .pot-bal .num { font-weight: 700; font-variant-numeric: tabular-nums; }
.pot > .pot-edit { width: 44px; height: 44px; margin: 0 -5px; } /* 44 px touch target over a 34 px column */
.pot > .pot-edit svg.ic { width: 18px; height: 18px; }
.pot > .pot-progress { grid-column: 2 / 4; grid-row: 3; max-width: none; margin: 5px 0 1px; }
.pot-sub { display: block; font-size: .78rem; line-height: 1.3; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pot-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pot-name { font-weight: 600; line-height: 1.3; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pot-purpose { font-size: .8rem; color: var(--muted); }
.lock-badge { align-self: flex-start; margin-top: 4px; font-size: .72rem; padding: 2px 8px 2px 6px; border-radius: var(--radius-pill); background: var(--note-bg); color: var(--note-text); display: inline-flex; align-items: center; gap: 4px; }
.lock-badge svg.ic { width: 13px; height: 13px; }
.pot-nums { text-align: right; display: flex; flex-direction: column; flex: none; }
.pot-bal { font-weight: 500; }
.pot-in { font-size: .8rem; color: var(--accent); }
.linkish { margin-top: 14px; border: 0; background: none; color: var(--warn); text-decoration: underline; font: inherit; font-size: .9rem; cursor: pointer; padding: 4px 0; }

/* states */
.state { text-align: center; color: var(--muted); padding: 28px 16px; background: var(--card); border-radius: var(--radius); display: grid; justify-items: center; gap: 4px; }
.state .chipicon { width: 44px; height: 44px; margin-bottom: 4px; }
.state p { margin: 0; color: var(--text); }
.state button { margin-top: 12px; min-height: 44px; border: 0; background: var(--primary); color: var(--on-primary); border-radius: var(--radius-btn); padding: 10px 22px; font: inherit; font-weight: 600; cursor: pointer; }
.skeleton { height: 150px; border-radius: var(--radius); background: linear-gradient(90deg, var(--skeleton-a) 25%, var(--skeleton-b) 50%, var(--skeleton-a) 75%); background-size: 200% 100%; animation: sh 1.2s infinite linear; }
@keyframes sh { to { background-position: -200% 0; } }
.toast { position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--toast-bg); color: var(--toast-text); padding: 12px 18px; border-radius: var(--radius-pill); max-width: 90vw; z-index: 50; box-shadow: 0 6px 20px var(--shadow-sheet); font-weight: 500; }
button:focus-visible, summary:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.story-viewer button:focus-visible, .story-banner button:focus-visible { outline-color: var(--story-text); }

@media (min-width: 900px) { body { font-size: 18px; } }
/* ?demo=1: projector mode - bigger type, filters in the options menu */
body.demo { font-size: 20px; }
body.demo .chips { display: none !important; }
body.demo .amount { font-size: 2.4rem; }
body.demo .card > .amount { font-size: 2rem; }
body.demo .gain-amt { font-size: 1.35rem; }
body.demo .card-title { font-size: 1.15rem; }
body.demo .story-headline { font-size: clamp(1.6rem, 5.4vh, 3.2rem); }
body.demo .story-big { font-size: clamp(3rem, min(13vw, 12vh), 7rem); }
body.demo .story-text { font-size: clamp(1.25rem, 4vh, 2.4rem); }
body.demo .story-count { font-size: 1rem; }
body.demo .story-nav button { font-size: 1.1rem; padding: 12px 20px; }
body.demo .meter-big { font-size: 2.4rem; }
body.demo .tab { font-size: .8rem; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .jar-anim { display: none; }
}
body.demo .story-stage, body.demo .story-progress, body.demo .story-nav { max-width: 1040px; }

/* ===== task 0043 "Money speaks first": list start, Home, doors, notification, quiet progress (variables only) ===== */
html.home-mode .subbar, html.home-mode main.feed, html.home-mode body > .tabs:not(.home-nav),
html.home-mode .top-left, html.home-mode .top-row h1, html.home-mode .top-sub, html.home-mode #menu-filter, html.home-mode #menu-chips { display: none !important; }
html.home-mode .top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 2px; }
html.home-mode .top > * { margin: 0; max-width: none; }
html.home-mode .top-row { display: flex; }
html.home-mode .brand { justify-content: flex-start; font-size: .8rem; }
html.home-mode #menu .lang { margin-bottom: 4px; }
html.home-mode body { padding-bottom: env(safe-area-inset-bottom, 0px); }
html.home-mode.view-door body { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
html.view-list .top, html.view-door .top, html.view-list .demo-foot { display: none; }

/* 1. the plain list, as the account view shows it today */
.view-list { max-width: 720px; margin: 0 auto; padding: calc(14px + env(safe-area-inset-top, 0px)) 16px 110px; }
.pl-head { text-align: center; margin-bottom: 8px; }
.pl-title { font-size: 1.15rem; }
.pl-sub { margin: 2px 0 0; color: var(--muted); font-size: .85rem; }
.pl-group { margin-top: 10px; }
.pl-date { margin: 0 0 4px; padding: 0 4px; font-size: .78rem; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.pl-rows { list-style: none; margin: 0; padding: 0; background: var(--card); border-radius: var(--radius-md); }
.pl-row { display: flex; justify-content: space-between; gap: 12px; padding: 11px 14px; border-top: 1px solid var(--line); }
.pl-row:first-child { border-top: 0; }
.pl-payee { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-amt { flex: none; font-variant-numeric: tabular-nums; font-weight: 500; }
.pl-empty { text-align: center; color: var(--muted); }
.list-pill { position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 8;
             border: 0; border-radius: var(--radius-pill); background: var(--primary); color: var(--on-primary); font: inherit; font-weight: 700;
             font-size: 1.05rem; padding: 14px 30px; min-height: 52px; box-shadow: 0 8px 24px var(--shadow-sheet); cursor: pointer; white-space: nowrap; }
.view-list.morph-out { transition: opacity .3s ease, transform .3s ease; opacity: 0; transform: scale(.96); }
.home.morph-in { animation: morph-in .3s ease both; }
@keyframes morph-in { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }

/* 2. Home: date chip, free today, ONE moment, four doors, the pots strip */
.home, .door-view { max-width: 720px; margin: 0 auto; padding: 4px 16px 16px; }
.home-in { display: grid; gap: 10px; }
.date-chip { justify-self: start; margin: 2px 0 0; padding: 4px 12px; border-radius: var(--radius-pill); background: var(--chip-bg); color: var(--chip-text); font-size: .8rem; font-weight: 500; }
.date-chip.replay { background: var(--note-bg); color: var(--note-text); }
.free-line { display: flex; align-items: center; gap: 4px; }
.free-text { margin: 0; font-size: 1.15rem; font-weight: 600; color: var(--title); }
.info-btn { width: 32px; height: 32px; color: var(--muted); }
.info-btn svg.ic { width: 18px; height: 18px; }
.free-hint { margin: -6px 0 0; font-size: .82rem; color: var(--muted); }
.moment { background: var(--card); border-radius: var(--radius); padding: 14px 16px 16px; box-shadow: 0 1px 3px var(--shadow-soft); }
.moment-title { margin: 0; font-weight: 700; font-size: 1.05rem; line-height: 1.3; color: var(--title); overflow-wrap: anywhere; }
.moment-text { margin: 4px 0 0; color: var(--muted); font-size: .9rem; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; line-clamp: 1; overflow: hidden; }
.moment-amt { margin: 8px 0 0; font-size: 2.1rem; font-weight: 600; line-height: 1.1; color: var(--text); font-variant-numeric: tabular-nums; }
.moment .action { margin-top: 10px; }
.moment.calm .moment-text { -webkit-line-clamp: 2; line-clamp: 2; }
.doors { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.door { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 10px; align-items: center; text-align: left;
        border: 0; border-radius: var(--radius-md); background: var(--card); color: var(--text); padding: 12px; min-height: 76px; font: inherit; cursor: pointer;
        box-shadow: 0 1px 3px var(--shadow-soft); }
.door .door-ic { grid-row: 1 / span 2; width: 34px; height: 34px; }
.door-label { font-weight: 600; font-size: .95rem; line-height: 1.2; }
.door-state { font-size: .78rem; color: var(--muted); line-height: 1.25; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.meter-strip { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; border-radius: var(--radius-pill); background: var(--hero-bg); color: var(--hero-text);
               padding: 8px 14px; min-height: 40px; font: inherit; font-size: .85rem; text-align: left; cursor: pointer; }
.meter-strip svg.ic { width: 18px; height: 18px; }
.ms-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-num { font-variant-numeric: tabular-nums; }
.ms-sub { color: var(--muted); }

/* 3. door pages: back chevron, centred title, hero number, one visual, one action, the cards */
.door-view { overflow-x: clip; }  /* the slide-in must never widen the page (mobile browsers keep a wider layout viewport) */
.door-view.slide-in > .door-page { animation: slide-in .28s ease both; }
@keyframes slide-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
.door-page { display: grid; gap: 10px; padding-top: calc(6px + env(safe-area-inset-top, 0px)); }
.door-head { display: grid; grid-template-columns: 40px minmax(0, 1fr) 40px; align-items: center; }
.door-title { font-size: 1.1rem; font-weight: 600; }
.door-hero { text-align: center; padding: 6px 0 2px; }
.hero-num { margin: 0; font-size: 2.4rem; font-weight: 600; line-height: 1.1; color: var(--title); font-variant-numeric: tabular-nums; }
.hero-sub { margin: 2px 0 0; color: var(--muted); }
.door-visual { background: var(--card); border-radius: var(--radius); padding: 12px; min-width: 0; }
.door-visual > .board { margin: 0; }
.door-free { margin: 8px 0 0; font-weight: 600; }
.door-action { margin-top: 0; }
.door-details { margin: 8px 0 0; font-size: .85rem; font-weight: 600; color: var(--muted); letter-spacing: .03em; text-transform: uppercase; }
.door-cards { display: grid; gap: 12px; }
.card.is-focus { box-shadow: 0 0 0 2px var(--outline); }
.home-nav .tab { max-width: 140px; }

/* 4. the notification banner (inside the phone frame on the stage, too) */
.notif { position: fixed; left: 8px; right: 8px; top: calc(8px + env(safe-area-inset-top, 0px)); z-index: 45; max-width: 520px; margin: 0 auto;
         transform: translateY(-140%); transition: transform .35s ease; }
.notif.in { transform: none; }
.notif.still { transition: none; }
.notif-card { display: grid; gap: 2px; width: 100%; text-align: left; border: 0; border-radius: var(--radius-lg); padding: 10px 14px 12px; font: inherit;
              background: var(--card-solid); color: var(--text); box-shadow: 0 10px 30px var(--shadow-sheet); cursor: pointer; }
.notif-head { display: flex; align-items: center; gap: 6px; font-size: .75rem; color: var(--muted); }
.notif-mark { width: 18px; height: 18px; border-radius: var(--radius-xs); }
.notif-app { font-weight: 600; color: var(--text); }
.notif-sim { margin-left: auto; padding: 1px 8px; border-radius: var(--radius-pill); background: var(--note-bg); color: var(--note-text); font-size: .68rem; font-weight: 600; }
.notif-title { font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.notif-body { font-size: .9rem; line-height: 1.3; color: var(--text); overflow-wrap: anywhere; }

/* 5. quiet progress: a thin bar per bill pot (milestones removed, task 0059) */
.progress { display: block; height: 4px; margin: 6px 0 2px; border-radius: var(--radius-pill); background: var(--line); overflow: hidden; max-width: 160px; }
.progress-fill { display: block; height: 100%; border-radius: var(--radius-pill); background: var(--accent); }
.progress-text { font-size: .78rem; color: var(--muted); }
.hp-pots { margin-bottom: 10px; }
.year-badge { margin: 14px auto 0; width: fit-content; padding: 2px 12px; border-radius: var(--radius-pill); box-shadow: inset 0 0 0 1.5px var(--story-text); font-size: .8rem; font-weight: 700; letter-spacing: .08em; }
@media (prefers-reduced-motion: reduce) {
  .notif, .view-list.morph-out, .home.morph-in, .door-view.slide-in > .door-page { transition: none; animation: none; }
}
.brand-home { display: none; }
html.home-mode #brand-text { display: none; }
html.home-mode .brand-home { display: inline; font-size: .95rem; font-weight: 600; letter-spacing: .01em; color: var(--title); }

/* task 0044: list header like the account view (no balance), board "+N more", bills spread line, menu footer */
.pl-head { display: flex; align-items: center; justify-content: center; gap: 10px; text-align: left; }
.pl-headtext { min-width: 0; }
.pl-ic { flex: none; }
.board-more { margin: 6px 0 0; color: var(--board-hi); font-size: .85rem; font-weight: 600; }
.bills-spread { margin: 10px 0 0; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--text); font-weight: 500; }
.menu-foot { margin: 14px 0 0; font-size: .72rem; line-height: 1.4; color: var(--muted); }
html.view-home .demo-foot { padding-top: 4px; padding-bottom: 12px; }

/* task 0046: pots the client controls - confirm sheet (destination pills, stepper, stop line), pot detail sheet,
   pot rows (paused chip, destination icon, the rule in short), "In your pot ✓ · manage" */
.sheet { position: relative; max-height: 92vh; overflow-y: auto; }
.sheet-x { position: absolute; top: 8px; right: 8px; }
.confirm-sheet .sheet-line { padding-right: 40px; }
.sheet-q { margin: 12px 0 6px; font-size: .9rem; font-weight: 600; color: var(--muted); }
.dest-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.dest-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 14px; border: 0; border-radius: var(--radius-pill); background: var(--chip-bg); color: var(--chip-text); box-shadow: inset 0 0 0 1.5px var(--line); font: inherit; font-size: .92rem; font-weight: 500; cursor: pointer; }
.dest-pill svg.ic { width: 18px; height: 18px; }
.dest-pill.on { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); font-weight: 600; }
.sheet-after { margin: 8px 0 0; font-size: .9rem; line-height: 1.35; color: var(--text); }
.stepper { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 14px 0 4px; }
.step { width: 44px; height: 44px; border: 0; border-radius: var(--radius-pill); background: var(--panel); color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.step:disabled { opacity: .4; cursor: default; }
.step svg.ic { width: 20px; height: 20px; }
.step-val { min-width: 120px; text-align: center; font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.sheet-stop { margin: 12px 0 0; display: flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--muted); }
.sheet-stop svg.ic { width: 16px; height: 16px; flex: none; }
.sheet-ok { margin-top: 14px; }
.status-chip { flex: none; font-size: .72rem; font-weight: 600; padding: 2px 8px; border-radius: var(--radius-pill); background: var(--accent-soft); color: var(--accent); }
.status-chip.paused { background: var(--note-bg); color: var(--note-text); }
.pot-detail .sheet-name { padding-right: 40px; flex-wrap: wrap; }
.pd-balance { margin: 0 0 6px; font-size: 2rem; font-weight: 700; }
.pd-rule { margin: 0 0 6px; font-weight: 600; }
.pd-rule.off { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.pd-paused { margin: 0 0 6px; font-size: .88rem; color: var(--muted); }
.pd-dest { margin: 0 0 4px; display: flex; align-items: center; gap: 6px; font-size: .9rem; }
.pd-dest svg.ic { width: 18px; height: 18px; color: var(--accent); flex: none; }
.pot-detail .sheet-lock { margin-top: 8px; }
.pd-zone { margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--line); }
.pd-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.pd-actions .action { margin-top: 0; flex: 1; width: auto; }
.pd-btn { flex: none; }
.pd-question { margin: 4px 0 10px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.pd-history { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 2px; font-size: .75rem; color: var(--muted); }
.pot-line { display: flex; align-items: center; gap: 6px; min-width: 0; flex-wrap: nowrap; }
.pot-line > :not(.pot-name) { flex: none; }
.pot-sub.off { opacity: .8; }
.pot-sub > span { display: inline; font-size: inherit; color: inherit; background: none; padding: 0; margin: 0; }
.dest-ic { width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); flex: none; }
.dest-ic svg.ic { width: 16px; height: 16px; }
.pot-rule.off { color: var(--muted); }
.pot.tappable { cursor: pointer; }
.pot.tappable:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.action.done.manage { cursor: pointer; }
@media (prefers-reduced-motion: reduce) {
  .sheet { animation: none; }
}
/* task 0048: voice clip speakers (web/audio.js) */
.notif.has-speak .notif-card { padding-right: 52px; }
.notif .notif-speak { position: absolute; right: 10px; bottom: 10px; width: 34px; height: 34px; }
.story-speak { margin: 14px 0 0; }

/* ---------- task 0050: the year story in the designer's look (own palette: same in both app themes) ---------- */
.story-viewer { --s-ink: var(--sto-ink); --s-mint: var(--sto-mint); --s-brand: var(--sto-brand); --s-white: var(--sto-white);
  background: var(--s-ink); color: var(--s-mint); padding: 0; overflow: hidden; transition: background-color .45s ease, color .45s ease; }
.story-viewer.surface-ink { background: var(--s-ink); color: var(--s-mint); --s-fg: var(--s-mint); --s-num: var(--s-brand); --s-bar: var(--s-brand); --s-faint: var(--sto-faint-ink); }
.story-viewer.surface-mint { background: var(--s-mint); color: var(--s-ink); --s-fg: var(--s-ink); --s-num: var(--s-ink); --s-bar: var(--s-ink); --s-faint: var(--sto-faint-light); }
.story-viewer.surface-brand { background: var(--s-brand); color: var(--s-ink); --s-fg: var(--s-ink); --s-num: var(--s-ink); --s-bar: var(--s-ink); --s-faint: var(--sto-faint-light); }
.story-top { position: relative; z-index: 2; padding: 16px 20px 0; max-width: 720px; width: 100%; margin: 0 auto; box-sizing: border-box; }
.story-viewer .story-progress { gap: 4px; }
.story-viewer .pseg { height: 4px; border-radius: var(--radius-pill); background: var(--s-faint); overflow: hidden; flex: 1; }
.story-viewer .pfill { background: var(--s-bar); }
.story-viewer .pseg.done .pfill, .story-viewer .pseg.active .pfill { width: 100%; }
.story-brand { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.story-logo { height: 34px; width: auto; border-radius: var(--sto-r-cell); display: block; }
.story-viewer .story-close { position: static; background: var(--s-faint); color: var(--s-fg); width: 40px; height: 40px; }
.story-viewer .story-stage { position: relative; display: block; flex: 1; overflow: hidden; max-width: 720px; padding: 0; }
.story-viewer .story-screen { position: absolute; inset: 0; padding: 0; animation: storyIn .4s ease both; }
@keyframes storyIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.story-copy { position: relative; z-index: 2; padding: 28px 26px 0; }
.story-viewer .story-count { font-size: .875rem; font-weight: 700; opacity: .75; margin: 0; }
.story-viewer .story-big { margin: 14px 0 0; display: flex; align-items: baseline; gap: 8px; font-weight: 800; letter-spacing: -.035em; line-height: 1; font-size: 3.75rem; color: var(--s-fg); }
.story-viewer .story-big .cur { font-size: 1.5rem; letter-spacing: 0; }
.story-viewer .story-big .num { color: var(--s-num); }
.story-viewer .story-screen.tone-good .story-big { color: var(--s-fg); }
.story-viewer .story-text, .story-viewer .story-screen.no-num .story-text { margin: 16px 0 0; font-size: 1.5rem; line-height: 1.3; font-weight: 500; opacity: 1; }
.story-art { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; pointer-events: none; animation: storyArt .6s ease both; }
@keyframes storyArt { from { opacity: 0; } to { opacity: 1; } }
.story-art svg { display: block; width: 100%; height: auto; max-height: 46vh; }
.story-art .f-ink { fill: var(--s-ink); } .story-art .f-mint { fill: var(--s-mint); } .story-art .f-brand { fill: var(--s-brand); }
.story-art .f-white { fill: var(--s-white); } .story-art .f-faint { fill: var(--s-faint); }
.surface-ink .story-art.art-s1_year .f-ink { fill: var(--s-ink); }
.story-art.art-s3_rhythm { padding: 0 26px 92px; }
.rhythm-top { display: flex; align-items: flex-end; gap: 12px; }
.rhythm-num { margin: 0; font-size: 7rem; font-weight: 800; line-height: .9; letter-spacing: -.04em; color: var(--s-brand); }
.rhythm-on { margin: 0 0 10px; font-size: .875rem; font-weight: 700; line-height: 1.2; opacity: .75; max-width: 9em; }
.cal { margin-top: 18px; display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; text-align: center; }
.cal-h { font-size: .625rem; font-weight: 700; opacity: .55; }
.cal-d { aspect-ratio: 1 / 1; display: grid; place-items: center; border-radius: var(--sto-r-cell); font-size: .75rem; font-weight: 700; background: var(--s-faint); color: inherit; opacity: .75; }
.cal-d.empty { background: none; }
.cal-d.on { background: var(--s-brand); color: var(--s-ink); opacity: 1; }
.cal-cap { margin: 10px 0 0; font-size: .75rem; font-weight: 700; opacity: .65; }
.story-viewer .story-nav { position: absolute; left: 0; right: 0; bottom: 20px; z-index: 3; padding: 0 20px; box-sizing: border-box; max-width: 720px; margin: 0 auto; }
.story-viewer .story-nav button { font-weight: 700; padding: 12px 22px; min-height: 46px; box-shadow: 0 2px 8px var(--sto-shadow); }
.story-viewer .story-prev { background: var(--sto-white); color: var(--s-ink); }
.story-viewer .story-next { background: var(--s-ink); color: var(--s-mint); box-shadow: 0 0 0 2px var(--sto-ring); }
.story-viewer .story-nav button:disabled { opacity: 0; pointer-events: none; }
.story-viewer .story-action, .story-viewer .story-more { display: block; width: 100%; margin-top: 28px; background: var(--s-ink); color: var(--s-mint); border: 0; border-radius: var(--radius-pill); padding: 16px; font: inherit; font-size: 1.125rem; font-weight: 700; min-height: 54px; cursor: pointer; }
.story-viewer .story-manage { display: block; margin: 12px auto 0; color: var(--s-fg); font-weight: 700; }
.story-viewer .year-badge { box-shadow: inset 0 0 0 1.5px var(--s-fg); }
.story-viewer .demo-foot-inline { font-size: .75rem; line-height: 1.5; opacity: .7; margin-top: 14px; }
.story-viewer button:focus-visible { outline-color: var(--s-fg); }
body.demo .story-viewer .story-big { font-size: 4.2rem; }
body.demo .story-viewer .story-text { font-size: 1.6rem; }
@media (max-height: 700px) { .story-viewer .story-big { font-size: 3rem; } .story-viewer .story-text { font-size: 1.25rem; } .rhythm-num { font-size: 5rem; } .cal { gap: 3px; } }
@media (prefers-reduced-motion: reduce) { .story-viewer, .story-viewer .story-screen, .story-art { animation: none; transition: none; } }

/* ---------- task 0050: Pots door goal form, goal rows, pencil ---------- */
.goal-form { margin: 18px 0 8px; padding: 18px 16px; background: var(--card); border-radius: var(--radius); display: grid; gap: 12px; }
.gf-title { margin: 0; font-size: 1.125rem; font-weight: 800; }
.gf-field { display: grid; gap: 4px; }
.gf-label { font-size: .8rem; font-weight: 700; color: var(--muted); }
.gf-input-row { display: flex; align-items: center; gap: 8px; border-radius: var(--radius-pill); background: var(--panel); padding: 0 14px; }
.gf-cur { font-size: .85rem; font-weight: 700; color: var(--muted); }
.goal-form input, .pd-goal-edit input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 1.05rem; font-weight: 700; min-height: 46px; outline: none; }
.pd-goal-edit input { background: var(--panel); border-radius: var(--radius-pill); padding: 0 14px; }
.gf-input-row:focus-within { box-shadow: 0 0 0 2px var(--accent); }
.goal-form input.gf-monthly.suggested { color: var(--muted); font-weight: 600; }
.gf-basis { font-size: .78rem; color: var(--muted); }
.gf-err { font-size: .8rem; color: var(--neg); font-weight: 600; }
.gf-line { margin: 2px 0 0; font-size: .95rem; line-height: 1.35; font-weight: 600; }
.goal-form .gf-create { background: var(--sto-brand); color: var(--sto-ink); font-weight: 800; border-radius: var(--radius-pill); }
.pd-goal-edit { display: grid; gap: 10px; }
.progress-text.goal-reach { font-weight: 700; }
.status-chip.locked { margin-left: 6px; }

/* ---------- task 0050: story banner on the story's ink surface + the year podcast button ---------- */
.story-banner.sb-ink { background: var(--sto-ink); color: var(--sto-mint); border-radius: var(--radius); padding: 18px 16px 16px; margin: 0 0 14px; }
.sb-ink .story-title { margin: 0 0 4px; font-size: 1.3rem; font-weight: 800; letter-spacing: -.01em; }
.sb-ink .story-body { margin: 0 0 14px; font-weight: 600; opacity: .8; }
.sb-row { display: flex; align-items: center; gap: 12px; }
.sb-ink .story-open { background: var(--sto-brand); color: var(--sto-ink); font-weight: 800; }
.pod-btn { position: relative; flex: none; width: 48px; height: 48px; padding: 0; border: 0; border-radius: var(--radius-round); background: var(--sto-faint-ink); color: var(--sto-mint); cursor: pointer; display: grid; place-items: center; }
.pod-btn svg.pod-ic { width: 22px; height: 22px; position: relative; z-index: 1; }
.pod-ring { position: absolute; inset: 0; width: 48px; height: 48px; transform: rotate(-90deg); }
.pod-ring circle { fill: none; stroke-width: 3; }
.pod-ring-bg { stroke: transparent; }
.pod-ring-fg { stroke: var(--sto-brand); transition: stroke-dashoffset .25s linear; }
.pod-btn[data-state="loading"] .pod-ring-fg { stroke-dashoffset: 100; animation: podspin 1s linear infinite; transform-origin: 24px 24px; }
.pod-btn[data-state="paused"] { box-shadow: inset 0 0 0 2px var(--sto-brand); }
@keyframes podspin { to { transform: rotate(360deg); } }
.sb-ink button:focus-visible { outline-color: var(--sto-mint); }
@media (prefers-reduced-motion: reduce) { .pod-btn[data-state="loading"] .pod-ring-fg { animation: none; } .pod-ring-fg { transition: none; } }

/* ---------- task 0050: accounts first (?start=accounts), the account view of the list ---------- */
.acc-home { padding-bottom: 20px; }
.acc-title { margin: 6px 0 14px; font-size: 1.6rem; font-weight: 800; letter-spacing: -.01em; }
.acc-quick { display: flex; justify-content: space-between; gap: 8px; margin: 0 0 18px; }
.acc-q { flex: 1; display: grid; justify-items: center; gap: 6px; border: 0; background: none; color: var(--text); font: inherit; padding: 0; cursor: default; }
.acc-q:disabled { opacity: 1; }
.acc-q-ic { width: 52px; height: 52px; border-radius: var(--radius-round); background: var(--card); display: grid; place-items: center; color: var(--accent); }
.acc-q-ic svg.ic { width: 22px; height: 22px; }
.acc-q-l { font-size: .75rem; font-weight: 600; color: var(--muted); }
.acc-sec { margin: 18px 0 8px; font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.acc-list { list-style: none; margin: 0; padding: 0; background: var(--card); border-radius: var(--radius-md); }
.acc-row { display: flex; align-items: center; gap: 12px; padding: 14px; border-top: 1px solid var(--line); }
.acc-row:first-child { border-top: 0; }
.acc-row.tappable { cursor: pointer; }
.acc-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.acc-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-meta { font-size: .8rem; color: var(--muted); }
.acc-go svg.ic { width: 18px; height: 18px; }
.acc-bal { margin: 0; font-weight: 700; white-space: nowrap; }
.acc-bal .cur { font-size: .7rem; font-weight: 600; color: var(--muted); }
.acc-note, .acc-none { margin: 8px 4px 0; font-size: .78rem; color: var(--muted); }
.pl-back { position: absolute; left: 0; top: 0; }
.plain-list .pl-head { position: relative; }
.acc-view .acc-quick { margin: 14px 12px 4px; }
.pl-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pl-badge { flex: none; width: 34px; height: 34px; border-radius: var(--radius-round); background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 800; font-size: .9rem; }
.acc-view .pl-row { align-items: center; }

/* task 0054: the jury's self-guided tour (web/tour.js): slim bar under the header, four chips, a hint line; the
   welcome sheet; "About this prototype" in the ⋯ menu. Colours only as theme variables. */
html.tour-mode .top { position: relative; }
.tour-bar { position: sticky; top: 0; z-index: 6; background: var(--bg-top); padding: calc(6px + env(safe-area-inset-top, 0px)) 10px 6px; border-bottom: 1px solid var(--line); box-shadow: 0 2px 10px var(--shadow-soft); }
.tour-bar > * { max-width: 720px; margin-left: auto; margin-right: auto; }
.tour-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tour-step { margin: 0; font-size: .78rem; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.tour-tools { display: flex; gap: 2px; }
.tour-restart, .tour-about { width: 34px; height: 34px; }
.tour-chips { display: flex; gap: 5px; overflow-x: auto; padding: 4px 0; scrollbar-width: none; }
.tour-chips::-webkit-scrollbar { display: none; }
.tour-chip { flex: none; border: 1px solid var(--outline); background: var(--chip-bg); color: var(--chip-text); border-radius: var(--radius-pill);
  padding: 5px 9px; min-height: 32px; font: inherit; font-size: .78rem; font-weight: 500; cursor: pointer; }
.tour-chip.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.tour-chip.pulse { animation: tour-pulse 1.1s ease-out 1; }
@keyframes tour-pulse { 0% { box-shadow: 0 0 0 0 var(--accent); } 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.tour-hint { margin: 2px 0 0; font-size: .86rem; color: var(--text); font-weight: 500; min-height: 1.3em; }
.welcome-lines { margin: 6px 0 16px; padding-left: 20px; }
.welcome-line { margin: 0 0 8px; line-height: 1.45; }
.welcome-start { margin-top: 0; }
.menu .menu-about { display: block; margin-top: 12px; border: 0; background: none; color: var(--accent); text-decoration: underline; font: inherit; font-size: .9rem; cursor: pointer; padding: 4px 0; }
.about-h { margin: 14px 0 4px; font-size: .95rem; }
.about-p { margin: 0; line-height: 1.45; font-size: .9rem; color: var(--text); }
.about-link { display: inline-block; margin-top: 14px; color: var(--accent); }
.about-sheet .sheet-btns { margin-top: 16px; }
@media (prefers-reduced-motion: reduce) { .tour-chip.pulse { animation: none; outline: 2px solid var(--accent); } }

/* task 0059: the Pots door total as one clean row (label + quiet line | amount on its own line, never wrapping) */
.door-visual.pots-visual { background: none; padding: 0; }
.door-hero.pots-hero { text-align: left; padding: 4px 2px 0; }
.pots-total-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 12px; }
.pt-left { display: flex; flex-direction: column; min-width: 0; }
.pt-label { font-weight: 600; color: var(--title); }
.pt-sub { margin: 0; font-size: .85rem; line-height: 1.3; }
.pots-hero .pt-amount { font-size: 1.9rem; font-weight: 700; white-space: nowrap; text-align: right; }
.pots-hero .pt-amount .cur { font-size: .9rem; font-weight: 600; color: var(--muted); }
/* task 0059: "How should it fill?" pills, step / percent chips, "+ add a second rule" */
.goal-form .gf-field, .goal-form .gf-input-row { min-width: 0; }
.gf-rules { display: grid; gap: 8px; min-width: 0; }
.gf-rule { display: grid; gap: 8px; min-width: 0; }
.gf-rule2 { border-top: 1px solid var(--line); padding-top: 10px; }
.gf-rule-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.gf-rule-head .linkish, .gf-add-rule { margin: 0; justify-self: start; min-height: 32px; font-size: .85rem; }
.gf-pills { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
.gf-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.gf-pills .gf-pill { white-space: normal; line-height: 1.15; min-height: 40px; padding: 4px 6px; font-size: .8rem; }
.gf-pill, .gf-chip { border: 0; border-radius: var(--radius-pill); background: var(--panel); color: var(--text); font: inherit; font-size: .85rem; font-weight: 600; min-height: 36px; padding: 0 12px; cursor: pointer; white-space: nowrap; }
.gf-chip { min-width: 52px; font-variant-numeric: tabular-nums; }
.gf-pill[aria-checked="true"], .gf-chip[aria-checked="true"] { background: var(--title); color: var(--card); }
.gf-pill:focus-visible, .gf-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.gf-hint { font-size: .78rem; color: var(--muted); }
.gf-line.gf-line-err { color: var(--neg); }
.gf-add-rule { color: var(--title); }

/* task 0062: desktop browser fixes (jury on a laptop) */
/* the back control stays visible while a door / the account view is scrolled: sticky row under the tour bar */
.door-head { position: sticky; top: var(--tour-h, 0px); z-index: 5; background: var(--bg); padding: 4px 0; }
.acc-view .pl-head { position: sticky; top: var(--tour-h, 0px); z-index: 5; background: var(--bg); padding: 4px 0; }
/* sheets: never below the window edge; inner scroll; a centred dialog on wide screens */
.sheet { max-height: calc(100dvh - 24px); overflow-y: auto; overscroll-behavior: contain; }
@media (min-width: 701px) {
  .sheet-back { align-items: center; padding: 24px 16px; box-sizing: border-box; }
  .sheet { border-radius: var(--radius-lg); max-height: calc(100dvh - 48px); box-shadow: 0 10px 40px var(--shadow-sheet); }
  .sheet::before { display: none; }
}
/* the notification under the tour bar, never over the chips */
html.tour-mode .notif { top: calc(var(--tour-h, 0px) + 8px); }
/* the toast: a rounded rectangle, max 3 lines; app.js places it where it covers no button */
.toast { border-radius: var(--radius); width: min(92vw, 360px); max-width: none; box-sizing: border-box; text-align: center; line-height: 1.35;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
/* the tour hint lines up with the centred bar (its own margin rule dropped the bar's auto side margins) */
.tour-bar > .tour-hint { margin-left: auto; margin-right: auto; }
/* task 0066: the stepper amount is a typed field with the same look */
.step-val { display: inline-flex; align-items: baseline; justify-content: center; gap: 6px; cursor: text; }
.step-in { width: 7.5ch; min-width: 0; border: 0; border-bottom: 1.5px dashed var(--line); background: transparent; color: inherit; font: inherit; font-variant-numeric: tabular-nums; text-align: center; padding: 2px 0; }
.step-in:focus { outline: none; border-bottom-color: var(--text); }
.stepper.bad .step-in { border-bottom-color: var(--warn); }
.stepper { flex-wrap: wrap; row-gap: 6px; }
.step-err { flex-basis: 100%; margin: 0; text-align: center; font-size: .9rem; color: var(--warn); }
/* task 0066: the tour's notification has its own X (it stays until tapped or closed); the step to tap again pulses */
.notif.has-x .notif-card { padding-right: 48px; }
.notif .notif-x { position: absolute; right: 6px; top: 6px; width: 40px; height: 40px; }
.tour-chip.pulse-loop { animation: tour-pulse 1.1s ease-out infinite; }
@media (prefers-reduced-motion: reduce) { .tour-chip.pulse-loop { animation: none; box-shadow: 0 0 0 3px var(--accent-soft); } }
/* task 0066: five tour chips: one row on a phone (390 px), wrapped (never a half-clipped chip) on a very narrow one */
@media (max-width: 440px) { .tour-chips { gap: 3px; } .tour-chip { padding: 5px 5px; font-size: .68rem; letter-spacing: -.01em; } }
@media (max-width: 440px) { .tour-chips { flex-wrap: wrap; overflow-x: visible; } }
