/**
 * 商汤微聊 H5 → 对齐 APK 视觉（只改 H5，不动 APK）
 * 对照 APK colors/layout：
 *   accent #f65835 | 发泡 #fdded6 | home/tab #f6f6f6 | 字色 #313131 / #999
 *   登录 act_login_layout | 底栏 BottomNav | 会话 item_chat_conv
 */

:root {
  --st-accent: #f65835;
  --st-accent-hot: #ff5a33;
  --st-send-bubble: #fdded6;
  --st-send-bubble-sel: #f8937b;
  --st-recv-bubble: #ffffff;
  --st-text: #313131;
  --st-muted: #999999;
  --st-line: #cccccc;
  --st-tab-bg: #f6f6f6;
  --st-page-bg: #f6f6f6; /* APK homeColor */
  --st-list-bg: #ffffff;
  --st-selected: #e7e7e7; /* homeColorSelected */
  --st-divider: #dad9d9; /* layoutColorSelected */

  --wk-color-theme: #f65835;
  --wk-color-secondary: #f6f6f6;
  --wk-color-secondary-2: #f6f6f6;
  --wk-color-hover: #f0f0f0;

  --semi-color-primary: 246, 88, 53;
  --semi-color-primary-hover: 255, 90, 51;
  --semi-color-primary-active: 230, 70, 40;
}

body[theme-mode='dark'] {
  --wk-color-theme: #f65835;
  --semi-color-primary: 246, 88, 53;
}

html,
body,
#root {
  background: var(--st-page-bg) !important;
  color: var(--st-text);
}

/* ========== 登录 / 注册（对齐 APK，文档流防叠字） ========== */
.wk-login {
  background: #f6f6f6 url('/im-custom/icon_login_bg.png') center / cover no-repeat !important;
  min-height: 100vh !important;
  min-height: 100dvh !important;
  height: 100vh !important;
  height: 100dvh !important;
  display: flex !important;
  flex-direction: column !important;
  position: relative !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  box-sizing: border-box !important;
  -webkit-overflow-scrolling: touch !important;
}
.wk-login-content {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  max-width: none !important;
  flex: 1 1 auto !important;
  min-height: 100% !important;
  margin: 0 !important;
  padding: 0 0 40px !important;
  box-sizing: border-box !important;
  position: relative !important;
  z-index: 1 !important;
}
.wk-login-content-logo {
  display: none !important;
}

/* 登录：标题置顶；表单在剩余空间垂直居中（≈ centerInParent），禁止 absolute */
.wk-login-content-slogan {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  z-index: 1 !important;
  margin: calc(70px + env(safe-area-inset-top, 0px)) 30px 0 !important;
  padding: 0 !important;
  font-size: 32px !important;
  font-weight: 700 !important;
  color: var(--st-text) !important;
  text-align: center !important;
  line-height: 1.25 !important;
  letter-spacing: 0 !important;
  flex: 0 0 auto !important;
}
.wk-login-content-phonelogin {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  transform: none !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  z-index: 1 !important;
  flex: 1 1 auto !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
}

/* 注册：标题左对齐；表单紧跟标题（marginTop 20） */
body.st-login-register .wk-login {
  height: auto !important;
  min-height: 100vh !important;
  min-height: 100dvh !important;
}
body.st-login-register .wk-login-content-slogan {
  text-align: left !important;
}
body.st-login-register .wk-login-content-phonelogin {
  justify-content: flex-start !important;
  flex: 0 0 auto !important;
  margin-top: 20px !important;
}

.wk-login-content-form {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 20px !important;
  box-sizing: border-box !important;
}

.wk-login .st-field-label {
  display: none !important;
}
body.st-login-register .wk-login .st-field-label {
  display: block !important;
  font-size: 13px !important;
  color: var(--st-muted) !important;
  margin: 18px 10px 6px !important;
  padding: 0 !important;
  text-align: left !important;
  line-height: 1.2 !important;
}
body.st-login-register .wk-login .st-field-label-first {
  margin-top: 10px !important;
}

.wk-login .st-phone-row {
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  min-height: 40px !important;
  border-bottom: 1px solid var(--st-line) !important;
  margin: 0 !important;
  padding: 0 !important;
  position: relative !important;
  box-sizing: border-box !important;
}
.wk-login .st-phone-prefix {
  display: inline-flex !important;
  align-items: center !important;
  flex: 0 0 auto !important;
}
.wk-login .st-phone-code {
  flex: 0 0 auto !important;
  font-size: 14px !important;
  color: var(--st-text) !important;
  padding: 0 4px !important;
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 2px !important;
}
.wk-login .st-phone-arrow {
  display: inline-block !important;
  width: 0 !important;
  height: 0 !important;
  margin-left: 4px !important;
  border-left: 5px solid transparent !important;
  border-right: 5px solid transparent !important;
  border-top: 6px solid #666 !important;
}
body.st-login-register .st-phone-code {
  color: var(--st-accent) !important;
}
.wk-login .st-phone-sep {
  width: 1px !important;
  height: 15px !important;
  background: #d8d8d8 !important;
  margin: 0 10px 0 0 !important;
  flex-shrink: 0 !important;
  display: inline-block !important;
}
.wk-login .st-phone-row .st-phone-input,
.wk-login .st-phone-row input.st-phone-input,
.wk-login .st-phone-row input {
  border-bottom: none !important;
  margin: 0 !important;
  flex: 1 1 auto !important;
  padding-left: 10px !important;
  min-width: 0 !important;
  width: auto !important;
}

.wk-login .st-pwd-row {
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  min-height: 40px !important;
  margin-top: 20px !important;
  border-bottom: 1px solid var(--st-line) !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}
body.st-login-register .wk-login .st-pwd-row,
body.st-login-register .wk-login .st-invite-row,
body.st-login-register .wk-login .st-phone-row {
  margin-top: 0 !important;
}
.wk-login .st-pwd-row input,
.wk-login .st-pwd-row .st-pwd-input {
  border-bottom: none !important;
  flex: 1 1 auto !important;
  margin: 0 !important;
  width: auto !important;
  min-width: 0 !important;
  padding-right: 8px !important;
}
.wk-login .st-pwd-eye {
  flex: 0 0 36px !important;
  width: 36px !important;
  height: 36px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  background: transparent !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  position: relative !important;
  transform: none !important;
  right: auto !important;
  top: auto !important;
  z-index: 5 !important;
  pointer-events: auto !important;
  -webkit-tap-highlight-color: transparent !important;
  touch-action: manipulation !important;
}
.wk-login .st-pwd-eye svg {
  pointer-events: none !important;
}

