/* wechat.css — 微信模拟样式 */
/* Instagram-like minimal grayscale */

/* ===== 微信主页布局 ===== */
.wechat-main {
  display: flex; flex-direction: column;
  background: var(--c-bg);
  min-height: 0;
}

/* 顶部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;
  position: relative;
}
.wechat-title-big {
  font-size: 28px; font-weight: 800; letter-spacing: -0.5px;
  cursor: pointer; user-select: none; color: var(--c-text);
}

/* 玻璃按钮共用效果 */
.wechat-glass-circle {
  position: absolute; left: 12px;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: var(--c-text); font-size: 18px; z-index: 10;
  background: linear-gradient(160deg, rgba(255,255,255,0.85) 0%, rgba(210,210,210,0.25) 100%);
  backdrop-filter: blur(16px) saturate(1.35);
  -webkit-backdrop-filter: blur(16px) saturate(1.35);
  border: 0.5px solid rgba(0, 0, 0, 0.07);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.03),
    inset 0 1px 0 rgba(255,255,255,0.9), inset 0 -0.5px 0 rgba(0,0,0,0.04);
}
.wechat-glass-circle:active { background: rgba(200, 200, 200, 0.35); }
.wechat-glass-circle i { line-height: 1; display: flex; align-items: center; }

.wechat-header-pill {
  position: absolute; right: 12px;
  display: flex; align-items: center;
  height: 36px;
  border-radius: 8px;
  padding: 0 2px;
  background: #fff;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.035),
    inset 1px 1px 0 0 rgba(255, 255, 255, 0.55),
    inset -1px -1px 0 0 rgba(255, 255, 255, 0.2),
    0 2px 8px rgba(0, 0, 0, 0.025);
}
.wechat-header-pill .btn-icon {
  width: 36px; height: 36px;
  border-radius: 6px; background: transparent;
  color: var(--c-text); font-size: 18px;
}
.wechat-header-pill .btn-icon i { line-height: 1; display: flex; align-items: center; }
.wechat-header-pill .btn-icon:active { background: rgba(0, 0, 0, 0.035); }
.wechat-pill-divider {
  width: 0.5px; height: 18px;
  background: rgba(0, 0, 0, 0.06); flex-shrink: 0;
}

/* 内容区 */
.wechat-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  background: var(--c-bg);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  transform: translateZ(0);
  contain: layout paint;
}

/* 底部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;
}
html.has-android-bottom-inset .wechat-tabs {
  padding-bottom: calc(env(safe-area-inset-bottom) + var(--android-bottom-inset));
}
.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.active { color: var(--c-text); }
.wechat-tab-icon {
  display: block;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

/* ===== 搜索栏 ===== */
.wechat-search-bar {
  max-height: 0; overflow: hidden; background: var(--c-bg);
  transition: max-height 0.25s var(--ease);
}
.wechat-search-bar.open { max-height: 52px; }
.wechat-search-wrap {
  display: flex; align-items: center; gap: 8px; padding: 8px 16px;
}
.wechat-search-field {
  flex: 1; height: 32px; border: 1px solid var(--c-border); border-radius: 8px;
  padding: 0 12px; background: var(--c-surface); display: flex; align-items: center; gap: 8px;
  transition: border-color var(--dur);
}
.wechat-search-field:focus-within { border-color: var(--c-accent); }
.wechat-search-icon {
  font-size: 14px; color: var(--c-hint); flex-shrink: 0;
  display: flex; align-items: center; line-height: 1;
}
.wechat-search-input {
  flex: 1; min-width: 0; height: 100%; border: 0; padding: 0; font-size: 14px;
  background: transparent; color: var(--c-text); outline: none;
}
.wechat-search-cancel {
  font-size: 14px; color: var(--c-accent); white-space: nowrap; flex-shrink: 0;
}

/* 搜索结果 */
.wechat-search-results {
  flex: 1; min-height: 0; overflow-y: auto; background: var(--c-bg);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  transform: translateZ(0);
  contain: layout paint;
}
.wechat-search-results[style*="display: none"] { pointer-events: none; }
.wechat-search-section-title {
  font-size: 12px; color: var(--c-hint); padding: 12px 16px 4px; font-weight: 500;
}
.wechat-search-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 16px;
  border-bottom: 1px solid var(--c-border); cursor: pointer;
}
.wechat-search-item:active { background: var(--c-surface); }
.wechat-search-item-avatar {
  width: 40px; height: 40px; border-radius: 6px; overflow: hidden; flex-shrink: 0;
}
.wechat-search-item-avatar img { width: 100%; height: 100%; object-fit: cover; }
.wechat-search-item-avatar .avatar-icon-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: var(--c-surface); color: var(--c-hint); font-size: 18px;
}
.wechat-search-item-info { flex: 1; min-width: 0; }
.wechat-search-item-name { font-size: 15px; }
.wechat-search-item-msg {
  font-size: 12px; color: var(--c-sub); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; margin-top: 2px;
}
.wechat-search-empty {
  text-align: center; color: var(--c-hint); font-size: 14px; padding: 40px 16px;
}

/* ===== 聊天列表行 ===== */
.chat-log-shell {
  padding: 18px 20px 28px;
}
.chat-compose-card {
  margin: 0 0 18px;
  background: #fff;
  border-radius: 8px;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.035),
    inset 1px 1px 0 0 rgba(255, 255, 255, 0.55),
    inset -1px -1px 0 0 rgba(255, 255, 255, 0.2),
    0 2px 8px rgba(0, 0, 0, 0.025);
}
.chat-compose-input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  padding: 12px 18px;
  color: #8d8d8d;
  font-size: 15px;
  font-weight: 400;
  font-family: var(--font);
}
.chat-compose-input::placeholder { color: #8d8d8d; opacity: 1; }
.chat-group-tabs {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 8px 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.chat-group-tabs::-webkit-scrollbar { display: none; }
.chat-group-tab,
.chat-group-add {
  flex: 0 0 auto;
  color: #909090;
  font-size: 14px;
  font-weight: 400;
  white-space: nowrap;
  padding: 4px 0;
}
.chat-group-tab.active {
  color: #171717;
  font-weight: 600;
}
.chat-group-add {
  color: #909090;
}
.chat-pinned-wrap,
.chat-list-card,
.chat-empty-card {
  position: relative;
  overflow: hidden;
  background: #fff;
  border-radius: 8px;
  box-shadow:
    inset 1px 1px 0 0 rgba(255, 255, 255, 0.55),
    inset -1px -1px 0 0 rgba(255, 255, 255, 0.2),
    0 2px 8px rgba(0, 0, 0, 0.025);
}
.chat-pinned-wrap::after,
.chat-list-card::after,
.chat-empty-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.035);
  pointer-events: none;
  z-index: 4;
}
.chat-pinned-wrap {
  margin: 0 0 18px;
}
.chat-empty-card {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 26px 16px;
}
.chat-empty-card .list-empty {
  padding: 0;
}
.chat-swipe-item {
  position: relative;
  overflow: hidden;
  background: #fff;
}
.chat-pin-action {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #202020;
  color: #fff;
  font-size: 13px;
  font-weight: 650;
  z-index: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s var(--ease);
}
.chat-swipe-item.is-open .chat-pin-action {
  opacity: 1;
  pointer-events: auto;
}
.chat-list-row {
  display: flex; align-items: center; padding: 12px 16px; gap: 12px;
  border-bottom: none; cursor: pointer;
  background: var(--c-bg); transition: background var(--dur), transform 0.2s var(--ease);
  contain: layout paint;
  position: relative;
  z-index: 1;
}
.chat-swipe-item.is-open .chat-list-row {
  transform: translateX(-86px);
}
.chat-list-row:active { background: var(--c-surface); }
.chat-avatar {
  position: relative; width: 48px; height: 48px; border-radius: 4px;
  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;
}
.avatar-text-placeholder {
  font-weight: 500;
}

/* 未读角标 */
.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;
  position: relative;
}
.chat-swipe-item + .chat-swipe-item::before {
  content: '';
  position: absolute;
  left: 76px;
  right: 16px;
  top: 0;
  height: 1px;
  background: var(--c-border);
  z-index: 2;
}
.chat-row-top { display: flex; justify-content: space-between; align-items: baseline; }
.chat-row-name { font-size: 15px; color: var(--c-text); }
.chat-pin-mark {
  margin-right: 5px;
  font-size: 11px;
  color: #a0a0a0;
}
.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-group-modal-body {
  padding: 0 20px 12px;
}

