/* Sal — "warm market paper": calm cream paper, white cards, one green action colour, saffron only for
   savings, amber only for "missing". Built for a grandmother: 20px body, nothing under 17px, 56–64px
   targets, AAA text contrast, 3:1 control edges (tokens measured in docs/research ux rulebook). */

@font-face { font-family: Rubik; src: url(fonts/rubik-hebrew.woff2) format('woff2'); font-weight: 300 900; font-display: swap;
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: Rubik; src: url(fonts/rubik-latin.woff2) format('woff2'); font-weight: 300 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }

:root {
  --bg: #F7F3EC; --surface: #FFFFFF; --sunken: #EFE9DF; --ink: #1D1B18; --ink-2: #4A453E;
  --line: #E3DBCE; --edge: #7D7468;
  --accent: #0F5A3A; --accent-press: #0B4A2F; --on-accent: #FFFFFF; --accent-soft: #E3F1E8;
  --save: #F4C85A; --warn-ink: #7A3E00; --warn-soft: #FCEFD9; --danger-ink: #A3261B;
  --scrim: rgb(29 27 24 / .45);
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  --r-sm: 10px; --r-md: 16px; --r-lg: 24px;
  --shadow-1: 0 1px 2px rgb(61 43 20 / .06), 0 2px 8px rgb(61 43 20 / .06);
  --shadow-2: 0 2px 6px rgb(61 43 20 / .08), 0 12px 28px rgb(61 43 20 / .12);
  --t-fast: 120ms; --t-base: 200ms; --t-slow: 300ms;
  --ease: cubic-bezier(.2, 0, 0, 1); --ease-enter: cubic-bezier(.05, .7, .1, 1);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #141311; --surface: #1E1C19; --sunken: #262420; --ink: #F4F0E8; --ink-2: #CDC6BA;
    --line: #34312C; --edge: #8F877B; --accent: #7DD3A5; --accent-press: #9BE0BA; --on-accent: #0D2118;
    --accent-soft: #1D3328; --warn-ink: #F5C27A; --warn-soft: #3A2C17; --danger-ink: #FF9C8F;
    --scrim: rgb(0 0 0 / .6); --shadow-1: none; --shadow-2: none; }
}

* { box-sizing: border-box; }
html { font-size: 20px; scroll-padding-bottom: 120px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: Rubik, system-ui, -apple-system, "Segoe UI", Arial, sans-serif; font-weight: 400; line-height: 1.5;
  padding: calc(var(--s2) + env(safe-area-inset-top)) calc(var(--s4) + env(safe-area-inset-right)) calc(var(--s5) + env(safe-area-inset-bottom)) calc(var(--s4) + env(safe-area-inset-left));
}
body.has-sticky { padding-bottom: calc(120px + env(safe-area-inset-bottom)); }
#app { max-width: 560px; margin: 0 auto; }
h1 { font-size: 1.4rem; line-height: 1.25; font-weight: 700; margin: var(--s2) 0 var(--s2); }
h2 { font-size: 1.1rem; line-height: 1.3; font-weight: 700; margin: 0 0 var(--s3); }
p { margin: 0 0 var(--s3); }
.help { color: var(--ink-2); margin-bottom: var(--s5); }
.small, .hint { font-size: .85rem; color: var(--ink-2); line-height: 1.4; }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
bdi { unicode-bidi: isolate; }
.ic { width: 24px; height: 24px; flex: none; }
[dir="rtl"] .flip { transform: scaleX(-1); }
button, input, a { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--surface), 0 0 0 5px var(--ink); border-radius: var(--r-md); }

/* ── header + stepper ───────────────────────────────────────────── */
.top { display: flex; align-items: center; justify-content: space-between; min-height: 56px; }
.brand { display: flex; align-items: center; gap: var(--s2); font-weight: 800; font-size: 1.3rem; color: var(--accent); }
.brand .ic { width: 30px; height: 30px; }
.icon-btn { display: inline-flex; align-items: center; gap: var(--s2); min-height: 48px; padding: 0 var(--s3);
  border: 0; background: transparent; color: var(--ink-2); font-size: .85rem; font-weight: 600; border-radius: var(--r-md); }
