/* chats2.css — «Чаты» веб-приложения, волна 2б: голосовые и кружки,
 * запись, видео, секреты и отложка, пересылка и поиск по сообщениям,
 * звонки, стаи. Только токены kit.css; петли — числа десктопа (пульс
 * записи и гудка — 1,2 с, как скелетон). Блоки: МЕДИА · ЗАПИСЬ · СЕКРЕТЫ ·
 * ПОИСК · ЗВОНОК · СТАИ. */

/* == МЕДИА =============================================================== */
.dm-voice {
  display: flex; align-items: center; gap: 6px; width: 260px; max-width: 100%;
  min-height: var(--tap); margin: 2px 0;
}
.dm-vp-play {
  display: grid; place-items: center; flex: none; width: var(--tap); height: var(--tap);
  border: 0; border-radius: 50%; background: color-mix(in srgb, currentColor 16%, transparent);
  color: inherit; cursor: pointer; transition: transform var(--dur-press) var(--ease-out);
}
.dm-vp-play:active { transform: scale(.94); }
.dm-vp-play:disabled { opacity: .6; cursor: default; }
.dm-vp-wave {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 2px; height: 30px; cursor: pointer;
}
.dm-vp-wave i {
  flex: 1; min-width: 2px; height: calc(var(--h, .35) * 100%); border-radius: 2px;
  background: color-mix(in srgb, currentColor 38%, transparent);
}
/* Прослушанное — ярче (класс .on ставит ui/voiceplayer.js по --p). */
.dm-vp-wave i.on { background: currentColor; }
.dm-vp-t { flex: none; min-width: 34px; font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.dm-vp-rate {
  flex: none; min-width: var(--tap); min-height: var(--tap); padding: 0 6px;
  border: 0; border-radius: 999px; background: transparent; color: inherit;
  font: inherit; font-size: 12px; font-weight: 900; cursor: pointer;
}
.dm-circ {
  position: relative; display: block; width: 200px; height: 200px; margin: 2px 0 4px;
  border-radius: 50%; overflow: hidden; background: var(--sink); cursor: pointer;
  box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--lav) calc(var(--p, 0) * 100%), var(--line));
}
.dm-circ-v { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.dm-circ-t {
  position: absolute; left: 50%; bottom: 10px; translate: -50% 0; padding: 2px 8px; border-radius: 999px;
  background: var(--backdrop); color: var(--ink-on-accent); font-size: 12px; font-weight: 900;
}
.dm-circ.is-play .dm-circ-t { opacity: .7; }
.chat-msg.is-circ { padding: 2px 0; background: transparent; box-shadow: none; color: var(--panel-fg); }
.chat-msg.is-circ .dm-meta { color: var(--ink-dim); }
.chat-msg.is-circ.mine .dm-meta { color: var(--ink-dim); }

/* == ЗАПИСЬ ============================================================== */
/* Как в Telegram. Удержание: микрофон растёт (×1,6) и чуть идёт за пальцем,
 * ореол дышит громкостью (--lvl), полоса въезжает справа поверх поля (точка,
 * таймер, «‹ влево — отмена» с бликом едет за пальцем --rx и гаснет к порогу
 * --cp), над микрофоном — плашка замка (подъём --lp сжимает её). Замок:
 * дужка защёлкивается (--ease-pop), микрофон уступает место «отправить».
 * Отмена: микрофон падает в корзину, крышка закрывается, полоса уезжает.
 * Переменные ставит composer.paintGesture (recordlogic.recVisual). */
.tbar-row { position: relative; }
.tbar-plus, .tbar-in { transition: opacity var(--dur-fast) linear; }
.tbar.is-rec .tbar-plus, .tbar.is-rec .tbar-in { opacity: 0; pointer-events: none; }
.tbar-mic {
  position: relative; color: var(--lav); touch-action: none;
  -webkit-touch-callout: none; -webkit-user-select: none; user-select: none;
  transition: transform var(--dur-fast) var(--ease-out), opacity var(--dur-fast) linear, color var(--dur-press) linear;
}
.tbar-mic.is-flip { animation: mic-flip var(--dur-slow) var(--ease-pop); }
@keyframes mic-flip { from { transform: scale(.9) rotate(-12deg); } to { transform: none; } }
/* ::before — ореол, ::after — сама круглая кнопка (поверх ореола). */
.tbar-mic::before, .tbar-mic::after {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 50%; pointer-events: none; opacity: 0;
}
.tbar-mic::before {
  background: var(--accent-wash-3); scale: .6;
  transition: opacity var(--dur-fast) linear, scale var(--dur-fast) var(--ease-out);
}
.tbar-mic::after { background: var(--accent-grad); transition: opacity var(--dur-fast) linear; }
.tbar.is-hold .tbar-mic {
  color: var(--ink-on-accent); background: transparent;
  transform: translate(calc(var(--rx, 0px) * .5 - 8px), calc(var(--ry, 0px) * .4)) scale(1.6);
}
.tbar.is-hold .tbar-mic::after { opacity: 1; }
.tbar.is-hold .tbar-mic::before {
  opacity: 1; scale: calc(1.12 + var(--lvl, 0) * .45);
  animation: rec-halo 1.2s ease-in-out infinite;
}
@keyframes rec-halo { 0%, 100% { opacity: .9; } 50% { opacity: .5; } }
.tbar.is-locked .tbar-mic { opacity: 0; transform: scale(.6); pointer-events: none; }

.tbar-rec {
  position: absolute; z-index: 1; left: 0; right: calc(var(--tap) + 4px); bottom: 8px; height: var(--tap);
  display: flex; align-items: center; gap: 10px; padding-left: 8px;
  -webkit-touch-callout: none; -webkit-user-select: none; user-select: none;
}
.tbar.is-rec:not(.is-leaving) .tbar-rec { animation: rec-bar-in var(--dur-base) var(--ease-out); }
@keyframes rec-bar-in { from { opacity: 0; transform: translateX(32px); } }
.tbar.is-locked .tbar-rec { right: 0; }
.tbar-rec-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--hot);
  animation: rec-pulse 1.2s ease-in-out infinite; }
