/* TextTriage Console — "Night Desk" skin
   Dark-first operations console. One color = one meaning:
   ember = needs you (priority), amber = new / paused, mint = live / healthy. */

:root {
  --bg: #0A0E0C;
  --bg-sunk: #0D1310;
  --side: #0C110F;
  --surface: #111815;
  --surface-2: #161F1B;
  --surface-3: #1D2823;
  --line: #202B26;
  --line-2: #2A3731;
  --line-soft: #19221E;

  --text: #EAF0EA;
  --text-2: #A9B5AD;
  --muted: #74827A;

  --ember: #FF6B42;
  --ember-2: #FF8D6B;
  --ember-ink: #2A0D03;
  --ember-wash: rgba(255, 107, 66, 0.11);
  --ember-line: rgba(255, 107, 66, 0.38);

  --amber: #F2B541;
  --amber-wash: rgba(242, 181, 65, 0.11);
  --amber-line: rgba(242, 181, 65, 0.38);

  --live: #57D9A3;
  --live-wash: rgba(87, 217, 163, 0.12);
  --live-line: rgba(87, 217, 163, 0.32);

  --danger: #F0625D;


  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --r-lg: 18px;
  --r: 14px;
  --r-sm: 10px;
  --topbar-h: 64px;
  --tab-h: 62px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 12px 32px -12px rgba(0, 0, 0, 0.6);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(900px 480px at 85% -160px, rgba(87, 217, 163, 0.06), transparent 65%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 400 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
}
body.is-paused {
  background:
    radial-gradient(900px 480px at 85% -160px, rgba(242, 181, 65, 0.07), transparent 65%),
    var(--bg);
}
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
code { font-family: var(--mono); font-size: 0.92em; color: var(--text); background: var(--surface-3); padding: 1px 5px; border-radius: 5px; }
[hidden] { display: none !important; }
.hidden { display: none !important; }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--live); outline-offset: 2px; }

