/* 主播粉丝群 · 站内原生聊天 + 管理（移动端优先） */
/* 聊天壳钉死在「48px 顶栏」与「底部 Tab 栏」之间，脱离文档流：
   - 保留底部 Tab（首页/直播/我的），不再隐藏，全站导航照常。
   - 不依赖 100vh/100dvh 这类易受 iOS 工具栏、body 撑高影响的魔法数。
   - 输入框（imfc__composer）永远贴在 Tab 栏正上方，与顶部返回栏同屏可见。
   说明：.imfc 仅在本页 section 显示时渲染（其余页 section 为 display:none），
        不会影响首页/直播/我的等其它页面。 */
.imfc {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 48px;
  left: 0;
  right: 0;
  /* 让出底部 Tab 栏（56px）及安全区高度，输入框落在 Tab 栏正上方 */
  bottom: calc(56px + env(safe-area-inset-bottom));
  z-index: 5;
  /* 深色聊天壳，与客人端 im-group-chat 同款 Telegram 气质 */
  background: #0e1621;
  color: #f5f7fa;
}

.imfc__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #17212b;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex: 0 0 auto;
}
.imfc__notice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(255, 152, 0, 0.12);
  border-bottom: 1px solid rgba(255, 152, 0, 0.25);
  flex: 0 0 auto;
}
.imfc__notice-tag {
  flex: 0 0 auto;
  font-size: 11px;
  color: #ffcc80;
  background: rgba(255, 152, 0, 0.2);
  border-radius: 6px;
  padding: 1px 6px;
  line-height: 18px;
  margin-top: 1px;
}
.imfc__notice-text {
  flex: 1 1 auto;
  font-size: 13px;
  color: #ffcc80;
  white-space: pre-wrap;
  word-break: break-word;
}
.imfc__head-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex: 0 0 auto;
  margin-right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #5c6bc0 0%, #3949ab 100%);
}
.imfc__head-avatar--img {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.imfc__head .imfc__title {
  flex: 1 1 auto;
  min-width: 0;
}
.imfc__title strong {
  font-size: 16px;
  color: #f5f7fa;
}
.imfc__sub {
  display: block;
  font-size: 12px;
  color: #8b9bab;
  margin-top: 2px;
}
.imfc__manage-btn {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #cdd6df;
  border-radius: 16px;
  padding: 6px 14px;
  font-size: 13px;
  flex: 0 0 auto;
  margin-left: 6px;
}
.imfc__share-btn {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #cdd6df;
  border-radius: 16px;
  padding: 6px 10px;
  font-size: 13px;
  flex: 0 0 auto;
  margin-left: 6px;
}
.imfc__share-btn:active,
.imfc__manage-btn:active {
  background: rgba(255, 255, 255, 0.12);
}

.imfc__messages {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 12px 16px;
}
.imfc__empty {
  text-align: center;
  color: #8b9bab;
  font-size: 13px;
  padding: 40px 20px;
}

.imfc-msg {
  margin-bottom: 14px;
  max-width: 84%;
}
.imfc-msg__name {
  font-size: 12px;
  color: #8b9bab;
  margin: 0 0 4px 4px;
}
.imfc-msg__row {
  display: flex;
}
.imfc-msg__bubble {
  display: inline-block;
  padding: 9px 12px;
  border-radius: 14px;
  background: #182533;
  color: #f5f7fa;
  font-size: 15px;
  line-height: 1.4;
  word-break: break-word;
  white-space: pre-wrap;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.18);
}
.imfc-msg__time {
  font-size: 11px;
  color: rgba(139, 155, 171, 0.75);
  margin: 4px 0 0 4px;
}
.imfc-msg__gone {
  color: #8b9bab;
  font-style: normal;
}
.imfc-link {
  color: #6ab2f2;
  text-decoration: underline;
  word-break: break-all;
}
.imfc-msg--mine .imfc-link {
  color: #cfe4ff;
}

.imfc-msg--mine {
  margin-left: auto;
}
.imfc-msg--mine .imfc-msg__row {
  justify-content: flex-end;
}
.imfc-msg--mine .imfc-msg__bubble {
  background: #2b5278;
  color: #fff;
}
.imfc-msg--mine .imfc-msg__time {
  text-align: right;
  margin: 4px 4px 0 0;
}

.imfc-msg--sys {
  max-width: 100%;
  text-align: center;
  margin: 10px 0;
}
.imfc-msg--sys span {
  display: inline-block;
  background: rgba(255, 255, 255, 0.08);
  color: #8b9bab;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 10px;
}