/* ===== 聊天窗口 ===== */
.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; min-width: 0;
  display: flex; flex-direction: column; justify-content: center;
}
.chat-header-name { font-size: 16px; font-weight: 400; display: block; }
.chat-header-status {
  display: none; align-items: center; gap: 5px;
  margin-top: 2px; font-size: 11px; line-height: 1.2;
  color: var(--c-hint);
}
.chat-header-info.has-status .chat-header-status { display: flex; }
.chat-status-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--c-hint); opacity: 0.75; flex-shrink: 0;
}
.chat-status-text {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chat-header-sub { font-size: 11px; color: var(--c-sub); }
.chat-header.is-multi-selecting > :not(.chat-multi-select-header) {
  display: none !important;
}
.chat-multi-select-header {
  width: 100%; min-height: 40px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.chat-multi-header-btn {
  min-width: 48px; height: 34px;
  color: var(--c-text); font-size: 14px;
}
.chat-multi-delete {
  color: var(--c-red);
}
.chat-multi-delete:disabled {
  color: var(--c-hint); opacity: 0.55;
}
.chat-multi-header-title {
  flex: 1; text-align: center;
  color: var(--c-text); font-size: 15px; font-weight: 500;
}

/* 消息区域 */
.chat-messages {
  flex: 1; min-height: 0; overflow-y: auto; padding: 12px 16px;
  display: flex; flex-direction: column; gap: 12px; background: var(--c-surface);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  transform: translateZ(0);
  contain: layout paint;
}
.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; }
.chat-window-page.is-multi-selecting .chat-input-area {
  pointer-events: none;
  opacity: 0.45;
}
.chat-window-page.is-multi-selecting .msg-row[data-id] {
  position: relative;
  padding-left: 28px;
  cursor: pointer;
}
.chat-window-page.is-multi-selecting .msg-row.msg-system {
  padding-left: 28px;
  padding-right: 28px;
}
.msg-select-control {
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.2); background: transparent;
  display: flex; align-items: center; justify-content: center;
  color: transparent; font-size: 10px;
}
.msg-row.is-selected .msg-select-control {
  background: var(--c-text);
  border-color: var(--c-text);
  color: #fff;
}
.msg-time-center-row {
  justify-content: center;
  padding: 2px 0;
}
.msg-time-center {
  font-size: calc(var(--font-size-body) - 2px);
  line-height: 1.35;
  color: #727272;
  background: rgba(255,255,255,0.86);
  border: 1px solid var(--c-border-m);
  border-radius: 4px;
  padding: 3px 8px;
  font-variant-numeric: tabular-nums;
}
.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;
}
.msg-bubble:not(.voice-bubble):not(.typing-dots) {
  font-size: var(--font-size-body);
  letter-spacing: var(--letter-spacing-body);
}
.bubble-self { background: var(--c-rose); color: #fff; }
.bubble-other {
  background: var(--c-bg); color: var(--c-text);
}
.wechat-bilingual-message {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 100%;
  align-items: flex-start;
}
.msg-self .wechat-bilingual-message {
  align-items: flex-end;
}
.wechat-bilingual-source {
  cursor: pointer;
}
.wechat-translation-card {
  min-width: min(176px, 66vw);
  max-width: min(280px, 72vw);
  padding: 10px 12px 9px;
  border-radius: 6px;
  background: #fff;
  color: #1d1d1f;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  box-sizing: border-box;
}
.wechat-translation-text {
  font-size: var(--font-size-body);
  line-height: 1.6;
  font-weight: inherit;
  letter-spacing: var(--letter-spacing-body);
  word-break: break-word;
  white-space: pre-wrap;
}
.wechat-translation-provider {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  color: #b0b0b0;
  font-size: calc(var(--font-size-body) - 3px);
  font-weight: 400;
  line-height: 1.2;
  white-space: nowrap;
}
.wechat-translation-check {
  width: calc(var(--font-size-body) - 3px);
  height: calc(var(--font-size-body) - 3px);
  border-radius: 50%;
  background: #b8b8b8;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: calc(var(--font-size-body) - 5px);
  font-weight: 400;
}
.msg-time-beside-wrap {
  max-width: 100%;
  display: flex;
  align-items: flex-end;
  gap: 5px;
}
.msg-time-mode-beside.msg-self .msg-time-beside-wrap { justify-content: flex-end; }
.msg-time-mode-beside.msg-other .msg-time-beside-wrap { justify-content: flex-start; }
.msg-bubble-time {
  flex-shrink: 0;
  font-size: 10px;
  line-height: 1.2;
  color: var(--c-hint);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  user-select: none;
}
.msg-text-bubble-with-time {
  display: block;
}
.msg-text-spacer {
  display: inline-block;
  width: 2px;
}
.msg-bubble-time-inside {
  display: inline-block;
  vertical-align: baseline;
  pointer-events: none;
}
.msg-bubble-time-inside.is-self {
  color: rgba(255,255,255,0.74);
}
.msg-bubble-time-inside.is-other {
  color: var(--c-hint);
}

/* 群聊发送者名 */
.msg-group-wrap { display: flex; flex-direction: column; }
.msg-self .msg-group-wrap { align-items: flex-end; }
.msg-other .msg-group-wrap { align-items: flex-start; }
.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-area {
  display: flex; flex-direction: column;
  background: var(--c-bg); flex-shrink: 0;
}

.quote-compose {
  align-items: center; justify-content: space-between; gap: 10px;
  margin: 8px 14px 0;
  padding: 8px 10px;
  border-left: 3px solid var(--c-accent);
  border-radius: 6px;
  background: var(--c-surface);
  color: var(--c-sub);
}
.quote-compose-line {
  min-width: 0; display: flex; align-items: center; gap: 4px;
  font-size: 12px; line-height: 1.4;
}
.quote-compose-name { flex-shrink: 0; font-weight: 600; color: var(--c-text); }
.quote-compose-name::after { content: "："; }
.quote-compose-text {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.quote-compose-close {
  width: 24px; height: 24px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; color: var(--c-hint); cursor: pointer;
}
.quote-compose-close:active { background: var(--c-border-m); color: var(--c-text); }

.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;
}
html.has-android-bottom-inset .chat-input-bar {
  padding-bottom: calc(8px + env(safe-area-inset-bottom) + var(--android-bottom-inset));
}

/* 左侧魔法棒回复按钮 */
.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: background 0.18s var(--ease), color 0.18s var(--ease), transform 0.18s var(--ease);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
.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: color 0.15s, background 0.15s, transform 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(0, 0, 0, 0.18);
}
.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); }
.msg-context-menu.msg-action-menu {
  display: flex;
  flex-wrap: wrap;
  width: 230px;
  border-radius: 10px;
}
.msg-context-menu.msg-action-menu button {
  width: 46px; min-width: 46px; height: 56px;
  flex-direction: column; justify-content: center; gap: 4px;
  padding: 10px 6px;
  border-bottom: none;
  font-size: 10px; line-height: 1.1;
}
.msg-context-menu.msg-action-menu button i {
  font-size: 14px; line-height: 1;
}
.msg-context-menu.msg-action-menu button span {
  display: block; white-space: nowrap;
}
.msg-context-menu.msg-action-menu .msg-menu-line-break {
  flex-basis: 100%;
  width: 0;
  height: 0;
}
.msg-context-menu.msg-action-menu .msg-menu-break {
  margin-left: 0;
}

.edit-msg-body {
  padding: 0 20px 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.edit-msg-types {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.edit-msg-type {
  min-width: 0;
  height: 52px;
  border-radius: 8px;
  background: var(--c-surface);
  color: var(--c-sub);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 11px;
}
.edit-msg-type i { font-size: 15px; }
.edit-msg-type.active {
  background: var(--c-accent);
  color: #fff;
}
.edit-msg-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.edit-msg-fields textarea.input-field {
  min-height: 92px;
  resize: vertical;
}

.msg-bubble,
.quote-ref,
.voice-bubble,
.msg-card,
.msg-real-photo,
.msg-sticker {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}

/* ===== 通讯录 ===== */
.contacts-story-rail {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 16px 16px 13px;
  background: var(--c-bg);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.contacts-story-rail::-webkit-scrollbar { display: none; }
.contacts-story-item {
  width: 72px;
  flex: 0 0 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0;
  color: var(--c-text);
  text-align: center;
  cursor: pointer;
}
.contacts-story-avatar-shell {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  box-shadow: inset 0 0 0 2px var(--c-surface-2);
}
.contacts-story-item.is-self .contacts-story-avatar-shell {
  background: #fff;
  box-shadow: 0 0 0 4px #fff;
}
.contacts-story-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-surface-2);
  color: var(--c-sub);
  font-size: 18px;
  font-weight: 500;
}
.contacts-story-item.is-self .contacts-story-avatar {
  width: 64px;
  height: 64px;
}
.contacts-story-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.contacts-story-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.contacts-story-add {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #252a31;
  color: #fff;
  font-size: 11px;
  border: 4px solid #fff;
  box-sizing: content-box;
}
.contacts-story-name {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.25;
}
.contacts-story-item:not(.is-self) .contacts-story-name {
  color: var(--c-sub);
  font-weight: 400;
}
.contacts-search-wrap {
  padding: 0 16px; background: var(--c-bg);
}
.contacts-search-field {
  height: 36px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  background: #f5f5f5;
  border-radius: 8px;
}
.contacts-search-icon {
  color: #b9b9b9;
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.contacts-search-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  padding: 0;
  background: transparent;
  color: var(--c-text);
  font-size: 14px;
  font-weight: 400;
  font-family: var(--font);
}
.contacts-search-input::placeholder {
  color: #b9b9b9;
  opacity: 1;
}
.contacts-scan-btn {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7f7f7f;
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
}
.contacts-search-icon::before,
.contacts-scan-btn i::before {
  display: block;
  line-height: 1;
}
.contacts-scan-btn:active { color: var(--c-text); }
.contacts-list {
  padding: 14px 20px 28px;
}
.contact-add-card,
.contacts-section-card,
.contacts-empty-card {
  position: relative;
  overflow: hidden;
  background: #fff;
  border-radius: 8px;
  box-shadow:
    inset 1px 1px 0 0 rgba(255, 255, 255, 0.55),
    inset -1px -1px 0 0 rgba(255, 255, 255, 0.2),
    0 2px 8px rgba(0, 0, 0, 0.025);
}
.contact-add-card::after,
.contacts-section-card::after,
.contacts-empty-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.035);
  pointer-events: none;
}
.contacts-list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 4px 0;
}
.contacts-total {
  min-width: 0;
  color: #171717;
  font-size: 15px;
  font-weight: 650;
  white-space: nowrap;
}
.contacts-sort-btn {
  flex-shrink: 0;
  height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border-radius: 8px;
  background: #fff;
  color: #6f6f6f;
  font-size: 13px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}
.contacts-sort-btn i {
  font-size: 11px;
  color: #a0a0a0;
}
.contacts-sort-btn:active { background: #f5f5f5; }
.contacts-section {
  margin-top: 14px;
}
.contacts-section-title {
  padding: 0 4px 8px;
  color: #909090;
  font-size: 14px;
  font-weight: 500;
}
.contacts-empty-card {
  margin-top: 14px;
  padding: 26px 16px;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.contacts-empty-card .list-empty {
  padding: 0;
}
.contact-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  border-bottom: none; cursor: pointer;
  background: var(--c-bg);
  position: relative;
}
.contacts-section-card .contact-row + .contact-row::before {
  content: '';
  position: absolute;
  left: 76px;
  right: 16px;
  top: 0;
  height: 1px;
  background: var(--c-border);
}
.contact-info { flex: 1; min-width: 0; }
.contact-name {
  font-size: 15px;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.contact-nick {
  font-size: 12px;
  color: var(--c-sub);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contacts-letter-header {
  display: none;
  padding: 6px 16px; font-size: 13px; font-weight: 500;
  color: var(--c-sub); background: var(--c-surface);
}

/* 通讯录顶部"添加好友"行 */
.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;
}
.contacts-sort-picker {
  padding-bottom: 16px;
}

/* ===== 添加好友弹窗 ===== */
.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); }