@keyframes rec-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
.tbar-rec-t { flex: none; font-size: 16px; font-weight: 900; font-variant-numeric: tabular-nums; }
.tbar-rec-hint {
  flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 2px;
  overflow: hidden; white-space: nowrap; color: var(--ink-dim); font-size: 14px; font-weight: 800;
  transform: translateX(var(--rx, 0px)); opacity: calc(1 - var(--cp, 0) * .9);
  transition: transform var(--dur-press) var(--ease-out), opacity var(--dur-fast) linear;
}
.tbar-rec-chev { display: inline-grid; flex: none; animation: rec-nudge-x 1.2s ease-in-out infinite; }
.tbar-rec-chev .ki { font-size: 18px; }
@keyframes rec-nudge-x { 50% { transform: translateX(-4px); } }
.tbar-rec-tx {
  min-width: 0; overflow: hidden; text-overflow: ellipsis;
  background: linear-gradient(100deg, var(--ink-dim) 38%, var(--panel-fg) 50%, var(--ink-dim) 62%);
  background-size: 200% 100%; -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: shimmer 1.6s ease-in-out infinite;
}
.tbar-rec.is-locked .tbar-rec-chev { display: none; }
.tbar-rec.is-locked .tbar-rec-tx { animation: none; background: none; -webkit-text-fill-color: currentColor; color: inherit; }
.tbar-rec-x { color: var(--danger-ink); }
.tbar-rec-go { color: var(--ink-on-accent); background: var(--accent-grad); }
.tbar-rec.is-locked .tbar-rec-x, .tbar-rec.is-locked .tbar-rec-go { animation: rec-pop var(--dur-slow) var(--ease-pop); }
@keyframes rec-pop { from { opacity: 0; transform: scale(.6); } }