.imfc__composer {
  flex: 0 0 auto;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  background: #17212b;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.imfc__entry {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}
.imfc__input-wrap {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  min-height: 44px;
  padding: 0 4px 0 2px;
  background: #242f3d;
  border-radius: 22px;
  border: 1px solid transparent;
}
.imfc__input-wrap:focus-within {
  border-color: rgba(106, 178, 242, 0.35);
}
.imfc__inline-btn {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: #8b9bab;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.imfc__inline-btn:active {
  opacity: 0.65;
}
.imfc__inline-btn--attach {
  font-size: 18px;
}
.imfc__composer textarea {
  flex: 1 1 auto;
  min-width: 0;
  resize: none;
  border: none;
  outline: none;
  background: transparent;
  color: #f5f7fa;
  font-size: 15px;
  line-height: 1.35;
  max-height: 96px;
  padding: 10px 4px;
  margin: 0;
}
.imfc__composer textarea::placeholder {
  color: #8b9bab;
}
.imfc__send {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: #3390ec;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.imfc__send:active {
  transform: scale(0.96);
}
.imfc__send:disabled {
  opacity: 0.45;
}
.imfc__send-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.imfc__send-ico--send {
  display: none;
}
.imfc--has-text .imfc__send-ico--mic {
  display: none;
}
.imfc--has-text .imfc__send-ico--send {
  display: inline-flex;
}

.imfc-attach-menu {
  position: fixed;
  inset: 0;
  z-index: 130;
}
.imfc-attach-menu[hidden] {
  display: none !important;
}
.imfc-attach-menu__mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}
.imfc-attach-menu__panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: #17212b;
  border-radius: 16px 16px 0 0;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
}
.imfc-attach-menu__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.imfc-attach-menu__item {
  border: none;
  background: #242f3d;
  color: #f5f7fa;
  border-radius: 12px;
  padding: 14px 8px;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.imfc-attach-menu__item span {
  font-size: 24px;
  line-height: 1;
}
.imfc-attach-menu__cancel {
  display: block;
  width: 100%;
  margin-top: 10px;
  border: none;
  background: transparent;
  color: #8b9bab;
  padding: 12px;
  font-size: 14px;
}

/* 文件消息卡片 */
.imfc-msg__file {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 260px;
  padding: 8px 10px;
  border: none;
  border-radius: 10px;
  background: rgba(125, 135, 145, 0.16);
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.imfc-msg__file:active {
  background: rgba(125, 135, 145, 0.26);
}
.imfc-msg__file-ico {
  font-size: 26px;
  line-height: 1;
  flex: 0 0 auto;
}
.imfc-msg__file-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}
.imfc-msg__file-name {
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 180px;
}
.imfc-msg__file-size {
  font-size: 12px;
  color: #8b9bab;
}
.im-file-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
  line-height: 1;
  flex: 0 0 auto;
  user-select: none;
}
.im-file-ico--pdf { background: linear-gradient(145deg, #ef5350, #c62828); }
.im-file-ico--doc { background: linear-gradient(145deg, #42a5f5, #1565c0); }
.im-file-ico--xls { background: linear-gradient(145deg, #66bb6a, #2e7d32); }
.im-file-ico--ppt { background: linear-gradient(145deg, #ffa726, #ef6c00); }
.im-file-ico--zip { background: linear-gradient(145deg, #ffca28, #f9a825); color: #4a3800; }
.im-file-ico--generic { background: linear-gradient(145deg, #78909c, #455a64); font-size: 10px; }

/* emoji 面板（绝对定位于 .imfc，悬浮在输入框上方） */
.imfc-emoji-panel[hidden] {
  display: none !important;
}
.imfc-emoji-panel {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: calc(56px + env(safe-area-inset-bottom));
  background: #17212b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  max-height: 240px;
  z-index: 6;
  box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}
.imfc-emoji-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #aeb9c4;
  font-size: 13px;
  flex: 0 0 auto;
}
.imfc-emoji-close {
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 18px;
  line-height: 24px;
  cursor: pointer;
}
.imfc-emoji-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 2px;
  padding: 8px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.imfc-emoji-item {
  background: transparent;
  border: none;
  font-size: 22px;
  line-height: 1.4;
  padding: 4px 0;
  cursor: pointer;
}
.imfc-emoji-item:active {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
}

/* 图片消息气泡 */
.imfc-msg__bubble--media,
.imfc-msg--mine .imfc-msg__bubble--media {
  padding: 3px;
  background: transparent;
  box-shadow: none;
}
.imfc-msg__img {
  display: block;
  max-width: 200px;
  max-height: 260px;
  width: auto;
  height: auto;
  border-radius: 12px;
  cursor: pointer;
}
.imfc-msg__videobox {
  position: relative;
  display: inline-block;
  max-width: min(260px, 72vw);
  border-radius: 12px;
  overflow: hidden;
  background: #0b1119;
  line-height: 0;
  cursor: pointer;
  vertical-align: top;
}
.imfc-msg__videobox--portrait {
  max-width: min(180px, 52vw);
}
.imfc-msg__videobox--empty {
  width: 200px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.imfc-msg__videoposter {
  display: block;
  width: 100%;
  height: auto;
  max-height: 320px;
  object-fit: contain;
  background: #0b1119;
}
.imfc-msg__videobox--portrait .imfc-msg__videoposter {
  max-height: 360px;
}
.imfc-msg__playbtn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 20px;
  line-height: 46px;
  text-align: center;
}
.imfc--desktop .imfc-msg__videobox {
  max-width: 280px;
}
.imfc--desktop .imfc-msg__videobox--portrait {
  max-width: 200px;
}

/* 禁言时长选择（底部弹层） */
.imfc-dur-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 80;
  display: flex;
  align-items: flex-end;
}
.imfc-dur-sheet {
  width: 100%;
  background: #17212b;
  color: #f5f7fa;
  border-radius: 16px 16px 0 0;
  padding: 14px 14px calc(14px + env(safe-area-inset-bottom));
}
.imfc-dur-title {
  text-align: center;
  color: #8b9bab;
  font-size: 13px;
  margin-bottom: 12px;
}
.imfc-dur-opt {
  display: block;
  width: 100%;
  padding: 13px;
  margin-bottom: 8px;
  background: #243447;
  color: #f5f7fa;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  cursor: pointer;
}
.imfc-dur-opt:active {
  background: #2b5278;
}
.imfc-dur-cancel {
  display: block;
  width: 100%;
  padding: 13px;
  margin-top: 4px;
  background: transparent;
  color: #8b9bab;
  border: none;
  font-size: 15px;
  cursor: pointer;
}

/* PC 端（≥1024px）：居中窄栏，仿 TG 桌面，气泡更窄、图片更大 */
.imfc--desktop {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  width: min(900px, 100%);
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}
.imfc--desktop .imfc-msg {
  max-width: 70%;
}
.imfc--desktop .imfc-msg__img {
  max-width: 280px;
  max-height: 340px;
}
.imfc--desktop .imfc-emoji-grid {
  grid-template-columns: repeat(12, 1fr);
}

/* 管理抽屉 — 白底面板须强制深色字（勿继承 body 浅色主题） */
#imfc-sheet {
  color: #1a1a22;
}
#imfc-sheet .imfc-sheet__panel {
  background: #ffffff;
  color: #1a1a22;
}
#imfc-sheet .imfc-sheet__scroll {
  color: #1a1a22;
}
#imfc-sheet .imfc-sheet__head strong {
  color: #111118;
  font-weight: 700;
}
#imfc-sheet label,
#imfc-sheet .imfc-sheet__slow > span,
#imfc-sheet .imfc-sheet__toggle-row span,
#imfc-sheet .imfc-overview__v,
#imfc-sheet .imfc-member__name,
#imfc-sheet .imfc-sheet__members-title strong {
  color: #1a1a22;
}
#imfc-sheet .imfc-sheet__close {
  color: #5c6570;
}
#imfc-sheet .imfc-overview__k,
#imfc-sheet .imfc-sheet__hint,
#imfc-sheet .imfc-sheet__members-sub,
#imfc-sheet .imfc-member__sub,
#imfc-sheet .imfc-members-empty,
#imfc-sheet .imfc-sheet__icon-hint {
  color: #5c6570;
}
#imfc-sheet input,
#imfc-sheet textarea,
#imfc-sheet select,
#imfc-sheet .imfc-sheet__field input,
#imfc-sheet .imfc-sheet__field textarea,
#imfc-sheet .imfc-sheet__slow select {
  color: #1a1a22 !important;
  -webkit-text-fill-color: #1a1a22;
  background: #ffffff !important;
}
#imfc-sheet .imfc-sheet__danger {
  color: #c62828;
  background: rgba(229, 57, 53, 0.08);
}
#imfc-sheet .imfc-act-btn,
#imfc-sheet .imfc-member__acts button {
  color: #3d4450;
  background: #ffffff;
}
#imfc-sheet .imfc-act-btn--kick {
  color: #c62828;
  background: #fff5f5;
}

