/* The lobby is its own screen: a player header, scrollable content, and fixed navigation. */
.in-lobby { height:100dvh; overflow:hidden; background:#101426; }
.in-lobby .app { display:none; }
.topbar nav .lobby-wallet-toggle { display:inline-flex; align-items:center; justify-content:center; flex:0 0 34px; width:34px; min-width:34px; min-height:32px; padding:5px; }
.lobby-wallet-toggle svg { width:20px; height:20px; flex-shrink:0; }
.lobby-leave-table { width:100%; }
.topbar nav .lobby-leave-fallback { width:34px; min-width:34px; overflow:hidden; font-size:0; }
.lobby-leave-fallback::before { content:'↩'; font-size:18px; }
.game-lobby { --lobby-bg:#101426; --lobby-text:#f4f1ff; --lobby-muted:#aaaac4; --lobby-cyan:#7ae2e4; --lobby-purple:#bd9ce4; position:fixed; z-index:40; inset:0; height:100dvh; overflow:hidden; color:var(--lobby-text); background:radial-gradient(ellipse at 85% 2%,#4d316633,transparent 48%),var(--lobby-bg); color-scheme:dark; }
.game-lobby[hidden] { display:none; }
.game-lobby * { box-sizing:border-box; }
.lobby-shell { width:min(100%,920px); height:100%; margin:auto; display:grid; grid-template-rows:auto minmax(0,1fr) auto; }
.game-lobby button,.lobby-wallet-dialog button { font:inherit; cursor:pointer; touch-action:manipulation; }
.game-lobby button { -webkit-tap-highlight-color:transparent; }
.game-lobby button:disabled,.lobby-wallet-dialog button:disabled { cursor:not-allowed; opacity:.55; }
.game-lobby button:focus-visible,.lobby-wallet-dialog button:focus-visible,.game-lobby input:focus-visible { outline:2px solid #7ae2e4; outline-offset:3px; }
.game-lobby :is(h2,p) { margin:0; }
.lobby-player-header { display:flex; align-items:center; gap:10px; padding:calc(15px + env(safe-area-inset-top)) max(18px,env(safe-area-inset-right)) 14px max(18px,env(safe-area-inset-left)); border-bottom:1px solid #b1a0d218; }
.lobby-player { display:flex; align-items:center; gap:9px; min-width:0; flex:1; padding:0; border:0; color:var(--lobby-text); background:none; text-align:left; }
.lobby-player-avatar { display:block; flex:0 0 46px; width:46px; height:46px; padding:3px; border-radius:50%; background:linear-gradient(150deg,#b390d9,#495274); box-shadow:0 3px 8px #02061266; }
.lobby-avatar-visual,.lobby-avatar-photo { display:grid; width:100%; height:100%; border-radius:inherit; object-fit:cover; place-items:center; background-color:#333551; }
.lobby-avatar-visual { position:relative; overflow:hidden; background-image:url('./avatar-atlas.png'); background-position:var(--lobby-avatar-position,0% 0%); background-size:300% 200%; }
.lobby-avatar-fallback { display:none; }
.lobby-player-copy { display:flex; flex-direction:column; min-width:0; gap:3px; }
.lobby-player-copy strong { font-size:14px; font-weight:700; line-height:1.25; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.lobby-player-copy small { color:var(--lobby-muted); font-size:10px; white-space:nowrap; }
.lobby-balance { display:flex; align-items:center; justify-content:space-between; gap:10px; max-width:44%; min-width:110px; min-height:44px; padding:5px 6px 5px 12px; border:1px solid #b8a0de25; border-radius:14px; background:#25213a; color:var(--lobby-text); text-align:left; }
.lobby-balance-copy { min-width:0; display:flex; flex-direction:column; gap:2px; }
.lobby-balance-copy small { color:#b9acca; font-size:9px; }
.lobby-balance-copy strong { font-size:18px; line-height:1.1; font-weight:750; font-variant-numeric:tabular-nums; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.lobby-balance-plus { width:29px; height:30px; display:grid; place-items:center; flex:0 0 29px; border-radius:9px; color:#122937; background:#7ae2e4; font-size:23px; line-height:1; }
.lobby-header-settings { display:grid; place-items:center; width:34px; min-height:44px; flex:0 0 34px; padding:6px; border:0; border-radius:10px; background:none; color:#b7afcc; }
.lobby-header-settings svg { width:23px; height:23px; }
.lobby-content { min-height:0; padding:20px max(18px,env(safe-area-inset-right)) 22px max(18px,env(safe-area-inset-left)); overflow:auto; overscroll-behavior:contain; scrollbar-width:thin; scrollbar-color:#68567e66 transparent; }
.lobby-bottom-nav { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); padding:6px max(18px,env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left)); border-top:1px solid #b1a0d21f; background:#14172b; }
.lobby-bottom-nav button { position:relative; display:flex; align-items:center; justify-content:center; gap:7px; min-height:46px; padding:6px; border:0; border-radius:12px; background:none; color:#8f92ad; font-size:12px; font-weight:600; }
.lobby-bottom-nav svg { width:21px; height:21px; }
.lobby-bottom-nav .is-active { color:var(--lobby-cyan); background:#65cbd10b; }
.lobby-bottom-nav .is-active::after { content:''; position:absolute; bottom:3px; width:14px; height:2px; border-radius:2px; background:var(--lobby-cyan); }
.lobby-home-heading { display:flex; align-items:baseline; justify-content:space-between; gap:8px; margin:0 0 14px; }
.lobby-home-heading h2 { color:var(--lobby-text); font-size:20px; font-weight:750; line-height:1.3; }
.lobby-home-heading p { color:var(--lobby-muted); font-size:10px; }
.lobby-step-title { outline:none; }
.lobby-home-grid { display:grid; gap:14px; }
.lobby-game-card { position:relative; display:block; width:100%; height:260px; min-height:260px; padding:22px; overflow:hidden; isolation:isolate; border:1px solid #9889bd4a; border-radius:24px; text-align:left; color:var(--lobby-text); background:#28213c url('./ktv-room-v2.webp') center 51%/cover no-repeat; box-shadow:0 7px 24px #00061536; }
.lobby-game-card::before { content:''; position:absolute; z-index:-1; inset:0; background:linear-gradient(90deg,#10142de3 0%,#1516327a 55%,#18153220),linear-gradient(0deg,#13192aed,transparent 58%); }
.lobby-game-pill { position:relative; display:inline-flex; align-items:center; min-height:23px; padding:4px 8px; border:1px solid #a9e8ec4f; border-radius:6px; color:#c3f0f0; background:#163143bb; font-size:10px; line-height:1; }
.lobby-game-copy { position:relative; z-index:2; display:flex; flex-direction:column; align-items:flex-start; gap:8px; margin-top:15px; }
.lobby-game-copy>strong { font-size:38px; font-weight:850; line-height:1.15; letter-spacing:1px; text-shadow:0 3px 9px #100d22a3; }
.lobby-game-copy>span { color:#d8cde9; font-size:12px; }
.lobby-game-art { position:absolute; z-index:1; right:7px; bottom:68px; width:172px; height:172px; pointer-events:none; }
.lobby-game-art::before { content:''; position:absolute; left:20px; right:8px; bottom:5px; height:24px; border-radius:50%; background:#07091773; filter:blur(5px); }
.lobby-game-art img { position:absolute; width:160px; height:164px; object-fit:contain; left:7px; bottom:5px; transform:rotate(8deg); filter:drop-shadow(-3px 7px 5px #03071477); }
.lobby-die { position:absolute; display:grid; grid-template-columns:repeat(3,1fr); grid-template-rows:repeat(3,1fr); width:38px; height:40px; padding:7px; gap:2px; border:1px solid #fb8b91aa; border-radius:9px; background:linear-gradient(135deg,#f76a69,#d82942 64%,#a81b38); box-shadow:inset 1px 2px 1px #ffc4b880,0 4px 0 #701634,0 7px 8px #07051566; }
.lobby-die i { display:block; align-self:center; aspect-ratio:1; border-radius:50%; background:#fffaf4; }
.lobby-die-3 { left:7px; bottom:8px; transform:rotate(-14deg); }
.lobby-die-5 { right:1px; bottom:0; transform:rotate(14deg); }
.lobby-game-footer { position:absolute; z-index:3; display:flex; align-items:center; justify-content:space-between; gap:8px; left:22px; right:22px; bottom:21px; }
.lobby-game-players { display:flex; flex-direction:column; gap:6px; color:#cdc7df; font-size:10px; }
.lobby-five-seats { display:flex; gap:4px; align-items:center; }
.lobby-five-seats i { position:relative; display:block; width:14px; height:16px; border:1px solid #b2a4d575; border-radius:6px 6px 4px 4px; background:#a295c524; }
.lobby-five-seats i::before { content:''; position:absolute; width:4px; height:4px; top:3px; left:4px; border-radius:50%; background:#a99ac8; }
.lobby-five-seats i:first-child { background:#234954; border-color:#7ae2e49c; }
.lobby-five-seats i:first-child::before { background:#8aeced; }
.lobby-game-cta { display:flex; align-items:center; gap:7px; min-height:43px; padding:10px 13px; border:1px solid #a9f2ef; border-radius:12px; color:#153545; background:#7ae2e4; box-shadow:0 3px 0 #346d83; font-size:13px; font-weight:750; }
.lobby-practice-card { display:flex; align-items:center; gap:12px; min-width:0; min-height:75px; padding:16px 18px; border:1px solid #b197d13d; border-radius:16px; color:#e8dff5; background:linear-gradient(110deg,#302640,#232237); text-align:left; }
.lobby-practice-card>span:nth-child(2) { display:flex; flex:1; min-width:0; flex-direction:column; gap:6px; }
.lobby-practice-card strong { font-size:14px; line-height:1.3; }
.lobby-practice-card small { color:#b9a9ce; font-size:10px; line-height:1.45; }
.lobby-practice-icon { display:grid; place-items:center; flex-shrink:0; width:34px; height:34px; color:#d1b2ed; }
.lobby-practice-icon svg { width:30px; height:30px; }
.lobby-practice-card>svg { flex-shrink:0; color:#b6a1d0; }
.lobby-home-tools { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.lobby-tool-tile { display:flex; align-items:center; gap:11px; min-width:0; min-height:80px; padding:13px; border:1px solid #aaa0d015; border-radius:16px; background:#242138; color:var(--lobby-text); text-align:left; }
.lobby-tool-tile>span:last-child { display:flex; flex-direction:column; min-width:0; gap:5px; }
.lobby-tool-tile strong { font-size:13px; line-height:1.2; }
.lobby-tool-tile small { color:#ada3c4; font-size:9px; line-height:1.35; }
.lobby-tool-icon { display:grid; place-items:center; flex:0 0 29px; width:29px; color:var(--lobby-purple); }
.lobby-tool-icon svg { width:29px; height:29px; }
.lobby-tool-avatar { width:34px; height:34px; flex:0 0 34px; border-radius:11px; }
.lobby-coming-later { display:flex; align-items:center; gap:11px; min-height:66px; padding:12px 2px; border-bottom:1px solid #b1a0d218; color:#9493b0; }
.lobby-team-symbol { flex:0 0 35px; width:35px; color:#827795; }
.lobby-team-symbol svg { width:35px; height:28px; }
.lobby-coming-later>span:nth-child(2) { display:flex; flex-direction:column; gap:4px; min-width:0; }
.lobby-coming-later strong { color:#aaa4bd; font-size:12px; font-weight:600; }
.lobby-coming-later small { color:#84849e; font-size:10px; }
.lobby-coming-status { margin-left:auto; font-size:10px; white-space:nowrap; }
.game-lobby .lobby-small-note { margin:14px 0 0; color:var(--lobby-muted); font-size:10px; line-height:1.5; }
.game-lobby .lobby-home-note { margin-top:11px; color:#9697b1; }
.lobby-page-heading { display:flex; align-items:center; gap:10px; margin:0 0 18px; }
.lobby-back { display:grid; place-items:center; flex:0 0 34px; width:34px; min-height:44px; padding:0; border:0; border-radius:10px; background:#b298d90d; color:#d7c8e8; }
.lobby-page-heading>div { min-width:0; }
.lobby-page-heading h2 { color:var(--lobby-text); font-size:23px; line-height:1.3; font-weight:750; }
.lobby-page-heading p { margin-top:5px; font-size:10px; color:var(--lobby-muted); }
.lobby-step-count { margin-left:auto; color:#8b849e; font-size:11px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.lobby-tables { display:flex; flex-direction:column; gap:13px; }
.lobby-table-card { --tier-color:#7ae2e4; --tier-bg:#213c49; position:relative; display:flex; align-items:center; gap:13px; width:100%; min-height:109px; padding:13px 15px 13px 13px; overflow:hidden; border:1px solid #86c0d034; border-radius:19px; background:linear-gradient(110deg,var(--tier-bg),#1b2539 65%); color:var(--lobby-text); text-align:left; }
.lobby-table-1 { --tier-color:#c1a3e9; --tier-bg:#3b2b55; border-color:#b397d94a; background:linear-gradient(110deg,var(--tier-bg),#29243d 65%); }
.lobby-table-2 { --tier-color:#ecafd4; --tier-bg:#462d4e; border-color:#ce98c13f; background:linear-gradient(110deg,var(--tier-bg),#2d233b 65%); }
.lobby-table-scene { position:relative; flex:0 0 70px; width:70px; height:80px; border-radius:10px; overflow:hidden; background:linear-gradient(0deg,var(--tier-bg),#241c4230),url('./ktv-room-v2.webp') center 45%/cover; }
.lobby-table-scene img { position:absolute; width:62px; height:64px; object-fit:contain; bottom:13px; left:4px; filter:drop-shadow(0 3px 3px #05071977); }
.lobby-table-scene>span { position:absolute; bottom:0; left:0; width:100%; padding:3px 0; text-align:center; color:#e3deef; background:#131428aa; font-size:9px; line-height:1.2; }
.lobby-table-info { display:flex; flex:1; min-width:0; flex-direction:column; gap:9px; }
.lobby-table-info>strong { color:var(--lobby-text); font-size:18px; line-height:1.15; font-weight:750; }
.lobby-table-info>span { max-width:120px; color:#c0b7d3; font-size:10px; line-height:1.45; }
.lobby-table-stake { display:flex; flex-shrink:0; flex-direction:column; gap:5px; text-align:right; }
.lobby-table-stake strong { color:var(--tier-color); font-size:31px; line-height:1.05; font-weight:800; font-variant-numeric:tabular-nums; letter-spacing:-1px; }
.lobby-table-stake>span { color:#bcb4ca; font-size:9px; }
.lobby-quickstart { margin-top:20px; }
.lobby-primary { display:flex; align-items:center; justify-content:center; gap:10px; width:100%; min-height:48px; padding:11px 14px; border:1px solid #a0eeed; border-radius:12px; background:#7ae2e4; color:#163441; box-shadow:0 3px 0 #346378; font-size:14px!important; font-weight:750!important; }
.lobby-quickstart .lobby-primary { display:grid; grid-template-columns:1fr auto; gap:3px 10px; min-height:60px; justify-items:start; text-align:left; }
.lobby-quickstart .lobby-primary>span { font-size:16px; }
.lobby-quickstart .lobby-primary small { grid-column:1; font-size:10px; font-weight:500; color:#2d5e69; }
.lobby-quickstart .lobby-primary svg { grid-column:2; grid-row:1 / 3; }
.lobby-quickstart p { margin-top:10px; color:var(--lobby-muted); text-align:center; font-size:10px; line-height:1.4; }
.lobby-primary:not(:disabled):active { background:#65cbd1; box-shadow:0 1px 0 #346378; transform:translateY(2px); }
.game-lobby .lobby-primary:disabled { background:#465e6b; border-color:#688693; color:#d2dce2; box-shadow:none; opacity:1; }
.lobby-buyin-intro { display:flex; justify-content:space-between; align-items:baseline; flex-wrap:wrap; gap:5px; margin-bottom:13px; }
.lobby-buyin-intro p { color:#e0d9ef; font-size:13px; }
.lobby-buyin-intro span { color:var(--lobby-muted); font-size:10px; }
.lobby-buyin-form { padding:18px; border:1px solid #b19ed925; border-radius:19px; background:#211f36; }
.lobby-practice-setup { margin-bottom:17px; padding:14px; border:1px solid #b19ed930; border-radius:16px; background:#211f36; }
.lobby-practice-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:10px; }
.lobby-practice-heading h3 { margin:0; color:#f1e8ff; font-size:13px; }
.lobby-practice-heading p { color:#aba4bd; font-size:10px; line-height:1.4; }
.lobby-bot-counts { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:7px; }
.lobby-bot-counts button { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; min-width:0; min-height:59px; padding:8px 3px; border:1px solid #8f80ab40; border-radius:9px; color:#d4c6e4; background:#29243d; }
.lobby-bot-counts button strong { font-size:21px; line-height:1.1; font-variant-numeric:tabular-nums; }
.lobby-bot-counts button span { color:#b5aac5; font-size:9px; line-height:1.2; }
.lobby-bot-counts button[aria-pressed=true] { border-color:#76d5dd; color:#c1f7f4; background:#22404d; }
.lobby-bot-counts button[aria-pressed=true] span { color:#a9dddf; }
.lobby-opening-rules { margin:0 0 15px; padding:13px 14px; border:1px solid #79cbd341; border-radius:12px; background:#182d3b; }
.match-preview .lobby-opening-rules { margin:18px 0 0; }
.lobby-opening-rules h3 { display:flex; align-items:center; justify-content:space-between; margin:0 0 9px; color:#b6eeed; font-size:13px; }
.lobby-opening-rules h3 span { color:#a2bec8; font-size:10px; font-weight:500; }
.lobby-opening-rules ul { margin:0; padding-left:17px; color:#e3e3f0; font-size:11px; line-height:1.65; }
.lobby-opening-rules li+li { margin-top:4px; }
.game-lobby .lobby-opening-rules p { margin:10px 0 0; padding-top:9px; border-top:1px solid #6da7b92e; color:#a6b9c7; font-size:10px; line-height:1.55; }
.game-lobby .lobby-preview-note { margin:0 0 15px; color:#cbbadb; font-size:11px; line-height:1.6; }
.lobby-buyin-form>label { display:block; margin-bottom:8px; color:#bdb4d2; font-size:11px; }
.lobby-amount-field { display:flex; align-items:center; gap:10px; min-width:0; padding:13px 12px; border:1px solid #71c7d35c; border-radius:11px; background:#151c30; box-shadow:inset 0 2px 4px #070a1c44; }
.lobby-amount-field input { width:100%; min-width:0; padding:0; border:0; outline:none; color:#f2f3ff; background:transparent; font:750 29px/1.2 -apple-system,BlinkMacSystemFont,'PingFang SC','Microsoft YaHei',sans-serif; font-variant-numeric:tabular-nums; appearance:textfield; }
.lobby-amount-field input::-webkit-inner-spin-button,.lobby-amount-field input::-webkit-outer-spin-button { margin:0; appearance:none; }
.lobby-amount-field>span { flex-shrink:0; color:#a8aec8; font-size:11px; }
.lobby-buyin-presets { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin-top:11px; }
.lobby-buyin-presets button { display:flex; flex-direction:column; align-items:center; justify-content:center; min-height:51px; gap:3px; padding:7px 3px; border:1px solid #a296c432; border-radius:9px; background:#2b2540; color:#e5d8f5; }
.lobby-buyin-presets strong { font-size:15px; line-height:1.2; font-variant-numeric:tabular-nums; }
.lobby-buyin-presets span { color:#b4a4cc; font-size:9px; }
.lobby-buyin-presets [aria-pressed=true] { color:#cbfbfa; border-color:#77d4dd; background:#22414f; box-shadow:inset 0 0 0 1px #7ae2e412; }
.lobby-buyin-presets [aria-pressed=true] span { color:#a5d9de; }
.lobby-buyin-review { display:flex; flex-direction:column; gap:8px; margin:18px 0 0; color:#bcb5cd; font-size:11px; }
.lobby-buyin-review + .lobby-opening-rules { margin-top:18px; }
.lobby-buyin-review>div { display:flex; justify-content:space-between; gap:10px; }
.lobby-buyin-review strong { color:#e4deee; font-size:12px; font-weight:600; font-variant-numeric:tabular-nums; }
.lobby-buyin-review .lobby-review-total { padding-top:10px; margin-top:2px; border-top:1px solid #b7a9d229; color:#e4deee; }
.lobby-review-total strong { color:#9debec; }
.lobby-buyin-review strong.is-negative { color:#ffb0cf; }
.game-lobby .lobby-amount-message { min-height:27px; margin:13px 0 7px; color:#a1b1c8; font-size:10px; line-height:1.4; }
.lobby-amount-message.is-error { color:#ffc0d7; }
.lobby-inline-wallet { width:100%; min-height:36px; margin-top:7px; padding:0; border:0; background:none; color:#9aebec; font-size:11px!important; }
.game-lobby .lobby-buyin-form .lobby-small-note { margin-top:13px; font-size:9px; }
.lobby-error,.lobby-wallet-error { padding:10px 12px; border:1px solid #dc8eb04d; border-radius:10px; background:#64304a33; color:#ffcade; font-size:12px; line-height:1.5; margin:13px 0 0; }
.lobby-intro { margin-bottom:18px; }
.lobby-eyebrow { color:#b8a7d0; font-size:11px; }
.lobby-intro h2 { margin:8px 0; color:#f4f1ff; font-size:28px; line-height:1.3; }
.lobby-intro p { color:var(--lobby-muted); font-size:12px; line-height:1.5; }
.lobby-resume-card { padding:20px; border:1px solid #baa0df27; border-radius:20px; background:#28223b; }
.lobby-resume-card .lobby-game-art { position:relative; width:172px; height:172px; margin:0 auto 18px; right:auto; bottom:auto; }
.lobby-secondary { width:100%; margin-top:13px; min-height:44px; padding:9px; border:1px solid #b99ad755; border-radius:11px; background:#332542; color:#d5c2ec; font-size:12px!important; }
.lobby-my-page { max-width:500px; margin:auto; }
.lobby-my-identity { display:flex; flex-direction:column; align-items:center; padding:7px 0 22px; }
.lobby-my-avatar { position:relative; width:91px; height:91px; padding:4px; border:1px solid #cfb4e97a; border-radius:50%; background:#433355; }
.lobby-my-avatar>span:last-child:not(.lobby-avatar-visual) { position:absolute; bottom:0; left:50%; transform:translateX(-50%); padding:3px 11px; border-radius:8px; color:#eadcf8; background:#57446e; font-size:9px; white-space:nowrap; }
.lobby-my-identity h2 { margin-top:13px; color:#f4f1ff; font-size:23px; max-width:100%; overflow-wrap:anywhere; }
.lobby-my-identity p { margin-top:7px; color:var(--lobby-muted); font-size:10px; text-align:center; }
.lobby-my-balances { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); border-radius:17px; background:#242039; overflow:hidden; }
.lobby-my-balances button { display:flex; flex-direction:column; align-items:flex-start; gap:7px; min-width:0; padding:18px; border:0; background:none; color:#9bdddf; text-align:left; }
.lobby-my-balances button+button { border-left:1px solid #b3a0cf24; }
.lobby-my-balances span { color:#b6abc9; font-size:10px; }
.lobby-my-balances strong { max-width:100%; font-size:23px; line-height:1.2; font-variant-numeric:tabular-nums; overflow:hidden; text-overflow:ellipsis; }
.lobby-my-links { display:flex; flex-direction:column; margin-top:20px; }
.lobby-my-links button { display:flex; align-items:center; gap:13px; min-height:52px; padding:11px 4px; border:0; border-bottom:1px solid #b3a0cf22; background:none; color:#c5b1df; text-align:left; }
.lobby-my-links button>span { flex:1; color:#e2daef; font-size:13px; }
.lobby-my-links svg { width:22px; height:22px; }
.lobby-my-links svg:last-child { width:17px; color:#92849f; }
@media (hover:hover) {
 .lobby-game-card:hover { border-color:#a7dfe988; }
 .lobby-game-card:hover .lobby-game-cta,.lobby-primary:hover:not(:disabled) { background:#97eff0; }
 .lobby-table-card:hover { border-color:var(--tier-color); }
 .lobby-tool-tile:hover,.lobby-header-settings:hover,.lobby-secondary:hover { background:#342942; }
 .lobby-bottom-nav button:hover { color:#bcebee; }
 .lobby-buyin-presets button:hover { border-color:#b9a0d8; }
}

.lobby-wallet-dialog { width:min(460px,calc(100% - 24px)); max-height:calc(100dvh - 26px); padding:20px; overflow:auto; overscroll-behavior:contain; border:1px solid #f1d7a9; border-radius:23px; background:linear-gradient(145deg,#fff2d6,#ebdfb7); color:#596345; box-shadow:inset 0 2px 0 #fff9e8,0 5px 0 #9c7b4d,0 20px 50px #092d3840; scrollbar-width:thin; scrollbar-color:#b4b487 transparent; }
.lobby-wallet-dialog::backdrop { background:#092e387a; backdrop-filter:blur(5px); }
.lobby-wallet-top { display:flex; justify-content:space-between; align-items:center; gap:10px; }
.lobby-wallet-top .lobby-eyebrow { font-size:10px; color:#9b885a; }
.lobby-wallet-top h2 { margin:3px 0 0; font-size:25px; line-height:1.25; color:#5b5d3f; }
.lobby-wallet-close { width:34px; height:34px; padding:0; flex:0 0 34px; display:grid; place-items:center; border:1px solid #bec598; border-radius:50%; background:linear-gradient(#eff2d7,#d9e2bc); box-shadow:inset 0 1px 0 #fffbe5,0 1px 0 #a5b17f; color:#697751; font-size:24px!important; line-height:1; }
.lobby-wallet-balances { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(0,1fr); gap:10px; margin:19px 0; }
.lobby-wallet-available { padding:15px 12px; display:flex; flex-direction:column; justify-content:center; border:1px solid #799d6d; border-radius:14px; background:linear-gradient(#517a4e,#386344); box-shadow:inset 0 1px 0 #cbdeac45,0 2px 0 #96a36b; color:#f5e7b9; }
.lobby-wallet-available>span { color:#cedab6; font-size:10px; }
.lobby-wallet-available>strong { font-size:29px; font-weight:800; line-height:1.4; font-variant-numeric:tabular-nums; }
.lobby-wallet-table { display:flex; flex-direction:column; justify-content:center; padding:12px; border:1px solid #c6cba0; border-radius:14px; background:linear-gradient(#e8ebcc,#d8e0b8); box-shadow:inset 0 1px 0 #fbf9dc; }
.lobby-wallet-table>span { font-size:10px; color:#838b61; }
.lobby-wallet-table>strong { font-size:23px; font-weight:800; line-height:1.45; color:#6b7447; font-variant-numeric:tabular-nums; }
.lobby-wallet-table>small { font-size:10px; color:#949368; }
.lobby-topup h3,.lobby-ledger h3 { font-size:14px; color:#66704a; font-weight:700; margin:0; }
.lobby-topup>p { font-size:11px; line-height:1.4; color:#979063; margin:5px 0 11px; }
.lobby-topup-options { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; }
.lobby-topup-options button { display:flex; flex-direction:column; align-items:center; gap:2px; padding:11px 3px; min-height:58px; border:1px solid #e2c185; border-radius:12px; background:linear-gradient(#ffeabb,#ebca8f); box-shadow:inset 0 1px 0 #fff6d8,0 2px 0 #b69b63; color:#876239; }
.lobby-topup-options strong { font-size:17px; font-weight:800; line-height:1.3; font-variant-numeric:tabular-nums; }
.lobby-topup-options span { font-size:10px; color:#a08653; }
.lobby-ledger { margin-top:23px; }
.lobby-ledger-title { display:flex; align-items:center; justify-content:space-between; }
.lobby-ledger-title button { min-height:32px; border:0; padding:5px; font-size:11px!important; color:#8a9066; background:none; }
.lobby-ledger ol { list-style:none; padding:0; margin:4px 0 0; }
.lobby-ledger li { display:flex; align-items:center; gap:9px; padding:12px 0; border-bottom:1px solid #b7b9873b; }
.lobby-ledger li:last-child { border-bottom:0; }
.lobby-entry-icon { width:30px; height:30px; flex:0 0 30px; display:grid; place-items:center; border:1px solid #c6cba0; border-radius:10px; background:#e2e7c5; color:#7d8b5c; font-size:19px; }
.lobby-entry-icon.is-credit { background:#dfe8c3; color:#71844d; }
.lobby-entry-icon.is-debit { background:#f0dcc0; border-color:#d9b995; color:#ac7950; }
.lobby-entry-copy { min-width:0; flex:1; display:flex; flex-direction:column; gap:2px; }
.lobby-entry-copy>strong { color:#6a704f; font-size:12px; font-weight:600; overflow-wrap:anywhere; }
.lobby-entry-copy>span { font-size:10px; color:#8b916b; overflow-wrap:anywhere; }
.lobby-entry-copy>time { font-size:10px; color:#a4a17a; }
.lobby-entry-amount { flex-shrink:0; font-size:13px; font-weight:700; color:#8e906b; font-variant-numeric:tabular-nums; }
.lobby-entry-amount.is-credit { color:#6e8d49; }.lobby-entry-amount.is-debit { color:#b5794b; }
.lobby-ledger .lobby-ledger-empty { font-size:12px; color:#98966e; padding:22px 0; }
.lobby-wallet-error { color:#976345; border-color:#dba67966; background:#efd5b54d; }
.lobby-wallet-footnote { font-size:10px; color:#a09871; text-align:center; margin:16px 0 0; line-height:1.5; }

@media (max-width:360px) {
 .lobby-player-header { padding-left:max(12px,env(safe-area-inset-left)); padding-right:max(12px,env(safe-area-inset-right)); gap:7px; }
 .lobby-player { gap:7px; }.lobby-player-avatar { width:39px; height:39px; flex-basis:39px; }
 .lobby-player-copy strong { font-size:13px; }.lobby-player-copy small { font-size:9px; }
 .lobby-balance { min-width:99px; gap:6px; padding-left:9px; }.lobby-balance-copy strong { font-size:16px; }
 .lobby-balance-plus { width:26px; height:29px; flex-basis:26px; }.lobby-header-settings { width:28px; flex-basis:28px; padding:3px; }
 .lobby-content { padding-left:max(12px,env(safe-area-inset-left)); padding-right:max(12px,env(safe-area-inset-right)); }
 .lobby-home-heading h2 { font-size:18px; }.lobby-home-heading p { font-size:9px; }
 .lobby-game-card { height:256px; min-height:256px; padding:18px; }
 .lobby-game-copy>strong { font-size:34px; }.lobby-game-art { width:152px; height:155px; bottom:66px; right:0; }
 .lobby-game-art img { width:143px; height:147px; }
 .lobby-game-footer { left:18px; right:18px; bottom:18px; }.lobby-game-cta { font-size:12px; padding:9px 10px; }
 .lobby-home-tools { gap:9px; }.lobby-tool-tile { padding:10px; gap:7px; min-height:74px; }
 .lobby-tool-tile strong { font-size:12px; }.lobby-tool-tile small { font-size:8px; }
 .lobby-tool-icon { width:25px; flex-basis:25px; }.lobby-tool-icon svg { width:25px; height:25px; }
 .lobby-tool-avatar { width:29px; height:29px; flex-basis:29px; }
 .lobby-coming-later { gap:9px; }.lobby-coming-later strong { font-size:11px; }.lobby-coming-status { font-size:9px; }
 .lobby-page-heading { gap:8px; }.lobby-page-heading h2 { font-size:21px; }
 .lobby-table-card { padding:11px; gap:9px; min-height:96px; }
 .lobby-table-scene { width:56px; flex-basis:56px; height:71px; }.lobby-table-scene img { width:54px; height:56px; left:1px; }
 .lobby-table-info>strong { font-size:16px; }.lobby-table-info>span { font-size:9px; }
 .lobby-table-stake strong { font-size:27px; }.lobby-table-stake>span { font-size:8px; }
 .lobby-buyin-form { padding:14px; }.lobby-buyin-presets { gap:6px; }
 .lobby-wallet-dialog { padding:16px; }.lobby-wallet-balances { gap:8px; }.lobby-wallet-available { padding:13px 10px; }
 .lobby-wallet-available>strong { font-size:25px; }.lobby-wallet-table { padding:10px; }.lobby-wallet-table>strong { font-size:21px; }
 .lobby-topup-options { gap:7px; }.lobby-topup-options strong { font-size:15px; }
}
@media (max-height:610px) and (orientation:portrait) {
 .lobby-player-header { padding-top:calc(9px + env(safe-area-inset-top)); padding-bottom:9px; }
 .lobby-content { padding-top:13px; padding-bottom:15px; }
 .lobby-home-heading { margin-bottom:11px; }.lobby-home-grid { gap:10px; }
 .lobby-game-card { height:220px; min-height:220px; }
 .lobby-game-art { height:145px; bottom:58px; }.lobby-game-art img { width:135px; height:139px; }
 .lobby-game-copy { margin-top:12px; gap:6px; }.lobby-game-copy>strong { font-size:33px; }
 .lobby-game-footer { bottom:17px; }.lobby-home-tools .lobby-tool-tile { min-height:66px; }
 .lobby-coming-later { min-height:56px; padding:9px 2px; }.game-lobby .lobby-home-note { margin-top:9px; }
 .lobby-page-heading { margin-bottom:13px; }.lobby-tables { gap:10px; }
 .lobby-table-card { min-height:92px; padding-top:10px; padding-bottom:10px; }.lobby-table-scene { height:68px; }
 .lobby-quickstart { margin-top:14px; }.lobby-quickstart .lobby-primary { min-height:55px; padding-top:8px; padding-bottom:8px; }
 .lobby-buyin-form { padding-top:13px; padding-bottom:13px; }.lobby-amount-field { padding-top:9px; padding-bottom:9px; }
 .lobby-amount-field input { font-size:26px; }.lobby-buyin-presets button { min-height:46px; }
 .lobby-buyin-review { margin-top:13px; gap:6px; }.game-lobby .lobby-amount-message { margin-top:9px; }
 .lobby-my-identity { padding-bottom:17px; }.lobby-my-avatar { width:75px; height:75px; }.lobby-my-identity h2 { margin-top:10px; }
}
@media (max-height:510px) and (orientation:portrait) {
 .lobby-game-card { height:190px; min-height:190px; padding-top:15px; }
 .lobby-game-copy { margin-top:10px; }.lobby-game-copy>strong { font-size:30px; }.lobby-game-copy>span { font-size:10px; }
 .lobby-game-art { bottom:57px; width:128px; height:121px; }.lobby-game-art img { width:116px; height:119px; }
 .lobby-die { width:31px; height:33px; padding:6px; }.lobby-game-footer { bottom:13px; }
 .lobby-game-players { gap:4px; font-size:9px; }.lobby-game-cta { min-height:39px; padding-top:8px; padding-bottom:8px; }
 .lobby-home-tools .lobby-tool-tile { min-height:58px; }.lobby-coming-later { min-height:44px; }.lobby-coming-later small { display:none; }
 .game-lobby .lobby-home-note { display:none; }.lobby-bottom-nav { padding-top:3px; padding-bottom:calc(3px + env(safe-area-inset-bottom)); }
}
@media (min-width:700px) and (min-height:520px) {
 .lobby-player-header { padding-top:24px; padding-bottom:20px; }.lobby-player-avatar { width:50px; height:50px; flex-basis:50px; }
 .lobby-player-copy strong { font-size:16px; }.lobby-balance { min-width:145px; }.lobby-content { padding-top:25px; }
 .lobby-home-heading h2 { font-size:24px; }.lobby-home-grid { grid-template-columns:minmax(0,1.8fr) minmax(220px,1fr); grid-template-rows:1fr auto auto; grid-template-areas:"hero tools" "hero account" "practice practice"; gap:18px; }
 .lobby-game-card { grid-area:hero; height:365px; min-height:365px; padding:28px; }
 .lobby-practice-card { grid-area:practice; }.lobby-home-tools { grid-area:tools; }.lobby-friend-links { grid-area:account; }
 .lobby-game-copy>strong { font-size:47px; }.lobby-game-art { right:10px; bottom:83px; width:220px; height:220px; }.lobby-game-art img { width:213px; height:218px; }
 .lobby-game-footer { left:28px; right:28px; bottom:27px; }.lobby-game-cta { min-height:47px; padding:12px 16px; }
 .lobby-home-tools { display:flex; flex-direction:column; gap:15px; }.lobby-tool-tile { flex:1; padding:20px; gap:16px; }
 .lobby-tool-tile strong { font-size:16px; }.lobby-tool-tile small { font-size:11px; }.lobby-tool-avatar { width:47px; height:47px; flex-basis:47px; }
 .lobby-tool-icon { width:43px; flex-basis:43px; }.lobby-tool-icon svg { width:38px; height:38px; }
 .lobby-coming-later { align-self:end; border-bottom:0; }.lobby-coming-status { max-width:24px; white-space:normal; line-height:1.6; }
 .lobby-step-2 .lobby-content,.lobby-step-3 .lobby-content { width:100%; max-width:610px; margin:0 auto; }
 .lobby-table-card { min-height:120px; padding:16px; gap:19px; }.lobby-table-info>strong { font-size:21px; }.lobby-table-info>span { max-width:none; font-size:11px; }.lobby-table-stake strong { font-size:36px; }
 .lobby-bottom-nav { padding-top:10px; padding-bottom:calc(10px + env(safe-area-inset-bottom)); }
}
@media (orientation:landscape) and (max-height:519px) {
 .lobby-player-header { padding-top:calc(7px + env(safe-area-inset-top)); padding-bottom:7px; }.lobby-player-avatar { width:36px; height:36px; flex-basis:36px; }
 .lobby-balance { min-height:37px; }.lobby-header-settings { min-height:37px; }.lobby-content { padding-top:13px; padding-bottom:13px; }
 .lobby-home-grid { grid-template-columns:minmax(0,1.5fr) minmax(180px,1fr); grid-template-areas:"hero tools" "hero account" "practice practice"; gap:12px; }.lobby-game-card { grid-area:hero; height:235px; min-height:235px; }
 .lobby-practice-card { grid-area:practice; }.lobby-home-tools { grid-area:tools; }.lobby-friend-links { grid-area:account; }
 .lobby-game-art { width:145px; height:148px; bottom:64px; }.lobby-game-art img { width:135px; height:139px; }
 .lobby-home-tools { display:flex; flex-direction:column; gap:8px; }.lobby-tool-tile { min-height:70px; }.lobby-coming-later { min-height:63px; }
 .lobby-coming-later strong { font-size:11px; }.lobby-coming-later small { font-size:9px; }.lobby-coming-status { display:none; }
 .lobby-bottom-nav { padding-top:2px; padding-bottom:calc(2px + env(safe-area-inset-bottom)); }.lobby-bottom-nav button { min-height:38px; }
 .lobby-step-2 .lobby-content,.lobby-step-3 .lobby-content { width:100%; max-width:620px; margin:auto; }
 .lobby-my-page { max-width:450px; }
}
@media (prefers-reduced-motion:reduce) {
 .game-lobby * { scroll-behavior:auto!important; transition:none!important; }
}

/* Friend-room links replace the unimplemented team-mode teaser. */
.lobby-friend-links { display:grid; grid-template-columns:minmax(0,1fr); gap:10px; }
.lobby-friend-links a { display:flex; align-items:center; gap:9px; min-width:0; min-height:62px; padding:10px 11px; border:1px solid #a88ccb38; border-radius:13px; color:#e7d7fa; background:#2b223d; text-decoration:none; }
.lobby-friend-links a:last-child { border-color:#76c9d137; background:#1d3042; color:#b7eef0; }
.lobby-friend-symbol { display:grid; place-items:center; flex:0 0 27px; width:27px; height:30px; color:#c6a5e3; }
.lobby-friend-symbol svg { width:27px; height:24px; }
.lobby-friend-code { color:#93dce3; font-size:25px; font-weight:700; }
.lobby-friend-links a>span:last-child { display:flex; flex-direction:column; min-width:0; gap:4px; }
.lobby-friend-links strong { font-size:12px; font-weight:650; line-height:1.2; }
.lobby-friend-links small { color:#a7a0bc; font-size:9px; line-height:1.35; }
.lobby-friend-links a:focus-visible { outline:2px solid #7ae2e4; outline-offset:3px; }
@media (hover:hover) { .lobby-friend-links a:hover { border-color:#cab2e5; background:#3a2c4c; } .lobby-friend-links a:last-child:hover { border-color:#8de8e8; background:#244252; } }
@media (max-width:360px) { .lobby-friend-links { gap:8px; } .lobby-friend-links a { gap:7px; padding:9px 8px; } .lobby-friend-symbol { flex-basis:22px; width:22px; } .lobby-friend-symbol svg { width:22px; } .lobby-friend-links strong { font-size:11px; } .lobby-friend-links small { font-size:8px; } }
@media (min-width:700px) { .lobby-friend-links { grid-template-columns:1fr; } .lobby-friend-links a { min-height:53px; } }
@media (max-height:560px) { .lobby-friend-links a { min-height:50px; padding-top:7px; padding-bottom:7px; } }

/* Matching replaces the lobby chrome and buy-in form for this one step. */
.lobby-shell.lobby-step-matching { grid-template-rows:minmax(0,1fr); }
.lobby-step-matching .lobby-content { display:grid; align-content:center; justify-items:center; width:100%; max-width:none; margin:0; min-height:0; padding:24px max(18px,env(safe-area-inset-right)) max(24px,env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left)); }
@media (max-height:620px) { .lobby-step-matching .lobby-content { align-content:start; padding-top:max(16px,env(safe-area-inset-top)); padding-bottom:max(16px,env(safe-area-inset-bottom)); } }
