/* ElfChat: раскладка в духе привычных мессенджеров. Светлая и тёмная тема по системной настройке. */
:root {
  --bg: #ffffff; --panel: #ffffff; --text: #000000; --muted: #707579; --line: #e9edf0;
  --head: #517da2; --head-text: #ffffff; --head-sub: #d4e3f1;
  --accent: #3390ec; --accent-text: #fff;
  --chat-bg: #b7cfa4; --chat-a: #d4e5b8; --chat-b: #9dc19a; --chat-dot: rgba(255, 255, 255, .18);
  --mine: #effdde; --mine-text: #000; --mine-meta: #4fae4e; --theirs: #ffffff; --theirs-meta: #a0acb6;
  --name: #3390ec; --badge: #4fae4e; --danger: #e53935; --ok: #4fae4e;
  --warn-bg: #fff4d6; --warn-text: #6b4e00; --chip: rgba(0, 0, 0, .22); --sel: #f4f4f5;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17212b; --panel: #17212b; --text: #f5f5f5; --muted: #708499; --line: #101921;
    --head: #17212b; --head-text: #f5f5f5; --head-sub: #708499;
    --accent: #5eb5f7; --accent-text: #fff;
    --chat-bg: #0e1621; --chat-a: #0e1621; --chat-b: #111c28; --chat-dot: rgba(255, 255, 255, .025);
    --mine: #2b5278; --mine-text: #f5f5f5; --mine-meta: #7da8d3; --theirs: #182533; --theirs-meta: #6d7f8f;
    --name: #71baf2; --badge: #3e6a8f; --danger: #ef5350; --ok: #5bb565;
    --warn-bg: #3a3016; --warn-text: #ffd977; --chip: rgba(0, 0, 0, .35); --sel: #202b36;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--text);
  font: 16px/1.35 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent; overscroll-behavior: none;
}
#app { height: 100dvh; max-width: 760px; margin: 0 auto; background: var(--bg); position: relative; }
@media (min-width: 761px) { #app { box-shadow: 0 0 0 1px var(--line); } }
button, input, textarea, select { font: inherit; color: inherit; }
button {
  border: 0; border-radius: 10px; padding: 11px 16px; background: var(--accent); color: var(--accent-text);
  font-weight: 600; cursor: pointer; min-height: 44px;
}
button:disabled { opacity: .6; }
button.ghost { background: transparent; color: var(--accent); border: 0; }
button.ghost.wide { text-align: left; padding-left: 4px; }
button.danger { background: transparent; color: var(--danger); }
button.danger.wide { text-align: left; padding-left: 4px; }
.modal button.danger { background: var(--danger); color: #fff; }
button.wide { width: 100%; margin: 4px 0; }
button.small { padding: 6px 10px; min-height: 32px; font-size: 14px; }
button.icon { background: transparent; color: inherit; font-size: 22px; padding: 4px; min-width: 44px; font-weight: 400; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input, textarea, select {
  width: 100%; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel); outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
label { display: block; margin: 10px 0; }
label > span { display: block; font-size: 14px; color: var(--accent); margin-bottom: 4px; font-weight: 500; }
h2 { margin: 0 0 8px; font-size: 20px; }
h3 { margin: 22px 0 8px; font-size: 15px; color: var(--accent); font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; margin-top: 14px; }

/* вход */
.center { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; text-align: center; }
.center p { max-width: 380px; }
.logo { font-size: 32px; font-weight: 700; margin-bottom: 6px; color: var(--accent); }
.logo::before { content: ''; display: block; width: 96px; height: 96px; margin: 0 auto 14px; border-radius: 50%; background: url(/icon.svg) center / cover; }
.card { width: 100%; max-width: 380px; text-align: left; background: var(--panel); padding: 16px; border-radius: 14px; border: 1px solid var(--line); margin: 12px 0; }
.center > .ghost.wide { max-width: 380px; text-align: center; }

/* каркас */
.page { height: 100dvh; display: flex; flex-direction: column; position: relative; }
.top {
  display: flex; align-items: center; gap: 4px; padding: 4px 6px; padding-top: max(4px, env(safe-area-inset-top));
  background: var(--head); color: var(--head-text); min-height: 56px; box-shadow: 0 1px 2px rgba(0, 0, 0, .15); z-index: 2;
}
.top .title { flex: 1; min-width: 0; font-weight: 600; font-size: 19px; padding-left: 6px; }
.top .title.click { cursor: pointer; }
.top .title > div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .sub { font-size: 13px; font-weight: 400; color: var(--head-sub); }
.top .avatar { width: 40px; height: 40px; font-size: 15px; }
.top .search { flex: 1; background: transparent; border: 0; color: var(--head-text); font-size: 18px; padding: 8px; }
.top .search::placeholder { color: var(--head-sub); }
.scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.pad { padding: 8px 16px calc(24px + env(safe-area-inset-bottom)); }

/* список чатов */
.list { list-style: none; margin: 0; padding: 0; }
.item { display: flex; gap: 12px; width: 100%; align-items: center; background: transparent; color: var(--text); border-radius: 0; padding: 8px 12px; text-align: left; font-weight: 400; min-height: 72px; }
.item:hover, .item:active { background: var(--sel); }
.item .meta { flex: 1; min-width: 0; align-self: stretch; display: flex; flex-direction: column; justify-content: center; gap: 3px; border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.line { display: flex; gap: 6px; align-items: center; }
.line b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.line .ok { color: var(--ok); font-size: 13px; }
.tag { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 0 5px; flex: none; }
.time { margin-left: auto; font-size: 13px; color: var(--muted); flex: none; }
.prev { flex: 1; min-width: 0; color: var(--muted); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge { background: var(--badge); color: #fff; border-radius: 12px; font-size: 13px; min-width: 24px; height: 24px; padding: 0 7px; display: grid; place-items: center; font-weight: 600; flex: none; }
.empty { padding: 48px 24px; text-align: center; color: var(--muted); }
.fab {
  position: absolute; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom)); width: 58px; height: 58px; border-radius: 50%;
  font-size: 24px; padding: 0; box-shadow: 0 3px 10px rgba(0, 0, 0, .3); z-index: 3;
}
.fabmenu {
  position: absolute; right: 18px; bottom: calc(86px + env(safe-area-inset-bottom)); background: var(--panel); border-radius: 12px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .25); padding: 6px 0; z-index: 3; min-width: 220px;
}
.fabmenu button { display: block; width: 100%; background: transparent; color: var(--text); text-align: left; font-weight: 500; border-radius: 0; }
.fabmenu button:hover { background: var(--sel); }

.avatar { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 600; flex: none; font-size: 19px; }
.c0 { background: linear-gradient(#ff885e, #ff516a); } .c1 { background: linear-gradient(#ffcd6a, #ffa85c); }
.c2 { background: linear-gradient(#82b1ff, #665fff); } .c3 { background: linear-gradient(#a0de7e, #54cb68); }
.c4 { background: linear-gradient(#53edd6, #28c9b7); } .c5 { background: linear-gradient(#72d5fd, #2a9ef1); }
.c6 { background: linear-gradient(#e0a2f3, #d669ed); } .c7 { background: linear-gradient(#ff9a9e, #e3577f); }

/* чат */
.msgs {
  padding: 8px 8px 6px; display: flex; flex-direction: column; gap: 3px;
  background-color: var(--chat-bg);
  background-image: radial-gradient(var(--chat-dot) 1.5px, transparent 1.6px), linear-gradient(160deg, var(--chat-a), var(--chat-b));
  background-size: 22px 22px, 100% 100%;
  background-attachment: local, fixed;
}
.msg {
  position: relative; max-width: min(82%, 480px); align-self: flex-start; background: var(--theirs); color: var(--text);
  border-radius: 12px 12px 12px 4px; padding: 6px 9px 6px 10px; overflow-wrap: anywhere; box-shadow: 0 1px 1px rgba(0, 0, 0, .12); margin-left: 6px;
}
.msg::before { content: ''; position: absolute; bottom: 0; left: -6px; width: 10px; height: 14px; background: inherit; clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.msg.mine { align-self: flex-end; background: var(--mine); color: var(--mine-text); border-radius: 12px 12px 4px 12px; margin: 0 6px 0 0; }
.msg.mine::before { left: auto; right: -6px; clip-path: polygon(0 0, 100% 100%, 0 100%); }
.msg .from { font-size: 14px; font-weight: 600; color: var(--name); margin-bottom: 1px; }
.msg .text { white-space: pre-wrap; }
.msg img { display: block; max-width: 100%; max-height: 380px; border-radius: 8px; margin: 0 0 4px; cursor: zoom-in; }
.msg.photo { padding: 3px; }
.msg.photo img { margin: 0; }
.msg.photo .info { position: absolute; right: 8px; bottom: 8px; background: var(--chip); color: #fff; border-radius: 10px; padding: 1px 6px; margin: 0; top: auto; }
.msg .info { float: right; font-size: 12px; color: var(--theirs-meta); margin: 8px 0 -4px 12px; position: relative; top: 2px; white-space: nowrap; }
.msg.mine .info { color: var(--mine-meta); }
.msg .st.read { color: var(--mine-meta); }
.msg .st.fail { color: var(--danger); font-weight: 700; }
.day, .sys { align-self: center; font-size: 13px; color: #fff; background: var(--chip); padding: 3px 10px; border-radius: 12px; margin: 6px 0; text-align: center; max-width: 90%; font-weight: 500; }
.banners:empty { display: none; }
.banner { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 12px; background: var(--panel); border-bottom: 1px solid var(--line); font-size: 14px; }
.banner span { flex: 1 1 100%; }
.banner button { background: var(--accent); color: #fff; }
.banner button.danger { background: transparent; color: var(--danger); }
.banner.warn { background: var(--warn-bg); color: var(--warn-text); }
.composer { display: flex; align-items: flex-end; gap: 2px; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: var(--panel); border-top: 1px solid var(--line); }
.composer textarea { resize: none; min-height: 44px; max-height: 160px; border: 0; padding: 11px 8px; background: transparent; }
.composer .clip { color: var(--muted); transform: rotate(45deg); }
.composer .send { color: var(--accent); font-size: 24px; }
.composer.off { justify-content: center; color: var(--muted); padding: 14px; }

/* прочее */
.linkbox { font-family: ui-monospace, Consolas, monospace; font-size: 12px; word-break: break-all; background: var(--sel); border-radius: 10px; padding: 10px; margin: 8px 0; max-height: 120px; overflow: auto; user-select: all; }
.profile { display: flex; gap: 14px; align-items: center; margin: 12px 0; }
.profile b { font-size: 18px; }
.safety { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; font-family: ui-monospace, Consolas, monospace; font-size: 18px; text-align: center; background: var(--sel); border-radius: 12px; padding: 14px; margin: 8px 0; }
.picks { display: flex; flex-direction: column; }
.pick { display: flex; align-items: center; gap: 12px; padding: 6px 0; margin: 0; }
.pick .avatar, .members .avatar { width: 42px; height: 42px; font-size: 15px; }
.pick input { width: 22px; height: 22px; flex: none; accent-color: var(--accent); }
.members { list-style: none; padding: 0; margin: 0; }
.members li { display: flex; align-items: center; gap: 12px; padding: 6px 0; }
.members li span { flex: 1; min-width: 0; }

.overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .5); display: grid; place-items: center; padding: 16px; z-index: 10; }
.modal { background: var(--panel); border-radius: 14px; padding: 18px; width: 100%; max-width: 400px; }
.overlay.photo { background: rgba(0, 0, 0, .92); cursor: zoom-out; }
.overlay.photo img { max-width: 100%; max-height: 100%; }
.toast { position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: rgba(30, 30, 30, .92); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 20; max-width: calc(100% - 32px); font-size: 14px; }
.toast.bad { background: var(--danger); }

/* --- кнопки записи и скрепка --- */
.composer .rec { color: var(--muted); font-size: 22px; }
.attachmenu {
  position: fixed; z-index: 15; background: var(--panel); border-radius: 12px; padding: 6px 0; min-width: 230px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .35); border: 1px solid var(--line);
}
.attachmenu button { display: flex; align-items: center; gap: 14px; width: 100%; background: transparent; color: var(--text); border-radius: 0; font-weight: 500; text-align: left; padding: 10px 18px; }
.attachmenu button:hover { background: var(--sel); }
.aicon { width: 24px; text-align: center; font-size: 19px; }

/* --- голосовые и музыка --- */
.voice { display: flex; gap: 10px; align-items: center; min-width: 220px; padding: 2px 0; }
.vplay { width: 44px; height: 44px; min-height: 44px; border-radius: 50%; padding: 0; font-size: 18px; flex: none; }
.msg.mine .vplay { background: var(--mine-meta); }
.vbody { flex: 1; min-width: 0; }
.wave { display: flex; align-items: flex-end; gap: 2px; height: 26px; }
.wave i { flex: 1; min-width: 2px; max-width: 3px; border-radius: 2px; background: var(--theirs-meta); opacity: .55; }
.wave i.on { background: var(--accent); opacity: 1; }
.msg.mine .wave i { background: var(--mine-meta); }
.msg.mine .wave i.on { background: var(--mine-text); opacity: .85; }
.vmeta { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--theirs-meta); margin-top: 2px; }
.msg.mine .vmeta { color: var(--mine-meta); }
.voice.unplayed .vdur::after { content: ' •'; color: var(--accent); font-weight: 700; }
.rate { background: var(--sel); color: inherit; min-height: 0; padding: 0 6px; font-size: 11px; border-radius: 8px; font-weight: 700; }
.music .fname { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 15px; }
.mbar { height: 3px; background: var(--line); border-radius: 2px; margin: 6px 0 2px; overflow: hidden; }
.mbar i { display: block; height: 100%; width: 0; background: var(--accent); }

/* --- кружки --- */
.msg.round { background: transparent !important; box-shadow: none; padding: 0; }
.msg.round::before { display: none; }
.msg.round .info { position: absolute; right: 4px; bottom: 6px; background: var(--chip); color: #fff; border-radius: 10px; padding: 1px 6px; margin: 0; top: auto; float: none; }
.circle { position: relative; width: min(240px, 62vw); aspect-ratio: 1; border-radius: 50%; overflow: hidden; cursor: pointer; background: #000; }
.circle video { width: 100%; height: 100%; object-fit: cover; display: block; }
.cring { position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: conic-gradient(rgba(255, 255, 255, .9) var(--p, 0deg), transparent 0);
  -webkit-mask: radial-gradient(circle, transparent 64%, #000 65.5%); mask: radial-gradient(circle, transparent 64%, #000 65.5%); }
.cdur { position: absolute; left: 10px; bottom: 10px; background: var(--chip); color: #fff; font-size: 12px; padding: 1px 7px; border-radius: 10px; }
.circle .cover { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .5); color: #fff; padding: 20px; text-align: center; }
.vid { display: block; max-width: 100%; max-height: 420px; border-radius: 8px; background: #000; }

/* --- файлы, статьи, гео, списки, контакты --- */
.filecard, .ctcard { display: flex; gap: 12px; align-items: center; min-width: 220px; padding: 2px 0; }
.ficon { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 20px; flex: none; }
.fmeta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fmeta b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ctcard .avatar { width: 46px; height: 46px; font-size: 16px; }
.article { min-width: 220px; border-left: 3px solid var(--accent); padding-left: 10px; }
.article .aprev { margin: 4px 0 6px; font-size: 14px; color: var(--muted); white-space: pre-wrap; }
.msg.mine .article .aprev { color: inherit; opacity: .75; }
.geo { display: flex; gap: 10px; min-width: 220px; }
.geoicon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 24px; background: linear-gradient(135deg, #7bd88f, #3a9fd8); flex: none; }
.geo .row { margin-top: 6px; gap: 6px; }
.btnlink { font-size: 14px; font-weight: 600; color: var(--accent); text-decoration: none; padding: 6px 2px; }
.checklist { min-width: 230px; }
.citem { display: flex; gap: 10px; align-items: center; margin: 6px 0; cursor: pointer; }
.citem input { width: 20px; height: 20px; flex: none; accent-color: var(--accent); }
.citem span { flex: 1; }
.citem.done span { text-decoration: line-through; opacity: .6; }
.citem small { font-size: 11px; }
label.check { display: flex; gap: 10px; align-items: flex-start; }
label.check input { width: 20px; height: 20px; flex: none; margin-top: 2px; accent-color: var(--accent); }
label.check > span { display: inline; color: var(--text); font-size: 15px; font-weight: 400; margin: 0; }
.modal textarea { resize: vertical; min-height: 140px; }

/* --- читалка статей --- */
.overlay.reader { place-items: stretch; padding: 0; background: var(--bg); }
.reader-box { max-width: 720px; margin: 0 auto; width: 100%; overflow-y: auto; padding: 20px 20px 60px; position: relative; }
.reader-body h1 { font-size: 26px; margin: 8px 40px 6px 0; }
.reader-body p, .reader-body li { font-size: 17px; line-height: 1.6; }
.rclose { position: sticky; top: 0; float: right; color: var(--text); }

/* --- запись --- */
.overlay.recorder { background: rgba(0, 0, 0, .8); }
.recbox { background: var(--panel); border-radius: 20px; padding: 20px; width: 100%; max-width: 420px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.cpreview { width: min(300px, 74vw); aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: #000; }
.cpreview video { width: 100%; height: 100%; object-fit: cover; display: block; }
.preview.mirror { transform: scaleX(-1); }
.micbig { font-size: 56px; width: 110px; height: 110px; border-radius: 50%; display: grid; place-items: center; background: var(--sel); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 14px rgba(229, 57, 53, .18); } }
@media (prefers-reduced-motion: reduce) { .micbig { animation: none; } }
.rtime { font-size: 28px; font-variant-numeric: tabular-nums; font-weight: 600; }
.rlevel { width: 100%; height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.rlevel i { display: block; height: 100%; width: 0; background: var(--ok); transition: width .1s; }
.rinfo { font-size: 12px; color: var(--muted); min-height: 16px; }
.rbtns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; width: 100%; }
.rbtns .danger { background: var(--danger); color: #fff; }
.rmain { width: 72px; height: 72px; border-radius: 50%; background: var(--danger); font-size: 30px; padding: 0; }
.recbox audio { width: 100%; }
.citem > span { display: inline; color: inherit; font-size: 15px; font-weight: 400; margin: 0; }

/* --- звонок --- */
.row.nogap { gap: 0; flex-wrap: nowrap; }
.callscreen { position: fixed; inset: 0; z-index: 30; background: radial-gradient(circle at 50% 30%, #2b5278, #0e1621 70%); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: max(24px, env(safe-area-inset-top)) 16px calc(28px + env(safe-area-inset-bottom)); }
.callscreen .cremote { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; background: #000; }
.callscreen.video .cremote { display: block; }
.callscreen .clocal { position: absolute; right: 14px; top: max(14px, env(safe-area-inset-top)); width: 28vw; max-width: 160px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 14px; box-shadow: 0 4px 16px rgba(0, 0, 0, .5); z-index: 2; background: #111; }
.callscreen .clocal.mirror { transform: scaleX(-1); }
.chead { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 8vh; text-shadow: 0 1px 4px rgba(0, 0, 0, .6); }
.callscreen.video .chead { margin-top: 0; align-self: flex-start; align-items: flex-start; }
.callscreen.video .cav { display: none; }
.cav .avatar { width: 110px; height: 110px; font-size: 40px; }
.ctitle { font-size: 26px; font-weight: 600; }
.cstatus { font-size: 16px; opacity: .85; font-variant-numeric: tabular-nums; }
.cstats { font-size: 12px; opacity: .7; }
.cbtns { position: relative; z-index: 1; display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.cbtn { display: flex; flex-direction: column; align-items: center; gap: 6px; background: transparent; padding: 0; min-height: 0; color: #fff; font-weight: 500; }
.cbtn span { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 26px; background: rgba(255, 255, 255, .18); backdrop-filter: blur(6px); }
.cbtn small { font-size: 12px; opacity: .9; }
.cbtn.end span { background: #e53935; }
.cbtn.ok span { background: #43a047; }
.cbtn.off span { background: #fff; color: #000; }

/* --- иконки --- */
.ic { width: 24px; height: 24px; display: block; flex: none; }
.ic.tiny { width: 15px; height: 15px; display: inline-block; vertical-align: -3px; }
button.icon { display: inline-grid; place-items: center; }
button.icon .ic { width: 25px; height: 25px; }
.fabmenu button, .attachmenu button, button.wide, .banner button, .rbtns button, button.small { display: flex; align-items: center; gap: 10px; }
button.wide { justify-content: flex-start; }
.center > .ghost.wide, form button.wide { justify-content: center; }
.fab .ic { width: 26px; height: 26px; margin: auto; }
.aicon { width: 24px; color: var(--accent); }
.vplay .ic { width: 22px; height: 22px; margin: auto; }
.vplay { display: grid; place-items: center; }
.ficon .ic, .geoicon .ic { width: 22px; height: 22px; color: #fff; }
.geoicon { color: #fff; }
.cardtitle { display: flex; align-items: center; gap: 6px; }
.msg .info .ic.tiny { width: 14px; height: 14px; vertical-align: -2px; }
.msg .st { margin-left: 3px; }
.line .ok .ic { color: var(--ok); }
.cbtn span .ic { width: 28px; height: 28px; }
.composer .send .ic { width: 26px; height: 26px; color: var(--accent); }

/* --- запись по зажатию --- */
.composer { position: relative; }
.composer .rec { color: var(--muted); touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; transition: transform .15s, background .15s; border-radius: 50%; z-index: 2; }
.composer .rec.active { background: var(--accent); color: #fff; transform: scale(1.5); }
.composer.recording > .clip, .composer.recording > textarea { visibility: hidden; }
.recbar { position: absolute; left: 6px; right: 64px; top: 0; bottom: env(safe-area-inset-bottom); display: flex; align-items: center; gap: 10px; padding: 0 8px; background: var(--panel); }
.rdot { width: 10px; height: 10px; border-radius: 50%; background: #e53935; flex: none; animation: blink 1s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .rdot { animation: none; } }
.rtime2 { font-variant-numeric: tabular-nums; font-weight: 600; min-width: 44px; }
.rslide { margin-left: auto; color: var(--muted); font-size: 14px; display: flex; align-items: center; gap: 4px; transition: transform .05s; }
.rctl { margin-left: auto; display: flex; gap: 2px; }
.rctl .danger { color: var(--danger); background: transparent; }
.rctl .sendrec { color: var(--accent); }
.rlockhint { position: absolute; right: 10px; bottom: calc(80px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 8px; border-radius: 22px; background: var(--panel); color: var(--muted); box-shadow: 0 2px 10px rgba(0, 0, 0, .25); z-index: 3; }
.holdcircle { position: fixed; left: 50%; top: 42%; transform: translate(-50%, -50%); width: min(78vw, 360px); aspect-ratio: 1; z-index: 25; }
.holdcircle .cpreview { width: 100%; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.holdcircle .cring { position: absolute; inset: -6px; border-radius: 50%; pointer-events: none; background: conic-gradient(var(--accent) var(--p, 0deg), rgba(255, 255, 255, .15) 0); -webkit-mask: radial-gradient(circle, transparent 69%, #000 70%); mask: radial-gradient(circle, transparent 69%, #000 70%); }
.holdinfo { position: absolute; left: 0; right: 0; bottom: -28px; text-align: center; font-size: 12px; color: #fff; text-shadow: 0 1px 3px #000; }
.prev .ic.tiny { margin-right: 4px; color: var(--accent); vertical-align: -3px; }
.sys .ic.tiny { margin-right: 5px; vertical-align: -3px; }
