/* Pulse — кнопка «Поддержка» и окно переписки клиента (SU.4 — кабинет, SU.5 — гость на главных); поведение —
   assets/js/support-chat.js. Поверх tokens.css и site.css (кнопки, ссылки, sr-only, окно о cookie); cabinet.css окну
   не нужен: на главной его нет, поэтому поле, тень окна и тусклая трасса — свои роли ниже, в трёх блоках тем, теми же
   значениями, что у кабинета. Новых цветов нет.
   Кнопка — из материала острова навигации (стекло), а не яркий шар: на главной она не спорит с анимацией знака и с
   «Попробовать бесплатно». Приметная деталь — линия пульса под шапкой окна: пришёл ответ — по ней пробегает комета. */

:root, [data-theme="dark"] {
  --sc-in: var(--surface-2);
  --sc-feed: var(--bg-alt);
  --sc-input: #0B0F22;
  --sc-shadow: 0 0 0 1px rgba(125, 149, 255, .16), 0 50px 120px -30px rgba(0, 0, 0, .85);
  --sc-tl: rgba(125, 149, 255, .22);
}
[data-theme="light"] {
  --sc-in: var(--surface);
  --sc-input: #FFFFFF;
  --sc-shadow: 0 0 0 1px rgba(10, 15, 36, .08), 0 50px 120px -40px rgba(16, 26, 77, .45);
  --sc-tl: rgba(10, 15, 36, .16);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --sc-in: var(--surface);
    --sc-input: #FFFFFF;
    --sc-shadow: 0 0 0 1px rgba(10, 15, 36, .08), 0 50px 120px -40px rgba(16, 26, 77, .45);
    --sc-tl: rgba(10, 15, 36, .16);
  }
}
:root { --sc-r: 20px; --sc-b: calc(20px + env(safe-area-inset-bottom)); --sc-fab-h: 50px; }

.sc[hidden] { display: none; }
/* Кнопка не закрывает поле, куда пришёл фокус: прокрутка оставляет место над ней. */
html.sc-on { scroll-padding-bottom: calc(var(--sc-fab-h) + 40px); }
/* Конец страницы: подвал главной и кабинета оставляет под собой место для кнопки — его ссылки и текст не уходят под
   неё (проверка — tools/foot_check.py). */
html.sc-on .footer, html.sc-on .cab-foot { padding-bottom: calc(var(--sc-b) + var(--sc-fab-h) + 16px); }
html.sc-lock, html.sc-lock body { overflow: hidden; }

/* ---- кнопка «Поддержка» ------------------------------------------------------------------------- */
.sc-fab { all: unset; box-sizing: border-box; position: fixed; right: var(--sc-r); bottom: var(--sc-b); z-index: 58; display: inline-flex; align-items: center; gap: 10px;
  height: var(--sc-fab-h); padding: 0 20px 0 16px; border-radius: var(--radius-pill); cursor: pointer; font: 600 15px/1 var(--font-text); letter-spacing: -.005em;
  color: var(--text); background: var(--nav-bg); backdrop-filter: blur(18px) saturate(150%); -webkit-backdrop-filter: blur(18px) saturate(150%);
  box-shadow: inset 0 0 0 1px var(--nav-ring), var(--shadow); transform: translateY(calc(-1 * var(--sc-lift, 0px)));
  transition: transform .45s var(--ease-out), background-color .2s var(--ease-ui), opacity .25s var(--ease-ui), visibility 0s linear 0s; }
