/* ===== 真人聊天室（#next-view · 微信式 · 黑金）=====
   所有规则均加 #next-view 作用域，绝不污染首页（首页 .pal-av/.pal-name/.pal-row 共用类名）。
   结构：标语（#next-view .ci-head，复用，不动）→ 头像墙（黑底无框）→ 紫框（仅聊天区）→ 操作台（黑底无框）→ 底栏（原样不动）。

   v15（八哥令 2026-10-28 · 按住说话）：新增粉色语音层——
     · 麦克风按钮在语音模式变粉（线条粉态）
     · 输入框原位换成「粉色立体按住说话」按键（大小形态与输入框一致）
     · 长按变粉色音波 + 计时器 + 51 秒起粉色数字倒数
     · 聊天区语音条同款粉色，宽度随时长自适应，未听的前方带小红点
   粉色基准：取站内紫框同族 #FF7AB0，浅一档 #FF9DC0（邮箱小标旁的粉），深一档 #FF4D88。

   v16（八哥令 2026-10-28 · 语音条配色修正）：
     .bubble.audio 的粉色被 `#next-view .msg.left .bubble{background:#10B981}`（3 个 class）
     盖住了 —— 后者优先级更高，语音条渲染成绿赢家色，与「语音条同款粉色」规格不符。
     这里给 .bubble.audio 的 background/color 加 !important，强制语音条恒为粉色，
     不再随消息输赢变色（语音条是固定形态的控件，不是输赢气泡）。

   v18（八哥令 2026-10-28 · 四改：背景一体化 + 语音条定宽 + 长按全选）：
     · .room 填充从紫红渐变改回全站底色 var(--pal-ink)，整页一个底层，
       不再「上方黑、下方紫红」割裂；巨幅黑影换成不压暗的淡粉外晕
     · .room 补 position:relative —— 否则 ::after 柔光罩逃逸到 viewport，
       把一层柔光铺满整页，页面上方被压出「黑屏感」
     · #chatBar 从 #000 改成 var(--pal-ink)，消除底部一条更深的黑带
     · .room::before 内阴影：框内层次改用「凹陷」而非底色差，
       既保留分区感，又不制造任何色差割裂
     · .msgs::before 撑高法：消息贴底排列（微信同款），
       消息少时不再全挤在框顶留一大片空白

   v17（八哥令 2026-10-28 · 三改：按住浮层 + 中央倒数）：
     · .vb-veil —— 按住时的粉雾蒙层：整块粉色朦胧面 + 上方一行英文提示
       + 下方白色音波条；上滑进入取消区转深粉（.is-cancel）
     · .vb-count-veil —— 51 秒起在【屏幕中央】弹出超大粉色数字 9->1，
       配逐秒提示音（原来那个小数字塞在按键右上角，别人根本看不见）
     · 接收端红点：.au-wrap.is-new 的小红点由服务端 is_mine 权威判定 */

/* 挂载区：微信式固定布局——标语+头像墙在顶、紫框撑满剩余、操作台贴底。
   键盘弹起时 .chat-wrap 加 padding-bottom(--kb) 把操作台顶到键盘上方。仅作用 #next-view。 */
#next-view .ci-scroll{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden;padding:0 12px}
/* 八哥令 2026-11-01（聊天页定稿·第 1 点）：页头下方那根金色发丝线去掉——
   聊天页靠间距分区，不靠线条分隔；页头底留白补到 5px，与下方紫框上留白连成一段。 */
#next-view .ci-head{padding:8px 16px 5px;border-bottom:0}
/* 底部预留：校准公式 = 16(上段) + 操作台高(~61) + 16(下段) ≈ 93px + 键盘多盖部分。
   （八哥令 2026-10-28 · 九改）用户截图实测：紫框底→操作台顶仅 6.5pt、
   操作台底→栏目条顶 16pt，上下不等；f0f9a24 注释的本意就是两段都取 16px，
   但 78px 把操作台高少算了 10pt。93px 后：紫框→操作台 16pt = 操作台→栏目条 16pt
   = 键盘弹起时 操作台→键盘 16pt，三态统一。 */
#next-view .chat-wrap{flex:1;min-height:0;display:flex;flex-direction:column;gap:8px;
  /* 十改基底：跟随操作台几何镜像 = bottom_offset(max(kb,tabh)+cbgap) + 操作台高(cbh) - 底栏总高(tabH)。
     十一改（八哥令 2026-10-29）：紫框高度【向下】加到 500 —— 上段预留由 16px 归 0，
     紫框底缘直接落到这里算出的边界（下移 16pt，484→500），紫框顶缘与上方内容一字不动；
     十六改二（八哥令 2026-10-29）：紫框高度由 500 降到 490 —— 末端预留值 0px → 10px，
     紫框整体【向下】收 10px（484→490），紫框顶缘与上方内容一字不动；
     十七改补（八哥令 2026-10-29）：紫框高度由 490 升到 495 —— 末端预留值 10px → 5px，
     紫框整体【向上】放 5px（484→495），紫框顶缘与上方内容一字不动；
     操作台 / 底栏 / --tabh / --cbgap 全部保持原样，未做任何改动。
     旧公式 93px + (kb - tabh) 把 tabh 当"容器顶"推导，tabh 改量图标顶后必须同步重推，
     否则键盘态紫框会被多顶高 18px。 */
  /* 八哥令 2026-11-01（剔除压在紫框上的黑块）：末端的 +5px 是历史遗留的「往下
     多压 5px」——它让紫框底缘比操作台顶缘低 5px，操作台那块实底黑正好压住紫框
     的下边框和两个圆角，真机看着就是"紫框不是四边圆弧、操作板后面一块黑把线
     挡住"。现在归零：紫框底缘严格落在操作台顶缘之上，四边圆弧完整可见；
     操作台同时改为透明底（见下 #chatBar），同一块画布上不再有任何第二种黑。 */
  /* 八哥令 2026-11-01（聊天页定稿·第 2 点）：紫框【整体往上提】——
     末端再留 8px 呼吸位（原 0px，紫框底缘直接贴住操作台），
     紫框底边与操作台、操作台与底栏之间的两段留白由此一致；
     操作台本体同时上提（见 #chatBar 的 --cbgap 32px）。
     顶缘只由上方内容决定，本行只收底边，紫框变短、不位移。 */
  padding-bottom:calc(max(var(--kb,0px), var(--tabh,85px)) + var(--cbgap,32px)
    + var(--cbh,60px) - var(--tabH,103px) + 8px)}

/* 键盘态（2026-11-04 八哥令）：底栏整条隐藏，主区吃满画布；
   聊天区底垫只给输入条高度 + 8px 呼吸位，不再为底栏预留任何像素。
   iOS 用 --kb 抬到键盘上沿；Android 布局视口已缩，--kb=0 即贴键盘。 */
html.kb-open .pal-tabs{display:none !important}
html.kb-open #next-view .chat-wrap{
  padding-bottom:calc(var(--kb,0px) + var(--cbh,60px) + 8px);
}
/* 键盘态输入条只认 --kb：iOS 抬到键盘上沿；Android 布局已缩，0 即贴键盘。
   不再与 --tabh 取 max，底栏已隐藏，绝不能为它留出任何空白。 */
html.kb-open #chatBar{bottom:var(--kb,0px)}

