/* PC 即时通讯 — 对齐微信 PC 浅色三栏 */
:root {
 --im-brand: #07c160;
 --im-brand-hover: #06ad56;
 --im-brand-light: #e7f8ef;
 --im-page-bg: #e5e5e5;
 --im-shell-bg: #ffffff;
 --im-rail-bg: #ececec;
 --im-list-bg: #e6e6e6;
 --im-rail-muted: rgba(0, 0, 0, 0.45);
 --im-rail-icon: rgb(77 77 77 / 55%);
 --im-text: #000000;
 --im-text-secondary: #666666;
 --im-text-muted: #999999;
 --im-line: #e7e7e7;
 --im-line-soft: #d6d6d6;
 --im-bubble-self: #95ec69;
 --im-bubble-other: #ffffff;
 --im-conv-active-bg: #07c160;
 --im-chat-bg: #ededed;
 --im-composer-bg: #ffffff;
 --im-chat-head-bg: #f5f5f5;
 --im-danger: #fa5151;
 --im-conv-w: 250px;
 --im-rail-w: 56px;
}

html.wechat-im-layout,
body.wechat-im-layout {
 height: 100%;
 overflow: hidden;
}

/* 占满顶栏以下区域；默认居中「标准」窗口，放大后全屏 */
.wx-im-page {
 flex: 1;
 width: 100%;
 min-height: 0;
 display: flex;
 align-items: center;
 justify-content: center;
 box-sizing: border-box;
 padding: 16px;
 background: var(--im-page-bg);
 overflow: hidden;
}

.wx-im-page.is-full {
 align-items: stretch;
 justify-content: stretch;
 padding: 0;
}

.wx-im-scale-shell {
 width: min(1180px, calc(100vw - 32px));
 height: min(760px, calc(100dvh - var(--bce-head-h, 56px) - 32px));
 max-width: 100%;
 display: flex;
 flex-direction: column;
 border-radius: 15px;
 border: 1px solid #c8c8c8;
 box-shadow: 0 2px 16px rgba(0, 0, 0, 0.1);
 overflow: hidden;
 background: var(--im-shell-bg);
}

.wx-im-win-chrome {
 flex-shrink: 0;
 height: 32px;
 display: flex;
 align-items: center;
 justify-content: space-between;
 gap: 12px;
 padding: 0 12px 0 14px;
 background: #dcdce1;
 /* border-bottom: 1px solid #d4d4d4; */
 user-select: none;
}

.wx-im-win-chrome-title {
 flex: 1;
 min-width: 0;
 font-size: 12px;
 font-weight: 400;
 color: #333;
 overflow: hidden;
 text-overflow: ellipsis;
 white-space: nowrap;
 visibility: hidden;
}

.wx-im-win-chrome-actions {
 display: inline-flex;
 align-items: center;
 gap: 4px;
 flex-shrink: 0;
}

.wx-im-desktop-shortcut-btn {
 width: 26px;
 height: 22px;
 border: none;
 background: transparent;
 border-radius: 3px;
 color: #666;
 cursor: pointer;
 padding: 0;
 display: inline-flex;
 align-items: center;
 justify-content: center;
 flex-shrink: 0;
}

.wx-im-desktop-shortcut-btn:hover {
 color: #222;
 background: rgba(0, 0, 0, 0.06);
}

.wx-im-desktop-shortcut-btn.is-done {
 color: #1677ff;
}

.wx-im-desktop-shortcut-btn[hidden] {
 display: none !important;
}

.wx-im-desktop-shortcut-ico {
 display: block;
 pointer-events: none;
}

@media (max-width: 768px) {
 .wx-im-win-chrome {
  display: none;
 }
}

.wx-im-page.is-full .wx-im-scale-shell {
 width: 100%;
 height: 100%;
 max-height: none;
 border-radius: 0;
 box-shadow: none;
}

