/* NOTIFAYA · mobile first, RTL, light + dark */
:root {
  --bg: #f6f4f1;
  --surface: #ffffff;
  --surface-2: #f1eef9;
  --ink: #1d1b2c;
  --muted: #6b6880;
  --line: #e6e2ee;
  --brand: #5b4bdb;
  --brand-ink: #ffffff;
  --brand-soft: #ece9fc;
  --accent: #ff7a59;
  --good: #0f8a68;
  --good-soft: #e3f5ee;
  --wait: #b26a00;
  --wait-soft: #fdf1dc;
  --bad: #c93c3c;
  --bad-soft: #fbe9e9;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgb(29 27 44 / 6%), 0 8px 24px rgb(29 27 44 / 7%);
  --font: 'Readex Pro', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  --tabs-h: 64px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12111a;
    --surface: #1c1b27;
    --surface-2: #25233a;
    --ink: #f1f0f7;
    --muted: #a5a2b8;
    --line: #2f2d42;
    --brand: #8b7ff0;
    --brand-ink: #14121f;
    --brand-soft: #2b2752;
    --good: #4fd1a5;
    --good-soft: #163a30;
    --wait: #f2b45a;
    --wait-soft: #3a2c14;
    --bad: #ff8080;
    --bad-soft: #3d1c1f;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 25%);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 var(--font);
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, p { margin: 0; }
a { color: var(--brand); }
button, input { font: inherit; color: inherit; }
img { display: block; }
.icon { flex: none; display: block; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 8px; }

.app { max-width: 560px; margin-inline: auto; min-height: 100dvh; }
.screen {
  padding: max(12px, env(safe-area-inset-top)) 16px 32px;
  outline: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
body.has-tabs .screen { padding-block-end: calc(var(--tabs-h) + 32px + env(safe-area-inset-bottom)); }
.screen.is-entering { animation: enter 0.24s ease-out; }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } }
.screen__lead, .card__lead { color: var(--muted); }
.loading { color: var(--muted); text-align: center; padding: 48px 0; }
.muted { color: var(--muted); }

