/* ---------------- 基础 ---------------- */
:root {
  --bg: #080b14;
  --bg-soft: #0e1424;
  --panel: rgba(16, 22, 38, 0.82);
  --line: rgba(255, 255, 255, 0.10);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #e8ecf6;
  --muted: #8b95ab;
  --gold: #07C160;
  --gold-soft: rgba(7, 193, 96, 0.16);
  --accent: #4c7dff;
  --danger: #ff6b6b;
  --radius: 14px;
  --topbar-h: 64px;
}

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

/* 作者样式里的 display 会盖掉 UA 的 [hidden]，这里统一兜住 */
[hidden] { display: none !important; }

html, body {
  margin: 0; height: 100%;
  background: radial-gradient(1200px 700px at 50% -10%, #16203a 0%, var(--bg) 60%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  overflow: hidden;
}

button {
  font: inherit; color: inherit; cursor: pointer;
  border: 1px solid var(--line-strong); background: rgba(255,255,255,0.05);
  padding: 8px 14px; border-radius: 10px; transition: .18s;
}
button:hover { background: rgba(255,255,255,0.12); }
button.primary {
  background: linear-gradient(180deg, #07C160, #06AD56);
  border-color: rgba(0,0,0,0); color: #201607; font-weight: 700;
}
button.primary:hover { filter: brightness(1.08); }
button.ghost { background: rgba(255,255,255,0.04); }
button.tiny { padding: 4px 10px; font-size: 12px; border-radius: 8px; }
button.linky {
  background: none; border: none; padding: 0 4px; color: var(--gold);
  font-size: 12px; text-decoration: underline;
}
button:disabled { opacity: .5; cursor: not-allowed; }
button.wide { width: 100%; padding: 12px; font-size: 15px; }

input, textarea {
  font: inherit; color: var(--text); width: 100%;
  background: rgba(255,255,255,0.06); border: 1px solid var(--line-strong);
  border-radius: 10px; padding: 10px 12px; outline: none; resize: none;
}
input:focus, textarea:focus { border-color: rgba(7, 193, 96,0.55); background: rgba(255,255,255,0.09); }

.muted { color: var(--muted); }
.tiny { font-size: 12px; }
.err { color: var(--danger); font-size: 13px; min-height: 18px; margin-top: 8px; }

/* ---------------- 布局 ---------------- */
.layout {
  height: 100vh; height: 100dvh;
  display: grid; grid-template-rows: var(--topbar-h) 1fr;
}

.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 0 16px; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #141b2d, #0c1120);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.logo {
  flex: 0 0 auto;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  filter: drop-shadow(0 2px 8px rgba(7, 193, 96,.35));
}
.logo img { width: 100%; height: 100%; border-radius: 9px; display: block; }
.brand-mark {
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--gold);
  padding-left: 9px;
  border-left: 1px solid rgba(7, 193, 96, .32);
  white-space: nowrap;
}
.title-box { min-width: 0; }
.title-box h1 { margin: 0; font-size: 17px; letter-spacing: .5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.title-box p { margin: 2px 0 0; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 42vw; }
.stats { display: flex; gap: 8px; margin-left: auto; align-items: center; }

/* 在线人数小面板：两行「标签 + 数字」，带彩色小圆点 */
.stats-board {
  display: grid;
  grid-template-columns: auto auto auto;
  align-items: center;
  column-gap: 6px;
  row-gap: 2px;
  padding: 4px 10px 4px 9px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}
.sb-dot { width: 6px; height: 6px; border-radius: 50%; box-shadow: 0 0 7px currentColor; }
.sb-dot.all { background: #7fb6ff; color: #7fb6ff; }
.sb-dot.room { background: var(--gold); color: var(--gold); }
.sb-label { font-size: 10.5px; color: #93a5c4; letter-spacing: .02em; white-space: nowrap; }
.sb-num {
  font-size: 13px; font-weight: 600; color: #eef2fa;
  font-variant-numeric: tabular-nums; min-width: 20px; text-align: right;
}
.chip {
  font-size: 12px; padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255,255,255,0.04); color: var(--muted);
  white-space: nowrap;
}
.chip.gold { color: var(--gold); border-color: rgba(7, 193, 96,.4); background: var(--gold-soft); }
.disc-lang-note { margin: 0 0 10px; color: #f0cf8d; }

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .04);
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}
.lang-btn:hover { color: var(--gold); border-color: rgba(7, 193, 96, .5); }
.lang-globe { font-size: 12px; opacity: .9; }
.lang-code { font-weight: 600; letter-spacing: .5px; }
.lang-menu {
  position: absolute;
  top: calc(var(--topbar-h) - 6px);
  right: 18px;
  z-index: 30;
  min-width: 148px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, #141b2d, #0d1220);
  box-shadow: 0 14px 36px rgba(0, 0, 0, .55);
}
.lang-item {
  text-align: left;
  padding: 7px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
}
.lang-item:hover { background: rgba(255, 255, 255, .06); }
.lang-item.sel { color: var(--gold); background: var(--gold-soft); }

.actions { display: flex; gap: 8px; }
.topbar-toggle { display: none; }

main { display: grid; grid-template-columns: 1fr 380px; min-height: 0; }

#stage-area { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
#scene { position: absolute; inset: 0; }
#scene canvas { display: block; width: 100%; height: 100%; }

.scene-overlay {
  position: absolute; left: 0; right: 0; display: flex; align-items: center;
  justify-content: space-between; gap: 10px; padding: 10px 14px; pointer-events: none;
}
.scene-overlay.top { top: 0; }
.scene-overlay.bottom { bottom: 0; align-items: flex-end; }
.scene-overlay button { pointer-events: auto; }
.stage-line {
  font-size: 13px; color: #f0dfb6; background: rgba(10,14,25,.55);
  border: 1px solid rgba(7, 193, 96,.28); padding: 5px 12px; border-radius: 999px;
  max-width: 70%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hint { font-size: 11px; color: rgba(255,255,255,.35); }
/* 台上人数：直接叠在 3D 场景顶部右侧，不占顶栏 */
.stage-count {
  flex: none;
  font-size: 12px;
  color: var(--gold);
  background: rgba(10, 14, 25, .55);
  border: 1px solid rgba(7, 193, 96, .34);
  padding: 5px 11px;
  border-radius: 999px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.me-badge {
  position: absolute; right: 14px; bottom: 40px;
  display: flex; align-items: center; gap: 8px; padding: 6px 10px;
  background: rgba(10,14,25,.78); border: 1px solid var(--line); border-radius: 999px;
  font-size: 12px;
}

/* ---------------- 聊天面板 ---------------- */
#chat-panel {
  display: flex; flex-direction: column; min-height: 0;
  border-left: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(14,20,36,.92), rgba(8,11,20,.92));
}

.messages {
  flex: 1; overflow-y: auto; overflow-x: hidden; scroll-behavior: smooth;
  padding: 12px 12px 8px; background: #191919;
}

/* 完全照微信（深色模式）：头像 44px 圆角方形、名字只在组首、白/绿气泡带尖角、时间做分隔线 */
.msg { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; }
.msg.cont { margin-top: -7px; }
.msg .ava {
  flex: 0 0 auto; width: 44px; height: 44px; border-radius: 5px; font-size: 24px;
  border: none; background: #2C2C2C;
}
.msg.cont .ava { visibility: hidden; }
.msg .body {
  min-width: 0; flex: 0 1 auto; max-width: calc(100% - 54px);
  display: flex; flex-direction: column; align-items: flex-start;
}
.msg .meta { margin-bottom: 3px; }
.msg .meta b { font-size: 12px; font-weight: 400; color: #7C7C7C; }
.msg.cont .meta { display: none; }
.msg.cont .text::before { display: none; }
.msg .text {
  font-size: 15px; line-height: 1.45; word-break: break-word; overflow-wrap: anywhere; white-space: pre-wrap;
  color: #E6E6E6; background: #2C2C2C; border: none; padding: 9px 12px; border-radius: 5px;
  display: inline-block; max-width: 100%; position: relative; font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}
.msg .text::before {
  content: ""; position: absolute; left: -5px; top: 12px; width: 0; height: 0;
  border-top: 5px solid transparent; border-bottom: 5px solid transparent;
  border-right: 6px solid #2C2C2C;
}
.msg.mine { flex-direction: row-reverse; }
.msg.mine .body { align-items: flex-end; }
.msg.mine .meta { display: none; }
.msg.mine .text {
  background: #3EB575; color: #0E2318;
}
.msg.mine .text::before {
  left: auto; right: -5px; border-right: 0;
  border-left: 6px solid #3EB575;
}
.msg.system { justify-content: center; }
.msg.system .text {
  background: none; border: none; color: #6E6E6E; font-size: 12.5px; padding: 2px;
}
.msg.system .text::before { display: none; }

.time-div {
  text-align: center; font-size: 12px; color: #6E6E6E;
  margin: 10px 0 12px; letter-spacing: .2px;
}

.ava {
  width: 34px; height: 34px; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center; font-size: 20px;
  background: radial-gradient(circle at 30% 25%, #2a3550, #161d31);
  border: 1px solid var(--line-strong);
}
.ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ava.sm { width: 22px; height: 22px; font-size: 13px; }
.ava.lg { width: 64px; height: 64px; font-size: 34px; }

.composer { border-top: 1px solid #2A2A2A; padding: 10px 12px 12px; background: #1E1E1E; }
.loadmore {
  display: block; width: 100%; margin-bottom: 8px; font-size: 12px; padding: 5px;
  background: rgba(255,255,255,.04); color: var(--muted);
}
.input-row { display: flex; gap: 8px; align-items: flex-end; }
#msg-input { max-height: 120px; line-height: 1.45; padding: 10px 12px; width: auto; flex: 1 1 auto; min-width: 0; }
.send { padding: 10px 18px; border-radius: 10px; flex: 0 0 auto; }
.send-hint { font-size: 11.5px; color: var(--muted); margin-top: 6px; min-height: 16px; }
.send-hint.warn { color: var(--gold); }

/* ---------------- 抽屉 ---------------- */
.drawer {
  position: fixed; top: 0; bottom: 0; right: 0; width: 330px; max-width: 88vw; z-index: 30;
  transform: translateX(102%); transition: transform .24s ease;
  background: linear-gradient(180deg, #101728, #080c16);
  border-left: 1px solid var(--line); display: flex; flex-direction: column;
}
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: 16px; margin: 0; }
.room-list { flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.room-item {
  text-align: left; width: 100%; padding: 11px 12px; border-radius: 12px;
  background: rgba(255,255,255,.045); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 4px;
}
.room-item.active { border-color: rgba(7, 193, 96,.55); background: var(--gold-soft); }
.room-item .rname { font-size: 14px; display: flex; align-items: center; gap: 6px; }
.room-item .rmeta { font-size: 11.5px; color: var(--muted); display: flex; gap: 10px; }
.room-item .lock { font-size: 12px; opacity: .8; }
.drawer-foot { padding: 12px 16px; border-top: 1px solid var(--line); font-size: 12px; }

.mask { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 25; }

/* ---------------- 弹窗 ---------------- */
.modal {
  position: fixed; inset: 0; z-index: 40; display: grid; place-items: center;
  background: rgba(4,7,14,.86); padding: 16px;
}
.sheet {
  width: 100%; max-width: 420px; max-height: 90vh; overflow-y: auto;
  background: linear-gradient(180deg, #131a2c, #0c1120);
  border: 1px solid var(--line-strong); border-radius: 18px; padding: 22px;
  overflow-x: hidden;   /* 只让面板竖向滚，别在底部多出一条横向滚动条 */
  box-shadow: 0 24px 60px rgba(0,0,0,.55);
}
.sheet h2 { margin: 0 0 6px; font-size: 19px; }
/* 标题栏钉在面板顶部：不管滚到哪儿，「×」都看得见，改不了资料也能退出来 */
.sheet-head {
  position: sticky;
  top: -22px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: -22px -22px 12px;
  padding: 18px 22px 10px;
  background: #131a2c;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  box-shadow: 0 10px 18px rgba(6, 9, 16, .35);
}
.sheet-head h2 { margin: 0; flex: 1 1 auto; min-width: 0; }
.sheet-close {
  flex: 0 0 auto;
  width: 30px; height: 30px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .05);
  color: var(--muted);
  font-size: 17px; line-height: 1;
  cursor: pointer;
}
.sheet-close:hover { color: #fff; border-color: rgba(7, 193, 96, .6); background: rgba(7, 193, 96, .12); }
.sheet-close[hidden] { display: none; }
.sheet > p.muted { margin: 0 0 16px; font-size: 12.5px; line-height: 1.5; }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.row { display: flex; align-items: center; gap: 8px; }
.row.end { justify-content: flex-end; margin-top: 6px; }

.avatar-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; margin-bottom: 8px;
  max-height: 208px; overflow-y: auto; padding-right: 4px; }   /* 头像变多后固定高度内滚，弹窗不撑成一条长条 */
.avatar-cell {
  aspect-ratio: 1; display: grid; place-items: center; font-size: 19px;
  border-radius: 10px; background: rgba(255,255,255,.05); border: 1px solid var(--line);
  padding: 0; overflow: hidden;
}
.avatar-cell img { width: 100%; height: 100%; object-fit: cover; }
.avatar-cell.sel { border-color: rgba(7, 193, 96,.8); background: var(--gold-soft); }

.preview-row { display: flex; align-items: center; gap: 14px; margin: 6px 0 16px; }
.preview-meta { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.preview-meta b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60vw; }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  background: rgba(20,26,42,.95); border: 1px solid var(--line-strong);
  padding: 9px 16px; border-radius: 999px; font-size: 13px; z-index: 60;
}

/* ---------------- 手机端 ---------------- */
/* 顶栏拆成两行：第一行标题 + 在线/台上，第二行一排等宽的按钮（不再挤成一列竖字） */
@media (max-width: 820px), (pointer: coarse) and (max-width: 1100px) {
  :root { --topbar-h: calc(100px + env(safe-area-inset-top, 0px)); }
  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: 40px minmax(0, 1fr);
    align-items: center;
    column-gap: 8px; row-gap: 4px;
    padding: calc(6px + env(safe-area-inset-top, 0px)) 8px 8px;
  }
  .topbar { grid-template-columns: minmax(0, 1fr) auto 28px; }
  .brand { grid-area: 1 / 1; min-width: 0; }
  .stats { grid-area: 1 / 2; margin-left: 0; gap: 5px; }
  .topbar-toggle {
    display: flex; align-items: center; justify-content: center;
    grid-area: 1 / 3; width: 28px; height: 28px; padding: 0;
    border-radius: 8px; border: 1px solid var(--line);
    background: var(--gold-soft); color: var(--gold);
    border-color: rgba(7, 193, 96,.34);
    font-size: 13px; line-height: 1; transition: .18s;
  }
  .topbar-toggle:hover { color: #f0d49b; border-color: rgba(7, 193, 96,.6); }
  /* 折叠起来：顶栏只剩一行，工具栏整排收进去 */
  .layout.topbar-fold { --topbar-h: calc(54px + env(safe-area-inset-top, 0px)); }
  .layout.topbar-fold .topbar { grid-template-rows: minmax(0, 1fr); padding-bottom: 6px; }
  .layout.topbar-fold .actions { display: none; }
  .actions { grid-area: 2 / 1 / 3 / 3; display: flex; gap: 6px; min-width: 0; }
  .actions button { flex: 1 1 0; min-width: 0; padding: 8px 2px; font-size: 13px; white-space: nowrap; }
  .actions button.primary { flex: 1.35 1 0; }
  .logo { width: 26px; height: 26px; }
  .brand-mark { display: none; }
  .title-box { min-width: 0; }
  .title-box h1 { font-size: 15px; }
  .title-box p { display: none; }
  .chip { font-size: 11px; padding: 3px 8px; }
  /* 标签改成「全站在线 / 本房在线 / 台上」后字变多，手机端再压一档，别把房间名挤没 */
  .stats .chip { font-size: 10px; padding: 2px 6px; }
  main { grid-template-columns: none; grid-template-rows: minmax(0, 32vh) 1fr; }
  @media (max-height: 720px) { main { grid-template-rows: minmax(0, 29vh) 1fr; } }
  #chat-panel { border-left: none; border-top: 1px solid var(--line); }
  .messages { padding: 10px 10px 4px; }
  .composer { padding: 8px 8px calc(10px + env(safe-area-inset-bottom, 0px)); }
  .input-row { gap: 6px; }
  .img-btn { width: 34px; height: 34px; font-size: 16px; }
  .send { padding: 9px 12px; }
  .msg .text { font-size: 13.5px; }
  .msg .msg-img { max-width: 58vw; }
  .me-badge { bottom: 10px; right: 8px; padding: 4px 8px; font-size: 11px; }
  .me-badge .ava.sm { width: 18px; height: 18px; font-size: 11px; }
  .avatar-grid { grid-template-columns: repeat(8, 1fr); }
  .sheet { padding: 16px; max-width: 92vw; max-height: 88vh; overflow-y: auto; }
  .hint { display: none; }
  .stage-line { font-size: 12px; padding: 4px 10px; max-width: calc(100% - 86px); }
  .stage-count { font-size: 11px; padding: 4px 9px; }
  .room-menu { left: 0; width: min(360px, 94vw); max-height: min(56vh, 440px); grid-template-columns: 1fr; }
  .send-hint { margin-top: 4px; }
  .dm-peers { padding: 6px 8px; }
  .dm-peer { width: 56px; }
}

/* 超窄屏（≤380）再收一档，保证一排按钮仍然全员可见 */
@media (max-width: 380px) {
  .actions button { font-size: 12px; padding: 7px 2px; }
  .actions button.primary { flex: 1.5 1 0; }
  .chip { font-size: 10.5px; padding: 2px 6px; }
  .title-box h1 { font-size: 14px; }
  .logo { display: none; }
  .me-badge { font-size: 10.5px; }
}

/* 沉浸模式：3D 占满 */
.layout.immersive main { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.layout.immersive #chat-panel { display: none; }
.layout.immersive .me-badge { display: none !important; }
.layout.immersive #btn-exit-immersive { display: inline-block !important; }

/* ---------------- v2：性别 / 图片 / 保留时长 ---------------- */
select {
  width: 100%; padding: 10px 12px; border-radius: 11px; font-size: 14px;
  background: rgba(255,255,255,.05); border: 1px solid var(--line); color: var(--text);
}
select:focus { outline: none; border-color: rgba(7, 193, 96,.6); }
select option { background: #10182a; color: var(--text); }

.seg { display: flex; gap: 6px; }
.seg button {
  flex: 1; padding: 9px 0; border-radius: 11px; font-size: 13px;
  background: rgba(255,255,255,.045); border: 1px solid var(--line); color: var(--muted);
}
.seg button.sel {
  border-color: rgba(7, 193, 96,.75); background: var(--gold-soft); color: #f0dfb8;
}

.msg .meta .gender { font-size: 12px; line-height: 1; }
.msg .meta .gender.m { color: #7fa8e8; }
.msg .meta .gender.f { color: #e59ab6; }
.msg .msg-img {
  display: block; max-width: min(240px, 52vw); max-height: 320px;
  border-radius: 10px; border: 1px solid var(--line-strong); margin-top: 4px;
  object-fit: cover; cursor: zoom-in;
}
.msg .text:empty { display: none; }

.img-btn { flex: 0 0 auto; width: 38px; height: 38px; padding: 0; font-size: 18px; }
.img-preview {
  display: flex; align-items: center; gap: 10px; padding: 6px 8px 8px;
  border-bottom: 1px solid var(--line);
}
.img-preview img { max-height: 74px; border-radius: 8px; border: 1px solid var(--line-strong); }
.room-item .rmeta .mine { color: var(--gold); }


/* 字数计数 */
.send-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.char-count {
  font-size: 11px;
  color: #6b7c99;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.char-count.warn {
  color: #f0a75e;
}


/* ---------------- 好友 / 私聊 ---------------- */
.friend-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.badge {
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border-radius: 9px;
  background: #e0564f;
  color: #fff;
  font-size: 11px;
  line-height: 17px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.clickable { cursor: pointer; }
.ava.clickable:hover { box-shadow: 0 0 0 2px rgba(120, 200, 255, 0.65); }

.ellipsis {
  color: #7fb6ff;
  cursor: pointer;
  user-select: none;
  margin-left: 2px;
}
.ellipsis:hover { text-decoration: underline; }

.fr-section { margin-top: 12px; }
.fr-head {
  font-size: 12px;
  letter-spacing: .06em;
  color: #8ea3c4;
  margin: 10px 0 6px;
  text-transform: uppercase;
}
.fr-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  margin-bottom: 6px;
}
.fr-row.friend { cursor: pointer; }
.fr-row.friend:hover { background: rgba(120, 180, 255, 0.12); }
.fr-row.pending { opacity: .75; }
.fr-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.fr-meta b { font-size: 14px; }
.unread {
  min-width: 18px;
  padding: 0 6px;
  height: 18px;
  line-height: 18px;
  border-radius: 9px;
  background: #e0564f;
  color: #fff;
  font-size: 11px;
  text-align: center;
}
.fr-ops { display: flex; gap: 6px; }

.uc-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.uc-meta { display: flex; flex-direction: column; gap: 2px; }
#uc-tip { margin-bottom: 12px; min-height: 16px; }

.dm-panel {
  position: fixed;
  right: 14px;
  top: 74px;
  bottom: 14px;
  width: min(360px, 92vw);
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #2a1c40 0%, #1d132b 52%, #150f1f 100%);
  border: 1px solid rgba(7, 193, 96, 0.42);
  border-radius: 16px;
  box-shadow: 0 18px 56px rgba(40, 10, 70, 0.6), 0 0 0 1px rgba(7, 193, 96, 0.08) inset;
  overflow: hidden;
  z-index: 40;
}
.dm-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(7, 193, 96, 0.22);
  background: rgba(7, 193, 96, 0.10);
}
.dm-who { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.dm-who b { font-size: 14px; }
.dm-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dm-msg {
  max-width: 82%;
  align-self: flex-start;
  background: rgba(7, 193, 96, 0.13);
  border-radius: 12px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dm-msg.mine {
  align-self: flex-end;
  background: rgba(7, 193, 96, 0.42);
}
.dm-text { font-size: 14px; line-height: 1.45; word-break: break-word; overflow-wrap: anywhere; white-space: pre-wrap; }
.dm-time { font-size: 11px; color: #b6a3d4; align-self: flex-end; }
.dm-msg img { max-width: 200px; border-radius: 10px; display: block; }
.dm-composer {
  border-top: 1px solid rgba(7, 193, 96, 0.22);
  padding: 8px 10px 10px;
}
.dm-composer textarea {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  resize: none;
  min-height: 36px;
  max-height: 96px;
}

@media (max-width: 820px) {
  .dm-panel {
    left: 8px;
    right: 8px;
    top: auto;
    bottom: 0;
    width: auto;
    height: min(64vh, 480px);
    border-radius: 16px 16px 0 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
}


/* 房间下拉 */
.brand { position: relative; }
.title-row { display: flex; align-items: center; gap: 4px; min-width: 0; }
.title-row h1 { min-width: 0; }
.room-picker {
  flex: none;
  width: 24px;
  height: 24px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  transition: transform .18s ease, color .18s ease, border-color .18s ease;
}
.city-btn {
  flex: none;
  height: 24px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  max-width: 132px;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}
.city-btn.on { color: var(--gold); border-color: rgba(7, 193, 96, .45); background: rgba(7, 193, 96, .1); }
.city-btn.off { color: rgba(185, 194, 214, .62); border-color: rgba(255, 255, 255, .1); }
.city-btn.off:hover { color: var(--gold); }
.city-btn:hover { color: var(--gold); border-color: rgba(7, 193, 96, .5); }

.room-picker:hover { color: var(--gold); border-color: rgba(7, 193, 96, .5); }

/* 手机端顶栏本来就挤，城市入口放在 ▾ 下拉里，顶栏这枚先收起来 */
@media (max-width: 820px) {
  .city-btn { display: none; }
  .lang-code { display: none; }
  .lang-btn { padding: 0 6px; }
}
.room-picker.open { transform: rotate(180deg); color: var(--gold); border-color: rgba(7, 193, 96, .5); }

.room-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 34px;
  width: min(468px, 92vw);
  max-height: min(68vh, 520px);
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-content: start;
  gap: 2px 6px;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, .09);
  background: rgba(12, 18, 32, .97);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .55);
  z-index: 60;
  backdrop-filter: none;
}
.room-menu-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.room-menu[hidden] { display: none; }
.rm-group {
  grid-column: 1 / -1;
  margin: 8px 2px 2px;
  font-size: 11px;
  letter-spacing: .6px;
  color: var(--gold);
  opacity: .82;
}
.room-menu-item.secret, .room-menu-foot { grid-column: 1 / -1; }
.room-menu-item:hover { background: rgba(120, 180, 255, .12); }
.room-menu-item.active { background: rgba(7, 193, 96, .16); }
.rm-top { display: flex; align-items: center; gap: 6px; }
.rm-name { font-size: 14px; color: #e6ecf7; }
.rm-tag {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
}
.rm-tag.gold { color: var(--gold); border-color: rgba(7, 193, 96, .45); background: var(--gold-soft); }
.rm-sub {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.room-menu-foot {
  width: 100%;
  margin-top: 4px;
  padding: 8px 10px;
  border: none;
  border-top: 1px solid var(--line);
  border-radius: 0 0 10px 10px;
  background: transparent;
  color: #8fb6ff;
  font-size: 12px;
  text-align: center;
  cursor: pointer;
}
.room-menu-foot:hover { color: #b9d4ff; }


/* 私聊窗口顶部：好友快切条 */
.dm-peers {
  display: flex;
  gap: 6px;
  padding: 8px 10px;
  overflow-x: auto;
  overflow-y: hidden;
  border-bottom: 1px solid rgba(7, 193, 96, 0.18);
  background: rgba(255, 255, 255, 0.03);
  scrollbar-width: none;   /* 见文末「滚动条」段 */
}
.dm-peer {
  flex: none;
  width: 62px;
  padding: 6px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  cursor: pointer;
}
.dm-peer:hover { background: rgba(7, 193, 96, 0.12); }
.dm-peer.active {
  border-color: rgba(7, 193, 96, 0.7);
  background: rgba(7, 193, 96, 0.20);
}
.dm-peer-av { position: relative; line-height: 0; }
.ava.xs { width: 26px; height: 26px; font-size: 14px; border-width: 1px; }
.ava.online { box-shadow: 0 0 0 2px rgba(110, 220, 160, 0.7); }
.dm-peer-dot {
  position: absolute;
  top: -3px;
  right: -5px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 7px;
  background: #e0564f;
  color: #fff;
  font-size: 9px;
  line-height: 14px;
  text-align: center;
}
.dm-peer-dot.has { display: block; }
.dm-peer-dot:not(.has) { display: none; }
.dm-peer-name {
  max-width: 56px;
  font-size: 11px;
  color: #e6d9f7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dm-peer.active .dm-peer-name { color: #fff; font-weight: 600; }

/* 下拉里“进入秘密聊天室”的入口 */
.room-menu-item.secret { border: 1px dashed rgba(7, 193, 96, 0.45); }
.room-menu-item.secret .rm-name { color: #e8d7ff; }

/* ---------------- 起名前的三句话 ---------------- */
.notice {
  margin: 12px 0 4px;
  padding: 10px 12px 8px;
  border-radius: 12px;
  border: 1px solid rgba(7, 193, 96, .32);
  background: linear-gradient(180deg, rgba(7, 193, 96, .10), rgba(7, 193, 96, .09));
}
.notice > b { display: block; font-size: 13px; color: #f4dfb2; letter-spacing: .3px; }
.notice ul { margin: 7px 0 0; padding-left: 17px; }
.notice li { font-size: 12px; line-height: 1.62; color: #b9c2d6; margin-bottom: 5px; }
.notice li b { color: #ffe6a8; font-weight: 600; }
@media (max-width: 820px) {
  .notice { margin: 10px 0 4px; padding: 9px 10px 6px; }
  .notice li { font-size: 11.5px; line-height: 1.55; }
}

/* 手机档：房间菜单回到单列（这里追加，保证盖过上面两列的 base 规则） */
@media (max-width: 820px) {
  .room-menu {
    left: 2px;
    grid-template-columns: 1fr;
    width: calc(100vw - 10px);
    max-height: min(58vh, 460px);
  }
}
/* ---------------- 输入框：文字颜色 / 字体 ---------------- */
.composer, .dm-composer { position: relative; }
.style-btn {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -1px;
}
.style-pop {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: calc(100% - 2px);
  z-index: 45;
  max-width: 366px;
  padding: 10px 12px 10px;
  border-radius: 14px;
  border: 1px solid var(--line-strong, rgba(255,255,255,.16));
  background: rgba(12, 17, 30, .98);
  box-shadow: 0 14px 36px rgba(0, 0, 0, .55);
}
.style-pop[hidden] { display: none; }
.sp-title { font-size: 11px; color: var(--muted); margin: 8px 0 6px; }
.sp-title:first-child { margin-top: 0; }
.sp-colors { display: flex; gap: 6px; flex-wrap: wrap; }
.sp-color {
  width: 24px; height: 24px; padding: 0; border-radius: 50%;
  border: 2px solid transparent; cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14);
}
.sp-color.sel { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(7, 193, 96,.22); }
.sp-color.reset {
  background: rgba(255,255,255,.07);
  color: var(--muted); font-size: 11px; display: grid; place-items: center;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}
.sp-fonts { display: flex; gap: 6px; flex-wrap: wrap; }
.sp-font {
  padding: 4px 10px; border-radius: 999px; font-size: 12px; cursor: pointer;
  border: 1px solid var(--line); background: rgba(255,255,255,.04); color: #cfd7e6;
}
.sp-font.sel { border-color: rgba(7, 193, 96,.7); background: var(--gold-soft); color: #f0dfb8; }
.sp-preview {
  margin-top: 9px; padding: 8px 10px; border-radius: 10px;
  background: rgba(255,255,255,.04); border: 1px solid var(--line);
  font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
@media (max-width: 820px) {
  .style-btn { width: 34px; height: 34px; font-size: 13px; }
  .style-pop { left: 4px; right: 4px; max-width: none; padding: 9px 10px; }
  .sp-color { width: 22px; height: 22px; }
}

/* ---------------- 同城聊天 ---------------- */
.field select {
  width: 100%;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid #E2E2E2;
  background: #FFFFFF;
  color: #191919;
  font-size: 14px;
  outline: none;
}
.field select:focus { border-color: #07C160; }
.muted.small { font-size: 12px; opacity: 0.72; }
.fr-row.rejected .fr-meta span { color: #ff9a9a; }
.fr-row.rejected .ghost.tiny { margin-left: auto; align-self: center; }
.room-menu-item.city .rm-tag { background: rgba(7, 193, 96, 0.16); color: #0E7A42; }

/* ---------------- 图片占位（文字先出，图片排队加载） ---------------- */
.msg .img-box { display: inline-block; margin-top: 4px; max-width: min(240px, 52vw); }
.msg .img-box.loading {
  min-width: 132px;
  min-height: 92px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(140, 170, 220, 0.28);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  color: #8fa3c4;
  font-size: 12px;
}
.msg .img-box .img-ph { animation: imgPulse 1.5s ease-in-out infinite; }
@keyframes imgPulse { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }
.msg .img-box.failed {
  border-color: rgba(255, 140, 140, 0.35);
  color: #ff9a9a;
  cursor: pointer;
  padding: 0 10px;
}
.msg .img-box.failed .img-ph { animation: none; }
.msg .img-box img { max-width: min(240px, 52vw); max-height: 320px; border-radius: 10px; display: block; cursor: zoom-in; }
@media (max-width: 820px) {
  .msg .img-box, .msg .img-box img { max-width: 58vw; }
}


/* ---------------- 选城市：搜索框 + 常用城市（手机端主要靠这一排） ---------------- */
.city-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 2px 0 10px;
}
.city-chip {
  height: 30px;
  padding: 0 12px;
  border-radius: 15px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1;
  cursor: pointer;
  transition: color .16s ease, border-color .16s ease, background .16s ease;
}
.city-chip:hover { color: var(--gold); border-color: rgba(7, 193, 96, .5); }
.city-chip.on {
  color: var(--gold);
  border-color: rgba(7, 193, 96, .65);
  background: rgba(7, 193, 96, .16);
  font-weight: 600;
}
.city-tip { color: var(--muted); font-size: 12px; }

/* 城市网格：按国家/省份分段，段内一城一格，比两个下拉好翻 */
.ct-selects { display: none !important; }
.city-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 42vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2px 4px 2px 2px;
  margin-bottom: 4px;
}
.city-group { display: flex; flex-direction: column; gap: 6px; }
.cg-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  letter-spacing: .02em;
  color: var(--gold);
  opacity: .9;
  padding-bottom: 3px;
  border-bottom: 1px solid rgba(7, 193, 96, .16);
}
.cg-cities {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 6px;
}
.cg-cities .city-chip {
  width: 100%;
  min-height: 30px;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: break-word;
  line-height: 1.2;
  font-size: 12px;
}
.cg-cities .city-chip:first-child {
  color: var(--gold);
  border-style: dashed;
  opacity: .85;
}
@media (max-width: 600px) {
  .city-grid { max-height: 38vh; }
  .cg-cities { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
  .cg-head {
    position: sticky; top: 0; z-index: 2;
    background: rgba(16, 22, 38, .96);
    padding: 4px 0 5px;
  }
}
/* 宽屏：弹窗放宽，城市按两列分段铺开，不再一路往下滚 */
@media (min-width: 900px) {
  #modal-city .sheet { max-width: 760px; }
  #modal-city .city-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 14px 24px;
    max-height: none;
    overflow: visible;
  }
  #modal-city .cg-cities { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }
}

/* 房间抽屉顶部的「我的城市」：手机切房间顺手就能改城市 */
.room-city-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 11px 12px;
  margin: 0 0 8px;
  border: 1px dashed rgba(7, 193, 96, .38);
  border-radius: 12px;
  background: rgba(7, 193, 96, .09);
  color: var(--text);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.room-city-row .rc-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-city-row .cta { flex: none; color: var(--gold); font-size: 12px; }
.room-city-row.off { border-color: var(--line); background: rgba(255, 255, 255, 0.045); color: var(--muted); }

/* 手机端：下拉菜单铺满宽度、单列排，别再挤成两列 */
@media (max-width: 820px) {
  .room-menu {
    left: 8px;
    right: 8px;
    width: auto;
    max-width: none;
    grid-template-columns: 1fr;
    max-height: min(58vh, 430px);
  }
  #modal-city .field select,
  #modal-city .field input { min-height: 40px; font-size: 14px; }
  .city-chip { height: 32px; padding: 0 13px; font-size: 13px; }
}

/* 询问弹窗里的「以后按这个来」 */
.ca-remember {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 2px 0 10px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
  cursor: pointer;
}
.ca-remember input { margin-top: 2px; flex: none; width: 15px; height: 15px; accent-color: var(--gold); }

/* 「全站 N」这枚比本房在线弱一档，手机上再小一点 */
.chip.all {
  color: var(--muted);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.04);
}
@media (max-width: 820px) {
  .chip.all { font-size: 11px; padding: 2px 6px; }
  .rmeta .ronline { color: var(--gold); }
}
.rmeta .ronline { opacity: .9; }

/* ---------------- 表情面板 ---------------- */
.emoji-pop { max-width: 366px; }
.emoji-grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 4px;
  max-height: 208px;
  overflow-y: auto;
}
.emoji-cell {
  height: 30px;
  padding: 0;
  font-size: 19px;
  line-height: 1;
  border-radius: 8px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.045);
}
.emoji-cell:hover { background: rgba(7, 193, 96, 0.16); border-color: rgba(7, 193, 96, 0.45); }
/* 消息里的表情：比正文稍大一点，行高别把它撑开 */
.text .emoji, .dm-text .emoji {
  font-size: 1.22em;
  line-height: 1;
  vertical-align: -0.08em;
  margin: 0 1px;
}
@media (max-width: 820px) {
  .emoji-grid { grid-template-columns: repeat(8, 1fr); max-height: 186px; }
  .emoji-cell { height: 32px; font-size: 20px; }
}

/* 输入框里的表情预览：textarea 上面盖一层等宽镜像 */
.ta-wrap { position: relative; flex: 1 1 auto; min-width: 0; display: flex; }
.ta-wrap > textarea {
  flex: 1 1 auto; width: 100%;
  scrollbar-width: none;            /* 输入框里不显示滚动条，靠镜像跟滚动位置 */
}
.ta-wrap > textarea::-webkit-scrollbar { width: 0; height: 0; }
.ta-mirror {
  position: absolute; overflow: hidden; pointer-events: none;
  white-space: pre-wrap; word-break: break-word; text-align: left;
  box-sizing: border-box; border: 0; background: transparent;
}
.emoji-fit {
  display: inline-block; text-align: center; font-size: 1.05em; line-height: 1;
  vertical-align: -0.08em;
}

/* 全站公告横幅：压在页面顶部，不影响布局 */
.broadcast-banner {
  position: fixed; top: calc(var(--topbar-h, 64px) + 8px); left: 50%; transform: translateX(-50%);
  z-index: 1200; width: min(92vw, 560px);
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px; border-radius: 14px;
  background: linear-gradient(180deg, #2a2114 0%, #16141f 100%);
  border: 1px solid rgba(7, 193, 96, .55);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .5);
  color: #fff6e2; animation: bb-drop .28s ease-out;
}
.broadcast-banner[hidden] { display: none; }
.broadcast-banner .bb-icon { font-size: 18px; line-height: 1.3; }
.broadcast-banner .bb-body { min-width: 0; flex: 1; }
.broadcast-banner .bb-title { font-size: 11.5px; letter-spacing: .18em; color: rgba(7, 193, 96, .95); }
.broadcast-banner .bb-text {
  font-size: 14px; line-height: 1.55; margin-top: 2px;
  white-space: pre-wrap; word-break: break-word;
}
/* 公告配图：只在有图时显示，限高免得把页面压住 */
.broadcast-banner .bb-img {
  display: block; margin-top: 8px; max-width: 100%; max-height: 180px;
  border-radius: 10px; object-fit: contain; background: rgba(0, 0, 0, .25);
}
.broadcast-banner .bb-img[hidden] { display: none; }

.broadcast-banner .bb-close {
  flex: 0 0 auto; background: transparent; border: 0; color: var(--muted);
  font-size: 18px; line-height: 1; padding: 2px 4px; cursor: pointer;
}
.broadcast-banner .bb-close:hover { color: #fff; }
/* 只动位移、不动透明度：页面在后台被节流时动画会停在中途，
   透明度卡在 0.2 会让公告看不清 */
@keyframes bb-drop {
  from { transform: translate(-50%, -8px); }
  to { transform: translate(-50%, 0); }
}
@media (max-width: 820px) {
  .broadcast-banner { top: calc(var(--topbar-h, 100px) + 6px); width: calc(100vw - 16px); padding: 10px 12px; }
  .broadcast-banner .bb-text { font-size: 13.5px; }
}

/* ---------------- 免责条款：右下角入口 + 全文弹窗 ---------------- */
.disc-fab {
  position: fixed; right: 10px; bottom: 98px; z-index: 900;
  padding: 7px 12px; border-radius: 999px; cursor: pointer;
  font-size: 12px; color: var(--muted);
  background: rgba(16, 20, 34, .82); border: 1px solid var(--line);
  backdrop-filter: blur(6px);
  transition: color .15s, border-color .15s;
}
.disc-fab:hover { color: var(--gold); border-color: rgba(7, 193, 96, .5); }

.disc-sheet { max-height: min(78vh, 720px); display: flex; flex-direction: column; }
.disc-body {
  overflow-y: auto; padding-right: 6px; margin: 6px 0 10px;
  font-size: 13.5px; line-height: 1.72; color: var(--text);
}
.disc-body p { margin: 0 0 10px; }
.disc-body b { color: #fff; font-weight: 600; }
.disc-body code {
  font-family: ui-monospace, Consolas, monospace; font-size: 12.5px;
  color: var(--gold); background: rgba(255, 255, 255, .06); padding: 0 4px; border-radius: 4px;
}
.disc-note { color: var(--gold); border-left: 2px solid rgba(7, 193, 96, .5); padding-left: 10px; }

.disc-agree {
  display: flex; align-items: center; gap: 8px; padding: 10px 2px 4px;
  border-top: 1px dashed var(--line); font-size: 13px; color: var(--muted);
}
.disc-agree input { width: 16px; height: 16px; accent-color: #07C160; }

@media (max-width: 820px) {
  .disc-fab { bottom: calc(96px + env(safe-area-inset-bottom, 0px)); right: 8px; font-size: 11.5px; padding: 6px 10px; }
  .disc-body { font-size: 13px; }
}

/* 预览头像本身就是「换头像」入口：整块可点，右下角一个小相机角标 */
.avatar-pick {
  position: relative;
  padding: 0;
  cursor: pointer;
  overflow: visible;
  transition: box-shadow .15s ease, transform .15s ease;
}
.avatar-pick img { border-radius: 50%; }
.avatar-pick:hover { box-shadow: 0 0 0 2px rgba(230, 197, 128, .55); }
.avatar-pick:active { transform: scale(.97); }
.avatar-pick::after {
  content: "";
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e6c584' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='M3.5 8.5h4l2-2.5h5l2 2.5h4v10.5h-17z'/><circle cx='12' cy='13.2' r='3.4'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px 12px;
  position: absolute;
  right: -2px; bottom: -2px;
  width: 22px; height: 22px;
  display: grid; place-items: center;
  font-size: 11px; line-height: 1;
  border-radius: 50%;
  background-color: #161d31;
  border: 1px solid rgba(7, 193, 96, .55);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .45);
  pointer-events: none;
}
.avatar-pick:focus-visible { outline: 2px solid rgba(230, 197, 128, .75); outline-offset: 2px; }

/* ---------------- 资料弹窗：宽屏两栏 ---------------- */
/* 手机/窄屏保持原来的单列（和以前一样），宽屏把「头像」搬到右侧一栏，
   面板同时放宽，避免在 1920 屏上被挤成一根竖长条 */
.pf-grid { display: block; }
.pf-col > * { min-width: 0; }

@media (min-width: 900px) {
  #modal-profile .sheet { max-width: 900px; }
  #modal-profile .pf-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: 6px 34px;
    align-items: start;
  }
  #modal-profile .avatar-grid {
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    max-height: 320px;
  }
  #modal-profile .preview-row { margin: 8px 0 18px; }
  #modal-profile .notice { margin-top: 14px; }
  #modal-profile .sheet > p.muted { max-width: 100%; }
}

/* ---------------- 滚动条：全站统一 ----------------
   Chromium / Edge / Safari 走 ::-webkit-scrollbar 自定义（细片 + 圆角滑块，且要显式
   干掉上下两个三角按钮）；Firefox 不认伪元素，用 @supports 单独给标准属性。
   注意：Chromium 里一旦写了 scrollbar-width / scrollbar-color，::-webkit-* 会被忽略、
   又退回带箭头的系统条，所以这两套必须互斥。手机端一律不显示。
----------------------------------------------------- */
::-webkit-scrollbar { width: 10px; height: 10px; background: transparent; }
::-webkit-scrollbar-track { background: transparent; border: 0; }
::-webkit-scrollbar-thumb {
  border: 3px solid transparent;      /* 借 border 留白，实际露出 4px 圆角细条 */
  border-radius: 999px;
  background-clip: padding-box;
  background-color: rgba(230, 197, 128, .55);
  min-height: 44px;
}
::-webkit-scrollbar-thumb:hover { background-color: rgba(240, 210, 150, .8); }
::-webkit-scrollbar-thumb:active { background-color: rgba(255, 235, 190, .92); }
::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-button,
::-webkit-scrollbar-button:single-button,
::-webkit-scrollbar-button:vertical:start,
::-webkit-scrollbar-button:vertical:end,
::-webkit-scrollbar-button:vertical:start:increment,
::-webkit-scrollbar-button:vertical:end:decrement,
::-webkit-scrollbar-button:horizontal:start,
::-webkit-scrollbar-button:horizontal:end {
  display: none; width: 0; height: 0; background: transparent; -webkit-appearance: none;
}

/* Firefox 专用（有 -moz-appearance 的才走这里，Chromium 不会命中） */
@supports (-moz-appearance: none) {
  * { scrollbar-width: thin; scrollbar-color: rgba(226, 196, 132, .55) transparent; }
  .dm-peers { scrollbar-width: none; }
}

/* 滑块出现/消失时内容不左右跳 */
.messages, .disc-body, .avatar-grid, #room-menu, #emoji-pop, #dm-emoji-pop {
  scrollbar-gutter: stable;
}

/* 私聊快切条是横向的：别画横向条，滑动/滚轮照样能滚 */
.dm-peers::-webkit-scrollbar { display: none; }

/* 600px 以下算手机：不要滚动条 */
@media (max-width: 600px) {
  ::-webkit-scrollbar { width: 0; height: 0; display: none; }
  @supports (-moz-appearance: none) { * { scrollbar-width: none; } }
}

/* 首次起名：右下角「免责条款」链接 + 默认勾选的同意框 */
.pf-agree {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
  text-align: right;
}
.pf-agree .inline-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #9db0cf;
  cursor: pointer;
}
.pf-agree .inline-check input { width: 14px; height: 14px; margin: 0; }
.pf-agree .linky { text-decoration: underline; text-underline-offset: 2px; }

/* ---------------- 手机端顶栏与房间下拉（z33） ---------------- */
@media (max-width: 820px), (pointer: coarse) and (max-width: 1100px) {
  /* 在线人数改成「一列两行」：全站在线在上、本房在线在下，台上与语言竖向居中 */
  .stats { display: flex; align-items: center; gap: 6px; margin-left: 0; }
  .stats-board { padding: 3px 8px 3px 7px; column-gap: 5px; border-radius: 9px; }
  .sb-label { font-size: 9.5px; }
  .sb-num { font-size: 12px; min-width: 18px; }
  .sb-dot { width: 5px; height: 5px; }
  .stats .lang-btn { height: 22px; }

  /* 定位（城市）按钮回到顶栏，跟房间名、▾ 同一行 */
  .city-btn {
    display: inline-flex;
    height: 22px;
    padding: 0 7px;
    font-size: 11px;
    max-width: 112px;
    flex: none;
  }
  .title-box h1 { font-size: 14.5px; }

  /* 房间下拉：贴屏幕两边、条目加高、字号加大，别挤成一条 */
  .room-menu {
    position: fixed;
    left: 6px;
    right: 6px;
    width: auto;
    top: calc(var(--topbar-h) + 2px);
    max-height: min(70vh, 560px);
    padding: 8px;
    gap: 4px;
    border-radius: 16px;
    grid-template-columns: 1fr;
  }
  .room-menu-item { padding: 11px 13px; gap: 5px; border-radius: 12px; background: rgba(255, 255, 255, .035); }
  .room-menu-item + .room-menu-item { margin-top: 2px; }
  .rm-name { font-size: 14px; line-height: 1.4; }
  .rm-sub { font-size: 11.5px; line-height: 1.45; }
  .rm-group { margin: 12px 4px 4px; font-size: 11.5px; }
  .room-menu-foot { padding: 11px 10px; font-size: 12.5px; }
}

/* 折叠顶栏时下拉跟着上移 */
.layout.topbar-fold .room-menu { top: calc(var(--topbar-h) + 2px); }

/* ================= 微信浅色模式：聊天 + 私信 ================= */
#chat-panel { background: #EDEDED; border-left: 1px solid #DCDCDC; }
.messages { background: #EDEDED; }
.msg .meta b { color: #9B9B9B; }
.msg .ava { background: #F2F2F2; }
.msg .text { background: #FFFFFF; color: #191919; }
.msg .text::before { border-right-color: #FFFFFF; }
.msg.mine .text { background: #95EC69; color: #191919; }
.msg.mine .text::before { border-left-color: #95EC69; }
.msg.system .text { color: #B2B2B2; }
.time-div { color: #B2B2B2; }

.composer { background: #F7F7F7; border-top: 1px solid #DCDCDC; }
.loadmore { background: #FFFFFF; border: 1px solid #E0E0E0; color: #7A7A7A; }
#msg-input, #msg-input:focus { background: #FFFFFF; border: 1px solid #E0E0E0; color: #191919; }
#composer .img-btn { background: #FFFFFF; border: 1px solid #E4E4E4; color: #4A4A4A; }
#composer .img-btn:hover { background: #EFEFEF; }
#btn-send, #dm-send { background: #07C160; background-image: none; border: 1px solid #07C160; color: #FFFFFF; font-weight: 600; }
#btn-send:hover, #dm-send:hover { background: #06AD56; background-image: none; }
.send-hint, .char-count { color: #9B9B9B; }
.send-hint.warn { color: #E05A4B; }

.dm-panel {
  background: #F7F7F7; border: 1px solid #DCDCDC; color: #191919;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .28);
}
.dm-head { background: #EDEDED; border-bottom: 1px solid #DCDCDC; color: #191919; }
.dm-head b, .dm-who b { color: #191919; }
.dm-head button { background: #FFFFFF; border-color: #DCDCDC; color: #333333; }
.dm-peers { background: #F7F7F7; border-bottom: 1px solid #E0E0E0; }
.dm-peer:hover { background: #EDEDED; }
.dm-peer.active { background: #E6E6E6; border-color: #D0D0D0; }
.dm-peer-name { color: #666666; }
.dm-peer.active .dm-peer-name { color: #191919; font-weight: 600; }
.dm-peer .ava { background: #F2F2F2; border-color: #E0E0E0; color: #333333; }
.dm-messages { background: #EDEDED; }
.dm-messages .muted { color: #999999; }
.dm-msg { background: #FFFFFF; color: #191919; border-radius: 5px; }
.dm-msg.mine { background: #95EC69; color: #191919; }
.dm-time { color: #B2B2B2; }
.dm-composer { background: #F7F7F7; border-top: 1px solid #DCDCDC; }
.dm-composer textarea, .dm-composer textarea:focus { background: #FFFFFF; border: 1px solid #E0E0E0; color: #191919; }
.dm-composer .img-btn { background: #FFFFFF; border: 1px solid #E4E4E4; color: #4A4A4A; }
.dm-composer .img-btn:hover { background: #EFEFEF; }

#dm-hint, .dm-composer .char-count { color: #9B9B9B; }

/* 私信气泡细节：贴合内容宽度 + 微信尖角 + 自身时间用深色 */
.dm-msg { width: fit-content; max-width: 82%; position: relative; }
.dm-msg::before {
  content: ""; position: absolute; left: -5px; top: 12px; width: 0; height: 0;
  border-top: 5px solid transparent; border-bottom: 5px solid transparent;
  border-right: 6px solid #FFFFFF;
}
.dm-msg.mine::before {
  left: auto; right: -5px; border-right: 0; border-left: 6px solid #95EC69;
}
.dm-msg.mine .dm-time { color: rgba(0, 0, 0, .35); }
.dm-msg .dm-text .emoji, .dm-msg .dm-text { color: #191919; }

/* 私信带头像：头像 40px 圆角方形，同一人连发并组不重复头像 */
.dm-row { display: flex; gap: 8px; align-items: flex-start; }
.dm-row.mine { flex-direction: row-reverse; }
.dm-row.cont { margin-top: -4px; }
.dm-row .ava {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 5px;
  font-size: 22px; background: #F2F2F2; border: none;
}
.dm-row.cont .ava { visibility: hidden; }
.dm-msg { max-width: calc(100% - 48px); }

/* 文字颜色面板改成浅底，才能看清这套“白底气泡用”的深色色板 */
.style-pop {
  background: #FFFFFF; border: 1px solid #E2E2E2;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .16);
}
.sp-title { color: #8A8A8A; }
.sp-color { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.sp-color.sel { border-color: #07C160; box-shadow: 0 0 0 2px rgba(7, 193, 96, .2); }
.sp-color.reset { background: #F2F2F2; color: #7A7A7A; box-shadow: inset 0 0 0 1px #E0E0E0; }
.sp-font { background: #F7F7F7; border: 1px solid #E4E4E4; color: #333333; }
.sp-font.sel { border-color: #07C160; background: #EAF8F0; color: #12793F; }
.sp-preview { background: #FFFFFF; border: 1px solid #E4E4E4; color: #191919; }

/* ================= 全站浅色外壳（跟着聊天列表一起走微信风） ================= */
:root {
  --bg: #F2F2F2; --bg-soft: #EDEDED;
  --line: #E4E4E4; --line-strong: #D8D8D8;
  --text: #191919; --muted: #8A8A8A;
  --gold: #07C160; --gold-soft: rgba(7, 193, 96, .10);
  --panel: #FFFFFF; --danger: #E05A4B;
}
html, body { background: #F2F2F2; color: #191919; }

.topbar { background: #FFFFFF; border-bottom: 1px solid #E8E8E8; }
.brand-mark { color: #07C160; border-left-color: #DDE6DE; }
.title-box h1 { color: #191919; }
.title-box p { color: #8A8A8A; }
.logo { filter: none; }

.stats-board { background: #F7F7F7; border-color: #E6E6E6; box-shadow: none; }
.sb-label { color: #8A8A8A; }
.sb-num { color: #191919; }
.sb-dot.all { background: #4C8DFF; color: #4C8DFF; }
.sb-dot.room { background: #07C160; color: #07C160; }

button { background: #F7F7F7; border-color: #E2E2E2; color: #191919; }
button:hover { background: #EFEFEF; }
button.primary {
  background: #07C160; background-image: none; border-color: #07C160; color: #FFFFFF; font-weight: 600;
}
button.primary:hover { background: #06AD56; }
button.ghost { background: #F7F7F7; }
button.linky { color: #07C160; }

.lang-btn { background: #F7F7F7; border-color: #E4E4E4; color: #6B6B6B; }
.lang-btn:hover { color: #07C160; border-color: #07C160; }
.lang-menu { background: #FFFFFF; border-color: #E4E4E4; box-shadow: 0 10px 28px rgba(0, 0, 0, .12); }
.lang-item { color: #191919; }
.lang-item:hover { background: #F2F2F2; }
.lang-item.sel { color: #07C160; background: rgba(7, 193, 96, .10); }

.room-picker, .city-btn { background: #F7F7F7; border-color: #E4E4E4; color: #6B6B6B; }
.room-picker:hover, .city-btn:hover { color: #07C160; border-color: #07C160; }
.room-picker.open { color: #07C160; border-color: #07C160; }
.city-btn.on { color: #07C160; border-color: #07C160; background: rgba(7, 193, 96, .10); }
.city-btn.off { color: #9A9A9A; border-color: #E4E4E4; }

.room-menu { background: #FFFFFF; border-color: #E4E4E4; box-shadow: 0 14px 34px rgba(0, 0, 0, .14); }
.room-menu-item { background: #FFFFFF; color: #191919; }
.room-menu-item:hover { background: #F2F2F2; }
.room-menu-head, .room-menu-foot { color: #8A8A8A; }

.drawer { background: #FFFFFF; border-left: 1px solid #E6E6E6; }
.drawer-head { border-bottom: 1px solid #EDEDED; }
.room-list { background: #FFFFFF; }
.room-item { background: #F7F7F7; border: 1px solid #E9E9E9; color: #191919; }
.room-item .rname { color: #191919; }
.room-item .rmeta { color: #9A9A9A; }
.room-item.active { background: rgba(7, 193, 96, .08); border-color: #07C160; }
.drawer-foot { border-top: 1px solid #EDEDED; color: #8A8A8A; }

.modal { background: rgba(0, 0, 0, .38); }
.sheet { background: #FFFFFF; border: 1px solid #E6E6E6; box-shadow: 0 20px 50px rgba(0, 0, 0, .18); color: #191919; }
.sheet h2, .sheet-head h2 { color: #191919; }
.sheet-head { background: #FFFFFF; border-bottom: 1px solid #EDEDED; box-shadow: none; }
.sheet-close { background: #F7F7F7; border-color: #E4E4E4; color: #6B6B6B; }
.sheet-close:hover { color: #07C160; border-color: #07C160; background: rgba(7, 193, 96, .10); }
input, textarea, select {
  background: #FFFFFF; border: 1px solid #E2E2E2; color: #191919;
}
input:focus, textarea:focus, select:focus { background: #FFFFFF; border-color: #07C160; }
.field > span { color: #8A8A8A; }
.avatar-cell { background: #F7F7F7; border: 1px solid #E9E9E9; }
.avatar-cell.sel { border-color: #07C160; background: rgba(7, 193, 96, .10); }
.preview-meta b { color: #191919; }

.chip { background: #F7F7F7; border-color: #E6E6E6; color: #8A8A8A; }
.chip.gold { color: #07C160; border-color: rgba(7, 193, 96, .45); background: rgba(7, 193, 96, .08); }
.ava { background: #F2F2F2; border-color: #E6E6E6; color: #333333; }

.toast { background: rgba(25, 25, 25, .92); border-color: transparent; color: #FFFFFF; }
.me-badge { background: rgba(255, 255, 255, .92); border: 1px solid #E6E6E6; color: #191919; }
hint, .hint { color: #8A8A8A; }

/* 3D 舞台留作视觉主角：只在浅色外壳里给它一个圆角边，别让夜场和白壳硬撞 */
#stage-area { background: #0A0E18; border-bottom-left-radius: 14px; }
@media (max-width: 820px) { #stage-area { border-bottom-left-radius: 0; } }

/* 浅色下的提示块与分段按钮 */
.notice {
  background: #F6FBF7; border: 1px solid #DFEAE2;
}
.notice > b { color: #0E7A42; }
.notice li { color: #5E6B62; }
.notice li b { color: #0B7A45; }
.seg button { background: #F7F7F7; border: 1px solid #E6E6E6; color: #6B6B6B; }
.seg button.sel { border-color: #07C160; background: rgba(7, 193, 96, .10); color: #0E7A42; font-weight: 600; }

/* 顶栏收起/展开按钮（手机端第二行开关）不再用金色 */
.topbar-toggle {
  background: rgba(7, 193, 96, .08); border-color: rgba(7, 193, 96, .55); color: #0E7A42;
}
.topbar-toggle:hover { background: rgba(7, 193, 96, .14); }

/* 好友列表/请求在浅底上的底纹 */
.fr-row { background: #F7F7F7; border: 1px solid #EDEDED; }
.fr-row.friend:hover { background: #F0F0F0; }
.fr-head { color: #8A8A8A; }
.fr-meta b { color: #191919; }
.fr-meta span { color: #8A8A8A; }

/* 房间下拉里的文字：原来写死了深色底用的浅字，白底上等于隐形 */
.rm-name { color: #191919; }
.rm-sub { color: #8A8A8A; }
.room-menu-item:hover { background: #F2F2F2; }
.room-menu-item.active { background: rgba(7, 193, 96, .10); }
.room-menu-item.active .rm-name { color: #0E7A42; font-weight: 600; }
.room-menu-foot { color: #07C160; }
.room-menu-foot:hover { color: #06AD56; }
.room-menu-item.secret { border: 1px dashed rgba(7, 193, 96, .45); background: rgba(7, 193, 96, .05); }
.room-menu-item.secret .rm-name { color: #0E7A42; }
.rm-tag { border-color: #E4E4E4; color: #8A8A8A; }
.rm-tag.gold { color: #0E7A42; border-color: rgba(7, 193, 96, .45); background: rgba(7, 193, 96, .10); }
.rm-group { color: #07C160; opacity: 1; }

/* 所有下拉框（含 .field select 这类写死深色的）统一浅底 */
select, .field select, .ct-selects select {
  background: #FFFFFF; border: 1px solid #E2E2E2; color: #191919;
}
select option { background: #FFFFFF; color: #191919; }
/* 3D 场景上的浮层仍在深色背景上，文字要浅，别跟着外壳的浅色文案一起变灰 */
.scene-overlay .hint, #view-hint { color: rgba(255, 255, 255, .58); }
.stage-line { color: #EAF7EE; background: rgba(10, 14, 25, .62); border-color: rgba(7, 193, 96, .5); }
.stage-count { color: #EAF7EE; background: rgba(10, 14, 25, .62); border-color: rgba(7, 193, 96, .55); }

/* ---------- 浅色：进入/新建 分区按钮 ---------- */
.sheet-split { margin-top: 16px; padding-top: 14px; border-top: 1px solid #E4E4E4; }
button.outline {
  background: #FFFFFF; border: 1px solid #07C160; color: #07C160;
  font-weight: 500; background-image: none;
}
button.outline:hover { background: #F0FBF4; border-color: #06AD56; color: #06AD56; }
button.outline.wide { display: block; width: 100%; }

/* ---------- 顶栏动作按钮：统一图标+文字 ---------- */
.actions { display: flex; align-items: center; gap: 8px; }
.actions button {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px; border-radius: 6px;
  background: #F2F2F2; background-image: none; border: 1px solid #E4E4E4;
  color: #191919; font-size: 13px; font-weight: 500; box-shadow: none;
  transition: background .15s, border-color .15s, color .15s;
}
.actions button:hover { background: #EAEAEA; border-color: #D8D8D8; color: #191919; }
.actions button .ic { display: inline-flex; width: 16px; height: 16px; flex: none; color: #5C5C5C; }
.actions button .ic svg { width: 100%; height: 100%; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; }
.actions button .lb { display: inline-block; white-space: nowrap; }
.actions button.primary { background: #07C160; border-color: #07C160; color: #FFFFFF; }
.actions button.primary:hover { background: #06AD56; border-color: #06AD56; color: #FFFFFF; }
.actions button.primary .ic { color: #FFFFFF; }
.actions button.primary .ic svg { stroke-width: 1.9; }

@media (max-width: 820px) {
  .actions { justify-content: space-between; gap: 6px; }
  .actions button {
    height: 36px; width: 40px; padding: 0; flex: 0 0 auto;
    justify-content: center; border-radius: 8px;
  }
  .actions button .ic { width: 18px; height: 18px; }
  .actions button .lb { display: none; }
  .actions button.primary { width: auto; flex: 0 0 auto; padding: 0 14px; margin-left: auto; }
  .actions button.primary .ic { display: none; }
  .actions button.primary .lb { display: inline-block; font-size: 13px; }
  .friend-btn .badge { position: absolute; top: -5px; right: -5px; margin: 0; }
}

@media (max-width: 820px) {
  .topbar-toggle { display: none; }
  .layout.topbar-fold .actions { display: flex; }
  .layout.topbar-fold { --topbar-h: calc(100px + env(safe-area-inset-top, 0px)); }
  .layout.topbar-fold .topbar { grid-template-rows: 40px minmax(0, 1fr); padding-bottom: 8px; }
  .actions { padding-bottom: 2px; }
  .actions button { height: 36px; width: auto; padding: 0 14px; }
  .actions button .lb { display: inline-block; }
  .actions button.primary { flex: 0 0 auto; padding: 0 16px; }
}

/* ---------- 手机端：好友放回顶栏、隐藏独立私密按钮 ---------- */
@media (max-width: 820px) {
  .topbar { grid-template-columns: minmax(0, 1fr) auto auto; }
  .stats { grid-area: 1 / 2; }
  .actions { grid-area: 1 / 3; display: flex; gap: 6px; padding: 0; margin-left: 2px; }
  .layout.topbar-fold .actions { display: flex; }
  .layout.topbar-fold { --topbar-h: calc(54px + env(safe-area-inset-top, 0px)); }
  .layout.topbar-fold .topbar { grid-template-rows: minmax(0, 1fr); padding-bottom: 6px; }
  .actions button {
    width: 30px; height: 30px; padding: 0; border-radius: 8px;
    justify-content: center; flex: 0 0 auto;
  }
  .actions button .ic { width: 17px; height: 17px; }
  .actions button .lb { display: none !important; }
  #btn-secret { display: none !important; }
  .topbar-toggle { display: none; }
  .friend-btn .badge { position: absolute; top: -5px; right: -5px; margin: 0; font-size: 10px; min-width: 15px; height: 15px; line-height: 15px; }
}

/* 房间标题区闪三下：提示私密聊天室从这里进 */
@keyframes hintFlash {
  0%, 100% { box-shadow: 0 0 0 0 rgba(7, 193, 96, 0); }
  40% { box-shadow: 0 0 0 4px rgba(7, 193, 96, .45); }
}
.title-row.flash-hint { animation: hintFlash .75s ease-in-out 3; border-radius: 8px; }
.title-row { transition: box-shadow .2s; }

/* ---------- 按住说话 ---------- */
#btn-voice { touch-action: none; -webkit-user-select: none; user-select: none; font-size: 15px; }
.rec-hint {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-radius: 12px;
  background: rgba(0,0,0,.74); color: #FFFFFF;
  font-size: 14px; z-index: 40; pointer-events: none;
}
.rec-hint.cancel { background: #E0564F; }
.rec-hint b { font-weight: 600; font-variant-numeric: tabular-nums; }
.rec-hint .rec-tip { font-size: 12px; opacity: .82; }
.text.voice { padding: 6px 10px; }
.voice-play {
  display: inline-flex; align-items: center; gap: 8px;
  border: 0; background: transparent; padding: 2px 2px;
  font: inherit; color: inherit; cursor: pointer; min-width: 108px;
}
.voice-play .vp-ic { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: rgba(0,0,0,.08); font-size: 11px; }
.voice-play.playing .vp-ic { background: #07C160; color: #FFFFFF; }
.voice-play .vp-dur { font-variant-numeric: tabular-nums; opacity: .78; font-size: 13px; }
@media (max-width: 820px) {
  .rec-hint { bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
}

/* ================= 微信风格补丁（2026-11-25） ================= */

/* 电脑端聊天面板加宽 */
@media (min-width: 821px) {
  main { grid-template-columns: minmax(0, 1fr) 460px; }
}
@media (min-width: 1440px) {
  main { grid-template-columns: minmax(0, 1fr) 520px; }
}

/* 输入框：随字数自动撑高，最多约 5 行 */
#msg-input, .dm-composer textarea {
  resize: none; overflow-y: auto; scrollbar-width: thin;
}
#msg-input::-webkit-scrollbar, .dm-composer textarea::-webkit-scrollbar { width: 6px; }
#msg-input::-webkit-scrollbar-thumb, .dm-composer textarea::-webkit-scrollbar-thumb {
  background: #C8C8C8; border-radius: 3px;
}
#msg-input { max-height: 148px; }
.dm-composer textarea { max-height: 124px; }

/* 语音按钮录制态 */
.ghost.img-btn.voice-btn.rec, .voice-btn.rec { background: #07C160 !important; color: #FFFFFF !important; border-color: #07C160 !important; }

/* 按住说话面板：仿微信 */
.rec-hint {
  position: fixed; left: 50%; transform: translateX(-50%) translateY(0);
  bottom: calc(118px + env(safe-area-inset-bottom, 0px));
  width: 196px; padding: 16px 16px 12px; border-radius: 14px;
  background: rgba(32, 32, 32, .88); backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, .10);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .38);
  color: #FFFFFF; display: flex; flex-direction: column; align-items: center; gap: 10px;
  z-index: 70; transition: background .16s ease;
}
.rec-hint:not([hidden]) { animation: rhPop .16s ease-out both; }
.rh-wave { display: flex; align-items: center; justify-content: center; gap: 3px; height: 28px; }
.rh-wave i {
  display: block; width: 3px; height: 18px; border-radius: 2px;
  background: rgba(255, 255, 255, .9);
  transform: scaleY(.32); transform-origin: center;
  animation: rhWave 1s ease-in-out infinite;
}
.rh-wave i:nth-child(1) { animation-delay: -.9s; }
.rh-wave i:nth-child(2) { animation-delay: -.75s; }
.rh-wave i:nth-child(3) { animation-delay: -.6s; }
.rh-wave i:nth-child(4) { animation-delay: -.45s; }
.rh-wave i:nth-child(5) { animation-delay: -.3s; }
.rh-wave i:nth-child(6) { animation-delay: -.45s; }
.rh-wave i:nth-child(7) { animation-delay: -.6s; }
.rh-wave i:nth-child(8) { animation-delay: -.75s; }
.rh-wave i:nth-child(9) { animation-delay: -.9s; }
.rh-time { display: flex; align-items: baseline; gap: 4px; }
.rh-time b { font-size: 19px; font-weight: 600; letter-spacing: .3px; font-variant-numeric: tabular-nums; }
.rh-time span { font-size: 12px; opacity: .5; }
.rh-tip { font-size: 12px; color: rgba(255, 255, 255, .62); }
.rh-mask {
  display: none; width: 46px; height: 46px; border-radius: 50%;
  border: 2px solid #FFB9B2; align-items: center; justify-content: center;
  font-size: 22px; color: #FFB9B2; line-height: 1;
}
.rec-hint.cancel { background: rgba(198, 58, 50, .92); border-color: rgba(255, 255, 255, .18); }
.rec-hint.cancel .rh-wave { display: none; }
.rec-hint.cancel .rh-mask { display: flex; }
.rec-hint.cancel .rh-tip { color: #FFE7E4; font-weight: 600; }

@keyframes rhWave {
  0%, 100% { transform: scaleY(.32); opacity: .55; }
  50% { transform: scaleY(1.28); opacity: 1; }
}
@keyframes rhPop {
  from { opacity: 0; transform: translateX(-50%) translateY(8px) scale(.96); }
  to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

/* 发图片：先选截图 / 从相册选 */
.img-menu {
  position: absolute; left: 6px; bottom: calc(100% + 8px); z-index: 45;
  min-width: 136px; padding: 4px; display: flex; flex-direction: column;
  background: #FFFFFF; border: 1px solid #E4E4E4; border-radius: 10px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .16);
  animation: rhPop2 .14s ease-out both;
}
.img-menu[hidden] { display: none; }
.img-menu-item {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 9px 10px; border: 0; border-radius: 8px; background: transparent;
  color: #191919; font-size: 13.5px; text-align: left;
}
.img-menu-item:hover { background: #F2F2F2; }
.img-menu-item .im-ic { width: 20px; text-align: center; font-size: 15px; color: #07C160; }
@keyframes rhPop2 {
  from { opacity: 0; transform: translateY(6px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 820px) {
  .rec-hint { bottom: calc(104px + env(safe-area-inset-bottom, 0px)); width: 184px; }
  #msg-input { max-height: 104px; }
}

/* ================= 输入行重排：喇叭 / 输入框 / 表情 / 加号（文字时变发送） ================= */
.input-row { gap: 6px; }
#composer .input-row .img-btn, .input-row .img-btn { width: 34px; height: 34px; font-size: 16px; }

#composer #btn-send.plus, #btn-send.plus-send.plus {
  width: 36px; height: 36px; padding: 0; flex: 0 0 auto;
  border-radius: 9px; border: 1px solid #E4E4E4; background: #F2F2F2; background-image: none;
  color: #4A4A4A; font-size: 21px; font-weight: 400; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
#composer #btn-send.plus:hover, #btn-send.plus-send.plus:hover { background: #EAEAEA; background-image: none; }

#composer #btn-send.go, #btn-send.plus-send.go {
  height: 36px; padding: 0 14px; flex: 0 0 auto;
  border-radius: 9px; border: 1px solid #07C160; background: #07C160; background-image: none;
  color: #FFFFFF; font-size: 14px; font-weight: 600;
}
#composer #btn-send.go:hover, #btn-send.plus-send.go:hover { background: #06AD56; background-image: none; }

/* 加号面板 */
.more-pop {
  position: absolute; right: 4px; bottom: calc(100% + 8px); z-index: 45;
  display: grid; grid-template-columns: repeat(2, 82px); gap: 8px; padding: 10px;
  background: #FFFFFF; border: 1px solid #E6E6E6; border-radius: 12px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .16);
  animation: rhPop2 .14s ease-out both;
}
.more-pop[hidden] { display: none; }
#composer .more-pop .more-item, .more-pop .more-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  width: 82px; height: 74px; padding: 0; border: 1px solid #EFEFEF; border-radius: 10px;
  background: #FAFAFA; color: #4A4A4A; font-size: 12.5px; line-height: 1.2;
}
#composer .more-pop .more-item:hover, .more-pop .more-item:hover { background: #F2F2F2; border-color: #E4E4E4; }
.more-pop .mi-ic { font-size: 19px; line-height: 1; color: #07C160; font-weight: 600; }
.more-pop .mi-lb { font-size: 12.5px; color: #5C5C5C; }

@media (max-width: 820px) {
  #composer .input-row .img-btn, .input-row .img-btn { width: 32px; height: 32px; }
  #composer #btn-send.plus { width: 32px; height: 32px; font-size: 19px; }
  #composer #btn-send.go { height: 32px; padding: 0 12px; }
}

/* toast 抬高，避免盖住输入行 */
.toast { bottom: calc(92px + env(safe-area-inset-bottom, 0px)); max-width: min(560px, 92vw); text-align: center; }
/* 加号/发送：热区放大到图标框上方，避免「点上半截没反应」 */
#composer #btn-send { position: relative; }
#composer #btn-send::before {
  content: ''; position: absolute; left: -6px; right: -6px; top: -10px; bottom: -4px; border-radius: 10px;
}

/* 历史消息：滚动到顶自动加载 + 顶部提示（不再占输入区的按钮） */
#chat-panel { position: relative; }
.hist-tip {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%); z-index: 8;
  padding: 5px 12px; border-radius: 999px; font-size: 12px; cursor: pointer;
  background: rgba(255, 255, 255, .94); border: 1px solid #E0E0E0; color: #7A7A7A;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .10);
}
.hist-tip[hidden] { display: none; }
.hist-tip.busy { color: #07C160; border-color: rgba(7, 193, 96, .35); }
.hist-tip.done { color: #9B9B9B; }
.loadmore { display: none !important; }
.messages { scroll-behavior: auto; }

/* ================= 房主管理 / 发言权限 ================= */
.voice-banner {
  margin: 0 12px 6px; padding: 8px 12px; border-radius: 10px;
  background: rgba(224, 90, 75, .10); color: #C0392B; font-size: 12.5px;
  border: 1px solid rgba(224, 90, 75, .28);
}
.adm-card {
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
  margin: 10px 0; background: var(--bg-soft);
}
.adm-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.adm-row-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.adm-row-text b { font-size: 13.5px; }
.adm-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.adm-head b { font-size: 13.5px; }
.adm-list { max-height: 34vh; overflow: auto; }
.adm-mem { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); }
.adm-mem:first-child { border-top: none; }
.adm-mem-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.adm-mem-meta b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-mem-acts { display: flex; gap: 6px; flex: none; }
.adm-mem-acts button.tiny { padding: 4px 8px; font-size: 11.5px; }
.adm-mem-acts button.on { border-color: #07C160; color: #07C160; background: rgba(7, 193, 96, .10); }
.adm-mem-acts button.danger { color: var(--danger, #E05A4B); }
.adm-mem-acts button.danger.on { border-color: var(--danger, #E05A4B); background: rgba(224, 90, 75, .10); }
.adm-tag { font-size: 11.5px; color: #07C160; border: 1px solid rgba(7, 193, 96, .4); padding: 2px 8px; border-radius: 999px; }
.adm-empty { padding: 8px 0; }
.adm-foot { display: flex; justify-content: flex-end; margin-top: 8px; }
.adm-card select { width: auto; min-width: 120px; }
.muted.tiny.warn { color: var(--danger, #E05A4B); }

.switch { position: relative; display: inline-flex; width: 46px; height: 26px; flex: none; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: #D6D6D6; transition: background .18s; }
.switch i::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .18s;
}
.switch input:checked + i { background: #07C160; }
.switch input:checked + i::after { transform: translateX(20px); }

/* 邀请二维码 */
.adm-qr {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 10px;
  flex-wrap: wrap;
}
.adm-qr img {
  width: 150px;
  height: auto;
  border-radius: 12px;
  background: #fff;
  padding: 0;
  border: 1px solid var(--line);
  cursor: zoom-in;
}
.adm-qr-side {
  flex: 1;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.adm-invite-url {
  width: 100%;
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
}
.adm-qr-btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* ================= 私聊输入行：和公共房一模一样（语音 / 输入 / 表情 / 加号-发送） ================= */
.dm-composer .input-row { gap: 6px; align-items: flex-end; }
#dm-send.plus {
  width: 36px; height: 36px; padding: 0; flex: 0 0 auto;
  border-radius: 9px; border: 1px solid #E4E4E4; background: #F2F2F2; background-image: none;
  color: #4A4A4A; font-size: 21px; font-weight: 400; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
#dm-send.plus:hover { background: #EAEAEA; background-image: none; }
#dm-send.go {
  height: 36px; padding: 0 14px; flex: 0 0 auto;
  border-radius: 9px; border: 1px solid #07C160; background: #07C160; background-image: none;
  color: #FFFFFF; font-size: 14px; font-weight: 600;
}
#dm-send.go:hover { background: #06AD56; background-image: none; }
.dm-composer .more-pop { right: 4px; }

/* 手机上跟公共房一样缩到 32px */
@media (max-width: 820px) {
  #dm-send.plus { width: 32px; height: 32px; font-size: 19px; }
  #dm-send.go { height: 32px; padding: 0 12px; }
}

/* 新版本提示条 */
#update-bar {
  position: fixed; left: 50%; top: 10px; transform: translateX(-50%);
  z-index: 9999; display: flex; align-items: center; gap: 8px;
  background: #07C160; color: #FFFFFF; font-size: 13px;
  padding: 8px 12px; border-radius: 999px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
}
#update-bar button {
  border: 0; background: rgba(255, 255, 255, .22); color: #FFFFFF;
  padding: 4px 10px; border-radius: 999px; cursor: pointer; font: inherit;
}

/* ================= 轻量 2D 议事厅 v7：手机/电脑两套背景图 + 6 排座位（2026-11-27） ================= */
#scene.mode2d canvas { display: none; }
#scene.mode3d #scene2d { display: none; }
#scene2d {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none;
  background-color: #DCE7EC;
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  --s2-seat: 20px;
  --s2-name: 9px;
  --s2-stage-bottom: 40%;
}
#scene2d.bg-wide { background-image: url('/static/img/hall2d-wide.webp'); }
#scene2d.bg-tall { background-image: url('/static/img/hall2d-tall.webp'); }
#scene2d .s2-layer { position: absolute; inset: 0; }

/* 大屏：位置由 JS 按背景图里那块空屏给（不同布景不一样） */
#scene2d .s2-screen {
  position: absolute; overflow: hidden; padding: 6px 10px 7px;
  background: linear-gradient(180deg, rgba(10, 24, 26, .9), rgba(8, 18, 20, .82));
  border: 1px solid rgba(7, 193, 96, .3);
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(6, 40, 32, .3), inset 0 0 22px rgba(7, 193, 96, .07);
  display: flex; flex-direction: column; height: auto;
  font-size: var(--s2-scr-fs, 12px);
}
#scene2d .s2-screen.live { border-color: rgba(7, 193, 96, .78); }
#scene2d .s2-screen-head {
  display: flex; justify-content: space-between; gap: 8px;
  font-size: calc(var(--s2-scr-fs, 12px) * .9); color: #7FE0B0; letter-spacing: .2px;
}
#scene2d .s2-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
#scene2d .s2-screen.live .s2-name::before {
  content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 5px;
  border-radius: 50%; background: #07C160; vertical-align: 1px;
  box-shadow: 0 0 6px rgba(7, 193, 96, .9);
}
#scene2d .s2-time { opacity: .6; flex: none; }
#scene2d .s2-text {
  margin-top: 3px; font-size: calc(var(--s2-scr-fs, 12px) * 1.05); line-height: 1.42; color: #EAF6EE;
  word-break: break-word;
  overflow: hidden;
}

/* ---------- 观众席：6 排，头像 + 头顶「名字 + 性别」 ---------- */
#scene2d .s2-seat {
  position: absolute; transform: translate(-50%, -50%);
  display: flex; align-items: center; justify-content: center;
  width: calc(var(--s2-seat) * 1.2); height: calc(var(--s2-seat) * 1.2);
  border: 0; background: none; padding: 0; font: inherit; line-height: 1;
  pointer-events: auto; cursor: pointer;
}
#scene2d .s2-seat.empty { pointer-events: none; }
#scene2d .s2-seat.empty::before {
  content: ''; display: block;
  width: calc(var(--s2-seat) * .62); height: calc(var(--s2-seat) * .62);
  border-radius: 42%;
  background: linear-gradient(180deg, rgba(255, 255, 255, .8), rgba(226, 240, 236, .62));
  border: 1px solid rgba(19, 84, 66, .24);
  box-shadow: 0 1px 2px rgba(6, 40, 32, .16), inset 0 1px 0 rgba(255, 255, 255, .9);
}
#scene2d .s2-sava {
  width: var(--s2-seat); height: var(--s2-seat); flex: none;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  background: #FFFFFF;
  border: 2px solid #8AB6A6;
  box-shadow: 0 2px 6px rgba(6, 40, 32, .3);
  font-size: calc(var(--s2-seat) * .55);
}
#scene2d .s2-sava img { width: 100%; height: 100%; object-fit: cover; display: block; }
#scene2d .s2-sava.g-m { border-color: #4C93FF; }
#scene2d .s2-sava.g-f { border-color: #FF7BA9; }
#scene2d .s2-sava.g-x { border-color: #7FC9A8; }
#scene2d .s2-seat.live .s2-sava {
  border-color: #07C160;
  box-shadow: 0 0 0 2px rgba(7, 193, 96, .26), 0 0 12px rgba(7, 193, 96, .6);
}
/* 头顶标签 */
#scene2d .s2-slabel {
  position: absolute; left: 50%; bottom: calc(100% + 1px); transform: translateX(-50%);
  pointer-events: none;
  font-size: var(--s2-name);
  max-width: var(--s2-lname, 46px);
  padding: 0 2px; border-radius: 4px;
  background: rgba(255, 255, 255, .9);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  box-shadow: 0 1px 3px rgba(6, 40, 32, .2);
}
#scene2d .s2-slabel i { font-style: normal; margin-right: 1px; font-weight: 700; }
#scene2d .s2-slabel.g-m { color: #1657B8; }
#scene2d .s2-slabel.g-f { color: #C23A79; }
#scene2d .s2-slabel.g-x { color: #14503C; }
#scene2d.s2-nonames .s2-slabel { display: none; }

/* ---------- 台上的人：站在台面上，尺寸随人数自适应 ---------- */
#scene2d .s2-people {
  position: absolute; left: 50%; bottom: var(--s2-stage-bottom);
  transform: translateX(-50%);
  display: flex; align-items: flex-end; justify-content: center;
  gap: 4px; max-width: 66%;
  pointer-events: none;
}
#scene2d .s2-person {
  border: 0; background: transparent; padding: 0; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  pointer-events: auto;
}
#scene2d .s2-ava {
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #FFFFFF;
  border: 2px solid #FFFFFF;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(6, 40, 32, .35), 0 0 0 1px rgba(24, 74, 60, .12);
  transition: width .2s ease, height .2s ease;
}
#scene2d .s2-ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
#scene2d .s2-person.g-m .s2-ava { border-color: #4C93FF; }
#scene2d .s2-person.g-f .s2-ava { border-color: #FF7BA9; }
#scene2d .s2-person.live .s2-ava {
  border-color: #07C160;
  box-shadow: 0 0 0 2px rgba(7, 193, 96, .3), 0 0 16px rgba(7, 193, 96, .6);
}
#scene2d .s2-pname {
  font-size: 10px; max-width: 58px; padding: 1px 5px;
  border-radius: 5px;
  background: rgba(255, 255, 255, .94);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  box-shadow: 0 1px 4px rgba(6, 40, 32, .22);
}
#scene2d .s2-pname i { font-style: normal; margin-right: 1px; font-weight: 700; }
#scene2d .s2-pname.g-m { color: #1657B8; }
#scene2d .s2-pname.g-f { color: #C23A79; }
#scene2d .s2-pname.g-x { color: #14503C; }

/* 角标 */
#scene2d .s2-meta {
  position: absolute; right: 8px; bottom: 5px;
  font-size: 10px; color: #14483A; opacity: .62;
  background: rgba(255, 255, 255, .7); padding: 1px 6px; border-radius: 999px;
}

/* 2D 模式下角标已自带人数，隐藏顶部小条 */
body.s2-on #stage-line { display: none !important; }

@media (max-width: 820px) {
  #scene2d .s2-meta { font-size: 9px; right: 5px; bottom: 3px; }
}

/* 舞台左上角：当前房间名（2D / 3D 都用这一层，跟着场景一起换） */
.scene-room {
  position: absolute; top: 10px; left: 12px; z-index: 7;
  display: flex; align-items: center; gap: 6px; max-width: min(46%, 420px);
  padding: 5px 11px 5px 9px; border-radius: 999px;
  background: rgba(255, 255, 255, .86);
  border: 1px solid rgba(7, 193, 96, .26);
  box-shadow: 0 2px 10px rgba(6, 40, 32, .14);
  backdrop-filter: blur(8px);
  font-size: 12.5px; line-height: 1.2; color: #0F2B22;
  pointer-events: none;
}
.scene-room .sroom-ic {
  flex: 0 0 auto; width: 17px; height: 17px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(7, 193, 96, .16); color: #0B7A45;
  font-size: 11px; font-weight: 700;
}
.scene-room .sroom-name {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-weight: 600; letter-spacing: .2px;
}
.scene-room .sroom-lock {
  flex: 0 0 auto; padding: 0 5px; border-radius: 5px;
  background: rgba(255, 176, 32, .18); color: #8A5A00;
  font-size: 10.5px;
}
.scene-room.secret { border-color: rgba(255, 176, 32, .45); }
@media (max-width: 820px) {
  .scene-room { top: 8px; left: 8px; font-size: 11.5px; max-width: 54%; padding: 4px 9px 4px 7px; }
}

/* 大厅分享弹窗：二维码居中，链接只读可选 */
.share-qr { display: flex; justify-content: center; padding: 4px 0 12px; }
.share-qr img {
  width: min(258px, 58vw); height: auto;
  border-radius: 14px; border: 1px solid #E4E6E8; background: #fff;
  box-shadow: 0 6px 20px rgba(16, 20, 24, .10);
}
a.btnlike {
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; cursor: pointer; margin-right: 8px;
  padding: 8px 14px; border-radius: 10px; font-size: 14px;
  background: #F7F7F7; border: 1px solid #E4E4E4; color: #191919;
}
a.btnlike:hover { border-color: #07C160; color: #07C160; }

/* 分享弹窗里的「关于本站」内链（也是首页通往介绍页的入口） */
.share-about { text-align: center; margin: -6px 0 14px; font-size: 13px; }
.share-about a { color: #07C160; text-decoration: none; }
.share-about a:hover { text-decoration: underline; }