.i {
  width: 18px; height: 18px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- TextTriage logo (artwork + brand colors from the brand files, sprite in index.html) ---------- */
.logo-mark { display: block; flex: none; aspect-ratio: 56 / 53; height: auto; }
.logo-word { display: block; flex: none; aspect-ratio: 313.1 / 61.8; height: auto; }
.side-lockup { display: inline-flex; align-items: center; gap: 10px; }
.logo-side { width: 30px; }
.logo-word-side { width: 112px; }
.logo-top { width: 26px; }
.logo-empty { width: 46px; margin: 0 auto 14px; opacity: .4; filter: grayscale(1); }
.boot-lockup { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.logo-boot { width: 96px; animation: logo-float 2.6s ease-in-out infinite; }
.logo-word-boot { width: 176px; }
@keyframes logo-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* ---------- boot ---------- */
.view.boot {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center; padding: 24px;
  background: var(--bg);
}
body:not([data-state="boot"]) .view.boot { display: none; }
body[data-state="boot"] .shell,
body[data-state="boot"] .tabbar { display: none; }
.boot-inner { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.boot-msg { color: var(--text-2); max-width: 34ch; }
.login { display: flex; flex-direction: column; gap: 14px; width: min(360px, 100%); margin-top: 6px; text-align: left; }
.login-title { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; text-align: center; margin-top: 4px; }
.login .btn { width: 100%; }
.login-status { min-height: 1.4em; font-size: 14px; color: var(--text-2); text-align: center; }
.login-status.ok { color: var(--live); }
.login-status.err { color: var(--amber); }
.login-help { text-align: center; }
body[data-boot="login"] .logo-boot { animation: none; }
body[data-boot="error"] .boot-lockup { filter: grayscale(1); opacity: .55; }
body[data-boot="error"] .logo-boot { animation: none; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 1fr; min-height: 100dvh; }
.main { min-width: 0; display: flex; flex-direction: column; }
.content { width: 100%; max-width: 1160px; padding: 28px 32px 56px; }

.view { display: none; }
.view.active { display: block; animation: viewin .22s ease-out; }
@keyframes viewin { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- sidebar (desktop) ---------- */
.side {
  display: none;
  position: sticky; top: 0; height: 100dvh;
  flex-direction: column; gap: 6px;
  padding: 20px 14px;
  background: var(--side);
  border-right: 1px solid var(--line);
}
.side-brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 22px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav button {
  display: flex; align-items: center; gap: 12px;
  width: 100%; height: 40px; padding: 0 12px;
  border: 0; border-radius: var(--r-sm);
  background: transparent; color: var(--text-2);
  font-size: 14.5px; font-weight: 500; text-align: left;
  transition: background .15s, color .15s;
}
.side-nav button:hover { background: var(--surface); color: var(--text); }
.side-nav button.active { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.side-nav button .i { color: var(--muted); }
.side-nav button.active .i, .side-nav button:hover .i { color: var(--text); }
.navcount {
  margin-left: auto; min-width: 22px; height: 20px; padding: 0 6px;
  display: inline-grid; place-items: center;
  border-radius: 999px; background: var(--ember); color: var(--ember-ink);
  font: 600 11.5px/1 var(--mono);
}
.side-foot { margin-top: auto; padding: 12px; font-size: 12.5px; color: var(--muted); line-height: 1.45; }

/* ---------- topbar ---------- */
.topwrap { position: sticky; top: 0; z-index: 30; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: var(--topbar-h);
  padding: 10px 32px;
  background: rgba(10, 14, 12, 0.82);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-id { display: flex; align-items: center; gap: 10px; min-width: 0; }
.biz { font-weight: 600; font-size: 15px; letter-spacing: -0.005em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* master service control: pill + switch in one big tap target */
.service {
  display: inline-flex; align-items: center; gap: 12px; flex: none;
  min-height: 46px; padding: 6px 6px 6px 16px;
  border-radius: 999px;
  border: 1px solid var(--live-line);
  background: var(--surface);
  transition: border-color .2s, background .2s;
}
.service:hover { background: var(--surface-2); }
.statuspill {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 14px; letter-spacing: 0.01em; color: var(--text);
}
.statuspill::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--live);
  animation: beacon 2.6s ease-out infinite;
}
@keyframes beacon {
  0% { box-shadow: 0 0 0 0 rgba(87, 217, 163, .55); }
  70%, 100% { box-shadow: 0 0 0 7px rgba(87, 217, 163, 0); }
}
.track {
  position: relative; width: 56px; height: 32px; border-radius: 999px;
  background: var(--live); transition: background .2s;
}
.knob {
  position: absolute; top: 3px; left: 27px; width: 26px; height: 26px; border-radius: 50%;
  background: #08100C; box-shadow: 0 1px 3px rgba(0, 0, 0, .4);
  transition: left .22s cubic-bezier(.3, .7, .3, 1), background .2s;
}
.service[aria-pressed="false"] { border-color: var(--amber-line); }
.service[aria-pressed="false"] .statuspill::before { background: var(--amber); animation: none; }
.service[aria-pressed="false"] .track { background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line-2); }
.service[aria-pressed="false"] .knob { left: 3px; background: var(--text-2); }
.service[aria-busy="true"] { opacity: .7; pointer-events: none; }

.pausebar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 32px;
  background: linear-gradient(var(--amber-wash), var(--amber-wash)), var(--bg);
  border-bottom: 1px solid var(--amber-line);
  color: var(--text); font-size: 14px;
}
.pausebar b { color: var(--amber); font-weight: 600; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px;
  border: 1px solid transparent; border-radius: var(--r-sm);
  font-weight: 500; font-size: 14px; line-height: 1; white-space: nowrap;
  text-decoration: none;
  transition: background .15s, border-color .15s, color .15s, transform .08s;
}
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--text); color: var(--bg); }
.btn.primary:hover { background: #fff; }
.btn.ghost { background: transparent; border-color: var(--line-2); color: var(--text); }
.btn.ghost:hover { background: var(--surface-2); border-color: #34433C; }
.btn.light { background: var(--amber); color: #201603; font-weight: 600; }
.btn.light:hover { background: #F7C562; }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn.danger:hover { color: var(--danger); border-color: rgba(240, 98, 93, .45); background: rgba(240, 98, 93, .08); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.iconbtn {
  display: inline-grid; place-items: center; flex: none;
  width: 38px; height: 38px; border-radius: var(--r-sm);
  border: 1px solid var(--line-2); background: transparent; color: var(--text-2);
  transition: background .15s, color .15s;
}
.iconbtn:hover { background: var(--surface-2); color: var(--text); }
.iconbtn.sm { width: 32px; height: 32px; border-radius: 8px; }
.iconbtn.spinning .i { animation: spin .7s linear; }
@keyframes spin { to { transform: rotate(360deg); } }

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.dot.priority { background: var(--ember); }

/* ---------- page headers ---------- */
.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.pagehead h1, .tl-head h1 { font-size: 28px; font-weight: 600; letter-spacing: -0.025em; line-height: 1.15; }
.eyebrow, .card-kicker, .att-kicker {
  font: 500 11.5px/1.2 var(--mono); text-transform: uppercase; letter-spacing: 0.09em; color: var(--muted);
}
.eyebrow { margin-bottom: 8px; }
.lede { margin-top: 8px; color: var(--text-2); max-width: 64ch; }
.count {
  display: inline-grid; place-items: center; vertical-align: middle;
  min-width: 26px; height: 22px; padding: 0 7px; margin-left: 6px;
  border-radius: 999px; background: var(--ember-wash); color: var(--ember-2);
  border: 1px solid var(--ember-line);
  font: 500 12px/1 var(--mono); letter-spacing: 0;
}
.count:empty { display: none; }
.count.neutral { background: var(--surface-3); color: var(--text-2); border-color: var(--line-2); }

/* ---------- cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 22px;
  box-shadow: var(--shadow);
}
.card h2 { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.card-note { color: var(--text-2); font-size: 14px; margin-top: 4px; }

/* ---------- TODAY ---------- */
.attention {
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 24px 24px 14px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.att-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 12px; }
.att-title { font-size: 30px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.15; margin-top: 8px; }
.att-btn { background: var(--surface-3); color: var(--text); border-color: var(--line-2); }
.att-btn:hover { background: #24302A; }
.attention[data-level="priority"] {
  border-color: var(--ember-line);
  background:
    radial-gradient(600px 260px at 0% 0%, rgba(255, 107, 66, 0.18), transparent 70%),
    var(--surface);
}
.attention[data-level="priority"] .att-kicker { color: var(--ember-2); }
.attention[data-level="priority"] .att-btn { background: var(--ember); color: var(--ember-ink); border-color: transparent; font-weight: 600; }
.attention[data-level="priority"] .att-btn:hover { background: var(--ember-2); }
.attention[data-level="new"] .att-kicker { color: var(--amber); }
.attention[data-level="clear"] .att-kicker { color: var(--live); }
.attention[data-level="clear"] { padding-bottom: 24px; }
.attention[data-level="clear"] .att-head { padding-bottom: 0; }

.att-list:empty { display: none; }
.att-row {
  display: grid; grid-template-columns: auto 160px 1fr auto; align-items: center; gap: 14px;
  width: 100%; min-height: 52px; padding: 8px 4px;
  border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left;
  transition: background .15s;
}
.att-row:hover { background: rgba(255, 255, 255, 0.02); }
.att-row .ph { font: 500 14.5px var(--mono); }
.att-row .pv { color: var(--text-2); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att-row .tm { font: 400 12px var(--mono); color: var(--muted); }
.att-more { display: block; padding: 10px 4px 4px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 14px; }
.stat {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  padding: 16px 18px; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  transition: border-color .15s, background .15s;
}
.stat:hover { border-color: var(--line-2); background: var(--surface-2); }
.stat-label { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); font-weight: 500; }
.stat-num { font-size: 40px; line-height: 1; font-weight: 600; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; margin-top: 4px; }
.stat-sub { font-size: 12.5px; color: var(--muted); }
.stat.priority .dot { background: var(--ember); }
.stat.new .dot { background: var(--amber); }
.stat.total .dot { background: var(--text-2); }
.stat.priority.has { border-color: var(--ember-line); }
.stat.priority.has .stat-num { color: var(--ember); }
.stat.new.has .stat-num { color: var(--amber); }

.today-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 12px; }
.today-cards .card { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 20px; }
.today-cards .card .btn { margin-top: auto; }
.svc-state, .digest-summary { font-size: 16px; font-weight: 500; line-height: 1.4; margin-bottom: 10px; }
.install-card { flex-direction: row !important; align-items: center !important; gap: 14px !important; }
.install-card .btn { margin-top: 0 !important; margin-left: auto; }
.install-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--surface-3); color: var(--text); flex: none; }
.install-text { font-size: 14px; color: var(--text-2); margin-top: 4px; }

/* ---------- badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  height: 22px; padding: 0 9px; border-radius: 999px;
  font: 500 10.5px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.08em;
  border: 1px solid var(--line-2); color: var(--text-2); background: var(--surface-3);
}
.badge.priority { background: var(--ember-wash); color: var(--ember-2); border-color: var(--ember-line); }
.badge.new { background: var(--amber-wash); color: var(--amber); border-color: var(--amber-line); }
.badge.done { background: transparent; color: var(--muted); border-color: var(--line-2); }

/* ---------- INBOX ---------- */
.inbox {
  display: grid; grid-template-columns: 1fr;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.tl-pane { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.tl-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 18px 12px; }
.tl-head h1 { font-size: 22px; }
.filters { display: flex; gap: 4px; padding: 0 14px 12px; border-bottom: 1px solid var(--line); }
.filters button {
  height: 32px; padding: 0 12px; border-radius: 8px;
  border: 1px solid transparent; background: transparent; color: var(--text-2);
  font-size: 13px; font-weight: 500;
}
.filters button:hover { color: var(--text); background: var(--surface-2); }
.filters button[aria-pressed="true"] { background: var(--surface-3); border-color: var(--line-2); color: var(--text); }
.filters .n { font-family: var(--mono); font-size: 11.5px; color: var(--muted); margin-left: 5px; }

.threadlist { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.thread {
  position: relative; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px;
  width: 100%; padding: 14px 18px 14px 20px;
  border: 0; border-bottom: 1px solid var(--line-soft);
  background: transparent; text-align: left;
  transition: background .12s;
}
.thread::before {
  content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0;
  background: transparent;
}
.thread.s-priority::before { background: var(--ember); }
.thread.s-new::before { background: var(--amber); }
.thread.s-priority { background: rgba(255, 107, 66, 0.045); }
.thread:hover { background: var(--surface-2); }
.thread.active { background: var(--surface-3); }
.t-phone { font: 500 14.5px var(--mono); letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread.s-done .t-phone { color: var(--text-2); }
.t-time { font: 400 12px var(--mono); color: var(--muted); text-align: right; white-space: nowrap; }
.t-prev {
  color: var(--text-2); font-size: 13.5px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.thread.s-done .t-prev { color: var(--muted); }
.t-badge { align-self: start; justify-self: end; }
.empty { padding: 36px 20px; text-align: center; color: var(--muted); font-size: 14px; }
.empty b { display: block; color: var(--text-2); font-weight: 500; font-size: 15px; margin-bottom: 4px; }

.convo { display: none; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg-sunk); }
.convo-head {
  display: flex; align-items: center; gap: 12px;
  min-height: 68px; padding: 12px 20px;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.convo-id { min-width: 0; flex: 1; }
.convo-id h2 { font: 500 17px var(--mono); letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.convo-id p { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.back { display: none; }
.msgs {
  flex: 1; overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: 10px;
  padding: 22px 24px;
}
.daysep {
  align-self: center; margin: 6px 0;
  font: 500 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.m { max-width: min(78%, 560px); padding: 10px 14px 11px; border-radius: 16px; font-size: 14.5px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.m .who { display: flex; gap: 8px; margin-bottom: 4px; font: 500 10.5px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.m .who time { letter-spacing: .02em; text-transform: none; }
.m.in { align-self: flex-start; background: var(--surface-3); border-bottom-left-radius: 5px; }
.m.out { align-self: flex-end; background: #14251E; border: 1px solid var(--live-line); border-bottom-right-radius: 5px; }
.m.out .who { color: var(--live); justify-content: flex-end; }
.convo-empty { margin: auto; text-align: center; color: var(--muted); font-size: 14px; max-width: 30ch; }

.composer-actions {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 12px 20px; background: var(--surface); border-top: 1px solid var(--line);
}
.callback { flex: none; }

/* ---------- FLOWS ---------- */
.route-order { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.route-order li {
  display: inline-flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 12px 0 5px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  font-size: 13px; color: var(--text-2); font-weight: 500;
}
.route-order li span {
  display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--surface-3); font: 500 11px var(--mono); color: var(--muted);
}
.route-order li.yours { border-color: var(--text); color: var(--text); background: var(--surface-2); }
.route-order li.yours span { background: var(--text); color: var(--bg); }
.route-note { margin: 10px 0 26px; font-size: 13.5px; color: var(--muted); max-width: 70ch; }

.flows-grid { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: start; }
.sechead { display: flex; align-items: center; gap: 4px; margin-bottom: 12px; }
.sechead h2 { font-size: 15px; font-weight: 600; color: var(--text-2); }
.flow-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.flow {
  display: grid; grid-template-columns: auto 1fr auto; gap: 4px 14px;
  padding: 16px 16px 12px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  transition: border-color .15s, opacity .15s;
}
.flow.editing { border-color: var(--live-line); box-shadow: 0 0 0 3px var(--live-wash); }
.f-pos {
  grid-row: span 3; display: grid; place-items: center;
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--surface-3); font: 500 12px var(--mono); color: var(--text-2);
}
.f-name { font-size: 15.5px; font-weight: 600; letter-spacing: -0.01em; align-self: center; }
.f-name .off-tag { margin-left: 8px; font: 500 10.5px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.f-switch { justify-self: end; }
.f-body { grid-column: 2 / -1; }
.f-resp { margin-top: 10px; padding-left: 12px; border-left: 2px solid var(--line-2); color: var(--text-2); font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.f-ops { grid-column: 2 / -1; display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.f-ops .spacer { flex: 1; }
.flow.off .f-name, .flow.off .f-resp, .flow.off .chips { opacity: .55; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chips:empty { display: none; }
.chip {
  display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 6px;
  background: var(--surface-3); border: 1px solid var(--line-2);
  font: 400 12px var(--mono); color: var(--text);
}

/* small switch (flows on/off, digest on/off) */
.switch, input[role="switch"] {
  -webkit-appearance: none; appearance: none;
  position: relative; flex: none; display: inline-block;
  width: 44px; height: 26px; margin: 0; padding: 0; border-radius: 999px;
  border: 0; background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line-2);
  cursor: pointer; transition: background .18s;
}
.switch::after, input[role="switch"]::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--text-2); transition: left .18s cubic-bezier(.3, .7, .3, 1), background .18s;
}
.switch[aria-pressed="true"], input[role="switch"]:checked { background: var(--live); box-shadow: none; }
.switch[aria-pressed="true"]::after, input[role="switch"]:checked::after { left: 21px; background: #08100C; }

.composer { position: sticky; top: 88px; }
.composer h2 { margin-bottom: 16px; }
.composer .field + .field, .composer .chips + .field { margin-top: 14px; }
.composer .chips { margin-top: 10px; }
.composer.editing { border-color: var(--live-line); }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.flabel { font-size: 13px; font-weight: 500; color: var(--text-2); }
.flabel em { font-style: normal; color: var(--muted); font-weight: 400; margin-left: 4px; }
.hint { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.hint.warn { color: var(--amber); }
input[type="text"], input[type="tel"], input[type="url"], input[type="email"], input[type="time"], select, textarea {
  width: 100%; min-height: 42px; padding: 0 12px;
  background: var(--bg-sunk); color: var(--text);
  border: 1px solid var(--line-2); border-radius: var(--r-sm);
  font-size: 15px;
  transition: border-color .15s, box-shadow .15s;
}
textarea { padding: 10px 12px; line-height: 1.45; resize: vertical; min-height: 96px; }
input::placeholder, textarea::placeholder { color: #55625A; }
input:hover, select:hover, textarea:hover { border-color: #36443D; }
input:focus, select:focus, textarea:focus { border-color: var(--live); box-shadow: 0 0 0 3px var(--live-wash); outline: none; }
select {
  -webkit-appearance: none; appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2374827A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 18px;
}
select option { background: var(--surface); color: var(--text); }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.formgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; }
.formgrid .span2 { grid-column: 1 / -1; }
.switchrow {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-top: 18px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.switchrow > span { display: flex; flex-direction: column; gap: 2px; }
.switchrow b { font-weight: 500; }

/* ---------- LISTS ---------- */
.lists-grid { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }
.lc-head { display: flex; align-items: center; gap: 14px; }
.lc-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; flex: none; }
.lc-icon .i { width: 20px; height: 20px; }
.listcard.ignore .lc-icon { background: var(--surface-3); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.listcard.vip .lc-icon { background: var(--ember-wash); color: var(--ember); box-shadow: inset 0 0 0 1px var(--ember-line); }
.lc-head h2 { font-size: 18px; }
.lc-count { font: 400 12px var(--mono); color: var(--muted); margin-top: 2px; }
.effects { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 18px 0 12px; }
.effects > div { background: var(--bg-sunk); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; }
.effects dt { font: 500 10.5px var(--mono); text-transform: uppercase; letter-spacing: .09em; color: var(--muted); }
.effects dd { margin: 5px 0 0; font-size: 14px; line-height: 1.4; }
.lc-use { font-size: 13.5px; color: var(--text-2); }
.addrow { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; margin-top: 18px; }
.importrow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.filebtn {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  min-height: 36px; padding: 0 12px; border-radius: 9px;
  border: 1px dashed #3A4841; color: var(--text); font-size: 13px; font-weight: 500; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.filebtn:hover { background: var(--surface-2); border-color: #4A5A52; }
.filebtn input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.filebtn:focus-within { outline: 2px solid var(--live); outline-offset: 2px; }
.numlist { margin-top: 18px; border-top: 1px solid var(--line); }
.numrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--line-soft); }
.numrow .n { font-size: 14.5px; font-weight: 500; }
.numrow .p { font: 400 12.5px var(--mono); color: var(--muted); margin-top: 1px; }
.numlist .empty { padding: 22px 0 6px; text-align: left; }

/* ---------- SETTINGS ---------- */
.settings-grid { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }
.history { margin-top: 12px; }
.quiet-summary { color: var(--text); font-weight: 500; }
.qh-tz { margin-top: 10px; }
input[type="time"]:disabled { opacity: .45; cursor: not-allowed; }
input[type="time"]::-webkit-calendar-picker-indicator { filter: invert(.7); }
.h-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.h-row:last-child { border-bottom: 0; }
.h-row .d { font-family: var(--mono); font-size: 13px; }
.h-row .d span { color: var(--muted); margin-left: 8px; }
.h-row .c { font: 400 12.5px var(--mono); color: var(--text-2); }
.history .empty { padding: 12px 0 0; text-align: left; }
.form-actions.start { justify-content: flex-start; margin-top: 16px; }
.newlink {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  margin-top: 16px; padding: 14px; border-radius: var(--r-sm);
  background: var(--live-wash); border: 1px solid var(--live-line);
}
.newlink code { display: block; width: 100%; padding: 8px 10px; background: var(--bg-sunk); word-break: break-all; font-size: 12.5px; }

/* ---------- briefs ---------- */
.briefs-grid { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }
.brief-list { display: flex; flex-direction: column; gap: 10px; }
.brief { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.brief-head {
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 12px;
  width: 100%; min-height: 56px; padding: 12px 16px; border: 0; background: transparent; text-align: left;
}
.brief-head:hover { background: var(--surface-2); }
.b-when { font: 500 13px var(--mono); white-space: nowrap; }
.b-when span { color: var(--muted); margin-left: 6px; }
.b-sub { color: var(--text-2); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brief-head .i { color: var(--muted); transition: transform .2s; }
.brief-head[aria-expanded="true"] .i { transform: rotate(180deg); }
.brief-body { padding: 0 16px 16px; border-top: 1px solid var(--line); }
.brief-text { margin: 14px 0 0; padding: 14px; border-radius: var(--r-sm); background: var(--bg-sunk); border: 1px solid var(--line);
  white-space: pre-wrap; overflow-wrap: anywhere; font: 400 13px/1.55 var(--mono); color: var(--text); max-height: 420px; overflow-y: auto; }
.brief-missing { margin-top: 14px; color: var(--muted); font-size: 14px; }
.brief-actions { display: flex; gap: 8px; margin-top: 12px; }
.brief-send { margin-top: 14px; padding: 14px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--surface-2); display: flex; flex-direction: column; gap: 12px; }
.grp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.grp-chip { min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--text-2); font-size: 13px; font-weight: 500; }
.grp-chip[aria-pressed="true"] { background: var(--live-wash); border-color: var(--live-line); color: var(--text); }
.send-results { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; }
.send-results li { display: flex; gap: 8px; align-items: baseline; }
.send-results .ok { color: var(--live); }
.send-results .fail { color: var(--danger); }
.send-results code { background: none; padding: 0; }
.group-list { list-style: none; margin: 14px 0 0; padding: 0; }
.group-list:empty { display: none; }
.group-list li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.group-list .g-name { font-weight: 500; }
.group-list .g-meta { font: 400 12px var(--mono); color: var(--muted); }
.group-list .grow { flex: 1; min-width: 0; }
.group-form { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.group-form-title { margin: 0; }
.groups-card.editing { border-color: var(--live-line); }

/* ---------- setup wizard ---------- */
.setup { position: fixed; inset: 0; z-index: 150; overflow-y: auto; background:
  radial-gradient(900px 480px at 85% -160px, rgba(87, 217, 163, 0.06), transparent 65%), var(--bg); }
body.in-setup .shell, body.in-setup .tabbar { display: none; }
.setup-inner { max-width: 760px; margin: 0 auto; padding: calc(24px + env(safe-area-inset-top)) 24px 64px; }
.setup-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.setup-later, .setup-skip { border: 0; background: none; padding: 10px 4px; color: var(--text-2); font-size: 14px; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
.setup-later:hover, .setup-skip:hover { color: var(--text); }
.setup-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.setup-steps button {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 40px; padding: 6px 8px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface);
  color: var(--muted); font-size: 12.5px; font-weight: 500; text-align: left;
}
.setup-steps button:disabled { cursor: default; }
.setup-steps .n { display: inline-grid; place-items: center; width: 22px; height: 22px; flex: none; border-radius: 50%; background: var(--surface-3); font: 500 11px var(--mono); }
.setup-steps .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.setup-steps li.done button { color: var(--text-2); }
.setup-steps li.done .n { background: var(--live-wash); color: var(--live); }
.setup-steps li.current button { border-color: var(--text); color: var(--text); background: var(--surface-2); }
.setup-steps li.current .n { background: var(--text); color: var(--bg); }
.setup-bar { height: 3px; margin: 14px 0 0; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.setup-bar i { display: block; height: 100%; width: 0; background: var(--live); transition: width .3s ease; }
.setup-count { margin: 18px 0 10px; }
.setup-panel h1 { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.setup-panel .lede { margin-bottom: 4px; }
.setup-actions { display: flex; align-items: center; gap: 10px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.setup-actions .grow { flex: 1; }
.setup-example { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 18px 0 2px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--bg-sunk); border: 1px solid var(--line); }
.setup-example .chips, .setup-example .chip { margin: 0; }
.ex-arrow { color: var(--muted); }
.ex-reply { font-size: 13.5px; color: var(--text-2); }
.setup-made { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.setup-made:empty { display: none; }
.setup-made li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--live-wash); border: 1px solid var(--live-line); font-size: 14px; }
.setup-made li .i { color: var(--live); }
.setup-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0 16px; }
.choice { display: flex; gap: 10px; align-items: flex-start; padding: 14px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--bg-sunk); cursor: pointer; font-size: 13.5px; color: var(--text-2); line-height: 1.45; }
.choice b { display: block; color: var(--text); font-size: 14.5px; margin-bottom: 2px; }
.choice input { margin-top: 3px; accent-color: var(--live); width: 16px; height: 16px; flex: none; }
.choice:has(input:checked) { border-color: var(--live-line); box-shadow: 0 0 0 3px var(--live-wash); }
.setup-result { margin-top: 12px; font-size: 14px; color: var(--text-2); min-height: 1em; }
.setup-result b { color: var(--live); }
.setup-result .warn { color: var(--amber); }
.setup-summary { margin: 20px 0 0; display: grid; grid-template-columns: max-content 1fr; gap: 12px 20px; }
.setup-summary dt { font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .09em; color: var(--muted); padding-top: 3px; }
.setup-summary dd { margin: 0; font-size: 14.5px; }
.setup-summary dd.off { color: var(--muted); }
.setup-card { border-color: var(--live-line); }

/* ---------- toasts ---------- */
.toasts {
  position: fixed; right: 24px; bottom: 24px; z-index: 300;
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px; pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex; align-items: center; gap: 14px;
  max-width: 420px; padding: 12px 14px 12px 16px;
  background: #1F2A25; color: var(--text);
  border: 1px solid #33423B; border-radius: 12px;
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .7);
  font-size: 14px; line-height: 1.4;
  animation: toastin .22s cubic-bezier(.2, .7, .3, 1);
  transition: opacity .3s, transform .3s;
}
.toast b { font-weight: 600; }
.toast.out { opacity: 0; transform: translateY(6px); }
.toast .tact { flex: none; border: 0; background: none; padding: 4px 2px; color: var(--live); font-weight: 600; font-size: 13.5px; }
.toast.err { border-color: rgba(240, 98, 93, .5); }
@keyframes toastin { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------- phone tab bar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: grid; grid-template-columns: repeat(6, 1fr);
  height: calc(var(--tab-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(12, 17, 15, 0.9);
  -webkit-backdrop-filter: saturate(140%) blur(16px);
  backdrop-filter: saturate(140%) blur(16px);
  border-top: 1px solid var(--line);
}
.tabbar button {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 44px; border: 0; background: none; color: var(--muted);
  font-size: 11px; font-weight: 500; letter-spacing: .01em;
}
.tabbar button .i { width: 22px; height: 22px; }
.tabbar button.active { color: var(--text); }
.tabbar button.active::before {
  content: ""; position: absolute; top: -1px; left: 30%; right: 30%; height: 2px; border-radius: 0 0 2px 2px; background: var(--text);
}
.tabicon { position: relative; display: inline-flex; }
.navbadge {
  position: absolute; top: -5px; left: 14px;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  display: grid; place-items: center;
  background: var(--ember); color: var(--ember-ink);
  font: 600 10.5px/1 var(--mono);
  box-shadow: 0 0 0 2px var(--bg);
}

/* =================================================================
   DESKTOP ≥ 860px
   ================================================================= */
@media (min-width: 860px) {
  .shell { grid-template-columns: 248px minmax(0, 1fr); }
  .side { display: flex; }
  .tabbar { display: none; }
  .only-phone { display: none !important; }

  /* the main column scrolls independently so the inbox can be a fixed-height workspace */
  .main { height: 100dvh; }
  .content { flex: 1; overflow-y: auto; margin: 0 auto; max-width: none; }
  .content > .view { max-width: 1120px; margin: 0 auto; }

  .content.inbox-mode { overflow: hidden; display: flex; flex-direction: column; padding-bottom: 28px; }
  .content.inbox-mode > .view-inbox.active { flex: 1; min-height: 0; width: 100%; display: flex; }
  .inbox { flex: 1; min-height: 0; grid-template-columns: 340px minmax(0, 1fr); }
  .tl-pane { border-right: 1px solid var(--line); }
  .convo { display: flex; }

  .flows-grid { grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; }
  .composer { top: 0; }
  .lists-grid { grid-template-columns: 1fr 1fr; }
  body[data-view="inbox"] .toasts { bottom: 96px; right: 40px; }
  .settings-grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
  .settings-grid > :first-child { grid-row: span 4; }
  .briefs-grid { grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; }
  .groups-card { position: sticky; top: 0; }
}

@media (min-width: 1200px) {
  .inbox { grid-template-columns: 380px minmax(0, 1fr); }
}

/* =================================================================
   PHONE < 860px
   ================================================================= */
@media (max-width: 859px) {
  .setup-inner { padding: calc(16px + env(safe-area-inset-top)) 16px 40px; }
  .brief-head { grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 4px 10px; }
  .brief-head .b-sub { grid-column: 1 / -1; grid-row: 2; white-space: normal; }
  .brief-head .badge { grid-column: 2; grid-row: 1; }
  .brief-head .i { display: none; }
  .tabbar button { font-size: 10.5px; }
  .setup-steps { grid-template-columns: repeat(6, 1fr); gap: 4px; }
  .setup-steps .t { display: none; }
  .setup-steps button { justify-content: center; padding: 6px 0; min-height: 44px; }
  .setup-panel h1 { font-size: 22px; }
  .setup-choice { grid-template-columns: 1fr; }
  .setup-actions { flex-wrap: wrap; }
  .setup-actions .btn.primary { flex: 1 1 100%; order: 3; }
  .topbar {
    padding: calc(8px + env(safe-area-inset-top)) 16px 8px;
    min-height: calc(60px + env(safe-area-inset-top));
  }
  .biz { font-size: 15px; }
  .pausebar { padding: 10px 16px; font-size: 13.5px; }
  .content { padding: 20px 16px calc(var(--tab-h) + env(safe-area-inset-bottom) + 28px); }

  .pagehead { align-items: flex-start; flex-direction: column; gap: 14px; margin-bottom: 18px; }
  .pagehead h1, .tl-head h1 { font-size: 26px; }

  .btn { min-height: 44px; }
  .btn.sm { min-height: 40px; }
  .iconbtn { width: 44px; height: 44px; }
  .iconbtn.sm { width: 40px; height: 40px; }
  input[type="text"], input[type="tel"], input[type="url"], input[type="email"], input[type="time"], select, textarea { min-height: 46px; font-size: 16px; }

  .attention { padding: 20px 18px 10px; }
  .attention[data-level="clear"] { padding-bottom: 20px; }
  .att-head { flex-direction: column; gap: 14px; }
  .att-btn { width: 100%; }
  .att-title { font-size: 26px; }
  .att-row { grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; gap: 2px 12px; padding: 10px 2px; }
  .att-row .dot { grid-row: span 2; }
  .att-row .pv { grid-column: 2 / -1; grid-row: 2; }
  .att-row .tm { grid-column: 3; grid-row: 1; }

  .stats { gap: 8px; }
  .stat { padding: 14px; }
  .stat-num { font-size: 30px; }
  .stat-sub { display: none; }

  /* inbox: list first, conversation slides over as a full screen */
  .inbox { background: transparent; border: 0; border-radius: 0; box-shadow: none; overflow: visible; margin: -4px -16px 0; }
  .tl-head { padding: 4px 16px 12px; }
  .filters { padding: 0 12px 12px; overflow-x: auto; }
  .filters button { height: 40px; padding: 0 14px; }
  .thread { padding: 14px 16px 14px 18px; }
  .threadlist { overflow: visible; }

  .convo {
    position: fixed; inset: 0; z-index: 60;
    padding-top: env(safe-area-inset-top);
    background: var(--bg-sunk);
  }
  .inbox.reading .convo { display: flex; animation: slidein .24s cubic-bezier(.2, .7, .3, 1); }
  @keyframes slidein { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
  .convo-head { padding: 8px 12px; gap: 8px; }
  .back { display: inline-grid; border: 0; }
  .callback span { display: none; }
  .callback { width: 44px; padding: 0; }
  .msgs { padding: 18px 14px; }
  .m { max-width: 86%; }
  .composer-actions { padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); }
  .composer-actions .btn { flex: 1; }

  .route-order { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; }
  .route-order::-webkit-scrollbar { display: none; }
  .route-order li { flex: none; }
  .route-note { margin-bottom: 20px; }
  .composer { position: static; }
  .flow { padding: 14px 14px 10px; gap: 4px 12px; }

  .card { padding: 18px; }
  .effects { grid-template-columns: 1fr; }
  .addrow { grid-template-columns: 1fr 1fr; }
  .addrow .btn { grid-column: 1 / -1; }
  .formgrid { grid-template-columns: 1fr; }
  .form-actions .btn { flex: 1; }

  .toasts { left: 16px; right: 16px; bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 12px); align-items: stretch; }
  .toast { max-width: none; }
  body.reading .toasts { bottom: calc(76px + env(safe-area-inset-bottom)); }
}

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