/* ==========================================================================
   窄版大厅 285×660 —— 语音房同款版式（独立于宽版大厅）
   结构：头部身份 / 权益条 / 4 tab / 滚动区(轮播+活动位+频道) / 底部麦状态条
   仅 body.narrow 生效；宽版完全不受影响。
   ========================================================================== */

.narrow-lobby { display: none; }

body.narrow #screen-lobby:not(.hidden) {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  min-height: 0 !important;
  padding: 0 !important;
}
/* 进房后大厅带 .hidden，窄版也必须真正退场 */
body.narrow #screen-lobby.hidden { display: none !important; }
body.narrow #screen-lobby > :not(#narrow-lobby) { display: none !important; }
body.narrow #narrow-lobby {
  display: flex; flex-direction: column;
  flex: 1 1 auto !important; min-height: 0 !important; height: auto !important;
  background: #fff; color: var(--nl-ink, #26303f);
  font-size: 12px; line-height: 1.35;
  --nl-brand: #3554d1;
  --nl-brand-deep: #2b45b0;
  --nl-ink: #26303f;
  --nl-ink-2: #5a6a82;
  --nl-mut: #8a94a6;
  --nl-mut-2: #a8b2c4;
  --nl-line: #edf0f6;
  --nl-soft: #f7f9fd;
  --nl-green: #2e9c7d;
  --nl-gold: #d6a64b;
}

#narrow-lobby * { box-sizing: border-box; }
/* 重置全局 button 外观；:where() 让权重为 0，组件自己的 .nl-* 规则始终能覆盖 */
:where(#narrow-lobby) button {
  font-family: inherit; font-size: inherit; color: inherit;
  background: none; border: 0; padding: 0; margin: 0;
  border-radius: 0; transition: none;
}