/* Отмена: корзина поднимается на месте точки, микрофон подпрыгивает и падает
 * в неё, крышка закрывается, затем полоса уезжает (всё — 3 × --dur-slow). */
.tbar-rec-bin {
  position: absolute; left: 0; top: 50%; width: 28px; height: 28px; margin-top: -14px;
  display: grid; place-items: center; color: var(--danger-ink); opacity: 0; pointer-events: none;
}
.tbar-rec-bin > .ki { font-size: 24px; }
.tbar-rec-fly { position: absolute; inset: 0; display: grid; place-items: center; color: var(--hot); opacity: 0; }
.tbar-rec-fly .ki { font-size: 20px; }
.tbar.is-leaving[data-exit="bin"] .tbar-rec-dot,
.tbar.is-leaving[data-exit="bin"] .tbar-rec-t,
.tbar.is-leaving[data-exit="bin"] .tbar-rec-hint,
.tbar.is-leaving[data-exit="bin"] .tbar-rec-x,
.tbar.is-leaving[data-exit="bin"] .tbar-rec-go { opacity: 0; transition: opacity var(--dur-fast) linear; animation: none; }
.tbar.is-leaving[data-exit="bin"] .tbar-rec-bin { opacity: 1; }
.tbar.is-leaving[data-exit="bin"] .tbar-rec-bin > .ki { animation: rec-bin-rise var(--dur-slow) var(--ease-out) both; }
.tbar.is-leaving[data-exit="bin"] .tbar-rec-bin > .ki .ic-lid {
  animation: rec-lid calc(var(--dur-slow) * 2) var(--ease-in) both;
}
.tbar.is-leaving[data-exit="bin"] .tbar-rec-fly { animation: rec-fly calc(var(--dur-slow) * 2) var(--ease-out) both; }
.tbar.is-leaving[data-exit="bin"] .tbar-rec {
  animation: rec-bar-out var(--dur-slow) var(--ease-in) calc(var(--dur-slow) * 2) both;
}
@keyframes rec-bin-rise { from { opacity: 0; transform: translateY(22px) scale(.6); } }
@keyframes rec-lid { 0%, 70% { transform: rotate(32deg); } 100% { transform: none; } }
@keyframes rec-fly {
  0% { opacity: 1; transform: none; animation-timing-function: var(--ease-out); }
  40% { opacity: 1; transform: translateY(-34px) rotate(-24deg); animation-timing-function: var(--ease-in); }
  85% { opacity: 1; transform: translateY(0) scale(.55) rotate(-90deg); }
  100% { opacity: 0; transform: translateY(4px) scale(.35) rotate(-90deg); }
}
@keyframes rec-bar-out { to { opacity: 0; transform: translateX(-24px); } }
/* Отправили: полоса уезжает вправо, к микрофону. */
.tbar.is-leaving[data-exit="send"] .tbar-rec {
  opacity: 0; transform: translateX(32px);
  transition: opacity var(--dur-base) var(--ease-in), transform var(--dur-base) var(--ease-in);
}

/* «Стоп» в замке (квадрат) и прослушка после него, как в Telegram: точка,
 * таймер и подсказка уходят, корзина встаёт слева, посередине — пилюля
 * play/пауза + волна записи (поверх — яркая копия, срезанная по --p:
 * прослушанное) + часы, справа «отправить». Тап/протяжка по волне — перемотка. */
