/* VyueChat 样式
   独立品牌视觉：青绿(teal)主色 + 深墨底，与 Vyue 账号模块的紫蓝风格刻意区分。
   兼容目标：iOS5 Safari / Android4 浏览器
   布局避免 flex/grid，改用固定定位 + table + float，保证老内核可用。 */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  background: #070a0d; color: #e6edf3; font-size: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  overflow: hidden; -webkit-text-size-adjust: 100%;
}
a { color: #2dd4bf; text-decoration: none; }
input, textarea, select, button { font-family: inherit; font-size: 14px; outline: none; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #22323c; border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }

.btn {
  display: inline-block; padding: 12px 18px; border: none; border-radius: 10px;
  color: #fff; font-weight: 700; font-size: 14px; letter-spacing: .5px; cursor: pointer;
  background: linear-gradient(135deg, #12a8a6, #0a5f60);
}
.btn:hover { filter: brightness(1.15); }
.btn:active { transform: scale(.985); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.ghost { background: transparent; border: 1px solid #1d2a33; color: #93a3b0; font-weight: 600; }
.btn.ghost:hover { border-color: #12a8a6; color: #e6edf3; }
.btn.sm { padding: 8px 12px; font-size: 13px; border-radius: 9px; }
.btn.block { display: block; width: 100%; }

.field { margin-bottom: 13px; }
.field label { display: block; font-size: 12px; color: #93a3b0; margin-bottom: 6px; font-weight: 600; }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; background: #141b21; border: 1px solid #1d2a33;
  border-radius: 10px; color: #e6edf3; font-size: 15px;
}
.field input:focus, .field textarea:focus { border-color: #12a8a6; }

/* ---------- 登录页 ---------- */
#auth {
  position: fixed; left: 0; top: 0; right: 0; bottom: 0; z-index: 100; overflow: auto;
  padding: 20px; text-align: center;
  background: radial-gradient(circle at 22% 12%, #0b2b2c 0%, transparent 42%),
              radial-gradient(circle at 78% 80%, #08222b 0%, transparent 45%), #070a0d;
}
#auth .box {
  display: inline-block; text-align: left; width: 100%; max-width: 380px; margin-top: 6vh;
  background: #101820; border: 1px solid #1d2a33; border-radius: 18px; padding: 28px 24px;
}
#auth .logo {
  width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 14px; color: #fff;
  font-size: 24px; font-weight: 800; line-height: 56px; text-align: center;
  background: linear-gradient(135deg, #12a8a6, #0a5f60);
  letter-spacing: -1px;
}
#auth h1 { font-size: 22px; text-align: center; margin-bottom: 5px; letter-spacing: .5px; }
#auth h1 .accent { color: #2dd4bf; }
#auth .sub { font-size: 10px; color: #5d6b78; letter-spacing: 3px; text-align: center; margin-bottom: 20px; }
.tabs2 { margin-bottom: 18px; text-align: center; }
.tabs2 button {
  padding: 9px 18px; margin: 0 3px; border-radius: 9px; border: 1px solid transparent;
  background: transparent; color: #93a3b0; font-weight: 600; cursor: pointer;
}
.tabs2 button.on { background: #16232a; border-color: #12a8a6; color: #e6edf3; }
.err { color: #f87171; font-size: 13px; margin-top: 10px; min-height: 18px; text-align: center; }
.tipbox { background: #0d161b; border: 1px solid #1d2a33; border-left: 3px solid #12a8a6;
  border-radius: 8px; padding: 10px 12px; font-size: 12px; color: #8b9aa8; line-height: 1.7; margin-bottom: 14px; }
.sso-line { margin-top: 16px; padding-top: 16px; border-top: 1px dashed #1d2a33; text-align: center; }

/* ---------- 主界面 ---------- */
#app { display: none; height: 100%; }
/* 顶栏三段（左头像 / 中品牌 / 右状态+设置+退出）全部绝对定位。
   —— 以前用 float + overflow:hidden：手机字号一大（小米 / Via 跟随系统字号），
   右侧那一段挤不下就会浮动换行到第二行，而顶栏固定 54px 高 + overflow:hidden
   会把它整个裁掉，表现就是「右上角的东西全没了」。绝对定位不会换行，也就裁不到。 */
.topbar {
  height: 54px; padding: 0 14px; background: #0d1216;
  border-bottom: 1px solid #1d2a33; position: relative; z-index: 50;
}
.topbar .lg {
  position: absolute; left: 14px; top: 12px; width: 30px; height: 30px; margin: 0;
  border-radius: 9px;
  color: #fff; font-weight: 800; font-size: 15px; line-height: 30px; text-align: center;
  background: linear-gradient(135deg, #12a8a6, #0a5f60); letter-spacing: -1px;
}
.topbar .tt {
  position: absolute; left: 53px; right: 250px; top: 0; height: 54px; line-height: 54px;
  font-weight: 800; font-size: 16px; letter-spacing: .3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topbar .tt .accent { color: #2dd4bf; }
.topbar .rt {
  position: absolute; right: 14px; top: 0; height: 54px; line-height: 54px;
  font-size: 12px; color: #93a3b0; white-space: nowrap; text-align: right;
}
.topbar .rt b { color: #e6edf3; }
/* 名字过长只截名字本身，后面的身份标识（超级管理员等）一定露出来 */
.topbar .rt .me-nm {
  display: inline-block; max-width: 130px; vertical-align: middle;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.topbar .rt .lnk { color: #2dd4bf; cursor: pointer; margin-left: 10px; border: none;
  background: transparent; font-size: 12px; padding: 0; font-weight: 600; }
.conn { display: inline-block; width: 8px; height: 8px; border-radius: 4px; background: #5d6b78; margin-right: 6px; }
.conn.on { background: #34d399; }

/* 三栏固定定位：老浏览器（iOS5/Android4）对 fixed + left/right/top/bottom 支持最好 */
.side {
  position: fixed; left: 0; top: 54px; bottom: 0; width: 268px;
  background: #0d1216; border-right: 1px solid #1d2a33;
}
/* 会话栏表头：左边「会话」，右边一个「+」（添加好友 / 建群 / 私聊都收进这个加号里） */
.side-hd { height: 48px; padding: 0 10px 0 12px; border-bottom: 1px solid #1d2a33; position: relative; }
.side-hd .t { display: block; float: left; font-weight: 700; font-size: 14px; line-height: 48px; }
/* 「+」也改成绝对定位贴右边：字号被系统放大时浮动按钮同样会被挤到下一行 */
.side-hd .plusbtn {
  position: absolute; right: 10px; top: 9px; width: 30px; height: 30px; padding: 0;
  line-height: 28px; text-align: center; border-radius: 9px;
  border: 1px solid #1d2a33; background: #141b21; color: #93a3b0;
  font-size: 19px; font-weight: 700; cursor: pointer;
}
.side-hd .plusbtn:hover, .side-hd .plusbtn.on { border-color: #12a8a6; color: #e6edf3; }
.plusmenu {
  display: none; position: absolute; right: 10px; top: 50px; width: 170px; z-index: 300;
  background: #121a20; border: 1px solid #24343f; border-radius: 12px; padding: 6px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .5);
}
.plusmenu.on { display: block; }
.plusmenu .mi {
  position: relative; display: block; padding: 10px 12px; border-radius: 8px;
  font-size: 13px; font-weight: 600; color: #c3d0da; cursor: pointer;
}
.plusmenu .mi:hover { background: #1a2630; color: #e6edf3; }
.plusmenu .mi .dot { position: absolute; top: 6px; right: 8px; margin: 0; }
.rooms { position: absolute; left: 0; right: 0; top: 48px; bottom: 0; overflow-y: auto; }
.room { position: relative; padding: 10px 12px 10px 54px; min-height: 62px; cursor: pointer; border-bottom: 1px solid #121a20; }
.room:hover { background: #121a20; }
.room.on { background: #16232a; }
.room .av {
  position: absolute; left: 12px; top: 12px; width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, #1b3038, #142228); color: #7fd8d6;
  font-weight: 700; font-size: 14px; line-height: 36px; text-align: center;
}
.room .nm { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; padding-right: 42px; line-height: 19px; }
.room .lp { font-size: 11px; color: #5d6b78; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; margin-top: 3px; }
.room .bd {
  position: absolute; right: 12px; top: 12px; background: #f87171; color: #fff;
  font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 9px;
}
.room .ol { position: absolute; left: 40px; top: 40px; width: 9px; height: 9px; border-radius: 5px;
  background: #5d6b78; border: 2px solid #0d1216; }
.room .ol.on { background: #34d399; }
/* 安全中心入口行：盾牌用青绿渐变，一眼可辨 */
.room .sc-av { background: linear-gradient(135deg, #12a8a6, #0a5f60); color: #fff; }

.chat {
  position: fixed; left: 268px; right: 0; top: 54px; bottom: 0;
  background: #090d10;
}
/* AI 会话：输入栏上方悬浮的「上下文使用情况」椭圆按钮（最左侧，宽度随文字） */
.ctxbar { position: absolute; left: 10px; bottom: 76px; z-index: 6; }
.ctx-pill {
  display: inline-block; padding: 7px 14px; border-radius: 999px; cursor: pointer;
  background: rgba(13, 20, 26, .88); border: 1px solid #233240;
  color: #9fb3c8; font-size: 12px; line-height: 1; white-space: nowrap;
}
.ctx-pill:active { background: #1a2530; }
/* 上下文使用情况页 */
.ai-ctx-box { background: #101820; border: 1px solid #1d2a33; border-radius: 10px; padding: 14px; margin-bottom: 12px; }
.ai-ctx-bar { height: 8px; background: #1a2530; border-radius: 999px; overflow: hidden; margin-bottom: 8px; }
.ai-ctx-bar i { display: block; height: 100%; background: linear-gradient(90deg, #12a8a6, #2bd4c8); border-radius: 999px; }
.ai-ctx-bar.sm { margin-top: 6px; margin-bottom: 0; }
.ai-ctx-tip { color: #b7c2cd; font-size: 13px; line-height: 1.7; }
.ai-ctx-tip.dim { color: #8b98a5; font-size: 12px; }
.ai-ctx-item { margin-bottom: 12px; }
.ai-ctx-item b { display: inline-block; color: #e3ecf3; font-size: 13px; margin-right: 8px; }
.ai-ctx-item span { color: #9fb3c8; font-size: 12px; }
#aiCtxDetail b { display: block; color: #e3ecf3; font-size: 13px; margin: 12px 0 6px; }
#aiCtxDetail b:first-child { margin-top: 0; }
#aiCtxDetail p { color: #b7c2cd; font-size: 13px; line-height: 1.8; margin: 0 0 4px; word-break: break-all; }
/* 管理统计图表 + 聊天预览水印 */
.chart { width: 100%; display: block; margin-bottom: 14px; border-radius: 10px; }
.wm { position: relative; min-height: 320px; }
.wm-layer { position: absolute; left: 0; top: 0; right: 0; bottom: 0; pointer-events: none; overflow: hidden; z-index: 2; }
.wm-layer span {
  position: absolute; color: #bcd8f5; opacity: .17; font-size: 20px; font-weight: 700;
  transform: rotate(-22deg); white-space: nowrap; letter-spacing: 1px;
  text-shadow: 0 0 5px rgba(20, 60, 110, .55);
}
.cl-msgs { position: relative; z-index: 1; }
/* 窄屏（手机）：水印字号必须跟着缩，否则 4 列「VyueChat」横向放不下会互相叠在一起；
   同时再抬一点不透明度，做到"非常明显"但压在文字下面、不挡阅读 */
@media (max-width: 700px) {
  .wm-layer span { font-size: 12px; opacity: .21; letter-spacing: 0; }
}
.cl-day { color: #8b98a5; font-size: 12px; margin: 10px 0 6px; }
.cl-m { margin-bottom: 8px; }
.cl-m .cl-t { color: #8b98a5; font-size: 11px; margin-right: 8px; }
.cl-m p { display: inline; color: #e3ecf3; font-size: 13px; line-height: 1.7; word-break: break-all; margin: 0; }
/* 发布动态：可见时长快捷选择 + 我的动态列表 */
.pub-days { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.pub-day-chip {
  display: inline-block; padding: 6px 14px; border-radius: 999px; cursor: pointer;
  background: #0d1319; border: 1px solid #233240; color: #9fb3c8; font-size: 13px; line-height: 1;
}
.pub-day-chip.on { background: rgba(45, 212, 191, .16); border-color: rgba(45, 212, 191, .55); color: #2dd4bf; }
.pub-tip { color: #8b98a5; font-size: 12px; line-height: 1.7; margin: 6px 2px 12px; }
.my-mo-list { max-height: 55vh; overflow-y: auto; }
.my-mo { background: #0d1319; border: 1px solid #1d2a33; border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.my-mo.hid { opacity: .62; border-style: dashed; }
.my-mo-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.my-mo-time { color: #8b98a5; font-size: 12px; }
.my-mo-del { color: #ff6b6b; font-size: 12px; cursor: pointer; white-space: nowrap; }
.my-mo-del:hover { text-decoration: underline; }
.my-mo-body { color: #dbe4ea; font-size: 13px; line-height: 1.7; margin-top: 6px; word-break: break-all; }
body.info-on .chat { right: 240px; }
/* 聊天窗口右边留出 ☰ 的位置（padding-right），并把 ☰ 钉死在最右：
   群名很长 + 系统字号被放大时，浮动按钮不会再被挤到第二行后裁掉 */
.chat-hd {
  height: 50px; line-height: 50px; padding: 0 52px 0 14px;
  border-bottom: 1px solid #1d2a33; position: relative;
}
.chat-hd .nm { font-weight: 700; font-size: 15px; float: left; }
.chat-hd .st { float: left; font-size: 11px; color: #5d6b78; margin-left: 10px; }
.chat-hd .ops { float: right; }
.chat-hd .ops button {
  padding: 5px 10px; margin-left: 5px; border-radius: 8px; border: 1px solid #1d2a33;
  background: #141b21; color: #93a3b0; font-size: 12px; font-weight: 600; cursor: pointer;
}
.chat-hd .ops button:hover { border-color: #12a8a6; color: #e6edf3; }
.flow { position: absolute; left: 0; right: 0; top: 50px; bottom: 80px; overflow-y: auto; padding: 14px; }
.typing { position: absolute; left: 0; right: 0; bottom: 64px; height: 16px; line-height: 16px;
  padding: 0 14px; font-size: 11px; color: #5d6b78; font-style: italic; }
.inbox { position: absolute; left: 0; right: 0; bottom: 0; height: 64px; border-top: 1px solid #1d2a33;
  background: #0d1216; padding: 10px 12px; }
.inbox textarea {
  width: 100%; height: 46px; padding: 9px 11px; background: #141b21; border: 1px solid #1d2a33;
  border-radius: 10px; color: #e6edf3; font-size: 14px; resize: none; display: block;
}
.inbox textarea:focus { border-color: #12a8a6; }
.inbox .bar { margin-top: 8px; height: 30px; }
.inbox .bar .left { float: left; }
.inbox .bar .right { float: right; }
.inbox .bar button {
  padding: 6px 11px; margin-right: 6px; border-radius: 9px; border: 1px solid #1d2a33;
  background: #141b21; color: #93a3b0; font-size: 12px; font-weight: 600; cursor: pointer;
}
.inbox .bar button:hover { border-color: #12a8a6; color: #e6edf3; }
.inbox .bar button.send {
  border: none; color: #fff; padding: 7px 20px; font-size: 13px;
  background: linear-gradient(135deg, #12a8a6, #0a5f60);
}
.emoji { position: absolute; left: 12px; right: 12px; bottom: 64px; background: #101820;
  border: 1px solid #1d2a33; border-radius: 12px; padding: 8px; display: none; z-index: 40; max-height: 150px; overflow-y: auto; }
.emoji span { display: inline-block; width: 30px; height: 30px; line-height: 30px; text-align: center;
  font-size: 18px; cursor: pointer; border-radius: 7px; }
.emoji span:hover { background: #16232a; }

.info {
  position: fixed; right: 0; top: 54px; bottom: 0; width: 240px;
  background: #0d1216; border-left: 1px solid #1d2a33; display: none;
}
body.info-on .info { display: block; }
.info-hd { height: 45px; padding: 12px; border-bottom: 1px solid #1d2a33; font-weight: 700; font-size: 14px; }
.info .mems { position: absolute; left: 0; right: 0; top: 45px; bottom: 0; padding: 6px; overflow-y: auto; }
.mem { padding: 7px 9px 7px 40px; position: relative; border-radius: 9px; min-height: 40px; }
.mem:hover { background: #121a20; }
.mem .av { position: absolute; left: 6px; top: 6px; width: 28px; height: 28px; border-radius: 14px;
  background: linear-gradient(135deg, #1b3038, #142228); color: #7fd8d6; font-size: 11px;
  font-weight: 700; line-height: 28px; text-align: center; }
.mem .nm { font-size: 13px; line-height: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mem .rl { font-size: 10px; color: #5d6b78; }
.mem .rl.owner { color: #fbbf24; }
.mem .mop { float: right; font-size: 11px; color: #2dd4bf; cursor: pointer; margin-top: -18px; }
.mem .ol { position: absolute; left: 28px; top: 28px; width: 8px; height: 8px; border-radius: 4px;
  background: #5d6b78; border: 2px solid #0d1216; }
.mem .ol.on { background: #34d399; }

/* ---------- 消息气泡 ---------- */
.msg { margin-bottom: 12px; }
.msg .who { font-size: 11px; color: #5d6b78; margin-bottom: 3px; }
.msg .bub {
  display: inline-block; max-width: 76%; padding: 9px 13px; border-radius: 14px;
  background: #141b21; border: 1px solid #1d2a33; line-height: 1.55;
  word-wrap: break-word; word-break: break-word; white-space: pre-wrap;
}
.msg.me { text-align: right; }
.msg.me .bub { background: linear-gradient(135deg, #0e3b3d, #0a2b2e); border-color: #16585a; text-align: left; }
.msg .tm { font-size: 10px; color: #4a5760; margin-top: 3px; }
.msg .ref { font-size: 11px; color: #8b9aa8; border-left: 2px solid #12a8a6; padding: 3px 7px;
  margin-bottom: 5px; background: #0d161b; border-radius: 0 6px 6px 0; }
.msg .sys { font-size: 12px; color: #5d6b78; text-align: center; font-style: italic; margin: 10px 0; }
.msg img.pic { max-width: 240px; max-height: 240px; border-radius: 9px; display: block; cursor: pointer; border: 0; }
.msg .file { display: block; padding: 8px 11px; background: #0d161b; border: 1px solid #1d2a33;
  border-radius: 9px; color: #e6edf3; }
.msg .file:hover { border-color: #12a8a6; }
.msg .file .fn { font-size: 13px; }
.msg .file .fs { font-size: 11px; color: #5d6b78; }
.msg .op { font-size: 11px; color: #5d6b78; margin-left: 8px; cursor: pointer; }
.msg .op:hover { color: #2dd4bf; }

/* ---------- 弹窗 ---------- */
#mask { position: fixed; left: 0; top: 0; right: 0; bottom: 0; background: rgba(3, 6, 8, .84);
  z-index: 480; display: none; }
#mask.on { display: block; }
.dlg { width: 92%; max-width: 420px; margin: 8vh auto 0; background: #101820; border: 1px solid #1d2a33;
  border-radius: 16px; padding: 20px; }
.dlg h3 { font-size: 16px; }
.dlg .modal-hd { overflow: hidden; margin-bottom: 14px; }
.dlg .modal-hd h3 { float: left; line-height: 26px; }
.dlg .mx { float: right; width: 26px; height: 26px; line-height: 24px; text-align: center;
  font-size: 20px; color: #93a3b0; cursor: pointer; border-radius: 7px; }
.dlg .mx:hover { background: #16232a; color: #e6edf3; }
.dlg .list { max-height: 240px; overflow-y: auto; border: 1px solid #1d2a33; border-radius: 10px; margin-bottom: 12px; }
.dlg .u { padding: 10px 12px; border-bottom: 1px solid #16232a; cursor: pointer; }
.dlg .u:hover { background: #16232a; }
.dlg .u.sel { background: #1b3038; }
.dlg .u .n { font-weight: 600; font-size: 14px; }
.dlg .u .a { font-size: 11px; color: #5d6b78; }
.dlg .u .chk { float: right; color: #2dd4bf; font-weight: 700; }
/* 隐私设置：一行一个选项，右边是开关 */
.dlg .pvrow { padding: 10px 2px; border-bottom: 1px solid #16232a; overflow: hidden; }
.dlg .pvrow .pvlb { float: left; width: 64%; color: #c9d6e0; font-size: 13px; line-height: 19px; }
.dlg .pvrow .pvlb i { display: block; color: #5d6b78; font-size: 11px; font-style: normal;
  line-height: 16px; margin-top: 2px; }
.dlg .pvrow .sw {
  float: right; min-width: 58px; padding: 6px 12px; border-radius: 9px; cursor: pointer;
  border: 1px solid #1d2a33; background: #141b21; color: #93a3b0;
  font-size: 12px; font-weight: 700;
}
.dlg .pvrow .sw.on { border-color: transparent; color: #fff;
  background: linear-gradient(135deg, #12a8a6, #0a5f60); }

#toast { position: fixed; left: 50%; bottom: 30px; margin-left: -140px; width: 280px; text-align: center;
  background: #141b21; border: 1px solid #1d2a33; padding: 11px 16px; border-radius: 10px;
  font-size: 13px; z-index: 500; display: none; }
#toast.ok { border-color: #34d399; }
#toast.err { border-color: #f87171; }

.empty { text-align: center; padding: 36px 14px; color: #5d6b78; font-size: 13px; line-height: 2;
  white-space: pre-line; }

/* 兼容性提示条（老设备才显示，浮在底部不占布局） */
#compatBar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 450; display: none;
  background: #2a2210; border-top: 1px solid #4a3a1c; color: #fbbf24;
  font-size: 12px; line-height: 1.6; padding: 8px 12px;
  padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
}
#compatBar div + div { margin-top: 4px; }

/* ==================== 屏幕适配 ====================
 * 桌面大屏：三栏（会话 | 聊天 | 信息）
 * 中等屏：  收窄侧栏，信息栏改为不占位
 * 平板竖屏：隐藏信息栏，聊天区占满
 * 手机：    单栏，会话列表与聊天区互相切换
 */

/* iPad 竖屏 / 小笔记本 */
@media (max-width: 1180px) {
  .side { width: 230px; }
  .chat { left: 230px; }
  body.info-on .chat { right: 210px; }
  .info { width: 210px; }
}

/* 平板 / 大屏手机横屏：信息栏不再挤压聊天区 */
@media (max-width: 980px) {
  body.info-on .info { display: none; }
  body.info-on .chat { right: 0; }
}

/* 手机：单栏切换 */
@media (max-width: 700px) {
  .side { width: 100%; border-right: 0; }
  .chat { left: 0; display: none; }
  body.mobile-chat .side { display: none; }
  body.mobile-chat .chat { display: block; }
  /* iOS 在输入框字号 <16px 时会自动放大页面，这里统一提到 16px */
  .field input, .field textarea, .field select, .inbox textarea { font-size: 16px; }
  /* 高度跟着安全区一起长，别让刘海屏把输入条挤扁（老浏览器不认 env 会回落到上面的 64px） */
  .inbox { height: calc(70px + env(safe-area-inset-bottom, 0px));
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
  .inbox textarea#ta { font-size: 16px; }
  .flow { bottom: 86px; }
  .typing { bottom: 70px; }
  .emoji { bottom: 70px; }
  /* 触屏按钮加大点击区域 */
  .btn { padding: 13px 18px; }
  .side-hd { height: 56px; padding: 0 12px; }
  .side-hd .t { line-height: 56px; }
  .side-hd .plusbtn { width: 34px; height: 34px; top: 11px; line-height: 32px; font-size: 21px; }
  .plusmenu { top: 58px; }
  .rooms { top: 56px; }
  .chat-hd .ops button { padding: 7px 11px; }
  .inbox .bar button { padding: 8px 12px; }
  .inbox .bar button.send { padding: 9px 22px; }
  .room { min-height: 66px; }
  .msg .bub { max-width: 84%; }
}

/* 手机：顶栏塞不下品牌名，先收起来，保证右上角的连接状态 / 设置 / 退出一定看得见 */
@media (max-width: 560px) {
  .topbar .tt { display: none; }
}
/* 更窄（320~460px）：连接状态只留小圆点，再给右边腾一点位置 */
@media (max-width: 460px) {
  #connTxt { display: none; }
  .topbar .rt .lnk { margin-left: 8px; }
}

/* 超窄屏（老式手机 320px 宽） */
@media (max-width: 380px) {
  .topbar .rt { font-size: 11px; }
  .topbar .rt .lnk { margin-left: 6px; }
  #auth .box { padding: 22px 18px; }
  .msg .bub { max-width: 90%; }
  .msg img.pic { max-width: 180px; max-height: 180px; }
}

/* 大屏优化：限制聊天区过宽，避免长行难读 */
@media (min-width: 1600px) {
  .flow { padding: 16px 8%; }
  .inbox { padding: 10px 8%; }
  .chat-hd { padding: 0 8%; }
}

/* ==================== 联系人页 / 动态页 ==================== */
.page {
  position: fixed; left: 0; right: 0; top: 54px; bottom: 0;
  background: #090d10; display: none; overflow-y: auto;
  -webkit-overflow-scrolling: touch; z-index: 200;
}
body.tab-contacts #pageContacts,
body.tab-moments #pageMoments,
body.tab-mfeed #pageMomentsFeed,
body.tab-admin #pageAdmin,
body.tab-safety #pageSafety { display: block; }
body.tab-contacts .side, body.tab-contacts .chat, body.tab-contacts .info,
body.tab-moments .side, body.tab-moments .chat, body.tab-moments .info,
body.tab-mfeed .side, body.tab-mfeed .chat, body.tab-mfeed .info,
body.tab-admin .side, body.tab-admin .chat, body.tab-admin .info,
body.tab-safety .side, body.tab-safety .chat, body.tab-safety .info { display: none !important; }

.page-hd { padding: 16px 16px 6px; font-size: 17px; font-weight: 700; color: #e6edf3; overflow: hidden; }
.page-hd .pg-back { float: left; margin-right: 10px; color: #2dd4bf; font-size: 14px; font-weight: 600;
  cursor: pointer; display: inline-flex; align-items: center; gap: 1px;
  padding: 3px 11px 3px 6px; border-radius: 20px;
  background: rgba(45,212,191,.12); border: 1px solid rgba(45,212,191,.26);
  transition: background .15s ease; }
.page-hd .pg-back:hover { background: rgba(45,212,191,.22); color: #7fd8d6; }
.page-bd { padding: 0 12px 28px; }

/* ---- AI 好友：创建页 / 隐私协议 ---- */
.ai-ta {
  width: 100%; box-sizing: border-box; min-height: 120px; resize: vertical;
  background: #0d1319; border: 1px solid rgba(148, 163, 184, .25); border-radius: 10px;
  color: #e6edf3; padding: 10px 12px; line-height: 1.5;
}
.ai-agree { display: flex; align-items: center; gap: 6px; margin: 14px 2px 16px; flex-wrap: wrap; }
.ai-agree-lb { color: #b7c2cd; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.ai-agree input[type="checkbox"] { width: 16px; height: 16px; accent-color: #12a8a6; }
.ai-link { color: #4da3ff; font-size: 14px; cursor: pointer; }
.ai-link:hover { text-decoration: underline; }
.ai-tip { margin-top: 14px; color: #8b98a5; font-size: 12px; line-height: 1.7; }
.ai-policy { color: #b7c2cd; font-size: 14px; line-height: 1.8; }
.ai-policy p { margin: 8px 0; }
.ai-policy h4 { margin: 16px 0 4px; color: #e6edf3; font-size: 15px; }

/* 带返回按钮的页面标题（安全中心 / 空间动态详情）：用 flex 排一行，
   返回按钮固定在最左，绝不用 float（float 在老设备/放大字体下会被挤飞） */
.page-hd.hd-bar { display: flex; align-items: center; gap: 8px; overflow: visible; }
.page-hd.hd-bar .hd-back {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; padding: 0; cursor: pointer; border-radius: 50%;
  color: #2dd4bf; background: rgba(45,212,191,.12); border: 1px solid rgba(45,212,191,.26);
  -webkit-tap-highlight-color: transparent;
}
.page-hd.hd-bar .hd-back:active { background: rgba(45,212,191,.26); }
.page-hd.hd-bar .hd-back svg { width: 17px; height: 17px; display: block; }
.page-hd.hd-bar .hd-back svg polyline {
  fill: none; stroke: currentColor; stroke-width: 2.4;
  stroke-linecap: round; stroke-linejoin: round;
}
.page-hd.hd-bar .hd-t { flex: 1 1 auto; min-width: 0; }
.sec-hd { padding: 16px 4px 8px; color: #7c8b98; font-size: 12px; }

.row-btn {
  display: block; position: relative; padding: 14px; margin-bottom: 10px;
  background: #101820; border: 1px solid #1d2a33; border-radius: 12px; cursor: pointer;
}
.row-btn:hover { background: #131d26; border-color: #26414f; }
.row-btn .lb { color: #e6edf3; font-size: 15px; }
.row-btn .sub { color: #6b7a87; font-size: 12px; margin-left: 8px; }
.row-btn .rt { position: absolute; right: 12px; top: 50%; margin-top: -9px; }
.row-btn .rt .dot { vertical-align: middle; margin: 0 4px 0 0; }
.row-btn .arw { color: #5d6b78; font-size: 20px; margin-left: 6px; }

.search-row { overflow: hidden; margin-bottom: 10px; }
.search-row input {
  float: left; width: 68%; box-sizing: border-box; padding: 11px 12px;
  background: #141b21; border: 1px solid #1d2a33; border-radius: 10px;
  color: #e6edf3; font-size: 14px;
}
.search-row .btn { float: right; width: 30%; padding: 12px 0; }

.hlist { border: 1px solid #1d2a33; border-radius: 12px; overflow: hidden; margin-bottom: 8px; }
.hlist .u { padding: 12px 14px; border-bottom: 1px solid #16232a; color: #e6edf3;
  font-size: 14px; overflow: hidden; }
.hlist .u:last-child { border-bottom: 0; }
.hlist .u .n { float: left; max-width: 58%; overflow: hidden; white-space: nowrap;
  text-overflow: ellipsis; }
.hlist .u .sm { color: #6b7a87; font-size: 12px; margin-left: 6px; }
.hlist .u .a { float: right; color: #6b7a87; font-size: 12px; }
.hlist .u .chk { float: right; color: #14b8b6; font-size: 13px; margin-left: 12px; cursor: pointer; }
.hlist .u .chk:hover { text-decoration: underline; }
.hlist .u .hint { color: #6b7a87; font-size: 13px; }

/* ---------- 未读小红点（统一样式） ---------- */
.dot {
  display: none; width: 9px; height: 9px; border-radius: 5px;
  background: #f5455c; margin-left: 5px; vertical-align: top;
}
.dot.on { display: inline-block; }
/* 消息 Tab 的未读数字：>99 显示 99+，其余显示具体条数；位置与红点一致（浮在图标右上方） */
.dot.on.num {
  width: auto; min-width: 16px; height: 16px; line-height: 16px; padding: 0 5px;
  border-radius: 8px; font-size: 10px; font-weight: 700; text-align: center;
  color: #fff; background: #f5455c; box-sizing: border-box;
}

/* ---------- 底部导航（手机 / 平板）：仿 ZChat 的深色栏 + 线性图标 ---------- */
.bottomnav {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; height: 56px;
  z-index: 320; background: #1b1b1d; border-top: 1px solid rgba(255,255,255,.07);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.bottomnav .nv {
  position: relative; float: left; width: 33.333%; height: 56px; background: none; border: 0;
  color: #8e8e93; font-size: 11px; cursor: pointer; padding: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  -webkit-tap-highlight-color: transparent;
}
/* 线性图标：描边跟随文字颜色，选中变蓝 */
.bottomnav .nv .ic { width: 23px; height: 23px; display: block; }
.bottomnav .nv .ic path, .bottomnav .nv .ic circle, .bottomnav .nv .ic polygon {
  fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}
.bottomnav .nv .lb { font-size: 11px; line-height: 1; }
.bottomnav .nv.on { color: #0a84ff; }
/* 红点浮在图标右上方 */
.bottomnav .nv .dot { position: absolute; top: 7px; left: 50%; margin: 0 0 0 7px; }
/* 进了聊天窗口就把底部导航收起来：整屏都是聊天，工具条贴近屏幕底部 */
body.mobile-chat .bottomnav { display: none; }
body.mobile-chat .chat { bottom: 0; }

@media (max-width: 1023px) {
  .bottomnav { display: block; }
  .side, .chat, .info, .page { bottom: 56px; }
  .page-hd { padding-top: 12px; }
  .page-hd .pg-back { display: none; }   /* 手机/平板靠底部导航返回 */
}

/* 安全中心 / 管理面板 / 空间动态详情：这几个二级页自带返回按钮，进来就把底部导航收起，
   整屏交给内容（和 QQ 进二级页的行为一致） */
body.tab-safety .bottomnav, body.tab-admin .bottomnav, body.tab-mfeed .bottomnav { display: none; }
body.tab-safety #pageSafety, body.tab-admin #pageAdmin, body.tab-mfeed #pageMomentsFeed { bottom: 0; }
/* 管理面板内部再打开的二级页（统计 / 内容预览 / AI 数据）同样收掉底部导航，整屏留白也补平 */
body.tab-admin .page { bottom: 0; }

/* ---------- 图片查看器（点图片全屏预览） ----------
   手机端 window.open(blob/URL) 常被浏览器当弹窗拦截，所以改用页内浮层，
   点任意处关闭；电脑端体验与原来一致 */
.img-viewer {
  display: none; position: fixed; left: 0; right: 0; top: 0; bottom: 0; z-index: 900;
  background: rgba(0, 0, 0, .92); align-items: center; justify-content: center; padding: 14px;
}
.img-viewer.on { display: -webkit-box; display: -webkit-flex; display: flex; }
.img-viewer img { max-width: 100%; max-height: 100%; border-radius: 8px; }

/* ==================== 空间动态：好友动态流 ==================== */
/* 给右下角发布按钮留出位置，别把最后一条动态盖住 */
body.tab-mfeed .page-bd { padding-bottom: 100px; }
.mfeed { background: #101820; border: 1px solid #1d2a33; border-radius: 12px;
  padding: 12px; margin-bottom: 10px; }
.mfeed .mh { overflow: hidden; }
.mfeed .mav { float: left; width: 34px; height: 34px; border-radius: 17px; margin-right: 9px;
  background: linear-gradient(135deg, #1b3038, #142228); color: #7fd8d6; font-weight: 700;
  font-size: 14px; line-height: 34px; text-align: center; overflow: hidden; }
.mfeed .mav img { width: 100%; height: 100%; border-radius: 17px; display: block; border: 0; }
.mfeed .mn { color: #e6edf3; font-size: 14px; font-weight: 600; line-height: 18px; }
.mfeed .ms { color: #6b7a87; font-size: 11px; line-height: 16px; }
.mfeed .mbody { clear: both; padding: 9px 0 4px; color: #c9d6e0; font-size: 14px;
  line-height: 1.65; word-wrap: break-word; word-break: break-word; white-space: pre-wrap; }
.mfeed .mplace { color: #2dd4bf; font-size: 12px; padding-bottom: 6px; }
.mfeed .mmedia { padding: 4px 0 8px; }
.mfeed .mmedia img { max-width: 100%; border-radius: 10px; display: block; border: 0; cursor: pointer; }
.mfeed .mmedia video { max-width: 100%; border-radius: 10px; display: block; background: #000; }
.mfeed .mmedia audio { width: 100%; margin-top: 6px; }
.mfeed .mmedia .dl { display: inline-block; padding: 7px 11px; background: #0d161b;
  border: 1px solid #1d2a33; border-radius: 9px; color: #e6edf3; font-size: 13px; margin-top: 6px; }
.mfeed .mbar { overflow: hidden; border-top: 1px solid #16232a; padding-top: 8px; margin-top: 4px; }
.mfeed .mact { float: left; color: #14b8b6; font-size: 13px; margin-right: 16px; cursor: pointer; }
.mfeed .mact:hover { text-decoration: underline; }
.mfeed .mcm { clear: both; padding: 6px 0 0; color: #8a9aa7; font-size: 13px;
  line-height: 1.6; word-wrap: break-word; }
.mfeed .mcm b { color: #b9c7d3; font-weight: 600; }
/* 点赞名单：谁赞过公开可见 */
.mfeed .mlikes { clear: both; padding: 7px 0 0; color: #7fd8d6; font-size: 13px;
  line-height: 1.6; word-wrap: break-word; }
.mfeed .mlikes b { color: #9aa8c4; font-weight: 600; }
.mfeed .mempty { text-align: center; padding: 60px 20px; color: #6b7a87;
  font-size: 14px; line-height: 2; }

/* 右下角「发布动态」按钮：蓝底白加号 */
.fab {
  position: fixed; right: 20px; bottom: 76px; width: 56px; height: 56px; padding: 0;
  border: 0; border-radius: 28px; background: #1a73e8; color: #fff; cursor: pointer;
  z-index: 260; box-shadow: 0 6px 18px rgba(0, 0, 0, .5);
}
.fab:hover { background: #2b82f0; }
.fab:active { transform: scale(.95); }
.fab .plus { display: block; font-size: 30px; line-height: 54px; font-weight: 300;
  color: #fff; text-align: center; }

/* ---------- 发布动态窗口 ---------- */
.pub-ta { width: 100%; box-sizing: border-box; height: 84px; padding: 10px;
  background: #141b21; border: 1px solid #1d2a33; border-radius: 10px;
  color: #e6edf3; font-size: 14px; resize: none; display: block; }
.pub-ta:focus { border-color: #12a8a6; }
.pub-row { overflow: hidden; margin-top: 10px; }
.pub-row .btn { float: left; margin: 0 6px 0 0; }
.pub-chips { margin-top: 10px; }
.pub-chip { position: relative; display: inline-block; width: 76px; height: 76px;
  margin: 0 8px 8px 0; border-radius: 10px; overflow: hidden; background: #0d161b;
  border: 1px solid #1d2a33; vertical-align: top; }
.pub-chip img, .pub-chip video { width: 100%; height: 100%; object-fit: cover; display: block; border: 0; }
.pub-chip .ct { width: 100%; height: 100%; color: #7fd8d6; font-size: 12px; text-align: center;
  line-height: 76px; }
.pub-chip .del { position: absolute; right: 0; top: 0; width: 20px; height: 20px;
  line-height: 18px; text-align: center; background: rgba(0, 0, 0, .6); color: #fff;
  font-size: 14px; cursor: pointer; }
.pub-chip .up { position: absolute; left: 0; right: 0; bottom: 0; height: 18px; line-height: 18px;
  text-align: center; background: rgba(0, 0, 0, .6); color: #7fd8d6; font-size: 11px; }

/* ==================== 聊天里的语音 / 视频 ==================== */
.msg audio.voice { width: 220px; max-width: 100%; display: block; }
.msg video.vid { max-width: 260px; max-height: 260px; border-radius: 9px; display: block;
  background: #000; border: 0; }

/* ==================== 通话界面 ==================== */
#callPane { position: fixed; left: 0; top: 0; right: 0; bottom: 0; z-index: 600;
  background: #05080a; display: none; }
#callPane.on { display: block; }
.call-top { position: absolute; left: 0; right: 0; top: 0; height: 64px; text-align: center;
  padding-top: 16px; }
.call-top .call-who { color: #e6edf3; font-size: 16px; font-weight: 700; }
.call-top .call-st { color: #6b7a87; font-size: 12px; margin-top: 4px; }
.call-grid { position: absolute; left: 8px; right: 8px; top: 72px; bottom: 84px; overflow: hidden; }
.call-grid .tile { position: relative; background: #0d1216; border: 1px solid #1d2a33;
  border-radius: 10px; overflow: hidden; }
.call-grid .tile video { width: 100%; height: 100%; object-fit: cover; display: block;
  background: #000; border: 0; }
.call-grid .tile .nm { position: absolute; left: 6px; bottom: 4px; color: #e6edf3; font-size: 11px;
  background: rgba(0, 0, 0, .5); padding: 1px 6px; border-radius: 8px; }
/* 只有一个人的视频时铺满，多人时两列 */
.call-grid.one .tile { position: absolute; left: 0; right: 0; top: 0; bottom: 0; }
.call-grid.many { overflow-y: auto; }
.call-grid.many .tile { float: left; width: 48%; height: 160px; margin: 0 2% 8px 0; }
.call-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 84px; text-align: center;
  padding-top: 14px;
  padding-bottom: env(safe-area-inset-bottom, 0px); }
.call-bar button { display: inline-block; min-width: 92px; margin: 0 6px; padding: 12px 18px;
  border-radius: 24px; border: 1px solid #1d2a33; background: #141b21; color: #e6edf3;
  font-size: 14px; font-weight: 600; cursor: pointer; }
.call-bar button.hangup { background: #d93025; border-color: #d93025; color: #fff; }
.call-bar button.off { background: #2a2f36; color: #93a3b0; }

/* 来电弹窗 */
#ringBox { position: fixed; left: 0; top: 0; right: 0; bottom: 0; z-index: 700;
  background: rgba(3, 6, 8, .88); display: none; }
#ringBox.on { display: block; }
.ring-card { width: 84%; max-width: 320px; margin: 18vh auto 0; background: #101820;
  border: 1px solid #1d2a33; border-radius: 18px; padding: 24px 20px; text-align: center; }
.ring-av { width: 60px; height: 60px; margin: 0 auto 12px; border-radius: 18px; color: #fff;
  font-size: 24px; font-weight: 800; line-height: 60px;
  background: linear-gradient(135deg, #12a8a6, #0a5f60); }
.ring-nm { color: #e6edf3; font-size: 17px; font-weight: 700; }
.ring-sub { color: #6b7a87; font-size: 13px; margin-top: 6px; }
.ring-btns { margin-top: 22px; overflow: hidden; }
.ring-btns button { width: 46%; padding: 13px 0; border-radius: 12px; border: 0;
  font-size: 15px; font-weight: 700; cursor: pointer; }
.ring-btns .rj { float: left; background: #2a2f36; color: #e6edf3; }
.ring-btns .ac { float: right; background: #1a73e8; color: #fff; }

/* ==================== 管理面板 ==================== */
.hlist .u .tag { display: inline-block; padding: 1px 6px; border-radius: 7px; font-size: 11px;
  margin-left: 6px; vertical-align: middle; }
.hlist .u .tag.top { background: #7c2d12; color: #fdba74; }
.hlist .u .tag.super { background: #1e3a8a; color: #93c5fd; }
.hlist .u .tag.senior { background: #164e63; color: #67e8f9; }
.hlist .u .tag.small { background: #14532d; color: #86efac; }
.hlist .u .tag.mgmt { background: #14532d; color: #86efac; }
.hlist .u .tag.ban { background: #7f1d1d; color: #fca5a5; }
/* Vyue 安全中心：举报状态标签 */
.hlist .u .tag.pend { background: #3b2a12; color: #fbbf24; }
.hlist .u .tag.rej { background: #1f2937; color: #9ca3af; }
.hlist .u .tag.mute { background: #3a1a1a; color: #f87171; }

/* ---------- 管理等级标识（聊天 / 成员 / 联系人 通用，人人可见） ---------- */
.adm1, .adm2, .adm3, .adm4 {
  display: inline-block; margin-left: 5px; padding: 1px 6px; border-radius: 8px;
  font-size: 10px; font-weight: 700; line-height: 15px; vertical-align: middle;
  white-space: nowrap;
}
.adm1 { background: rgba(93, 107, 120, .4); color: #b6c4cf; }
.adm2 { background: rgba(45, 212, 191, .16); color: #2dd4bf;
  border: 1px solid rgba(45, 212, 191, .45); }
.adm3 { background: rgba(124, 92, 255, .2); color: #c4b5fd;
  border: 1px solid rgba(124, 92, 255, .5); }
.adm4 { background: linear-gradient(135deg, #f59e0b, #ef4444); color: #fff; }
.hlist .u .ops { clear: both; padding-top: 8px; }
.hlist .u .ops span { display: inline-block; padding: 4px 9px; margin: 0 6px 4px 0;
  border: 1px solid #1d2a33; border-radius: 8px; background: #141b21; color: #93a3b0;
  font-size: 12px; cursor: pointer; }
.hlist .u .ops span:hover { border-color: #12a8a6; color: #e6edf3; }
.hlist .u .ops span.danger { color: #f87171; border-color: #4a1d1d; }

/* 安全提示弹窗（端到端加密不可用） */
.dlg-note { font-size: 13px; line-height: 1.8; color: #93a3b0; margin-bottom: 14px; }
.dlg-chk { display: block; font-size: 13px; color: #93a3b0; margin-bottom: 14px; cursor: pointer; }
.dlg-chk input { vertical-align: middle; margin-right: 6px; }

/* ==================== 聊天标题栏：返回箭头 / 群设置三条杠 ==================== */
.chat-hd { overflow: hidden; }
.chat-hd .ch-back { display: none; float: left; width: 32px; height: 32px; margin: 9px 8px 0 0;
  color: #2dd4bf; cursor: pointer; padding: 0; font-family: inherit;
  align-items: center; justify-content: center; border-radius: 50%;
  background: rgba(45,212,191,.13); border: 1px solid rgba(45,212,191,.30);
  transition: background .15s ease; }
.chat-hd .ch-back:hover { background: rgba(45,212,191,.24); }
.chat-hd .ch-back:active { background: rgba(45,212,191,.34); }
.chat-hd .ch-more { position: absolute; right: 12px; top: 0; width: 30px; height: 50px; text-align: center; font-size: 16px;
  line-height: 50px; color: #93a3b0; cursor: pointer; margin-left: 4px;
  background: none; border: none; padding: 0; font-family: inherit; }
.chat-hd .ch-more:hover { color: #e6edf3; }

/* ==================== 输入区：单行药丸式输入条 ====================
   一排：[表情] [ 输入框（圆角药丸）] [发送] [＋]
   按钮一律绝对定位，输入框用左右内边距给它们让位，老内核也不用 flex。 */
.inbox { height: 64px; padding: 10px 12px; }
.inbox textarea#ta {
  display: block; width: 100%; height: 44px; box-sizing: border-box;
  padding: 12px 112px 12px 46px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 22px; color: #e6edf3; font-size: 14px; line-height: 20px;
  resize: none; overflow: hidden;
  -webkit-transition: border-color .18s, background .18s, box-shadow .18s;
  transition: border-color .18s, background .18s, box-shadow .18s;
}
/* placeholder 前缀全套：iOS5 Safari 只认 -webkit-input-placeholder，Android4 各内核认 -moz/-ms */
.inbox textarea#ta::-webkit-input-placeholder { color: rgba(147, 163, 176, .9); }
.inbox textarea#ta::-moz-placeholder { color: rgba(147, 163, 176, .9); opacity: 1; }
.inbox textarea#ta:-ms-input-placeholder { color: rgba(147, 163, 176, .9); }
.inbox textarea#ta::placeholder { color: rgba(147, 163, 176, .9); }
.inbox textarea#ta:focus {
  border-color: rgba(45, 212, 191, .7);
  background: rgba(45, 212, 191, .06);
  box-shadow: 0 0 0 3px rgba(45, 212, 191, .12);
}
.inbox .act-emoji, .inbox .act-plus {
  position: absolute; top: 16px; width: 32px; height: 32px; padding: 0;
  border-radius: 50%; border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .05); color: #93a3b0;
  cursor: pointer; line-height: 30px; text-align: center;
  -webkit-transition: background .18s, color .18s, border-color .18s;
  transition: background .18s, color .18s, border-color .18s;
}
.inbox .act-emoji { left: 18px; }
.inbox .act-plus { right: 18px; font-size: 20px; }
.inbox .act-emoji:hover, .inbox .act-plus:hover {
  background: rgba(45, 212, 191, .14); color: #2dd4bf; border-color: rgba(45, 212, 191, .5);
}
/* 表情图标：极简笑脸（一个圆 + 两只眼睛 + 一道笑弧），颜色跟着按钮走
   用绝对定位 + 负外边距居中，不受按钮 line-height 的影响（否则会整体往下偏 4px） */
.inbox .act-emoji .face {
  position: absolute; left: 50%; top: 50%;
  width: 18px; height: 18px; margin: -9px 0 0 -9px;
  border: 1.5px solid currentColor; border-radius: 50%;
}
.inbox .act-emoji .face:before {          /* 两只眼睛：右边那只用阴影复制 */
  content: ''; position: absolute; left: 2.5px; top: 4px;
  width: 3px; height: 3px; border-radius: 50%; background: currentColor;
  box-shadow: 7px 0 0 currentColor;
}
.inbox .act-emoji .face:after {           /* 笑弧 */
  content: ''; position: absolute; left: 3px; top: 7.5px;
  width: 9px; height: 4.5px;
  border-bottom: 1.5px solid currentColor; border-radius: 0 0 9px 9px;
}
.inbox .send {
  position: absolute; right: 58px; top: 14px; height: 36px; padding: 0 16px;
  border: none; border-radius: 18px; color: #fff; font-size: 13px; font-weight: 700;
  letter-spacing: .5px; cursor: pointer;
  background: linear-gradient(135deg, #17c2bf, #0a6f70);
  box-shadow: 0 4px 14px rgba(18, 168, 166, .34);
  -webkit-transition: filter .18s, transform .1s;
  transition: filter .18s, transform .1s;
}
.inbox .send:hover { filter: brightness(1.12); }
.inbox .send:active { -webkit-transform: scale(.96); transform: scale(.96); }

/* ==================== 表情面板：内置 / 收藏 ==================== */
.emoji { padding: 0; }
.emoji .emoji-tabs { overflow: hidden; border-bottom: 1px solid #1d2a33; padding: 0 6px; }
.emoji .et { float: left; padding: 8px 12px; font-size: 13px; color: #93a3b0; cursor: pointer;
  border: none; border-bottom: 2px solid transparent; background: none; font-family: inherit; }
.emoji .et.on { color: #2dd4bf; border-bottom-color: #2dd4bf; font-weight: 700; }
.emoji .emoji-body { padding: 8px; max-height: 150px; overflow-y: auto; }
.emoji .emoji-body span { display: inline-block; width: 30px; height: 30px; line-height: 30px;
  text-align: center; font-size: 18px; cursor: pointer; border-radius: 7px; }
.emoji .emoji-body span:hover { background: #16232a; }
.emoji .emoji-body img.st { width: 36px; height: 36px; object-fit: contain; border-radius: 7px;
  cursor: pointer; margin: 3px; vertical-align: middle; background: #0d161b;
  border: 1px solid #1d2a33; }
.emoji .emoji-body .none { color: #5d6b78; font-size: 12px; padding: 14px 4px; clear: both; }

/* ==================== ＋ 动作菜单（从下往上） ==================== */
.sheet-mask { position: fixed; left: 0; top: 0; right: 0; bottom: 0; background: rgba(3,6,8,.6);
  display: none; z-index: 460; }
.sheet-mask.on { display: block; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 470;
  background: #101820; border-top: 1px solid #1d2a33; border-radius: 16px 16px 0 0;
  visibility: hidden; transform: translateY(100%);
  transition: transform .26s ease, visibility .26s ease;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.sheet.on { visibility: visible; transform: translateY(0); }
.sheet .sheet-hd { text-align: center; font-size: 13px; color: #5d6b78; padding: 12px 0 6px; }
.sheet .sheet-bd { padding: 6px 12px 16px; }
.sheet .si {
  display: block; width: 100%; text-align: left; padding: 14px; margin-bottom: 8px;
  border-radius: 12px; border: 1px solid #1d2a33; background: #141b21;
  color: #e6edf3; font-size: 15px; cursor: pointer;
}
.sheet .si:hover { border-color: #12a8a6; }
.sheet .si .ic { display: inline-block; width: 24px; margin-right: 8px; color: #2dd4bf;
  text-align: center; }

/* ==================== 群设置抽屉（从右滑入） ==================== */
.drawer-mask { position: fixed; left: 0; top: 0; right: 0; bottom: 0; background: rgba(3,6,8,.6);
  display: none; z-index: 460; }
.drawer-mask.on { display: block; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 340px; max-width: 88%;
  background: #101820; border-left: 1px solid #1d2a33; z-index: 470;
  visibility: hidden; transform: translateX(100%);
  transition: transform .28s ease, visibility .28s ease;
}
.drawer.on { visibility: visible; transform: translateX(0); }
.drawer .drawer-hd { height: 52px; line-height: 52px; padding: 0 14px; border-bottom: 1px solid #1d2a33; }
.drawer .drawer-tt { float: left; font-size: 15px; font-weight: 700; color: #e6edf3; }
.drawer .drawer-hd .mx { float: right; width: 30px; text-align: center; color: #93a3b0;
  font-size: 20px; cursor: pointer; }
.drawer .drawer-hd .mx:hover { color: #e6edf3; }
.drawer .drawer-bd { position: absolute; left: 0; right: 0; top: 52px; bottom: 0;
  overflow-y: auto; padding: 14px; }

/* 群设置面板内容 */
.drawer .rp-sec { font-size: 12px; color: #5d6b78; font-weight: 600; margin: 14px 0 8px; }
.drawer .rp-sec:first-child { margin-top: 0; }
.drawer .rp-row {
  display: block; width: 100%; text-align: left; padding: 11px 12px; margin-bottom: 8px;
  border-radius: 10px; border: 1px solid #1d2a33; background: #141b21;
  color: #e6edf3; font-size: 14px; cursor: pointer;
}
.drawer .rp-row:hover { border-color: #12a8a6; }
.drawer .rp-row .sub { float: right; color: #5d6b78; font-size: 12px; }
.drawer .rp-mem { padding: 9px 2px; border-bottom: 1px solid #16232a; overflow: hidden; cursor: pointer; }
.drawer .rp-mem .av { float: left; width: 34px; height: 34px; line-height: 34px; text-align: center;
  border-radius: 50%; background: #12a8a6; color: #fff; font-weight: 700; margin-right: 10px; }
.drawer .rp-mem .nm { float: left; font-size: 14px; color: #e6edf3; line-height: 34px; }
.drawer .rp-mem .rl { float: right; font-size: 11px; color: #5d6b78; line-height: 34px; }
.drawer .rp-mem .rl.muted { color: #fbbf24; }
.drawer .rp-empty { color: #5d6b78; font-size: 13px; padding: 12px 2px; }

@media (max-width: 1023px) {
  .chat-hd .ch-back { display: flex; }
  .drawer { width: 100%; max-width: 100%; }
}
@media (max-width: 520px) {
  .inbox .ta-row textarea { font-size: 16px; }
}

/* ==================== 注册向导 ==================== */
.step-tip { font-size: 12px; color: #5d6b78; margin-bottom: 12px; }
.rg-av { overflow: hidden; margin-bottom: 4px; }
.rg-av-pv { float: left; width: 64px; height: 64px; line-height: 60px; text-align: center;
  border-radius: 50%; border: 1px dashed #2b3a45; color: #5d6b78; font-size: 22px;
  margin-right: 12px; overflow: hidden; box-sizing: border-box; }
.rg-av-pv img { width: 62px; height: 62px; display: block; }
.rg-av .btn { margin-top: 16px; }
.shortno { color: #2dd4bf; font-size: 20px; letter-spacing: 2px; }

/* ==================== 群设置：资料头 / 成员标签 / 折叠 / 邀请 ==================== */
.drawer .rp-head { overflow: hidden; padding: 2px 0 14px; border-bottom: 1px solid #16232a;
  margin-bottom: 12px; }
.drawer .rp-av { float: left; width: 52px; height: 52px; line-height: 52px; text-align: center;
  border-radius: 12px; background: #12a8a6; color: #fff; font-weight: 700; font-size: 20px;
  overflow: hidden; margin-right: 12px; }
.drawer .rp-av img { width: 52px; height: 52px; display: block; }
.drawer .rp-head-b { float: left; max-width: 52%; }
.drawer .rp-head-n { font-size: 15px; font-weight: 700; color: #e6edf3; line-height: 26px;
  overflow: hidden; }
.drawer .rp-head-s { font-size: 11px; color: #5d6b78; line-height: 20px; }
.drawer .rp-head-op { float: right; font-size: 12px; color: #2dd4bf; cursor: pointer; line-height: 52px; }

.drawer .rp-mem .nm { line-height: 34px; max-width: 64%; overflow: hidden; }
.drawer .rp-mem .tag { display: inline-block; font-size: 10px; padding: 1px 5px; border-radius: 4px;
  margin-left: 5px; vertical-align: middle; line-height: 15px; }
.drawer .rp-mem .tag.owner { background: #3b2a12; color: #fbbf24; }
.drawer .rp-mem .tag.admin { background: #12333b; color: #2dd4bf; }
.drawer .rp-mem .tag.muted { background: #3a1a1a; color: #f87171; }

.drawer .rp-more { display: block; width: 100%; text-align: center; padding: 9px; margin: 2px 0 10px;
  background: none; border: 1px dashed #2b3a45; border-radius: 9px; color: #2dd4bf;
  font-size: 13px; cursor: pointer; font-family: inherit; }
.drawer .rp-more:hover { border-color: #12a8a6; }

.drawer .rp-invite { display: block; width: 100%; padding: 12px; margin: 4px 0 14px;
  border-radius: 10px; border: 1px solid #12a8a6; background: rgba(18,168,166,.12);
  color: #2dd4bf; font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit; }
.drawer .rp-invite:hover { background: rgba(18,168,166,.2); }

/* 大于 10 人时的提示 */
.drawer .rp-foldtip { font-size: 11px; color: #4b5a66; margin: -4px 0 8px; }

/* ==================== 统一头像：一律圆形、同一尺寸 ==================== */
.av { overflow: hidden; border-radius: 50%; }
.av.has-img { padding: 0; line-height: 0; }
.av.has-img img { width: 100%; height: 100%; display: block; object-fit: cover; border-radius: 50%; }
.room .av img, .mem .av img, .drawer .rp-mem .av img { border-radius: 50%; }
.mav { overflow: hidden; border-radius: 50%; }
.mav img { width: 100%; height: 100%; display: block; object-fit: cover; border-radius: 50%; }
.topbar .lg { overflow: hidden; border-radius: 50%; }
.topbar .lg img { width: 100%; height: 100%; display: block; object-fit: cover; border-radius: 50%; }

/* ==================== 聊天消息：头像 + 名称 + 气泡 ==================== */
/* 用 clearfix 清浮动，不再用 overflow:hidden —— 否则 MC 全身小人会被消息行裁掉 */
.msg { overflow: visible; }
.msg::after { content: ""; display: table; clear: both; }
.msg .av-msg { float: left; width: 34px; height: 34px; line-height: 34px; border-radius: 50%;
  overflow: hidden; text-align: center; background: #12a8a6; color: #fff;
  font-size: 14px; font-weight: 700; margin-right: 9px; }
.msg .av-msg.has-img { line-height: 0; }
.msg .av-msg img { width: 100%; height: 100%; display: block; object-fit: cover; border-radius: 50%; }
/* 消息头像换成会动的 3D 小人（QQ秀式精灵图）：
   - 容器只占 34px 宽（不把气泡往右挤），高度给到全身；
   - 小人用绝对定位横向居中，宽度溢出容器两侧，不受方框限制；
   - 普通图片头像（不带 mc3d）依旧是 34×34 圆形裁切，不受影响。 */
.msg .av-msg.mc3d { width: 34px; height: 64px; line-height: 0; border-radius: 0;
  background: transparent; overflow: visible; display: block; position: relative; z-index: 1; }
.msg .av-msg.mc3d img { object-fit: contain; border-radius: 0; }
.mc-av-sprite {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 44px; height: 64px;
  background-repeat: no-repeat;
  background-size: 600% 100%;            /* 6 帧横向精灵图 */
  animation: mc-sprite 1.6s infinite;
  image-rendering: -webkit-optimize-contrast;
}
/* 不用 steps()：percentage 的 background-position 在 background-size:600% 下偏移量
   不与帧边界对齐（(W-6W)*pct），会大量显示帧间透明区。改用显式关键帧把 6 帧
   分别钉在 0%/20%/40%/60%/80%/100%，每帧占 1/6 时长后跳到下一帧。 */
@keyframes mc-sprite {
  0%      { background-position: 0% 0; }
  16.666% { background-position: 0% 0; }
  16.667% { background-position: 20% 0; }
  33.333% { background-position: 20% 0; }
  33.334% { background-position: 40% 0; }
  50%     { background-position: 40% 0; }
  50.001% { background-position: 60% 0; }
  66.666% { background-position: 60% 0; }
  66.667% { background-position: 80% 0; }
  83.333% { background-position: 80% 0; }
  83.334% { background-position: 100% 0; }
  100%    { background-position: 100% 0; }
}
.msg .mbody { float: left; max-width: 76%; }
.msg .mbody .bub { display: inline-block; }
.msg.me .av-msg { float: right; margin-right: 0; margin-left: 9px; }
.msg.me .mbody { float: right; text-align: right; max-width: 76%; }
.msg.me .who { text-align: right; }
@media (max-width: 520px) {
  .msg .mbody, .msg.me .mbody { max-width: 68%; }
  .msg .av-msg { width: 30px; height: 30px; line-height: 30px; font-size: 12px; }
  .msg .av-msg.mc3d { width: 30px; height: 56px; }
  .msg .av-msg.mc3d .mc-av-sprite { width: 38px; height: 56px; }
}

/* 搜索 / 好友行的头像与短号 */
.dlg .u { position: relative; overflow: hidden; }
.dlg .u .av { position: absolute; left: 12px; top: 50%; margin-top: -15px;
  width: 30px; height: 30px; line-height: 30px; font-size: 12px; }
.dlg .u .n, .dlg .u .a { margin-left: 40px; }
.dlg .u .sid { color: #4b5a66; font-size: 11px; font-weight: 400; }

/* ==================== 链接预览卡片 ==================== */
.msg .lpv { display: none; width: 250px; max-width: 100%; margin-top: 6px;
  border: 1px solid #1d2a33; border-radius: 10px; background: #0d161b;
  overflow: hidden; cursor: pointer; text-align: left; }
.msg .lpv:hover { border-color: #12a8a6; }
.msg .lpv .lpv-img { display: block; width: 100%; max-height: 150px; object-fit: cover; }
.msg .lpv .lpv-tx { padding: 8px 10px; }
.msg .lpv .lpv-ti { font-size: 13px; color: #e6edf3; font-weight: 600; line-height: 1.45;
  max-height: 2.9em; overflow: hidden; }
.msg .lpv .lpv-de { font-size: 12px; color: #93a3b0; line-height: 1.45; margin-top: 3px;
  max-height: 2.9em; overflow: hidden; }
.msg .lpv .lpv-si { font-size: 11px; color: #5d6b78; margin-top: 5px; }
.msg.me .lpv { margin-left: auto; }

/* 表情消息：按小图显示，不撑满、不显示文件名 */
.msg img.pic.sticker { max-width: 120px; max-height: 120px; width: auto; background: none;
  border: 0; padding: 0; border-radius: 8px; margin: 2px 0; }
@media (max-width: 520px) {
  .msg img.pic.sticker { max-width: 96px; max-height: 96px; }
}

/* 链接卡片用 a 标签承载，去掉默认下划线与颜色 */
.msg .lpv .lpv-a { display: block; text-decoration: none; color: inherit; outline: none; }

/* 消息里的网址：蓝色可点击 */
.msg .bub a.msg-link { color: #4ea1ff; text-decoration: underline; word-break: break-all;
  cursor: pointer; }
.msg .bub a.msg-link:hover { color: #86c1ff; }

/* ==================== 用户主页 ==================== */
#pageUser {
  display: none; position: fixed; left: 0; top: 0; right: 0; bottom: 0;
  z-index: 340; overflow: hidden;
  background: linear-gradient(180deg, #0f8f6a 0%, #0a6b52 32%, #073a2c 58%, #030807 100%);
  animation: upIn .26s ease;
}
@keyframes upIn { from { transform: translateX(-100%); } to { transform: translateX(0); } }
#pageUser.out { animation: upOut .24s ease forwards; }
@keyframes upOut { from { transform: translateX(0); } to { transform: translateX(-100%); } }

.up-close, .up-more {
  position: absolute; top: 14px; z-index: 5;
  width: 34px; height: 34px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: rgba(255,255,255,.18); color: #fff;
  font-size: 20px; cursor: pointer; user-select: none;
  border: 1px solid rgba(255,255,255,.26);
}
/* × 与 ⋯ 几何绝对居中：不依赖 flex，也去掉 backdrop-filter
   （安卓 WebView 的模糊层会渲染偏移，看着就像图标跑出圆圈） */
.up-close svg, .up-more svg {
  position: absolute; left: 50%; top: 50%;
  width: 17px; height: 17px; margin: -8.5px 0 0 -8.5px;
}
.up-close { right: 14px; }
.up-more { right: 56px; display: none; }
.up-close:active, .up-more:active { background: rgba(255,255,255,.3); }

.up-scroll { position: absolute; left: 0; right: 0; top: 0; bottom: 62px; overflow-y: auto; }

.up-head {
  display: flex; align-items: center; gap: 16px;
  padding: 58px 20px 18px 20px;
}
.up-av {
  width: 86px; height: 86px; flex: 0 0 86px; border-radius: 50%;
  background: rgba(255,255,255,.18); color: #fff; font-size: 32px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  border: 2px solid rgba(255,255,255,.35); box-shadow: 0 6px 22px rgba(0,0,0,.35);
}
.up-av img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.up-meta { flex: 1; min-width: 0; }
.up-name { color: #fff; font-size: 21px; font-weight: 700; word-break: break-all; }
.up-sign {
  color: rgba(255,255,255,.82); font-size: 13px; margin-top: 7px; line-height: 1.5;
  word-break: break-all; cursor: pointer;
}
.up-short { color: rgba(255,255,255,.6); font-size: 12px; margin-top: 6px; }
.up-lv { color: #ffe08a; font-size: 13px; font-weight: 700; margin-top: 7px; text-align: left; }

.up-acts { display: flex; gap: 10px; padding: 0 20px 14px 20px; }
.up-acts button { flex: 1; }

/* 个人主页「创建我的mc形象」入口：配色与 up-btn 一致（只占位，功能后接） */
.up-mc-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  flex: 1; padding: 13px 0; border-radius: 12px;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.13);
  color: #fff; font-size: 15px; font-weight: 600;
  cursor: pointer; backdrop-filter: blur(8px);
}
.up-mc-btn:active { background: rgba(255,255,255,.24); }
.up-mc-btn svg { width: 18px; height: 18px; flex: none; opacity: .9; }

/* ==================== MC3D 形象页面 ==================== */
/* MC3D 形象页是整屏二级页，必须真正"整屏"：
   .page 默认 top:54px，各档小屏 media 又改 top/bottom —— 只要留了 54px 的顶缝，
   下面那张用户主页就从缝里露出来，连它自己的返回键都还能点到（用户实测会误关主页）。
   所以四边一律 !important 压平，z-index 抬到所有覆盖页(200)、底部导航(320)、主页(340) 之上。 */
#pageMC {
  left: 0 !important; right: 0 !important; top: 0 !important; bottom: 0 !important;
  z-index: 500;
}
#pageMC .page-bd { max-width: 520px; margin: 0 auto; }

/* MC3D 页的返回键：做足尺寸 + 带文字，绝不让人找不到出口
   （.hd-back 基础样式保持不动，这里只放大本页的那一颗） */
#pageMC .page-hd.hd-bar { padding-top: 12px; }
#pageMC .hd-back {
  width: auto; min-width: 66px; height: 34px; padding: 0 13px 0 9px;
  border-radius: 17px; gap: 3px; font-size: 13px; font-weight: 700;
}
#pageMC .hd-back span { line-height: 1; }

/* 3D 不可用时的说明（不是弹窗，只是一行小字，避免静默地只给一张平面贴图） */
.mc-tip { display: none; margin: 0 0 12px; padding: 9px 12px; border-radius: 10px;
  background: rgba(255,193,102,.08); border: 1px solid rgba(255,193,102,.22);
  color: #e0b980; font-size: 12px; line-height: 1.6; }

/* 动作选择（站立 / 行走 / 奔跑 / 旋转） */
.mc-anim-row { display: flex; gap: 8px; margin: 0 0 14px; }
.mc-abtn { flex: 1; padding: 9px 0; border-radius: 9px; cursor: pointer; font-size: 12px; font-weight: 600;
  border: 1px solid #1d2a33; background: #101820; color: #93a3b0; }
.mc-abtn.on { border-color: #12a8a6; color: #2dd4bf; background: rgba(18,168,166,.12); }

.mc-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 34px 18px; margin: 6px 0 16px;
  border: 1.5px dashed rgba(45,212,191,.45); border-radius: 16px;
  background: rgba(45,212,191,.06); color: #cfe9e6; text-align: center; cursor: pointer;
}
.mc-drop:active { background: rgba(45,212,191,.13); }
.mc-drop-ic { color: #2dd4bf; width: 46px; height: 46px; margin-bottom: 10px; }
.mc-drop-ic svg { width: 46px; height: 46px; display: block; }
.mc-drop-t { font-size: 15px; font-weight: 700; color: #e6edf3; }
.mc-drop-s { font-size: 12px; color: #7c8b98; margin-top: 5px; }

.mc-prog-wrap { display: none; padding: 24px 4px 10px; }
.mc-prog { height: 8px; border-radius: 6px; background: #16232b; overflow: hidden; }
.mc-prog-bar { height: 100%; width: 0; border-radius: 6px;
  background: linear-gradient(90deg, #12a8a6, #2dd4bf); transition: width .12s linear; }
.mc-prog-t { margin-top: 10px; text-align: center; font-size: 13px; color: #9fb0bd; }

.mc-view-wrap { display: none; margin: 6px 0 14px; padding: 12px 0;
  border-radius: 16px; border: 1px solid #1d2a33; text-align: center; min-height: 320px;
  background: radial-gradient(circle at 50% 32%, #14303a 0%, #0c141a 72%); }
.mc-view-wrap canvas, .mc-view-wrap img { display: block; margin: 0 auto; max-width: 100%; }

.mc-model-row { display: flex; gap: 10px; margin: 0 0 14px; }
.mc-mbtn { flex: 1; padding: 11px 0; border-radius: 10px; cursor: pointer;
  border: 1px solid #1d2a33; background: #101820; color: #93a3b0; font-size: 13px; font-weight: 600; }
.mc-mbtn.on { border-color: #12a8a6; color: #2dd4bf; background: rgba(18,168,166,.12); }

.mc-sw-row { display: flex; align-items: center; gap: 12px;
  padding: 14px; margin-bottom: 10px; border-radius: 12px;
  background: #101820; border: 1px solid #1d2a33; }
.mc-sw-row.mc-off { opacity: .45; }
.mc-sw-lb { flex: 1; min-width: 0; }
.mc-sw-lb b { display: block; color: #e6edf3; font-size: 15px; }
.mc-sw-lb span { display: block; margin-top: 3px; color: #6b7a87; font-size: 12px; }

.mc-switch { position: relative; flex: none; width: 48px; height: 28px; cursor: pointer; }
.mc-switch input { position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  margin: 0; opacity: 0; cursor: pointer; }
.mc-switch i { position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  border-radius: 999px; background: #24333d; transition: background .18s; pointer-events: none; }
.mc-switch i::after { content: ''; position: absolute; top: 3px; left: 3px;
  width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .18s; }
.mc-switch input:checked + i { background: linear-gradient(135deg, #12a8a6, #2dd4bf); }
.mc-switch input:checked + i::after { transform: translateX(20px); }

.mc-danger { color: #ff6b6b; border-color: rgba(255,107,107,.35); }

/* 个人主页头像位：3D 形象不要任何"框框"，直接让角色悬在主页背景上 */
.up-av.has-mc {
  border: 0 !important; background: transparent !important; box-shadow: none !important;
  border-radius: 0 !important; overflow: visible !important;
}
.up-av-mc { width: 100%; height: 100%; display: block; background: transparent; }

.up-btn {
  display: block; width: calc(100% - 40px); margin: 0 20px 10px 20px;
  padding: 13px 0; border-radius: 12px; border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.13); color: #fff; font-size: 15px; font-weight: 600;
  cursor: pointer; backdrop-filter: blur(8px);
}
.up-btn:active { background: rgba(255,255,255,.24); }

.up-fields { padding: 6px 20px 20px 20px; }
.up-field {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px; margin-bottom: 8px; border-radius: 12px;
  background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.14);
  color: #fff; font-size: 13px; cursor: pointer;
}
.up-fl { color: rgba(255,255,255,.6); }
.up-fv { color: #fff; }

.up-foot {
  position: absolute; left: 0; right: 0; bottom: 0; height: 62px; z-index: 4;
  display: flex; align-items: center; justify-content: flex-start; gap: 10px;
  padding: 0 16px;
  background: linear-gradient(180deg, rgba(3,8,7,0) 0%, rgba(3,8,7,.72) 60%);
}
.up-mini {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 9px 17px; border-radius: 22px; font-size: 13px; font-weight: 600;
  background: rgba(11,15,19,.52); color: #fff;
  border: 1px solid rgba(255,255,255,.20); cursor: pointer;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 5px 16px rgba(0,0,0,.28);
  transition: background .15s ease, transform .12s ease;
}
.up-mini:active { background: rgba(11,15,19,.74); transform: scale(.96); }
.up-mini svg { width: 15px; height: 15px; display: block; }
.up-mini svg path, .up-mini svg circle, .up-mini svg line {
  fill: none; stroke: currentColor; stroke-width: 1.9;
  stroke-linecap: round; stroke-linejoin: round;
}
.up-foot.hide { display: none; }

/* 好友列表 / 申请列表头像尺寸兜底：任何情况下都不超过 44px */
.av, .av img { max-width: 44px; max-height: 44px; }
.fri .av, .req .av { width: 40px; height: 40px; flex: 0 0 40px; }
.fri .av img, .req .av img { width: 40px; height: 40px; object-fit: cover; border-radius: 50%; }

/* ==================== 设置页 ==================== */
.dlg-wide { width: 92%; max-width: 520px; }
.set-search { margin-bottom: 12px; }
.set-search .inp { width: 100%; box-sizing: border-box; }
.set-gt { font-size: 12px; color: #5d6b78; font-weight: 700; margin: 14px 0 6px 2px; }
.set-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; margin-bottom: 6px; border-radius: 11px;
  background: #0d161b; border: 1px solid #1d2a33; cursor: pointer;
  font-size: 14px; color: #dbe4ea;
}
.set-row:active { background: #12202a; }
.set-a { color: #46555f; font-size: 16px; }
.set-empty { color: #5d6b78; font-size: 13px; text-align: center; padding: 18px 0; }

/* ==================== 天气页 ==================== */
#pageWeather {
  display: none; position: fixed; left: 0; top: 0; right: 0; bottom: 0;
  z-index: 340; overflow: hidden;
  background: linear-gradient(180deg, #1e5f9e 0%, #17497c 40%, #0d2b4a 72%, #050d16 100%);
  color: #fff;
  animation: upIn .26s ease;
}
.wx-top {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 14px 0 14px;
}
.wx-city {
  flex: 1; text-align: center; font-size: 17px; font-weight: 700;
  color: #fff; cursor: pointer;
}
.wx-now { padding: 26px 22px 10px 22px; }
.wx-temp { font-size: 64px; font-weight: 200; line-height: 1; }
.wx-desc { font-size: 16px; margin-top: 8px; color: rgba(255,255,255,.9); }
.wx-meta { font-size: 12px; margin-top: 10px; color: rgba(255,255,255,.68); line-height: 1.7; }
.wx-title {
  font-size: 12px; color: rgba(255,255,255,.6); font-weight: 700;
  padding: 16px 22px 8px 22px;
}
.wx-hours {
  display: flex; overflow-x: auto; padding: 0 16px 16px 16px; gap: 10px;
}
.wx-h {
  flex: 0 0 auto; min-width: 62px; text-align: center;
  padding: 10px 8px; border-radius: 12px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.16);
}
.wx-ht { font-size: 11px; color: rgba(255,255,255,.7); }
.wx-hi { font-size: 16px; font-weight: 700; margin-top: 6px; }
.wx-hd { font-size: 10px; color: rgba(255,255,255,.62); margin-top: 4px; }

/* ==================== 相册 ==================== */
#pageAlbum {
  display: none; position: fixed; left: 0; top: 0; right: 0; bottom: 0;
  z-index: 340; overflow: hidden; background: #070c10; color: #dbe4ea;
  animation: upIn .26s ease;
}
.al-top {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 14px 6px 14px;
}
.al-title { flex: 1; font-size: 17px; font-weight: 700; color: #dbe4ea; }
.al-body { position: absolute; left: 0; right: 0; top: 58px; bottom: 0; overflow-y: auto; padding: 8px 14px 20px 14px; }

.al-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px; margin-bottom: 8px; border-radius: 12px;
  background: #0d161b; border: 1px solid #1d2a33; cursor: pointer;
}
.al-row:active { background: #12202a; }
.al-nm { font-size: 15px; color: #dbe4ea; }
.al-sub { font-size: 11px; color: #5d6b78; margin-top: 4px; }
.al-tag {
  font-size: 10px; padding: 2px 7px; border-radius: 8px; margin-left: 8px;
  background: #1d2a33; color: #7c8b96;
}
.al-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.al-cell {
  width: calc(33.333% - 4px); padding-top: calc(33.333% - 4px); position: relative;
  border-radius: 10px; overflow: hidden; background: #0d161b; cursor: pointer;
}
.al-cell img {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.al-empty { color: #5d6b78; font-size: 13px; text-align: center; padding: 40px 0; }
.al-actions { display: flex; gap: 8px; margin: 10px 0 14px 0; }
.al-actions button { flex: 1; }

/* ==================== 通话气泡 ==================== */
.bub.callbub {
  background: #10222b; border: 1px solid #1d3a44; border-radius: 12px;
  padding: 10px 14px; min-width: 150px;
}
.bub.callbub .cb-row { display: flex; align-items: center; gap: 8px; }
.bub.callbub .cb-ic { font-size: 16px; color: #2dd4bf; }
.bub.callbub .cb-tx { font-size: 14px; color: #dbe4ea; }
.bub.callbub .cb-tip { font-size: 11px; color: #4ea1ff; margin-top: 6px; }

/* ==================== AI 好友推荐卡片（点一下即添加） ==================== */
.bub.airecbub {
  background: #10222b; border: 1px solid #1d3a44; border-radius: 12px;
  padding: 10px 14px; min-width: 180px; max-width: 260px; text-align: left;
}
.bub.airecbub .air-row { display: flex; align-items: flex-start; gap: 8px; }
.bub.airecbub .air-ic { font-size: 18px; line-height: 1.2; }
.bub.airecbub .air-bd { min-width: 0; }
.bub.airecbub .air-ti { font-size: 13px; color: #dbe4ea; line-height: 1.45; }
.bub.airecbub .air-de { font-size: 12px; color: #8fa3b0; margin-top: 3px; }
.bub.airecbub .air-tip { font-size: 11px; color: #4ea1ff; margin-top: 6px; }

/* ==================== 个人设置页（从「我的主页」进，整屏、毛玻璃卡片） ==================== */
#pageSetting {
  display: none; position: fixed; left: 0; top: 0; right: 0; bottom: 0;
  z-index: 340; overflow: hidden;
  background: linear-gradient(180deg, #0f8f6a 0%, #0a6b52 34%, #073a2c 62%, #030807 100%);
  animation: upIn .26s ease;
}
#pageSetting.out { animation: upOut .24s ease forwards; }

.st-top { position: absolute; left: 0; right: 0; top: 0; height: 56px; z-index: 5; }
.st-top .st-back {
  position: absolute; left: 14px; top: 14px; width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; cursor: pointer; color: #fff; line-height: 1;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22);
  user-select: none; backdrop-filter: blur(8px); transition: background .15s ease;
}
.st-top .st-back:active { background: rgba(255, 255, 255, .3); }
.st-title { text-align: center; line-height: 56px; color: #fff; font-size: 17px; font-weight: 700; }

.st-body {
  position: absolute; left: 0; right: 0; top: 56px; bottom: 0; overflow-y: auto;
  padding: 4px 16px 30px; -webkit-overflow-scrolling: touch;
}
#pageSetting .set-search { margin-bottom: 4px; }
#pageSetting .set-search input {
  width: 100%; box-sizing: border-box; padding: 12px 14px; font-size: 14px;
  border-radius: 12px; color: #fff;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .18);
}
#pageSetting .set-search input::-webkit-input-placeholder { color: rgba(255, 255, 255, .5); }
#pageSetting .set-search input::-moz-placeholder { color: rgba(255, 255, 255, .5); opacity: 1; }
#pageSetting .set-search input:-ms-input-placeholder { color: rgba(255, 255, 255, .5); }
#pageSetting .set-search input::placeholder { color: rgba(255, 255, 255, .5); }
#pageSetting .set-search input:focus {
  border-color: rgba(255, 255, 255, .45); background: rgba(255, 255, 255, .19);
}
#pageSetting .set-gt { color: rgba(255, 255, 255, .62); font-size: 12px; font-weight: 700;
  margin: 16px 2px 8px 2px; }
#pageSetting .set-row {
  display: block; position: relative; padding: 15px 36px 15px 16px;
  margin-bottom: 8px; border-radius: 14px; color: #fff; font-size: 15px; cursor: pointer;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  -webkit-transition: background .16s; transition: background .16s;
}
#pageSetting .set-row:active { background: rgba(255, 255, 255, .2); }
#pageSetting .set-row .set-a {
  position: absolute; right: 14px; top: 50%; margin-top: -12px;
  color: rgba(255, 255, 255, .5); font-size: 20px;
}
#pageSetting .set-empty { color: rgba(255, 255, 255, .6); font-size: 13px;
  text-align: center; padding: 24px 0; }

/* ==================== 弹窗里的输入框（自己画，不要浏览器原生外观） ====================
   生日 / 喜好 / 签名 / 搜索城市这些窗口都走 #mask > .dlg，统一在这里定样式。
   checkbox 单独还原，select 保留系统下拉箭头，否则会被下面的块级样式压坏。 */
.dlg input, .dlg select, .dlg textarea {
  display: block; width: 100%; box-sizing: border-box;
  padding: 13px 15px; color: #e6edf3; font-size: 15px; line-height: 1.4;
  background: rgba(255, 255, 255, .055);
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
  -webkit-transition: border-color .18s, background .18s, box-shadow .18s;
  transition: border-color .18s, background .18s, box-shadow .18s;
}
.dlg input, .dlg textarea { -webkit-appearance: none; -moz-appearance: none; appearance: none; }
.dlg input:focus, .dlg select:focus, .dlg textarea:focus {
  border-color: rgba(45, 212, 191, .75);
  background: rgba(45, 212, 191, .07);
  box-shadow: 0 0 0 3px rgba(45, 212, 191, .13);
}
.dlg input::-webkit-input-placeholder, .dlg textarea::-webkit-input-placeholder {
  color: #5d6b78;
}
.dlg input::-moz-placeholder, .dlg textarea::-moz-placeholder { color: #5d6b78; opacity: 1; }
.dlg input:-ms-input-placeholder, .dlg textarea:-ms-input-placeholder { color: #5d6b78; }
.dlg input::placeholder, .dlg textarea::placeholder { color: #5d6b78; }
.dlg textarea { line-height: 1.6; resize: none; }
.dlg .pub-ta { height: 84px; }          /* 发布窗口的输入框保持原高度 */
.dlg input[type=checkbox], .dlg input[type=radio] {
  display: inline-block; width: auto; padding: 0; margin: 0 6px 0 0;
  vertical-align: middle; background: none; border: 0; border-radius: 0;
  box-shadow: none; -webkit-appearance: checkbox; appearance: checkbox;
}

/* ==================== 好友 / 搜索用户：小头像压在名字前面 ====================
   .hlist .u 原来是「头像自成一块 + 名字浮动」，头像没定尺寸所以又大又换行。
   这里把头像绝对定位钉在左边、行首留出固定的内边距，名字就跟在头像后面了。 */
.hlist .u.fri { position: relative; min-height: 58px; padding: 12px 14px 12px 58px; }
.hlist .u.fri .av {
  position: absolute; left: 12px; top: 50%; margin-top: -17px;
  width: 34px; height: 34px; line-height: 34px; border-radius: 50%;
  font-size: 13px; font-weight: 700; text-align: center;
  background: linear-gradient(135deg, #1b3038, #142228); color: #7fd8d6;
}
.hlist .u.fri .av img { width: 100%; height: 100%; display: block; object-fit: cover;
  border-radius: 50%; }
.hlist .u.fri .n { max-width: 46%; }

/* 好友申请 / 入群申请：头像也在名字前面，名字给右边的按钮让位 */
.dlg .u.req { padding-right: 10px; }
.dlg .u.req .av { width: 32px; height: 32px; line-height: 32px; margin-top: -16px; }
.dlg .u.req .n { margin-left: 42px; }

/* 聊天背景预览框 */
.bg-pv { height: 130px; border-radius: 12px; overflow: hidden; margin-bottom: 12px;
  background: #0d161b; border: 1px solid #1d2a33; }
.bg-pv img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bg-pv .bg-none { color: #5d6b78; font-size: 13px; text-align: center; line-height: 128px; }

/* ==================== 小屏（分屏 / 小手机 / 320px 宽） ==================== */
@media (max-width: 320px) {
  .topbar { height: 46px; padding: 0 8px; }
  .topbar .lg { left: 8px; top: 9px; width: 28px; height: 28px; line-height: 28px; font-size: 14px; }
  .topbar .tt { left: 42px; height: 46px; line-height: 46px; font-size: 14px; }
  .topbar .rt { right: 8px; height: 46px; line-height: 46px; font-size: 11px; }
  .side, .chat, .info, .page { top: 46px; bottom: 48px; }
  .page-hd { padding: 10px 10px 4px; font-size: 15px; }
  .page-bd { padding: 0 8px 22px; }
  .row-btn { padding: 11px; }
  .row-btn .lb { font-size: 14px; }
  .search-row input { padding: 9px 10px; font-size: 13px; }
  .hlist .u { padding: 10px 12px; font-size: 13px; }
  .hlist .u.fri { padding: 10px 12px 10px 52px; min-height: 54px; }
  .hlist .u.fri .av { left: 10px; width: 32px; height: 32px; line-height: 32px;
    margin-top: -16px; font-size: 12px; }
  .hlist .u.fri .n { max-width: 44%; }
  .side-hd { height: 42px; }
  .side-hd .t { line-height: 42px; font-size: 13px; }
  .side-hd .plusbtn { top: 7px; right: 8px; width: 28px; height: 28px; line-height: 26px; font-size: 17px; }
  .rooms { top: 42px; }
  .room { padding: 8px 10px 8px 48px; min-height: 54px; }
  .room .av { left: 10px; top: 10px; width: 32px; height: 32px; line-height: 32px;
    font-size: 12px; border-radius: 9px; }
  .room .nm { font-size: 13px; padding-right: 34px; }
  .room .ol { left: 34px; top: 34px; }
  .chat-hd { height: 42px; line-height: 42px; padding: 0 40px 0 10px; }
  .chat-hd .nm { font-size: 14px; }
  .chat-hd .st { display: none; }
  .chat-hd .ch-back { height: 42px; line-height: 42px; }
  .chat-hd .ch-more { height: 42px; line-height: 42px; width: 26px; right: 8px; }
  .flow { top: 42px; bottom: 74px; padding: 10px; }
  .typing { bottom: 58px; }
  .inbox { height: 58px; padding: 8px; }
  .inbox textarea#ta { height: 42px; border-radius: 21px; padding: 11px 96px 11px 40px; }
  .inbox .act-emoji, .inbox .act-plus { top: 15px; left: 14px; width: 28px; height: 28px; line-height: 26px; font-size: 17px; }
  .inbox .act-plus { left: auto; right: 14px; }
  .inbox .send { right: 48px; top: 15px; height: 28px; padding: 0 11px; font-size: 12px; border-radius: 14px; }
  .emoji { bottom: 58px; left: 8px; right: 8px; }
  .bottomnav { height: 48px; }
  .bottomnav .nv { height: 48px; }
  .fab { right: 12px; bottom: 62px; width: 46px; height: 46px; border-radius: 23px; }
  .fab .plus { font-size: 24px; line-height: 44px; }
  .dlg { padding: 14px; border-radius: 14px; }
  .dlg .u.req .av { left: 10px; }
  .dlg .u.req .n { margin-left: 38px; }
  .dlg .u.req .btn.sm { padding: 6px 9px; font-size: 12px; }
}

/* ==================== 手表屏（Apple Watch ≈184~224px、方屏小表） ====================
   小到这种程度只能「先保证能用」：所有固定高度/内边距/字号一起缩，长列表和弹窗允许滚。 */
@media (max-width: 240px) {
  body { font-size: 11px; }
  .topbar { height: 34px; padding: 0 4px; }
  .topbar .lg { left: 4px; top: 5px; width: 24px; height: 24px; line-height: 24px; font-size: 12px; border-radius: 8px; }
  .topbar .tt { display: none; }
  .topbar .rt { right: 4px; height: 34px; line-height: 34px; font-size: 10px; }
  .topbar .rt .lnk { margin-left: 4px; font-size: 10px; }
  #connTxt { display: none; }
  .side, .chat, .info, .page { top: 34px; bottom: 40px; }

  /* 会话栏 */
  .side-hd { height: 30px; padding: 0 4px 0 6px; }
  .side-hd .t { line-height: 30px; font-size: 11px; }
  .side-hd .plusbtn { top: 3px; right: 4px; width: 24px; height: 24px; line-height: 22px;
    font-size: 14px; border-radius: 7px; }
  .plusmenu { width: 132px; top: 32px; padding: 4px; }
  .plusmenu .mi { padding: 6px 8px; font-size: 11px; }
  .rooms { top: 30px; }
  .room { padding: 5px 6px 5px 36px; min-height: 40px; }
  .room .av { left: 6px; top: 5px; width: 26px; height: 26px; line-height: 26px;
    font-size: 11px; border-radius: 7px; }
  .room .nm { font-size: 11px; line-height: 14px; padding-right: 22px; }
  .room .lp { font-size: 9px; margin-top: 2px; }
  .room .bd { right: 4px; top: 4px; font-size: 9px; padding: 0 4px; }
  .room .ol { left: 26px; top: 26px; width: 7px; height: 7px; border-width: 1px; }

  /* 聊天 */
  .chat-hd { height: 30px; line-height: 30px; padding: 0 30px 0 6px; }
  .chat-hd .nm { font-size: 12px; }
  .chat-hd .st { display: none; }
  .chat-hd .ch-back { width: 16px; height: 30px; line-height: 30px; font-size: 16px; }
  .chat-hd .ch-more { right: 2px; width: 22px; height: 30px; line-height: 30px; font-size: 12px; }
  .flow { top: 30px; bottom: 56px; padding: 6px; }
  .typing { bottom: 46px; height: 12px; line-height: 12px; font-size: 9px; padding: 0 6px; }
  .msg .av-msg { width: 22px; height: 22px; line-height: 22px; font-size: 10px; margin-right: 5px; }
  .msg.me .av-msg { margin-left: 5px; }
  .msg .av-msg.mc3d { width: 22px; height: 40px; }
  .msg .av-msg.mc3d .mc-av-sprite { width: 30px; height: 40px; }
  .msg .mbody, .msg.me .mbody { max-width: 72%; }
  .msg .bub { font-size: 11px; }
  .msg .who { font-size: 9px; }

  /* 输入条 */
  .inbox { height: 46px; padding: 5px 4px; }
  .inbox textarea#ta { height: 36px; border-radius: 18px; padding: 9px 70px 9px 34px; font-size: 11px; }
  .inbox .act-emoji, .inbox .act-plus { top: 12px; left: 8px; width: 24px; height: 24px; line-height: 22px; font-size: 14px; }
  .inbox .act-plus { left: auto; right: 8px; }
  /* 笑脸整体等比缩小，内部几何不用重算，居中也不会跑 */
  .inbox .act-emoji .face { -webkit-transform: scale(.78); transform: scale(.78); }
  .inbox .send { right: 36px; top: 12px; height: 24px; padding: 0 8px; font-size: 10px;
    border-radius: 12px; letter-spacing: 0; }
  .emoji { left: 4px; right: 4px; bottom: 46px; max-height: 104px; border-radius: 10px; }
  .emoji .et { padding: 5px 7px; font-size: 11px; }
  .emoji .emoji-body { max-height: 70px; padding: 5px; }
  .emoji .emoji-body span { width: 24px; height: 24px; line-height: 24px; font-size: 15px; }
  .emoji .emoji-body img.st { width: 28px; height: 28px; margin: 2px; }

  /* 底部导航 + 页面 */
  .bottomnav { height: 40px; }
  .bottomnav .nv { height: 40px; font-size: 10px; }
  .bottomnav .nv .dot { top: 5px; margin-left: 9px; }
  .page-hd { padding: 6px 6px 2px; font-size: 12px; }
  .page-hd .pg-back { display: none; }
  .page-bd { padding: 0 6px 14px; }
  .sec-hd { padding: 8px 2px 4px; font-size: 10px; }
  .row-btn { padding: 8px; margin-bottom: 6px; border-radius: 9px; }
  .row-btn .lb { font-size: 12px; }
  .row-btn .sub { font-size: 10px; margin-left: 4px; }
  .row-btn .arw { font-size: 15px; }
  .search-row input { width: 60%; padding: 7px 8px; font-size: 11px; }
  .search-row .btn { width: 38%; padding: 7px 0; }

  /* 列表 */
  .hlist { border-radius: 9px; }
  .hlist .u { padding: 7px 8px; font-size: 11px; }
  .hlist .u.fri { padding: 7px 8px 7px 38px; min-height: 40px; }
  .hlist .u.fri .av { left: 6px; width: 26px; height: 26px; line-height: 26px;
    margin-top: -13px; font-size: 11px; }
  .hlist .u.fri .n { max-width: 54%; }
  .hlist .u .chk { font-size: 11px; margin-left: 6px; }
  .hlist .u .tag { font-size: 9px; padding: 0 4px; }
  .hlist .u .ops span { padding: 3px 6px; margin: 0 3px 3px 0; font-size: 10px; }

  /* 弹窗：整块允许滚动，弹窗本身别顶出屏幕 */
  #mask { overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .dlg { width: 96%; margin: 3vh auto 6vh; padding: 9px; border-radius: 11px; }
  .dlg h3 { font-size: 12px; }
  .dlg .modal-hd { margin-bottom: 8px; }
  .dlg .mx { width: 20px; height: 20px; line-height: 18px; font-size: 14px; }
  .dlg .list { max-height: 46vh; }
  .dlg .u { padding: 7px 8px; font-size: 11px; }
  .dlg .u .av { left: 7px; width: 24px; height: 24px; line-height: 24px; margin-top: -12px; font-size: 10px; }
  .dlg .u .n, .dlg .u .a { margin-left: 30px; }
  .dlg .u.req { padding-right: 6px; }
  .dlg .u.req .av { left: 7px; width: 24px; height: 24px; line-height: 24px; margin-top: -12px; }
  .dlg .u.req .n { margin-left: 30px; }
  .dlg .u.req .btn.sm { padding: 4px 6px; font-size: 10px; margin-left: 3px; }
  .dlg input, .dlg select, .dlg textarea { padding: 8px 9px; font-size: 12px; border-radius: 9px; }
  .dlg textarea, .dlg .pub-ta { height: 52px; }
  .dlg .pvrow { padding: 7px 2px; }
  .dlg .pvrow .pvlb { font-size: 11px; line-height: 15px; }
  .dlg .pvrow .pvlb i { font-size: 9px; }
  .dlg-chk { font-size: 11px; margin-bottom: 9px; }
  .field { margin-bottom: 8px; }
  .field label { font-size: 10px; margin-bottom: 3px; }
  .field input, .field textarea, .field select { padding: 8px 9px; font-size: 12px; }
  .btn { padding: 8px 10px; font-size: 11px; border-radius: 8px; letter-spacing: 0; }
  .btn.sm { padding: 5px 7px; font-size: 10px; }
  .tipbox { padding: 8px; font-size: 10px; line-height: 1.5; }
  .pub-row .btn { margin: 0 4px 0 0; }
  .pub-chip { width: 56px; height: 56px; margin: 0 5px 5px 0; }
  .bg-pv { height: 80px; margin-bottom: 8px; border-radius: 9px; }
  .bg-pv .bg-none { line-height: 78px; font-size: 11px; }

  /* 登录 / 注册 */
  #auth { padding: 6px; }
  #auth .box { padding: 12px 10px; border-radius: 12px; margin-top: 1vh; }
  #auth .logo { width: 34px; height: 34px; line-height: 34px; font-size: 16px; border-radius: 10px; margin-bottom: 8px; }
  #auth h1 { font-size: 15px; }
  #auth .sub { display: none; }
  .tabs2 { margin-bottom: 10px; }
  .tabs2 button { padding: 6px 10px; font-size: 11px; }
  .step-tip { font-size: 10px; }
  .rg-av-pv { width: 44px; height: 44px; line-height: 44px; font-size: 18px; }

  /* 个人主页 */
  .up-head { padding: 34px 10px 10px 10px; gap: 8px; }
  .up-av { width: 48px; height: 48px; flex: 0 0 48px; font-size: 18px; border-width: 1px; }
  .up-name { font-size: 13px; }
  .up-sign { font-size: 10px; margin-top: 3px; line-height: 1.4; }
  .up-short, .up-lv { font-size: 10px; margin-top: 3px; }
  .up-acts { padding: 0 10px 8px 10px; gap: 6px; }
  .up-btn { width: calc(100% - 20px); margin: 0 10px 6px 10px; padding: 8px 0; font-size: 12px; border-radius: 10px; }
  .up-fields { padding: 4px 10px 12px 10px; }
  .up-field { padding: 8px 9px; font-size: 11px; border-radius: 9px; }
  .up-foot { height: 38px; gap: 6px; padding: 0 8px; }
  .up-scroll { bottom: 38px; }
  .up-mini { padding: 5px 9px; font-size: 10px; }
  .up-close, .up-more { width: 26px; height: 26px; line-height: 26px; font-size: 14px; top: 8px; }
  .up-close { right: 8px; }
  .up-more { right: 38px; }

  /* 个人设置页 */
  .st-top { height: 36px; }
  .st-title { line-height: 36px; font-size: 13px; }
  .st-top .st-back { left: 6px; top: 6px; width: 24px; height: 24px; line-height: 22px; font-size: 14px; }
  .st-body { top: 36px; padding: 2px 8px 16px 8px; }
  #pageSetting .set-search { margin-bottom: 2px; }
  #pageSetting .set-search input { padding: 8px 9px; font-size: 11px; border-radius: 9px; }
  #pageSetting .set-gt { font-size: 10px; margin: 9px 2px 5px 2px; }
  #pageSetting .set-row { padding: 9px 24px 9px 9px; font-size: 11px; border-radius: 10px; margin-bottom: 5px; }
  #pageSetting .set-row .set-a { right: 8px; font-size: 15px; margin-top: -9px; }

  /* 天气 / 相册 / 动态 */
  .wx-top { padding: 8px 8px 0 8px; gap: 6px; }
  .wx-city { font-size: 13px; }
  .wx-now { padding: 12px 10px 6px 10px; }
  .wx-temp { font-size: 34px; }
  .wx-desc { font-size: 12px; margin-top: 4px; }
  .wx-meta { font-size: 10px; margin-top: 6px; }
  .wx-title { font-size: 10px; padding: 10px 10px 5px 10px; }
  .wx-hours { padding: 0 8px 10px 8px; gap: 6px; }
  .wx-h { min-width: 46px; padding: 6px 5px; border-radius: 9px; }
  .wx-ht { font-size: 9px; }
  .wx-hi { font-size: 12px; margin-top: 3px; }
  .wx-hd { font-size: 9px; }
  .al-top { padding: 10px 8px 4px 8px; gap: 6px; }
  .al-title { font-size: 13px; }
  .al-body { top: 42px; padding: 6px 8px 14px 8px; }
  .al-row { padding: 9px; font-size: 12px; border-radius: 9px; margin-bottom: 6px; }
  .mfeed { padding: 8px; border-radius: 9px; margin-bottom: 6px; }
  .mfeed .mav { width: 26px; height: 26px; line-height: 26px; font-size: 11px; margin-right: 6px; }
  .fab { right: 8px; bottom: 50px; width: 40px; height: 40px; border-radius: 20px; }
  .fab .plus { font-size: 20px; line-height: 38px; }

  /* 通话 */
  .call-top { height: 40px; }
  .call-top .call-who { font-size: 13px; }
  .call-top .call-st { font-size: 10px; margin-top: 2px; }
  .call-grid { top: 46px; bottom: 56px; }
  .call-grid.many .tile { height: 90px; }
  .call-bar { height: 56px; }
  .call-bar button { min-width: 58px; margin: 0 4px; padding: 8px 10px; font-size: 11px; }
  .ring-card { padding: 12px; }
  .ring-av { width: 40px; height: 40px; line-height: 40px; font-size: 16px; }
  .ring-nm { font-size: 13px; }
  .ring-sub { font-size: 10px; }
  .ring-btns button { padding: 7px 12px; font-size: 11px; }
  .sheet .sheet-hd { padding: 10px 12px 4px; font-size: 12px; }
  .sheet .sheet-bd { padding: 4px 8px 12px; }
  .sheet .si { padding: 9px 10px; font-size: 12px; }
  .sheet .si .ic { width: 18px; margin-right: 6px; }
}


/* ==================== 用户主页：点赞 ==================== */
.up-like { flex: 0 0 auto; text-align: center; padding-left: 8px; }
.up-like-btn {
  display: block; min-width: 76px; padding: 10px 14px; border-radius: 22px;
  border: 1px solid rgba(255,120,145,.55);
  background: linear-gradient(180deg, rgba(255,95,125,.36), rgba(214,40,80,.30));
  color: #fff; font-size: 14px; font-weight: 700; cursor: pointer;
  transition: transform .12s ease; box-shadow: 0 4px 14px rgba(210,30,70,.22);
}
.up-like-btn:active { transform: scale(.88); }
.up-like-btn.done { filter: grayscale(.75); opacity: .55; cursor: default; box-shadow: none; }
.up-like-cnt { margin-top: 6px; font-size: 11px; color: rgba(255,255,255,.72); }
.up-like-cnt b { color: #ffd2dc; font-size: 14px; }

/* 点赞时往上飘的 +1 / 爱心（QQ 那种） */
.up-fly {
  position: fixed; z-index: 400; pointer-events: none;
  font-size: 17px; font-weight: 700; color: #ff6f91;
  text-shadow: 0 2px 7px rgba(0,0,0,.4);
  animation: upFly .95s cubic-bezier(.22,.61,.36,1) forwards;
}
@keyframes upFly {
  0%   { opacity: 0; transform: translate(-50%, 0) scale(.5); }
  18%  { opacity: 1; transform: translate(-50%, -12px) scale(1.3); }
  62%  { opacity: 1; transform: translate(calc(-50% + var(--dx, 0px)), -48px) scale(1.05); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx, 0px)), -86px) scale(.8); }
}

/* ==================== 用户主页：电脑/平板适配（不再整屏拉伸） ==================== */
@media (min-width: 701px) {
  #pageUser .up-scroll,
  #pageUser .up-foot {
    left: 50%; right: auto; width: 470px; margin-left: -235px;
  }
  #pageUser .up-scroll {
    box-sizing: border-box; background: rgba(0,0,0,.18);
    border-left: 1px solid rgba(255,255,255,.10);
    border-right: 1px solid rgba(255,255,255,.10);
  }
  #pageUser .up-head { padding: 58px 24px 18px 24px; }
  #pageUser .up-name { font-size: 23px; }
  #pageUser .up-av { width: 92px; height: 92px; flex: 0 0 92px; }
  /* 3D 形象：给得大一点，角色整个人都能看到（.up-av.has-mc 已去掉所有框） */
  #pageUser .up-av.has-mc { width: 116px; height: 116px; flex: 0 0 116px; }
  #pageUser .up-close { right: auto; left: calc(50% + 235px - 46px); }
  #pageUser .up-more  { right: auto; left: calc(50% + 235px - 88px); }
}

/* 窄屏（手机）：点赞块收窄，别把名字挤没了 */
@media (max-width: 480px) {
  .up-like { padding-left: 4px; }
  .up-like-btn { min-width: 62px; padding: 8px 10px; font-size: 12px; }
  .up-like-cnt { font-size: 10px; margin-top: 4px; }
  .up-like-cnt b { font-size: 12px; }
}

/* 自己的主页：点赞按钮一律不显示（CSS 兜底，防任何时序/类型问题） */
.up-like.self .up-like-btn { display: none !important; }

/* 返回/关闭按钮统一：线性 chevron 图标 */
.ch-back svg, .pg-back svg, .st-back svg, .up-close svg { display: block; }
.ch-back svg polyline, .pg-back svg polyline, .st-back svg polyline, .up-close svg polyline {
  fill: none; stroke: currentColor; stroke-width: 2.4;
  stroke-linecap: round; stroke-linejoin: round;
}
.ch-back svg { width: 20px; height: 20px; }
.pg-back svg { width: 15px; height: 15px; }
.st-back svg { width: 19px; height: 19px; }
@media (max-width: 520px) {
  .st-back svg { width: 16px; height: 16px; }
  .ch-back svg { width: 18px; height: 18px; }
}

/* 个人主页：× 与 ⋯ 也用 SVG（文字符号在安卓上不居中，会看着错位） */
.up-close svg line { fill: none; stroke: currentColor; stroke-width: 2.3; stroke-linecap: round; }
.up-more svg circle { fill: currentColor; stroke: none; }
.up-more svg { display: block; }

/* 天气 / 相册 顶栏：按钮与标题在同一行内垂直居中（原来是绝对定死 top:14px，和标题不齐） */
.wx-top, .al-top { position: relative; padding-top: 0; height: 62px; }
.wx-top .up-close, .wx-top .up-more,
.al-top .up-close, .al-top .up-more {
  top: 50%; transform: translateY(-50%);
}
@media (max-width: 520px) {
  .wx-top, .al-top { height: 50px; }
}
/* 切换城市按钮也是线性图标 */
.up-more svg path {
  fill: none; stroke: currentColor; stroke-width: 1.9;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ==================== 天气页背景动效 ==================== */
#wxFx { position: absolute; left: 0; top: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none; display: block; }
.wx-top, .wx-now, .wx-title, .wx-hours { position: relative; z-index: 1; }
/* 按天气换底色（默认是晴天蓝） */
#pageWeather.wx-clear       { background: linear-gradient(180deg,#1668ab 0%,#1a4f86 36%,#0e2a4b 72%,#060f1d 100%); }
#pageWeather.wx-clear-night { background: linear-gradient(180deg,#0a1730 0%,#091024 45%,#05080f 100%); }
#pageWeather.wx-partly      { background: linear-gradient(180deg,#276099 0%,#1d4877 38%,#102a48 74%,#08121f 100%); }
#pageWeather.wx-cloudy      { background: linear-gradient(180deg,#43607a 0%,#2b4358 40%,#16283a 76%,#0a131d 100%); }
#pageWeather.wx-fog         { background: linear-gradient(180deg,#3e5669 0%,#2a3e50 45%,#141f2a 100%); }
#pageWeather.wx-rain        { background: linear-gradient(180deg,#2c455c 0%,#1d3145 40%,#101f2d 76%,#060d14 100%); }
#pageWeather.wx-storm       { background: linear-gradient(180deg,#1c2a3c 0%,#131e2c 45%,#070c13 100%); }
#pageWeather.wx-snow        { background: linear-gradient(180deg,#4b6785 0%,#33506b 40%,#1b3047 76%,#0b1520 100%); }
@media (prefers-reduced-motion: reduce) { #wxFx { display: none; } }