/* ===== 发现页 ===== */
.discover-menu { padding-top: 12px; }
.discover-group { margin-top: 10px; background: var(--c-bg); }
.discover-group:first-child { margin-top: 0; }
.discover-row {
  min-height: 56px;
  display: flex; align-items: center; gap: 13px; padding: 0 16px;
  background: var(--c-bg); border-bottom: 1px solid rgba(0,0,0,0.04);
  color: var(--c-text); cursor: pointer; transition: background var(--dur);
}
.discover-row:active { background: var(--c-surface); }
.discover-row:active .discover-icon { background: #eeeeee; }
.discover-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: #f7f7f7; color: #9a9a9a; flex-shrink: 0;
}
.discover-icon svg { width: 16px; height: 16px; }
.discover-label {
  flex: 1; min-width: 0; text-align: left;
  font-size: 14px; font-weight: 400; color: #202020;
}
.discover-arrow { color: #9c9c9c; font-size: 15px; flex-shrink: 0; }

/* ===== 朋友圈 ===== */
.wechat-moments-page .moments-scroll {
  flex: 1; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.moments-page {
  position: relative;
  background: var(--c-bg);
}
.moments-nav-btn {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  color: currentColor; line-height: 1;
  border-radius: 50%;
  transition: background var(--dur);
}
.moments-nav-btn:active { background: rgba(0, 0, 0, 0.06); }
.moments-nav-btn i { font-size: 22px; }
.moments-camera-icon {
  width: 24px; height: 24px;
  display: block;
  fill: currentColor;
}
.moments-ellipsis-icon {
  width: 24px; height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  line-height: 1;
}
.moments-hero {
  position: relative;
  background: var(--c-bg);
}
.moments-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 1;
  display: block;
  background: linear-gradient(135deg, #ffffff 0%, #eeeeee 100%);
  background-size: cover;
  background-position: center center;
  border: none;
  cursor: pointer;
}
.moments-cover::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0) 63%,
    rgba(255,255,255,0.18) 74%,
    rgba(255,255,255,0.56) 88%,
    var(--c-bg) 100%
  );
  pointer-events: none;
}
.moments-profile {
  position: relative;
  padding: 0 30px 10px;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  background: var(--c-bg);
  z-index: 5;
}
.moments-profile-name {
  max-width: 100%;
  margin-top: 8px;
  color: #232323;
  font-size: 17px;
  font-weight: 550;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.moments-profile-avatar {
  width: 88px; height: 88px;
  margin-top: -44px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--c-surface-2);
  border: 3px solid #fff;
  box-shadow: 0 4px 10px rgba(0,0,0,0.04);
  color: var(--c-sub);
  font-size: 24px;
  font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.moments-profile-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.moments-profile-account {
  max-width: 100%;
  margin-top: 4px;
  color: #9a9a9a;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.moments-profile-bio {
  max-width: 100%;
  margin-top: 6px;
  color: #6e6e6e;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.moments-pinned {
  width: 100%;
  margin-top: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.moments-pinned-item {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--c-surface);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.04);
  display: flex;
  align-items: center;
  justify-content: center;
}
.moments-pinned-item img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.moments-pinned-text {
  padding: 7px;
  color: var(--c-text);
  font-size: 11px;
  line-height: 1.35;
  text-align: left;
  word-break: break-word;
}
.moments-pinned-text span {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.moments-ai-loading {
  width: 100%;
  min-height: 24px;
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.moments-ai-loading[hidden] {
  display: none;
}
.moments-ai-loading span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #9a9a9a;
  animation: momentsDots 1s infinite ease-in-out;
}
.moments-ai-loading span:nth-child(2) { animation-delay: 0.16s; }
.moments-ai-loading span:nth-child(3) { animation-delay: 0.32s; }
@keyframes momentsDots {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.35; }
  40% { transform: translateY(-5px); opacity: 1; }
}
.contact-moments-editor {
  padding: 0 20px 4px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.contact-moments-cover-preview {
  width: 100%;
  aspect-ratio: 2 / 1;
  margin: 8px 0 10px;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff 0%, #eeeeee 100%);
  background-size: cover;
  background-position: center center;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06);
}
.moments-list { padding: 6px 16px 16px; }
.moment-card {
  position: relative;
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--c-border);
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.moment-avatar {
  width: 40px; height: 40px; border-radius: 4px; 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 {
  position: relative;
  flex: 1;
  min-width: 0;
}
.moment-card-menu {
  position: absolute;
  top: -8px;
  left: calc(50% - 26px);
  width: min(300px, calc(100vw - 48px));
  height: 34px;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -100%) scale(0.98);
  transform-origin: center bottom;
  transition: opacity 0.14s var(--ease), transform 0.14s var(--ease);
  overflow: hidden;
  z-index: 25;
}
.moment-card.show-card-menu .moment-card-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -100%) scale(1);
}
.moment-card-menu button {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0 6px;
  box-sizing: border-box;
  color: var(--c-text);
  font-size: 12px;
  text-align: center;
  white-space: nowrap;
}
.moment-card-menu button + button {
  border-left: 1px solid var(--c-border);
}
.moment-card-menu button:active {
  background: var(--c-surface);
}
.moment-card-menu-danger {
  color: var(--c-red) !important;
}
.moment-pin-limit-text {
  padding: 0 18px 8px;
  color: var(--c-sub);
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
}
.moment-name { font-size: var(--font-size-body); color: var(--c-accent-dark); margin-bottom: 4px; }
.moment-text { font-size: var(--font-size-body); color: var(--c-text); line-height: 1.6; }
.moment-imgs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 8px; }
.moment-img-btn {
  width: 100%;
  aspect-ratio: 1;
  display: block;
  padding: 0;
  border: 0;
  line-height: 0;
  font-size: 0;
  overflow: hidden;
  border-radius: var(--r-sm);
  background: transparent;
}
.moment-img-btn:active {
  opacity: 0.86;
}
.moment-imgs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.moment-mentioned {
  margin-top: 6px;
  color: var(--c-sub);
  font-size: 12px;
  line-height: 1.45;
  word-break: break-word;
}
.moment-meta-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 24px;
  margin-top: 6px;
}
.moment-meta { font-size: 12px; color: var(--c-hint); }
.moment-location-inline {
  margin-left: 8px;
  color: var(--c-sub);
}
.moment-visibility-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  color: var(--c-sub);
  font-size: 12px;
  vertical-align: baseline;
}
.moment-visibility-icon:active {
  color: var(--c-accent-dark);
}
.moment-action-wrap {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.moment-more-btn {
  width: 34px;
  height: 22px;
  border-radius: 6px;
  background: var(--c-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--c-accent-dark);
}
.moment-more-btn span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  display: block;
}
.moment-more-btn:active { background: var(--c-border); }
.moment-action-menu {
  position: absolute;
  right: 42px;
  top: 50%;
  width: min(156px, calc(100vw - 118px));
  height: 36px;
  border-radius: 6px;
  background: #555555;
  color: #f6f6f6;
  display: flex;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) translateX(8px) scale(0.98);
  transform-origin: right center;
  transition: opacity 0.16s var(--ease), transform 0.16s var(--ease);
  z-index: 20;
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
  overflow: hidden;
}
.moment-card.show-actions .moment-action-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) translateX(0) scale(1);
}
.moment-action-menu button {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: #f6f6f6;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.moment-action-menu button:active { background: rgba(255,255,255,0.08); }
.moment-action-menu i {
  font-size: 15px;
  line-height: 1;
}
.moment-action-divider {
  width: 1px;
  height: 22px;
  background: rgba(0,0,0,0.28);
  flex: 0 0 auto;
}
.moment-social {
  margin-top: 6px;
  padding: 7px 9px;
  border-radius: 4px;
  background: var(--c-surface);
  color: var(--c-accent-dark);
  font-size: var(--font-size-body);
  line-height: 1.55;
}
.moment-likes {
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 550;
  word-break: break-word;
}
.moment-likes i {
  font-size: 12px;
  color: var(--c-accent-dark);
  flex: 0 0 auto;
}
.moment-comments {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.moment-likes + .moment-comments {
  margin-top: 5px;
  padding-top: 5px;
  border-top: 1px solid rgba(0,0,0,0.04);
}
.moment-comment-row {
  position: relative;
}
.moment-comment {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 1px 0;
  margin: 0;
  width: 100%;
  text-align: left;
  font: inherit;
  color: var(--c-text);
  word-break: break-word;
  cursor: pointer;
  border-radius: 3px;
}
.moment-comment:active {
  background: rgba(0,0,0,0.05);
}
.moment-comment span {
  color: var(--c-accent-dark);
  font-weight: 550;
}
.moment-comment .moment-comment-reply-word {
  color: var(--c-text);
  font-weight: 400;
}
.moment-comment-menu {
  position: absolute;
  top: -8px;
  left: 50%;
  width: min(128px, calc(100vw - 118px));
  height: 34px;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -100%) scale(0.98);
  transform-origin: center bottom;
  transition: opacity 0.14s var(--ease), transform 0.14s var(--ease);
  overflow: hidden;
  z-index: 26;
}
.moment-comment-row.show-comment-menu .moment-comment-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -100%) scale(1);
}
.moment-comment-menu button {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0 6px;
  box-sizing: border-box;
  color: var(--c-text);
  font-size: 12px;
  text-align: center;
  white-space: nowrap;
}
.moment-comment-menu button + button {
  border-left: 1px solid var(--c-border);
}
.moment-comment-menu button:active {
  background: var(--c-surface);
}

/* ===== 发布动态 ===== */
.wechat-post-moment-page {
  background: var(--c-bg);
  display: flex;
  flex-direction: column;
}
.post-moment-topbar {
  display: grid;
  grid-template-columns: 72px 1fr 72px;
  align-items: center;
  padding: 15px 38px 12px;
  padding-top: calc(15px + env(safe-area-inset-top));
  background: var(--c-bg);
  flex-shrink: 0;
}
.post-moment-cancel {
  justify-self: start;
  color: var(--c-text);
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
}
.post-moment-title {
  min-width: 0;
  text-align: center;
  color: var(--c-text);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.post-moment-submit {
  justify-self: end;
  min-width: 54px;
  height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  background: var(--c-accent);
  color: #fff;
  font-size: 15px;
  font-weight: 650;
  line-height: 1;
  transition: transform var(--dur), opacity var(--dur), background var(--dur);
}
.post-moment-submit:active {
  transform: scale(0.96);
  opacity: 0.85;
  background: var(--c-accent-dark);
}
.post-moment-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 38px 38px 46px;
}
.post-moment-textarea {
  width: 100%;
  min-height: 112px;
  border: none;
  outline: none;
  resize: none;
  background: transparent;
  color: var(--c-text);
  font-family: var(--font);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.45;
}
.post-moment-textarea::placeholder {
  color: #bcbcbc;
}
.post-moment-media-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  max-width: 280px;
  margin-top: 16px;
}
.post-moment-preview,
.post-moment-add-img {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  background: var(--c-surface);
  overflow: hidden;
}
.post-moment-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.post-moment-remove-img {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0,0,0,0.42);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}
.post-moment-add-img {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6f6f6f;
  font-size: 30px;
  line-height: 1;
}
.post-moment-options {
  margin-top: 120px;
  border-top: 1px solid var(--c-border);
}
.post-moment-row {
  width: 100%;
  min-height: 56px;
  display: grid;
  grid-template-columns: 34px 84px 1fr 15px;
  column-gap: 8px;
  align-items: center;
  border-bottom: 1px solid var(--c-border);
  color: var(--c-text);
  text-align: left;
}
.post-moment-row > i:first-child {
  width: 24px;
  text-align: center;
  color: var(--c-text);
  font-size: 18px;
}
.post-moment-row span {
  color: var(--c-text);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}