.sc-fab:hover { background: color-mix(in srgb, var(--accent) 16%, var(--nav-bg)); }
.sc-fab:active { transform: translateY(calc(-1 * var(--sc-lift, 0px))) scale(.97); transition-duration: .12s; }
.sc-fab:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.sc-fab .ic { width: 21px; height: 21px; color: var(--accent-text); }
.sc-fab .sc-fab-x { display: none; }
.sc-fab[aria-expanded="true"] .sc-fab-ic { display: none; }
.sc-fab[aria-expanded="true"] .sc-fab-x { display: block; }
.sc-fab.has-new { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent-text) 55%, var(--nav-ring)), var(--shadow); }
/* Окно о cookie открыто, а кнопке не хватает места рядом (телефон) — кнопка ждёт выбора, не лезет на окно. */
.sc-fab.is-away, .sc-peek.is-away { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .2s var(--ease-ui), visibility 0s linear .2s, transform .45s var(--ease-out); }
.sc-badge { position: absolute; top: -7px; right: -5px; display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px;
  font: 600 11.5px/1 var(--font-mono); font-style: normal; font-variant-numeric: tabular-nums; color: var(--on-accent); background: var(--accent);
  box-shadow: 0 0 0 2.5px var(--bg); }
.sc-badge[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) {
  /* На главной кнопка входит после вступления знака (как стрелка «дальше»), а не вместе с ним. */
  .sc.is-home .sc-fab { animation: sc-rise .7s var(--ease-out) 1.9s both; }
  .sc-badge.is-beat { animation: sc-beat .9s var(--ease-out); }
}
@keyframes sc-rise { from { opacity: 0; translate: 0 14px; } }
@keyframes sc-beat { 0% { transform: scale(1); } 22% { transform: scale(1.28); } 44% { transform: scale(.94); } 70%, 100% { transform: scale(1); } }

/* ---- превью ответа над кнопкой, пока окно закрыто --------------------------------------------------- */
.sc-peek { position: fixed; right: var(--sc-r); bottom: calc(var(--sc-b) + var(--sc-fab-h) + 12px); z-index: 58; width: min(328px, calc(100vw - 32px));
  display: grid; grid-template-columns: minmax(0, 1fr) auto; border-radius: 20px; background: var(--surface); box-shadow: var(--sc-shadow);
  transform: translateY(calc(-1 * var(--sc-lift, 0px))); transition: transform .45s var(--ease-out), opacity .25s var(--ease-ui); }
.sc-peek[hidden] { display: none; }
.sc-peek-go { all: unset; box-sizing: border-box; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 2px 12px; padding: 14px 4px 14px 14px; cursor: pointer; border-radius: 20px 0 0 20px; }
.sc-peek-go:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.sc-peek-go img { grid-row: span 2; width: 34px; height: 34px; border-radius: 10px; }
.sc-peek-go b { font: 600 13.5px/1.3 var(--font-text); color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-peek-go span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; font-size: 14px; line-height: 1.45; color: var(--text-2); overflow-wrap: anywhere; }
.sc-peek-x { all: unset; box-sizing: border-box; display: grid; place-items: center; width: 44px; height: 44px; margin: 4px 4px 0 0; border-radius: 12px; cursor: pointer; color: var(--text-3); }
.sc-peek-x:hover { color: var(--text); background: var(--accent-soft); }
.sc-peek-x:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.sc-peek-x .ic { width: 15px; height: 15px; }
@media (prefers-reduced-motion: no-preference) {
  .sc-peek.is-in { animation: sc-pop .38s var(--ease-out) both; transform-origin: 100% 100%; }
  /* На главной непрочитанный ответ показывается после кнопки, а не поверх вступления знака. */
  .sc.is-home .sc-peek:not(.is-in) { animation: sc-rise .7s var(--ease-out) 2.3s both; }
}
@keyframes sc-pop { from { opacity: 0; scale: .96; translate: 0 8px; } }

/* ---- окно ------------------------------------------------------------------------------------------ */
.sc-win { position: fixed; right: var(--sc-r); bottom: calc(var(--sc-b) + var(--sc-fab-h) + 12px + var(--sc-lift, 0px)); z-index: 72; width: 392px;
  height: min(640px, calc(100svh - var(--sc-b) - var(--sc-fab-h) - 12px - var(--sc-lift, 0px) - 84px)); min-height: 0;
  display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr); border-radius: var(--radius-card); background: var(--surface); box-shadow: var(--sc-shadow);
  overflow: hidden; isolation: isolate; transform-origin: 100% 100%;
  opacity: 0; transform: translateY(10px) scale(.97); visibility: hidden; pointer-events: none;
  transition: opacity .16s var(--ease-ui), transform .2s var(--ease-ui), visibility 0s linear .2s; }
