.work-chat-compose{position:relative;flex-wrap:wrap}
.work-chat-compose textarea{flex:1;min-width:100px;min-height:88px}
.chat-send-error{flex-basis:100%;font-size:12px;color:var(--danger,#b42318);overflow-wrap:anywhere}
.chat-queued{opacity:.8}
.chat-queued .work-link{margin-top:8px;font-size:12px}
.chat-compose-actions{display:flex;flex:0 0 auto;flex-direction:column;align-items:stretch;justify-content:space-between;gap:6px;max-width:none}
.chat-attach{align-self:flex-end;padding:6px;min-width:32px;min-height:32px}
.chat-attach svg{width:19px;height:19px;display:block}
.chat-file-selection{flex-basis:100%;display:flex;align-items:center;gap:8px;min-width:0;font-size:12px}
.chat-file-selection span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:calc(100% - 40px)}
.chat-file-selection button{margin-left:auto;min-width:32px;min-height:32px;font-size:20px}
.chat-file-name{font-size:12px;overflow-wrap:anywhere}
.chat-compose-tools{display:flex;gap:3px;justify-content:flex-end}
.chat-compose-tools .btn{padding:5px;min-width:28px;min-height:30px}
.chat-compose-tools svg{width:17px;height:17px}
.chat-tools-modal .dlg__box{display:flex;flex-direction:column;max-height:min(650px,90dvh);overflow:hidden}
.chat-tools-modal .dlg__head{padding:12px 16px;align-items:center;font-size:14px}
.chat-tools-modal .dlg__body{padding:12px 16px;overflow:auto;min-height:0}
.chat-tools-modal input{width:100%;margin-bottom:10px}
.chat-template-list{display:grid;gap:6px}
.chat-template{display:grid;gap:5px;text-align:left;border:1px solid var(--line);border-radius:8px;
 background:var(--panel);color:var(--text);font:inherit;padding:10px;cursor:pointer;min-width:0}
.chat-template b{font-size:13px}.chat-template span{font-size:12px;line-height:1.4;white-space:pre-wrap;
 overflow:hidden;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow-wrap:anywhere}
.chat-template:hover,.chat-template:focus-visible{border-color:var(--text)}
.chat-emoji-grid{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:5px}
.chat-emoji-grid .btn{padding:5px;font-size:21px;min-width:0}
.chat-picker-tabs{width:fit-content;margin-bottom:12px}
.chat-picker-panel{height:min(420px,55dvh);overflow:auto;overscroll-behavior:contain}
.chat-picker-panel[hidden]{display:none}
.chat-sticker-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.chat-sticker-choice{border:1px solid var(--line);border-radius:12px;background:var(--page);padding:6px;cursor:pointer}
.chat-sticker-choice[aria-pressed=true]{outline:2px solid var(--text);outline-offset:-2px}
.chat-sticker-choice img{display:block;width:100%;height:auto;aspect-ratio:1;object-fit:contain}
.chat-sticker-action{position:sticky;bottom:0;background:var(--bg);padding:8px 0 0;display:flex;justify-content:flex-end}
.chat-sticker-image{display:block;width:min(240px,100%);height:auto;aspect-ratio:1;object-fit:contain}
.chat-queued--failed{border-color:var(--chip-red-tx,#b54b4b)}
.chat-sent{font-size:14px;font-weight:600;color:var(--text2)}
.chat-reply-selection{flex-basis:100%;display:flex;gap:8px;align-items:center;border-left:2px solid var(--text);padding-left:8px}
.chat-reply-selection span{flex:1;min-width:0;font-size:12px;white-space:pre-wrap;max-height:54px;overflow:hidden}
.chat-reply-selection b,.work-reply-quote b{display:block;font-size:11px}
.chat-reply-selection .btn{flex:none;padding:3px 7px;min-height:26px}
.work-reply-quote{border-left:2px solid currentColor;opacity:.75;padding-left:7px;margin-bottom:7px;font-size:12px;max-height:80px;overflow:hidden}
.work-reply-quote span{white-space:pre-wrap}
.work-message-reply{font-size:17px;line-height:1;padding:2px 6px;margin-left:auto}

/* Стикер клиента (п. 349, 05.11.2026): картинкой, без рамки документа.
   Размер — из самого стикера (ширина/высота в записи), как в Telegram. */
.chat-sticker{display:block;max-width:100%;background:none;border:0;padding:0}
.chat-sticker > img,.chat-sticker > video{display:block;width:100%;height:100%;
  object-fit:contain;background:none}
/* Нечем отрисовать (.tgs) — короткая подпись, а не плашка файла. */
.chat-sticker--plain{display:flex;align-items:center;justify-content:center;
  width:auto!important;height:auto!important;padding:6px 10px;font-size:13px;
  color:var(--muted);background:none}
/* Эмодзи вместо .tgs-стикера (п. 351, 06.11.2026): крупно, как сам
   стикер, без рамки и подписи. */
.chat-sticker--emoji{font-size:48px;line-height:1;width:auto!important;
  height:auto!important;padding:2px 4px;color:inherit}