/* —— 头像墙：黑底、无框、不裁切、一行 7 个、右侧粉色大箭头（与头像垂直居中） —— */
#next-view .pal-strip{position:relative;display:flex;align-items:center;gap:8px}
/* 八哥令 2026-11-01（间距一致）：pal.css 的 .pal-row 带 margin-top:18px，聊天页沿用了它。
   · 已登录：头像墙照旧保留 18px 顶部留白（与真人头像行原有排布一致，一动不动）；
   · 未登录：头像行是空的（:empty），这 18px 就成了「页头→紫框」26px 对
     「紫框→操作台」8px 的上下不均 —— 空行归零，两段统一为 8px，紫框顶缘上提 18px。 */
#next-view .pal-row{flex:1;display:grid;grid-template-columns:repeat(7,1fr);gap:6px 3px;min-width:0;align-items:center;margin-top:18px}
#next-view .pal-row:empty{margin-top:0}
/* 键盘态让位（八哥令 2026-11-01）：iOS 键盘上方那条 ^v✓ 是系统原生输入辅助条，
   网页侧没有任何 API 能移除；键盘一弹起就把头像墙整条收起（约 70px），
   让紫框向上长、聊天内容反而比原来多显示一段。收起键盘立刻复原，零永久改动。 */
html.kb-open #next-view .pal-strip{display:none}
#next-view .pal-cell{display:flex;flex-direction:column;align-items:center;gap:3px;min-width:0}
#next-view .pal-av{width:40px;height:40px;border-radius:50%;flex:none;display:flex;
  align-items:center;justify-content:center;position:relative;background:transparent;overflow:visible}
#next-view .pal-av img,#next-view .pal-av .face{width:100%;height:100%;border-radius:50%;display:block;object-fit:cover}
/* 无真实头像：黑色圆底 + 姓名首字母大写（替代卡通脸） */
#next-view .pal-av .face-none{width:100%;height:100%;border-radius:50%;display:flex;align-items:center;justify-content:center;
  background:transparent;color:#E9D08A;font-family:var(--pal-serif,Georgia,serif);font-weight:700;font-size:18px}
#next-view .real-check{position:absolute;top:-3px;right:-3px;width:16px;height:16px;border-radius:50%;
  background:#10B981;box-shadow:0 0 0 2px #0B0B0C;display:flex;align-items:center;justify-content:center}
#next-view .real-check svg{width:61%;height:61%;fill:none;stroke:#fff;stroke-width:3.4;stroke-linecap:round;stroke-linejoin:round}
#next-view .pal-name{font-size:10px;font-weight:700;color:#F3EEE3;max-width:44px;text-align:center;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* 八哥令 2026-11-04：本人名字微信绿（聊天成员墙 + 消息用户名）。 */
#next-view .pal-name.is-me,
#next-view .msg .who.is-me{color:#07C160}
/* 神秘玩家（已删/已不在圈内）：名字香槟金（八哥 2026-11-04）。 */
#next-view .msg .who.pal-id-mystery{color:#F3DFA8}
/* 右侧粉色下拉箭头：仅 >7 人显示，点击切换下拉面板；箭头明显加大，与头像行垂直居中 */
#next-view .pal-toggle{flex:none;width:42px;height:42px;border:none;background:transparent;padding:0;
  display:flex;align-items:center;justify-content:center;cursor:pointer}
#next-view .pal-toggle[hidden]{display:none}
#next-view .pal-toggle svg{width:28px;height:28px;fill:none;stroke:#FF9DC0;stroke-width:2.4;
  stroke-linecap:round;stroke-linejoin:round;transition:transform .2s}
#next-view .pal-toggle.open svg{transform:rotate(180deg)}
/* 下拉面板：仅第 8 人及以后（更早加入者），7 列网格可滚动，黑金描边，盖在头像墙下方 */
#next-view .pal-drop{display:none;position:absolute;top:100%;left:0;right:0;margin-top:6px;z-index:30;
  background:var(--pal-ink);border:1px solid rgba(212,175,55,.4);border-radius:14px;padding:10px;
  box-shadow:0 16px 40px rgba(0,0,0,.65);max-height:46vh;overflow-y:auto}
#next-view .pal-drop.open{display:block}
/* 下拉框内一排固定 7 个、整体居中：不满 7 个时该行居中，满 7 个才换行 */
#next-view .pal-drop .pal-row{display:flex;flex-wrap:wrap;justify-content:center;gap:12px 3px}
#next-view .pal-drop .pal-cell{flex:0 0 calc((100% - 18px)/7)}

/* —— 紫框：只有聊天区（背景朦胧感，但内容清晰不模糊） —— */
#next-view .room{flex:1;min-height:0;margin:0;display:flex;flex-direction:column;
  /* —— 背景一体化（八哥令 2026-10-28·四改）：整页一个底层，不再另起紫红块 ——
     原来这里是 linear-gradient(160deg,#3A1E2C,#241823)，与全站底色
     --pal-ink(#0B0B0C) 不同，页面上方是黑、聊天区是紫红 —— 一眼割裂。
     现在填充直接用全站底色：整页（含标语区/头像墙/聊天区/操作台/底栏）
     是同一层底色，只靠一根发丝粉框区分聊天区。 */
  border-radius:18px;border:1px solid rgba(255,122,176,.45);
  background:transparent;
  /* position:relative 是必须的：.room::after 的柔光罩用 position:absolute;
     inset:0，没有定位基准时它会逃逸到 viewport，把一层柔光铺满整页
     （页面上方标语区被压出发灰的黑屏感）。 */
  position:relative;
  /* 剔骨复查补刀（总指挥令 2026-10-29）：上一轮删粉晕时批量替换漏网，圆角外
     一直有一圈 0 10px 30px rgba(255,90,150,.10) 的粉色残影（真机截图红圈处）。
     紫框只靠 1px 发丝粉 border 区分，外晕/外扩光一律不允许存在。 */
  box-shadow:none;
  /* 框内层次（不靠底色差）：顶部一道极淡粉光 + 四边极淡内阴影，
     观感是「凹进页面里的一块」，而不是「另一块底色」。
     底色仍与全站完全一致 —— 不会造成上下割裂。 */
  overflow:hidden;}
/* 柔光罩：只淡淡铺一层雾感氛围，绝不用 backdrop-filter 模糊气泡/头像/文字 */
/* 柔光罩（八哥令 2026-10-29）：整页必须只有一个黑，框内不再另铺任何色层——
   原来这层淡粉雾会把紫框内部垫成「另一种黑」，与框外页面底形成色差，
   调距离时那道色差边界就是破相的元凶。现在紫框只靠一根发丝粉框线区分。 */
#next-view .room::after{content:none;display:none}
#next-view .room::before{content:none;display:none}
/* 消息区内边距：左 12px（框边→头像），右 = 64px。
   64 = 12(左内边距) + 44(头像宽) + 8(头像与气泡间距) —— 也就是
   「气泡左边缘 → 粉框左边缘」的确切距离。右边给同样的 64px，
   于是「气泡右边缘 → 粉框右边缘」=「气泡左边缘 → 粉框左边缘」，
   左右完全对称，长气泡不再贴到右边上（绿泡红泡一视同仁）。 */
