/* ══════════════════════════════════════════
   专属恋人 · UI
   奶白打底 / 低饱和浅粉 / 大留白 / 圆角卡片
   ══════════════════════════════════════════ */
:root {
  --bg: #FDFAF7;
  --bg-2: #FBF6F2;
  --card: #FFFFFF;
  --panel: #FFFFFF;   /* 输入框/小面板的白 */
  --line: #F2EAE4;

  --pink: #FF7BA8;
  --pink-deep: #FF5C93;
  --pink-soft: #FFE8F0;
  --pink-mist: #FFF3F7;

  --blue-soft: #DCE6F5;
  --blue-mist: #EAF0FA;

  --ink: #2E2A2E;
  --ink-2: #8E8890;
  --ink-3: #BEB7BE;

  --bubble-them: #FFE4EC;
  --bubble-them-text: #3A2E33;
  --bubble-me: #DCE6F5;
  --bubble-me-text: #2E3A48;

  --r-lg: 26px;
  --r-md: 20px;
  --r-sm: 14px;

  --sh: 0 2px 14px rgba(255, 140, 175, 0.10);
  --sh-soft: 0 1px 6px rgba(255, 140, 175, 0.07);

  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --nav-h: 64px;
}

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

/* 性能：关掉不需要的 GPU 合成层 */
img, .conv-av, .card-av, .rail-av, .grow-av, .chat-avatar {
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

html, body {
  margin: 0; padding: 0;
  text-rendering: optimizeSpeed;
  -webkit-backface-visibility: hidden;
  height: 100%;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

.screen { display: none; height: 100%; flex-direction: column; }
.screen.active { display: flex; }


/* ── 启动遮罩（防闪烁）────────────────── */
.boot-mask {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .28s ease;
}
.boot-mask.gone { opacity: 0; pointer-events: none; }
.boot-mask.hide { display: none; }
.boot-inner { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.boot-heart {
  font-size: 52px; color: var(--pink-deep);
  animation: beat 1.3s ease-in-out infinite;
}
.boot-text { font-size: 15px; color: var(--pink); letter-spacing: 4px; }
@keyframes beat {
  0%, 100% { transform: scale(1); opacity: .85; }
  50% { transform: scale(1.12); opacity: 1; }
}


/* ══ 壁纸层 ═══════════════════════════ */
#wallpaper {
  position: fixed; inset: 0; z-index: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  pointer-events: none;
  opacity: 0;
  transition: opacity .5s ease;
}
#wallpaper.on { opacity: 1; }

/* 壁纸上面盖一层半透明遮罩，保证文字还能读 */
#wallpaper::after {
  content: '';
  position: absolute; inset: 0;
  background: rgba(253, 250, 247, var(--wp-dim, 0));
  backdrop-filter: blur(var(--wp-blur, 0px));
}

/* 有壁纸时，各页面背景要透出来 */
body.has-wallpaper .screen,
body.has-wallpaper .tab-panel,
body.has-wallpaper #app,
body.has-wallpaper .chat-head,
body.has-wallpaper .composer {
  background: transparent !important;
}
body.has-wallpaper .screen { position: relative; z-index: 1; }
body.has-wallpaper #app { position: relative; z-index: 1; }
body.has-wallpaper #chat { position: relative; z-index: 1; }
/* 聊天页永远是定位容器（新消息提示按钮要用绝对定位） */
#chat { position: relative; }

/* 壁纸模式下卡片半透明 */
body.has-wallpaper .conv-card,
body.has-wallpaper .grow-hero,
body.has-wallpaper .card-item,
body.has-wallpaper .me-card,
body.has-wallpaper .group-card {
  background: rgba(255, 255, 255, 0.82) !important;
  backdrop-filter: blur(8px);
}
body.has-wallpaper .tabbar {
  background: rgba(253, 250, 247, 0.9) !important;
  backdrop-filter: blur(10px);
}
body.has-wallpaper .msg.them { background: rgba(255, 228, 236, 0.9) !important; }
body.has-wallpaper .msg.me   { background: rgba(220, 230, 245, 0.9) !important; }

/* ── 登录 ─────────────────────────────── */
#login { align-items: center; justify-content: center; }
.login-box {
  width: min(340px, 86vw);
  display: flex; flex-direction: column; gap: 14px;
  padding-top: var(--safe-t);
}
.logo {
  font-size: 32px; font-weight: 700; letter-spacing: 3px;
  color: var(--pink-deep); text-align: center; margin-bottom: 4px;
}
/* ★ 2026-11-27 UI 审计：.sub 原来用 --ink-3(#BEB7BE)，压在照片背景上基本看不见。
   改成深墨色 + 一圈柔和描边阴影，照片再花也能读 */
.sub { font-size: 13px; color: #5A5158; text-align: center; margin-bottom: 18px;
  text-shadow: 0 1px 2px rgba(255,255,255,.9), 0 0 8px rgba(255,255,255,.7); }

.login-box input {
  height: 52px; border-radius: var(--r-md);
  border: 1.5px solid var(--line);
  background: var(--panel); color: var(--ink);
  padding: 0 18px; font-size: 15px;
  outline: none; transition: none;
}
/* ★ 2026-11-27 UI 审计：placeholder 原来用 --ink-3(#BEB7BE)，对白底只有 2.0:1，
   远低于 WCAG 4.5:1。换成 #6E6870（约 4.8:1），同时保留"这是提示"的弱感 */
.login-box input::placeholder { color: #6E6870; opacity: 1; }
/* 无障碍：label 视觉隐藏但读屏可见（不许只用 placeholder 当标签） */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;
  clip:rect(0,0,0,0);white-space:nowrap;border:0}
.login-box input:focus { border-color: var(--pink); box-shadow: 0 0 0 4px var(--pink-mist); }

#btn-login {
  height: 52px; border-radius: var(--r-md); border: none;
  background: linear-gradient(135deg, #FF9EC4, #FF5C93);
  color: #fff; font-size: 17px; font-weight: 600;
  box-shadow: 0 6px 18px rgba(255, 92, 147, 0.28);
  transition: none;
}
#btn-login:active { transform: scale(.97); }

.err { color: #E2564F; font-size: 13px; text-align: center; min-height: 18px; }

/* ★ 2026-11-27 UI 审计：原来是 1.5px dashed —— 虚线在 UI 里是"禁用/占位"语义，
   一个能点的下载入口不该长这样。改成实线细边 + 主色文字，图标从 📱emoji 换成 SVG */
.dl-app-link {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  margin-top: 8px; padding: 13px; min-height: 46px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--pink-soft);
  color: var(--pink-deep); text-align: center; text-decoration: none;
  font-size: 14px; font-weight: 600;
  transition: background .18s ease, border-color .18s ease;
}
.dl-app-link svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.dl-app-link:active { background: var(--pink-mist); border-color: var(--pink); }

/* ── 主应用 ───────────────────────────── */
#app { position: relative; }

.tab-panel {
  display: none;
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: calc(var(--safe-t) + 18px) 20px calc(var(--nav-h) + var(--safe-b) + 22px);
  overflow-x: clip;
  overflow-y: auto;
}
.tab-panel.active { display: block; }

.page-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 22px; padding-top: 4px;
}
.page-head h1 {
  margin: 0; font-size: 26px; font-weight: 700; letter-spacing: .5px; color: var(--ink);
}
.heart-btn {
  width: 38px; height: 38px; border-radius: 50%;
  border: none; background: transparent;
  color: var(--pink); font-size: 22px; line-height: 1;
  cursor: pointer;
}
.heart-btn:active { transform: scale(.9); }
.head-dot {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1.6px solid var(--line); display: inline-block;
}

/* ── 消息列表 ─────────────────────────── */
.conv-cards { display: flex; flex-direction: column; gap: 14px; }

.conv-card {
  display: flex; align-items: center; gap: 15px;
  min-width: 0; max-width: 100%;
  background: var(--card); border-radius: var(--r-lg);
  padding: 18px 18px; box-shadow: var(--sh);
  cursor: pointer; transition: none;
}
.conv-card:active { transform: scale(.985); }

.conv-av {
  width: 58px; height: 58px; border-radius: 50%; flex: 0 0 58px;
  will-change: auto; image-rendering: auto;
  background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 22px; font-weight: 600;
  background-color: var(--pink-soft);
}
.conv-main { flex: 1; min-width: 0; }
.conv-nm { font-size: 17px; font-weight: 600; color: var(--ink); margin-bottom: 5px; }
/* ★ 2026-11-27 UI 审计：会话预览用 --ink-3(#BEB7BE)，对白卡只有 2.0:1，读起来费劲。
   预览是"扫一眼就知道要不要点"的关键信息，必须够清楚 → #6E6870（4.8:1） */
.conv-pv {
  font-size: 13.5px; color: #6E6870; line-height: 1.45;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.conv-side {
  display: flex; flex-direction: column; align-items: flex-end;
  gap: 7px; flex: 0 0 auto; padding-top: 2px;
}
/* 时间戳：信息价值低但也不能看不见 → #8A8388（3.6:1，小字号允许） */
.conv-meta-txt { font-size: 11.5px; color: #8A8388; }
.unread-badge {
  min-width: 19px; height: 19px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--pink-deep);
  color: #fff;
  font-size: 11px; font-weight: 600;
  line-height: 19px; text-align: center;
  box-shadow: 0 1px 4px rgba(255, 92, 147, .35);
}

.empty-tip {
  padding: 60px 20px; text-align: center;
  color: var(--ink-3); font-size: 14px; line-height: 2;
}

.dl-app-bar {
  display: block; margin-top: 22px; padding: 15px 16px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, #B9C8EE, #8FA6DC);
  color: #fff; text-align: center; text-decoration: none;
  font-size: 14.5px; font-weight: 600;
  box-shadow: 0 4px 14px rgba(143, 166, 220, 0.22);
}
.dl-app-bar:active { transform: scale(.985); }

/* ── 亲密养成 ─────────────────────────── */
.grow-box { display: flex; flex-direction: column; align-items: stretch; width: 100%; }

.grow-hero {
  width: 100%; background: var(--card); border-radius: var(--r-lg);
  padding: 24px 20px 26px; box-shadow: var(--sh);
  display: flex; flex-direction: column; align-items: center;
}
.grow-av {
  width: 96px; height: 96px; border-radius: 50%;
  background-size: cover; background-position: center;
  background-color: var(--pink-soft);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 34px; font-weight: 600;
  border: 3px solid #fff; box-shadow: 0 4px 16px rgba(255, 140, 175, .18);
  margin-bottom: 12px;
}
.grow-name { font-size: 21px; font-weight: 700; color: var(--ink); margin-bottom: 22px; }