.sc-win.is-open { opacity: 1; transform: none; visibility: visible; pointer-events: auto;
  transition: opacity .2s var(--ease-ui), transform .34s var(--ease-out), visibility 0s; }
/* Строки окна — явно: скрытая полоса сбоя не сдвигает ленту и поле ввода в чужие строки. */
.sc-win > .sc-head { grid-row: 1; } .sc-win > .sc-banner { grid-row: 2; } .sc-win > .sc-scroll { grid-row: 3; } .sc-win > .sc-comp { grid-row: 4; }

.sc-head { position: relative; z-index: 2; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "av who x"; align-items: center;
  gap: 12px; padding: 16px 12px 18px 18px; background: var(--surface); }
.sc-head .sc-back { grid-area: back; display: none; }
.sc-av { grid-area: av; display: block; width: 40px; height: 40px; border-radius: 12px; box-shadow: 0 12px 26px -14px rgba(47, 73, 255, .7); }
.sc-who { grid-area: who; min-width: 0; }
.sc-who h2 { margin: 0; font: 700 15.5px/1.2 var(--font-display); letter-spacing: -.02em; color: var(--text); outline: none; }
.sc-who p { margin: 4px 0 0; font-size: 12.5px; line-height: 1.35; color: var(--text-3); text-wrap: pretty; }
.sc-x { grid-area: x; }
.sc-ib { all: unset; box-sizing: border-box; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; cursor: pointer; color: var(--text-3);
  transition: color .2s var(--ease-ui), background-color .2s var(--ease-ui); }
.sc-ib:hover { color: var(--text); background: var(--accent-soft); }
.sc-ib:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.sc-ib .ic { width: 19px; height: 19px; }

