:root {
  /* 背景与玻璃：浅色低饱和底 + 白色半透明玻璃 */
  --bg-0: #e3e9f2;
  --bg-1: #edf1f7;
  --glass: rgba(255, 255, 255, 0.66);
  --glass-2: rgba(255, 255, 255, 0.86);
  --line: rgba(23, 42, 68, 0.12);
  --line-strong: rgba(23, 42, 68, 0.24);

  /* 文本 */
  --text: #1d2735;
  --muted: #5f7086;

  /* 品牌色：低饱和蓝紫渐变，青色点缀，金色荣誉 */
  --primary: #4f86e8;
  --primary-2: #7c6fd6;
  --cyan: #3fa79e;
  --gold: #b8862f;
  --danger: #c9554f;
  --ok: #2f9c72;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 16px 36px rgba(40, 60, 95, 0.16);
  --shadow-lift: 0 20px 44px rgba(40, 60, 95, 0.22);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background:
    radial-gradient(1100px 700px at 85% -10%, rgba(122, 116, 170, 0.16) 0%, transparent 55%),
    radial-gradient(900px 600px at -10% 20%, rgba(96, 140, 140, 0.14) 0%, transparent 50%),
    radial-gradient(1000px 800px at 50% 110%, rgba(110, 130, 170, 0.16) 0%, transparent 55%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-0) 100%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(480px 320px at 18% 12%, rgba(95, 130, 175, 0.12), transparent 70%),
    radial-gradient(420px 300px at 82% 30%, rgba(110, 100, 160, 0.10), transparent 70%);
  filter: blur(10px);
}

.screen { position: relative; z-index: 1; min-height: 100%; padding: 24px; }
.hidden { display: none !important; }

/* ---------- 通用 ---------- */
button {
  font: inherit;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
button:disabled { opacity: 0.5; cursor: not-allowed; }
button:focus-visible, input:focus-visible {
  outline: 2px solid rgba(55, 212, 200, 0.6);
  outline-offset: 2px;
}

button.primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  color: #fff;
  box-shadow: 0 8px 20px rgba(79, 134, 232, 0.24);
}
button.primary:hover { filter: brightness(1.1); transform: translateY(-1px); }
button.ghost { background: rgba(255,255,255,0.55); color: var(--text); border: 1px solid var(--line); }
button.ghost:hover { border-color: var(--line-strong); background: var(--glass-2); }
button.link { background: none; border: none; color: var(--primary); cursor: pointer; font-size: 13px; padding: 0; }
button.link:hover { text-decoration: underline; }