.stepper { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); margin: var(--s2) 0 var(--s4); padding: 0; position: relative; }
.stepper::before { content: ""; position: absolute; top: 15px; inset-inline: 16.6%; height: 2px; background: var(--line); }
.step { position: relative; display: flex; flex-direction: column; align-items: center; gap: var(--s1); text-align: center;
  font-size: .85rem; color: var(--ink-2); background: none; border: 0; padding: 0; min-height: 48px; }
.step .dotnum { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700;
  background: var(--bg); border: 2px solid var(--edge); color: var(--ink-2); position: relative; z-index: 1; }
.step.now { color: var(--ink); font-weight: 700; }
.step.now .dotnum { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.step.done .dotnum { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.step.done .dotnum .ic { width: 18px; height: 18px; }

/* ── buttons ────────────────────────────────────────────────────── */
.btn { display: flex; align-items: center; justify-content: center; gap: var(--s2); width: 100%; min-height: 56px;
  padding: var(--s3) var(--s4); margin: var(--s2) 0; border-radius: var(--r-md); border: 2px solid var(--accent);
  background: var(--surface); color: var(--accent); font-weight: 700; text-decoration: none;
  transition: transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); color: var(--on-accent); min-height: 64px; font-size: 1.1rem; }
.btn.primary:active { background: var(--accent-press); }
.btn.soft { background: var(--accent-soft); border-color: transparent; }
.btn.text { border: 0; background: transparent; min-height: 48px; width: auto; display: inline-flex; padding: 0 var(--s2); margin: 0; }
.btn.small { min-height: 48px; font-size: .9rem; width: auto; display: inline-flex; margin: var(--s2) 0 0; }
.back { display: inline-flex; align-items: center; gap: var(--s1); min-height: 48px; border: 0; background: none; color: var(--accent);
  font-weight: 600; font-size: .9rem; padding: 0; margin-bottom: var(--s2); }
.link { color: var(--accent); font-weight: 700; background: none; border: 0; padding: 0; min-height: 48px; display: inline-flex; align-items: center; gap: var(--s1); text-decoration: none; }
.or { display: flex; align-items: center; gap: var(--s3); color: var(--ink-2); font-size: .85rem; margin: var(--s4) 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ── fields ─────────────────────────────────────────────────────── */
.field { display: block; margin: 0 0 var(--s4); position: relative; }
.field > span { display: block; font-weight: 600; }
.field .hint { display: block; margin-bottom: var(--s2); }
input[type=text], input[type=search] { width: 100%; min-height: 56px; padding: var(--s3) var(--s4); font-size: 1rem;
  border: 2px solid var(--edge); border-radius: var(--r-md); background: var(--surface); color: var(--ink); }
input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.err { display: flex; gap: var(--s2); align-items: flex-start; color: var(--danger-ink); font-size: .9rem; margin-top: var(--s2); }
.suggest { list-style: none; margin: var(--s1) 0 0; padding: var(--s1); background: var(--surface); border: 2px solid var(--edge);
  border-radius: var(--r-md); box-shadow: var(--shadow-2); }
.suggest button { width: 100%; min-height: 56px; text-align: start; border: 0; background: none; padding: 0 var(--s3); border-radius: var(--r-sm); }
.suggest button:active, .suggest button:hover { background: var(--sunken); }
.suggest b { font-weight: 700; }
.suggest small { color: var(--ink-2); }

/* ── location result ────────────────────────────────────────────── */
.reach { background: var(--accent-soft); border-radius: var(--r-md); padding: var(--s4); margin: var(--s4) 0; }
.reach-head { display: flex; gap: var(--s2); align-items: flex-start; font-weight: 700; color: var(--ink); }
.reach-head .ic { color: var(--accent); margin-top: 2px; }
.dots { list-style: none; padding: 0; margin: var(--s3) 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2) var(--s4); }
.dots li { display: flex; align-items: center; gap: var(--s2); }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--c); flex: none; display: inline-block; }
@media (prefers-color-scheme: dark) { .dot { background: color-mix(in oklab, var(--c) 55%, white); } }

