/* wechat.css — 微信模拟样式 */
/* 韩系简约ins风（白色+哑光玫瑰色调） */

/* ===== 微信主页布局 ===== */
.wechat-main { display: flex; flex-direction: column; }

/* 顶部header */
.wechat-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; padding-top: calc(12px + env(safe-area-inset-top));
  background: var(--c-bg); border-bottom: 1px solid var(--c-border); flex-shrink: 0;
}
.wechat-title { font-size: 17px; font-weight: 500; }
.wechat-header-btns { display: flex; gap: 4px; }

/* 内容区 */
.wechat-content { flex: 1; overflow-y: auto; }

/* 底部Tab */
.wechat-tabs {
  display: flex; border-top: 1px solid var(--c-border);
  padding-bottom: env(safe-area-inset-bottom); background: var(--c-bg); flex-shrink: 0;
}
.wechat-tab {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  gap: 3px; padding: 8px 0; color: var(--c-hint); font-size: 11px; transition: color var(--dur);
}
.wechat-tab i { font-size: 22px; }
.wechat-tab.active { color: var(--c-accent); }

/* 返回按钮 */
.btn-back-wechat {
  position: absolute; top: calc(10px + env(safe-area-inset-top)); left: 4px;
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  color: var(--c-sub); font-size: 20px; z-index: 10;
}

/* ===== 聊天列表行 ===== */
.chat-list-row {
  display: flex; align-items: center; padding: 12px 16px; gap: 12px;
  border-bottom: 1px solid var(--c-border); cursor: pointer;
  background: var(--c-bg); transition: background var(--dur);
}
.chat-list-row:active { background: var(--c-surface); }
.chat-avatar {
  position: relative; width: 48px; height: 48px; border-radius: 12px;
  overflow: hidden; background: var(--c-surface-2); flex-shrink: 0;
}
.chat-avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-icon-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  color: var(--c-hint); font-size: 20px;
}