/* ---------- header bar ---------- */
.bar { display: flex; align-items: center; gap: 8px; min-height: 52px; }
.bar__title { flex: 1; font-size: 26px; font-weight: 600; line-height: 1.2; }
.bar__actions { display: flex; gap: 4px; }
.icon-btn {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: transparent; color: var(--ink);
  cursor: pointer; text-decoration: none;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn--accent { background: var(--brand); color: var(--brand-ink); }
.icon-btn--accent:hover { background: var(--brand); filter: brightness(1.08); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 20px;
  border: 1px solid transparent; border-radius: 14px;
  font-weight: 600; font-size: 16px; text-decoration: none;
  cursor: pointer; transition: transform 0.1s, filter 0.15s, background 0.15s;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn--lg { min-height: 56px; font-size: 17px; border-radius: 16px; }
.btn--small { min-height: 36px; padding: 6px 14px; font-size: 14px; border-radius: 10px; }
.btn--block { width: 100%; }
.btn--primary { background: var(--brand); color: var(--brand-ink); box-shadow: 0 6px 18px rgb(91 75 219 / 28%); }
.btn--primary:hover { filter: brightness(1.06); }
.btn--secondary { background: var(--brand-soft); color: var(--brand); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--danger { background: var(--bad); color: #fff; }
.btn--danger-text { color: var(--bad); }
.btn.is-busy { position: relative; color: transparent !important; }
.btn.is-busy::after {
  content: ''; position: absolute; width: 20px; height: 20px; border-radius: 50%;
  border: 2.5px solid var(--brand); border-inline-end-color: transparent;
  animation: spin 0.7s linear infinite;
}
.btn--primary.is-busy::after, .btn--danger.is-busy::after { border-color: #fff; border-inline-end-color: transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.link-btn { border: 0; background: none; color: var(--brand); font-weight: 600; cursor: pointer; padding: 8px; text-decoration: none; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.stack--tight { gap: 8px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* ---------- welcome ---------- */
.welcome, .auth, .setup { display: flex; flex-direction: column; gap: 14px; padding-block: 8px 24px; }
.welcome__phone { position: relative; height: 170px; margin-block: 16px 8px; }
.mock-note {
  position: absolute; inset-inline: 0; top: 0;
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  background: var(--surface); border-radius: 20px; box-shadow: var(--shadow);
  animation: drop 0.6s 0.2s both cubic-bezier(.2,.8,.3,1.2);
}
.mock-note img { border-radius: 9px; }
.mock-note div { flex: 1; display: flex; flex-direction: column; min-width: 0; line-height: 1.4; }
.mock-note strong { font-size: 14px; }
.mock-note span { font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock-note time { font-size: 12px; color: var(--muted); align-self: flex-start; }
.mock-note--2 { top: 84px; inset-inline: 14px; opacity: 0.9; animation-delay: 0.55s; }
@keyframes drop { from { opacity: 0; transform: translateY(-24px) scale(0.96); } }
.brand { color: var(--brand); font-weight: 600; letter-spacing: 0.08em; font-size: 14px; }
.welcome__title, .auth__title, .setup__title { font-size: 30px; font-weight: 600; line-height: 1.25; }
.welcome__lead, .auth__lead, .setup__lead { color: var(--muted); font-size: 17px; }
.points { list-style: none; padding: 0; margin: 4px 0 12px; display: grid; gap: 10px; }
.points li { display: flex; align-items: center; gap: 10px; }
.points .icon { color: var(--good); background: var(--good-soft); border-radius: 50%; padding: 3px; width: 26px; height: 26px; }
.auth > .icon-btn { margin-inline-start: -10px; }
.auth__switch { align-self: center; }
.eyebrow { color: var(--brand); font-weight: 600; font-size: 14px; }
.eyebrow--pad { padding-block-start: 8px; }
.bell-art {
  width: 96px; height: 96px; border-radius: 30px; margin-block: 12px 4px;
  display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand);
  animation: ring 1s 0.3s ease-in-out;
}
@keyframes ring { 20% { transform: rotate(-12deg); } 40% { transform: rotate(10deg); } 60% { transform: rotate(-6deg); } 80% { transform: rotate(3deg); } }

/* ---------- forms ---------- */
.form { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > span:first-child, .field legend { font-weight: 600; font-size: 15px; padding: 0; margin-block-end: 6px; }
.field small { color: var(--muted); font-size: 13px; }
.field input:not([type=radio]) {
  width: 100%; min-height: 52px; padding: 12px 14px;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px;
  font-size: 17px;
}
.field input:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 4px var(--brand-soft); }
.field__row { display: flex; align-items: center; gap: 6px; }
.field__row input { flex: 1; }
.form__error { background: var(--bad-soft); color: var(--bad); padding: 10px 14px; border-radius: 12px; font-size: 15px; }
.key { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; font-size: 14px !important; }

.picker { display: flex; flex-wrap: wrap; gap: 10px; }
.pick { position: relative; cursor: pointer; }
.pick input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pick span { display: grid; place-items: center; transition: transform 0.12s, box-shadow 0.12s; }
.pick--sticker span { width: 60px; height: 60px; padding: 4px; border-radius: 18px; background: var(--surface); border: 1.5px solid var(--line); }
.pick--sticker img { width: 100%; height: 100%; display: block; }
.pick--sticker input:checked + span { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); transform: scale(1.06); }
.pick--color span { width: 40px; height: 40px; border-radius: 50%; background: var(--tone); }
.pick--color input:checked + span { box-shadow: 0 0 0 3px var(--bg), 0 0 0 6px var(--tone); }
.pick input:focus-visible + span { outline: 3px solid var(--brand); outline-offset: 3px; }
.preview { display: flex; flex-direction: column; gap: 8px; }
.preview small { color: var(--muted); }

/* ---------- panels, cards, banners ---------- */
.panel { padding: 16px; border-radius: var(--radius); display: flex; flex-direction: column; gap: 8px; }
.panel h2 { font-size: 17px; }
.panel--info { background: var(--brand-soft); }
.panel--warn { background: var(--wait-soft); }
.panel--good { background: var(--good-soft); color: var(--good); font-weight: 600; flex-direction: row; align-items: center; }
.steps { margin: 4px 0; padding: 0; list-style: none; display: grid; gap: 10px; counter-reset: s; }
.steps li { display: flex; align-items: center; gap: 12px; }
.steps__icon { width: 40px; height: 40px; border-radius: 12px; background: var(--surface); display: grid; place-items: center; color: var(--brand); flex: none; }
.steps__icon img { border-radius: 6px; }

.card { background: var(--surface); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; }
.card__title { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 600; }
.banner {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  background: var(--wait-soft); color: var(--ink); border-radius: 14px; font-size: 14px;
}
.banner .icon { color: var(--wait); }
.banner span { flex: 1; }

.details summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; color: var(--brand); font-weight: 600; }
.details summary::-webkit-details-marker { display: none; }
.details summary::after { content: '⌄'; margin-inline-start: auto; transition: transform 0.2s; }
.details[open] summary::after { transform: rotate(180deg); }
.card.details summary { color: var(--ink); }
.dev-message {
  margin: 10px 0 0; padding: 12px; background: var(--surface-2); border-radius: 12px;
  font: 13px/1.6 ui-monospace, 'Cascadia Code', Consolas, monospace;
  white-space: pre-wrap; word-break: break-word; max-height: 300px; overflow: auto;
}

/* ---------- inbox ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; min-height: 38px; padding: 6px 14px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; font-size: 14px; white-space: nowrap;
}
.chip[aria-selected='true'] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.day { font-size: 13px; font-weight: 600; color: var(--muted); margin-block: 6px 6px; }
.list { list-style: none; padding: 0; margin: 0; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.list li + li { border-block-start: 1px solid var(--line); }
.row { display: flex; align-items: flex-start; gap: 12px; padding: 14px; color: inherit; text-decoration: none; position: relative; }
.list .row:hover { background: var(--surface-2); }
.row--static { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.row__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row__top { display: flex; align-items: baseline; gap: 8px; }
.row__who { flex: 1; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.is-unread .row__who { font-weight: 600; }
.row__time { font-size: 13px; color: var(--muted); flex: none; }
.row__line { color: var(--muted); font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.is-unread .row__line { color: var(--ink); }
.row__voice { display: inline-flex; align-items: center; gap: 4px; color: var(--brand); font-weight: 600; }
.row__meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.row__source { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex: none; margin-block-start: 8px; }
.tag { font-size: 11px; padding: 1px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.tag--muted { background: var(--surface-2); color: var(--muted); }

.avatar {
  flex: none; width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; font-size: 22px;
  background: color-mix(in srgb, var(--tone) 16%, var(--surface));
  border: 1.5px solid color-mix(in srgb, var(--tone) 35%, transparent);
  color: var(--tone); font-weight: 600;
}
.avatar--sm { width: 30px; height: 30px; font-size: 15px; border-radius: 10px; }
.avatar--lg { width: 54px; height: 54px; font-size: 26px; border-radius: 17px; }
.avatar--xl { width: 84px; height: 84px; font-size: 42px; border-radius: 26px; }
/* The sticker carries its own disc; the site colour stays as the frame. */
.avatar--sticker { padding: 2px; }
.avatar--sticker img { width: 100%; height: 100%; display: block; }

.empty { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 40px 12px; }
.empty__art { width: 84px; height: 84px; border-radius: 28px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin-block-end: 6px; }
.empty__title { font-size: 20px; font-weight: 600; }
.empty__lead { color: var(--muted); max-width: 32ch; margin-block-end: 8px; }

/* ---------- message ---------- */
.message { display: flex; flex-direction: column; gap: 14px; }
.source-chip { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding-block: 4px; padding-inline: 4px 12px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; font-size: 14px; }
.message__who { font-size: 28px; font-weight: 600; line-height: 1.25; }
.message__when { color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.message__title { font-size: 18px; font-weight: 600; }
.message__text { background: var(--surface); padding: 18px; border-radius: var(--radius); box-shadow: var(--shadow); font-size: 18px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }

.player { display: flex; align-items: center; gap: 14px; background: var(--surface); padding: 14px; border-radius: var(--radius); box-shadow: var(--shadow); }
.player__btn {
  width: 60px; height: 60px; border-radius: 50%; border: 0; flex: none; cursor: pointer;
  background: var(--brand); color: var(--brand-ink); display: grid; place-items: center;
  box-shadow: 0 6px 18px rgb(91 75 219 / 30%);
}
.player__btn .icon { margin-inline-start: 3px; }
.player.is-playing .player__btn .icon { margin: 0; }
.player__track { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.player__times { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; direction: ltr; }
.player input[type=range] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; direction: ltr; cursor: pointer; --fill: 0%;
}
.player input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(to right, var(--brand) var(--fill), var(--line) var(--fill)); }
.player input[type=range]::-moz-range-track { height: 6px; border-radius: 3px; background: var(--line); }
.player input[type=range]::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--brand); }
.player input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--brand); margin-top: -6px; border: 3px solid var(--surface); }
.player input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--brand); border: 3px solid var(--surface); }
.player__fallback { background: var(--wait-soft); padding: 12px 14px; border-radius: 14px; font-size: 14px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }

/* ---------- websites ---------- */
.cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.site-card { display: flex; align-items: center; gap: 14px; padding: 14px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); color: inherit; text-decoration: none; }
.site-card__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.site-card__main strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; color: var(--muted); }
.count { background: var(--accent); color: #fff; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 999px; flex: none; }
.chev { color: var(--muted); }

.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.pill--good { background: var(--good-soft); color: var(--good); }
.pill--wait { background: var(--wait-soft); color: var(--wait); }
.pill--bad { background: var(--bad-soft); color: var(--bad); }
.pill--muted { background: var(--surface-2); color: var(--muted); }
.pill__dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }

.connect { display: flex; flex-direction: column; gap: 16px; }
.connect__head { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.connect__name { font-size: 24px; font-weight: 600; line-height: 1.3; }
.status { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius); }
.status div { display: flex; flex-direction: column; }
.status span { font-size: 14px; }
.status--good { background: var(--good-soft); color: var(--good); }
.status--good span { color: var(--ink); opacity: 0.75; }
.status--wait { background: var(--wait-soft); }
.status--wait strong { color: var(--wait); }
.status--wait span { color: var(--muted); }
.pulse { width: 14px; height: 14px; border-radius: 50%; background: var(--wait); flex: none; box-shadow: 0 0 0 0 color-mix(in srgb, var(--wait) 50%, transparent); animation: pulse 1.8s ease-out infinite; }
@keyframes pulse { to { box-shadow: 0 0 0 12px transparent; } }

