/* 师生消息：会话列表与短信式对话
   教学中心 / 学生中心 / 门户共用，支持浅色与夜间。 */
.xjm-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, .64);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.xjm-shell {
  display: flex;
  flex-direction: column;
  width: min(780px, 100%);
  height: min(690px, calc(100vh - 40px));
  height: min(690px, calc(100dvh - 40px));
  overflow: hidden;
  border: 1px solid rgba(120, 130, 150, .24);
  border-radius: 18px;
  background: rgba(250, 251, 254, .98);
  box-shadow: 0 30px 80px rgba(2, 12, 30, .30), 0 8px 24px rgba(2, 12, 30, .16);
  color: #0c2347;
}
.xjm-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 15px;
  border-bottom: 1px solid rgba(120, 130, 150, .18);
  background: rgba(255, 255, 255, .72);
}
.xjm-head-main { min-width: 0; flex: 1 1 auto; }
.xjm-head h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.xjm-head p {
  margin: 2px 0 0;
  font-size: 11.5px;
  line-height: 1.4;
  color: #68788a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.xjm-back,
.xjm-close,
.xjm-push {
  flex: 0 0 auto;
  border: 1px solid rgba(120, 130, 150, .26);
  border-radius: 9px;
  background: rgba(255, 255, 255, .78);
  color: #415466;
  cursor: pointer;
}
.xjm-back {
  width: 30px;
  height: 30px;
  padding: 0;
  font-size: 19px;
  line-height: 1;
}
.xjm-close {
  width: 30px;
  height: 30px;
  padding: 0;
  font-size: 14px;
}
.xjm-back:hover,
.xjm-close:hover { background: #eef5fc; color: #1d5d9b; }
.xjm-push[hidden] { display: none; }
.xjm-push {
  min-height: 30px;
  padding: 0 10px;
  font-size: 11.5px;
  white-space: nowrap;
}
.xjm-push:hover { background: #eef5fc; color: #1d5d9b; }
.xjm-push[disabled] { opacity: .6; cursor: default; }
.xjm-body {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.xjm-list {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px 9px 16px;
}
.xjm-list-empty,
.xjm-chat-empty {
  padding: 42px 20px;
  text-align: center;
  font-size: 12.5px;
  line-height: 1.8;
  color: #7a8796;
}
.xjm-quick {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 13px;
  border-bottom: 1px solid rgba(120, 130, 150, .15);
  background: rgba(247, 250, 254, .9);
  font-size: 11.5px;
  color: #5f7183;
}
.xjm-quick-btn,
.xjm-contact-back {
  flex: 0 0 auto;
  min-height: 29px;
  padding: 0 10px;
  border: 1px solid rgba(47, 111, 178, .26);
  border-radius: 8px;
  background: #fff;
  color: #1d5d9b;
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}
.xjm-quick-btn:hover,
.xjm-contact-back:hover { background: #eef6ff; }
.xjm-contact-wrap {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px 12px 18px;
}
.xjm-contact-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 2px;
  font-size: 13px;
  font-weight: 700;
}
.xjm-contact-hint {
  margin: 6px 2px 10px;
  font-size: 11.5px;
  line-height: 1.65;
  color: #718193;
}
.xjm-contacts { display: grid; gap: 7px; }
.xjm-contact {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid rgba(120, 130, 150, .15);
  border-radius: 12px;
  background: #fff;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.xjm-contact:hover { border-color: rgba(47, 111, 178, .3); background: #f5faff; }
.xjm-thread {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 12px;
  margin: 4px 0;
  border: 1px solid rgba(120, 130, 150, .13);
  border-radius: 12px;
  background: #fff;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.xjm-thread:hover { background: #f5faff; border-color: rgba(47, 111, 178, .28); }
.xjm-thread.unread { background: #fffdf3; border-color: #f0e3b8; }
.xjm-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(145deg, #0d3e73, #2373b5);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}
.xjm-avatar img { width: 100%; height: 100%; object-fit: cover; }
.xjm-avatar.support { background: #fff; }
.xjm-head .xjm-avatar { flex-basis: 34px; width: 34px; height: 34px; font-size: 12px; }
.xjm-thread-main { min-width: 0; flex: 1 1 auto; }
.xjm-thread-top { display: flex; align-items: center; gap: 6px; justify-content: flex-start; }
.xjm-thread-top b { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.xjm-thread-top small { flex: 0 0 auto; margin-left: auto; font-size: 10.5px; color: #8491a0; }
.xjm-thread-preview {
  display: block;
  margin: 4px 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11.5px;
  color: #6c7c8d;
}
.xjm-unread {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #e5484d;
  color: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
}
.xjm-chat {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.xjm-messages {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px 14px 18px;
  background:
    radial-gradient(circle at 12% 0, rgba(47, 111, 178, .06), transparent 32%),
    #f8fafc;
}
.xjm-msg { display: flex; flex-direction: column; align-items: flex-start; gap: 0; margin: 11px 0; }
.xjm-msg.mine { align-items: flex-end; }
.xjm-bubble {
  flex: 0 1 auto;
  width: max-content;
  max-width: min(78%, 520px);
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid rgba(120, 130, 150, .16);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(20, 40, 70, .04);
  font-size: 12.5px;
  line-height: 1.65;
  word-break: break-word;
  white-space: pre-wrap;
}
.xjm-msg.mine .xjm-bubble {
  border-color: rgba(10, 132, 255, .28);
  background: linear-gradient(180deg, #e7f2ff, #dcecfb);
  color: #08345d;
}
.xjm-bubble.media {
  width: max-content;
  max-width: min(78%, 300px);
  padding: 4px;
  line-height: 0;
  overflow: hidden;
}
.xjm-media {
  display: block;
  max-width: 100%;
  border-radius: 9px;
  background: #101820;
}
.xjm-media-image {
  overflow: hidden;
  line-height: 0;
}
.xjm-media-image img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 280px;
  height: auto;
}
.xjm-media-video {
  width: min(272px, 100%);
  max-width: 100%;
  max-height: 320px;
  background: #000;
}
.xjm-media-text {
  padding: 7px 7px 5px;
  font-size: 12.5px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}
.xjm-msg-meta {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
  align-items: center;
  max-width: min(86%, 100%);
  margin: 0 3px 5px;
  font-size: 10px;
  line-height: 1.2;
  color: #93a0ae;
  white-space: nowrap;
}
.xjm-msg-meta span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.xjm-msg-meta span:last-child { flex: 0 0 auto; }
.xjm-compose {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  gap: 9px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(120, 130, 150, .18);
  background: rgba(255, 255, 255, .88);
}
.xjm-compose textarea {
  flex: 1 1 auto;
  min-height: 40px;
  max-height: 120px;
  padding: 10px 11px;
  resize: none;
  border: 1px solid #d8e3ee;
  border-radius: 11px;
  outline: none;
  background: #fff;
  color: inherit;
  font: inherit;
  font-size: 12.5px;
  line-height: 1.5;
}
.xjm-compose textarea:focus { border-color: #2f6fb2; box-shadow: 0 0 0 3px rgba(47, 111, 178, .10); }
.xjm-attach {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid #d8e3ee;
  border-radius: 11px;
  background: #fff;
  color: #53667a;
  cursor: pointer;
}
.xjm-attach:hover { border-color: #2f6fb2; color: #2f6fb2; background: #f4f9ff; }
.xjm-attach[disabled], .xjm-attach.busy { opacity: .55; cursor: default; }
.xjm-attach svg { pointer-events: none; }
.xjm-send {
  flex: 0 0 auto;
  min-width: 62px;
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 11px;
  background: #0a84ff;
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.xjm-send:hover { background: #006fdc; }
.xjm-send[disabled] { opacity: .55; cursor: default; }
.xjm-compose-hint {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-top: 1px solid rgba(120, 130, 150, .18);
  background: rgba(255, 255, 255, .88);
  font-size: 11px;
  line-height: 1.55;
  color: #8b98a7;
}
.xjm-push-hint {
  max-height: 120px;
  overflow: hidden;
  opacity: 1;
  transition: opacity .24s ease, max-height .3s ease, padding .3s ease, border-color .3s ease;
}
.xjm-push-hint.is-hiding {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-top-color: transparent;
  opacity: 0;
}
.xjm-push-app-link {
  display: inline-block;
  margin-top: 3px;
  color: #2f6bff;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
html[data-theme="dark"] .xjm-push-app-link,
html[data-dark="1"] .xjm-push-app-link { color: #8ab4ff; }
.xjm-error {
  padding: 8px 12px;
  border-top: 1px solid #f4c6c6;
  background: #fff4f4;
  color: #b42318;
  font-size: 11.5px;
  line-height: 1.5;
}
.xjm-toast {
  position: absolute;
  left: 50%;
  top: 14px;
  transform: translateX(-50%);
  z-index: 2;
  max-width: 88%;
  padding: 7px 12px;
  border-radius: 8px;
  background: rgba(9, 26, 42, .88);
  color: #fff;
  font-size: 11.5px;
  line-height: 1.5;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
}
.xjm-bell-dot {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border: 2px solid #f6f8fb;
  border-radius: 999px;
  background: #e5484d;
  color: #fff;
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
  line-height: 11px;
  text-align: center;
  pointer-events: none;
  box-sizing: content-box;
}
.xj-nav-bell,
#xjTeacherBell,
#studentMessagesBtn,
#teacherMessagesBtn { position: relative; }
.xjm-btn-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  margin-left: 6px;
  padding: 0 5px;
  border-radius: 999px;
  background: #e5484d;
  color: #fff;
  font-size: 9.5px;
  font-style: normal;
  font-weight: 700;
  line-height: 17px;
  vertical-align: middle;
}

html[data-theme="dark"] .xjm-shell,
html[data-dark="1"] .xjm-shell {
  border-color: #242b33;
  background: #000000;
  color: #e8f1fa;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55), 0 8px 24px rgba(0, 0, 0, .34);
}
html[data-theme="dark"] .xjm-head,
html[data-dark="1"] .xjm-head,
html[data-theme="dark"] .xjm-compose,
html[data-dark="1"] .xjm-compose,
html[data-theme="dark"] .xjm-compose-hint,
html[data-dark="1"] .xjm-compose-hint {
  background: #000000;
  border-color: #242b33;
}
html[data-theme="dark"] .xjm-head p,
html[data-dark="1"] .xjm-head p { color: #9eb0c1; }
html[data-theme="dark"] .xjm-back,
html[data-dark="1"] .xjm-back,
html[data-theme="dark"] .xjm-close,
html[data-dark="1"] .xjm-close,
html[data-theme="dark"] .xjm-push,
html[data-dark="1"] .xjm-push {
  border-color: #31485b;
  background: #16283a;
  color: #c6d6e6;
}
html[data-theme="dark"] .xjm-contact,
html[data-dark="1"] .xjm-contact,
html[data-theme="dark"] .xjm-quick,
html[data-dark="1"] .xjm-quick {
  border-color: #26384a;
  background: #142433;
  color: #e8f1fa;
}
html[data-theme="dark"] .xjm-contact-hint,
html[data-dark="1"] .xjm-contact-hint { color: #9eb0c1; }
html[data-theme="dark"] .xjm-quick-btn,
html[data-dark="1"] .xjm-quick-btn,
html[data-theme="dark"] .xjm-contact-back,
html[data-dark="1"] .xjm-contact-back {
  border-color: #31506a;
  background: #173049;
  color: #bcd9f2;
}
html[data-theme="dark"] .xjm-contact:hover,
html[data-dark="1"] .xjm-contact:hover { background: #1a344b; border-color: #3c6f9f; }
html[data-theme="dark"] .xjm-thread,
html[data-dark="1"] .xjm-thread {
  border-color: #26384a;
  background: #142433;
  color: #e8f1fa;
}
html[data-theme="dark"] .xjm-thread.unread,
html[data-dark="1"] .xjm-thread.unread { background: #2a2415; border-color: #554820; }
html[data-theme="dark"] .xjm-thread-preview,
html[data-dark="1"] .xjm-thread-preview { color: #9eb0c1; }
html[data-theme="dark"] .xjm-thread-top small,
html[data-dark="1"] .xjm-thread-top small,
html[data-theme="dark"] .xjm-msg-meta,
html[data-dark="1"] .xjm-msg-meta { color: #8396a8; }
html[data-theme="dark"] .xjm-messages,
html[data-dark="1"] .xjm-messages { background: #000000; }
html[data-theme="dark"] .xjm-bubble,
html[data-dark="1"] .xjm-bubble {
  border-color: #2a3c4e;
  background: #172839;
  color: #dce8f3;
}
html[data-theme="dark"] .xjm-msg.mine .xjm-bubble,
html[data-dark="1"] .xjm-msg.mine .xjm-bubble {
  border-color: #2f6fb2;
  background: #174263;
  color: #eaf5ff;
}
html[data-theme="dark"] .xjm-compose textarea,
html[data-dark="1"] .xjm-compose textarea {
  border-color: #2c333c;
  background: #050505;
  color: #e8f1fa;
}
html[data-theme="dark"] .xjm-attach,
html[data-dark="1"] .xjm-attach {
  border-color: #2c333c;
  background: #050505;
  color: #b9c9d8;
}
html[data-theme="dark"] .xjm-attach:hover,
html[data-dark="1"] .xjm-attach:hover {
  border-color: #3c6f9f;
  background: #16283a;
  color: #9ec8f0;
}
html[data-theme="dark"] .xjm-bubble.media,
html[data-dark="1"] .xjm-bubble.media {
  border-color: #2a3c4e;
  background: #172839;
}
html[data-theme="dark"] .xjm-list-empty,
html[data-dark="1"] .xjm-list-empty,
html[data-theme="dark"] .xjm-chat-empty,
html[data-dark="1"] .xjm-chat-empty { color: #9eb0c1; }
html[data-theme="dark"] .xjm-bell-dot,
html[data-dark="1"] .xjm-bell-dot { border-color: #0b1825; }
html[data-theme="dark"] .xjm-push-app-link,
html[data-dark="1"] .xjm-push-app-link { color: #8ab4ff; }
html[data-theme="dark"] .xjm-error,
html[data-dark="1"] .xjm-error { border-color: #6b3535; background: #2a1717; color: #ffb4b0; }

.xjm-inbox { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.xjm-inbox .xjm-list { flex: 1 1 auto; min-height: 0; height: auto; }
.xjm-recent { flex: 0 0 auto; padding: 10px 12px 2px; border-bottom: 1px solid rgba(120, 130, 150, .13); }
.xjm-recent-head { margin: 0 2px 7px; font-size: 11.5px; font-weight: 700; color: #6a7c8f; letter-spacing: .04em; }
.xjm-recent-row { display: flex; gap: 12px; overflow-x: auto; padding: 0 2px 4px; scrollbar-width: thin; }
.xjm-recent-item { flex: 0 0 auto; width: 54px; padding: 0; border: 0; background: none; color: inherit; text-align: center; cursor: pointer; }
.xjm-recent-avatar { position: relative; display: block; width: 44px; height: 44px; margin: 0 auto 4px; }
.xjm-recent-avatar .xjm-avatar { flex-basis: 44px; width: 44px; height: 44px; font-size: 15px; box-shadow: 0 2px 6px rgba(20, 50, 85, .13); }
.xjm-recent-dot { position: absolute; top: 1px; right: 1px; width: 8px; height: 8px; border: 1.5px solid #fff; border-radius: 50%; background: #d9534f; }
.xjm-recent-item:hover .xjm-recent-avatar .xjm-avatar { box-shadow: 0 0 0 2px rgba(47, 111, 178, .22); }
.xjm-recent-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; color: #53667a; }
.xjm-peer-tag { flex: 0 0 auto; margin: 0; padding: 1px 5px; border-radius: 5px; background: #eaf2fc; color: #2a6aa6; font-size: 9.5px; font-style: normal; font-weight: 600; }
.xjm-support-tag { flex: 0 0 auto; margin: 0; padding: 1px 5px; border-radius: 5px; background: #f5ecdf; color: #8a5b20; font-size: 9.5px; font-style: normal; font-weight: 700; }
.xjm-auto-tag { display: inline-block; margin-left: 5px; padding: 0 4px; border-radius: 4px; background: #f5ecdf; color: #8a5b20; font-size: 8.5px; font-style: normal; font-weight: 600; vertical-align: 1px; }

html[data-theme="dark"] .xjm-recent-name,
html[data-dark="1"] .xjm-recent-name { color: #9fb2c4; }
html[data-theme="dark"] .xjm-recent-head,
html[data-dark="1"] .xjm-recent-head { color: #8fa3b5; }
html[data-theme="dark"] .xjm-recent-dot,
html[data-dark="1"] .xjm-recent-dot { border-color: #0b1825; }
html[data-theme="dark"] .xjm-peer-tag,
html[data-dark="1"] .xjm-peer-tag { background: #1d3a55; color: #9ec8f0; }
html[data-theme="dark"] .xjm-support-tag,
html[data-dark="1"] .xjm-support-tag,
html[data-theme="dark"] .xjm-auto-tag,
html[data-dark="1"] .xjm-auto-tag { background: #3b2d19; color: #f0c078; }

@media (max-width: 680px) {
  .xjm-overlay { padding: 8px; align-items: stretch; }
  .xjm-shell { height: calc(100vh - 16px); height: calc(100dvh - 16px); width: 100%; border-radius: 14px; }
  .xjm-head { padding: 10px 11px; }
  .xjm-head h3 { font-size: 14px; }
  .xjm-push { padding: 0 8px; font-size: 10.5px; }
  .xjm-quick { padding: 9px 10px; }
  .xjm-contact-wrap { padding: 10px 9px 16px; }
  .xjm-bubble { max-width: min(78%, 520px); }
  .xjm-messages { padding: 12px 9px 16px; }
  .xjm-overlay.xjm-keyboard { padding: 0; align-items: stretch; }
  .xjm-overlay.xjm-keyboard .xjm-shell { height: 100%; max-height: 100%; width: 100%; border-radius: 0; }
  .xjm-overlay.xjm-keyboard .xjm-head { flex: 0 0 auto; }
}

/* 聊天消息管理：静音、撤回、删除、删除会话 */
.xjm-shell { position: relative; }
.xjm-more {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid rgba(120, 130, 150, .26);
  border-radius: 9px;
  background: rgba(255, 255, 255, .78);
  color: #415466;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}
.xjm-more:hover { background: #eef5fc; color: #1d5d9b; }
.xjm-chat-menu {
  position: absolute;
  top: 52px;
  right: 12px;
  z-index: 8;
  min-width: 150px;
  padding: 5px;
  border: 1px solid rgba(120, 130, 150, .22);
  border-radius: 10px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 12px 32px rgba(2, 12, 30, .20);
}
.xjm-chat-menu-item {
  display: block;
  width: 100%;
  padding: 9px 11px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #25394b;
  font: inherit;
  font-size: 12.5px;
  line-height: 1.35;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}
.xjm-chat-menu-item:hover { background: #f1f6fc; }
.xjm-chat-menu-item.danger { color: #c0392b; }
.xjm-chat-menu-item.danger:hover { background: #fff1ef; }
.xjm-muted-tag {
  flex: 0 0 auto;
  margin: 0 6px 0 0;
  padding: 1px 5px;
  border-radius: 5px;
  background: #edf0f3;
  color: #7a8796;
  font-size: 9.5px;
  font-style: normal;
  font-weight: 600;
}
.xjm-recall-tip {
  margin: 9px auto;
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(125, 140, 155, .12);
  color: #8b98a7;
  font-size: 10.5px;
  line-height: 1.5;
  text-align: center;
  width: fit-content;
  max-width: 82%;
}
.xjm-msg-menu {
  position: fixed;
  z-index: 2100;
  min-width: 112px;
  padding: 5px;
  border: 1px solid rgba(120, 130, 150, .22);
  border-radius: 10px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 12px 32px rgba(2, 12, 30, .22);
}
.xjm-msg-menu-item {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #25394b;
  font: inherit;
  font-size: 12.5px;
  text-align: left;
  cursor: pointer;
}
.xjm-msg-menu-item:hover { background: #f1f6fc; }
.xjm-msg-menu-item.danger { color: #c0392b; }
.xjm-msg-menu-item.danger:hover { background: #fff1ef; }
.xjm-confirm {
  position: absolute;
  inset: 0;
  z-index: 9;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(6, 16, 28, .38);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.xjm-confirm-box {
  width: min(340px, 100%);
  padding: 20px 18px 16px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 46px rgba(2, 12, 30, .28);
  color: #0c2347;
  text-align: center;
}
.xjm-confirm-box h4 { margin: 0 0 9px; font-size: 15px; line-height: 1.4; }
.xjm-confirm-box p { margin: 0 0 18px; font-size: 12px; line-height: 1.7; color: #68788a; }
.xjm-confirm-actions { display: flex; gap: 9px; }
.xjm-confirm-actions button {
  flex: 1 1 0;
  min-height: 38px;
  border-radius: 9px;
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
}
.xjm-confirm-cancel { border: 1px solid #d6e0ea; background: #f7f9fc; color: #415466; }
.xjm-confirm-cancel:hover { background: #eef4fa; }
.xjm-confirm-delete { border: 1px solid #d9534f; background: #d9534f; color: #fff; }
.xjm-confirm-delete:hover { background: #c6423e; }
html[data-theme="dark"] .xjm-more,
html[data-dark="1"] .xjm-more { border-color: #31465a; background: #142636; color: #b7c8d8; }
html[data-theme="dark"] .xjm-chat-menu,
html[data-dark="1"] .xjm-chat-menu,
html[data-theme="dark"] .xjm-msg-menu,
html[data-dark="1"] .xjm-msg-menu { border-color: #31465a; background: #122331; }
html[data-theme="dark"] .xjm-chat-menu-item,
html[data-dark="1"] .xjm-chat-menu-item,
html[data-theme="dark"] .xjm-msg-menu-item,
html[data-dark="1"] .xjm-msg-menu-item { color: #d3e0eb; }
html[data-theme="dark"] .xjm-chat-menu-item:hover,
html[data-dark="1"] .xjm-chat-menu-item:hover,
html[data-theme="dark"] .xjm-msg-menu-item:hover,
html[data-dark="1"] .xjm-msg-menu-item:hover { background: #1a3043; }
html[data-theme="dark"] .xjm-chat-menu-item.danger,
html[data-dark="1"] .xjm-chat-menu-item.danger,
html[data-theme="dark"] .xjm-msg-menu-item.danger,
html[data-dark="1"] .xjm-msg-menu-item.danger { color: #ff9c93; }
html[data-theme="dark"] .xjm-muted-tag,
html[data-dark="1"] .xjm-muted-tag { background: #243542; color: #9fb0bf; }
html[data-theme="dark"] .xjm-recall-tip,
html[data-dark="1"] .xjm-recall-tip { background: rgba(125, 150, 175, .16); color: #9aabba; }
html[data-theme="dark"] .xjm-confirm-box,
html[data-dark="1"] .xjm-confirm-box { background: #122331; color: #dbe7f1; }
html[data-theme="dark"] .xjm-confirm-box p,
html[data-dark="1"] .xjm-confirm-box p { color: #9eb0c1; }
html[data-theme="dark"] .xjm-confirm-cancel,
html[data-dark="1"] .xjm-confirm-cancel { border-color: #31465a; background: #1a2d3d; color: #c6d5e2; }
.xjm-msg { -webkit-touch-callout: none; }
.xjm-bubble { touch-action: pan-y; }