/* 未读角标 */
.unread-badge {
  position: absolute; top: -3px; right: -3px; min-width: 16px; height: 16px;
  background: var(--c-red); color: #fff; border-radius: var(--r-pill);
  font-size: 10px; display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
.chat-row-info { flex: 1; min-width: 0; }
.chat-row-top { display: flex; justify-content: space-between; align-items: baseline; }
.chat-row-name { font-size: 15px; color: var(--c-text); }
.chat-row-time { font-size: 11px; color: var(--c-hint); }
.chat-row-last {
  font-size: 13px; color: var(--c-sub); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ===== 聊天窗口 ===== */
.chat-window-page { display: flex; flex-direction: column; }
.chat-header {
  border-bottom: 1px solid var(--c-border);
  padding-top: calc(16px + env(safe-area-inset-top)); flex-shrink: 0;
}
.chat-header-info { flex: 1; }
.chat-header-name { font-size: 16px; font-weight: 400; display: block; }
.chat-header-sub { font-size: 11px; color: var(--c-sub); }

/* 消息区域 */
.chat-messages {
  flex: 1; overflow-y: auto; padding: 12px 16px;
  display: flex; flex-direction: column; gap: 12px; background: var(--c-surface);
}
.chat-empty { text-align: center; color: var(--c-hint); font-size: 13px; padding: 40px 0; }

/* 消息行 */
.msg-row { display: flex; align-items: flex-start; gap: 8px; }
.msg-self { flex-direction: row-reverse; }
.msg-avatar-wrap { flex-shrink: 0; position: relative; }
.msg-avatar-wrap.is-clickable { cursor: pointer; transition: transform var(--dur); }
.msg-avatar-wrap.is-clickable:active { transform: scale(0.92); }
.msg-avatar {
  width: var(--avatar-size, 34px); height: var(--avatar-size, 34px);
  border-radius: var(--avatar-radius, 4px); overflow: hidden;
  background: var(--c-surface-2); display: flex; align-items: center; justify-content: center;
  color: var(--c-hint);
}
.msg-avatar img { width: 100%; height: 100%; object-fit: cover; }


/* 气泡 */
.msg-bubble {
  max-width: 100%; padding: 6px 10px; border-radius: 6px;
  font-size: 14px; line-height: 1.6; word-break: break-word; white-space: pre-wrap;
}
.bubble-self { background: var(--c-rose); color: #fff; }
.bubble-other {
  background: var(--c-bg); color: var(--c-text);
  box-shadow: var(--shadow-sm);
}

/* 群聊发送者名 */
.msg-group-wrap { display: flex; flex-direction: column; gap: 2px; }
.msg-sender-name { font-size: 11px; color: var(--c-sub); padding-left: 2px; }

/* 输入中动画 */
.typing-dots { display: flex; gap: 4px; align-items: center; padding: 14px 16px; }
.typing-dots span {
  width: 6px; height: 6px; background: var(--c-sub); border-radius: 50%;
  animation: typingBounce 1.2s infinite;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
  0%,60%,100% { transform: translateY(0); }
  30% { transform: translateY(-6px); }
}

/* ===== 输入栏 ===== */
.chat-input-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px;
  padding-bottom: calc(8px + env(safe-area-inset-bottom));
  background: var(--c-bg); flex-shrink: 0;
}

/* 左侧魔法棒回复按钮 */
.chat-reply-btn {
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 50%; border: none; cursor: pointer;
  background: var(--c-surface-2);
  color: var(--c-accent-dark);
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.18s var(--ease);
  box-shadow: 0 1px 4px rgba(180, 140, 160, 0.12);
}
.chat-reply-btn:hover { background: var(--c-accent-light); color: var(--c-accent-dark); }
.chat-reply-btn:active { transform: scale(0.92); background: var(--c-accent-light); }

/* 输入框胶囊容器（输入 + 右侧三个图标） */
.chat-input-wrap {
  flex: 1; min-width: 0;
  display: flex; align-items: flex-end; gap: 2px;
  background: var(--c-surface);
  border: 1px solid transparent;
  border-radius: 22px;
  padding: 2px 4px 2px 16px;
  min-height: 40px;
  transition: border-color var(--dur), background var(--dur);
}
.chat-input-wrap:focus-within {
  border-color: var(--c-accent-light);
  background: var(--c-bg);
}

.chat-input {
  flex: 1; min-width: 0;
  padding: 9px 0;
  background: transparent;
  border: none;
  font-size: 14px;
  line-height: 1.4;
  resize: none;
  max-height: 120px;
  font-family: var(--font);
  color: var(--c-text);
}
.chat-input::placeholder { color: var(--c-hint); }

/* 输入栏右侧图标组 */
.chat-input-actions {
  display: flex; align-items: center; gap: 0;
  flex-shrink: 0; padding-bottom: 2px;
}
.chat-input-icon {
  width: 34px; height: 34px;
  border: none; background: transparent; cursor: pointer; padding: 0;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--c-sub);
  transition: all 0.15s;
}
.chat-input-icon svg {
  width: 22px; height: 22px;
  fill: currentColor;
  display: block;
}
.chat-input-icon i { font-size: 14px; line-height: 1; }
.chat-input-icon:hover { color: var(--c-accent-dark); background: var(--c-border-m); }
.chat-input-icon:active { transform: scale(0.88); background: var(--c-border-m); }

/* 加号 → 发送 双态切换 */
.chat-input-icon.is-send {
  color: #fff;
  background: var(--c-accent);
  box-shadow: 0 1px 4px rgba(212, 160, 176, 0.35);
}
.chat-input-icon.is-send:hover { background: var(--c-accent-dark); color: #fff; }
.chat-input-icon.is-send:active { background: var(--c-accent-dark); transform: scale(0.9); }

/* 消息上下文菜单 */
.msg-context-menu {
  position: fixed; background: rgba(44,44,44,0.9); border-radius: var(--r-md);
  z-index: 500; overflow: hidden; box-shadow: var(--shadow-lg);
}
.msg-context-menu button {
  display: flex; align-items: center; gap: 8px; padding: 12px 18px;
  color: #fff; font-size: 14px; width: 100%;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.msg-context-menu button:last-child { border-bottom: none; }
.msg-context-menu button:active { background: rgba(255,255,255,0.1); }

/* ===== 通讯录 ===== */
.contacts-search-wrap {
  padding: 10px 16px; background: var(--c-bg); border-bottom: 1px solid var(--c-border);
}
.contacts-list { padding: 0 16px; }
.contact-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 0;
  border-bottom: 1px solid var(--c-border); cursor: pointer;
}
.contact-info { flex: 1; }
.contact-name { font-size: 15px; display: block; }
.contact-nick { font-size: 12px; color: var(--c-sub); }

/* 通讯录顶部"添加好友"行 */
.contact-add-row { background: var(--c-bg); }
.contact-add-row:active { background: var(--c-surface); }
.contact-add-avatar {
  display: flex; align-items: center; justify-content: center;
  background: var(--c-accent-light); color: var(--c-accent-dark); font-size: 20px;
}

/* ===== 添加好友弹窗 ===== */
.af-tabs {
  display: flex; padding: 0 16px; gap: 16px;
  border-bottom: 1px solid var(--c-border); margin-bottom: 4px;
}
.af-tab {
  flex: 1; padding: 10px 0; background: none; border: none;
  font-size: 14px; color: var(--c-sub); font-family: var(--font);
  position: relative; cursor: pointer; transition: color var(--dur);
}
.af-tab.active { color: var(--c-accent); font-weight: 500; }
.af-tab.active::after {
  content: ''; position: absolute; left: 50%; bottom: -1px;
  width: 28px; height: 2px; background: var(--c-accent);
  transform: translateX(-50%); border-radius: 2px;
}

.af-pane { display: flex; flex-direction: column; }
.af-search-result { padding: 8px 16px 0; min-height: 4px; }
.af-search-empty {
  padding: 16px 0; text-align: center; font-size: 13px; color: var(--c-hint);
}
.af-hit-card {
  display: flex; align-items: center; gap: 12px; padding: 12px;
  background: var(--c-surface); border-radius: var(--r-md);
}
.af-hit-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.af-hit-name { font-size: 14px; color: var(--c-text); }
.af-hit-account { font-size: 12px; color: var(--c-sub); }
.af-add-btn {
  background: var(--c-accent); color: #fff; font-size: 13px;
  padding: 6px 14px; border: none; cursor: pointer;
  font-family: var(--font); flex-shrink: 0;
}
.af-add-btn-disabled {
  background: var(--c-surface-2); color: var(--c-hint); cursor: not-allowed;
}

.af-pick-list { max-height: 320px; overflow-y: auto; padding: 4px 16px 0; }
.af-pick-row { padding: 10px 0; }
.af-pick-info {
  flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px;
}
.af-pick-name { font-size: 14px; color: var(--c-text); }
.af-pick-nick { font-size: 11px; color: var(--c-sub); }
.af-pick-account { font-size: 11px; color: var(--c-hint); }

/* ===== 朋友圈 ===== */
.moments-header { position: relative; height: 120px; background: var(--c-surface-2); flex-shrink: 0; }
.moments-cover {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--c-surface) 0%, var(--c-accent-light) 100%);
}
.btn-post-moment {
  position: absolute; bottom: -20px; right: 20px; width: 44px; height: 44px;
  background: var(--c-bg); border-radius: 50%; box-shadow: var(--shadow-md);
  display: flex; align-items: center; justify-content: center;
  color: var(--c-sub); font-size: 18px;
}
.moments-list { padding: 24px 16px 16px; }
.moment-card { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--c-border); }
.moment-avatar {
  width: 40px; height: 40px; border-radius: 50%; overflow: hidden;
  background: var(--c-surface-2); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; color: var(--c-hint);
}
.moment-avatar img { width: 100%; height: 100%; object-fit: cover; }
.moment-body { flex: 1; min-width: 0; }
.moment-name { font-size: 14px; color: var(--c-accent-dark); margin-bottom: 4px; }
.moment-text { font-size: 14px; color: var(--c-text); line-height: 1.6; }
.moment-imgs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 8px; }
.moment-imgs img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-sm); }
.moment-meta { font-size: 11px; color: var(--c-hint); margin-top: 6px; }