#next-view .msgs{flex:1;min-height:0;overflow-y:auto;padding:12px 64px 8px 12px;display:flex;flex-direction:column;gap:14px;position:relative;z-index:1}
/* 消息贴底（微信同款·八哥令四改）：消息少时从底部往上排，
   不再全挤在框顶、下面留一大片空白。
   用 ::before 撑高法而不是 justify-content:flex-end —— 后者在可滚动
   容器里内容溢出时会把顶部消息裁掉（滚不上去）。 */
#next-view .msgs::before{content:"";flex:1 0 auto;display:block}
/* 日期条：内容区左右不对称（左12/右64），往左补 26px 才真正居中于粉框 */
#next-view .day-sep{align-self:center;transform:translateX(-26px);font-size:11px;color:#9C968A;background:rgba(255,255,255,.05);padding:3px 10px;border-radius:10px;margin:2px 0}
/* —— 未登录空态：粉框正中一句登录提示（八哥令 2026-11-01）——
   原来它借用 .day-sep 贴在最左下角（.msgs::before 把内容全推到底），
   看着像压在框线上的一行残字。空态改用独立类：整框水平/垂直居中，
   与顶部减号、四条圆角边框都留足距离，空框因此不再显得粗糙。 */
#next-view .msgs.is-empty{padding:16px;justify-content:center}
#next-view .msgs.is-empty::before{content:none}
#next-view .chat-hint{margin:0;max-width:82%;align-self:center;text-align:center;
  font-size:12px;line-height:1.55;font-weight:600;color:rgba(255,255,255,.62);
  background:rgba(255,255,255,.05);padding:9px 14px;border-radius:12px}

/* —— 气泡：全部靠左；赢家(净分≥0)=全站美股绿 #10B981，输家(净分<0)=全站美股红 #FF3B30
   （与首页数字涨跌显示完全同色）；气泡边缘到紫框左右边缘的留白统一 = 头像到框边的留白 —— */
#next-view .msg{display:flex;gap:8px;align-items:flex-start;max-width:100%}
#next-view .msg .pal-av{width:44px;height:44px;flex:none}
#next-view .msg .body{flex:1;min-width:0}
#next-view .msg .who{font-size:12px;font-weight:700;color:#E9D08A;margin:0 0 4px 2px}
/* ---- 消息时间戳（八哥令 2026-10-31 · 最高指令 UI 死规）----
   ① 位置：内联排布在【用户名右侧】的同一行（写在 .who 行内、紧跟名字之后）；
   ② 间距：名字与时间间隔 = 8px（≈两个空格的视觉距离）；
   ③ 字号：10px（死锁区间 10–11px）；字重回落 400 —— .who 本体是 700，
      必须压回去，否则时间会抢走名字/正文的视觉焦点；
   ④ 颜色：半透明白 rgba(255,255,255,.6)；
   ⑤ nowrap：时间整段原子排版，空间不足时整体落到下一行，绝不从中间断行。
   配套：.who.nm-off —— 同一人连续消息不重复名字，该行只剩时间，垂直留白收紧到 2px。 */
#next-view .msg .who .mtime{
  margin-left:8px;
  font-size:10px;
  font-weight:400;
  color:rgba(255,255,255,.6);
  letter-spacing:.2px;
  white-space:nowrap;
}
#next-view .msg .who.nm-off{margin-bottom:2px}
#next-view .bubble{display:inline-block;max-width:100%;padding:9px 13px;border-radius:14px;font-size:14.5px;line-height:1.42;word-break:break-word}
/* （十七改）文本气泡保留换行：回车键现在原生换行，消息 content 带 \n，
   必须 pre-wrap 才能分行显示；img/audio 气泡内无文本节点，排除以免空隙干扰 */
#next-view .bubble:not(.img):not(.audio){white-space:pre-wrap}
#next-view .msg.left .bubble{background:#10B981;color:#0B0B0C;border-top-left-radius:4px}
#next-view .msg.lose .bubble{background:#FF3B30;color:#FFFFFF}
/* 图片消息：显示宽度定死 150px——大图压到 150；小图不放大（width:auto + max-width）
   按原始宽显示、高度同比例。点一下可放大（见 .chat-zoom）。 */
#next-view .bubble.img{padding:3px;background:transparent!important;overflow:hidden;max-width:100%}
#next-view .bubble.img img{display:block;width:auto;max-width:150px;height:auto;border-radius:12px;cursor:zoom-in}
#next-view .voice{display:flex;align-items:center;gap:8px;padding:10px 14px;border-radius:14px;width:160px;cursor:pointer}
#next-view .msg.left .voice{background:#10B981;color:#0B0B0C}
#next-view .msg.lose .voice{background:#FF3B30;color:#FFFFFF}
#next-view .voice .play{flex:none;width:20px;height:20px;display:flex;align-items:center;justify-content:center}
#next-view .voice .wave{flex:1;height:18px;display:flex;align-items:center;gap:2px}
#next-view .voice .wave i{display:block;width:2px;background:currentColor;opacity:.6;border-radius:2px}
#next-view .voice .dur{font-size:12px;font-weight:700}

/* —— 操作台：直接放纯黑上，不套任何框；由 JS 搬到 body 顶层，fixed 钉在底栏上方 —— */
/* bottom = max(键盘高度, 底栏图标高度) + 间距(--cbgap)。
   --tabh 由 JS 量「底栏图标视觉顶缘」（不是容器顶——容器 padding 会虚增 18px，实测叉处缝 34px）。
   --cbgap：键盘关=16px（与紫框→操作台上段 16px 上下一致，八哥令十改）；键盘开=0px（紧贴
   原生辅助条 ^v✓ 上沿，零黑缝——用户叉掉的正是键盘态那 16px 缝）。 */
/* 八哥令 2026-11-01：fixed → absolute。fixed 的底边以"布局视口"为准，网页端
   该视口包含 Safari 工具栏区域，操作台被压到五个图标上；absolute 挂在 body
   （已 position:relative）上，与底栏共用同一块画布，网页端/PWA 端同高。 */
/* 八哥令 2026-11-01（聊天页定稿·第 2 点续）：操作台整体上提 16px——
   原 --cbgap 16px 时，Send 按钮底边落到了栏目条金线以下（视觉上贴死）。
   32px 后按钮底边在金线之上约 20px，与紫框→操作台的 8px 呼吸位组成
   「上 8px / 下 20px」的稳定层次；键盘态仍由 JS 归零（紧贴键盘辅助条）。 */
#chatBar{position:absolute;left:0;right:0;z-index:600;margin:0;
  bottom:calc(max(var(--kb,0px), var(--tabh,85px)) + var(--cbgap,32px));
  transition:none;
  padding:8px 12px 8px;
  /* 八哥令 2026-11-01（剔骨）：原来这里铺一层 var(--pal-ink) 实底，等于在
     全站唯一黑布上又贴一张纯黑卡——网页端它压住紫框底边圆角、还盖掉整条
     主导航。现在背景一律透明：操作台只是画在同一块黑布上的控件集合，
     消息被紫框自身 overflow:hidden 裁住，不会漏到操作台后面。 */
  /* 八哥令 2026-11-01（细节定稿）：四个控件（麦克风圆钮 / 输入框 / 加图 ⊕ / Send）
     一律【垂直居中于同一条中线】。原来是 flex-end 底边对齐：输入框高 44px、
     其余三件 38px，底边一并齐 → 输入框的中线就被顶高了 3px，看着「有点高」。
     改 center 后中线严格重合；条高仍由 44px 输入框决定（60px 不变），
     上下留白 8px 原样不动，紫框/底栏的间距一分不改。 */
  display:flex;align-items:center;gap:8px;background:transparent}
