/* ===== 仿微信 UI · 重制版 ===== */
* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }

:root {
  --wx-green:       #07c160;
  --wx-green-dark:  #06ad56;
  --wx-bg:          #f5f5f5;
  --wx-white:       #ffffff;
  --wx-topbar:      #ededed;
  --wx-bubble-me:   #95ec69;
  --wx-bubble-them: #ffffff;
  --wx-text:        #191919;
  --wx-sub:         #888888;
  --wx-border:      #e5e5e5;
  --wx-red:         #fa5151;
  --safe-top:    env(safe-area-inset-top,    0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  background: #ccc;
  color: var(--wx-text);
  font-size: 16px;
  overflow: hidden;
}

#app {
  height: 100%;
  position: relative;
  max-width: 480px;
  margin: 0 auto;
  background: var(--wx-bg);
  overflow: hidden;
  box-shadow: 0 0 40px rgba(0,0,0,.15);
}

/* ── 屏幕切换 ── */
.screen { position:absolute; inset:0; display:none; flex-direction:column; }
.screen.active { display:flex; }

/* ========================================================
   登录页
   ======================================================== */
#loginScreen {
  background: #fff;
  align-items: flex-start;
  justify-content: flex-start;
}

.login-box {
  width: 100%;
  max-width: 100%;
  background: #fff;
  min-height: 100vh;
  padding: 0;
  position: relative;
  text-align: left;
  color: #191919;
}

.login-close {
  position: absolute;
  left: 16px;
  top: 50px;
  font-size: 28px;
  color: #000;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  line-height: 1;
}

.login-title {
  font-size: 20px;
  font-weight: 400;
  color: #191919;
  text-align: center;
  padding: 80px 0 40px;
  margin: 0;
}

.login-form {
  padding: 0 32px;
}

.form-group {
  margin-bottom: 28px;
}

.form-group label {
  display: block;
  font-size: 15px;
  color: #191919;
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  border: none;
  border-bottom: 1px solid #e5e5e5;
  padding: 10px 0;
  font-size: 16px;
  outline: none;
  background: transparent;
  color: #191919;
}

.form-input::placeholder {
  color: #b2b2b2;
}

.form-input:focus {
  border-bottom-color: #07c160;
}

.login-tip {
  font-size: 13px;
  color: #b2b2b2;
  margin: 20px 0 12px;
}

.login-link {
  font-size: 15px;
  color: #576b95;
  text-decoration: none;
  display: inline-block;
}

.login-checkbox {
  padding: 30px 32px 40px;
}

.login-checkbox label {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: #191919;
  cursor: pointer;
}

.login-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-right: 8px;
  accent-color: #07c160;
}

.btn-login {
  display: block;
  width: calc(100% - 64px);
  margin: 0 32px;
  padding: 14px;
  border: none;
  border-radius: 8px;
  background: #07c160;
  color: #fff;
  font-size: 17px;
  font-weight: 400;
  cursor: pointer;
  transition: opacity .15s;
}

.btn-login:active {
  opacity: .8;
}

.login-footer {
  text-align: center;
  padding: 30px 0 20px;
}

.footer-link {
  font-size: 15px;
  color: #576b95;
  text-decoration: none;
  padding: 0 4px;
}

.footer-sep {
  color: #d9d9d9;
  padding: 0 6px;
}

.login-err {
  color: #fa5151;
  font-size: 13px;
  text-align: center;
  margin-top: 16px;
  min-height: 18px;
}

/* 隐藏旧样式元素 */
.login-logo, .login-sub, .login-input, .btn-primary, .btn-secondary { display: none; }

/* ========================================================
   顶栏
   ======================================================== */
.topbar {
  height: calc(44px + var(--safe-top));
  padding-top: var(--safe-top);
  background: #ededed;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
  border-bottom: none;
  z-index: 5;
}
.topbar-title {
  font-size: 17px;
  font-weight: 600;
  max-width: 58%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #000;
}
.topbar-btn {
  position: absolute;
  background: none;
  border: none;
  font-size: 26px;
  color: #000;
  padding: 8px 14px;
  cursor: pointer;
  line-height: 1;
  white-space: nowrap;
  font-weight: 400;
}
#backBtn, #dmDetailBack, #profileBack, #applyBack, #giBack { left: 0; font-size: 28px; }
#membersBtn, #newGroupBtn { right: 0; font-size: 22px; }
#homeAddBtn { right: 0; font-size: 26px; font-weight: 400; color: #000; }

/* 搜索框 */
.search-bar {
  background: #ededed;
  padding: 8px 12px 12px;
  flex-shrink: 0;
}
.search-input-wrapper {
  background: #fff;
  border-radius: 6px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
}
.search-icon {
  width: 16px;
  height: 16px;
  opacity: 0.4;
  flex-shrink: 0;
  display: block;
}
.search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 15px;
  color: #000;
  background: transparent;
}
.search-input::placeholder {
  color: #999;
}

/* ========================================================
   主页布局(listScreen)
   ======================================================== */
#listScreen.active { display:flex; }
.tab-panel { display:none; flex:1; flex-direction:column; overflow-y:auto; }
.tab-panel.active { display:flex; }

/* ── 会话列表 / 好友列表 公用行 ── */
.group-list {
  list-style: none;
  background: #fff;
  flex: 1;
  overflow-y: auto;
  padding: 0;
  margin: 0;
}