/* ===== 我tab ===== */
.me-profile {
  display: flex; align-items: center; gap: 16px; padding: 20px 16px;
  background: var(--c-bg); border-bottom: 1px solid var(--c-border);
}
.me-avatar {
  width: 64px; height: 64px; border-radius: 16px; overflow: hidden;
  background: var(--c-surface-2); display: flex; align-items: center; justify-content: center;
  color: var(--c-hint); font-size: 28px;
}
.me-avatar img { width: 100%; height: 100%; object-fit: cover; }
.me-name { font-size: 20px; font-weight: 400; }
.me-wechat-id { font-size: 13px; color: var(--c-sub); margin-top: 4px; }
.me-section { padding: 8px 0; }

/* ===== 群聊加号菜单 ===== */
.wechat-add-menu { display: flex; flex-direction: column; padding: 8px 16px 16px; gap: 4px; }
.add-menu-item {
  display: flex; align-items: center; gap: 16px; padding: 14px 8px;
  border-bottom: 1px solid var(--c-border); color: var(--c-text); font-size: 15px;
}
.add-menu-item i { width: 24px; text-align: center; color: var(--c-accent); font-size: 18px; }

/* 群聊成员选择 */
.group-member-select { max-height: 280px; overflow-y: auto; padding: 0 16px; }
.member-select-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 0;
  border-bottom: 1px solid var(--c-border); cursor: pointer;
}
.member-check { color: var(--c-hint); font-size: 18px; }
.fa-check-circle { color: var(--c-accent) !important; }