.wx-im-app {
 flex: 1;
 width: 100%;
 min-height: 0;
 display: flex;
 background: #dcdce1;
 border: none;
 border-radius: 0;
 box-shadow: none;
 overflow: hidden;
 font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

/* ===== 左侧导航栏 ===== */
.wx-im-rail {
 width: var(--im-rail-w);
 flex-shrink: 0;
 /* background: var(--im-rail-bg); */
 display: flex;
 flex-direction: column;
 align-items: center;
 padding: 12px 0 10px;
 gap: 0;
 /* border-right: 1px solid var(--im-line-soft); */
 box-shadow: none;
}

.wx-im-rail-nav {
 display: flex;
 flex-direction: column;
 align-items: center;
 gap: 12px;
 width: 100%;
}

.wx-im-rail-spacer {
 flex: 1;
 min-height: 12px;
}

.wx-im-rail-avatar {
 width: 36px;
 height: 36px;
 border-radius: 4px;
 background: rgba(0, 0, 0, 0.06);
 color: var(--im-text-secondary);
 font-size: 15px;
 font-weight: 600;
 display: flex;
 align-items: center;
 justify-content: center;
 margin-bottom: 10px;
 overflow: hidden;
 background-size: cover;
 background-position: center;
 cursor: default;
 user-select: none;
}

.wx-im-rail-avatar-ico {
 width: 22px;
 height: 22px;
 color: var(--im-rail-icon);
 display: none;
 flex-shrink: 0;
}

.wx-im-rail-avatar.is-guest {
 font-size: 0;
 line-height: 0;
}

.wx-im-rail-avatar.is-guest .wx-im-rail-avatar-ico {
 display: block;
}

.wx-im-rail-avatar.is-clickable {
 cursor: pointer;
}

.wx-im-rail-avatar.is-clickable:hover {
 opacity: 0.92;
}

.wx-im-rail-btn {
 width: 32px;
 height: 32px;
 border: none;
 border-radius: 0;
 background: transparent;
 color: var(--im-rail-muted);
 cursor: pointer;
 display: flex;
 align-items: center;
 justify-content: center;
 padding: 0;
 margin: 0 auto;
 position: relative;
 transition: opacity 0.12s;
}

.wx-im-rail-btn img,
.wx-im-rail-ico {
 width: 20px;
 height: 20px;
 display: block;
 object-fit: contain;
 flex-shrink: 0;
}

.wx-im-rail-btn:not(.is-active) .wx-im-rail-ico--on {
 display: none !important;
}

.wx-im-rail-btn:not(.is-active) .wx-im-rail-ico--off {
 display: block !important;
 filter: none;
 opacity: 1;
}

.wx-im-rail-btn.is-active .wx-im-rail-ico--on {
 display: block !important;
 filter: none;
 opacity: 1;
}

.wx-im-rail-btn.is-active {
 color: inherit;
 background: transparent;
 box-shadow: none;
}

.wx-im-rail-btn svg {
 width: 18px;
 height: 18px;
}

.wx-im-rail-btn:hover:not(:disabled) {
 background: rgba(0, 0, 0, 0.05);
}

.wx-im-rail-ico-svg {
 display: block;
 color: var(--im-rail-icon);
}

.wx-im-rail-btn--settings {
 margin-bottom: 2px;
}

.wx-im-rail-btn--settings .wx-im-rail-ico-svg {
 width: 24px;
 height: 24px;
}

.wx-im-rail-btn--settings.is-active,
.wx-im-rail-btn--settings:hover:not(:disabled) {
 color: inherit;
 background: rgba(0, 0, 0, 0.05);
}

.wx-im-rail-btn--settings.is-active .wx-im-rail-ico-svg,
.wx-im-rail-btn--settings:hover:not(:disabled) .wx-im-rail-ico-svg {
 color: var(--im-rail-icon);
}

.wx-im-rail-btn:disabled {
 opacity: 0.35;
 cursor: not-allowed;
}

/* ===== 会话列表栏 ===== */
.wx-im-conv-panel {
 width: var(--im-conv-w);
 flex-shrink: 0;
 background: #ededed;
 /* border-right: 1px solid var(--im-line-soft); */
 display: flex;
 flex-direction: column;
 min-height: 0;
 min-width: 0;
 border-radius: 15px 0px 0px 20px;
}

.wx-im-conv-toolbar {
 display: flex;
 align-items: center;
 gap: 8px;
 padding: 15px 8px 6px;
 flex-shrink: 0;
 min-width: 0;
 overflow: visible;
 position: relative;
 z-index: 2;
 /* background: var(--im-list-bg); */
}

.wx-im-conv-body {
 flex: 1;
 min-height: 0;
 display: flex;
 flex-direction: column;
 overflow: hidden;
 position: relative;
}

.wx-im-conv-body.is-panel-chats .wx-im-contacts-panel,
.wx-im-conv-body.is-panel-chats .wx-im-account-panel,
.wx-im-conv-body.is-panel-chats .wx-im-favorites-nav,
.wx-im-conv-body.is-panel-contacts .wx-im-conv-list,
.wx-im-conv-body.is-panel-contacts .wx-im-conv-tabs,
.wx-im-conv-body.is-panel-contacts .wx-im-conv-sync,
.wx-im-conv-body.is-panel-contacts .wx-im-account-panel,
.wx-im-conv-body.is-panel-contacts .wx-im-favorites-nav,
.wx-im-conv-body.is-panel-account .wx-im-conv-list,
.wx-im-conv-body.is-panel-account .wx-im-conv-tabs,
.wx-im-conv-body.is-panel-account .wx-im-conv-sync,
.wx-im-conv-body.is-panel-account .wx-im-contacts-panel,
.wx-im-conv-body.is-panel-account .wx-im-favorites-nav,
.wx-im-conv-body.is-panel-favorites .wx-im-conv-list,
.wx-im-conv-body.is-panel-favorites .wx-im-conv-tabs,
.wx-im-conv-body.is-panel-favorites .wx-im-conv-sync,
.wx-im-conv-body.is-panel-favorites .wx-im-contacts-panel,
.wx-im-conv-body.is-panel-favorites .wx-im-account-panel,
.wx-im-conv-body.is-panel-moments .wx-im-conv-list,
.wx-im-conv-body.is-panel-moments .wx-im-conv-tabs,
.wx-im-conv-body.is-panel-moments .wx-im-conv-sync,
.wx-im-conv-body.is-panel-moments .wx-im-account-panel,
.wx-im-conv-body.is-panel-moments .wx-im-favorites-nav {
 display: none !important;
}

.wx-im-contacts-panel[hidden],
.wx-im-account-panel[hidden],
.wx-im-favorites-nav[hidden],
.wx-im-conv-list[hidden],
.wx-im-conv-tabs[hidden],
.wx-im-conv-toolbar[hidden],
.wx-im-contacts-results[hidden] {
 display: none !important;
}

.wx-im-search-wrap {
 flex: 1;
 min-width: 0;
 display: flex;
 align-items: center;
 gap: 6px;
 background: transparent;
 border-radius: 4px;
 padding: 4px 8px;
 min-height: 26px;
 border: none;
 box-sizing: border-box;
}

.wx-im-search-wrap:focus-within {
 background: #fff;
 box-shadow: inset 0 0 0 1px #d9d9d9;
}

.wx-im-search-ico {
 flex-shrink: 0;
 width: 14px;
 height: 14px;
 opacity: 0.4;
 display: block;
}

.wx-im-search {
 flex: 1;
 border: none;
 background: transparent;
 font-size: 12px;
 color: var(--im-text);
 outline: none;
 min-width: 0;
 line-height: 1.4;
}

.wx-im-icon-btn img {
 width: 18px;
 height: 18px;
 display: block;
 opacity: 0.55;
}

.wx-im-icon-btn:hover img {
 opacity: 0.85;
}

.wx-im-icon-btn {
 width: 28px;
 height: 28px;
 border: none;
 border-radius: 2px;
 background: transparent;
 color: var(--im-text-secondary);
 font-size: 20px;
 line-height: 1;
 cursor: pointer;
 flex: 0 0 28px;
 display: flex;
 align-items: center;
 justify-content: center;
 transition: background 0.12s;
 position: relative;
 z-index: 1;
}

.wx-im-rail-btn.is-active .wx-im-rail-ico--off {
 display: none !important;
}

.wx-im-rail-btn:hover:not(:disabled):not(.is-active) {
 background: rgba(0, 0, 0, 0.05);
}

.wx-im-rail-btn:hover:not(:disabled):not(.is-active) .wx-im-rail-ico--off {
 opacity: 0.72;
}

.wx-im-icon-btn.is-active {
 background: rgba(0, 0, 0, 0.06);
}

.wx-im-conv-plus-wrap {
 position: relative;
 flex-shrink: 0;
}

.wx-im-conv-plus-menu {
 position: absolute;
 top: calc(100% + 8px);
 right: -2px;
 min-width: 156px;
 background: #fff;
 border-radius: 8px;
 box-shadow: 0 2px 16px rgba(0, 0, 0, 0.14);
 z-index: 40;
 padding: 6px 0;
}

.wx-im-conv-plus-menu::before {
 content: '';
 position: absolute;
 top: -6px;
 right: 12px;
 width: 12px;
 height: 12px;
 background: #fff;
 transform: rotate(45deg);
 box-shadow: -2px -2px 4px rgba(0, 0, 0, 0.04);
}

.wx-im-conv-plus-menu[hidden] {
 display: none !important;
}

.wx-im-conv-plus-item {
 display: flex;
 align-items: center;
 gap: 12px;
 width: 100%;
 border: none;
 background: transparent;
 text-align: left;
 padding: 10px 16px;
 font-size: 14px;
 color: #111;
 cursor: pointer;
 position: relative;
 z-index: 1;
}

.wx-im-conv-plus-item:hover {
 background: #f5f5f5;
}

.wx-im-conv-plus-ico {
 flex-shrink: 0;
 width: 22px;
 height: 22px;
 display: inline-flex;
 align-items: center;
 justify-content: center;
 color: #4c4c4c;
}

.wx-im-conv-plus-label {
 line-height: 1.2;
 white-space: nowrap;
}

.wx-im-icon-btn:hover {
 background: rgba(0, 0, 0, 0.05);
}

/* 会话筛选 Tab — PC 端隐藏（对齐微信 PC） */
.wx-im-conv-tabs {
 display: flex;
 align-items: center;
 gap: 18px;
 margin: 0 14px 6px;
 padding: 0;
 background: transparent;
 flex-shrink: 0;
}

.wx-im-conv-tab {
 flex: none;
 min-width: 0;
 height: 32px;
 border: none;
 border-radius: 0;
 background: transparent;
 color: var(--im-text-secondary);
 font-size: 13px;
 cursor: pointer;
 transition: color 0.15s;
 white-space: nowrap;
 padding: 0;
}

.wx-im-conv-tab:hover {
 color: var(--im-text);
}

.wx-im-conv-tab.is-active {
 background: transparent;
 color: var(--im-brand);
 box-shadow: none;
 font-weight: 600;
}

.wx-im-conv-tab-count {
 margin-left: 4px;
 font-size: 11px;
 color: #fff;
 background: var(--im-danger);
 border-radius: 10px;
 padding: 0 5px;
 min-width: 16px;
 text-align: center;
 line-height: 16px;
 display: inline-block;
 vertical-align: middle;
}

.wx-im-conv-tab-count[hidden] {
 display: none !important;
}

@media (min-width: 769px) {
 .wx-im-conv-tabs {
  display: none !important;
 }
}

.wx-im-conv-sync {
 flex-shrink: 0;
 padding: 6px 12px;
 font-size: 12px;
 color: var(--im-text-muted);
 text-align: center;
 background: rgba(255, 255, 255, 0.96);
 border-bottom: 1px solid var(--im-border, #e7e7e7);
 animation: wx-im-conv-sync-in 0.25s ease;
}

@keyframes wx-im-conv-sync-in {
 from { opacity: 0; transform: translateY(-6px); }
 to { opacity: 1; transform: translateY(0); }
}

.wx-im-conv-list {
 flex: 1;
 overflow-y: auto;
 min-height: 0;
 background: #ededed;
 border-radius: 0px 0px 0px 20px;
}

.wx-im-conv-list::-webkit-scrollbar {
 width: 5px;
}

.wx-im-conv-list::-webkit-scrollbar-thumb {
 background: rgba(0, 0, 0, 0.12);
 border-radius: 3px;
}

.wx-im-conv-empty {
 padding: 32px 16px;
 font-size: 13px;
 color: var(--im-text-muted);
 text-align: center;
 line-height: 1.6;
}

/* 会话行 — 对齐 menu-avatar */
.wx-im-conv-item {
 display: flex;
 align-items: center;
 gap: 0;
 width: 100%;
 min-height: 64px;
 padding: 9px 12px 9px 60px;
 position: relative;
 cursor: pointer;
 border: none;
 border-bottom: none;
 background: transparent;
 text-align: left;
 transition: background 0.1s;
 box-sizing: border-box;
}

.wx-im-conv-item:hover:not(.is-active) {
 background: #d9d9d9;
}

.wx-im-conv-item.is-active {
 background: var(--im-conv-active-bg);
}

.wx-im-conv-item.is-active .wx-im-conv-name,
.wx-im-conv-item.is-active .wx-im-conv-preview,
.wx-im-conv-item.is-active .wx-im-conv-time {
 color: #ffffff;
}

.wx-im-conv-item.is-active .wx-im-conv-preview,
.wx-im-conv-item.is-active .wx-im-conv-time {
 color: rgba(255, 255, 255, 0.85);
}

.wx-im-conv-item.is-active:hover {
 background: var(--im-brand-hover);
}

.wx-im-conv-item.is-active::before {
 display: none;
}

.wx-im-conv-item.is-demo {
 opacity: 0.95;
}

.wx-im-conv-avatar {
 position: absolute;
 left: 12px;
 top: 50%;
 transform: translateY(-50%);
 width: 36px;
 height: 36px;
 border-radius: 4px;
 flex-shrink: 0;
 background: #d8d8d8;
 color: #fff;
 font-size: 17px;
 font-weight: 500;
 display: flex;
 align-items: center;
 justify-content: center;
 overflow: hidden;
 background-size: cover;
 background-position: center;
}

.wx-im-conv-body {
 flex: 1;
 min-width: 0;
 /* padding-right: 8px; */
}

.wx-im-conv-name {
 display: block;
 font-size: 14px;
 color: var(--im-text);
 font-weight: 400;
 white-space: nowrap;
 overflow: hidden;
 text-overflow: ellipsis;
 line-height: 1.35;
 margin-bottom: 3px;
}

.wx-im-conv-preview {
 display: block;
 font-size: 12px;
 color: var(--im-text-muted);
 white-space: nowrap;
 overflow: hidden;
 text-overflow: ellipsis;
 line-height: 1.35;
}

.wx-im-conv-action {
 flex-shrink: 0;
 width: 52px;
 display: flex;
 flex-direction: column;
 align-items: flex-end;
 gap: 6px;
}

.wx-im-conv-time {
 font-size: 11px;
 color: var(--im-text-muted);
 line-height: 1;
}

.wx-im-conv-badge {
 min-width: 18px;
 height: 18px;
 padding: 0 5px;
 border-radius: 9px;
 background: var(--im-danger);
 color: #fff;
 font-size: 11px;
 line-height: 18px;
 text-align: center;
}

/* ===== 右侧聊天区 ===== */
.wx-im-chat-panel {
 flex: 1;
 min-width: 0;
 min-height: 0;
 display: flex;
 flex-direction: column;
 background: #ededed;
 position: relative;
 overflow: hidden;
}

.wx-im-panel-head {
 flex-shrink: 0;
 height: 44px;
 display: flex;
 align-items: center;
 justify-content: space-between;
 gap: 12px;
 padding: 0 14px 0 16px;
 border-bottom: 1px solid var(--im-line);
 background: var(--im-list-bg);
}
.wx-im-panel-head-title {
 flex: 1;
 min-width: 0;
 font-size: 14px;
 font-weight: 600;
 color: var(--im-text);
 overflow: hidden;
 text-overflow: ellipsis;
 white-space: nowrap;
}
.wx-im-panel-zoom {
 display: inline-flex;
 align-items: center;
 justify-content: center;
 gap: 0;
 padding: 0 2px;
 border: none;
 border-radius: 3px;
 background: transparent;
 flex-shrink: 0;
 height: 22px;
 min-width: 86px;
 box-shadow: none;
}
.wx-im-panel-zoom-btn {
 width: 26px;
 height: 22px;
 border: none;
 background: transparent;
 border-radius: 0;
 font-size: 16px;
 line-height: 1;
 color: #555;
 cursor: pointer;
 padding: 0;
 flex-shrink: 0;
}
.wx-im-panel-zoom-btn:hover {
 color: #333;
 background: rgba(0, 0, 0, 0.04);
}
.wx-im-panel-zoom-label {
 min-width: 36px;
 text-align: center;
 font-size: 12px;
 color: #666;
 user-select: none;
 padding: 0 2px;
 flex-shrink: 0;
}
.wx-im-panel-zoom--chat {
 margin-right: 4px;
}
@media (min-width: 769px) {
 .wx-im-panel-zoom--chat {
  display: none !important;
 }
}
.wx-im-panel-head[hidden] { display: none !important; }
.wx-im-panel-zoom--chat[hidden] { display: none !important; }

.wx-im-chat-body {
 flex: 1;
 min-height: 0;
 position: relative;
 display: flex;
 flex-direction: column;
 overflow: hidden;
 margin: 0px 5px 5px 5px;
 border-radius: 0px 10px 10px 0px;
}

.wx-im-chat-empty,
.wx-im-chat-active,
.wx-im-contacts-detail {
 position: absolute;
 inset: 0;
 display: flex;
 flex-direction: column;
 min-height: 0;
 background: transparent;
}

.wx-im-chat-empty[hidden],
.wx-im-chat-active[hidden],
.wx-im-contacts-detail[hidden] {
 display: none !important;
}

.wx-im-chat-empty {
 align-items: center;
 justify-content: center;
 color: #d0d0d8;
 user-select: none;
 padding: 24px;
}

.wx-im-chat-empty-logo {
 width: 100px;
 height: 100px;
 margin-bottom: 20px;
 opacity: 0.4;
}

.wx-im-chat-empty-logo svg {
 width: 100%;
 height: 100%;
 stroke: #c8c8d4;
}

.wx-im-chat-empty p {
 margin: 0;
 font-size: 16px;
 color: #c0c0c8;
 letter-spacing: 1px;
}

.wx-im-chat-active {
 /* filled by shared rule above */
}

.wx-im-chat-active[hidden] {
 display: none !important;
}

.wx-im-chat-active.is-side-open .wx-im-chat-conv {
 border-right: 1px solid #e0e0e0;
}

.wx-im-chat-main {
 flex: 1;
 min-height: 0;
 display: flex;
 flex-direction: row;
 overflow: hidden;
 position: relative;
}

.wx-im-chat-conv {
 flex: 1;
 min-width: 0;
 min-height: 0;
 display: flex;
 flex-direction: column;
 overflow: hidden;
}

.wx-im-chat-side {
 flex: 0 0 320px;
 width: 320px;
 max-width: 42%;
 min-height: 0;
 display: flex;
 flex-direction: column;
 background: #ededed;
 border-left: 1px solid #e0e0e0;
 overflow: hidden;
}

.wx-im-chat-side[hidden] {
 display: none !important;
}

.wx-im-chat-side-view {
 flex: 1;
 min-height: 0;
 display: flex;
 flex-direction: column;
 overflow: hidden;
}

.wx-im-chat-side-view[hidden] {
 display: none !important;
}

.wx-im-chat-side-head {
 flex-shrink: 0;
 display: flex;
 align-items: center;
 justify-content: space-between;
 padding: 12px 16px;
 border-bottom: 1px solid #e5e5e5;
 background: #f7f7f7;
}

.wx-im-chat-side-title {
 margin: 0;
 font-size: 15px;
 font-weight: 600;
 color: #111;
}

.wx-im-chat-side-close {
 width: 30px;
 height: 30px;
 border: none;
 border-radius: 50%;
 background: #eee;
 font-size: 20px;
 line-height: 1;
 color: #666;
 cursor: pointer;
}

.wx-im-chat-side-body {
 flex: 1;
 min-height: 0;
 overflow-y: auto;
 background: #ededed;
}

.wx-im-side-profile-body {
 padding: 16px 14px 20px;
 background: #fff;
}

.wx-im-side-profile-hero {
 display: flex;
 align-items: flex-start;
 gap: 12px;
 margin-bottom: 14px;
}

.wx-im-side-profile-avatar {
 width: 64px;
 height: 64px;
 border-radius: 8px;
 flex-shrink: 0;
 background: var(--im-brand);
 color: #fff;
 font-size: 24px;
 font-weight: 600;
 display: flex;
 align-items: center;
 justify-content: center;
 background-size: cover;
 background-position: center;
}

.wx-im-side-profile-title {
 margin: 0 0 4px;
 font-size: 17px;
 font-weight: 600;
 color: #111;
}

.wx-im-side-profile-id,
.wx-im-side-profile-source,
.wx-im-side-profile-region,
.wx-im-side-profile-sub {
 margin: 2px 0 0;
 font-size: 12px;
 color: #888;
 line-height: 1.45;
}

.wx-im-side-profile-source { color: #07c160; }

.wx-im-side-profile-qr-wrap {
 margin-top: 14px;
 padding-top: 14px;
 border-top: 1px solid #f0f0f0;
 text-align: center;
}

.wx-im-side-profile-qr {
 width: 140px;
 height: 140px;
 object-fit: contain;
 border: 1px solid #eee;
 border-radius: 8px;
}

.wx-im-side-profile-qr-tip {
 margin: 8px 0 0;
 font-size: 12px;
 color: #999;
}

.wx-im-side-profile-actions {
 display: flex;
 gap: 8px;
 margin-top: 16px;
}

.wx-im-side-profile-actions[hidden] { display: none !important; }

.wx-im-side-profile-add-friend,
.wx-im-side-profile-send-msg {
 flex: 1;
 height: 38px;
 border: none;
 border-radius: 6px;
 font-size: 14px;
 font-weight: 600;
 cursor: pointer;
}

.wx-im-side-profile-add-friend {
 background: var(--im-brand);
 color: #fff;
}

.wx-im-side-profile-add-friend.is-added,
.wx-im-side-profile-add-friend:disabled {
 background: #f0f0f0;
 color: #999;
 cursor: default;
}

.wx-im-side-profile-send-msg {
 background: #fff;
 color: #333;
 border: 1px solid #e5e5e5;
}

.wx-im-chat-head {
 height: 48px;
 flex-shrink: 0;
 display: flex;
 align-items: center;
 gap: 10px;
 padding: 0 12px 0 16px;
 border-bottom: 1px solid #f5f5f5;
 background: #ffffff;
 min-height: 48px;
}

.wx-im-chat-head-main {
 flex: 1;
 min-width: 0;
 display: flex;
 align-items: center;
 gap: 6px;
 overflow: hidden;
}

.wx-im-back-btn {
 display: none;
 width: 32px;
 height: 32px;
 border: none;
 border-radius: 8px;
 background: transparent;
 color: var(--im-text-secondary);
 cursor: pointer;
 align-items: center;
 justify-content: center;
 padding: 0;
 flex-shrink: 0;
}

.wx-im-back-btn:hover {
 background: #f5f5f7;
 color: var(--im-brand);
}

.wx-im-back-btn svg {
 width: 20px;
 height: 20px;
}

.wx-im-chat-title {
 margin: 0;
 flex: 1;
 min-width: 0;
 font-size: 15px;
 font-weight: 500;
 color: var(--im-text);
 white-space: nowrap;
 overflow: hidden;
 text-overflow: ellipsis;
}

.wx-im-chat-head-meta {
 flex-shrink: 0;
 font-size: 12px;
 font-weight: 500;
 color: var(--im-text-muted);
 margin-left: 6px;
}

.wx-im-chat-head-meta[hidden] {
 display: none !important;
}

.wx-im-head-side img {
 width: 20px;
 height: 20px;
 opacity: 0.85;
 filter: none;
}

.wx-im-chat-head-actions {
 display: flex;
 gap: 4px;
 flex-shrink: 0;
}

.wx-im-head-btn {
 width: 24px;
 height: 24px;
 border: none;
 border-radius: 2px;
 background: transparent;
 color: var(--im-text-muted);
 cursor: pointer;
 display: flex;
 align-items: center;
 justify-content: center;
 padding: 0;
}

.wx-im-head-btn:hover {
 background: rgba(0, 0, 0, 0.04);
}

.wx-im-head-btn img {
 width: 16px;
 height: 16px;
 display: block;
 opacity: 0.5;
}

.wx-im-head-btn:disabled {
 opacity: 0.35;
 cursor: not-allowed;
}

.wx-im-head-btn:hover img {
 opacity: 0.95;
}

.wx-im-head-more-dots {
 display: block;
 width: 20px;
 height: 4px;
 background-image:
 radial-gradient(circle, #8a8a8a 2px, transparent 2px),
 radial-gradient(circle, #8a8a8a 2px, transparent 2px),
 radial-gradient(circle, #8a8a8a 2px, transparent 2px);
 background-size: 4px 4px;
 background-position: 0 center, 8px center, 16px center;
 background-repeat: no-repeat;
}

.wx-im-head-btn svg {
 width: 18px;
 height: 18px;
}

/* 消息区 */
.wx-im-messages {
 flex: 1;
 min-height: 0;
 overflow-y: auto;
 overflow-x: hidden;
 padding: 12px 16px 8px;
 background: #ffffff;
}

.wx-im-messages::-webkit-scrollbar {
 width: 5px;
}

.wx-im-messages::-webkit-scrollbar-thumb {
 background: rgba(0, 0, 0, 0.1);
 border-radius: 3px;
}

.wx-im-msg-row {
 display: flex;
 margin-bottom: 16px;
 gap: 10px;
 align-items: flex-start;
}

.wx-im-msg-body {
 display: flex;
 flex-direction: column;
 align-items: flex-start;
 max-width: min(62%, 480px);
 min-width: 0;
}

.wx-im-msg-row.is-self .wx-im-msg-body {
 align-items: flex-end;
}

.wx-im-msg-nick {
 font-size: 12px;
 color: #888;
 line-height: 1.3;
 margin: 0 0 3px 2px;
 user-select: none;
}

.wx-im-msg-avatar {
 width: 36px;
 height: 36px;
 border-radius: 4px;
 flex-shrink: 0;
 background: #d8d8d8;
 color: #fff;
 font-size: 14px;
 font-weight: 500;
 display: flex;
 align-items: center;
 justify-content: center;
 overflow: hidden;
 background-size: cover;
 background-position: center;
}

.wx-im-msg-row.is-self {
 flex-direction: row-reverse;
}

.wx-im-msg-bubble {
 position: relative;
 max-width: 100%;
 padding: 8px 11px;
 border-radius: 4px;
 font-size: 14px;
 line-height: 1.5;
 word-break: break-word;
 white-space: pre-wrap;
 color: var(--im-text);
 background: var(--im-bubble-other);
 border: none;
 box-shadow: none;
}

.wx-im-msg-row:not(.is-self) .wx-im-msg-bubble::before {
 content: "";
 position: absolute;
 left: -4px;
 top: 11px;
 width: 8px;
 height: 8px;
 background: var(--im-bubble-other);
 border: none;
 transform: rotate(45deg);
}

.wx-im-msg-row.is-self .wx-im-msg-bubble {
 background: var(--im-bubble-self);
 border: none;
 color: var(--im-text);
 box-shadow: none;
}

.wx-im-msg-row.is-self .wx-im-msg-bubble::before {
 content: "";
 position: absolute;
 right: -4px;
 top: 11px;
 width: 8px;
 height: 8px;
 background: var(--im-bubble-self);
 transform: rotate(45deg);
}

.wx-im-msg-time-hint {
 text-align: center;
 font-size: 12px;
 color: #b2b2b2;
 margin: 0 0 12px;
 padding: 0;
 display: block;
 width: 100%;
 box-sizing: border-box;
 user-select: none;
}

/* 输入区 — 微信 PC：圆角白框，工具栏+发送在框内底部 */
.wx-im-composer-wrap {
 flex-shrink: 0;
 /* border-top: 1px solid var(--im-line); */
 background: var(--im-composer-bg);
 padding: 8px 12px 10px;
 position: relative;
 display: flex;
 flex-direction: column;
 gap: 0;
 min-height: 148px;
}

.wx-im-composer-panel {
 flex: 1;
 min-height: 0;
 display: flex;
 flex-direction: column;
 background: transparent;
}

.wx-im-composer-box {
 flex: 1;
 min-height: 132px;
 display: flex;
 flex-direction: column;
 background: #ffffff;
 border: 1px solid #e7e7e7;
 border-radius: 10px;
 overflow: hidden;
}

.wx-im-composer-editor {
 position: relative;
 flex: 1;
 min-height: 72px;
 display: flex;
 flex-direction: column;
 background: transparent;
 border: none;
 border-radius: 0;
 box-shadow: none;
 margin: 0;
 padding: 8px 10px 4px;
 flex-shrink: 0;
}

.wx-im-composer-bottom-bar {
 display: flex;
 align-items: center;
 justify-content: space-between;
 gap: 8px;
 flex-shrink: 0;
 min-height: 36px;
 padding: 2px 8px 8px;
 background: transparent;
}

.wx-im-composer-toolbar {
 display: flex;
 align-items: center;
 gap: 14px;
 padding: 0;
 flex: 1;
 min-width: 0;
 flex-wrap: nowrap;
 overflow-x: auto;
 scrollbar-width: none;
 background: transparent;
}

.wx-im-composer-toolbar::-webkit-scrollbar {
 display: none;
}

.wx-im-composer-bottom {
 display: none;
}

.wx-im-icon-tool {
 width: 24px;
 height: 24px;
 border: none;
 border-radius: 2px;
 background: transparent;
 cursor: pointer;
 display: inline-flex;
 align-items: center;
 justify-content: center;
 padding: 0;
 transition: opacity 0.12s, background 0.12s;
 color: #6b6b6b;
 flex-shrink: 0;
}

.wx-im-icon-tool:hover:not(:disabled) {
 background: rgba(0, 0, 0, 0.04);
}

.wx-im-icon-tool:disabled {
 opacity: 0.35;
 cursor: not-allowed;
}

.wx-im-tool-ico {
 display: block;
 width: 16px;
 height: 16px;
 object-fit: contain;
 opacity: 0.55;
 pointer-events: none;
}

.wx-im-icon-tool.is-active .wx-im-tool-ico,
.wx-im-icon-tool.is-recording .wx-im-tool-ico {
 opacity: 0.85;
}

.wx-im-icon-tool:hover:not(:disabled) .wx-im-tool-ico {
 opacity: 0.85;
}

.wx-im-icon-tool.is-recording .wx-im-tool-ico {
 filter: hue-rotate(-30deg) saturate(2);
}

.wx-im-tool-svg {
 display: none;
}

.wx-im-composer-foot {
 display: flex;
 align-items: center;
 justify-content: flex-end;
 gap: 0;
 padding: 0;
 min-height: 28px;
 flex-shrink: 0;
 background: transparent;
}

.wx-im-composer-foot-sep {
 width: 1px;
 height: 16px;
 background: #d9d9d9;
 flex-shrink: 0;
 margin: 0 10px;
}

.wx-im-send-voice {
 width: 28px;
 height: 28px;
 border: none;
 border-radius: 0;
 background: transparent;
 cursor: pointer;
 display: flex;
 align-items: center;
 justify-content: center;
 padding: 0;
 flex-shrink: 0;
 transition: opacity 0.12s;
}

.wx-im-send-voice:hover:not(:disabled) {
 background: transparent;
 opacity: 0.85;
}

.wx-im-send-voice:disabled {
 opacity: 0.35;
 cursor: not-allowed;
}

.wx-im-send-voice.is-recording .wx-im-send-voice-ico {
 filter: hue-rotate(-30deg) saturate(2);
}

.wx-im-send-voice-ico {
 display: block;
 width: 16px;
 height: 16px;
 object-fit: contain;
 opacity: 0.55;
 pointer-events: none;
}

.wx-im-composer-bar {
 display: flex;
 align-items: flex-end;
 gap: 8px;
}

.wx-im-composer-main {
 flex: 1;
 min-width: 0;
}

.wx-im-composer-actions {
 display: flex;
 align-items: center;
 gap: 4px;
 flex-shrink: 0;
 padding-bottom: 2px;
}

.wx-im-tool-btn {
 width: 36px;
 height: 36px;
 border: none;
 border-radius: 8px;
 background: transparent;
 color: var(--im-text-secondary);
 cursor: pointer;
 display: flex;
 align-items: center;
 justify-content: center;
 padding: 0;
 transition: background 0.15s, color 0.15s;
}

.wx-im-tool-btn:hover:not(:disabled) {
 background: #f5f5f7;
 color: var(--im-brand);
}

.wx-im-tool-btn:disabled {
 opacity: 0.35;
 cursor: not-allowed;
}

.wx-im-tool-btn svg {
 width: 22px;
 height: 22px;
}

.wx-im-textarea {
 width: 100%;
 box-sizing: border-box;
 min-height: 52px;
 max-height: 200px;
 resize: none;
 border: none;
 border-radius: 0;
 padding: 0;
 font-size: 14px;
 line-height: 1.5;
 color: var(--im-text);
 background: transparent;
 outline: none;
 font-family: inherit;
}

.wx-im-textarea:focus {
 border-color: transparent;
}

.wx-im-textarea:disabled {
 background: #fafafa;
 color: var(--im-text-muted);
}

.wx-im-send {
 flex-shrink: 0;
 height: 26px;
 min-width: 52px;
 padding: 0 12px;
 border: none;
 border-radius: 4px;
 background: #e9e9e9;
 color: #fff;
 font-size: 12px;
 font-weight: 400;
 cursor: pointer;
 transition: background 0.15s, opacity 0.15s;
 box-shadow: none;
 letter-spacing: 0;
}

.wx-im-send:not(:disabled) {
 background: #07c160;
 color: #fff;
 border-color: #07c160;
}

.wx-im-send:not(:disabled):hover {
 background: #06ad56;
 border-color: #06ad56;
}

.wx-im-send:disabled {
 background: #e9e9e9;
 color: #fff;
 border-color: #e9e9e9;
 cursor: not-allowed;
 opacity: 1;
}

.wx-im-screenshot-overlay {
 position: fixed;
 inset: 0;
 z-index: 20000;
 background: rgba(0, 0, 0, 0.45);
 display: flex;
 flex-direction: column;
 align-items: center;
 justify-content: center;
 user-select: none;
}

.wx-im-screenshot-tips {
 position: fixed;
 top: 16px;
 left: 50%;
 transform: translateX(-50%);
 padding: 8px 14px;
 border-radius: 6px;
 background: rgba(0, 0, 0, 0.65);
 color: #fff;
 font-size: 13px;
 z-index: 20002;
 pointer-events: none;
}

.wx-im-screenshot-stage {
 position: relative;
 max-width: calc(100vw - 24px);
 max-height: calc(100vh - 96px);
 line-height: 0;
 box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.wx-im-screenshot-img {
 display: block;
 max-width: calc(100vw - 24px);
 max-height: calc(100vh - 96px);
 width: auto;
 height: auto;
 cursor: crosshair;
}

.wx-im-screenshot-sel {
 position: fixed;
 border: 2px solid #07c160;
 background: rgba(7, 193, 96, 0.12);
 box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.35);
 pointer-events: none;
 z-index: 20001;
 display: none;
}

.wx-im-screenshot-sel.is-visible {
 display: block;
}

.wx-im-screenshot-bar {
 position: fixed;
 bottom: 20px;
 left: 50%;
 transform: translateX(-50%);
 display: flex;
 gap: 10px;
 z-index: 20003;
}

.wx-im-screenshot-btn {
 min-width: 88px;
 height: 34px;
 padding: 0 16px;
 border: 1px solid #d9d9d9;
 border-radius: 4px;
 background: #fff;
 color: #333;
 font-size: 14px;
 cursor: pointer;
}

.wx-im-screenshot-btn--ok {
 background: #07c160;
 border-color: #07c160;
 color: #fff;
}

.wx-im-screenshot-btn--ok:disabled {
 opacity: 0.45;
 cursor: not-allowed;
}

.wx-im-login-mask {
 position: absolute;
 inset: 0;
 background: rgba(255, 255, 255, 0.94);
 backdrop-filter: blur(2px);
 display: flex;
 flex-direction: column;
 align-items: center;
 justify-content: center;
 gap: 12px;
 z-index: 5;
 cursor: pointer;
}

.wx-im-login-mask[hidden] {
 display: none !important;
}

.wx-im-login-mask p {
 margin: 0;
 font-size: 14px;
 color: var(--im-text-secondary);
}

.wx-im-login-btn {
 display: inline-flex;
 align-items: center;
 padding: 9px 24px;
 border: none;
 border-radius: 8px;
 background: var(--im-brand);
 color: #fff;
 font-size: 14px;
 font-weight: 500;
 text-decoration: none;
 cursor: pointer;
 box-shadow: 0 2px 8px rgba(3, 137, 251, 0.35);
}

.wx-im-login-btn:hover {
 background: var(--im-brand-hover);
 color: #fff;
}

/* 登录弹窗 — 中性遮罩，避免大面积绿色 */
.wx-im-auth-modal {
 position: fixed;
 inset: 0;
 background: rgba(0, 0, 0, 0.45);
 display: flex;
 align-items: center;
 justify-content: center;
 z-index: 2100;
 padding: 16px;
}

.wx-im-auth-modal[hidden] {
 display: none !important;
}

.wx-im-auth-card {
 width: min(420px, 100%);
 background: #fff;
 border-radius: 10px;
 box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
 overflow: hidden;
 border: 1px solid #e8e8e8;
}

.wx-im-auth-head {
 display: flex;
 align-items: center;
 justify-content: space-between;
 padding: 20px 28px 14px;
 background: #fff;
 border-bottom: 1px solid #f0f0f0;
}

.wx-im-auth-head h3 {
 margin: 0;
 font-size: 20px;
 font-weight: 600;
 color: #1f1f1f;
}

.wx-im-auth-close {
 border: none;
 background: transparent;
 font-size: 24px;
 line-height: 1;
 color: #999;
 cursor: pointer;
 padding: 0 4px;
}

.wx-im-auth-close:hover {
 color: var(--im-brand);
}

.wx-im-auth-panel {
 padding: 16px 28px 28px;
 display: none;
 box-sizing: border-box;
}

.wx-im-auth-panel.is-active {
 display: block;
}

.wx-im-auth-hint {
 margin: 0 0 18px;
 font-size: 12px;
 line-height: 1.65;
 color: #5a8f72;
}

.wx-im-auth-subtitle {
 margin: 0 0 8px;
 font-size: 17px;
 font-weight: 500;
 color: var(--im-brand-hover);
}

.wx-im-auth-back {
 border: none;
 background: transparent;
 padding: 0;
 margin: 0 0 12px;
 font-size: 13px;
 color: var(--im-brand);
 cursor: pointer;
}

.wx-im-auth-back:hover {
 color: var(--im-brand-hover);
}

.wx-im-auth-main-tabs {
 display: flex;
 gap: 0;
 justify-content: space-between;
 border-bottom: 1px solid rgba(7, 193, 96, 0.18);
 margin-bottom: 24px;
}

.wx-im-auth-main-tab {
 flex: 1;
 border: none;
 background: transparent;
 padding: 0 4px 14px;
 font-size: 15px;
 color: #7a9e8c;
 cursor: pointer;
 position: relative;
 line-height: 1.4;
 text-align: center;
 white-space: nowrap;
}

.wx-im-auth-main-tab:hover {
 color: var(--im-brand);
}

.wx-im-auth-main-tab.is-active {
 color: var(--im-brand);
 font-weight: 600;
}

.wx-im-auth-main-tab.is-active::after {
 content: '';
 position: absolute;
 left: 12%;
 right: 12%;
 bottom: -1px;
 height: 2px;
 background: var(--im-brand);
 border-radius: 1px;
}

.wx-im-auth-main-panel {
 display: none;
}

.wx-im-auth-main-panel.is-active {
 display: block;
}

.wx-im-auth-field {
 margin-bottom: 18px;
 position: relative;
}

.wx-im-auth-field--grow {
 flex: 1;
 min-width: 0;
 margin-bottom: 0;
}

.wx-im-auth-input,
.wx-im-auth-field input.wx-im-auth-input {
 display: block;
 width: 100%;
 height: 44px;
 line-height: 44px;
 padding: 0 16px;
 font-size: 15px;
 color: #1d2129;
 background: #fff;
 border: 1px solid rgba(7, 193, 96, 0.28);
 border-radius: 4px;
 outline: none;
 box-sizing: border-box;
 transition: border-color 0.2s, box-shadow 0.2s;
}

.wx-im-auth-input::placeholder {
 color: #9cb8a8;
}

.wx-im-auth-input:hover {
 border-color: rgba(7, 193, 96, 0.45);
}

.wx-im-auth-input:focus {
 border-color: var(--im-brand);
 box-shadow: 0 0 0 2px rgba(7, 193, 96, 0.16);
}

.wx-im-auth-input-wrap {
 position: relative;
}

.wx-im-auth-input-wrap .wx-im-auth-input {
 padding-right: 36px;
}

.wx-im-auth-pwd-toggle {
 position: absolute;
 right: 10px;
 top: 50%;
 transform: translateY(-50%);
 border: none;
 background: transparent;
 padding: 0;
 width: 24px;
 height: 24px;
 cursor: pointer;
 color: #6b9e82;
}

.wx-im-auth-pwd-toggle:hover {
 color: var(--im-brand);
}

.wx-im-auth-pwd-toggle svg {
 width: 20px;
 height: 20px;
 fill: currentColor;
}

.wx-im-auth-row {
 display: flex;
 gap: 12px;
 align-items: stretch;
 margin-bottom: 18px;
}

.wx-im-auth-sms-btn {
 flex: 0 0 auto;
 min-width: 112px;
 height: 44px;
 padding: 0 14px;
 border: 1px solid var(--im-brand);
 border-radius: 4px;
 background: var(--im-brand-light);
 color: var(--im-brand-hover);
 font-size: 14px;
 cursor: pointer;
 white-space: nowrap;
 transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.wx-im-auth-sms-btn:hover:not(:disabled) {
 background: rgba(7, 193, 96, 0.14);
 border-color: var(--im-brand-hover);
 color: var(--im-brand-hover);
}

.wx-im-auth-sms-btn:disabled {
 opacity: 0.55;
 cursor: not-allowed;
 color: #8aa896;
 border-color: rgba(7, 193, 96, 0.2);
 background: #f3faf6;
}

.wx-im-auth-error {
 margin: -6px 0 12px;
 font-size: 13px;
 color: #f53f3f;
}

.wx-im-auth-error[hidden] {
 display: none !important;
}

.wx-im-auth-submit {
 width: 100%;
 height: 44px;
 border: none;
 border-radius: 4px;
 background: var(--im-brand);
 color: #fff;
 font-size: 15px;
 font-weight: 500;
 cursor: pointer;
 transition: background 0.2s, box-shadow 0.2s;
 box-shadow: 0 4px 12px rgba(7, 193, 96, 0.28);
}

.wx-im-auth-submit:hover {
 background: var(--im-brand-hover);
 box-shadow: 0 4px 14px rgba(6, 173, 86, 0.32);
}

.wx-im-auth-submit:disabled {
 opacity: 0.6;
 cursor: not-allowed;
 box-shadow: none;
}

.wx-im-auth-oauth {
 margin-top: 24px;
 padding-top: 2px;
}

.wx-im-auth-oauth[hidden] {
 display: none !important;
}

.wx-im-auth-oauth-divider {
 text-align: center;
 color: #6b9e82;
 font-size: 13px;
 margin: 0 0 16px;
 position: relative;
}

.wx-im-auth-oauth-divider span {
 background: #fff;
 padding: 0 12px;
 position: relative;
 z-index: 1;
}

.wx-im-auth-oauth-divider::before {
 content: '';
 position: absolute;
 left: 0;
 right: 0;
 top: 50%;
 height: 1px;
 background: rgba(7, 193, 96, 0.18);
}

.wx-im-auth-oauth-grid {
 display: flex;
 flex-wrap: wrap;
 justify-content: center;
 align-items: center;
 gap: 16px;
}

.wx-im-auth-oauth-btn {
 display: flex;
 align-items: center;
 justify-content: center;
 padding: 4px;
 border: 1px solid transparent;
 background: transparent;
 cursor: pointer;
 border-radius: 8px;
 transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.wx-im-auth-oauth-btn:hover {
 transform: translateY(-1px);
 border-color: rgba(7, 193, 96, 0.35);
 box-shadow: 0 4px 12px rgba(7, 193, 96, 0.12);
}

.wx-im-auth-oauth-btn img {
 display: block;
 border-radius: 8px;
}

.wx-im-auth-wx-qr {
 min-height: 220px;
 display: flex;
 align-items: center;
 justify-content: center;
}

.wx-im-auth-qq-wrap {
 width: 100%;
 min-height: 360px;
 display: flex;
 justify-content: center;
 border: 1px solid rgba(7, 193, 96, 0.2);
 border-radius: 8px;
 overflow: hidden;
}

.wx-im-auth-qq-iframe {
 width: 100%;
 max-width: 380px;
 height: 380px;
 border: none;
 background: #fff;
}

.wx-im-auth-scan-box {
 min-height: 200px;
 display: flex;
 align-items: center;
 justify-content: center;
 margin: 8px auto 12px;
 padding: 12px;
 border: 1px dashed rgba(7, 193, 96, 0.35);
 border-radius: 8px;
 background: var(--im-brand-light);
}

.wx-im-auth-scan-box img,
.wx-im-auth-scan-box canvas {
 display: block;
}

.wx-im-auth-scan-loading {
 color: #6b9e82;
 font-size: 13px;
}

.wx-im-auth-scan-refresh {
 display: block;
 margin: 0 auto 8px;
 border: none;
 background: transparent;
 color: var(--im-brand);
 font-size: 13px;
 cursor: pointer;
}

.wx-im-auth-scan-refresh:hover {
 color: var(--im-brand-hover);
}

.wx-im-auth-scan-tip {
 margin: 10px 0 0;
 font-size: 12px;
 color: #999;
 text-align: center;
}

.wx-im-desktop-shortcut-modal {
 position: fixed;
 inset: 0;
 background: rgba(0, 0, 0, 0.45);
 display: flex;
 align-items: center;
 justify-content: center;
 z-index: 2200;
 padding: 16px;
}

.wx-im-desktop-shortcut-modal[hidden] {
 display: none !important;
}

.wx-im-desktop-shortcut-card {
 width: min(440px, 100%);
 background: #fff;
 border-radius: 10px;
 border: 1px solid #e8e8e8;
 box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
 overflow: hidden;
}

.wx-im-desktop-shortcut-head {
 display: flex;
 align-items: center;
 justify-content: space-between;
 padding: 16px 20px 12px;
 border-bottom: 1px solid #f0f0f0;
}

.wx-im-desktop-shortcut-head h3 {
 margin: 0;
 font-size: 18px;
 font-weight: 600;
 color: #1f1f1f;
}

.wx-im-desktop-shortcut-close {
 border: none;
 background: transparent;
 font-size: 22px;
 line-height: 1;
 color: #999;
 cursor: pointer;
}

.wx-im-desktop-shortcut-lead {
 margin: 0;
 padding: 14px 20px 0;
 font-size: 14px;
 color: #666;
 line-height: 1.6;
}

.wx-im-desktop-shortcut-steps {
 margin: 12px 20px 0;
 padding-left: 20px;
 color: #333;
 font-size: 14px;
 line-height: 1.7;
}

.wx-im-desktop-shortcut-url {
 margin: 12px 20px 0;
 padding: 10px 12px;
 background: #f7f7f7;
 border-radius: 6px;
 font-size: 12px;
 color: #666;
 word-break: break-all;
}

.wx-im-desktop-shortcut-foot {
 display: flex;
 gap: 10px;
 justify-content: flex-end;
 padding: 16px 20px 18px;
}

.wx-im-desktop-shortcut-copy,
.wx-im-desktop-shortcut-file {
 border: 1px solid #d9d9d9;
 background: #fff;
 color: #333;
 border-radius: 6px;
 padding: 8px 14px;
 font-size: 13px;
 cursor: pointer;
}

.wx-im-desktop-shortcut-copy {
 background: #1677ff;
 border-color: #1677ff;
 color: #fff;
}

.wx-im-desktop-shortcut-copy:hover {
 background: #4096ff;
 border-color: #4096ff;
}

.wx-im-desktop-shortcut-file:hover {
 border-color: #1677ff;
 color: #1677ff;
}

/* 发起聊天弹层 */
.wx-im-user-picker {
 position: fixed;
 inset: 0;
 background: rgba(37, 36, 56, 0.4);
 display: flex;
 align-items: center;
 justify-content: center;
 z-index: 2000;
}

.wx-im-user-picker[hidden] {
 display: none !important;
}

.wx-im-user-picker-card {
 width: min(420px, 92vw);
 max-height: 70vh;
 background: #fff;
 border-radius: 12px;
 box-shadow: 0 16px 48px rgba(37, 36, 56, 0.18);
 display: flex;
 flex-direction: column;
 overflow: hidden;
}

.wx-im-user-picker-card header {
 display: flex;
 align-items: center;
 justify-content: space-between;
 padding: 14px 16px;
 border-bottom: 1px solid var(--im-line);
 font-weight: 600;
 color: var(--im-text);
}

.wx-im-picker-close {
 border: none;
 background: transparent;
 font-size: 22px;
 line-height: 1;
 color: var(--im-text-muted);
 cursor: pointer;
}

.wx-im-picker-search {
 margin: 12px 16px;
 padding: 9px 12px;
 border: 1px solid var(--im-line);
 border-radius: 8px;
 font-size: 14px;
 outline: none;
}

.wx-im-picker-search:focus {
 border-color: var(--im-brand);
}

.wx-im-picker-results {
 flex: 1;
 overflow-y: auto;
 padding: 0 8px 12px;
 min-height: 120px;
}

.wx-im-picker-user {
 display: flex;
 align-items: center;
 gap: 10px;
 width: 100%;
 padding: 10px 8px;
 border: none;
 background: transparent;
 border-radius: 8px;
 cursor: pointer;
 text-align: left;
 color: var(--im-text);
 font-size: 14px;
 position: relative;
}

.wx-im-picker-avatar,
.wx-im-contacts-group-list .wx-im-conv-avatar {
 position: static;
 left: auto;
 top: auto;
 transform: none;
 width: 40px;
 height: 40px;
 flex-shrink: 0;
 margin: 0;
}

.wx-im-picker-user:hover {
 background: #f8f8fa;
}

.wx-im-picker-user-meta {
 flex: 1;
 min-width: 0;
 display: flex;
 flex-direction: column;
 gap: 2px;
}

.wx-im-picker-user-meta strong {
 font-weight: 500;
 overflow: hidden;
 text-overflow: ellipsis;
 white-space: nowrap;
}

.wx-im-picker-user-meta em {
 font-style: normal;
 font-size: 12px;
 color: var(--im-text-muted);
}

/* 轻提示 */
.wx-im-toast {
 position: fixed;
 left: 50%;
 bottom: 72px;
 transform: translateX(-50%) translateY(12px);
 padding: 10px 18px;
 border-radius: 8px;
 background: rgba(37, 36, 56, 0.88);
 color: #fff;
 font-size: 13px;
 line-height: 1.4;
 z-index: 3000;
 opacity: 0;
 pointer-events: none;
 transition: opacity 0.2s, transform 0.2s;
 max-width: min(90vw, 360px);
 text-align: center;
}

.wx-im-toast.is-show {
 opacity: 1;
 transform: translateX(-50%) translateY(0);
}

.wx-im-empty-hint {
 margin: 8px 0 0;
 font-size: 13px;
 color: var(--im-text-muted);
}

.wx-im-inline-btn {
 margin-top: 12px;
 padding: 8px 18px;
 border: none;
 border-radius: 8px;
 background: var(--im-brand);
 color: #fff;
 font-size: 13px;
 cursor: pointer;
}

.wx-im-contacts-panel {
 flex: 1;
 min-height: 0;
 display: flex;
 flex-direction: column;
 padding: 0;
 overflow-x: hidden;
 overflow-y: auto;
}

.wx-im-contacts-results {
 flex-shrink: 0;
 max-height: 42%;
 overflow-y: auto;
 min-height: 0;
 padding: 0 12px 8px;
 border-bottom: 1px solid var(--im-line-soft);
}

.wx-im-contacts-section {
 flex: 0 0 auto;
 display: block;
 padding: 6px 8px 0;
}

.wx-im-contacts-section-toggle {
 display: flex;
 align-items: center;
 gap: 6px;
 width: 100%;
 margin: 0 0 4px;
 padding: 6px 4px;
 border: none;
 background: transparent;
 cursor: pointer;
 text-align: left;
 font: inherit;
 color: var(--im-text-secondary);
}

.wx-im-contacts-section-toggle:hover {
 color: var(--im-text);
}

.wx-im-contacts-section-chevron {
 display: inline-block;
 width: 0;
 height: 0;
 border-style: solid;
 border-width: 4px 0 4px 6px;
 border-color: transparent transparent transparent #b2b2b2;
 transition: transform .15s ease;
 flex-shrink: 0;
 margin-left: 2px;
}

.wx-im-contacts-section-toggle[aria-expanded="true"] .wx-im-contacts-section-chevron {
 transform: rotate(90deg);
}

.wx-im-contacts-section.is-collapsed .wx-im-contacts-section-body {
 display: none;
}

.wx-im-contacts-section-title {
 margin: 0;
 padding: 0;
 font-size: 13px;
 font-weight: 400;
 color: inherit;
}

.wx-im-contacts-pinned-list,
.wx-im-contacts-friend-list,
.wx-im-contacts-group-list {
 padding: 0 4px 8px;
}

.wx-im-contacts-group-list {
 overflow: visible;
}

.wx-im-contacts-search-wrap {
 flex-shrink: 0;
 padding: 14px 12px 10px;
 background: var(--im-list-bg);
 border-bottom: 1px solid var(--im-line-soft);
}

.wx-im-contacts-search-wrap .wx-im-picker-search {
 width: 100%;
 box-sizing: border-box;
}

.wx-im-contacts-head {
 font-size: 14px;
 font-weight: 400;
 color: var(--im-text);
 padding: 8px 4px 10px;
}

.wx-im-contacts-results .wx-im-picker-user:hover {
    background: #d9d9d9;
}

.wx-im-head-menu {
 position: absolute;
 right: 0;
 top: calc(100% + 4px);
 min-width: 140px;
 background: #fff;
 border: 1px solid var(--im-line);
 border-radius: 8px;
 box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
 z-index: 20;
 padding: 6px 0;
}

.wx-im-head-menu[hidden] {
 display: none !important;
}

.wx-im-head-menu button {
 display: block;
 width: 100%;
 border: none;
 background: transparent;
 text-align: left;
 padding: 9px 14px;
 font-size: 13px;
 color: var(--im-text);
 cursor: pointer;
}

.wx-im-head-menu button:hover {
 background: #f5f5f7;
}

.wx-im-head-menu button.is-danger {
 color: var(--im-danger);
}

.wx-im-emoji-popover {
 position: absolute;
 left: 10px;
 bottom: calc(10px + 2px + 36px + 8px);
 top: auto;
 z-index: 120;
 width: 416px;
 max-width: calc(100% - 20px);
}

.wx-im-emoji-popover[hidden] {
 display: none !important;
}

.wx-im-emoji-popover-body {
 display: flex;
 flex-direction: column;
 height: 320px;
 background: #fff;
 border: 1px solid #e5e5e5;
 border-radius: 8px;
 box-shadow: 0 8px 28px rgba(0, 0, 0, 0.16);
 overflow: hidden;
}

.wx-im-emoji-scroll {
 flex: 1;
 min-height: 0;
 overflow-y: auto;
 padding: 10px 12px 6px;
}

.wx-im-emoji-scroll::-webkit-scrollbar {
 width: 6px;
}

.wx-im-emoji-scroll::-webkit-scrollbar-thumb {
 background: rgba(0, 0, 0, 0.12);
 border-radius: 3px;
}

.wx-im-emoji-block + .wx-im-emoji-block {
 margin-top: 8px;
}

.wx-im-emoji-block-title {
 margin: 0 0 6px;
 font-size: 12px;
 color: #999;
 line-height: 1.2;
}

.wx-im-emoji-grid {
 display: grid;
 grid-template-columns: repeat(8, 1fr);
 gap: 2px;
}

.wx-im-emoji-grid--recent {
 min-height: 36px;
}

.wx-im-emoji-btn {
 width: 100%;
 aspect-ratio: 1;
 max-width: 42px;
 max-height: 42px;
 border: none;
 border-radius: 4px;
 background: transparent;
 font-size: 26px;
 line-height: 1;
 cursor: pointer;
 display: flex;
 align-items: center;
 justify-content: center;
 padding: 0;
}

.wx-im-emoji-btn:hover {
 background: #f2f2f2;
}

.wx-im-emoji-tabs {
 flex-shrink: 0;
 display: flex;
 align-items: center;
 gap: 2px;
 padding: 6px 8px;
 background: #f7f7f7;
 border-top: 1px solid #ececec;
 overflow-x: auto;
}

.wx-im-emoji-tab {
 flex: 0 0 36px;
 width: 36px;
 height: 32px;
 border: none;
 border-radius: 4px;
 background: transparent;
 font-size: 18px;
 line-height: 1;
 color: #666;
 cursor: pointer;
}

.wx-im-emoji-tab--search {
 font-size: 16px;
 color: #888;
}

.wx-im-emoji-tab.is-active {
 background: #e8e8e8;
 color: #111;
}

.wx-im-emoji-panel {
 display: none;
}

.wx-im-emoji-panel[hidden] {
 display: none !important;
}

.wx-im-msg-row.is-self .wx-im-msg-bubble:has(.wx-im-msg-image),
.wx-im-msg-row.is-self .wx-im-msg-bubble:has(.wx-im-msg-video) {
 background: transparent;
 border: none;
 box-shadow: none;
 padding: 0;
}

.wx-im-msg-row.is-self .wx-im-msg-bubble:has(.wx-im-msg-image)::before,
.wx-im-msg-row.is-self .wx-im-msg-bubble:has(.wx-im-msg-video)::before {
 display: none;
}

.wx-im-msg-image {
 max-width: 220px;
 max-height: 220px;
 border-radius: 4px;
 cursor: pointer;
 display: block;
 border: none;
}

.wx-im-msg-file {
 color: var(--im-brand);
 text-decoration: underline;
 word-break: break-all;
}

.wx-im-msg-row.is-self .wx-im-msg-file {
 color: #fff;
}

.wx-im-msg-audio,
.wx-im-msg-video {
 max-width: 260px;
}

/* ===== 响应式 ===== */
@media (max-width: 960px), (max-height: 700px) {
 .wx-im-page {
 align-items: stretch;
 justify-content: stretch;
 padding: 0;
 background: var(--im-shell-bg);
 height: 100%;
 }

 .wx-im-app {
 width: 100%;
 height: 100%;
 max-height: none;
 border: none;
 border-radius: 0;
 box-shadow: none;
 }
}

@media (max-width: 900px) {
 .wx-im-rail {
 display: none;
 }

 .wx-im-conv-panel {
 width: min(300px, 42vw);
 }
}

@media (max-width: 768px) {
 /* 手机端强制全屏，取消 PC「标准」居中窗口 */
 .wx-im-page,
 .wx-im-page.is-full {
 align-items: stretch;
 justify-content: stretch;
 padding: 0;
 height: 100%;
 min-height: 0;
 }

 .wx-im-scale-shell {
 width: 100% !important;
 height: 100% !important;
 max-height: none !important;
 border-radius: 0;
 box-shadow: none;
 }

 .wx-im-app {
 width: 100%;
 height: 100%;
 min-height: 0;
 }

 .wx-im-app.wx-im-narrow:not(.is-chat-open) .wx-im-chat-panel {
 display: none;
 }

 .wx-im-app.wx-im-narrow.is-favorites-mode:not(.is-chat-open) .wx-im-chat-panel {
 display: flex;
 }

 .wx-im-app.wx-im-narrow.is-favorites-mode:not(.is-chat-open) .wx-im-conv-panel {
 display: none;
 }

 .wx-im-app.wx-im-narrow.is-chat-open .wx-im-conv-panel {
 display: none;
 }

 .wx-im-app.wx-im-narrow .wx-im-back-btn {
 display: flex;
 }

 .wx-im-app.wx-im-narrow:not(.is-chat-open) .wx-im-conv-panel {
 width: 100%;
 max-width: none;
 border-right: none;
 }

 .wx-im-app.wx-im-narrow:not(.is-chat-open) .wx-im-conv-body {
 padding-bottom: calc(52px + env(safe-area-inset-bottom, 0px));
 }

 .wx-im-app.wx-im-narrow:not(.is-chat-open) .wx-im-account-panel {
 padding-bottom: calc(52px + env(safe-area-inset-bottom, 0px));
 overflow-y: auto;
 }

 .wx-im-app.wx-im-narrow.is-chat-open .wx-im-chat-panel {
 width: 100%;
 flex: 1;
 }

 .wx-im-contacts-panel[hidden],
 .wx-im-account-panel[hidden],
 .wx-im-favorites-nav[hidden],
 .wx-im-conv-list[hidden],
 .wx-im-conv-tabs[hidden],
 .wx-im-conv-toolbar[hidden] {
 display: none !important;
 }

 .wx-im-chat-head {
 height: 48px;
 padding: 0 10px;
 }

 .wx-im-head-btn {
 width: 40px;
 height: 40px;
 }

 .wx-im-composer-wrap {
 padding: 6px 10px calc(8px + env(safe-area-inset-bottom, 0px));
 }

 .wx-im-composer-box {
 min-height: 120px;
 }

 .wx-im-composer-toolbar {
 gap: 12px;
 }

 .wx-im-composer-editor {
 min-height: 56px;
 margin: 0;
 padding: 6px 8px 2px;
 }

 .wx-im-composer-bottom-bar {
 padding: 2px 6px 6px;
 }

 .wx-im-composer-foot {
 padding: 0;
 }

 .wx-im-chat-main {
 position: relative;
 }

 .wx-im-chat-side {
  flex: 0 0 100%;
  width: 100%;
  max-width: 100%;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  box-shadow: -4px 0 16px rgba(0,0,0,.12);
 }

 .wx-im-emoji-popover {
  width: min(416px, calc(100vw - 24px));
  left: 6px;
  bottom: calc(8px + env(safe-area-inset-bottom, 0px) + 2px + 36px + 6px);
  top: auto;
 }

 .wx-im-emoji-popover-body {
  height: 280px;
 }

 .wx-im-icon-tool {
 width: 24px;
 height: 24px;
 flex-shrink: 0;
 }

 .wx-im-textarea {
 min-height: 48px;
 max-height: 120px;
 font-size: 16px;
 }

 .wx-im-send {
 min-width: 52px;
 height: 26px;
 font-size: 12px;
 }

 .wx-im-conv-toolbar {
 padding: 10px 10px 6px;
 }

 .wx-im-conv-tabs {
 padding: 0 10px;
 }

 .wx-im-messages {
 padding: 12px 10px 8px;
 }

 /* 底部导航（替代隐藏的左侧 rail） */
 .wx-im-mobile-tabbar {
 position: fixed;
 left: 0;
 right: 0;
 bottom: 0;
 z-index: 200;
 display: flex;
 align-items: stretch;
 justify-content: space-around;
 flex-shrink: 0;
 height: calc(52px + env(safe-area-inset-bottom, 0px));
 padding-bottom: env(safe-area-inset-bottom, 0px);
 background: #f7f7f7;
 border-top: 1px solid var(--im-line);
 }

 .wx-im-app.wx-im-narrow.is-chat-open .wx-im-mobile-tabbar {
 display: none;
 }

 .wx-im-mobile-tab {
 flex: 1;
 display: flex;
 flex-direction: column;
 align-items: center;
 justify-content: center;
 gap: 2px;
 border: none;
 background: transparent;
 color: var(--im-text-muted);
 font-size: 11px;
 line-height: 1.2;
 cursor: pointer;
 padding: 4px 0;
 min-width: 0;
 }

 .wx-im-mobile-tab img,
 .wx-im-mobile-tab svg {
 width: 22px;
 height: 22px;
 opacity: 0.55;
 }

 .wx-im-mobile-tab.is-active {
 color: var(--im-brand);
 font-weight: 600;
 }

 .wx-im-mobile-tab.is-active img,
 .wx-im-mobile-tab.is-active svg {
 opacity: 1;
 }
}

@media (min-width: 769px) {
 .wx-im-mobile-tabbar {
 display: none !important;
 }
}

/* —— chat9：群聊、语音、RTC、富消息 —— */
.wx-im-volc-banner {
 padding: 8px 14px;
 font-size: 12px;
 line-height: 1.5;
 color: #8a5a00;
 background: #fff8e6;
 border-bottom: 1px solid #ffe7a3;
}

.wx-im-head-rtc img {
 width: 18px;
 height: 18px;
 opacity: 0.72;
}

.wx-im-head-rtc:hover img {
 opacity: 0.95;
}

.wx-im-head-rtc[hidden] {
 display: none !important;
}

.wx-im-voice-hold-hint {
 position: absolute;
 left: 50%;
 bottom: 72px;
 transform: translateX(-50%);
 padding: 10px 18px;
 border-radius: 8px;
 background: rgba(0, 0, 0, 0.72);
 color: #fff;
 font-size: 14px;
 pointer-events: none;
 z-index: 20;
}

.wx-im-voice-hold-bar {
 display: none;
}

.wx-im-voice-hold-bar:hover:not(:disabled) {
 background: #fafafa;
}

.wx-im-voice-hold-bar.is-recording {
 background: #e8e8e8;
 color: #576b95;
}

.wx-im-voice-hold-bar:disabled {
 opacity: 0.45;
 cursor: not-allowed;
}

.wx-im-tool-btn.is-recording {
 background: #ffe8e8;
 color: #e54545;
}

.wx-im-picker-tabs {
 display: flex;
 gap: 8px;
}

.wx-im-picker-tab {
 border: none;
 background: transparent;
 font-size: 14px;
 font-weight: 600;
 color: var(--im-text-muted);
 cursor: pointer;
 padding: 4px 0;
}

.wx-im-picker-tab.is-active {
 color: var(--im-brand);
}

.wx-im-user-picker-card > header {
 display: flex;
 align-items: center;
 justify-content: space-between;
 gap: 12px;
}

.wx-im-group-selected {
 display: flex;
 flex-wrap: wrap;
 gap: 6px;
 padding: 8px 0;
 min-height: 28px;
}

.wx-im-group-chip {
 display: inline-flex;
 align-items: center;
 gap: 4px;
 padding: 4px 8px;
 border-radius: 999px;
 background: #eef6ff;
 font-size: 12px;
 color: #333;
}

.wx-im-group-chip button {
 border: none;
 background: transparent;
 cursor: pointer;
 color: #999;
 font-size: 14px;
 line-height: 1;
}

.wx-im-group-create-btn {
 width: 100%;
 margin-top: 10px;
 padding: 10px;
 border: none;
 border-radius: 8px;
 background: var(--im-brand);
 color: #fff;
 font-size: 15px;
 cursor: pointer;
}

.wx-im-group-create-btn:disabled {
 opacity: 0.5;
 cursor: not-allowed;
}

.wx-im-rich-card {
 min-width: 180px;
 max-width: 260px;
 padding: 10px 12px;
 border-radius: 8px;
 background: #fff;
 border: 1px solid rgba(0, 0, 0, 0.06);
 cursor: default;
}

.wx-im-rich-card.is-tap {
 cursor: pointer;
}

.wx-im-rich-card.is-tap:hover {
 background: #fafafa;
}

.wx-im-rich-card-title {
 font-size: 13px;
 font-weight: 600;
 margin-bottom: 4px;
}

.wx-im-rich-card-sub {
 font-size: 12px;
 color: var(--im-text-muted);
}

.wx-im-rich-card.is-red {
 background: linear-gradient(135deg, #ff6b4a, #e54545);
 border: none;
 color: #fff;
}

.wx-im-rich-card.is-red .wx-im-rich-card-sub {
 color: rgba(255, 255, 255, 0.85);
}

.wx-im-rich-card.is-transfer {
 background: linear-gradient(135deg, #ff9f43, #f57c00);
 border: none;
 color: #fff;
}

.wx-im-rich-card.is-transfer .wx-im-rich-card-sub {
 color: rgba(255, 255, 255, 0.9);
}

.wx-im-rich-card.is-rtc {
 background: #fff;
 border-color: rgba(0, 0, 0, 0.06);
}

.wx-im-incoming-rtc {
 position: fixed;
 inset: 0;
 z-index: 3500;
 display: flex;
 align-items: center;
 justify-content: center;
 background: rgba(0, 0, 0, 0.45);
 pointer-events: auto;
}

.wx-im-incoming-rtc[hidden] {
 display: none !important;
}

.wx-im-incoming-rtc-card {
 position: relative;
 z-index: 3501;
 pointer-events: auto;
 width: min(320px, 90vw);
 padding: 24px 20px;
 border-radius: 14px;
 background: #fff;
 text-align: center;
 box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.wx-im-incoming-rtc-title {
 font-size: 18px;
 font-weight: 600;
 margin: 0 0 8px;
}

.wx-im-incoming-rtc-sub {
 font-size: 14px;
 color: var(--im-text-muted);
 margin: 0 0 20px;
}

.wx-im-incoming-rtc-actions {
 display: flex;
 gap: 12px;
 justify-content: center;
}

.wx-im-incoming-reject,
.wx-im-incoming-accept {
 flex: 1;
 padding: 10px;
 border: none;
 border-radius: 8px;
 font-size: 15px;
 cursor: pointer;
}

.wx-im-incoming-reject {
 background: #f2f2f2;
 color: #333;
}

.wx-im-incoming-accept {
 background: #07c160;
 color: #fff;
}

.wx-im-picker-user.is-selected {
 background: #eef6ff;
 outline: 2px solid var(--im-brand);
}

.wx-im-picker-user.is-selected {
    background: #eef6ff;
    outline: 2px solid var(--im-brand);
}

/* 通讯录空态 — 仅顶部搜索，无底部重复搜索框 */
.wx-im-contacts-hint {
    margin: 0;
    padding: 48px 20px;
    text-align: center;
    font-size: 13px;
    color: var(--im-text-muted);
    line-height: 1.6;
}

.wx-im-contacts-results {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.wx-im-contacts-results:has(.wx-im-contacts-hint) {
    justify-content: center;
}

/* 红包 / 转账消息卡片 */
.wx-im-msg-bubble--wallet {
    padding: 0;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    max-width: 240px;
    width: fit-content;
}

.wx-im-msg-row.is-self .wx-im-msg-bubble--wallet::before,
.wx-im-msg-row:not(.is-self) .wx-im-msg-bubble--wallet::before {
    display: none;
}

/* 自己发出的红包/转账：限制气泡宽度并预留右侧头像位，避免被 overflow 裁切 */
.wx-im-msg-row.is-self .wx-im-msg-body:has(.wx-im-msg-bubble--wallet) {
    max-width: min(calc(100% - 46px), 240px);
    flex: 0 0 auto;
}

.wx-im-msg-row.is-self .wx-im-msg-bubble--wallet {
    max-width: 100%;
    width: 100%;
}

.wx-im-msg-row.is-self .wx-im-msg-avatar {
    flex: 0 0 36px;
    position: relative;
    z-index: 2;
}

.wx-im-wallet-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    max-width: 240px;
    border-radius: 4px;
    overflow: hidden;
    background: #fa9d3b;
    color: #fff;
    cursor: default;
    box-shadow: none;
    box-sizing: border-box;
}

.wx-im-wallet-card--transfer {
    background: #fa9d3b;
}

.wx-im-wallet-card.is-tap {
    cursor: pointer;
}

.wx-im-wallet-card.is-tap:hover {
    filter: brightness(1.03);
}

.wx-im-wallet-card.is-done {
    opacity: 0.88;
}

.wx-im-wallet-card-body {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px 8px;
}

.wx-im-wallet-card-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    filter: brightness(0) invert(1);
    opacity: 0.95;
}

.wx-im-wallet-card-title {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
    margin-bottom: 2px;
    word-break: break-word;
}

.wx-im-wallet-card-sub {
    font-size: 12px;
    opacity: 0.9;
    line-height: 1.35;
    word-break: break-word;
}

.wx-im-wallet-card-foot {
    padding: 5px 12px;
    font-size: 11px;
    background: rgba(255, 255, 255, 0.15);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* 红包 / 转账弹层 */
.wx-im-wallet-modal {
    position: fixed;
    inset: 0;
    z-index: 3400;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.48);
    padding: 16px;
}

.wx-im-wallet-modal[hidden] {
    display: none !important;
}

.wx-im-wallet-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}

.wx-im-red-sheet {
    position: relative;
    width: min(360px, 92vw);
    max-height: 86vh;
    overflow: auto;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22);
}

.wx-im-red-hero {
    background: linear-gradient(180deg, #f25643 0%, #e04533 100%);
    color: #fff;
    text-align: center;
    padding: 28px 20px 36px;
    border-radius: 12px 12px 0 0;
}

.wx-im-red-from {
    margin: 0 0 10px;
    font-size: 14px;
    opacity: 0.92;
}

.wx-im-red-bless {
    margin: 0 0 18px;
    font-size: 20px;
    font-weight: 600;
}

.wx-im-red-open-btn {
    width: 88px;
    height: 88px;
    border: none;
    border-radius: 50%;
    background: #f8d863;
    color: #5a3b12;
    font-size: 34px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wx-im-red-open-btn:hover:not(:disabled) {
    filter: brightness(1.05);
}

.wx-im-red-open-btn:disabled {
    opacity: 0.6;
    cursor: wait;
}

.wx-im-red-result {
    margin-top: 8px;
}

.wx-im-red-amount {
    margin: 0 0 6px;
    font-size: 36px;
    font-weight: 700;
}

.wx-im-red-deposit {
    margin: 0;
    font-size: 13px;
    opacity: 0.88;
}

.wx-im-red-tip {
    margin: 14px 0 0;
    min-height: 20px;
    font-size: 13px;
    opacity: 0.9;
}

.wx-im-red-summary {
    padding: 12px 16px 0;
    font-size: 12px;
    color: var(--im-text-muted);
}

.wx-im-red-list {
    padding: 8px 16px 16px;
}

.wx-im-red-li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--im-line-soft);
    font-size: 13px;
}

.wx-im-red-li:last-child {
    border-bottom: none;
}

.wx-im-red-li-amt {
    color: var(--im-text-secondary);
}

.wx-im-transfer-sheet {
    position: relative;
    width: min(340px, 90vw);
    padding: 28px 24px 24px;
    border-radius: 12px;
    background: #fff;
    text-align: center;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22);
}

.wx-im-transfer-icon img {
    width: 48px;
    height: 48px;
    opacity: 0.85;
}

.wx-im-transfer-title {
    margin: 12px 0 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--im-text);
}

.wx-im-transfer-amount {
    margin: 0 0 8px;
    font-size: 32px;
    font-weight: 700;
    color: #191919;
}

.wx-im-transfer-remark,
.wx-im-transfer-status {
    margin: 0 0 8px;
    font-size: 13px;
    color: var(--im-text-muted);
    line-height: 1.5;
}

.wx-im-transfer-action {
    width: 100%;
    margin-top: 16px;
    height: 42px;
    border: none;
    border-radius: 8px;
    background: var(--im-brand);
    color: #fff;
    font-size: 15px;
    cursor: pointer;
}

.wx-im-transfer-action:hover:not(:disabled) {
    background: var(--im-brand-hover);
}

.wx-im-transfer-action:disabled {
    opacity: 0.6;
    cursor: wait;
}

.wx-im-icon-tool.is-recording {
    background: #ffe8e8;
}

/* 账户侧栏 */
.wx-im-account-panel {
 flex: 1;
 overflow: auto;
 padding: 12px 10px 16px;
 /* background: var(--im-list-bg); */
 display: flex;
 flex-direction: column;
 align-items: stretch;
 justify-content: flex-start;
}
.wx-im-account-card {
 /* background: #fff; */
 border-radius: 10px;
 padding: 20px 16px 18px;
 box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
 text-align: center;
}
.wx-im-account-card--top { margin-top: 0; }
.wx-im-account-label { margin:0 0 8px; font-size:13px; color:#888; }
.wx-im-account-balance { margin:0; font-size:36px; font-weight:700; color:#111; line-height:1.1; font-variant-numeric: tabular-nums; }
.wx-im-account-unit { margin:6px 0 18px; font-size:13px; color:#666; }
.wx-im-account-recharge { display:inline-flex; align-items:center; justify-content:center; min-width:148px; height:40px; padding:0 20px; border:none; border-radius:6px; background:#07c160; color:#fff; font-size:15px; font-weight:600; cursor:pointer; }
.wx-im-account-hint { margin:14px 0 0; font-size:12px; color:#999; line-height:1.5; }

/* 收藏侧栏 */
.wx-im-favorites-nav {
 flex: 1;
 min-height: 0;
 overflow: hidden;
 display: flex;
 flex-direction: column;
 padding: 12px 10px 10px;
 /* background: var(--im-list-bg); */
}
.wx-im-fav-search-wrap {
 display: flex; align-items: center; gap: 8px;
 /* background: #fff; */ border-radius: 4px; padding: 6px 10px;
 border: 1px solid transparent; margin-bottom: 10px;
}
.wx-im-fav-search-wrap--modal { margin: 12px 10px 8px; }
.wx-im-fav-search-ico { flex-shrink: 0; opacity: .55; }
.wx-im-fav-search-input {
 flex: 1; min-width: 0; border: none; background: transparent;
 font-size: 13px; color: #333; outline: none;
}
.wx-im-fav-new-note {
 display: flex; align-items: center; justify-content: center; gap: 6px;
 width: 100%; height: 36px; margin-bottom: 8px; border: none; border-radius: 4px;
 background: #fff; color: #333; font-size: 13px; cursor: pointer;
 box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.wx-im-fav-new-note:hover { background: #fafafa; }
.wx-im-fav-new-note-ico { font-size: 16px; color: #666; }
.wx-im-fav-cats {
 flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 2px;
}
.wx-im-fav-cats--modal { padding: 0 6px 8px; }
.wx-im-fav-cat {
 display: flex; align-items: center; gap: 10px; width: 100%;
 padding: 9px 10px; border: none; border-radius: 4px;
 background: transparent; color: #333; font-size: 13px; text-align: left; cursor: pointer;
}
.wx-im-fav-cat:hover { background: rgba(0,0,0,.04); }
.wx-im-fav-cat.is-active { background: #e7e7e7; font-weight: 600; }
.wx-im-fav-cat-ico {
 flex-shrink: 0;
 width: 18px;
 height: 18px;
 display: block;
 object-fit: contain;
 opacity: .85;
}
.wx-im-fav-cat.is-active .wx-im-fav-cat-ico {
 opacity: 1;
}
.wx-im-fav-storage { margin: 8px 4px 0; font-size: 11px; color: #aaa; flex-shrink: 0; }

/* 收藏主列表 */
.wx-im-favorites-main {
 flex: 1; min-height: 0; display: flex; flex-direction: column;
 background: #f5f5f5; overflow: hidden;
}
.wx-im-favorites-main[hidden] { display: none !important; }
.wx-im-app.is-favorites-mode .wx-im-chat-body { display: none !important; }
.wx-im-app.is-favorites-mode .wx-im-moments-main { display: none !important; }

/* 朋友圈（用站内发布内容替代） */
.wx-im-moments-head {
 flex-shrink: 0;
 padding: 14px 18px 10px;
 background: #f5f5f5;
 border-bottom: 1px solid #ececec;
}
.wx-im-moments-head-title {
 margin: 0 0 4px;
 font-size: 15px;
 font-weight: 600;
 color: #111;
}
.wx-im-moments-head-sub {
 margin: 0;
 font-size: 12px;
 color: #888;
}
.wx-im-moments-feed {
 flex: 1;
 min-height: 0;
 overflow: auto;
 padding: 12px 16px 16px;
}
.wx-im-moments-empty-hint {
 margin: 0;
 padding: 24px 12px;
 text-align: center;
 font-size: 13px;
 color: #999;
}
.wx-im-moments-item {
 background: #fff;
 border-radius: 8px;
 padding: 14px 14px 12px;
 margin-bottom: 10px;
 box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.wx-im-moments-item-head {
 display: flex;
 align-items: center;
 justify-content: space-between;
 gap: 10px;
 margin-bottom: 8px;
}
.wx-im-moments-item-author {
 font-size: 14px;
 font-weight: 600;
 color: #111;
}
.wx-im-moments-item-time {
 font-size: 12px;
 color: #999;
}
.wx-im-moments-item-title {
 display: block;
 margin: 0 0 6px;
 font-size: 15px;
 font-weight: 600;
 color: #111;
 text-decoration: none;
}
.wx-im-moments-item-title:hover { color: #576b95; }
.wx-im-moments-item-summary {
 margin: 0 0 10px;
 font-size: 13px;
 line-height: 1.55;
 color: #666;
}
.wx-im-moments-item-cover {
 position: relative;
 display: block;
 width: 100%;
 max-width: 220px;
 aspect-ratio: 1;
 border-radius: 6px;
 overflow: hidden;
 margin-bottom: 10px;
 background: #f0f0f0;
}
.wx-im-moments-item-cover img {
 width: 100%;
 height: 100%;
 object-fit: cover;
 display: block;
}
.wx-im-moments-item-video-badge {
 position: absolute;
 right: 8px;
 bottom: 8px;
 width: 0;
 height: 0;
 border-style: solid;
 border-width: 8px 0 8px 14px;
 border-color: transparent transparent transparent rgba(255,255,255,.92);
}
.wx-im-moments-item-foot {
 display: flex;
 align-items: center;
 justify-content: space-between;
 gap: 10px;
 font-size: 12px;
}
.wx-im-moments-item-type { color: #888; }
.wx-im-moments-item-link {
 color: #576b95;
 text-decoration: none;
}
.wx-im-moments-item-link:hover { text-decoration: underline; }

.wx-im-group-cell-btn--moments .wx-im-group-cell-right {
 align-items: center;
}
.wx-im-contacts-moments-preview {
 display: flex;
 align-items: center;
 justify-content: flex-end;
 gap: 4px;
 min-width: 0;
 max-width: 168px;
}
.wx-im-contacts-moments-thumb {
 width: 36px;
 height: 36px;
 border-radius: 4px;
 overflow: hidden;
 flex-shrink: 0;
 background: #f2f2f2;
 display: flex;
 align-items: center;
 justify-content: center;
 text-decoration: none;
}
.wx-im-contacts-moments-thumb img {
 width: 100%;
 height: 100%;
 object-fit: cover;
 display: block;
}
.wx-im-contacts-moments-thumb-text {
 font-size: 11px;
 line-height: 1.2;
 color: #888;
 text-align: center;
 padding: 0 3px;
 word-break: break-all;
}

.wx-im-moments-preview-strip {
 display: flex;
 flex-direction: row;
 align-items: center;
 gap: 8px;
 flex-wrap: nowrap;
}
.wx-im-moments-preview-strip[hidden] { display: none !important; }
.wx-im-contacts-moments-strip-wrap {
 padding: 10px 16px 12px;
 background: #fff;
 border-bottom: 1px solid #f0f0f0;
}
.wx-im-contacts-moments-strip-wrap[hidden] { display: none !important; }
.wx-im-moments-preview-thumb {
 width: 52px;
 height: 52px;
 border-radius: 8px;
 overflow: hidden;
 flex-shrink: 0;
 background: #f2f2f2;
 display: block;
 text-decoration: none;
}
.wx-im-moments-preview-thumb img {
 width: 100%;
 height: 100%;
 object-fit: cover;
 display: block;
}
.wx-im-profile-moments-strip {
 margin: 2px 0 14px;
}

.wx-im-moments-overlay {
 position: fixed;
 inset: 0;
 z-index: 14000;
 display: flex;
 align-items: center;
 justify-content: center;
 padding: 24px;
 background: rgba(0,0,0,.45);
}
.wx-im-moments-overlay[hidden] { display: none !important; }
.wx-im-moments-overlay-card {
 width: min(520px, 100%);
 max-height: min(78vh, 720px);
 display: flex;
 flex-direction: column;
 background: #fff;
 border-radius: 10px;
 overflow: hidden;
 box-shadow: 0 16px 48px rgba(0,0,0,.18);
}
.wx-im-moments-overlay-head {
 display: flex;
 align-items: center;
 justify-content: space-between;
 gap: 12px;
 padding: 14px 16px;
 border-bottom: 1px solid #ececec;
}
.wx-im-moments-overlay-title {
 margin: 0;
 font-size: 16px;
 font-weight: 600;
 color: #111;
}
.wx-im-moments-overlay-close {
 border: none;
 background: transparent;
 font-size: 22px;
 line-height: 1;
 color: #888;
 cursor: pointer;
}
.wx-im-moments-overlay-list {
 flex: 1;
 min-height: 0;
 overflow: auto;
 padding: 8px 0;
}
.wx-im-moments-list-item {
 display: flex;
 align-items: center;
 gap: 12px;
 padding: 12px 16px;
 text-decoration: none;
 color: inherit;
 border-bottom: 1px solid #f3f3f3;
}
.wx-im-moments-list-item:hover { background: #f8f8f8; }
.wx-im-moments-list-cover {
 width: 52px;
 height: 52px;
 border-radius: 6px;
 overflow: hidden;
 flex-shrink: 0;
 background: #f2f2f2;
 display: flex;
 align-items: center;
 justify-content: center;
}
.wx-im-moments-list-cover img {
 width: 100%;
 height: 100%;
 object-fit: cover;
 display: block;
}
.wx-im-moments-list-cover.is-text {
 font-size: 12px;
 color: #888;
}
.wx-im-moments-list-body {
 flex: 1;
 min-width: 0;
 display: flex;
 flex-direction: column;
 gap: 4px;
}
.wx-im-moments-list-title {
 font-size: 14px;
 font-weight: 600;
 color: #111;
 white-space: nowrap;
 overflow: hidden;
 text-overflow: ellipsis;
}
.wx-im-moments-list-meta {
 font-size: 12px;
 color: #999;
}
.wx-im-moments-list-summary {
 font-size: 12px;
 line-height: 1.45;
 color: #666;
 display: -webkit-box;
 -webkit-line-clamp: 2;
 -webkit-box-orient: vertical;
 overflow: hidden;
}
.wx-im-moments-list-arrow {
 flex-shrink: 0;
 color: #c8c8c8;
 font-size: 18px;
}

.wx-im-moments-main {
 flex: 1; min-height: 0; display: flex; flex-direction: column;
 background: #f5f5f5; overflow: hidden;
}
.wx-im-moments-main[hidden] { display: none !important; }
.wx-im-app.is-moments-mode:not(.is-moments-group-profile) .wx-im-chat-body { display: none !important; }
.wx-im-app.is-moments-mode.is-moments-group-profile .wx-im-moments-main { display: none !important; }
.wx-im-app.is-moments-mode.is-moments-group-profile .wx-im-chat-body {
  display: flex !important;
  flex: 1;
  min-height: 0;
}
.wx-im-app.is-moments-mode .wx-im-favorites-main { display: none !important; }
.wx-im-moments-empty {
 flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
 min-height: 220px; padding: 28px 24px; text-align: center; color: #606066;
}
.wx-im-moments-empty p { margin: 0 0 8px; font-size: 16px; font-weight: 600; color: #191919; }
.wx-im-fav-main-head {
 flex-shrink: 0; display: flex; align-items: center; justify-content: space-between;
 gap: 12px; padding: 14px 18px 10px; background: #f5f5f5;
}
.wx-im-fav-main-title { margin: 0; font-size: 15px; font-weight: 600; color: #111; }
.wx-im-fav-main-actions { display: flex; gap: 8px; }
.wx-im-fav-main-actions[hidden] { display: none !important; }
.wx-im-fav-action-btn {
 height: 30px; padding: 0 12px; border: 1px solid #dcdcdc; border-radius: 4px;
 background: #fff; color: #333; font-size: 12px; cursor: pointer;
}
.wx-im-fav-action-btn.is-danger { color: #e64340; border-color: #f0c0be; }
.wx-im-fav-list {
 flex: 1; min-height: 0; overflow: auto; padding: 0 16px 16px;
}
.wx-im-fav-list[hidden] { display: none !important; }

/* 笔记编辑器 */
.wx-im-fav-note-editor {
 flex: 1; min-height: 0; display: flex; flex-direction: column;
 background: #fff; overflow: hidden;
}
.wx-im-fav-note-editor[hidden] { display: none !important; }
.wx-im-fav-note-head {
 flex-shrink: 0; display: flex; align-items: center; justify-content: space-between;
 gap: 12px; padding: 12px 16px; border-bottom: 1px solid #e7e7e7; background: #f5f5f5;
}
.wx-im-fav-note-back {
 border: none; background: transparent; color: #576b95; font-size: 14px; cursor: pointer; padding: 4px 0;
}
.wx-im-fav-note-head-title { margin: 0; flex: 1; text-align: center; font-size: 15px; font-weight: 600; color: #111; }
.wx-im-fav-note-save {
 border: none; border-radius: 4px; background: #07c160; color: #fff;
 font-size: 13px; font-weight: 600; padding: 6px 14px; cursor: pointer;
}
.wx-im-fav-note-save:hover { background: #06ad56; }
.wx-im-fav-note-body {
 flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 0; padding: 0; overflow: auto;
}
.wx-im-fav-note-title {
 flex-shrink: 0; width: 100%; box-sizing: border-box; border: none; border-bottom: 1px solid #ececec;
 padding: 14px 18px; font-size: 16px; font-weight: 600; color: #111; outline: none; background: #fff;
}
.wx-im-fav-note-content {
 flex: 1; width: 100%; min-height: 280px; box-sizing: border-box; border: none; resize: none;
 padding: 14px 18px 24px; font-size: 14px; line-height: 1.65; color: #333; outline: none; background: #fff;
 font-family: inherit;
}
.wx-im-fav-empty-wrap { padding: 48px 16px; text-align: center; }
.wx-im-fav-empty-create {
 margin-top: 12px; height: 36px; padding: 0 18px; border: 1px solid #dcdcdc; border-radius: 4px;
 background: #fff; color: #333; font-size: 13px; cursor: pointer;
}
.wx-im-fav-empty-create:hover { border-color: #07c160; color: #07c160; }
.wx-im-fav-card-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.wx-im-fav-badge {
 display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 3px;
 font-size: 10px; line-height: 1; color: #666; background: #f0f0f0;
}
.wx-im-fav-badge--pin { color: #576b95; background: #eef2fb; }
.wx-im-fav-badge--mark { color: #fa9d3b; background: #fff5eb; }
.wx-im-fav-badge--note { color: #07c160; background: #e7f8ef; }
.wx-im-fav-card-note-title { font-size: 14px; font-weight: 600; color: #111; margin-bottom: 4px; }
.wx-im-fav-card-note-body {
 font-size: 13px; color: #666; line-height: 1.5; max-height: 3em; overflow: hidden;
 display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.wx-im-fav-card.is-pinned { border-left: 3px solid #576b95; }
.wx-im-fav-card.is-marked { background: #fffdf8; }
.wx-im-fav-main-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.wx-im-fav-empty { margin: 48px 16px; text-align: center; font-size: 13px; color: #999; }
.wx-im-fav-card {
 position: relative; display: flex; gap: 10px; width: 100%;
 margin-bottom: 10px; padding: 12px 14px; border: none; border-radius: 6px;
 background: #fff; text-align: left; cursor: pointer;
 box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.wx-im-fav-card:hover { background: #fafafa; }
.wx-im-fav-card.is-selected { box-shadow: inset 0 0 0 2px #07c160; }
.wx-im-fav-card-check {
 flex-shrink: 0; width: 18px; height: 18px; margin-top: 2px;
 border: 1px solid #ccc; border-radius: 50%; background: #fff;
}
.wx-im-fav-card.is-selected .wx-im-fav-card-check,
.wx-im-fav-card.is-picked .wx-im-fav-card-check {
 border-color: #07c160; background: #07c160;
 box-shadow: inset 0 0 0 3px #fff;
}
.wx-im-fav-card-body { flex: 1; min-width: 0; }
.wx-im-fav-card-content {
 font-size: 14px; color: #333; line-height: 1.5; word-break: break-word;
 display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.wx-im-fav-card-content mark { background: #fff3b0; padding: 0 1px; }
.wx-im-fav-card-link {
 display: flex; gap: 10px; align-items: flex-start;
}
.wx-im-fav-card-thumb {
 flex-shrink: 0; width: 48px; height: 48px; border-radius: 4px;
 object-fit: cover; background: #f0f0f0;
}
.wx-im-fav-card-meta {
 display: flex; align-items: center; justify-content: space-between;
 gap: 8px; margin-top: 8px; font-size: 12px; color: #aaa;
}
.wx-im-fav-card-source { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wx-im-fav-card-time { flex-shrink: 0; }
.wx-im-fav-card-del {
 position: absolute; top: 8px; right: 8px; width: 24px; height: 24px;
 border: none; border-radius: 4px; background: rgba(0,0,0,.04);
 color: #999; font-size: 16px; line-height: 1; cursor: pointer; opacity: 0;
}
.wx-im-fav-card:hover .wx-im-fav-card-del { opacity: 1; }

/* 发送收藏弹窗 */
.wx-im-fav-send-modal,
.wx-im-fav-forward-modal {
 position: fixed; inset: 0; z-index: 12060;
 display: flex; align-items: center; justify-content: center;
 background: rgba(0,0,0,.45); padding: 16px;
}
.wx-im-fav-send-modal[hidden],
.wx-im-fav-forward-modal[hidden] { display: none !important; }
.wx-im-fav-send-card,
.wx-im-fav-forward-card {
 width: min(720px, 96vw); max-height: min(80vh, 680px);
 background: #fff; border-radius: 8px; overflow: hidden;
 display: flex; flex-direction: column; box-shadow: 0 16px 48px rgba(0,0,0,.22);
}
.wx-im-fav-send-head,
.wx-im-fav-forward-head {
 display: flex; align-items: center; justify-content: space-between;
 padding: 14px 16px 10px; border-bottom: 1px solid #f0f0f0;
}
.wx-im-fav-send-title,
.wx-im-fav-forward-title { margin: 0; font-size: 15px; font-weight: 600; color: #111; }
.wx-im-fav-send-close,
.wx-im-fav-forward-close {
 width: 28px; height: 28px; border: none; border-radius: 50%;
 background: #f5f5f5; color: #666; font-size: 20px; cursor: pointer;
}
.wx-im-fav-send-body { flex: 1; min-height: 0; display: flex; overflow: hidden; }
.wx-im-fav-send-side {
 flex: 0 0 200px; border-right: 1px solid #f0f0f0; background: #fafafa;
 display: flex; flex-direction: column; min-height: 0;
}
.wx-im-fav-send-list {
 flex: 1; min-height: 0; overflow: auto; padding: 8px 12px 12px; background: #f5f5f5;
}
.wx-im-fav-send-foot,
.wx-im-fav-forward-foot {
 display: flex; justify-content: flex-end; gap: 10px;
 padding: 10px 16px 14px; border-top: 1px solid #f0f0f0;
}
.wx-im-fav-send-cancel,
.wx-im-fav-forward-cancel,
.wx-im-fav-send-submit,
.wx-im-fav-forward-submit {
 min-width: 88px; height: 34px; padding: 0 16px; border-radius: 4px;
 font-size: 13px; cursor: pointer;
}
.wx-im-fav-send-cancel,
.wx-im-fav-forward-cancel { border: 1px solid #dcdcdc; background: #fff; color: #333; }
.wx-im-fav-send-submit,
.wx-im-fav-forward-submit { border: none; background: #07c160; color: #fff; }
.wx-im-fav-send-submit:disabled,
.wx-im-fav-forward-submit:disabled { opacity: .5; cursor: not-allowed; }
.wx-im-fav-forward-search {
 margin: 10px 16px; height: 34px; border: 1px solid #e5e5e5; border-radius: 4px;
 padding: 0 12px; font-size: 13px;
}
.wx-im-fav-forward-list {
 flex: 1; min-height: 0; overflow: auto; padding: 0 8px 8px;
}
.wx-im-fav-forward-item {
 display: flex; align-items: center; gap: 10px; width: 100%;
 padding: 10px 12px; border: none; background: transparent; text-align: left; cursor: pointer;
 border-radius: 4px;
}
.wx-im-fav-forward-item:hover { background: #f5f5f5; }
.wx-im-fav-forward-item.is-checked .wx-im-fav-card-check { border-color: #07c160; background: #07c160; box-shadow: inset 0 0 0 3px #fff; }
.wx-im-fav-forward-avatar {
 flex-shrink: 0; width: 36px; height: 36px; border-radius: 4px;
 background: #07c160; color: #fff; display: flex; align-items: center; justify-content: center;
 font-size: 14px; font-weight: 600; background-size: cover; background-position: center;
}
.wx-im-fav-forward-name { flex: 1; min-width: 0; font-size: 14px; color: #333; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 用户资料弹窗 */
.wx-im-profile-modal {
 position: fixed; inset: 0; z-index: 1200;
 display: flex; align-items: center; justify-content: center;
 background: rgba(0,0,0,.45); padding: 16px;
}
.wx-im-profile-modal[hidden] { display: none; }
.wx-im-profile-card {
 position: relative; width: min(400px, 94vw);
 background: #fff; border-radius: 12px; padding: 22px 20px 18px;
 box-shadow: 0 16px 48px rgba(0,0,0,.2);
}
.wx-im-profile-close {
 position: absolute; top: 10px; right: 10px;
 width: 32px; height: 32px; border: none; border-radius: 50%;
 background: #f5f5f5; color: #666; font-size: 22px; cursor: pointer;
}
.wx-im-profile-hero {
 display: flex;
 align-items: center;
 gap: 16px;
 text-align: left;
 padding-right: 28px;
}
.wx-im-profile-avatar-wrap {
 position: relative;
 flex-shrink: 0;
 display: flex;
 flex-direction: column;
 align-items: center;
 gap: 6px;
}
.wx-im-profile-avatar-wrap.is-clickable {
 cursor: pointer;
}
.wx-im-profile-avatar-wrap.is-clickable:hover .wx-im-profile-avatar {
 box-shadow: 0 0 0 2px rgba(7, 193, 96, 0.35);
}
.wx-im-profile-avatar-wrap.is-clickable:hover .wx-im-profile-avatar-hint {
 color: var(--im-brand-hover);
}
.wx-im-profile-avatar {
 width: 88px;
 height: 88px;
 border-radius: 10px;
 flex-shrink: 0;
 background: var(--im-brand);
 color: #fff;
 font-size: 32px;
 font-weight: 600;
 display: flex;
 align-items: center;
 justify-content: center;
 background-size: cover;
 background-position: center;
 transition: box-shadow 0.2s;
}
.wx-im-profile-avatar.is-clickable { cursor: pointer; }
.wx-im-profile-avatar-badge {
 position: absolute;
 right: -2px;
 top: 62px;
 width: 28px;
 height: 28px;
 border-radius: 50%;
 background: var(--im-brand);
 color: #fff;
 display: flex;
 align-items: center;
 justify-content: center;
 border: 2px solid #fff;
 box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
 pointer-events: none;
}
.wx-im-profile-avatar-badge[hidden] { display: none !important; }
.wx-im-profile-avatar-hint {
 font-size: 12px;
 line-height: 1.2;
 color: var(--im-brand);
 white-space: nowrap;
}
.wx-im-profile-avatar-hint[hidden] { display: none !important; }
.wx-im-profile-hero-text {
 flex: 1;
 min-width: 0;
 display: flex;
 flex-direction: column;
 justify-content: center;
 min-height: 88px;
}
.wx-im-profile-title-row {
 display: flex; align-items: center; gap: 6px; margin-bottom: 4px;
}
.wx-im-profile-title-row .wx-im-profile-title { margin: 0; }
.wx-im-profile-title { margin: 0 0 4px; font-size: 18px; color: #111; }
.wx-im-profile-qr-btn {
 flex-shrink: 0; width: 28px; height: 28px; padding: 0;
 border: none; border-radius: 4px; background: transparent;
 color: #666; cursor: pointer; display: inline-flex;
 align-items: center; justify-content: center;
}
.wx-im-profile-qr-btn:hover { background: #f0f0f0; color: var(--im-brand); }
.wx-im-profile-qr-btn[hidden] { display: none !important; }
.wx-im-profile-id { margin: 0; font-size: 13px; color: #888; }
.wx-im-profile-sub { margin: 6px 0 0; font-size: 13px; color: #666; line-height: 1.5; }
.wx-im-profile-source { margin: 4px 0 0; font-size: 12px; color: #07c160; }
.wx-im-profile-meta { margin: 4px 0 0; font-size: 12px; color: #999; }
.wx-im-profile-region { margin: 4px 0 0; font-size: 12px; color: #999; }
.wx-im-profile-actions {
  display: flex; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid #f0f0f0;
}
.wx-im-profile-actions[hidden] { display: none !important; }
.wx-im-profile-add-friend,
.wx-im-profile-send-msg {
  flex: 1; height: 40px; border: none; border-radius: 6px; font-size: 14px; font-weight: 600; cursor: pointer;
}
.wx-im-profile-add-friend {
  background: var(--im-brand); color: #fff;
}
.wx-im-profile-add-friend.is-added,
.wx-im-profile-add-friend:disabled {
  background: #f0f0f0; color: #999; cursor: default;
}
.wx-im-profile-send-msg {
  background: #fff; color: #333; border: 1px solid #e5e5e5;
}
.wx-im-profile-send-msg:hover { border-color: var(--im-brand); color: var(--im-brand); }
.wx-im-profile-qr-wrap { margin-top: 16px; text-align: center; padding-top: 14px; border-top: 1px solid #f0f0f0; }
.wx-im-profile-qr { width: 140px; height: 140px; object-fit: contain; border: 1px solid #eee; border-radius: 8px; }
.wx-im-profile-qr-tip { margin: 8px 0 0; font-size: 12px; color: #999; }
.wx-im-profile-edit { margin-top: 14px; padding-top: 14px; border-top: 1px solid #f0f0f0; }
.wx-im-profile-field {
 display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.wx-im-profile-field span {
 flex: 0 0 72px; font-size: 13px; color: #666;
}
.wx-im-profile-field input {
 flex: 1; min-width: 0; height: 38px; border: 1px solid #e5e5e5;
 border-radius: 6px; padding: 0 12px; font-size: 14px; color: #111;
}
.wx-im-profile-field input:focus {
 outline: none; border-color: var(--im-brand); box-shadow: 0 0 0 2px rgba(7,193,96,.12);
}
.wx-im-profile-save {
 width: 100%; height: 40px; margin-top: 6px; border: none; border-radius: 6px;
 background: var(--im-brand); color: #fff; font-size: 15px; font-weight: 600; cursor: pointer;
}
.wx-im-profile-save:disabled { opacity: .55; cursor: wait; }
.wx-im-profile-logout {
 width: 100%; height: 40px; margin-top: 10px; border: 1px solid #e5e5e5;
 border-radius: 6px; background: #fff; color: #e64340; font-size: 15px;
 font-weight: 600; cursor: pointer;
}
.wx-im-profile-logout:hover { background: #fff5f5; border-color: #e64340; }
.wx-im-profile-logout[hidden] { display: none !important; }
.wx-im-profile-qr-modal {
 position: fixed; inset: 0; z-index: 1210;
 display: flex; align-items: center; justify-content: center;
 background: rgba(0,0,0,.45); padding: 16px;
}
.wx-im-profile-qr-modal[hidden] { display: none !important; }
.wx-im-profile-qr-popup {
 position: relative; width: min(300px, 88vw); background: #fff;
 border-radius: 12px; padding: 24px 20px 20px; text-align: center;
 box-shadow: 0 16px 48px rgba(0,0,0,.2);
}
.wx-im-profile-qr-popup-close {
 position: absolute; top: 8px; right: 8px;
 width: 28px; height: 28px; border: none; border-radius: 50%;
 background: #f5f5f5; color: #666; font-size: 20px; cursor: pointer; line-height: 1;
}
.wx-im-profile-qr-popup-title { margin: 0 0 16px; font-size: 16px; font-weight: 600; color: #111; }
.wx-im-profile-qr-popup-img { width: 200px; height: 200px; object-fit: contain; border-radius: 8px; }
.wx-im-profile-qr-popup-tip { margin: 12px 0 0; font-size: 13px; color: #888; }
.wx-im-msg-row.is-flash .wx-im-msg-bubble {
  animation: wx-im-msg-flash 2.2s ease;
}
@keyframes wx-im-msg-flash {
  0%, 100% { background: inherit; }
  20%, 60% { background: #fff7cc; }
}
.wx-im-chat-search {
 flex: 1;
 min-height: 0;
 display: flex;
 flex-direction: column;
 background: #ededed;
 border-bottom: 1px solid #e0e0e0;
}
.wx-im-chat-search[hidden] { display: none !important; }
.wx-im-chat-conv.is-search-open .wx-im-messages { display: none; }
.wx-im-chat-search-head {
 display: flex; align-items: center; gap: 8px;
 padding: 10px 16px 8px; background: #f5f5f5; border-bottom: 1px solid #e7e7e7;
}
.wx-im-chat-search-input {
 flex: 1; min-width: 0; height: 34px; border: 1px solid #dcdcdc; border-radius: 4px;
 padding: 0 12px; font-size: 14px; background: #fff;
}
.wx-im-chat-search-input:focus { outline: none; border-color: var(--im-brand); box-shadow: 0 0 0 2px rgba(7,193,96,.1); }
.wx-im-chat-search-close {
 flex: 0 0 32px; width: 32px; height: 32px; border: none; background: transparent;
 font-size: 20px; color: #999; cursor: pointer; border-radius: 4px;
}
.wx-im-chat-search-close:hover { background: #ebebeb; color: #666; }
.wx-im-chat-search-hint { margin: 0; padding: 8px 16px 0; font-size: 12px; color: #999; flex-shrink: 0; }
.wx-im-chat-search-results {
 flex: 1; min-height: 0; overflow: auto; padding: 4px 0 12px; background: #ededed;
}
.wx-im-chat-search-empty { margin: 24px 16px; text-align: center; font-size: 13px; color: #999; }
.wx-im-chat-search-item {
 display: flex; flex-direction: column; align-items: flex-start; gap: 4px; width: 100%;
 padding: 10px 16px; border: none; background: transparent; text-align: left; cursor: pointer;
}
.wx-im-chat-search-item:hover { background: #e4e4e4; }
.wx-im-chat-search-item-text { font-size: 14px; color: #333; line-height: 1.45; word-break: break-word; }
.wx-im-chat-search-item-text mark { background: #fff3b0; color: inherit; padding: 0 1px; }
.wx-im-chat-search-item-time { font-size: 12px; color: #aaa; }
.wx-im-head-btn.is-active { background: rgba(7,193,96,.12); }
.wx-im-msg-avatar { cursor: pointer; }
.wx-im-conv-avatar { cursor: pointer; }
.wx-im-chat-title.is-clickable { cursor: pointer; }
.wx-im-chat-title.is-clickable:hover { color: var(--im-brand); }

.wx-im-icon-tool--wallet img { width:22px; height:22px; }
.wx-im-send-sheet { position:relative; width:min(420px,94vw); max-height:90vh; overflow:auto; border-radius:12px; background:#fff; box-shadow:0 16px 48px rgba(0,0,0,.22); padding:0 0 20px; }
.wx-im-send-head { display:flex; align-items:center; justify-content:space-between; padding:16px 18px 10px; border-bottom:1px solid #f0f0f0; }
.wx-im-send-head h3 { margin:0; font-size:17px; font-weight:600; color:#111; }
.wx-im-send-close { width:32px; height:32px; border:none; background:#f5f5f5; color:#666; border-radius:50%; font-size:22px; line-height:1; cursor:pointer; }
.wx-im-send-tabs { display:flex; gap:8px; padding:12px 18px 0; }
.wx-im-send-tab { flex:1; height:34px; border:1px solid #e5e5e5; border-radius:6px; background:#fafafa; color:#666; font-size:13px; cursor:pointer; }
.wx-im-send-tab.is-active { border-color:#f25643; background:#fff5f3; color:#e04533; font-weight:600; }
.wx-im-send-peer { margin:0; padding:14px 18px 0; font-size:14px; color:#666; }
.wx-im-send-fields { padding:12px 18px 0; }
.wx-im-send-row { display:flex; align-items:center; gap:8px; min-height:48px; padding:8px 0; border-bottom:1px solid #f0f0f0; }
.wx-im-send-row--bless { border-bottom:none; }
.wx-im-send-row--block { flex-direction:column; align-items:stretch; gap:10px; border-bottom:none; }
.wx-im-send-label { flex:0 0 auto; min-width:72px; font-size:14px; color:#333; }
.wx-im-send-yen { color:#111; font-size:16px; font-weight:600; }
.wx-im-send-yen--lg { font-size:28px; }
.wx-im-send-input { flex:1; min-width:0; border:none; outline:none; font-size:14px; color:#111; background:transparent; }
.wx-im-send-input--right { text-align:right; }
.wx-im-send-input--amount { font-size:18px; font-weight:600; }
.wx-im-send-input--amount-lg { font-size:34px; font-weight:700; }
.wx-im-send-input--bless { width:100%; text-align:center; }
.wx-im-send-unit { font-size:13px; color:#888; }
.wx-im-send-amount-row { display:flex; align-items:center; gap:6px; }
.wx-im-send-balance { margin:14px 18px 0; font-size:12px; color:#888; line-height:1.6; }
.wx-im-send-recharge-link { border:none; background:none; padding:0; color:#576b95; font-size:12px; cursor:pointer; }
.wx-im-send-submit { display:block; width:calc(100% - 36px); margin:16px auto 0; height:44px; border:none; border-radius:6px; color:#fff; font-size:16px; font-weight:600; cursor:pointer; }
.wx-im-send-submit--red { background:#f25643; }
.wx-im-send-submit--green { background:#07c160; }
.wx-im-send-submit:disabled { opacity:.55; cursor:wait; }

.wx-im-tool-svg { display: block; color: #666; }
.wx-im-icon-tool:hover .wx-im-tool-svg { color: var(--im-brand); }
.wx-im-emoji-panel { display: none; }
.wx-im-msg-menu {
 position: fixed; z-index: 1300; min-width: 128px; background: #fff;
 border: 1px solid var(--im-line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: 4px 0;
}
.wx-im-msg-menu[hidden] { display: none; }
.wx-im-msg-menu button {
 display: block; width: 100%; border: none; background: transparent; text-align: left;
 padding: 10px 16px; font-size: 14px; color: var(--im-text); cursor: pointer;
}
.wx-im-msg-menu button:hover { background: #f5f5f5; }
.wx-im-msg-menu button[disabled] { opacity: .4; cursor: not-allowed; }
.wx-im-recharge-modal, .wx-im-group-drawer-legacy {
 position: fixed; inset: 0; z-index: 1250; display: flex;
 background: rgba(0,0,0,.45); padding: 16px;
}
.wx-im-recharge-modal {
 align-items: center;
 justify-content: center;
}
.wx-im-recharge-modal[hidden], .wx-im-group-drawer-legacy[hidden] { display: none; }
.wx-im-recharge-card, .wx-im-group-drawer-card {
 width: min(400px, 92vw); max-height: min(90vh, 640px); background: #fff; border-radius: 10px; overflow: hidden;
 display: flex; flex-direction: column; box-shadow: 0 16px 48px rgba(0,0,0,.2);
 margin: auto;
}
.wx-im-group-drawer-card {
 width: 360px;
 max-width: 100%;
 max-height: 100%;
 height: 100%;
 margin: 0;
 border-radius: 0;
 animation: wx-im-drawer-in .22s ease-out;
}
@keyframes wx-im-drawer-in {
 from { transform: translateX(100%); }
 to { transform: translateX(0); }
}
.wx-im-recharge-head, .wx-im-group-drawer-head {
 display: flex; align-items: center; justify-content: space-between; padding: 14px 18px;
 border-bottom: 1px solid #ececec; background: #fafafa;
}
.wx-im-recharge-head h3, .wx-im-group-drawer-head h3 { margin: 0; font-size: 16px; font-weight: 600; color: #111; }
.wx-im-recharge-close, .wx-im-group-drawer-close {
 width: 32px; height: 32px; border: none; border-radius: 50%; background: #eee; font-size: 22px; cursor: pointer; color: #666;
}
.wx-im-recharge-body { flex: 1; min-height: 0; overflow-y: auto; padding: 18px; }
.wx-im-recharge-balance { margin: 0 0 6px; font-size: 15px; font-weight: 600; color: #111; }
.wx-im-recharge-sub { margin: 0 0 14px; font-size: 13px; color: #888; }
.wx-im-recharge-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.wx-im-recharge-option {
 display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
 min-height: 72px; padding: 10px 8px; border: 1px solid #e8e8e8; border-radius: 8px;
 background: #fafafa; cursor: pointer; transition: border-color .15s, background .15s;
}
.wx-im-recharge-option:hover { border-color: var(--im-brand); background: #f3fbf6; }
.wx-im-recharge-option strong { font-size: 18px; color: #111; }
.wx-im-recharge-option span { font-size: 12px; color: #888; }
.wx-im-recharge-empty { grid-column: 1 / -1; margin: 0; padding: 24px 12px; text-align: center; font-size: 13px; color: #999; }
.wx-im-recharge-tip { margin: 14px 0 0; font-size: 12px; color: #aaa; line-height: 1.5; }
.wx-im-recharge-back {
 border: none; background: none; padding: 0 0 12px; color: #576b95; font-size: 13px; cursor: pointer;
}
.wx-im-recharge-pay-amt { margin: 0 0 14px; font-size: 16px; font-weight: 600; color: #111; text-align: center; }
.wx-im-recharge-qr-wrap { display: flex; justify-content: center; margin-bottom: 12px; }
.wx-im-recharge-qr {
 width: 220px; height: 220px; padding: 10px; border: 1px solid #eee; border-radius: 10px; background: #fff;
 display: flex; align-items: center; justify-content: center;
}
.wx-im-recharge-qr img, .wx-im-recharge-qr canvas { display: block; max-width: 100%; max-height: 100%; }
.wx-im-recharge-pay-tip { margin: 0; text-align: center; font-size: 14px; color: #333; font-weight: 500; }
.wx-im-recharge-pay-sub { margin: 6px 0 0; text-align: center; font-size: 12px; color: #999; line-height: 1.5; }
.wx-im-recharge-pay-status { margin: 10px 0 0; text-align: center; font-size: 13px; color: var(--im-brand); }

.wx-im-group-drawer-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0; background: #ededed; }
.wx-im-group-block { background: #fff; margin-bottom: 8px; }
.wx-im-group-block--members { padding-bottom: 0; }
.wx-im-group-block--danger { margin-bottom: 8px; }
.wx-im-group-block--admin { margin-top: 0; }
.wx-im-group-member-search-wrap {
 display: flex;
 align-items: center;
 gap: 8px;
 margin: 12px 16px 10px;
 padding: 0 12px;
 height: 32px;
 border-radius: 6px;
 background: #f5f5f5;
}
.wx-im-group-member-search-ico { opacity: .55; flex-shrink: 0; }
.wx-im-group-member-search {
 flex: 1;
 min-width: 0;
 border: none;
 background: transparent;
 font-size: 13px;
 color: #111;
 outline: none;
}
.wx-im-group-member-search::placeholder { color: #b2b2b2; }
.wx-im-group-cell-label-stack {
 display: flex;
 flex-direction: column;
 align-items: flex-start;
 gap: 2px;
 min-width: 0;
}
.wx-im-group-cell-hint {
 font-size: 12px;
 color: #b2b2b2;
 line-height: 1.35;
 font-weight: 400;
}
.wx-im-group-cell-btn--remark { align-items: flex-start; padding-top: 10px; padding-bottom: 10px; min-height: 56px; }
.wx-im-group-cell-row--sub,
.wx-im-group-cell-btn--sub { padding-left: 32px; }
.wx-im-group-cell-btn--danger {
 justify-content: center;
 color: #fa5151;
 font-size: 15px;
 cursor: pointer;
}
.wx-im-group-cell-btn--danger:hover { background: #fafafa; }
.wx-im-group-more-members-arrow {
 font-size: 14px;
 line-height: 1;
 opacity: .75;
}
.wx-im-group-cells { padding: 0; }
.wx-im-group-cell-btn,
.wx-im-group-cell-row {
 display: flex;
 align-items: center;
 justify-content: space-between;
 width: 100%;
 min-height: 48px;
 padding: 0 16px;
 border: none;
 border-bottom: 1px solid #ededed;
 background: #fff;
 text-align: left;
 cursor: pointer;
 box-sizing: border-box;
 font: inherit;
 color: inherit;
}
.wx-im-group-cell-btn:last-child,
.wx-im-group-cell-row:last-child { border-bottom: none; }
.wx-im-group-cell-row--switch { cursor: default; padding-right: 12px; }
.wx-im-group-cell-label { font-size: 15px; color: #000; flex-shrink: 0; }
.wx-im-group-cell-right {
 display: flex;
 align-items: center;
 justify-content: flex-end;
 flex: 1;
 min-width: 0;
 margin-left: 12px;
 gap: 4px;
}
.wx-im-group-cell-right--multi { flex-direction: column; align-items: flex-end; }
.wx-im-group-cell-val {
 font-size: 14px;
 color: #888;
 max-width: 168px;
 overflow: hidden;
 text-overflow: ellipsis;
 white-space: nowrap;
}
.wx-im-group-cell-val--sub {
 white-space: normal;
 display: -webkit-box;
 -webkit-line-clamp: 2;
 -webkit-box-orient: vertical;
 text-align: right;
 line-height: 1.45;
 max-width: 190px;
}
.wx-im-group-cell-arrow { font-size: 18px; color: #c8c8c8; line-height: 1; flex-shrink: 0; }
.wx-im-group-cell-avatar {
 width: 36px;
 height: 36px;
 border-radius: 6px;
 background: var(--im-brand);
 color: #fff;
 display: flex;
 align-items: center;
 justify-content: center;
 font-size: 14px;
 font-weight: 600;
 background-size: cover;
 background-position: center;
 flex-shrink: 0;
}
.wx-im-group-switch {
 width: 44px;
 height: 24px;
 accent-color: var(--im-brand);
 cursor: pointer;
}
.wx-im-group-more-members {
 display: flex;
 align-items: center;
 justify-content: center;
 width: 100%;
 padding: 12px 16px 16px;
 border: none;
 background: #fff;
 color: #576b95;
 font-size: 14px;
 cursor: pointer;
 gap: 4px;
}
.wx-im-group-members--grid {
 display: grid;
 grid-template-columns: repeat(4, minmax(0, 1fr));
 gap: 12px 8px;
 padding: 4px 16px 8px;
}
.wx-im-group-member-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.wx-im-group-member-ava {
 width: 48px; height: 48px; border-radius: 6px; flex-shrink: 0; background: #e8e8e8;
 background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center;
 font-size: 16px; color: #fff; cursor: pointer;
}
.wx-im-group-member-name {
 width: 100%; font-size: 11px; color: #888; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.wx-im-group-member-add {
 width: 48px; height: 48px; border-radius: 6px; background: #f7f7f7;
 border: 1px dashed #d9d9d9; display: flex; align-items: center; justify-content: center;
 font-size: 28px; color: #ccc; line-height: 1; cursor: pointer;
}
.wx-im-group-member-kick {
 position: absolute; top: -4px; right: 0; width: 18px; height: 18px; border: none; border-radius: 50%;
 background: #fa5151; color: #fff; font-size: 14px; line-height: 1; cursor: pointer; padding: 0;
}
.wx-im-group-member-empty {
 grid-column: 1 / -1;
 margin: 8px 0 12px;
 text-align: center;
 font-size: 13px;
 color: #b2b2b2;
}
.wx-im-group-follow-modal {
 position: fixed;
 inset: 0;
 z-index: 2200;
 background: rgba(0, 0, 0, 0.5);
 display: flex;
 align-items: center;
 justify-content: center;
 padding: 16px;
}
.wx-im-group-follow-modal[hidden] { display: none !important; }
.wx-im-group-follow-card {
 width: min(360px, 92vw);
 max-height: min(70vh, 520px);
 background: #fff;
 border-radius: 10px;
 display: flex;
 flex-direction: column;
 overflow: hidden;
 box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}
.wx-im-group-follow-head {
 display: flex;
 align-items: center;
 justify-content: space-between;
 padding: 14px 16px 8px;
 border-bottom: 1px solid #ededed;
}
.wx-im-group-follow-title { margin: 0; font-size: 16px; font-weight: 600; color: #111; }
.wx-im-group-follow-close {
 border: none;
 background: transparent;
 font-size: 22px;
 line-height: 1;
 color: #888;
 cursor: pointer;
 padding: 0 4px;
}
.wx-im-group-follow-tip {
 margin: 0;
 padding: 10px 16px;
 font-size: 12px;
 color: #999;
 line-height: 1.45;
 background: #fafafa;
}
.wx-im-group-follow-list {
 flex: 1;
 min-height: 0;
 overflow-y: auto;
 padding: 4px 0;
}
.wx-im-group-follow-item {
 display: flex;
 align-items: center;
 gap: 10px;
 padding: 10px 16px;
 cursor: pointer;
}
.wx-im-group-follow-item:hover { background: #fafafa; }
.wx-im-group-follow-name { font-size: 15px; color: #111; }
.wx-im-group-follow-empty {
 margin: 24px 16px;
 text-align: center;
 font-size: 13px;
 color: #b2b2b2;
}
.wx-im-group-follow-actions {
 display: flex;
 border-top: 1px solid #ededed;
}
.wx-im-group-follow-cancel,
.wx-im-group-follow-ok {
 flex: 1;
 border: none;
 background: #fff;
 padding: 14px 12px;
 font-size: 15px;
 cursor: pointer;
}
.wx-im-group-follow-cancel { color: #111; border-right: 1px solid #ededed; }
.wx-im-group-follow-ok { color: var(--im-brand); font-weight: 600; }
.wx-im-group-quit-wrap { padding: 12px 0 20px; background: transparent; }
.wx-im-group-quit-btn {
 display: block;
 width: 100%;
 padding: 14px 16px;
 border: none;
 background: #fff;
 color: #fa5151;
 font-size: 16px;
 text-align: center;
 cursor: pointer;
}
.wx-im-group-quit-btn--dissolve { margin-top: 0; border-top: 1px solid #ededed; color: #fa5151; }
.wx-im-group-qr-modal,
.wx-im-group-input-modal {
 position: fixed;
 inset: 0;
 z-index: 2200;
 background: rgba(0, 0, 0, 0.5);
 display: flex;
 align-items: center;
 justify-content: center;
 padding: 16px;
}
.wx-im-group-qr-modal[hidden],
.wx-im-group-input-modal[hidden] { display: none !important; }
.wx-im-group-qr-card,
.wx-im-group-input-card {
 width: min(320px, 92vw);
 background: #fff;
 border-radius: 10px;
 padding: 24px 20px 18px;
 text-align: center;
 box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}
.wx-im-group-qr-title,
.wx-im-group-input-title {
 margin: 0 0 16px;
 font-size: 17px;
 font-weight: 600;
 color: #111;
}
.wx-im-group-qr-img-wrap {
 min-height: 200px;
 display: flex;
 align-items: center;
 justify-content: center;
 margin-bottom: 8px;
}
.wx-im-group-qr { width: 200px; height: 200px; object-fit: contain; }
.wx-im-group-qr-loading { margin: 0; font-size: 14px; color: #888; }
.wx-im-group-qr-tip { margin: 0 0 14px; font-size: 12px; color: #999; line-height: 1.5; }
.wx-im-group-qr-close {
 border: none;
 background: transparent;
 color: #576b95;
 font-size: 15px;
 cursor: pointer;
 padding: 8px 16px;
}
.wx-im-group-input-field {
 width: 100%;
 height: 42px;
 border: 1px solid #e5e5e5;
 border-radius: 6px;
 padding: 0 12px;
 font-size: 15px;
 box-sizing: border-box;
 outline: none;
}
.wx-im-group-input-field:focus { border-color: var(--im-brand); box-shadow: 0 0 0 2px rgba(7, 193, 96, 0.12); }
.wx-im-group-input-field--area {
 height: auto;
 min-height: 96px;
 padding: 10px 12px;
 resize: vertical;
 font-family: inherit;
 line-height: 1.5;
}
.wx-im-group-input-actions {
 display: flex;
 justify-content: flex-end;
 gap: 20px;
 margin-top: 18px;
}
.wx-im-group-input-cancel,
.wx-im-group-input-ok {
 border: none;
 background: transparent;
 font-size: 15px;
 cursor: pointer;
 padding: 6px 4px;
}
.wx-im-group-input-cancel { color: #888; }
.wx-im-group-input-ok { color: #576b95; font-weight: 600; }
.wx-im-recharge-form { margin-top: 8px; }
.wx-im-recharge-field { display: block; margin-bottom: 12px; }
.wx-im-recharge-field > span { display: block; margin-bottom: 8px; font-size: 13px; color: #666; }
.wx-im-recharge-amount-row {
 display: flex; align-items: center; gap: 6px;
 border: 1px solid #e5e5e5; border-radius: 6px; background: #fafafa; padding: 0 12px; height: 44px;
}
.wx-im-recharge-yen { font-size: 18px; color: #333; font-weight: 600; }
.wx-im-recharge-amount-input {
 flex: 1; min-width: 0; border: none; background: transparent; font-size: 22px; font-weight: 600; color: #111; outline: none;
}
.wx-im-recharge-coin-preview { margin: 0 0 14px; font-size: 13px; color: #888; min-height: 18px; }
.wx-im-recharge-submit {
 width: 100%; height: 42px; border: none; border-radius: 6px; background: var(--im-brand); color: #fff;
 font-size: 15px; font-weight: 600; cursor: pointer;
}
.wx-im-recharge-submit:disabled { opacity: .55; cursor: not-allowed; }
.wx-im-profile-modal {
 position: fixed; inset: 0; z-index: 1200;
 display: flex; align-items: center; justify-content: center;
 background: rgba(0,0,0,.4); padding: 16px;
}
.wx-im-profile-card {
 position: relative; width: min(360px, 94vw);
 background: #fff; border-radius: 8px; padding: 20px 18px 16px;
 box-shadow: 0 8px 32px rgba(0,0,0,.18);
}
.wx-im-profile-close {
 position: absolute; top: 8px; right: 8px;
 width: 28px; height: 28px; border: none; border-radius: 50%;
 background: #f0f0f0; color: #666; font-size: 20px; cursor: pointer; line-height: 1;
}
.wx-im-profile-field {
 display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
 border-bottom: 1px solid #f0f0f0; padding-bottom: 10px;
}
.wx-im-profile-field span { flex: 0 0 68px; font-size: 13px; color: #888; }
.wx-im-profile-field input {
 flex: 1; min-width: 0; height: 36px; border: none; padding: 0;
 font-size: 14px; color: #111; background: transparent; outline: none;
}
.wx-im-textarea {
 flex: 1; width: 100%; min-height: 80px; max-height: 160px;
 border: none; background: transparent; resize: none; outline: none;
 font-size: 14px; line-height: 1.55; color: var(--im-text); font-family: inherit;
}
.wx-im-send {
 flex-shrink: 0; min-width: 52px; height: 26px; padding: 0 12px;
 border: none; border-radius: 4px; background: #e9e9e9;
 color: #fff; font-size: 12px; cursor: pointer; transition: background .15s, opacity .15s;
}
.wx-im-send:not(:disabled) {
 background: #07c160; color: #fff;
}
.wx-im-send:not(:disabled):hover { background: #06ad56; }
.wx-im-send:disabled {
 background: #e9e9e9; color: #fff; cursor: not-allowed;
}
.wx-im-chat-head {
 border-bottom: 1px solid #f5f5f5;
 background: #ffffff;
 padding: 0 12px 0 16px;
 min-height: 48px;
}
.wx-im-chat-title { font-size: 15px; font-weight: 500; }
.wx-im-head-more-dots {
 width: 18px;
 background-position: 0 center, 7px center, 14px center;
}
.wx-im-chat-head-meta { flex-shrink: 0; font-size: 12px; color: var(--im-text-muted); margin-left: 6px; }
.wx-im-chat-head-meta[hidden] { display: none !important; }

body.wechat-im-layout .bce-head-logo-text {
 display: inline;
}

/* ===== 微信 PC 1:1 全局对齐（功能不变，仅视觉） ===== */
.wx-im-app { background: #dcdce1; }

.wx-im-search::placeholder {
 color: var(--im-text-muted);
}

.wx-im-chat-search {
 background: var(--im-chat-bg);
 border-bottom: 1px solid var(--im-line);
}

.wx-im-chat-search-results {
 background: var(--im-chat-bg);
}

.wx-im-icon-btn {
 border-radius: 2px;
 color: #666;
}

.wx-im-icon-btn:hover:not(:disabled) {
 background: rgba(0, 0, 0, 0.04);
}

.wx-im-conv-plus-menu {
 border-radius: 4px;
 box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.wx-im-conv-plus-item {
 font-size: 13px;
 color: #333;
}

.wx-im-contacts-panel,
.wx-im-account-panel {
 /* background: var(--im-list-bg); */
}

.wx-im-account-card,
.wx-im-fav-search-wrap {
 /* background: transparent; */
 border-radius: 4px;
}

.wx-im-favorites-main,
.wx-im-moments-main,
.wx-im-moments-empty {
 background: var(--im-chat-bg);
}

.wx-im-fav-main-head {
 background: var(--im-chat-head-bg);
 border-bottom: 1px solid #e7e7e7;
}

.wx-im-fav-card {
 border-radius: 4px;
 box-shadow: none;
 border: 1px solid #e7e7e7;
}

.wx-im-msg-time-hint {
 font-size: 12px;
 color: #b2b2b2;
}

.wx-im-msg-row.is-self .wx-im-msg-file {
 color: var(--im-text);
}

.wx-im-emoji-popover {
 border-radius: 4px;
 box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
 border: 1px solid #e7e7e7;
}

.wx-im-emoji-tab.is-active {
 color: var(--im-brand);
}

.wx-im-voice-hold-bar {
 border-radius: 4px;
 background: #f5f5f5;
 color: #666;
 font-size: 14px;
}

.wx-im-chat-search-head {
 background: var(--im-chat-head-bg);
 border-bottom: 1px solid #e7e7e7;
}

.wx-im-chat-search-input {
 background: #ffffff;
 border: 1px solid #e7e7e7;
 border-radius: 4px;
 font-size: 13px;
}

.wx-im-auth-modal-card,
.wx-im-user-picker-card {
 border-radius: 4px;
 box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.wx-im-auth-tab.is-active,
.wx-im-picker-tab.is-active {
 color: var(--im-brand);
}

.wx-im-group-member-ava {
 border-radius: 4px;
}

.wx-im-panel-zoom {
 border: none;
 border-radius: 3px;
 background: transparent;
 box-shadow: none;
}

.wx-im-panel-zoom-btn {
 font-size: 16px;
 color: #555;
}

.wx-im-mobile-tabbar {
 background: #f7f7f7;
 border-top: 1px solid #e7e7e7;
}

.wx-im-mobile-tab.is-active {
 color: var(--im-brand);
}

.wx-im-rail-btn img,
.wx-im-rail-ico {
 width: 20px;
 height: 20px;
}

.wx-im-conv-badge {
 border-radius: 8px;
 font-size: 10px;
 min-width: 16px;
 height: 16px;
 line-height: 16px;
}

.wx-im-conv-item.is-active .wx-im-conv-badge {
 background: transparent;
 color: var(--im-danger);
}

.wx-im-head-more-dots {
 width: 18px;
 background-position: 0 center, 7px center, 14px center;
}

/* 会话列表固定置顶：系统通知 / 企业微信客服 */
.wx-im-conv-item.is-pinned-fixed .wx-im-conv-name {
 font-weight: 600;
}

.wx-im-sys-notify-day {
 text-align: center;
 font-size: 12px;
 color: #999;
 padding: 16px 12px 8px;
}

.wx-im-sys-notify-card {
 max-width: 520px;
 margin: 0 auto 12px;
 background: #fff;
 border-radius: 8px;
 box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
 overflow: hidden;
 display: flex;
 cursor: pointer;
 transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.wx-im-sys-notify-card:hover {
 box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
 transform: translateY(-1px);
}

.wx-im-sys-notify-card.is-unread {
 border-left: 3px solid #fa5151;
}

.wx-im-sys-notify-card-thumb {
 width: 96px;
 flex-shrink: 0;
 background: #f5f5f5;
}

.wx-im-sys-notify-card-thumb img {
 width: 96px;
 height: 96px;
 object-fit: cover;
 display: block;
}

.wx-im-sys-notify-card-main {
 flex: 1;
 min-width: 0;
 display: flex;
 flex-direction: column;
}

.wx-im-sys-notify-card-head {
 display: flex;
 align-items: center;
 gap: 8px;
 padding: 12px 14px 0;
}

.wx-im-sys-notify-card-title {
 font-size: 15px;
 font-weight: 600;
 color: #111;
 line-height: 1.4;
 flex: 1;
 min-width: 0;
 overflow: hidden;
 text-overflow: ellipsis;
 white-space: nowrap;
}

.wx-im-sys-notify-unread-dot {
 width: 8px;
 height: 8px;
 border-radius: 50%;
 background: #fa5151;
 flex-shrink: 0;
}

.wx-im-sys-notify-card-body {
 padding: 8px 14px 0;
 font-size: 13px;
 line-height: 1.55;
 color: #666;
 display: -webkit-box;
 -webkit-line-clamp: 2;
 -webkit-box-orient: vertical;
 overflow: hidden;
}

.wx-im-sys-notify-card-foot {
 padding: 8px 14px 12px;
 font-size: 12px;
 color: #999;
}

.wx-im-sys-notify-detail {
 max-width: 560px;
 margin: 0 auto;
 padding: 8px 12px 24px;
}

.wx-im-sys-notify-back {
 border: none;
 background: transparent;
 color: #576b95;
 font-size: 14px;
 padding: 8px 0 12px;
 cursor: pointer;
}

.wx-im-sys-notify-detail-title {
 margin: 0 0 12px;
 font-size: 20px;
 line-height: 1.45;
 color: #111;
 font-weight: 700;
}

.wx-im-sys-notify-detail-image {
 width: 100%;
 border-radius: 8px;
 display: block;
 margin-bottom: 14px;
}

.wx-im-sys-notify-detail-body {
 background: #fff;
 border-radius: 8px;
 padding: 16px;
 font-size: 15px;
 line-height: 1.75;
 color: #333;
 word-break: break-word;
 box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.wx-im-sys-notify-detail-body img {
 max-width: 100%;
 height: auto;
 border-radius: 6px;
 margin: 8px 0;
}

.wx-im-sys-notify-detail-foot {
 display: flex;
 justify-content: space-between;
 align-items: center;
 margin-top: 12px;
 font-size: 12px;
 color: #999;
}

.wx-im-sys-notify-read-tag {
 color: #07c160;
 font-weight: 600;
}

.wx-im-sys-notify-empty {
 text-align: center;
 color: #999;
 padding: 48px 16px;
 font-size: 14px;
}

.wx-im-wecom-panel {
 display: flex;
 flex-direction: column;
 align-items: center;
 justify-content: center;
 min-height: 320px;
 padding: 32px 24px;
 text-align: center;
}

.wx-im-wecom-panel-avatar {
 width: 72px;
 height: 72px;
 border-radius: 8px;
 margin-bottom: 16px;
 flex-shrink: 0;
 background-color: #fff;
 background-size: contain;
 background-position: center;
 background-repeat: no-repeat;
}

.wx-im-wecom-panel-title {
 margin: 0 0 8px;
 font-size: 18px;
 font-weight: 600;
 color: #111;
}

.wx-im-wecom-panel-desc {
 margin: 0 0 20px;
 font-size: 14px;
 color: #666;
 max-width: 360px;
 line-height: 1.5;
}

.wx-im-wecom-panel-btn {
 border: none;
 border-radius: 6px;
 background: var(--im-brand, #07c160);
 color: #fff;
 font-size: 15px;
 padding: 10px 28px;
 cursor: pointer;
}

.wx-im-wecom-panel-btn:hover {
 filter: brightness(0.96);
}

.wx-im-wecom-panel-tip {
 margin: 12px 0 0;
 font-size: 12px;
 color: #999;
}

.wx-im-wecom-panel-tip.is-warn {
 color: #e6a23c;
}

.wx-im-wecom-bind-banner {
 margin: 12px 16px;
 padding: 12px 14px;
 background: #fff7e6;
 border: 1px solid #ffd591;
 border-radius: 8px;
}

.wx-im-wecom-bind-banner-text {
 margin: 0 0 10px;
 font-size: 13px;
 line-height: 1.5;
 color: #8c6d1f;
}

.wx-im-wecom-bind-banner-btn {
 border: none;
 border-radius: 6px;
 padding: 8px 14px;
 background: #07c160;
 color: #fff;
 font-size: 13px;
 cursor: pointer;
}

.wx-im-wecom-bind-banner-btn:hover {
 background: #06ad56;
}

.wx-im-ticket-panel {
 padding: 16px 20px 24px;
 max-width: 720px;
 margin: 0 auto;
}

.wx-im-ticket-head {
 display: flex;
 align-items: center;
 justify-content: space-between;
 gap: 12px;
 margin-bottom: 12px;
}

.wx-im-ticket-title {
 margin: 0 0 12px;
 font-size: 16px;
 font-weight: 600;
 color: #111;
}

.wx-im-ticket-back {
 border: none;
 background: transparent;
 color: #576b95;
 font-size: 14px;
 padding: 0 0 10px;
 cursor: pointer;
}

.wx-im-ticket-empty {
 text-align: center;
 color: #999;
 font-size: 14px;
 padding: 32px 12px;
}

.wx-im-ticket-item {
 display: block;
 width: 100%;
 text-align: left;
 border: 1px solid #eee;
 background: #fff;
 border-radius: 10px;
 padding: 12px 14px;
 margin-bottom: 10px;
 cursor: pointer;
}

.wx-im-ticket-item.is-unread {
 border-left: 3px solid #07c160;
}

.wx-im-ticket-item-title {
 display: block;
 font-size: 14px;
 font-weight: 500;
 color: #111;
}

.wx-im-ticket-item-preview {
 display: block;
 margin-top: 4px;
 font-size: 13px;
 color: #666;
}

.wx-im-ticket-item-time {
 display: block;
 margin-top: 4px;
 font-size: 12px;
 color: #999;
}

.wx-im-ticket-select,
.wx-im-ticket-textarea {
 width: 100%;
 box-sizing: border-box;
 border: 1px solid #e5e5e5;
 border-radius: 8px;
 padding: 10px 12px;
 font-size: 14px;
 margin-bottom: 10px;
 background: #fff;
}

.wx-im-ticket-textarea {
 min-height: 120px;
 resize: vertical;
}

.wx-im-ticket-textarea:focus {
 outline: none;
 border-color: #07c160;
 box-shadow: 0 0 0 2px rgba(7, 193, 96, 0.12);
}

.wx-im-ticket-actions {
 display: flex;
 gap: 10px;
 flex-wrap: wrap;
 margin-top: 8px;
}

.wx-im-ticket-btn {
 border: none;
 border-radius: 6px;
 padding: 8px 16px;
 font-size: 14px;
 cursor: pointer;
}

.wx-im-ticket-btn.is-primary {
 background: #07c160;
 color: #fff;
}

.wx-im-ticket-btn.is-secondary {
 background: #f5f5f5;
 color: #333;
}

.wx-im-ticket-btn:disabled {
 opacity: 0.6;
 cursor: not-allowed;
}

.wx-im-ticket-card {
 background: #fff;
 border: 1px solid #eee;
 border-radius: 10px;
 padding: 12px 14px;
 margin-bottom: 10px;
}

.wx-im-ticket-card.is-admin {
 background: #f6ffed;
}

.wx-im-ticket-meta {
 font-size: 12px;
 color: #999;
 margin-bottom: 8px;
}

.wx-im-ticket-body {
 font-size: 14px;
 color: #333;
 line-height: 1.6;
 white-space: pre-wrap;
}

.wx-im-ticket-imgs {
 display: flex;
 flex-wrap: wrap;
 gap: 8px;
 margin-top: 8px;
}

.wx-im-ticket-img-cell {
 position: relative;
}

.wx-im-ticket-img-cell img {
 width: 88px;
 height: 88px;
 object-fit: cover;
 border-radius: 6px;
 cursor: pointer;
}

.wx-im-ticket-img-rm {
 position: absolute;
 top: -6px;
 right: -6px;
 width: 20px;
 height: 20px;
 border: none;
 border-radius: 50%;
 background: rgba(0,0,0,.55);
 color: #fff;
 font-size: 14px;
 line-height: 20px;
 padding: 0;
 cursor: pointer;
}

.wx-im-picker-user.is-selected {
 background: #d9d9d9;
}

.wx-im-contacts-detail {
 background: #fff;
 position: relative;
 border-radius: 10px 0 0 10px;
 overflow: hidden;
 height: 100%;
}

/* 群资料内联编辑框：缩小输入框与保存按钮 */
.wx-im-contacts-detail .wx-im-group-cell--edit,
.wx-im-chat-side .wx-im-group-cell--edit {
 flex-direction: column;
 align-items: stretch;
 gap: 6px;
}

.wx-im-contacts-detail .wx-im-group-cell-value,
.wx-im-chat-side .wx-im-group-cell-value {
 display: flex;
 align-items: center;
 gap: 6px;
 min-width: 0;
}

.wx-im-contacts-detail .wx-im-group-name-input,
.wx-im-contacts-detail .wx-im-group-my-nick-input,
.wx-im-chat-side .wx-im-group-name-input,
.wx-im-chat-side .wx-im-group-my-nick-input {
 flex: 1;
 min-width: 0;
 height: 30px;
 border: 1px solid #dcdcdc;
 border-radius: 4px;
 padding: 0 8px;
 font-size: 13px;
 line-height: 1.2;
 background: #fff;
 box-sizing: border-box;
 outline: none;
}

.wx-im-contacts-detail .wx-im-group-name-input:focus,
.wx-im-contacts-detail .wx-im-group-my-nick-input:focus,
.wx-im-chat-side .wx-im-group-name-input:focus,
.wx-im-chat-side .wx-im-group-my-nick-input:focus {
 border-color: var(--im-brand);
}

.wx-im-contacts-detail .wx-im-group-name-save,
.wx-im-contacts-detail .wx-im-group-my-nick-save,
.wx-im-chat-side .wx-im-group-name-save,
.wx-im-chat-side .wx-im-group-my-nick-save {
 height: 30px;
 padding: 0 10px;
 border: none;
 border-radius: 4px;
 font-size: 12px;
 line-height: 1;
 cursor: pointer;
 flex-shrink: 0;
}

.wx-im-contacts-detail .wx-im-group-name-save,
.wx-im-chat-side .wx-im-group-name-save {
 background: var(--im-brand);
 color: #fff;
}

.wx-im-contacts-detail .wx-im-group-my-nick-save,
.wx-im-chat-side .wx-im-group-my-nick-save {
 background: #576b95;
 color: #fff;
}

.wx-im-contacts-detail .wx-im-group-name-save:disabled,
.wx-im-contacts-detail .wx-im-group-my-nick-save:disabled,
.wx-im-chat-side .wx-im-group-name-save:disabled,
.wx-im-chat-side .wx-im-group-my-nick-save:disabled {
 opacity: .45;
 cursor: not-allowed;
}

.wx-im-contacts-detail-head {
 display: flex;
 align-items: center;
 justify-content: flex-end;
 min-height: 48px;
 padding: 0 12px;
 background: #fff;
 border-bottom: none;
 flex-shrink: 0;
}

.wx-im-contacts-detail-head-spacer {
 flex: 1;
}

.wx-im-contacts-detail-menu-wrap {
 position: relative;
}

.wx-im-contacts-detail-menu {
 position: absolute;
 top: calc(100% + 6px);
 right: 0;
 min-width: 180px;
 background: #fff;
 border: 1px solid #e0e0e0;
 border-radius: 6px;
 box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
 z-index: 30;
 overflow: hidden;
}

.wx-im-contacts-detail-menu[hidden] {
 display: none !important;
}

.wx-im-contacts-detail-menu button {
 display: block;
 width: 100%;
 border: none;
 background: #fff;
 padding: 10px 14px;
 text-align: left;
 font-size: 14px;
 color: #111;
 cursor: pointer;
}

.wx-im-contacts-detail-menu button:hover {
 background: #f5f5f5;
}

.wx-im-contacts-detail-menu button.is-danger {
 color: #fa5151;
}

.wx-im-contacts-detail-scroll {
 flex: 1;
 min-height: 0;
 overflow-y: auto;
 padding: 0 24px 24px;
}

.wx-im-contacts-detail-card {
 max-width: 420px;
 margin: 0 auto;
}

.wx-im-contacts-friend-pane,
.wx-im-contacts-group-pane {
 display: flex;
 flex-direction: column;
 flex: 1;
 min-height: 0;
}

.wx-im-contacts-friend-pane[hidden],
.wx-im-contacts-group-pane[hidden] {
 display: none !important;
}

.wx-im-contacts-detail-hero {
 display: flex;
 align-items: flex-start;
 gap: 14px;
 padding: 18px 16px;
 background: #fff;
 margin-bottom: 10px;
 border-radius: 0;
}

.wx-im-contacts-detail-avatar {
 width: 72px;
 height: 72px;
 border-radius: 8px;
 flex-shrink: 0;
 background: var(--im-brand);
 color: #fff;
 font-size: 28px;
 font-weight: 600;
 display: flex;
 align-items: center;
 justify-content: center;
 background-size: cover;
 background-position: center;
}

.wx-im-contacts-detail-name {
 margin: 0 0 6px;
 font-size: 20px;
 font-weight: 600;
 color: #111;
 display: flex;
 align-items: center;
 gap: 6px;
 flex-wrap: wrap;
}

.wx-im-contacts-detail-account,
.wx-im-contacts-detail-region {
 margin: 0 0 4px;
 font-size: 13px;
 color: #888;
 line-height: 1.45;
}

.wx-im-contacts-detail-section {
 margin-top: 10px;
}

.wx-im-contacts-detail-section-title {
 margin: 0 0 8px;
 padding: 0 16px;
 font-size: 13px;
 font-weight: 500;
 color: #888;
}

.wx-im-contacts-detail-actions {
 display: flex;
 align-items: stretch;
 justify-content: center;
 gap: 0;
 margin-top: 16px;
 padding: 0;
 background: transparent;
}

.wx-im-contacts-detail-actions--single {
 justify-content: center;
}

.wx-im-contacts-detail-actions--single .wx-im-contacts-detail-action {
 max-width: 140px;
}

.wx-im-contacts-detail-action {
 flex: 1;
 max-width: 120px;
 display: flex;
 flex-direction: column;
 align-items: center;
 justify-content: center;
 gap: 8px;
 padding: 14px 8px;
 border: none;
 border-radius: 0;
 background: transparent;
 color: #576b95;
 font-size: 13px;
 cursor: pointer;
}

.wx-im-contacts-detail-action + .wx-im-contacts-detail-action {
 margin-left: 10px;
}

.wx-im-contacts-detail-action:hover {
 opacity: .85;
}

.wx-im-contacts-detail-action:disabled {
 opacity: .45;
 cursor: not-allowed;
}

.wx-im-contacts-detail-action-ico {
 display: flex;
 align-items: center;
 justify-content: center;
 line-height: 1;
 color: #576b95;
}

.wx-im-contacts-detail-action-ico svg {
 display: block;
 width: 28px;
 height: 28px;
}

.wx-im-contacts-detail-sex {
 display: inline-flex;
 align-items: center;
 justify-content: center;
 margin-left: 4px;
 vertical-align: middle;
 line-height: 1;
}

.wx-im-contacts-detail-sex svg {
 display: block;
}

.wx-im-contacts-detail-sex.is-male {
 color: #576b95;
}

.wx-im-contacts-detail-sex.is-female {
 color: #e65c8a;
}

.wx-im-contacts-detail-back {
 position: absolute;
 left: 12px;
 top: 10px;
 z-index: 5;
 width: 32px;
 height: 32px;
 border: none;
 border-radius: 6px;
 background: transparent;
 color: #576b95;
 font-size: 18px;
 line-height: 1;
 cursor: pointer;
}

.wx-im-contacts-detail-back:hover {
 background: rgba(0,0,0,.04);
}

.wx-im-contacts-detail-back[hidden] {
 display: none !important;
}

.wx-im-profile-sex-row {
 display: flex;
 align-items: center;
 justify-content: space-between;
 gap: 12px;
 margin-bottom: 12px;
}

.wx-im-profile-field-label {
 font-size: 14px;
 color: #666;
}

.wx-im-profile-sex-options {
 display: flex;
 gap: 8px;
}

.wx-im-profile-sex-btn {
 display: inline-flex;
 align-items: center;
 gap: 4px;
 min-width: 64px;
 justify-content: center;
 padding: 8px 12px;
 border: 1px solid #dcdcdc;
 border-radius: 6px;
 background: #fff;
 color: #333;
 font-size: 13px;
 cursor: pointer;
}

.wx-im-profile-sex-btn.is-active {
 border-color: #576b95;
 background: #eef3fb;
 color: #576b95;
}

.wx-im-profile-sex-btn.is-active[data-sex="2"] {
 border-color: #e65c8a;
 background: #fff0f5;
 color: #e65c8a;
}

.wx-im-profile-sex-ico {
 display: inline-flex;
 align-items: center;
 justify-content: center;
}

.wx-im-profile-sex-ico.is-male { color: #576b95; }
.wx-im-profile-sex-ico.is-female { color: #e65c8a; }

.wx-im-contacts-detail .wx-im-group-block {
 margin: 0 0 10px;
 background: #fff;
}

.wx-im-contacts-detail .wx-im-group-cells {
 background: #fff;
}

.wx-im-contacts-detail .wx-im-cgrp-members-wrap {
 padding: 12px 12px 4px;
}

.wx-im-contacts-detail .wx-im-group-cell-row {
 display: flex;
 align-items: flex-start;
 justify-content: space-between;
 gap: 12px;
 padding: 12px 16px;
 background: #fff;
 border-bottom: 1px solid #f0f0f0;
}

.wx-im-contacts-detail .wx-im-group-cell-row:last-child {
 border-bottom: none;
}

.wx-im-contacts-detail .wx-im-group-cell-row--switch {
 align-items: center;
 padding-top: 10px;
 padding-bottom: 10px;
}

.wx-im-contacts-detail .wx-im-group-switch {
 appearance: none;
 -webkit-appearance: none;
 width: 40px;
 height: 22px;
 border-radius: 11px;
 background: #e5e5e5;
 position: relative;
 cursor: pointer;
 flex-shrink: 0;
 transition: background 0.2s ease;
 border: none;
 outline: none;
 margin: 0;
 padding: 0;
}

.wx-im-contacts-detail .wx-im-group-switch::after {
 content: '';
 position: absolute;
 top: 2px;
 left: 2px;
 width: 18px;
 height: 18px;
 border-radius: 50%;
 background: #fff;
 box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
 transition: transform 0.2s ease;
}

.wx-im-contacts-detail .wx-im-group-switch:checked {
 background: var(--im-brand, #07c160);
}

.wx-im-contacts-detail .wx-im-group-switch:checked::after {
 transform: translateX(18px);
}

.wx-im-contacts-detail .wx-im-group-switch:focus-visible {
 box-shadow: 0 0 0 2px rgba(7, 193, 96, 0.25);
}

.wx-im-contacts-pinned-list {
 display: flex;
 flex-direction: column;
 gap: 2px;
}

.wx-im-contacts-friend-list {
 display: flex;
 flex-direction: column;
 gap: 2px;
}

.wx-im-contacts-pinned-item {
 position: relative;
}

.wx-im-contacts-pinned-badge {
 position: absolute;
 right: 12px;
 top: 50%;
 transform: translateY(-50%);
 min-width: 18px;
 height: 18px;
 padding: 0 5px;
 border-radius: 999px;
 background: #fa5151;
 color: #fff;
 font-size: 11px;
 line-height: 18px;
 text-align: center;
}

.wx-im-conv-ctx-menu {
 position: fixed;
 z-index: 12000;
 min-width: 148px;
 padding: 6px 0;
 border-radius: 8px;
 background: #fff;
 border: 1px solid #e5e5e5;
 box-shadow: 0 8px 24px rgba(0,0,0,.12);
}

.wx-im-conv-ctx-menu[hidden] {
 display: none !important;
}

.wx-im-conv-ctx-menu button {
 display: block;
 width: 100%;
 border: none;
 background: transparent;
 text-align: left;
 padding: 10px 16px;
 font-size: 14px;
 color: #111;
 cursor: pointer;
}

.wx-im-conv-ctx-menu button:hover {
 background: #f5f5f5;
}

.wx-im-conv-ctx-menu button.is-danger {
 color: #fa5151;
}

.wx-im-ticket-tabs {
 display: flex;
 gap: 8px;
 margin-bottom: 14px;
}

.wx-im-ticket-tab {
 flex: 1;
 border: 1px solid #e5e7eb;
 background: #fff;
 color: #64748b;
 border-radius: 999px;
 padding: 8px 12px;
 font-size: 13px;
 cursor: pointer;
}

.wx-im-ticket-tab.is-active {
 background: #111827;
 border-color: #111827;
 color: #fff;
 font-weight: 600;
}