/* ── list building ──────────────────────────────────────────────── */
.deliver-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); color: var(--ink-2); font-size: .9rem; min-height: 48px; }
.deliver-row span { display: inline-flex; align-items: center; gap: var(--s1); }
.deliver-row .ic { width: 20px; height: 20px; }
.composer { display: flex; gap: var(--s2); align-items: stretch; }
.composer input { flex: 1; }
.composer .btn { width: auto; margin: 0; padding: 0 var(--s4); min-height: 56px; }
.status-line { min-height: 1.4em; color: var(--accent); font-weight: 600; font-size: .9rem; margin: var(--s2) 0 0; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.tile-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s1); min-height: 88px;
  border: 2px solid var(--edge); border-radius: var(--r-md); background: var(--surface); font-weight: 700; text-align: center; padding: var(--s2);
  transition: transform var(--t-fast) var(--ease); }
.tile-btn .ic { width: 28px; height: 28px; color: var(--accent); }
.tile-btn:active { transform: scale(.98); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: var(--s6) 0 var(--s3); }
.section-head h2 { margin: 0; }
.section-head .small { margin-inline-start: var(--s2); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); padding: var(--s5) var(--s4); margin-bottom: var(--s4); }
.list-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); overflow: hidden; }
.row-item { padding: var(--s4); border-top: 1px solid var(--line); animation: rise var(--t-slow) var(--ease-enter) both; }
.row-item:first-child { border-top: 0; }
.row-item.fresh { background: var(--accent-soft); transition: background 1.2s var(--ease); }
.row-main { display: grid; grid-template-columns: 64px 1fr; gap: var(--s3); align-items: start; }
.row-title { font-weight: 600; overflow-wrap: anywhere; }
.row-sub { color: var(--ink-2); font-size: .85rem; line-height: 1.4; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row-sub.warn { color: var(--danger-ink); -webkit-line-clamp: 3; display: flex; gap: var(--s1); }
.row-actions { display: flex; align-items: center; justify-content: space-between; margin-top: var(--s3); gap: var(--s3); }
.qty { display: inline-flex; align-items: center; background: var(--sunken); border-radius: 999px; padding: var(--s1); }
.qty button { width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--edge); background: var(--surface); color: var(--accent); display: grid; place-items: center; }
.qty button[aria-disabled="true"] { color: var(--edge); border-color: var(--line); }
.qty output { min-width: 3.4em; text-align: center; font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums; padding: 0 var(--s1); }
.remove { display: inline-flex; align-items: center; gap: var(--s1); min-height: 48px; border: 0; background: none; color: var(--ink-2); font-weight: 600; font-size: .85rem; padding: 0 var(--s2); }
.remove .ic { width: 20px; height: 20px; }
.removed-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); padding: var(--s3) var(--s4); background: var(--sunken); color: var(--ink-2); font-size: .9rem; }
.q-chip { display: inline-flex; align-items: center; gap: var(--s1); margin-top: var(--s2); min-height: 48px; padding: 0 var(--s4);
  border-radius: 999px; border: 0; background: var(--warn-soft); color: var(--warn-ink); font-weight: 700; }
.seg { display: inline-flex; flex-wrap: wrap; gap: var(--s1); margin-top: var(--s2); background: var(--sunken); border-radius: 999px; padding: var(--s1); }
.seg button { white-space: nowrap; min-height: 44px; padding: 0 var(--s3); border-radius: 999px; border: 2px solid transparent; background: none; font-size: .85rem; font-weight: 600; color: var(--ink-2); display: inline-flex; align-items: center; gap: var(--s1); }
.seg button[aria-pressed="true"] { background: var(--surface); border-color: var(--accent); color: var(--ink); }
.seg .ic { width: 18px; height: 18px; color: var(--accent); }