/* 群管理 · 成员头像 / 助力卡片（强制写在 sheet 作用域内，避免未命中） */
#imfc-sheet .imfc-member {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px;
  min-height: 0;
  border-bottom: 1px solid #f0f0f4;
}
#imfc-sheet .imfc-member__ava {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
#imfc-sheet .imfc-member__ava--img {
  display: block;
  object-fit: cover;
  background-color: #ececf2;
}
#imfc-sheet .imfc-member__ava--text {
  background: linear-gradient(135deg, #7e8cff, #5c6bc0);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
}
#imfc-sheet .imfc-member__info {
  flex: 1 1 auto;
  min-width: 0;
}
#imfc-sheet .imfc-member__name {
  font-size: 14px;
  line-height: 1.25;
}
#imfc-sheet .imfc-member__sub {
  font-size: 11px;
  margin-top: 1px;
  line-height: 1.25;
}
#imfc-sheet .imfc-prestige {
  margin: 8px 12px 10px;
  padding: 12px 14px;
  background: linear-gradient(180deg, #f7f8fc 0%, #f2f3f8 100%);
  border: 1px solid #e6e8f0;
  border-radius: 12px;
  color: #1a1a22;
}
#imfc-sheet .imfc-prestige__head {
  font-size: 14px;
  font-weight: 700;
  color: #1a1a22;
  margin-bottom: 4px;
}
#imfc-sheet .imfc-prestige__hint {
  font-size: 12px;
  color: #6a7280;
  margin: 0 0 10px;
  line-height: 1.45;
}
#imfc-sheet .imfc-prestige__level-wrap {
  margin: 0 0 8px;
}
#imfc-sheet .imfc-prestige__level-badge {
  position: relative;
  display: inline-block;
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  color: #fff;
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.35) 0%, transparent 40%),
    linear-gradient(135deg, #a855f7 0%, #3b82f6 50%, #6366f1 100%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.35);
}
#imfc-sheet .imfc-prestige__level-shine {
  position: absolute;
  top: 0;
  left: 0;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  animation: imfc-level-shimmer 3.2s ease-in-out infinite;
  pointer-events: none;
}
#imfc-sheet .imfc-prestige__vitality {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
  font-size: 13px;
  color: #8a6914;
}
#imfc-sheet .imfc-prestige__vitality-icon {
  font-size: 16px;
  animation: imfc-vitality-pulse 2.4s ease-in-out infinite;
}
#imfc-sheet .imfc-prestige__vitality-txt {
  color: #8a6914;
  font-weight: 500;
}
#imfc-sheet .imfc-prestige__stat {
  font-size: 13px;
  color: #1a1a22;
  margin: 0 0 8px;
  padding: 8px 10px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #ececf2;
}
#imfc-sheet .imfc-prestige__empty {
  font-size: 12px;
  color: #9a9aa5;
  margin: 0;
  text-align: center;
  padding: 8px 0 2px;
}
#imfc-sheet .imfc-boost-log {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 4px;
}
#imfc-sheet .imfc-boost-log__row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-top: 1px solid #e8eaf0;
}
#imfc-sheet .imfc-boost-log__ava {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
#imfc-sheet .imfc-boost-log__ava--img {
  display: block;
  object-fit: cover;
  background-color: #ececf2;
}
#imfc-sheet .imfc-boost-log__ava--text {
  background: #dfe3ef;
  color: #4a5260;
  font-size: 13px;
  font-weight: 600;
}
#imfc-sheet .imfc-boost-log__name {
  font-size: 13px;
  font-weight: 600;
  color: #1a1a22;
}
#imfc-sheet .imfc-boost-log__sub {
  font-size: 11px;
  color: #8a909e;
  margin-top: 1px;
}

