/* ===================================================================
   暗号 · CIPHER  —  多主题设计系统
   4 套色系分明的主题：午夜 / 昼白 / 翡翠 / 绯霞
   颜色全部走 CSS 变量，[data-theme] 切换；字体 Inter + cv01/ss03
=================================================================== */

/* ---------- 午夜 Midnight：纯黑 + 金黄（暖）---------- */
:root,
[data-theme="midnight"] {
  --bg: #08080a;
  --bg-2: #121016;
  --ink: #f7f2e6;
  --ink-dim: #b0a885;
  --ink-faint: #756a4f;

  --accent: #f5c542;
  --accent-2: #e0a326;
  --accent-ink: #1a1400;
  --status: #4cc38a;
  --success: #4cc38a; --danger: #ff5d5d; --warning: #ffb454; --info: #f5c542;

  --border: rgba(245, 197, 66, 0.14);
  --border-subtle: rgba(245, 197, 66, 0.08);
  --field-bg: rgba(245, 197, 66, 0.05);
  --field-bg-hover: rgba(245, 197, 66, 0.09);
  --chip-bg: rgba(245, 197, 66, 0.05);
  --icon-bg: rgba(245, 197, 66, 0.06);
  --icon-bg-hover: rgba(245, 197, 66, 0.13);

  --card-bg: rgba(255, 240, 200, 0.03);
  --card-blur: 20px;
  --card-shadow: 0 1px 0 0 rgba(245, 197, 66, 0.06) inset, 0 24px 70px rgba(0, 0, 0, 0.6);

  --grad: linear-gradient(135deg, #f5c542, #e0a326);
  --bubble-me: linear-gradient(135deg, #f5cb4d, #e6a92e);
  --bubble-me-ink: #1a1400;
  --bubble-other-bg: rgba(245, 197, 66, 0.09);
  --bubble-other-ink: var(--ink);

  --grid-color: rgba(245, 197, 66, 0.03);
  --blob-opacity: 0.24;
  --blob-blend: screen;
  --blob-1: #d9a520;
  --blob-2: #f5c542;
  --blob-3: #b8860b;
  --btn-shadow: 0 14px 34px rgba(245, 197, 66, 0.34);
}

/* ---------- 昼白 Daylight：纯白 + 蓝（亮）---------- */
[data-theme="daylight"] {
  --bg: #ffffff;
  --bg-2: #f7f8fa;
  --ink: #16181d;
  --ink-dim: #5b6270;
  --ink-faint: #9aa0ad;

  --accent: #2f6bff;
  --accent-2: #6366f1;
  --accent-ink: #ffffff;
  --status: #0a8f57;
  --success: #0a8f57; --danger: #e5484d; --warning: #d68a00; --info: #2f6bff;

  --border: rgba(16, 24, 40, 0.1);
  --border-subtle: rgba(16, 24, 40, 0.07);
  --field-bg: #ffffff;
  --field-bg-hover: #fafbfc;
  --chip-bg: #f4f6f9;
  --icon-bg: #f2f4f7;
  --icon-bg-hover: #e8ebf0;

  --card-bg: #ffffff;
  --card-blur: 0px;
  --card-shadow: rgba(16, 24, 40, 0.08) 0 0 0 1px, rgba(16, 24, 40, 0.05) 0 2px 4px, rgba(16, 24, 40, 0.07) 0 14px 32px -14px;

  --grad: linear-gradient(135deg, #2f6bff, #6366f1);
  --bubble-me: linear-gradient(135deg, #2f6bff, #6366f1);
  --bubble-me-ink: #ffffff;
  --bubble-other-bg: #f0f2f6;
  --bubble-other-ink: #16181d;

  --grid-color: rgba(16, 24, 40, 0.04);
  --blob-opacity: 0.14;
  --blob-blend: normal;
  --blob-1: #a5c4fc;
  --blob-2: #c4b5fd;
  --blob-3: #bae6fd;
  --btn-shadow: 0 12px 28px rgba(47, 107, 255, 0.28);
}

/* ---------- 翡翠 Emerald：墨绿黑 + 翡翠绿 ---------- */
[data-theme="emerald"] {
  --bg: #06120e;
  --bg-2: #0b1d17;
  --ink: #e8f6ef;
  --ink-dim: #7ba694;
  --ink-faint: #4f7264;

  --accent: #10d99a;
  --accent-2: #2dd4bf;
  --accent-ink: #04160f;
  --status: #34d399;
  --success: #34d399; --danger: #ff6b8a; --warning: #ffc24d; --info: #2dd4bf;

  --border: rgba(120, 255, 214, 0.12);
  --border-subtle: rgba(120, 255, 214, 0.07);
  --field-bg: rgba(120, 255, 214, 0.05);
  --field-bg-hover: rgba(120, 255, 214, 0.09);
  --chip-bg: rgba(120, 255, 214, 0.05);
  --icon-bg: rgba(120, 255, 214, 0.06);
  --icon-bg-hover: rgba(120, 255, 214, 0.12);

  --card-bg: rgba(16, 40, 32, 0.5);
  --card-blur: 20px;
  --card-shadow: 0 1px 0 0 rgba(120, 255, 214, 0.08) inset, 0 24px 70px rgba(0, 20, 12, 0.6);

  --grad: linear-gradient(135deg, #10d99a, #2dd4bf);
  --bubble-me: linear-gradient(135deg, #0fc98f, #22c9b4);
  --bubble-me-ink: #04160f;
  --bubble-other-bg: rgba(120, 255, 214, 0.08);
  --bubble-other-ink: var(--ink);

  --grid-color: rgba(120, 255, 214, 0.03);
  --blob-opacity: 0.3;
  --blob-blend: screen;
  --blob-1: #10b981;
  --blob-2: #14b8a6;
  --blob-3: #06b6d4;
  --btn-shadow: 0 14px 34px rgba(16, 217, 154, 0.35);
}

/* ---------- 绯霞 Sunset：暖紫黑 + 珊瑚粉/琥珀 ---------- */
[data-theme="sunset"] {
  --bg: #140a11;
  --bg-2: #20101a;
  --ink: #fbeaf0;
  --ink-dim: #c090a3;
  --ink-faint: #8c6070;

  --accent: #ff5d8f;
  --accent-2: #ff9d5c;
  --accent-ink: #ffffff;
  --status: #ffb454;
  --success: #4cc38a; --danger: #ff5d7a; --warning: #ffb454; --info: #ff9d5c;

  --border: rgba(255, 180, 210, 0.13);
  --border-subtle: rgba(255, 180, 210, 0.08);
  --field-bg: rgba(255, 180, 210, 0.055);
  --field-bg-hover: rgba(255, 180, 210, 0.09);
  --chip-bg: rgba(255, 180, 210, 0.055);
  --icon-bg: rgba(255, 180, 210, 0.06);
  --icon-bg-hover: rgba(255, 180, 210, 0.12);

  --card-bg: rgba(46, 22, 36, 0.52);
  --card-blur: 20px;
  --card-shadow: 0 1px 0 0 rgba(255, 180, 210, 0.09) inset, 0 24px 70px rgba(20, 0, 10, 0.6);

  --grad: linear-gradient(135deg, #ff5d8f, #ff9d5c);
  --bubble-me: linear-gradient(135deg, #ff5d8f, #ff8a6b);
  --bubble-me-ink: #ffffff;
  --bubble-other-bg: rgba(255, 180, 210, 0.09);
  --bubble-other-ink: var(--ink);

  --grid-color: rgba(255, 180, 210, 0.03);
  --blob-opacity: 0.32;
  --blob-blend: screen;
  --blob-1: #ff5d8f;
  --blob-2: #ff9d5c;
  --blob-3: #c026d3;
  --btn-shadow: 0 14px 34px rgba(255, 93, 143, 0.36);
}

/* ---------- 基础 ---------- */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  /* 统一刻度：圆角 / 间距 / 动效 —— 全站一致的视觉节奏 */
  --r-xs: 8px; --r-sm: 10px; --r-md: 12px; --r-lg: 16px; --r-xl: 20px; --r-2xl: 24px; --r-full: 999px;
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-8: 32px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --t-fast: 0.15s; --t-med: 0.24s; --t-slow: 0.4s;
}

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  font-feature-settings: "cv01", "ss03";
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
  transition: background 0.4s ease, color 0.4s ease;
}
body { position: relative; overflow: hidden; }

/* ---------- 动态背景 ---------- */
.aurora { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: var(--bg); transition: background 0.4s ease; }
/* 黑客帝国字符雨：隐约铺在背景层，主题不同强度不同 */
.matrix-rain { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0.11; transition: opacity 0.4s ease; }
[data-theme="midnight"] .matrix-rain { opacity: 0.15; }
[data-theme="daylight"] .matrix-rain { opacity: 0.06; }
[data-theme="emerald"] .matrix-rain { opacity: 0.12; }
[data-theme="sunset"] .matrix-rain { opacity: 0.08; }
@media (prefers-reduced-motion: reduce) { .matrix-rain { display: none; } }
.blob {
  position: absolute; border-radius: 50%; filter: blur(70px);
  opacity: var(--blob-opacity); mix-blend-mode: var(--blob-blend);
  animation: drift 26s ease-in-out infinite; transition: opacity 0.4s ease;
}
.blob.b1 { width: 46vmax; height: 46vmax; left: -12vmax; top: -14vmax; background: radial-gradient(circle, var(--blob-1), transparent 65%); }
.blob.b2 { width: 40vmax; height: 40vmax; right: -12vmax; top: 8vmax; background: radial-gradient(circle, var(--blob-2), transparent 65%); animation-delay: -9s; }
.blob.b3 { width: 38vmax; height: 38vmax; left: 20vmax; bottom: -16vmax; background: radial-gradient(circle, var(--blob-3), transparent 65%); animation-delay: -16s; }
@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(7vmax, 5vmax) scale(1.1); }
  66% { transform: translate(-6vmax, 3vmax) scale(0.95); }
}
.grid-overlay {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(130% 90% at 50% 0%, #000 30%, transparent 82%);
  -webkit-mask-image: radial-gradient(130% 90% at 50% 0%, #000 30%, transparent 82%);
}

/* ---------- 顶部控制 ---------- */
.top-controls { position: fixed; top: calc(14px + var(--safe-t)); right: 16px; z-index: 60; display: flex; gap: 8px; }
.top-left-controls { position: fixed; top: calc(14px + var(--safe-t)); left: 16px; z-index: 60; display: flex; gap: 8px; }
.in-chat .top-left-controls { display: none; }
@media (max-width: 480px) { .top-left-controls { top: calc(10px + var(--safe-t)); left: 12px; gap: 6px; } }

/* 扫一扫遮罩层 */
.scan-view { position: fixed; inset: 0; z-index: 96; background: #000; display: flex; flex-direction: column; }
.scan-video { flex: 1; width: 100%; height: 100%; object-fit: cover; background: #000; }
.scan-mask { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; pointer-events: none; }
.scan-frame { width: min(68vw, 280px); aspect-ratio: 1; border-radius: 22px; position: relative; box-shadow: 0 0 0 100vmax rgba(0,0,0,0.5); }
.scan-frame::before, .scan-frame::after { content: ""; position: absolute; width: 34px; height: 34px; border: 3px solid #fff; }
.scan-frame::before { top: -2px; left: -2px; border-right: none; border-bottom: none; border-top-left-radius: 20px; }
.scan-frame::after { bottom: -2px; right: -2px; border-left: none; border-top: none; border-bottom-right-radius: 20px; }
.scan-laser { position: absolute; left: 6%; right: 6%; height: 2px; background: linear-gradient(90deg, transparent, #4cc38a, transparent); top: 8%; animation: scanScan 2.2s ease-in-out infinite; box-shadow: 0 0 10px #4cc38a; }
@keyframes scanScan { 0%,100% { top: 8%; } 50% { top: 90%; } }
.scan-hint { color: #fff; font-size: 14px; font-weight: 600; text-shadow: 0 1px 4px rgba(0,0,0,0.6); }
.scan-bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; gap: 12px; justify-content: center; padding: 18px; padding-bottom: calc(18px + var(--safe-b)); }
.scan-action { background: var(--grad); color: var(--accent-ink); border: none; border-radius: 999px; padding: 12px 22px; font-size: 15px; font-weight: 700; cursor: pointer; font-family: inherit; box-shadow: var(--btn-shadow); }
.scan-action.ghost { background: rgba(255,255,255,0.18); color: #fff; box-shadow: none; }
.chip-btn {
  background: var(--card-bg);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border); color: var(--ink-dim); border-radius: 999px;
  padding: 7px 13px; font-size: 13px; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.chip-btn:hover { color: var(--ink); background: var(--icon-bg-hover); }
.chip-btn .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--grad); }
.lang-toggle #langLabel { color: var(--accent); }
.lang-toggle.en #langLabel { color: var(--ink-dim); }
.lang-toggle .lang-slash { opacity: 0.4; }
.lang-toggle.en .lang-en { color: var(--accent); }

/* ---------- 屏幕 ---------- */
.screen { position: relative; z-index: 1; display: none; height: 100dvh; }
.screen.active { display: flex; }
.glass {
  background: var(--card-bg);
  backdrop-filter: blur(var(--card-blur)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--card-blur)) saturate(140%);
  border: 1px solid var(--border);
}

/* ---------- 进入页 ---------- */
#lobby { flex-direction: column; align-items: center; justify-content: safe center; padding: calc(66px + var(--safe-t)) 22px calc(28px + var(--safe-b)); overflow-y: auto; }
.lobby-inner { width: 100%; max-width: 440px; display: flex; flex-direction: column; align-items: center; animation: rise 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

.brand { text-align: center; margin-bottom: 20px; }
/* Logo 与标题同排 */
.brand-head { display: flex; align-items: center; justify-content: center; gap: 16px; }
.brand-mark { width: 64px; height: 64px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border-radius: 20px; background: var(--card-bg); border: 1px solid var(--border); box-shadow: var(--card-shadow); animation: floaty 5.5s ease-in-out infinite; }
.brand-mark svg { width: 42px; height: 42px; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.brand-name { margin: 0; font-size: 40px; font-weight: 700; letter-spacing: -1.2px; color: var(--ink); }
.brand-tagline { margin: 12px 0 0; color: var(--ink-dim); font-size: 15px; letter-spacing: -0.16px; line-height: 1.5; }

.stat-badge { display: inline-flex; align-items: center; gap: 7px; flex-wrap: wrap; justify-content: center; background: var(--chip-bg); border: 1px solid var(--border-subtle); color: var(--ink-dim); padding: 8px 16px; border-radius: 999px; font-size: 13px; margin-bottom: 24px; backdrop-filter: blur(10px) saturate(140%); -webkit-backdrop-filter: blur(10px) saturate(140%); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12); }
.stat-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--status); box-shadow: 0 0 10px var(--status); animation: blink 2s infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.stat-num { color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-sep { opacity: 0.3; margin: 0 3px; }

.glass-card { width: 100%; padding: 28px 26px; border-radius: 24px; background: var(--card-bg); backdrop-filter: blur(calc(var(--card-blur) + 10px)) saturate(150%); -webkit-backdrop-filter: blur(calc(var(--card-blur) + 10px)) saturate(150%); border: 1px solid var(--border); box-shadow: var(--card-shadow); }
/* 深色主题：给主卡片一层与背景同色的半透明阻尼，压住透进来的代码雨，让文字稳稳落在操作区上 */
[data-theme="midnight"] .glass-card,
[data-theme="emerald"] .glass-card,
[data-theme="sunset"] .glass-card { background: color-mix(in srgb, var(--bg) 62%, transparent); }

.profile-row { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.avatar-btn { position: relative; width: 52px; height: 52px; border-radius: 50%; border: none; padding: 0; cursor: pointer; flex-shrink: 0; background: none; }
.avatar-btn img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; display: block; background: var(--bg-2); border: 1px solid var(--border); }
.avatar-edit { position: absolute; right: -2px; bottom: -2px; width: 22px; height: 22px; border-radius: 50%; background: var(--grad); color: #fff; font-size: 11px; display: flex; align-items: center; justify-content: center; border: 2px solid var(--bg); }
.avatar-wrap { position: relative; flex-shrink: 0; }
.avatar-reset { position: absolute; left: -4px; top: -4px; width: 22px; height: 22px; border-radius: 50%; background: var(--icon-bg); color: var(--ink-dim); border: 2px solid var(--bg); display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; transition: background var(--t-fast), color var(--t-fast); z-index: 2; }
.avatar-reset:hover { background: var(--icon-bg-hover); color: var(--ink); }
.avatar-reset svg { display: block; }
.nick-wrap { flex: 1; position: relative; display: flex; }
.roll-btn { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: var(--icon-bg); border: none; border-radius: 9px; width: 34px; height: 34px; cursor: pointer; font-size: 15px; color: var(--ink-dim); transition: transform 0.3s, background 0.2s, color 0.2s; }
.roll-btn:hover { background: var(--icon-bg-hover); color: var(--ink); }
.roll-btn:active { transform: translateY(-50%) rotate(180deg); }

.field { width: 100%; background: var(--field-bg); border: 1px solid var(--border); color: var(--ink); border-radius: 13px; padding: 14px 16px; font-size: 15px; outline: none; transition: border-color 0.18s, box-shadow 0.18s, background 0.18s; font-family: inherit; }
.nick-input { padding-right: 48px; }
.field:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); background: var(--field-bg-hover); }
.field::placeholder { color: color-mix(in srgb, var(--ink-dim) 72%, transparent); }

.field-label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-dim); margin: 0 0 12px 3px; letter-spacing: 0.4px; text-transform: uppercase; }
.code-wrap { margin-bottom: 20px; }

.primary-btn { position: relative; width: 100%; border: none; border-radius: 14px; padding: 16px; font-size: 16px; font-weight: 600; color: var(--accent-ink); background: var(--grad); cursor: pointer; overflow: hidden; box-shadow: var(--btn-shadow); transition: transform 0.12s, filter 0.2s, opacity 0.2s; }
.primary-btn:hover { filter: brightness(1.06); }
.primary-btn:active { transform: scale(0.985); }
.primary-btn:disabled { opacity: 0.55; cursor: default; }
.btn-label { position: relative; z-index: 1; }
.btn-glow { position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent); transform: skewX(-20deg); animation: sheen 3.6s ease-in-out infinite; }
@keyframes sheen { 0%, 62% { left: -60%; } 100% { left: 135%; } }

.hint { margin: 16px 2px 0; font-size: 12px; color: var(--ink-dim); opacity: 0.82; line-height: 1.65; }

.feat-row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 22px; }
.feat-chip { font-size: 12px; color: var(--ink-dim); background: var(--chip-bg); border: none; padding: 9px 12px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.feat-chip svg { color: var(--accent); opacity: 0.85; flex-shrink: 0; }
.feat-chip em { font-style: normal; }

/* ---------- 聊天页 ---------- */
#chat { flex-direction: column; }
.chat-header { display: flex; align-items: center; gap: 12px; padding: 12px 14px; padding-top: calc(12px + var(--safe-t)); border-bottom: 1px solid var(--border-subtle); z-index: 6; position: relative; }
.room-meta { flex: 1; min-width: 0; }
.room-title { font-weight: 600; font-size: 16px; letter-spacing: -0.2px; }
.room-status { font-size: 12px; color: var(--ink-dim); margin-top: 1px; }
.room-status.online { color: var(--status); }

.icon-btn { background: var(--icon-bg); border: 1px solid var(--border-subtle); color: var(--ink); width: 40px; height: 40px; border-radius: 12px; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background 0.18s; }
.icon-btn:hover { background: var(--icon-bg-hover); }
.members-btn { width: auto; padding: 0 12px; gap: 6px; font-size: 14px; font-weight: 600; }

.countdown { position: relative; width: 40px; height: 40px; flex-shrink: 0; }
.countdown svg { transform: rotate(-90deg); }
.cd-track { fill: none; stroke: var(--border); stroke-width: 3; }
.cd-arc { fill: none; stroke: var(--status); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 106.8; stroke-dashoffset: 0; transition: stroke-dashoffset 1s linear, stroke 0.4s; }
.cd-text { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink-dim); }
.countdown.warn .cd-arc { stroke: var(--danger); }
.countdown.warn .cd-text { color: var(--danger); }

.members-panel { position: absolute; top: 0; right: 0; bottom: 0; width: 280px; max-width: 82%; transform: translateX(100%); transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1); z-index: 30; padding: calc(18px + var(--safe-t)) 18px 18px; overflow-y: auto; border-left: 1px solid var(--border); background: var(--bg-2); }
.members-panel.open { transform: translateX(0); box-shadow: -20px 0 60px rgba(0, 0, 0, 0.3); }
.members-head { font-weight: 600; margin-bottom: 14px; font-size: 15px; }
.members-list { list-style: none; margin: 0; padding: 0; }
.members-list li { display: flex; align-items: center; gap: 11px; padding: 9px 0; font-size: 14px; }
.members-list img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border); }
.panel-scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.4); z-index: 25; }

