/* 都聊 · 桌面 Web（都聊电脑端风格） */

:root {
  --accent: #ff5c7a;
  --accent-soft: #ffe8ed;
  --rail: #2b2b30;
  --rail-text: #9a9aa2;
  --rail-active: #ff7a92;
  --sidebar: #f7f7f8;
  --bg: #f2f2f3;
  --card: #ffffff;
  --line: #e7e7ea;
  --line-strong: #d9d9de;
  --text: #1b1b1f;
  --text-2: #6f6f76;
  --text-3: #a5a5ad;
  --mine: #95ec69;
  --mine-text: #101010;
  --other: #ffffff;
  --hover: #ececef;
  --active: #e6e6e9;
  --danger: #ff3b30;
  --shadow: 0 18px 60px rgba(20, 20, 30, 0.18);
  --radius: 10px;
}

[data-theme='dark'] {
  color-scheme: dark;
  --rail: #1c1c20;
  --rail-text: #8f8f98;
  --sidebar: #232328;
  --bg: #16161a;
  --card: #1f1f24;
  --line: #31313a;
  --line-strong: #3d3d47;
  --text: #f0f0f2;
  --text-2: #a0a0a8;
  --text-3: #6e6e78;
  --mine: #3f7c2c;
  --mine-text: #eaf7e2;
  --other: #26262c;
  --hover: #2b2b33;
  --active: #33333c;
  --accent-soft: #3a2027;
  --shadow: 0 20px 70px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', 'Microsoft YaHei', system-ui, sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; padding: 0; }
img { display: block; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(120, 120, 130, 0.28); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(120, 120, 130, 0.45); }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------------------------------------------------------- 布局 */

.wx-app {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  background: var(--bg);
}

.wx-rail {
  width: 64px;
  flex: none;
  background: var(--rail);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 0 14px;
  gap: 6px;
}

.rail-avatar {
  width: 42px;
  height: 42px;
  margin-bottom: 14px;
  cursor: pointer;
  border-radius: var(--avatar-radius, 22%);
  overflow: hidden;
}

.rail-btn {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--rail-text);
  position: relative;
  transition: background .15s, color .15s;
}

.rail-btn svg { width: 22px; height: 22px; }
.rail-btn:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.rail-btn.active { color: var(--rail-active); background: rgba(255, 255, 255, 0.1); }
.rail-btn .dot {
  position: absolute;
  top: 7px;
  right: 7px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #ff3b30;
  color: #fff;
  font-size: 10px;
  line-height: 16px;
  text-align: center;
  font-weight: 600;
}
.rail-spacer { flex: 1; }

.wx-list {
  width: 300px;
  flex: none;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-width: 240px;
}

.list-head {
  height: 60px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
}

.list-search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  border-radius: 6px;
  background: var(--hover);
  padding: 0 9px;
  color: var(--text-3);
}

.list-search input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 13px;
  color: var(--text);
}

.list-search svg { width: 14px; height: 14px; }

.icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  flex: none;
}
.icon-btn:hover { background: var(--hover); color: var(--text); }
.icon-btn svg { width: 17px; height: 17px; }

.list-body { flex: 1; overflow-y: auto; padding: 0 0 10px; }

.chat-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  position: relative;
  border-radius: 6px;
  margin: 1px 6px;
}

.chat-row:hover { background: var(--hover); }
.chat-row.active { background: var(--active); }
.chat-row .avatar { width: 40px; height: 40px; border-radius: var(--avatar-radius, 22%); flex: none; }
.chat-row .row-main { flex: 1; min-width: 0; }
.chat-row .row-title { font-size: 14px; display: flex; align-items: center; gap: 6px; }
.chat-row .row-title .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-row .row-title .time { margin-left: auto; font-size: 11px; color: var(--text-3); flex: none; }
.chat-row .row-sub {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-row .row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.chat-row .unread {
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #ff3b30;
  color: #fff;
  font-size: 10px;
  line-height: 16px;
  text-align: center;
  font-weight: 600;
}
.chat-row .unread.muted { background: var(--text-3); }

.list-section { padding: 12px 18px 6px; font-size: 11px; color: var(--text-3); }

.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  position: relative;
}

/* ---------------------------------------------------------------- 空状态 / 登录 */