/* ===== 微信登录页 ===== */
.wechat-login-page {
  background: var(--c-surface); display: flex; align-items: center; justify-content: center;
  padding: 20px 24px; padding-top: calc(20px + env(safe-area-inset-top));
}
.wl-bg { position: absolute; inset: 0; background: var(--c-surface); z-index: 0; }
.wl-card {
  position: relative; z-index: 1; width: 100%; max-width: 340px;
  display: flex; flex-direction: column; align-items: center; gap: 0;
}
.wl-logo-wrap {
  display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 28px;
}
.wl-logo-icon {
  width: 76px; height: 76px; background: var(--c-accent); border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(212, 160, 160, 0.4);
}
.wl-title { font-size: 22px; font-weight: 300; color: var(--c-text); letter-spacing: 0.04em; }
.wl-subtitle { font-size: 13px; color: var(--c-hint); margin-top: -6px; }

/* 表单白卡 */
.wl-form-card {
  width: 100%; background: var(--c-bg); border-radius: var(--r-md);
  box-shadow: var(--shadow-sm); overflow: hidden; margin-bottom: 12px;
}
.wl-field { display: flex; align-items: center; padding: 14px 16px; gap: 12px; }
.wl-label { font-size: 14px; color: var(--c-text); width: 52px; flex-shrink: 0; }
.wl-input {
  flex: 1; border: none; outline: none; background: transparent;
  font-size: 14px; color: var(--c-text); font-family: var(--font);
}
.wl-input::placeholder { color: var(--c-hint); }
.wl-divider { height: 1px; background: var(--c-border); margin: 0 16px; }
.wl-eye-btn { color: var(--c-hint); font-size: 16px; padding: 4px; transition: color var(--dur); }
.wl-eye-btn:active { color: var(--c-accent); }
.wl-error { width: 100%; font-size: 12px; color: var(--c-red); text-align: center; padding: 4px 0 8px; }
.wl-agree { font-size: 11px; color: var(--c-hint); text-align: center; margin-bottom: 16px; }
.wl-agree-link { color: var(--c-accent); }