.post-moment-row strong {
  min-width: 0;
  color: var(--c-text);
  font-size: 14px;
  font-weight: 500;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.post-moment-row > i:last-child {
  color: var(--c-hint);
  font-size: 15px;
  justify-self: end;
}
.post-moment-row:active {
  background: var(--c-surface);
}
.moment-image-source-actions {
  padding: 0 16px 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.moment-source-btn {
  min-height: 86px;
  border-radius: var(--r-md);
  background: var(--c-surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--c-text);
}
.moment-source-btn i {
  color: var(--c-accent);
  font-size: 24px;
}
.moment-source-btn span {
  font-size: 14px;
}
.moment-source-btn:active {
  background: var(--c-surface-2);
}
.post-moment-privacy-list {
  padding: 0 16px 8px;
}
.post-moment-privacy-option {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--c-border);
  color: var(--c-text);
  font-size: 15px;
}
.post-moment-privacy-option i {
  color: var(--c-accent);
  opacity: 0;
}
.post-moment-privacy-option.active i {
  opacity: 1;
}
.moment-visibility-groups {
  padding: 4px 0 6px 18px;
}
.moment-multi-select {
  max-height: min(48vh, 360px);
}
.moment-character-select {
  padding-bottom: 4px;
}
.moment-character-name {
  flex: 1;
  min-width: 0;
  color: var(--c-text);
  font-size: 14px;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.moment-character-actions {
  display: flex;
  gap: 10px;
}
.moment-character-actions > .btn-full {
  flex: 1;
  width: auto;
}
.moment-image-view {
  padding: 0 16px 4px;
}
.moment-image-view-img {
  width: 100%;
  max-height: min(58vh, 460px);
  object-fit: contain;
  display: block;
  border-radius: var(--r-md);
  background: var(--c-surface);
}
.moment-image-view .photo-view-desc {
  margin: 12px 0 0;
}
.real-image-send-view {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.real-image-desc-input {
  min-height: 86px;
  resize: vertical;
}
.wc-center-modal .real-image-send-actions > .btn-full {
  flex: 1;
  width: auto;
}
.moment-visible-group-list {
  padding: 0 20px 8px;
}
.moment-visible-group-row {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  color: var(--c-text);
  font-size: 14px;
}
.moment-visible-group-row i {
  width: 20px;
  text-align: center;
  color: var(--c-accent);
  font-size: 14px;
}

@media (max-width: 390px) {
  .post-moment-topbar {
    padding-left: 24px;
    padding-right: 24px;
  }
  .post-moment-scroll {
    padding-left: 28px;
    padding-right: 28px;
  }
  .post-moment-options {
    margin-top: 96px;
  }
}

/* ===== 我tab ===== */
.me-profile-page {
  min-height: 100%;
  padding: 12px 22px 28px;
  background: var(--c-bg);
}
.me-hero {
  padding: 0 0 18px;
}
.me-hero-top {
  display: grid;
  grid-template-columns: 80px 1fr;
  align-items: center;
  gap: 24px;
}
.me-info-stack {
  min-width: 0;
  transform: translateY(4px);
  display: flex; flex-direction: column; gap: 7px;
}
.me-avatar {
  margin-left: 10px;
  width: 76px; height: 76px; border-radius: 50%; overflow: hidden;
  background: var(--c-surface-2); display: flex; align-items: center; justify-content: center;
  color: var(--c-sub); font-size: 24px; font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.04);
}
.me-avatar img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.92); }
.me-stats {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px;
  text-align: center;
}
.me-stat {
  display: block;
  min-width: 0;
  padding: 0;
  color: inherit;
  text-align: center;
}
.me-stat strong {
  display: block; font-size: 17px; line-height: 1.1; color: #282828; font-weight: 500;
}
.me-stat span {
  display: block; margin-top: 3px; font-size: 12px; color: #9b9b9b;
}
.me-name {
  min-width: 0; max-width: calc(100% - 18px);
  margin-left: 18px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 17px; font-weight: 550; color: #232323; line-height: 1.25;
}
.me-wechat-id {
  margin-top: 10px; margin-left: 10px;
  font-size: 13px; color: #9a9a9a; line-height: 1.35;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.me-bio {
  margin-top: 4px; margin-left: 10px; color: #6e6e6e; font-size: 14px; line-height: 1.5;
  white-space: pre-wrap; word-break: break-word;
}
.me-actions {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin-top: 12px;
}
.me-action-btn {
  height: 40px; border-radius: 10px;
  background: #f4f4f4; color: #4b4b4b;
  font-size: 13px; font-weight: 600;
}
.me-action-btn:active { transform: scale(0.98); }
.me-action-primary { background: #1d1d1d; color: #fff; }
.me-menu {
  padding-top: 12px;
}
.me-menu-row {
  width: 100%;
  min-height: 56px;
  display: flex; align-items: center; gap: 13px;
  padding: 0;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  color: var(--c-text);
}
.me-menu-row:active .me-menu-icon { background: #eeeeee; }
.me-menu-row.is-danger-row { border-bottom: none; }
.me-switch-row {
  justify-content: center;
  border-bottom: none;
  color: var(--c-red);
}
.me-switch-row .me-menu-label {
  flex: 0 1 auto;
  text-align: center;
}
.me-menu-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: #f7f7f7; color: #9a9a9a; font-size: 14px;
  flex-shrink: 0;
}
.me-menu-label {
  flex: 1; min-width: 0; text-align: left;
  font-size: 14px; font-weight: 400; color: #202020;
}
.me-menu-label.is-danger { color: var(--c-red); }
.me-menu-arrow {
  color: #9c9c9c; font-size: 15px; flex-shrink: 0;
}
.me-stats-editor {
  display: flex; flex-direction: column; gap: 12px;
  padding: 0 16px 12px;
}
.me-profile-field {
  display: flex; flex-direction: column; gap: 8px;
  font-size: 13px; color: var(--c-sub);
}
.me-profile-field .input-field:disabled {
  color: var(--c-hint);
  background: var(--c-surface-2);
}
.wechat-self-profile-page {
  background: var(--c-bg);
}
.wsp-scroll {
  height: calc(100% - 57px);
  overflow-y: auto;
  padding: 28px 24px 34px;
  display: flex; flex-direction: column; gap: 16px;
}
.wsp-avatar {
  align-self: center;
  width: 112px; height: 112px; border-radius: 50%;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: var(--c-surface-2); color: var(--c-sub);
  font-size: 34px; font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.05);
  padding: 0;
  line-height: 0;
}
.wsp-avatar img { width: 100%; height: 100%; max-width: none; object-fit: cover; display: block; border-radius: inherit; }
.wsp-scroll textarea.input-field {
  min-height: 110px;
  resize: vertical;
  line-height: 1.6;
}
.wechat-favorites-page {
  background: var(--c-bg);
}
.wfp-header-spacer {
  width: 40px;
  flex-shrink: 0;
}
.wfp-list {
  height: calc(100% - 145px);
  overflow-y: auto;
  padding: 0 18px 28px;
  -webkit-overflow-scrolling: touch;
}
.wfp-search-wrap {
  padding: 0 16px 10px;
  background: var(--c-bg);
}
.wfp-category-tabs {
  display: flex;
  gap: 10px;
  padding: 0 18px 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.wfp-category-tabs::-webkit-scrollbar { display: none; }
.wfp-category-tab {
  height: 30px;
  flex: 0 0 auto;
  padding: 0 12px;
  border-radius: 8px;
  background: #fff;
  color: #6f6f6f;
  font-size: 13px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.04);
}
.wfp-category-tab.active {
  background: #202020;
  color: #fff;
}
.wfp-group {
  margin-bottom: 18px;
}
.wfp-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px 8px;
  color: #909090;
  font-size: 13px;
  font-weight: 500;
}
.wfp-group-list {
  position: relative;
  overflow: hidden;
  background: #fff;
  border-radius: 8px;
  box-shadow:
    inset 1px 1px 0 0 rgba(255,255,255,0.55),
    inset -1px -1px 0 0 rgba(255,255,255,0.2),
    0 2px 8px rgba(0,0,0,0.025);
}
.wfp-group-list::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.035);
  pointer-events: none;
}
.wfp-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 10px;
  align-items: start;
  padding: 14px 14px;
  cursor: pointer;
}
.wfp-item + .wfp-item {
  border-top: 1px solid rgba(0,0,0,0.05);
}
.wfp-item:active {
  background: #f7f7f7;
}
.wfp-item-main {
  min-width: 0;
}
.wfp-item-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.wfp-item-source {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  color: #242424;
  font-weight: 550;
}
.wfp-origin-time {
  flex-shrink: 0;
  color: var(--c-hint);
  font-size: 12px;
}
.wfp-text-preview {
  color: #4f4f4f;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.wfp-media-preview {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}
.wfp-media-preview img,
.wfp-media-placeholder {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  background: var(--c-surface-2);
}
.wfp-media-preview img {
  object-fit: cover;
}
.wfp-media-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-hint);
  font-size: 20px;
}
.wfp-media-text {
  min-width: 0;
  color: #4f4f4f;
  font-size: 14px;
  line-height: 1.45;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wfp-delete {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-hint);
  background: #f7f7f7;
}
.wfp-delete:active {
  background: #eeeeee;
  color: var(--c-red);
  transform: scale(0.96);
}
.wfp-empty {
  min-height: 55vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--c-hint);
}
.wfp-empty-icon {
  font-size: 44px;
  color: var(--c-border-m);
}
.wfp-empty-title {
  font-size: 14px;
}
.wfp-detail {
  padding: 0 20px 8px;
}
.wfp-detail-meta {
  color: #242424;
  font-size: 14px;
  font-weight: 550;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wfp-detail-time {
  margin-top: 4px;
  color: var(--c-hint);
  font-size: 12px;
  text-align: center;
}
.wfp-detail-media {
  margin-top: 14px;
  display: flex;
  justify-content: center;
}
.wfp-detail-media img {
  max-width: min(260px, 100%);
  max-height: 38vh;
  border-radius: 8px;
  object-fit: contain;
  background: var(--c-surface-2);
}
.wfp-detail-text {
  max-height: 36vh;
  overflow-y: auto;
  margin-top: 14px;
  padding: 12px;
  border-radius: 8px;
  background: #f7f7f7;
  color: #363636;
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}
.wechat-contact-profile-page {
  background: var(--c-bg);
}
.contact-profile-scroll {
  height: calc(100% - 57px);
  overflow-y: auto;
}
.contact-profile-scroll .me-avatar {
  overflow: hidden;
}
.contact-profile-scroll .me-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.contact-profile-menu {
  padding-top: 14px;
}
.contact-group-row {
  cursor: pointer;
}
.contact-group-value {
  min-width: 80px;
  max-width: 48%;
  min-height: 20px;
  text-align: right;
  color: var(--c-sub);
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.contact-group-picker {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 20px 12px;
}
.contact-group-option {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 4px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  color: var(--c-text);
  font-size: 15px;
  text-align: left;
}
.contact-group-option i {
  color: var(--c-accent);
  opacity: 0;
}
.contact-group-option.active i {
  opacity: 1;
}
.contact-group-add-option {
  color: var(--c-accent);
  font-weight: 700;
  justify-content: flex-start;
}
.contact-group-new {
  padding: 10px 0 2px;
}
.contact-group-empty {
  padding: 8px 4px 12px;
  color: var(--c-hint);
  font-size: 13px;
  text-align: center;
}
@media (max-width: 390px) {
  .me-profile-page { padding-left: 18px; padding-right: 18px; }
  .me-hero-top { grid-template-columns: 74px 1fr; gap: 16px; }
  .me-avatar { width: 70px; height: 70px; }
  .me-stat strong { font-size: 18px; }
  .me-stat span { font-size: 11px; }
  .me-actions { gap: 10px; }
  .me-action-btn { height: 38px; font-size: 12px; }
}

/* ===== 群聊加号菜单 ===== */
.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 {
  width: 100%;
  display: flex; align-items: center; gap: 12px; padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--c-border); cursor: pointer;
  background: transparent;
  color: var(--c-text);
  font: inherit;
  text-align: left;
}
.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(0, 0, 0, 0.18);
}
.wl-logo-icon i { font-size: 38px; color: #fff; line-height: 1; }
.wl-title { font-size: 22px; font-weight: 600; color: var(--c-text); letter-spacing: 0; }
.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: opacity 0.15s, transform 0.15s, background 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: background 0.15s, transform 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;
}

