/* Buckets: calm, plain and warm. Paper tones, no red, nothing like a statement. */

:root {
  --bg: #f6f1ea;
  --surface: #fffcf8;
  --ink: #2e2a25;
  --muted: #6f655a;
  --line: #e6dccf;
  --accent: #4d7a61;
  --accent-strong: #3b634d;
  --on-accent: #ffffff;
  --accent-soft: #e2ece4;
  --warm: #8a4f20;
  --warm-soft: #f5e6d6;
  --cardc: #4f6288;
  --card-soft: #e5e9f1;
  --danger: #a2493a;
  --focus: rgba(77, 122, 97, 0.45);
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(70, 50, 30, 0.05), 0 6px 20px rgba(70, 50, 30, 0.05);
  --tabs-h: 66px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1d1b19;
    --surface: #282522;
    --ink: #efe8df;
    --muted: #ada296;
    --line: #3b3631;
    --accent: #8fbf9f;
    --accent-strong: #a6d0b3;
    --on-accent: #142019;
    --accent-soft: #2b3a31;
    --warm: #e0a774;
    --warm-soft: #3d3027;
    --cardc: #a3b3d3;
    --card-soft: #2d3343;
    --danger: #e08f7f;
    --focus: rgba(143, 191, 159, 0.5);
    --shadow: none;
    color-scheme: dark;
  }
}

/* Pink: the same paper and the same contrast, in rose instead of sage. Every
   token the light block sets is set again for dark, because a [data-theme]
   rule outranks the plain dark :root above and would otherwise leak into it.
   test/contrast.test.mjs measures every text pair in all four combinations. */