/* 登录/返回按钮 */
.wl-submit-btn {
  width: 100%; padding: 14px 0; background: var(--c-accent); color: #fff;
  border-radius: var(--r-pill); font-size: 16px; font-weight: 400;
  font-family: var(--font); border: none; cursor: pointer;
  transition: all 0.15s; margin-bottom: 12px;
}
.wl-submit-btn:active { opacity: 0.85; transform: scale(0.98); }
.wl-submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.wl-back-btn {
  width: 100%; padding: 12px 0; background: var(--c-bg); color: var(--c-sub);
  border-radius: var(--r-pill); font-size: 14px; font-family: var(--font);
  border: 1px solid var(--c-border-m); cursor: pointer; transition: all 0.15s; margin-bottom: 20px;
}
.wl-back-btn:active { background: var(--c-surface); }
.wl-bottom-links { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.wl-link { color: var(--c-accent); cursor: pointer; }
.wl-link-sep { color: var(--c-border-m); }
.wl-link-dim { color: var(--c-hint); pointer-events: none; }

/* 找回密码弹窗 */
.wl-modal-overlay {
  position: absolute; inset: 0; background: rgba(0,0,0,0.35); z-index: 600;
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.wl-modal-box {
  background: var(--c-bg); border-radius: var(--r-md); padding: 24px 20px 16px;
  width: 100%; max-width: 300px; display: flex; flex-direction: column; gap: 10px;
}
.wl-modal-title { font-size: 16px; font-weight: 500; text-align: center; }
.wl-modal-sub { font-size: 12px; color: var(--c-sub); text-align: center; }
.wl-modal-input {
  width: 100%; padding: 10px 14px; background: var(--c-surface);
  border: 1px solid transparent; border-radius: var(--r-sm);
  font-size: 14px; font-family: var(--font); color: var(--c-text);
  outline: none; transition: border-color var(--dur);
}
.wl-modal-input:focus { border-color: var(--c-accent-light); }
.wl-recover-result {
  background: var(--c-surface); border-radius: var(--r-sm); padding: 12px; text-align: center;
}
.wl-recover-name { font-size: 13px; color: var(--c-sub); margin-bottom: 4px; }
.wl-recover-pwd { font-size: 18px; color: var(--c-text); font-weight: 400; letter-spacing: 0.1em; }
.wl-recover-error { font-size: 12px; color: var(--c-red); text-align: center; }
.wl-modal-btns { display: flex; gap: 8px; margin-top: 4px; }
.wl-modal-btn-cancel {
  flex: 1; padding: 10px 0; background: var(--c-surface); border-radius: var(--r-pill);
  font-size: 14px; font-family: var(--font); color: var(--c-sub);
  border: 1px solid var(--c-border-m); cursor: pointer;
}
.wl-modal-btn-ok {
  flex: 1; padding: 10px 0; background: var(--c-accent); border-radius: var(--r-pill);
  font-size: 14px; font-family: var(--font); color: #fff; border: none; cursor: pointer;
}

/* ===== 加号面板 ===== */
.chat-plus-panel { background: var(--c-bg); border-top: 1px solid var(--c-border); padding: 16px; }
.plus-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.plus-item { display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; }
.plus-icon {
  width: 52px; height: 52px; background: var(--c-surface); border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  color: var(--c-accent); font-size: 22px; transition: background var(--dur);
}
.plus-item:active .plus-icon { background: var(--c-border); }
.plus-item span { font-size: 11px; color: var(--c-sub); }

/* ===== 表情包内联面板（与加号面板同形态） ===== */
.chat-emoji-panel {
  background: var(--c-bg);
  border-top: 1px solid var(--c-border);
  padding: 10px 12px 12px;
  display: flex; flex-direction: column; gap: 8px;
  max-height: 42vh;
}
.chat-emoji-panel .sp-grid {
  max-height: 30vh;
}
.ep-actions {
  display: flex; gap: 10px; padding-top: 6px;
  border-top: 1px solid var(--c-border);
}
.ep-actions .btn-pill { flex: 1; }

/* ===== 消息内容包装 ===== */
.msg-content-wrap {
  display: flex; flex-direction: column; align-items: flex-end;
  gap: 2px; max-width: 80%; min-width: 0;
}
.msg-status-tip { font-size: 10px; color: var(--c-hint); padding: 0 4px; }

/* ===== 语音卡片 ===== */
.voice-card {
  background: var(--c-bg); border: 1px solid var(--c-border); border-radius: var(--r-md);
  padding: 10px 14px; min-width: 120px; cursor: pointer; transition: background var(--dur);
}
.voice-card:active { background: var(--c-surface); }
.voice-preview { display: flex; align-items: center; gap: 8px; color: var(--c-text); font-size: 14px; }
.voice-waves { display: flex; align-items: flex-end; gap: 2px; height: 16px; }
.voice-waves span { display: block; width: 3px; border-radius: 2px; background: var(--c-accent); }
.voice-waves span:nth-child(1) { height: 6px; }
.voice-waves span:nth-child(2) { height: 10px; }
.voice-waves span:nth-child(3) { height: 14px; }
.voice-text {
  margin-top: 8px; font-size: 13px; color: var(--c-sub); line-height: 1.6;
  border-top: 1px solid var(--c-border); padding-top: 8px;
}

/* ===== 图片消息 ===== */
.photo-card {
  background: var(--c-surface); border-radius: var(--r-md);
  overflow: hidden; min-width: 140px; max-width: 200px;
}
.photo-placeholder {
  aspect-ratio: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 6px; color: var(--c-hint); font-size: 12px; padding: 24px;
}
.photo-placeholder i { font-size: 28px; color: var(--c-border); }
.msg-real-photo {
  width: 100%; max-width: 200px; max-height: 280px;
  object-fit: cover; border-radius: var(--r-md); display: block;
}

/* ===== 礼物卡片 ===== */
.gift-card {
  background: var(--c-bg); border: 1px solid var(--c-border);
  border-radius: var(--r-md); overflow: hidden; min-width: 200px;
}
.gift-header {
  background: linear-gradient(135deg, #f8e8e8, #fdf0ec); padding: 14px 16px;
  display: flex; align-items: center; gap: 10px;
}
.gift-name { font-size: 14px; font-weight: 400; color: var(--c-text); }
.gift-price { font-size: 12px; color: var(--c-accent); margin-top: 2px; }
.gift-desc { font-size: 12px; color: var(--c-sub); margin-top: 2px; }
.gift-actions { display: flex; border-top: 1px solid var(--c-border); }
.gift-btn {
  flex: 1; padding: 10px 0; font-size: 13px; font-family: var(--font);
  background: none; border: none; cursor: pointer; transition: background var(--dur); color: var(--c-sub);
}
.gift-btn:first-child { border-right: 1px solid var(--c-border); }
.gift-btn.accept { color: var(--c-accent); font-weight: 400; }
.gift-btn:active { background: var(--c-surface); }
.card-status-label {
  font-size: 12px; color: var(--c-hint); padding: 8px 16px;
  text-align: center; border-top: 1px solid var(--c-border);
}

/* ===== 转账卡片 ===== */
.transfer-card {
  background: var(--c-bg); border: 1px solid var(--c-border);
  border-radius: var(--r-md); overflow: hidden; min-width: 220px; max-width: 260px;
}
.transfer-body {
  position: relative; padding: 14px 16px 16px;
}
.transfer-title {
  font-size: 13px; letter-spacing: 0.5px; font-weight: 500;
  margin-bottom: 10px;
}
.transfer-title.status-pending  { color: var(--c-accent); }
.transfer-title.status-accepted { color: #4caf87; }
.transfer-title.status-declined { color: var(--c-hint); }
.transfer-amount {
  font-size: 22px; color: var(--c-text); font-weight: 500;
  line-height: 1.2; margin-bottom: 4px;
}
.transfer-note {
  font-size: 12px; color: var(--c-sub); line-height: 1.5;
  padding-right: 36px; word-break: break-word;
}
.transfer-visa {
  position: absolute; right: 12px; bottom: 10px;
  font-size: 22px; color: var(--c-hint); opacity: 0.6; line-height: 1;
}
.transfer-actions { display: flex; border-top: 1px solid var(--c-border); }
.transfer-btn {
  flex: 1; padding: 10px 0; font-size: 13px; font-family: var(--font);
  background: none; border: none; cursor: pointer; transition: background var(--dur); color: var(--c-sub);
}
.transfer-btn:first-child { border-right: 1px solid var(--c-border); }
.transfer-btn.accept { color: #4caf87; font-weight: 400; }
.transfer-btn:active { background: var(--c-surface); }

/* ===== 微信式居中系统提示 ===== */
.msg-row.msg-system {
  justify-content: center; padding: 4px 0;
}
.wc-system-tip {
  font-size: 12px; color: var(--c-hint); text-align: center;
  padding: 4px 10px; line-height: 1.5;
}

/* ===== 表情包 ===== */
.msg-sticker { display: inline-flex; }
.sticker-box {
  background: var(--c-surface); border-radius: var(--r-md);
  padding: 16px; text-align: center; min-width: 100px;
}
.sticker-icon { font-size: 48px; line-height: 1; display: block; }
.sticker-name { font-size: 11px; color: var(--c-hint); margin-top: 4px; }
.sticker-img {
  max-width: 120px; max-height: 120px;
  width: auto; height: auto;
  object-fit: contain;
  border-radius: var(--r-sm);
  background: transparent;
}

/* ===== 引用回复 ===== */
.quote-ref {
  background: var(--c-surface); border-radius: 6px;
  padding: 6px 10px; font-size: 12px; color: var(--c-sub);
}
.quote-ref-self  { border: 1px solid var(--c-rose); }
.quote-ref-other { border: 1px solid var(--c-border-m); }
.quote-ref-name { font-weight: 500; }


/* ===== 撤回消息 ===== */
.msg-recall-row { text-align: center; padding: 4px 0; }
.recall-tip { font-size: 12px; color: var(--c-hint); }
.recall-view { font-size: 12px; color: var(--c-accent); cursor: pointer; margin-left: 4px; }
.recalled-popup {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
  background: var(--c-bg); border-radius: var(--r-md); padding: 16px 20px;
  max-width: 280px; width: 80%; box-shadow: var(--shadow-lg); z-index: 900; text-align: left;
}
.recalled-label { font-size: 13px; color: var(--c-sub); margin-bottom: 8px; }
.recalled-content { font-size: 14px; color: var(--c-text); line-height: 1.6; }

/* ===== 位置卡片 ===== */
.location-card {
  background: var(--c-bg); border: 1px solid var(--c-border);
  border-radius: var(--r-md); overflow: hidden; min-width: 180px;
}
.location-header {
  padding: 10px 12px; display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--c-sub);
}
.location-place { font-size: 14px; color: var(--c-text); padding: 0 12px; }
.location-dist { font-size: 11px; color: var(--c-sub); padding: 4px 12px 10px; }

/* ===== 聊天设置页 ===== */
.cs-scroll {
  flex: 1; overflow-y: auto; padding: 12px 16px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 12px;
}
.cs-section {
  background: var(--c-bg); border-radius: var(--r-md); padding: 16px;
  display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow-sm);
}
.cs-section-label {
  font-size: 12px; font-weight: 500; color: var(--c-sub);
  letter-spacing: 0.04em; text-transform: uppercase;
}
.cs-section-sub { font-size: 12px; color: var(--c-hint); margin-top: -6px; }
.cs-lore-list { display: flex; flex-direction: column; gap: 2px; }
.cs-lore-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 0;
  border-bottom: 1px solid var(--c-border); cursor: pointer;
}
.cs-lore-row:last-child { border-bottom: none; }
.cs-lore-check { width: 18px; height: 18px; accent-color: var(--c-accent); flex-shrink: 0; }
.cs-lore-info { flex: 1; }
.cs-lore-name { font-size: 14px; color: var(--c-text); display: block; }
.cs-lore-meta { font-size: 11px; color: var(--c-hint); }
.cs-save-lore {
  width: 100%; background: var(--c-accent); color: #fff; font-family: var(--font); font-size: 14px;
}
.cs-empty { font-size: 13px; color: var(--c-hint); text-align: center; padding: 16px 0; }
.cs-action-row {
  display: flex; align-items: center; gap: 14px; padding: 12px 4px;
  border-bottom: 1px solid var(--c-border); font-size: 14px; color: var(--c-text);
  font-family: var(--font); background: none;
  border-left: none; border-right: none; border-top: none;
  width: 100%; cursor: pointer; text-align: left; transition: background var(--dur);
}
.cs-action-row:last-of-type { border-bottom: none; }
.cs-action-row i:first-child { color: var(--c-accent); width: 20px; text-align: center; }
.cs-action-row span { flex: 1; }
.cs-arrow { color: var(--c-border-m) !important; font-size: 14px !important; }
.cs-action-row:active { background: var(--c-surface); }
.cs-danger { color: var(--c-red) !important; }
.cs-danger i:first-child { color: var(--c-red) !important; }

/* 外观设置 - 滑块行 */
.cs-slider-row {
  display: flex; flex-direction: column; gap: 6px; padding: 6px 0;
  border-bottom: 1px solid var(--c-border);
}
.cs-slider-row:last-of-type { border-bottom: none; }
.cs-slider-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 14px; color: var(--c-text);
}
.cs-slider-value {
  font-size: 12px; color: var(--c-sub); font-variant-numeric: tabular-nums;
  min-width: 36px; text-align: right;
}
.cs-slider {
  -webkit-appearance: none; appearance: none; width: 100%; height: 4px;
  background: var(--c-border); border-radius: var(--r-pill); outline: none;
  cursor: pointer; padding: 0;
}
.cs-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px; border-radius: 50%; background: var(--c-accent);
  cursor: pointer; border: 2px solid var(--c-bg); box-shadow: var(--shadow-sm);
}
.cs-slider::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%; background: var(--c-accent);
  cursor: pointer; border: 2px solid var(--c-bg); box-shadow: var(--shadow-sm);
}
.cs-appearance-preview {
  display: flex; align-items: center; gap: 10px; padding: 10px 0 4px;
  font-size: 12px; color: var(--c-sub);
}
.cs-appearance-preview .msg-avatar { flex-shrink: 0; }