.imfc-sheet {
  position: fixed;
  inset: 0;
  z-index: 60;
}
.imfc-sheet__mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}
.imfc-sheet__panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding-bottom: env(safe-area-inset-bottom);
  overflow: hidden;
}
.imfc-sheet__scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.imfc-sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #f0f0f4;
}
.imfc-sheet__head strong {
  font-size: 16px;
}
.imfc-sheet__close {
  border: none;
  background: none;
  color: #9a9aa5;
  font-size: 14px;
}
.imfc-sheet__field {
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f4;
}
.imfc-sheet__field label {
  display: block;
  font-size: 13px;
  color: #5a5a66;
  margin-bottom: 6px;
}
.imfc-sheet__row {
  display: flex;
  gap: 8px;
}
#imfc-sheet .imfc-sheet__field input,
#imfc-sheet .imfc-sheet__field textarea {
  flex: 1 1 auto;
  width: 100%;
  border: 1px solid #e2e2ea;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 14px;
  box-sizing: border-box;
  font-family: inherit;
  resize: vertical;
  background: #fff;
  color: #1a1a22;
}
.imfc-sheet__field input::placeholder,
.imfc-sheet__field textarea::placeholder {
  color: #a0a0ad;
}
.imfc-sheet__field button {
  flex: 0 0 auto;
  border: none;
  background: #ff5b8a;
  color: #fff;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 14px;
}
.imfc-sheet__icon-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
#imfc-sheet .imfc-sheet__icon {
  position: relative;
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  padding: 0;
  border-radius: 50%;
  border: 1px dashed #c9c9d4;
  background: #f1f3f6 center/cover no-repeat;
  color: #8a94a6;
  cursor: pointer;
  overflow: hidden;
}
#imfc-sheet .imfc-sheet__icon.has-img {
  border-style: solid;
  border-color: #e2e2ea;
}
.imfc-sheet__icon-plus {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 300;
}
.imfc-sheet__icon.has-img .imfc-sheet__icon-plus {
  display: none;
}
.imfc-sheet__icon-edit {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  font-size: 10px;
  line-height: 16px;
  text-align: center;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
}
.imfc-sheet__icon-hint {
  font-size: 12px;
  color: #8a94a6;
}
.imfc-sheet__field textarea + button {
  margin-top: 8px;
  width: 100%;
}
.imfc-sheet__slow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f4;
  font-size: 14px;
  color: #5a5a66;
}
#imfc-sheet .imfc-sheet__slow select {
  border: 1px solid #e2e2ea;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 14px;
  background: #fff;
  color: #1a1a22;
}
.imfc-sheet__list {
  padding: 0 0 10px;
}

