/* =========================================================================
   §2 登录页：白底青绿渐变 + 气泡 ♠ + WePoker + 手机/邮箱/账号三 tab。
   手机竖屏使用规格给出的绝对坐标；PC 单列居中，元素尺寸与文案不变。
   ========================================================================= */
.auth-page {
  position: relative;
  min-height: 100dvh;
  /* flex 而不是纯 block：PC 下 .auth-brand 是文档流里的第一个子元素，它 81px 的
     margin-top 会穿透（margin collapse）到 .auth-page 外面，把整页顶下去 81px——
     表现就是顶部露出一条白带、渐变盖不到顶，且页面 981px > 视口 900px 出滚动条。
     flex 容器自带 BFC，塌陷不会发生。手机竖屏的子元素都是 absolute，不受影响。 */
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(180deg, #DBFFFB 0%, #EDFFFD 18%, #FFFFFF 47%, #FFFFFF 100%);
}
.auth-brand {
  position: absolute; top: 74px; left: 50%; transform: translateX(-50%);
  width: 220px; display: flex; flex-direction: column; align-items: center; gap: 20px;
}
.auth-brand__bubble { display: block; width: 76px; height: 76px; line-height: 0; }
.auth-brand__bubble svg { display: block; }
.auth-brand__wordmark {
  height: 26px; line-height: 26px; white-space: nowrap;
  font-family: "Arial Rounded MT Bold", var(--font);
  font-size: 26px; font-weight: 800; font-style: italic; letter-spacing: -.5px; color: #16211F;
}

.auth-form {
  position: absolute; top: 274px; left: 50%; transform: translateX(-50%);
  width: min(334px, calc(100vw - 28px));
}
.auth-tabs { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; height: 33px; }
.auth-tab {
  position: relative; padding: 0; border: 0; border-bottom: 3px solid transparent;
  border-radius: 0; background: rgba(0, 0, 0, 0); color: #16211F;
  font-size: 14px; font-weight: 500; line-height: 30px; text-align: center;
}
.auth-tab.is-active { color: #08C0A0; border-bottom-color: #08C0A0; }
/* 参照里 tab 右侧的半透明图标轮廓：纯 CSS 伪元素，不参与点击命中。 */
.auth-tab::before, .auth-tab::after { content: ''; position: absolute; pointer-events: none; }
.auth-tab[data-tab-icon="email"]::before {
  right: 11px; top: 10px; width: 15px; height: 11px;
  border: 1.4px solid rgba(8, 192, 160, .10); border-radius: 2px;
}
.auth-tab[data-tab-icon="email"]::after {
  right: 11px; top: 10px; width: 15px; height: 11px;
  clip-path: polygon(0 0, 50% 62%, 100% 0, 100% 14%, 50% 82%, 0 14%);
  background: rgba(8, 192, 160, .10);
}
.auth-tab[data-tab-icon="account"]::before {
  right: 15px; top: 7px; width: 8px; height: 8px; border-radius: 50%;
  background: rgba(8, 192, 160, .10);
}
.auth-tab[data-tab-icon="account"]::after {
  right: 11px; top: 16px; width: 16px; height: 9px; border-radius: 999px 999px 0 0;
  background: rgba(8, 192, 160, .10);
}

.auth-field {
  position: relative; display: flex; align-items: center;
  width: 100%; height: 51px; border: 1px solid #DCE7E5; border-radius: 12px; background: #FFFFFF;
}
.auth-field--identity { margin-top: 21px; }
.auth-field--password { margin-top: 18px; border: 2px solid #08C0A0; }
.auth-input {
  flex: 1 1 auto; min-width: 0; height: 100%; padding: 0 12px 0 6px;
  border: 0; outline: 0; border-radius: inherit; background: transparent;
  font-size: 15px; color: #16211F;
}
.auth-input::placeholder { color: #16211F; opacity: 1; }
.auth-form.no-country .auth-input { padding-left: 16px; }
.auth-country { display: flex; align-items: center; flex: 0 0 auto; gap: 5px; height: 100%; padding-left: 11px; }
.auth-country.is-hidden { display: none; }
.auth-country__caret {
  width: 0; height: 0; border-left: 3px solid transparent; border-right: 3px solid transparent;
  border-top: 5px solid #7E8D8A;
}
.auth-country__sep { width: 1px; height: 16px; background: #E5ECEA; margin: 0 1px; }
.auth-country__code { font-size: 15px; color: #16211F; }
.auth-flag { position: relative; width: 20px; height: 14px; background: #DE2910; overflow: hidden; flex: none; }
.auth-flag__star { position: absolute; display: block; background: #FFDE00;
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.auth-flag__star--lg { width: 6px; height: 6px; left: 2px; top: 4px; }
.auth-flag__star--s1 { width: 2.4px; height: 2.4px; left: 9px; top: 1.3px; }
.auth-flag__star--s2 { width: 2.4px; height: 2.4px; left: 11.6px; top: 3.6px; }
.auth-flag__star--s3 { width: 2.4px; height: 2.4px; left: 11.6px; top: 6.8px; }
.auth-flag__star--s4 { width: 2.4px; height: 2.4px; left: 9px; top: 9.2px; }

.auth-eye {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 20px; height: 12px; padding: 0; border: 0; background: transparent;
  color: #8A9A96; line-height: 0;
}
.auth-eye--open { right: 40px; }
.auth-eye--off { right: 11px; }
.auth-eye.is-hidden { display: none; }

.auth-extra-row { position: relative; width: 100%; height: 13px; margin-top: 13px; }
.auth-forgot {
  padding: 0; border: 0; background: transparent; color: #08C0A0;
  font-size: 13px; font-weight: 500; line-height: 13px;
}
.auth-nickname-wrap { display: block; width: 100%; height: 32px; }
.auth-input--nickname { width: 100%; height: 32px; padding: 0 12px; border: 1px solid #DCE7E5; font-size: 14px; }
.auth-form.is-register .auth-extra-row { height: 32px; }
.auth-form.is-register .auth-submit { margin-top: 6px; }
/* 错误提示在文档流里、紧贴登录按钮上方。原来用 position:absolute; top:549px 是
   按手机竖屏的绝对坐标写死的：PC 上表单在 274–592px，提示就落到 823px 附近，
   离输入框老远，看着像"页面底部莫名其妙一行红字"。改成占位 22px（6 + 16），
   按钮上方间距相应从 25px 收到 3px，视觉间距不变。 */
.auth-error {
  position: static; min-height: 16px; margin: 6px 0 0;
  color: #D64B4B; font-size: 12px; line-height: 16px; text-align: center;
}
.auth-submit {
  display: block; width: 100%; height: 44px; margin-top: 3px;
  border: 0; border-radius: 8px; background: #08C0A0; color: #FFFFFF;
  font-size: 16px; font-weight: 600; text-align: center;
  transition: filter .12s ease, transform .12s ease;
}
.auth-submit:hover { filter: brightness(.95); }
.auth-submit:active { transform: translateY(1px); }
.auth-submit:disabled { opacity: .5; }
.auth-register {
  display: block; width: 100%; height: 16px; margin-top: 33px; text-align: center;
  color: #08C0A0; font-size: 14px; font-weight: 500; line-height: 16px;
}
.auth-service {
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: calc(38px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 5px; padding: 0;
  border: 0; background: transparent; color: #08C0A0;
  font-size: 13px; font-weight: 500; line-height: 16px; height: 16px;
}
.auth-service__ico { display: block; width: 18px; height: 18px; }
.auth-service__ico svg { display: block; }

/* PC：元素不变，仅改为单列居中 */
@media (min-width: 901px) {
  /* 大屏上整块垂直居中：原来只给了 margin-top，900px 高的窗口里内容停在最上面，
     下面空出 300px，重心严重偏上；padding-bottom 给底部「在线客服」留出位置。 */
  .auth-page { justify-content: center; padding-bottom: 96px; }
  .auth-brand {
    position: relative; top: auto; left: auto; transform: none;
    margin: 0 auto 64px;
  }
  /* 表单容器直接 334 宽。原来是「400 宽的壳 + 334 宽的子元素」，子元素靠左排，
     整列内容相对视口中线左偏 33px，肉眼能看出没对齐。 */
  .auth-form { position: relative; top: auto; left: auto; transform: none; width: 334px; margin: 0 auto; }
  .auth-service { position: fixed; bottom: calc(24px + env(safe-area-inset-bottom)); }
}

/* =========================================================================
   §3 大厅页：顶部钻石 + 三功能卡 + 两小卡 + 水印 + 最近房间 + 五项深色导航
   ========================================================================= */
.lobby-page {
  position: relative; min-height: 100dvh;
  padding-bottom: calc(90px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, #EEFAFA 0%, #F6FBFA 34%, #F3F4F8 50%, #F3F4F8 100%);
}
.lobby-topbar { position: relative; height: 138px; }
/* 下拉刷新提示条：位置在「全部 / 密码局」筛选栏下方、房间列表上方。
   平时高度 0 不占位，跟手时由 JS 设高把列表顶下去，松手后收回。 */
.lobby-pull {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 7px;
  height: 0; overflow: hidden; color: #6C837E; font-size: 12px; font-weight: 600;
  line-height: 1; pointer-events: none;
}
.lobby-pull.is-visible { opacity: 1; }
.lobby-pull__spinner {
  width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid rgba(52, 110, 76, .22); border-top-color: #346E4C;
}
.lobby-pull.is-busy .lobby-pull__spinner { animation: lobby-pull-spin .7s linear infinite; }
@keyframes lobby-pull-spin { to { transform: rotate(360deg); } }
/* 桌面用鼠标下拉时会把房间号整段刷蓝：拉动期间禁掉文字选中，松手即恢复。 */
.lobby-page.is-pulling { user-select: none; -webkit-user-select: none; }
.lobby-diamond {
  position: absolute; top: 97px; left: 3.9%;
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 9px; border: 0; border-radius: 999px; background: #FFFFFF;
  color: #16211F; font-size: 14px; font-weight: 700; line-height: 1;
}
.lobby-diamond__ico { display: block; width: 14px; height: 14px; }
.lobby-top-actions { position: absolute; top: 87px; right: 6.4%; display: flex; gap: 2px; }
.lobby-top-actions button {
  display: grid; place-items: center; width: 34px; height: 34px; padding: 6px;
  border: 0; border-radius: 50%; background: transparent; color: #16211F;
}
.lobby-top-actions button:active { opacity: .8; }
.lobby-top-actions svg { display: block; }

.lobby-main { position: relative; }
.lobby-cards { position: relative; height: 136px; }
.lobby-card {
  position: absolute; overflow: hidden; padding: 12px 11px;
  border: 0; border-radius: 14px; text-align: left;
  box-shadow: 0 2px 0 rgba(0, 0, 0, .03);
}
/* 两块入口卡上下铺满整行：俱乐部占掉的右半区已经取消，不再留空位。 */
.lobby-card--create {
  left: 3.9%; top: 0; width: 92.2%; height: 62px;
  background: linear-gradient(135deg, #A8EBC8, #8BEBC5); color: #16211F;
}
.lobby-card--join {
  left: 3.9%; top: 74px; width: 92.2%; height: 62px;
  background: linear-gradient(135deg, #A8EBC8, #8BEBC5); color: #16211F;
}
.lobby-card__text { display: grid; gap: 2px; position: relative; z-index: 1; }
.lobby-card__title { font-size: 18px; font-weight: 800; line-height: 1.25; }
.lobby-card__sub { font-size: 11px; color: #346E4C; line-height: 1.35; }
/* 右侧插图：绝对定位贴在卡片右侧中点，不占文字宽度。 */
.lobby-card__art { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; }
.lobby-card__art svg { display: block; }
/* 左右内缩与功能卡一致（卡片 left 3.9% / width 92.2%），否则筛选栏和房间卡会顶到屏幕边。 */
.lobby-recent { position: relative; min-height: 300px; margin-top: 20px; padding: 0 3.9%; }
.lobby-recent.has-rooms::before {
  content: '♠'; position: absolute; left: 50%; top: 90px; transform: translateX(-50%);
  font-size: 180px; line-height: 180px; color: #9AA9A5; opacity: .06; pointer-events: none;
}
.lobby-filter { position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; height: 28px; }
.lobby-filter__btn {
  height: 24px; padding: 0 14px; border: 1px solid #DCE7E5; border-radius: 999px;
  background: #FFFFFF; color: #16211F; font-size: 12px; font-weight: 500; line-height: 22px;
}
.lobby-filter__btn.is-active { border-color: #08C0A0; color: #08C0A0; }
.lobby-filter__funnel { margin-left: auto; width: 18px; height: 18px; color: #7E8D8A; }
.lobby-empty { position: relative; height: 250px; }
.lobby-empty.is-hidden { display: none; }
.lobby-empty__spade {
  position: absolute; left: 50%; top: 56px; transform: translateX(-50%);
  font-size: 120px; line-height: 120px; color: #9AA9A5; opacity: .06; pointer-events: none;
}
.lobby-empty__text {
  position: absolute; left: 50%; top: 197px; transform: translateX(-50%);
  font-size: 13px; color: #7E8D8A; white-space: nowrap;
}
.lobby-rooms { position: relative; z-index: 1; display: grid; gap: 8px; margin-top: 6px; }

/* 程序化头像：1.3.1 八色表，按 codePointAt(0)%8 取色 */
.avatar {
  display: inline-grid; place-items: center; flex: none;
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .35);
  font-size: 16px; font-weight: 700; line-height: 1;
}
.avatar--0 { background: #7C6BF2; color: #FFFFFF; }
.avatar--1 { background: #F2A65A; color: #2A1B0C; }
.avatar--2 { background: #4FA8D8; color: #FFFFFF; }
.avatar--3 { background: #E86A92; color: #FFFFFF; }
.avatar--4 { background: #43B58A; color: #082A20; }
.avatar--5 { background: #B07BE0; color: #FFFFFF; }
.avatar--6 { background: #D96A5A; color: #FFFFFF; }
.avatar--7 { background: #5C8FD8; color: #FFFFFF; }

/* 最近房间卡（ref-30）：整卡可点，无独立进入按钮 */
.room-card {
  position: relative; display: flex; flex-direction: column; justify-content: space-between;
  width: 100%; height: 92px; padding: 12px; overflow: hidden;
  border: 0; border-radius: 12px; background: #FFFFFF; text-align: left;
}
.room-card__head { display: flex; align-items: center; gap: 8px; }
.room-card__who { display: grid; min-width: 0; }
/* 「房主」小标 + 昵称：让「这是谁的房间」一眼可读，而不是靠猜。 */
.room-card__line { display: flex; align-items: center; gap: 5px; min-width: 0; }
.room-card__role {
  flex: none; padding: 1px 5px; border-radius: 4px;
  background: #E8F7F0; color: #346E4C; font-size: 10px; font-weight: 700; line-height: 1.4;
}
.room-card__owner { font-size: 14px; font-weight: 700; color: #16211F; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-card__name { font-size: 14px; color: #16211F; line-height: 1.3; }
.room-card__type {
  align-self: flex-start; margin-left: auto; padding: 2px 9px;
  border-radius: 999px; background: #E8F7F0; color: #346E4C; font-size: 11px; white-space: nowrap;
}
.room-card__meta { display: flex; align-items: center; gap: 14px; font-size: 11px; color: #7E8D8A; }
.room-card__meta span { display: inline-flex; align-items: center; gap: 3px; }
.room-card__ico { display: block; width: 14px; height: 14px; }
.room-card__meta svg { display: block; width: 14px; height: 14px; }
.room-card__corner {
  position: absolute; right: 4px; bottom: 2px; transform: rotate(-30deg); transform-origin: 100% 100%;
  color: rgba(8, 192, 160, .16); font-size: 12px; font-weight: 700; pointer-events: none;
}

/* 五项深色胶囊导航 */
.lobby-nav {
  position: fixed; z-index: 40; left: 3.9%; right: 3.6%;
  bottom: calc(10px + env(safe-area-inset-bottom));
  display: flex; align-items: center; height: 52px; padding: 6px 4px;
  border-radius: 999px; background: #1E1E1E; box-shadow: 0 8px 24px rgba(0, 0, 0, .22);
}
.lobby-nav__item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  height: 34px; padding: 0; border: 0; border-radius: 999px;
  background: transparent; color: #F4F8F6; font-size: 13px; font-weight: 500; line-height: 1; opacity: .85;
}
.lobby-nav__item .lobby-nav__ico { display: block; width: 16px; height: 16px; }
.lobby-nav__item.is-active { background: #7EF7CA; color: #16211F; opacity: 1; font-weight: 700; }

/* 平板：横向按容器百分比缩放，底栏限宽居中 */
@media (min-width: 561px) and (max-width: 900px) {
  .lobby-nav { left: 50%; right: auto; transform: translateX(-50%); width: min(calc(100% - 28px), 560px); }
}

/* PC：三卡横排、房间两列、底栏 ≤720 居中 */
@media (min-width: 901px) {
  .lobby-page { padding-bottom: 120px; }
  .lobby-topbar { height: 96px; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
  .lobby-diamond { top: 32px; left: 16px; }
  .lobby-top-actions { top: 26px; right: 16px; }
  .lobby-main { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
  .lobby-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; height: 140px; }
  .lobby-card, .lobby-card--create, .lobby-card--join {
    position: relative; left: auto; top: auto; width: auto; height: 140px;
  }
  .lobby-card__art { width: 58px; height: 58px; }
  .lobby-recent { min-height: 320px; margin-top: 24px; padding: 0; }
  .lobby-rooms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lobby-empty { height: 240px; }
  .lobby-nav {
    left: 50%; right: auto; transform: translateX(-50%);
    width: min(calc(100% - 28px), 720px); bottom: 20px;
  }
}

/* 骨架页（V1 静态占位，保留旧版视觉，不参与 1:1 还原范围） */
.placeholder-card {
  max-width: 620px; margin: 4vh auto 0; padding: 34px 28px;
  border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); text-align: center;
}
.placeholder-card__icon { font-size: 44px; color: var(--brand); }
.placeholder-card h1 { margin: 10px 0; font-size: 28px; }
.placeholder-card p { margin: 14px 0; color: var(--sub); font-size: 14px; }
.placeholder-card ul { display: grid; gap: 8px; margin: 20px auto 24px; max-width: 320px; color: var(--sub); font-size: 13px; }
.placeholder-card li { padding: 10px; border-radius: 10px; background: var(--card-alt); }
