.chat-sticker{display:block;width:160px;height:160px;max-width:100%;background-image:url('../images/chat/stickers143.webp');background-size:300% 200%;background-repeat:no-repeat;border-radius:18px;margin:8px 0}
.sticker-help{background-position:0 0}.sticker-thanks{background-position:50% 0}.sticker-fixed{background-position:100% 0}.sticker-checking{background-position:0 100%}.sticker-oops{background-position:50% 100%}.sticker-welcome{background-position:100% 100%}
.chat-sticker-picker{padding:8px 12px;color:var(--site-ink,#172033);background:var(--site-surface,#fff)}
.chat-sticker-picker summary{cursor:pointer;font-weight:700;padding:6px}
.chat-sticker-picker>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;max-height:340px;overflow:auto}
.chat-sticker-picker button{font:inherit;font-size:12px;border:1px solid var(--site-line,#ccc);border-radius:12px;background:var(--site-surface,#fff);color:var(--site-ink,#172033);padding:6px;cursor:pointer}
.chat-sticker-picker .chat-sticker{width:90px;height:90px;margin:0 auto 4px}
.chat-image{display:block;max-width:min(100%,360px);max-height:280px;object-fit:contain;border-radius:12px;margin:8px 0}
#chat-image-form{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:8px 12px;background:var(--site-surface,#fff);color:var(--site-ink,#172033);font-size:12px}
#chat-image-form [hidden]{display:none!important}#chat-image-name{flex:1;overflow-wrap:anywhere}.chat-image-pin{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border:1px solid currentColor;border-radius:10px;cursor:pointer}
#chat-image-send{padding:7px;border:1px solid currentColor;border-radius:8px;background:var(--site-surface,#fff);color:inherit}#chat-image-status{width:100%}
/* v145: a single Telegram-style message row and floating sticker picker. */
#chat-image-form[hidden],#chat-form [hidden],.chat-attachment-preview[hidden]{display:none!important}
#chat-form.toolbar{display:flex;flex-direction:column;gap:8px;padding:10px;background:var(--site-surface,#fff);border-top:1px solid var(--site-line,#dbe3ef);overflow:visible}
#chat-form .chat-compose-row{position:relative;display:flex;align-items:center;gap:4px;direction:rtl;border:1px solid var(--site-line,#dbe3ef);border-radius:28px;padding:4px;background:var(--site-soft,var(--site-surface,#f5f7fa));min-width:0}
#chat-form #chat-input{flex:1;min-width:0;width:0;border:0;box-shadow:none;border-radius:0;padding:10px 5px;background:transparent;color:var(--site-ink,#172033);font:inherit}
#chat-form #guest-name{width:100%;max-width:none;margin:0;background:var(--site-surface,#fff);color:var(--site-ink,#172033);border-color:var(--site-line,#dbe3ef)}
#chat-form .chat-compose-icon,#chat-form .chat-sticker-picker summary,.chat-attachment-preview button{display:inline-flex;align-items:center;justify-content:center;flex:0 0 42px;width:42px;height:42px;min-height:42px;margin:0;padding:0;border:0;border-radius:50%;background:transparent;color:var(--site-ink,#475569);cursor:pointer;transform:none}
#chat-form .chat-compose-send{background:#2563eb;color:#fff}
#chat-form .chat-sticker-picker{position:static;flex:0 0 42px;padding:0;margin:0;background:transparent;color:var(--site-ink,#475569)}
#chat-form .chat-sticker-picker summary{list-style:none}#chat-form .chat-sticker-picker summary::-webkit-details-marker{display:none}#chat-form .chat-sticker-picker summary::marker{content:''}
#chat-form .chat-sticker-picker>div{position:absolute;bottom:calc(100% + 12px);right:0;z-index:20;width:320px;max-width:calc(100vw - 56px);max-height:min(280px,35vh);padding:10px;border:1px solid var(--site-line,#cbd5e1);border-radius:18px;box-shadow:0 10px 30px #0002;background:var(--site-surface,#fff);overscroll-behavior:contain}
#chat-form .chat-sticker-picker:not([open])>div{display:none}
#chat-form .chat-sticker-picker [data-sticker]{width:auto;min-width:0;padding:6px;white-space:normal;border:1px solid var(--site-line,#cbd5e1);border-radius:12px;background:var(--site-surface,#fff);color:var(--site-ink,#172033);transform:none}
#chat-form .chat-compose-icon:focus-visible,#chat-form summary:focus-visible,#chat-form [data-sticker]:focus-visible{outline:2px solid #438dff;outline-offset:2px}
#chat-form .chat-compose-icon:disabled{opacity:.5;cursor:wait}
.chat-attachment-preview{display:flex;align-items:center;gap:8px;padding:6px 12px;background:var(--site-surface,#fff);color:var(--site-ink,#172033);font-size:13px;border-top:1px solid var(--site-line,#dbe3ef)}
#chat-image-status{margin:0;padding:6px 12px;line-height:1.7;font-size:13px;background:var(--site-surface,#fff);color:var(--site-ink,#172033)}#chat-image-status:empty{display:none}
