:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #f0f3f9;
  --border: #e2e6ef;
  --border-strong: #cdd3e0;
  --text: #1a1f2c;
  --muted: #667085;
  --accent: #2f6bff;
  --accent-hover: #1f58e6;
  --accent-weak: #e9f0ff;
  --success: #0f9f5f;
  --success-weak: #e3f7ec;
  --warn: #b86e00;
  --warn-weak: #fff4e0;
  --danger: #d92d20;
  --danger-weak: #fdecea;
  --ig: #d6246e;
  --fb: #1877f2;
  --dot: #d4d9e4;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .16);
  --radius: 10px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1016;
    --surface: #171a22;
    --surface-2: #1e222c;
    --border: #2a2f3b;
    --border-strong: #3a4150;
    --text: #e8eaf0;
    --muted: #98a2b3;
    --accent: #5b8cff;
    --accent-hover: #7aa2ff;
    --accent-weak: #1b2644;
    --success: #3ccf8a;
    --success-weak: #12301f;
    --warn: #f5b041;
    --warn-weak: #33260e;
    --danger: #ff6b5e;
    --danger-weak: #3a1715;
    --ig: #ff4f96;
    --fb: #4d95ff;
    --dot: #262b36;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h1 { font-size: 22px; font-weight: 650; }
h2 { font-size: 16px; font-weight: 650; }
h3 { font-size: 14px; font-weight: 650; }
code { font: 12.5px ui-monospace, SFMono-Regular, Consolas, monospace; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
svg.i { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.row { display: flex; align-items: center; gap: 8px; }
.grow { flex: 1; min-width: 0; }
.hidden { display: none !important; }

/* ---------- Botones y formularios ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font: inherit; font-weight: 550; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn:focus-visible, .input:focus-visible, .icon-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); }
.btn.danger { color: var(--danger); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn:disabled { opacity: .55; cursor: default; }
.icon-btn {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px;
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.input, textarea.input, select.input {
  width: 100%; min-height: 36px; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font: inherit;
}
textarea.input { resize: vertical; min-height: 84px; line-height: 1.45; }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field > label, .label { font-weight: 600; font-size: 13px; }
.hint { font-size: 12.5px; color: var(--muted); }
.check { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; }
.check input { margin-top: 3px; accent-color: var(--accent); }
.seg { display: inline-flex; padding: 3px; background: var(--surface-2); border-radius: 9px; gap: 2px; flex-wrap: wrap; }
.seg button {
  border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 550;
  padding: 6px 12px; border-radius: 7px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

.switch { position: relative; width: 38px; height: 22px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--border-strong); transition: background .15s; pointer-events: none; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.switch input:checked + span { background: var(--success); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: 12px; font-weight: 550; white-space: nowrap; }
.chip.kw { background: var(--accent-weak); border-color: transparent; color: var(--accent); }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: 6px; font-size: 11.5px; font-weight: 650; letter-spacing: .02em; }
.badge.ig { color: var(--ig); background: color-mix(in srgb, var(--ig) 12%, transparent); }
.badge.fb { color: var(--fb); background: color-mix(in srgb, var(--fb) 12%, transparent); }
.badge.test { color: var(--warn); background: var(--warn-weak); }
.badge.ok { color: var(--success); background: var(--success-weak); }
.badge.off { color: var(--muted); background: var(--surface-2); }
.badge.err { color: var(--danger); background: var(--danger-weak); }

/* ---------- Estructura ---------- */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px;
  padding: 16px 12px; background: var(--surface); border-right: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 18px; font-weight: 700; font-size: 15px; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: #fff; display: grid; place-items: center; }
.brand-mark svg { stroke: #fff; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--muted); font-weight: 550;
}
.nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav a.on { background: var(--accent-weak); color: var(--accent); }
.sidebar .spacer { flex: 1; }
.main { min-width: 0; }
.page { padding: 28px 32px 48px; max-width: 1180px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 18px 20px; }

.banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; font-size: 13.5px; }
.banner.warn { background: var(--warn-weak); color: var(--warn); }
.banner.info { background: var(--accent-weak); color: var(--accent); }
.banner svg { margin-top: 2px; }
.banner .t { color: var(--text); }

/* ---------- Lista de automatizaciones ---------- */
.auto-list { display: grid; gap: 10px; }
.auto-row {
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 16px; padding: 14px 16px;
}
.auto-row .name { font-weight: 650; font-size: 15px; color: var(--text); }
.auto-row .meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; }
.stats { display: flex; gap: 18px; }
.stat { text-align: right; }
.stat b { display: block; font-size: 16px; font-variant-numeric: tabular-nums; }
.stat span { font-size: 11.5px; color: var(--muted); }
.empty { text-align: center; padding: 56px 20px; }
.empty .ico { width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 14px; background: var(--accent-weak); color: var(--accent); display: grid; place-items: center; }
.empty .ico svg { width: 26px; height: 26px; }
.empty p { color: var(--muted); max-width: 440px; margin: 8px auto 18px; }