.journey { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; }
.journey__step { display: flex; gap: 14px; position: relative; padding-block-end: 18px; }
.journey__step:not(:last-child)::before { content: ''; position: absolute; inset-inline-start: 17px; top: 40px; bottom: 4px; width: 2px; background: var(--line); }
.journey__num {
  width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 600;
  background: var(--surface); border: 2px solid var(--line); color: var(--muted);
}
.journey__step.is-current .journey__num { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.journey__step.is-done .journey__num { background: var(--good); border-color: var(--good); color: #fff; }
.journey__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; padding-block-start: 4px; }
.journey__body h2 { font-size: 18px; font-weight: 600; }
.journey__body p { color: var(--muted); }

/* ---------- settings & check ---------- */
.account { flex-direction: row; align-items: center; gap: 14px; }
.account div { display: flex; flex-direction: column; min-width: 0; }
.account span[dir] { color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.setting-state { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.setting-state--on { color: var(--good); }
.setting-state--off, .setting-state--needs-install { color: var(--wait); }
.setting-state--denied, .setting-state--unsupported { color: var(--bad); }
.links { padding: 6px; gap: 0; }
.link-row { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 12px; color: var(--ink); text-decoration: none; }
.link-row:hover { background: var(--surface-2); }
.link-row > .icon:first-child { color: var(--brand); }
.link-row span { flex: 1; display: flex; flex-direction: column; }
.link-row small { color: var(--muted); }
.link-row > .icon:last-child { color: var(--muted); }
.check-list { list-style: none; padding: 0; margin: 0; }
.check-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-block: 10px; }
.check-row + .check-row { border-block-start: 1px solid var(--line); }

/* ---------- bottom tabs ---------- */
.tabs {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 10;
  display: flex; justify-content: center;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-block-start: 1px solid var(--line);
  padding-block-end: env(safe-area-inset-bottom);
}
.tabs[hidden] { display: none; }
.tab {
  flex: 1; max-width: 186px; height: var(--tabs-h);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--muted); text-decoration: none; font-size: 12px; font-weight: 600;
}
.tab.is-active { color: var(--brand); }
.tab__icon { position: relative; padding: 3px 18px; border-radius: 999px; transition: background 0.2s; }
.tab.is-active .tab__icon { background: var(--brand-soft); }
.tab__badge {
  position: absolute; top: -4px; inset-inline-end: 6px;
  min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  background: var(--accent); color: #fff; font-size: 11px; display: grid; place-items: center;
  border: 2px solid var(--surface);
}
.tab__badge[hidden] { display: none; }

/* ---------- toast & sheet ---------- */
.toast {
  position: fixed; inset-inline: 16px; bottom: calc(var(--tabs-h) + 16px + env(safe-area-inset-bottom)); z-index: 30;
  max-width: 528px; margin-inline: auto;
  padding: 14px 18px; border-radius: 14px; background: var(--ink); color: var(--bg);
  font-weight: 600; text-align: center; box-shadow: var(--shadow);
  opacity: 0; transform: translateY(12px); transition: opacity 0.2s, transform 0.2s;
}
.toast.is-shown { opacity: 1; transform: none; }
.toast[data-tone='good'] { background: var(--good); color: #fff; }
.toast[data-tone='bad'] { background: var(--bad); color: #fff; }

.sheet-dialog {
  border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 560px;
  background: transparent; color: var(--ink);
}
.sheet-dialog::backdrop { background: rgb(10 8 20 / 45%); }
.sheet-dialog[open] .sheet { animation: rise 0.25s ease-out; }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }
.sheet {
  background: var(--surface); border-radius: 24px 24px 0 0;
  padding: 10px 20px calc(20px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 12px;
}
.sheet__grip { align-self: center; width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin-block-end: 6px; }
.sheet__title { font-size: 20px; font-weight: 600; }
.sheet__lead { color: var(--muted); }
.sheet__actions { display: flex; flex-direction: column; gap: 8px; margin-block-start: 8px; }

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