/* ===== 微信切换账号页 ===== */
.wechat-account-switch-page {
  background: var(--c-bg);
}
.was-back {
  position: absolute;
  left: 18px;
  top: calc(16px + env(safe-area-inset-top));
  z-index: 5;
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--c-text); background: rgba(255,255,255,0.74);
  font-size: 22px;
}
.was-back:active { background: var(--c-surface); }
.was-manage {
  position: absolute;
  right: 20px;
  top: calc(16px + env(safe-area-inset-top));
  z-index: 5;
  height: 36px;
  padding: 0 2px;
  color: var(--c-text);
  font-size: 14px;
}
.was-manage:active { color: var(--c-accent); }
.was-center {
  min-height: 100%;
  padding: calc(22px + env(safe-area-inset-top)) 22px calc(22px + env(safe-area-inset-bottom));
  display: flex; align-items: center; justify-content: center;
}
.was-card-list {
  width: min(340px, calc(100vw - 44px));
  display: flex; flex-direction: column; gap: 12px;
}
.was-row {
  width: 100%;
  min-height: 64px;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  background: #fff;
  color: var(--c-text);
  text-align: left;
  position: relative;
  border-radius: 8px;
  border: 1px solid var(--c-border);
  box-shadow:
    inset 1px 1px 0 0 rgba(255,255,255,0.55),
    inset -1px -1px 0 0 rgba(255,255,255,0.2),
    0 2px 8px rgba(0,0,0,0.025);
}
.was-row:active { background: var(--c-surface); }
.was-plus-icon,
.was-avatar {
  width: 42px; height: 42px; border-radius: 6px;
  flex: 0 0 42px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.was-plus-icon {
  background: var(--c-surface-2);
  color: var(--c-accent);
  font-size: 18px;
}
.was-avatar {
  background: var(--c-surface-2);
  color: var(--c-sub);
  font-size: 15px; font-weight: 600;
}
.was-avatar img { width: 100%; height: 100%; max-width: none; object-fit: cover; display: block; border-radius: inherit; }
.was-row-main {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 3px;
}
.was-row-name,
.was-row-account {
  display: block;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.was-row-name {
  font-size: 15px; color: var(--c-text); line-height: 1.3;
}
.was-row-account {
  font-size: 12px; color: var(--c-hint); line-height: 1.25;
}
.was-row-arrow,
.was-current-mark {
  flex-shrink: 0;
  font-size: 15px;
}
.was-row-arrow { color: #9c9c9c; }
.was-current-mark { color: var(--c-accent); }
.was-delete-mark {
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  background: var(--c-red); color: #fff;
  font-size: 11px;
}
.was-row.is-current {
  cursor: default;
}
.wechat-account-switch-page.is-managing .was-row:not(.was-add-row):not(.is-current):active {
  background: #fff5f5;
}
.was-modal-overlay {
  position: absolute; inset: 0; z-index: 600;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(0,0,0,0.35);
}
.was-modal-box {
  width: 100%; max-width: 300px;
  display: flex; flex-direction: column; gap: 10px;
  padding: 24px 20px 16px;
  border-radius: var(--r-md);
  background: var(--c-bg);
}
.was-recover-toggle {
  align-self: center;
  padding: 2px 4px;
  color: var(--c-accent);
  font-size: 13px;
}
.was-recover-list {
  max-height: 156px;
  overflow-y: auto;
  border-radius: var(--r-sm);
  background: var(--c-surface);
}
.was-recover-row {
  width: 100%;
  min-height: 42px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 10px;
  color: var(--c-text);
  font-size: 13px;
}
.was-recover-row + .was-recover-row { border-top: 1px solid var(--c-border); }
.was-recover-row span {
  min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.was-recover-row span:last-child {
  flex-shrink: 0;
  max-width: 52%;
  color: var(--c-hint);
  font-size: 12px;
}
.was-recover-empty {
  padding: 12px 10px;
  text-align: center;
  color: var(--c-hint);
  font-size: 12px;
}

/* ===== 加号面板 ===== */
:root { --chat-picker-panel-height: 196px; }
.chat-plus-panel {
  height: var(--chat-picker-panel-height);
  background: var(--c-bg);
  border-top: 1px solid var(--c-border);
  padding: 16px;
  box-sizing: border-box;
}
.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 {
  height: var(--chat-picker-panel-height);
  background: var(--c-bg);
  border-top: 1px solid var(--c-border);
  padding: 10px 12px 12px;
  display: flex; flex-direction: column; gap: 8px;
  box-sizing: border-box;
}
.chat-emoji-panel .sp-grid {
  flex: 1;
  min-height: 0;
  max-height: none;
}
.chat-emoji-panel .sp-empty {
  flex: 1 0 100%;
  align-self: stretch;
  min-height: 100%;
  padding: 0 12px;
  display: grid;
  place-items: center;
  box-sizing: border-box;
}
.ep-tab-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.ep-tab-row .sp-tabs {
  flex: 1;
  min-width: 0;
}
.ep-mount-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--c-surface);
  color: var(--c-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  cursor: pointer;
  transition: background var(--dur), transform var(--dur);
}
.ep-mount-btn:active {
  background: var(--c-border);
  transform: scale(0.94);
}

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

/* ===== 语音气泡 ===== */
.voice-message {
  display: flex; flex-direction: column; gap: 6px; max-width: 100%;
}
.voice-self { align-items: flex-end; }
.voice-other { align-items: flex-start; }
.voice-bubble {
  width: var(--voice-width, 82px); min-width: 82px; max-width: min(220px, 62vw);
  height: max(32px, calc(var(--font-size-body) * 1.6 + 12px));
  padding: 0 10px; line-height: 1;
  display: inline-flex; align-items: center; box-sizing: border-box; overflow: hidden;
  cursor: pointer; user-select: none; transition: filter var(--dur), transform var(--dur);
}
.voice-bubble:active { filter: brightness(0.96); transform: scale(0.98); }
.voice-main {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; height: 100%; width: 100%;
}
.voice-duration {
  font-size: 14px; line-height: 1; white-space: nowrap;
}
.voice-signal {
  width: 16px; height: 16px; flex: 0 0 auto; display: block;
  overflow: visible; transform-origin: center;
}
.voice-signal-path {
  transform-origin: center; opacity: 1;
}
.voice-message.is-open .voice-signal-path {
  opacity: 1;
}
.voice-message.is-open .voice-signal-path-2 {
  animation: voiceSignalMiddle 1.2s infinite steps(1, end);
}
.voice-message.is-open .voice-signal-path-3 {
  animation: voiceSignalOuter 1.2s infinite steps(1, end);
}
.voice-transcript-bubble {
  max-width: min(240px, 62vw); padding: 6px 10px; border-radius: 6px;
  background: #fff; color: #111; font-size: var(--font-size-body); line-height: 1.6;
  letter-spacing: var(--letter-spacing-body);
  word-break: break-word; white-space: pre-wrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.voice-message .wechat-translation-card {
  max-width: min(280px, 72vw);
}
@keyframes voiceSignalMiddle {
  0%, 24.99% { opacity: 0; }
  25%, 100% { opacity: 1; }
}
@keyframes voiceSignalOuter {
  0%, 49.99% { opacity: 0; }
  50%, 74.99% { opacity: 1; }
  75%, 100% { opacity: 0; }
}

.voice-loading {
  opacity: 0.6; pointer-events: none;
  animation: voiceLoadingPulse 1s infinite ease-in-out;
}
@keyframes voiceLoadingPulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 0.35; }
}
.voice-message.is-playing .voice-signal-path-2 {
  animation: voiceSignalMiddle 1.2s infinite steps(1, end);
}
.voice-message.is-playing .voice-signal-path-3 {
  animation: voiceSignalOuter 1.2s infinite steps(1, end);
}

/* ===== 图片消息 ===== */
.photo-card {
  background: var(--c-surface); border-radius: var(--r-md);
  overflow: hidden; width: 150px; max-width: 44vw;
  cursor: pointer; transition: transform var(--dur), opacity var(--dur);
}
.photo-card:active {
  transform: scale(0.98); opacity: 0.86;
}
.photo-thumb {
  width: 100%; aspect-ratio: 1; object-fit: cover; display: block;
}
.msg-real-photo {
  width: 100%; max-width: 200px; max-height: 280px;
  object-fit: cover; border-radius: var(--r-md); display: block;
}
.photo-view-desc {
  margin: 0 20px 16px; padding: 14px 16px;
  background: var(--c-surface); border-radius: var(--r-md);
  color: var(--c-text); font-size: 14px; line-height: 1.7;
  word-break: break-word; white-space: pre-wrap;
}

.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;
  cursor: pointer; transition: transform var(--dur), background var(--dur), opacity var(--dur);
}
.transfer-card:active {
  transform: scale(0.98); background: var(--c-surface); opacity: 0.9;
}
.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: #727272; }
.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-modal-title {
  padding-bottom: 8px;
}
.transfer-modal-body {
  padding: 2px 20px 18px; text-align: center;
}
.transfer-modal-amount {
  color: var(--c-text); font-size: 32px; font-weight: 500;
  line-height: 1.2; margin: 8px 0 6px;
}
.transfer-modal-status {
  color: var(--c-sub); font-size: 13px; line-height: 1.5;
}
.transfer-modal-note {
  margin-top: 18px; padding: 12px 14px; border-radius: var(--r-md);
  background: var(--c-surface); text-align: left;
}
.transfer-modal-note-label {
  color: var(--c-hint); font-size: 12px; line-height: 1.4; margin-bottom: 5px;
}
.transfer-modal-note-text {
  color: var(--c-text); font-size: 14px; line-height: 1.6;
  word-break: break-word; white-space: pre-wrap;
}
.transfer-modal-actions {
  display: flex; gap: 10px; padding: 2px 20px 16px;
}
.transfer-modal-btn {
  flex: 1; height: 42px; border-radius: var(--r-pill);
  font-size: 14px; font-family: var(--font);
  transition: transform var(--dur), background var(--dur), opacity var(--dur);
}
.transfer-modal-btn:active {
  transform: scale(0.98); opacity: 0.86;
}
.transfer-modal-btn-decline {
  background: var(--c-surface-2); color: var(--c-sub);
}
.transfer-modal-btn-accept {
  background: var(--c-text); color: #fff;
}

/* ===== 微信式居中系统提示 ===== */
.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);
  transform: translateY(5px);
}
.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; }
.quote-ref-time {
  display: none;
  margin-right: 6px;
  font-weight: 600;
  color: inherit;
}
.quote-ref-text {
  word-break: break-word;
}


/* ===== 撤回消息 ===== */
.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; }