.wk-login .st-invite-row {
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  min-height: 40px !important;
  margin: 0 !important;
  border-bottom: 1px solid var(--st-line) !important;
  padding: 0 !important;
}
.wk-login .st-invite-row input {
  border-bottom: none !important;
  flex: 1 1 auto !important;
  margin: 0 !important;
  width: 100% !important;
  padding-left: 0 !important;
}

.wk-login-content-form > div:not(.st-phone-row):not(.st-pwd-row):not(.st-invite-row):not(.st-login-links):not(.st-agree-row):not(.wk-login-content-form-buttons):not(.wk-login-content-form-others):not(.wk-login-content-form-scanlogin):not(.st-field-label),
.wk-login-content-form .wk-login-field {
  margin-bottom: 20px !important;
}

.wk-login-content-form input {
  width: 100% !important;
  height: 40px !important;
  margin: 0 !important;
  padding: 8px 4px !important;
  border: none !important;
  border-bottom: 1px solid var(--st-line) !important;
  border-radius: 0 !important;
  background: transparent !important;
  font-size: 14px !important;
  color: var(--st-text) !important;
  box-shadow: none !important;
  outline: none !important;
  box-sizing: border-box !important;
}
.wk-login-content-form input::placeholder {
  color: var(--st-muted) !important;
}
.wk-login-content-form input:focus {
  border-bottom-color: var(--st-accent) !important;
}

.wk-login-content-form-ok,
.wk-login-content-form-buttons button,
.wk-login-content-form button[type='submit'],
.wk-login .semi-button-primary {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: calc(100% - 20px) !important;
  max-width: none !important;
  min-height: 48px !important;
  height: 48px !important;
  margin: 50px 10px 0 !important;
  padding: 0 16px !important;
  border: none !important;
  border-radius: 30px !important;
  background: var(--st-accent) !important;
  color: #fff !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  box-shadow: none !important;
  text-align: center !important;
  line-height: 48px !important;
}
.wk-login-content-form-buttons {
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
}
.wk-login-content-form-buttons .wk-login-content-form-ok,
.wk-login-content-form-buttons button {
  margin-left: 10px !important;
  margin-right: 10px !important;
  width: calc(100% - 20px) !important;
}
.wk-login-content-form-ok .semi-button-content,
.wk-login .semi-button-primary .semi-button-content {
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  color: #fff !important;
}
.wk-login-content-form-ok:disabled,
.wk-login-content-form-buttons button:disabled,
.wk-login .semi-button-primary:disabled,
.wk-login .semi-button-primary[aria-disabled='true'] {
  opacity: 0.2 !important;
}
body.st-login-register .wk-login-content-form-ok,
body.st-login-register .wk-login-content-form-buttons button {
  margin-top: 36px !important;
}

.wk-login-content-form-scanlogin,
.wk-login-content-scanlogin,
.wk-login-content-scanlogin-show,
.wk-login-content-form-others,
.wk-login-footer,
.wk-login-footer-buttons {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

.wk-login .st-login-links {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 0 !important;
  margin-top: 15px !important;
  padding: 0 20px !important;
  background: transparent !important;
  text-align: center !important;
}
.wk-login .st-login-links a,
.wk-login .st-login-links span {
  font-size: 13px !important;
  color: var(--st-accent) !important;
  background: transparent !important;
  border: none !important;
  padding: 4px 6px !important;
  cursor: pointer !important;
}
.wk-login .st-login-links .st-link-sep {
  width: 1px !important;
  height: 15px !important;
  background: var(--st-line) !important;
  margin: 0 10px !important;
  padding: 0 !important;
  display: inline-block !important;
}

.wk-login .st-agree-row {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 2px !important;
  margin-top: 10px !important;
  padding: 0 !important;
  font-size: 14px !important;
  color: var(--st-text) !important;
  line-height: 1.4 !important;
}
body.st-login-register .wk-login .st-agree-row {
  margin-top: 16px !important;
}
.wk-login .st-agree-cb {
  -webkit-appearance: none !important;
  appearance: none !important;
  width: 18px !important;
  height: 18px !important;
  margin: 0 5px 0 0 !important;
  border: 1.5px solid var(--st-accent) !important;
  border-radius: 50% !important;
  background: var(--st-accent) !important;
  flex-shrink: 0 !important;
  position: relative !important;
  box-sizing: border-box !important;
}
.wk-login .st-agree-cb:checked::after {
  content: '' !important;
  position: absolute !important;
  left: 5px !important;
  top: 2px !important;
  width: 4px !important;
  height: 8px !important;
  border: solid #fff !important;
  border-width: 0 2px 2px 0 !important;
  transform: rotate(45deg) !important;
}
.wk-login .st-agree-cb:not(:checked) {
  background: transparent !important;
}
.wk-login .st-agree-text {
  color: var(--st-text) !important;
  font-size: 14px !important;
}
.wk-login .st-agree-link {
  color: var(--st-accent) !important;
  font-size: 14px !important;
  text-decoration: none !important;
}
body:not(.st-login-register) .wk-login .st-agree-link {
  color: var(--st-muted) !important;
}

/* 协议页内抽屉：不跳出登录页 */
.st-legal-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 100000 !important;
  background: rgba(0, 0, 0, 0.45) !important;
  display: flex !important;
  align-items: flex-end !important;
  justify-content: center !important;
}
.st-legal-sheet {
  width: 100% !important;
  max-width: 520px !important;
  height: min(88vh, 720px) !important;
  background: #fff !important;
  border-radius: 16px 16px 0 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.18) !important;
}
.st-legal-head {
  flex: 0 0 auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  height: 48px !important;
  padding: 0 8px !important;
  border-bottom: 1px solid #eee !important;
}
.st-legal-title {
  flex: 1 !important;
  text-align: center !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  color: #222 !important;
}
.st-legal-close,
.st-legal-head-spacer {
  width: 40px !important;
  height: 40px !important;
  border: 0 !important;
  background: transparent !important;
  font-size: 18px !important;
  color: #666 !important;
  cursor: pointer !important;
  line-height: 40px !important;
  text-align: center !important;
  padding: 0 !important;
}
.st-legal-frame {
  flex: 1 1 auto !important;
  width: 100% !important;
  border: 0 !important;
  background: #f5f7fb !important;
}
html.st-legal-open,
html.st-legal-open body {
  overflow: hidden !important;
}

