/* ============================================================
   黑八 · 微信高仿 UI（v2 · 按 iOS 微信实测参数复刻）
   色板 / 尺寸 / 动效 均对齐微信 8.x iOS 版
   ============================================================ */
:root {
  /* ---- 色板 ---- */
  --wx-green: #07c160;
  --wx-green-active: #06ad56;
  --wx-bubble-me: #95ec69;
  --wx-bubble-me-active: #89dd5f;
  --wx-bubble-other: #ffffff;
  --wx-bg-page: #ededed;
  --wx-bg-chat: #ededed;
  --wx-bg-card: #ffffff;
  --wx-bg-nav: #ededed;
  --wx-bg-tab: rgba(247, 247, 247, .94);
  --wx-bg-input: #f7f7f7;
  --wx-line: #e5e5e5;
  --wx-line-nav: rgba(0, 0, 0, .1);
  --wx-pressed: #ececec;
  --wx-text: #191919;
  --wx-text-sub: #888888;
  --wx-text-3: #b2b2b2;
  --wx-link: #576b95;
  --wx-red: #fa5151;
  --wx-orange: #fa9d3b;
  --wx-blue: #10aeff;

  /* ---- 尺寸 ---- */
  --wx-font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue",
             "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  --wx-nav-h: 44px;
  --wx-tab-h: 49px;
  --wx-av: 48px;          /* 列表头像 */
  --wx-av-msg: 40px;      /* 消息头像 */
  --wx-radius-av: 4px;    /* 微信头像圆角 */

  /* ---- 动效 ---- */
  --wx-ease: cubic-bezier(.25, .1, .25, 1);        /* iOS 默认 */
  --wx-ease-out: cubic-bezier(.2, .9, .3, 1);
  --wx-push: .35s cubic-bezier(.25, .1, .25, 1);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--wx-font);
  font-size: 17px;
  color: var(--wx-text);
  background: #d8d8d8;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; padding: 0; color: inherit; }
input, textarea { font-family: inherit; }
::-webkit-scrollbar { width: 0; height: 0; }

/* ============================================================
   登录页
   ============================================================ */
