/* Bob Mini App. Page colours come from Telegram's theme (--tg-theme-*, set by telegram-web-app.js and re-applied by
   app.js); the data colours below are ours: energy (calories), protein, training, body, plus status. */
:root {
  --bg: var(--tg-theme-secondary-bg-color, #efeff4);
  --card: var(--tg-theme-section-bg-color, var(--tg-theme-bg-color, #ffffff));
  --ink: var(--tg-theme-text-color, #000000);
  --ink2: var(--tg-theme-subtitle-text-color, var(--tg-theme-hint-color, #6d6d72));
  --hint: var(--tg-theme-hint-color, #8e8e93);
  --btn: var(--tg-theme-button-color, #007aff);
  --btn-ink: var(--tg-theme-button-text-color, #ffffff);
  --accent: var(--tg-theme-accent-text-color, var(--btn));
  --danger: var(--tg-theme-destructive-text-color, #ff3b30);
  --bar: var(--tg-theme-bottom-bar-bg-color, var(--card));
  --line: color-mix(in srgb, var(--ink) 9%, transparent);
  --fill: color-mix(in srgb, var(--ink) 6%, transparent);
  --fill2: color-mix(in srgb, var(--ink) 13%, transparent);
  --btn-soft: color-mix(in srgb, var(--btn) 12%, transparent);
  --energy: #ec7527; --protein: #2f78de; --train: #1f9e58; --body: #7658f0;
  --warn: #d98307; --crit: #e2454a; --ok: #1f9e58;
  --r: 20px; --pad: 16px;
  --top: calc(var(--tg-content-safe-area-inset-top, 0px) + var(--tg-safe-area-inset-top, 0px));
  --bottom: var(--tg-safe-area-inset-bottom, env(safe-area-inset-bottom, 0px));
}
:root[data-theme="dark"] {
  --energy: #ff9458; --protein: #6fa7ff; --train: #45cf7c; --body: #a393ff; --warn: #f3a52c; --crit: #ff6b6e; --ok: #45cf7c;
  --line: color-mix(in srgb, var(--ink) 12%, transparent);
  --fill: color-mix(in srgb, var(--ink) 8%, transparent);
  --fill2: color-mix(in srgb, var(--ink) 16%, transparent);
  --btn-soft: color-mix(in srgb, var(--btn) 22%, transparent);
}
@supports not (color: color-mix(in srgb, red 50%, blue)) {
  :root { --line: rgba(128,128,128,.22); --fill: rgba(128,128,128,.14); --fill2: rgba(128,128,128,.28); --btn-soft: rgba(0,122,255,.14) }
}

* { box-sizing: border-box }
html { -webkit-text-size-adjust: 100%; height: 100% }
body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink);
  font: 16px/1.35 -apple-system, BlinkMacSystemFont, "SF Pro Text", Roboto, "Segoe UI", system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent; -webkit-font-smoothing: antialiased; overscroll-behavior-y: contain }
button, input, select { font: inherit; color: inherit }
button { background: none; border: 0; padding: 0; cursor: pointer; -webkit-user-select: none; user-select: none; touch-action: manipulation }
:focus-visible { outline: 2px solid var(--btn); outline-offset: 2px }
::selection { background: color-mix(in srgb, var(--accent) 26%, transparent) }
input, textarea { caret-color: var(--accent) }
svg { display: block }
small { font-weight: inherit }

.view { padding: calc(var(--top) + 6px) var(--pad) calc(96px + var(--bottom)); max-width: 560px; margin: 0 auto; transition: opacity .2s }
.view.busy { opacity: .55 }

/* header */
.top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 12px 2px 14px }
.top h1 { font-size: 28px; line-height: 1.15; letter-spacing: -.022em; font-weight: 700; margin: 0 }
.top .sub, .sub { margin: 4px 0 0; color: var(--ink2); font-size: 15px; line-height: 1.35 }
.nas { height: 32px; padding: 0 12px 0 10px; border-radius: 999px; display: flex; align-items: center; gap: 7px; background: var(--card); flex: none; margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--hint); transition: transform .12s }
.nas:active { transform: scale(.95) }
.nas i { width: 11px; height: 11px; border-radius: 50%; background: var(--hint) }
.nas.ok i { background: var(--ok) }
.nas.warn i { background: var(--warn) }
.nas.crit i { background: var(--crit); box-shadow: 0 0 0 4px color-mix(in srgb, var(--crit) 22%, transparent) }
.datenav { display: flex; gap: 6px; flex: none }
.datenav button { width: 40px; height: 40px; border-radius: 50%; background: var(--card); font-size: 24px; line-height: 1; color: var(--accent); padding-bottom: 3px }
.datenav button[disabled] { color: var(--hint); opacity: .5 }

/* cards */
.card { background: var(--card); border-radius: var(--r); padding: var(--pad); margin-bottom: 12px }
.card.slim { padding: 12px var(--pad) }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; min-height: 28px }
.card-h h2, .h2 { font-size: 17px; font-weight: 600; margin: 0; letter-spacing: -.01em }
.card-h .meta, .meta { color: var(--hint); font-size: 14px; white-space: nowrap }
.kicker { margin: 0; font-size: 13px; color: var(--hint); font-weight: 500 }
.h3 { font-size: 20px; font-weight: 700; letter-spacing: -.02em; margin: 2px 0 8px; line-height: 1.2 }
.h3 small { font-size: 14px; color: var(--hint); font-weight: 500; letter-spacing: 0 }
.foot { margin: 12px 0 0; font-size: 13px; color: var(--hint); line-height: 1.4 }
.foot b { color: var(--ink2) }
.empty { color: var(--ink2); font-size: 15px; line-height: 1.45; margin: 0 0 14px }
.empty b { color: var(--ink); font-weight: 600 }
.hint { margin: -4px 0 8px; font-size: 13px; color: var(--hint) }
.note { margin: 2px 0 0; font-size: 14px; color: var(--ink2) }
.note b { color: var(--ink); font-weight: 600 }
.verdict { margin: -2px 0 12px; font-size: 16px; line-height: 1.35 }
.actions { display: flex; gap: 10px }
.actions .btn { flex: 1; min-width: 0; padding: 0 8px; font-size: 16px }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 48px; padding: 0 18px; border-radius: 14px;
  background: var(--btn); color: var(--btn-ink); font-weight: 600; font-size: 17px; width: 100%; transition: transform .12s, opacity .12s; white-space: nowrap }
.btn:active { transform: scale(.98); opacity: .9 }
.btn.soft { background: var(--btn-soft); color: var(--accent) }
.btn.ghost { background: var(--fill); color: var(--ink) }
.btn.sm { height: 34px; width: auto; padding: 0 14px; font-size: 15px; border-radius: 999px }
.btn[disabled] { opacity: .5; pointer-events: none }
.link { color: var(--accent); font-weight: 600; font-size: 15px; padding: 10px 0 }
.link.danger { color: var(--danger) }
.link.quiet { color: var(--hint); font-weight: 500 }
.link { transition: opacity .12s }
.link:active { opacity: .45 }

/* ring cluster */
.ring-row { display: flex; align-items: center; gap: 16px }
.ring { width: 132px; height: 132px; flex: none; position: relative }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg) }
.ring circle { fill: none; stroke-width: 11; stroke-linecap: round }
.ring .track { stroke: var(--fill) }
.ring .arc { transition: stroke-dashoffset .9s cubic-bezier(.22, 1, .36, 1) }
.ring .center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 22px }
.ring .big { font-size: 28px; font-weight: 700; letter-spacing: -.03em; line-height: 1 }
.ring .lbl { font-size: 12px; color: var(--hint); margin-top: 4px; line-height: 1.1 }
.legend { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 9px }
.legend .row { display: flex; align-items: baseline; gap: 8px }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; align-self: center }
.dot.crit { background: var(--crit) } .dot.warn { background: var(--warn) } .dot.info, .dot.ok { background: var(--ok) }
.legend .k { color: var(--ink2); font-size: 14px; flex: 1 }
.legend .v { font-weight: 600; font-size: 16px; font-variant-numeric: tabular-nums; white-space: nowrap }
.legend .v small { color: var(--hint); font-weight: 500; font-size: 13px }

