/* 梦梦参数社区 — 简约华丽帅气主题 */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg1: #0a0a16;
  --bg2: #0f0f26;
  --bg3: #151535;
  --card: rgba(255,255,255,0.05);
  --card-border: rgba(255,255,255,0.08);
  --text: #eef1ff;
  --dim: #8f98c0;
  --accent: #7c6cff;
  --accent2: #4fd8ff;
  --pink: #ff6ec7;
  --gold: #ffd166;
  --green: #34d399;
  --red: #f87171;
  --radius: 13px;
  --shadow: 0 8px 28px rgba(0,0,0,0.38);
  --glow: 0 0 18px rgba(124,108,255,0.22);
}

html, body { height: 100%; }

body {
  font-family: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", -apple-system, sans-serif;
  background: linear-gradient(135deg, var(--bg1), var(--bg2) 50%, var(--bg3));
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== 动态光晕粒子背景 ===== */
#bgCanvas { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.glow { position: fixed; border-radius: 50%; filter: blur(90px); opacity: 0.35; pointer-events: none; z-index: 0; }
.glow.g1 { width: 360px; height: 360px; background: #7c6cff; top: -120px; right: -100px; opacity: 0.24; }
.glow.g2 { width: 300px; height: 300px; background: #4fd8ff; bottom: -100px; left: -80px; opacity: 0.14; }
.glow.g3 { width: 200px; height: 200px; background: #8b7cff; top: 40%; left: 55%; opacity: 0.08; }

/* ===== 玻璃卡片 ===== */
.glass {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

/* ===== 头部 ===== */
header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px;
  background: rgba(10,10,22,0.78);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.logo { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 800; letter-spacing: 0.5px; flex-shrink: 0; min-width: 0; }
.logo .icon {
  width: 32px; height: 32px; min-width: 32px; max-width: 32px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; line-height: 1; font-weight: 700; color: #fff;
  box-shadow: var(--glow); overflow: hidden;
}
.logo .grad { white-space: nowrap; 
  background: linear-gradient(90deg, #b3a6ff, #7ce7ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hbtn {
  padding: 7px 16px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600;
  cursor: pointer; border: none;
  transition: all .25s;
}
.hbtn.ghost { background: rgba(255,255,255,0.08); color: var(--text); border: 1px solid rgba(255,255,255,0.14); }
.hbtn.ghost:hover { background: rgba(255,255,255,0.16); transform: translateY(-1px); }
.hbtn.grad { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; box-shadow: var(--glow); }
.hbtn.grad:hover { transform: translateY(-1px) scale(1.03); }
.userchip {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  font-size: 13px;
}
.userchip .avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--pink));
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}
.userchip .tag { font-size: 10px; color: var(--gold); background: rgba(255,209,102,0.15); padding: 2px 7px; border-radius: 8px; margin-left: 4px; }

/* ===== 主体 ===== */
main { position: relative; z-index: 1; max-width: 680px; margin: 0 auto; padding: 14px 14px 110px; }
.banner {
  padding: 18px 20px; border-radius: 16px; margin-bottom: 14px;
  position: relative; overflow: hidden;
  background: linear-gradient(120deg, rgba(124,108,255,0.22), rgba(79,216,255,0.14));
  border: 1px solid rgba(124,108,255,0.28);
}
.banner::after {
  content: ""; position: absolute; width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(255,255,255,0.18), transparent 70%);
  top: -60px; right: -40px; border-radius: 50%;
}
.banner h1 { font-size: 20px; font-weight: 800; letter-spacing: 0.5px; }
.banner h1 .grad {
  background: linear-gradient(90deg, #c4b8ff, #8ae8ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.banner p { color: var(--dim); font-size: 12.5px; margin-top: 5px; }
.banner .stats { display: flex; gap: 16px; margin-top: 10px; font-size: 11.5px; color: var(--dim); }
.banner .stats b { color: var(--text); font-size: 14px; margin-right: 3px; }

/* 帖子 */
.feed-title { display: flex; align-items: center; justify-content: space-between; margin: 6px 2px 10px; font-size: 14px; font-weight: 700; color: var(--dim); }
.feed-title .line { flex: 1; height: 1px; background: rgba(255,255,255,0.08); margin-left: 12px; }
.post { padding: 14px; margin-bottom: 10px; transition: transform .25s, box-shadow .25s; }
.post:hover { transform: translateY(-2px); box-shadow: var(--shadow), 0 0 22px rgba(124,108,255,0.14); }
.post .phead { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.post .pavatar {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px; flex-shrink: 0;
}
.post .pname { font-weight: 700; font-size: 13.5px; }
.post .ptime { font-size: 10.5px; color: var(--dim); margin-top: 2px; }
.post .ptext { font-size: 13.5px; line-height: 1.65; color: #dde3ff; word-break: break-word; white-space: pre-wrap; }
.post .admin-del { margin-left: auto; padding: 5px 12px; border-radius: 8px; font-size: 11px; color: var(--red); background: rgba(248,113,113,0.1); border: 1px solid rgba(248,113,113,0.2); cursor: pointer; }

.empty { text-align: center; padding: 44px 16px; color: var(--dim); }
.empty .big { font-size: 38px; margin-bottom: 10px; opacity: 0.6; }
.empty p { font-size: 14px; }

/* 帖子预览4行 */
.ptext.preview {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pmore {
  margin-top: 8px;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  color: #818cf8;
  background: rgba(124,108,255,0.1);
  border: 1px solid rgba(124,108,255,0.25);
  cursor: pointer;
  display: inline-block;
}
.pmore:hover { background: rgba(124,108,255,0.2); }

/* 右下角发帖按钮 */
.fab {
  position: fixed; right: 18px; bottom: 96px; z-index: 95;
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--pink));
  color: #fff; font-size: 24px; font-weight: 300;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; border: none;
  box-shadow: 0 8px 30px rgba(124,108,255,0.5);
  transition: all .25s;
}
.fab:hover { transform: scale(1.1) rotate(90deg); }
.fab:active { transform: scale(0.95); }

/* ===== 弹窗 ===== */
.overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(5,5,15,0.65);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity .3s;
}
.overlay.show { opacity: 1; pointer-events: auto; }
.modal {
  width: 100%; max-width: 360px; padding: 20px;
  max-height: 86vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
  transform: translateY(20px) scale(0.96);
  transition: transform .35s cubic-bezier(.34,1.56,.64,1);
}
.overlay.show .modal { transform: translateY(0) scale(1); }
.modal h2 { font-size: 17px; margin-bottom: 6px; text-align: center; }
.modal .memo { font-size: 12.5px; color: var(--dim); text-align: center; line-height: 1.7; margin-bottom: 14px; }
.modal .err { color: var(--red); font-size: 12px; text-align: center; min-height: 18px; margin-bottom: 8px; }
.modal textarea {
  width: 100%; min-height: 110px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  color: var(--text); font-size: 13.5px;
  padding: 12px; resize: vertical;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.modal textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124,108,255,0.2); }
.mbtn { width: 100%; padding: 11px; border: none; border-radius: 12px; font-size: 14px; font-weight: 700; cursor: pointer; transition: all .25s; }
.mbtn.grad { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; box-shadow: var(--glow); }
.mbtn.grad:hover { transform: translateY(-1px); }
.mbtn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.mbtn.plain { background: rgba(255,255,255,0.08); color: var(--dim); margin-top: 10px; }

/* 登录注册输入框 */
.inp {
  width: 100%; padding: 11px 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  color: var(--text); font-size: 14px;
  outline: none; margin-bottom: 12px;
  transition: border-color .2s, box-shadow .2s;
}
.inp:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124,108,255,0.2); }
.inp::placeholder { color: #6b7396; }

/* 后台表格 */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid rgba(255,255,255,0.07); }
th { color: var(--dim); font-weight: 600; font-size: 12px; }
td .del { padding: 4px 12px; border-radius: 8px; font-size: 11px; color: var(--red); background: rgba(248,113,113,0.1); border: 1px solid rgba(248,113,113,0.25); cursor: pointer; }
.switch { display: flex; gap: 8px; margin-bottom: 16px; }
.switch .st {
  flex: 1; text-align: center; padding: 10px;
  border-radius: 12px; font-size: 14px; font-weight: 600; cursor: pointer;
  background: rgba(255,255,255,0.06); color: var(--dim);
  transition: all .25s;
}
.switch .st.on { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; box-shadow: var(--glow); }
.badge-admin { display: inline-block; font-size: 10px; padding: 2px 8px; border-radius: 8px; background: rgba(255,209,102,0.15); color: var(--gold); margin-left: 6px; }
.toast {
  position: fixed; left: 50%; top: 52px; z-index: 200;
  transform: translateX(-50%) translateY(20px);
  background: rgba(20,20,45,0.92);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--text); font-size: 13px;
  padding: 12px 22px; border-radius: 999px;
  opacity: 0; pointer-events: none;
  transition: all .3s;
  box-shadow: var(--shadow);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
/* ===== v8 新增：用户下拉菜单 ===== */
.usermenu {
  position: fixed; top: 56px; right: 12px; z-index: 999;
  background: rgba(20,22,40,0.96); border: 1px solid rgba(124,108,255,0.35);
  border-radius: 14px; padding: 6px; min-width: 150px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  opacity: 0; transform: translateY(-12px) scale(0.95); pointer-events: none;
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: top right;
}
.usermenu.show { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.um-item {
  padding: 10px 12px; border-radius: 9px; cursor: pointer;
  font-size: 13px; color: var(--text); transition: background 0.2s;
}
.um-item:hover { background: rgba(124,108,255,0.15); }
.um-danger { color: #ff6b6b !important; }
.um-danger:hover { background: rgba(255,107,107,0.12) !important; }
.userchip {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(124,108,255,0.10); border: 1px solid rgba(124,108,255,0.25);
  border-radius: 40px; padding: 3px 10px 3px 3px; cursor: pointer;
  transition: all 0.25s;
}
.userchip:active { transform: scale(0.95); }
.avatar, .avatar-img {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, #7c6cff, #4fd8ff);
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px; flex-shrink: 0;
}
.avatar-img { object-fit: cover; }
.avatar-img.big, .avatar.big { width: 88px; height: 88px; font-size: 34px; }
.uc-name { font-size: 14px; font-weight: 600; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uc-arrow { color: var(--dim); font-size: 11px; }
.tag { background: rgba(255,209,102,0.2); color: #ffd166; font-size: 10px; padding: 1px 6px; border-radius: 8px; margin-left: 4px; }
/* ===== v8 新增：帖子操作栏 ===== */
.pactions {
  display: flex; gap: 6px; margin-top: 10px; padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.06); flex-wrap: wrap;
}
.pbtn {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
  color: var(--text); border-radius: 16px; padding: 5px 11px;
  font-size: 12.5px; cursor: pointer; transition: all 0.2s;
}
.pbtn:active { transform: scale(0.92); }
.pbtn.on { background: linear-gradient(135deg, rgba(255,80,80,0.55), rgba(255,107,107,0.35)); border-color: #ff5a5a; color: #fff; box-shadow: 0 0 12px rgba(255,80,80,0.35); font-weight: 700; }
.pbtn.hang.on { background: rgba(255,165,0,0.18); border-color: rgba(255,165,0,0.5); color: #ffb84d; }
.pbtn.la.on { background: rgba(96,165,250,0.18); border-color: rgba(96,165,250,0.5); color: #7ab8ff; }
/* ===== v8 新增：评论区 ===== */
.replybox { display: none; margin-top: 10px; }
.replybox.open { display: block; animation: fadeIn 0.3s; }
.reply-list { max-height: 320px; overflow-y: auto; }
.reply-item {
  display: flex; gap: 10px; padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.rp-avatar {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #4fd8ff, #7c6cff); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700;
}
.rp-body { flex: 1; min-width: 0; }
.rp-name { font-size: 12px; color: #9aa0ff; font-weight: 600; }
.rp-text { font-size: 13px; margin: 3px 0; word-break: break-word; }
.rp-time { font-size: 11px; color: var(--dim); }
.reply-input { display: flex; gap: 8px; margin-top: 10px; }
.reply-input input {
  flex: 1; background: rgba(255,255,255,0.06); border: 1px solid rgba(124,108,255,0.3);
  border-radius: 20px; padding: 9px 14px; color: var(--text); font-size: 13px; outline: none;
}
.reply-input .mbtn { flex-shrink: 0; }
/* ===== v8 新增：排行榜 ===== */
.header-mid { display: flex; align-items: center; }
.rank-modal { max-height: 78vh; display: flex; flex-direction: column; }
.rank-tabs { display: flex; gap: 8px; margin: 10px 0; }
.rtab {
  flex: 1; padding: 10px 0; border-radius: 10px; font-size: 14px; font-weight: 600;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: var(--text); cursor: pointer;
}
.rtab.active { background: rgba(124,108,255,0.25); border-color: rgba(124,108,255,0.6); }
.rank-list { flex: 1; overflow-y: auto; min-height: 160px; margin-bottom: 10px; }
.rank-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 10px;
  border-radius: 12px; margin-bottom: 8px; background: rgba(255,255,255,0.04);
}
.rk-no { font-size: 20px; width: 34px; text-align: center; flex-shrink: 0; }
.rk-main { flex: 1; min-width: 0; }
.rk-name { font-size: 13px; font-weight: 600; color: #9aa0ff; }
.rk-text { font-size: 12px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-cnt { font-size: 14px; font-weight: 700; color: #ffd166; flex-shrink: 0; }
/* ===== v8 新增：个人中心 ===== */
.profile-main { display: flex; justify-content: center; padding-top: 24px; }
.profile-card {
  width: 100%; max-width: 420px; padding: 28px 22px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.profile-avatar-wrap { position: relative; }
.profile-avatar {
  width: 96px; height: 96px; border-radius: 50%;
  background: linear-gradient(135deg, #7c6cff, #4fd8ff); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 38px; font-weight: 700; object-fit: cover;
}
.avatar-edit {
  position: absolute; right: -2px; bottom: -2px; width: 34px; height: 34px;
  background: linear-gradient(135deg, #7c6cff, #ff6ec7); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
  cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,0.4); border: 2px solid #161830;
}
.avatar-edit:active { transform: scale(0.9); }
.profile-name { margin: 4px 0 0; font-size: 20px; }
.profile-section {
  width: 100%; text-align: left; margin-top: 14px; padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.ps-title { font-size: 14px; font-weight: 700; margin-bottom: 10px; color: #9aa0ff; }
.profile-row { display: block; }
.profile-row .inp { width: 100%; box-sizing: border-box; margin-bottom: 10px; }
.profile-row .mbtn { width: 100%; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ===== v9 新增：头像裁剪 + 排行榜按钮 ===== */
.crop-wrap { display: flex; justify-content: center; margin: 10px 0; }
#cropCanvas { width: 260px; height: 260px; border-radius: 50%; background: rgba(0,0,0,0.4); touch-action: none; cursor: grab; }
.crop-zoom { display: flex; gap: 8px; margin-bottom: 10px; }
.crop-zoom .cz { flex: 1; margin-top: 0; }
.rank-btn { flex-shrink: 0; margin-left: 8px; padding: 6px 12px; font-size: 12px; }

/* ===== v9: 排行榜按钮（最新分享行右侧） ===== */
.rank-btn {
  margin-left: 12px; flex-shrink: 0; font-size: 13px;
  background: linear-gradient(135deg, rgba(124,108,255,0.25), rgba(255,110,199,0.2));
  border: 1px solid rgba(124,108,255,0.5); color: var(--text);
  border-radius: 20px; padding: 5px 14px; cursor: pointer; font-weight: 600;
  transition: all 0.2s;
}
.rank-btn:active { transform: scale(0.94); }
/* v9: 改名按钮不再占满整行 */
.profile-row .mbtn { width: auto; align-self: flex-end; padding: 10px 26px; }
.profile-row { display: block; text-align: left; }
.profile-row .inp { width: 100%; box-sizing: border-box; margin-bottom: 10px; }
/* v9: 头像裁剪弹窗 */
.crop-mask { position: fixed; inset: 0; background: rgba(0,0,0,0.85); z-index: 1000; display: none; align-items: center; justify-content: center; }
.crop-mask.show { display: flex; }
.crop-box { width: 300px; text-align: center; }
.crop-stage {
  position: relative; width: 280px; height: 280px; margin: 12px auto; overflow: hidden;
  border-radius: 50%; border: 3px solid rgba(124,108,255,0.8);
  box-shadow: 0 0 0 9999px rgba(0,0,0,0.5); background: #000;
}
.crop-stage img { position: absolute; top: 0; left: 0; cursor: move; max-width: none; user-select: none; -webkit-user-select: none; }
.crop-controls { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 12px 0; }
.crop-controls button {
  width: 40px; height: 40px; border-radius: 50%; font-size: 20px; font-weight: 700;
  background: rgba(124,108,255,0.25); border: 1px solid rgba(124,108,255,0.5); color: #fff; cursor: pointer;
}

/* ===== v10 新增 ===== */
/* 回复发送按钮：防止 .mbtn width:100% 撑爆屏幕 */
.reply-input .mbtn { width: auto; padding: 10px 18px; flex-shrink: 0; border-radius: 12px; }
.reply-collapse { text-align: center; padding: 9px 0 2px; color: var(--dim); cursor: pointer; font-size: 13px; }
.reply-collapse:hover { color: var(--accent); }
/* 外文自动译文 */
.translated { margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: rgba(124,108,255,.12); color: #c9c2ff; font-size: 13px; line-height: 1.6; }
/* 帖子媒体 */
.pmedia { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.pmedia-img { max-width: 100%; border-radius: 10px; cursor: zoom-in; display: block; }
.pmedia-vid { max-width: 100%; max-height: 420px; border-radius: 10px; background: #000; display: block; }
/* 小头像 */
.avatar-img.sm { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
/* 发帖媒体选择 */
.media-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.media-row .mbtn { width: auto; padding: 9px 14px; font-size: 13px; margin-top: 0; }
.media-hint { font-size: 12px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-preview img { max-width: 100%; max-height: 180px; border-radius: 10px; margin-top: 8px; }
/* 媒体预览项 + 删除按钮 */
.media-preview-item { position: relative; display: inline-block; margin-top: 8px; }
.media-preview-item img, .media-preview-item video { max-width: 100%; max-height: 120px; border-radius: 10px; display: block; }
.media-remove { position: absolute; top: -8px; right: -8px; width: 26px; height: 26px; border-radius: 50%; border: none; background: rgba(255,80,80,.9); color: #fff; font-size: 13px; line-height: 1; cursor: pointer; z-index: 5; }
/* 删除预览 */
.del-preview { margin: 8px 0; padding: 8px 10px; border-radius: 8px; background: rgba(255,255,255,.06); color: var(--dim); font-size: 13px; word-break: break-all; }

/* ===== v17 底部双分页 dock ===== */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  display: flex; background: rgba(12, 12, 26, 0.85);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
}
.dock-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: none; border: none; color: var(--dim); font-size: 12px;
  padding: 6px 0; cursor: pointer; transition: color .2s;
}
.dock-btn i {
  font-style: normal; font-size: 16px; font-weight: 700;
  width: 30px; height: 30px; line-height: 30px; text-align: center;
  border-radius: 10px; background: rgba(255, 255, 255, 0.06);
}
.dock-btn.on { color: var(--text); }
.dock-btn.on i { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; box-shadow: 0 4px 14px rgba(124, 108, 255, 0.35); }
main { padding-bottom: 74px; }

/* ===== v17 聊天区（照搬凌宇论坛样式，梦梦配色） ===== */
.chat-wrap {
  display: flex; flex-direction: column;
  height: calc(100vh - 250px); margin-top: 12px;
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: 16px; overflow: hidden;
}
.chat-head {
  padding: 12px 16px; border-bottom: 1px solid var(--card-border);
  display: flex; align-items: center; gap: 8px;
}
.chat-head b { font-size: 15px; color: var(--text); }
.chat-head span { font-size: 11px; color: var(--dim); }
.chat-list { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.chat-empty { text-align: center; padding: 30px 0; font-size: 13px; color: var(--dim); }
.chat-day { text-align: center; font-size: 11px; color: var(--dim); margin: 2px 0; }
.chat-msg { max-width: 78%; display: flex; flex-direction: column; }
.chat-msg.mine { align-self: flex-end; align-items: flex-end; }
.chat-msg:not(.mine) { align-self: flex-start; align-items: flex-start; }
.chat-name { font-size: 10px; color: var(--dim); margin-bottom: 3px; display: flex; align-items: center; gap: 4px; }
.chat-bubble {
  background: rgba(255, 255, 255, 0.08); color: var(--text);
  padding: 9px 13px; border-radius: 14px; font-size: 14px; line-height: 1.6;
  word-break: break-word; border-bottom-left-radius: 4px;
}
.chat-msg.mine .chat-bubble {
  background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff;
  border-bottom-left-radius: 14px; border-bottom-right-radius: 4px;
}
.chat-time { font-size: 9px; opacity: .55; margin-top: 3px; text-align: right; }
.chat-foot {
  padding: 10px 12px; border-top: 1px solid var(--card-border);
  display: flex; gap: 8px; align-items: center;
}
.chat-foot input {
  flex: 1; min-height: 44px; margin: 0; font-size: 15px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--card-border);
  border-radius: 12px; color: var(--text); padding: 0 14px;
}
.chat-send { width: auto; padding: 0 22px; margin: 0; min-height: 44px; flex-shrink: 0; }

/* ===== v17 管字徽章 ===== */
.mod-badge {
  display: inline-block; width: 18px; height: 18px; line-height: 18px;
  text-align: center; font-size: 11px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #7c6cff, #4fd8ff);
  border-radius: 50%; margin-left: 4px; vertical-align: 1px;
  box-shadow: 0 2px 8px rgba(124, 108, 255, 0.45);
}
.mod-badge.sm { width: 15px; height: 15px; line-height: 15px; font-size: 9px; }
.mod-badge.xs { width: 13px; height: 13px; line-height: 13px; font-size: 8px; }

/* ===== v19 聊天头像 + 回复头像 ===== */
.chat-av, .rp-avatar-img {
  width: 22px; height: 22px; border-radius: 50%; object-fit: cover;
  display: inline-block; vertical-align: -5px; margin-right: 4px;
  border: 1px solid rgba(255,255,255,0.15);
}
.chat-av {
  width: 20px; height: 20px; font-size: 10px; line-height: 20px;
  text-align: center; background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff; font-weight: 700; vertical-align: -4px;
}
.chat-un { margin-right: 2px; }
.rp-avatar-img { width: 26px; height: 26px; vertical-align: middle; }

/* 长文本展开防卡：强制断行，避免超长串布局计算卡顿 */
.ptext { overflow-wrap: break-word; word-break: break-word; white-space: pre-wrap; }
.translated { margin-top: 6px; padding: 6px 9px; background: rgba(124,77,255,.08); border-left: 2px solid var(--accent,#7c4dff); border-radius: 0 8px 8px 0; font-size: 13px; color: #8a8fa3; line-height: 1.6; }