.tbar-rec-stop { color: var(--hot); }
.tbar-rec-stop .ki { font-size: 20px; }
.tbar-rec.is-locked .tbar-rec-stop { animation: rec-pop var(--dur-slow) var(--ease-pop); }
.tbar-rec-stop, .tbar-pv, .tbar-pv-play, .tbar-pv-wave {
  -webkit-touch-callout: none; -webkit-user-select: none; user-select: none;
}
.tbar.is-preview .tbar-rec-dot, .tbar.is-preview .tbar-rec-t, .tbar.is-preview .tbar-rec-hint { display: none; }
.tbar.is-preview .tbar-rec { gap: 6px; padding-left: 0; }
.tbar.is-preview .tbar-rec-x { order: -1; }
.tbar-rec-go:disabled { opacity: .6; }
.tbar-pv {
  flex: 1; min-width: 0; height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 12px 0 2px;
  border-radius: 999px; background: var(--accent-wash-2); color: var(--lav);
  animation: rec-pv-in var(--dur-base) var(--ease-out);
}
@keyframes rec-pv-in { from { opacity: 0; transform: scaleX(.92); } }
.tbar-pv-play {
  flex: none; width: 36px; height: 36px; min-width: 36px; min-height: 36px; border-radius: 50%;
  color: var(--ink-on-accent); background: var(--accent-grad);
  transition: transform var(--dur-press) var(--ease-out), opacity var(--dur-fast) linear;
}
.tbar-pv-play:active { transform: scale(.92); background: var(--accent-grad); }
.tbar-pv-play:disabled { opacity: .5; }
.tbar-pv-play svg { width: 18px; height: 18px; animation: rec-pop var(--dur-fast) var(--ease-pop); }
.tbar-pv-wave {
  position: relative; flex: 1; min-width: 0; height: 28px; cursor: pointer; touch-action: none;
}
.tbar-pv-bars {
  position: absolute; inset: 0; display: flex; align-items: center; gap: 2px; pointer-events: none;
}
.tbar-pv-bars i {
  flex: 1; min-width: 2px; height: calc(var(--h, .35) * 100%); border-radius: 2px;
  background: color-mix(in srgb, currentColor 34%, transparent);
  transition: height var(--dur-base) var(--ease-out);
}
.tbar-pv-bars.is-top { clip-path: inset(0 calc((1 - var(--p, 0)) * 100%) 0 0); }
.tbar-pv-bars.is-top i { background: currentColor; }
.tbar-pv-t {
  flex: none; min-width: 34px; text-align: right; color: var(--panel-fg);
  font-size: 14px; font-weight: 900; font-variant-numeric: tabular-nums;
}
.tbar.is-leaving[data-exit="bin"] .tbar-pv { opacity: 0; transition: opacity var(--dur-fast) linear; animation: none; }
/* Кружок после «стоп»: тот же круг, уже записанный ролик (без зеркала — как уйдёт),
 * крутится без звука; тап или play — со звуком, кольцо — прослушанное. */
.rec-circle.is-preview { cursor: pointer; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none;
  box-shadow: var(--e3), 0 0 0 4px color-mix(in srgb, var(--lav) calc(var(--p, 0) * 100%), var(--line)); }
.rec-circle.is-preview .rec-circle-v { transform: none; }

/* Плашка замка над микрофоном: замок + шеврон «вверх» качается. */
.tbar-lock {
  position: absolute; z-index: 3; right: calc((var(--tap) - 38px) / 2); bottom: calc(100% + 30px);
  width: 38px; height: calc(78px - var(--lp, 0) * 30px);
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding-top: 7px;
  border-radius: 999px; background: var(--bg-2); color: var(--ink-mid);
  box-shadow: var(--e2), inset 0 0 0 1px var(--line); pointer-events: none;
  -webkit-touch-callout: none; -webkit-user-select: none; user-select: none;
  transform: translateY(calc(var(--lp, 0) * -14px));
  transition: height var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out),
    opacity var(--dur-base) var(--ease-in), color var(--dur-fast) linear;
  animation: rec-lock-in var(--dur-base) var(--ease-out);
}
@keyframes rec-lock-in { from { opacity: 0; transform: translateY(16px); } }
.tbar-lock-ic { display: grid; }
.tbar-lock-ic .ki { font-size: 20px; }
.tbar-lock .rc-shackle { transform: translateY(calc(-3px + var(--lp, 0) * 1.5px)); transition: transform var(--dur-fast) var(--ease-pop); }
.tbar-lock-chev { display: grid; opacity: calc(1 - var(--lp, 0)); animation: rec-nudge-y 1.2s ease-in-out infinite; }
.tbar-lock-chev .ki { font-size: 18px; }
@keyframes rec-nudge-y { 50% { transform: translateY(-4px); } }
.tbar:not(.is-hold):not(.is-locked) .tbar-lock { opacity: 0; }
.tbar.is-locked .tbar-lock {
  height: 38px; transform: none; color: var(--lav);
  animation: rec-lock-done calc(var(--dur-slow) * 4) var(--ease-in) forwards;
}
.tbar.is-locked .tbar-lock .rc-shackle { transform: none; }
.tbar.is-locked .tbar-lock-ic { animation: rec-pop var(--dur-slow) var(--ease-pop); }
.tbar.is-locked .tbar-lock-chev { display: none; }
@keyframes rec-lock-done { 0%, 70% { opacity: 1; } 100% { opacity: 0; transform: translateY(8px); } }