/* chips */
.chips { display: flex; gap: 8px; overflow-x: auto; margin: 14px calc(-1 * var(--pad)) 0; padding: 2px var(--pad); scrollbar-width: none; -webkit-overflow-scrolling: touch }
.chips::-webkit-scrollbar { display: none }
.sheet .chips { margin-top: 0; margin-bottom: 14px }
.chip { flex: none; height: 36px; padding: 0 12px; border-radius: 999px; background: var(--fill); font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; max-width: 210px; transition: transform .12s }
.chip:active { transform: scale(.96) }
.chip span { overflow: hidden; text-overflow: ellipsis }
.chip b { color: var(--hint); font-weight: 500 }
.chip.add { background: var(--btn-soft); color: var(--accent); font-weight: 600 }
.chip.on { background: var(--btn); color: var(--btn-ink) }
.chip.on b { color: var(--btn-ink); opacity: .8 }

/* week strip */
.week { display: flex; gap: 5px }
.week .d { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 16px; font-size: 11px; color: var(--hint) }
.week .d em { font-style: normal }
.week .d i { width: 9px; height: 9px; border-radius: 50%; background: var(--fill2); display: block }
.week .d.on i { background: var(--train) }
.week .d.today { color: var(--ink); font-weight: 600 }
.week .d.today i { box-shadow: 0 0 0 2px var(--card), 0 0 0 3.5px var(--train) }
.week.lg { justify-content: space-between; gap: 0 }
.week.lg .d { width: 36px; gap: 8px; font-size: 13px }
.week.lg .d i { width: 14px; height: 14px }

