/* 畅聊 ChatLite 样式（微信风布局） */
:root {
  --accent: #5b6efa;
  --accent-2: #8b5cf6;
  --accent-grad: linear-gradient(135deg, #5b6efa, #8b5cf6);
  --bg: #f2f3f5;
  --panel: #ffffff;
  --rail: #2e2e38;
  --text: #1c2333;
  --text-dim: #7a839e;
  --line: #e4e8f2;
  --danger: #e5484d;
  --shadow: 0 8px 30px rgba(28, 35, 51, .10);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
:root { --app-h: 100dvh; --app-shift: 0px; } /* 手机键盘弹出时由 JS 用可视视口高度覆盖，避免键盘遮挡 */
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  /* iOS：锁死整页，禁止橡皮筋滑动与双击缩放 */
  position: fixed;
  inset: 0;
  width: 100%;
  overscroll-behavior: none;
  touch-action: manipulation;
}
button { font-family: inherit; }
.hidden { display: none !important; }

/* ---------- 按钮 ---------- */
.btn { border: 0; border-radius: 10px; padding: 10px 16px; font-size: 15px; cursor: pointer; transition: filter .15s, transform .05s; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent-grad); color: #fff; }
.btn.primary:hover { filter: brightness(1.06); }
.btn.block { display: block; width: 100%; }
.btn.ghost { background: #eef1f8; color: var(--text); }
.icon-btn {
  width: 34px; height: 34px; border: 0; border-radius: 9px;
  background: transparent; color: var(--text-dim); font-size: 18px;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn:hover { background: #eceff7; color: var(--text); }
.mini-btn {
  border: 0; background: #eef1f8; color: var(--accent); border-radius: 999px;
  font-size: 12px; padding: 3px 10px; cursor: pointer; white-space: nowrap;
}
.mini-btn:hover { background: #e3e8fa; }
.mini-btn.danger { color: var(--danger); background: #fdecec; }
.mini-btn.danger:hover { background: #fadcdc; }
.unread {
  background: #fa5151; color: #fff; font-size: 11px; min-width: 18px; height: 18px;
  border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
  padding: 0 5px; flex-shrink: 0;
}

/* ---------- 登录页 ---------- */
.auth-screen {
  height: var(--app-h); display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #dfe6ff 0%, #efe6ff 100%); padding: 16px;
}
.auth-card {
  width: 380px; max-width: 100%; background: var(--panel); border-radius: 20px;
  box-shadow: var(--shadow); padding: 34px 30px 26px; text-align: center;
}
.auth-logo { width: 76px; height: 76px; border-radius: 18px; }
.auth-title { margin: 12px 0 2px; font-size: 26px; }
.auth-sub { margin: 0 0 20px; color: var(--text-dim); font-size: 13px; }
.tabs { display: flex; background: #eef1f8; border-radius: 10px; padding: 4px; margin-bottom: 18px; }
.tab {
  flex: 1; border: 0; background: transparent; padding: 8px 0; font-size: 15px;
  border-radius: 8px; cursor: pointer; color: var(--text-dim);
}
.tab.active { background: #fff; color: var(--text); font-weight: 600; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
#auth-form input {
  width: 100%; border: 1.5px solid var(--line); border-radius: 10px;
  padding: 12px 14px; font-size: 15px; margin-bottom: 12px; outline: none; transition: border-color .15s;
}
#auth-form input:focus { border-color: var(--accent); }
.auth-error { color: var(--danger); font-size: 13px; min-height: 18px; margin: -4px 0 8px; text-align: left; }
.auth-tip { color: var(--text-dim); font-size: 12px; margin: 14px 0 0; }

/* ---------- 主布局 ---------- */
.app { display: flex; height: var(--app-h, 100vh); background: var(--bg); transform: translateY(var(--app-shift)); }

/* 左侧导航栏 */
.rail {
  width: 64px; flex-shrink: 0; background: var(--rail);
  display: flex; flex-direction: column; align-items: center;
  padding: 16px 0 14px; gap: 8px;
}
.rail-logo { width: 38px; height: 38px; border-radius: 10px; margin-bottom: 12px; }
.rail-btn {
  width: 44px; height: 44px; border: 0; border-radius: 11px; background: transparent;
  font-size: 22px; cursor: pointer; position: relative; color: #9aa0ae;
  display: flex; align-items: center; justify-content: center;
}
.rail-btn:hover { background: #3c3c4a; }
.rail-btn.active { background: var(--accent-grad); color: #fff; }
.nav-badge {
  position: absolute; top: -1px; right: -1px; min-width: 17px; height: 17px;
  border-radius: 999px; background: #fa5151; color: #fff; font-size: 10px;
  display: none; align-items: center; justify-content: center; padding: 0 4px;
  border: 2px solid var(--rail);
}

/* 列表列 */
.list-col {
  width: 300px; flex-shrink: 0; background: var(--panel);
  border-right: 1px solid var(--line); display: flex; flex-direction: column;
}
.list-head {
  height: 52px; flex-shrink: 0; display: flex; align-items: center; gap: 6px;
  padding: 0 10px 0 16px; border-bottom: 1px solid var(--line);
}
.list-title { flex: 1; font-weight: 700; font-size: 16px; }
.list-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding-bottom: 8px; }

/* 会话行 */
.chat-row {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px;
  cursor: pointer; position: relative;
}
.chat-row:hover, .contact-row:hover { background: #f4f5f8; }
.chat-row.active { background: #ececf1; }
.row-info { flex: 1; min-width: 0; }
.row-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.row-name { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-time { font-size: 11px; color: var(--text-dim); flex-shrink: 0; }
.row-preview {
  font-size: 12px; color: var(--text-dim); margin-top: 2px; display: block;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.online-dot { width: 9px; height: 9px; border-radius: 50%; background: #34b37f; flex-shrink: 0; }

/* 通讯录行 */
.contact-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer; }
.cr-icon {
  width: 38px; height: 38px; border-radius: 10px; background: #eef1f8; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 19px;
}
.action-row { border-bottom: 1px solid #f3f5f9; }
.action-row .row-name { font-weight: 400; }
.action-row.danger .row-name { color: var(--danger); }
.group-head { font-size: 12px; color: var(--text-dim); padding: 14px 14px 4px; }
.row-sub { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.row-del { opacity: 0; transition: opacity .12s; }
.contact-row:hover .row-del { opacity: 1; }
@media (hover: none) { .row-del { opacity: .55; } }
/* 手机触屏：输入字号 16px，避免 iOS 聚焦自动放大 */
@media (hover: none) and (pointer: coarse) {
  #auth-form input, .composer textarea, .bind-new input, .modal input[type=text], #modal-input, .rescue-box input { font-size: 16px !important; }
}
/* 收起键盘按钮：仅触屏设备显示 */
.kb-hide { display: none; }
@media (hover: none) and (pointer: coarse) { .kb-hide { display: inline-flex; } }
.list-empty { text-align: center; padding: 44px 20px; color: var(--text-dim); font-size: 14px; }
.list-empty .btn { margin-top: 12px; }

/* 我 */
.me-card {
  display: flex; gap: 14px; align-items: center; padding: 20px 16px;
  border-bottom: 8px solid var(--bg);
  position: sticky; top: 0; z-index: 5; background: #fff;
}
.me-name { font-size: 18px; font-weight: 700; }
.me-uid { font-size: 13px; color: var(--text-dim); margin-top: 5px; display: flex; align-items: center; gap: 6px; }
.admin-tag {
  font-size: 10px; color: #fff; background: var(--accent-grad);
  border-radius: 4px; padding: 1px 5px; margin-left: 6px; vertical-align: 2px; font-weight: 400;
}

/* 头像 */
.avatar {
  width: 40px; height: 40px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; user-select: none;
}

/* 聊天区 */
.chat { flex: 1; display: flex; flex-direction: column; min-width: 0; position: relative; background: var(--bg); }
.chat-empty {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 6px; text-align: center; padding: 20px;
}
.chat-empty img { width: 84px; height: 84px; border-radius: 20px; opacity: .9; margin-bottom: 8px; }
.ce-title { font-size: 18px; font-weight: 700; margin: 0; }
.chat-empty .dim { color: var(--text-dim); font-size: 13px; margin: 0; }
.chat-header {
  display: flex; align-items: center; gap: 8px; padding: 12px 16px;
  background: var(--panel); border-bottom: 1px solid var(--line);
}
.chat-head-info { flex: 1; min-width: 0; }
.chat-title { font-size: 17px; font-weight: 700; }
.chat-sub { font-size: 12px; color: var(--text-dim); }
.back-btn { display: none; font-size: 24px; }

/* 消息列表 */
.messages { flex: 1; display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 18px 16px 10px; }
.msg-spacer { flex: 1 1 auto; }
.messages-tip { text-align: center; }
.load-more {
  border: 0; background: #fff; color: var(--accent); border-radius: 999px;
  font-size: 13px; padding: 6px 16px; cursor: pointer; box-shadow: 0 2px 8px rgba(28,35,51,.08); margin: 0 auto 14px;
}
.day-divider { text-align: center; color: var(--text-dim); font-size: 12px; margin: 14px 0; display: flex; align-items: center; gap: 12px; }
.day-divider::before, .day-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.msg { display: flex; gap: 10px; margin-bottom: 14px; max-width: 640px; }
.msg.mine { margin-left: auto; flex-direction: row-reverse; }
.msg .bubble-wrap { display: flex; flex-direction: column; max-width: calc(100% - 50px); min-width: 0; }
.msg.mine .bubble-wrap { align-items: flex-end; }
.bubble {
  background: #fff; border-radius: 4px 16px 16px 16px; padding: 10px 14px;
  font-size: 15px; line-height: 1.55; white-space: pre-wrap; word-break: break-word;
  box-shadow: 0 1px 2px rgba(28,35,51,.06); width: fit-content; max-width: 100%;
}
.msg.mine .bubble { background: var(--accent-grad); color: #fff; border-radius: 16px 4px 16px 16px; }
.msg-meta { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--text-dim); margin: 4px 4px 0; }
.msg.mine .msg-meta { flex-direction: row-reverse; }
.recall-btn {
  border: 0; background: transparent; color: var(--text-dim); font-size: 11px;
  cursor: pointer; padding: 0; opacity: 0; transition: opacity .12s;
}
.msg:hover .recall-btn, .msg-meta:focus-within .recall-btn { opacity: 1; }
.recall-btn:hover { color: var(--danger); }
@media (hover: none) { .recall-btn { opacity: .8; padding: 2px 6px; } }
.tombstone {
  align-self: center; text-align: center; color: var(--text-dim); font-size: 12px;
  background: #e9edf5; border-radius: 999px; padding: 4px 14px; margin: 0 auto 14px; width: fit-content;
}
.empty-tip { text-align: center; color: var(--text-dim); font-size: 13px; margin-top: 30px; }

/* 输入区 */
.composer {
  position: relative;
  display: flex; flex-direction: row; align-items: flex-end; gap: 6px;
  padding: 10px 12px 10px 8px;
  background: var(--panel); border-top: 1px solid var(--line);
}
.composer textarea {
  flex: 1; min-width: 0; resize: none; border: 1.5px solid var(--line); border-radius: 12px;
  padding: 11px 14px; font-size: 15px; font-family: inherit; line-height: 1.45;
  max-height: 140px; outline: none; transition: border-color .15s; background: #fbfcfe;
}
.composer textarea:focus { border-color: var(--accent); background: #fff; }
.composer .tool-btn { margin-bottom: 4px; }
.composer .send-round { margin-bottom: 2px; }
.tool-btn {
  width: 34px; height: 32px; border: 0; border-radius: 8px; background: transparent;
  font-size: 18px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.tool-btn:hover { background: #eef1f8; }
.send-round {
  width: 44px; height: 44px; border: 0; border-radius: 50%; cursor: pointer;
  background: var(--accent-grad); color: #fff; font-size: 19px;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(91, 110, 250, .35);
}
.send-round:hover { filter: brightness(1.08); }
.send-round:active { transform: scale(.94); }
.emoji-panel {
  position: absolute; bottom: calc(100% + 8px); right: 12px; z-index: 60;
  width: 320px; max-width: calc(100vw - 24px); max-height: 224px; overflow-y: auto;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow); padding: 10px;
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px;
}
.emoji-item {
  border: 0; background: transparent; font-size: 21px; padding: 3px 0;
  border-radius: 8px; cursor: pointer; line-height: 1.3;
}
.emoji-item:hover { background: #eef1f8; }

/* 图片消息 */
.bubble.bubble-img { padding: 4px; background: #fff; }
.msg-img {
  display: block; max-width: min(260px, 60vw); max-height: 260px;
  border-radius: 12px; cursor: zoom-in;
}
.img-lightbox { text-align: center; }
.img-lightbox img { max-width: 100%; max-height: 70vh; border-radius: 8px; }

/* 语音消息 */
.bubble.bubble-voice {
  display: flex; align-items: center; gap: 10px; min-width: 90px; padding: 10px 14px;
}
.voice-play {
  width: 34px; height: 34px; border: 0; border-radius: 50%; flex-shrink: 0;
  background: var(--accent-grad); color: #fff; font-size: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.msg.mine .voice-play { background: rgba(255,255,255,.25); }
.voice-dur { font-size: 13px; font-weight: 600; }

/* 录音条 */
.rec-bar {
  display: flex; align-items: center; gap: 10px; padding: 6px 2px;
}
.rec-dot {
  width: 12px; height: 12px; border-radius: 50%; background: var(--danger);
  animation: rec-blink 1s infinite;
}
@keyframes rec-blink { 50% { opacity: .25; } }
#rec-time { font-weight: 700; font-variant-numeric: tabular-nums; }
.rec-hint { color: var(--text-dim); font-size: 13px; flex: 1; }

/* 建群选人列表 */
.pick-list {
  max-height: 260px; overflow-y: auto; border: 1px solid var(--line);
  border-radius: 10px; margin-top: 8px;
}
.pick-row {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  cursor: pointer; border-bottom: 1px solid #f3f5f9; font-size: 14px;
}
.pick-row:hover { background: #f4f6fb; }
.pick-row input { width: 16px; height: 16px; accent-color: var(--accent); }
.pick-name { font-weight: 600; flex: 1; }

/* 底部标签栏（移动端） */
.tabbar { display: none; }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15, 20, 34, .45); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 18px;
  backdrop-filter: blur(2px);
}
.modal {
  background: #fff; border-radius: 16px; width: 520px; max-width: 100%;
  max-height: 84dvh; display: flex; flex-direction: column; box-shadow: var(--shadow);
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--line); font-weight: 700; font-size: 16px;
}
.modal-body { padding: 16px 20px; overflow-y: auto; font-size: 14px; line-height: 1.7; }
.modal-body h3 { font-size: 14px; margin: 16px 0 6px; }
.modal-body h3:first-child { margin-top: 0; }
.modal-body p { margin: 4px 0; color: var(--text); }
.modal-body .dim { color: var(--text-dim); font-size: 13px; }
.modal-body ol, .modal-body ul { margin: 4px 0; padding-left: 20px; }
.modal-body code { background: #eef1f8; border-radius: 5px; padding: 1px 6px; font-size: 13px; word-break: break-all; }
.modal-foot { padding: 12px 20px 16px; display: flex; justify-content: flex-end; gap: 10px; }

/* 账号绑定 */
.bind-new { display: flex; gap: 8px; margin: 8px 0 4px; }
.bind-new input {
  flex: 1; border: 1.5px solid var(--line); border-radius: 10px;
  padding: 9px 12px; font-size: 14px; outline: none;
}
.bind-new input:focus { border-color: var(--accent); }
.bind-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 9px 2px; border-bottom: 1px solid var(--line); font-size: 14px;
}
.bind-row:last-child { border-bottom: 0; }
.bind-name { font-weight: 700; }
.bind-actions { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.tag-ok { color: #34b37f; font-size: 12px; }
.tag-danger { color: var(--danger); font-size: 12px; }

/* toast */
#toast-root { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 200; }
.toast {
  background: rgba(28, 35, 51, .92); color: #fff; font-size: 14px;
  border-radius: 10px; padding: 10px 18px; margin-bottom: 8px;
  box-shadow: var(--shadow); animation: toast-in .2s ease;
}
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }

/* ---------- 被远程停用全屏页 ---------- */
.disabled-screen {
  position: fixed; inset: 0; z-index: 999; background: linear-gradient(160deg, #2b2f45, #3b2f4d);
  color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; text-align: center; padding: 30px;
}
.disabled-screen img { width: 72px; height: 72px; border-radius: 16px; opacity: .9; margin-bottom: 8px; }
.disabled-screen h1 { font-size: 22px; margin: 0 0 4px; }
.disabled-screen p { margin: 2px 0; font-size: 14px; }
.disabled-screen .dim { color: rgba(255,255,255,.65); font-size: 13px; }
.rescue-box {
  margin-top: 16px; background: rgba(255,255,255,.08); border-radius: 12px;
  padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; width: 300px; max-width: 100%;
}
.rescue-box p { margin: 0; font-size: 13px; }
.rescue-box input {
  border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.12); color: #fff;
  border-radius: 8px; padding: 9px 12px; font-size: 14px; outline: none;
}
.rescue-box input::placeholder { color: rgba(255,255,255,.55); }
.rescue-box input:focus { border-color: rgba(255,255,255,.6); }
.rescue-box button {
  border: 0; border-radius: 8px; padding: 10px; font-size: 14px; cursor: pointer;
  background: var(--accent-grad); color: #fff;
}
.rescue-box button:disabled { opacity: .6; }

/* ---------- 安全区适配（刘海屏 / PWA 全屏模式） ---------- */
.auth-screen { padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
.list-head { padding-top: env(safe-area-inset-top); }
.chat-header { padding-top: calc(12px + env(safe-area-inset-top)); }

/* ---------- 移动端 ---------- */
@media (max-width: 768px) {
  .rail { display: none; }
  .app { flex-direction: column; }
  .list-col { flex: 1; width: 100%; border-right: 0; min-height: 0; }
  .tabbar {
    display: flex; height: calc(56px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--panel); border-top: 1px solid var(--line); z-index: 30;
  }
  .tabbar-btn {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; background: none; border: 0; color: var(--text-dim); cursor: pointer; position: relative;
  }
  .tabbar-btn.active { color: var(--accent); }
  .ticon { font-size: 21px; line-height: 1; }
  .tlabel { font-size: 10px; }
  .tabbar-btn .nav-badge { border-color: #fff; top: 4px; right: calc(50% - 24px); }
  .chat {
    position: fixed; left: 0; right: 0; top: 0; height: 100%; z-index: 40;
    transform: translateX(100%);
    transition: transform .22s ease;
  }
  .app.chatting .chat { transform: translateX(0); }
  .back-btn { display: inline-flex; }
  .messages { padding: 14px 10px 8px; }
  .msg { max-width: 88%; }
  .composer { padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); gap: 4px; }
  .chat-header { padding: 8px 12px; padding-top: calc(8px + env(safe-area-inset-top)); }
}


/* ---------- 按住说话（微信式） ---------- */
.hold-talk {
  display: none; width: 100%; border: 1.5px solid var(--line); border-radius: 12px;
  padding: 13px 0; font-size: 16px; font-weight: 600; color: var(--text);
  background: #eef0f5; cursor: pointer; text-align: center;
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.hold-talk.holding { background: #dfe3f5; border-color: var(--accent); color: var(--accent); }
.hold-talk.canceling { background: #fdecec; border-color: var(--danger); color: var(--danger); }
.rec-overlay {
  position: fixed; inset: 0; z-index: 90; background: rgba(15, 20, 34, .55);
  display: flex; align-items: center; justify-content: center;
}
.rec-overlay.canceling .rec-pill { background: rgba(229, 72, 77, .95); }
.rec-pill {
  display: flex; align-items: center; gap: 12px; color: #fff; font-size: 17px; font-weight: 600;
  background: rgba(28, 35, 51, .92); border-radius: 16px; padding: 22px 34px;
  box-shadow: var(--shadow);
}
.rec-pill .rec-dot { width: 14px; height: 14px; background: #fff; animation: rec-blink 1s infinite; }

/* iOS 键盘弹出时：面板向下延伸，填满系统预留空白，视觉上贴住键盘 */
body.kb-open .composer { padding-bottom: 52px; }

/* ---------- ⊕ 更多面板 ---------- */
.more-panel {
  position: absolute; bottom: calc(100% + 8px); right: 12px; z-index: 60;
  width: 320px; max-width: calc(100vw - 24px);
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow); padding: 12px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
}
.more-item {
  border: 0; background: transparent; cursor: pointer; padding: 8px 2px; border-radius: 10px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.more-item:hover { background: #f2f4fb; }
.mi-icon {
  width: 48px; height: 48px; border-radius: 14px; background: #eef1f8;
  display: flex; align-items: center; justify-content: center; font-size: 24px;
}
.mi-label { font-size: 12px; color: var(--text); }

/* ---------- 位置消息 ---------- */
.bubble.bubble-loc { display: block; padding: 0; width: 250px; cursor: pointer; overflow: hidden; }
.loc-icon {
  width: 42px; height: 42px; border-radius: 10px; background: #e8f5ee; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 21px;
}
.loc-text { font-size: 14px; font-weight: 600; }
.loc-coords { font-size: 11px; color: var(--text-dim); font-weight: 400; }

/* ---------- 语音通话面板 ---------- */
.call-panel {
  position: fixed; inset: 0; z-index: 300;
  background: linear-gradient(160deg, #23283f, #3a2f4e);
  display: flex; align-items: center; justify-content: center;
}
.call-inner { display: flex; flex-direction: column; align-items: center; gap: 14px; color: #fff; }
.call-inner .avatar { width: 84px; height: 84px; font-size: 36px; border-radius: 24px; }
.call-name { font-size: 22px; font-weight: 700; }
.call-status { font-size: 14px; color: rgba(255,255,255,.75); }
.call-actions { display: flex; align-items: center; justify-content: center; gap: 26px; margin-top: 26px; }
.call-btn {
  width: 68px; height: 68px; border-radius: 50%; border: 0; cursor: pointer;
  font-size: 15px; font-weight: 600; color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.call-btn.accept { background: #34b37f; }
.call-btn.decline { background: #e5484d; }
.call-btn.wide { width: 120px; border-radius: 34px; }
.call-btn.small { background: rgba(255,255,255,.16); font-size: 13px; }
.call-btn.small.on { background: rgba(255,255,255,.4); }

/* ---------- 地图选点 / 位置查看 ---------- */
.loc-picker {
  position: fixed; inset: 0; z-index: 280; background: #fff;
  display: flex; flex-direction: column;
}
.loc-top {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  padding-top: calc(12px + env(safe-area-inset-top));
  background: var(--panel); border-bottom: 1px solid var(--line); font-weight: 700; z-index: 1000;
}
.loc-top span:nth-child(2) { flex: 1; font-size: 16px; }
.loc-map { flex: 1; }
.loc-pin {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -100%);
  font-size: 34px; z-index: 1000; pointer-events: none;
  filter: drop-shadow(0 3px 4px rgba(0,0,0,.35));
}
.loc-bottom {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  background: var(--panel); border-top: 1px solid var(--line); z-index: 1000;
}
.loc-coord { flex: 1; font-size: 13px; color: var(--text-dim); }
.loc-map-mini { width: 100%; height: 130px; border-radius: 0; }
.loc-info-bar {
  display: flex; align-items: center; gap: 6px; width: 100%;
  background: #fff; padding: 8px 12px; font-size: 14px; font-weight: 600;
}
.loc-viewer {
  position: fixed; inset: 0; z-index: 290; background: #fff;
  display: flex; flex-direction: column;
}
.loc-viewer .loc-top { z-index: 1000; }
.loc-viewer .loc-map { flex: 1; }
.loc-viewer .loc-actions {
  display: flex; gap: 10px; padding: 12px 14px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  background: var(--panel); border-top: 1px solid var(--line); z-index: 1000;
}

/* ---------- 已读回执 ---------- */
.read-flag { color: #8a93a8; }
.read-flag.read { color: #34b37f; font-weight: 600; }

/* ---------- VIP ---------- */
.vip-tag {
  font-size: 10px; color: #fff; background: linear-gradient(135deg, #f59e0b, #f97316);
  border-radius: 4px; padding: 1px 5px; margin-left: 6px; vertical-align: 2px; font-weight: 700;
}
.voice-pitch {
  border: 1px solid var(--line); border-radius: 6px; font-size: 11px; padding: 1px 4px;
  background: #f8f9fb; color: var(--text); cursor: pointer; outline: none;
}
/* ---------- 置顶标记 ---------- */
.pin-flag { font-size: 11px; margin-left: 5px; opacity: .85; }

/* ---------- 头像图片与资料编辑 ---------- */
.avatar-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.nick-tag { font-size: 10px; color: #8a94a6; border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; margin-left: 5px; font-weight: 400; }
.profile-edit { display: flex; flex-direction: column; gap: 14px; align-items: center; }
.pe-avatar-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.pe-avatar-wrap #pe-avatar .avatar { box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.pe-nick { width: 100%; display: flex; flex-direction: column; gap: 6px; }
.pe-nick input { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: 15px; outline: none; }
.pe-nick input:focus { border-color: #07c160; }

/* ---------- 通话中控制条 ---------- */
.call-ctl { display: flex; gap: 26px; justify-content: center; margin: 20px 0 10px; }
.call-ctl-btn {
  width: 66px; height: 66px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.16); color: #fff; font-size: 13px; cursor: pointer;
}
.call-ctl-btn.on { background: rgba(255,255,255,.4); }

/* ---------- ＋菜单与搜索 ---------- */
.list-col { position: relative; }
.plus-menu { position: fixed; z-index: 90; background: rgba(58,58,60,.95); border-radius: 10px; padding: 3px 0; min-width: 152px; box-shadow: 0 6px 24px rgba(0,0,0,.3); }
.plus-menu::before { content: ''; position: absolute; top: -5px; right: 13px; width: 11px; height: 11px; background: rgba(58,58,60,.95); transform: rotate(45deg); border-radius: 2px; }
.plus-item { display: flex; align-items: center; gap: 11px; padding: 12px 20px; font-size: 15px; color: #fff; cursor: pointer; white-space: nowrap; }
.plus-item + .plus-item { border-top: 1px solid rgba(255,255,255,.09); }
.plus-item svg { width: 19px; height: 19px; flex: none; }
.plus-item:active { background: rgba(255,255,255,.1); }
#srch-input { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 15px; outline: none; margin-bottom: 10px; }
#srch-input:focus { border-color: var(--accent); }
#srch-results .contact-row { cursor: pointer; }