#chatBar[hidden]{display:none}
/* 操作台元素已由 JS 挂到 body 顶层（#chatBar），不能用 #next-view 作用域，否则样式失配 */
.ic-btn{flex:none;width:38px;height:38px;border-radius:50%;border:1.5px solid #D4AF37;background:transparent;color:#D4AF37;
  display:flex;align-items:center;justify-content:center;cursor:pointer}
.ic-btn svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.ic-btn.is-rec{background:#D4AF37;color:#0B0B0C;animation:pulse-rec 1s infinite}
@keyframes pulse-rec{0%,100%{box-shadow:0 0 0 0 rgba(212,175,55,.5)}50%{box-shadow:0 0 0 6px rgba(212,175,55,0)}}
/* 语音模式：麦克风图标线条变粉（八哥令 2026-10-28）——粉取邮箱小标旁的浅一档 #FF9DC0 */
#chatBar.voice-mode .ic-btn{border-color:#FF9DC0;color:#FF9DC0}
#chatBar.voice-mode .ic-btn svg{stroke:#FF9DC0}
/* contenteditable 输入框：文字清晰可见，去掉原生辅助条 */
.chat-input{flex:1;min-height:44px;max-height:120px;overflow-y:auto;border-radius:14px;
  border:1.5px solid rgba(212,175,55,.4);background:transparent;color:#F3EEE3;
  padding:10px 14px;font-size:16px;line-height:1.4;outline:none;word-break:break-word;white-space:pre-wrap;
  touch-action:manipulation}
/* 八哥令 2026-11-16：仅 App 壳内抑制长按系统气泡（网页端/PWA 保持原样，不碰）。 */
html.is-app .chat-input{-webkit-user-select:text;user-select:text;-webkit-touch-callout:none}
.chat-input:empty:before{content:attr(data-ph);color:#6f6a60}
/* —— 语音模式：输入框隐藏，让位给同尺寸的粉色「按住说话」立体按键 —— */
#chatBar.voice-mode .chat-input{display:none}
.vb-hold{display:none}
#chatBar.voice-mode .vb-hold{
  display:flex;flex:1;min-height:44px;max-height:120px;position:relative;
  align-items:center;justify-content:center;
  border-radius:14px;padding:10px 14px;
  border:1.5px solid #FF9DC0;
  /* 粉色立体：上浅下深的斜向渐变 + 内高光 + 外投影 */
  background:linear-gradient(180deg,#FFB3D6 0%,#FF7AB0 52%,#F2569A 100%);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.55),inset 0 -2px 0 rgba(0,0,0,.14),
    0 3px 10px rgba(255,90,150,.32);
  color:#3A0A1C;font-size:15px;font-weight:800;letter-spacing:.2px;
  font-family:var(--pal-serif,Georgia,serif);
  cursor:pointer;overflow:hidden;
  /* iOS 长按防御：禁选中、禁长按菜单、禁点按高亮、禁双击缩放 */
  -webkit-user-select:none;user-select:none;-webkit-touch-callout:none;
  -webkit-tap-highlight-color:transparent;touch-action:manipulation;
}
/* 按键上的居中配文：Just hold to talk */
.vb-label{position:relative;z-index:2;white-space:nowrap;
  text-shadow:0 1px 0 rgba(255,255,255,.35)}
/* 粉色音波效果（长按中）：条形音波铺满按键 */
.vb-wave{position:absolute;inset:0;z-index:1;display:none;align-items:center;justify-content:center;
  gap:3px;padding:0 14px;opacity:.95}
.vb-wave i{display:block;width:3px;border-radius:2px;background:rgba(58,10,28,.55);
  height:8px;animation:vb-wave .72s ease-in-out infinite}
.vb-wave i:nth-child(1){animation-delay:0s}
.vb-wave i:nth-child(2){animation-delay:.09s}
.vb-wave i:nth-child(3){animation-delay:.18s}
.vb-wave i:nth-child(4){animation-delay:.27s}
.vb-wave i:nth-child(5){animation-delay:.36s}
.vb-wave i:nth-child(6){animation-delay:.45s}
.vb-wave i:nth-child(7){animation-delay:.54s}
@keyframes vb-wave{0%,100%{height:7px}50%{height:22px}}
/* 录音计时器（00:05）：浮在按键左下角 */
.vb-timer{position:absolute;z-index:3;left:12px;bottom:8px;display:none;
  font-size:12px;font-weight:800;color:#3A0A1C;font-variant-numeric:tabular-nums;
  text-shadow:0 1px 0 rgba(255,255,255,.4)}
/* 51 秒起的粉色数字倒数（9→1）：浮在按键右上角 */
.vb-count{position:absolute;z-index:3;right:12px;top:6px;display:none;
  font-size:22px;font-weight:900;color:#FF3D86;line-height:1;
  font-variant-numeric:tabular-nums;
  text-shadow:0 0 10px rgba(255,61,134,.75),0 1px 0 rgba(255,255,255,.5)}
/* 录音中：音波 + 计时器 + 倒数同时亮起 */
#chatBar.voice-mode .vb-hold[data-state="recording"] .vb-wave{display:flex}
#chatBar.voice-mode .vb-hold[data-state="recording"] .vb-label{opacity:0}
#chatBar.voice-mode .vb-hold[data-state="recording"] .vb-timer{display:block}
#chatBar.voice-mode .vb-hold[data-state="recording"] .vb-count{display:block}
#chatBar.voice-mode .vb-hold[data-state="recording"] .vb-count:not(:empty){display:block}
/* 录音中按键压下去一点（微信同款：按住时整键下沉反馈） */
#chatBar.voice-mode .vb-hold[data-state="recording"]{
  transform:translateY(1px) scale(.985);
  box-shadow:inset 0 2px 5px rgba(120,10,60,.35),0 1px 4px rgba(255,90,150,.28)}
.ic-box{flex:none;width:38px;height:38px;border:none;background:transparent;color:#D4AF37;
  display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:22px}
.ic-send{flex:none;height:38px;padding:0 16px;border:none;border-radius:14px;cursor:pointer;
  background:linear-gradient(100deg,#E9D08A,#D4AF37);color:#0B0B0C;font-size:16px;font-weight:700}

/* —— 语音条气泡（八哥令 2026-10-28 · 按住说话）——
   同款粉色（浅→深渐变，立体）；宽度由 JS 按 duration 写在 style 上。
   未听过的（别人发来的新语音）在气泡前方带一个小红点。 */
#next-view .au-wrap{display:inline-flex;align-items:center;gap:6px;max-width:100%}
#next-view .vd-dot{flex:none;width:8px;height:8px;border-radius:50%;background:#FF3B30;
  box-shadow:0 0 0 2px rgba(255,59,48,.22);display:none}
#next-view .au-wrap.is-new .vd-dot{display:block}
#next-view .bubble.audio{display:inline-flex;align-items:center;gap:7px;padding:9px 12px;
  border-radius:14px;max-width:100%;cursor:pointer;
  background:linear-gradient(180deg,#FFA9CF 0%,#FF7AB0 55%,#F2569A 100%)!important;
  color:#3A0A1C!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.45),0 2px 8px rgba(255,90,150,.26)}
#next-view .bubble.audio .vd-play{flex:none;width:20px;height:20px;display:flex;align-items:center;justify-content:center}
#next-view .bubble.audio .vd-play svg{width:100%;height:100%}
#next-view .bubble.audio .wave{flex:none;display:flex;align-items:center;gap:2px;height:18px;overflow:hidden}
#next-view .bubble.audio .wave i{display:block;width:2px;background:currentColor;opacity:.55;border-radius:2px}
#next-view .bubble.audio .vd-dur{flex:none;font-size:12px;font-weight:800;font-variant-numeric:tabular-nums}
/* 播放中：整条变暗 + 音波跳动 */
#next-view .bubble.audio.playing{filter:brightness(.86) saturate(1.15);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.3),0 0 0 2px rgba(255,157,192,.55)}
#next-view .bubble.audio.playing .wave i{animation:vb-play .6s ease-in-out infinite alternate}
#next-view .bubble.audio.playing .wave i:nth-child(2){animation-delay:.08s}
#next-view .bubble.audio.playing .wave i:nth-child(3){animation-delay:.16s}
#next-view .bubble.audio.playing .wave i:nth-child(4){animation-delay:.24s}
#next-view .bubble.audio.playing .wave i:nth-child(5){animation-delay:.32s}
#next-view .bubble.audio.playing .wave i:nth-child(6){animation-delay:.4s}
#next-view .bubble.audio.playing .wave i:nth-child(7){animation-delay:.48s}
#next-view .bubble.audio.playing .wave i:nth-child(8){animation-delay:.56s}
@keyframes vb-play{from{transform:scaleY(.45)}to{transform:scaleY(1.25)}}

/* —— 刚发出的语音条：甩绳式波浪（八哥令 2026-11-01）——
   目标：语音发出那一刻，肉眼也能确认"这条是我发的"。
   做法：不新增任何线条/图层，只让语音条【自己那排音波】从左到右依次甩起来——
   第 1 根先跳、第 2 根 0.09 秒后跳……8 根走完约 1.1 秒，像一根绳子从左甩到右，
   甩完各回各位、定住不动（both 填充，末态就是常态）。
   气泡本体只做一次极短的"入场 + 金光一闪"，不位移、不改尺寸。 */
#next-view .bubble.audio.is-whip{animation:vb-arrive .38s cubic-bezier(.2,.9,.3,1.15) both}
@keyframes vb-arrive{
  0%{transform:scale(.94);box-shadow:inset 0 1px 0 rgba(255,255,255,.45),0 0 0 0 rgba(255,157,192,0)}
  55%{transform:scale(1.02);box-shadow:inset 0 1px 0 rgba(255,255,255,.55),0 0 14px 3px rgba(255,157,192,.55)}
  100%{transform:scale(1);box-shadow:inset 0 1px 0 rgba(255,255,255,.45),0 2px 8px rgba(255,90,150,.26)}
}
#next-view .bubble.audio.is-whip .wave i{
  transform-origin:50% 50%;
  animation:vb-whip .5s cubic-bezier(.34,1.3,.5,1) both;
}
#next-view .bubble.audio.is-whip .wave i:nth-child(1){animation-delay:0s}
#next-view .bubble.audio.is-whip .wave i:nth-child(2){animation-delay:.09s}
#next-view .bubble.audio.is-whip .wave i:nth-child(3){animation-delay:.18s}
#next-view .bubble.audio.is-whip .wave i:nth-child(4){animation-delay:.27s}
#next-view .bubble.audio.is-whip .wave i:nth-child(5){animation-delay:.36s}
#next-view .bubble.audio.is-whip .wave i:nth-child(6){animation-delay:.45s}
#next-view .bubble.audio.is-whip .wave i:nth-child(7){animation-delay:.54s}
#next-view .bubble.audio.is-whip .wave i:nth-child(8){animation-delay:.63s}
@keyframes vb-whip{
  0%  {transform:scaleY(1);opacity:.55}
  32% {transform:scaleY(2.35);opacity:1}
  62% {transform:scaleY(.72);opacity:.7}
  100%{transform:scaleY(1);opacity:.55}
}

/* —— 二十一改（八哥令 2026-10-29）：语音失败态由【气泡自己】承载 ——
   语音条相关的所有小弹窗全部取消（原声"允不允许调用麦克风"面板除外），
   失败/发不出去不再顶出浮层对话框，而是让这一条语音气泡自己变灰发红：
     · .msg.is-fail        —— 这条语音没能发出去（整条灰掉 + 红圈）
     · .bubble.is-playfail —— 这条语音播不出来（红圈闪一下，1.6 秒后复原）
   正常气泡完全不受影响（下面的规则只在带这两个 class 时才生效）。 */
#next-view .msg.is-fail .bubble.audio{opacity:.42;filter:grayscale(.88) brightness(.92);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.3),0 0 0 2px rgba(255,59,48,.5)}
#next-view .bubble.audio.is-playfail{
  box-shadow:inset 0 1px 0 rgba(255,255,255,.3),0 0 0 2px rgba(255,59,48,.7)}

/* —— 页面固死：整个聊天区禁止双击缩放/捏合；图片本身禁捏合但可点开放大 —— */
#next-view{touch-action:pan-y}
#next-view .bubble.img img{touch-action:manipulation;pointer-events:auto}

/* —— 图片放大层（点图片弹出）：宽度定死 = 上面气泡的列宽，高度同比例；超高可滚 —— */
.chat-zoom{position:fixed;inset:0;z-index:1200;background:rgba(8,8,9,.94);
  display:flex;align-items:center;justify-content:center;padding:16px;overflow:auto;-webkit-overflow-scrolling:touch}
/* 图片 + 图下提示：纵向排列，文字在图下方并留间距；图过高时整体被自然撑下、层内可滚 */
.chat-zoom .cz-stage{display:flex;flex-direction:column;align-items:center;gap:16px;max-width:100%}
.chat-zoom .cz-stage img{display:block;height:auto;max-width:100%;border-radius:12px;box-shadow:0 20px 60px rgba(0,0,0,.7)}
/* 图下提示：居中、与图同宽、留白自动撑下；禁选中，长按提示文字不会出文字选区 */
.chat-zoom .cz-hint{margin:0;max-width:100%;padding:0 8px;text-align:center;
  color:rgba(255,255,255,.82);font:500 15px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  letter-spacing:.2px;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
/* 长按存图 = iOS 原生（八哥令 2026-10-28 · 七改）：真图保持可命中、未禁 touch-callout，
   长按图片即弹系统原生菜单（保存到"照片"）。不再注入 ghost 节点——实测 iOS 抬起
   预览卡必出黑块，ghost 方案已彻底删除。 */
.chat-zoom .cz-close{position:fixed;top:calc(12px + env(safe-area-inset-top,0px));right:14px;
  width:40px;height:40px;border-radius:50%;border:1.5px solid rgba(255,255,255,.45);
  background:rgba(0,0,0,.55);color:#FFFFFF;font-size:22px;line-height:1;cursor:pointer;z-index:1201;
  display:flex;align-items:center;justify-content:center}

/* ============================================================
   按住说话的粉雾蒙层 + 对话框内超大倒数
   （八哥令 2026-10-28 · 三改；本轮收进对话框内）
   两层都位于 .room 内部、绝对定位于"对话框"，沿用 .room 的圆角、不铺满全屏：
   按住说话时只笼罩对话框本身，黑底/键盘/操作台都不被遮。
   ============================================================ */

/* —— ① 粉雾蒙层：按住时整块聊天区泛起粉色朦胧感（限对话框内） —— */
.vb-veil{position:absolute;inset:0;z-index:5;display:none;
  align-items:center;justify-content:center;flex-direction:column;
  gap:14px;padding:0;pointer-events:none;
  /* 与对话框同圆角，蒙层只出现在圆角内、不露出直角 */
  border-radius:18px;overflow:hidden;
  /* 朦胧感：粉色雾面压住底层，不做 backdrop-filter（会糊掉气泡文字） */
  background:radial-gradient(120% 80% at 50% 42%,
      rgba(255,122,176,.42) 0%,rgba(255,122,176,.26) 45%,rgba(60,20,45,.62) 100%);
  opacity:0;transition:opacity .16s ease-out}
.vb-veil.is-on{display:flex;opacity:1}
/* 取消态：整块转深粉红，提示"松手即取消" */
.vb-veil.is-cancel{background:radial-gradient(120% 80% at 50% 42%,
      rgba(255,61,134,.52) 0%,rgba(214,20,80,.40) 48%,rgba(60,8,32,.70) 100%)}
/* 蒙层上的英文提示：两行居中、绿色（与赢家气泡同色），不喧宾夺主 */
.vb-veil-txt{font-family:var(--pal-sans,system-ui,sans-serif);
  font-size:15px;font-weight:800;line-height:1.45;letter-spacing:.2px;color:#10B981;
  text-align:center;white-space:normal;
  text-shadow:0 1px 6px rgba(0,40,20,.55),0 0 2px rgba(0,30,15,.4)}
/* 白色音波条：蒙层里"正在录音"的动态感，置于提示语下方 */
.vb-veil-wave{display:flex;align-items:center;justify-content:center;gap:3px;height:46px}
.vb-veil-wave i{display:block;width:3px;border-radius:2px;background:rgba(255,255,255,.9);
  height:9px;box-shadow:0 0 6px rgba(255,255,255,.45);
  animation:vb-veil-wave .78s ease-in-out infinite}
.vb-veil-wave i:nth-child(1){animation-delay:0s}
.vb-veil-wave i:nth-child(2){animation-delay:.06s}
.vb-veil-wave i:nth-child(3){animation-delay:.12s}
.vb-veil-wave i:nth-child(4){animation-delay:.18s}
.vb-veil-wave i:nth-child(5){animation-delay:.24s}
.vb-veil-wave i:nth-child(6){animation-delay:.30s}
.vb-veil-wave i:nth-child(7){animation-delay:.36s}
.vb-veil-wave i:nth-child(8){animation-delay:.42s}
.vb-veil-wave i:nth-child(9){animation-delay:.48s}
.vb-veil-wave i:nth-child(10){animation-delay:.54s}
.vb-veil-wave i:nth-child(11){animation-delay:.60s}
.vb-veil-wave i:nth-child(12){animation-delay:.66s}
.vb-veil-wave i:nth-child(13){animation-delay:.72s}
.vb-veil-wave i:nth-child(14){animation-delay:.78s}
.vb-veil-wave i:nth-child(15){animation-delay:.84s}
.vb-veil-wave i:nth-child(16){animation-delay:.90s}
.vb-veil-wave i:nth-child(17){animation-delay:.96s}
.vb-veil-wave i:nth-child(18){animation-delay:1.02s}
.vb-veil-wave i:nth-child(19){animation-delay:1.08s}
.vb-veil-wave i:nth-child(20){animation-delay:1.14s}
.vb-veil-wave i:nth-child(21){animation-delay:1.20s}
.vb-veil-wave i:nth-child(22){animation-delay:1.26s}
.vb-veil-wave i:nth-child(23){animation-delay:1.32s}
.vb-veil-wave i:nth-child(24){animation-delay:1.38s}
.vb-veil-wave i:nth-child(25){animation-delay:1.44s}
.vb-veil-wave i:nth-child(26){animation-delay:1.50s}
.vb-veil-wave i:nth-child(27){animation-delay:1.56s}
.vb-veil-wave i:nth-child(28){animation-delay:1.62s}
.vb-veil-wave i:nth-child(29){animation-delay:1.68s}
.vb-veil-wave i:nth-child(30){animation-delay:1.74s}
.vb-veil-wave i:nth-child(31){animation-delay:1.80s}
@keyframes vb-veil-wave{0%,100%{height:8px;opacity:.55}50%{height:34px;opacity:1}}

/* —— ② 屏幕中央超大倒数：51 秒起，9->1 一秒一跳 —— */
.vb-count-veil{position:absolute;inset:0;z-index:6;display:none;
  align-items:center;justify-content:center;pointer-events:none;border-radius:18px;overflow:hidden;
  /* 极淡的粉雾衬底，让巨字在深色聊天区上更跳，但绝不遮挡消息内容 */
  background:radial-gradient(42% 26% at 50% 50%,rgba(255,122,176,.22),rgba(255,122,176,.04) 62%,transparent 78%)}
.vb-count-veil.is-on{display:flex}
.vb-count-num{font-family:var(--pal-serif,Georgia,serif);
  font-size:clamp(96px,30vw,180px);line-height:.9;font-weight:900;
  font-variant-numeric:tabular-nums;color:#FF5E9E;
  text-align:center;
  text-shadow:0 0 26px rgba(255,61,134,.85),0 0 70px rgba(255,61,134,.45),
    0 6px 22px rgba(60,0,30,.65),0 2px 0 rgba(255,255,255,.28)}
/* 每跳一次：重放一次放大回弹，"时间在流逝"看得见 */
.vb-count-num.tick{animation:vb-count-pop .62s cubic-bezier(.22,1.2,.36,1)}
@keyframes vb-count-pop{
  0%{transform:scale(1.55);opacity:.25}
  38%{transform:scale(1.06);opacity:1}
  100%{transform:scale(1);opacity:1}}

/* ============================================================
   删除模式（八哥令 2026-10-31）
     ① 入口：消息区右上角【金色减号】（toggle，再点退出）
     ② 表现：所有消息条上下【快速】摇摆 + 尾部冒出白色小叉
     ③ 单条删除 + 必须先过确认弹窗
   ============================================================ */

/* 确认弹窗要相对聊天区定位（遮罩铺满聊天区，不遮挡其它视图） */
#next-view .chat-wrap{position:relative}
/* 减号要落在【消息区】右上角：.room 本身没有定位上下文，
   不给 relative 的话按钮会以整个 chat-wrap 为基准，跑到头像墙上面去。 */
#next-view .room{position:relative}

/* ---- 金色减号（消息区右上角；.msgs 右侧本就留了 64px，不压任何消息）---- */
#next-view .del-toggle{
  position:absolute;top:10px;right:14px;z-index:8;
  width:30px;height:30px;display:inline-flex;align-items:center;justify-content:center;
  border-radius:50%;cursor:pointer;padding:0;
  background:rgba(20,20,24,.55);border:1.5px solid #E9D08A;
  color:#E9D08A;transition:background .18s,transform .18s,box-shadow .18s;
  -webkit-tap-highlight-color:transparent;}
#next-view .del-toggle svg{width:17px;height:17px;fill:none;stroke:currentColor;
  stroke-width:3;stroke-linecap:round}