/* exercise rows */
.exs { margin: 4px 0 14px }
.ex { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line) }
.ex:first-child { border-top: 0; padding-top: 4px }
.ex .n { flex: 1; min-width: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.ex .n small { display: block; color: var(--hint); font-weight: 400; font-size: 13px }
.ex .kg { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap }
.ex .kg.find { color: var(--hint); font-weight: 500; font-size: 13px }

/* stat (weight) */
.stat { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap }
.stat .hero { font-size: 40px; font-weight: 700; letter-spacing: -.03em; line-height: 1 }
.stat .hero small { font-size: 17px; color: var(--hint); font-weight: 500; letter-spacing: 0; margin-left: 3px }
.stat .delta { font-size: 14px; color: var(--ink2); margin-bottom: 4px; line-height: 1.35 }
.stat .delta small { color: var(--hint); font-size: 13px }
.spark { width: 100%; height: auto; margin-top: 10px }

/* horizontal bars */
.bars { display: flex; flex-direction: column; gap: 10px }
.bar { display: grid; grid-template-columns: 84px 1fr 96px; align-items: center; gap: 10px; font-size: 14px }
.bar .k { color: var(--ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.bar .t { position: relative; height: 10px; border-radius: 5px; background: var(--fill) }
.bar .f { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; border-radius: 5px; transform-origin: left center; transition: transform .6s cubic-bezier(.22, 1, .36, 1) }
.bar .m { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--ink); opacity: .45; border-radius: 1px }
.bar .band { position: absolute; top: -3px; bottom: -3px; background: color-mix(in srgb, var(--train) 13%, transparent); border-radius: 4px }
.bar .v { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap }
.bar .v small { color: var(--hint) }
.bar.mute .v { color: var(--hint) }

/* heat map */
.heatwrap { display: flex; gap: 8px; align-items: stretch }
.heat-l { display: grid; grid-template-rows: repeat(7, 16px); gap: 4px; font-size: 10px; color: var(--hint) }
.heat-l span { line-height: 16px }
.heat { display: grid; grid-template-rows: repeat(7, 16px); grid-auto-flow: column; grid-auto-columns: 16px; gap: 4px }
.heat i { border-radius: 4px; background: var(--fill) }
.heat i.on { background: var(--train) }
.heat i.future { background: transparent }
.heat i.today { box-shadow: inset 0 0 0 1.5px var(--ink2) }
.heat i.today.on { box-shadow: none }

/* charts */
.chart { width: 100%; height: auto; display: block }
.chart .ax { font-size: 10px; fill: var(--hint) }
.chart .ax.on { fill: var(--ink); font-weight: 600 }
.chart .tl { stroke: var(--ink); stroke-opacity: .35; stroke-width: 1 }
.chart .ln { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round }
.chart .area { opacity: .1 }
.chart .sc { fill: var(--hint); stroke: var(--card); stroke-width: 2 }
.chart .end { stroke: var(--card); stroke-width: 2 }
.mini { width: 84px; flex: none }
.mini .chart { height: 34px }

/* lists */
.list .it { display: flex; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); align-items: center }
.list .it:first-child { border-top: 0; padding-top: 2px }
.list .it:last-child { padding-bottom: 2px }
.it .t { flex: 1; min-width: 0 }
.it .t b { font-weight: 600; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.it .t small { color: var(--hint); font-size: 13px; display: block; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.it .t small.wrap { white-space: normal }
.list.wrap .t b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden }
.it .r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600 }
.it .r small { display: block; color: var(--hint); font-size: 13px; font-weight: 400 }
.duty-t { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 700; letter-spacing: -.02em }
.duty-t svg { width: 22px; height: 22px; color: var(--accent); flex: none }
.list + .btn { margin-top: 14px }

/* day: ask row, plan steps, reminders, roster */
.ask .chips { margin-top: 0 }
.ask .chip { height: 44px; padding: 0 16px; font-size: 15px }
.step { display: grid; grid-template-columns: 44px 10px 1fr; column-gap: 10px; align-items: start; padding-bottom: 16px; position: relative }
.step:last-child { padding-bottom: 0 }
.step::before { content: ""; position: absolute; left: 58px; top: 20px; bottom: -2px; width: 2px; border-radius: 1px; background: var(--line) }
.step:last-child::before { display: none }
.step .at { font-size: 15px; font-weight: 600; line-height: 22px; font-variant-numeric: tabular-nums; color: var(--ink2) }
.step i { width: 10px; height: 10px; border-radius: 50%; background: var(--fill2); margin-top: 6px; position: relative }
.step .t { min-width: 0; line-height: 22px }
.step .t b { display: block; font-weight: 500 }
.step .t em { display: block; font-style: normal; font-size: 13px; font-weight: 600 }
.step .t small { display: block; font-size: 13px; line-height: 1.35; color: var(--hint) }
.step.past .at, .step.past .t { color: var(--hint) }
.step.past i { background: var(--hint) }
.step.next .at { color: var(--accent) }
.step.next .t b { font-weight: 600 }
.step.next i { background: var(--accent); box-shadow: 0 0 0 2px var(--card), 0 0 0 3.5px var(--accent) }
.list .rem { gap: 6px }
.rem .ok { margin: -6px 0 -6px -7px; flex: none }
.rem .t { transition: opacity .2s }
.rem.done .t { opacity: .45 }
.rem.done .t b { text-decoration: line-through }
.rem .t small.late { color: var(--danger) }
.list .rday { align-items: flex-start }
.rday .d { width: 34px; flex: none; text-align: center; line-height: 1.15 }
.rday .d small { display: block; font-size: 12px; color: var(--hint) }
.rday .d b { display: block; font-size: 20px; font-weight: 700; letter-spacing: -.02em }
.rday.today .d small, .rday.today .d b { color: var(--accent) }
.rday > .t { align-self: center }
.rday .none { margin: 0; font-size: 14px; color: var(--hint) }
.ev { display: flex; align-items: baseline; gap: 10px }
.ev + .ev { margin-top: 8px }
.ev .r { font-size: 14px; font-weight: 500; color: var(--ink2) }
.ph { display: block; width: 62%; height: 12px; margin: 14px 0; border-radius: 6px; background: var(--fill); animation: pulse 1.3s ease-in-out infinite }
.ph:nth-child(2) { width: 84% }
.ph:nth-child(3) { width: 48% }

/* tabs */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; justify-content: space-around; background: var(--bar);
  border-top: 1px solid var(--line); padding: 6px 0 calc(8px + var(--bottom)) }