/* Линия пульса: тонкая трасса по нижнему краю шапки, импульс — под значком команды. */
.sc-trace { position: absolute; left: 0; right: 0; bottom: -9px; width: 100%; height: 18px; overflow: visible; pointer-events: none; }
.sc-trace path { fill: none; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.sc-trace .t-dim { stroke: var(--sc-tl); stroke-width: 1.5; }
.sc-trace .t-hot { stroke: var(--trace); stroke-width: 2; stroke-dasharray: 70 1100; stroke-dashoffset: 70; opacity: 0; filter: drop-shadow(var(--glow)); }
@media (prefers-reduced-motion: no-preference) {
  .sc-trace.is-beat .t-hot { animation: sc-comet 1.5s var(--ease-ui); }
}
@keyframes sc-comet { 0%, 86% { opacity: 1; } 0% { stroke-dashoffset: 70; } 100% { opacity: 0; stroke-dashoffset: -1000; } }

.sc-banner { display: flex; align-items: flex-start; gap: 9px; margin: 0; padding: 16px 16px 10px; font-size: 13px; line-height: 1.45; color: var(--text-2);
  background: color-mix(in srgb, var(--demo) 9%, var(--surface)); box-shadow: inset 0 -1px 0 color-mix(in srgb, var(--demo) 30%, transparent); }
.sc-banner[hidden] { display: none; }
.sc-banner .ic { flex: none; width: 16px; height: 16px; margin-top: 1px; color: var(--demo); }

.sc-scroll { position: relative; min-height: 0; overflow-y: auto; overscroll-behavior: contain; background: var(--sc-feed); scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent; outline: none; }
.sc-feed { display: flex; flex-direction: column; min-height: 100%; margin: 0; padding: 18px 14px 14px; box-sizing: border-box; }

/* Сообщения: свои — справа заливкой бренда, команды — слева, подпись над первым, время под последним в группе. */
.sc-grp { display: flex; flex-direction: column; gap: 3px; max-width: 86%; margin-top: 12px; }
.sc-grp:first-child { margin-top: 0; }
.sc-grp.is-me { align-self: flex-end; align-items: flex-end; }
.sc-grp.is-team { align-self: flex-start; align-items: flex-start; }
.sc-gh { display: flex; align-items: center; gap: 8px; margin: 0 0 3px 2px; font-size: 12.5px; line-height: 1.3; color: var(--text-3); }
.sc-gh img { width: 22px; height: 22px; border-radius: 7px; }
.sc-gh b { font-weight: 600; color: var(--text-2); }
.sc-b { max-width: 100%; box-sizing: border-box; padding: 9px 13px 10px; border-radius: 18px; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; white-space: pre-line; }
.is-me .sc-b { color: var(--on-accent); background: var(--accent); }
.is-team .sc-b { color: var(--text); background: var(--sc-in); box-shadow: inset 0 0 0 1px var(--line); }
.is-me .sc-b.is-tail { border-bottom-right-radius: 6px; }
.is-team .sc-b.is-tail { border-bottom-left-radius: 6px; }
.sc-b.is-sending { opacity: .62; }
.sc-b.is-fail { color: var(--text); background: color-mix(in srgb, var(--down) 7%, transparent); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--down) 55%, transparent); }
.sc-b ul { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; white-space: normal; }
.sc-b li { display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: 6px; }
.sc-b li::before { content: ""; width: 8px; height: 2px; margin-top: .72em; border-radius: 1px; background: var(--accent-text); }
.sc-b p + p { margin-top: 8px; }
.sc-b .sc-note { display: flex; gap: 7px; margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--line); font-size: 13.5px; line-height: 1.45; color: var(--text-3); }
.sc-b .sc-note .ic { flex: none; width: 15px; height: 15px; margin-top: 2px; color: var(--accent-text); }
.sc-meta { display: flex; align-items: center; gap: 5px; margin: 2px 4px 0; font: 500 11px/1.3 var(--font-mono); font-variant-numeric: tabular-nums; color: var(--text-3); }
.sc-meta .ic { width: 13px; height: 13px; }
/* Не отправлено: причина — строкой, под ней «Повторить» и «Изменить»; текст остаётся в пузыре. */
.sc-fail { display: grid; justify-items: end; gap: 0; margin: 5px 2px 0; font-size: 13px; line-height: 1.4; color: var(--down); text-align: right; text-wrap: pretty; }
.sc-fail .ic { display: inline-block; width: 14px; height: 14px; margin-right: 6px; vertical-align: -2px; }
.sc-fail-act { display: flex; gap: 8px; }
/* Цель касания «Повторить» и «Изменить» — 44 px в высоту при тексте 13 px. */
.sc-fail .link { min-height: 44px; padding: 0 6px; font-size: 13px; }
/* Почта в отказе заблокированной беседе (SU.11): ссылка в строке текста — цвет причины, подчёркнута. */
.sc-fail a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.sc-day { align-self: center; margin: 16px 0 2px; font: 500 10.5px/1 var(--font-mono); font-stretch: 112.5%; letter-spacing: .16em; text-transform: uppercase; color: var(--text-3); }
.sc-day:first-child { margin-top: 2px; }
.sc-newdiv { display: flex; align-items: center; gap: 10px; margin: 14px 0 0; font: 500 10.5px/1 var(--font-mono); font-stretch: 112.5%; letter-spacing: .16em;
  text-transform: uppercase; color: var(--accent-text); }
.sc-newdiv::before, .sc-newdiv::after { content: ""; flex: 1 1 auto; height: 1px; background: color-mix(in srgb, var(--accent-text) 45%, transparent); }
@media (prefers-reduced-motion: no-preference) {
  .sc-grp.is-fresh { animation: sc-msg .42s var(--ease-out) both; }
}
@keyframes sc-msg { from { opacity: 0; translate: 0 8px; } }
/* SU.17: «Поддержка печатает…» — пузырь с тремя точками в конце ленты, как «печатает…» клиента в «Переписке». */
.sc-dots { display: inline-flex; gap: 4px; padding: 8px 2px; vertical-align: top; }
.sc-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); }
@media (prefers-reduced-motion: no-preference) {
  .sc-dots i { animation: sc-blink 1.2s var(--ease-ui) infinite; }
  .sc-dots i:nth-child(2) { animation-delay: .15s; }
  .sc-dots i:nth-child(3) { animation-delay: .3s; }
}
@keyframes sc-blink { 0%, 60%, 100% { opacity: .3; transform: none; } 30% { opacity: 1; transform: translateY(-2px); } }