/* 进入删除模式：减号变成实心金色，一眼看出"现在是删除态" */
#next-view .del-toggle.is-on{
  background:#E9D08A;border-color:#E9D08A;color:#12130f;
  box-shadow:0 0 0 4px rgba(233,208,138,.22);transform:rotate(180deg)}

/* ---- 清空全部记录（八哥令 2026-11-16 · 二改）----
   纯图标、无文字，挂在金色减号【左侧】，与减号同一行；
   间距 12px（约半根手指），不空太多也不贴住。
   尺寸、边框、底色全部与减号严格一致：30px + 1.5px #E9D08A。
   图标为叠层垃圾桶：前一个大桶实心遮住后两个小桶，后两个是实线，不是虚影。 */
#next-view .clr-all{
  position:absolute;top:10px;right:56px;z-index:8;
  width:30px;height:30px;display:inline-flex;align-items:center;justify-content:center;
  border-radius:50%;cursor:pointer;padding:0;
  background:rgba(20,20,24,.55);border:1.5px solid #E9D08A;
  color:#E9D08A;transition:background .18s,transform .18s,box-shadow .18s;
  -webkit-tap-highlight-color:transparent;}
#next-view .clr-all svg{width:21px;height:21px;display:block}
#next-view .clr-all:active{transform:scale(.94);background:rgba(233,208,138,.16)}
/* hidden 属性会被上面的 display:inline-flex 盖掉，必须显式还原 */
#next-view .clr-all[hidden]{display:none}
#next-view .clr-all:disabled{opacity:.5;cursor:default}