:root[data-theme="pink"] {
  --bg: #f8f0ee;
  --surface: #fffbfa;
  --ink: #2f2729;
  --muted: #705e66;
  --line: #ecdad6;
  --accent: #a8456e;
  --accent-strong: #8a3258;
  --on-accent: #ffffff;
  --accent-soft: #f6e1e9;
  --focus: rgba(168, 69, 110, 0.45);
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="pink"] {
    --bg: #1f1b1c;
    --surface: #2a2426;
    --ink: #f0e7e9;
    --muted: #ac9ca2;
    --line: #3d3437;
    --accent: #e8a0bc;
    --accent-strong: #f3bdd1;
    --on-accent: #2b141e;
    --accent-soft: #3e2a33;
    --focus: rgba(232, 160, 188, 0.5);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
body.locked { overflow: hidden; }
.app { max-width: 560px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { width: 22px; height: 22px; flex: none; vertical-align: middle; }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: calc(env(safe-area-inset-top) + 8px) 12px 8px 16px;
  background: var(--bg);
}
.top h1 { flex: 1; min-width: 0; font-size: 1.35rem; margin: 0; font-weight: 650; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none;
  border: 0; border-radius: 12px; background: transparent; color: var(--muted); cursor: pointer; padding: 0;
}
.icon-btn:hover:not(:disabled) { background: var(--accent-soft); }
.icon-btn:disabled { opacity: 0.3; cursor: default; }

.main { display: grid; gap: 14px; padding: 4px 16px calc(var(--tabs-h) + env(safe-area-inset-bottom) + 28px); }

/* ---------- cards and text ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); min-width: 0; }
.card h2 { font-size: 1.05rem; margin: 0 0 10px; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.card h2 .ic { width: 20px; height: 20px; color: var(--muted); }
h2.with-total { justify-content: space-between; }
h2.with-total span { margin-left: auto; font-weight: 500; color: var(--muted); font-size: 0.92rem; font-variant-numeric: tabular-nums; }
.card > p { margin: 0 0 10px; }
.card > :last-child { margin-bottom: 0; }
h3 { font-size: 0.95rem; margin: 18px 0 6px; color: var(--muted); font-weight: 650; }
.label { margin: 0; color: var(--muted); font-size: 0.85rem; display: flex; align-items: center; gap: 6px; }
.label .ic { width: 18px; height: 18px; }
.big { font-size: 1.7rem; font-weight: 650; margin: 2px 0; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.mid { font-size: 1.3rem; font-weight: 600; margin: 2px 0 0; font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 0.9rem; margin: 0 0 10px; }
.fine { color: var(--muted); font-size: 0.8rem; }
.center { text-align: center; }
.small { font-size: 0.85rem; }
.warm-text { color: var(--warm); }
.good { color: var(--accent-strong); }
.note { background: var(--warm-soft); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 0.92rem; margin: 0 0 12px; }
.note-card { background: var(--warm-soft); border-color: transparent; box-shadow: none; }
.notice { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--accent-soft); border-color: transparent; box-shadow: none; }
.notice p { margin: 0; }
.notice .btn { flex: none; }
.notice.warm { background: var(--warm-soft); }
.empty { display: flex; align-items: center; gap: 10px; color: var(--muted); margin: 0; }
.empty .ic { color: var(--accent); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.split + .btn { margin-top: 12px; }
.status { display: flex; align-items: center; gap: 8px; color: var(--accent-strong); font-weight: 600; }
.hero .big { font-size: 1.6rem; }
.hero .also { display: flex; align-items: center; gap: 6px; margin: 6px 0 0; color: var(--muted); font-size: 0.92rem; }
.hero .also .ic { width: 18px; height: 18px; }
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 16px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font-weight: 600; cursor: pointer; text-decoration: none; text-align: center;
}
.btn .ic { width: 20px; height: 20px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.small { min-height: 40px; padding: 6px 14px; font-size: 0.92rem; border-radius: 12px; }
.btn.block { display: flex; width: 100%; }
.btn.danger { color: var(--danger); }
.btn.danger-fill { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-row .btn { flex: 1 1 auto; }
.btn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0 4px; }
.link { background: none; border: 0; color: var(--accent-strong); text-decoration: underline; padding: 8px; cursor: pointer; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }

:is(.btn, .icon-btn, .row, .tab, .plan-opt, .step, .seg-btn, .link, .fillrow, .toast-undo):focus-visible,
:is(input, select):focus-visible {
  outline: 3px solid var(--focus); outline-offset: 2px;
}

/* ---------- lists ---------- */
.rows { list-style: none; margin: 0; padding: 0; }
.rows li + li { border-top: 1px solid var(--line); }
.row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 11px 2px; border: 0; background: none; text-align: left; cursor: pointer; color: inherit;
}
.row .when { flex: none; width: 82px; color: var(--muted); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.row .what { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.row .what > .ic { width: 17px; height: 17px; color: var(--muted); margin-right: 4px; }
.row .what small { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 0.82rem; }
.row .what small .ic { width: 15px; height: 15px; }
.row .amt { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; font-weight: 600; font-variant-numeric: tabular-nums; }
.chip { display: inline-flex; align-items: center; gap: 3px; font-size: 0.74rem; font-weight: 650; padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.chip .ic { width: 13px; height: 13px; }
.chip.ok { background: var(--accent-soft); color: var(--accent-strong); }
.chip.warm { background: var(--warm-soft); color: var(--warm); }
.sum { margin: 10px 0 0; font-size: 0.92rem; color: var(--muted); }
.sum strong { color: var(--ink); }
.sum strong.warm-text { color: var(--warm); }
.rows.plain .line { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; }
.rows.plain .line.total { font-weight: 650; }
.line .amt { font-variant-numeric: tabular-nums; white-space: nowrap; }

.steps { list-style: none; margin: 0; padding: 0; }
.step { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 8px 2px; border: 0; background: none; text-align: left; cursor: pointer; color: inherit; }
.step .ic { color: var(--muted); }
.steps .done .step { color: var(--muted); text-decoration: line-through; }
.steps .done .ic { color: var(--accent); }





/* ---------- the fill: buckets as bars, filling in order ---------- */
.fills { list-style: none; margin: 0 0 12px; padding: 0; }
.fills li { display: flex; align-items: center; gap: 4px; }
.fills li + li { border-top: 1px solid var(--line); }
.fillrow { flex: 1; min-width: 0; display: grid; gap: 6px; padding: 11px 2px; border: 0; background: none; text-align: left; color: inherit; cursor: pointer; }
.row-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.fillrow .name { display: flex; align-items: center; gap: 6px; min-width: 0; font-weight: 650; overflow-wrap: anywhere; }
.fillrow .name .ic { width: 17px; height: 17px; color: var(--muted); }
.fillrow .amt { flex: none; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fillrow .amt small { font-weight: 500; color: var(--muted); }
.fillrow .sub { color: var(--muted); font-size: 0.82rem; }
.bar { display: block; height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.bar span {
  display: block; height: 100%; border-radius: 99px; background: var(--accent);
  transition: width 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); transition-delay: calc(var(--i, 0) * 120ms);
}
.bar.open span { background: var(--accent-soft); }
.order { display: flex; flex-direction: column; justify-content: center; }

/* ---------- waiting for a tap ---------- */
.prompts { background: var(--accent-soft); border-color: transparent; box-shadow: none; }
.prompt { padding: 10px 0; }
.prompt + .prompt { border-top: 1px solid var(--line); }
.prompt p { margin: 0 0 8px; }
.prompt-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.prompt-actions .money-input { background: var(--surface); }
.prompts .err { display: block; margin-top: 6px; }

/* ---------- inside a bucket ---------- */
.outline { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 12px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--accent-soft); }
.outline .ic { width: 20px; height: 20px; margin-top: 1px; color: var(--accent-strong); }
.items .amt { display: inline-flex; align-items: center; gap: 2px; }
.small-x { width: 34px; height: 34px; }
.small-x .ic { width: 16px; height: 16px; }
.item-add { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 6px; }
.item-add > input { flex: 1 1 150px; min-height: 42px; }
.item-add .money-input.small { width: 112px; }
.out-date { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; }
.out-date input { min-height: 42px; padding: 6px 8px; }

/* ---------- debt plan ---------- */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.plan-opt {
  display: grid; gap: 2px; padding: 12px 6px; border-radius: 14px;
  border: 1.5px solid var(--line); background: var(--surface); color: inherit; text-align: center; cursor: pointer;
}
.plan-opt.on { border-color: var(--accent); background: var(--accent-soft); }
.plan-opt .yrs { font-weight: 700; }
.plan-opt .pay { font-weight: 650; font-size: 1rem; font-variant-numeric: tabular-nums; }
.plan-opt .pay small { display: block; font-weight: 400; color: var(--muted); font-size: 0.74rem; }
.plan-opt .int, .plan-opt .end { font-size: 0.76rem; color: var(--muted); }
.plan-opt .int { font-size: 0.85rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.plan-opt .int small { display: block; font-size: 0.74rem; font-weight: 400; }
.chart-wrap { margin: 4px 0 12px; }
.chart { display: block; width: 100%; height: 110px; }
.chart .area { fill: var(--accent-soft); }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2.5; }
.chart-axis { display: flex; justify-content: space-between; gap: 8px; font-size: 0.78rem; color: var(--muted); margin-top: 4px; }
.try { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px; }
.try .field { margin-bottom: 8px; }

/* ---------- the lump check ---------- */
.verdict { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; margin: 4px 0; }
.verdict .ic { width: 26px; height: 26px; margin-top: 1px; }
.verdict p { margin: 2px 0 0; }
.verdict.yes { background: var(--accent-soft); }
.verdict.yes .ic { color: var(--accent-strong); }
.verdict.part, .verdict.no { background: var(--warm-soft); }
.verdict.part .ic, .verdict.no .ic { color: var(--warm); }
.sums { margin-top: 10px; border-top: 1px solid var(--line); }
.record { border-top: 1px solid var(--line); margin-top: 12px; }
.inline-form { display: flex; gap: 10px; }
.inline-form .money-input { flex: 1; min-width: 0; }

/* ---------- forms ---------- */
.field { display: grid; gap: 6px; margin: 0 0 14px; min-width: 0; }
.lbl { font-size: 0.88rem; color: var(--muted); font-weight: 650; }
.lbl i { font-weight: 400; font-style: normal; }
input:not([type]), input[type="text"], input[type="date"], select {
  width: 100%; min-width: 0; min-height: 48px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--bg); font-size: 16px;
}
input[type="date"] { -webkit-appearance: none; appearance: none; display: block; }
select {
  -webkit-appearance: none; appearance: none; padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23948a7e' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 20px;
}
.money-input { display: flex; align-items: center; min-width: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); padding-left: 12px; }
.money-input .cur { color: var(--muted); font-weight: 600; }
.money-input input { flex: 1; border: 0; background: transparent; min-height: 48px; padding-left: 6px; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.money-input:focus-within { outline: 3px solid var(--focus); outline-offset: 1px; }
.money-input input:focus-visible { outline: none; }
.money-input.small { flex: none; width: 124px; }
.money-input.small input { min-height: 42px; font-size: 1rem; }
.err { color: var(--danger); font-size: 0.85rem; font-style: normal; }
.err:empty { display: none; }
.err.block { display: block; margin: 0 0 10px; }
.check { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 14px; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--accent); }
.check small { display: block; color: var(--muted); font-size: 0.85rem; }
.seg { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
.seg legend { padding: 0; margin-bottom: 6px; }
.seg-row { display: flex; gap: 8px; }
.seg-opt { flex: 1; min-width: 0; position: relative; }
.seg-opt input { position: absolute; opacity: 0; pointer-events: none; }
.seg-opt span {
  display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 4px 8px; line-height: 1.2;
  border: 1.5px solid var(--line); border-radius: 12px; font-weight: 600; cursor: pointer; text-align: center;
}
.seg-opt span .ic { width: 19px; height: 19px; }
.seg-opt input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); }
.seg-opt input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.seg-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px;
  border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); font-weight: 600; cursor: pointer;
}
.seg-btn.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); }
.tabs-like { margin-bottom: 12px; }
.choices { display: grid; gap: 8px; margin-bottom: 14px; }
.choice { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; }
.choice input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.actions .btn.primary { flex: 1 1 60%; }