.login-body { background: var(--wx-bg-page); }
.login-wrap {
  height: 100%; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: linear-gradient(170deg, #2b2b2b 0%, #111 100%);
}
.login-card {
  width: 340px; max-width: 100%; background: #fff; border-radius: 12px;
  padding: 38px 28px 24px; box-shadow: 0 24px 70px rgba(0, 0, 0, .45);
  animation: cardIn .42s var(--wx-ease-out) both;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
.login-logo { display: block; width: 68px; height: 68px; margin: 0 auto 12px; border-radius: 15px; }
.login-title { text-align: center; font-size: 19px; font-weight: 600; margin-bottom: 24px; letter-spacing: 2px; }
.wx-field { position: relative; margin-bottom: 10px; }
.wx-field input {
  width: 100%; height: 48px; border: none; border-bottom: 1px solid #ededed; background: transparent;
  padding: 0 46px 0 2px; font-size: 16px; outline: none; border-radius: 0;
  transition: border-color .2s;
}
.wx-field input:focus { border-bottom-color: var(--wx-green); }
.wx-field .eye {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  color: var(--wx-text-3); font-size: 13px; cursor: pointer; user-select: none; padding: 6px;
}
.wx-btn {
  width: 100%; height: 46px; margin-top: 18px; border-radius: 6px;
  background: var(--wx-green); color: #fff; font-size: 16px; font-weight: 500; letter-spacing: 1px;
  transition: background .15s, transform .12s;
}
.wx-btn:hover { background: var(--wx-green-active); }
.wx-btn:active { transform: scale(.985); background: #059c4d; }
.wx-btn:disabled { background: #b9e6cd; cursor: not-allowed; }
.login-switch { text-align: center; margin-top: 16px; font-size: 14px; }
.login-switch a { color: var(--wx-link); cursor: pointer; }
.login-err {
  background: #fff1f1; color: var(--wx-red); border-radius: 6px; padding: 9px 12px;
  font-size: 13px; margin-bottom: 14px; display: none;
}

/* ============================================================
   微信壳
   ============================================================ */
.wx {
  position: relative; width: 100%; max-width: 480px; height: 100%; margin: 0 auto;
  background: var(--wx-bg-page); overflow: hidden; overflow: clip;
}
.page {
  position: absolute; left: 0; right: 0; top: 0; bottom: var(--wx-tab-h);
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: var(--wx-bg-page);
  transition: transform var(--wx-push), filter var(--wx-push);
  will-change: transform;
}
/* push 转场：主页面左移并轻微变暗 */
.wx.pushed .page { transform: translateX(-26%); filter: brightness(.92); }

/* 顶部导航 */
.nav {
  position: sticky; top: 0; z-index: 5; height: var(--wx-nav-h);
  display: flex; align-items: center; padding: 0 8px 0 16px;
  background: var(--wx-bg-nav);
  border-bottom: .5px solid var(--wx-line-nav);
}
.nav-title {
  position: absolute; left: 50%; transform: translateX(-50%);
  font-size: 17px; font-weight: 500; letter-spacing: .2px;
  max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.nav-btn {
  width: 36px; height: 36px; border-radius: 6px; color: var(--wx-text);
  display: flex; align-items: center; justify-content: center;
  transition: background .12s, opacity .12s;
}
.nav-btn svg { width: 22px; height: 22px; }
.nav-btn:active { background: rgba(0, 0, 0, .07); }
.nav-back {
  width: 36px; height: 36px; color: var(--wx-text);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .12s;
}
.nav-back svg { width: 23px; height: 23px; }
.nav-back:active { opacity: .5; }
.conn { width: 8px; height: 8px; border-radius: 50%; background: #c9c9c9; margin-right: 8px; transition: background .3s; }
.conn.on { background: var(--wx-green); }
.conn.off { background: var(--wx-orange); animation: connBlink 1.4s infinite; }
@keyframes connBlink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* ============================================================
   列表（微信 cell）
   ============================================================ */
.list { padding-bottom: 24px; }
.cell {
  display: flex; align-items: center; gap: 12px;
  padding: 0 16px; min-height: 55px; background: var(--wx-bg-card);
  position: relative; cursor: pointer;
  transition: background-color .06s linear;
}
.cell:active { background: var(--wx-pressed); }
.cell + .cell::before {
  content: ""; position: absolute; left: 16px; right: 0; top: 0;
  height: .5px; background: var(--wx-line);
  transform: scaleY(.5); transform-origin: 0 0;
}
/* 有头像的 cell：分割线左缩进到文字处 */
.cell:has(.av) + .cell:has(.av)::before { left: 76px; }
.cell.two-line { min-height: 68px; padding-top: 8px; padding-bottom: 8px; }
.cell .av {
  width: var(--wx-av); height: var(--wx-av); border-radius: var(--wx-radius-av);
  flex-shrink: 0; color: #fff; font-size: 17px; font-weight: 500;
  display: flex; align-items: center; justify-content: center;
  background: #c9c9c9; background-size: cover; background-position: center; position: relative;
}
.cell .av.group { background: var(--wx-green); }
.cell .av svg { width: 26px; height: 26px; }
.cell .av .badge-dot {
  position: absolute; right: -6px; top: -6px; min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--wx-red); color: #fff; font-size: 12px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center; font-weight: 400;
  box-shadow: 0 0 0 2px #fff;
}
.cell .meta { flex: 1; min-width: 0; }
.cell .nm {
  font-size: 17px; line-height: 1.35; color: var(--wx-text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cell .sub {
  font-size: 14px; color: var(--wx-text-sub); line-height: 1.35;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px;
}
.cell .right { flex-shrink: 0; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.cell .tm { font-size: 13px; color: var(--wx-text-3); font-variant-numeric: tabular-nums; }
.cell .badge {
  min-width: 18px; height: 18px; padding: 0 5px; background: var(--wx-red); color: #fff;
  font-size: 12px; border-radius: 9px; display: flex; align-items: center; justify-content: center;
  font-variant-numeric: tabular-nums;
}
.cell .arrow { color: #c8c8c8; flex-shrink: 0; font-size: 17px; line-height: 1; margin-left: -2px; }
.cell .val { color: var(--wx-text-sub); font-size: 15px; flex-shrink: 0; }
.cell .val.strong { color: var(--wx-text); font-weight: 600; }
.cell .role { font-size: 11px; padding: 2px 6px; border-radius: 3px; background: #f0f0f0; color: var(--wx-text-sub); flex-shrink: 0; }
.cell .role.manager { background: #e6f7ee; color: var(--wx-green); }
.cell .role.dealer { background: #fff2e5; color: var(--wx-orange); }
.cell .role.admin { background: #ffe9e9; color: var(--wx-red); }
.group-sep { padding: 18px 16px 7px; font-size: 14px; color: var(--wx-text-sub); }
.list-empty {
  padding: 70px 32px; text-align: center; color: var(--wx-text-3);
  font-size: 15px; line-height: 1.9;
}

/* 列表入场（微信：内容直接出现，仅做极轻的淡入） */
@keyframes listIn { from { opacity: 0; } to { opacity: 1; } }
.list > .cell, .list > .group-sep, .list > .list-empty { animation: listIn .22s ease both; }

/* ============================================================
   我（个人页）
   ============================================================ */
.me-card {
  display: flex; align-items: center; gap: 16px;
  padding: 28px 20px 22px; background: var(--wx-bg-card);
  margin-bottom: 8px; cursor: pointer; position: relative;
  transition: background-color .06s linear;
}
.me-card:active { background: var(--wx-pressed); }
.me-card .av {
  width: 64px; height: 64px; border-radius: 8px; background: var(--wx-green); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 500;
  background-size: cover; background-position: center; flex-shrink: 0;
}
.me-card .meta { flex: 1; min-width: 0; }
.me-card .nm { font-size: 21px; font-weight: 600; letter-spacing: .2px; }
.me-card .no { font-size: 14px; color: var(--wx-text-sub); margin-top: 7px; }
.me-card .arrow { color: #c8c8c8; font-size: 19px; line-height: 1; flex-shrink: 0; }
.me-list { background: transparent; }
.me-list .cell + .cell::before { left: 56px; }
.me-gap { height: 0; }

/* 发现 / 我：彩色入口图标（对齐微信发现页 28px 圆角色块） */
.mico {
  width: 28px; height: 28px; border-radius: 6px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.mico svg { width: 18px; height: 18px; display: block; }
.menu-group { background: var(--wx-bg-card); margin-top: 8px; }
.menu-group .cell + .cell::before { left: 56px; }
#discoverList { padding-bottom: 24px; }

/* ============================================================
   底部 TabBar
   ============================================================ */
.tabbar {
  position: absolute; left: 0; right: 0; bottom: 0; height: var(--wx-tab-h); z-index: 40;
  display: flex; background: rgba(247, 247, 247, .72);
  -webkit-backdrop-filter: saturate(180%) blur(28px);
  backdrop-filter: saturate(180%) blur(28px);
  border-top: .5px solid rgba(0, 0, 0, .08);
  padding-bottom: env(safe-area-inset-bottom);
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px; color: #7f7f7f; cursor: pointer; position: relative;
  transition: color .12s;
}
.tab:active { opacity: .6; }
.tab svg { width: 28px; height: 28px; transition: transform .18s var(--wx-ease-out); }
.tab .ico-on { display: none; }
.tab.active .ico { display: none; }
.tab.active .ico-on { display: block; }
.tab.active { color: var(--wx-green); }
.tab.active svg { transform: scale(1.02); }
.tab span { font-size: 10px; line-height: 1.2; letter-spacing: .2px; }
.tab-badge {
  position: absolute; top: 3px; left: 50%; margin-left: 4px;
  min-width: 17px; height: 17px; padding: 0 5px;
  background: var(--wx-red); color: #fff; font-size: 11px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center; font-style: normal;
  box-shadow: 0 0 0 1.5px var(--wx-bg-tab);
  animation: badgeIn .28s var(--wx-ease-out) both;
}
@keyframes badgeIn { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: scale(1); } }

/* ============================================================
   聊天页（全屏 push）
   ============================================================ */
.chatpage {
  position: absolute; inset: 0; z-index: 50; display: flex; flex-direction: column;
  background: var(--wx-bg-chat);
  transform: translateX(100%);
  transition: transform var(--wx-push);
  will-change: transform;
  pointer-events: none;
}
.chatpage.show { transform: translateX(0); pointer-events: auto; }
.chatpage .nav { background: var(--wx-bg-nav); }
.chat-body { flex: 1; overflow-y: auto; padding: 16px 12px 10px; -webkit-overflow-scrolling: touch; }

/* ============================================================
   聊天设置页（右上角「…」，位于聊天页之上）
   ============================================================ */
.setpage { z-index: 60; background: var(--wx-bg-page); }
.setpage .nav { background: var(--wx-bg-nav); }
.set-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: 34px; }

/* 成员宫格（微信群设置首屏） */
.member-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px 0;
  padding: 18px 14px; background: var(--wx-bg-card);
}
.mg-item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 0; cursor: pointer; }
.mg-x {
  position: absolute; left: calc(50% - 28px); top: -6px; z-index: 1;
  width: 18px; height: 18px; border-radius: 50%; background: #fa5151; color: #fff;
  font-style: normal; font-size: 14px; line-height: 16px; text-align: center;
}
.mg-item:active { opacity: .72; }
.mg-item .av {
  width: 52px; height: 52px; border-radius: 6px; background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 20px; font-weight: 500;
}
.mg-item .nm {
  font-size: 12px; color: var(--wx-text-sub); max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mg-more { display: flex; align-items: center; justify-content: center; font-size: 22px; color: #c8c8c8; }

/* 设置分组与行 */
.set-group { background: var(--wx-bg-card); margin-top: 10px; }
.set-cell {
  display: flex; align-items: center; min-height: 55px; padding: 0 16px;
  position: relative; cursor: pointer; font-size: 17px;
}
.set-cell + .set-cell::before {
  content: ''; position: absolute; top: 0; left: 16px; right: 0; height: 1px;
  transform: scaleY(.5); background: var(--wx-line);
}
.set-cell:active { background: var(--wx-pressed); }
.set-cell .k { flex-shrink: 0; color: var(--wx-text); }
.set-cell .v {
  flex: 1; text-align: right; color: var(--wx-text-sub); font-size: 15px; margin-left: 12px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.set-cell .v.wrap { white-space: normal; line-height: 1.6; font-size: 14px; }
.set-cell .arrow { color: #c8c8c8; font-size: 17px; margin-left: 6px; flex-shrink: 0; }

/* iOS 风格开关 */
.switch {
  position: relative; width: 51px; height: 31px; border-radius: 16px; background: #e5e5e5;
  transition: background .22s var(--wx-ease); flex-shrink: 0; cursor: pointer;
}
.switch::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .16);
  transition: left .22s var(--wx-ease);
}
.switch.on { background: var(--wx-green); }
.switch.on::after { left: 22px; }

/* 群公告展示块 */
.set-announce {
  background: var(--wx-bg-card); margin-top: 10px; padding: 14px 16px;
  font-size: 15px; line-height: 1.7; white-space: pre-wrap; color: var(--wx-text);
  word-break: break-word;
}

/* 折叠群聊入口（会话列表底部一行） */
.fold-entry .av { background: #b9b9b9; }

/* 消息 */
.msg { display: flex; margin-bottom: 16px; gap: 10px; position: relative; }
.msg .avatar {
  width: var(--wx-av-msg); height: var(--wx-av-msg); border-radius: var(--wx-radius-av);
  flex-shrink: 0; background: #c9c9c9; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 500;
  background-size: cover; background-position: center;
  cursor: pointer; transition: opacity .12s;
}
.msg .avatar:active { opacity: .7; }
.msg .body { max-width: 70%; position: relative; }
.msg .sender { font-size: 12px; color: var(--wx-text-sub); margin-bottom: 4px; padding-left: 2px; }
.bubble {
  padding: 10px 12px; border-radius: 5px; background: var(--wx-bubble-other);
  font-size: 17px; line-height: 1.42; word-break: break-word; white-space: pre-wrap;
  position: relative; min-height: 40px; display: flex; align-items: center;
  transition: background-color .1s;
  cursor: default; -webkit-user-select: none; user-select: none;
}
.bubble::before {
  content: ""; position: absolute; left: -5.5px; top: 12px; width: 0; height: 0;
  border-top: 5.5px solid transparent; border-bottom: 5.5px solid transparent;
  border-right: 6px solid var(--wx-bubble-other);
}
.msg.me { flex-direction: row-reverse; }
.msg.me .body { display: flex; flex-direction: column; align-items: flex-end; }
.msg.me .sender { text-align: right; padding-right: 2px; padding-left: 0; }
.msg.me .bubble { background: var(--wx-bubble-me); }
.msg.me .bubble:active { background: var(--wx-bubble-me-active); }
.msg.me .bubble::before { left: auto; right: -5.5px; border-right: none; border-left: 6px solid var(--wx-bubble-me); }
.msg .bubble:active { background: #f2f2f2; }

/* 消息入场 */
@keyframes msgIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.msg.anim { animation: msgIn .26s var(--wx-ease-out) both; }

/* 系统 / 机器人 / 报表 消息 */
.msg.sys { justify-content: center; margin-bottom: 16px; }
.msg.sys .avatar { display: none; }
.msg.sys .body { max-width: 88%; }
.msg.sys .bubble {
  background: rgba(0, 0, 0, .055); color: var(--wx-text-sub); font-size: 13px;
  text-align: center; border-radius: 4px; min-height: 0; padding: 5px 11px; line-height: 1.5;
}
.msg.sys .bubble::before { display: none; }
.msg.bot .avatar { background: var(--wx-green); font-size: 18px; }
.msg.bot .bubble { background: #fff; }
/* 机器人消息整体作为单个 flex item，内联上色标签不打乱原排版 */
.bubble > .bot-line { white-space: pre-wrap; }
/* 开奖「左 / 右」强调：左=红，右=蓝，只加粗上色，不改字号以免行高错位 */
.draw-left { color: #e60000; font-weight: 800; }
.draw-right { color: #1a6dff; font-weight: 800; }
.msg.verify .avatar { background: var(--wx-orange); }
.msg.verify .bubble { background: #fff8ee; }
.msg.report .avatar { background: var(--wx-blue); }
.msg.report .bubble {
  background: #f0f9ff; font-family: "SF Mono", "Consolas", "Menlo", monospace;
  font-size: 13.5px; line-height: 1.65;
}
.msg.praise .avatar { background: #ffb400; }
.msg.praise .bubble { background: #fffbe6; font-weight: 700; }
.msg.praise.p0 .bubble { background: linear-gradient(90deg,#fff4d2,#ffe08a); color: #8a5a00; box-shadow: 0 0 0 1px #f5c451, 0 8px 18px rgba(245,180,40,.35); animation: praisePop .45s ease; }
.msg.praise.p1 .bubble { background: linear-gradient(90deg,#ffe8e4,#ffb4c8); color: #9c1d45; box-shadow: 0 0 0 1px #f3a0b5, 0 8px 18px rgba(220,60,100,.28); animation: praisePop .45s ease; }
.msg.praise.p2 .bubble { background: linear-gradient(90deg,#ece4ff,#c9b6ff); color: #4b2a9a; box-shadow: 0 0 0 1px #b9a4f5, 0 8px 18px rgba(90,60,200,.28); animation: praisePop .45s ease; }
.msg.praise.p3 .bubble { background: linear-gradient(90deg,#e5fff4,#9cf0c8); color: #0d6b45; box-shadow: 0 0 0 1px #7ad7ae, 0 8px 18px rgba(20,160,100,.25); animation: praisePop .45s ease; }
.msg.praise.p4 .bubble { background: linear-gradient(90deg,#e7f3ff,#9ecbff); color: #0d4f93; box-shadow: 0 0 0 1px #8eb6ef, 0 8px 18px rgba(30,100,200,.25); animation: praisePop .45s ease; }
.msg.praise.p5 .bubble { background: linear-gradient(90deg,#fff0e4,#ffc08a); color: #8a3b00; box-shadow: 0 0 0 1px #f0b27a, 0 8px 18px rgba(220,110,20,.28); animation: praisePop .45s ease; }
@keyframes praisePop { 0% { transform: scale(.86); } 60% { transform: scale(1.04); } 100% { transform: scale(1); } }
.gav { width: 48px; height: 48px; border-radius: 6px; background: #d8d8d8; display: grid; gap: 1px; overflow: hidden; padding: 1px; flex-shrink: 0; }
.gav i { background: #9aa0a6 center/cover no-repeat; color: #fff; font-style: normal; font-size: 11px; display: flex; align-items: center; justify-content: center; }
.gav.n1 { grid-template: 1fr / 1fr; }
.gav.n2 { grid-template: 1fr / 1fr 1fr; }
.gav.n3 { grid-template: 1fr 1fr / 1fr 1fr; }
.gav.n3 i:first-child { grid-column: 1 / span 2; }
.gav.n4 { grid-template: 1fr 1fr / 1fr 1fr; }
.gav.n5, .gav.n6, .gav.n7, .gav.n8, .gav.n9 { grid-template: 1fr 1fr 1fr / 1fr 1fr 1fr; }
.tool.num-l { color: #e64340; border-color: #f3b4b2; }
.tool.num-r { color: #2f6bff; border-color: #b9ccff; }
.tool.num-l.picked, .tool.num-r.picked { color: #fff; }
.tool.num-l.picked { background: #e64340; border-color: #e64340; }
.tool.num-r.picked { background: #2f6bff; border-color: #2f6bff; }
.tag-bot { display: inline-block; margin-left: 6px; padding: 0 4px; border-radius: 3px; font-size: 10px; color: #b26a00; background: #fff4d6; vertical-align: 1px; }
.msg.private .bubble { border: 1px dashed rgba(7, 193, 96, .5); }
.tag-lock {
  display: inline-flex; align-items: center; gap: 3px; font-size: 10px; color: var(--wx-orange);
  background: #fff4e5; border-radius: 3px; padding: 1px 5px; margin-bottom: 4px;
}
.bubble .muted { color: var(--wx-text-3); font-style: italic; font-size: 15px; }

/* 日期分隔 */
.day-sep { text-align: center; margin: 12px 0 8px; }
.day-sep span { color: #b2b2b2; font-size: 12px; background: none; padding: 0; letter-spacing: .2px; }

/* ============================================================
   长按菜单（微信式气泡菜单）
   ============================================================ */
.ctx-menu {
  position: fixed; z-index: 9600; display: none;
  background: rgba(45, 45, 45, .96); border-radius: 8px; overflow: hidden;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .28);
  transform-origin: 50% 100%;
}
.ctx-menu.show { display: flex; animation: ctxIn .18s var(--wx-ease-out) both; }
@keyframes ctxIn { from { opacity: 0; transform: scale(.82); } to { opacity: 1; transform: scale(1); } }
.ctx-menu button {
  color: #fff; font-size: 15px; padding: 11px 18px; white-space: nowrap;
  display: flex; align-items: center; gap: 6px; transition: background .1s;
}
.ctx-menu button:active { background: rgba(255, 255, 255, .14); }
.ctx-menu button + button { border-left: .5px solid rgba(255, 255, 255, .18); }

/* ============================================================
   下拉刷新
   ============================================================ */
.ptr {
  position: absolute; left: 0; right: 0; top: 0; height: 60px;
  display: flex; align-items: center; justify-content: center;
  color: var(--wx-text-3); font-size: 13px;
  opacity: 0; pointer-events: none; z-index: 1;
}
.ptr.show { opacity: 1; }
.ptr .spin {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid #d5d5d5; border-top-color: var(--wx-green);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   输入区
   ============================================================ */
.chat-input {
  background: var(--wx-bg-input); border-top: .5px solid var(--wx-line-nav);
  flex-shrink: 0; padding-bottom: env(safe-area-inset-bottom);
  transition: background .15s;
}
.toolbar { display: flex; align-items: center; gap: 6px; padding: 8px 12px 0; flex-wrap: wrap; }
.tool {
  border: .5px solid #dedede; background: #fff; border-radius: 6px; height: 38px; padding: 0 10px;
  font-size: 15px; color: var(--wx-text); display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  transition: background .12s, color .12s, border-color .12s, transform .1s;
}
#numDraw .tool { flex: 1 1 0; min-width: 0; padding: 0; }
.toolbar.bet-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; padding-bottom: 2px; }
.bet-grid .tool, .bet-grid .input-sm { width: 100%; min-width: 0; padding: 0 4px; }
.bet-grid .input-sm { text-align: center; }
.bet-grid.no-hole .bet-hole { display: none; }
.tool.side-l { color: #e64340; border-color: #f3b4b2; font-weight: 600; }
.tool.side-r { color: #2f6bff; border-color: #b9ccff; font-weight: 600; }
.bet-grid .tool.side-l.picked { background: #e64340; border-color: #e64340; color: #fff; }
.bet-grid .tool.side-r.picked { background: #2f6bff; border-color: #2f6bff; color: #fff; }
.tool.bet-hole { font-weight: 600; white-space: nowrap; }
.tool.bet-hole .odd { font-weight: 400; font-size: 13px; color: var(--wx-text-3); }
.tool.bet-hole.picked { background: #07c160; border-color: #07c160; color: #fff; }
.tool.bet-hole.picked .odd { color: #fff; }
.tool:active { transform: scale(.96); background: #f2f2f2; }
.tool.primary { background: var(--wx-green); border-color: var(--wx-green); color: #fff; }
.tool.primary:active { background: var(--wx-green-active); }
.tool.bet-btn.picked { background: var(--wx-green); border-color: var(--wx-green); color: #fff; }
.toolbar .spacer { flex: 1; }
.toolbar .hint { font-size: 12px; color: var(--wx-text-3); padding: 0 2px; }
.input-row { display: flex; align-items: flex-end; gap: 8px; padding: 7px 10px 9px; }
.input-row .tool2 {
  width: 32px; height: 34px; color: var(--wx-text); display: flex;
  align-items: center; justify-content: center; flex-shrink: 0; transition: opacity .12s;
}
.input-row .tool2 svg { width: 26px; height: 26px; }
.input-row .tool2:active { opacity: .55; }
.input-row textarea {
  flex: 1; min-height: 36px; max-height: 120px; resize: none; border: none; border-radius: 4px;
  background: #fff; padding: 7px 10px; font-size: 17px; line-height: 1.35; outline: none;
}
.send-btn {
  height: 32px; padding: 0 15px; border-radius: 4px; background: var(--wx-green);
  color: #fff; font-size: 15px; flex-shrink: 0; margin-bottom: 2px;
  transition: background .12s, transform .1s, opacity .12s;
}
.send-btn:active { background: var(--wx-green-active); transform: scale(.96); }
.send-btn:disabled { background: #dcdcdc; color: #f5f5f5; cursor: not-allowed; }

/* ============================================================
   @ 提及面板（管理在群聊 @玩家）/ 走势图消息 / 总清空按钮
   ============================================================ */
.chat-input { position: relative; }
.tool.danger { color: #fa5151; border-color: #ffd8d8; }
.tool.danger:active { background: #fff0f0; }
.tool.draw-l { color: #d03030; border-color: #ffd8d8; font-weight: 600; }
.tool.draw-r { color: #2f55c8; border-color: #d9e2ff; font-weight: 600; }
.tool.draw-h { color: #333; border-color: #ddd; font-weight: 600; }
.tool.draw-l.picked { background: #e64340; border-color: #e64340; color: #fff; }
.tool.draw-r.picked { background: #2f6bff; border-color: #2f6bff; color: #fff; }
.tool.draw-h.picked { background: #07c160; border-color: #07c160; color: #fff; }
#btnDoDraw:disabled { opacity: 0.45; }
.tool.score-up { color: #07c160; border-color: #b7eccb; font-weight: 600; }
.tool.score-down { color: #fa5151; border-color: #ffd8d8; font-weight: 600; }
#controlBar #scoreAmt { width: 88px; height: 30px; }
#barToggle {
  position: absolute; top: -38px; right: 12px; width: 60px; height: 30px;
  border-radius: 15px; background: #fff; border: .5px solid var(--wx-line-nav);
  display: none; align-items: center; justify-content: center;
  font-size: 17px; line-height: 1; color: #888; z-index: 12;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .14);
}
#barToggle:active { background: #f2f2f2; }

/* 表情面板展开时，收起开奖区/下注区/折叠按钮，腾位置给表情；关闭后恢复各自原状态 */
#inputArea.emoji-open #controlBar,
#inputArea.emoji-open #numDraw,
#inputArea.emoji-open #betBar,
#inputArea.emoji-open #barToggle { display: none !important; }

.at-panel {
  position: absolute; left: 0; right: 0; bottom: 0; top: auto;
  background: #fff; border-top: 1px solid #d0d0d0;
  max-height: 62vh; display: flex; flex-direction: column;
  box-shadow: 0 -10px 28px rgba(0, 0, 0, .22); z-index: 60;
}
.at-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px 8px; font-size: 13px; color: var(--wx-text-3);
  background: #fff; border-bottom: .5px solid #ededed;
}
.at-head .at-close { color: #576b95; font-size: 14px; padding: 2px 8px; }
.at-head .at-close:active { opacity: .6; }
.at-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px)); background: #fff; }
.at-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #fff; transition: background .12s; }
.at-item:active { background: #f0f0f0; }
.at-item .av {
  width: 36px; height: 36px; border-radius: 4px; flex-shrink: 0; color: #fff; font-size: 15px;
  font-weight: 500; display: flex; align-items: center; justify-content: center;
  background: #c9c9c9; background-size: cover; background-position: center;
}
.at-nm { font-size: 15px; color: var(--wx-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.msg .avatar.at-able { cursor: pointer; }
.msg .avatar.at-able:active { opacity: .6; }

.bubble.trend-bubble { padding: 4px; background: #fff; }
.bubble.trend-bubble::before { border-right-color: #fff; }
.trend-img { display: block; width: auto; height: auto; max-width: 224px; max-height: 288px; border-radius: 4px; }
.bubble.stamp-bubble {
  background: transparent; padding: 0; min-height: 0; box-shadow: none;
}
.bubble.stamp-bubble::before { display: none; }
.stamp-img {
  display: block; width: 96px; height: 96px; object-fit: cover; border-radius: 14px;
  animation: stampPop .42s cubic-bezier(.2,1.35,.36,1) both, stampFloat 2.6s ease-in-out .42s infinite;
}
@keyframes stampPop {
  from { opacity: 0; transform: scale(.45) rotate(-10deg); }
  to { opacity: 1; transform: none; }
}
@keyframes stampFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
.profile-gate {
  position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.45);
  display: flex; align-items: flex-end; justify-content: center;
}
.pg-card {
  width: min(440px, 100%); max-height: 92vh; overflow: auto;
  background: #fff; border-radius: 16px 16px 0 0; padding: 18px 16px 24px;
}
.pg-title { font-size: 18px; font-weight: 600; margin-bottom: 12px; }
.pg-preview {
  width: 72px; height: 72px; border-radius: 10px; margin: 0 auto 12px;
  background: #eee center/cover no-repeat;
}
.flag-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.flag-item {
  width: 100%; aspect-ratio: 1; border-radius: 8px; border: 2px solid transparent;
  background: #f3f3f3 center/cover no-repeat; padding: 0; cursor: pointer;
}
.flag-item.on { border-color: #07c160; }
.pg-upload {
  display: block; margin: 14px 0; text-align: center; color: #576b95; font-size: 15px;
}
.pg-upload input { display: none; }
.pg-save { width: 100%; height: 44px; }
.trend-view { display: flex; justify-content: center; }
.trend-view img { max-width: 100%; max-height: 68vh; }
.input-sm {
  height: 38px; width: 80px; border: .5px solid #dedede; border-radius: 6px;
  padding: 0 9px; font-size: 15px; outline: none; background: #fff;
}
.input-sm:focus { border-color: var(--wx-green); }

/* 表情面板 */
.emoji-panel {
  display: none; flex-direction: column; background: var(--wx-bg-input);
  border-top: .5px solid var(--wx-line); max-height: 250px;
}
.emoji-panel.show { display: flex; }
.emo-tabs { display: flex; gap: 4px; padding: 6px 8px 0; overflow-x: auto; }
.emo-tab { border: none; background: transparent; font-size: 13px; color: #888; padding: 4px 8px; border-radius: 12px; white-space: nowrap; }
.emo-tab.on { background: #fff; color: #222; }
.emo-grid { display: grid; grid-template-columns: repeat(8, 1fr); overflow: auto; padding: 6px 8px 10px; }
.emo-grid span { font-size: 26px; text-align: center; cursor: pointer; padding: 4px 0; border-radius: 5px; }
.emo-grid span:active { background: rgba(0, 0, 0, .07); }
.plus-panel { display: none; background: #f7f7f7; border-top: .5px solid var(--wx-line); padding: 20px 8px 14px; }
.plus-panel.show { display: grid; grid-template-columns: repeat(4, 1fr); row-gap: 18px; }
.plus-item {
  width: auto; height: auto; border: 0; background: none; padding: 0;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  font-size: 12px; color: #666; cursor: pointer;
}
.plus-item i {
  width: 58px; height: 58px; border-radius: 14px; background: #fff;
  display: flex; align-items: center; justify-content: center;
}
.plus-item svg { width: 28px; height: 28px; stroke: #181818; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.plus-item:active i { background: #f0f0f0; }

.wx-search {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px 8px; background: var(--wx-bg-nav);
}
.wx-search-box {
  flex: 1; display: flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 10px; border-radius: 6px; background: #fff;
}
.wx-search-box svg { width: 16px; height: 16px; color: #b2b2b2; flex-shrink: 0; }
.wx-search-box input {
  flex: 1; border: 0; outline: 0; background: transparent; font-size: 16px; color: var(--wx-text);
  min-width: 0;
}
.wx-search-box input::placeholder { color: #b2b2b2; }
.wx-search-cancel {
  display: none; border: 0; background: none; color: #576b95; font-size: 16px; padding: 0 4px; cursor: pointer;
}
.wx-search.on .wx-search-cancel { display: block; }
.cell.pinned { background: #ededed; }
.mute-bell { width: 14px; height: 14px; color: #b2b2b2; display: block; }
.mute-bell svg { width: 14px; height: 14px; display: block; }
.d-bead {
  min-width: 36px; height: 28px; padding: 0 4px; border-radius: 14px; color: #fff; font-size: 11px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.cell-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #fa5151; flex-shrink: 0;
}
.me-tools { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.me-qr {
  width: 22px; height: 22px; color: #191919; display: flex; align-items: center; justify-content: center;
}
.me-qr svg { width: 20px; height: 20px; }
.qr-card { text-align: center; padding: 8px 8px 4px; }
.qr-card .av { width: 56px; height: 56px; border-radius: 6px; margin: 0 auto 10px; }
.qr-card .nm { font-size: 18px; font-weight: 600; }
.qr-card .no { font-size: 13px; color: #888; margin: 6px 0 14px; }
.qr-card .qr { display: inline-block; background: #fff; padding: 8px; }
.sub .at-me { color: #fa5151; margin-right: 4px; }
.hit { color: #07c160; }
.msg.at-flash .bubble { animation: atFlash 1.4s ease; }
@keyframes atFlash {
  0% { box-shadow: 0 0 0 2px #fa5151; }
  100% { box-shadow: 0 0 0 0 rgba(250, 81, 81, 0); }
}

.nav-menu {
  display: none; position: absolute; right: 8px; top: 46px; z-index: 30;
  min-width: 148px; background: #4c4c4c; color: #fff; border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,.2); padding: 4px 0;
}
.nav-menu.show { display: block; }
.nav-menu:before {
  content: ""; position: absolute; right: 14px; top: -6px;
  border: 6px solid transparent; border-bottom-color: #4c4c4c; border-top: 0;
}
.nav-menu button {
  display: block; width: 100%; background: none; border: 0; color: #fff;
  font-size: 16px; text-align: left; padding: 12px 18px;
}
.nav-menu button + button { border-top: .5px solid rgba(255,255,255,.12); }

.cell-swipe { position: relative; overflow: hidden; background: #fa5151; }
.cell-swipe .cell { position: relative; z-index: 1; background: #fff; transition: transform .15s; }
.cell-swipe.open .cell { transform: translateX(-72px); }
.cell-del {
  position: absolute; right: 0; top: 0; bottom: 0; width: 72px; border: 0;
  background: #fa5151; color: #fff; font-size: 15px;
}

.scan-page {
  display: none; position: fixed; inset: 0; z-index: 80; background: #000;
  flex-direction: column;
}
.scan-page .nav { background: #111; color: #fff; border-bottom: 0; }
.scan-page .nav-title, .scan-page .nav-back { color: #fff; }
.scan-page video { flex: 1; width: 100%; object-fit: cover; background: #000; }
.scan-frame {
  position: absolute; left: 50%; top: 46%; width: 220px; height: 220px;
  transform: translate(-50%, -50%); border: 2px solid rgba(7,193,96,.9);
  border-radius: 8px; box-shadow: 0 0 0 2000px rgba(0,0,0,.35);
}
.scan-tip { position: absolute; left: 0; right: 0; bottom: 72px; text-align: center; color: #fff; font-size: 14px; }
#page-contacts { position: absolute; }
.alpha-bar {
  position: absolute; right: 1px; top: 96px; bottom: 16px; z-index: 5;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 18px; user-select: none; touch-action: none;
}
.alpha-bar span {
  font-size: 10px; line-height: 1.15; color: #555; font-weight: 600; padding: 1px 0; cursor: pointer;
}
.alpha-tip {
  display: none; position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%);
  width: 64px; height: 64px; border-radius: 8px; background: rgba(0, 0, 0, .55); color: #fff;
  font-size: 28px; font-weight: 600; align-items: center; justify-content: center; z-index: 6;
}
.alpha-tip.show { display: flex; }
.bubble.img-bubble { padding: 0; background: transparent; min-height: 0; box-shadow: none; }
.bubble.img-bubble::before { display: none; }
.chat-img { display: block; max-width: 180px; max-height: 220px; border-radius: 6px; object-fit: cover; }
.recall-pop {
  position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%);
  background: #4c4c4c; color: #fff; border: none; border-radius: 4px; padding: 6px 12px; font-size: 14px; z-index: 3; white-space: nowrap;
}
.sheet-wrap { overflow: auto; }
.sheet { border-collapse: collapse; font-size: 12px; min-width: 100%; background: #fff; }
.sheet th { background: #4682b4; color: #fff; font-weight: 600; padding: 6px 8px; white-space: nowrap; text-align: center; }
.sheet td { padding: 5px 8px; text-align: center; border-bottom: 1px solid #e6eef5; white-space: nowrap; }
.sheet tr:nth-child(even) td { background: #f7fbff; }
.sheet tr.total td { background: #f0f8f8; font-weight: 600; }
.sheet td.neg { color: #d03030; }
.sheet td.pos { color: #0b8f4d; }
.book-tools { display: flex; gap: 8px; margin-bottom: 10px; }
.book-tools button { flex: 1; height: 32px; border-radius: 4px; border: 1px solid #d9d9d9; background: #fff; }
.book-tools button.on { background: #4682b4; color: #fff; border-color: #4682b4; }
@keyframes panelUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* 语音录制条 */
.voice-bar { display: none; align-items: center; gap: 10px; padding: 7px 10px 9px; }
.voice-bar.show { display: flex; animation: panelUp .2s var(--wx-ease-out) both; }
.voice-rec {
  flex: 1; height: 38px; border-radius: 4px; background: #fff; display: flex; align-items: center;
  gap: 10px; padding: 0 12px; color: var(--wx-text-sub); font-size: 13px;
}
.voice-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--wx-red); animation: pulse 1s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .3; transform: scale(.8); } }
.voice-waves { display: flex; gap: 3px; align-items: center; height: 20px; }
.voice-waves i { width: 3px; background: var(--wx-green); border-radius: 2px; animation: wave .9s infinite ease-in-out; }
.voice-waves i:nth-child(1) { animation-delay: 0s } .voice-waves i:nth-child(2) { animation-delay: .1s }
.voice-waves i:nth-child(3) { animation-delay: .2s } .voice-waves i:nth-child(4) { animation-delay: .3s }
.voice-waves i:nth-child(5) { animation-delay: .4s } .voice-waves i:nth-child(6) { animation-delay: .5s }
@keyframes wave { 0%, 100% { height: 6px } 50% { height: 18px } }
.voice-time { font-variant-numeric: tabular-nums; min-width: 40px; text-align: right; }
.voice-bar .vb { height: 38px; padding: 0 16px; border-radius: 4px; font-size: 15px; transition: transform .1s, background .12s; }
.voice-bar .vb:active { transform: scale(.96); }
.vb-cancel { background: #fff; color: var(--wx-text); }
.vb-send { background: var(--wx-green); color: #fff; }

/* 语音气泡 */
.bubble.voice { display: flex; align-items: center; gap: 8px; min-width: 90px; cursor: pointer; }
.bubble.voice .wave-ico { display: inline-flex; align-items: center; gap: 2px; }
.bubble.voice .wave-ico i { width: 2px; height: 9px; background: currentColor; opacity: .5; border-radius: 1px; }
.bubble.voice.playing .wave-ico i { animation: voicePlay .6s infinite ease-in-out; }
.bubble.voice.playing .wave-ico i:nth-child(2) { animation-delay: .15s }
.bubble.voice.playing .wave-ico i:nth-child(3) { animation-delay: .3s }
@keyframes voicePlay { 0%, 100% { height: 5px } 50% { height: 14px } }

/* ============================================================
   Toast（微信：屏幕中央黑底圆角）
   ============================================================ */
.toast {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.92);
  z-index: 9999; background: rgba(0, 0, 0, .72); color: #fff;
  padding: 12px 20px; border-radius: 8px; font-size: 15px; line-height: 1.45;
  opacity: 0; transition: opacity .2s, transform .2s var(--wx-ease-out);
  pointer-events: none; max-width: 66vw; text-align: center; word-break: break-word;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* ============================================================
   弹窗（微信：中心缩放弹出）
   ============================================================ */
.modal-mask {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 9000;
  display: none; align-items: center; justify-content: center; padding: 18px;
}
.modal-mask.show { display: flex; animation: maskIn .2s ease both; }
@keyframes maskIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: #fff; border-radius: 12px; width: 400px; max-width: 100%; max-height: 86vh;
  display: flex; flex-direction: column; overflow: hidden;
  animation: modalIn .26s var(--wx-ease-out) both;
}
@keyframes modalIn { from { opacity: 0; transform: scale(1.14); } to { opacity: 1; transform: scale(1); } }
.modal.wide { width: 900px; }
.modal-h {
  padding: 16px 18px 12px; font-weight: 600; font-size: 17px; display: flex; align-items: center;
}
.modal-h span { flex: 1; }
.modal-b { padding: 4px 18px 16px; overflow-y: auto; flex: 1; }
.modal-f { padding: 12px 18px 16px; display: flex; justify-content: flex-end; gap: 10px; }
.icon-btn {
  width: 30px; height: 30px; border-radius: 6px; color: var(--wx-text-3); font-size: 15px;
  display: flex; align-items: center; justify-content: center; transition: background .12s;
}
.icon-btn:active { background: #f0f0f0; }
.form-row { margin-bottom: 13px; }
.form-row label { display: block; font-size: 13px; color: var(--wx-text-sub); margin-bottom: 6px; }
.form-row input, .form-row select {
  width: 100%; height: 40px; border: none; border-bottom: 1px solid #e8e8e8; border-radius: 0;
  padding: 0 2px; font-size: 16px; outline: none; background: transparent;
  transition: border-color .2s;
}
.form-row input:focus, .form-row select:focus { border-bottom-color: var(--wx-green); }
.btn {
  height: 40px; padding: 0 20px; border-radius: 6px; background: var(--wx-green);
  color: #fff; font-size: 15px; font-weight: 500;
  transition: background .12s, transform .1s;
}
.btn:active { background: var(--wx-green-active); transform: scale(.97); }
.btn-ghost { background: #f2f2f2; color: var(--wx-text); }
.btn-ghost:active { background: #e8e8e8; }
.btn.danger { background: var(--wx-red); }
.btn:disabled { opacity: .6; cursor: not-allowed; }

/* 资料卡 */
.profile-card { display: flex; align-items: center; gap: 14px; padding: 6px 0 16px; border-bottom: .5px solid var(--wx-line); margin-bottom: 6px; }
.profile-card .av {
  width: 60px; height: 60px; border-radius: 6px; background: var(--wx-green); color: #fff; font-size: 24px;
  display: flex; align-items: center; justify-content: center; background-size: cover; background-position: center;
}
.profile-card .nm { font-size: 19px; font-weight: 600; }
.profile-card .no { font-size: 13px; color: var(--wx-text-sub); margin-top: 5px; }
.pf-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; font-size: 15px; border-bottom: .5px solid #f5f5f5; }
.pf-row .k { color: var(--wx-text-sub); }
.pf-row .v { font-weight: 500; }
.req-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: .5px solid #f5f5f5; }
.req-item:last-child { border-bottom: none; }
.req-item .av {
  width: 44px; height: 44px; border-radius: 4px; background: #c9c9c9; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 17px;
  background-size: cover; background-position: center; flex-shrink: 0;
}
.req-item .meta { flex: 1; min-width: 0; }
.req-item .nm { font-size: 16px; }
.req-item .sub { font-size: 13px; color: var(--wx-text-sub); margin-top: 2px; }

/* 表格 */
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th, table.tbl td { padding: 8px 10px; text-align: left; border-bottom: 1px solid #f0f2f5; white-space: nowrap; }
table.tbl th { color: #64748b; font-weight: 500; font-size: 12px; background: #fafbfc; position: sticky; top: 0; }
table.tbl tr:hover td { background: #fafbfc; }
.tag { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 10px; }
.tag.on { background: #e6f7ee; color: var(--wx-green); }
.tag.off { background: #f1f5f9; color: #64748b; }
.tag.warn { background: #fff2e5; color: var(--wx-orange); }
.tag.danger { background: #ffe9e9; color: var(--wx-red); }
.tag-admin {
  display: inline-block; margin-left: 6px; font-size: 10px; line-height: 1;
  padding: 2px 5px; border-radius: 3px; background: #e8f4ff; color: #10aeff; vertical-align: 1px;
}
.btn-sm {
  height: 28px; padding: 0 12px; border-radius: 5px; border: .5px solid #dbe1e8; background: #fff;
  font-size: 13px; color: #334155; transition: background .12s, transform .1s;
}
.btn-sm:active { transform: scale(.96); background: #f5f7fa; }
.btn-sm.primary { background: var(--wx-green); border-color: var(--wx-green); color: #fff; }
.btn-sm.danger { color: var(--wx-red); border-color: #ffd9d9; }
.row-flex { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.kv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px 20px; }
.kv-grid .kv { display: flex; justify-content: space-between; font-size: 13px; padding: 6px 0; border-bottom: 1px dashed #f0f2f5; }
.kv-grid .kv .k { color: #64748b; }
.kv-grid .kv .v { font-weight: 600; }
.muted { color: var(--wx-text-3); }
.mono { font-family: "SF Mono", "Consolas", "Menlo", monospace; font-size: 12.5px; }
.scroll-y { max-height: 420px; overflow-y: auto; }
.trend-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; }
.trend-grid .bead {
  aspect-ratio: 1; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: #fff; font-weight: 600;
}
.member-line { display: flex; align-items: center; gap: 8px; padding: 7px 0; font-size: 13px; }
.member-line .av {
  width: 30px; height: 30px; border-radius: 4px; background: #c9c9c9; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 12px;
  background-size: cover; background-position: center; flex-shrink: 0;
}
.member-line .role { font-size: 10px; padding: 1px 5px; border-radius: 3px; background: #f0f0f0; color: var(--wx-text-sub); }
.member-line .role.manager { background: #e6f7ee; color: var(--wx-green); }
.member-line .role.dealer { background: #fff2e5; color: var(--wx-orange); }
.member-line .role.admin { background: #ffe9e9; color: var(--wx-red); }
.member-line .mute { color: var(--wx-red); font-size: 11px; }

/* ============================================================
   GM 后台（admin.html）
   ============================================================ */
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12px; color: var(--wx-text-sub); margin-bottom: 6px; }
.field input {
  width: 100%; height: 42px; padding: 0 12px; border: 1px solid #e2e2e2; border-radius: 6px;
  font-size: 15px; outline: none; background: #fafafa; transition: border-color .2s, background .2s;
}
.field input:focus { border-color: var(--wx-green); background: #fff; }
.pwd-toggle { position: relative; }
.pwd-toggle .eye {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  color: var(--wx-text-3); font-size: 12px; cursor: pointer; user-select: none;
}
.admin { display: flex; height: 100%; background: #f4f6f9; }
.admin-nav { width: 210px; min-width: 210px; background: #1f2937; color: #cbd5e1; display: flex; flex-direction: column; }
.admin-nav .brand { padding: 18px 20px; font-size: 16px; font-weight: 700; color: #fff; border-bottom: 1px solid #2d3748; }
.admin-nav a {
  display: flex; align-items: center; gap: 10px; padding: 12px 20px; color: #cbd5e1; text-decoration: none;
  font-size: 14px; border-left: 3px solid transparent; cursor: pointer; transition: background .15s;
}
.admin-nav a:hover { background: #263143; color: #fff; }
.admin-nav a.active { background: #263143; color: #fff; border-left-color: var(--wx-green); }
.admin-nav .foot { margin-top: auto; padding: 14px 20px; border-top: 1px solid #2d3748; font-size: 12px; }
.admin-main { flex: 1; overflow-y: auto; padding: 22px 26px; min-width: 0; }
.admin-title { font-size: 20px; font-weight: 700; margin: 0 0 18px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin-bottom: 22px; }
.card { background: #fff; border-radius: 10px; padding: 16px 18px; box-shadow: 0 1px 3px rgba(0, 0, 0, .06); border: 1px solid #eef1f5; }
.card .k { font-size: 12px; color: #64748b; margin-bottom: 8px; }
.card .v { font-size: 24px; font-weight: 700; }
.card .v.green { color: var(--wx-green); }
.card .v.red { color: var(--wx-red); }
.card .v.blue { color: var(--wx-blue); }
.panel { background: #fff; border-radius: 10px; border: 1px solid #eef1f5; box-shadow: 0 1px 3px rgba(0, 0, 0, .06); margin-bottom: 18px; overflow: hidden; }
.panel-h { padding: 14px 18px; border-bottom: 1px solid #eef1f5; display: flex; align-items: center; gap: 10px; }
.panel-h h3 { margin: 0; font-size: 15px; }
.panel-h .spacer { flex: 1; }
.panel-b { padding: 16px 18px; }
.view { display: none; }
.view.active { display: block; animation: listIn .25s ease both; }
.spacer { flex: 1; }

@media (max-width: 768px) {
  .admin-nav { width: 60px; min-width: 60px; }
  .admin-nav a span, .admin-nav .foot { display: none; }
  .admin-nav a { justify-content: center; padding: 14px 0; }
}

/* 桌面适配：壳居中 + 阴影 */
@media (min-width: 481px) {
  body { background: #cfcfcf; }
  .wx { box-shadow: 0 0 48px rgba(0, 0, 0, .22); }
}

/* 降低动效（尊重系统设置） */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