/* Начало беседы: приветствие команды — первым «сообщением», у гостя под ним — имя и почта по желанию. */
.sc-guest { align-self: stretch; margin-top: 12px; padding: 14px 14px 12px; border-radius: 18px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.sc-guest-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.sc-guest-h b { font: 600 14px/1.3 var(--font-text); color: var(--text); }
.sc-guest-h span { font: 500 10px/1 var(--font-mono); font-stretch: 112.5%; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }
.sc-guest-f { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.sc-guest-f label { display: grid; gap: 5px; min-width: 0; font-size: 12.5px; color: var(--text-3); }
/* Поле — как .input кабинета (на главной его стилей нет): 16 px текста, иначе iOS увеличивает страницу при фокусе. */
.sc-in { box-sizing: border-box; width: 100%; height: 44px; min-width: 0; margin: 0; padding: 0 12px; border: 0; border-radius: 12px; outline: none;
  font: 400 16px var(--font-text); color: var(--text); background: var(--sc-input); box-shadow: inset 0 0 0 1px var(--line-strong);
  transition: box-shadow .2s var(--ease-ui); }
.sc-in::placeholder { color: var(--text-3); opacity: .8; }
.sc-in:hover { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent-text) 45%, var(--line-strong)); }
.sc-in:focus { box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 0 4px color-mix(in srgb, var(--focus) 26%, transparent); }
.sc-in[aria-invalid="true"] { box-shadow: inset 0 0 0 1.5px var(--down), 0 0 0 4px color-mix(in srgb, var(--down) 18%, transparent); }
.sc-err { margin-top: 6px; font-size: 12.5px; line-height: 1.4; color: var(--down); }
.sc-err[hidden] { display: none; }
.sc-guest-why { margin-top: 9px; font-size: 12.5px; line-height: 1.45; color: var(--text-3); text-wrap: pretty; }

/* Вошедший на главной: переписка — в кабинете. */
.sc-signed { margin: auto 0; display: grid; justify-items: center; gap: 10px; padding: 18px 10px 24px; text-align: center; }
.sc-signed > .ic { width: 32px; height: 32px; padding: 12px; box-sizing: content-box; border-radius: 16px; color: var(--accent-text); background: var(--accent-soft); }
.sc-signed b { font: 700 17px/1.25 var(--font-display); letter-spacing: -.02em; color: var(--text); }
.sc-signed p { max-width: 30ch; font-size: 14.5px; line-height: 1.5; color: var(--text-2); text-wrap: pretty; }
.sc-signed .btn { --h: 44px; margin-top: 6px; }

.sc-jump { position: sticky; bottom: 4px; align-self: center; z-index: 1; display: inline-flex; align-items: center; gap: 6px; height: 44px; margin-top: 10px; padding: 0 16px;
  border: 0; border-radius: var(--radius-pill); cursor: pointer; font: 500 13px var(--font-text); color: var(--on-accent); background: var(--accent); box-shadow: var(--shadow); }
.sc-jump .ic { width: 15px; height: 15px; }
.sc-jump:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ---- поле ввода ------------------------------------------------------------------------------------ */
.sc-comp { position: relative; margin: 0; padding: 10px 12px 12px; background: var(--surface); box-shadow: inset 0 1px 0 var(--line); }
.sc-comp[hidden] { display: none; }
.sc-cerr { display: flex; gap: 9px; margin: 0 2px 10px; font-size: 13px; line-height: 1.45; color: var(--down); }
.sc-cerr[hidden] { display: none; }
.sc-cerr .ic { flex: none; width: 16px; height: 16px; margin-top: 1px; }
.sc-field { display: flex; align-items: flex-end; gap: 6px; padding: 4px 4px 4px 14px; border-radius: 18px; background: var(--sc-input);
  box-shadow: inset 0 0 0 1px var(--line-strong); transition: box-shadow .2s var(--ease-ui); }