.fill-lines { list-style: none; padding: 0; margin: 0 0 8px; }
.fill-lines li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.fill-lines .name { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 650; overflow-wrap: anywhere; }
.fill-lines .name .ic { width: 18px; height: 18px; color: var(--muted); }
.fill-lines small { display: block; font-weight: 400; color: var(--muted); font-size: 0.8rem; }
.left { margin: 8px 0 12px; }

/* ---------- first run ---------- */
.welcome, .setup { display: grid; gap: 14px; padding: calc(env(safe-area-inset-top) + 28px) 16px 40px; }
.welcome { text-align: center; padding-top: calc(env(safe-area-inset-top) + 56px); }
.welcome h1, .setup h1 { font-size: 2rem; margin: 0; letter-spacing: -0.01em; }
.setup h1 { font-size: 1.6rem; }
.mark { display: grid; place-items: center; width: 84px; height: 84px; margin: 0 auto; border-radius: 26px; background: var(--accent-soft); color: var(--accent-strong); }
.mark .ic { width: 46px; height: 46px; }
.lede { font-size: 1.05rem; color: var(--muted); margin: 0; }
.promises { list-style: none; padding: 0; margin: 4px 0 10px; display: grid; gap: 8px; text-align: left; }
.promises li { display: flex; gap: 10px; align-items: flex-start; }
.promises .ic { color: var(--accent); }
.setup form { display: grid; gap: 14px; }
[data-show="setup-second"] { border-top: 1px solid var(--line); padding-top: 14px; }
.setup-buckets { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.setup-buckets li { display: flex; gap: 10px; align-items: flex-start; padding-top: 10px; border-top: 1px solid var(--line); }
.setup-buckets .check { margin: 13px 0 0; }
.setup-buckets .grow { flex: 1; display: grid; gap: 8px; min-width: 0; }
.setup-buckets .row2 { display: flex; gap: 8px; align-items: center; }
.setup-buckets .row2 select { flex: 1; }

/* ---------- tabs ---------- */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px;
  max-width: 560px; margin: 0 auto; padding: 6px 6px calc(env(safe-area-inset-bottom) + 6px);
  background: var(--surface); border-top: 1px solid var(--line);
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px;
  padding: 4px 0; border: 0; border-radius: 12px; background: none; color: var(--muted);
  font-size: 0.72rem; font-weight: 650; cursor: pointer; white-space: nowrap;
}
.tab.on { color: var(--accent-strong); background: var(--accent-soft); }