/* ===== 链接卡片 ===== */
.link-card {
  width: min(252px, 72vw);
  display: flex;
  gap: 10px;
  padding: 12px;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  overflow: hidden;
}
.link-card-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  flex: 0 0 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-surface);
  color: var(--c-accent);
  font-size: 15px;
}
.link-card-main {
  flex: 1;
  min-width: 0;
}
.link-card-site {
  color: var(--c-sub);
  font-size: 11px;
  line-height: 1.25;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.link-card-title {
  color: var(--c-text);
  font-size: 14px;
  line-height: 1.35;
  margin-bottom: 5px;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.link-card-url {
  color: var(--c-hint);
  font-size: 11px;
  line-height: 1.3;
  margin-bottom: 7px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.link-card-summary {
  color: var(--c-sub);
  font-size: 12px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.link-card-comments {
  display: none;
}
.link-card.is-pending .link-card-summary,
.link-card.is-unavailable .link-card-summary {
  color: var(--c-hint);
}
.link-form-body {
  padding: 0 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.link-raw-input {
  min-height: 92px;
  resize: none;
}
.link-form-label {
  color: var(--c-sub);
  font-size: 12px;
  line-height: 1.3;
  margin-top: 2px;
}
.link-url-input {
  color: var(--c-sub);
}
.link-form-hint,
.link-fetch-status {
  color: var(--c-hint);
  font-size: 12px;
  line-height: 1.45;
}

/* ===== 聊天设置页 ===== */
.cs-scroll {
  flex: 1; min-height: 0; overflow-y: auto; padding: 12px 16px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 12px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  transform: translateZ(0);
  contain: layout paint;
}
.cs-section {
  background: var(--c-bg); border-radius: var(--r-md); padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
  border: 1px solid var(--c-border);
  box-shadow: 0 1px 3px rgba(0,0,0,0.025);
}
.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-profile-row {
  display: flex; align-items: center; gap: 12px; padding: 4px 0;
}
.cs-profile-avatar {
  width: 40px; height: 40px; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--c-border); background: var(--c-surface);
  display: flex; align-items: center; justify-content: center;
  color: var(--c-hint); cursor: pointer; flex-shrink: 0; padding: 0;
}
.cs-profile-avatar img {
  width: 100%; height: 100%; max-width: none; object-fit: cover; display: block; border-radius: inherit;
}
.cs-profile-fields {
  flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px;
}
.cs-profile-fallback {
  font-size: 11px; color: var(--c-hint); overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.cs-profile-actions {
  display: grid; grid-template-columns: 1fr 1.5fr; gap: 8px;
}
.cs-section-divider {
  height: 1px; background: var(--c-border); margin: 14px 0 12px;
}
.cs-status-toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 4px 0;
  font-size: 14px; color: var(--c-text);
}
.cs-time-mode-fields {
  display: flex; flex-direction: column; gap: 8px;
  padding: 2px 0 6px;
}
.cs-bilingual-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cs-bilingual-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--c-sub);
}
.cs-bilingual-row .input-field {
  min-width: 0;
  font-size: 14px;
  padding: 9px 10px;
}
.cs-segmented {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px; padding: 3px;
  border-radius: 8px; background: var(--c-surface);
  border: 1px solid var(--c-border);
}
.cs-segmented-option {
  min-width: 0; cursor: pointer;
}
.cs-segmented-option input { display: none; }
.cs-segmented-option span {
  min-height: 30px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 6px; border-radius: 6px;
  color: var(--c-sub); font-size: 12px;
  white-space: nowrap;
  transition: background var(--dur), color var(--dur), box-shadow var(--dur);
}
.cs-segmented-option input:checked + span {
  background: var(--c-bg); color: var(--c-text);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.cs-memory-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 14px; color: var(--c-text);
}
.cs-memory-input {
  width: 96px; text-align: right; flex-shrink: 0;
}
.cs-template-fields {
  display: flex; flex-direction: column; gap: 8px;
  padding: 8px 0 10px;
}
.cs-field-label {
  font-size: 12px; color: var(--c-sub);
  margin-top: 4px;
}
.cs-textarea {
  width: 100%; min-height: 72px; resize: vertical;
  line-height: 1.5; font-family: inherit;
}
.cs-template-actions {
  display: grid; grid-template-columns: 1fr 1.5fr; gap: 8px;
}
.cs-template-preview-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding-top: 4px;
  font-size: 12px; color: var(--c-sub);
}
.cs-template-status {
  font-size: 11px; color: var(--c-hint);
  padding: 2px 8px; border-radius: var(--r-pill);
  background: var(--c-surface);
}
.cs-template-status.success {
  color: #2f7d47; background: rgba(47,125,71,0.12);
}
.cs-template-status.error {
  color: #b3261e; background: rgba(179,38,30,0.12);
}
.cs-template-preview {
  min-height: 70px; padding: 10px 12px;
  border-radius: var(--r-md);
  background: var(--c-surface);
  color: var(--c-sub);
  font-size: 13px; line-height: 1.6;
  overflow: auto;
}

/* 心声模板预设管理页 */
.thought-presets-page { display: flex; flex-direction: column; }
.thought-presets-page .page-header .header-back,
.thought-presets-page .page-header .tp-header-add {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--c-sub);
  font-size: 18px;
  flex-shrink: 0;
  transition: background var(--dur);
}
.thought-presets-page .page-header .header-back:active,
.thought-presets-page .page-header .tp-header-add:active {
  background: var(--c-surface);
}
.thought-presets-page .page-header .tp-header-add i,
.thought-presets-page .page-header .header-back i {
  line-height: 1;
  display: flex;
  align-items: center;
}
.tp-list {
  flex: 1;
  overflow-y: auto;
  padding: 14px 20px 28px;
}
.tp-list-card {
  position: relative;
  overflow: hidden;
  background: #fff;
  border-radius: 8px;
  box-shadow:
    inset 1px 1px 0 0 rgba(255, 255, 255, 0.55),
    inset -1px -1px 0 0 rgba(255, 255, 255, 0.2),
    0 2px 8px rgba(0, 0, 0, 0.025);
}
.tp-list-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.035);
  pointer-events: none;
}
.tp-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--c-bg);
  border-bottom: none;
  position: relative;
}
.tp-row + .tp-row::before {
  content: '';
  position: absolute;
  left: 76px;
  right: 16px;
  top: 0;
  height: 1px;
  background: var(--c-border);
}
.tp-row-icon {
  width: 48px;
  height: 48px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7f7f7f;
  background: var(--c-surface-2);
  font-size: 18px;
  flex-shrink: 0;
}
.tp-row-info { flex: 1; min-width: 0; }
.tp-row-name {
  font-size: 15px;
  color: var(--c-text);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tp-row-meta {
  font-size: 12px; color: var(--c-sub); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tp-row-actions { display: flex; gap: 4px; flex-shrink: 0; }
.tp-row-actions .btn-icon {
  width: 34px;
  height: 34px;
  font-size: 13px;
  color: var(--c-sub);
}
.tp-row-actions .btn-icon:last-child { color: var(--c-red, #e53935); }
.tp-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 60px 20px; text-align: center;
}
.tp-empty-icon { font-size: 48px; color: var(--c-border-m); }
.tp-empty-text { font-size: 15px; color: var(--c-text); font-weight: 500; }
.tp-empty-sub { font-size: 12px; color: var(--c-hint); margin-bottom: 8px; }

/* 心声模板编辑器页 */
.thought-preset-editor .tpe-scroll {
  flex: 1; overflow-y: auto; padding: 16px 16px 24px;
}
.thought-preset-editor .cs-template-actions {
  display: block; margin-top: 10px;
}
.thought-preset-editor .cs-template-actions .btn-pill {
  width: 100%; border-radius: 8px;
  border: 1px solid var(--c-border);
  box-shadow: 0 1px 3px rgba(0,0,0,0.025);
}
.chat-beauty-css-input {
  min-height: 250px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre;
}
/* 聊天设置 - 心声预设选择器 */
.cs-preset-picker { padding: 8px 0 4px; }
.cs-preset-list { display: flex; flex-direction: column; }
.cs-preset-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 0;
  border-bottom: 1px solid var(--c-border); cursor: pointer;
}
.cs-preset-row:last-child { border-bottom: none; }
.cs-preset-row input[type="radio"] {
  width: 18px; height: 18px; accent-color: var(--c-accent); flex-shrink: 0;
}
.cs-preset-info { flex: 1; min-width: 0; }
.cs-preset-name { font-size: 14px; color: var(--c-text); display: block; }
.cs-preset-meta { font-size: 11px; color: var(--c-hint); display: block; margin-top: 1px; }
.cs-preset-inline-note {
  font-size: 11px; color: var(--c-hint); padding: 6px 0;
  font-style: italic;
}

/* 外观设置 - 滑块行 */
.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; }

/* 时区设置 */
.cs-tz-toggle-row {
  display: flex; align-items: center; justify-content: space-between; padding: 4px 0;
}
.cs-tz-group {
  display: flex; flex-direction: column; gap: 8px;
  padding: 10px 0; border-bottom: 1px solid var(--c-border);
}
.cs-tz-group:last-child { border-bottom: none; }
.cs-tz-group-label { font-size: 13px; font-weight: 500; color: var(--c-text); }
#cs-tz-fields { display: flex; flex-direction: column; gap: 4px; }
#cs-tz-fields .input-field { font-size: 14px; padding: 10px 12px; }

/* ===== 加载/空状态 ===== */
.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; }
.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-html {
  font-size: 14px; color: var(--c-text);
  line-height: 1.6;
}
.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);
}
.thought-card-modal {
  width: min(92vw, 420px);
}
.thought-card-panel,
.thought-history-panel {
  padding: 4px 16px 16px;
}
.thought-card-frame {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  overflow: visible;
}
.thought-card-scroll {
  width: 100%;
  max-height: min(60vh, 460px);
  overflow-y: auto;
  overflow-x: hidden;
  color: var(--c-text);
  line-height: 1.7;
  overflow-wrap: anywhere;
  word-break: break-word;
  -webkit-overflow-scrolling: touch;
}
.thought-card-scroll * {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  box-sizing: border-box;
}
.thought-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 18px 16px;
  border-radius: 12px;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(0,0,0,0.05);
}
.thought-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 14px;
}
.thought-card-avatar {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(0,0,0,0.04);
}
.thought-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.thought-card-avatar span {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: #999;
}
.thought-card-label {
  font-size: 13px;
  font-weight: 600;
  color: #505050;
  letter-spacing: 0.01em;
}
.thought-card-divider {
  height: 1px;
  background: rgba(0,0,0,0.06);
  margin-bottom: 14px;
}
.thought-card-body {
  font-size: 14px;
  line-height: 1.8;
  white-space: pre-wrap;
  color: #333;
}
.thought-card-meta {
  align-self: flex-end;
  max-width: 100%;
  padding: 5px 11px;
  border-radius: 4px;
  background: rgba(255,255,255,0.74);
  border: 1px solid rgba(0,0,0,0.04);
  font-size: 11px;
  color: var(--c-hint);
  line-height: 1.2;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.thought-card-empty,
.thought-history-empty {
  min-height: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: var(--r-md);
  background: var(--c-surface);
  color: var(--c-sub);
  font-size: 14px;
  line-height: 1.8;
  text-align: center;
}
.thought-card-empty span {
  font-size: 12px;
  color: var(--c-hint);
}
.thought-card-actions {
  display: flex;
  justify-content: center;
  gap: 18px;
  padding-top: 14px;
}
.thought-round-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--c-surface);
  color: var(--c-text);
  border: 1px solid var(--c-border);
  font-size: 15px;
}
.thought-round-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}
.thought-round-btn-danger {
  color: var(--c-red);
}
.thought-round-btn:active {
  transform: scale(0.96);
  background: var(--c-surface-2);
}
.thought-round-btn:disabled:active {
  transform: none;
  background: var(--c-surface);
}
.thought-history-slider {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  border-radius: 4px;
  direction: rtl;
}
.thought-history-slider .thought-history-empty {
  flex: 0 0 100%;
  width: 100%;
  direction: ltr;
  scroll-snap-align: start;
}
.thought-history-slider::-webkit-scrollbar {
  display: none;
}
.thought-history-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  direction: ltr;
}
.thought-history-actions {
  display: flex;
  justify-content: center;
  gap: 18px;
  padding-top: 14px;
}

.thought-fav-active {
  color: #f5a623;
}
.thought-fav-active i {
  color: #f5a623;
}

.wfp-thought-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--c-border);
  text-align: left;
  color: var(--c-text);
}
.wfp-thought-item:last-child {
  border-bottom: none;
}
.wfp-thought-item:active {
  background: var(--c-surface);
}
.wfp-thought-main {
  flex: 1;
  min-width: 0;
}
.wfp-thought-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}
.wfp-thought-source {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-text);
}
.wfp-thought-preview {
  font-size: 13px;
  color: var(--c-sub);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.wfp-thought-detail {
  padding: 8px 16px 12px;
}
.wfp-thought-detail-time {
  font-size: 12px;
  color: var(--c-hint);
  margin-bottom: 12px;
}
.wfp-thought-detail-content {
  max-height: min(55vh, 400px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ===== 表情包库管理页 ===== */
.sticker-library-page { display: flex; flex-direction: column; }
.sticker-library-page.sl-no-cats .sl-tabs { display: none; }
.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: background var(--dur), color var(--dur);
}
.sl-tab.active { background: var(--c-accent); color: #fff; }
.sl-content {
  flex: 1; min-height: 0; overflow-y: auto; padding: 16px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
  background: var(--c-surface);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  transform: translateZ(0);
  contain: layout paint;
}
.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: background var(--dur), color var(--dur);
}
.sp-tab.active { background: var(--c-accent); color: #fff; }
.sp-grid {
  display: flex; flex-wrap: wrap; gap: 10px;
  align-content: flex-start;
  max-height: 38vh; overflow-y: auto;
  padding: 4px 2px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.sp-tile {
  width: calc((100% - 30px) / 4);
  height: calc((100vw - 32px - 30px) / 4);
  max-height: 72px;
  min-height: 56px;
  background: var(--c-surface); border-radius: var(--r-md);
  padding: 6px; cursor: pointer; border: none;
  flex: 0 0 calc((100% - 30px) / 4);
  display: flex; align-items: center; justify-content: center;
  transition: transform var(--dur);
  overflow: hidden;
  box-sizing: border-box;
}
.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;
}

/* ===== 通话记录气泡（聊天页普通消息气泡） ===== */
.call-record-bubble {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}
.chat-call-record-icon {
  flex-shrink: 0;
  font-size: 14px;
  line-height: 1;
}
.call-record-text {
  white-space: nowrap;
}

/* phone.css — 语音通话 & 视频通话界面样式 */

/* ===== 通话页面基础 ===== */

.call-page {
  position: fixed;
  inset: 0;
  z-index: 65;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.call-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.call-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
}

/* ===== 语音通话 ===== */

.voice-call-page .call-bg {
  background: #f0f0f0;
}

.call-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px 24px;
  flex-shrink: 0;
}

.call-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  background: #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  animation: call-breathe 2.5s ease-in-out infinite;
}

@keyframes call-breathe {
  0%, 100% { box-shadow: 0 2px 12px rgba(0,0,0,0.1); }
  50% { box-shadow: 0 2px 12px rgba(0,0,0,0.1), 0 0 0 10px rgba(0,0,0,0.04), 0 0 0 20px rgba(0,0,0,0.02); }
}

.call-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.call-avatar span,
.call-avatar .wechat-initial-avatar {
  font-size: 36px;
  color: #666;
  font-weight: 600;
}

.call-name {
  font-size: 20px;
  font-weight: 600;
  color: #333;
  margin-bottom: 6px;
  text-align: center;
}

.call-page .call-status,
.call-page #call-status {
  font-size: 14px;
  color: #999;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* ===== 对话区域（通用） ===== */

.call-conversation {
  flex: 1;
  overflow-y: auto;
  padding: 0 12px 12px;
  -webkit-overflow-scrolling: touch;
}

.call-messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px 0;
}

/* ===== 通话消息气泡（参考聊天页风格） ===== */

.call-msg {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  animation: call-fade-in 0.3s ease;
}

.call-msg-user {
  flex-direction: row-reverse;
}

.call-msg-user .call-msg-text {
  background: #8c8c8c;
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  max-width: 70%;
  font-size: 14px;
  line-height: 1.6;
  word-break: break-word;
  white-space: pre-wrap;
}

.call-msg-assistant {
  flex-direction: row;
}

.call-msg-assistant .call-msg-text {
  background: #fff;
  color: #333;
  padding: 6px 10px;
  border-radius: 6px;
  max-width: 70%;
  font-size: 14px;
  line-height: 1.6;
  word-break: break-word;
  white-space: pre-wrap;
}