.tabs button { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 72px; padding: 4px 0; color: var(--hint); font-size: 11px; font-weight: 500 }
.tabs button.on { color: var(--accent) }
.tabs button { transition: opacity .12s }
.tabs button:active { opacity: .55 }
.tabs svg { width: 26px; height: 26px }

/* layer: sheets and full screens */
.layer { position: fixed; inset: 0; z-index: 20 }
.layer .bg { position: absolute; inset: 0; background: rgba(0, 0, 0, .42); opacity: 0; transition: opacity .25s }
.layer.in .bg { opacity: 1 }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; background: var(--card); border-radius: 22px 22px 0 0; padding: 8px var(--pad) calc(18px + var(--bottom));
  max-height: 94%; overflow: auto; transform: translateY(100%); transition: transform .32s cubic-bezier(.22, 1, .36, 1); max-width: 560px; margin: 0 auto }
.layer.in .sheet { transform: none }
.sheet .grab { width: 36px; height: 5px; border-radius: 3px; background: var(--fill2); margin: 4px auto 16px }
.sheet h2 { font-size: 22px; font-weight: 700; letter-spacing: -.02em; margin: 0 0 14px }
.sheet .h3 { font-size: 15px; font-weight: 600; margin: 18px 0 8px; letter-spacing: 0 }
.sheet .sub { margin-top: -8px; margin-bottom: 14px }
.screen { position: absolute; inset: 0; background: var(--bg); overflow: auto; padding: calc(var(--top) + 6px) var(--pad) calc(28px + var(--bottom));
  transform: translateX(100%); transition: transform .32s cubic-bezier(.22, 1, .36, 1) }
.layer.in .screen { transform: none }
.screen > * { max-width: 560px; margin-left: auto; margin-right: auto }