.thumb { width: 64px; height: 64px; border-radius: 12px; background: var(--sunken); border: 1px solid var(--line); position: relative; overflow: hidden;
  display: grid; place-items: center; font-size: 30px; color: var(--ink-2); font-weight: 700; flex: none; }
.thumb.lg { width: 80px; height: 80px; font-size: 38px; }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; padding: 4px; opacity: 0; transition: opacity var(--t-base) var(--ease); }
.thumb img.ok { opacity: 1; }
.thumb img.ok.instant { transition: none; }
@media (prefers-color-scheme: dark) { .thumb img.ok { filter: brightness(.94); } }

.empty { text-align: center; padding: var(--s6) var(--s4); color: var(--ink-2); }
.empty .ic { width: 64px; height: 64px; color: var(--accent); opacity: .6; }
.empty h2 { color: var(--ink); margin-top: var(--s3); }

.sticky { position: fixed; inset-inline: 0; bottom: 0; z-index: 5; background: var(--bg); border-top: 1px solid var(--line);
  padding: var(--s3) calc(var(--s4) + env(safe-area-inset-right)) max(var(--s3), env(safe-area-inset-bottom)) calc(var(--s4) + env(safe-area-inset-left)); }
.sticky > * { max-width: 560px; margin-inline: auto; }
.sticky .btn { margin: 0 auto; }
.sticky .btn.text { display: flex; margin: var(--s1) auto 0; }
body.typing .sticky { display: none; }

/* ── results ────────────────────────────────────────────────────── */
.answer { background: var(--accent-soft); border-radius: var(--r-lg); padding: var(--s5) var(--s4); text-align: center; box-shadow: var(--shadow-2);
  margin-bottom: var(--s5); animation: rise var(--t-slow) var(--ease-enter) both; }
.pill { display: inline-flex; align-items: center; gap: var(--s1); background: var(--surface); color: var(--accent); font-weight: 700; font-size: .85rem;
  border-radius: 999px; padding: var(--s1) var(--s3); }
.pill .ic { width: 18px; height: 18px; }
.who { font-size: 1.4rem; font-weight: 700; margin: var(--s3) 0 0; display: flex; align-items: center; justify-content: center; gap: var(--s2); }
.who .dot { width: 16px; height: 16px; }
.total { font-size: 2.6rem; font-weight: 800; line-height: 1.05; margin: var(--s2) 0 var(--s1); font-variant-numeric: tabular-nums; }
.total .cur, .total .ag { font-size: .55em; font-weight: 600; }
.breakdown { color: var(--ink-2); margin: 0 0 var(--s3); }
.save-pill { display: inline-block; background: var(--save); color: #1D1B18; font-weight: 700; border-radius: 999px; padding: var(--s1) var(--s4);
  margin-bottom: var(--s3); animation: pop var(--t-slow) var(--ease-enter) 150ms both; }
.coverage { display: inline-flex; gap: var(--s1); align-items: center; color: var(--accent); font-weight: 600; font-size: .9rem; margin-bottom: var(--s3); }
.coverage .ic { width: 20px; height: 20px; }
.callout { text-align: start; background: var(--warn-soft); color: var(--ink); border-radius: var(--r-md); padding: var(--s3) var(--s4); margin: var(--s3) 0; }
.callout-head { display: flex; gap: var(--s2); align-items: flex-start; color: var(--warn-ink); font-weight: 700; }
.callout-head .ic { width: 20px; height: 20px; margin-top: 3px; }
.callout .small { color: var(--ink); }
.alt-box { background: var(--surface); border-radius: var(--r-md); padding: var(--s3); margin-top: var(--s3); }
.alt-box .row-main { grid-template-columns: 56px 1fr auto; align-items: center; }
.alt-box .thumb { width: 56px; height: 56px; font-size: 26px; }
.alt-kind { color: var(--warn-ink); font-weight: 700; font-size: .85rem; }
.miss-item + .miss-item { border-top: 1px solid color-mix(in oklab, var(--warn-ink) 20%, transparent); margin-top: var(--s3); padding-top: var(--s3); }
.fresh-note { color: var(--ink-2); font-size: .85rem; margin: var(--s3) 0 0; }