.group-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #fff;
  cursor: pointer;
  position: relative;
}
/* 分割线:从头像右侧开始(48+12+16 = 76px) */
.group-item::after {
  content: '';
  position: absolute;
  left: 76px; right: 0; bottom: 0;
  height: .5px;
  background: #e5e5e5;
}
.group-item:active { background: #ececec; }

/* 头像 */
.group-ava, .group-avatar {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  background: #5b8cc4;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  font-weight: 600;
}

/* 文字区 */
.group-meta, .group-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.group-name {
  font-size: 17px;
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #000;
}
.group-sub, .group-last {
  font-size: 14px;
  color: #999;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 右侧时间 + 角标 */
.conv-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  flex-shrink: 0;
}
.conv-time {
  font-size: 13px;
  color: #999;
  white-space: nowrap;
}
.conv-badge {
  background: var(--wx-red);
  color: #fff;
  font-size: 11px;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  text-align: center;
}

.empty-tip {
  text-align: center;
  color: var(--wx-sub);
  font-size: 14px;
  padding: 60px 20px;
}

/* ── 通讯录区块 ── */
.contacts-label {
  font-size: 13px;
  color: var(--wx-sub);
  padding: 8px 16px 6px;
  background: var(--wx-bg);
}
/* 通讯录好友请求行复用 member-item */

/* ── "我"页面 ── */
.me-head {
  background: #fff;
  padding: 30px 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 10px;
}
.me-avatar {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  background: #07c160;
  color: #fff;
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  flex-shrink: 0;
}
.me-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.me-nick {
  font-size: 22px;
  font-weight: 500;
  color: #000;
}
.me-id {
  font-size: 14px;
  color: #888;
}
.me-actions {
  background: #fff;
}
.me-action-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: .5px solid #e5e5e5;
  cursor: pointer;
  font-size: 16px;
  color: #000;
}
.me-action-row:last-child { border-bottom: none; }
.me-action-row:active { background: #ececec; }
.me-action-icon {
  font-size: 20px;
  width: 24px;
  text-align: center;
}
.me-action-arrow {
  margin-left: auto;
  color: #c8c8c8;
  font-size: 18px;
}

/* ── 底部 Tab 栏 ── */
.tabbar {
  display: flex;
  border-top: .5px solid #d1d1d6;
  background: #f7f7f7;
  padding-bottom: var(--safe-bottom);
  flex-shrink: 0;
}
.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5px 0 4px;
  font-size: 10px;
  color: #000;
  cursor: pointer;
  gap: 2px;
  position: relative;
  transition: color .15s;
}
.tab-item.active { color: var(--wx-green); }
.tab-icon {
  width: 24px;
  height: 24px;
  display: block;
}
.tab-ico { font-size: 24px; line-height: 1; }

.tab-badge {
  position: absolute;
  top: 4px;
  right: calc(50% - 24px);
  background: var(--wx-red);
  color: #fff;
  font-size: 10px;
  min-width: 16px;
  height: 16px;
  line-height: 16px;
  border-radius: 8px;
  padding: 0 4px;
  text-align: center;
}

/* ── 会话列表:头像右上角未读角标 ── */
.group-ava, .group-avatar {
  position: relative;
}
.unread-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #fa5151;
  color: #fff;
  font-size: 10px;
  min-width: 16px;
  height: 16px;
  line-height: 16px;
  border-radius: 8px;
  padding: 0 4px;
  text-align: center;
  box-sizing: border-box;
  pointer-events: none;
}
/* 免打扰:只显示小红点,不显示数字 */
.unread-dot {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fa5151;
  pointer-events: none;
}

/* ── 底部 tab 微信图标上方的未读角标 ── */
.unread-tab-badge {
  position: absolute;
  top: 4px;
  right: calc(50% - 26px);
  background: #fa5151;
  color: #fff;
  font-size: 10px;
  min-width: 16px;
  height: 16px;
  line-height: 16px;
  border-radius: 8px;
  padding: 0 4px;
  text-align: center;
  box-sizing: border-box;
  pointer-events: none;
}

/* ========================================================
   聊天页
   ======================================================== */
#chatScreen .topbar {
  background: #fff;
  border-bottom: .5px solid #e5e5e5;
}

.mute-banner {
  background: #fffbe6;
  color: #8a6d00;
  text-align: center;
  padding: 5px 12px;
  font-size: 12px;
  border-bottom: .5px solid #f0dfa0;
  flex-shrink: 0;
}

.messages {
  flex: 1;
  overflow-y: auto;
  padding: 10px 0 6px;
  display: flex;
  flex-direction: column;
  background: #f5f5f5;
}

/* ── 单条消息行 ── */
.msg {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 5px 12px;
}
.msg.me { flex-direction: row-reverse; }

.msg-ava {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: #aaa;
  color: #fff;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  margin-top: 2px;
}
.msg.me .msg-ava { background: var(--wx-green); }

.msg-col {
  display: flex;
  flex-direction: column;
  max-width: 68%;
}
.msg.me .msg-col { align-items: flex-end; }

.msg-name {
  font-size: 12px;
  color: var(--wx-sub);
  margin-bottom: 3px;
  padding: 0 2px;
  display: none;
}

.msg-time {
  font-size: 11px;
  color: #b3b3b3;
  margin-top: 4px;
  padding: 0 2px;
}

/* ── 气泡 ── */
.bubble {
  position: relative;
  padding: 10px 12px;
  font-size: 16px;
  line-height: 1.4;
  word-break: break-word;
  box-shadow: none;
  background: #fff;
  border-radius: 8px;
}
.msg.me .bubble {
  background: #95ec69;
  border-radius: 8px;
}