/* 环形进度 */
.ring-wrap {
  position: relative; width: 210px; height: 210px; margin-bottom: 8px;
  contain: layout paint;   /* 隔离重绘，防止整页跟着刷新 */
}
.ring {
  width: 210px; height: 210px; border-radius: 50%;
  background: conic-gradient(from 0deg, var(--pink-deep) 0deg,
              var(--pink) var(--deg, 130deg), #FBE3EC var(--deg, 130deg) 360deg);
  display: flex; align-items: center; justify-content: center;
  transition: none;
}
.ring::after {
  content: ''; position: absolute;
  width: 168px; height: 168px; border-radius: 50%;
  background: var(--card);
  box-shadow: inset 0 2px 10px rgba(255, 140, 175, .07);
}
.ring-num {
  position: relative; z-index: 2;
  font-size: 62px; font-weight: 300; color: var(--ink);
  letter-spacing: -2px; line-height: 1;
}
.ring-knob {
  position: absolute; width: 12px; height: 12px; border-radius: 50%;
  background: var(--pink); z-index: 3;
}

/* 阶段标签 */
.stage-tags {
  display: flex; gap: 26px; align-items: center; justify-content: center;
  margin: 14px 0 6px; width: 100%;
}
.stage-tag {
  font-size: 13.5px; color: var(--ink-3); padding: 5px 12px;
  border-radius: 10px;
}
.stage-tag.on {
  color: var(--pink-deep); font-weight: 600;
  background: var(--pink-mist); box-shadow: var(--sh-soft);
}
.stage-now {
  font-size: 14px; color: var(--ink-2); margin: 12px 0 24px; letter-spacing: 1px;
}

.grow-actions { display: flex; gap: 14px; width: 100%; }
.grow-btn {
  flex: 1; height: 52px; border-radius: 26px;
  border: 1.5px solid var(--line); background: var(--panel);
  color: var(--ink); font-size: 15px; font-weight: 500;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.grow-btn.primary {
  border: none; color: #fff;
  background: linear-gradient(135deg, #FF9EC4, #FF5C93);
  box-shadow: 0 5px 16px rgba(255, 92, 147, .26);
}
.grow-btn:active { transform: scale(.97); }


/* ── 养成页：角色切换条 ─────────────── */
/* 角色切换条：可横滑 + 左右箭头 */
/* 角色切换条：左箭头 + 滑动区 + 右箭头（flex 布局，箭头永远可见） */
.grow-rail-row {
  display: block;
  width: calc(100% + 40px);
  margin: 0 -20px 10px;
}

.grow-rail {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  width: 100%;
  height: 92px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 44px 4px;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  overscroll-behavior-x: contain;
}
.grow-rail::-webkit-scrollbar { display: none; }

/* 左右切换按钮：紧跟标题后面，纯流式布局，不可能跑出屏幕 */
.grow-nav {
  display: inline-flex;
  gap: 8px;
  margin-left: 12px;
}
.page-head h1 { flex: 0 0 auto; }
.rail-btn {
  width: 34px; height: 34px; border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #FF9EC4, #FF5C93);
  color: #fff;
  font-size: 21px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 0; font-weight: 700;
  box-shadow: 0 3px 10px rgba(255,92,147,.35);
}
.rail-btn:active { transform: scale(.9); }
.rail-btn:disabled { opacity: .25; box-shadow: none; }

.rail-item {
  flex: 0 0 62px; width: 62px; min-width: 62px;
  border: none; background: transparent;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 0; cursor: pointer;
  -webkit-user-select: none; user-select: none;
}
.rail-av {
  width: 54px; height: 54px; border-radius: 50%;
  background-size: cover; background-position: center;
  background-color: var(--pink-soft);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 20px; font-weight: 600;
  border: 2.5px solid transparent;
  transition: none;
}
.rail-item.on .rail-av {
  border-color: var(--pink-deep);
  transform: scale(1.06);
}
.rail-nm {
  font-size: 11px; color: var(--ink-3);
  max-width: 62px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
  line-height: 15px; height: 15px;
  display: block;
}
.rail-item.on .rail-nm { color: var(--pink-deep); font-weight: 600; }
.grow-hero-wrap { width: 100%; }

/* ── 人设卡 ───────────────────────────── */
.cards-grid {
  /* 这层只当一个普通容器：上面是搜索/排序条，下面是卡片网格 */
  display: block;
}
.card-item {
  background: var(--card); border-radius: var(--r-lg);
  padding: 22px 12px 18px; box-shadow: var(--sh);
  display: flex; flex-direction: column; align-items: center;
  cursor: pointer; transition: none;
}
.card-item:active { transform: scale(.97); }
.card-av {
  width: 84px; height: 84px; border-radius: 50%;
  background-size: cover; background-position: center;
  background-color: var(--pink-soft);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 32px; font-weight: 600;
  margin-bottom: 12px;
}
.card-nm { font-size: 15px; font-weight: 600; color: var(--ink); text-align: center; }

/* ── 我的 ─────────────────────────────── */
.me-box { display: flex; flex-direction: column; gap: 16px; }

.me-card {
  display: flex; align-items: center; gap: 15px;
  background: var(--card); border-radius: var(--r-lg);
  padding: 20px 18px; box-shadow: var(--sh);
}
.me-avatar {
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--pink-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: var(--pink-deep); font-weight: 600;
}
.me-name { font-size: 20px; font-weight: 700; color: var(--ink); margin-bottom: 3px; }
.me-sub { font-size: 13px; color: var(--ink-3); }

.group-card {
  background: var(--card); border-radius: var(--r-lg);
  padding: 20px 18px 8px; box-shadow: var(--sh);
}
.group-title { font-size: 16px; font-weight: 600; color: var(--ink); margin-bottom: 16px; }
.group-row { display: flex; justify-content: space-between; gap: 6px; }
.row-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; gap: 9px;
  font-size: 12.5px; color: var(--ink-2);
  padding: 6px 2px 16px; text-align: center; line-height: 1.4;
}
.ri-ico {
  font-size: 19px; width: 38px; height: 38px; border-radius: 50%;
  background: var(--bg-2); display: flex; align-items: center; justify-content: center;
  color: var(--ink-2);
}
.ri-ico.dot-pink { color: var(--pink); background: var(--pink-mist); }

.admin-card {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg, #FFA9CB, #FF6BA1);
  border-radius: var(--r-lg); padding: 22px 22px;
  box-shadow: 0 6px 20px rgba(255, 107, 161, .26);
  cursor: pointer;
}
.admin-card:active { transform: scale(.985); }
.admin-left { font-size: 18px; font-weight: 700; color: #fff; letter-spacing: 1px; }
.admin-btn {
  background: var(--panel); color: var(--pink-deep);
  font-size: 14px; font-weight: 600;
  padding: 11px 20px; border-radius: 22px;
}

.logout-btn {
  height: 50px; border-radius: var(--r-md);
  border: 1.5px solid var(--line); background: var(--panel);
  color: var(--ink-2); font-size: 15px; margin-top: 4px;
}
.logout-btn:active { background: var(--bg-2); }

/* ── 底部导航 ─────────────────────────── */
.tabbar {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: calc(var(--nav-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: var(--tab-bg, #FDFAF7);
  border-top: 1px solid var(--tab-line, var(--line));
  display: flex; align-items: center; justify-content: space-around;
}
.tabbar button {
  flex: 1 1 0; min-width: 0;
  height: 100%; border: none; background: transparent;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; color: var(--ink-3); font-size: 11px;
  transition: none; overflow: hidden;
}
.tabbar svg {
  width: 23px; height: 23px; flex: 0 0 auto;
  fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}
.tabbar button { color: var(--tab-idle, var(--ink-3)); position: relative; z-index: 1; }
.tabbar button.on { color: var(--tab-active, var(--pink-deep)); }
.tabbar button.on svg { stroke-width: 2; }


.chat-avatar {
  width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%;
  border: 1.5px solid var(--line);
  background-color: var(--pink-soft);
  background-size: cover; background-position: center;
  font-size: 14px; font-weight: 600; color: var(--pink-deep);
  padding: 0; cursor: pointer;
}
.chat-avatar:active { transform: scale(.92); }

/* ── 聊天 ─────────────────────────────── */
.chat-head {
  display: flex; align-items: center; gap: 10px;
  padding: calc(var(--safe-t) + 12px) 18px 12px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.back-btn {
  width: 34px; height: 34px; border: none; background: transparent;
  font-size: 26px; color: var(--ink); line-height: 1; padding: 0;
}
.chat-title-wrap {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; gap: 2px;
}
.chat-title { font-size: 17.5px; font-weight: 600; color: var(--ink); }
/* 当前参数条：贴在 header 下面，不覆盖亲密值 */
.cmd-bar{display:none;padding:7px 14px;font-size:12.5px;line-height:1.5;color:#C23F6F;
  font-weight:600;background:#FFE8F2;border-bottom:1px solid #F7CFE1;border-left:3px solid #FF5C93;
  white-space:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch}
.cmd-bar.show{display:block}
.cmd-bar b{font-weight:600;color:#C23F6F}
.cmd-bar.flash{background:#FFE4F0}
.chat-sub { font-size: 11.5px; color: var(--ink-3); }

.messages {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 18px 16px 12px;
  display: flex; flex-direction: column; gap: 12px;
  /* 别加 contain / overflow-anchor:none —— 会关掉浏览器的滚动锚定，
     上方插入历史消息时视觉位置会直接跳 */
  overflow-anchor: auto;
}

.msg-loading {
  text-align: center; padding: 40px 0;
  color: var(--ink-3); font-size: 20px; letter-spacing: 4px;
}

.msg-wrap {
  display: flex; flex-direction: column; max-width: 78%;
  /* 别加 contain —— 会影响插入时的尺寸计算，导致滚动位置漂移 */
}
.msg-wrap.them { align-self: flex-start; align-items: flex-start; }
.msg-wrap.me { align-self: flex-end; align-items: flex-end; }

.msg-who { font-size: 11px; color: var(--ink-3); margin-bottom: 4px; padding-left: 6px; }

.msg {
  padding: 11px 15px; border-radius: 18px;
  font-size: 15px; line-height: 1.55;
  word-break: break-word; white-space: pre-wrap;
}
.msg.them {
  background: var(--bubble-them); color: var(--bubble-them-text);
  border-bottom-left-radius: 6px;
}
.msg.me {
  background: var(--bubble-me); color: var(--bubble-me-text);
  border-bottom-right-radius: 6px;
}
.msg-time { font-size: 10.5px; color: var(--ink-3); margin-top: 4px; padding: 0 6px; }

.composer {
  display: flex; align-items: flex-end; gap: 8px;
  padding: 10px 14px calc(var(--safe-b) + 12px);
  background: var(--bg); border-top: 1px solid var(--line);
}
.comp-ico {
  width: 34px; height: 34px; flex: 0 0 34px;
  border: none; background: transparent;
  font-size: 19px; color: var(--ink-2); padding: 0;
}
#input {
  flex: 1; min-height: 42px; max-height: 120px;
  border-radius: 21px; border: 1.5px solid var(--line);
  background: var(--panel); padding: 11px 16px;
  font-size: 15px; line-height: 1.4; color: var(--ink);
  resize: none; outline: none; font-family: inherit;
}
#input:focus { border-color: var(--pink); box-shadow: 0 0 0 3px var(--pink-mist); }
#btn-send {
  flex: 0 0 auto; height: 42px; padding: 0 22px;
  border-radius: 21px; border: none;
  background: linear-gradient(135deg, #FF9EC4, #FF5C93);
  color: #fff; font-size: 15px; font-weight: 600;
  box-shadow: 0 4px 12px rgba(255, 92, 147, .25);
}
#btn-send:active { transform: scale(.96); }

/* 爱心装饰 */
.heart-deco {
  position: absolute; color: var(--pink-soft);
  font-size: 15px; pointer-events: none; user-select: none;
}

/* 滚动条 */
::-webkit-scrollbar { width: 0; height: 0; }

/* ══ 语音条 ═════════════════════════════ */
.voice-bubble {
  display: inline-flex; align-items: center; gap: 9px;
  margin-top: 6px; padding: 9px 14px;
  border-radius: 16px; border: none;
  font-size: 13px; cursor: pointer;
  max-width: 200px;
}
.voice-bubble.them {
  background: rgba(255, 228, 236, .95);
  color: #3A2E33;
  border-bottom-left-radius: 6px;
}
.voice-bubble.me {
  background: rgba(220, 230, 245, .95);
  color: #2E3A48;
  border-bottom-right-radius: 6px;
}
.vb-icon {
  font-size: 10px; width: 20px; height: 20px;
  border-radius: 50%; background: rgba(255,255,255,.85);
  display: flex; align-items: center; justify-content: center;
  color: var(--pink-deep);
  flex: 0 0 20px;
}
.vb-wave {
  display: flex; align-items: center; gap: 2px;
  height: 16px;
}
.vb-wave i {
  display: block; width: 2px; border-radius: 1px;
  background: currentColor; opacity: .55;
  height: 6px;
}
.vb-wave i:nth-child(1) { height: 8px; }
.vb-wave i:nth-child(2) { height: 14px; }
.vb-wave i:nth-child(3) { height: 10px; }
.vb-wave i:nth-child(4) { height: 16px; }
.vb-wave i:nth-child(5) { height: 7px; }
.voice-bubble.playing .vb-wave i {
  animation: vb 0.9s ease-in-out infinite;
}
.voice-bubble.playing .vb-wave i:nth-child(2) { animation-delay: .1s; }
.voice-bubble.playing .vb-wave i:nth-child(3) { animation-delay: .2s; }
.voice-bubble.playing .vb-wave i:nth-child(4) { animation-delay: .3s; }
.voice-bubble.playing .vb-wave i:nth-child(5) { animation-delay: .4s; }
@keyframes vb {
  0%, 100% { transform: scaleY(.5); opacity: .5; }
  50% { transform: scaleY(1.2); opacity: 1; }
}

/* ── 语音条状态（QQ/微信式）── */
.voice-bubble.playing {
  opacity: 1 !important;
}
.voice-bubble.playing::after { display: none; }

.voice-bubble.loading {
  opacity: .75;
}
.voice-bubble.loading .vb-wave i {
  animation: vb 0.9s ease-in-out infinite;
}
.voice-bubble.loading .vb-icon {
  animation: vbspin 1s linear infinite;
}
@keyframes vbspin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* 播过的：灰一点，一眼看出听过 */
.voice-bubble.played {
  opacity: .55;
}
.voice-bubble.played .vb-wave i {
  background: currentColor; opacity: .35;
}

/* 没播过的：亮着，右边一个小红点 */
.voice-bubble.unplayed {
  position: relative;
}
.voice-bubble.unplayed::after {
  content: '';
  position: absolute; top: -3px; right: -3px;
  width: 7px; height: 7px; border-radius: 50%;
  background: #e8546f;
  box-shadow: 0 0 0 2px rgba(255,255,255,.9);
}

/* 失败：红一下，2 秒后自动恢复 */
.voice-bubble.failed {
  background: rgba(255, 214, 214, .95) !important;
  animation: vbshake .28s ease-in-out 2;
}
@keyframes vbshake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}

.vb-time { font-size: 11px; opacity: .7; min-width: 22px; }

/* ══ 骨架屏（数据没回来时先占位）═════ */
.skeleton-card {
  display: flex; align-items: center; gap: 15px;
  background: var(--card); border-radius: var(--r-lg);
  padding: 18px; box-shadow: var(--sh-soft);
}
.sk-av {
  width: 58px; height: 58px; border-radius: 50%;
  background: linear-gradient(90deg, #F3ECE5 25%, #FBF6F2 50%, #F3ECE5 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  flex: 0 0 58px;
}
.sk-main { flex: 1; display: flex; flex-direction: column; gap: 9px; }
.sk-line {
  height: 13px; border-radius: 7px;
  background: linear-gradient(90deg, #F3ECE5 25%, #FBF6F2 50%, #F3ECE5 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}
.sk-line.w60 { width: 60%; }
.sk-line.w85 { width: 85%; }
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* 消息骨架 */
.sk-msg {
  height: 42px; border-radius: 18px;
  background: linear-gradient(90deg, #F6EEE8 25%, #FDFAF7 50%, #F6EEE8 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  margin-bottom: 12px;
}
.sk-msg.them { width: 62%; }
.sk-msg.me { width: 48%; margin-left: auto; }

/* ── 头像操作菜单（点头像弹出）· 2026-11-26 重做 UI ── */
.av-mask{
  position:fixed; inset:0; z-index:9999;
  background:rgba(10,8,12,.42);
  display:flex; align-items:flex-end; justify-content:center;
  padding:0 10px calc(10px + env(safe-area-inset-bottom,0px));
  animation:avfade .16s ease;
}
@keyframes avfade{ from{opacity:0} to{opacity:1} }
.av-sheet{
  width:100%; max-width:520px;
  background:var(--panel);
  border-radius:26px;
  padding:6px 8px 0;
  box-shadow:0 -10px 40px rgba(0,0,0,.3);
  animation:avup .24s cubic-bezier(.2,.8,.3,1);
}
@keyframes avup{ from{transform:translateY(30px);opacity:.5} to{transform:translateY(0);opacity:1} }
.av-grip{
  width:36px; height:4px; border-radius:99px;
  background:currentColor; opacity:.2; margin:6px auto 2px;
}
.av-item{
  display:flex; align-items:center; gap:16px;
  width:100%; border:none; background:transparent;
  padding:18px; font-size:17px; color:var(--ink,#2E2A2E);
  text-align:left; border-radius:16px; cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}
.av-item span{ width:26px; flex:0 0 26px; display:flex; align-items:center; justify-content:center; color:var(--ink-2); }
.av-item span svg{ display:block; }
.av-item:active{ background:rgba(120,100,120,.1); }
.av-cancel{
  justify-content:center; margin:8px 4px 10px;
  color:#8E8492; font-size:16.5px; font-weight:500;
  background:rgba(120,100,120,.1); border-radius:99px; padding:17px 0;
}
.av-cancel:active{ background:rgba(120,100,120,.16); }

/* ════════════════════════════════════════════
   我的页 · 奶白 + 浅粉柔光
   ════════════════════════════════════════════ */
.me-wrap{ padding:0 0 96px; }   /* 左右交给 .tab-panel 的 20px，别再缩一层 */

/* 顶部：头像 + 昵称 */
.me-top{
  display:flex; align-items:center; gap:14px;
  padding:18px 18px; margin-top:6px;
  background:var(--card); border-radius:22px;
  box-shadow:0 6px 22px var(--sh);
}
.me-ava{
  width:70px; height:70px; border-radius:50%;
  background:linear-gradient(135deg,var(--pink-soft),var(--pink));
  display:flex; align-items:center; justify-content:center;
  font-size:26px; color:var(--pink-deep); font-weight:600;
  flex:0 0 auto; overflow:hidden;
  box-shadow:0 4px 14px var(--sh);
}
.me-ava img{ width:100%; height:100%; object-fit:cover; }
.me-meta{ flex:1; min-width:0; }
.me-row1{ display:flex; align-items:center; gap:8px; }
.me-nick{
  font-size:20px; font-weight:700; color:var(--ink);
  max-width:60%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.me-edit{
  border:0; background:var(--pink-mist); color:var(--pink-deep);
  font-size:11px; padding:3px 9px; border-radius:999px;
  line-height:1.5; font-weight:600;
}
.me-sub{ font-size:12.5px; color:var(--ink-2); margin-top:4px; }

/* 数据统计四格 */
.stat-card{
  display:grid; grid-template-columns:repeat(4,1fr);
  margin-top:14px; padding:18px 8px;
  background:var(--card); border-radius:22px;
  box-shadow:0 6px 22px var(--sh);
}
.stat-cell{ text-align:center; position:relative; }
.stat-cell + .stat-cell::before{
  content:''; position:absolute; left:0; top:14%;
  width:1px; height:72%; background:var(--line);
}
.stat-num{ font-size:22px; font-weight:800; color:var(--ink); letter-spacing:-.5px; }
.stat-lbl{ font-size:11px; color:var(--ink-2); margin-top:5px; line-height:1.35; padding:0 2px; }

/* 通用分组卡片 */
.grp-card{
  margin-top:16px; background:var(--card); border-radius:22px;
  box-shadow:0 6px 22px var(--sh); overflow:hidden;
}
.grp-title{
  font-size:15px; font-weight:700; color:var(--ink);
  padding:18px 18px 10px;
}
.grp-list{ padding:0 10px 10px; }
.grp-row{
  display:flex; align-items:center; gap:10px;
  padding:14px 8px; border-radius:14px;
  transition:background .15s;
}
.grp-row:active{ background:var(--pink-mist); }
.grp-ico{ width:22px; text-align:center; font-size:15px; flex:0 0 auto; filter:grayscale(.15); }
.grp-txt{ flex:1; font-size:15.5px; color:var(--ink); }
.grp-tag{
  font-size:10.5px; color:var(--ink-3); background:var(--bg-2);
  padding:2px 8px; border-radius:999px; flex:0 0 auto;
}
.grp-arrow{ color:var(--ink-3); font-size:19px; line-height:1; flex:0 0 auto; }

/* 系统相关：独立分区 + 深色按钮 */
.sys-card{
  margin-top:16px; padding:16px 18px 18px;
  background:linear-gradient(160deg,var(--pink-mist),var(--pink-soft));
  border-radius:22px;
  box-shadow:0 6px 22px var(--sh);
}
.sys-title{ font-size:15.5px; font-weight:700; color:var(--ink); margin-bottom:13px; }
.sys-btns{ display:grid; grid-template-columns:1fr 1fr; gap:11px; }
.sys-btn{
  border:0; border-radius:16px; padding:13px 8px;
  font-size:14px; font-weight:700; line-break:strict;
  display:flex; flex-direction:column; align-items:center; gap:3px;
}
/* 两个按钮统一同色系：都是主粉，控制台靠小字区分 */
.sys-btn{
  background:linear-gradient(135deg,var(--pink),var(--pink-deep));
  color:#fff;
  box-shadow:0 5px 14px rgba(255,122,168,.28);
}
.sys-btn:active{ transform:scale(.98); }
.sys-sub{ font-size:9.5px; font-weight:500; opacity:.8; }
.sys-sub{ font-size:9.5px; font-weight:500; opacity:.82; }

/* 工具与其他：两列网格 */
.tool-grid{
  display:grid; grid-template-columns:1fr 1fr;
  gap:2px; padding:0 0 10px;
}
.tool-item{
  display:flex; align-items:flex-start; gap:9px;
  padding:13px 9px; border:0; background:transparent;
  border-radius:14px; text-align:left;
}
.tool-item:active{ background:var(--pink-mist); }
.tool-ico{ font-size:16px; flex:0 0 auto; line-height:1.4; filter:grayscale(.15); }
.tool-main{ display:flex; flex-direction:column; gap:2px; min-width:0; }
.tool-t{ font-size:14px; color:var(--ink); font-weight:600; }
.tool-s{ font-size:10.5px; color:var(--ink-3); }

/* 退出 + 页脚 */
.logout-btn{
  margin:22px auto 0; display:block; width:100%;
  border:0; background:var(--pink-mist); color:var(--pink-deep);
  font-size:14px; font-weight:600; padding:13px;
  border-radius:16px;
}
.me-foot{
  text-align:center; font-size:11px; color:var(--ink-3);
  margin:14px 0 0; letter-spacing:.5px;
}

/* ════════════════════════════════════════════
   消息页 · 我的女友们
   ════════════════════════════════════════════ */
.msg-head{
  display:flex; align-items:center; justify-content:space-between;
  padding-bottom:6px;
}
.msg-head h1{ font-size:26px; font-weight:800; letter-spacing:-.5px; }
.msg-chips{ display:flex; gap:8px; margin:-10px 0 16px; }
.msg-chip{
  border:1px solid rgba(255,255,255,.6); background:rgba(255,255,255,.66);
  -webkit-backdrop-filter:blur(10px) saturate(170%); backdrop-filter:blur(10px) saturate(170%);
  color:var(--ink);
  font-size:12.5px; font-weight:600;
  padding:7px 15px; border-radius:999px;
  box-shadow:0 2px 10px rgba(60,40,52,.10);
  transition:background .15s, color .15s, border-color .15s;
  -webkit-tap-highlight-color:transparent;
}
[data-theme="dark"] .msg-chip,[data-theme="black"] .msg-chip,[data-theme="neon"] .msg-chip,[data-theme="glass"] .msg-chip{
  background:rgba(30,26,36,.66); border-color:rgba(255,255,255,.14);
  -webkit-backdrop-filter:blur(10px) saturate(150%); backdrop-filter:blur(10px) saturate(150%);
}
.msg-chip:active{ background:var(--pink-mist); color:var(--pink-deep); border-color:var(--pink-soft); }

/* 顶部圆形图标按钮（2026-11-26 补：原来这条样式压根不存在，靠内联 font-size 硬撑） */
.msg-tools{ display:flex; align-items:center; gap:9px; }
.round-btn{
  width:40px; height:40px; flex:0 0 40px;
  border:1px solid rgba(255,255,255,.6); border-radius:50%;
  background:rgba(255,255,255,.66);
  -webkit-backdrop-filter:blur(10px) saturate(170%); backdrop-filter:blur(10px) saturate(170%);
  color:var(--ink);
  font-size:16px; line-height:1; font-weight:600;
  display:flex; align-items:center; justify-content:center;
  padding:0; box-shadow:0 3px 12px var(--sh);
  -webkit-tap-highlight-color:transparent;
  transition:transform .12s ease, background .15s ease;
}
.round-btn svg{ display:block; }
.round-btn:active{ transform:scale(.93); background:var(--pink-mist); }
[data-theme="dark"] .round-btn,[data-theme="black"] .round-btn,[data-theme="neon"] .round-btn,[data-theme="glass"] .round-btn{
  background:rgba(30,26,36,.66); border-color:rgba(255,255,255,.14);
}
.round-btn.on{
  background:linear-gradient(135deg,var(--pink),var(--pink-deep));
  color:#fff; box-shadow:0 5px 16px rgba(255,122,168,.32);
}

/* 状态标签 */
.conv-state{
  font-size:10px; font-weight:600; line-height:1;
  padding:4px 9px; border-radius:999px;
  white-space:nowrap; margin-top:5px; display:inline-block;
}
.conv-state.st-online { background:var(--pink-soft); color:var(--pink-deep); }  /* 在线 */
.conv-state.st-chat   { background:var(--pink-mist); color:var(--pink-deep); }  /* 聊天中 */
.conv-state.st-love   { background:var(--pink-soft); color:var(--pink-deep); }  /* 心动互动中 */
/* ★ 2026-11-27 UI 审计：粉底 + 粉字只有约 2.6:1，最该点的标签反而最看不清
   → 深一号的粉（#C4306A，对 #FFE8F0 约 5.6:1） */
.conv-state.st-wait   { background:var(--pink-soft); color:#C4306A; }
.conv-state.st-love   { background:var(--pink-soft); color:#C4306A; }
.conv-state.st-quiet  { background:var(--bg-2); color:var(--ink-2); }  /* 安静陪伴 */
.conv-state.st-new    { background:var(--bg-2); color:var(--ink-2); }  /* 初次见面 */

/* 会话卡片：只补柔光 + 大圆角，尺寸和字号一律用上面主定义的（别再压小） */
.conv-card{
  background:var(--card) !important;
  border-radius:22px !important;
  box-shadow:0 6px 22px var(--sh) !important;
}
.conv-av{
  box-shadow:0 3px 12px var(--sh);
}
.unread-badge{
  background:linear-gradient(135deg,var(--pink),var(--pink-deep));
  box-shadow:0 3px 10px var(--sh);
}
.unread-badge{
  margin-top:5px;
  background:linear-gradient(135deg,var(--pink),var(--pink-deep));
  box-shadow:0 3px 10px var(--sh);
}

/* 编辑资料弹层 */
.me-sheet-title{
  padding:16px 18px 12px; font-weight:700; font-size:15px;
  color:var(--ink); text-align:center;
}
.me-sheet-body{ padding:0 18px 12px; }
.me-input{
  width:100%; box-sizing:border-box;
  border:1px solid var(--line); border-radius:14px;
  padding:13px 14px; font-size:15px; color:var(--ink);
  background:var(--bg-2); outline:none;
}
.me-input:focus{ border-color:var(--pink); background:var(--panel); }
.av-item{ display:flex; align-items:center; gap:10px; }

/* 模型切换弹窗 */
.mdl-cur{
  display:flex; align-items:center; justify-content:space-between;
  font-size:13px; color:var(--ink); padding:4px 0 6px;
}
.mdl-cur b{ color:var(--pink-deep); }
.mdl-temp{ font-size:11.5px; color:var(--ink-2); }
.mdl-base{
  font-size:10.5px; color:var(--ink-3);
  word-break:break-all; padding-bottom:10px;
  border-bottom:1px solid var(--line); margin-bottom:6px;
}
.mdl-group{
  font-size:11.5px; font-weight:700; color:var(--ink-2);
  padding:12px 0 6px; letter-spacing:.3px;
}
.mdl-item{
  display:flex; align-items:center; gap:9px;
  padding:12px 12px; border-radius:13px;
  background:var(--bg-2); margin-bottom:7px;
  font-size:13.5px; color:var(--ink);
}
.mdl-item:active{ transform:scale(.99); }
.mdl-item.on{ background:var(--pink-mist); box-shadow:inset 0 0 0 1.5px var(--pink); }
.mdl-dot{
  width:8px; height:8px; border-radius:50%;
  background:var(--line); flex:0 0 auto;
}
.mdl-item.on .mdl-dot{ background:var(--pink); box-shadow:0 0 0 3px rgba(255,123,168,.16); }
.mdl-ok{
  margin-left:auto; font-size:10px; font-weight:700;
  color:var(--pink-deep); background:var(--panel);
  padding:2px 8px; border-radius:999px;
}
.mdl-temp-row{ display:flex; align-items:center; gap:12px; padding:6px 2px; }
.mdl-temp-row input[type=range]{
  flex:1; -webkit-appearance:none; height:4px; border-radius:99px;
  background:linear-gradient(90deg,var(--pink-soft),var(--pink));
  outline:none;
}
.mdl-temp-row input[type=range]::-webkit-slider-thumb{
  -webkit-appearance:none; width:20px; height:20px; border-radius:50%;
  background:var(--panel); box-shadow:0 2px 8px rgba(255,123,168,.4);
  border:2px solid var(--pink);
}
#temp-val{
  font-size:13px; font-weight:700; color:var(--pink-deep);
  min-width:38px; text-align:right;
}
.mdl-hint{ font-size:11px; color:var(--ink-3); line-height:1.6; padding:4px 2px 6px; }

/* 模型弹窗：可用状态 */
.mdl-gcount{
  font-weight:400; font-size:10px; color:var(--ink-3);
  margin-left:6px; letter-spacing:0;
}
.mdl-name{ flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mdl-tag{
  font-size:9.5px; color:var(--pink-deep); background:var(--panel);
  padding:2px 7px; border-radius:999px; flex:0 0 auto;
}
.mdl-item.dead{ opacity:.42; }
.mdl-item.dead .mdl-dot{ background:var(--ink-3); }
.mdl-bad{
  font-size:9px; color:#C46A6A; background:#FDF2F2;
  padding:2px 7px; border-radius:999px;
  flex:0 0 auto; max-width:96px;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.mdl-ok{ flex:0 0 auto; }

/* 模型弹窗 · 提示条与填 key */
.mdl-toast{
  position:sticky; top:0; z-index:5;
  margin:0 0 8px; padding:11px 14px;
  background:#FDF2F5; color:#B0466B;
  border-radius:12px; font-size:12.5px; font-weight:600;
  box-shadow:0 2px 10px rgba(255,140,175,.16);
  animation:toastIn .18s ease;
}
.mdl-toast.ok{ background:#F0F9F3; color:#3E8757; box-shadow:0 2px 10px rgba(80,180,120,.16); }
.mdl-toast.out{ opacity:0; transform:translateY(-6px); transition:.3s; }
@keyframes toastIn{ from{opacity:0;transform:translateY(-8px)} to{opacity:1;transform:none} }

.mdl-off{
  font-size:9px; font-weight:700; color:#fff;
  background:linear-gradient(135deg,var(--pink),var(--pink-deep));
  padding:2px 7px; border-radius:999px; margin-left:6px;
}
.mdl-nokey{
  font-size:9px; font-weight:700; color:#B7791F;
  background:var(--panel)8E6; padding:2px 7px; border-radius:999px; margin-left:5px;
}
.mdl-setkey{
  margin-left:8px; border:0; font-size:10px; font-weight:700;
  color:var(--pink-deep); background:var(--panel);
  padding:3px 9px; border-radius:999px;
  box-shadow:inset 0 0 0 1px var(--pink-soft);
}
.mdl-setkey:active{ background:var(--pink-mist); }

.mdl-item.picking{ opacity:.6; }

.mdl-keybox{
  position:absolute; left:12px; right:12px; bottom:calc(12px + env(safe-area-inset-bottom,0px));
  background:var(--panel); border-radius:16px; padding:16px 16px 14px;
  box-shadow:0 -6px 26px rgba(0,0,0,.18);
  animation:avup .2s cubic-bezier(.2,.8,.3,1);
}
.av-sheet{ position:relative; }
.mdl-keytitle{ font-size:14px; font-weight:700; color:var(--ink); margin-bottom:12px; }
.mdl-keyinput{
  width:100%; box-sizing:border-box;
  border:1px solid var(--line); border-radius:12px;
  padding:12px 13px; font-size:13px; color:var(--ink);
  background:var(--bg-2); outline:none;
  font-family:ui-monospace,Menlo,monospace;
}
.mdl-keyinput:focus{ border-color:var(--pink); background:var(--panel); }
.mdl-keyrow{ display:flex; gap:10px; margin-top:12px; }
.mdl-keybtn{
  flex:1; border:0; border-radius:12px; padding:12px;
  font-size:13.5px; font-weight:700;
  background:linear-gradient(135deg,var(--pink),var(--pink-deep));
  color:#fff;
}
.mdl-keybtn.ghost{ background:var(--bg-2); color:var(--ink-2); }

/* 模型弹窗 · 添加自定义来源 */
.mdl-addsrc{
  width:100%; margin:14px 0 4px;
  border:1.5px dashed var(--pink-soft);
  background:var(--panel); color:var(--pink-deep);
  font-size:13px; font-weight:700;
  padding:12px; border-radius:14px;
}
.mdl-addsrc:active{ background:var(--pink-mist); }

.mdl-srcbox{
  position:absolute; left:12px; right:12px;
  bottom:calc(12px + env(safe-area-inset-bottom,0px));
  background:var(--panel); border-radius:18px;
  padding:16px; max-height:82vh; overflow-y:auto;
  box-shadow:0 -6px 26px rgba(0,0,0,.18);
  animation:avup .2s cubic-bezier(.2,.8,.3,1);
}
.mdl-probebtn{
  width:100%; margin-top:11px; border:0;
  background:var(--pink-mist); color:var(--pink-deep);
  font-size:13px; font-weight:700; padding:12px; border-radius:12px;
}
.mdl-probebtn:active{ background:var(--pink-soft); }

.mdl-probelist{ margin-top:11px; }
.mdl-searching, .mdl-probefail{
  font-size:12.5px; color:var(--ink-2); padding:14px 0; text-align:center;
}
.mdl-probefail{ color:#C46A6A; }
.mdl-probehead{ font-size:11px; color:var(--ink-3); padding:4px 0 7px; }
.mdl-probeitem{
  display:flex; align-items:center; gap:9px;
  padding:10px 11px; border-radius:11px;
  background:var(--bg-2); margin-bottom:6px;
  font-size:12.5px; color:var(--ink);
  word-break:break-all;
}
.mdl-probeitem.on{ background:var(--pink-mist); box-shadow:inset 0 0 0 1.5px var(--pink); }
.mdl-chk{
  width:15px; height:15px; border-radius:5px; flex:0 0 auto;
  border:1.5px solid var(--ink-3); background:var(--panel);
  position:relative;
}
.mdl-probeitem.on .mdl-chk{
  background:var(--pink); border-color:var(--pink);
}
.mdl-probeitem.on .mdl-chk::after{
  content:''; position:absolute; left:4px; top:1px;
  width:4px; height:8px; border:2px solid #fff;
  border-top:0; border-left:0; transform:rotate(42deg);
}
.mdl-selall{
  display:flex; gap:14px; padding:8px 2px 12px;
  font-size:11.5px; color:var(--pink-deep); font-weight:600;
}
.mdl-selall span:active{ opacity:.6; }
.mdl-keybtn[disabled]{ opacity:.42; }

/* 消息通知设置 */
.ntf-body{ padding:0 18px 10px; }
.ntf-tip{
  font-size:12px; color:var(--ink-2); line-height:1.6;
  background:var(--bg-2); border-radius:12px;
  padding:11px 13px; margin-bottom:12px;
}
.ntf-row{
  display:flex; align-items:center; gap:11px;
  padding:14px 2px; border-bottom:1px solid var(--line);
}
.ntf-row:last-of-type{ border-bottom:0; }
.ntf-ico{ font-size:15px; width:22px; text-align:center; }
.ntf-txt{ flex:1; font-size:14.5px; color:var(--ink); }
.ntf-sw{
  width:46px; height:27px; border-radius:99px;
  background:#E4DDE2; position:relative; flex:0 0 auto;
  transition:background .2s;
}
.ntf-sw::after{
  content:''; position:absolute; left:3px; top:3px;
  width:21px; height:21px; border-radius:50%;
  background:var(--panel); box-shadow:0 1px 4px rgba(0,0,0,.18);
  transition:transform .2s;
}
.ntf-sw.on{ background:linear-gradient(135deg,var(--pink),var(--pink-deep)); }
.ntf-sw.on::after{ transform:translateX(19px); }

.ntf-auth, .ntf-test{
  width:100%; margin-top:12px; border:0;
  font-size:13.5px; font-weight:700; padding:13px; border-radius:13px;
}
.ntf-auth{ background:var(--pink-mist); color:var(--pink-deep); }
.ntf-test{ background:linear-gradient(135deg,var(--pink),var(--pink-deep)); color:#fff; }
.ntf-note{
  font-size:11px; color:var(--ink-3); line-height:1.7;
  margin-top:14px; padding-top:12px; border-top:1px solid var(--line);
}

/* 通知诊断 */
.ntf-diag{
  font-size:11px; color:var(--ink-3); line-height:1.7;
  padding:0 2px 10px; word-break:break-all;
}
.ntf-result{
  margin-top:10px; padding:11px 13px;
  border-radius:12px; background:var(--bg-2);
  font-size:12px; line-height:1.6;
  color:var(--ink-2);
}

/* 模型弹窗：DSH标记 / 隐藏提示 / 空组 */
.mdl-dsh{
  font-size:9px; font-weight:700; color:#4A7BA7;
  background:#EDF4FA; padding:2px 7px; border-radius:999px; margin-left:5px;
}
.mdl-hidden{
  font-size:9.5px; color:var(--ink-3);
  background:var(--bg-2); padding:2px 8px; border-radius:999px;
  margin-left:6px; font-weight:500;
}
.mdl-hidden:active{ background:var(--pink-mist); }
.mdl-empty{
  font-size:12px; color:var(--ink-3);
  padding:10px 12px; text-align:center;
  background:var(--bg-2); border-radius:11px; margin-bottom:6px;
}

/* 等待提示（她在打字） */
.wait-tip{
  display:flex; align-items:center; gap:5px;
  align-self:flex-start;
  background:var(--card); border-radius:14px 14px 14px 4px;
  padding:11px 15px; margin:4px 0 8px 4px;
  box-shadow:var(--sh);
}
.wt-dot{
  width:6px; height:6px; border-radius:50%;
  background:var(--ink-3);
  animation:wtBlink 1.3s infinite;
}
.wt-dot:nth-child(2){ animation-delay:.2s; }
.wt-dot:nth-child(3){ animation-delay:.4s; }
@keyframes wtBlink{
  0%,60%,100%{ opacity:.28; transform:translateY(0); }
  30%{ opacity:1; transform:translateY(-3px); }
}
.wt-slow{ font-size:12px; color:var(--ink-3); }

/* 发送失败气泡 */
.send-fail{ opacity:.55; }
.send-fail-tip{
  align-self:flex-end; margin:2px 4px 8px;
  font-size:11.5px; color:#C0566B;
  background:#FDF1F4; border-radius:10px;
  padding:7px 11px; max-width:78%;
  cursor:pointer;
}
.send-fail-tip:active{ background:#FBE3EA; }

/* ══ 下拉刷新指示器 ══ */
.pull-ind{
  position:fixed; left:50%; top:-40px; z-index:9998;
  width:34px; height:34px; border-radius:50%;
  background:var(--panel); box-shadow:0 3px 14px rgba(0,0,0,.16);
  display:flex; align-items:center; justify-content:center;
  transform:translate(-50%,0);
  opacity:0; transition:opacity .15s;
  pointer-events:none;
}
.pull-ind.on{ opacity:1; }
.pull-ind .pi-dot{
  width:14px; height:14px; border-radius:50%;
  border:2px solid var(--pink-soft);
  border-top-color:var(--pink);
}
.pull-ind.ready .pi-dot{ border-color:var(--pink); }
.pull-ind.spin .pi-dot{ animation:pvSpin .7s linear infinite; }
@keyframes pvSpin{ to{ transform:rotate(360deg); } }

/* ══ 看大图 ══ */
.photo-view{
  position:fixed; inset:0; z-index:10000;
  background:rgba(0,0,0,.94);
  display:flex; flex-direction:column;
  opacity:0; transition:opacity .2s;
}
.photo-view.on{ opacity:1; }
.pv-top{
  display:flex; align-items:center; gap:12px;
  padding:calc(12px + env(safe-area-inset-top,0px)) 16px 12px;
  color:#fff;
}
.pv-close{
  width:34px; height:34px; border-radius:50%; border:0;
  background:rgba(255,255,255,.16); color:#fff;
  font-size:15px; line-height:1;
}
.pv-title{ font-size:14px; opacity:.9; }
.pv-body{
  flex:1; display:flex; align-items:center; justify-content:center;
  overflow:auto; padding:0 10px;
}
.pv-body img{
  max-width:100%; max-height:100%;
  object-fit:contain; border-radius:8px;
}
.pv-bottom{
  padding:14px 16px calc(20px + env(safe-area-inset-bottom,0px));
  display:flex; justify-content:center;
}
.pv-btn{
  border:0; border-radius:999px; padding:12px 30px;
  font-size:14px; font-weight:700; color:#fff;
  background:linear-gradient(135deg,var(--pink),var(--pink-deep));
}
.pv-btn:active{ opacity:.8; }

/* ══ 养成页 增强 ══ */
.grow-sub{
  font-size:12px; color:var(--ink-2); margin-top:2px;
  letter-spacing:.2px;
}
.ring-lb{
  font-size:9.5px; color:var(--ink-3); margin-top:-2px;
  letter-spacing:1px;
}
/* 三段进度 */
.stage-bar{ width:100%; max-width:280px; margin:14px auto 4px; }
.sb-track{
  position:relative; height:8px; border-radius:99px;
  background:var(--bg-2); overflow:hidden;
}
.sb-fill{
  height:100%; border-radius:99px;
  background:linear-gradient(90deg,var(--pink-soft),var(--pink),var(--pink-deep));
  transition:width .5s cubic-bezier(.2,.8,.3,1);
}
.sb-mark{
  position:absolute; top:0; bottom:0; width:1.5px;
  background:rgba(255,255,255,.85);
}
.sb-labels{
  display:flex; justify-content:space-between;
  font-size:10px; color:var(--ink-3); margin-top:6px;
  padding:0 2px;
}
.sb-labels .on{ color:var(--pink-deep); font-weight:700; }

/* 三宫格数据 */
.grow-stats{
  display:flex; gap:8px; width:100%; max-width:300px;
  margin:14px auto 6px;
}
.gs-item{
  flex:1; background:var(--bg-2); border-radius:12px;
  padding:10px 4px; text-align:center;
}
.gs-item b{
  display:block; font-size:14px; color:var(--ink);
  font-weight:700; line-height:1.3;
}
.gs-item span{ font-size:9.5px; color:var(--ink-3); }

/* 她最近说的话 */
.grow-quote{
  font-size:12px; color:var(--ink-2); line-height:1.6;
  background:var(--pink-mist); border-radius:12px;
  padding:10px 13px; margin:10px auto 0;
  max-width:300px; text-align:left;
  border-left:3px solid var(--pink-soft);
}

/* 今日任务 */
.gt-card{
  width:100%; max-width:300px; margin:12px auto 0;
  background:var(--card); border-radius:14px;
  padding:12px 14px; box-shadow:var(--sh);
  text-align:left;
}
.gt-head{
  display:flex; justify-content:space-between; align-items:center;
  font-size:12.5px; font-weight:700; color:var(--ink);
  padding-bottom:8px; border-bottom:1px solid var(--line);
}
.gt-head b{ color:var(--pink-deep); font-size:11.5px; }
.gt-row{
  display:flex; align-items:center; gap:8px;
  font-size:12px; color:var(--ink-2);
  padding:7px 0;
}
.gt-row.done{ color:var(--ink-3); text-decoration:line-through; }
.gt-chk{
  width:15px; height:15px; border-radius:50%;
  border:1.5px solid var(--line);
  display:flex; align-items:center; justify-content:center;
  font-size:9px; color:#fff; flex:0 0 auto;
}
.gt-row.done .gt-chk{
  background:var(--pink); border-color:var(--pink);
}

/* ══ 人设卡 增强 ══ */
.cards-bar{ padding:0 0 12px; }
.cards-search{
  width:100%; box-sizing:border-box;
  border:1px solid var(--line); border-radius:12px;
  padding:10px 13px; font-size:13px; color:var(--ink);
  background:var(--bg-2); outline:none; margin-bottom:9px;
}
.cards-search:focus{ border-color:var(--pink); background:var(--panel); }
.cards-sorts, .cards-stage{
  display:flex; gap:7px; margin-bottom:8px;
}
.cs-btn, .cst-btn{
  border:0; background:var(--bg-2); color:var(--ink-2);
  font-size:11.5px; padding:7px 13px; border-radius:99px;
}
.cs-btn.on, .cst-btn.on{
  background:linear-gradient(135deg,var(--pink),var(--pink-deep));
  color:#fff; font-weight:700;
}
.cards-inner{
  display:grid; grid-template-columns:repeat(2,1fr);
  gap:15px;
  margin-top:4px;
}
/* 卡片在小屏也别太窄 */
@media (max-width: 340px){
  .cards-inner{ grid-template-columns:1fr; }
}
.card-item{
  position:relative;
  background:var(--card); border-radius:16px;
  padding:12px 8px 10px; text-align:center;
  box-shadow:var(--sh);
}
.card-item:active{ transform:scale(.97); }
.card-av{
  width:64px; height:64px; border-radius:50%; margin:0 auto 7px;
  background-size:cover; background-position:center;
  display:flex; align-items:center; justify-content:center;
  color:#fff; font-size:20px; font-weight:700;
}
.card-nm{
  font-size:13px; font-weight:700; color:var(--ink);
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.card-stage{
  font-size:9.5px; color:var(--ink-3); margin-top:2px;
  padding:2px 0;
}
.card-stage.warm{ color:var(--pink-deep); }
.card-stage.hot{ color:var(--pink-deep); font-weight:700; }
.card-bar{
  height:4px; border-radius:99px; background:var(--bg-2);
  margin:7px 4px 4px; overflow:hidden;
}
.card-bar i{
  display:block; height:100%; border-radius:99px;
  background:linear-gradient(90deg,var(--pink-soft),var(--pink-deep));
}
.card-meta{ font-size:9.5px; color:var(--ink-3); }
.card-unread{
  position:absolute; top:8px; right:8px;
  min-width:17px; height:17px; padding:0 5px;
  border-radius:99px; background:var(--pink-deep);
  color:#fff; font-size:9.5px; font-weight:700;
  display:flex; align-items:center; justify-content:center;
}

/* ══ 断线重连界面 ══ */
.reconn{
  position:fixed; inset:0; z-index:9998;
  background:var(--bg);
  display:flex; align-items:center; justify-content:center;
  padding:24px;
}
.reconn-box{
  display:flex; flex-direction:column; align-items:center;
  gap:10px; text-align:center;
}
.reconn-heart{
  font-size:46px; color:var(--pink-deep);
  animation:reconnBeat 1.4s ease-in-out infinite;
}
@keyframes reconnBeat{
  0%,100%{ transform:scale(1); opacity:.9; }
  50%{ transform:scale(1.14); opacity:1; }
}
.reconn-txt{
  font-size:15px; font-weight:700; color:var(--ink);
}
.reconn-sub{
  font-size:12px; color:var(--ink-2); line-height:1.6;
  max-width:250px;
}
.reconn-btn{
  margin-top:8px; border:0;
  background:linear-gradient(135deg,var(--pink),var(--pink-deep));
  color:#fff; font-size:13px; font-weight:700;
  padding:11px 30px; border-radius:999px;
  box-shadow:0 4px 14px rgba(255,122,168,.3);
}
.reconn-btn:active{ transform:scale(.97); }

/* 消息加载失败可点重试 */
.msg-loading{
  text-align:center; font-size:13px; color:var(--ink-2);
  padding:36px 20px; line-height:1.8;
  cursor:pointer;
}
.msg-loading:active{ opacity:.6; }

/* 看历史时来了新消息的提示 */
.new-msg-hint{
  position:absolute; left:50%; bottom:96px;
  transform:translateX(-50%);
  z-index:60;
  border:0; border-radius:999px;
  background:linear-gradient(135deg,var(--pink),var(--pink-deep));
  color:#fff; font-size:12px; font-weight:700;
  padding:9px 18px;
  box-shadow:0 4px 16px rgba(255,122,168,.35);
  animation:hintIn .22s ease;
}
@keyframes hintIn{
  from{ opacity:0; transform:translate(-50%,8px); }
  to{ opacity:1; transform:translate(-50%,0); }
}
.new-msg-hint:active{ transform:translate(-50%,1px) scale(.98); }

/* ══ 闺蜜系统 ══ */
.gf-box{
  width:100%; max-width:300px; margin:12px auto 0;
  background:var(--card); border-radius:14px;
  padding:12px 14px; box-shadow:var(--sh);
  text-align:left;
}
.gf-title{
  font-size:12.5px; font-weight:700; color:var(--ink);
  padding-bottom:8px; border-bottom:1px solid var(--line);
  margin-bottom:8px;
}
.gf-row{
  display:flex; align-items:center; gap:8px;
  font-size:12.5px; padding:5px 0;
}
.gf-name{ color:var(--pink-deep); font-weight:700; }
.gf-call{ color:var(--ink-2); font-size:11.5px; flex:1; }
.gf-int{
  font-size:10px; color:#fff; font-weight:700;
  background:linear-gradient(135deg,var(--pink),var(--pink-deep));
  padding:2px 7px; border-radius:99px;
}
.gf-note{
  font-size:11px; color:var(--ink-3); line-height:1.5;
  padding:2px 0 6px 0;
}

/* ══ 闺蜜管理弹层 ══ */
.gfm-mask{
  position:fixed; inset:0; z-index:9997;
  background:rgba(40,32,38,.42);
  display:flex; align-items:flex-end;
  opacity:0; transition:opacity .2s ease;
}
.gfm-mask.on{ opacity:1; }
.gfm-sheet{
  width:100%; max-height:86vh;
  background:var(--bg);
  border-radius:26px 26px 0 0;
  display:flex; flex-direction:column;
  transform:translateY(22px); transition:transform .26s cubic-bezier(.2,.8,.3,1);
  box-shadow:0 -8px 32px rgba(60,40,52,.14);
  position:relative;
}
.gfm-sheet::before{
  content:'';
  position:absolute; top:8px; left:50%;
  transform:translateX(-50%);
  width:38px; height:4px; border-radius:99px;
  background:var(--line);
}
.gfm-mask.on .gfm-sheet{ transform:translateY(0); }
.gfm-head{
  padding:24px 20px 14px; font-weight:800; font-size:16.5px;
  color:var(--ink); text-align:center;
  letter-spacing:-.2px;
  border-bottom:1px solid var(--line);
}
.gfm-body{
  flex:1; overflow-y:auto; padding:14px 18px 20px;
}
.gfm-close{
  padding:16px; text-align:center; font-size:14.5px;
  color:var(--pink-deep); font-weight:800;
  border-top:1px solid var(--line);
  letter-spacing:.3px;
}
.gfm-tip{
  font-size:11.5px; color:var(--ink-3); text-align:center;
  margin-bottom:10px;
}
.gfm-list{ display:flex; flex-direction:column; gap:8px; }
.gfm-empty{
  text-align:center; font-size:12.5px; color:var(--ink-3);
  padding:22px 0;
}
.gfm-row{
  display:flex; align-items:center; gap:10px;
  background:var(--card); border-radius:15px;
  padding:13px 15px;
  box-shadow:0 2px 10px var(--sh);
  transition:transform .14s ease, box-shadow .14s ease;
}
.gfm-row:active{
  transform:scale(.985);
  box-shadow:0 1px 5px var(--sh);
}
.gfm-main{ flex:1; min-width:0; }
.gfm-pair{ font-size:13.5px; font-weight:700; color:var(--ink); }
.gfm-sub{ font-size:10.5px; color:var(--ink-3); margin-top:3px; }
.gfm-del{
  border:0; background:var(--bg-2); color:var(--ink-2);
  font-size:11.5px; padding:6px 12px; border-radius:99px;
}
.gfm-del:active{ background:#ffe3ec; color:var(--pink-deep); }
.gfm-add{
  width:100%; margin-top:12px;
  border:1.5px dashed var(--pink-soft); background:transparent;
  color:var(--pink-deep); font-size:13px; font-weight:700;
  padding:12px; border-radius:13px;
}
.gfm-addbox{
  margin-top:12px; background:var(--card);
  border-radius:14px; padding:14px; box-shadow:var(--sh);
}
.gfm-fld{ margin-bottom:14px; }
.gfm-fld label{
  display:flex; align-items:center; justify-content:space-between;
  font-size:11.5px; color:var(--ink-2); font-weight:600;
  margin-bottom:7px; letter-spacing:.2px;
}
.gfm-fld label b{ font-size:13px; color:var(--pink-deep); font-weight:800; }
.gfm-fld input{
  width:100%; box-sizing:border-box;
  border:0; border-radius:12px;
  padding:11px 13px; font-size:13.5px;
  background:var(--bg-2); color:var(--ink); outline:none;
  transition:background .18s ease, box-shadow .18s ease;
}
.gfm-fld input:focus{
  background:var(--panel);
  box-shadow:0 0 0 2px var(--pink-soft);
}
.gfm-chips{
  display:flex; flex-wrap:wrap; gap:7px;
  max-height:132px; overflow-y:auto; padding:2px 0;
}
.gfm-chip{
  border:0; background:var(--bg-2); color:var(--ink-2);
  font-size:12px; padding:8px 14px; border-radius:99px;
  transition:all .16s ease;
}
.gfm-chip.on{
  background:linear-gradient(135deg,var(--pink),var(--pink-deep));
  color:#fff; font-weight:700;
  box-shadow:0 3px 12px rgba(255,122,168,.32);
}
.gfm-chip:active{ transform:scale(.96); }
.gfm-fld input[type="range"]{
  padding:0; background:transparent;
  -webkit-appearance:none; appearance:none;
  height:6px; border-radius:99px;
  background:linear-gradient(90deg,var(--pink-soft),var(--pink-deep));
  outline:none; margin:6px 0 2px;
}
.gfm-fld input[type="range"]::-webkit-slider-thumb{
  -webkit-appearance:none; appearance:none;
  width:22px; height:22px; border-radius:50%;
  background:var(--panel); border:2.5px solid var(--pink-deep);
  box-shadow:0 2px 8px rgba(232,106,150,.35);
}
.gfm-save{
  width:100%; border:0;
  background:linear-gradient(135deg,var(--pink),var(--pink-deep));
  color:#fff; font-size:13.5px; font-weight:700;
  padding:12px; border-radius:99px;
}
.gfm-toast{
  position:fixed; left:50%; bottom:110px;
  transform:translateX(-50%);
  z-index:9999; background:rgba(48,38,44,.92);
  color:#fff; font-size:12.5px; padding:10px 20px;
  border-radius:99px; transition:opacity .3s ease;
}
.gfm-toast.out{ opacity:0; }

/* 闺蜜行可点击 */
.gf-jump{ cursor:pointer; border-radius:8px; transition:background .15s; }
.gf-jump:active{ background:var(--bg-2); }
/* 恢复默认按钮 */
.gfm-reset{
  width:100%; margin-top:8px;
  border:0; background:var(--bg-2); color:var(--ink-2);
  font-size:12.5px; padding:11px; border-radius:13px;
}
.gfm-reset:active{ background:#ffe3ec; color:var(--pink-deep); }

/* ══ UI 统一美化 ══ */

/* 登录输入框 */
#email, #password{
  width:100%; box-sizing:border-box;
  border:0; border-radius:14px;
  padding:14px 16px; font-size:15px;
  background:var(--bg-2); color:var(--ink);
  outline:none;
  transition:background .2s ease, box-shadow .2s ease;
}
#email:focus, #password:focus{
  background:var(--panel);
  box-shadow:0 0 0 2px var(--pink-soft);
}
#email::placeholder, #password::placeholder{
  color:var(--ink-3);
}
#email{ margin-bottom:10px; }

/* 所有滑块统一 */
input[type="range"]{
  -webkit-appearance:none; appearance:none;
  width:100%; height:6px; border-radius:99px;
  background:linear-gradient(90deg,var(--pink-soft),var(--pink-deep));
  outline:none; margin:8px 0;
}
input[type="range"]::-webkit-slider-thumb{
  -webkit-appearance:none; appearance:none;
  width:22px; height:22px; border-radius:50%;
  background:var(--panel); border:2.5px solid var(--pink-deep);
  box-shadow:0 2px 8px rgba(232,106,150,.35);
}

/* 温度/数字输入 */
.mdl-keyinput{
  transition:background .18s ease, box-shadow .18s ease;
}
.mdl-keyinput:focus{
  background:var(--panel);
  box-shadow:0 0 0 2px var(--pink-soft);
  border-color:transparent;
}

/* 聊天输入框 */
.composer textarea{
  border:0; outline:none;
  background:transparent;
  font-size:15px; line-height:1.5;
  color:var(--ink);
  resize:none;
  -webkit-appearance:none;
}
.composer textarea::placeholder{ color:var(--ink-3); }

/* ══ 更新弹窗（替代原生黑框）══ */
.upd-mask{
  position:fixed; inset:0; z-index:9996;
  background:rgba(40,32,38,.42);
  display:flex; align-items:center; justify-content:center;
  padding:32px;
  opacity:0; transition:opacity .2s ease;
}
.upd-mask.on{ opacity:1; }
.upd-card{
  width:100%; max-width:310px;
  background:var(--bg);
  border-radius:24px;
  padding:26px 22px 18px;
  box-shadow:0 18px 50px rgba(60,40,52,.22);
  display:flex; flex-direction:column; align-items:center;
  transform:scale(.94); transition:transform .24s cubic-bezier(.2,.8,.3,1);
}
.upd-mask.on .upd-card{ transform:scale(1); }
.upd-ico{
  font-size:40px; color:var(--pink-deep);
  line-height:1; margin-bottom:12px;
}
.upd-title{
  font-size:17px; font-weight:800; color:var(--ink);
  letter-spacing:-.2px; margin-bottom:8px;
  text-align:center;
}
.upd-sub{
  font-size:12px; color:var(--ink-3);
  margin-bottom:4px;
}
.upd-note{
  font-size:11.5px; color:var(--ink-2);
  line-height:1.6; text-align:center;
  margin:10px 0 18px;
  padding:10px 12px;
  background:var(--bg-2); border-radius:12px;
  width:100%; box-sizing:border-box;
}
.upd-btn{
  width:100%; border:0;
  font-size:14px; font-weight:700;
  padding:13px; border-radius:99px;
  margin-top:9px;
  background:var(--bg-2); color:var(--ink-2);
  transition:transform .14s ease;
}
.upd-btn.primary{
  background:linear-gradient(135deg,var(--pink),var(--pink-deep));
  color:#fff;
  box-shadow:0 5px 18px rgba(255,122,168,.34);
}
.upd-btn:active{ transform:scale(.975); }
.upd-alt{ margin-top:14px; font-size:13px; line-height:1.9; }
.upd-alt a{ color:#FF5C93; text-decoration:none; padding:0 2px; }
.upd-alt a:active{ opacity:.6; }
.upd-alt i{ color:#B9B0BD; font-style:normal; margin:0 8px; }


/* ════════════════════════════════════════════
   护眼模式（深色主题）
   参考 DSH 的深色：#1D1925 系
   ════════════════════════════════════════════ */
[data-theme="dark"] {
  --bg: #18151D;
  --bg-2: #201C26;
  --card: #262030;
  --panel: #2E2738;
  --line: #3A3245;

  --ink: #EDE7F0;
  --ink-2: #B4AABF;
  --ink-3: #7A7085;

  --pink: #FF7BA8;
  --pink-deep: #FF5C93;
  --pink-soft: #4A2C3A;

  --sh: rgba(0, 0, 0, .45);
}
/* 深色下壁纸遮罩改成暗色 */
[data-theme="dark"] #wallpaper::after {
  background: rgba(24, 21, 29, var(--wp-dim, 0));
}
/* 深色下阴影更沉 */
[data-theme="dark"] .conv-card,
[data-theme="dark"] .card-item,
[data-theme="dark"] .grow-hero,
[data-theme="dark"] .grp-card,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .sys-card,
[data-theme="dark"] .gt-card,
[data-theme="dark"] .gf-box {
  box-shadow: 0 4px 18px rgba(0, 0, 0, .38) !important;
}
/* 深色下按钮的柔光减弱 */
[data-theme="dark"] .upd-btn.primary,
[data-theme="dark"] .reconn-btn,
[data-theme="dark"] .gfm-save {
  box-shadow: 0 4px 14px rgba(255, 92, 147, .22);
}
/* 深色下骨架屏 */
[data-theme="dark"] .sk-msg {
  background: linear-gradient(90deg, #262030 0%, #322B3E 50%, #262030 100%);
}

/* ══ 中转站状态面板 ══ */
.pv-wrap{ display:flex; flex-direction:column; gap:10px; }
.pv-bar{
  display:flex; align-items:center; justify-content:space-between;
  gap:10px; padding:2px 0 8px;
}
.pv-tip{
  font-size:11.5px; color:var(--ink-2); flex:1; min-width:0;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.pv-rebtn{
  border:0; background:linear-gradient(135deg,var(--pink),var(--pink-deep));
  color:#fff; font-size:12px; font-weight:700;
  padding:8px 16px; border-radius:99px; flex:0 0 auto;
  box-shadow:0 3px 12px rgba(255,122,168,.3);
}
.pv-rebtn:disabled{ opacity:.55; }
.pv-rebtn:active{ transform:scale(.96); }
.pv-list{ display:flex; flex-direction:column; gap:9px; }
.pv-empty{
  text-align:center; font-size:12.5px; color:var(--ink-3);
  padding:24px 0;
}
.pv-card{
  background:var(--card); border-radius:15px;
  padding:12px 14px;
  border-left:4px solid var(--line);
  box-shadow:0 2px 10px var(--sh);
}
.pv-card.on{ border-left-color:#3FBF7F; }
.pv-card.off{ border-left-color:#E86A6A; }
.pv-head{
  display:flex; align-items:center; gap:8px;
  margin-bottom:5px;
}
.pv-dot{ font-size:13px; line-height:1; }
.pv-card.on .pv-dot{ color:#3FBF7F; }
.pv-card.off .pv-dot{ color:#E86A6A; }
.pv-name{
  font-size:13.5px; font-weight:700; color:var(--ink);
  flex:1; min-width:0;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.pv-cur{
  font-size:9.5px; color:#fff; font-weight:700;
  background:linear-gradient(135deg,var(--pink),var(--pink-deep));
  padding:2px 7px; border-radius:99px; flex:0 0 auto;
}
.pv-ms{
  font-size:11px; font-weight:700; color:var(--ink-2);
  flex:0 0 auto; font-variant-numeric:tabular-nums;
}
.pv-card.on .pv-ms{ color:#3FBF7F; }
.pv-card.off .pv-ms{ color:#E86A6A; }
.pv-url{
  font-size:10.5px; color:var(--ink-3);
  margin-bottom:4px; word-break:break-all;
}
.pv-meta{
  font-size:10.5px; color:var(--ink-2);
}
.pv-err{
  font-size:10.5px; color:#E86A6A; line-height:1.5;
  margin-top:5px; padding:6px 9px;
  background:rgba(232,106,106,.08); border-radius:8px;
  word-break:break-all;
}
[data-theme="dark"] .pv-err{
  background:rgba(232,106,106,.14);
}
/* ══ 情绪轴条（养成卡片）═��� */
.card-axes{
  display:flex; gap:3px; margin-top:5px;
}
.card-axes .ax{
  flex:1; height:3px; border-radius:99px;
  background:var(--line); position:relative; overflow:hidden;
}
.card-axes .ax::after{
  content:''; position:absolute; left:0; top:0; bottom:0;
  width:var(--v, 0%); border-radius:99px;
}
.ax-trust::after{ background:#5B9BD5; }
.ax-warm::after{  background:#FF8FB1; }
.ax-fam::after{   background:#8E7CC3; }
.ax-ten::after{   background:#E86A6A; }
.ax-rom::after{   background:#FF5C93; }

/* ══════════════════════════════════════════
   主题包：樱花粉 / 磨砂玻璃 / 暗夜霓虹 / 奶油
   用 data-theme 切换，全部走变量 + 覆盖
   ══════════════════════════════════════════ */
[data-theme="pink"] {
  --bg:#FFF7FA; --bg-2:#FFEFF5; --card:#FFFFFF; --panel:#FFFFFF; --line:#F6E3EA;
  --pink:#FF7BA8; --pink-deep:#FF5C93; --pink-soft:#FFE8F0; --pink-mist:#FFF3F7;
  --ink:#3A2E33; --ink-2:#8E8890; --ink-3:#BEB7BE;
  --bubble-them:#FFE4EC; --bubble-me:#F1F4FF;
  --ui-card:#FFFFFF; --ui-line:#F2E2E9; --ui-ink:#3A2E33; --ui-ink2:#8E8890;
  --ui-shadow:0 10px 30px rgba(255,92,147,.12);
}
[data-theme="cream"] {
  --bg:#FBF5EC; --bg-2:#F6EEDF; --card:#FFFDF8; --panel:#FFFDF8; --line:#EADFCB;
  --pink:#C99A6A; --pink-deep:#B07C4A; --pink-soft:#F3E3CE; --pink-mist:#FAF2E4;
  --ink:#3A322A; --ink-2:#8A7F70; --ink-3:#BFB3A2;
  --bubble-them:#F1E4D2; --bubble-me:#E9EEF5;
  --ui-card:#FFFDF8; --ui-line:#EADFCB; --ui-ink:#3A322A; --ui-ink2:#8A7F70;
  --ui-shadow:0 10px 30px rgba(120,90,50,.12);
}
[data-theme="dark"] {
  --ui-card:#1F1B22; --ui-line:rgba(255,255,255,.09); --ui-ink:#F2E9EE; --ui-ink2:#9A909A;
  --ui-shadow:0 18px 40px rgba(0,0,0,.55);
}
[data-theme="glass"] {
  --bg:#0E0C11; --bg-2:#141119; --card:rgba(255,255,255,.10); --panel:rgba(255,255,255,.12); --line:rgba(255,255,255,.14);
  --pink:#FF8FB8; --pink-deep:#FF5C93; --pink-soft:rgba(255,143,184,.22); --pink-mist:rgba(255,143,184,.12);
  --ink:#F4EEF3; --ink-2:#B9AEB6; --ink-3:#8E858E;
  --bubble-them:rgba(255,255,255,.14); --bubble-me:rgba(255,92,147,.24);
  --ui-card:rgba(255,255,255,.10); --ui-line:rgba(255,255,255,.16); --ui-ink:#F6EFF4; --ui-ink2:#C6BAC2;
  --ui-shadow:0 18px 50px rgba(0,0,0,.5);
}
/* 玻璃专场：固定层才模糊，气泡不加 blur */
[data-theme="glass"] .chat-head,
[data-theme="glass"] .composer,
[data-theme="glass"] .av-sheet,
[data-theme="glass"] .hcui-card,
[data-theme="glass"] .sys-card,
[data-theme="glass"] .grp-card,
[data-theme="glass"] .conv-card,
[data-theme="glass"] .tab-bar,
[data-theme="glass"] .nav-bar {
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid var(--ui-line) !important;
  box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, var(--ui-shadow);
}
[data-theme="glass"] .msg-wrap .msg {
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 1px 0 rgba(255,255,255,.18) inset;
}
/* 通用：卡片/浮层跟主题 */
[data-theme="pink"] .av-sheet,[data-theme="cream"] .av-sheet,
[data-theme="pink"] .hcui-card,[data-theme="cream"] .hcui-card,
[data-theme="pink"] .sys-card,[data-theme="cream"] .sys-card,
[data-theme="pink"] .grp-card,[data-theme="cream"] .grp-card {
  background: var(--ui-card) !important; color: var(--ui-ink) !important; border-color: var(--ui-line) !important;
}
[data-theme="pink"] .conv-card,[data-theme="cream"] .conv-card {
  background: var(--ui-card) !important; border-color: var(--ui-line) !important; color: var(--ui-ink) !important;
}
/* 霓虹：暗夜 + 粉青光 */
[data-theme="neon"] {
  --bg:#07070C; --bg-2:#0B0B13; --card:#11111B; --panel:#14141F; --line:rgba(120,220,255,.16);
  --pink:#FF4D9D; --pink-deep:#FF2E86; --pink-soft:rgba(255,77,157,.18); --pink-mist:rgba(80,220,255,.10);
  --ink:#EAF6FF; --ink-2:#8FA6B8; --ink-3:#5E7186;
  --bubble-them:#12202B; --bubble-me:#25101F;
  --ui-card:#11111B; --ui-line:rgba(120,220,255,.18); --ui-ink:#EAF6FF; --ui-ink2:#8FA6B8;
  --ui-shadow:0 0 0 1px rgba(120,220,255,.10), 0 14px 40px rgba(0,0,0,.6);
}
[data-theme="neon"] .hcui-btn.primary,
[data-theme="neon"] .sys-btn.deep {
  box-shadow: 0 0 18px rgba(255,46,134,.45), 0 0 34px rgba(80,220,255,.18);
}

/* hcui 弹窗跟随主题 */
[data-theme="pink"] .hcui-input,[data-theme="cream"] .hcui-input,
[data-theme="glass"] .hcui-input,[data-theme="neon"] .hcui-input {
  background: var(--ui-card); border-color: var(--ui-line); color: var(--ui-ink);
}
[data-theme="pink"] .hcui-btn,[data-theme="cream"] .hcui-btn,[data-theme="glass"] .hcui-btn {
  background: rgba(0,0,0,.05); color: var(--ui-ink);
}
[data-theme="pink"] .hcui-title,[data-theme="cream"] .hcui-title,[data-theme="glass"] .hcui-title { color: var(--ui-ink); }
[data-theme="pink"] .hcui-body,[data-theme="cream"] .hcui-body,[data-theme="glass"] .hcui-body { color: var(--ui-ink2); }

/* ══ 主题 × 壁纸 兼容：亮壁纸 / 暗壁纸分别处理 ══ */
#wallpaper::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: transparent; transition: background .3s;
}
body[data-wp="light"] #wallpaper::after { background: rgba(255,255,255,.28); }
body[data-wp="dark"]  #wallpaper::after { background: rgba(0,0,0,.26); }

/* 玻璃 + 亮壁纸 → 文字转深，卡片加白 */
[data-theme="glass"] body[data-wp="light"] .chat-head,
[data-theme="glass"] body[data-wp="light"] .conv-card,
[data-theme="glass"] body[data-wp="light"] .av-sheet,
[data-theme="glass"] body[data-wp="light"] .hcui-card {
  background: rgba(255,255,255,.72) !important;
  color: #2B2530 !important;
}
[data-theme="glass"] body[data-wp="light"] .conv-nm,
[data-theme="glass"] body[data-wp="light"] .grp-txt,
[data-theme="glass"] body[data-wp="light"] .hcui-title,
[data-theme="glass"] body[data-wp="light"] .av-title { color: #2B2530 !important; }
[data-theme="glass"] body[data-wp="light"] .conv-pv,
[data-theme="glass"] body[data-wp="light"] .hcui-body { color: #5C5260 !important; }
[data-theme="glass"] body[data-wp="light"] .msg-wrap.them .msg { color: #2B2530; }
[data-theme="glass"] body[data-wp="light"] .composer { background: rgba(255,255,255,.72) !important; }

/* 亮色主题（樱花粉/奶油）+ 暗壁纸 → 卡片保持不透明白，避免发灰 */
[data-theme="pink"] body[data-wp="dark"] .conv-card,
[data-theme="cream"] body[data-wp="dark"] .conv-card,
[data-theme="pink"] body[data-wp="dark"] .av-sheet,
[data-theme="cream"] body[data-wp="dark"] .av-sheet,
[data-theme="pink"] body[data-wp="dark"] .hcui-card,
[data-theme="cream"] body[data-wp="dark"] .hcui-card { background: var(--ui-card) !important; }

/* ══ 护眼纯黑 ══ */
[data-theme="black"] {
  --bg:#000000; --bg-2:#000000; --card:#0D0D0D; --panel:#111111; --line:#1E1E1E;
  --pink:#FF5C93; --pink-deep:#FF3D7F; --pink-soft:#2A1019; --pink-mist:#150A0E;
  --ink:#E9E6E9; --ink-2:#9A909A; --ink-3:#6B626B;
  --bubble-them:#141114; --bubble-me:#1B1218;
  --ui-card:#0D0D0D; --ui-line:#1E1E1E; --ui-ink:#E9E6E9; --ui-ink2:#9A909A;
  --ui-shadow:0 18px 40px rgba(0,0,0,.8);
}
[data-theme="black"] body { background:#000; }

/* ══ 玻璃加强：让壁纸真的透上来 ══ */
[data-theme="glass"] body { background: transparent; }
[data-theme="glass"] #wallpaper { opacity: 1 !important; }
[data-theme="glass"] .chat-head,
[data-theme="glass"] .composer,
[data-theme="glass"] .av-sheet,
[data-theme="glass"] .hcui-card,
[data-theme="glass"] .conv-card,
[data-theme="glass"] .grp-card,
[data-theme="glass"] .sys-card {
  background: rgba(255,255,255,.12) !important;
  backdrop-filter: blur(26px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(26px) saturate(190%) !important;
  border: 1px solid rgba(255,255,255,.22) !important;
  box-shadow: 0 1px 0 rgba(255,255,255,.28) inset, 0 18px 50px rgba(0,0,0,.45) !important;
}
[data-theme="glass"] .msg-wrap .msg {
  background: rgba(255,255,255,.16) !important;
  border: 1px solid rgba(255,255,255,.22);
}
[data-theme="glass"] .msg-wrap.me .msg {
  background: rgba(255,92,147,.28) !important;
}

/* ══════════════════════════════════════════
   玻璃 v2：清透版（iOS / HarmonyOS 那种亮玻璃）
   关键：低模糊 + 高饱和 + 高亮 + 双层高光
   ══════════════════════════════════════════ */
[data-theme="glass"] {
  --ui-card: rgba(255,255,255,.22);
  --ui-line: rgba(255,255,255,.45);
  --ui-ink: #FFFFFF;
  --ui-ink2: rgba(255,255,255,.82);
  --glass-blur: blur(14px) saturate(210%) brightness(1.12);
}
[data-theme="glass"] body { background: transparent !important; }
[data-theme="glass"] #wallpaper { opacity: 1 !important; filter: saturate(1.05) brightness(1.04) !important; }
[data-theme="glass"] #wallpaper::after { background: rgba(255,255,255,.03) !important; }

/* 卡片：清透 + 双层高光 */
[data-theme="glass"] .conv-card,
[data-theme="glass"] .grp-card,
[data-theme="glass"] .sys-card,
[data-theme="glass"] .tool-item,
[data-theme="glass"] .av-sheet,
[data-theme="glass"] .hcui-card {
  background: linear-gradient(135deg, rgba(255,255,255,.30) 0%, rgba(255,255,255,.14) 45%, rgba(255,255,255,.20) 100%) !important;
  backdrop-filter: var(--glass-blur) !important;
  -webkit-backdrop-filter: var(--glass-blur) !important;
  border: 1px solid rgba(255,255,255,.42) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.75),
    inset 0 -1px 0 rgba(255,255,255,.18),
    0 10px 34px rgba(0,0,0,.22) !important;
  color: #fff !important;
}
/* 顶栏 / 输入栏 */
[data-theme="glass"] .chat-head,
[data-theme="glass"] .composer,
[data-theme="glass"] .tab-bar,
[data-theme="glass"] .nav-bar {
  background: linear-gradient(180deg, rgba(255,255,255,.26), rgba(255,255,255,.12)) !important;
  backdrop-filter: var(--glass-blur) !important;
  -webkit-backdrop-filter: var(--glass-blur) !important;
  border-bottom: 1px solid rgba(255,255,255,.32) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6) !important;
}
/* 气泡 */
[data-theme="glass"] .msg-wrap.them .msg {
  background: linear-gradient(135deg, rgba(255,255,255,.34), rgba(255,255,255,.18)) !important;
  backdrop-filter: blur(10px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(10px) saturate(180%) !important;
  border: 1px solid rgba(255,255,255,.5) !important;
  color: #fff !important;
  text-shadow: 0 1px 2px rgba(0,0,0,.25);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 4px 14px rgba(0,0,0,.16) !important;
}
[data-theme="glass"] .msg-wrap.me .msg {
  background: linear-gradient(135deg, rgba(255,120,175,.55), rgba(255,92,147,.34)) !important;
  backdrop-filter: blur(10px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(10px) saturate(190%) !important;
  border: 1px solid rgba(255,190,215,.6) !important;
  color: #fff !important;
  text-shadow: 0 1px 2px rgba(0,0,0,.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 6px 18px rgba(255,92,147,.22) !important;
}
/* 文字统一提亮 */
[data-theme="glass"] .conv-nm,[data-theme="glass"] .grp-txt,
[data-theme="glass"] .me-sheet-title,[data-theme="glass"] .av-title,
[data-theme="glass"] .hcui-title,[data-theme="glass"] .sys-title,
[data-theme="glass"] .grp-title { color: #fff !important; text-shadow: 0 1px 2px rgba(0,0,0,.28); }
[data-theme="glass"] .conv-pv,[data-theme="glass"] .hcui-body,
[data-theme="glass"] .tool-s,[data-theme="glass"] .grp-arrow { color: rgba(255,255,255,.85) !important; }
/* 输入框 */
[data-theme="glass"] .composer textarea,
[data-theme="glass"] .composer input,
[data-theme="glass"] .hcui-input {
  background: rgba(255,255,255,.18) !important;
  border: 1px solid rgba(255,255,255,.35) !important;
  color: #fff !important;
}
[data-theme="glass"] .composer textarea::placeholder { color: rgba(255,255,255,.6); }

/* ══ 深色主题 × 壁纸：卡片/气泡/底栏必须是深色，否则灰底白字看不清 ══ */
[data-theme="neon"] body.has-wallpaper .conv-card,
[data-theme="black"] body.has-wallpaper .conv-card,
[data-theme="neon"] body.has-wallpaper .grp-card,
[data-theme="black"] body.has-wallpaper .grp-card,
[data-theme="neon"] body.has-wallpaper .sys-card,
[data-theme="black"] body.has-wallpaper .sys-card,
[data-theme="neon"] body.has-wallpaper .me-card,
[data-theme="black"] body.has-wallpaper .me-card,
[data-theme="neon"] body.has-wallpaper .grow-hero,
[data-theme="black"] body.has-wallpaper .grow-hero {
  background: rgba(17, 17, 27, .78) !important;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.08);
}
[data-theme="black"] body.has-wallpaper .conv-card,
[data-theme="black"] body.has-wallpaper .grp-card,
[data-theme="black"] body.has-wallpaper .sys-card,
[data-theme="black"] body.has-wallpaper .me-card,
[data-theme="black"] body.has-wallpaper .grow-hero {
  background: rgba(10, 10, 10, .82) !important;
}
[data-theme="neon"] body.has-wallpaper .tabbar,
[data-theme="black"] body.has-wallpaper .tabbar {
  background: rgba(10, 10, 12, .88) !important;
}
[data-theme="neon"] body.has-wallpaper .conv-nm,
[data-theme="black"] body.has-wallpaper .conv-nm,
[data-theme="neon"] .conv-nm,
[data-theme="black"] .conv-nm { color: #F2EAF0 !important; }
[data-theme="neon"] body.has-wallpaper .conv-pv,
[data-theme="black"] body.has-wallpaper .conv-pv,
[data-theme="neon"] .conv-pv,
[data-theme="black"] .conv-pv { color: #9AA3B2 !important; }

/* 护眼纯黑：消息气泡（含壁纸模式）必须是黑的 */
[data-theme="black"] .msg-wrap.them .msg,
[data-theme="black"] body.has-wallpaper .msg.them {
  background: #141114 !important; color: #E9E6E9 !important;
  border: 1px solid #242024;
}
[data-theme="black"] .msg-wrap.me .msg,
[data-theme="black"] body.has-wallpaper .msg.me {
  background: #1B1218 !important; color: #F4E9EE !important;
  border: 1px solid #2A1E24;
}
[data-theme="black"] .composer,
[data-theme="black"] .chat-head { background: rgba(0,0,0,.9) !important; }

/* 霓虹：气泡 */
[data-theme="neon"] .msg-wrap.them .msg,
[data-theme="neon"] body.has-wallpaper .msg.them {
  background: #12202B !important; color: #DCEBF7 !important;
  border: 1px solid rgba(120,220,255,.22);
}
[data-theme="neon"] .msg-wrap.me .msg,
[data-theme="neon"] body.has-wallpaper .msg.me {
  background: #25101F !important; color: #FFE3F0 !important;
  border: 1px solid rgba(255,46,134,.28);
}

/* ══ 深色主题可读性补丁：标题、聊天头部、气泡（带壁纸也压得住） ══ */
[data-theme="black"] h1,
[data-theme="neon"] h1,
[data-theme="glass"] h1 {
  color: #FFFFFF !important;
  text-shadow: 0 2px 8px rgba(0,0,0,.75), 0 0 2px rgba(0,0,0,.9) !important;
}
[data-theme="black"] .chat-title,
[data-theme="neon"] .chat-title,
[data-theme="glass"] .chat-title {
  color: #FFFFFF !important;
  text-shadow: 0 1px 6px rgba(0,0,0,.85) !important;
}
[data-theme="black"] .chat-title-wrap,
[data-theme="neon"] .chat-title-wrap { color: #fff !important; }
[data-theme="black"] .chat-sub,
[data-theme="neon"] .chat-sub,
[data-theme="black"] .chat-title-wrap *,
[data-theme="neon"] .chat-title-wrap * {
  color: rgba(255,255,255,.82) !important;
  text-shadow: 0 1px 4px rgba(0,0,0,.8) !important;
}
/* 壁纸压暗，深色主题下文字才立得住 */
[data-theme="black"] #wallpaper { filter: brightness(.42) saturate(.9) !important; }
[data-theme="neon"] #wallpaper { filter: brightness(.5) saturate(1.1) !important; }
/* 气泡强制实底 */
[data-theme="black"] #messages .msg.them,
[data-theme="black"] #messages .msg-wrap.them .msg {
  background: #141114 !important; color: #ECE8EC !important;
  border: 1px solid #2A242A !important; text-shadow: none !important;
}
[data-theme="black"] #messages .msg.me,
[data-theme="black"] #messages .msg-wrap.me .msg {
  background: #1B1218 !important; color: #F6ECF1 !important;
  border: 1px solid #33242B !important; text-shadow: none !important;
}
[data-theme="neon"] #messages .msg.them,
[data-theme="neon"] #messages .msg-wrap.them .msg {
  background: #101C26 !important; color: #DCEBF7 !important;
  border: 1px solid rgba(120,220,255,.28) !important;
}
[data-theme="neon"] #messages .msg.me,
[data-theme="neon"] #messages .msg-wrap.me .msg {
  background: #24101E !important; color: #FFE6F1 !important;
  border: 1px solid rgba(255,46,134,.34) !important;
}


/* ══ 底栏主题化 + 滑动胶囊 ══ */
.tab-pill {
  position: absolute; top: 8px; left: 0; height: calc(100% - 16px - var(--safe-b));
  border-radius: 14px; background: var(--tab-pill, rgba(255,92,147,.12));
  transition: transform .18s cubic-bezier(.2,.8,.3,1), width .18s;
  pointer-events: none; z-index: 0;
}
[data-theme="pink"]  { --tab-bg:#FFFFFF;  --tab-line:#F6E3EA; --tab-idle:#B9AEB6; --tab-active:#FF5C93; --tab-pill:rgba(255,92,147,.10); }
[data-theme="cream"] { --tab-bg:#FFFDF8;  --tab-line:#EADFCB; --tab-idle:#BFB3A2; --tab-active:#B07C4A; --tab-pill:rgba(176,124,74,.10); }
[data-theme="glass"] { --tab-bg:rgba(255,255,255,.14); --tab-line:rgba(255,255,255,.22); --tab-idle:rgba(255,255,255,.62); --tab-active:#FFFFFF; --tab-pill:rgba(255,255,255,.20); }
[data-theme="neon"]  { --tab-bg:rgba(8,8,12,.94); --tab-line:rgba(80,220,255,.18); --tab-idle:#5E7186; --tab-active:#FF2E86; --tab-pill:rgba(255,46,134,.16); }
[data-theme="black"] { --tab-bg:#000000;  --tab-line:#1E1E1E; --tab-idle:#6B626B; --tab-active:#FF5C93; --tab-pill:rgba(255,92,147,.14); }
[data-theme="glass"] .tabbar { backdrop-filter: blur(22px) saturate(180%); -webkit-backdrop-filter: blur(22px) saturate(180%); }
[data-theme="neon"] .tabbar button.on svg { filter: drop-shadow(0 0 6px rgba(255,46,134,.6)); }

/* 有壁纸时底栏也必须跟主题（压过旧的浅色 !important 规则） */
body.has-wallpaper .tabbar {
  background: var(--tab-bg, rgba(253,250,247,.94)) !important;
  border-top: 1px solid var(--tab-line, var(--line)) !important;
  backdrop-filter: blur(18px) saturate(170%);
  -webkit-backdrop-filter: blur(18px) saturate(170%);
}
body.has-wallpaper .tabbar button { color: var(--tab-idle, var(--ink-3)) !important; }
body.has-wallpaper .tabbar button.on { color: var(--tab-active, var(--pink-deep)) !important; }