.imfc-member {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  min-height: 0;
  border-bottom: 1px solid #f6f6f9;
}
.imfc-member__ava {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
}
.imfc-member__ava--img {
  display: block;
  object-fit: cover;
  background-color: #ececf2;
}
.imfc-member__ava--text {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #7e8cff, #5c6bc0);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}
.imfc-member__info {
  flex: 1 1 auto;
  min-width: 0;
}
.imfc-member__name {
  font-size: 14px;
  color: #1a1a1f;
  line-height: 1.25;
}
.imfc-member__sub {
  font-size: 11px;
  color: #9a9aa5;
  margin-top: 1px;
  line-height: 1.3;
}
.imfc-member__acts {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: 0 0 auto;
}
.imfc-member__acts button,
.imfc-act-btn {
  border: 1px solid #d8d8e0;
  background: #fff;
  color: #5a5a66;
  border-radius: 14px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
}
.imfc-act-btn--kick,
.imfc-member__acts button.imfc-danger {
  border-color: #f0b4b4;
  color: #e25555;
  background: #fff5f5;
}
.imfc-act-btn--protect,
.imfc-protected {
  color: #b0883a !important;
  background: #fbf2dc !important;
  border: 1px solid #ecd9a8 !important;
  cursor: not-allowed;
  opacity: 0.85;
}
.imfc-member--tap {
  cursor: pointer;
}
.imfc-member--tap:active {
  background: #f6f7fb;
}
.imfc-sheet__members-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px 6px;
  border-top: 1px solid #f0f0f4;
  background: #fafbfc;
}
.imfc-sheet__members-title strong {
  display: block;
  font-size: 14px;
  color: #1a1a22;
}
.imfc-sheet__members-sub {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #8a94a6;
  line-height: 1.4;
}
.imfc-sheet__refresh {
  flex: 0 0 auto;
  border: 1px solid #e2e2ea;
  background: #fff;
  color: #3390ec;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
}
.imfc-members-empty {
  padding: 14px 16px 18px;
  font-size: 13px;
  color: #8a94a6;
  line-height: 1.5;
  text-align: center;
  background: #fafbfc;
}
.imfc-member-sheet {
  position: fixed;
  inset: 0;
  z-index: 10001;
}
.imfc-member-sheet__mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}
.imfc-member-sheet__panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 12px calc(12px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.imfc-member-sheet__head {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border-radius: 14px;
  padding: 12px 14px;
}
.imfc-member-sheet__head .imfc-member__ava {
  width: 44px;
  height: 44px;
}
.imfc-member-sheet__name {
  flex: 1 1 auto;
  min-width: 0;
  background: transparent;
  border-radius: 0;
  padding: 0;
  font-size: 16px;
  font-weight: 600;
  text-align: left;
  color: #1a1a22;
}
.imfc-member-sheet__acts {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
}
.imfc-member-sheet__btn {
  display: block;
  width: 100%;
  padding: 14px 16px;
  border: none;
  border-bottom: 1px solid #f0f0f4;
  background: #fff;
  font-size: 16px;
  color: #1a1a22;
  text-align: center;
  cursor: pointer;
}
.imfc-member-sheet__btn:last-child {
  border-bottom: none;
}
.imfc-member-sheet__btn--danger {
  color: #c62828;
}
.imfc-member-sheet__btn--disabled {
  color: #b0883a;
  opacity: 0.7;
}
.imfc-member-sheet__cancel {
  padding: 14px 16px;
  border: none;
  border-radius: 14px;
  background: #fff;
  font-size: 16px;
  font-weight: 600;
  color: #3390ec;
  cursor: pointer;
}

.imfc-badge {
  display: inline-block;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 6px;
  margin-left: 4px;
  vertical-align: middle;
}
.imfc-badge--owner {
  background: #fde9c8;
  color: #c77f1a;
}
.imfc-badge--admin {
  background: #d6e4ff;
  color: #2f6fd8;
}
.imfc-badge--muted {
  background: #eee;
  color: #999;
}
.imfc-badge--banned {
  background: #fdd;
  color: #d44;
}

/* 主播身份徽章（自己的消息）*/
.imfc-anchor-badge {
  display: inline-block;
  padding: 0 7px;
  height: 16px;
  line-height: 16px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 800;
  color: #5a3a00;
  background: linear-gradient(180deg, #ffe08a 0%, #ffc24d 60%, #f5a300 100%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}
.imfc-msg__name--anchor {
  text-align: right;
  margin: 0 4px 4px 0;
}

/* 成员行：加入时间 / 状态 — 见 .imfc-member__sub 主定义 */

/* 金主保护：置灰的「移出」按钮 — 见 .imfc-act-btn--protect */

/* 群概况（只读）*/
.imfc-overview {
  margin: 4px 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f0f2f5;
}
.imfc-overview__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 13px;
}
.imfc-overview__k {
  color: #9a9aa5;
}
.imfc-overview__v {
  color: #1a1a1f;
  font-weight: 600;
  text-align: right;
}

/* —— 消息内联头像 + 可点用户名 —— */
.imfc-msg__name[data-act="profile"] {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.imfc-msg__avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
}

/* —— 用户资料卡 —— */
.imfc-profile-mask {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.imfc-profile-card {
  position: relative;
  width: 100%;
  max-width: 320px;
  background: #17212b;
  color: #f5f7fa;
  border-radius: 16px;
  padding: 26px 20px 22px;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}
.imfc-profile-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  color: inherit;
  font-size: 22px;
  line-height: 1;
  opacity: 0.6;
  cursor: pointer;
  border-radius: 50%;
}
.imfc-profile-avatar {
  width: 84px;
  height: 84px;
  margin: 0 auto 12px;
  border-radius: 50%;
  overflow: hidden;
  background: #3390ec;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  font-weight: 600;
  color: #fff;
}
.imfc-profile-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.imfc-profile-name { font-size: 18px; font-weight: 600; word-break: break-word; }
.imfc-profile-username { font-size: 13px; color: #5eb5f7; margin-top: 2px; }
.imfc-profile-bio { font-size: 13px; opacity: 0.8; line-height: 1.5; margin-top: 8px; white-space: pre-wrap; word-break: break-word; }

/* 群管理：全员禁言 / 清空记录 */
.imfc-sheet__toggle {
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f4;
}
.imfc-sheet__toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  color: #1a1a22;
  cursor: pointer;
}
.imfc-sheet__toggle-row input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}
.imfc-sheet__danger {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid rgba(229, 57, 53, 0.35);
  border-radius: 10px;
  background: rgba(229, 57, 53, 0.08);
  color: #c62828;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.imfc-sheet__hint {
  margin: 8px 0 0;
  font-size: 12px;
  color: #8a94a6;
  line-height: 1.45;
}

/* 长按消息操作 */
.imfc-msg-sheet {
  position: fixed;
  inset: 0;
  z-index: 10000;
}
.imfc-msg-sheet[hidden] {
  display: none !important;
}
.imfc-msg-sheet__mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}
.imfc-msg-sheet__panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 8px 12px calc(12px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.imfc-msg-sheet__actions {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
}
.imfc-msg-sheet__btn {
  display: block;
  width: 100%;
  padding: 14px 16px;
  border: none;
  border-bottom: 1px solid #f0f0f4;
  background: #fff;
  font-size: 16px;
  color: #1a1a22;
  text-align: center;
  cursor: pointer;
}
.imfc-msg-sheet__btn:last-child {
  border-bottom: none;
}
.imfc-msg-sheet__btn--danger {
  color: #c62828;
}
.imfc-msg-sheet__cancel {
  padding: 14px 16px;
  border: none;
  border-radius: 14px;
  background: #fff;
  font-size: 16px;
  font-weight: 600;
  color: #3390ec;
  cursor: pointer;
}
.imfc-msg[data-msg-id] {
  -webkit-user-select: none;
  user-select: none;
}

/* 直播间/语音房助手广播卡片 */
.imfc-msg--promo {
  margin: 10px 12px;
}
.imfc-promo {
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(135deg, rgba(51, 144, 236, 0.22) 0%, rgba(30, 80, 140, 0.35) 100%);
}
.imfc-promo--voice {
  background: linear-gradient(135deg, rgba(126, 87, 194, 0.25) 0%, rgba(74, 48, 130, 0.38) 100%);
}
.imfc-promo__bot {
  font-size: 12px;
  opacity: 0.85;
  margin-bottom: 6px;
}
.imfc-promo__title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}
.imfc-promo__sub {
  font-size: 13px;
  opacity: 0.82;
  margin-top: 4px;
}
.imfc-promo__cta {
  margin-top: 10px;
  font-size: 13px;
  color: #6ecbff;
  font-weight: 600;
}
.imfc-msg--promo .imfc-msg__time {
  text-align: center;
  margin-top: 4px;
}