/* ---- 每条消息尾部的【白色小叉】：默认藏着，删除模式才亮 ---- */
#next-view .del-x{
  display:none;width:23px;height:23px;flex:none;
  align-items:center;justify-content:center;
  margin:0 0 0 8px;vertical-align:middle;padding:0;cursor:pointer;
  background:rgba(255,255,255,.18);border:1.4px solid rgba(255,255,255,.9);
  border-radius:50%;color:#fff;
  -webkit-tap-highlight-color:transparent;transition:transform .14s,background .14s}
#next-view .del-x svg{width:12px;height:12px;fill:none;stroke:currentColor;
  stroke-width:2.6;stroke-linecap:round}
#next-view .del-x:active{transform:scale(.82);background:rgba(255,255,255,.34)}
#next-view .msgs.del-mode .del-x{display:inline-flex}

/* ---- 上下快速摇摆：速率调快（0.26s 一轮），明确提示"这些是可删的" ---- */
@keyframes pal-del-wiggle{
  0%,100%{transform:translateY(-1.7px)}
  50%{transform:translateY(1.7px)}}
#next-view .msgs.del-mode .bubble,
#next-view .msgs.del-mode .voice{animation:pal-del-wiggle .26s ease-in-out infinite}
/* 删掉的那条：原地淡出缩小，不许突兀消失 */
#next-view .msg.is-gone{opacity:0;transform:scale(.96);transition:opacity .2s ease-out,transform .2s ease-out}