.rec-circle {
  position: fixed; z-index: 40; left: 50%; top: 42%; width: min(72vw, 300px); aspect-ratio: 1;
  translate: -50% -50%; border-radius: 50%; overflow: hidden; background: var(--sink);
  box-shadow: var(--e3), 0 0 0 4px color-mix(in srgb, var(--hot) calc(var(--p, 0) * 100%), var(--line));
  animation: rec-circle-in var(--dur-base) var(--ease-out);
}
@keyframes rec-circle-in { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }
.rec-circle-v { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }

/* == СЕКРЕТЫ ============================================================= */
.tbar-burn {
  display: flex; align-items: center; gap: 8px; min-height: var(--tap); padding-top: 4px;
  color: var(--lav); font-size: 13px; font-weight: 900;
}
.tbar-burn-tx { flex: 1; min-width: 0; }
.tbar-plate[data-kind="later"] .tbar-plate-ic { background: var(--warm-ink); }
.tbar-att.is-prep .tbar-att-img { animation: rec-pulse 1.2s ease-in-out infinite; }
/* Ролик ждёт решения: «Сжать и отправить» / «Как есть» — строкой под плашкой. */
.tbar-att:has(.tbar-att-acts:not([hidden])) { flex-wrap: wrap; padding-bottom: 6px; }
.tbar-att-acts { display: flex; flex-wrap: wrap; gap: 6px; flex-basis: 100%; order: 3; padding-left: 56px; }
.tbar-att-acts[hidden] { display: none; }
.tbar-att-acts button {
  min-height: var(--tap); padding: 0 16px; border: 0; border-radius: 999px;
  background: color-mix(in srgb, var(--lav) 16%, transparent); color: var(--lav);
  font: inherit; font-size: 14px; font-weight: 900; cursor: pointer;
}
.tbar-att-acts .tbar-att-raw { background: transparent; color: var(--ink-mid); box-shadow: inset 0 0 0 1px var(--line); }
.dm-once-open {
  display: flex; align-items: center; gap: 6px; min-height: var(--tap); padding: 0 14px; margin: 2px 0;
  border: 0; border-radius: 999px; background: color-mix(in srgb, currentColor 14%, transparent);
  color: inherit; font: inherit; font-size: 14px; font-weight: 900; cursor: pointer;
}
.dm-once.is-gone { opacity: .7; }
.dm-burn, .dm-sched { font-size: 12px; }
.chat-msg.is-sched { opacity: .8; }