input {
  font: inherit;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
input::placeholder { color: rgba(95, 112, 134, 0.55); }
input:focus { border-color: var(--primary-2); background: #fff; box-shadow: 0 0 0 3px rgba(124, 111, 214, 0.16); }

.error { color: var(--danger); min-height: 1.2em; margin: 10px 0 0; font-size: 13px; }
.error.ok { color: #22a06b; }
.meta { color: var(--muted); font-size: 13px; }
.glass {
  background: var(--glass);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 16px 36px rgba(40, 60, 95, 0.14);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* ---------- 登录（品牌头图 + 圆形头像 + 表单卡） ---------- */
.screen-auth { display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card {
  position: relative;
  width: min(400px, 100%);
  border-radius: 22px;
  box-shadow: var(--shadow);
  overflow: hidden;
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.auth-hero {
  position: relative;
  padding: 36px 28px 46px;
  text-align: center;
  background: linear-gradient(160deg, rgba(79, 134, 232, 0.20) 0%, rgba(124, 111, 214, 0.16) 100%);
}
.auth-hero::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; height: 34px;
  background: radial-gradient(120% 100% at 50% 0%, transparent 60%, var(--bg-1) 61%);
}
.hero-mascot { width: 56px; height: 56px; margin: 0 auto 10px; stroke: var(--primary); }
.auth-wordmark { font-size: 28px; font-weight: 700; letter-spacing: 2px; color: var(--text); }
.auth-slogan { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.auth-avatar { display: flex; justify-content: center; margin-top: -36px; position: relative; z-index: 1; }
.auth-avatar-ring {
  width: 72px; height: 72px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  border: 3px solid var(--bg-1);
  box-shadow: 0 10px 24px rgba(61, 139, 255, 0.35);
}
.auth-avatar-ring .logo { width: 40px; height: 40px; }
.auth-form { padding: 18px 28px 28px; }

/* 右上角图标切换（无文字标签） */
.auth-icon {
  position: absolute; top: 16px; right: 18px; z-index: 2;
  width: 38px; height: 38px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.55); border: 1px solid var(--line);
  color: var(--text); cursor: pointer;
}
.auth-icon:hover { border-color: var(--line-strong); background: var(--glass-2); }
.auth-icon svg { width: 20px; height: 20px; flex: 0 0 auto; }

.field { display: block; margin: 0 0 14px; }
.field input { width: 100%; }
.account-box { position: relative; }
.account-box .chevron {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--muted); pointer-events: none;
}
.account-box input { padding-right: 34px; }

.auth-checks { display: flex; justify-content: space-between; margin: 2px 0 18px; font-size: 13px; color: var(--muted); }
.auth-checks label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.auth-checks input { accent-color: var(--primary); width: auto; }

.btn-block { width: 100%; }
.auth-links { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }

/* 登录面板动画 */
.auth-panel { animation: fade-in 0.15s ease; }

/* 找回密码面板 */
.recover-title { font-size: 17px; margin: 0 0 16px; font-weight: 600; }
.rec-hint { margin: 10px 0 0; min-height: 1.2em; line-height: 1.5; word-break: break-all; }
.rec-textarea { width: 100%; resize: vertical; font: inherit; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--field-bg, #fff); color: inherit; box-sizing: border-box; }
.rec-textarea:focus { outline: 2px solid var(--primary); outline-offset: -1px; }
.qr-box {
  width: 168px; height: 168px; margin: 8px auto 14px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.7); border: 1px dashed var(--line-strong);
}
.qr-mascot { width: 72px; height: 72px; }
.qr-hint { text-align: center; margin: 0 0 16px; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------- 大厅顶栏 ---------- */
.lobby-header {
  max-width: 1180px;
  margin: 0 auto 20px;
  border-radius: var(--radius);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.lobby-id { display: flex; align-items: center; gap: 12px; }
.lobby-id-text { min-width: 0; }
.lobby-name b { font-size: 15px; }
.badge-row { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 3px; }
.lobby-search input { width: 240px; }
.lobby-id { cursor: pointer; }
.lobby-id:hover .profile-link { text-decoration: underline; }
.profile-link { background: none; border: none; color: var(--primary); cursor: pointer; font-size: 13px; padding: 0; }

.mini-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: #fff; font-weight: 600;
  overflow: hidden;
}
.mini-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- 大厅 ---------- */
.lobby-body { max-width: 1180px; margin: 0 auto; }
.cat-tabs { display: flex; gap: 8px; margin: 4px 0 18px; }
.cat-tab {
  background: var(--glass); border: 1px solid var(--line); color: var(--muted);
  padding: 7px 14px; font-size: 13px;
}
.cat-tab.active { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; border-color: transparent; }
.lobby-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.lobby-head h2 { margin: 0 0 6px; font-size: 20px; }
.create-row { display: flex; gap: 8px; }
.create-row input { width: 220px; }

.channel-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.channel-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.channel-card:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: var(--shadow-lift); }
.channel-card.featured { grid-column: span 2; grid-row: span 2; }
.channel-cover {
  position: relative;
  height: 100px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.channel-card.featured .channel-cover { height: 100%; min-height: 220px; }
.channel-cover::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(120px 80px at 70% 20%, rgba(255, 255, 255, 0.18), transparent 60%);
}
.channel-cover .cover-initial { font-size: 30px; font-weight: 700; color: rgba(255, 255, 255, 0.92); letter-spacing: 1px; }
.cover-viewers {
  position: absolute; left: 10px; bottom: 10px; z-index: 1;
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; color: #fff;
  background: rgba(24, 34, 52, 0.45); border-radius: 999px; padding: 3px 9px;
}
.cover-viewers .heat-dot { width: 6px; height: 6px; }
.channel-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.channel-card h3 { margin: 0; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.channel-card .row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.channel-card .meta { font-size: 12px; }
.heat-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.channel-card .primary { margin-top: auto; }

.empty-state {
  text-align: center; color: var(--muted);
  padding: 50px 0; display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.empty-art { width: 110px; height: 110px; }

/* ---------- 房间：经典频道窗 ---------- */
.screen-room { display: flex; flex-direction: column; }
.room-bar {
  max-width: 1180px; width: 100%; margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.room-bar-title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.room-bar-title h2 { margin: 0; font-size: 20px; }

.room-body {
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  gap: 16px;
  flex: 1;
  align-items: stretch;
  display: grid;
}
.room-wide { grid-template-columns: 300px 1fr; }

.panel {
  border-radius: var(--radius);
  padding: 16px;
  background: var(--glass);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 16px 36px rgba(40, 60, 95, 0.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.panel h3 { margin: 0 0 12px; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.panel h3::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
}

/* 左：成员分组树 */
.member-panel { min-height: 300px; overflow-y: auto; }
.member-list { display: flex; flex-direction: column; gap: 2px; }
.member-group { margin-bottom: 14px; }
.member-group:last-child { margin-bottom: 0; }
.group-title { font-size: 12px; color: var(--muted); margin: 2px 0 8px; display: flex; align-items: center; gap: 6px; }
.group-title .count { color: var(--muted); opacity: 0.7; }
.member-row { display: flex; align-items: center; gap: 9px; padding: 7px 6px; font-size: 14px; border-radius: 10px; }
.member-row:hover { background: var(--glass-2); }
.member-row .mic-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; }
.member-row.on-mic .mic-dot { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.member-row .rank { font-size: 12px; color: var(--muted); width: 18px; flex: none; text-align: right; }
.member-row .mini-avatar { width: 30px; height: 30px; font-size: 13px; }
.member-row .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-row .role-tag { margin-left: auto; font-size: 11px; color: var(--muted); flex: none; }
.member-row.on-mic .role-tag { color: var(--cyan); }

/* 右：公屏 + 诊断 */
.chat-main-col { display: flex; flex-direction: column; gap: 16px; min-height: 300px; }

/* 公屏（行内流式消息，昵称按身份着色） */
.chat-panel { flex: 1; display: flex; flex-direction: column; }
.chat-list {
  flex: 1; min-height: 220px; max-height: 420px;
  overflow-y: auto; display: flex; flex-direction: column; gap: 2px;
  padding-right: 4px; list-style: none; margin: 0; padding-left: 0;
}
.chat-row { display: flex; gap: 9px; align-items: flex-start; padding: 6px 8px; border-radius: 10px; font-size: 14px; line-height: 1.55; }
.chat-row:hover { background: var(--glass-2); }
.chat-row .mini-avatar { width: 28px; height: 28px; font-size: 12px; margin-top: 1px; }
.chat-main { flex: 1; min-width: 0; }
.chat-main .from { font-weight: 600; margin-right: 6px; }
.chat-main .from.owner { color: var(--gold); }
.chat-main .from.admin { color: #d45872; }
.chat-main .from.bot { color: #3f7fc4; }
.chat-main .from.normal { color: var(--primary-2); }
.chat-text { word-break: break-word; }
.chat-row .time { margin-left: 8px; font-size: 11px; color: var(--muted); opacity: 0.65; }
.chat-row.sys .chat-main { color: var(--muted); }
/* 系统通知行（预留）：信息图标 + 灰色文本 + 行内操作链接 */
.chat-row.notice { gap: 8px; }
.chat-row.notice::before { content: "i"; flex: none; width: 16px; height: 16px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 11px; display: flex; align-items: center; justify-content: center; margin-top: 2px; }

/* 输入工具栏：图标占位（暂未开放，禁用态） */
.chat-toolbar { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.chat-form { flex: 1; display: flex; }
.chat-form input { width: 100%; }
.tool-btn {
  width: 40px; height: 40px; padding: 0; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--glass); border: 1px solid var(--line); color: var(--muted);
  border-radius: 10px;
}
.tool-btn svg { width: 20px; height: 20px; }
.tool-btn:disabled { opacity: 0.45; cursor: not-allowed; }
#btn-send { flex: none; }

/* 徽章 */
.badge {
  display: inline-flex; align-items: center;
  font-size: 11px; line-height: 1;
  padding: 3px 7px; border-radius: 6px;
  white-space: nowrap; border: 1px solid transparent;
}
.badge.noble { background: rgba(124, 111, 214, 0.16); color: #5a4aa8; border-color: rgba(124, 111, 214, 0.28); }
.badge.identity { background: rgba(184, 134, 47, 0.16); color: #8a6320; border-color: rgba(184, 134, 47, 0.3); }
.badge.loyalty { background: rgba(47, 156, 114, 0.15); color: #257a57; }
.badge.bot { background: rgba(79, 134, 232, 0.15); color: #3567b0; }
.badge.muted { background: rgba(180, 120, 55, 0.16); color: #96621f; }
.badge.ban { background: rgba(201, 85, 79, 0.14); color: #a83f3a; }

/* 音频诊断 */
.audio-stats { display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.audio-stats .stat-row { display: flex; justify-content: space-between; gap: 10px; }
.audio-stats .policy { color: var(--cyan); }

/* 底部状态栏 */
.room-controls { max-width: 1180px; width: 100%; margin: 18px auto 0; display: flex; justify-content: center; }
.control-dock { display: flex; align-items: center; gap: 12px; padding: 10px 18px; border-radius: 999px; box-shadow: var(--shadow); }
.dock-name { font-size: 14px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dock-btn { min-width: 84px; }
.dock-slider { display: flex; align-items: center; opacity: 0.45; cursor: not-allowed; }
.dock-slider input[type="range"] { width: 96px; accent-color: var(--primary); }
.dock-check { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--muted); opacity: 0.6; cursor: not-allowed; }
.dock-check input { accent-color: var(--primary); }

.chat-list::-webkit-scrollbar { width: 6px; }
.chat-list::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 6px; }

/* 渲染降级 */
body[data-render-level='degraded'] * { transition: none !important; }

/* ---------- 个人信息 ---------- */
.screen-profile { display: flex; justify-content: center; }
.profile-wrap { width: min(560px, 100%); }
.profile-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.profile-bar h2 { margin: 0; font-size: 20px; }
.profile-bar-spacer { width: 84px; }

.profile-card { border-radius: 22px; padding: 28px; }
.profile-top { display: flex; gap: 18px; align-items: center; margin-bottom: 22px; }
.profile-avatar-lg {
  width: 84px; height: 84px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 700; color: #fff;
  box-shadow: 0 10px 24px rgba(61, 100, 170, 0.3); overflow: hidden;
}
.profile-avatar-lg img { width: 100%; height: 100%; object-fit: cover; }
.profile-id-text { min-width: 0; flex: 1; }
.profile-id-text h2 { margin: 0 0 6px; font-size: 22px; }
.profile-meta { display: flex; gap: 12px; flex-wrap: wrap; }
.profile-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }

.profile-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 20px 0; }
.stat-card {
  border: 1px solid var(--line); background: var(--glass);
  border-radius: 14px; padding: 14px; text-align: center;
}
.stat-card .num { font-size: 20px; font-weight: 700; }
.stat-card .label { color: var(--muted); font-size: 12px; margin-top: 4px; }

.profile-form { display: flex; flex-direction: column; gap: 14px; border-top: 1px solid var(--line); padding-top: 18px; }
.field-row label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.field-row input { width: 100%; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.avatar-upload { display: flex; align-items: center; gap: 14px; }
.avatar-preview {
  width: 56px; height: 56px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700; color: #fff; overflow: hidden;
  background: var(--line); border: 1px solid var(--line-strong);
}
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.avatar-upload-side { display: flex; flex-direction: column; gap: 6px; }
.avatar-upload-hint { font-size: 12px; }
.avatar-url { margin-top: 10px; }

.gender-row { display: flex; gap: 10px; }
.gender-option {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  padding: 9px 14px; border: 1px solid var(--line); border-radius: 10px;
  background: rgba(255, 255, 255, 0.6); font-size: 14px; color: var(--text);
}
.gender-option input { width: auto; accent-color: var(--primary); }
.gender-option:has(input:checked) { border-color: var(--primary); background: rgba(79, 134, 232, 0.12); }

.info-rows { display: flex; flex-direction: column; gap: 8px; }
.info-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  border: 1px solid var(--line); border-radius: 12px;
  background: rgba(255, 255, 255, 0.5); padding: 10px 14px; font-size: 14px;
}
.info-label { color: var(--muted); }
.info-value { color: var(--text); font-variant-numeric: tabular-nums; }

.profile-actions { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.profile-actions .meta { margin-right: auto; color: var(--danger); }

@media (max-width: 560px) {
  .field-grid { grid-template-columns: 1fr; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .channel-list { grid-template-columns: repeat(3, 1fr); }
  .room-wide { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .screen { padding: 16px; }
  .channel-list { grid-template-columns: repeat(2, 1fr); }
  .channel-card.featured { grid-column: span 2; grid-row: span 1; }
  .lobby-head, .lobby-header { flex-direction: column; align-items: stretch; }
  .create-row input, .lobby-search input { flex: 1; width: auto; }
  .control-dock { flex-wrap: wrap; justify-content: center; border-radius: var(--radius); }
  .chat-toolbar { flex-wrap: wrap; }
  .profile-stats { grid-template-columns: 1fr; }
  .profile-top { flex-direction: column; text-align: center; }
  .profile-badges, .profile-meta { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ---------- 好友抽屉 / 私聊浮层 ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(35, 50, 75, 0.18);
  display: flex;
}
.overlay.hidden { display: none; }

.drawer {
  margin-left: auto; width: 340px; max-width: 86vw; height: 100%;
  border-radius: 0; border-top: none; border-right: none;
  display: flex; flex-direction: column; padding: 18px 16px; gap: 12px;
  overflow-y: auto;
}
.drawer-head { display: flex; align-items: center; justify-content: space-between; }
.drawer-head h3 { margin: 0; font-size: 17px; }
.drawer-head .ghost { width: 34px; height: 34px; padding: 0; }

.friend-add { display: flex; gap: 8px; }
.friend-add input { flex: 1; }

.friend-group-title {
  margin: 6px 0 0; font-size: 13px; color: var(--muted);
  display: flex; align-items: center; gap: 6px;
}
.friend-list { display: flex; flex-direction: column; gap: 8px; }
.friend-list:empty::after {
  content: '暂无内容'; display: block; font-size: 13px; color: var(--muted);
  padding: 6px 2px;
}

.friend-row {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--line); border-radius: 12px;
  background: rgba(255, 255, 255, 0.55); padding: 9px 12px;
}
.friend-row-info { flex: 1; min-width: 0; }
.friend-row-name { font-size: 14px; color: var(--text); display: flex; align-items: center; gap: 6px; }
.friend-row-meta { font-size: 12px; color: var(--muted); }
.online-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); display: inline-block;
}
.online-dot.on { background: #2fa97c; }
.friend-actions { display: flex; gap: 6px; flex: none; }
.friend-actions button { font-size: 13px; padding: 6px 10px; }

/* 私聊浮层 */
.dm-overlay { justify-content: flex-end; align-items: stretch; background: transparent; }
.dm-panel {
  width: 380px; max-width: 92vw; height: 100%; border-radius: 0; border-top: none; border-right: none;
  display: flex; flex-direction: column;
}
.dm-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.dm-head-id { display: flex; align-items: center; gap: 10px; }
.dm-name { font-size: 15px; font-weight: 600; }
.dm-list { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.dm-row { display: flex; gap: 8px; max-width: 82%; }
.dm-row.me { align-self: flex-end; flex-direction: row-reverse; }
.dm-bubble {
  padding: 9px 12px; border-radius: 14px; font-size: 14px; line-height: 1.45;
  background: rgba(255, 255, 255, 0.7); border: 1px solid var(--line); word-break: break-word;
}
.dm-row.me .dm-bubble { background: var(--primary); color: #fff; border-color: var(--primary); }
.dm-time { font-size: 11px; color: var(--muted); align-self: flex-end; }
.dm-form { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
.dm-form input { flex: 1; }

/* 圣兽入场横幅的定位容器 */
.beast-host {
  position: fixed;
  left: 0; right: 0; top: 0;
  height: 0;
  z-index: 80;
  pointer-events: none;
}
.beast-host .beast-banner { position: fixed; top: 76px; }


/* ---------- 实名认证卡片 ---------- */
.kyc-card {
  margin-top: 18px; padding: 16px 18px; border-radius: 12px;
  border: 1px solid rgba(120, 140, 180, .18); background: #fbfcff;
}
.kyc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.kyc-head b { font-size: 14px; }
.kyc-badge {
  font-size: 11px; padding: 2px 9px; border-radius: 10px; font-weight: 600;
  background: #f2f4f8; color: #8b95a7;
}
.kyc-badge.ok { background: #e8f5ec; color: #2e8b57; }
.kyc-badge.wait { background: #fff3e0; color: #b8860b; }
.kyc-badge.bad { background: #fdecea; color: #d0453c; }
.kyc-note { line-height: 1.7; margin: 0 0 10px; }
.kyc-row { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.kyc-row > label { width: 76px; flex: none; font-size: 12.5px; color: #5a6a82; }
.kyc-row input {
  flex: 1; height: 36px; border: 1px solid rgba(120, 140, 180, .26);
  border-radius: 9px; padding: 0 11px; font-size: 13px;
}
.kyc-agree {
  display: flex; gap: 8px; align-items: flex-start;
  font-size: 12.5px; color: #5a6a82; line-height: 1.6;
  margin: 2px 0 12px; cursor: pointer;
}
.kyc-agree input { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.kyc-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.kyc-msg { font-size: 12.5px; }
.kyc-msg.ok { color: #2e8b57; }
.kyc-msg.err { color: #d0453c; }