.split h2 { color: var(--accent); }
.cmp { padding: 0; overflow: hidden; }
.cmp h2 { padding: var(--s5) var(--s4) 0; }
.cmp-row { display: block; width: 100%; text-align: start; border: 0; border-top: 1px solid var(--line); background: none; padding: var(--s3) var(--s4);
  min-height: 72px; animation: rise var(--t-slow) var(--ease-enter) both; }
.cmp-row:active { background: var(--sunken); }
.cmp-line { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.cmp-name { display: inline-flex; align-items: center; gap: var(--s2); font-weight: 600; }
.cmp-total { font-weight: 700; font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: var(--s1); }
.cmp-total .ic { width: 20px; height: 20px; color: var(--ink-2); }
.cmp-status { font-size: .85rem; color: var(--ink-2); display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s3); margin-top: 2px; }
.cmp-status > span:last-child:not(:first-child) { white-space: nowrap; }
.cmp-status .miss { color: var(--warn-ink); font-weight: 600; }
.cmp-status .ok { color: var(--accent); font-weight: 600; }
.bar { height: 6px; border-radius: 3px; background: var(--sunken); margin-top: var(--s2); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--edge); border-radius: 3px; transform-origin: right; animation: grow var(--t-slow) var(--ease-enter) both; }
.bar.win i { background: var(--accent); }
.group-label { font-size: .85rem; color: var(--ink-2); padding: var(--s3) var(--s4) var(--s1); border-top: 1px solid var(--line); background: var(--bg); }

/* ── chain list ─────────────────────────────────────────────────── */
.title-block h1 { display: flex; align-items: center; gap: var(--s2); }
.title-block h1 .dot { width: 16px; height: 16px; }
.missing-sec { background: var(--warn-soft); border-radius: var(--r-lg); padding: var(--s4); margin: var(--s4) 0 var(--s5); }
.missing-sec h2 { color: var(--warn-ink); display: flex; gap: var(--s2); align-items: center; }
.buy-row { display: grid; grid-template-columns: auto 64px 1fr; gap: var(--s3); align-items: start; padding: var(--s3) var(--s4); border-top: 1px solid var(--line); }
.buy-row:first-child { border-top: 0; }
.buy-row.done .row-title { text-decoration: line-through; color: var(--ink-2); }
.tick { width: 32px; height: 32px; margin: 8px 0; border-radius: 50%; border: 2px solid var(--edge); background: var(--surface); display: grid; place-items: center; color: transparent; }
.tick[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.tick .ic { width: 20px; height: 20px; }
.kicker { color: var(--ink-2); font-size: .85rem; }
.buy-meta { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); margin-top: var(--s1); }
.badges { display: flex; flex-wrap: wrap; gap: var(--s1); margin-top: var(--s1); }
.buy-price { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; font-weight: 700; border-radius: 999px; padding: 2px var(--s2); }
.badge.promo { background: var(--warn-soft); color: var(--warn-ink); }
.badge.alt { border: 2px solid var(--warn-ink); color: var(--warn-ink); }
.badge .ic { width: 16px; height: 16px; }