.messages { flex: 1; overflow-y: auto; padding: 18px 14px; display: flex; flex-direction: column; gap: 14px; }
.messages::-webkit-scrollbar { width: 6px; }
.messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.msg-row { display: flex; gap: 9px; max-width: 84%; animation: pop 0.25s ease both; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }
.msg-row.me { align-self: flex-end; flex-direction: row-reverse; }
.msg-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 1px solid var(--border); }
.msg-body { display: flex; flex-direction: column; min-width: 0; }
.msg-row.me .msg-body { align-items: flex-end; }
.msg-nick { font-size: 11px; color: var(--ink-dim); margin: 0 4px 4px; }

.bubble { padding: 11px 14px; border-radius: 16px; font-size: 15px; line-height: 1.5; word-break: break-word; white-space: pre-wrap; background: var(--bubble-other-bg); border: 1px solid var(--border-subtle); color: var(--bubble-other-ink); border-top-left-radius: 6px; }
.msg-row.me .bubble { background: var(--bubble-me); border: none; color: var(--bubble-me-ink); border-radius: 16px; border-top-right-radius: 6px; }
.bubble.img-bubble { padding: 5px; }
.bubble.img-bubble img { max-width: 240px; max-height: 320px; border-radius: 12px; display: block; cursor: pointer; }