.call-msg-translation {
  display: block;
  font-size: 13px;
  color: #888;
  margin-top: 4px;
  padding: 0 10px;
}

.call-msg-scene {
  justify-content: center;
}

.call-msg-scene-text {
  font-size: 12px;
  color: #999;
  line-height: 1.5;
  padding: 4px 12px;
  background: rgba(0,0,0,0.04);
  border-radius: 10px;
  text-align: center;
  max-width: 85%;
}

@keyframes call-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== 视频通话 ===== */

.video-call-page .call-bg {
  background: #e8e8e8;
}

.video-call-page .call-content {
  padding-top: 0;
}

.call-video-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: calc(env(safe-area-inset-top, 0px) + 16px) 16px 8px;
  flex-shrink: 0;
}

.call-name-overlay {
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.call-timer-overlay {
  font-size: 13px;
  color: #999;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: calc(env(safe-area-inset-top, 0px) + 20px);
  font-variant-numeric: tabular-nums;
}

.call-pip {
  width: 90px;
  height: 120px;
  border-radius: 10px;
  overflow: hidden;
  background: #d0d0d0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
  flex-shrink: 0;
}

.call-pip video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.call-pip-avatar {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ddd;
}

.call-pip-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.call-pip-avatar span {
  font-size: 28px;
  color: #666;
  font-weight: 600;
}

/* 视频主画面区域 */
.video-call-page .call-video-main {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px;
  -webkit-overflow-scrolling: touch;
}

/* 视频通话字幕 */
.call-speech-subtitle {
  font-size: 15px;
  color: #333;
  text-align: center;
  padding: 10px 24px;
  background: rgba(255,255,255,0.85);
  line-height: 1.5;
  min-height: 20px;
  flex-shrink: 0;
}

.call-speech-subtitle:empty {
  display: none;
}

.call-speech-subtitle .speech-original {
  display: inline;
}

.call-speech-subtitle .speech-translation {
  display: block;
  font-size: 13px;
  color: #888;
  margin-top: 2px;
}

/* ===== 控制按钮 ===== */

.call-controls {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  padding: 16px 32px;
  flex-shrink: 0;
}

.call-ctrl-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.call-ctrl-btn i {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #555;
  background: rgba(0,0,0,0.06);
  transition: background 0.2s;
}

.call-ctrl-btn span {
  font-size: 11px;
  color: #888;
}

.call-ctrl-btn:active i {
  background: rgba(0,0,0,0.12);
}

.call-ctrl-btn.active i {
  background: rgba(255,255,255,0.95);
  color: #333;
}

.call-hangup i {
  width: 60px;
  height: 60px;
  font-size: 22px;
  background: #ff3b30;
  color: #fff;
}

.call-hangup:active i {
  background: #d63028;
}

/* ===== 输入区域 ===== */

.call-input-area {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px calc(env(safe-area-inset-bottom, 0px) + 10px);
  flex-shrink: 0;
}

.call-input {
  flex: 1;
  height: 38px;
  border-radius: 6px;
  border: 1px solid #ddd;
  background: #fff;
  color: #333;
  font-size: 15px;
  padding: 0 12px;
  outline: none;
  transition: border-color 0.2s;
}

.call-input::placeholder {
  color: #bbb;
}

.call-input:focus {
  border-color: #aaa;
}

.call-send-btn {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  border: none;
  background: #e0e0e0;
  color: #666;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s;
}

.call-send-btn:active {
  background: #d0d0d0;
}

.call-reply-btn {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  border: none;
  background: #555;
  color: #fff;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s;
}

.call-reply-btn:active {
  background: #444;
}

/* ===== 通话记录列表页 ===== */

.call-records-page {
  background: #f5f5f5;
}

.call-records-list {
  padding: 12px 0;
}

.call-records-empty {
  text-align: center;
  color: #999;
  font-size: 14px;
  padding: 60px 20px;
}

.call-record-item {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  background: #fff;
  border-bottom: 0.5px solid #eee;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s;
}

.call-record-item:active {
  background: #f0f0f0;
}

.call-record-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e8f5e9;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  flex-shrink: 0;
}

.call-record-icon i {
  font-size: 16px;
  color: #07c160;
}

.call-record-info {
  flex: 1;
  min-width: 0;
}

.call-record-type {
  font-size: 15px;
  color: #333;
  font-weight: 500;
}

.call-record-meta {
  font-size: 12px;
  color: #999;
  margin-top: 2px;
}

.call-record-arrow {
  color: #ccc;
  font-size: 18px;
  margin-left: 8px;
}

/* ===== 通话记录详情页 ===== */

.call-record-detail-page {
  background: #f5f5f5;
}

.call-detail-header {
  text-align: center;
  padding: 20px 16px 16px;
  background: #fff;
  border-bottom: 0.5px solid #eee;
}

.call-detail-time {
  font-size: 13px;
  color: #999;
}

.call-detail-duration {
  font-size: 15px;
  color: #333;
  font-weight: 500;
  margin-top: 4px;
}