/* 移除小三角 */
.bubble::before {
  display: none;
}
.msg.me .bubble::before {
  display: none;
}

.bubble img, .bubble video {
  max-width: 200px;
  max-height: 260px;
  border-radius: 6px;
  display: block;
}
.bubble.media { padding: 3px; }
.bubble.media::before { display: none; }

.bubble.emoji-only {
  background: none !important;
  box-shadow: none;
  font-size: 52px;
  padding: 0 2px;
  border-radius: 0;
}
.bubble.emoji-only::before { display: none; }

/* 阅后即焚 */
.bubble.burn {
  background: #1f1f1f !important;
  color: #fff;
  cursor: pointer;
}
.bubble.burn::before { border-right-color: #1f1f1f; }
.msg.me .bubble.burn::before { border-left-color: #1f1f1f; border-right-color: transparent; }

.bubble.burned {
  background: #d8d8d8 !important;
  color: #999;
  font-style: italic;
}
.bubble.burned::before { border-right-color: #d8d8d8; }
.msg.me .bubble.burned::before { border-left-color: #d8d8d8; border-right-color: transparent; }

/* ============ 语音消息气泡 ============ */
.voice-msg {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 60px;
  cursor: pointer;
}
.voice-dur {
  font-size: 15px;
  color: #000;
}
/* 声波图标(SVG):实心点 + 三条同心弧线,朝右(发出方) */
.voice-wave {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: inline-block;
}

/* 播放中:弧线依次亮起 */
.bubble.voice.playing .vw-arc { opacity: 0.25; }
.bubble.voice.playing .vw-arc1 { animation: vwPlay 1.2s infinite;        }
.bubble.voice.playing .vw-arc2 { animation: vwPlay 1.2s infinite 0.4s;   }
.bubble.voice.playing .vw-arc3 { animation: vwPlay 1.2s infinite 0.8s;   }
@keyframes vwPlay {
  0%, 100% { opacity: 0.25; }
  50%      { opacity: 1; }
}

.msg-time {
  font-size: 10px;
  color: #bbb;
  margin-top: 3px;
  padding: 0 2px;
}

/* 系统消息 */
.sys-msg { text-align: center; padding: 10px 0; }
.sys-msg span {
  display: inline-block;
  background: #dcdcdc;
  color: #888;
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 4px;
}

/* ── 语音浮条 ── */
.voice-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #1a1a1a;
  color: #fff;
  padding: 10px 16px;
  font-size: 14px;
  flex-shrink: 0;
}
.voice-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--wx-green);
  animation: pulse 1.2s infinite;
  flex-shrink: 0;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.25} }
.voice-hangup {
  margin-left: auto;
  background: var(--wx-red);
  color: #fff;
  border: none;
  padding: 6px 18px;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
}

/* ========================================================
   输入区
   ======================================================== */
.input-area {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 8px 12px;
  padding-bottom: calc(8px + var(--safe-bottom));
  background: #f5f5f5;
  border-top: .5px solid #d9d9d9;
  flex-shrink: 0;
}
.io-btn {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  flex-shrink: 0;
  color: #000;
}
.io-btn:active { opacity: .6; }
.io-icon {
  width: 28px;
  height: 28px;
  display: block;
}