.voice-bubble { display: flex; align-items: center; gap: 11px; cursor: pointer; min-width: 130px; user-select: none; }
.voice-bubble .vplay { font-size: 15px; }
.voice-bubble .vwave { flex: 1; height: 22px; display: flex; align-items: center; gap: 2px; }
.voice-bubble .vwave i { flex: 1; background: currentColor; opacity: 0.5; border-radius: 2px; height: 40%; }
.voice-bubble .vwave i:nth-child(3n) { height: 90%; }
.voice-bubble .vwave i:nth-child(3n + 1) { height: 60%; }
.voice-bubble .vdur { font-size: 12px; opacity: 0.85; font-variant-numeric: tabular-nums; }

.msg-foot { display: flex; align-items: center; gap: 6px; margin: 4px 4px 0; }
.msg-time { font-size: 10px; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.msg-read { font-size: 10px; color: var(--status); display: flex; align-items: center; gap: 2px; }
.msg-read.pending { color: var(--ink-faint); }

.sys-msg { align-self: center; font-size: 12px; color: var(--ink-dim); background: var(--chip-bg); padding: 5px 14px; border-radius: 999px; border: 1px solid var(--border-subtle); max-width: 90%; text-align: center; }

.call-bar { display: flex; align-items: center; gap: 11px; padding: 11px 16px; background: color-mix(in srgb, var(--status) 12%, transparent); border-top: 1px solid color-mix(in srgb, var(--status) 30%, transparent); font-size: 14px; }
.call-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--status); box-shadow: 0 0 10px var(--status); animation: blink 1.3s infinite; }
.call-hangup { margin-left: auto; background: var(--danger); color: #fff; border: none; padding: 8px 18px; border-radius: 999px; cursor: pointer; font-size: 13px; font-weight: 600; }

.composer { display: flex; align-items: center; gap: 8px; padding: 11px 12px; padding-bottom: calc(11px + var(--safe-b)); border-top: 1px solid var(--border-subtle); }
.composer-icon { background: var(--icon-bg); border: 1px solid var(--border-subtle); color: var(--ink-dim); width: 42px; height: 42px; border-radius: 12px; cursor: pointer; flex-shrink: 0; display: flex; align-items: center; justify-content: center; transition: background 0.18s, color 0.18s; }
.composer-icon:hover { background: var(--icon-bg-hover); color: var(--ink); }
.composer-icon.recording { background: var(--danger); color: #fff; border-color: transparent; animation: blink 1s infinite; }
.composer .field { flex: 1; border-radius: 13px; padding: 11px 14px; }
.send-btn { background: var(--grad); border: none; color: var(--accent-ink); padding: 0 18px; height: 42px; border-radius: 12px; font-size: 15px; font-weight: 600; cursor: pointer; flex-shrink: 0; box-shadow: var(--btn-shadow); }
.send-btn:active { transform: scale(0.97); }

.expired-overlay { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 24px; background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.expired-card { width: 100%; max-width: 380px; border-radius: 24px; padding: 34px 28px; text-align: center; box-shadow: var(--card-shadow); }
.expired-icon { font-size: 42px; }
.expired-card h2 { margin: 12px 0 8px; font-size: 22px; letter-spacing: -0.4px; }
.expired-card p { margin: 0 0 22px; color: var(--ink-dim); font-size: 14px; line-height: 1.6; }

.img-viewer { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.94); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.img-viewer img { max-width: 100%; max-height: 100%; border-radius: 10px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6); }

.hidden { display: none !important; }

@media (min-width: 780px) {
  #chat { max-width: 760px; margin: 0 auto; border-left: 1px solid var(--border-subtle); border-right: 1px solid var(--border-subtle); }
}


/* ===================================================================
   私聊 / 移动端适配 / 可点击成员
=================================================================== */

/* 聊天/私聊页时隐藏全局顶部控件，避免与头部按钮重叠 */
.in-chat .top-controls { display: none; }

/* 可点击的成员（发起私聊） */
.members-list li.clickable { cursor: pointer; border-radius: 12px; padding: 9px 8px; margin: 0 -8px; transition: background 0.15s; position: relative; }
.members-list li.clickable:hover { background: var(--icon-bg-hover); }
.members-list li .pm-ico { margin-left: auto; color: var(--ink-faint); display: flex; }
.members-list li.clickable:hover .pm-ico { color: var(--accent); }
.members-list li .pm-unread { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }

/* 私聊覆盖层 */
.pm-screen { position: fixed; inset: 0; z-index: 40; flex-direction: column; background: var(--bg); transform: translateX(100%); visibility: hidden; transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s linear 0.28s; display: flex; }
.pm-screen.open { transform: translateX(0); visibility: visible; transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s; }
.pm-head-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border); flex-shrink: 0; }
@media (min-width: 780px) { .pm-screen { max-width: 760px; margin: 0 auto; border-left: 1px solid var(--border-subtle); border-right: 1px solid var(--border-subtle); } }

/* 协作便签（局域网，Yjs CRDT 实时同步）：富文本编辑器 + 底部工具栏 + 涂鸦画板 */
.tf-notes-body { flex: 1; display: flex; flex-direction: column; padding: 14px; gap: 10px; overflow: hidden; min-height: 0; }
.tf-notes-editor { flex: 1; width: 100%; overflow-y: auto; background: var(--field-bg); border: 1px solid var(--border); color: var(--ink); border-radius: 14px; padding: 14px 16px; font-size: 15px; line-height: 1.65; outline: none; font-family: inherit; transition: border-color 0.18s, box-shadow 0.18s; -webkit-overflow-scrolling: touch; }
.tf-notes-editor:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
.tf-notes-editor:empty::before { content: attr(placeholder); color: var(--ink-faint); pointer-events: none; }
.tf-notes-editor h3 { font-size: 18px; font-weight: 700; margin: 12px 0 6px; }
.tf-notes-editor ul { padding-left: 22px; margin: 6px 0; }
.tf-notes-editor img, .tf-notes-editor .tf-note-inline-img { max-width: 100%; height: auto; border-radius: 10px; margin: 6px 0; display: block; }
.tf-notes-sync { font-size: 11.5px; color: var(--ink-dim); flex-shrink: 0; white-space: nowrap; }
.tf-notes-saved { font-size: 11px; color: var(--ink-faint); flex-shrink: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-left: 10px; }
/* 便签头部：标题/副标题绝不逐字竖排，超出用省略号；窄屏隐藏"已保存"给标题让位 */
#tfNotesPanel .room-meta { min-width: 0; }
#tfNotesPanel .room-title, #tfNotesPanel .room-status { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 440px) { .tf-notes-saved { display: none; } }

/* 底部工具栏 */
.tf-notes-toolbar { display: flex; align-items: center; gap: 6px; padding: 10px 14px calc(10px + var(--safe-b)); flex-wrap: wrap; border-top: 1px solid var(--border-subtle); background: var(--bg-1, var(--bg)); }
.tf-notes-tgroup { display: inline-flex; align-items: center; gap: 2px; }
.tf-fmt { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; background: transparent; border: 1px solid transparent; color: var(--ink-dim); border-radius: 9px; cursor: pointer; padding: 0; transition: background var(--t-fast), color var(--t-fast); }
.tf-fmt:hover { background: var(--icon-bg-hover); color: var(--ink); }
.tf-fmt.active { background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--accent); }
.tf-fmt svg { display: block; }
.tf-fmt-color { position: relative; overflow: hidden; }
.tf-fmt-color input[type="color"] { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; padding: 0; border: none; }
.tf-notes-tsep { width: 1px; align-self: stretch; margin: 2px 4px; background: var(--border-subtle); }
.tf-notes-tool { display: inline-flex; align-items: center; gap: 6px; background: var(--icon-bg); border: 1px solid var(--border-subtle); color: var(--ink-dim); border-radius: 999px; padding: 7px 13px; font-size: 12.5px; font-weight: 600; font-family: inherit; cursor: pointer; transition: background var(--t-fast), color var(--t-fast); }
.tf-notes-tool:hover { background: var(--icon-bg-hover); color: var(--ink); }
.tf-notes-tool svg { display: block; }

/* 涂鸦画板（覆盖层） */
.tf-doodle { position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.tf-doodle.hidden { display: none; }
.tf-doodle-bar { display: flex; align-items: center; gap: 10px; padding: 12px 14px; padding-top: calc(12px + var(--safe-t)); border-bottom: 1px solid var(--border-subtle); flex-wrap: wrap; }
.tf-doodle-spacer { flex: 1; }
.tf-doodle-color { position: relative; width: 30px; height: 30px; border-radius: 50%; overflow: hidden; border: 2px solid var(--border); cursor: pointer; flex-shrink: 0; }
.tf-doodle-color input[type="color"] { position: absolute; inset: -4px; width: calc(100% + 8px); height: calc(100% + 8px); border: none; padding: 0; cursor: pointer; }
.tf-doodle-size { width: 110px; accent-color: var(--accent); }
.tf-doodle-btn { background: var(--icon-bg); border: 1px solid var(--border-subtle); color: var(--ink-dim); border-radius: 9px; padding: 7px 13px; font-size: 13px; font-weight: 600; font-family: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; transition: background var(--t-fast), color var(--t-fast); }
.tf-doodle-btn:hover { background: var(--icon-bg-hover); color: var(--ink); }
.tf-doodle-btn.active { background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--accent); border-color: transparent; }
.tf-doodle-btn.primary { background: var(--grad); color: var(--accent-ink); border-color: transparent; box-shadow: var(--btn-shadow); }
.tf-doodle-stage { flex: 1; margin: 14px; margin-bottom: calc(14px + var(--safe-b)); border-radius: 14px; overflow: hidden; background: #fff; border: 1px solid var(--border); position: relative; }
.tf-doodle-canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }

/* 私聊请求弹窗 */
.pm-request { position: fixed; inset: 0; z-index: 95; display: flex; align-items: center; justify-content: center; padding: 24px; background: color-mix(in srgb, var(--bg) 68%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.pm-request-card { width: 100%; max-width: 340px; border-radius: 22px; padding: 26px 22px; text-align: center; box-shadow: var(--card-shadow); }
.pm-req-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); margin-bottom: 14px; }
.pm-req-text { font-size: 16px; font-weight: 600; margin-bottom: 22px; line-height: 1.4; }
.pm-req-actions { display: flex; gap: 10px; }
.pm-btn { flex: 1; border: none; border-radius: 12px; padding: 13px; font-size: 15px; font-weight: 600; cursor: pointer; transition: filter 0.15s, background 0.15s; }
.pm-btn-decline { background: var(--icon-bg); color: var(--ink-dim); border: 1px solid var(--border); }
.pm-btn-decline:hover { background: var(--icon-bg-hover); }
.pm-btn-accept { background: var(--grad); color: var(--accent-ink); box-shadow: var(--btn-shadow); }
.pm-btn-accept:hover { filter: brightness(1.06); }

/* ---------- 移动端适配 ---------- */
@media (max-width: 480px) {
  .top-controls { top: calc(10px + var(--safe-t)); right: 12px; gap: 6px; }
  .chip-btn { padding: 6px 11px; font-size: 12px; }

  #lobby { padding: 18px 16px; }
  .brand-head { gap: 12px; }
  .brand-mark { width: 54px; height: 54px; }
  .brand-mark svg { width: 36px; height: 36px; }
  .brand-name { font-size: 34px; }
  .brand-tagline { font-size: 14px; }
  .stat-badge { font-size: 12px; padding: 7px 13px; }
  .glass-card { padding: 22px 18px; border-radius: 20px; }

  .chat-header { gap: 8px; padding: 10px 12px; padding-top: calc(10px + var(--safe-t)); }
  .room-title { font-size: 15px; }
  .icon-btn { width: 38px; height: 38px; }
  .members-btn { padding: 0 10px; }
  .countdown { width: 36px; height: 36px; }
  .countdown svg { width: 36px; height: 36px; }

  .messages { padding: 14px 10px; gap: 12px; }
  .msg-row { max-width: 88%; }
  .bubble { font-size: 14.5px; }
  .bubble.img-bubble img { max-width: min(66vw, 240px); }

  /* 输入栏：图标略缩，输入框优先 */
  .composer { gap: 6px; padding: 9px 10px; padding-bottom: calc(9px + var(--safe-b)); }
  .composer-icon { width: 38px; height: 38px; border-radius: 11px; }
  .composer .field { padding: 10px 12px; font-size: 15px; min-width: 0; }
  .send-btn { padding: 0 14px; height: 40px; }
}

/* 超窄屏（<360px）进一步收紧：语音通话按钮让位 */
@media (max-width: 340px) {
  #callBtn { display: none; }
  .composer-icon { width: 36px; height: 36px; }
}


/* ===================================================================
   文件消息气泡
=================================================================== */
.bubble.file-bubble { padding: 0; overflow: hidden; }
.file-link { display: flex; align-items: center; gap: 11px; padding: 11px 13px; text-decoration: none; color: inherit; min-width: 190px; max-width: 260px; }
.file-ico { width: 38px; height: 38px; border-radius: 10px; background: color-mix(in srgb, currentColor 14%, transparent); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 18px; }
.msg-row.me .file-ico { background: rgba(255, 255, 255, 0.2); }
.file-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.file-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-size { font-size: 11px; opacity: 0.7; margin-top: 2px; }
.file-dl { flex-shrink: 0; opacity: 0.7; font-size: 16px; }
.file-link:hover .file-dl { opacity: 1; }

/* 让文件按钮在窄屏有空间：≤420px 隐藏语音通话按钮 */
@media (max-width: 420px) {
  #callBtn { display: none; }
}


/* ===================================================================
   私聊：未读角标 / 会话列表 / 通知开关 / Toast
=================================================================== */

/* 头部按钮上的未读角标 */
.pm-list-btn { position: relative; }
.head-badge {
  position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px;
  padding: 0 4px; border-radius: 9px; background: var(--danger); color: #fff;
  font-size: 10px; font-weight: 700; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 2px var(--bg);
}

/* 会话列表面板头部 + 通知开关 */
.pm-list-head { display: flex; align-items: center; justify-content: space-between; }
.notify-toggle {
  background: var(--icon-bg); border: 1px solid var(--border-subtle);
  border-radius: 9px; width: 32px; height: 32px; cursor: pointer;
  font-size: 15px; line-height: 1; display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, opacity 0.15s;
}
.notify-toggle:hover { background: var(--icon-bg-hover); }
.notify-toggle.off { opacity: 0.5; }

