.client-chat-body { margin:0; background:#e9eaf2; }.client-chat { width:min(100%,430px); height:100dvh; margin:auto; background:#f4f1f9; display:flex; flex-direction:column; overflow:hidden; padding-top:env(safe-area-inset-top,0px); box-sizing:border-box; }.client-chat .chat-topbar { display:flex; align-items:center; gap:12px; min-height:56px; height:auto; padding:5px 12px; background:#fff; border-bottom:1px solid #e9e1f0; flex-shrink:0; }.client-chat .chat-topbar > div { min-width:0; flex:1; }.client-chat .chat-topbar .chat-back { display:grid; place-items:center; flex:0 0 44px; width:44px; min-height:44px; height:44px; }.client-chat .chat-topbar .chat-agent-mark { flex-shrink:0; }.chat-back { text-decoration:none; font-size:35px; line-height:1; color:#776380; width:30px; }.chat-topbar h1 { position:static; transform:none; font-size:18px; font-weight:650; margin:0; }.chat-topbar p { font-size:11px; color:#8c779b; margin:3px 0 0; }.chat-agent-mark { margin-left:auto; display:grid; place-items:center; background:linear-gradient(135deg,#d48bfc,#942cd5); color:#fff; width:38px; height:38px; border-radius:50%; font-size:13px; font-weight:700; }.chat-history { flex:1; min-height:0; overflow-y:auto; overscroll-behavior:contain; padding:18px 14px; scroll-behavior:auto; }.chat-welcome { color:#8c7798; font-size:12px; line-height:1.7; padding:13px 16px; border-radius:14px; background:#ffffffab; margin-bottom:20px; }.chat-message { display:flex; flex-direction:column; margin:0 0 18px; align-items:flex-start; }.chat-message-own { align-items:flex-end; }.chat-message-bubble { max-width:86%; min-width:45px; border:1px solid #ede4f4; border-radius:4px 16px 16px 16px; background:#fff; padding:11px 14px; box-shadow:0 2px 7px #5c357408; color:#46354f; font-size:14px; line-height:1.65; overflow:hidden; }.chat-message-own .chat-message-bubble { color:#fff; border:0; background:linear-gradient(135deg,#b64ee5,#9c30d7); border-radius:16px 4px 16px 16px; }.chat-message-text { font:inherit; color:inherit; white-space:pre-wrap; overflow-wrap:anywhere; margin:0; text-align:left; }.chat-message-bubble img,.chat-message-bubble video { display:block; max-width:100%; max-height:350px; width:auto; border-radius:8px; }.chat-message-bubble a { display:block; }.chat-message-meta { color:#998aa5; font-size:10px; margin:5px 3px 0; }.chat-order-card { min-width:160px; border-radius:9px; padding:9px 12px; background:#f5effa; color:#705185; border:1px solid #e4d1ef; }.chat-message-own .chat-order-card { color:#fff; border-color:#ffffff55; background:#ffffff15; }.chat-order-card p { font-size:12px; color:inherit; margin:4px 0; text-align:left; }.chat-order-card p:first-child { font-size:14px; font-weight:700; }.chat-compose-area { flex-shrink:0; background:#fff; border-top:1px solid #e7ddee; padding:5px 10px max(10px,env(safe-area-inset-bottom,0px)); }.chat-compose { display:flex; align-items:flex-end; gap:6px; }.chat-compose textarea { min-width:0; flex:1; background:#f5f1f8; border:1px solid #ede6f2; border-radius:12px; padding:11px 12px; resize:none; max-height:120px; min-height:44px; font:16px/1.4 system-ui,sans-serif; color:#4e3b5c; }.chat-compose button { min-height:43px; padding:5px; }.chat-plus { width:34px; flex:0 0 34px; color:#9d44ce; font-size:30px; line-height:1; }.chat-compose #chat-emoji { font-size:27px; color:#887491; }.chat-compose .chat-send { background:#a13ad9; color:#fff; border-radius:11px; font-size:13px; padding:8px 10px; min-width:49px; font-weight:600; }.chat-send:disabled { opacity:.55; }.chat-feedback { color:#9966b0; font-size:11px; line-height:1.5; padding:0 3px; min-height:5px; }.chat-feedback:not(:empty) { padding:6px 3px; }.chat-pending { display:flex; align-items:center; justify-content:space-between; gap:10px; background:#f6eefc; color:#86569f; border:1px solid #ead9f4; padding:8px 12px; border-radius:9px; margin:5px 0; font-size:12px; }.chat-pending span { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }.chat-pending button { font-size:24px; color:#9768b0; }.chat-pending[hidden],.chat-add-menu[hidden] { display:none; }.chat-add-menu { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; padding:14px 10px; }.chat-add-menu button { display:grid; gap:4px; place-items:center; color:#876b99; font-size:12px; }.chat-add-menu button span { display:grid; place-items:center; background:#f5effa; border:1px solid #eee3f5; border-radius:13px; width:48px; height:48px; font-size:25px; color:#ab49de; }.chat-load-older { display:block; margin:0 auto 18px; color:#9a61b6; font-size:12px; padding:8px 12px; background:#fff; border:1px solid #e9dcef; border-radius:20px; }.chat-load-older[hidden] { display:none; }#chat-order-dialog { text-align:left; max-height:75dvh; }#chat-order-dialog h2 { font-size:20px; }#chat-order-dialog p { font-size:12px; }.chat-order-close { position:absolute; top:8px; right:8px; color:#9b7ba9; font-size:25px; width:35px; height:35px; }.chat-order-choice { display:block; width:100%; text-align:left; padding:13px; background:#f7effc; border:1px solid #e9d8f3; border-radius:10px; margin:10px 0; font-size:13px; line-height:1.7; color:#805597; }
.support-desk { display:grid; grid-template-columns:290px minmax(0,1fr); min-height:520px; height:calc(100dvh - 300px); max-height:850px; overflow:hidden; border:1px solid #e7d9f0; border-radius:16px; background:#fff; }.support-desk-list { display:flex; flex-direction:column; min-height:0; border-right:1px solid #eee5f3; }.support-desk-list-head { padding:17px; border-bottom:1px solid #eee5f3; }.support-desk-list-head h2 { font-size:18px; margin:0 0 12px; color:#735580; }.support-desk-list-head input { width:100%; font-size:14px; margin:0 0 8px; }.support-desk-list-head small { font-size:12px; color:#a08aab; }#support-desk-conversations { padding:10px; overflow:auto; flex:1; min-height:0; }.support-desk-conversation { display:block; width:100%; padding:13px; background:white; text-align:left; border-radius:11px; color:#725080; margin-bottom:7px; }.support-desk-conversation.selected { background:#f4e9fb; box-shadow:inset 3px 0 #af4ce1; }.support-desk-conversation strong { display:flex; justify-content:space-between; font-size:14px; }.support-desk-conversation p { font-size:12px; color:#9782a1; margin:5px 0; overflow-wrap:anywhere; }.support-desk-conversation small { display:block; color:#a38cae; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }.support-unread:not(:empty) { padding:1px 7px; border-radius:20px; color:#fff; background:#b14bdc; font-size:11px; }.support-desk-chat { min-width:0; min-height:0; display:flex; flex-direction:column; }.support-desk-title { display:flex; align-items:center; gap:12px; justify-content:space-between; border-bottom:1px solid #eee5f3; padding:18px; color:#765286; }.support-desk-title span { font-size:12px; color:#a386b2; }.support-desk-chat .chat-history { background:#f9f5fc; }.support-desk-chat .chat-message-meta { font-size:12px; }.support-desk-compose { padding:12px 15px; border-top:1px solid #eee5f3; }.support-desk-compose textarea { width:100%; font:14px/1.6 system-ui,sans-serif; resize:none; border:1px solid #e8d8f0; background:#fcfaff; border-radius:10px; padding:10px 12px; color:#6c507a; }.support-desk-compose > div { display:flex; gap:10px; margin-top:10px; }.support-desk-compose .primary { margin-left:auto; }.support-desk-chat .chat-pending { margin:5px 15px; }@media(max-width:1000px){.support-desk { grid-template-columns:210px minmax(0,1fr); }}@media(max-width:650px){.support-desk { height:auto; min-height:75dvh; grid-template-columns:1fr; }.support-desk-list { max-height:230px; border-right:0; border-bottom:1px solid #e7d9f0; }.support-desk-chat { min-height:65dvh; max-height:80dvh; }.support-desk-title { flex-wrap:wrap; }.support-desk-compose > div { flex-wrap:wrap; }}
.chat-topbar .chat-timezone { font-size:10px; color:#a08dad; margin-top:2px; }.support-desk-zone { display:block; margin-top:5px; font-size:11px; font-weight:400; color:#a386b2; }.support-desk-settings-head { display:flex; justify-content:space-between; gap:10px; align-items:center; margin-bottom:12px; }.support-desk-settings-head h2 { margin:0; }.support-desk-settings-head button { font-size:12px; padding:7px 10px; }.support-settings-note { background:#f7f0fc; border:1px solid #e9d9f3; padding:13px; border-radius:10px; font-size:13px; color:#886299; }.support-settings-note p { font-size:12px; }.support-settings-enabled { display:flex; align-items:center; gap:8px; margin:15px 0; }.support-settings-label { display:block; margin:15px 0 8px; }.support-settings-label textarea { width:100%; border:1px solid #e2d1ec; border-radius:10px; padding:11px; font:14px/1.7 system-ui,sans-serif; color:#694e77; background:#fcfaff; resize:vertical; }
.chat-message-text + a,.chat-message-text + video { margin-top:10px; }
.chat-agent-mark { flex-shrink:0; overflow:hidden; }.chat-agent-mark img { width:100%; height:100%; object-fit:cover; }.chat-message.chat-agent-message { position:relative; padding-left:38px; }.chat-message.chat-agent-message.chat-message-own { padding-left:0; padding-right:38px; }.chat-author-avatar { position:absolute; top:0; left:0; width:30px; height:30px; border-radius:50%; overflow:hidden; background:linear-gradient(135deg,#cf7af8,#9b31d7); color:#fff; display:grid; place-items:center; font-size:10px; font-weight:700; }.chat-message-own .chat-author-avatar { left:auto; right:0; }.chat-author-avatar img { width:100%; height:100%; object-fit:cover; }.support-avatar-settings { display:flex; align-items:center; gap:15px; margin:16px 0; }.support-avatar-settings > img { width:72px; height:72px; border-radius:50%; object-fit:cover; }.support-avatar-settings > img[hidden] { display:none; }.support-avatar-settings .support-settings-label { margin:0 0 10px; }.chat-topbar > div { min-width:0; }.chat-topbar h1 { overflow-wrap:anywhere; }
.chat-welcome-actions { display:grid; grid-template-columns:1fr 1fr; gap:9px; margin:13px 0 3px; }.chat-welcome-action { display:flex; align-items:center; justify-content:center; gap:6px; min-height:39px; padding:8px 10px; border-radius:10px; font-size:12px; font-weight:650; white-space:nowrap; }.chat-welcome-live { background:linear-gradient(135deg,#bd61e7,#9a33d4); color:white; }.chat-welcome-facebook { background:#eef3ff; border:1px solid #d7e2fc; color:#2870d5; }.chat-welcome-button-icon { font-size:17px; line-height:1; }.chat-welcome-facebook .chat-welcome-button-icon { font-family:Arial,sans-serif; font-weight:800; }.chat-welcome-actions + a { margin-top:12px; }
.support-faq-editor-dialog { width:min(96vw,1120px); max-height:92dvh; }.support-faq-editor textarea { display:block; width:100%; box-sizing:border-box; border:1px solid #e3d1ee; border-radius:10px; padding:10px 12px; resize:vertical; font:14px/1.7 system-ui,sans-serif; background:#fcfaff; color:#644a75; margin-top:8px; }.support-faq-editor label { display:block; margin:0 0 15px; font-size:13px; }.support-faq-global { display:grid; grid-template-columns:1fr 1.3fr; gap:18px; padding:14px; background:#faf6fe; border:1px solid #eee0f6; border-radius:12px; margin-bottom:18px; }.support-faq-workspace { display:grid; grid-template-columns:290px minmax(0,1fr); gap:20px; }.support-faq-workspace > aside { padding:12px; border:1px solid #eaddf2; border-radius:12px; align-self:start; }.support-faq-toolbar { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:15px; color:#80568e; font-size:14px; }.support-help-topic-row { border:1px solid #eee3f5; border-radius:10px; margin-bottom:9px; padding:9px; }.support-help-topic-row.selected { background:#f6eafb; border-color:#dcb4f0; }.support-help-topic-row > button { display:block; width:100%; text-align:left; background:none; color:#845a96; font-size:13px; line-height:1.6; padding:0; overflow-wrap:anywhere; }.support-help-topic-row small { display:block; color:#a08baa; font-size:11px; }.support-help-topic-row > div { display:flex; justify-content:flex-end; gap:10px; }.support-help-topic-row > div button { background:none; color:#ad73c4; font-size:18px; padding:2px 5px; }.support-help-topic-row button:disabled { opacity:.3; }.support-help-item { padding:15px; border:1px solid #eadcf4; border-radius:12px; margin:12px 0; background:#fcfaff; }.support-help-item-head { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:12px; font-size:13px; color:#8a579c; }.support-help-item-head button { background:none; color:#aa7bbc; font-size:12px; padding:5px; }.support-desk-settings-head > div { display:flex; flex-wrap:wrap; gap:4px; }@media(max-width:780px){.support-faq-workspace,.support-faq-global { grid-template-columns:1fr; }.support-faq-workspace > aside { max-height:240px; overflow:auto; }}

/* Client chat only; keep the Chinese admin desk styling unchanged. */
body.client-chat-body{background:#c8c0d4}.client-chat{background:#d9d0e4}.client-chat .chat-topbar,.client-chat .chat-compose-area{background:#dfd4ea;border-color:#c5afd4}.client-chat .chat-history{background:#d9d0e4}.client-chat .chat-bubble{background:#e8e0ef;border-color:#cdbdda;color:#30213c}.client-chat .chat-message-own .chat-bubble{background:#d5b5e8;color:#382044}.client-chat #chat-input,.client-chat .chat-add-menu{background:#e8e0ef;border-color:#c7afd7;color:#36223f}.client-chat .chat-message-meta{color:#725e80}

/* Two-line agent names fit the compact bar without reducing text size. */
html[data-theme] body.client-chat-body .client-chat .chat-topbar h1{line-height:1.2;overflow-wrap:anywhere}

/* Noto Color Emoji 2.057, Unicode 18.0. License: /assets/chat-emoji-font-license.txt. */
@font-face{
 font-family:"Chat Emoji";
 src:url("/assets/chat-emoji.bf248ca0c668.woff2") format(woff2) tech(color-COLRv1);
 font-display:swap;
}
:root{--chat-emoji-family:"Chat Emoji","Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif}
.chat-message-text,html[data-theme] .client-chat .chat-compose textarea,#admin-shell .support-desk-compose textarea{
 font-family:var(--polish-font,system-ui),var(--chat-emoji-family);
}

/* Emoji choices stay above the composer and scroll within the available space. */
.chat-emoji-panel{
 display:flex;
 flex-direction:column;
 gap:6px;
 box-sizing:border-box;
 min-width:0;
 max-height:min(320px,46dvh);
 margin:4px 0 8px;
 padding:8px;
 border:1px solid var(--polish-border,#d4c3de);
 border-radius:12px;
 background:var(--polish-raised,#f4ebfa);
 color:var(--polish-ink,#46354f);
}
.chat-emoji-panel[hidden]{display:none}
.chat-emoji-search{
 box-sizing:border-box;
 width:100%;
 min-width:0;
 min-height:38px;
 padding:6px 9px;
 border:1px solid var(--polish-border,#d4c3de);
 border-radius:8px;
 background:var(--polish-panel,#fff);
 color:inherit;
 font:16px/1.4 system-ui,sans-serif;
}
.chat-emoji-categories{
 display:flex;
 flex:none;
 gap:4px;
 overflow:auto hidden;
 padding:2px;
 scrollbar-width:thin;
}
.chat-emoji-category,.chat-emoji-choice{
 border:1px solid transparent;
 border-radius:7px;
 color:inherit;
}
.chat-emoji-category{
 min-height:34px;
 padding:3px 8px;
 font-size:12px;
 font-weight:650;
 white-space:nowrap;
}
.chat-emoji-category[aria-pressed="true"],.chat-compose #chat-emoji[aria-expanded="true"]{
 border-radius:7px;
 background:var(--polish-panel,#fff);
 color:var(--polish-accent,#844e9b);
}
.chat-emoji-category[aria-pressed="true"]{border-color:var(--polish-border,#d4c3de)}
.chat-emoji-choices{
 display:grid;
 grid-template-columns:repeat(auto-fill,minmax(40px,1fr));
 align-content:start;
 gap:2px;
 min-height:0;
 overflow:auto;
 overscroll-behavior:contain;
 padding:3px;
 scrollbar-width:thin;
}
.chat-emoji-choice{
 display:grid;
 place-items:center;
 min-height:40px;
 min-width:0;
 padding:0;
 font-size:23px;
 font-weight:400;
 line-height:1;
}
html[data-theme] .chat-emoji-panel .chat-emoji-choice,#admin-shell .chat-emoji-panel .chat-emoji-choice{
 font-family:var(--chat-emoji-family);
}
.chat-emoji-choice:hover,.chat-emoji-category:hover{background:var(--polish-panel,#fff)}
.client-chat .chat-emoji-panel :is(input,button):focus-visible{
 outline:2px solid var(--polish-accent,#844e9b);
 outline-offset:-2px;
}
.chat-emoji-notice{
 flex:none;
 margin:0;
 color:var(--polish-muted,#705185);
 font-size:12px;
 line-height:1.4;
}
.chat-emoji-notice:empty{display:none}

.chat-message-text.chat-message-emoji-only{
 font-family:var(--chat-emoji-family);
 font-size:clamp(30px,7.5vw,40px);
 line-height:1.22;
}

.support-desk-compose .chat-emoji-panel{
 max-height:min(235px,34dvh);
 margin-bottom:0;
}
.support-desk-compose .chat-emoji-search{margin-top:0}
.support-desk-compose #support-desk-emoji[aria-expanded="true"]{
 border-color:#ac70c7;
 background:#ede2f6;
}
.support-desk-chat .chat-pending img{
 flex:none;
 width:58px;
 height:48px;
 object-fit:contain;
 border-radius:5px;
}
.support-desk-chat .chat-pending span{flex:1;min-width:0}