.menu-wrap { position: relative; }
.menu {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; min-width: 190px; padding: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg);
}
.menu button {
  display: flex; width: 100%; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: 7px;
  background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.menu button:hover { background: var(--surface-2); }
.menu button.danger { color: var(--danger); }

/* ---------- Editor ---------- */
.editor { display: grid; grid-template-rows: auto 1fr; height: 100vh; }
.ed-head {
  display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.ed-name { font-size: 16px; font-weight: 650; border-color: transparent; background: transparent; max-width: 420px; }
.ed-name:hover { border-color: var(--border); }
.ed-name:focus { border-color: var(--border-strong); background: var(--surface); }
.dirty { font-size: 12px; color: var(--warn); font-weight: 600; }
.ed-body { display: grid; grid-template-columns: 1fr 400px; min-height: 0; }
.canvas {
  overflow: auto; padding: 36px 20px 80px;
  background-color: var(--bg);
  background-image: radial-gradient(var(--dot) 1.2px, transparent 1.2px);
  background-size: 18px 18px;
}
.flow { display: flex; flex-direction: column; align-items: center; }
.node {
  width: min(360px, 100%); background: var(--surface); border: 1.5px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow); cursor: pointer; text-align: left; font: inherit; color: inherit; padding: 0;
}
.node:hover { border-color: var(--border-strong); }
.node.sel { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-weak), var(--shadow); }
.node-top { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.node-ico { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.node-kicker { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.node-title { font-weight: 650; }
.node-body { padding: 0 14px 12px 56px; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.node-body .chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.node-warn { display: flex; gap: 6px; align-items: flex-start; margin: 0 10px 10px; padding: 7px 9px; border-radius: 8px; background: var(--warn-weak); color: var(--warn); font-size: 12.5px; }
.node-warn svg { width: 14px; height: 14px; margin-top: 2px; }
.node.trigger { border-top: 4px solid var(--accent); }
.c-trigger { background: var(--accent-weak); color: var(--accent); }
.c-reply { background: color-mix(in srgb, #8b5cf6 14%, transparent); color: #8b5cf6; }
.c-dm { background: color-mix(in srgb, var(--ig) 14%, transparent); color: var(--ig); }
.c-wait { background: var(--warn-weak); color: var(--warn); }
.c-tag { background: var(--success-weak); color: var(--success); }
.c-hook { background: var(--surface-2); color: var(--text); }
.link { width: 2px; height: 22px; background: var(--border-strong); }
.add {
  width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--border-strong); background: var(--surface);
  color: var(--muted); display: grid; place-items: center; cursor: pointer; position: relative;
}
.add:hover { border-color: var(--accent); color: var(--accent); }
.add-wrap { position: relative; display: flex; flex-direction: column; align-items: center; }
.add-menu { left: 50%; right: auto; transform: translateX(-50%); top: calc(100% + 6px); min-width: 250px; }
.add-menu small { display: block; color: var(--muted); font-size: 12px; }
.end { padding: 6px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); font-size: 12.5px; font-weight: 600; }

.panel { background: var(--surface); border-left: 1px solid var(--border); overflow: auto; }
.panel-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 14px 18px; background: var(--surface); border-bottom: 1px solid var(--border); }
.panel-body { padding: 18px; }
.panel-foot { display: flex; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--border); }
.vars { display: flex; flex-wrap: wrap; gap: 4px; }
.vars button { border: 1px dashed var(--border-strong); background: transparent; color: var(--muted); font: 12px ui-monospace, Consolas, monospace; border-radius: 6px; padding: 2px 6px; cursor: pointer; }
.vars button:hover { color: var(--accent); border-color: var(--accent); }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.post {
  position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; border: 2px solid transparent; cursor: pointer;
  background: var(--surface-2); display: grid; place-items: center; padding: 0; font: inherit; color: var(--muted);
}
.post img { width: 100%; height: 100%; object-fit: cover; }
.post .cap { position: absolute; inset: auto 0 0; padding: 3px 5px; font-size: 10.5px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.75)); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post.on { border-color: var(--accent); }
.post.on::after { content: "✓"; position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 12px; display: grid; place-items: center; }
.post .txt { padding: 6px; font-size: 11px; text-align: left; overflow: hidden; }

/* ---------- Tablas ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { font-size: 12px; color: var(--muted); font-weight: 600; background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }
.who { display: flex; align-items: center; gap: 10px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; flex: none; font-size: 13px; }
.clip { max-width: 280px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Actividad ---------- */
.log { display: grid; grid-template-columns: 76px 10px 1fr; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--border); align-items: start; }
.log:last-child { border-bottom: 0; }
.log .dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; background: var(--muted); }
.log.success .dot { background: var(--success); }
.log.warn .dot { background: var(--warn); }
.log.error .dot { background: var(--danger); }
.log.error .msg { color: var(--danger); }
.log time { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; padding-top: 2px; }
.log .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 3px; align-items: center; }
.log details summary { cursor: pointer; font-size: 12px; color: var(--muted); }
.log pre { margin: 6px 0 0; padding: 10px; background: var(--surface-2); border-radius: 8px; overflow: auto; font-size: 12px; max-height: 260px; }