/* ===== 加载/空状态 ===== */
.list-loading { text-align: center; padding: 40px 0; color: var(--c-hint); font-size: 18px; }
.list-empty { text-align: center; color: var(--c-hint); font-size: 13px; padding: 20px 0; }
.char-type-tag {
  font-size: 10px; padding: 2px 8px; border-radius: var(--r-pill);
  background: var(--c-surface); color: var(--c-sub);
}
.tag-char { background: var(--c-accent-light); color: var(--c-accent-dark); }
.tag-npc { background: var(--c-surface-2); color: var(--c-sub); }
.sheet-title { font-size: 16px; font-weight: 500; padding: 4px 16px 12px; }
.sheet-actions { padding: 8px 16px 16px; }
.btn-full { width: 100%; }

/* ===== 微信居中弹窗（替代底部 sheet） ===== */
.wc-center-modal {
  z-index: 201;
}
.wc-center-modal .sheet-handle { display: none; }
.wc-center-modal .sheet-title {
  text-align: center;
  padding: 4px 20px 14px;
}
.wc-center-modal .sheet-actions {
  padding: 4px 20px 16px;
  display: flex; gap: 10px;
}
/* 弹窗内可滚动容器：限制高度，避免溢出屏幕 */
.wc-center-modal .group-member-select,
.wc-center-modal .af-pick-list,
.wc-center-modal .cs-lore-list,
.wc-center-modal .wc-scroll-area {
  max-height: 50vh;
}
/* 输入区域统一外边距，避免贴边 */
.wc-center-modal .input-field { font-size: 14px; }

