/* 大厅的牌面与桌布。对局样式继续由 style.css 管理。 */
#screen-lobby {
  --hall-bg: #0b1714;
  --hall-panel: #12231e;
  --hall-line: #31443b;
  --hall-text: #f8efdc;
  --hall-muted: #bdcec1;
  --hall-gold: #f1cd81;
  --hall-serif: "Songti SC", "Noto Serif CJK SC", SimSun, Georgia, serif;
  background: var(--hall-bg);
  color: var(--hall-text);
  overflow: hidden auto;
  user-select: text;
  -webkit-user-select: text;
}

.lobbyTop {
  flex: none;
  position: sticky;
  top: 0;
  z-index: 5;
  padding: max(10px, env(safe-area-inset-top)) 0 10px;
  background: #0b1714;
  border-bottom: 1px solid var(--hall-line);
}
.lobbyTopInner, .lobbyBody {
  width: min(100% - 64px, 1160px);
  margin-inline: auto;
}
.lobbyTopInner { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lobbyBrand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 800; white-space: nowrap; }
.lobbyBrand span { display: grid; place-items: center; width: 32px; height: 36px; border: 1px solid #8b754c; border-radius: 8px; color: var(--hall-gold); font: 24px Georgia, serif; }
.lobbyTop .topBtns { align-items: center; gap: 6px; }
/* 语言切换器：服务端按语言表填入，每种其他语言一个链接 */
.langBox { display: inline-flex; gap: 4px; }
.langSwitch {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 11px;
  border: 1px solid #455c50; border-radius: 9px; background: #10211b;
  color: #cfe0d4; font-size: 13px; text-decoration: none; white-space: nowrap;
}
.langSwitch:hover { border-color: #c7a466; color: #ffe0a3; }
.lobbyTop .userChip { min-height: 44px; text-align: left; gap: 8px; border-radius: 10px; }
.lobbyTop .userChip .av { width: 31px; height: 31px; font-size: 17px; }
.lobbyTop .userChip small { display: block; margin-top: 2px; font-size: 11px; color: #bdcec1; }
.lobbyTop .lobbyGold { gap: 4px; }
.lobbyBody { flex: 0 0 auto; padding: 26px 0 calc(112px + env(safe-area-inset-bottom)); }

.lobbyHero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  min-height: 414px;
  border: 1px solid #56745c;
  border-radius: 28px;
  background:
    repeating-linear-gradient(128deg, #fff0 0 3px, #fff0 3px 5px, #d3ebd007 5px 6px),
    radial-gradient(ellipse at 77% 37%, #497353 0%, #254a39 33%, #152d23 72%);
}
.lobbyHeroCopy { z-index: 1; align-self: center; padding: 44px 0 44px clamp(28px, 5vw, 70px); }
.lobbyLive { display: inline-flex; align-items: center; gap: 8px; min-height: 30px; padding: 4px 11px; border-radius: 99px; border: 1px solid #7da18370; background: #0b211a8c; color: #e1ecdc; font-size: 12px; }
.lobbyLive i { width: 7px; height: 7px; border-radius: 50%; background: #9fdaa4; box-shadow: 0 0 0 3px #9fdaa426; }
.lobbyLive:not([data-status="live"]) i { background: #a5b1a8; box-shadow: none; }
.lobbyHero h1 { margin: 17px 0 14px; font: 900 clamp(43px, 6.4vw, 88px)/1.04 var(--hall-serif); letter-spacing: -.065em; }
.lobbyHero h1 span { display: block; color: var(--hall-gold); }
.lobbyHero p { max-width: 340px; color: #e0ebdc; font-size: 15px; line-height: 1.7; }
.lobbyPrimary { display: flex; gap: 10px; margin-top: 24px; }
.lobbyButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid #728c7773;
  border-radius: 10px;
  background: #142a22;
  color: #f8efdc;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}
.lobbyPrimary .lobbyButton { min-height: 52px; padding-inline: 20px; }
.lobbyButton:hover { background: #29453a; }
.lobbyButton:disabled { opacity: .6; cursor: default; }
.lobbyButton.lobbyGold { gap: 28px; background: #f1cd81; color: #232013; border-color: #f5dfab; }
.lobbyButton.lobbyGold:hover { background: #f9dfaa; }
.lobbySecondary { display: flex; gap: 18px; margin-top: 4px; }
.lobbySecondary button { min-height: 44px; color: #e8e6d6; font-size: 13px; text-decoration: underline; text-decoration-color: #bdcdb988; text-underline-offset: 4px; }
#screen-lobby :is(a, button, summary):focus-visible, #accountDialog :is(button, input):focus-visible { outline: 2px solid #ffe5a4; outline-offset: 3px; }

.heroDeck { align-self: center; justify-self: center; position: relative; width: min(39vw, 480px); aspect-ratio: 1.2; pointer-events: none; }
.deckRings { position: absolute; inset: 3%; border: 1px solid #e7d79b55; border-radius: 50%; box-shadow: 0 0 0 15px #d4d5a20c, 0 0 0 16px #e7d79b32, 0 0 0 32px #e7d79b13; transform: rotate(-24deg); }
.heroCard { position: absolute; top: 14%; left: 36%; display: grid; place-items: center; width: 35%; aspect-ratio: .70; border-radius: 9%; border: 1px solid #fff2ce; background: #fcf1d9; color: #1d3028; box-shadow: 0 14px 24px #0006; font-family: Georgia, serif; }
.heroCard b { font-size: clamp(46px, 9vw, 130px); line-height: 1; }
.heroCardRank { position: absolute; top: 7%; left: 10%; font-size: clamp(12px, 2.3vw, 25px); line-height: .95; }
.heroCardReverse { inset: auto 10% 7% auto; transform: rotate(180deg); }
.heroCardBack { transform: translate(-53%, 6%) rotate(-30deg); background: repeating-linear-gradient(45deg, #1f3c2c 0 5px, #274b38 5px 9px); border: 6px solid #e7cd92; color: #e7cd92; font-size: clamp(25px, 5vw, 68px); }
.heroCardRed { color: #9b362e; transform: translate(42%, 8%) rotate(27deg); background: #eedbbc; }
.heroCardFront { transform: rotate(-8deg); }
.deckChip { position: absolute; bottom: 8%; left: 13%; display: grid; place-items: center; width: 15%; aspect-ratio: 1; border-radius: 50%; border: 4px dashed #efcf90; background: #803c2f; color: #ffe8bd; box-shadow: 0 6px 0 #49291e, 0 11px 14px #0006; transform: rotate(-16deg); font: clamp(15px, 3vw, 34px) Georgia, serif; }

.lobbyTools { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px 22px; padding: 24px 0; }
.lobbyLevels h2 { margin: 0 0 9px; font-size: 14px; color: var(--hall-muted); }
.lobbyLevels .levels { margin: 0; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.lobbyLevels .lvl { background: var(--hall-panel); color: var(--hall-text); border-color: var(--hall-line); box-shadow: none; transform: none; padding: 9px 4px; }
.lobbyLevels .lvl.on { border-color: #ba995e; color: #ffe0a3; background: #2a2c21; }
.lobbyToolButtons { display: flex; flex-wrap: wrap; gap: 6px; }
.lobbyTools .myStats { grid-column: 1 / -1; margin-top: 0; }

/* ──────────────────────────── 开放牌桌与首页榜单主舞台 ──────────────────────────── */
.lobbyShowcase {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 16px;
  align-items: start;
}
.lobbyHeadingGroup { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.lobbyHeadingMeta { color: var(--hall-muted); font-size: 12px; }
.lobbyChipBtn {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid #6b8471;
  border-radius: 9px;
  background: #173027;
  color: #f8efdc;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.lobbyChipBtn:hover { background: #26483c; border-color: #9bb59f; }
.lobbyStateBox {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 112px;
  padding: 20px 14px;
  text-align: center;
  color: var(--hall-muted);
  font-size: 13px;
  border: 1px dashed var(--hall-line);
  border-radius: 14px;
  background: #0e1d18;
}
.lobbyStateErr p { color: #f2d4c8; }
.lobbyStateActions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.lobbyMiniGold { min-height: 36px; padding: 6px 14px; font-size: 12px; gap: 6px; }

/* 开放牌桌 */
.openRoomList { list-style: none; display: grid; gap: 10px; }
.openRoomCard {
  padding: 12px;
  border: 1px solid #354c41;
  border-radius: 14px;
  background: #0e1d18;
  display: grid;
  gap: 10px;
}
.openRoomMeta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; }
.openRoomLevel {
  padding: 2px 9px;
  border-radius: 99px;
  border: 1px solid #7f6c47;
  background: #2b2c21;
  color: var(--hall-gold);
  font-weight: 700;
}
.openRoomBase { color: var(--hall-muted); font-family: var(--num); }
.openRoomFreeBadge {
  margin-left: auto;
  padding: 2px 9px;
  border-radius: 99px;
  background: #1c3a2d;
  border: 1px solid #4d7862;
  color: #b4e8ba;
  font-weight: 700;
}
.openRoomSeats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.openSeat {
  min-width: 0;
  min-height: 54px;
  padding: 7px 8px;
  border-radius: 11px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-align: center;
}
.openSeatTaken { background: #162b24; border: 1px solid #2e433a; }
.openSeatAv { font-size: 18px; line-height: 1; }
.openSeatNick {
  max-width: 100%;
  font-size: 12px;
  color: var(--hall-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.openSeatBot { font-style: normal; font-size: 10px; color: var(--hall-muted); }
.openSeatFree {
  border: 1.5px dashed #ba995e;
  background: #23261d;
  color: #ffe0a3;
  transition: background .15s, border-color .15s, transform .1s;
}
.openSeatFree:hover { background: #333122; border-color: #f1cd81; }
.openSeatFree:active { transform: translateY(1px); }
.openSeatPlus { font: 800 18px/1 var(--num); color: var(--hall-gold); }
.openSeatText { font-size: 11px; font-weight: 700; }

.openRoomsEmpty {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 26px 16px;
  text-align: center;
  border: 1px dashed #3e574a;
  border-radius: 14px;
  background: radial-gradient(circle at 50% 0%, #1c392d 0%, #0e1d18 75%);
}
.openRoomsEmptyIcon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid #8b754c;
  background: #1a2d24;
  color: var(--hall-gold);
  font: 24px Georgia, serif;
}
.openRoomsEmpty h3 { font-size: 15px; color: var(--hall-text); }
.openRoomsEmpty p { max-width: 300px; font-size: 13px; line-height: 1.6; color: var(--hall-muted); }
.openRoomsEmptyActions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 6px; }

/* 首页排行榜卡片 */
.rankPeriodTabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  margin-bottom: 10px;
  border: 1px solid var(--hall-line);
  border-radius: 12px;
  background: #0b1714;
}
.rankPeriodTabs button {
  min-height: 40px;
  border-radius: 8px;
  color: var(--hall-muted);
  font-size: 13px;
  font-weight: 700;
}
.rankPeriodTabs button[aria-pressed="true"] {
  background: #302d22;
  color: #ffe0a3;
  box-shadow: inset 0 0 0 1px #8b754c;
}
.rankFilterBar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.rankFilterGroup { display: flex; flex-wrap: wrap; gap: 5px; }
.rankFilterGroup button {
  min-height: 34px;
  padding: 4px 10px;
  border: 1px solid var(--hall-line);
  border-radius: 8px;
  background: #0e1d18;
  color: var(--hall-muted);
  font-size: 12px;
  font-weight: 600;
}
.rankFilterGroup button[aria-pressed="true"] {
  border-color: #8b754c;
  background: #2c2a20;
  color: #ffe0a3;
}
.lobbyRankCard .rankNote {
  margin: 0 0 8px;
  padding: 6px 10px;
  border-radius: 8px;
  background: #0e1d18;
  color: var(--hall-muted);
  font-size: 12px;
  text-align: left;
}
.lobbyRankCard .rankMeBar {
  background: #1f2b22;
  border-color: #6b5e3c;
}
.lobbyRankCard .rankRow {
  background: #0e1d18;
  border: 1px solid #243830;
}
.lobbyRankCard .rankRow.me {
  border-color: #c29e5b;
  outline: none;
  background: #1f2a21;
}

/* 陌生对局成就区 */
.lobbyAchievements { margin-bottom: 16px; }
.achvSummaryBadge {
  flex: none;
  padding: 4px 10px;
  border-radius: 99px;
  border: 1px solid #6b5e3c;
  background: #28261d;
  color: var(--hall-gold);
  font-size: 12px;
  font-weight: 700;
}
.achvGrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.achvCard {
  min-width: 0;
  padding: 14px;
  border: 1px solid #2f443a;
  border-radius: 14px;
  background: #0e1d18;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.achvCard.unlocked { border-color: #6d5f3c; background: #15241d; }
.achvCard.maxed { border-color: #b49254; background: #1d281f; }
.achvHead { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.achvHead h3 { font-size: 15px; font-weight: 800; color: var(--hall-text); }
.achvTier {
  flex: none;
  padding: 2px 8px;
  border-radius: 99px;
  border: 1px solid #3c5448;
  background: #172b23;
  color: var(--hall-muted);
  font-size: 11px;
  font-weight: 700;
}
.achvCard.unlocked .achvTier { border-color: #9e814b; background: #2f2c20; color: var(--hall-gold); }
.achvDesc { font-size: 12px; line-height: 1.5; color: var(--hall-muted); flex: 1; }
.achvBarTrack {
  height: 8px;
  border-radius: 99px;
  background: #08120f;
  border: 1px solid #2a3e35;
  overflow: hidden;
}
.achvBarFill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #b8944f, #f1cd81);
  transition: width .3s ease;
}
.achvCard.maxed .achvBarFill { background: linear-gradient(90deg, #6dc47d, #f1cd81); }
.achvFoot { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; font-size: 12px; }
.achvCount { font-family: var(--num); font-weight: 700; color: var(--hall-text); }
.achvRemain { color: var(--hall-gold); font-size: 11px; text-align: right; }

.lobbyActivity { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.lobbyBoard { min-width: 0; border: 1px solid var(--hall-line); border-radius: 18px; background: var(--hall-panel); padding: 19px; }
.lobbyBoardHeading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.lobbyBoardHeading h2 { font: 800 23px/1.2 var(--hall-serif); }
.lobbyBoardHeading > span { color: var(--hall-muted); font-size: 12px; }
.lobbyTabs { display: flex; gap: 7px; margin-bottom: 7px; }
.lobbyTabs button { min-height: 44px; padding-inline: 12px; color: var(--hall-muted); border: 1px solid var(--hall-line); border-radius: 8px; font-size: 13px; }
.lobbyTabs button[aria-pressed="true"] { color: #ffe0a3; border-color: #8b754c; background: #302d22; }
.lobbyList { list-style: none; }
.lobbyList li { min-height: 51px; display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--hall-line); }
.lobbyList li:last-child { border-bottom: 0; }
.lobbyList li > b { min-width: 0; overflow-wrap: anywhere; }
.activityAvatar, .matchSuit { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 9px; background: #294035; }
.matchSuit { color: #f0ab96; font: 23px Georgia, serif; background: #3c2b27; }
.matchSuit.landlordSuit { color: #f1cd81; background: #373526; }
.activityMeta, .matchMultiplier { flex: none; margin-left: auto; color: var(--hall-muted); font-size: 12px; }
.matchCopy { display: grid; gap: 3px; }
.matchCopy span, .lobbyEmpty { color: var(--hall-muted); font-size: 13px; }
.matchMultiplier { color: var(--hall-gold); font: 700 19px var(--num); }
.lobbyReading { margin-top: 16px; }
.lobbyReading :is(article, details) { padding: 9px 0; border-top: 1px solid var(--hall-line); }
.lobbyReading h3, .lobbyReading summary { font-size: 14px; font-weight: 700; }
.lobbyReading summary { cursor: pointer; padding: 10px 0; min-height: 44px; }
.lobbyReading p { margin-top: 5px; color: var(--hall-muted); font-size: 14px; line-height: 1.65; }
.lobbyGuideLink { display: inline-block; padding: 10px 0; color: var(--hall-gold); font-size: 14px; text-underline-offset: 4px; }
.lobbyLegal { margin-top: 22px; color: var(--hall-muted); font-size: 12px; }

.rulesBody { max-width: 760px; line-height: 1.75; }
.rulesBody h1 { font: 900 clamp(26px, 5vw, 44px)/1.25 var(--hall-serif); }
.rulesBody h2 { font: 800 clamp(21px, 4vw, 28px)/1.35 var(--hall-serif); }
.rulesBody :is(p, ol, ul, table) { margin-top: 12px; color: var(--hall-muted); }
.rulesBody :is(ol, ul) { padding-inline-start: 1.5em; }
.rulesBody li + li { margin-top: 6px; }
.rulesBody strong { color: var(--hall-text); }
.rulesBody nav { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 20px; }
.rulesBody nav a { padding: 6px 0; color: var(--hall-gold); text-underline-offset: 4px; }
.rulesBody section { margin-top: 28px; scroll-margin-top: calc(84px + env(safe-area-inset-top)); }
.rulesHands { width: 100%; border-collapse: collapse; font-size: 14px; }
.rulesHands :is(th, td) { padding: 8px clamp(5px, 1.7vw, 14px); text-align: left; border: 1px solid var(--hall-line); }
.rulesHands th { color: var(--hall-text); background: var(--hall-panel); }
.rulesHands td:nth-child(2) { overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.rulesPlay { text-decoration: none; }
.rulesBody .rulesPlay { margin-top: 24px; }

#accountDialog {
  margin: auto;
  width: min(464px, 100% - 24px);
  max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  overflow: auto;
  overscroll-behavior: contain;
  padding: clamp(16px, 4vw, 26px);
  border: 1px solid #577263;
  border-radius: 20px;
  background: #12231e;
  color: #f8efdc;
  box-shadow: 0 24px 75px #0007;
}
#accountDialog::backdrop { background: #07100cbd; }
.accountHeading { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 17px; }
.accountHeading h2 { font: 800 clamp(23px, 6vw, 29px)/1.18 "Songti SC", "Noto Serif CJK SC", SimSun, Georgia, serif; }
.accountModes { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border: 1px solid #31443b; border-radius: 12px; background: #0b1714; }
.accountModes button { min-height: 44px; border-radius: 8px; color: #bdcec1; font-size: 14px; }
.accountModes button[aria-pressed="true"] { color: #f8dfaa; background: #32372b; font-weight: 700; }
.accountHint { margin: 14px 0; color: #bdcec1; font-size: 14px; line-height: 1.55; }
.accountField { display: block; margin-bottom: 12px; color: #f8efdc; font-size: 14px; }
.accountField small { color: #bdcec1; font-size: 12px; }
.accountField .input { display: block; margin: 5px 0 0; min-height: 44px; font-size: 16px; user-select: text; }
.accountGender { display: flex; gap: 8px; margin-bottom: 12px; border: 0; font-size: 14px; }
.accountGender legend { margin-bottom: 5px; }
.accountGender label { display: flex; flex: 1; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border: 1px solid #455c50; border-radius: 9px; cursor: pointer; }
.accountGender label:has(:checked) { border-color: #c7a466; background: #302d22; color: #ffe0a3; }
.accountGender input { accent-color: #f1cd81; }
.accountSubmit { width: 100%; margin-top: 3px; }
.accountAlternatives { display: grid; gap: 5px; margin-top: 11px; }
.accountLink { min-height: 44px; color: #dce7dd; font-size: 14px; text-decoration: underline; text-underline-offset: 4px; }
.accountError, #authError { margin-bottom: 9px; color: #ffb8a5; font-size: 14px; line-height: 1.5; }
.accountIdentity { display: flex; align-items: center; gap: 12px; }
.accountIdentity > span { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 13px; background: #343b2b; font-size: 25px; }
.accountIdentity h3 { font-size: 18px; overflow-wrap: anywhere; }
.accountIdentity p { margin-top: 4px; color: #bdcec1; font-size: 13px; }
.accountStats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 15px 0; padding: 12px; border-block: 1px solid #31443b; }
.accountStats dt { color: #bdcec1; font-size: 12px; }
.accountStats dd { margin-top: 3px; font: 700 20px var(--num); overflow-wrap: anywhere; }
.accountSave { margin: 0 0 14px; padding: 12px; border: 1px solid #88724a; border-radius: 11px; background: #332d21; }
.accountSave p { margin-bottom: 9px; font-size: 13px; line-height: 1.55; }
.accountSave .lobbyButton { width: 100%; }
.accountActions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.accountActions + .accountError { margin: 12px 0 0; }
/* 两个按钮里藏掉一个时，剩下那个占满整行，否则留一个空格子 */
.accountActions:has(> .lobbyButton:only-child) { grid-template-columns: minmax(0, 1fr); }

/* 账号安全：分区卡片、退出前的风险提示、只显示一次的恢复码 */
.accountBlock { margin: 0 0 14px; padding: 12px; border: 1px solid #31443b; border-radius: 11px; background: #0b1714; }
.accountBlock h3 { margin: 0 0 8px; font-size: 15px; }
.accountBlock .accountHint { margin: 0 0 10px; }
.accountBlock .accountSubmit, .accountBlock > .lobbyButton { width: 100%; }
.accountWarn { margin: 0 0 11px; padding: 11px 12px; border: 1px solid #88724a; border-radius: 11px; background: #332d21; color: #f8dfaa; font-size: 13px; line-height: 1.6; }
.recoveryCode { display: block; margin: 0 0 10px; padding: 13px 12px; border-radius: 10px; background: #12231e; color: #f8efdc; font: 600 17px/1.5 var(--num), ui-monospace, Menlo, monospace; letter-spacing: 1.5px; text-align: center; overflow-wrap: anywhere; user-select: all; }
#recoveryState { margin: 0 0 10px; color: #bdcec1; font-size: 13px; }
#logoutName { margin: 0 0 11px; font-size: 15px; overflow-wrap: anywhere; }

@media (max-width: 900px) {
  .lobbyTools { grid-template-columns: minmax(0, 1fr); }
  .lobbyShowcase { grid-template-columns: minmax(0, 1fr); }
  .achvGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .lobbyTopInner, .lobbyBody { width: min(100% - 28px, 1160px); }
  .lobbyBody { padding-top: 14px; }
  .lobbyBrand { gap: 6px; font-size: 14px; }
  .lobbyBrand span { width: 25px; height: 29px; font-size: 19px; }
  .lobbyTop .lobbyButton { padding-inline: 8px; font-size: 12px; }
  .lobbyTop .userChip { padding: 4px 7px; gap: 4px; }
  .lobbyTop .uInfo b { max-width: clamp(48px, 17vw, 94px); font-size: 12px; }
  .lobbyHero { display: block; min-height: 0; border-radius: 20px; }
  .lobbyHeroCopy { position: relative; padding: 22px 15px 12px; }
  .lobbyHero h1 { font-size: clamp(43px, 11vw, 68px); }
  .lobbyHero p { max-width: 100%; font-size: 14px; }
  .heroDeck { position: absolute; z-index: -1; width: clamp(125px, 41vw, 216px); top: 49px; right: 4px; }
  .lobbyPrimary { margin-top: 17px; }
  .lobbyPrimary .lobbyButton { padding-inline: 12px; }
  .lobbyPrimary .lobbyGold { flex: 1; justify-content: space-between; max-width: 250px; gap: 8px; }
  .lobbyTools { padding-block: 17px; }
  .lobbyLevels .lvl b { font-size: 13px; }
  .lobbyLevels .lvl span { font-size: 10px; }
  .lobbyShowcase { gap: 12px; margin-bottom: 12px; }
  .lobbyAchievements { margin-bottom: 12px; }
  .openRoomSeats { gap: 6px; }
  .openSeat { padding: 6px 4px; min-height: 50px; }
  .rankFilterBar { flex-direction: column; align-items: stretch; }
  .rankTypeGroup { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .rankTypeGroup button { padding-inline: 4px; font-size: 11px; }
  .lobbyActivity { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .lobbyBoard { padding: 15px; }
  .lobbyReading { margin-top: 12px; }
}
@media (max-width: 460px) {
  .achvGrid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 370px) {
  .lobbyTopInner { gap: 6px; }
  .lobbyTop .topBtns { gap: 4px; }
  .langSwitch { min-height: 32px; padding: 0 8px; font-size: 12px; }
  .lobbyBrand span { display: none; }
  .lobbyTop .userChip .av { display: none; }
  .lobbyHero h1 { font-size: 39px; }
  .heroDeck { width: 123px; }
  .lobbyLevels .levels { gap: 4px; }
  .lobbyLevels .lvl span { display: block; overflow-wrap: anywhere; }
  .openSeatText { font-size: 10px; }
  .openSeatNick { font-size: 11px; }
}
@media (orientation: landscape) and (max-height: 450px) {
  .lobbyHero { min-height: 0; }
  .lobbyHeroCopy { padding-block: 14px 8px; }
  .lobbyHero h1 { margin: 8px 0; font-size: clamp(32px, 6vw, 44px); }
  .lobbyHero h1 span { display: inline; }
  .lobbyHero p { max-width: min(340px, 63%); }
  .lobbyPrimary { margin-top: 12px; }
  .heroDeck { top: 10px; right: 12px; width: min(36vw, 192px); }
  .achvGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (orientation: landscape) and (max-height: 450px) and (min-width: 660px) {
  .lobbyShowcase { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}