/* ---------- Configuración ---------- */
.settings { display: grid; gap: 14px; }
.step-card { display: grid; grid-template-columns: 32px 1fr; gap: 14px; }
.step-num { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: var(--surface-2); color: var(--muted); }
.step-num.ok { background: var(--success-weak); color: var(--success); }
.step-num.bad { background: var(--danger-weak); color: var(--danger); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin-top: 10px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; overflow-wrap: anywhere; }
.copy { display: flex; gap: 6px; margin-top: 8px; }
.copy .input { font: 13px ui-monospace, Consolas, monospace; }

/* ---------- Modal y toasts ---------- */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(10, 14, 24, .5); display: grid; place-items: center; padding: 16px; }
.modal { width: min(720px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-body { padding: 20px; }
.templates { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.tpl { text-align: left; padding: 16px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--surface); cursor: pointer; font: inherit; color: inherit; display: grid; gap: 8px; align-content: start; }
.tpl:hover { border-color: var(--accent); }
.tpl p { margin: 0; color: var(--muted); font-size: 13px; }
.tpl .reco { justify-self: start; }
.test-log { margin-top: 16px; border: 1px solid var(--border); border-radius: 10px; max-height: 300px; overflow: auto; }
.test-log:empty { display: none; }

#toasts { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: grid; gap: 8px; }
.toast { padding: 10px 14px; border-radius: 10px; background: var(--text); color: var(--surface); box-shadow: var(--shadow-lg); font-weight: 550; max-width: 360px; }
.toast.error { background: var(--danger); color: #fff; }

/* ---------- Login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login .card { width: min(380px, 100%); padding: 28px; }
.login .brand { padding: 0 0 20px; }

/* ---------- Editor: cabecera y panel ---------- */
.ed-title { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.ed-actions { display: flex; align-items: center; gap: 10px; }
.panel-close, .panel-backdrop, .mobile-top, .mobile-nav, .only-mobile { display: none; }

/* ---------- Móvil ---------- */
@media (max-width: 900px) {
  /* Estructura: barra superior con la marca y navegación fija abajo */
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .mobile-top {
    display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 20;
    padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--border); font-weight: 700;
  }
  .mobile-top .brand-mark { width: 28px; height: 28px; }
  .mobile-nav {
    display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--border);
  }
  .mobile-nav a {
    display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; border-radius: 10px;
    color: var(--muted); font-size: 11.5px; font-weight: 600; text-decoration: none; min-width: 0;
  }
  .mobile-nav a svg.i { width: 22px; height: 22px; }
  .mobile-nav a.on { color: var(--accent); background: var(--accent-weak); }
  .only-mobile { display: inline-flex; }
  .page { padding: 20px 16px 32px; }
  .page-head .btn.primary { width: 100%; }
  h1 { font-size: 20px; }

  /* Formularios: 16px evita el zoom automático de iPhone */
  .input, textarea.input, select.input { font-size: 16px; }

  /* Tarjetas de automatizaciones */
  .auto-row { grid-template-columns: auto 1fr auto; grid-template-areas: "sw main menu" "stats stats stats"; gap: 10px 12px; }
  .auto-row > .switch { grid-area: sw; align-self: start; margin-top: 2px; }
  .auto-row > .grow { grid-area: main; }
  .auto-row > .menu-wrap { grid-area: menu; align-self: start; }
  .auto-row > .stats { grid-area: stats; justify-content: space-between; padding-top: 10px; border-top: 1px solid var(--border); }
  .stat { text-align: left; }

  /* Contactos: la tabla pasa a tarjetas */
  .contacts-table thead { display: none; }
  .contacts-table, .contacts-table tbody { display: block; }
  .contacts-table tr {
    display: grid; grid-template-columns: 1fr auto; gap: 8px 10px; padding: 14px 16px; border-bottom: 1px solid var(--border);
  }
  .contacts-table tr:last-child { border-bottom: 0; }
  .contacts-table td { display: block; padding: 0; border: 0; grid-column: 1 / -1; }
  .contacts-table td.c-who { grid-column: 1; }
  .contacts-table td.c-del { grid-column: 2; grid-row: 1; }
  .contacts-table .clip { max-width: none; white-space: normal; }
  .contacts-table td[data-label]::before { content: attr(data-label); display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; margin-bottom: 2px; }

  /* Editor: cabecera en dos filas y panel como hoja inferior */
  .editor { height: auto; min-height: 100vh; display: block; }
  .ed-head { position: sticky; top: 0; z-index: 20; flex-direction: column; align-items: stretch; gap: 8px; padding: 10px 12px; }
  .ed-name { max-width: none; }
  .ed-actions { justify-content: space-between; gap: 8px; }
  .ed-actions .btn { flex: 1; }
  .ed-body { display: block; }
  .canvas { padding: 24px 16px 40px; min-height: calc(100vh - 110px); }
  .panel {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; height: 88vh; border-left: 0;
    border-radius: 16px 16px 0 0; box-shadow: var(--shadow-lg);
    transform: translateY(105%); transition: transform .22s ease; padding-bottom: env(safe-area-inset-bottom);
  }
  .editor.panel-open .panel { transform: none; }
  .panel-head { position: sticky; top: 0; }
  .panel-head::before { content: ""; position: absolute; top: 6px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: var(--border-strong); }
  .panel-close { display: inline-flex; }
  .panel-backdrop { position: fixed; inset: 0; z-index: 44; background: rgba(10, 14, 24, .45); }
  .editor.panel-open .panel-backdrop { display: block; }

  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
  .modal { max-height: calc(100vh - 24px); }
  .overlay { padding: 12px; }
  #toasts { left: 16px; right: 16px; bottom: calc(76px + env(safe-area-inset-bottom)); }
  .toast { max-width: none; }
}
