/* LinaIme V3.8 — Chat: mobile-first, compact and unobtrusive */
#chat .panel,#v23 .panel:has(#v23ChatLog){padding:clamp(12px,3.4vw,20px)!important;border-radius:22px!important;overflow:hidden}
#chat .panel>h2,#v23 .panel:has(#v23ChatLog)>h2{font-size:clamp(19px,4.7vw,24px)!important;line-height:1.25!important;margin:0 0 8px!important;display:flex!important;align-items:center!important;justify-content:flex-start!important}
#chat .chatlog,#v23 .v23chatlog{
 height:min(54dvh,440px)!important;min-height:250px!important;max-height:440px!important;
 padding:12px 8px!important;display:flex;flex-direction:column;gap:9px!important;
 overflow-y:auto!important;overscroll-behavior:contain;
 background:linear-gradient(150deg,#160f25c9,#21142c95)!important;
 border:1px solid #e8a6d739!important;border-radius:18px!important;
 scrollbar-width:thin;
}
#chat .bubble,#v23 .bubble{
 display:block!important;position:relative;flex:0 0 auto!important;
 width:max-content!important;min-width:0!important;max-width:min(82%,440px)!important;
 padding:9px 12px!important;border-radius:17px 17px 17px 5px!important;
 color:#fff!important;font-size:14px!important;font-weight:500!important;
 line-height:1.42!important;overflow-wrap:anywhere!important;word-break:normal!important;
 border:1px solid #e9cff020!important;box-shadow:0 3px 10px #07020a18!important;
 background:#392c45!important;margin:0!important;
}
#chat .bubble.me,#v23 .bubble.me{
 align-self:flex-end!important;background:linear-gradient(125deg,#904b80,#734479)!important;
 border-radius:17px 17px 5px 17px!important;
}
#chat .bubble small,#v23 .bubble small,#chat .v38-author{display:block;font-size:11px!important;line-height:1.2!important;color:#f1cce5!important;margin:0 0 4px!important;font-weight:500!important}
#chat .v38-message-row{display:flex;align-items:center;gap:7px;min-width:0;max-width:100%}
#chat .v38-chat-text{min-width:0;white-space:pre-wrap;flex:0 1 auto}
#chat .v38-message-actions{flex-shrink:0;position:relative;align-self:center}
#chat .v38-message-actions>summary{display:grid;place-items:center;cursor:pointer;list-style:none;min-width:28px;min-height:27px;border-radius:10px;background:#ffffff13;color:#efdeef;font-size:14px;letter-spacing:1px;line-height:1}
#chat .v38-message-actions>summary::-webkit-details-marker{display:none}
#chat .v38-message-actions[open]>summary{background:#ffffff26}
#chat .v38-action-drop{position:absolute;z-index:15;right:0;top:29px;padding:4px;background:#382543;border:1px solid #e9a8d75c;border-radius:11px;box-shadow:0 10px 20px #0006;min-width:120px}
#chat .v38-action-drop .msg-delete{display:block!important;min-height:32px!important;margin:0!important;padding:7px!important;white-space:nowrap!important;border-radius:8px!important;color:#ffe0e9!important;font-size:11px!important;background:#672d4a!important;max-width:none!important}
#chat .bubble:has(.v38-message-actions[open]){z-index:2}
#chat .v38-empty-chat{text-align:center;margin:auto;font-size:14px;max-width:230px}
#chat .v38-chat-head,#v23 .v38-chat-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 0 12px}
#chat .v38-chat-head h2,#v23 .v38-chat-head h2{margin:0!important;min-width:0;font-size:clamp(18px,4.5vw,23px)!important}
#chat .v38-chat-settings,#v23 .v38-chat-settings{position:relative;flex-shrink:0;max-width:100%}
#chat .v38-chat-settings>summary,#v23 .v38-chat-settings>summary{list-style:none;display:grid;place-items:center;width:39px;height:39px;background:#ffffff12;border:1px solid #efbbdf50;border-radius:13px;font-size:22px;cursor:pointer;color:#fff}
#chat .v38-chat-settings>summary::-webkit-details-marker,#v23 .v38-chat-settings>summary::-webkit-details-marker{display:none}
#chat .v38-chat-settings[open]>summary,#v23 .v38-chat-settings[open]>summary{background:#78436c}
#chat .v38-chat-settings-content,#v23 .v38-chat-settings-content{position:absolute;right:0;top:46px;width:min(270px,75vw);max-height:320px;overflow:auto;z-index:40;padding:10px;border:1px solid #e9aada75;border-radius:16px;background:#2a1a39;box-shadow:0 13px 30px #0009}
#chat .v38-chat-settings-content button,#v23 .v38-chat-settings-content button{width:100%!important;min-height:40px!important;margin:3px 0!important;padding:9px!important;text-align:left!important;font-size:12px!important;line-height:1.3!important;background:#ffffff12!important;border:1px solid #ffffff20!important;white-space:normal!important;box-shadow:none!important}
#chat .v38-chat-settings-content .muted,#v23 .v38-chat-settings-content .muted{font-size:11px!important}
#chat #v33ClearBasicWrap,#v23 #v34ChatTools{display:block!important;margin:0!important;padding:0!important;background:none!important;border:0!important}
#chat #v34ClearBasic{width:100%!important;margin:3px 0!important}
#chat .inline,#v23 .inline{display:flex!important;gap:7px!important;align-items:center!important;min-width:0!important;margin:12px 0 0!important;width:100%!important;max-width:100%!important}
#chat .inline input,#v23 .inline input{min-width:0!important;flex:1 1 0!important;width:0!important;height:44px!important;padding:9px 11px!important;margin:0!important;font-size:14px!important;border-radius:13px!important}
#chat .inline button,#v23 .inline button{flex:0 0 auto!important;min-height:44px!important;padding:9px 13px!important;border-radius:13px!important;font-size:13px!important}
#chat .inline button:last-child{padding:9px 12px!important}
#v23 .v23chatreact{margin:0!important}
#v23 .v38-premium-actions{position:relative;margin:7px 0 0}
#v23 .v38-premium-actions>summary{list-style:none;font-size:11px;cursor:pointer;color:#f7d6e7;opacity:.9;display:inline-flex;align-items:center;min-height:22px;padding:2px 5px;border-radius:7px;background:#ffffff0f}
#v23 .v38-premium-actions>summary::-webkit-details-marker{display:none}
#v23 .v38-premium-actions .v23chatreact{display:flex;gap:4px;flex-wrap:wrap;margin:7px 0 0!important}
#v23 .v38-premium-actions .v23chatreact button{min-height:29px!important;font-size:12px!important;padding:3px 7px!important}
#v23 .bubble audio,#v23 .bubble video,#v23 .bubble img{max-width:100%!important}
#v23 .v23chat-tools button{min-width:0!important}
@media(max-width:400px){#chat .panel,#v23 .panel:has(#v23ChatLog){padding:11px!important}#chat .chatlog,#v23 .v23chatlog{padding:8px 5px!important;gap:7px!important}#chat .bubble,#v23 .bubble{font-size:13px!important;max-width:85%!important;padding:8px 10px!important}#chat .inline button{padding:9px 10px!important}#v23 .v23choices button{font-size:11px!important}}