/* 会话条目 */
.pm-conv { gap: 11px; }
.pm-conv-mid { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.pm-conv-nick { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-conv-preview { font-size: 12px; color: var(--ink-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.pm-conv.active { background: var(--icon-bg-hover); }
.pm-dot { margin-left: auto; width: 9px; height: 9px; border-radius: 50%; background: var(--danger); flex-shrink: 0; }
.pm-empty { color: var(--ink-faint); font-size: 13px; text-align: center; margin-top: 34px; }

/* Toast 顶部通知条（可点击跳转） */
.toast {
  position: fixed; top: calc(14px + var(--safe-t)); left: 50%;
  transform: translate(-50%, -18px); z-index: 98; max-width: 88%;
  background: var(--bg-2); color: var(--ink);
  border: 1px solid var(--border); box-shadow: var(--card-shadow);
  padding: 11px 16px; border-radius: 14px; font-size: 13.5px; font-weight: 500;
  cursor: pointer; opacity: 0; transition: opacity 0.28s ease, transform 0.28s ease;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }


/* 文件图标显示类型后缀（如 PDF / ZIP） */
.file-ico.has-ext { font-size: 11px; font-weight: 800; letter-spacing: 0.3px; text-transform: uppercase; }
.file-size { text-transform: uppercase; }
.file-name { text-transform: none; }


/* ===================================================================
   成员面板：成员 / 进出动态 标签
=================================================================== */
.panel-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.panel-tab {
  flex: 1; background: var(--icon-bg); border: 1px solid var(--border-subtle);
  color: var(--ink-dim); border-radius: 10px; padding: 8px 6px;
  font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.panel-tab.active { background: var(--grad); color: var(--accent-ink); border-color: transparent; }

.activity-list .activity-item { display: flex; align-items: center; gap: 10px; padding: 9px 0; font-size: 14px; }
.act-badge { width: 26px; height: 26px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; flex-shrink: 0; }
.act-badge.join { background: color-mix(in srgb, var(--status) 18%, transparent); color: var(--status); }
.act-badge.leave { background: color-mix(in srgb, var(--danger) 16%, transparent); color: var(--danger); }
.act-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act-time { font-size: 11px; color: var(--ink-faint); font-variant-numeric: tabular-nums; flex-shrink: 0; }


/* ===================================================================
   多语言：国旗下拉菜单 + RTL（阿拉伯语）
=================================================================== */
.lang-wrap { position: relative; }
.lang-toggle { gap: 5px; }
.lang-flag { font-size: 15px; line-height: 1; }
.lang-name { font-weight: 600; }
.lang-caret { opacity: 0.5; font-size: 10px; }

.lang-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 70;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: var(--card-shadow); padding: 6px; min-width: 176px;
  display: flex; flex-direction: column; gap: 2px;
  max-height: 66vh; overflow-y: auto;
}
.lang-opt {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: none; border: none; color: var(--ink); cursor: pointer;
  padding: 9px 11px; border-radius: 10px; font-size: 14px; font-family: inherit; text-align: start;
  transition: background 0.15s;
}
.lang-opt:hover { background: var(--icon-bg-hover); }
.lang-opt.active { background: var(--icon-bg); font-weight: 600; }
.lang-opt .of { font-size: 18px; line-height: 1; flex-shrink: 0; }
.lang-opt .on { flex: 1; white-space: nowrap; }
.lang-opt .ok { color: var(--accent); font-weight: 700; }

/* RTL（阿拉伯语）微调 */
[dir="rtl"] .lang-menu { right: auto; left: 0; }
[dir="rtl"] .lang-opt { text-align: end; }
[dir="rtl"] .msg-nick, [dir="rtl"] .msg-foot { direction: rtl; }
[dir="rtl"] .bubble { text-align: right; }


/* ===================================================================
   内置浏览器（微信/抖音等）引导提示条
=================================================================== */
.inapp-banner {
  width: 100%; display: flex; align-items: center; gap: 10px;
  background: color-mix(in srgb, var(--accent) 12%, var(--card-bg));
  border: 1px solid var(--border); border-radius: 14px;
  padding: 11px 13px; margin-bottom: 18px; font-size: 13px; color: var(--ink);
  box-shadow: var(--card-shadow);
}
.inapp-ico { font-size: 18px; flex-shrink: 0; }
.inapp-text { flex: 1; line-height: 1.45; }
.inapp-copy {
  flex-shrink: 0; background: var(--grad); color: var(--accent-ink); border: none;
  border-radius: 9px; padding: 8px 12px; font-size: 12px; font-weight: 600;
  cursor: pointer; font-family: inherit; white-space: nowrap;
}


/* ===================================================================
   群主 / 群资料 / 公告 / 私聊开关 / 拉黑
=================================================================== */

/* 群头像 + 可编辑标题 */
.group-avatar { width: 34px; height: 34px; border-radius: 10px; object-fit: cover; flex-shrink: 0; border: 1px solid var(--border); }
#groupInfo { cursor: pointer; }
/* 群设置按钮：与其它头部图标统一为单色，简洁协调 */
#groupSettingsBtn:hover { background: var(--icon-bg-hover); }

/* 成员列表：姓名/群主标签/私聊开关 */
.members-list .m-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member-me { display: flex; align-items: center; gap: 11px; padding: 9px 0; font-size: 14px; }
.member-me img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border); flex-shrink: 0; }
.owner-tag { flex-shrink: 0; font-size: 11px; font-weight: 700; color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); padding: 2px 7px; border-radius: 999px; margin-inline-start: 6px; }
.pm-accept-pill { flex-shrink: 0; margin-inline-start: 8px; border: 1px solid var(--border); background: color-mix(in srgb, var(--status) 14%, transparent); color: var(--status); border-radius: 999px; padding: 4px 9px; font-size: 11px; font-weight: 600; cursor: pointer; font-family: inherit; }
.pm-accept-pill.off { background: var(--icon-bg); color: var(--ink-dim); }

/* 群主公告 */
.announce { align-self: stretch; margin: 4px 0; background: color-mix(in srgb, var(--accent) 12%, var(--card-bg)); border: 1px solid color-mix(in srgb, var(--accent) 32%, transparent); border-radius: 14px; padding: 11px 14px; }
.announce-head { font-size: 12px; font-weight: 700; color: var(--accent); margin-bottom: 4px; }
.announce-body { font-size: 14.5px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.announce-time { font-size: 10px; color: var(--ink-faint); margin-top: 4px; }

/* 通用弹窗（群资料）*/
.modal-overlay { position: fixed; inset: 0; z-index: 96; display: flex; align-items: center; justify-content: center; padding: 24px; background: color-mix(in srgb, var(--bg) 68%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.modal-card { width: 100%; max-width: 360px; border-radius: 22px; padding: 24px; box-shadow: var(--card-shadow); }
.modal-title { font-size: 17px; font-weight: 700; margin-bottom: 18px; text-align: center; }
.group-edit-row { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.group-edit-row .field { flex: 1; }
.modal-actions { display: flex; gap: 10px; }
.modal-actions .pm-btn { flex: 1; }

/* 私聊拉黑复选框 */
.pm-block-check { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 12.5px; color: var(--ink-dim); margin-bottom: 16px; cursor: pointer; }
.pm-block-check input { width: 15px; height: 15px; accent-color: var(--accent); }


/* 群主密钥导出/导入 */
.modal-wide { width: 100%; margin-bottom: 10px; }
.owner-key-box { width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; line-height: 1.4; resize: none; word-break: break-all; margin-bottom: 10px; }
.owner-key-hint { font-size: 12px; color: var(--ink-dim); line-height: 1.5; margin-bottom: 14px; }


/* 成员搜索 + 群分享 */
.member-search { width: 100%; margin-bottom: 12px; padding: 9px 12px; font-size: 13px; }
.group-share-btn { width: 100%; margin-bottom: 12px; background: var(--icon-bg); color: var(--ink); border: 1px solid var(--border); }
.group-share-btn:hover { background: var(--icon-bg-hover); }
.members-empty { color: var(--ink-faint); font-size: 13px; text-align: center; margin-top: 20px; }


/* ===================================================================
   性能优化：动效降载 / 移动端
=================================================================== */
/* 提升光晕到独立合成层，避免重绘 */
.blob { will-change: transform; transform: translateZ(0); }

/* 移动端：光晕更省、减少混合与模糊、放慢动画、少画一团 */
@media (max-width: 640px) {
  .blob { filter: blur(46px); mix-blend-mode: normal; animation-duration: 46s; }
  .blob.b3 { display: none; }
}

/* 尊重系统"减少动态效果"：关掉所有循环动画，最省电最流畅 */
@media (prefers-reduced-motion: reduce) {
  .blob, .btn-glow, .brand-mark, .stat-dot, .call-dot, .composer-icon.recording { animation: none !important; }
  * { scroll-behavior: auto !important; }
}


/* ===================================================================
   @提及 成员 / 提及高亮
=================================================================== */
.mention-box {
  position: absolute; left: 10px; right: 10px; bottom: calc(62px + var(--safe-b));
  max-height: 220px; overflow-y: auto; z-index: 8;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: var(--card-shadow); padding: 5px;
}
.mention-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: none; border: none; color: var(--ink); cursor: pointer;
  padding: 9px 10px; border-radius: 10px; font-size: 14px; font-family: inherit; text-align: start;
}
.mention-item:hover { background: var(--icon-bg-hover); }
.mention-item img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 1px solid var(--border); }
.mention-item span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 消息里 @昵称 的高亮 */
.bubble .mention { color: var(--accent); font-weight: 600; }
.msg-row.me .bubble .mention { color: #fff; text-decoration: underline; }
/* @到我的消息整条高亮 */
.msg-row.mention-me .bubble { box-shadow: 0 0 0 2px var(--accent); }

@media (min-width: 780px) { .mention-box { max-width: 760px; margin: 0 auto; } }


/* ===================================================================
   局域网快传
=================================================================== */
#transferScreen { flex-direction: column; }
@media (min-width: 780px) {
  #transferScreen { max-width: 760px; margin: 0 auto; border-left: 1px solid var(--border-subtle); border-right: 1px solid var(--border-subtle); }
}
.tf-head-ico { width: 40px; height: 40px; border-radius: 12px; background: var(--grad); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: var(--btn-shadow); }
.tf-chat-btn { position: relative; flex-shrink: 0; }
.tf-cast-btn { flex-shrink: 0; }
.tf-meet-btn { position: relative; flex-shrink: 0; }
.tf-meet-btn.active { background: var(--grad); color: var(--accent-ink); border-color: transparent; }

/* 多人会议网格 */
.tf-meet-view { position: fixed; inset: 0; z-index: 93; background: #0b0d12; display: flex; flex-direction: column; }
.tf-meet-grid { flex: 1; display: grid; gap: 8px; padding: 10px; padding-top: calc(10px + var(--safe-t)); grid-template-columns: 1fr; align-content: safe center; justify-items: center; overflow: auto; }
.tf-meet-grid > * { width: 100%; }
.tf-meet-grid.n2 { grid-template-columns: 1fr; }
.tf-meet-grid.n3, .tf-meet-grid.n4 { grid-template-columns: 1fr 1fr; }
.tf-meet-grid.n5, .tf-meet-grid.n6, .tf-meet-grid.n7, .tf-meet-grid.n8, .tf-meet-grid.n9 { grid-template-columns: 1fr 1fr 1fr; }
@media (min-width: 780px) {
  .tf-meet-grid.n2 { grid-template-columns: 1fr 1fr; }
}
.tf-meet-tile { position: relative; background: #16181f; border-radius: 14px; overflow: hidden; aspect-ratio: 16 / 9; min-height: 120px; max-height: 58vh; }
.tf-meet-tile video { width: 100%; height: 100%; object-fit: cover; display: block; background: #16181f; }
.tf-meet-tile.self video { transform: scaleX(-1); } /* 自己的画面镜像更自然 */
.tf-meet-tile.screen video { object-fit: contain; background: #000; }
.tf-meet-tile.screen.self video { transform: none; }
/* 共享屏幕的画面占满整行、置顶显示，方便所有人看清 */
.tf-meet-grid .tf-meet-tile.screen { grid-column: 1 / -1; order: -1; aspect-ratio: 16 / 9; max-height: 64vh; }
.tf-meet-name { position: absolute; left: 8px; bottom: 8px; display: flex; align-items: center; gap: 6px; background: rgba(0,0,0,0.5); color: #fff; font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 999px; max-width: 80%; }
.tf-meet-name .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tf-meet-name .muted { color: #ff8095; display: none; }
.tf-meet-tile.muted .tf-meet-name .muted { display: inline; }
.tf-meet-avatar-fallback { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; }
.tf-meet-tile.camoff video { visibility: hidden; }
.tf-meet-tile.camoff .tf-meet-avatar-fallback { display: flex; }
.tf-meet-avatar-fallback img { width: 68px; height: 68px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,0.2); }

.tf-meet-unmute { position: absolute; top: calc(14px + var(--safe-t)); left: 50%; transform: translateX(-50%); z-index: 5; background: var(--accent); color: var(--accent-ink); border: none; border-radius: 999px; padding: 10px 20px; font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit; box-shadow: 0 8px 24px rgba(0,0,0,0.4); animation: blink 1.6s infinite; }
.tf-meet-bar { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 14px; padding-bottom: calc(14px + var(--safe-b)); background: rgba(0,0,0,0.35); }
.tf-meet-ctrl { width: 52px; height: 52px; border-radius: 50%; border: none; background: rgba(255,255,255,0.16); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.15s; }
.tf-meet-ctrl:hover { background: rgba(255,255,255,0.26); }
.tf-meet-ctrl.off { background: var(--danger); color: #fff; }
.tf-meet-ctrl.active { background: var(--accent); color: var(--accent-ink); }
.tf-meet-ctrl.leave { background: #ff4d6a; color: #fff; }
.tf-meet-ctrl.leave:hover { background: #ff3355; }

/* 二维码配对 */
.install-chip { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.code-wrap { position: relative; }
.code-input { padding-right: 48px; }
.code-qr-btn { font-size: 15px; }
.qr-card { max-width: 320px; text-align: center; }
.qr-title { font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.qr-box { display: flex; align-items: center; justify-content: center; padding: 12px; background: #fff; border-radius: 16px; margin: 0 auto 14px; width: 264px; max-width: 100%; box-shadow: 0 6px 20px rgba(0,0,0,0.12); }
.qr-box svg { display: block; width: 240px; height: 240px; }
.qr-pass { font-size: 14px; font-weight: 700; color: var(--accent); word-break: break-all; margin-bottom: 8px; }
.qr-hint { font-size: 12px; color: var(--ink-dim); line-height: 1.6; margin: 0 0 14px; }
.qr-actions { display: flex; gap: 8px; margin-bottom: 12px; }
.qr-act { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; background: var(--icon-bg); border: 1px solid var(--border-subtle); color: var(--ink); border-radius: 12px; padding: 11px 6px; font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit; transition: background 0.15s, color 0.15s; }
.qr-act:hover { background: var(--icon-bg-hover); color: var(--accent); }
.qr-act svg { color: var(--accent); }

/* 共享剪贴板 */
.tf-clip-panel { }
.tf-clip-input { width: 100%; resize: vertical; min-height: 46px; background: var(--field-bg); border: 1px solid var(--border); color: var(--ink); border-radius: 12px; padding: 10px 12px; font-size: 14px; font-family: inherit; outline: none; transition: border-color 0.15s; }
.tf-clip-input:focus { border-color: var(--accent); }
.tf-clip-actions { display: flex; justify-content: flex-end; margin-top: 8px; }
.tf-clip-btn { background: var(--grad); color: var(--accent-ink); border: none; border-radius: 10px; padding: 8px 16px; font-size: 13px; font-weight: 600; cursor: pointer; box-shadow: var(--btn-shadow); }
.tf-clip-recv { margin-top: 12px; padding: 11px 13px; border-radius: 14px; background: var(--card-bg); border: 1px solid var(--border-subtle); }
.tf-clip-recv-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.tf-clip-from { font-size: 12px; color: var(--ink-dim); font-weight: 600; }
.tf-clip-copy { background: var(--icon-bg); color: var(--ink); border: 1px solid var(--border-subtle); border-radius: 8px; padding: 4px 12px; font-size: 12px; font-weight: 600; cursor: pointer; }
.tf-clip-copy:hover { background: var(--icon-bg-hover); }
.tf-clip-text { font-size: 14px; line-height: 1.5; word-break: break-word; white-space: pre-wrap; max-height: 160px; overflow-y: auto; }

.tf-castpick-card { max-width: 380px; text-align: left; }
.tf-castpick-title { font-size: 16px; font-weight: 700; margin-bottom: 14px; text-align: center; }
.tf-castpick-all { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 600; padding: 10px 12px; border-radius: 12px; background: var(--icon-bg); cursor: pointer; margin-bottom: 10px; }
.tf-castpick-all input, .tf-castpick-item input { width: 18px; height: 18px; accent-color: var(--accent); flex-shrink: 0; cursor: pointer; }
.tf-castpick-list { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 46vh; overflow-y: auto; }
.tf-castpick-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; background: var(--card-bg); border: 1px solid var(--border-subtle); cursor: pointer; }
.tf-castpick-item img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border); flex-shrink: 0; background: var(--bg-2); }
.tf-castpick-item .tf-castpick-name { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tf-cast-btn.active { background: var(--grad); color: var(--accent-ink); border-color: transparent; }

/* 投屏观看层 */
.tf-screen-view { position: fixed; inset: 0; z-index: 92; background: #000; display: flex; align-items: center; justify-content: center; }
.tf-screen-view video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.tf-screen-view.fit-cover video { object-fit: cover; }
.tf-screen-view.fit-fill video { object-fit: fill; }
/* CSS 回退旋转（无法用系统方向锁时）：把画面旋转 90° 并交换视口宽高 */
.tf-screen-view.rotated video { width: 100vh; height: 100vw; object-fit: contain; transform: rotate(90deg); }
.tf-screen-bar { position: absolute; top: calc(12px + var(--safe-t)); left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; background: rgba(0,0,0,0.55); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,0.16); border-radius: 999px; padding: 8px 10px 8px 16px; max-width: 92%; transition: opacity 0.3s ease, transform 0.3s ease; }
.tf-screen-view.controls-hidden .tf-screen-bar { opacity: 0; pointer-events: none; transform: translate(-50%, -14px); }
.tf-screen-view video { cursor: pointer; }
.tf-screen-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 12px; color: #fff; font-size: 15px; font-weight: 600; background: rgba(0,0,0,0.35); pointer-events: none; }
.tf-spin { width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(255,255,255,0.25); border-top-color: #fff; animation: tfspin 0.8s linear infinite; }
@keyframes tfspin { to { transform: rotate(360deg); } }
.tf-screen-title { color: #fff; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tf-screen-btn { background: rgba(255,255,255,0.16); color: #fff; border: none; border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; white-space: nowrap; }
.tf-screen-btn:hover { background: rgba(255,255,255,0.28); }
.tf-chat-empty { margin-top: 20px; }
#tfChatMessages { flex: 1; }
.tf-me { display: flex; align-items: center; gap: 8px; flex-shrink: 0; max-width: 42%; }
.tf-me-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border); flex-shrink: 0; background: var(--bg-2); }
.tf-me-name { font-size: 13px; color: var(--ink-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.tf-body { flex: 1; overflow-y: auto; padding: 16px 14px calc(20px + var(--safe-b)); display: flex; flex-direction: column; gap: 16px; }
.tf-body::-webkit-scrollbar { width: 6px; }
.tf-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.tf-panel { }
.tf-section-title { font-size: 12px; color: var(--ink-dim); letter-spacing: 0.4px; text-transform: uppercase; margin: 0 3px 10px; }
.tf-empty { color: var(--ink-faint); font-size: 13px; text-align: center; padding: 14px 8px; line-height: 1.6; }

.tf-device-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tf-device { display: flex; align-items: center; gap: 11px; padding: 11px 13px; border-radius: 14px; background: var(--card-bg); border: 1px solid var(--border-subtle); cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.tf-device:hover { background: var(--icon-bg-hover); }
.tf-device.selected { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent); }
.tf-device img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border); flex-shrink: 0; background: var(--bg-2); }
.tf-device .tf-dev-mid { flex: 1; min-width: 0; }
.tf-device .tf-dev-name { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tf-device .tf-dev-sub { font-size: 12px; color: var(--ink-dim); margin-top: 1px; }
.tf-device .tf-dev-check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: var(--accent-ink); }
.tf-device.selected .tf-dev-check { background: var(--accent); border-color: var(--accent); }

/* 文件输入：视觉隐藏但仍在布局中（display:none 会导致移动端无法唤起文件框） */
.tf-file-input { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; opacity: 0; }
.tf-drop { display: block; border: 2px dashed var(--border); border-radius: 18px; padding: 26px 18px; text-align: center; cursor: pointer; transition: border-color 0.18s, background 0.18s; background: var(--card-bg); }
.tf-drop:hover, .tf-drop.dragover { border-color: var(--accent); background: var(--icon-bg-hover); }
.tf-drop.disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.tf-drop-overlay { position: absolute; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--accent) 22%, rgba(0,0,0,0.55)); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); pointer-events: none; }
.tf-drop-overlay-inner { display: flex; flex-direction: column; align-items: center; gap: 12px; color: #fff; font-size: 18px; font-weight: 700; border: 3px dashed rgba(255,255,255,0.7); border-radius: 22px; padding: 40px 56px; }
.tf-folder-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 8px 14px; border-radius: 999px; background: var(--icon-bg); border: 1px solid var(--border-subtle); color: var(--ink-dim); font-size: 13px; font-weight: 600; cursor: pointer; transition: background 0.15s, color 0.15s; }
.tf-folder-link:hover { background: var(--icon-bg-hover); color: var(--ink); }
.tf-drop-ico { color: var(--accent); margin-bottom: 8px; display: flex; justify-content: center; }
.tf-drop-main { font-size: 15px; font-weight: 600; }
.tf-drop-sub { font-size: 12.5px; color: var(--ink-dim); margin-top: 4px; }

.tf-transfers-head { display: flex; align-items: center; justify-content: space-between; }
.tf-clear-btn { background: var(--icon-bg); border: 1px solid var(--border-subtle); color: var(--ink-dim); border-radius: 9px; padding: 5px 12px; font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit; margin-bottom: 10px; transition: background 0.15s, color 0.15s; }
.tf-clear-btn:hover { background: var(--icon-bg-hover); color: var(--ink); }
.tf-open-btn { background: var(--icon-bg); color: var(--ink); border: 1px solid var(--border-subtle); border-radius: 9px; padding: 7px 12px; font-size: 12.5px; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-block; margin-right: 6px; }
.tf-open-btn:hover { background: var(--icon-bg-hover); }
.tf-dev-sub { font-size: 12px; color: var(--ink-dim); margin-top: 1px; }
.tf-dev-sub.lan { color: var(--status); }
.tf-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tf-item { padding: 11px 13px; border-radius: 14px; background: var(--card-bg); border: 1px solid var(--border-subtle); }
.tf-item-top { display: flex; align-items: center; gap: 10px; }
.tf-item-ico { width: 34px; height: 34px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tf-item-ico.recv { background: color-mix(in srgb, var(--status) 16%, transparent); color: var(--status); }
.tf-item-mid { flex: 1; min-width: 0; }
.tf-item-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tf-item-sub { font-size: 11.5px; color: var(--ink-dim); margin-top: 1px; }
.tf-item-act { flex-shrink: 0; }
.tf-save-btn { background: var(--grad); color: var(--accent-ink); border: none; border-radius: 9px; padding: 7px 13px; font-size: 12.5px; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-block; }
.tf-bar { height: 5px; border-radius: 3px; background: var(--border); margin-top: 9px; overflow: hidden; }
.tf-bar-fill { height: 100%; border-radius: 3px; background: var(--grad); width: 0%; transition: width 0.15s linear; }
.tf-item.done .tf-bar-fill { background: var(--status); }
.tf-item.failed .tf-bar-fill, .tf-item.rejected .tf-bar-fill, .tf-item.canceled .tf-bar-fill { background: var(--danger); }
.tf-item.paused .tf-bar-fill { background: var(--ink-faint); }
.tf-ctrl-btn { background: var(--icon-bg); color: var(--ink-dim); border: 1px solid var(--border-subtle); border-radius: 9px; padding: 6px 11px; font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit; margin-left: 6px; transition: background 0.15s, color 0.15s; }
.tf-ctrl-btn:hover { background: var(--icon-bg-hover); color: var(--ink); }
.tf-ctrl-btn.stop { color: var(--danger); }
.tf-ctrl-btn.stop:hover { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.tf-item-act { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; }

.tf-foot-hint { font-size: 12px; color: var(--ink-faint); line-height: 1.6; text-align: center; margin: 4px 6px 0; }

.tf-offer-file { font-size: 13px; color: var(--ink-dim); margin: -10px 0 20px; word-break: break-word; }

@media (max-width: 480px) {
  .tf-body { padding: 14px 12px calc(18px + var(--safe-b)); gap: 14px; }
  .tf-me-name { display: none; }
  .tf-drop { padding: 22px 14px; }
}


/* ===================================================================
   图标统一：内联/注入 SVG 的对齐
=================================================================== */
.owner-tag, .announce-head { display: inline-flex; align-items: center; gap: 5px; }
.roll-btn { display: flex; align-items: center; justify-content: center; }
.notify-toggle { display: flex; align-items: center; justify-content: center; }
.notify-toggle svg, .file-dl svg, .vplay svg, .avatar-edit svg, .inapp-ico svg, .roll-btn svg { display: block; }
.feat-chip svg { flex-shrink: 0; color: var(--accent); }
.tf-meet-unmute { display: inline-flex; align-items: center; gap: 8px; }
.owner-tag svg, .announce-head svg { color: inherit; }


/* ===================================================================
   精修：焦点可见性 / 微交互 / 空状态 / 一致圆角（方向：极简·冷静）
=================================================================== */
/* 无障碍：键盘焦点清晰可见 */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.field:focus-visible, input:focus-visible, textarea:focus-visible { outline: none; }

/* 统一按钮按压反馈 */
.icon-btn, .chip-btn, .composer-icon, .send-btn, .primary-btn, .pm-btn, .qr-act, .tf-clip-btn { transition: transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease), filter var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease); }
.icon-btn:active, .composer-icon:active, .chip-btn:active { transform: scale(0.94); }

/* 精致空状态：居中、克制、留白 */
.tf-empty, .pm-empty, .tf-chat-empty { color: var(--ink-faint); font-size: 13.5px; line-height: 1.7; text-align: center; max-width: 300px; margin-left: auto; margin-right: auto; }

/* 品牌标题字距收紧，更显精致 */
.brand-name { letter-spacing: -1.6px; }
.brand-tagline { letter-spacing: -0.2px; }

/* 卡片与输入统一到圆角刻度 */
.glass-card { border-radius: var(--r-2xl); }
.field { border-radius: var(--r-md); }
.primary-btn { border-radius: var(--r-lg); }

/* 顶部胶囊按钮更轻盈一致 */
.chip-btn { border-radius: var(--r-full); }
.scan-chip svg, .install-chip svg { display: block; }


/* ===================================================================
   电视直播
=================================================================== */
#tvScreen { flex-direction: column; }
@media (min-width: 780px) { #tvScreen { max-width: 760px; margin: 0 auto; border-left: 1px solid var(--border-subtle); border-right: 1px solid var(--border-subtle); } }
.tv-relay-btn.active { background: var(--grad); color: var(--accent-ink); border-color: transparent; }
.tv-body { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.tv-player-wrap { position: relative; background: #000; aspect-ratio: 16 / 9; width: 100%; flex-shrink: 0; }
.tv-player-wrap video { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.tv-player-hint { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.7); font-size: 14px; text-align: center; padding: 20px; pointer-events: none; }
.tv-cats { display: flex; gap: 7px; overflow-x: auto; padding: 10px 12px; scrollbar-width: none; flex-shrink: 0; }
.tv-cats::-webkit-scrollbar { display: none; }
.tv-cat { flex-shrink: 0; background: var(--icon-bg); border: 1px solid var(--border-subtle); color: var(--ink-dim); border-radius: var(--r-full); padding: 7px 14px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; white-space: nowrap; transition: background var(--t-fast), color var(--t-fast); }
.tv-cat:hover { background: var(--icon-bg-hover); }
.tv-cat.active { background: var(--grad); color: var(--accent-ink); border-color: transparent; }
.tv-searchrow { display: flex; gap: 8px; margin: 0 12px 8px; flex-shrink: 0; }
.tv-search { flex: 1; border-radius: var(--r-md); padding: 10px 14px; font-size: 14px; }
.tv-check-btn { flex-shrink: 0; background: var(--icon-bg); border: 1px solid var(--border-subtle); color: var(--ink); border-radius: var(--r-md); padding: 0 16px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; transition: background var(--t-fast); }
.tv-check-btn:hover { background: var(--icon-bg-hover); }
.tv-check-btn:disabled { opacity: 0.55; cursor: default; }
.tv-cat-custom { border-style: dashed; }
.tv-cat-fav.active { background: linear-gradient(135deg, #f5c542, #e0a326); color: #1a1400; }
.tv-fav { flex-shrink: 0; background: transparent; border: none; padding: 4px; margin: -4px; cursor: pointer; color: var(--ink-faint); display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r-sm); transition: color var(--t-fast), transform var(--t-fast); }
.tv-fav:hover { color: var(--ink-dim); transform: scale(1.12); }
.tv-fav.on { color: #f5c542; }
.tv-fav.on svg { fill: #f5c542; stroke: #f5c542; }
.tv-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: transparent; }
.tv-dot.live { background: var(--success); }
.tv-dot.dead { background: var(--danger); opacity: 0.55; }
.tv-dot.checking { background: var(--warning); animation: blink 1s infinite; }
.tv-item.dead { opacity: 0.5; }
.tv-list { list-style: none; margin: 0; padding: 0 8px 16px; overflow-y: auto; flex: 1; min-height: 0; }
.tv-list::-webkit-scrollbar { width: 6px; }
.tv-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.tv-item { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: var(--r-md); cursor: pointer; transition: background var(--t-fast); }
.tv-item:hover { background: var(--icon-bg-hover); }
.tv-item.active { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.tv-item .tv-num { width: 30px; flex-shrink: 0; text-align: center; font-size: 12px; font-weight: 700; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.tv-item .tv-logo { width: 40px; height: 30px; object-fit: contain; border-radius: 6px; background: var(--bg-2); flex-shrink: 0; }
.tv-item .tv-nm { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-item .tv-grp { font-size: 11px; color: var(--ink-faint); flex-shrink: 0; max-width: 30%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-empty { padding: 30px 12px; }
.tv-foot-hint { font-size: 11.5px; color: var(--ink-faint); text-align: center; margin: 0; padding: 6px 12px calc(10px + var(--safe-b)); line-height: 1.6; flex-shrink: 0; }


/* ===================================================================
   影视点播（引擎；片源用户自备）
=================================================================== */
#vodScreen { flex-direction: column; }
@media (min-width: 780px) { #vodScreen { max-width: 760px; margin: 0 auto; border-left: 1px solid var(--border-subtle); border-right: 1px solid var(--border-subtle); } }
.vod-body { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.vod-searchrow { display: flex; gap: 8px; padding: 10px 12px 6px; flex-shrink: 0; }
.vod-search { flex: 1; border-radius: var(--r-md); padding: 10px 14px; font-size: 14px; }
.vod-cats { padding: 4px 12px 8px; }
.vod-scroll { flex: 1; overflow-y: auto; min-height: 0; padding: 0 12px 12px; }
.vod-scroll::-webkit-scrollbar { width: 6px; }
.vod-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.vod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 12px; }
.vod-card { cursor: pointer; display: flex; flex-direction: column; gap: 6px; }
.vod-poster { position: relative; width: 100%; aspect-ratio: 2 / 3; border-radius: var(--r-md); overflow: hidden; background: var(--bg-2); border: 1px solid var(--border-subtle); }
.vod-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vod-poster .vod-remarks { position: absolute; right: 4px; bottom: 4px; background: rgba(0,0,0,0.65); color: #fff; font-size: 10.5px; font-weight: 600; padding: 2px 6px; border-radius: 6px; max-width: 90%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vod-card .vod-name { font-size: 12.5px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vod-more { display: flex; gap: 10px; justify-content: center; padding: 16px 0 4px; }
.tv-check-btn.ghost { background: transparent; }
.tv-check-btn.ghost:hover { background: var(--icon-bg); }

.vod-detail { position: absolute; inset: 0; z-index: 30; display: flex; align-items: flex-start; justify-content: center; padding: 0; background: var(--bg); overflow-y: auto; }
.vod-detail-card { width: 100%; max-width: 760px; min-height: 100%; border-radius: 0; padding: 0 0 24px; position: relative; }
.vod-detail-close { position: absolute; top: calc(10px + var(--safe-t)); right: 12px; z-index: 5; background: rgba(0,0,0,0.5); color: #fff; }
.vod-detail-close:hover { background: rgba(0,0,0,0.72); }
.vod-detail-back { position: absolute; top: calc(10px + var(--safe-t)); left: 12px; z-index: 5; display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 14px 0 8px; border: none; border-radius: 999px; background: rgba(0,0,0,0.5); color: #fff; font-size: 14px; font-weight: 600; font-family: inherit; cursor: pointer; transition: background var(--t-fast); }
.vod-detail-back:hover { background: rgba(0,0,0,0.72); }
.vod-player-wrap { width: 100%; aspect-ratio: 16 / 9; background: #000; }
.vod-player-wrap video { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.vod-detail-title { font-size: 17px; font-weight: 700; padding: 14px 16px 4px; }
.vod-section-title { font-size: 12px; color: var(--ink-dim); text-transform: uppercase; letter-spacing: 0.4px; padding: 10px 16px 8px; }
.vod-episodes { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px; }
.vod-ep { background: var(--icon-bg); border: 1px solid var(--border-subtle); color: var(--ink); border-radius: var(--r-sm); padding: 8px 12px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; }
.vod-ep:hover { background: var(--icon-bg-hover); }
.vod-ep.active { background: var(--grad); color: var(--accent-ink); border-color: transparent; }
.vod-desc { font-size: 13px; color: var(--ink-dim); line-height: 1.6; padding: 14px 16px 0; white-space: pre-wrap; word-break: break-word; }
.owner-fp { margin: 2px 0 14px; padding: 10px 12px; background: var(--card-bg); border: 1px solid var(--border-subtle); border-radius: var(--r-md); font-size: 12px; color: var(--ink-dim); line-height: 1.5; }
.owner-fp .owner-fp-label { display: block; margin-bottom: 4px; }
.owner-fp .owner-fp-val { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 15px; font-weight: 700; letter-spacing: 1px; color: var(--accent); user-select: all; }
.vod-picklist { display: flex; flex-direction: column; gap: 8px; padding: 8px 16px 24px; }
.vod-pick-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; background: var(--card-bg); border: 1px solid var(--border-subtle); color: var(--ink); border-radius: var(--r-md); padding: 12px 14px; font-family: inherit; cursor: pointer; transition: background var(--t-fast); }
.vod-pick-item:hover:not(.disabled) { background: var(--icon-bg-hover); }
.vod-pick-item.disabled { opacity: 0.5; cursor: not-allowed; }
.vod-pick-item .vpi-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.vod-pick-item .vpi-name { font-size: 14px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vod-pick-item .vpi-sub { font-size: 11.5px; color: var(--ink-faint); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vod-pick-item.active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.vod-pick-item.vpi-add { border-style: dashed; }
.vod-pick-item.vpi-add .vpi-name { color: var(--accent); }
.vpi-del { flex-shrink: 0; width: 32px; height: 32px; color: var(--ink-faint); }
.vpi-del:hover { color: var(--danger); background: color-mix(in srgb, var(--danger) 14%, transparent); }


/* ===================================================================
   音乐电台（音源自备）
=================================================================== */
#musicScreen { flex-direction: column; }
@media (min-width: 780px) { #musicScreen { max-width: 760px; margin: 0 auto; border-left: 1px solid var(--border-subtle); border-right: 1px solid var(--border-subtle); } }
.music-body { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.music-cats { flex-shrink: 0; }
.music-list { flex: 1; min-height: 0; }
.music-item .tv-num { color: var(--accent); }
.music-item.active { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.music-player { flex-shrink: 0; display: flex; align-items: center; gap: 12px; padding: 12px 16px calc(12px + var(--safe-b)); border-top: 1px solid var(--border); background: var(--card-bg); backdrop-filter: blur(var(--card-blur)); }
.music-np { display: flex; align-items: center; gap: 11px; flex: 1; min-width: 0; }
.music-np-art { width: 42px; height: 42px; flex-shrink: 0; border-radius: var(--r-md); display: grid; place-items: center; color: var(--accent-ink); background: var(--grad); }
.music-np-meta { min-width: 0; }
.music-np-name { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.music-np-sub { font-size: 12px; color: var(--ink-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.music-ctrls { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.music-ctrl { width: 38px; height: 38px; border-radius: 50%; border: none; background: var(--icon-bg); color: var(--ink); display: grid; place-items: center; cursor: pointer; transition: background var(--t-fast); }
.music-ctrl:hover { background: var(--icon-bg-hover); }
.music-ctrl.music-play { width: 48px; height: 48px; background: var(--grad); color: var(--accent-ink); box-shadow: var(--btn-shadow); }

/* ===================================================================
   帮助菜单（点击首页 Logo / 暗号名 打开）
=================================================================== */
.help-modal { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 20px; padding-top: calc(20px + var(--safe-t)); padding-bottom: calc(20px + var(--safe-b)); background: color-mix(in srgb, var(--bg) 62%, transparent); backdrop-filter: blur(8px); animation: fadeIn 0.2s var(--ease); }
.help-card { position: relative; width: 100%; max-width: 460px; max-height: 100%; display: flex; flex-direction: column; border-radius: var(--r-2xl); border: 1px solid var(--border); background: var(--card-bg); backdrop-filter: blur(var(--card-blur)); box-shadow: var(--card-shadow); padding: 22px; overflow: hidden; }
.help-x { position: absolute; top: 12px; right: 12px; }
.help-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.help-mark { width: 44px; height: 44px; flex-shrink: 0; }
.help-title { font-size: 19px; font-weight: 800; letter-spacing: -0.3px; }
.help-subtitle { font-size: 12.5px; color: var(--ink-dim); margin-top: 2px; }
.help-scroll { overflow-y: auto; margin: 12px -6px 8px; padding: 0 6px; }
.help-scroll::-webkit-scrollbar { width: 6px; }
.help-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.help-sec { padding: 11px 0; border-bottom: 1px solid var(--border-subtle); }
.help-sec:last-child { border-bottom: none; }
.help-sec h4 { margin: 0 0 5px; font-size: 14.5px; font-weight: 700; color: var(--accent); }
.help-sec p { margin: 0; font-size: 13px; line-height: 1.65; color: var(--ink-dim); }
.help-foot { font-size: 12px; color: var(--ink-faint); text-align: center; margin: 6px 0 12px; line-height: 1.5; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ============ 富文本 / 表情 / 回应 / 群主治理 ============ */

/* Markdown-lite 渲染 */
.md-line { min-height: 1em; }
.md-h { font-weight: 700; margin: 4px 0 2px; line-height: 1.3; }
.md-h1 { font-size: 1.28em; }
.md-h2 { font-size: 1.16em; }
.md-h3 { font-size: 1.06em; }
.md-ul { margin: 4px 0; padding-left: 20px; }
.md-ul li { margin: 1px 0; }
.md-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9em; background: color-mix(in srgb, var(--ink) 12%, transparent); padding: 1px 5px; border-radius: 5px; }
.md-pre { margin: 5px 0; padding: 10px 12px; background: color-mix(in srgb, var(--ink) 10%, transparent); border: 1px solid var(--border-subtle); border-radius: 10px; overflow-x: auto; white-space: pre; }
.md-pre code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.88em; }
.md-link { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; word-break: break-all; }
.msg-row.me .md-link { color: inherit; }

/* 删除占位 */
.bubble-deleted { font-style: italic; opacity: 0.6; font-size: 13px; }
/* 置顶跳转高亮 */
.msg-flash { animation: msgFlash 1.2s ease; }
@keyframes msgFlash { 0%, 100% { background: transparent; } 30% { background: color-mix(in srgb, var(--accent) 16%, transparent); border-radius: 12px; } }

/* 消息动作按钮（回应触发） */
.msg-act { width: 22px; height: 22px; padding: 0; border: none; background: transparent; color: var(--ink-faint); border-radius: 6px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; opacity: 0; transition: opacity var(--t-fast), background var(--t-fast), color var(--t-fast); }
.msg-row:hover .msg-act { opacity: 0.7; }
.msg-act:hover { opacity: 1; background: var(--icon-bg-hover); color: var(--ink); }
@media (hover: none) { .msg-act { opacity: 0.55; } }

/* 回应条 */
.react-bar { display: flex; flex-wrap: wrap; gap: 5px; margin: 5px 4px 0; }
.react-bar.hidden { display: none; }
.msg-row.me .react-bar { justify-content: flex-end; }
.react-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; line-height: 1; padding: 4px 8px; border-radius: 999px; background: var(--chip-bg); border: 1px solid var(--border-subtle); color: var(--ink-dim); cursor: pointer; transition: background var(--t-fast), border-color var(--t-fast); }
.react-chip:hover { background: var(--icon-bg-hover); }
.react-chip.mine { background: color-mix(in srgb, var(--accent) 16%, transparent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); color: var(--accent); }
.react-chip .react-n { font-variant-numeric: tabular-nums; font-weight: 600; }

/* 表情弹层 */
.emoji-pop { position: fixed; z-index: 60; width: 300px; max-width: calc(100vw - 16px); background: var(--card-bg, var(--bg-2)); backdrop-filter: blur(20px) saturate(150%); -webkit-backdrop-filter: blur(20px) saturate(150%); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35); padding: 8px; }
.emoji-pop.hidden { display: none; }
.emoji-tabs { display: flex; gap: 2px; padding-bottom: 6px; margin-bottom: 6px; border-bottom: 1px solid var(--border-subtle); }
.emoji-tab { flex: 1; height: 30px; border: none; background: transparent; border-radius: 8px; font-size: 17px; cursor: pointer; opacity: 0.6; transition: background var(--t-fast), opacity var(--t-fast); }
.emoji-tab:hover { background: var(--icon-bg-hover); opacity: 0.9; }
.emoji-tab.active { background: color-mix(in srgb, var(--accent) 18%, transparent); opacity: 1; }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; max-height: 220px; overflow-y: auto; }
.emoji-cell { border: none; background: transparent; border-radius: 8px; font-size: 20px; line-height: 1; height: 34px; cursor: pointer; transition: background var(--t-fast), transform var(--t-fast); }
.emoji-cell:hover { background: var(--icon-bg-hover); transform: scale(1.15); }

/* 消息菜单：快捷回应 + 群主操作 */
.react-quick { display: flex; align-items: center; gap: 2px; }
.react-more { width: 34px; height: 34px; border: none; background: var(--icon-bg); color: var(--ink-dim); border-radius: 8px; font-size: 18px; cursor: pointer; margin-left: 2px; }
.react-more:hover { background: var(--icon-bg-hover); color: var(--ink); }
.react-owner { display: flex; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border-subtle); }
.react-op { flex: 1; padding: 8px; border: 1px solid var(--border-subtle); background: var(--icon-bg); color: var(--ink-dim); border-radius: 9px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; transition: background var(--t-fast), color var(--t-fast); }
.react-op:hover { background: var(--icon-bg-hover); color: var(--ink); }
.react-op.danger:hover { background: color-mix(in srgb, var(--danger) 16%, transparent); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }

/* 置顶栏 */
.pinned-bar { display: flex; align-items: center; gap: 10px; padding: 9px 14px; background: color-mix(in srgb, var(--accent) 8%, var(--bg-2)); border-bottom: 1px solid var(--border-subtle); cursor: pointer; }
.pinned-bar.hidden { display: none; }
.pinned-bar .pin-ico { color: var(--accent); flex-shrink: 0; display: flex; }
.pinned-bar .pin-wrap { flex: 1; min-width: 0; }
.pinned-bar .pin-label { font-size: 10.5px; font-weight: 700; color: var(--accent); letter-spacing: 0.4px; text-transform: uppercase; }
.pinned-bar .pin-text { font-size: 13px; color: var(--ink-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pinned-bar .pin-x { flex-shrink: 0; width: 24px; height: 24px; border: none; background: transparent; color: var(--ink-faint); border-radius: 6px; cursor: pointer; font-size: 13px; }
.pinned-bar .pin-x:hover { background: var(--icon-bg-hover); color: var(--ink); }

/* 输入栏锁定（禁言 / 全员禁言） */
.composer.locked .msg-input { opacity: 0.7; }
.composer .composer-icon.disabled, .composer .send-btn.disabled { opacity: 0.4; pointer-events: none; }
.msg-input:disabled { cursor: not-allowed; }

/* 群主工具栏 */
.owner-tools { background: color-mix(in srgb, var(--accent) 7%, transparent); border: 1px solid var(--border-subtle); border-radius: 12px; padding: 12px; margin-bottom: 14px; }
.owner-tools.hidden { display: none; }
.owner-tools-title { font-size: 11px; font-weight: 700; color: var(--accent); letter-spacing: 0.4px; text-transform: uppercase; margin-bottom: 10px; }
.owner-tool-btn { width: 100%; padding: 9px; border: 1px solid var(--border-subtle); background: var(--icon-bg); color: var(--ink-dim); border-radius: 9px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; transition: background var(--t-fast), color var(--t-fast); }
.owner-tool-btn:hover { background: var(--icon-bg-hover); color: var(--ink); }
.owner-tool-btn.on { background: color-mix(in srgb, var(--danger) 18%, transparent); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.owner-slow { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.owner-slow-lbl { font-size: 12px; color: var(--ink-dim); margin-right: 2px; }
.owner-slow-opt { min-width: 34px; padding: 5px 9px; border: 1px solid var(--border-subtle); background: var(--icon-bg); color: var(--ink-dim); border-radius: 8px; font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit; font-variant-numeric: tabular-nums; }
.owner-slow-opt.on { background: color-mix(in srgb, var(--accent) 20%, transparent); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 42%, transparent); }

/* 成员行禁言按钮 */
.m-mute { margin-left: auto; flex-shrink: 0; padding: 4px 10px; border: 1px solid var(--border-subtle); background: var(--icon-bg); color: var(--ink-dim); border-radius: 999px; font-size: 11.5px; font-weight: 600; cursor: pointer; font-family: inherit; transition: background var(--t-fast), color var(--t-fast); }
.m-mute:hover { background: var(--icon-bg-hover); color: var(--ink); }
.m-mute.on { background: color-mix(in srgb, var(--danger) 16%, transparent); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 38%, transparent); }