/* ── sheets, overlays, toasts ───────────────────────────────────── */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 20; animation: fade var(--t-base) var(--ease) both; }
.sheet { position: fixed; inset-inline: 0; bottom: 0; z-index: 21; max-height: 88dvh; overflow-y: auto; background: var(--surface);
  border-radius: var(--r-lg) var(--r-lg) 0 0; box-shadow: var(--shadow-2);
  padding: var(--s4) calc(var(--s4) + env(safe-area-inset-right)) calc(var(--s5) + env(safe-area-inset-bottom)) calc(var(--s4) + env(safe-area-inset-left));
  animation: sheet-in var(--t-slow) var(--ease-enter) both; }
.sheet > * { max-width: 560px; margin-inline: auto; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); }
.sheet-head h2 { margin: 0; }
.options { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); margin: var(--s4) 0; }
.opt { display: flex; flex-direction: column; align-items: center; gap: var(--s2); min-height: 168px; padding: var(--s3); border-radius: var(--r-md);
  border: 2px solid var(--edge); background: var(--surface); text-align: center; font-weight: 600; }
.opt[aria-pressed="true"] { border: 3px solid var(--accent); }
.opt .small { font-weight: 400; }
.review { list-style: none; padding: 0; margin: var(--s3) 0; }
.review label { display: flex; gap: var(--s3); align-items: center; min-height: 56px; border-bottom: 1px solid var(--line); }
.review input { width: 28px; height: 28px; accent-color: var(--accent); flex: none; }
.review .struck span { text-decoration: line-through; color: var(--ink-2); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: 72px; border-bottom: 1px solid var(--line); }
.switch-row b { display: block; font-weight: 600; }
.switch { appearance: none; width: 56px; height: 34px; border-radius: 999px; background: var(--edge); position: relative; flex: none; transition: background var(--t-base) var(--ease); }
.switch::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 28px; height: 28px; border-radius: 50%; background: #fff; transition: inset-inline-start var(--t-base) var(--ease); }
.switch:checked { background: var(--accent); }
.switch:checked::after { inset-inline-start: 25px; }
.log { white-space: pre-wrap; font: .7rem/1.4 ui-monospace, Menlo, monospace; background: var(--sunken); padding: var(--s2); border-radius: var(--r-sm); max-height: 40vh; overflow: auto; direction: ltr; text-align: left; }
details summary { min-height: 48px; display: flex; align-items: center; color: var(--ink-2); cursor: pointer; }

.overlay { position: fixed; inset: 0; z-index: 30; background: var(--scrim); display: grid; place-items: center; padding: var(--s5); animation: fade var(--t-base) var(--ease) both; }
.progress-card { background: var(--surface); border-radius: var(--r-lg); padding: var(--s5); text-align: center; max-width: 340px; width: 100%; box-shadow: var(--shadow-2); }
.spinner { width: 44px; height: 44px; border-radius: 50%; border: 4px solid var(--accent-soft); border-top-color: var(--accent); margin: 0 auto var(--s3); animation: spin 900ms linear infinite; }
.toast { position: fixed; z-index: 40; inset-inline: var(--s4); top: calc(var(--s3) + env(safe-area-inset-top)); max-width: 528px; margin-inline: auto;
  display: flex; gap: var(--s2); align-items: center; padding: var(--s3) var(--s4); border-radius: var(--r-md); box-shadow: var(--shadow-2);
  background: var(--ink); color: var(--bg); font-weight: 600; animation: rise var(--t-slow) var(--ease-enter) both; }
.toast.warn { background: var(--warn-soft); color: var(--warn-ink); border: 2px solid var(--warn-ink); }
.toast button { margin-inline-start: auto; min-height: 44px; border: 0; background: none; color: inherit; font-weight: 800; text-decoration: underline; }
.splash { min-height: 70dvh; display: grid; place-items: center; text-align: center; color: var(--accent); }
.splash .ic { width: 72px; height: 72px; }
.splash p { color: var(--ink-2); }
.skel { background: linear-gradient(90deg, var(--sunken), var(--surface), var(--sunken)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; border-radius: var(--r-sm); }

@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheet-in { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes grow { from { transform: scaleX(0); } to { transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; transition-duration: 1ms !important; }
}
