/* ===== Font: Poppins (self-hosted so it also works offline; SIL OFL, see fonts/OFL.txt) ===== */
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/poppins-400.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/poppins-500.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/poppins-600.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/poppins-700.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/poppins-ext-400.woff2) format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/poppins-ext-500.woff2) format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/poppins-ext-600.woff2) format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/poppins-ext-700.woff2) format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }

/* ===== Tokens ===== */
:root {
  color-scheme: light;
  --bg: #f4f3f0;
  --surface: #fcfcfb;
  --surface-2: #f0efec;
  --border: #e4e2dc;
  --grid: #e8e6e1;
  --text: #0b0b0b;
  --text-2: #52514e;
  --text-3: #7a7974;
  --accent: #2a78d6;
  --accent-ink: #ffffff;
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --good: #0ca30c;
  --warning: #fab219;
  --critical: #d03b3b;
  --pos-text: #006300;
  --neg-text: #b42828;
  --danger-bg: #fbeaea;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 2px 8px rgba(0, 0, 0, .04);
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 16px;
  --nav-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #111110;
    --surface: #1a1a19;
    --surface-2: #262624;
    --border: #33332f;
    --grid: #2c2c29;
    --text: #ffffff;
    --text-2: #c3c2b7;
    --text-3: #8f8e86;
    --accent: #3987e5;
    --series-1: #3987e5;
    --series-2: #d95926;
    --pos-text: #5fd35f;
    --neg-text: #ff8a8a;
    --danger-bg: #3a1f1f;
    --shadow: none;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111110;
  --surface: #1a1a19;
  --surface-2: #262624;
  --border: #33332f;
  --grid: #2c2c29;
  --text: #ffffff;
  --text-2: #c3c2b7;
  --text-3: #8f8e86;
  --accent: #3987e5;
  --series-1: #3987e5;
  --series-2: #d95926;
  --pos-text: #5fd35f;
  --neg-text: #ff8a8a;
  --danger-bg: #3a1f1f;
  --shadow: none;
}

/* ===== Base ===== */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 var(--font);
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
h1, h2, h3 { margin: 0; line-height: 1.25; }
h2 { font-size: 16px; font-weight: 600; }
p { margin: .5em 0; }
button, input, select, textarea, option, dialog, svg text { font-family: var(--font); }
button, input, select, textarea { font-size: inherit; font-weight: inherit; line-height: inherit; color: inherit; }
.ico { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -0.125em; }
.icon-btn .ico { width: 20px; height: 20px; }
.status .ico { width: 12px; height: 12px; stroke-width: 3; }
.ask p { margin: 4px 0 0; font-size: 15px; }
button { cursor: pointer; }
.muted { color: var(--text-2); font-size: 14px; }
[hidden] { display: none !important; }

/* ===== Top bar ===== */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: var(--bg);
  padding-top: var(--safe-t);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 560px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 16px;
}
.app-title { font-size: 20px; font-weight: 700; }
.m-short { display: none; }
@media (max-width: 440px) { .m-long { display: none; } .m-short { display: inline; } }
@media (max-width: 380px) { .app-title { font-size: 18px; } .month-label { padding: 6px 8px; font-size: 13px; } }
.month-switch { display: flex; align-items: center; gap: 2px; }
.topbar-inner .app-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sync-btn { position: relative; color: var(--accent); }
.sync-btn.spinning { animation: spin 1s linear infinite; }
.sync-btn.has-error { color: var(--critical); }
.sync-btn[data-badge]:not([data-badge=""])::after {
  content: attr(data-badge); position: absolute; top: 0; right: 0;
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  background: var(--warning); color: #0b0b0b; font-size: 10px; font-weight: 700; line-height: 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.month-label {
  border: 0; background: var(--surface-2); border-radius: 999px;
  padding: 6px 12px; font-weight: 600; font-size: 14px; white-space: nowrap;
}
.icon-btn {
  border: 0; background: transparent; width: 36px; height: 36px;
  border-radius: 50%; font-size: 20px; line-height: 1; color: var(--text-2);
  display: inline-grid; place-items: center; flex: none;
}
.icon-btn:hover { background: var(--surface-2); }

/* ===== Layout ===== */
main {
  max-width: 560px; margin: 0 auto;
  padding: 16px 16px calc(var(--nav-h) + var(--safe-b) + 88px);
}
.view { display: flex; flex-direction: column; gap: 12px; }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow);
  min-width: 0;
}
.card > h2 { margin-bottom: 8px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }

/* Hero + stats */
.hero-label, .stat-label { color: var(--text-2); font-size: 13px; }
.hero-value { font-size: 30px; font-weight: 700; letter-spacing: -.5px; margin-top: 2px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.hero-sub { color: var(--text-2); font-size: 13px; margin-top: 4px; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat { padding: 14px; }
.stat-value { font-size: 18px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.pos { color: var(--pos-text); }
.neg { color: var(--neg-text); }

/* Legend */
.legend { display: flex; gap: 12px; font-size: 12px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.swatch.s1 { background: var(--series-1); }
.swatch.s2 { background: var(--series-2); }

/* Chart */
.chart-wrap { position: relative; width: 100%; min-height: 200px; }
.chart-wrap svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-wrap .grid-line { stroke: var(--grid); stroke-width: 1; }
.chart-wrap .axis-line { stroke: var(--border); stroke-width: 1; }
.chart-wrap .tick { fill: var(--text-3); font-size: 11px; font-family: var(--font); }
.chart-wrap .tick.current { fill: var(--text); font-weight: 600; }
.chart-wrap .bar-in { fill: var(--series-1); }
.chart-wrap .bar-out { fill: var(--series-2); }
.chart-wrap .group { transition: opacity .15s; }
.chart-wrap.hovering .group:not(.hot) { opacity: .35; }
.chart-wrap .hit { fill: transparent; cursor: pointer; }
.tooltip {
  position: fixed; z-index: 60; pointer-events: none;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .12);
  padding: 8px 10px; font-size: 13px; min-width: 170px;
}
.tooltip .tt-title { font-weight: 600; margin-bottom: 4px; }
.tooltip .tt-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.tooltip .tt-row span:first-child { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); }
.tooltip .tt-row b { font-variant-numeric: tabular-nums; font-weight: 600; }
.table-toggle { margin-top: 8px; font-size: 13px; }
.table-toggle summary { color: var(--text-2); cursor: pointer; }
.data-table { width: 100%; border-collapse: collapse; margin-top: 8px; font-variant-numeric: tabular-nums; }
.data-table th, .data-table td { padding: 6px 4px; text-align: right; border-bottom: 1px solid var(--border); }
.data-table th:first-child, .data-table td:first-child { text-align: left; }
.data-table th { color: var(--text-2); font-weight: 600; }

/* Category breakdown */
.cat-row { display: grid; grid-template-columns: 28px 1fr auto; gap: 4px 10px; align-items: center; padding: 6px 0; }
.cat-ico { font-size: 18px; text-align: center; }
.cat-name { font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-amt { font-size: 14px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.cat-amt small { color: var(--text-3); font-weight: 400; margin-left: 4px; }
.cat-bar { grid-column: 2 / 4; height: 6px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.cat-bar i { display: block; height: 100%; background: var(--series-1); border-radius: 0 4px 4px 0; }

/* Transactions */
.tx-group { margin-bottom: 8px; }
.tx-date { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-2); padding: 8px 4px 6px; font-weight: 600; }
.tx-date span:last-child { font-variant-numeric: tabular-nums; }
.tx-list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.card .tx-list { border: 0; border-radius: 0; margin: -4px -4px; }
.tx-item {
  display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center;
  width: 100%; text-align: left; border: 0; background: transparent; padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.tx-list .tx-item:last-child { border-bottom: 0; }
.tx-item:hover { background: var(--surface-2); }
.tx-ico { width: 40px; height: 40px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; font-size: 20px; }
.tx-main { min-width: 0; }
.tx-cat { font-weight: 600; font-size: 14px; }
.tx-note { color: var(--text-2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-amt { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.summary-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; padding: 12px; }
.summary-row div { min-width: 0; }
.summary-row small { display: block; color: var(--text-2); font-size: 12px; }
.summary-row b { font-size: 14px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.toolbar { display: flex; flex-direction: column; gap: 8px; }
.toolbar-row { display: flex; gap: 8px; }
.toolbar-row #txSearch { flex: 1 1 60%; min-width: 0; }
.toolbar-row #txSource { flex: 1 1 40%; min-width: 0; }
.pending-tag { font-size: 11px; font-weight: 600; color: var(--text-2); background: var(--surface-2); border-radius: 999px; padding: 1px 6px; margin-left: 4px; white-space: nowrap; }
.sheet-connect { display: flex; flex-direction: column; gap: 10px; }
.sheet-connect a { color: var(--accent); }
.cat-setting button:disabled { cursor: default; color: inherit; opacity: 1; }
.chips { display: flex; gap: 6px; overflow-x: auto; }
.chip {
  border: 1px solid var(--border); background: var(--surface); border-radius: 999px;
  padding: 6px 14px; font-size: 14px; white-space: nowrap;
}
.chip.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.empty { text-align: center; color: var(--text-2); padding: 24px 12px; font-size: 14px; }
.empty .big { font-size: 32px; display: block; margin-bottom: 6px; }

/* Budget + goals */
.progress { height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; margin: 8px 0 6px; }
.progress i { display: block; height: 100%; border-radius: 0 4px 4px 0; background: var(--series-1); max-width: 100%; }
.progress.good i { background: var(--good); }
.progress.warning i { background: var(--warning); }
.progress.critical i { background: var(--critical); }
.budget-item, .goal-item { padding: 14px 16px; }
.b-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.b-title { display: flex; align-items: center; gap: 8px; font-weight: 600; min-width: 0; }
.b-title span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; flex-wrap: wrap; }
.status { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--text); white-space: nowrap; }
.status .dot { width: 8px; height: 8px; border-radius: 50%; }
.status.good .dot { background: var(--good); }
.status.warning .dot { background: var(--warning); }
.status.critical .dot { background: var(--critical); }
.alert {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--danger-bg); border: 1px solid var(--border); border-left: 4px solid var(--critical);
  border-radius: 12px; padding: 12px 14px; font-size: 14px;
}
.goal-actions { display: flex; gap: 8px; margin-top: 10px; }
.goal-hint { font-size: 13px; color: var(--text-2); margin-top: 4px; }

/* Category settings */
.cat-setting { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.cat-setting:last-child { border-bottom: 0; }
.cat-setting button { border: 0; background: transparent; text-align: left; display: flex; gap: 10px; align-items: center; padding: 4px 0; flex: 1; min-width: 0; }
.cat-group-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-3); margin: 12px 0 4px; }
.cat-group-title:first-child { margin-top: 0; }
.tag { font-size: 12px; color: var(--text-3); white-space: nowrap; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  border-radius: 12px; padding: 10px 16px; font-weight: 600; font-size: 15px;
  min-height: 44px; cursor: pointer; text-align: center;
}
.btn:hover { background: var(--surface-2); }
.btn-small { min-height: 36px; padding: 6px 12px; font-size: 14px; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent); filter: brightness(1.08); }
.btn-danger { color: var(--critical); }
.btn-danger-solid { background: var(--critical); border-color: var(--critical); color: #fff; }
.btn-danger-solid:hover { background: var(--critical); filter: brightness(1.08); }
.btn-col { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.link-btn { border: 0; background: transparent; color: var(--accent); font-weight: 600; font-size: 14px; padding: 4px; }

/* FAB + bottom nav */
.fab {
  position: fixed; z-index: 25;
  right: max(16px, calc(50vw - 280px + 16px));
  bottom: calc(var(--nav-h) + var(--safe-b) + 16px);
  width: 56px; height: 56px; border-radius: 18px; border: 0;
  background: var(--accent); color: var(--accent-ink); font-size: 30px; line-height: 1;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .2);
}
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: var(--surface); border-top: 1px solid var(--border);
  padding-bottom: var(--safe-b);
  display: flex; justify-content: center;
}
.bottom-nav button {
  flex: 1; max-width: 112px; height: var(--nav-h);
  border: 0; background: transparent; color: var(--text-3);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-size: 11px; font-weight: 600;
}
.bottom-nav .nav-ico { font-size: 20px; filter: grayscale(1); opacity: .7; }
.bottom-nav button.active { color: var(--accent); }
.bottom-nav button.active .nav-ico { filter: none; opacity: 1; }

/* Install banner */
.install-banner {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 8px 8px 8px 14px; font-size: 14px;
}
.install-banner span { flex: 1; }

/* Forms / sheets */
.sheet {
  border: 0; padding: 0; margin: auto auto 0;
  width: 100%; max-width: 560px; max-height: 92vh;
  border-radius: 20px 20px 0 0;
  background: var(--surface); color: var(--text);
}
.sheet::backdrop { background: rgba(0, 0, 0, .45); }
.sheet form { padding: 16px 16px calc(16px + var(--safe-b)); display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 600px) {
  .sheet { margin: auto; border-radius: 20px; }
}
.sheet-head { display: flex; justify-content: space-between; align-items: center; }
.sheet-actions { display: flex; gap: 8px; margin-top: 4px; }
.sheet-actions .btn { flex: 1; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--text-2); font-weight: 600; min-width: 0; }
.field-row { display: flex; gap: 10px; }
.field-row .field:last-child { flex: 1; }
.field-row.two .field { flex: 1 1 0; }
.field-icon { width: 72px; }
.field-icon .input { text-align: center; }
.input {
  width: 100%; min-height: 44px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--bg); color: var(--text); font-size: 16px; font-weight: 400;
}
.input:focus, .btn:focus-visible, .chip:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.money-wrap { position: relative; }
.money-wrap > span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-2); font-weight: 600; font-size: 16px; }
.money-wrap .input { padding-left: 40px; font-variant-numeric: tabular-nums; }
.money-wrap.big .input { font-size: 22px; font-weight: 700; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface-2); border-radius: 12px; padding: 4px; }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: block; text-align: center; padding: 8px; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--text-2); cursor: pointer; }
.segmented input:checked + span { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.segmented input:focus-visible + span { outline: 2px solid var(--accent); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.check input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--accent); }
.form-error { color: var(--critical); font-size: 13px; margin: 0; min-height: 0; }
.form-error:empty { display: none; }
.budget-field { display: grid; grid-template-columns: 1fr 150px; gap: 10px; align-items: center; padding: 4px 0; }
.budget-field .b-title { font-weight: 500; font-size: 14px; }
.budget-field .input { min-height: 40px; padding-top: 8px; padding-bottom: 8px; }

/* Toast */
.toast {
  position: fixed; left: 50%; transform: translate(-50%, 20px);
  bottom: calc(var(--nav-h) + var(--safe-b) + 84px); z-index: 70;
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 12px;
  font-size: 14px; font-weight: 500; opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

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