/* ---- 删除确认弹窗 ---- */
#next-view .del-confirm{
  position:absolute;inset:0;z-index:60;
  display:flex;align-items:center;justify-content:center;
  padding:22px;background:rgba(10,10,12,.58);}
/* 关键坑：hidden 属性会被上面的 display:flex 盖掉，必须显式还原 */
#next-view .del-confirm[hidden]{display:none}
#next-view .del-card{
  width:100%;max-width:290px;padding:20px 18px 14px;
  border-radius:18px;background:#1B1B1F;border:1px solid rgba(233,208,138,.34);
  box-shadow:0 18px 44px rgba(0,0,0,.5);text-align:center}
#next-view .del-card .del-title{margin:0 0 8px;font-size:17px;font-weight:700;color:#F4EFE2}
#next-view .del-card .del-text{margin:0 0 16px;font-size:13px;line-height:1.55;color:rgba(255,255,255,.66)}
#next-view .del-actions{display:flex;gap:10px}
#next-view .del-btn{
  flex:1;padding:11px 10px;border-radius:12px;cursor:pointer;
  font-size:14.5px;font-weight:700;font-family:inherit;
  background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.22);color:#fff}
#next-view .del-btn:active{transform:scale(.97)}
#next-view .del-btn.is-danger{background:#E9D08A;border-color:#E9D08A;color:#12130f}
/* 提交中：不可点，视觉上明示在处理 */
#next-view .del-btn[disabled]{opacity:.5;cursor:default}

/* 尊重系统「减弱动态效果」偏好：摇摆会让部分用户不适 */
@media (prefers-reduced-motion:reduce){
  #next-view .msgs.del-mode .bubble,
  #next-view .msgs.del-mode .voice{animation:none}
  #next-view .msg.is-gone{transition:none}
}

/* ============================================================
   私密空间（八哥令 2026-11-05）
   · 头像可选态：自己 / 假人 cursor:default（无点击音、无按压动效、无反应）；
     真好友 cursor:pointer → 全局触感层自动给清脆咔哒 + 震动。
   · 选中反馈：2px 香槟金圈（box-shadow 外扩，不改头像尺寸、不挤布局）。
   · 抽屉：body 级浮层，只在「头像墙下方 / 操作台上方」之间滑出——
     绝不遮住头像，连选时左侧每一个头像都还能点。
   · Let's Talk 金边按钮跟在名单之后（margin-top 26px），绝不贴底。
   ============================================================ */
#next-view .pal-cell{cursor:default;-webkit-tap-highlight-color:transparent}
#next-view .pal-cell.is-pal{cursor:pointer}
#next-view .pal-av{transition:transform .2s cubic-bezier(.22,1.35,.36,1),box-shadow .18s ease}
/* 按压缩小 → 松手回弹（只给可点的真好友） */
#next-view .pal-cell.is-pressed .pal-av{
  transform:scale(.86);
  transition:transform .08s ease-out,box-shadow .18s ease;
}
/* 2px 香槟金圈：清晰、恒定，选中即亮 */
#next-view .pal-cell.is-picked .pal-av{
  box-shadow:0 0 0 2px #E9C97E, 0 0 0 5px rgba(233,201,126,.16);
}
/* 私聊是物理级新窗口：进入即清空大群 DOM，只重绘被选中的人，故不再需要隐藏类。 */
/* 私聊态标语：大字 → 优雅小字（同一行位置，不改页头结构） */
#next-view .nx-line.is-private{
  font-size:13px;line-height:1.45;letter-spacing:.025em;font-weight:600;
  background:none;background-clip:border-box;-webkit-background-clip:border-box;
  color:#E9C97E;-webkit-text-fill-color:#E9C97E;
}