.wk-login .st-reg-top-login {
  position: absolute !important;
  top: calc(48px + env(safe-area-inset-top, 0px)) !important;
  right: 30px !important;
  z-index: 5 !important;
  font-size: 14px !important;
  color: var(--st-accent) !important;
  cursor: pointer !important;
  background: none !important;
  border: none !important;
  padding: 0 !important;
  line-height: 1.2 !important;
}
body:not(.st-login-register) .st-reg-top-login {
  display: none !important;
}

.ant-btn-primary,
button[type='submit'],
.semi-button-primary,
.wk-but-ok {
  background: var(--st-accent) !important;
  border-color: var(--st-accent) !important;
  color: #fff !important;
  border-radius: 30px !important;
}
.ant-btn-primary:hover,
.semi-button-primary:hover,
.wk-but-ok:hover {
  background: var(--st-accent-hot) !important;
  border-color: var(--st-accent-hot) !important;
}
a.ant-btn-link,
.ant-btn-link {
  color: var(--st-accent) !important;
}

/* ========== 会话列表（对齐 item_chat_conv：头像槽 60、上下 padding 5） ========== */
.wk-chat-conversation-list,
.wk-conversationlist,
.wk-conversation-list {
  background: var(--st-page-bg) !important;
}
.wk-conversationlist-item,
.wk-chat-conversation-list-item {
  background: var(--st-list-bg) !important;
  border-radius: 0 !important;
  border-bottom: none !important;
  min-height: 70px !important;
  padding: 5px 15px !important;
  box-sizing: border-box !important;
}
.wk-conversationlist-item-selected,
.wk-conversationlist-item:active {
  background-color: var(--st-selected) !important;
  border-radius: 0 !important;
}
.wk-conversationlist-item-selected .wk-conversationlist-item-name h3,
.wk-conversationlist-item-selected .wk-conversationlist-item-name,
.wk-conversationlist-item-selected .wk-conversationlist-item-time,
.wk-conversationlist-item-selected .wk-conversationlist-item-lastmsg {
  color: var(--st-text) !important;
}
.wk-conversationlist-item-name,
.wk-conversationlist-item-name h3 {
  font-size: 16px !important;
  font-weight: 500 !important;
  color: var(--st-text) !important;
}
.wk-conversationlist-item-lastmsg,
.wk-conversationlist-item-time {
  font-size: 13px !important;
  color: var(--st-muted) !important;
}
.wk-conversationlist-item img,
.wk-conversationlist-item .wk-avatar,
.wk-conversationlist-item [class*='avatar'] {
  width: 60px !important;
  height: 60px !important;
  border-radius: 6px !important;
  object-fit: cover !important;
}
/* 「官」标识：APK / H5 identity_icon/official.png 保持 18px，勿被上头像规则撑大 */
.wk-conversationlist-item img[src*='identity_icon'],
.wk-conversationlist-item img[src*='official.png'],
.wk-conversationlist-item img[src*='visitor.png'],
.wk-conversationlist-item-name img,
.wk-conversationlist-item h3 + img,
.wk-conversationlist-item [class*='name'] img {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  border-radius: 0 !important;
  object-fit: contain !important;
  margin-left: 4px !important;
  vertical-align: middle !important;
  flex-shrink: 0 !important;
}
.wk-chat-search {
  background: var(--st-list-bg) !important;
}
.wk-chat-conversation-header,
.wk-navheader {
  background: #fff !important;
  border-bottom: 1px solid #e8e8e8 !important;
  min-height: 48px !important;
  flex-shrink: 0 !important;
}
.wk-chat-conversation-header-channel-info-name {
  color: var(--st-text) !important;
  font-size: 16px !important;
  font-weight: 600 !important;
}
.wk-chat-conversation-header-channel-info-tip {
  color: var(--st-muted) !important;
  font-size: 12px !important;
}
/* 群聊气泡上方联系人昵称（勿被白字/透明盖住） */
.senderName,
.messageNameBox .senderName,
.wk-message-base-recv .senderName,
.wk-message-base-send .senderName {
  color: #5b6b7c !important;
  opacity: 1 !important;
  visibility: visible !important;
  font-size: 12px !important;
}
.wk-message-system,
.wk-message-split-content {
  max-width: 90% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  overflow: hidden !important;
  word-break: break-word !important;
  overflow-wrap: anywhere !important;
  box-sizing: border-box !important;
}