/* ---------- 头部：头像 / 昵称 / 签名 / 徽章 ---------- */
.nl-head {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px 7px;
  background: #fff;
  border-bottom: 1px solid var(--nl-line);
}
.nl-avatar {
  position: relative;
  width: 62px; height: 62px; flex: 0 0 62px; border-radius: 50%;
  background: #4f6bd8 center/cover no-repeat; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700; cursor: pointer;
  box-shadow: 0 1px 3px rgba(31, 41, 55, .12);
}
.nl-od {
  position: absolute; left: -1px; bottom: -1px;
  width: 12px; height: 12px; border-radius: 50%;
  background: #3ec27a; border: 2px solid #fff;
}
.nl-od.off { background: #c3cbd8; }
.nl-idtext { min-width: 0; flex: 1 1 auto; }
.nl-name-row { display: flex; align-items: center; gap: 5px; min-width: 0; }
.nl-name {
  font-size: 15px; font-weight: 700; letter-spacing: .2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer;
}
.nl-online {
  flex: 0 0 auto; font-size: 9.5px; color: var(--nl-green);
  border: 1px solid rgba(46, 156, 125, .35); background: rgba(46, 156, 125, .08);
  border-radius: 3px; padding: 0 3px; line-height: 13px;
}
.nl-sign {
  margin-top: 3px; font-size: 11.5px; color: var(--nl-mut);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer;
}
.nl-sign::before { content: "◐"; margin-right: 4px; font-size: 10.5px; color: #a9b4c6; }
.nl-sign::after { content: "›"; margin-left: 4px; color: #bcc5d4; }
.nl-mini { display: flex; gap: 4px; margin-top: 5px; min-height: 16px; align-items: center; }
.nl-mini .px-ico { width: 17px; height: 17px; flex: 0 0 17px; font-size: 9.5px; border-radius: 4px; }
.nl-mini-txt { font-size: 10px; color: var(--nl-mut); }
/* 徽章：语音房 头部那一排荣誉小牌子 */
.nl-mini .nl-pill {
  height: 16px; padding: 0 5px; border-radius: 8px;
  font-size: 9.5px; line-height: 16px; font-weight: 600; letter-spacing: .2px;
}
.nl-pill.gold { background: linear-gradient(135deg, #f7e6b6, #d6a64b); color: #6b4d10; }
.nl-pill.violet { background: linear-gradient(135deg, #dcd0f8, #8f6be0); color: #3d2a70; }
.nl-head-btn {
  flex: 0 0 24px; width: 24px; height: 24px; border: 0; border-radius: 50%;
  background: #f2f5fb; color: var(--nl-mut-2); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.nl-head-btn:hover { background: #eef2f9; color: var(--nl-brand); }

/* ---------- 权益条 ---------- */
.nl-ad {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 6px;
  padding: 6px 8px 6px 12px; background: #fff;
  border-bottom: 1px solid var(--nl-line);
}
.nl-ad-ico {
  flex: 0 0 auto; width: 16px; height: 16px; border-radius: 3px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 9px; color: #8a6d1f; font-weight: 700;
  background: linear-gradient(135deg, #f6e3ae, #d6a64b);
}
.nl-adtext {
  flex: 1 1 auto; min-width: 0; font-size: 13px; color: #3b4557;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: opacity .25s;
}
.nl-adtext.swap { opacity: 0; }
.nl-search-btn {
  width: 26px; height: 26px; flex: 0 0 26px;
  border: 0; background: transparent; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; border-radius: 50%; transition: background .15s;
}
.nl-search-btn:hover { background: #eef2f9; }
.nl-search-btn:active { background: #e2e9f5; }
.nl-search-btn svg { display: block; }
.nl-search { width: 15px; height: 15px; display: block; }

/* ---------- 4 个 tab ---------- */
.nl-quick {
  flex: 0 0 auto; display: grid; grid-template-columns: repeat(4, 1fr);
  background: #fff; border-bottom: 1px solid var(--nl-line);
}
.nl-q {
  position: relative; border: 0; background: transparent; cursor: pointer;
  padding: 9px 0 8px; color: #7b8698;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  transition: color .15s;
}
/* 语音房 窄版的 tab 只有图标，没有文字标签（文字保留在 DOM 里做无障碍/提示用） */
.nl-q span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.nl-q svg { width: 24px; height: 24px; flex: 0 0 24px; }
.nl-q:hover { color: var(--nl-ink-2); }
/* 语音房：选中只把图标变蓝，不加下划线、不加底块 */
.nl-q.on { color: var(--nl-brand); }
.nl-q.on span { color: #2f3948; }
.nl-q .nl-q-badge {
  position: absolute; top: 4px; right: 50%; margin-right: -16px;
  min-width: 13px; height: 13px; padding: 0 3px; border-radius: 7px;
  background: #f04438; color: #fff; font-size: 9px; line-height: 13px;
  text-align: center; font-weight: 600;
}

/* ---------- 滚动区 ---------- */
.nl-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; background: #fff; }
.nl-scroll::-webkit-scrollbar { width: 0; }
.nl-panel[hidden] { display: none !important; }
.nl-panel { padding-bottom: 10px; } /* 最后一行不要贴着底栏 */

/* ---------- 轮播 banner ---------- */
.nl-hero {
  position: relative; margin: 0 0 8px; height: 105px;
  border-radius: 0; overflow: hidden; background: #eef1f8;
  touch-action: pan-y; cursor: pointer;
}
.nl-hero-track { position: absolute; inset: 0; display: flex; will-change: transform; }
.nl-slide {
  position: relative; flex: 0 0 100%; height: 100%;
  padding: 14px 14px 12px; color: #fff; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center;
}
.nl-slide-bg { position: absolute; inset: 0; }
.nl-slide-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(120px 70px at 88% 18%, rgba(255, 255, 255, .35), transparent 70%),
    radial-gradient(90px 90px at 70% 110%, rgba(255, 255, 255, .18), transparent 70%),
    linear-gradient(90deg, rgba(10, 14, 30, .5), rgba(10, 14, 30, .04) 72%);
}
.nl-slide-tag {
  position: relative; font-size: 9px; letter-spacing: .5px;
  background: rgba(255, 255, 255, .22); border-radius: 3px;
  padding: 1px 5px; align-self: flex-start; margin-bottom: 5px;
}
.nl-slide-t { position: relative; font-size: 20px; font-weight: 800; letter-spacing: .5px; text-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.nl-slide-s { position: relative; font-size: 10.5px; opacity: .92; margin-top: 2px; }
.nl-slide-cta {
  position: relative; align-self: flex-start; margin-top: 7px;
  border: 0; border-radius: 20px; padding: 3px 10px; cursor: pointer;
  background: rgba(255, 255, 255, .92); color: #2b3350;
  font-size: 10px; font-weight: 600;
}
.nl-slide-cta:hover { background: #fff; }
.nl-hero::after {
  content: "›"; position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font-size: 22px; line-height: 1; color: rgba(255, 255, 255, .85); pointer-events: none;
}
.nl-hero-dots {
  position: absolute; left: 0; right: 0; bottom: 7px;
  display: flex; justify-content: center; gap: 4px; pointer-events: none;
}
.nl-dot {
  pointer-events: auto; width: 4px; height: 4px; border: 0; padding: 0;
  border-radius: 2px; background: rgba(255, 255, 255, .5); cursor: pointer;
  transition: width .2s, background .2s;
}
.nl-dot.on { width: 12px; background: #fff; }

/* ---------- 活动位 ---------- */
.nl-promos { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin: 0 8px 10px; }
.nl-promo {
  position: relative; height: 80px; border: 0; border-radius: 5px;
  padding: 9px 10px; text-align: left; cursor: pointer; overflow: hidden;
  color: #fff; display: flex; flex-direction: column; justify-content: center;
}
.nl-promo::after {
  content: ""; position: absolute; right: -14px; bottom: -18px;
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(255, 255, 255, .16);
}
.nl-promo .p-t { font-size: 12.5px; font-weight: 700; letter-spacing: .2px; }
.nl-promo .p-s { font-size: 9.5px; opacity: .85; margin-top: 2px; }
.nl-promo.gold { background: linear-gradient(135deg, #3a2b64 0%, #6d4bc4 55%, #b189e0 100%); }
.nl-promo.star { background: linear-gradient(135deg, #12294f 0%, #1d5bb8 55%, #3fa7d8 100%); }
.nl-promo:hover { filter: brightness(1.06); }

/* ---------- 分组 ---------- */
.nl-sec { border-bottom: 1px solid #f4f6fa; }
.nl-sec-head {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 12px 7px; cursor: pointer; user-select: none;
  position: sticky; top: 0; background: #fff; z-index: 2;
}
.nl-sec-head b { font-size: 13px; font-weight: 700; color: var(--nl-ink); }
.nl-sec-note { font-size: 9.5px; color: var(--nl-mut-2); flex: 1 1 auto; }
.nl-caret {
  flex: 0 0 auto; width: 14px; height: 14px; color: var(--nl-mut-2);
  font-size: 9px; transition: transform .15s; text-align: center; line-height: 14px;
}
.nl-sec-head.closed .nl-caret { transform: rotate(-90deg); }
.nl-sec-head.closed + .nl-sec-body { display: none; }

/* ---------- 频道卡 ---------- */
.nl-chan {
  display: grid; grid-template-columns: 40px 1fr auto; gap: 10px;
  align-items: center; padding: 8px 12px; min-height: 56px; cursor: pointer;
  position: relative; transition: background .12s;
}
.nl-chan + .nl-chan { margin-top: -2px; }
.nl-chan:hover { background: var(--nl-soft); }
.nl-chan:active { background: #eef3ff; }
.nl-chan.busy { opacity: .55; pointer-events: none; }
.nl-chan.on { background: #f2f3f5; }
.nl-chan .ic {
  position: relative; width: 40px; height: 40px; border-radius: 6px;
  color: #fff; font-size: 15px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #5b8def, #3554d1);
  box-shadow: 0 1px 2px rgba(31, 41, 55, .14);
}
.nl-chan .ic .bdg {
  position: absolute; right: 1px; bottom: 1px;
  min-width: 14px; height: 14px; padding: 0 3px; border-radius: 7px;
  background: #f04438; color: #fff; font-size: 8.5px; font-weight: 600;
  line-height: 14px; text-align: center; border: 1px solid #fff;
}
/* 新岛试运营角标：业内是橙底「试」，压在图标右下角 */
.nl-chan .ic .bdg.trial { background: #f0742c; font-size: 9px; }
/* 底栏「≡ 频道名」里的三横线字形 */
.nl-mic .mic-glyph {
  font-size: 12px; font-weight: 700; letter-spacing: -1.5px;
  line-height: 1; padding-right: 1.5px; transform: translateY(-1px);
}
.nl-chan-main { min-width: 0; display: block; }
.nl-chan .nm {
  display: flex; align-items: center; gap: 4px;
  font-size: 13px; color: var(--nl-ink); font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nl-chan .nm .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nl-chan .sub { display: block; font-size: 11px; color: var(--nl-mut); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nl-chan .on { font-size: 9.5px; color: var(--nl-green); white-space: nowrap; font-variant-numeric: tabular-nums; }
.nl-chan .on.zero { color: var(--nl-mut-2); }
.nl-chan .sub .live {
  font-style: normal; margin-left: 8px; color: var(--nl-green);
  font-variant-numeric: tabular-nums;
}
.nl-chan .sub .live.zero { color: var(--nl-mut-2); }
.nl-chan > .nl-star { align-self: center; justify-self: end; }
.nl-star.ghost { visibility: hidden; }
.nl-star {
  flex: 0 0 auto; width: 16px; height: 16px; padding: 0; border: 0;
  background: transparent; color: #cfd6e3; cursor: pointer; opacity: .3;
  display: inline-flex; align-items: center; justify-content: center;
  transition: color .12s, transform .12s;
}
.nl-star svg { width: 11px; height: 11px; }
.nl-star.on, .nl-chan:hover .nl-star, .nl-star:hover { opacity: 1; }
.nl-star.on { color: #f0a92a; }
.nl-star:hover { transform: scale(1.12); }

.nl-empty { padding: 6px 10px 12px; font-size: 10.5px; color: var(--nl-mut-2); }

/* ---------- 好友行 ---------- */
.nl-fr {
  display: grid; grid-template-columns: 26px 1fr auto; gap: 7px; align-items: center;
  padding: 5px 10px; cursor: default;
}
.nl-fr:hover { background: var(--nl-soft); }
.nl-fr .av {
  width: 26px; height: 26px; border-radius: 50%; color: #fff; font-size: 11px;
  display: flex; align-items: center; justify-content: center; font-weight: 600;
  background: #5b8def center/cover no-repeat; position: relative;
}
.nl-fr .av .od {
  position: absolute; right: -1px; bottom: -1px; width: 8px; height: 8px;
  border-radius: 50%; background: #3ec27a; border: 1.5px solid #fff;
}
.nl-fr .av .od.off { background: #c3cbd8; }
.nl-fr .info { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.nl-fr .fn { font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nl-fr .fm { font-size: 9.5px; color: var(--nl-mut); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nl-fr .act {
  border: 1px solid #e3e8f2; background: #fff; color: var(--nl-ink-2);
  border-radius: 5px; padding: 1px 7px; font-size: 10px; cursor: pointer;
}
.nl-fr .act:hover { border-color: var(--nl-brand); color: var(--nl-brand); }

/* ---------- 我的 / 更多 面板 ---------- */
.nl-me-card {
  margin: 10px 10px 8px; padding: 10px; border-radius: 10px;
  background: linear-gradient(135deg, #f4f7ff, #fdfdff);
  border: 1px solid #e8edf9;
}
.nl-me-row { display: flex; align-items: center; gap: 8px; }
.nl-me-row .av {
  width: 40px; height: 40px; border-radius: 50%; color: #fff; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  background: #5b8def center/cover no-repeat; font-size: 15px;
}
.nl-me-n { font-size: 13px; font-weight: 600; }
.nl-me-m { font-size: 10px; color: var(--nl-mut); margin-top: 1px; }
.nl-me-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 9px; text-align: center; }
.nl-me-stats div { font-size: 12.5px; font-weight: 700; color: var(--nl-ink); }
.nl-me-stats span { display: block; font-size: 9px; color: var(--nl-mut); font-weight: 400; margin-top: 1px; }

.nl-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 6px 6px 10px; }
.nl-tile {
  border: 0; background: transparent; cursor: pointer; padding: 8px 2px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  border-radius: 8px; color: var(--nl-ink-2);
}
.nl-tile:hover { background: var(--nl-soft); }
.nl-tile .tic {
  width: 30px; height: 30px; border-radius: 9px; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 13px;
  background: linear-gradient(135deg, #6f8ff0, #3554d1);
}
.nl-tile .tic.g { background: linear-gradient(135deg, #e9c477, #c8952f); }
.nl-tile .tic.v { background: linear-gradient(135deg, #a97cf0, #6d3fd0); }
.nl-tile .tic.t { background: linear-gradient(135deg, #56c8b0, #23967f); }
.nl-tile .tic.o { background: linear-gradient(135deg, #f0a08a, #d0664a); }
.nl-tile span { font-size: 9.5px; }

/* ---------- 底部麦状态条 ---------- */
.nl-foot {
  flex: 0 0 auto; display: flex; align-items: center; gap: 6px;
  padding: 7px 10px; background: #fff;
  border-top: 1px solid #eef0f4;
}
.nl-mic {
  flex: 1 1 auto; min-width: 0;
  display: flex; align-items: center; gap: 6px;
  border: 0; background: transparent; border-radius: 6px;
  padding: 3px 4px; cursor: pointer; text-align: left;
  transition: background .15s;
}
.nl-mic:hover { background: var(--nl-soft); }
.nl-mic .mic-ico {
  flex: 0 0 18px; width: 18px; height: 18px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: #8a94a6;
}
.nl-mic.on .mic-ico { background: #e6f6ef; color: var(--nl-green); }
.nl-mic.muted .mic-ico { background: #fdeceb; color: #e04236; }
.nl-mic .mic-txt {
  min-width: 0; font-size: 10.5px; color: var(--nl-ink-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nl-mic.on .mic-txt { color: var(--nl-green); }
.nl-mic.muted .mic-txt { color: #e04236; }
.nl-foot-acts { display: flex; gap: 6px; flex: 0 0 auto; }
.nl-fbtn {
  width: 30px; height: 30px; padding: 0; border-radius: 50%; border: 0;
  background: #f2f4f8; color: #5a6a82; cursor: pointer; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
}
.nl-fbtn:hover { background: #e8edf6; color: var(--nl-brand); }
.nl-fbtn svg { width: 15px; height: 15px; }

/* ---------- 提示 ---------- */
.nl-hint {
  position: fixed; left: 50%; bottom: 58px; transform: translateX(-50%) translateY(4px);
  background: rgba(24, 32, 48, .93); color: #fff; font-size: 11.5px;
  padding: 6px 12px; border-radius: 7px; z-index: 9999;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  max-width: 250px; text-align: center; line-height: 1.45;
}
.nl-hint.on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 窄版里隐藏宽版滚动条残留（与 语音房 一致：滚动条不可见） */
body.narrow .nl-scroll { scrollbar-width: none; -ms-overflow-style: none; }
body.narrow .nl-scroll::-webkit-scrollbar { width: 0; height: 0; }

/* 头像里的首字：绝对定位，避免挤掉在线绿点 */
.nl-avatar .av-t {
  position: absolute; inset: 0; display: flex;
  align-items: center; justify-content: center; pointer-events: none;
}

/* 窄版里允许好友抽屉/弹层浮在大厅之上（默认被「隐藏兄弟节点」规则挡住） */
body.narrow #screen-lobby > #friends-overlay:not(.hidden) { display: flex !important; }
body.narrow #friends-overlay:not(.hidden) .drawer { width: 100%; max-width: none; }