/* ---- 右侧抽屉（body 级，与邮箱抽屉同系：右侧滑入 + 金发丝边 + 左圆角） ---- */
.pal-priv-drawer{
  position:fixed;right:0;z-index:1004;
  width:min(360px,88vw);
  /* 【死规四】上下沿由 syncDrawerFrame() 用 .room 的 border-box rect 精确写入，
     与聊天大框紫边严丝合缝；这里只留 0 兜底，绝不再用拍脑袋的 bottom 公式。 */
  top:0;bottom:0;height:auto;
  display:flex;flex-direction:column;
  padding:14px 16px 18px;box-sizing:border-box;
  background:#0B0B0C;
  border-left:2px solid rgba(233,201,126,.55);
  border-top:1px solid rgba(233,201,126,.22);
  border-bottom:1px solid rgba(233,201,126,.22);
  border-radius:22px 0 0 22px;
  box-shadow:-20px 0 54px rgba(0,0,0,.6);
  overflow-y:auto;-webkit-overflow-scrolling:touch;
  overscroll-behavior:contain;touch-action:pan-y;
  transform:translateX(100%);visibility:hidden;
  transition:transform .34s cubic-bezier(.32,.72,.24,.1),visibility 0s linear .34s;
}
.pal-priv-drawer.is-open{
  transform:translateX(0);visibility:visible;
  transition:transform .34s cubic-bezier(.32,.72,.24,.1);
}
/* 右上角 X：sticky 钉在抽屉顶缘，名单再长也不用滚回去找 */
.pal-priv-close{
  position:sticky;top:0;z-index:3;align-self:flex-end;flex:none;
  width:32px;height:32px;margin:-2px -4px 2px 0;padding:0;
  display:grid;place-items:center;cursor:pointer;
  border:1px solid rgba(255,255,255,.3);border-radius:50%;
  background:rgba(11,11,12,.92);color:#FFFFFF;
  -webkit-tap-highlight-color:transparent;
}
.pal-priv-close svg{width:16px;height:16px;fill:none;stroke:currentColor;
  stroke-width:2.6;stroke-linecap:round}
.pal-priv-close:active{transform:scale(.92)}
/* 顶部半透明小字：极简、无衬线，和全站黑金同一语气 */
.pal-priv-tip{
  margin:0 2px 14px;font-size:12px;line-height:1.5;font-weight:600;
  color:rgba(243,238,227,.52);letter-spacing:.01em;
}
.pal-priv-list{display:flex;flex-direction:column;gap:10px}
.pal-priv-row{
  display:flex;align-items:center;gap:12px;
  padding:9px 10px;border-radius:14px;
  background:rgba(245,238,218,.045);
  border:1px solid rgba(212,175,55,.14);
}
.pal-priv-row.is-self{background:rgba(212,175,55,.09);border-color:rgba(212,175,55,.26)}
.pal-priv-av{
  width:38px;height:38px;border-radius:50%;flex:none;position:relative;
  display:flex;align-items:center;justify-content:center;
  /* 八哥令 2026-11-13：overflow 改 visible，给右上角好友等级徽标留出空间
     （圆裁继续由子元素 img/.face 自身的 border-radius 负责）。 */
  overflow:visible;
  background:rgba(255,255,255,.06);
}
.pal-priv-av img,.pal-priv-av .face{width:100%;height:100%;border-radius:50%;display:block;object-fit:cover}
.pal-priv-av .face-none{
  width:100%;height:100%;border-radius:50%;display:flex;align-items:center;justify-content:center;
  color:#E9D08A;font-family:var(--pal-serif,Georgia,serif);font-weight:700;font-size:17px;
}
.pal-priv-name{
  flex:1;min-width:0;font-size:14px;font-weight:700;color:#F3EEE3;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.pal-priv-row.is-self .pal-priv-name{color:#F3DFA8}
/* 极简小 X：只有好友有；自己绝对删不掉 */
.pal-priv-del{
  flex:none;width:30px;height:30px;padding:0;display:grid;place-items:center;
  border:none;border-radius:50%;background:transparent;color:#B9AE95;
  cursor:pointer;-webkit-tap-highlight-color:transparent;
}
.pal-priv-del svg{width:14px;height:14px;fill:none;stroke:currentColor;
  stroke-width:2.4;stroke-linecap:round}
.pal-priv-del:active{background:rgba(255,255,255,.09);color:#FFFFFF}
/* 金边大按钮：紧跟最后一位好友（26px），名单越长它越往下走，绝不 fixed */
.pal-priv-talk{
  display:block;width:100%;margin:26px 0 4px;padding:14px 18px;
  border:1.5px solid #D4AF37;border-radius:999px;background:transparent;
  color:#F3DFA8;font-family:var(--pal-serif,Georgia,serif);
  font-size:16px;font-weight:700;letter-spacing:.08em;
  cursor:pointer;-webkit-tap-highlight-color:transparent;
  transition:transform .16s ease,background .16s ease;
}
.pal-priv-talk[hidden]{display:none}
.pal-priv-talk:active{transform:scale(.97);background:rgba(212,175,55,.12)}

/* ---- 左侧悬浮圆钮 All Pals（八哥令 2026-11-05 · 死规二）
   直接套用 Install Gate / Join 紫色圆按钮（.nmjl-join-ball）的设计语言：
   紫色径向玻璃底 + 紫色 1px 边 + 冷光；
   尺寸从 62 缩到 44（小一圈），left:0 完整贴住屏幕最左缘，绝不出界被裁；
   内边距归零，文字用 flex 双向绝对居中——完整一颗紫珍珠。
   不用黑底暗金圆。 ---- */
.pal-all-pals{
  position:fixed;
  /* 八哥令 2026-11-05：完整贴屏幕最左缘，圆球绝不被裁掉一块 */
  left:0;
  top:50%;z-index:1006;
  /* 内边距归零 + flex 双向居中：All Pals 在球内水平/垂直绝对正中 */
  width:44px;height:44px;padding:0;box-sizing:border-box;
  border-radius:50%;border:1px solid rgba(178,102,255,.60);
  background:radial-gradient(circle at 32% 26%,rgba(178,102,255,.32),rgba(12,8,18,.88) 70%);
  color:#f0e6ff;font-family:Nunito,system-ui,-apple-system,sans-serif;
  font-size:9px;font-weight:800;line-height:1.1;letter-spacing:.02em;
  text-align:center;white-space:nowrap;
  display:none;align-items:center;justify-content:center;
  cursor:pointer;-webkit-tap-highlight-color:transparent;outline:none;
  box-shadow:0 8px 24px rgba(0,0,0,.55),0 0 18px rgba(124,58,237,.22),
    inset 0 1px 0 rgba(255,255,255,.08);
  -webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);
  transform:translateY(-50%);
  transition:transform .16s ease,box-shadow .16s ease;
}
.pal-all-pals.is-on{display:flex}
.pal-all-pals:active{transform:translateY(-50%) scale(.94);
  box-shadow:0 4px 14px rgba(0,0,0,.55),0 0 22px rgba(124,58,237,.34),
    inset 0 1px 0 rgba(255,255,255,.1)}

@media (prefers-reduced-motion:reduce){
  #next-view .pal-av{transition:none}
  #next-view .pal-cell.is-pressed .pal-av{transform:none}
  .pal-priv-drawer,.pal-priv-drawer.is-open{transition:none}
  .pal-priv-talk,.pal-all-pals{transition:none}
}