/* == ПОИСК =============================================================== */
.cl-found { padding: 4px 0 8px; }
.cl-found-h {
  margin: 8px var(--gutter) 2px; color: var(--ink-dim); font-size: 12px; font-weight: 900;
  letter-spacing: .04em; text-transform: uppercase;
}
.cl-found-list { display: grid; grid-template-columns: minmax(0, 1fr); }
.cl-found-note { margin: 6px var(--gutter); color: var(--ink-mid); font-size: 13px; font-weight: 700; }
.cl-hit {
  display: grid; gap: 2px; min-height: 60px; padding: 8px var(--gutter); color: var(--panel-fg);
  transition: background-color var(--dur-press) linear;
}
.cl-hit:active { background: var(--accent-wash); }
.cl-hit + .cl-hit { border-top: 1px solid var(--line); }
.cl-hit-l1 { display: flex; align-items: center; gap: 6px; min-width: 0; }
.cl-hit-name { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 900; }
.cl-hit-tx {
  min-width: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  color: var(--ink-mid); font-size: 14px;
}
.cl-hit-tx mark, .fw mark { border-radius: 3px; background: var(--accent-wash-3); color: var(--panel-fg); }
/* Шторка «Переслать» */
.fw { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.fw-list { display: grid; grid-template-columns: minmax(0, 1fr); max-height: 50vh; overflow-y: auto; overscroll-behavior: contain; }
.fw-row {
  display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 6px 4px;
  border: 0; border-radius: var(--r-3); background: transparent; color: var(--panel-fg);
  font: inherit; font-size: 15px; font-weight: 800; text-align: left; cursor: pointer;
  transition: background-color var(--dur-press) linear;
}
.fw-row:active { background: var(--accent-wash-2); }
.fw-ava { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: var(--accent-wash); }
.fw-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fw-none { margin: 8px 4px; color: var(--ink-mid); font-size: 14px; font-weight: 700; }

/* == ЗВОНОК ============================================================== */
.th-call { color: var(--lav); }
.call {
  position: fixed; inset: 0; z-index: 95; display: flex; flex-direction: column; align-items: center;
  justify-content: space-between; gap: 16px;
  padding: calc(24px + var(--safe-t)) calc(16px + var(--safe-r)) calc(20px + var(--safe-b)) calc(16px + var(--safe-l));
  background: var(--scrim-2); color: var(--panel-fg); overflow: hidden;
  animation: call-in var(--dur-slow) var(--ease-out);
}
@keyframes call-in { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
.call-remote { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--sink); }
.call-local {
  position: absolute; z-index: 2; right: calc(12px + var(--safe-r)); top: calc(64px + var(--safe-t));
  width: 96px; aspect-ratio: 3 / 4; border-radius: var(--r-4); object-fit: cover; transform: scaleX(-1);
  box-shadow: var(--e2), 0 0 0 2px var(--line-strong);
}
.call-min { position: absolute; z-index: 2; left: calc(8px + var(--safe-l)); top: calc(8px + var(--safe-t)); color: inherit; }
.call-who { position: relative; z-index: 1; display: grid; justify-items: center; gap: 6px; margin-top: 8vh; text-align: center; }
.call.is-video .call-who { margin-top: 0; padding: 6px 14px; border-radius: var(--r-5); background: var(--backdrop); color: var(--ink-on-accent); }
.call.is-video .call-ava { display: none; }
.call-ava {
  display: grid; place-items: center; width: 112px; height: 112px; border-radius: 50%; overflow: hidden;
  background: var(--accent-wash); box-shadow: 0 0 0 6px var(--accent-wash-2);
}
.call:not(.is-video) .call-ava { animation: call-ring 1.2s ease-in-out infinite; }
@keyframes call-ring { 0%, 100% { box-shadow: 0 0 0 6px var(--accent-wash-2); } 50% { box-shadow: 0 0 0 14px var(--accent-wash); } }
.call-name { margin: 6px 0 0; font-size: 24px; font-weight: 900; }
.call-sub { margin: 0; color: var(--ink-mid); font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.call.is-video .call-sub { color: inherit; }
.call-acts { position: relative; z-index: 1; display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; }
.call-b {
  display: grid; place-items: center; width: 64px; height: 64px; border: 0; border-radius: 50%;
  background: var(--raise-2); color: var(--panel-fg); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer;
  transition: transform var(--dur-press) var(--ease-out), background-color var(--dur-fast) linear;
}
.call-b:active { transform: scale(.94); }
.call-b .ki { font-size: 26px; }
.call-b[aria-pressed="true"], .call-b.is-off { background: var(--panel-fg); color: var(--bg); }
.call-b.is-ok { background: var(--accent-grad); color: var(--ink-on-accent); box-shadow: var(--e2); }
.call-b.is-no { background: var(--hot); color: var(--ink-on-accent); box-shadow: var(--e2); }
.call-note { position: relative; z-index: 1; margin: 0; color: var(--ink-dim); font-size: 12px; font-weight: 700; text-align: center; }
.call.is-video .call-note { color: var(--ink-on-accent); }
.call-bar {
  position: fixed; z-index: 85; left: 50%; top: calc(6px + var(--safe-t)); translate: -50% 0;
  display: flex; align-items: center; gap: 8px; min-height: var(--tap); max-width: calc(100% - 24px);
  padding: 0 16px; border: 0; border-radius: 999px; background: var(--accent-grad); color: var(--ink-on-accent);
  box-shadow: var(--e3); font: inherit; font-size: 14px; font-weight: 900; cursor: pointer;
  animation: call-in var(--dur-base) var(--ease-out);
}
.call-bar-tx { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.call-bar-t { font-variant-numeric: tabular-nums; opacity: .9; }
html.has-call, html.has-call body { overflow: hidden; }

/* == СТАИ =============================================================== */
.cl-top-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.cl-top-row .sf { flex: 1; min-width: 0; }
.cl-new { flex: none; color: var(--lav); }
.cl-new-plus { font-size: 28px; font-weight: 900; line-height: 1; }
.pk-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.pk-lb { color: var(--ink-mid); font-size: 13px; font-weight: 900; }
.pk-opt { color: var(--ink-dim); font-weight: 700; }
.pk-in {
  width: 100%; min-height: var(--tap); padding: 10px 14px; resize: none;
  border: 0; border-radius: var(--r-4); background: var(--raise-2);
  box-shadow: var(--inset-well), inset 0 0 0 1px var(--line);
  color: var(--panel-fg); font: inherit; font-size: 16px; outline: none;
}
.pk-in:focus-visible { box-shadow: var(--inset-well), inset 0 0 0 2px var(--lav); }
.pk-emo { display: flex; flex-wrap: wrap; gap: 6px; }
.pk-emo-b {
  display: grid; place-items: center; width: var(--tap); height: var(--tap); border: 0; border-radius: 50%;
  background: var(--raise-2); font-size: 22px; cursor: pointer;
  transition: background-color var(--dur-press) linear;
}
.pk-emo-b.on { background: var(--accent-wash-3); box-shadow: inset 0 0 0 2px var(--lav); }
.pk-err { margin: 0; color: var(--danger-ink); font-size: 13px; font-weight: 800; }
.pk-go { justify-self: stretch; }
.inv-body, .pi-body { padding: 8px var(--gutter) 24px; }
.inv-card { display: grid; justify-items: center; gap: 8px; padding: 24px 8px; text-align: center; }
.inv-emo, .pi-emo { font-size: 56px; line-height: 1; }
.inv-name { margin: 6px 0 0; font-size: 20px; font-weight: 900; }
.inv-n, .pi-n { margin: 0; color: var(--ink-dim); font-size: 13px; font-weight: 800; }
.inv-about, .pi-about { margin: 4px 0 0; color: var(--ink-mid); font-size: 15px; white-space: pre-wrap; }
.inv-note { margin: 8px 0 0; color: var(--danger-ink); font-size: 14px; font-weight: 800; }
.inv-go, .inv-no { min-width: 200px; }
.pi-hero { display: grid; justify-items: center; gap: 4px; padding: 12px 0 8px; text-align: center; }
.pi-name { margin: 6px 0 0; font-size: 22px; font-weight: 900; overflow-wrap: anywhere; }
.pi-sec { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 14px 0; border-top: 1px solid var(--line); }
.pi-h { margin: 0; color: var(--ink-dim); font-size: 12px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.pi-link { margin: 0; padding: 8px 12px; border-radius: var(--r-3); background: var(--sink); font-size: 14px; font-weight: 700; overflow-wrap: anywhere; }
.pi-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pi-tg { display: flex; align-items: center; gap: 10px; min-height: var(--tap); font-size: 15px; font-weight: 700; cursor: pointer; }
.pi-sw {
  position: relative; flex: none; width: 44px; height: 26px; border-radius: 13px;
  background: var(--line-strong); transition: background-color var(--dur-fast) linear;
}
.pi-sw::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--ink-on-accent); box-shadow: var(--e2); transition: transform var(--dur-fast) var(--ease-out);
}
.pi-tg input:checked + .pi-sw { background: var(--lav); }
.pi-tg input:checked + .pi-sw::after { transform: translateX(18px); }
.pi-tg input:focus-visible + .pi-sw { box-shadow: 0 0 0 2px var(--lav); }
.pi-members { display: grid; grid-template-columns: minmax(0, 1fr); }
.pi-mem {
  display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 6px 4px; width: 100%;
  border: 0; border-radius: var(--r-3); background: transparent; color: var(--panel-fg);
  font: inherit; font-size: 15px; font-weight: 800; text-align: left;
}
button.pi-mem { cursor: pointer; transition: background-color var(--dur-press) linear; }
button.pi-mem:active { background: var(--accent-wash-2); }
.pi-ava { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: var(--accent-wash); }
.pi-mname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pi-role { flex: none; padding: 2px 10px; border-radius: 999px; background: var(--accent-wash-2); color: var(--lav); font-size: 12px; font-weight: 900; }
.pi-role.is-owner { background: var(--accent-grad); color: var(--ink-on-accent); }
.pi-danger { justify-items: stretch; }
.pi-danger .btn { color: var(--danger-ink); }

@media (prefers-reduced-motion: reduce) {
  .pk-emo-b, button.pi-mem, .pi-sw, .pi-sw::after { transition: none; }
  .call, .call-bar, .call:not(.is-video) .call-ava { animation: none; }
  .call-b { transition: none; }
  .cl-hit, .fw-row { transition: none; }
  .tbar-mic.is-flip, .tbar-rec-dot, .rec-circle, .tbar-att.is-prep .tbar-att-img { animation: none; }
  /* Запись: без петель и движения — только смена прозрачности. */
  .tbar.is-hold .tbar-mic::before, .tbar-rec-chev, .tbar-rec-tx, .tbar-lock-chev, .tbar-lock,
  .tbar.is-rec:not(.is-leaving) .tbar-rec, .tbar-rec.is-locked .tbar-rec-x, .tbar-rec.is-locked .tbar-rec-go,
  .tbar.is-locked .tbar-lock-ic, .tbar.is-leaving[data-exit] .tbar-rec-bin > .ki,
  .tbar.is-leaving[data-exit] .tbar-rec-bin .ic-lid, .tbar.is-leaving[data-exit] .tbar-rec-fly,
  .tbar-rec.is-locked .tbar-rec-stop, .tbar-pv, .tbar-pv-play svg { animation: none; }
  .tbar.is-hold .tbar-mic, .tbar.is-locked .tbar-mic, .tbar-rec-hint, .tbar-lock,
  .tbar.is-leaving[data-exit] .tbar-rec { transform: none; }
  .tbar.is-locked .tbar-lock { animation: rec-lock-done calc(var(--dur-slow) * 4) linear forwards; }
  .tbar.is-leaving[data-exit="bin"] .tbar-rec { animation: none; opacity: 0; transition: opacity var(--dur-base) linear; }
  .dm-vp-play { transition: none; }
}