/* forms */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; min-width: 0 }
.field label { font-size: 13px; color: var(--ink2); font-weight: 500 }
.field input { height: 48px; border-radius: 12px; border: 0; background: var(--fill); padding: 0 14px; font-size: 17px; outline: none; width: 100%; -webkit-appearance: none; appearance: none; color: var(--ink) }
.field input::placeholder { color: var(--hint) }
.field input:focus { box-shadow: 0 0 0 2px var(--btn) }
.field input[type=date], .field input[type=time] { min-width: 0 }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px }
.seg { display: flex; background: var(--fill); border-radius: 12px; padding: 3px; gap: 2px }
.seg button { flex: 1; height: 38px; border-radius: 9px; font-size: 14px; font-weight: 500; color: var(--ink2); padding: 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.seg button.on { background: var(--card); color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .14) }
.goals { display: flex; flex-direction: column; gap: 8px }
.goal { text-align: left; padding: 12px 14px; border-radius: 14px; background: var(--fill); display: flex; flex-direction: column; gap: 2px; border: 2px solid transparent }
.goal b { font-weight: 600 }
.goal small { color: var(--ink2); font-size: 13px }
.goal.on { border-color: var(--btn); background: var(--btn-soft) }
.stepper { display: flex; align-items: center; background: var(--fill); border-radius: 12px; height: 46px; min-width: 0 }
.stepper button { width: 36px; height: 46px; font-size: 24px; color: var(--accent); font-weight: 400; flex: none; line-height: 1 }
.stepper input { flex: 1; min-width: 0; width: 100%; text-align: center; background: none; border: 0; height: 46px; font-size: 16px; font-weight: 600; outline: none; padding: 0; -moz-appearance: textfield; color: var(--ink) }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0 }
.stepper.big { height: 76px }
.stepper.big button { height: 76px; width: 60px; font-size: 30px }
.stepper.big input { height: 76px; font-size: 44px; font-weight: 700; letter-spacing: -.03em }
details.more summary { list-style: none; color: var(--accent); font-weight: 600; font-size: 15px; padding: 2px 0 14px; cursor: pointer }
details.more summary::-webkit-details-marker { display: none }
details.more[open] summary { color: var(--hint); font-weight: 500 }

/* workout logging */
.set { display: grid; grid-template-columns: 16px 1fr 1fr 44px; gap: 6px; align-items: center; margin-top: 8px }
.set.head { margin-top: 0 }
.set .i { color: var(--hint); font-size: 13px; text-align: center; font-variant-numeric: tabular-nums }
.set .ok, .rem .ok { width: 44px; height: 46px; display: flex; align-items: center; justify-content: center }
.set .ok svg, .rem .ok svg { width: 30px; height: 30px; overflow: visible; transition: transform .15s cubic-bezier(.22, 1, .36, 1) }
.set .ok:active svg, .rem .ok:active svg { transform: scale(.86) }
.set .ok circle, .rem .ok circle { fill: transparent; stroke: var(--hint); stroke-width: 2; transition: fill .2s, stroke .2s }
.set .ok path, .rem .ok path { fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 20; stroke-dashoffset: 20; transition: stroke-dashoffset .28s cubic-bezier(.22, 1, .36, 1) .06s }
.set.done .ok circle, .rem.done .ok circle { fill: var(--train); stroke: var(--train) }
.set.done .ok path, .rem.done .ok path { stroke-dashoffset: 0 }
.set.done .stepper { opacity: .55 }
.unit { font-size: 11px; color: var(--hint); text-align: center }
.exfoot { display: flex; align-items: center; gap: 16px; margin-top: 6px }
.exfoot .rir { margin-left: auto; font-size: 13px; color: var(--hint); display: flex; align-items: center; gap: 6px }
.exfoot select { background: var(--fill); border: 0; border-radius: 8px; height: 30px; padding: 0 8px; color: var(--ink) }
.center-link { text-align: center; padding: 8px 0 16px }

/* toast */
.toast { position: fixed; left: 16px; right: 16px; bottom: calc(96px + var(--bottom)); z-index: 30; background: var(--ink); color: var(--bg); border-radius: 14px;
  padding: 12px 16px; display: flex; align-items: center; gap: 12px; font-size: 15px; font-weight: 500; box-shadow: 0 8px 28px rgba(0, 0, 0, .22);
  transform: translateY(16px); opacity: 0; transition: transform .25s, opacity .25s; max-width: 528px; margin: 0 auto }
.toast.in { transform: none; opacity: 1 }
.toast span { flex: 1; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical }
.toast button { color: inherit; font-weight: 700; background: color-mix(in srgb, var(--bg) 18%, transparent); padding: 7px 12px; border-radius: 9px; flex: none }

/* loading */
.sk { height: 150px; border-radius: var(--r); background: var(--card); margin-bottom: 12px; animation: pulse 1.3s ease-in-out infinite }
.sk.s { height: 90px }
@keyframes pulse { 50% { opacity: .55 } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important } }