.imfc__tool--plus {
  font-size: 20px;
  font-weight: 600;
  line-height: 1;
}

.imfc-sheet__quick {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f4;
  flex-wrap: wrap;
}
.imfc-sheet__quick-btn {
  flex: 1 1 auto;
  min-width: 88px;
  border: 1px solid #e2e2ea;
  background: #fff;
  color: #1a1a22;
  border-radius: 10px;
  padding: 10px 8px;
  font-size: 13px;
}
.imfc-sheet__quick-btn:active {
  background: #f5f5f8;
}

.imfc-prestige {
  margin: 8px 12px 10px;
  padding: 12px 14px;
  background: linear-gradient(180deg, #f7f8fc 0%, #f2f3f8 100%);
  border: 1px solid #e6e8f0;
  border-radius: 12px;
  color: #1a1a22;
}
.imfc-prestige__head {
  font-size: 14px;
  color: #1a1a22;
  margin: 0 0 4px;
  font-weight: 700;
}
.imfc-prestige__hint {
  font-size: 12px;
  color: #6a7280;
  margin: 0 0 8px;
  line-height: 1.4;
}
.imfc-prestige__level-wrap {
  margin: 0 0 8px;
}
.imfc-prestige__level-badge {
  position: relative;
  display: inline-block;
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 4px 12px;
  border-radius: 999px;
  color: #fff;
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.35) 0%, transparent 40%),
    linear-gradient(135deg, #a855f7 0%, #3b82f6 50%, #6366f1 100%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.35);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.imfc-prestige__level-shine {
  position: absolute;
  top: 0;
  left: 0;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  animation: imfc-level-shimmer 3.2s ease-in-out infinite;
  pointer-events: none;
}
.imfc-prestige__vitality {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.35;
}
.imfc-prestige__vitality-icon {
  flex: 0 0 auto;
  font-size: 16px;
  line-height: 1;
  animation: imfc-vitality-pulse 2.4s ease-in-out infinite;
  filter: saturate(1.4);
}
.imfc-prestige__vitality-txt {
  color: #8a6914;
  font-weight: 500;
}
@keyframes imfc-level-shimmer {
  0%, 100% { transform: translateX(-120%); }
  50% { transform: translateX(220%); }
}
@keyframes imfc-vitality-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.12); opacity: 0.88; }
}
.imfc-prestige__stat {
  font-size: 13px;
  color: #1a1a22;
  margin: 0 0 6px;
  padding: 8px 10px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #ececf2;
}
.imfc-prestige__empty {
  font-size: 12px;
  color: #9a9aa5;
  margin: 0;
  text-align: center;
  padding: 4px 0 0;
}
.imfc-boost-log {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.imfc-boost-log__row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-top: 1px solid #f0f0f4;
}
.imfc-boost-log__ava {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex: 0 0 auto;
}
.imfc-boost-log__ava--img {
  display: block;
  object-fit: cover;
  background-color: #ececf2;
}
.imfc-boost-log__ava--text {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ececf2;
  color: #5a5a66;
  font-size: 13px;
  font-weight: 600;
}
.imfc-boost-log__main {
  min-width: 0;
  flex: 1 1 auto;
}
.imfc-boost-log__name {
  font-size: 13px;
  color: #1a1a22;
  line-height: 1.25;
}
.imfc-boost-log__sub {
  font-size: 11px;
  color: #9a9aa5;
  margin-top: 1px;
}
.imfc-prestige__boost-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.imfc-prestige__boost {
  border: none;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  background: linear-gradient(135deg, #ffd54f, #ff8f00);
  color: #3e2a00;
  font-weight: 600;
}
.imfc-prestige__boost.is-live {
  box-shadow: 0 0 0 2px rgba(255, 183, 77, 0.35);
}
.imfc-prestige__quota {
  font-size: 12px;
  color: #9a9aa5;
}

.imfc-plus-sheet,
.imfc-qr-sheet {
  position: fixed;
  inset: 0;
  z-index: 120;
}
.imfc-plus-sheet__mask,
.imfc-qr-sheet__mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}
.imfc-plus-sheet__panel,
.imfc-qr-sheet__panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding-bottom: env(safe-area-inset-bottom);
}
.imfc-plus-sheet__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 20px 16px 8px;
}
.imfc-plus-item {
  border: none;
  background: #f5f5f8;
  border-radius: 12px;
  padding: 14px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: #1a1a22;
}
.imfc-plus-item span {
  font-size: 28px;
  line-height: 1;
}
.imfc-plus-item em {
  font-style: normal;
  font-size: 12px;
}
.imfc-plus-sheet__cancel,
.imfc-qr-sheet__close {
  border: none;
  background: none;
  color: #9a9aa5;
  font-size: 14px;
}
.imfc-plus-sheet__cancel {
  display: block;
  width: 100%;
  padding: 14px;
  border-top: 1px solid #f0f0f4;
}
.imfc-qr-sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #f0f0f4;
  color: #1a1a22;
}
.imfc-qr-sheet__body {
  padding: 12px 16px 20px;
  max-height: 78vh;
  overflow-y: auto;
}
.imfc-qr {
  border-radius: 16px;
  padding: 16px;
}
.imfc-qr__card {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
}
.imfc-qr__avatar {
  display: inline-block;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  margin-bottom: 10px;
}
.imfc-qr__avatar--text {
  background: linear-gradient(135deg, #5c6bc0, #3949ab);
  color: #fff;
  line-height: 48px;
  font-weight: 600;
}
.imfc-qr__code {
  display: flex;
  justify-content: center;
  margin: 8px 0;
}
.imfc-qr__img {
  width: 180px;
  height: 180px;
  border-radius: 8px;
}
.imfc-qr__img--empty,
.imfc-qr__loading {
  color: #6a6a76;
  font-size: 13px;
  padding: 24px;
  text-align: center;
}
.imfc-qr__handle {
  font-size: 14px;
  font-weight: 600;
}
.imfc-qr__strip {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 12px;
}
.imfc-qr__theme {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
}
.imfc-qr__theme.is-active {
  border-color: #fff;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.15);
}
.imfc-qr__link {
  margin-top: 12px;
  font-size: 12px;
  color: #5a5a66;
}
.imfc-qr__link p {
  margin: 4px 0 0;
  word-break: break-all;
  color: #1a1a22;
  font-size: 13px;
}
.imfc-qr__actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}
.imfc-qr__btn {
  flex: 1 1 auto;
  border: 1px solid #e2e2ea;
  background: #fff;
  color: #1a1a22;
  border-radius: 10px;
  padding: 10px;
  font-size: 13px;
}
.imfc-qr__btn--primary {
  background: #ff5b8a;
  border-color: #ff5b8a;
  color: #fff;
}

.imfc-msg .im-wallet-rp,
.imfc-msg .im-wallet-rp-card {
  max-width: 100%;
}