.empty-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  gap: 10px;
  font-size: 13px;
  user-select: none;
}
.empty-main .logo {
  width: 66px;
  height: 66px;
  border-radius: 18px;
  object-fit: cover;
  display: block;
  box-shadow: 0 10px 30px rgba(255, 92, 122, 0.3);
  margin-bottom: 6px;
}
.empty-main .slogan { color: var(--text-2); font-size: 13px; }

.login-screen {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}

/* 和 App、宣传页一样：灰底，右上一团浅粉、左下一团淡粉的柔光（电脑屏幕大，光斑也大一点） */
.login-screen::before,
.login-screen::after {
  content: '';
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  pointer-events: none;
}
.login-screen::before {
  width: 560px;
  height: 560px;
  top: -200px;
  right: -160px;
  background: var(--accent-soft);
}
.login-screen::after {
  width: 420px;
  height: 420px;
  bottom: -40px;
  left: -160px;
  background: rgba(255, 92, 122, 0.22);
}

/* 登录 / 注册卡片里的样式在 /css/auth.css（与 App 共用），这里只留背景和卡片外框 */
.login-screen .auth-card {
  width: 380px;
  max-width: 92vw;
  padding: 32px 32px 26px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.login-screen .auth-icon { width: 64px; height: 64px; border-radius: 17px; margin-bottom: 12px; }
.login-screen .auth-brand { margin-bottom: 22px; }
.login-screen .auth-brand h1 { font-size: 22px; }
.login-screen .auth-field { height: 44px; border-color: var(--line-strong); }
.login-screen .auth-field input { font-size: 14.5px; }
.login-screen .auth-submit { height: 42px; font-size: 15px; }
.login-screen .auth-question { background: var(--bg); }
.login-screen .auth-question input { background: var(--card); }

.text-input, .text-area, .select-input {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: var(--card);
  border-radius: 8px;
  padding: 9px 11px;
  font-size: 14px;
  outline: 0;
  transition: border-color .15s, box-shadow .15s;
}
.text-input:focus, .text-area:focus, .select-input:focus {
  border-color: transparent;
  box-shadow: var(--focus-ring, 0 0 0 2px var(--accent));
}
.text-area { resize: vertical; min-height: 74px; line-height: 1.5; }
.select-input { appearance: none; padding-right: 28px; background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%); background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }

.btn {
  height: 38px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 14px;
  background: var(--card);
  border: 1px solid var(--line-strong);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn:hover { background: var(--hover); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn.primary:hover { background: #f04c6c; }
.btn.danger { color: var(--danger); border-color: rgba(255, 59, 48, .35); }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }

/* ---------------------------------------------------------------- 聊天 */

.chat-head {
  height: 60px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.chat-head .title { font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.chat-head .typing { font-size: 11.5px; color: #07c160; font-weight: 400; opacity: 0; transition: opacity .2s; }
.chat-head .typing.show { opacity: 1; }
.chat-head .spacer { flex: 1; }

.messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background:
    radial-gradient(90% 50% at 50% 0%, rgba(255, 92, 122, 0.035), transparent 60%),
    var(--bg);
}

.msg-time { text-align: center; font-size: 11px; color: var(--text-3); margin: 14px 0 8px; }

.msg { display: flex; gap: 10px; margin: 4px 0; align-items: flex-start; }
.msg .avatar { width: 36px; height: 36px; border-radius: var(--avatar-radius, 22%); flex: none; font-size: 14px; }
.msg .msg-col { max-width: min(62%, 620px); display: flex; flex-direction: column; min-width: 0; }
.msg .sender { font-size: 11px; color: var(--text-3); margin: 0 0 3px 2px; }
.msg .bubble {
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.55;
  background: var(--other);
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
  width: fit-content;
  max-width: 100%;
}
.msg.mine { flex-direction: row-reverse; }
.msg.mine .msg-col { align-items: flex-end; }
.msg.mine .bubble { background: var(--mine); color: var(--mine-text); }
.msg .avatar { cursor: pointer; }
.msg.group .avatar:hover { outline: 2px solid var(--accent); outline-offset: 1px; }

.load-earlier {
  align-self: center;
  margin: 8px 0;
  font-size: 12px;
  color: var(--accent);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 5px 14px;
}
.load-earlier:hover { background: var(--accent-soft); }

.composer {
  flex: none;
  border-top: 1px solid var(--line);
  background: var(--bg);
  padding: 10px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.composer textarea {
  width: 100%;
  height: 76px;
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
}
.composer-bar { display: flex; align-items: center; gap: 8px; }
.composer-bar .hint { color: var(--text-3); font-size: 11px; }
.composer-bar .spacer { flex: 1; }
.composer-bar .btn { height: 30px; font-size: 13px; padding: 0 14px; }

.mention-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 11.5px;
  margin-right: 6px;
}

.mention-pop {
  position: absolute;
  bottom: 100%;
  left: 12px;
  margin-bottom: 6px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  min-width: 180px;
  max-height: 220px;
  overflow-y: auto;
  padding: 4px;
  z-index: 20;
}
.mention-pop button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 8px;
  border-radius: 6px;
  font-size: 13px;
  text-align: left;
}
.mention-pop button:hover { background: var(--hover); }

/* ---------------------------------------------------------------- 右侧资料 */

.info-panel {
  width: 290px;
  flex: none;
  border-left: 1px solid var(--line);
  background: var(--sidebar);
  overflow-y: auto;
  padding: 20px 18px 24px;
}
.info-panel .info-avatar { width: 64px; height: 64px; border-radius: var(--avatar-radius, 22%); margin: 0 auto 10px; }
.info-panel .info-name { text-align: center; font-size: 16px; font-weight: 600; }
.info-panel .info-sub { text-align: center; color: var(--text-3); font-size: 12px; margin-top: 4px; }
.info-panel .section { margin-top: 18px; }
.info-panel .section-title { font-size: 11.5px; color: var(--text-3); margin-bottom: 6px; }
.info-panel .kv { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; font-size: 12.5px; border-bottom: 1px dashed var(--line); }
.info-panel .kv .k { color: var(--text-2); flex: none; }
.info-panel .kv .v { text-align: right; word-break: break-word; }
.info-panel .actions { margin-top: 20px; display: flex; flex-direction: column; gap: 8px; }
.info-panel .member-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 8px; }
.info-panel .member { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; }
.info-panel .member .avatar { width: 40px; height: 40px; border-radius: var(--avatar-radius, 22%); }
.info-panel .member .name { font-size: 10.5px; color: var(--text-2); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.info-panel .member:hover .name { color: var(--accent); }

/* ---------------------------------------------------------------- 联系人 / 朋友圈 */

.profile-main {
  flex: 1;
  overflow-y: auto;
  padding: 40px 48px;
}
.profile-card { max-width: 560px; }

.moments-main { flex: 1; overflow-y: auto; background: var(--bg); }

/* 朋友圈卡片、头图、评论栏、发朋友圈表单的样式在 /css/moments.css（与 App 共用），这里只管 Web 的居中布局 */

.moments-body { max-width: 720px; margin: 0 auto; padding: 30px 24px 60px; }

/* ---------------------------------------------------------------- 头像 / 通用 */

.avatar {
  position: relative;
  border-radius: var(--avatar-radius, 22%);
  overflow: hidden;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--hover);
  color: #fff;
  font-weight: 600;
  user-select: none;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.round { border-radius: 50%; }
.avatar-grid {
  position: absolute;
  inset: 0;
  display: grid;
  gap: 2px;
  padding: 2px;
  background: var(--hover);
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr;
}

.avatar-grid.n3,
.avatar-grid.n4 {
  grid-template-rows: 1fr 1fr;
}
.avatar-grid .avatar { width: 100%; height: 100%; border-radius: 3px; }

.badge { min-width: 16px; height: 16px; border-radius: 8px; background: #ff3b30; color: #fff; font-size: 10px; line-height: 16px; text-align: center; padding: 0 4px; font-weight: 600; }

/* ---------------------------------------------------------------- 弹层 */

@keyframes fade { from { opacity: 0; } }

@keyframes pop { from { transform: scale(.97); opacity: .6; } }

.field-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.field-row > label { width: 72px; flex: none; color: var(--text-2); font-size: 12.5px; text-align: right; }
.field-row > .grow { flex: 1; min-width: 0; }
.field-row > .grow > .btn { flex: none; white-space: nowrap; }
.field-row textarea.text-area { min-height: 70px; }
.field-help { color: var(--text-3); font-size: 11.5px; margin: -6px 0 12px 82px; }

.toast {
  position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%);
  background: rgba(20, 20, 24, .86); color: #fff; font-size: 13px;
  padding: 9px 16px; border-radius: 8px; z-index: 200;
  animation: toast .18s ease; max-width: 70vw; text-align: center;
}
@keyframes toast { from { opacity: 0; transform: translate(-50%, 6px); } }

.empty-note { color: var(--text-3); font-size: 12.5px; text-align: center; padding: 30px 0; }

@media (max-width: 1080px) {
  .info-panel { display: none; }
}
@media (max-width: 860px) {
  .wx-list { width: 250px; min-width: 210px; }
}

.btn.small {
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
}

.friend-moments-bar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

.friend-moments-bar .title {
  font-size: 14px;
  font-weight: 600;
}

.friend-moments-bar .count {
  margin-left: auto;
  color: var(--text-3);
  font-size: 12px;
}

.msg .sender.mine-name {
  text-align: right;
}

.ai-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 0 4px;
  height: 13px;
  line-height: 13px;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  font-size: 8.5px;
  font-weight: 700;
  vertical-align: super;
}

.chat-tag {
  display: inline-block;
  margin-left: 4px;
  padding: 0 4px;
  height: 14px;
  line-height: 14px;
  border-radius: 4px;
  background: var(--bg-3);
  color: var(--text-3);
  font-size: 9px;
  vertical-align: 1px;
}

/* 必填输入为空 */
.text-input.invalid, .text-area.invalid { border-color: #e5484d !important; box-shadow: 0 0 0 2px rgba(229, 72, 77, 0.18); }

/* 弹层样式在 /css/dialogs.css，卡片 / 表单行 / 开关 / 分段 / chip / 可换头像在 /css/forms.css（都与 App 共用）。
   这里只保留 Web 特有的部分：面板里的输入框去边框、标签宽度等。 */

/* ---------------------------------------------------------------- 简约卡片（与 App 一致） */

/* 原来 .login-question 用了 --bg-2，但 Web 里从没定义过，背景是透明的 */
:root { --bg-2: var(--bg); }
[data-theme='dark'] { --bg-2: var(--bg); }

/* 卡片式弹窗：浅灰底 + 白色圆角卡片 */
.modal-cards .modal-body { background: var(--bg); }
.modal-cards .modal-head,
.modal-cards .modal-foot { background: var(--card); }

.form-card .field-row { padding-top: 6px; padding-bottom: 6px; }
.form-card .field-row.top { align-items: flex-start; padding-top: 12px; padding-bottom: 10px; }
.form-card .field-row.top > label { padding-top: 2px; }
.form-card .field-row > label,
.form-card .field-row > .label,
.form-card .field-row.with-add .row-main > .label {
  width: 96px;
  text-align: left;
  color: var(--text);
  font-size: 13.5px;
}
.form-card .field-row.search { gap: 8px; color: var(--text-3); }

/* 卡片里的输入框去掉边框，跟行融为一体 */
.form-card .bare,
.form-card .text-input,
.form-card .select-input,
.form-card .text-area {
  border: 0;
  box-shadow: none;
  background: transparent;
  padding-left: 0;
  padding-right: 0;
}
.form-card .text-area { min-height: 54px; resize: none; }
.form-card .text-input:focus,
.form-card .select-input:focus,
.form-card .text-area:focus { box-shadow: none; }

/* 资料：键值列表放进卡片 */
.profile-main { background: var(--bg); }
.info-panel .kv-card {
  background: var(--card);
  border-radius: 12px;
  padding: 0 14px;
}
.info-panel .kv-card .kv {
  border-bottom: 0;
  padding: 11px 0;
}
.info-panel .kv-card .kv + .kv { border-top: 1px solid var(--line); }
.form-card .chip-row { padding: 2px 0 6px; }

/* 裁剪界面用到的安全区变量，Web 里补上 */
:root { --safe-top: 0px; --safe-bottom: 0px; }

/* 图片裁剪（共享 ui.js 的 cropImage 用；Web 之前缺这段样式，裁剪界面没有布局） */
.crop-screen {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: #0b0b0d;
  display: flex;
  flex-direction: column;
}
.crop-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(var(--safe-top) + 10px) 14px 10px;
  color: #fff;
  flex: none;
}
.crop-top button {
  color: #fff;
  font-size: 15.5px;
  padding: 6px 8px;
}
.crop-top .crop-title {
  font-size: 16px;
  font-weight: 600;
}
.crop-stage {
  flex: 1;
  position: relative;
  overflow: hidden;
  touch-action: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.crop-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.crop-frame {
  position: absolute;
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.55);
  pointer-events: none;
  border-radius: 4px;
}
.crop-frame::after {
  content: '';
  position: absolute;
  background: rgba(255, 255, 255, 0.28);
}
.crop-frame::before {
  left: 33.33%;
  right: 33.33%;
  top: 0;
  bottom: 0;
  border-left: 0.5px solid rgba(255, 255, 255, 0.35);
  border-right: 0.5px solid rgba(255, 255, 255, 0.35);
  background: transparent;
}
.crop-frame::after {
  top: 33.33%;
  bottom: 33.33%;
  left: 0;
  right: 0;
  border-top: 0.5px solid rgba(255, 255, 255, 0.35);
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.35);
  background: transparent;
}
.crop-bottom {
  flex: none;
  padding: 16px 20px calc(20px + var(--safe-bottom));
  display: flex;
  align-items: center;
  gap: 14px;
}
.crop-bottom input[type='range'] {
  flex: 1;
  accent-color: var(--accent);
}
.crop-bottom button {
  color: var(--accent);
  font-size: 16px;
  font-weight: 600;
  padding: 8px 10px;
}

/* 朋友圈列表：Web 里居中限宽，卡片之间只留分隔线 */
.moments-body .moment { padding: 18px 0; }
.moments-main > .comment-bar { padding-left: 18px; padding-right: 18px; }

/* 聊天右侧资料面板很窄：标签收窄 */
.info-panel .form-card .field-row > .label { width: 64px; font-size: 12.5px; }
.info-panel .form-card .field-row .value { font-size: 12.5px; }
.profile-card .form-card .field-row > .label { width: 120px; }

/* 共享组件里的空状态 / 加载中（App 在 app.css 里有，Web 补一份小号的） */
.empty { padding: 40px 20px; text-align: center; color: var(--text-3); font-size: 13px; line-height: 1.7; }
.empty .empty-emoji { font-size: 32px; margin-bottom: 8px; }
.loading-row { padding: 16px; text-align: center; color: var(--text-3); font-size: 12.5px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.scan-status { margin-top: 12px; min-height: 18px; font-size: 12.5px; color: var(--text-2); }

/* 聊天右侧面板里的群设置：卡片稍微收紧 */
.info-panel .profile-head { padding: 12px; gap: 10px; }
.info-panel .profile-head-text .name { font-size: 15px; }
.info-panel .form-card .member .avatar { width: 40px; height: 40px; }

/* ---------------------------------------------------------------- 和 App 一致：表情、发送失败重发 */

/* 共用样式（forms.css / plaza.css）里用到 App 的变量名，Web 这边对上 */
:root {
  --bg-2: var(--card);
  --bg-3: var(--sidebar);
  --red: var(--danger);
}

.composer-emoji {
  width: 30px;
  height: 30px;
  color: var(--text-2);
}

.composer-emoji.active,
.composer-emoji:hover {
  color: var(--accent);
}

.emoji-panel {
  position: absolute;
  left: 12px;
  bottom: calc(100% + 6px);
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 2px;
  width: 380px;
  max-height: 220px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.emoji-panel[hidden] {
  display: none;
}

.emoji-panel button {
  height: 32px;
  border-radius: 6px;
  font-size: 20px;
  line-height: 1;
}

.emoji-panel button:hover {
  background: var(--hover);
}

.msg.failed .bubble {
  box-shadow: inset 0 0 0 1px rgba(230, 60, 80, 0.45);
}

.msg-retry {
  align-self: flex-end;
  width: 20px;
  height: 20px;
  margin-top: 4px;
  border-radius: 50%;
  background: #e5484d;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 20px;
  cursor: pointer;
}

.msg.other .msg-retry {
  align-self: flex-start;
}

/* 记忆与时间线面板 */
.modal-body .memory-head {
  padding: 4px 0 14px;
}

.modal-body .memory-add {
  margin: 0 0 14px;
  background: var(--hover);
}

.modal-body .section-head {
  padding: 4px 2px 8px;
}

.modal-body .memory-timeline {
  padding: 0 4px 8px;
}

.modal-body .memory-stats {
  background: var(--hover);
}