/* ===== 角色心声历史 ===== */
.thoughts-history-modal .thought-list {
  max-height: 50vh; overflow-y: auto;
  padding: 0 20px;
  display: flex; flex-direction: column; gap: 10px;
}
.thoughts-history-modal .thought-item {
  background: var(--c-surface);
  border-radius: var(--r-md);
  padding: 10px 14px;
  display: flex; flex-direction: column; gap: 4px;
}
.thoughts-history-modal .thought-time {
  font-size: 11px; color: var(--c-hint);
}
.thoughts-history-modal .thought-text {
  font-size: 14px; color: var(--c-text);
  line-height: 1.7; font-style: italic;
}
.thoughts-history-modal .thought-empty {
  padding: 30px 20px; text-align: center;
  color: var(--c-sub); font-size: 14px; line-height: 1.8;
}
.thoughts-history-modal .thought-empty-sub {
  font-size: 12px; color: var(--c-hint);
}

/* ===== 表情包库管理页 ===== */
.sticker-library-page { display: flex; flex-direction: column; }
.sl-tabs {
  display: flex; gap: 6px; padding: 10px 16px;
  overflow-x: auto; flex-shrink: 0;
  border-bottom: 1px solid var(--c-border);
  background: var(--c-bg);
}
.sl-tabs::-webkit-scrollbar { display: none; }
.sl-tab {
  padding: 6px 14px; border-radius: var(--r-pill);
  background: var(--c-surface); color: var(--c-sub);
  font-size: 13px; white-space: nowrap; flex-shrink: 0;
  transition: all var(--dur);
}
.sl-tab.active { background: var(--c-accent); color: #fff; }
.sl-content {
  flex: 1; overflow-y: auto; padding: 16px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
  background: var(--c-surface);
}
.sl-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
.sl-tile {
  position: relative;
  background: var(--c-bg); border-radius: var(--r-md);
  padding: 6px; aspect-ratio: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px;
  box-shadow: var(--shadow-sm);
  cursor: pointer; transition: transform var(--dur);
  overflow: hidden;
}
.sl-tile:active { transform: scale(0.96); }
.sl-tile img {
  width: 100%; flex: 1; min-height: 0;
  object-fit: contain; border-radius: var(--r-sm);
}
.sl-tile-name {
  font-size: 10px; color: var(--c-sub);
  max-width: 100%; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.sl-tile-add {
  border: 1px dashed var(--c-border-m);
  background: transparent; color: var(--c-hint);
  box-shadow: none;
}
.sl-tile-add i { font-size: 28px; }

.sl-empty {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 14px;
  padding: 60px 20px; color: var(--c-hint);
}
.sl-empty-icon { font-size: 56px; color: var(--c-border-m); }
.sl-empty-text { font-size: 13px; }

/* ===== 表情包导入弹窗 ===== */
.si-field-label {
  font-size: 12px; color: var(--c-sub);
  letter-spacing: 0.04em; text-transform: uppercase;
}
.si-source-row { display: flex; gap: 10px; }
.si-src-btn {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; gap: 6px;
  padding: 14px 6px;
  background: var(--c-surface);
  border-radius: var(--r-md);
  color: var(--c-accent);
  font-family: var(--font); font-size: 12px;
  border: none; cursor: pointer;
  transition: background var(--dur);
}
.si-src-btn i { font-size: 20px; }
.si-src-btn:active { background: var(--c-surface-2); }

.si-preview {
  display: flex; flex-direction: column; gap: 8px;
  max-height: 36vh; overflow-y: auto;
  padding: 8px; background: var(--c-surface);
  border-radius: var(--r-sm);
}
.si-row {
  display: flex; align-items: center; gap: 8px;
  padding: 4px;
}
.si-thumb {
  width: 40px; height: 40px; flex-shrink: 0;
  object-fit: cover; border-radius: var(--r-sm);
  background: var(--c-bg);
}
.si-name-input {
  flex: 1; padding: 6px 10px; font-size: 13px;
  background: var(--c-bg);
}
.si-row-del {
  width: 28px; height: 28px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: transparent;
  color: var(--c-hint); border: none; cursor: pointer;
  font-size: 12px;
}
.si-row-del:active { background: var(--c-surface-2); color: var(--c-red); }

/* ===== 聊天内表情包选择器 ===== */
.sticker-picker {
  padding: 0 16px 8px;
  display: flex; flex-direction: column; gap: 10px;
}
.sp-tabs {
  display: flex; gap: 6px;
  overflow-x: auto; flex-shrink: 0;
  padding-bottom: 2px;
}
.sp-tabs::-webkit-scrollbar { display: none; }
.sp-tab {
  padding: 5px 12px; border-radius: var(--r-pill);
  background: var(--c-surface); color: var(--c-sub);
  font-size: 12px; white-space: nowrap; flex-shrink: 0;
  transition: all var(--dur);
}
.sp-tab.active { background: var(--c-accent); color: #fff; }
.sp-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  max-height: 38vh; overflow-y: auto;
  padding: 4px 2px;
}
.sp-tile {
  aspect-ratio: 1;
  background: var(--c-surface); border-radius: var(--r-md);
  padding: 6px; cursor: pointer; border: none;
  display: flex; align-items: center; justify-content: center;
  transition: transform var(--dur);
  overflow: hidden;
}
.sp-tile:active { transform: scale(0.94); }
.sp-tile img {
  max-width: 100%; max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;
  border-radius: var(--r-sm);
}
.sp-empty {
  font-size: 13px; color: var(--c-hint);
  text-align: center; padding: 36px 12px;
}