/* 按住说话按钮 */
.hold-talk {
  flex: 1;
  border: none;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 16px;
  background: #fff;
  color: #000;
  cursor: pointer;
  height: 38px;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
.hold-talk.recording {
  background: #d0d0d0;
}

/* ============ 录音浮层(按住说话) ============ */
.rec-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.rec-overlay.hidden { display: none; }

/* 中间绿色语音气泡 */
.rec-bubble {
  position: relative;
  background: #95ec69;
  border-radius: 12px;
  padding: 26px 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
}
.rec-bubble.hidden { display: none; }
.rec-bubble-tail {
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-top: 10px solid #95ec69;
}

/* 波形动画 */
.rec-wave {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 28px;
}
.rec-wave span {
  display: block;
  width: 3px;
  border-radius: 2px;
  background: #2b2b2b;
  animation: recWave 0.9s ease-in-out infinite;
}
.rec-wave span:nth-child(1)  { animation-delay: 0.0s; }
.rec-wave span:nth-child(2)  { animation-delay: 0.18s; }
.rec-wave span:nth-child(3)  { animation-delay: 0.35s; }
.rec-wave span:nth-child(4)  { animation-delay: 0.12s; }
.rec-wave span:nth-child(5)  { animation-delay: 0.42s; }
.rec-wave span:nth-child(6)  { animation-delay: 0.28s; }
.rec-wave span:nth-child(7)  { animation-delay: 0.05s; }
.rec-wave span:nth-child(8)  { animation-delay: 0.5s; }
.rec-wave span:nth-child(9)  { animation-delay: 0.22s; }
.rec-wave span:nth-child(10) { animation-delay: 0.38s; }
.rec-wave span:nth-child(11) { animation-delay: 0.1s; }
.rec-wave span:nth-child(12) { animation-delay: 0.45s; }
.rec-wave span:nth-child(13) { animation-delay: 0.3s; }
.rec-wave span:nth-child(14) { animation-delay: 0.15s; }
.rec-wave span:nth-child(15) { animation-delay: 0.4s; }
@keyframes recWave {
  0%, 100% { height: 6px; }
  50%      { height: 24px; }
}

/* 上滑取消图标 */
.rec-cancel-ico {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #b0b0b0;
  color: #fff;
  font-size: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rec-cancel-ico.hidden { display: none; }

/* 底部提示文字 */
.rec-tip {
  position: fixed;
  bottom: 60px;
  left: 0;
  right: 0;
  text-align: center;
  color: #fff;
  font-size: 15px;
  letter-spacing: 2px;
}
.rec-tip.cancel { color: #fa5151; }
.rec-slidehint {
  position: fixed;
  bottom: 34px;
  left: 0;
  right: 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
}
.rec-slidehint.hidden { display: none; }

.msg-input {
  flex: 1;
  border: none;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 16px;
  resize: none;
  max-height: 96px;
  outline: none;
  font-family: inherit;
  background: #fff;
  color: #000;
  line-height: 1.4;
}
.msg-input::placeholder { color: #999; }

.btn-send {
  background: var(--wx-green);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
  transition: background .15s;
}
.btn-send:active { background: var(--wx-green-dark); }

/* ========================================================
   表情 & 功能面板
   ======================================================== */
.panel {
  background: var(--wx-topbar);
  border-top: .5px solid #d0d0d0;
  padding: 12px;
  max-height: 230px;
  overflow-y: auto;
  flex-shrink: 0;
}

#emojiPanel { display: flex; flex-wrap: wrap; gap: 4px; }
.emoji-cell {
  font-size: 30px;
  cursor: pointer;
  width: 14%;
  text-align: center;
  padding: 5px 0;
  border-radius: 6px;
}
.emoji-cell:active { background: rgba(0,0,0,.08); }

.plus-panel {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px 8px;
  padding: 14px 10px;
}
.plus-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: #444;
  cursor: pointer;
}
.plus-ico {
  width: 56px;
  height: 56px;
  background: var(--wx-white);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.plus-item:active .plus-ico { background: #eee; }

/* ========================================================
   红包气泡
   ======================================================== */
.redpacket {
  width: 250px;
  background: linear-gradient(135deg, #ff8c3a 0%, #ffb347 100%);
  border-radius: 8px;
  color: #fff;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(255, 140, 58, 0.4);
  position: relative;
  padding: 16px 16px 10px;
}
.msg.me .redpacket { border-radius: 8px; }
/* 红包不需要三角箭头 */
.msg .redpacket ~ .bubble::before,
.msg:has(.redpacket) .bubble::before { display:none; }

.rp-top {
  display: flex;
  align-items: center;
  gap: 14px;
}
.rp-ico {
  width: 38px;
  height: 48px;
  background: #e14b3b;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}
/* 红包封口的分割线 */
.rp-ico::before {
  content: '';
  position: absolute;
  top: 17px;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(0, 0, 0, 0.08);
}
/* 金色圆形 ¥ 币 */
.rp-coin {
  width: 19px;
  height: 19px;
  background: linear-gradient(135deg, #ffe08a 0%, #f3b845 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #e14b3b;
  position: relative;
  z-index: 1;
}
.rp-bless {
  font-size: 17px;
  font-weight: 400;
  line-height: 1.3;
  flex: 1;
}
.rp-bot {
  margin-top: 10px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
}
.redpacket.finished {
  background: linear-gradient(135deg, #d4af88 0%, #e0c7a8 100%);
  box-shadow: 0 2px 8px rgba(212, 175, 136, 0.4);
}

/* ========================================================
   右侧抽屉(群管理 / 聊天设置)
   ======================================================== */
.drawer { position:absolute; inset:0; display:none; z-index:20; }
.drawer.open { display:block; }
.drawer-mask { position:absolute; inset:0; background:rgba(0,0,0,.45); }

.drawer-body {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 78%;
  max-width: 320px;
  background: var(--wx-bg);
  overflow-y: auto;
  padding: calc(16px + var(--safe-top)) 0 calc(20px + var(--safe-bottom));
}

.drawer-body h3 {
  font-size: 16px;
  font-weight: 600;
  padding: 0 16px 14px;
  border-bottom: .5px solid var(--wx-border);
  margin-bottom: 10px;
}
.drawer-body h4 {
  font-size: 13px;
  color: var(--wx-sub);
  padding: 8px 16px 4px;
}

/* 抽屉中每行 */
.drawer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--wx-white);
  padding: 13px 16px;
  font-size: 15px;
  border-bottom: .5px solid var(--wx-border);
}
.drawer-row:first-of-type { border-top: .5px solid var(--wx-border); }

.mini-input {
  width: 52px;
  padding: 4px 6px;
  border: 1px solid #ccc;
  border-radius: 4px;
  text-align: center;
  font-size: 14px;
}
.mini-btn {
  background: var(--wx-green);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 5px 12px;
  font-size: 13px;
  cursor: pointer;
  margin-left: 6px;
}

/* ── 成员列表 ── */
.member-list { list-style: none; }
.member-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--wx-white);
  padding: 10px 16px;
  border-bottom: .5px solid var(--wx-border);
}
.member-ava {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: #5b8cc4;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
  flex-shrink: 0;
}
.member-name { flex: 1; font-size: 15px; }
.member-ops { display: flex; gap: 6px; flex-shrink: 0; }

.tag {
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: 4px;
  vertical-align: middle;
}
.tag.owner { background: #fff4d6; color: #a06000; }
.tag.muted  { background: #ffe0e0; color: #c00; }
.tag.offline { background: #eee; color: #999; }

.member-mute-btn, .member-kick-btn {
  font-size: 12px;
  padding: 4px 10px;
  border: 1px solid #ccc;
  background: var(--wx-white);
  border-radius: 4px;
  cursor: pointer;
}
.member-kick-btn { color: var(--wx-red); border-color: var(--wx-red); }

/* 危险按钮(退群/删好友) */
.btn-danger {
  width: calc(100% - 32px);
  margin: 20px 16px 0;
  padding: 13px;
  background: var(--wx-white);
  color: var(--wx-red);
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  border: .5px solid var(--wx-border);
}
.btn-danger:active { background: #fef0f0; }

/* 私聊管理区按钮 */
#dmManage .btn-primary {
  display: block;
  width: calc(100% - 32px);
  margin: 16px 16px 0;
  padding: 13px;
  border: none;
  border-radius: 8px;
  background: var(--wx-white);
  color: var(--wx-green);
  font-size: 16px;
  cursor: pointer;
  border: .5px solid var(--wx-border);
}

/* 邀请好友进群按钮 */
#inviteBtn {
  display: block;
  width: calc(100% - 32px);
  margin: 10px 16px 0;
  padding: 13px;
  background: var(--wx-white);
  color: var(--wx-green);
  border: .5px solid var(--wx-border);
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
}

/* ── 开关 toggle ── */
.switch { position:relative; width:48px; height:28px; display:inline-block; flex-shrink:0; }
.switch input { display:none; }
.slider {
  position: absolute;
  inset: 0;
  background: #ccc;
  border-radius: 28px;
  transition: background .2s;
}
.slider::before {
  content: '';
  position: absolute;
  width: 24px;
  height: 24px;
  left: 2px;
  top: 2px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.switch input:checked + .slider { background: var(--wx-green); }
.switch input:checked + .slider::before { transform: translateX(20px); }

/* ============ 私聊:聊天详情页 ============ */
#dmDetailScreen .topbar { background: #ededed; border-bottom: none; }
.detail-body {
  position: absolute;
  top: calc(48px + var(--safe-top));
  left: 0; right: 0; bottom: 0;
  background: #ededed;
  overflow-y: auto;
  padding-bottom: calc(20px + var(--safe-bottom));
}

/* 头像区 */
.detail-avatars {
  display: flex;
  gap: 16px;
  background: #fff;
  padding: 16px;
  margin-bottom: 10px;
}
.detail-ava-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 54px;
}
.detail-ava {
  width: 54px;
  height: 54px;
  border-radius: 6px;
  background: #07c160;
  color: #fff;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.detail-ava-add {
  background: transparent;
  color: #c8c8c8;
  border: 1px dashed #c8c8c8;
  font-size: 28px;
  font-weight: 300;
}
.detail-ava-name {
  margin-top: 6px;
  font-size: 12px;
  color: #888;
  max-width: 54px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 分组卡片 */
.detail-group {
  background: #fff;
  margin-bottom: 10px;
}
.detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  font-size: 16px;
  color: #000;
  border-bottom: .5px solid #eee;
  cursor: pointer;
}
.detail-row:last-child { border-bottom: none; }
.detail-row-center { justify-content: center; }
.detail-arrow { color: #c8c8c8; font-size: 18px; }

/* ── 好友在线/离线指示 ── */
.friend-online, .friend-offline {
  width: 7px; height: 7px;
  border-radius: 50%;
  display: inline-block;
  margin-left: 5px;
  vertical-align: middle;
}
.friend-online  { background: var(--wx-green); }
.friend-offline { background: #ccc; }

/* 好友请求按钮 */
.req-btns { display:flex; gap:8px; flex-shrink:0; }
.req-accept {
  background: var(--wx-green);
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
}
.req-reject {
  background: #f0f0f0;
  color: #555;
  border: none;
  border-radius: 5px;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
}

/* ========================================================
   弹窗 Modal
   ======================================================== */
.modal {
  position: absolute;
  inset: 0;
  display: none;
  z-index: 30;
  align-items: center;
  justify-content: center;
}
.modal.open { display:flex; }
.modal-mask { position:absolute; inset:0; background:rgba(0,0,0,.5); }

.modal-box {
  position: relative;
  background: var(--wx-white);
  border-radius: 14px;
  padding: 20px 20px 16px;
  width: 84%;
  max-width: 320px;
}
.modal-box h3 {
  text-align: center;
  font-size: 17px;
  margin-bottom: 16px;
}
.modal-box label {
  display: block;
  font-size: 13px;
  color: var(--wx-sub);
  margin: 10px 0 5px;
}
.modal-box input {
  width: 100%;
  padding: 10px 12px;
  border: .5px solid #ddd;
  border-radius: 7px;
  font-size: 15px;
  outline: none;
  background: #fafafa;
}
.modal-box input:focus { border-color: var(--wx-green); }

.modal-btns { display:flex; gap:10px; margin-top:20px; }
.modal-btns button { flex:1; padding:12px; border:none; border-radius:8px; font-size:15px; cursor:pointer; }
.modal-cancel { background:#f0f0f0; color:#444; }
.modal-ok { background:var(--wx-green); color:#fff; font-weight:600; }
.modal-ok:active { background: var(--wx-green-dark); }

/* ── 来电浮层 ── */
#incomingCall .modal-box { text-align: center; padding: 28px 20px 20px; }

/* ========================================================
   媒体查看器
   ======================================================== */
.viewer {
  position: absolute;
  inset: 0;
  display: none;
  z-index: 40;
  align-items: center;
  justify-content: center;
}
.viewer.open { display:flex; }
.viewer-mask { position:absolute; inset:0; background:rgba(0,0,0,.92); }
.viewer-content {
  position: relative;
  max-width: 96%;
  max-height: 90%;
}
.viewer-content img, .viewer-content video {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 4px;
}

/* ========================================================
   Toast
   ======================================================== */
.toast {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(17,17,17,.78);
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s;
  max-width: 80%;
  text-align: center;
  white-space: pre-wrap;
}
.toast.show { opacity: 1; }

/* ========================================================
   右上角浮动菜单(＋)
   ======================================================== */
.add-menu {
  position: absolute;
  top: calc(44px + var(--safe-top) + 4px);
  right: 8px;
  background: #3d3d3d;
  border-radius: 8px;
  padding: 4px 0;
  min-width: 148px;
  z-index: 10;
  box-shadow: 0 4px 16px rgba(0,0,0,.35);
}
.add-menu::before {
  content: '';
  position: absolute;
  top: -6px;
  right: 13px;
  border: 6px solid transparent;
  border-bottom-color: #3d3d3d;
  border-top: 0;
}
.add-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  color: #fff;
  font-size: 15px;
  cursor: pointer;
}
.add-menu-item:active { background: rgba(255,255,255,.08); }
.add-menu-img {
  width: 24px;
  height: 24px;
  display: block;
}
.add-menu-ico { font-size: 19px; width: 22px; text-align: center; }

/* ========================================================
   工具类 & 权限类
   ======================================================== */
.hidden { display: none !important; }
.owner-only { display: none; }
body.is-owner .owner-only { display: inline-flex; }
/* 整行的 owner-only(群管理入口 / 全员禁言行)要保持整行 flex,
   否则会被上面的 inline-flex 压塌成内容宽度,看起来像"禁言功能没了" */
body.is-owner .detail-row.owner-only,
body.is-owner .drawer-row.owner-only { display: flex; }

/* ========================================================
   添加朋友:搜索页 / 资料页 / 申请页
   ======================================================== */
/* 搜索栏(顶部:输入框 + 取消) */
.af-searchbar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ededed;
  padding: calc(8px + var(--safe-top)) 12px 8px;
  flex-shrink: 0;
}
.af-search-input-wrapper {
  flex: 1;
  background: #fff;
  border-radius: 6px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.af-search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  color: #000;
  background: transparent;
}
.af-search-input::placeholder { color: #999; }
.af-search-clear {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #c6c6c6;
  color: #fff;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
}
.af-cancel {
  background: none;
  border: none;
  color: #576b95;
  font-size: 16px;
  cursor: pointer;
  flex-shrink: 0;
  padding: 4px;
}

/* "搜索：xxx" 结果行 */
.af-result { background: #fff; flex: 1; }
.af-result-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: .5px solid #e5e5e5;
}
.af-result-row:active { background: #ececec; }
.af-result-ico {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  background: var(--wx-green);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.af-result-text { font-size: 16px; color: #000; }
.af-result-kw { color: var(--wx-green); word-break: break-all; }

/* 资料页 */
#userProfileScreen .topbar { background: #fff; border-bottom: none; }
.profile-body {
  flex: 1;
  overflow-y: auto;
  background: #ededed;
}
.profile-head {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fff;
  padding: 22px 20px;
  border-bottom: .5px solid #e5e5e5;
}
.profile-ava {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  background: var(--wx-green);
  color: #fff;
  font-size: 30px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.profile-info { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.profile-name {
  font-size: 22px;
  font-weight: 600;
  color: #000;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-id { font-size: 15px; color: #999; }
.profile-action {
  background: #fff;
  margin-top: 10px;
  border-top: .5px solid #e5e5e5;
  border-bottom: .5px solid #e5e5e5;
}
.profile-action-btn {
  text-align: center;
  padding: 15px;
  font-size: 17px;
  color: #576b95;
  cursor: pointer;
}
.profile-action-btn:active { background: #f2f2f2; }
.profile-action-btn.disabled { color: #b2b2b2; cursor: default; }

/* 申请页 */
#applyFriendScreen .topbar { background: #ededed; border-bottom: none; }
.apply-body {
  flex: 1;
  overflow-y: auto;
  background: #ededed;
  padding: 20px 16px;
}
.apply-label { font-size: 13px; color: #999; margin-bottom: 8px; }
.apply-input-wrap {
  background: #fff;
  border-radius: 8px;
  padding: 12px 14px;
}
.apply-input {
  width: 100%;
  border: none;
  outline: none;
  resize: none;
  font-size: 16px;
  font-family: inherit;
  color: #000;
  background: transparent;
  line-height: 1.5;
}
.apply-send {
  display: block;
  width: 60%;
  max-width: 260px;
  margin: 40px auto 0;
  padding: 12px;
  border: none;
  border-radius: 6px;
  background: var(--wx-green);
  color: #fff;
  font-size: 17px;
  cursor: pointer;
}
.apply-send:active { background: var(--wx-green-dark); }

/* 好友请求打招呼内容 */

/* ============ 发红包页面 ============ */
#redPacketScreen .topbar { background: #ededed; border-bottom: none; }
.rp-body {
  flex: 1;
  overflow-y: auto;
  background: #ededed;
  padding: 0;
}
.rp-type {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}
.rp-type-text {
  font-size: 16px;
  color: #d9903e;
}
.rp-type-arrow {
  font-size: 18px;
  color: #d9903e;
}
.rp-card {
  background: #fff;
  margin-bottom: 10px;
  padding: 0 20px;
}
.rp-row {
  display: flex;
  align-items: center;
  padding: 16px 0;
  border-bottom: 0.5px solid #e5e5e5;
}
.rp-row:last-child {
  border-bottom: none;
}
.rp-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  color: #000;
  min-width: 120px;
}
.rp-icon {
  font-size: 20px;
}
.rp-tag {
  display: inline-block;
  background: #d9903e;
  color: #fff;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
}
.rp-currency {
  font-size: 16px;
  color: #000;
  margin-right: 4px;
}
.rp-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  text-align: right;
  color: #000;
  background: transparent;
}
.rp-input::placeholder {
  color: #c7c7cc;
}
.rp-unit {
  font-size: 16px;
  color: #000;
  margin-left: 8px;
}
.rp-hint {
  padding: 8px 20px;
  font-size: 13px;
  color: #999;
}
.rp-blessing-row {
  border-bottom: none;
  padding: 12px 0;
}
.rp-blessing-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 15px;
  color: #000;
  background: transparent;
}
.rp-blessing-input::placeholder {
  color: #c7c7cc;
}
.rp-emoji {
  font-size: 24px;
  cursor: pointer;
}
.rp-preview {
  text-align: center;
  padding: 60px 20px 40px;
}
.rp-preview-amount {
  font-size: 64px;
  font-weight: 300;
  color: #000;
  margin-bottom: 40px;
  letter-spacing: -2px;
}
.rp-send-btn {
  width: 80%;
  max-width: 320px;
  padding: 14px;
  background: linear-gradient(135deg, #ff6b45 0%, #ff4757 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 17px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(255, 71, 87, 0.3);
  transition: all 0.2s;
}
.rp-send-btn:active {
  transform: scale(0.98);
  box-shadow: 0 2px 8px rgba(255, 71, 87, 0.3);
}
.rp-footer-hint {
  margin-top: 20px;
  font-size: 13px;
  color: #999;
}

/* ============ 会话长按菜单 ============ */
.context-menu {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.context-menu.hidden { display: none; }
.context-menu-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}
.context-menu-content {
  position: relative;
  background: #fff;
  border-radius: 12px;
  min-width: 200px;
  z-index: 1;
  overflow: hidden;
  animation: contextScale 0.2s ease;
}
@keyframes contextScale {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.context-menu-item {
  text-align: center;
  padding: 16px 20px;
  font-size: 17px;
  color: #000;
  cursor: pointer;
  border-bottom: 0.5px solid #e5e5e5;
}
.context-menu-item:last-child {
  border-bottom: none;
}
.context-menu-item:active {
  background: #f2f2f2;
}

/* ============ 退出登录弹窗（底部操作表） ============ */
.action-sheet {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.action-sheet.hidden { display: none; }
.action-sheet-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}
.action-sheet-content {
  position: relative;
  width: 100%;
  padding: 0 8px 8px;
  z-index: 1;
  animation: slideUp 0.3s ease;
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.action-sheet-item {
  background: #fff;
  text-align: center;
  padding: 16px;
  font-size: 17px;
  color: #000;
  cursor: pointer;
  border-radius: 12px;
  margin-bottom: 0;
}
.action-sheet-item:first-child {
  border-radius: 12px 12px 0 0;
}
.action-sheet-item:active {
  background: #f2f2f2;
}
.action-sheet-gap {
  height: 8px;
}
.action-sheet-cancel {
  border-radius: 12px !important;
  font-weight: 500;
}
.req-greeting { font-size: 12px; color: #999; }

/* ============ 红包封面(点开前) ============ */
.rp-cover {
  position: fixed; inset: 0; z-index: 200;
  display: none; align-items: center; justify-content: center;
  background: rgba(0,0,0,.55);
}
.rp-cover.open { display: flex; }
.rp-cover-inner {
  width: 300px; height: 440px; border-radius: 14px;
  background: linear-gradient(180deg, #f5654a 0%, #f5654a 62%, #ee4c30 62%, #ee4c30 100%);
  position: relative; text-align: center; color: #f7d9a0;
  box-shadow: 0 12px 40px rgba(0,0,0,.4);
}
.rp-cover-from {
  margin-top: 56px; font-size: 17px; color: #fbe6c0; font-weight: 500;
}
.rp-cover-ava {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 4px; background: #fff; color: #f5654a;
  font-size: 13px; font-weight: 700; vertical-align: middle; margin-right: 4px;
}
.rp-cover-bless {
  margin-top: 22px; font-size: 24px; font-weight: 600; color: #fbe6c0;
  padding: 0 30px; line-height: 1.4;
}
.rp-cover-open {
  position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%);
  width: 96px; height: 96px; border-radius: 50%; border: none;
  background: radial-gradient(circle at 50% 40%, #f6e2b3, #e8c682);
  color: #6b4a1f; font-size: 40px; font-weight: 700; cursor: pointer;
  box-shadow: 0 6px 16px rgba(0,0,0,.25);
}
.rp-cover-open:active { transform: translateX(-50%) scale(.94); }
.rp-cover-open.spin { animation: rpSpin .6s linear infinite; }
@keyframes rpSpin { to { transform: translateX(-50%) rotate(360deg); } }
.rp-cover-detail {
  position: absolute; left: 0; right: 0; bottom: 40px;
  font-size: 14px; color: #fbe6c0; cursor: pointer;
}
.rp-cover-close {
  position: absolute; left: 50%; bottom: -56px; transform: translateX(-50%);
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid #f7d9a0;
  background: transparent; color: #f7d9a0; font-size: 18px; cursor: pointer;
}

/* ============ 红包领取详情页 ============ */
#rpDetailScreen .rp-detail-bar {
  background: #ee503a; border-bottom: none;
  display: flex; align-items: center; justify-content: space-between;
}
#rpDetailScreen .rp-detail-bar .topbar-btn { color: #fff; }
#rpDetailBack { left: 0; font-size: 28px; }
.rp-detail-more { right: 0; font-size: 20px; letter-spacing: 1px; }
.rp-detail-body {
  flex: 1; overflow-y: auto; background: #fff;
}
.rp-detail-head {
  background: #ee503a; color: #fbe6c0; text-align: center;
  padding: 8px 20px 34px; border-radius: 0 0 50% 50% / 0 0 24px 24px;
}
.rp-detail-from {
  font-size: 17px; color: #fff; font-weight: 500;
}
.rp-detail-ava {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 4px; background: #fff; color: #ee503a;
  font-size: 13px; font-weight: 700; vertical-align: middle; margin-right: 4px;
}
.rp-detail-bless {
  margin-top: 8px; font-size: 14px; color: #f7c9a0;
}
.rp-detail-mine { margin-top: 22px; display: none; }
.rp-detail-amount {
  font-size: 46px; font-weight: 700; color: #fff;
}
.rp-detail-yuan { color: #fff; font-size: 20px; margin-left: 4px; }
.rp-detail-wallet {
  margin-top: 12px; font-size: 13px; color: #f7c9a0;
}
.rp-detail-emojibtn {
  display: inline-block; margin-top: 16px; padding: 10px 26px;
  background: rgba(255,255,255,.15); border-radius: 8px; font-size: 14px; color: #fbe6c0;
}
.rp-detail-count {
  color: #999; font-size: 13px; padding: 16px 18px 8px;
}
.rp-detail-list { list-style: none; }
.rp-detail-item {
  display: flex; align-items: center; padding: 12px 18px;
}
.rp-detail-iava {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 5px; background: #f5654a; color: #fff;
  font-size: 17px; font-weight: 600; flex: none;
}
.rp-detail-info { flex: 1; margin-left: 12px; min-width: 0; }
.rp-detail-inick { color: #333; font-size: 15px; }
.rp-detail-itime { color: #b0b0b0; font-size: 12px; margin-top: 3px; }
.rp-detail-iamount {
  color: #333; font-size: 15px; text-align: right; white-space: nowrap;
}
.rp-detail-best {
  display: inline-block; margin-left: 8px; padding: 1px 6px;
  background: #fef0d0; color: #d79b3c; font-size: 11px; border-radius: 3px;
}
.rp-detail-footer {
  text-align: center; color: #999; font-size: 13px; padding: 30px 18px;
}

/* ========== 发起群聊:多选好友整页 ========== */
#newGroupScreen { background: #ededed; }
.ng-topbar {
  display: flex; align-items: center; justify-content: space-between;
  height: 48px; padding: 0 12px; background: #ededed;
  padding-top: env(safe-area-inset-top);
}
.ng-title { font-size: 17px; font-weight: 600; color: #000; }
.ng-cancel {
  border: none; background: none; font-size: 16px; color: #000;
  padding: 6px 4px; cursor: pointer;
}
.ng-done {
  border: none; background: #07c160; color: #fff; font-size: 15px;
  padding: 6px 14px; border-radius: 5px; cursor: pointer;
}
.ng-done:disabled { background: #9be6b4; color: #f2fff7; cursor: default; }

.ng-selbar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; background: #fff; margin: 8px 12px; border-radius: 6px;
  min-height: 44px;
}
.ng-selected { display: flex; gap: 6px; flex-wrap: nowrap; overflow-x: auto; }
.ng-sel-ava {
  width: 36px; height: 36px; flex: 0 0 36px; border-radius: 5px;
  background: #07c160; color: #fff; display: flex; align-items: center;
  justify-content: center; font-size: 15px;
}
.ng-search {
  flex: 1; min-width: 60px; border: none; outline: none; background: none;
  font-size: 15px; color: #333;
}
.ng-search::placeholder { color: #b2b2b2; }

.ng-list { flex: 1; overflow-y: auto; background: #fff; }
.ng-empty { text-align: center; color: #999; font-size: 14px; padding: 40px 20px; }
.ng-group-label {
  padding: 4px 16px; font-size: 13px; color: #888; background: #f5f5f5;
}
.ng-item {
  display: flex; align-items: center; padding: 8px 16px; cursor: pointer;
}
.ng-item:active { background: #f2f2f2; }
.ng-check {
  width: 22px; height: 22px; flex: 0 0 22px; border-radius: 50%;
  border: 1px solid #ccc; margin-right: 12px; box-sizing: border-box;
  position: relative;
}
.ng-check.on { background: #07c160; border-color: #07c160; }
.ng-check.on::after {
  content: ''; position: absolute; left: 7px; top: 3px;
  width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.ng-ava {
  width: 40px; height: 40px; flex: 0 0 40px; border-radius: 5px;
  background: #07c160; color: #fff; display: flex; align-items: center;
  justify-content: center; font-size: 16px; margin-right: 12px;
}
.ng-name { font-size: 16px; color: #000; }

/* ============================================================
   群聊信息页:行右侧值 / 二维码
   ============================================================ */
.detail-val {
  display: flex; align-items: center; gap: 4px;
  max-width: 60%; overflow: hidden;
}
.detail-val-text {
  color: #888; font-size: 15px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.detail-val-gray { color: #b0b0b0; }
.detail-qr { color: #888; font-size: 18px; }