.chat-head{align-items:center;gap:18px}.chat-head p{max-width:none}.chat-error{color:#ffb9cb;font-size:13px;margin:10px 0 0;overflow-wrap:anywhere}.chat-error:empty{display:none}.chat-empty{margin:auto;text-align:center;color:var(--muted);font-size:14px}.messages{height:clamp(310px,52vh,640px)}.bubble{white-space:pre-wrap;overflow-wrap:anywhere}.bubble.user{max-width:82%;flex:none}.assistant-row{flex:none}.bubble em{color:#e0cad9}.composer .attach:disabled{opacity:.3}.composer input:focus-visible,.composer button:focus-visible{outline:2px solid var(--pink);outline-offset:2px}@media(prefers-reduced-motion:reduce){.typing-indicator i{animation:none}.choice,.toast{transition:none}}@media(max-width:540px){.assistant-row{max-width:96%}.composer{gap:6px;flex-wrap:wrap}.composer input{flex-basis:60%}.composer .attach{display:none}.composer button[type=submit]{padding-inline:12px}.chat-head h2{font-size:26px}}
.chat-toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:4px 0 10px}.chat-toolbar .btn{font-size:12px;padding:8px 12px}.subscription-gate{display:flex;align-items:center;flex-wrap:wrap;gap:6px 12px;padding:9px 12px;margin:8px 0;border:1px solid #ed85ad35;border-radius:9px;background:#ed85ad08}.subscription-gate p{font-size:12px;line-height:1.5;color:#d8c6d2;margin:0}.chat-subscribe-link{padding:3px 0;border:0;background:transparent;color:var(--pink);font:inherit;font-size:12px;text-align:left;cursor:pointer;text-decoration:underline;text-underline-offset:3px}.chat-subscribe-link:focus-visible{outline:2px solid var(--pink);outline-offset:3px}.attachment-preview{display:flex;flex-direction:column;gap:6px;margin:8px 0}.attachment-preview img{display:block;max-width:min(270px,100%);max-height:230px;object-fit:contain;border-radius:10px}.attachment-preview span{font-size:11px;opacity:.8}#attachmentDraft{padding:12px 0;border-top:1px solid var(--line)}#attachmentDraft .attachment-preview img{max-height:120px}#attachmentDraft .btn{padding:6px 10px;font-size:11px}.commerce-dialog{background:var(--panel);color:var(--text);border:1px solid #80556f;border-radius:18px;padding:24px;width:min(470px,calc(100vw - 32px));box-shadow:var(--shadow)}.commerce-dialog::backdrop{background:#08070bbd}.commerce-dialog h2{font-size:24px;margin:0 0 12px}.commerce-dialog p{font-size:14px;line-height:1.7;color:#d5c7d2;margin-bottom:20px}.commerce-dialog button:focus-visible,.chat-toolbar button:focus-visible{outline:2px solid var(--pink);outline-offset:3px}[hidden]{display:none!important}@media(max-width:540px){.composer .attach{display:inline-block}.attachment-preview img{max-width:100%}.composer input{flex-basis:40%}}

.requested-media{width:min(330px,100%);margin:10px 0;border:1px solid #725068;border-radius:14px;overflow:hidden;background:#201c25}.requested-media-art{height:240px;overflow:hidden;background:#17141d}.requested-media-art img{width:100%;height:100%;object-fit:cover;object-position:center 30%}.requested-media figcaption{padding:14px}.requested-media strong{display:block;font-size:14px}.requested-media p{font-size:12px;line-height:1.6;color:var(--muted);margin:8px 0}.requested-media small{font-size:10px;color:#e8bfd5}.requested-video-demo .requested-media-art{position:relative}.requested-video-demo .requested-media-art::after{content:"ДЕМО ПРЕВЬЮ · НЕ ВИДЕОФАЙЛ";position:absolute;bottom:10px;left:10px;font-size:9px;letter-spacing:.06em;border-radius:6px;background:#100c16d9;padding:6px 8px}.requested-video-demo img{animation:demo-pan 7s ease-in-out infinite alternate}@keyframes demo-pan{from{transform:scale(1)}to{transform:scale(1.09)}}#demoSubscription{margin:0 8px 8px 0}@media(prefers-reduced-motion:reduce){.requested-video-demo img{animation:none}}

.chat-head{display:flex;align-items:center;gap:15px}.chat-header-avatar{display:block;width:58px;height:58px;flex:0 0 58px;padding:0;border:2px solid #d98aaf70;border-radius:50%;background:#2b202d;overflow:hidden;cursor:pointer;box-shadow:0 3px 15px #0003}.chat-header-avatar img{display:block;width:100%;height:100%;object-fit:cover;object-position:center 28%}.chat-header-avatar:hover{border-color:#ef86b4}.chat-header-avatar:focus-visible{outline:2px solid var(--pink);outline-offset:4px}.chat-head>div{min-width:0}.chat-head #chatTitle{margin:0;overflow-wrap:anywhere}@media(max-width:540px){.chat-header-avatar{width:48px;height:48px;flex-basis:48px}.chat-head{gap:12px}}

.message-report{align-self:flex-start;background:transparent;border:0;color:#b5a0b0;font-size:11px;padding:5px 2px;cursor:pointer}.message-report:hover{color:#f2afce;text-decoration:underline}.message-report:focus-visible{outline:2px solid #ec8db4}.moderation-dialog{max-width:600px;width:calc(100% - 32px);box-sizing:border-box;border:1px solid #715169;border-radius:16px;padding:24px;background:#1b1520;color:#fff}.moderation-dialog::backdrop{background:#08050cc9}.moderation-dialog .form{display:grid;gap:16px}.moderation-dialog label{display:grid;gap:8px;line-height:1.6}.moderation-dialog textarea,.moderation-dialog select{font:inherit;padding:12px;background:#110c15;color:#fff;border:1px solid #715169;border-radius:9px;width:100%;box-sizing:border-box}.moderation-dialog .moderation-consent{display:flex;align-items:flex-start;font-size:12px}.moderation-dialog button,.chat-moderation-notice button{padding:9px 14px;border:1px solid #81526c;background:#392232;color:#ffe2f0;border-radius:9px;font:inherit;cursor:pointer}.chat-moderation-notice{padding:16px;margin:12px 0;border:1px solid #9b5875;border-radius:12px;background:#30202e;font-size:13px;line-height:1.6}.chat-moderation-notice p{white-space:pre-wrap;overflow-wrap:anywhere}

/* Keep the chat title alongside its avatar, rather than at the far edge. */
.chat-head{justify-content:flex-start}
.message-avatar-button{display:block;width:36px;height:36px;padding:0;border:0;border-radius:50%;background:none;cursor:pointer;align-self:end;line-height:0}
.message-avatar-button .mini-avatar-photo{display:block;width:100%;height:100%;object-fit:cover}
.message-avatar-button:hover{box-shadow:0 0 0 2px #ed85ad80}
.message-avatar-button:focus-visible{outline:2px solid var(--pink);outline-offset:3px}

.message-context-menu{position:fixed;z-index:900;min-width:190px;max-width:calc(100vw - 16px);padding:6px;background:#241b28;border:1px solid #6b465e;border-radius:12px;box-shadow:0 12px 36px #0008}
.message-context-menu button{display:block;width:100%;padding:11px 14px;border-radius:7px;color:#f4d8e7;font-size:14px;text-align:left}
.message-context-menu button:hover,.message-context-menu button:focus-visible{background:#ed85ad20;text-decoration:none;outline:none}
.bubble.assistant:focus-visible{outline:2px solid var(--pink);outline-offset:3px}

.chat-session-top{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.chat-delete-button{color:#ecadc3;border-color:#744052;font-size:12px}
.chat-delete-button:hover{background:#f16a9020}
.chat-delete-dialog{width:min(440px,calc(100% - 32px));padding:26px;border:1px solid #704257;border-radius:18px;background:#201820;color:var(--text);box-shadow:0 20px 70px #0009}
.chat-delete-dialog::backdrop{background:#09060dc7}
.chat-delete-dialog h2{margin:0 0 12px;font-size:23px}
.chat-delete-dialog p{color:var(--muted);line-height:1.6}
.chat-delete-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:22px;flex-wrap:wrap}
.chat-delete-confirm{background:#a33557;border-color:#c45275;color:#fff}

.message-context-menu .message-menu-delete{background:transparent;border:0;cursor:pointer;color:#f1a9bd;text-align:left;font:inherit;font-size:13px}
.chat-message-time{display:block;margin-top:7px;color:#b5a5b3;font-size:10px;line-height:1.35;text-align:right;white-space:normal;font-variant-numeric:tabular-nums}.bubble.user .chat-message-time{color:#e5cfdf}.typing-indicator .chat-message-time{display:none}
/* Open Sans, the standard Telegram Desktop family, served from our own assets. */
#chatSession,#chatSession .chat-head h2,#chatInput,.chat-edit-dialog textarea{font-family:"Open Sans","Segoe UI",sans-serif}
#chatMessages .bubble{font-family:"Open Sans","Segoe UI",sans-serif;letter-spacing:normal;line-height:1.5}
.chat-message-actions{display:flex;align-items:center;gap:3px;margin:5px 0 2px;padding:0 2px;white-space:normal}
.chat-message-actions button{display:grid;place-items:center;width:32px;height:32px;padding:7px;border:0;border-radius:8px;background:transparent;color:#bba9b8;cursor:pointer;transition:background .15s,color .15s}
.chat-message-actions svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.chat-message-actions button:hover,.chat-message-actions button[aria-pressed=true]{color:var(--pink);background:#ed85ad16}
.chat-message-actions button:focus-visible{outline:2px solid var(--pink);outline-offset:1px}
.chat-message-actions button:disabled{opacity:.3;cursor:default;background:transparent}
.chat-edit-dialog{width:min(650px,calc(100vw - 28px));max-height:85dvh;overflow:auto;padding:24px;border:1px solid #725069;border-radius:18px;background:var(--panel);color:var(--text);box-shadow:var(--shadow)}
.chat-edit-dialog::backdrop{background:#08070bbd;backdrop-filter:blur(5px)}
.chat-edit-dialog h2{margin:0 0 16px;font-size:24px}.chat-edit-dialog textarea{display:block;box-sizing:border-box;width:100%;min-height:220px;max-height:50dvh;resize:vertical;padding:14px;border:1px solid #715169;border-radius:12px;background:#100d16;color:var(--text);font:inherit;line-height:1.65}
.chat-edit-dialog p{font-size:12px;line-height:1.6;color:var(--muted)}.chat-edit-dialog p[role=alert]{color:#f0a7c0}
.chat-edit-dialog form>div{display:flex;justify-content:flex-end;gap:10px}.chat-edit-dialog button{padding:10px 18px;border:1px solid #80556f;border-radius:10px;background:transparent;color:var(--text);font:inherit;cursor:pointer}.chat-edit-dialog button[type=submit]{background:var(--pink);color:#20101a;border-color:transparent}.chat-edit-dialog button:disabled{opacity:.5}
@media(pointer:coarse){.chat-message-actions{gap:1px}.chat-message-actions button{width:38px;height:40px}}
.generated-chat-media{width:min(330px,100%);margin:0 0 6px;border:0;background:transparent}
.generated-chat-media>img,.generated-chat-media video,.chat-media-photo-button img{display:block;width:100%;height:auto;max-height:430px;object-fit:contain;border-radius:10px;background:#100d14}
.chat-media-photo-button{display:block;width:100%;padding:0;border:0;border-radius:10px;background:transparent;cursor:zoom-in}
.chat-media-photo-button:focus-visible{outline:2px solid var(--pink);outline-offset:3px}
.generated-chat-media>[hidden]{display:none!important}
.chat-media-loading{width:300px;max-width:100%;aspect-ratio:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;padding:24px 20px;border:1px solid #ffffff0d;border-radius:12px;background:radial-gradient(ellipse at 40% 25%,#65415766,transparent 65%),linear-gradient(145deg,#2d222f,#18151d);color:var(--muted);text-align:center;font-size:13px}
.chat-media-loading.is-video{aspect-ratio:3/4}
.chat-media-loading-icon{display:grid;place-items:center;width:64px;height:64px;border:1px solid #ed85ad30;border-radius:18px;background:#ed85ad09;color:var(--pink);font-size:36px;line-height:1}