.sc-field:hover { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent-text) 45%, var(--line-strong)); }
.sc-field:focus-within { box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 0 4px color-mix(in srgb, var(--focus) 22%, transparent); }
.sc-field.is-warn { box-shadow: inset 0 0 0 1.5px var(--demo), 0 0 0 4px color-mix(in srgb, var(--demo) 18%, transparent); }
.sc-ta { flex: 1 1 auto; box-sizing: border-box; min-width: 0; min-height: 44px; max-height: 168px; field-sizing: content; resize: none; margin: 0; padding: 11px 0; border: 0; outline: none;
  font: 400 16px/1.4 var(--font-text); color: var(--text); background: none; }
.sc-ta::placeholder { color: var(--text-3); opacity: .9; }
.sc-send { all: unset; box-sizing: border-box; flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; cursor: pointer;
  color: var(--on-accent); background: var(--grad-fill); box-shadow: var(--btn-shadow); transition: opacity .2s var(--ease-ui), transform .16s var(--ease-ui), filter .2s var(--ease-ui); }
.sc-send:hover { filter: brightness(1.08) saturate(1.05); }
.sc-send:active { transform: scale(.95); }
.sc-send:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.sc-send .ic { width: 19px; height: 19px; }
.sc-send.is-idle { opacity: .45; box-shadow: none; }
.sc-cfoot { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin: 7px 4px 0; font-size: 12px; line-height: 1.45; color: var(--text-3); }
.sc-hint { min-width: 0; margin: 0; text-wrap: pretty; }
.sc-hint:empty { display: none; }
.sc-hint.is-warn { color: var(--demo); }
.sc-hint kbd { display: inline-block; padding: 1px 5px; border-radius: 5px; font: 500 10.5px/1.3 var(--font-mono); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line-strong); }
.sc-count { flex: none; margin-left: auto; font: 500 11px/1.45 var(--font-mono); font-variant-numeric: tabular-nums; color: var(--text-3); }
.sc-count.is-bad { color: var(--down); }
@media (hover: none) { .sc-kb { display: none; } }

/* ---- телефон: окно на весь экран с «Назад», кнопка — круглая ------------------------------------------ */
@media (max-width: 760px) {
  :root { --sc-r: 16px; --sc-b: calc(16px + env(safe-area-inset-bottom)); --sc-fab-h: 54px; }
  .sc-fab { width: 54px; padding: 0; justify-content: center; }
  .sc-fab > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .sc-fab .ic { width: 24px; height: 24px; }
  .sc.is-open .sc-fab, .sc.is-open .sc-peek { visibility: hidden; }
  /* Высота — по видимой части экрана (visualViewport): поднялась клавиатура — поле ввода остаётся над ней. */
  .sc-win { top: var(--sc-vt, 0px); right: 0; bottom: auto; left: 0; width: auto; height: var(--sc-vh, 100dvh); border-radius: 0; box-shadow: none;
    z-index: 85; transform: translateY(18px); transform-origin: 50% 100%; }
  .sc-win.is-open { transform: none; }
  .sc-head { grid-template-columns: auto auto minmax(0, 1fr); grid-template-areas: "back av who"; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 16px 16px 6px; }
  .sc-head .sc-back { display: grid; }
  .sc-x { display: none; }
  .sc-av { width: 38px; height: 38px; }
  .sc-feed { padding: 18px 12px 12px; }
  .sc-grp { max-width: 88%; }
  .sc-comp { padding: 8px 10px calc(10px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  .sc-fab, .sc-peek, .sc-win, .sc-win.is-open, .sc-send, .sc-field, .sc-in { transition: none !important; }
}