.call-detail-messages {
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.call-detail-msg {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.call-detail-sender {
  font-size: 12px;
  color: #999;
  font-weight: 500;
}

.call-detail-text {
  font-size: 14px;
  line-height: 1.6;
  padding: 6px 10px;
  border-radius: 6px;
  max-width: 75%;
  word-break: break-word;
  white-space: pre-wrap;
}

.call-detail-user {
  align-items: flex-end;
}

.call-detail-user .call-detail-text {
  background: #8c8c8c;
  color: #fff;
}

.call-detail-assistant {
  align-items: flex-start;
}

.call-detail-assistant .call-detail-text {
  background: #fff;
  color: #333;
}

.call-detail-scene {
  align-items: center;
}

.call-detail-scene-text {
  font-size: 12px;
  color: #999;
  padding: 4px 12px;
  background: rgba(0,0,0,0.03);
  border-radius: 10px;
  text-align: center;
}

/* ===== 缩小按钮 ===== */

.call-minimize-btn {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 16px);
  left: 16px;
  z-index: 5;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.call-minimize-btn:active {
  background: rgba(0, 0, 0, 0.4);
}

/* ===== 通话页面隐藏态 ===== */

.call-page.is-minimized {
  transform: translateY(100%) !important;
  pointer-events: none;
  transition: transform 0.3s var(--ease, cubic-bezier(0.25, 0.1, 0.25, 1));
}

/* ===== 浮窗指示器 ===== */

.call-floating-indicator {
  display: none;
  position: fixed;
  z-index: 10000;
  top: 120px;
  right: 10px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  animation: call-floating-in 0.3s ease;
}

.call-floating-indicator.is-active {
  display: flex;
}

.call-floating-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #07c160;
}

.call-floating-text {
  font-size: 11px;
  font-weight: 600;
  color: #07c160;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
}

@keyframes call-floating-in {
  from { opacity: 0; transform: scale(0.5); }
  to   { opacity: 1; transform: scale(1); }
}

/* ===== 暗夜模式 ===== */

/* --- 卡片 / 容器背景：白色 → 深色 --- */
:root.theme-dark .chat-compose-card,
:root.theme-dark .chat-pinned-wrap,
:root.theme-dark .chat-list-card,
:root.theme-dark .chat-empty-card,
:root.theme-dark .chat-swipe-item,
:root.theme-dark .contact-add-card,
:root.theme-dark .contacts-section-card,
:root.theme-dark .contacts-empty-card,
:root.theme-dark .wfp-group-list,
:root.theme-dark .tp-list-card,
:root.theme-dark .was-row,
:root.theme-dark .wfp-category-tab,
:root.theme-dark .contacts-sort-btn,
:root.theme-dark .wechat-header-pill {
  background: var(--c-surface);
  box-shadow:
    inset 1px 1px 0 0 rgba(255, 255, 255, 0.04),
    inset -1px -1px 0 0 rgba(255, 255, 255, 0.02),
    0 2px 8px rgba(0, 0, 0, 0.25);
}

:root.theme-dark .chat-compose-card::after,
:root.theme-dark .chat-pinned-wrap::after,
:root.theme-dark .chat-list-card::after,
:root.theme-dark .chat-empty-card::after,
:root.theme-dark .contact-add-card::after,
:root.theme-dark .contacts-section-card::after,
:root.theme-dark .contacts-empty-card::after,
:root.theme-dark .wfp-group-list::after,
:root.theme-dark .tp-list-card::after {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

/* --- 输入框 / placeholder --- */
:root.theme-dark .chat-compose-input {
  color: var(--c-hint);
}
:root.theme-dark .chat-compose-input::placeholder {
  color: var(--c-hint);
}

/* --- 聊天分组标签 --- */
:root.theme-dark .chat-group-tab {
  color: var(--c-hint);
}
:root.theme-dark .chat-group-tab.active {
  color: var(--c-text);
}
:root.theme-dark .chat-group-add {
  color: var(--c-hint);
}

/* --- 聊天列表 pin 标记 --- */
:root.theme-dark .chat-pin-mark {
  color: var(--c-hint);
}

/* --- 聊天列表滑动操作 --- */
:root.theme-dark .chat-pin-action {
  background: #e0e0e0;
  color: #111;
}

/* --- 玻璃按钮（暗夜模式） --- */
:root.theme-dark .wechat-glass-circle {
  background: linear-gradient(160deg, rgba(50,50,55,0.85) 0%, rgba(35,35,40,0.6) 100%);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 2px 8px rgba(0,0,0,0.25), 0 1px 2px rgba(0,0,0,0.15),
    inset 0 1px 0 rgba(255,255,255,0.08), inset 0 -0.5px 0 rgba(0,0,0,0.2);
}
:root.theme-dark .wechat-glass-circle:active {
  background: rgba(60, 60, 65, 0.6);
}

/* --- header 右侧胶囊 --- */
:root.theme-dark .wechat-header-pill {
  border-color: rgba(255, 255, 255, 0.08);
}
:root.theme-dark .wechat-header-pill .btn-icon:active {
  background: rgba(255, 255, 255, 0.08);
}
:root.theme-dark .wechat-pill-divider {
  background: rgba(255, 255, 255, 0.1);
}

/* --- 消息气泡 --- */
:root.theme-dark .bubble-other {
  background: var(--c-surface);
  color: var(--c-text);
}
:root.theme-dark .msg-time-center {
  background: rgba(30,30,32,0.86);
  border-color: var(--c-border);
  color: var(--c-hint);
}

/* --- 翻译卡片 --- */
:root.theme-dark .wechat-translation-card {
  background: var(--c-surface);
  color: var(--c-text);
}
:root.theme-dark .wechat-translation-provider {
  color: var(--c-hint);
}
:root.theme-dark .wechat-translation-check {
  background: var(--c-hint);
}

/* --- 语音转写气泡 --- */
:root.theme-dark .voice-transcript-bubble {
  background: var(--c-surface);
  color: var(--c-text);
}
:root.theme-dark .link-card {
  background: var(--c-surface);
  border-color: var(--c-border);
}
:root.theme-dark .link-card-icon {
  background: var(--c-surface-2);
}

/* --- 通讯录搜索 --- */
:root.theme-dark .contacts-search-field {
  background: var(--c-surface);
}
:root.theme-dark .contacts-search-icon,
:root.theme-dark .contacts-search-input::placeholder {
  color: var(--c-hint);
}
:root.theme-dark .contacts-scan-btn {
  color: var(--c-hint);
}

/* --- 通讯录 Story --- */
:root.theme-dark .contacts-story-avatar-shell {
  box-shadow: inset 0 0 0 2px var(--c-surface-2);
}
:root.theme-dark .contacts-story-item.is-self .contacts-story-avatar-shell {
  background: var(--c-bg);
  box-shadow: 0 0 0 4px var(--c-bg);
}
:root.theme-dark .contacts-story-add {
  background: #d0d0d0;
  color: #111;
  border-color: var(--c-bg);
}

/* --- 通讯录列表文字 --- */
:root.theme-dark .contacts-total {
  color: var(--c-text);
}
:root.theme-dark .contacts-section-title {
  color: var(--c-hint);
}
:root.theme-dark .contacts-sort-btn {
  color: var(--c-sub);
}
:root.theme-dark .contacts-sort-btn i {
  color: var(--c-hint);
}
:root.theme-dark .contacts-sort-btn:active {
  background: var(--c-surface-2);
}

/* --- 发现页 --- */
:root.theme-dark .discover-row {
  border-bottom-color: var(--c-border);
}
:root.theme-dark .discover-icon {
  background: var(--c-surface);
  color: var(--c-hint);
}
:root.theme-dark .discover-row:active .discover-icon {
  background: var(--c-surface-2);
}
:root.theme-dark .discover-label {
  color: var(--c-text);
}
:root.theme-dark .discover-arrow {
  color: var(--c-hint);
}

/* --- 朋友圈 --- */
:root.theme-dark .moments-cover {
  background: linear-gradient(135deg, #1a1a1c 0%, #2a2a2e 100%);
}
:root.theme-dark .moments-cover::after {
  background: linear-gradient(
    180deg,
    rgba(15,15,16,0) 0%,
    rgba(15,15,16,0) 63%,
    rgba(15,15,16,0.18) 74%,
    rgba(15,15,16,0.56) 88%,
    var(--c-bg) 100%
  );
}
:root.theme-dark .moments-profile-name {
  color: var(--c-text);
}
:root.theme-dark .moments-profile-avatar {
  border-color: var(--c-bg);
}
:root.theme-dark .moments-profile-account {
  color: var(--c-hint);
}
:root.theme-dark .moments-profile-bio {
  color: var(--c-sub);
}
:root.theme-dark .moments-ai-loading span {
  background: var(--c-hint);
}
:root.theme-dark .contact-moments-cover-preview {
  background: linear-gradient(135deg, #1a1a1c 0%, #2a2a2e 100%);
}

/* 朋友圈卡片菜单 */
:root.theme-dark .moment-card-menu,
:root.theme-dark .moment-comment-menu {
  background: var(--c-surface);
  box-shadow: 0 8px 20px rgba(0,0,0,0.35);
}
:root.theme-dark .moment-card-menu button,
:root.theme-dark .moment-comment-menu button {
  color: var(--c-text);
}
:root.theme-dark .moment-card-menu button + button,
:root.theme-dark .moment-comment-menu button + button {
  border-left-color: var(--c-border);
}
:root.theme-dark .moment-card-menu button:active,
:root.theme-dark .moment-comment-menu button:active {
  background: var(--c-surface-2);
}

/* 朋友圈操作菜单（深灰） */
:root.theme-dark .moment-action-menu {
  background: var(--c-surface-2);
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}
:root.theme-dark .moment-action-menu button {
  color: var(--c-text);
}
:root.theme-dark .moment-action-menu button:active {
  background: rgba(255,255,255,0.06);
}
:root.theme-dark .moment-action-divider {
  background: rgba(255,255,255,0.12);
}

/* 朋友圈社交互动区 */
:root.theme-dark .moment-likes + .moment-comments {
  border-top-color: var(--c-border);
}

/* --- "我"页面 --- */
:root.theme-dark .me-name {
  color: var(--c-text);
}
:root.theme-dark .me-wechat-id {
  color: var(--c-hint);
}
:root.theme-dark .me-bio {
  color: var(--c-sub);
}
:root.theme-dark .me-stat strong {
  color: var(--c-text);
}
:root.theme-dark .me-stat span {
  color: var(--c-hint);
}
:root.theme-dark .me-action-btn {
  background: var(--c-surface);
  color: var(--c-sub);
}
:root.theme-dark .me-action-primary {
  background: var(--c-text);
  color: var(--c-bg);
}
:root.theme-dark .me-menu-icon {
  background: var(--c-surface);
  color: var(--c-hint);
}
:root.theme-dark .me-menu-label {
  color: var(--c-text);
}
:root.theme-dark .me-menu-arrow {
  color: var(--c-hint);
}
:root.theme-dark .me-menu-row {
  border-bottom-color: var(--c-border);
}
:root.theme-dark .me-menu-row:active .me-menu-icon {
  background: var(--c-surface-2);
}

/* --- 收藏页 --- */
:root.theme-dark .wfp-category-tab {
  color: var(--c-sub);
}
:root.theme-dark .wfp-category-tab.active {
  background: var(--c-text);
  color: var(--c-bg);
}
:root.theme-dark .wfp-group-title {
  color: var(--c-hint);
}
:root.theme-dark .wfp-item-source {
  color: var(--c-text);
}
:root.theme-dark .wfp-text-preview,
:root.theme-dark .wfp-media-text {
  color: var(--c-sub);
}
:root.theme-dark .wfp-item:active {
  background: var(--c-surface-2);
}
:root.theme-dark .wfp-item + .wfp-item {
  border-top-color: var(--c-border);
}
:root.theme-dark .wfp-delete {
  background: var(--c-surface);
  color: var(--c-hint);
}
:root.theme-dark .wfp-delete:active {
  background: var(--c-surface-2);
}
:root.theme-dark .wfp-detail-meta {
  color: var(--c-text);
}
:root.theme-dark .wfp-detail-text {
  background: var(--c-surface);
  color: var(--c-sub);
}

/* --- 心声模板预设管理 --- */
:root.theme-dark .tp-row-icon {
  color: var(--c-hint);
}

/* --- 心声卡片 --- */
:root.theme-dark .thought-card {
  background: rgba(30,30,32,0.92);
  border-color: rgba(255,255,255,0.06);
}
:root.theme-dark .thought-card-label {
  color: var(--c-sub);
}
:root.theme-dark .thought-card-divider {
  background: rgba(255,255,255,0.08);
}
:root.theme-dark .thought-card-body {
  color: var(--c-text);
}
:root.theme-dark .thought-card-avatar {
  background: rgba(255,255,255,0.06);
}
:root.theme-dark .thought-card-avatar span {
  color: var(--c-hint);
}
:root.theme-dark .thought-card-meta {
  background: rgba(30,30,32,0.74);
  border-color: rgba(255,255,255,0.06);
}

/* --- 切换账号页 --- */
:root.theme-dark .was-back {
  background: rgba(40,40,44,0.74);
}
:root.theme-dark .was-back:active {
  background: var(--c-surface-2);
}
:root.theme-dark .was-row:active {
  background: var(--c-surface-2);
}
:root.theme-dark .was-row-arrow {
  color: var(--c-hint);
}
:root.theme-dark .wechat-account-switch-page.is-managing .was-row:not(.was-add-row):not(.is-current):active {
  background: rgba(180, 60, 60, 0.15);
}

/* --- 上下文菜单 --- */
:root.theme-dark .msg-context-menu {
  background: rgba(50,50,55,0.92);
}

/* --- 分隔线/边框统一 --- */
:root.theme-dark .discover-row,
:root.theme-dark .moment-visible-group-row,
:root.theme-dark .contact-group-option {
  border-bottom-color: var(--c-border);
}

/* --- 通话页面 --- */
:root.theme-dark .voice-call-page .call-bg {
  background: var(--c-bg);
}
:root.theme-dark .video-call-page .call-bg {
  background: var(--c-bg);
}
:root.theme-dark .call-name {
  color: var(--c-text);
}
:root.theme-dark .call-page .call-status,
:root.theme-dark .call-page #call-status {
  color: var(--c-hint);
}
:root.theme-dark .call-msg-user .call-msg-text {
  background: var(--c-rose);
}
:root.theme-dark .call-msg-assistant .call-msg-text {
  background: var(--c-surface);
  color: var(--c-text);
}
:root.theme-dark .call-msg-scene-text {
  background: rgba(255,255,255,0.06);
  color: var(--c-hint);
}
:root.theme-dark .call-speech-subtitle {
  background: rgba(30,30,32,0.85);
  color: var(--c-text);
}
:root.theme-dark .call-speech-subtitle .speech-translation {
  color: var(--c-sub);
}
:root.theme-dark .call-ctrl-btn i {
  color: var(--c-sub);
  background: rgba(255,255,255,0.08);
}
:root.theme-dark .call-ctrl-btn:active i {
  background: rgba(255,255,255,0.14);
}
:root.theme-dark .call-ctrl-btn.active i {
  background: rgba(255,255,255,0.88);
  color: #111;
}
:root.theme-dark .call-ctrl-btn span {
  color: var(--c-hint);
}
:root.theme-dark .call-avatar {
  background: var(--c-surface-2);
}
:root.theme-dark .call-avatar span,
:root.theme-dark .call-avatar .wechat-initial-avatar {
  color: var(--c-sub);
}
:root.theme-dark .call-pip {
  background: var(--c-surface-2);
}
:root.theme-dark .call-pip-avatar {
  background: var(--c-surface-2);
}
:root.theme-dark .call-pip-avatar span {
  color: var(--c-sub);
}
:root.theme-dark .call-name-overlay {
  color: var(--c-text);
}
:root.theme-dark .call-timer-overlay {
  color: var(--c-hint);
}
:root.theme-dark .call-input {
  border-color: var(--c-border);
  background: var(--c-surface);
  color: var(--c-text);
}
:root.theme-dark .call-input::placeholder {
  color: var(--c-hint);
}
:root.theme-dark .call-input:focus {
  border-color: var(--c-border-m);
}
:root.theme-dark .call-send-btn {
  background: var(--c-surface-2);
  color: var(--c-sub);
}
:root.theme-dark .call-send-btn:active {
  background: var(--c-surface);
}
:root.theme-dark .call-reply-btn {
  background: var(--c-sub);
}
:root.theme-dark .call-reply-btn:active {
  background: var(--c-hint);
}

/* --- 通话记录页 --- */
:root.theme-dark .call-records-page {
  background: var(--c-bg);
}
:root.theme-dark .call-record-item {
  background: var(--c-surface);
  border-bottom-color: var(--c-border);
}
:root.theme-dark .call-record-item:active {
  background: var(--c-surface-2);
}
:root.theme-dark .call-record-icon {
  background: rgba(7, 193, 96, 0.12);
}
:root.theme-dark .call-record-type {
  color: var(--c-text);
}
:root.theme-dark .call-record-meta {
  color: var(--c-hint);
}
:root.theme-dark .call-record-arrow {
  color: var(--c-hint);
}
:root.theme-dark .call-record-detail-page {
  background: var(--c-bg);
}
:root.theme-dark .call-detail-header {
  background: var(--c-surface);
  border-bottom-color: var(--c-border);
}
:root.theme-dark .call-detail-time {
  color: var(--c-hint);
}
:root.theme-dark .call-detail-duration {
  color: var(--c-text);
}
:root.theme-dark .call-detail-user .call-detail-text {
  background: var(--c-rose);
}
:root.theme-dark .call-detail-assistant .call-detail-text {
  background: var(--c-surface);
  color: var(--c-text);
}
:root.theme-dark .call-detail-scene-text {
  background: rgba(255,255,255,0.05);
  color: var(--c-hint);
}

/* --- 浮窗指示器 --- */
:root.theme-dark .call-floating-indicator {
  background: var(--c-surface);
  box-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

/* --- 消息选择控制 --- */
:root.theme-dark .msg-select-control {
  border-color: rgba(255,255,255,0.2);
}

/* --- 发布动态 --- */
:root.theme-dark .post-moment-textarea::placeholder {
  color: var(--c-hint);
}
:root.theme-dark .post-moment-add-img {
  color: var(--c-hint);
}

/* --- 通话消息翻译 --- */
:root.theme-dark .call-msg-translation {
  color: var(--c-sub);
}

/* --- 通话记录补充 --- */
:root.theme-dark .call-records-empty {
  color: var(--c-hint);
}
:root.theme-dark .call-detail-sender {
  color: var(--c-hint);
}

/* --- 缩小按钮（暗夜） --- */
:root.theme-dark .call-minimize-btn {
  background: rgba(255, 255, 255, 0.15);
}
:root.theme-dark .call-minimize-btn:active {
  background: rgba(255, 255, 255, 0.25);
}