/* ---------- sheets ---------- */
.sheet-wrap {
  position: fixed; inset: 0; z-index: 20; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(30, 24, 18, 0.38); animation: fade 0.18s ease-out;
}
.sheet {
  position: relative; width: 100%; max-width: 560px; max-height: 92vh; max-height: 92dvh;
  overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface); border-radius: 22px 22px 0 0;
  padding: 20px 16px calc(env(safe-area-inset-bottom) + 22px);
  animation: rise 0.22s ease-out;
}
.sheet h2 { font-size: 1.25rem; margin: 2px 48px 12px 0; display: flex; align-items: center; gap: 8px; }
.sheet h2:focus { outline: none; }
.sheet h2 .ic { color: var(--muted); }
.sheet .close { position: absolute; top: 10px; right: 8px; }
.detail .big { margin-top: 0; }
@media (min-width: 600px) {
  .sheet-wrap { align-items: center; }
  .sheet { border-radius: 22px; }
}
@keyframes rise { from { transform: translateY(24px); } }
@keyframes fade { from { background-color: rgba(30, 24, 18, 0); } }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom) + 16px); z-index: 30;
  max-width: calc(100% - 32px); width: max-content; padding: 10px 16px; border-radius: 14px;
  background: var(--ink); color: var(--bg); font-size: 0.92rem;
  opacity: 0; transform: translate(-50%, 12px); pointer-events: none; transition: opacity 0.2s, transform 0.2s;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast { display: flex; align-items: center; gap: 14px; }
.toast.with-undo.on { pointer-events: auto; }
.toast-undo { flex: none; min-height: 32px; padding: 4px 2px; border: 0; background: none; color: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
  .sheet, .sheet-wrap { animation: none; }
  .toast, .bar span { transition: none; }
}