/* 与 APK 对齐：隐藏「xxx邀请yyy加入群聊」等入群系统提示 */
.wk-message-system[data-st-hide-invite-tip='1'],
[data-st-hide-invite-tip='1'] {
  display: none !important;
  height: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ========== 聊天气泡（padding lr15/tb5，字号 16） ========== */
.wk-message-base-bubble,
.wk-message-base-bubble-box .wk-message-base-bubble {
  padding: 5px 15px !important;
  font-size: 16px !important;
  line-height: 1.35 !important;
  min-height: 40px !important;
  box-sizing: border-box !important;
}
.wk-message-base-bubble-box.send .wk-message-base-bubble {
  background-color: var(--st-send-bubble) !important;
  color: var(--st-text) !important;
  border-radius: 10px 10px 4px 10px !important;
  box-shadow: none !important;
}
.wk-message-base-bubble-box.recv .wk-message-base-bubble {
  background-color: var(--st-recv-bubble) !important;
  color: var(--st-text) !important;
  border-radius: 10px 10px 10px 4px !important;
  box-shadow: 0 0.5px 1px rgba(0, 0, 0, 0.06) !important;
}
.wk-message-base-bubble-box.send .wk-message-text,
.wk-message-base-bubble-box.send .wk-message-base-bubble * {
  color: var(--st-text) !important;
  font-size: 16px !important;
}
.wk-message-base-bubble-box.recv .wk-message-text,
.wk-message-base-bubble-box.recv .wk-message-base-bubble * {
  font-size: 16px !important;
}
.wk-message-base-bubble-box.send .svgAppendix .corner {
  fill: var(--st-send-bubble) !important;
}
.wk-message-base-bubble-box.recv .svgAppendix .corner {
  fill: var(--st-recv-bubble) !important;
}
.wk-message-base-bubble-box [class*='avatar'],
.wk-message-base-bubble-box img.wk-avatar,
.wk-message-list [class*='avatar'] img {
  width: 40px !important;
  height: 40px !important;
  border-radius: 6px !important;
}
.wk-chat-conversation,
.wk-conversation-content,
.wk-messages,
.wk-message-list {
  background-color: var(--st-page-bg) !important;
}
.wk-conversation-footer,
.wk-conversation-footer-content {
  background: #ffffff !important;
  border-top: 1px solid var(--st-divider) !important;
}
/* 勿命中 react-mentions 内层：只改一层会导致 iOS @ 重影/错位 */
.wk-conversation-footer textarea,
.wk-conversation-footer input,
.wk-conversation-footer [contenteditable]:not(.mentions__input):not(.mentions__highlighter),
.wk-conversation-footer-content textarea,
.wk-conversation-footer-content input {
  min-height: 35px !important;
  font-size: 14px !important;
  padding: 5px 10px !important;
  line-height: 1.4 !important;
  color: var(--st-text) !important;
  background: #fff !important;
  border-radius: 4px !important;
}
.wk-message-text a {
  color: var(--st-accent) !important;
}

/* ========== 通讯录（对齐 frag_contacts） ========== */
.wk-contacts,
.wk-contacts-content {
  background: var(--st-page-bg) !important;
}
.wk-contacts-content-header,
.wk-contacts-header {
  background: #fff !important;
  border-bottom: none !important;
  min-height: 48px !important;
  padding-left: 15px !important;
}
.wk-contacts-content-header h2,
.wk-contacts-content-header h3,
.wk-contacts-header h2,
.wk-contacts-header h3 {
  font-size: 22px !important;
  font-weight: 700 !important;
  color: var(--st-text) !important;
}
.wk-contacts-section-item,
.wk-item-contacts {
  background: #fff !important;
  border-bottom: 1px solid #f0f0f0 !important;
  min-height: 70px !important;
  padding: 10px 15px !important;
  box-sizing: border-box !important;
  color: var(--st-text) !important;
}
.wk-contacts-section-item img,
.wk-contacts-section-item [class*='avatar'],
.wk-contacts-section-item-avatar img {
  width: 50px !important;
  height: 50px !important;
  border-radius: 6px !important;
}
/*
 * 官方 main.css 误把 .wk-contacts-section-item-name 写成 color:white
 *（浅色底上看不见）——强制深色字，通讯录「不出名字」根因
 */
.wk-contacts-section-item-name,
.wk-contacts-section-item [class*='name'],
.wk-contacts-section-item h3,
.wk-contacts-section-item h4,
.wk-item-contacts-name,
.wk-indextable-item-name,
body[theme-mode='dark'] .wk-contacts-section-item-name,
body[theme-mode='dark'] .wk-item-contacts-name {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  color: #313131 !important;
  margin-left: 15px !important;
  line-height: 1.35 !important;
}
.wk-contacts-section-item-selected,
.wk-contacts-section-item:active {
  background: var(--st-selected) !important;
  color: var(--st-text) !important;
}
.wk-contacts-section-item-selected .wk-contacts-section-item-name,
.wk-contacts-section-item-selected [class*='name'] {
  color: #313131 !important;
}
.wk-contacts-section-index,
.wk-contacts-section-item-index {
  color: var(--st-muted) !important;
  background: transparent !important;
}
.wk-newfriend-content,
.wk-friendadd,
.wk-friendapply {
  background: #fff !important;
}
/* iOS/H5：新朋友列表高度塌陷导致整页空白 */
html.st-force-mobile-im .wk-newfriend {
  height: 100% !important;
  min-height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  background: #fff !important;
  box-sizing: border-box !important;
}
html.st-force-mobile-im .wk-newfriend .wk-viewqueueheader,
html.st-force-mobile-im .wk-newfriend .wk-view-queue-header {
  flex: 0 0 auto !important;
}
html.st-force-mobile-im .wk-newfriend-content {
  flex: 1 1 auto !important;
  height: auto !important;
  min-height: 200px !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  background: #fff !important;
}
html.st-force-mobile-im .wk-newfriend-content ul {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}
html.st-force-mobile-im .wk-newfriend-content li {
  display: flex !important;
  align-items: center !important;
  min-height: 72px !important;
  height: auto !important;
  visibility: visible !important;
  opacity: 1 !important;
  background: #fff !important;
  border-bottom: 1px solid #f0f0f0 !important;
}

/* 添加好友：不再强调「xx号」短号 */
.wk-friendadd-content [data-st-hide-shortno='1'] {
  display: none !important;
}
.wk-friendadd-content-qrcode {
  color: var(--st-muted, #999) !important;
  font-size: 14px !important;
}
.wk-newfriend-action button,
.wk-friendapply button,
.wk-userinfo-footer-sendbutton,
.wk-userinfo-footer-sendbutton button {
  background: var(--st-accent) !important;
  border-color: var(--st-accent) !important;
  color: #fff !important;
  border-radius: 30px !important;
}

/*
 * 群公告编辑（InputEdit）：官方 .wk-inputedit 固定 50px，长文无法下拉。
 * 抬高可视区并允许 textarea 内滚动。
 */
.wk-inputedit {
  height: auto !important;
  min-height: 220px !important;
  max-height: min(72vh, 560px) !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  box-sizing: border-box !important;
}
.wk-inputedit .semi-input-textarea-wrapper {
  flex: 1 1 auto !important;
  min-height: 200px !important;
  max-height: min(68vh, 520px) !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}
.wk-inputedit .semi-input-textarea-wrapper .semi-input-textarea,
.wk-inputedit textarea.semi-input-textarea,
.wk-inputedit textarea {
  min-height: 200px !important;
  max-height: min(68vh, 520px) !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior: contain !important;
  resize: none !important;
  line-height: 1.5 !important;
}
html.st-force-mobile-im .wk-inputedit {
  min-height: 240px !important;
  max-height: min(65vh, 520px) !important;
  padding: 0 8px !important;
}
html.st-force-mobile-im .wk-inputedit .semi-input-textarea-wrapper .semi-input-textarea,
html.st-force-mobile-im .wk-inputedit textarea {
  min-height: 220px !important;
  max-height: min(60vh, 480px) !important;
  font-size: 15px !important;
}

/* ========== 我的（对齐 frag_my：icon_my_bg + 头像 90） ========== */
.wk-meinfo,
.wk-meinfo-sections,
.wk-me {
  background: var(--st-page-bg) !important;
}
.wk-meinfo-user,
.wk-me-user,
.wk-meinfo-header {
  background: url('/im-custom/icon_my_bg.png') center top / 100% auto no-repeat !important;
  text-align: center !important;
  padding-top: 100px !important;
  padding-bottom: 20px !important;
  min-height: 180px !important;
  box-sizing: border-box !important;
}
.wk-meinfo-user img,
.wk-meinfo-user .wk-avatar,
.wk-me-user img,
.wk-meinfo-header img,
.wk-meinfo-header [class*='avatar'] {
  width: 90px !important;
  height: 90px !important;
  border-radius: 50% !important;
  margin: 0 auto !important;
  object-fit: cover !important;
}
.wk-meinfo-user-name,
.wk-me-user-name,
.wk-meinfo-header h2,
.wk-meinfo-header h3 {
  font-size: 20px !important;
  font-weight: 700 !important;
  color: var(--st-text) !important;
  margin-top: 15px !important;
  text-align: center !important;
}
.wk-sections,
.wk-section {
  background: #fff !important;
  margin-bottom: 15px !important;
  border-radius: 0 !important;
}
.wk-section-row,
.wk-section-title {
  color: var(--st-text) !important;
  font-size: 16px !important;
  border-bottom: 1px solid #f0f0f0 !important;
  min-height: 50px !important;
  padding-left: 15px !important;
  padding-right: 15px !important;
}
.wk-section-row img,
.wk-section-title img,
.wk-section-row svg {
  width: 35px !important;
  height: 35px !important;
}
.wk-section-subtitle {
  color: var(--st-muted) !important;
}
.wk-userinfo {
  background: var(--st-page-bg) !important;
}
.wk-userinfo-user {
  background: #fff !important;
}

.semi-button-primary,
.semi-modal .semi-button-primary {
  background: var(--st-accent) !important;
  border-color: var(--st-accent) !important;
}

/* ========== 手机底栏（对齐 APK：会话/通讯录/我 + APK 图标） ========== */
html.st-force-mobile-im .wk-layout {
  flex-direction: column-reverse !important;
}
html.st-force-mobile-im .wk-layout-tab {
  width: 100% !important;
  height: 56px !important;
  min-height: 56px !important;
  max-height: 56px !important;
  flex-shrink: 0 !important;
  border-top: 1px solid #e5e5e5 !important;
  background: var(--st-tab-bg) !important;
  z-index: 100 !important;
  padding-bottom: env(safe-area-inset-bottom, 0px) !important;
  box-sizing: content-box !important;
  overflow: visible !important;
}
html.st-force-mobile-im .wk-main-sider,
html.st-force-mobile-im .wk-main-sider-content {
  width: 100% !important;
  height: 100% !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-around !important;
  background: var(--st-tab-bg) !important;
  padding: 0 !important;
  margin: 0 !important;
  list-style: none !important;
  overflow: visible !important;
}
html.st-force-mobile-im .wk-main-sider-item,
html.st-force-mobile-im .wk-main-sider-avatar {
  flex: 1 1 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  height: 100% !important;
  min-width: 0 !important;
  padding: 4px 0 2px !important;
  margin: 0 !important;
  position: relative !important;
  box-sizing: border-box !important;
  overflow: visible !important;
  cursor: pointer !important;
}
html.st-force-mobile-im .wk-main-sider-item[data-st-tab-hide='1'] {
  display: none !important;
}
html.st-force-mobile-im .wk-main-sider-item img.st-tab-icon,
html.st-force-mobile-im .wk-main-sider-avatar img.st-tab-icon {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  object-fit: contain !important;
  border-radius: 0 !important;
  display: block !important;
  margin: 0 auto !important;
}
html.st-force-mobile-im .wk-main-sider-item > img:not(.st-tab-icon),
html.st-force-mobile-im .wk-main-sider-item > svg,
html.st-force-mobile-im .wk-main-sider-avatar > img:not(.st-tab-icon),
html.st-force-mobile-im .wk-main-sider-avatar .wk-avatar,
html.st-force-mobile-im .wk-main-sider-avatar [class*='avatar']:not(img.st-tab-icon) {
  display: none !important;
}
html.st-force-mobile-im .wk-main-sider-item .st-tab-label,
html.st-force-mobile-im .wk-main-sider-avatar .st-tab-label {
  display: block !important;
  font-size: 10px !important;
  color: #999999 !important;
  margin-top: 2px !important;
  line-height: 1.2 !important;
  text-align: center !important;
  white-space: nowrap !important;
}
html.st-force-mobile-im .wk-main-sider-item.st-tab-active .st-tab-label,
html.st-force-mobile-im .wk-main-sider-avatar.st-tab-active .st-tab-label {
  color: var(--st-accent) !important;
}
html.st-force-mobile-im .wk-main-sider-item-badge,
html.st-force-mobile-im .wk-main-sider-item .semi-badge {
  position: absolute !important;
  top: 0 !important;
  left: 50% !important;
  transform: translate(6px, 0) !important;
  margin: 0 !important;
  z-index: 2 !important;
  pointer-events: none !important;
}
html.st-force-mobile-im .wk-main-sider-item-badge .semi-badge-count,
html.st-force-mobile-im .wk-main-sider-item .semi-badge-count {
  background: var(--st-accent) !important;
  min-width: 16px !important;
  height: 16px !important;
  line-height: 16px !important;
  font-size: 10px !important;
  border-radius: 8px !important;
  padding: 0 4px !important;
}
html.st-force-mobile-im .wk-main-sider-setting,
html.st-force-mobile-im .wk-main-sider-setting-box {
  display: none !important;
}

/*
 * 移动端「我的」全屏（对齐 APK frag_my）
 * 官方结构：.wk-main-sider-meinfo > .semi-modal-wrap > .semi-modal
 * （meinfo 与 semi-modal 不是同一节点，旧选择器 .wk-main-sider-meinfo.semi-modal 永远不命中）
 */
html.st-force-mobile-im .wk-main-sider-modal.wk-main-sider-meinfo,
html.st-force-mobile-im .wk-main-sider-meinfo {
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  /* 低于底栏 z-index:100，保留 Tab 可点；高于内容区 */
  z-index: 90 !important;
  overflow: visible !important;
}
html.st-force-mobile-im .wk-main-sider-meinfo .semi-modal-wrap {
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  display: block !important;
  background: var(--st-page-bg, #f6f6f6) !important;
  /* 给底栏让位，避免挡住 Tab */
  padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px)) !important;
  box-sizing: border-box !important;
}
html.st-force-mobile-im .wk-main-sider-meinfo .semi-modal,
html.st-force-mobile-im .wk-main-sider-meinfo .semi-modal-small {
  position: relative !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
}
html.st-force-mobile-im .wk-main-sider-meinfo .semi-modal-content,
html.st-force-mobile-im .wk-main-sider-meinfo .semi-modal-body-wrapper,
html.st-force-mobile-im .wk-main-sider-meinfo .semi-modal-body {
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  border-radius: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  background: var(--st-page-bg, #f6f6f6) !important;
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
}
html.st-force-mobile-im .wk-main-sider-meinfo .wk-route,
html.st-force-mobile-im .wk-main-sider-meinfo .wk-route-box,
html.st-force-mobile-im .wk-main-sider-meinfo .wk-route-content,
html.st-force-mobile-im .wk-main-sider-meinfo .wk-viewqueue,
html.st-force-mobile-im .wk-main-sider-meinfo .wk-viewqueue-route,
html.st-force-mobile-im .wk-main-sider-meinfo .wk-viewqueue-view {
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  flex: 1 1 auto !important;
}
html.st-force-mobile-im .wk-main-sider-meinfo .wk-route-header {
  flex: 0 0 auto !important;
  background: #fff !important;
}
html.st-force-mobile-im .wk-main-sider-meinfo .wk-meinfo {
  flex: 1 1 auto !important;
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  /* 给底部固定退出按钮留空 */
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
  background: var(--st-page-bg, #f6f6f6) !important;
}
html.st-force-mobile-im .wk-main-sider-meinfo .wk-meinfo-sections {
  flex: 1 1 auto !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  padding-bottom: 16px !important;
}

/* 个人信息：微聊号可点（官方 onClick 为空） */
.wk-meinfo .wk-list-item.st-shortno-row {
  cursor: pointer !important;
  -webkit-tap-highlight-color: rgba(59, 124, 255, 0.12);
}
.st-shortno-mask {
  position: fixed !important;
  inset: 0 !important;
  z-index: 100000 !important;
  background: rgba(0, 0, 0, 0.45) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 24px !important;
  box-sizing: border-box !important;
}
.st-shortno-panel {
  width: 100% !important;
  max-width: 340px !important;
  background: #fff !important;
  border-radius: 12px !important;
  padding: 18px 16px 14px !important;
  box-sizing: border-box !important;
}
.st-shortno-title {
  font-size: 16px !important;
  font-weight: 600 !important;
  color: #222 !important;
  margin-bottom: 12px !important;
  text-align: center !important;
}
.st-shortno-input {
  width: 100% !important;
  box-sizing: border-box !important;
  border: 1px solid #e5e5e5 !important;
  border-radius: 8px !important;
  padding: 10px 12px !important;
  font-size: 15px !important;
  outline: none !important;
  -webkit-appearance: none !important;
}
.st-shortno-hint {
  margin-top: 8px !important;
  font-size: 12px !important;
  color: #999 !important;
  line-height: 1.4 !important;
}
.st-shortno-actions {
  display: flex !important;
  gap: 10px !important;
  margin-top: 16px !important;
}
.st-shortno-actions button {
  flex: 1 !important;
  height: 40px !important;
  border: none !important;
  border-radius: 8px !important;
  font-size: 15px !important;
}
.st-shortno-cancel {
  background: #f3f3f3 !important;
  color: #333 !important;
}
.st-shortno-ok {
  background: #3b7cff !important;
  color: #fff !important;
}

/* 退出账号：固定在底栏上方（白底红字 pill，对齐 APK） */
html.st-force-mobile-im .st-me-logout-wrap {
  position: fixed !important;
  left: 12px !important;
  right: 12px !important;
  bottom: calc(56px + env(safe-area-inset-bottom, 0px) + 12px) !important;
  z-index: 95 !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  box-sizing: border-box !important;
  width: auto !important;
  pointer-events: auto !important;
}
html.st-force-mobile-im .st-me-logout {
  display: block !important;
  width: 100% !important;
  height: 44px !important;
  border: none !important;
  border-radius: 22px !important;
  background: #fff !important;
  color: #ff4d4f !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 44px !important;
  text-align: center !important;
  cursor: pointer !important;
  -webkit-tap-highlight-color: transparent !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
  pointer-events: auto !important;
}
html.st-force-mobile-im .st-me-logout:active {
  background: #f7f7f7 !important;
}

html.st-force-mobile-im .wk-layout-content-left,
html.st-force-mobile-im .wk-layout-content,
html.st-force-mobile-im .wk-layout-content-right {
  width: 100% !important;
  max-width: 100% !important;
}
html.st-force-mobile-im .wk-login-content-scanlogin {
  display: none !important;
}

/*
 * 防白屏：旧版 hideSystemAccountsInPicker 会给聊天页打 data-st-hide-sys + display:none。
 * 聊天主界面永远不允许被这套标记藏掉。
 */
.wk-chat-content-chat[data-st-hide-sys='1'],
.wk-chat-conversation[data-st-hide-sys='1'],
.wk-chat-conversation-header[data-st-hide-sys='1'],
.wk-chat-conversation-header [data-st-hide-sys='1'],
.wk-conversation-content[data-st-hide-sys='1'],
.wk-conversation-messages[data-st-hide-sys='1'],
.wk-conversation-footer[data-st-hide-sys='1'] {
  display: revert !important;
}

/* 进会话详情：隐藏主底栏（对齐 APK ChatActivity 无 BottomNav） */
html.st-force-mobile-im.st-in-chat .wk-layout-tab,
html.st-force-mobile-im.st-in-chat .wk-main-sider,
html.st-force-mobile-im.st-in-chat .wk-main-sider-content {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  padding: 0 !important;
  border: none !important;
  margin: 0 !important;
}

/* 聊天输入区：压缩空白、去掉桌面感 */
html.st-force-mobile-im .wk-conversation-footer,
html.st-force-mobile-im .wk-conversation-footer-content {
  height: auto !important;
  min-height: unset !important;
  padding-bottom: env(safe-area-inset-bottom, 0px) !important;
}
html.st-force-mobile-im .wk-messageinput-box {
  height: auto !important;
}
html.st-force-mobile-im.st-in-chat .wk-conversation-content {
  height: calc(100% - var(--st-footer-h, 96px)) !important;
}

/*
 * 群公告横幅把输入框顶出视口的根因：
 * 结构是 .wk-chat-content-chat > header + .wk-chat-conversation
 * 若 conversation 写 height:100%，会从 header 下方再占满一屏，footer 落到屏幕外。
 * 私聊无公告时碰巧还能看见输入框。
 */
html.st-force-mobile-im.st-in-chat .wk-chat-content-chat {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  max-height: 100% !important;
  min-height: 0 !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}
html.st-force-mobile-im.st-in-chat .wk-chat-conversation-header {
  flex: 0 0 auto !important;
}
html.st-force-mobile-im.st-in-chat #st-pin-banner {
  flex: 0 0 auto !important;
  max-height: 72px !important;
  overflow: hidden !important;
  width: 100% !important;
}
html.st-force-mobile-im.st-in-chat .wk-chat-conversation {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  box-sizing: border-box !important;
}
html.st-force-mobile-im.st-in-chat .wk-chat-conversation > .wk-conversation,
html.st-force-mobile-im.st-in-chat .wk-conversation {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  position: relative !important;
  overflow: hidden !important;
}
html.st-force-mobile-im.st-in-chat .wk-conversation-footer {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 30 !important;
}

/* iOS 键盘弹起：去掉底 safe-area，并把 footer 抬到 visualViewport 底，消除与「完成」栏之间的大空白 */
html.st-force-mobile-im.st-kb-open .wk-conversation-footer,
html.st-force-mobile-im.st-kb-open .wk-conversation-footer-content {
  padding-bottom: 0 !important;
}
html.st-force-mobile-im.st-kb-open .wk-conversation-footer {
  bottom: var(--st-kb-offset, 0px) !important;
}
html.st-force-mobile-im.st-kb-open .wk-messageinput-inputbox {
  padding-bottom: 4px !important;
}
html.st-force-mobile-im .wk-conversation-footer textarea,
html.st-force-mobile-im .wk-conversation-footer [contenteditable]:not(.mentions__input):not(.mentions__highlighter) {
  min-height: 36px !important;
  max-height: 120px !important;
  font-size: 14px !important;
  padding: 8px 10px !important;
}
html.st-force-mobile-im [data-st-hide-hint='1'] {
  display: none !important;
}

/*
 * iOS @mention：react-mentions = highlighter + 绝对定位 textarea。
 * 官方 className="wk-messageinput-input" → 实际类名为
 *   .wk-messageinput-input__control / __highlighter / __input
 * （旧版才是 .mentions__*；两套都兼容）
 * 禁止给外层加 -webkit-user-modify:read-only —— 会继承到 textarea，
 * iOS Safari 上表现为「只有表情/@/图片图标，没有聊天输入框」。
 */
html.st-force-mobile-im .wk-messageinput-bar {
  height: 40px !important;
  flex-shrink: 0 !important;
}
html.st-force-mobile-im .wk-conversation-chattoolbars {
  height: auto !important;
  align-items: center !important;
}
html.st-force-mobile-im .wk-messageinput-inputbox {
  display: flex !important;
  align-items: stretch !important;
  gap: 8px !important;
  width: 100% !important;
  height: auto !important;
  min-height: 44px !important;
  box-sizing: border-box !important;
  padding: 0 8px 8px !important;
  visibility: visible !important;
  opacity: 1 !important;
}
html.st-force-mobile-im .wk-messageinput-inputbox .wk-messageinput-input,
html.st-force-mobile-im .wk-messageinput-inputbox .mentions {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  min-height: 36px !important;
  max-height: 120px !important;
  height: auto !important;
  overflow: visible !important;
  background: #fff !important;
  border: 1px solid #e8e8e8 !important;
  border-radius: 8px !important;
  display: block !important;
  position: relative !important;
  box-sizing: border-box !important;
  /* 不可设 read-only，否则 iOS 输入层失效 */
  -webkit-user-modify: read-write !important;
}
html.st-force-mobile-im .wk-messageinput-inputbox .wk-messageinput-input__control,
html.st-force-mobile-im .wk-messageinput-inputbox .mentions__control {
  position: relative !important;
  flex: none !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 36px !important;
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', sans-serif !important;
  font-size: 14px !important;
  line-height: 1.4 !important;
}
html.st-force-mobile-im .wk-messageinput-inputbox .wk-messageinput-input__highlighter,
html.st-force-mobile-im .wk-messageinput-inputbox .wk-messageinput-input__input,
html.st-force-mobile-im .wk-messageinput-inputbox .mentions__highlighter,
html.st-force-mobile-im .wk-messageinput-inputbox .mentions__input {
  box-sizing: border-box !important;
  padding: 8px 10px !important;
  margin: 0 !important;
  border: none !important;
  outline: none !important;
  font-family: inherit !important;
  font-size: 14px !important;
  line-height: 1.4 !important;
  letter-spacing: normal !important;
  word-break: break-word !important;
  white-space: pre-wrap !important;
  min-height: 36px !important;
  max-height: 120px !important;
}
html.st-force-mobile-im .wk-messageinput-inputbox .wk-messageinput-input__highlighter,
html.st-force-mobile-im .wk-messageinput-inputbox .mentions__highlighter {
  position: relative !important;
  overflow: hidden !important;
  color: transparent !important;
  min-height: 36px !important;
}
html.st-force-mobile-im .wk-messageinput-inputbox .wk-messageinput-input__input,
html.st-force-mobile-im .wk-messageinput-inputbox .mentions__input,
html.st-force-mobile-im .wk-messageinput-inputbox textarea {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 36px !important;
  background: transparent !important;
  color: var(--st-text, #313131) !important;
  -webkit-text-fill-color: currentColor !important;
  caret-color: var(--st-text, #313131) !important;
  overflow-y: auto !important;
  resize: none !important;
  /* 覆盖外层误伤的 read-only；iOS 必须可写才显示输入框 */
  -webkit-user-modify: read-write-plaintext-only !important;
  pointer-events: auto !important;
  opacity: 1 !important;
  visibility: visible !important;
  z-index: 2 !important;
}
html.st-force-mobile-im .wk-messageinput-inputbox .wk-messageinput-input__mention,
html.st-force-mobile-im .wk-messageinput-inputbox .mentions__mention {
  position: relative !important;
  z-index: 1 !important;
  color: var(--wk-color-theme, #f65835) !important;
  pointer-events: none !important;
}
html.st-force-mobile-im .st-im-send-btn {
  flex: 0 0 auto !important;
  align-self: flex-end !important;
  height: 36px !important;
  min-width: 56px !important;
  padding: 0 12px !important;
  margin: 0 0 2px 0 !important;
  border: none !important;
  border-radius: 8px !important;
  background: #c5cdd8 !important;
  color: #fff !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 36px !important;
  cursor: pointer !important;
  -webkit-tap-highlight-color: transparent !important;
}
html.st-force-mobile-im .st-im-send-btn.st-im-send-btn--active,
html.st-force-mobile-im .st-im-send-btn:not(:disabled) {
  background: #3b7cff !important;
}
html.st-force-mobile-im .st-im-send-btn:disabled {
  background: #c5cdd8 !important;
  opacity: 1 !important;
  cursor: default !important;
}

/* 移动端隐藏官方「截图」剪刀按钮（会跳 snipaste.com） */
html.st-force-mobile-im .wk-conversation-chattoolbars-item:has(img[src*='func_screenshot']),
.wk-conversation-chattoolbars-item[data-st-hide-screenshot='1'] {
  display: none !important;
}

/*
 * iOS：全员去掉工具栏「@」（含群主/管理；官方 SVG func_mention_* 点开会乱码橙条）。
 * 桌面仍仅 st-member-no-typed-at（普通成员）隐藏。
 */
html.st-force-mobile-im .wk-conversation-chattoolbars-item:has(img[src*='func_mention']),
html.st-force-mobile-im .wk-conversation-chattoolbars-item:has([style*='func_mention']),
html.st-ios-hide-at .wk-conversation-chattoolbars-item:has(img[src*='func_mention']),
html.st-member-no-typed-at .wk-conversation-chattoolbars-item:has(img[src*='func_mention']),
html.st-member-no-typed-at .wk-conversation-chattoolbars-item:has([style*='func_mention']),
.wk-conversation-chattoolbars-item[data-st-hide-at-entry='1'] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/*
 * 对齐 APK / iOS：禁止手打 @ 成员列表面板（含「所有人」）。
 * 仅藏 suggestions，勿动 __input / textarea（曾 read-only 导致 iOS 无输入框）。
 */
html.st-force-mobile-im .wk-messageinput-input__suggestions,
html.st-force-mobile-im [class*='wk-messageinput-input__suggestions'],
html.st-force-mobile-im .mentions__suggestions,
html.st-force-mobile-im [class*='mentions__suggestions'],
html.st-force-mobile-im .wk-messageinput-member,
html.st-member-no-typed-at .wk-messageinput-input__suggestions,
html.st-member-no-typed-at [class*='wk-messageinput-input__suggestions'],
html.st-member-no-typed-at .mentions__suggestions,
html.st-member-no-typed-at [class*='mentions__suggestions'],
html.st-member-no-typed-at .wk-messageinput-member,
html.st-member-no-typed-at [data-st-hide-typed-at='1'],
html.st-member-no-at-all .wk-messageinput-member[data-st-hide-at-all='1'],
.wk-messageinput-member[data-st-hide-at-all='1'],
[data-st-hide-typed-at='1'] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
  height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  background: transparent !important;
}

/* 群公告横幅占位（JS 注入 #st-pin-banner） */
#st-pin-banner-preview {
  color: #333 !important;
  font-size: 13px !important;
  line-height: 1.35 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  word-break: break-word !important;
  white-space: normal !important;
}
#st-pin-banner {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  width: 100% !important;
  box-sizing: border-box !important;
  flex-shrink: 0 !important;
}
#st-group-notice-mask a {
  color: #3b7cff !important;
  text-decoration: underline !important;
  word-break: break-all !important;
}

.wk-main-sider {
  background-color: var(--st-tab-bg) !important;
}

/* 未读红点 */
.wk-conversationlist-item [class*='badge'],
.wk-conversationlist-item [class*='Badge'],
.wk-conversationlist-item [class*='unread'],
.semi-badge-count {
  background: var(--st-accent) !important;
}

/*
 * iOS 键盘弹起时：多选底栏（逐条转发/合并转发/删除）仅靠 transform 下移，
 * visualViewport 变化后仍会露在输入框与键盘之间。未进入多选时强制卸掉。
 */
html.st-force-mobile-im .wk-conversation-multiplepanel:not(.wk-conversation-multiplepanel-show) {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  transform: none !important;
  opacity: 0 !important;
}

/* 添加群成员：已在群好友勾选且不可再点（DOM 兜底；主路径靠 IndexTable disableSelectList） */
.wk-indextable-item.st-in-group-member {
  cursor: default !important;
  opacity: 0.92;
}
.wk-indextable-item.st-in-group-member .semi-checkbox {
  pointer-events: none !important;
}
.wk-indextable-item.st-in-group-member .semi-checkbox-inner,
.wk-indextable-item.st-in-group-member.semi-checkbox-checked .semi-checkbox-inner,
.wk-indextable-item.st-in-group-member .semi-checkbox-checked .semi-checkbox-inner {
  background-color: var(--wk-color-theme, #f7931a) !important;
  border-color: var(--wk-color-theme, #f7931a) !important;
}

/* 聊天信息：恢复源码成员头像 +「查看全部」（与 APK 一致）；仅保留显式标记隐藏 */
.wk-channelsetting-content [data-st-hide-group-members='1'] {
  display: none !important;
}
