/*
 * $$P Society / Arcade lobby · v50
 * Scoped, paint-conscious art direction. Intentionally loaded after the
 * shared design system, legacy lobby CSS, site polish and offline controls.
 * No layout/interaction depends on animated effects.
 */
.lobby {
  --lobby-gold: #ead19c;
  --lobby-gold-bright: #fff0c2;
  --lobby-emerald: #8aebc6;
  --lobby-text: #f6f5ef;
  --lobby-muted: #b3bac0;
  --lobby-hairline: rgba(240, 230, 205, .14);
  --lobby-glass: #151e22e8;
  background:
    radial-gradient(ellipse 70% 43% at 7% -6%, #195b423b, transparent 82%),
    radial-gradient(ellipse 48% 40% at 95% 10%, #86603a29, transparent 76%),
    linear-gradient(150deg, #071012 0%, #0b1117 42%, #080b11 100%);
  background-color: #080e12;
  color: var(--lobby-text);
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: clip;
}
.lobby,
.lobby * { box-sizing: border-box; }
.lobby::before {
  /* Remove the repeating diagonal stripes and the fixed composited layer
     from the legacy look. All depth is supplied by static gradients. */
  display: none;
}
.lobby :is(a,button,input):focus-visible {
  outline: 2px solid #bcffe1;
  outline-offset: 3px;
}
.lobby [hidden] { display: none !important; }

/* Unified iOS-style translucent header, without blur on the game cards. */
.lobby > header {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  min-height: 94px;
  height: auto;
  gap: clamp(12px, 2vw, 24px);
  padding: 12px max(22px, calc((100vw - 1510px)/2));
  border-bottom: 1px solid rgba(235, 218, 174, .12);
  background: linear-gradient(125deg, rgba(19,31,33,.92), rgba(13,18,24,.96));
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  backdrop-filter: blur(14px) saturate(120%);
  box-shadow: inset 0 1px rgba(255,255,255,.06), 0 13px 45px #030a0e42;
}
.lobby > header .logo {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  flex: 0 0 auto;
  padding: 6px 0;
  color: var(--lobby-gold-bright);
  font: 900 clamp(24px, 2.4vw, 30px)/1 Oswald, "Arial Narrow", sans-serif;
  letter-spacing: -.025em;
  text-decoration: none;
  white-space: nowrap;
}
.lobby > header .logo span {
  color: #f8f8f5;
  font-size: .73em;
  letter-spacing: .1em;
}
.lobby > header > p {
  min-width: 0;
  flex: 1 1 auto;
  margin: 0;
  text-align: center;
  color: #b8b7ad;
  font: 750 10px/1.4 Inter, system-ui, sans-serif;
  letter-spacing: .26em;
}
.lobby > header > p::before {
  content: '✦';
  margin-right: 9px;
  color: #bfa875;
  font-size: 11px;
}
.lobby > header .account {
  position: relative;
  display: flex;
  flex: 0 1 auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: min(360px, 100%);
  min-height: 60px;
  padding: 8px 10px;
  border: 1px solid #bcd0c334;
  border-radius: 18px;
  background: linear-gradient(135deg, #ffffff10, #ffffff03 80%);
  box-shadow: inset 0 1px #ffffff0f, 0 8px 25px #0004;
}
.lobby > header .account > span {
  display: grid;
  flex: 0 0 40px;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid #fff1c66b;
  border-radius: 14px;
  background: linear-gradient(145deg, #fff2c4 0%, #d1a253 50%, #765018 100%);
  box-shadow: inset 0 1px #ffffdfb5, 0 5px 15px #9a682330;
  color: #302011;
  font: 900 17px/1 Inter, sans-serif;
}
.lobby > header .account > div {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-width: 0;
}
.lobby > header .account #lobbyUser {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: #c8c8c2;
  font: 800 9px/1.2 Inter, sans-serif;
  letter-spacing: .12em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lobby > header .account #lobbyBalance {
  display: block;
  max-width: 100%;
  color: #b6ffdc;
  font: 850 clamp(11px, 1.22vw, 15px)/1.3 Inter, system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
  word-break: normal;
}
.lobby > header .account .rename-open {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 40px;
  padding: 8px 11px;
  border: 1px solid #d4bc8668;
  border-radius: 12px;
  background: #d8ba7715;
  color: #f9ddb0;
  font: 800 9px/1 Inter, sans-serif;
  letter-spacing: .075em;
  transition: background .18s ease, border-color .18s ease;
}
.lobby > header .account .rename-open:hover {
  border-color: #f8d898;
  background: #e8cd9030;
}
.lobby > header .account .rename-open[hidden] { display: none; }
.lobby > header.ssp-has-xp #globalLevel {
  flex: 0 1 235px;
  width: 235px;
  max-width: 100%;
  min-width: 0;
  margin: 0;
}
.lobby > header.ssp-has-xp #globalLevel .ssp-xp-card {
  border: 1px solid #cbb77c59;
  border-radius: 16px;
  background:
    radial-gradient(ellipse at 0 0, #d4b57a17, transparent 70%),
    linear-gradient(125deg, #1c2328, #13191f);
  box-shadow: inset 0 1px #ffffff13, 0 8px 24px #0004;
}
.lobby > header.ssp-has-xp #globalLevel .ssp-xp-percentage strong {
  color: #fff1c8;
  font-variant-numeric: tabular-nums;
}
.lobby > header.ssp-has-xp #globalLevel .ssp-xp-total {
  overflow: hidden;
  text-overflow: ellipsis;
  color: #cfd1ca;
}
.lobby > header.ssp-has-xp #globalLevel .ssp-xp-remaining {
  overflow: hidden;
  max-width: 58%;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lobby > header.ssp-has-xp #globalLevel .ssp-xp-track {
  background: #0a1216;
  border-color: #d7c79c1c;
}

/* Main layout: a generous hero, expressive games, compact editorial Hall. */
.lobby main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 352px);
  grid-template-rows: auto 1fr;
  gap: 22px 26px;
  width: min(1480px, calc(100% - clamp(32px, 5.4vw, 92px)));
  min-width: 0;
  margin-inline: auto;
  padding: 34px 0 75px;
}
.lobby main > * { min-width: 0; }
.lobby .intro {
  position: relative;
  grid-column: 1;
  grid-row: 1;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: 286px;
  min-width: 0;
  overflow: hidden;
  padding: clamp(26px, 3vw, 42px);
  border: 1px solid #b9e8d024;
  border-radius: 28px;
  background:
    radial-gradient(ellipse at 80% 22%, #30996b30 0%, transparent 58%),
    radial-gradient(ellipse at 7% 120%, #9c79331d, transparent 68%),
    linear-gradient(120deg, #172c29, #102021 48%, #11191f 100%);
  box-shadow: inset 0 1px #ffffff16, 0 18px 60px #0004;
}
.lobby .intro::before {
  content: '';
  position: absolute;
  z-index: -1;
  width: 310px;
  height: 310px;
  top: -157px;
  right: -68px;
  border: 1px solid #ddf5c431;
  border-radius: 50%;
  box-shadow: 0 0 0 34px #d2d7ab05, 0 0 0 70px #99d9b008, 0 0 0 110px #66bd9420;
  pointer-events: none;
}
.lobby .intro::after {
  content: '';
  position: absolute;
  z-index: -1;
  right: 17px;
  bottom: 17px;
  width: 78px;
  height: 78px;
  border-right: 1px solid #d3e4b126;
  border-bottom: 1px solid #d3e4b126;
  border-radius: 0 0 18px;
  pointer-events: none;
}
.lobby .intro > p {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 13px;
  color: #ebd6a1;
  font: 850 10px/1.3 Inter, sans-serif;
  letter-spacing: .22em;
}
.lobby .intro .intro-pulse {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8cf2c3;
  box-shadow: 0 0 0 4px #88ecc11f;
}
.lobby .intro h1 {
  margin: 0 0 12px;
  max-width: 100%;
  color: #fff9ed;
  font: 700 clamp(43px, 5.1vw, 74px)/.99 Oswald, "Arial Narrow", sans-serif;
  letter-spacing: -.022em;
  text-wrap: balance;
}
.lobby .intro h1 em {
  color: #99ebc4;
  font-style: normal;
}
.lobby .intro > span {
  color: #d7dedb;
  font: 500 clamp(12px, 1.1vw, 14px)/1.6 Inter, sans-serif;
}
.lobby .intro .lobby-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 17px;
}
.lobby .intro .lobby-hero-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 10px;
  border: 1px solid #e0ebd228;
  border-radius: 999px;
  background: #d0f3d308;
  color: #cfded5;
  font: 750 9px/1.35 Inter, sans-serif;
  letter-spacing: .06em;
}
.lobby .intro .lobby-hero-meta span:first-child {
  border-color: #ddc68b4d;
  color: #efdba6;
}

/* Each game is a polished single focus target; symbols/art aren't controls. */
.lobby .game-grid {
  display: grid;
  grid-column: 1;
  grid-row: 2;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  align-items: stretch;
}
.lobby .game-card {
  --card-accent: #8ff2be;
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  min-height: 422px;
  padding: clamp(18px, 1.8vw, 25px);
  overflow: hidden;
  border: 1px solid #d1e8ce29;
  border-radius: 24px;
  color: #fff;
  text-decoration: none;
  box-shadow: inset 0 1px #ffffff15, 0 16px 40px #0005;
  -webkit-tap-highlight-color: transparent;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.lobby .game-card.fortune {
  --card-accent: #a1ffc9;
  background:
    radial-gradient(ellipse at 90% 58%, #3cb78236, transparent 61%),
    linear-gradient(155deg, #1f3f33, #0e2422 44%, #0a1417 100%);
}
.lobby .game-card.olympus {
  --card-accent: #e1cbff;
  background:
    radial-gradient(ellipse at 86% 58%, #8964be47, transparent 62%),
    linear-gradient(155deg, #352546, #1e192e 48%, #0d1420 100%);
}
.lobby .game-card.double {
  --card-accent: #f2d18e;
  background:
    radial-gradient(ellipse at 80% 64%, #b74d4860, transparent 66%),
    linear-gradient(145deg, #343037, #1d222d 43%, #101721 100%);
}
.lobby .game-card::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(112deg, #ffffff12 0%, transparent 24%, transparent 78%, #00000035 100%);
  pointer-events: none;
}
.lobby .game-card::after {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 1px;
  border-radius: inherit;
  border: 1px solid #ffffff0b;
  pointer-events: none;
}
.lobby .game-card:hover {
  transform: translateY(-4px);
  border-color: #ffe5ad7d;
  box-shadow: inset 0 1px #ffffff27, 0 22px 48px #0009;
}
.lobby .game-card:focus-visible {
  outline: 3px solid #b9ffe0;
  outline-offset: 4px;
}
.lobby .game-card > small {
  position: relative;
  z-index: 2;
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  padding: 7px 9px;
  border: 1px solid #fff2bb3b;
  border-radius: 8px;
  background: #090e1382;
  color: #ffdfa3;
  font: 800 9px/1.4 Inter, sans-serif;
  letter-spacing: .09em;
}
.lobby .game-card h2 {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 100%;
  margin: 17px 0 10px;
  color: #fff9ec;
  font: 700 clamp(30px, 2.5vw, 39px)/1.02 Oswald, "Arial Narrow", sans-serif;
  letter-spacing: -.02em;
  overflow-wrap: anywhere;
}
.lobby .game-card h2 i {
  display: block;
  margin-top: 2px;
  color: #e3c6ff;
  font-style: normal;
}
.lobby .game-card > p {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 100%;
  margin: 0;
  color: #d9dce0;
  font: 500 12px/1.6 Inter, sans-serif;
  text-wrap: pretty;
  overflow-wrap: anywhere;
}
.lobby .game-card .card-art {
  position: absolute;
  z-index: 0;
  top: auto;
  right: -6%;
  bottom: 44px;
  width: 87%;
  height: 48%;
  opacity: .88;
  pointer-events: none;
}
.lobby .game-card .card-art::after {
  inset: 33% 12% 8%;
  background: #ddc06d24;
  filter: blur(34px);
}
.lobby .game-card .card-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 12px 14px #0008);
  transition: transform .3s cubic-bezier(.2,.7,.3,1);
}
.lobby .game-card:hover .card-art img { transform: translateY(-3px) scale(1.025); }
.lobby .game-card > b {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-height: 39px;
  margin-top: auto;
  padding: 10px 12px;
  border: 1px solid #c7e1cb5d;
  border-radius: 11px;
  background: #0b181add;
  color: var(--card-accent);
  font: 850 10px/1.3 Inter, sans-serif;
  letter-spacing: .045em;
  white-space: normal;
  overflow-wrap: anywhere;
  box-shadow: inset 0 1px #ffffff16;
}
.lobby .game-card.double .double-art {
  top: auto;
  right: -9%;
  bottom: 48px;
  width: 116%;
  height: 46%;
  gap: 6px;
  justify-content: center;
}
.lobby .double-art::after { display: none; }
.lobby .double-art strong {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: clamp(46px, 4.5vw, 69px);
  height: clamp(46px, 4.5vw, 69px);
  border: 3px solid #ffffff6b;
  border-radius: 50%;
  background: linear-gradient(145deg, #232732, #0e1119);
  box-shadow: inset 0 2px #ffffff18, 0 9px 20px #0009;
  color: #fff;
  font: 900 21px/1 Inter, sans-serif;
}
.lobby .double-art strong:first-child { background: linear-gradient(145deg, #f24f5e, #77182d); }
.lobby .double-art strong:nth-child(2) {
  background: linear-gradient(145deg, #fff, #c4d0df);
  color: #141b22;
  box-shadow: 0 0 24px #ffffff54, 0 9px 20px #0009;
}

/* Hall of Fame is part of the layout, not a sticky/blurred floating modal. */
.lobby .global-rank {
  position: relative;
  top: auto;
  grid-column: 2;
  grid-row: 1 / 3;
  display: flex;
  flex-direction: column;
  align-self: start;
  gap: 13px;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 25px 20px 18px;
  overflow: hidden;
  border: 1px solid #efd6a03b;
  border-radius: 25px;
  background:
    radial-gradient(ellipse at 50% -9%, #a679393b, transparent 49%),
    linear-gradient(157deg, #232329, #131b21 40%, #111920 100%);
  box-shadow: inset 0 1px #ffffff14, 0 20px 52px #0005;
}
.lobby .global-rank::before {
  content: '✦';
  display: grid;
  flex: 0 0 48px;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid #ffdb996f;
  border-radius: 16px;
  background: linear-gradient(150deg, #ffebad, #bf8f47 70%, #80542e);
  box-shadow: inset 0 1px #fff4c5, 0 8px 25px #b9812f36;
  color: #463017;
  font: 900 23px/1 system-ui, sans-serif;
}
.lobby .global-rank .rank-heading > small {
  color: #efd6a1;
  font: 850 9px/1.5 Inter, sans-serif;
  letter-spacing: .15em;
}
.lobby .global-rank .rank-heading h2 {
  margin: 5px 0 8px;
  color: #fff6dc;
  font: 700 clamp(29px, 2.25vw, 35px)/1.1 Oswald, sans-serif;
  letter-spacing: .025em;
  overflow-wrap: anywhere;
}
.lobby .global-rank .rank-heading p {
  margin: 0;
  color: #bfc4c6;
  font: 500 12px/1.55 Inter, sans-serif;
}
.lobby .global-rank .rank-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  padding: 5px;
  border: 1px solid #e4c99238;
  border-radius: 15px;
  background: #090e13b2;
}
.lobby .global-rank .rank-tabs button {
  min-width: 0;
  min-height: 43px;
  padding: 8px 10px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #c7c8c9;
  font: 850 11px/1.3 Inter, sans-serif;
  letter-spacing: .07em;
  cursor: pointer;
  transition: color .18s ease, background .18s ease;
}
.lobby .global-rank .rank-tabs button:hover { background: #ffffff10; color: #fff; }
.lobby .global-rank .rank-tabs button.active,
.lobby .global-rank .rank-tabs button[aria-selected="true"] {
  background: linear-gradient(145deg, #fff1c2, #dbb97a);
  box-shadow: 0 2px 8px #0005, inset 0 1px #fff9e2;
  color: #281c10;
}
.lobby .global-rank ol {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
  min-width: 0;
  margin: 0;
  padding: 0;
}
.lobby .global-rank li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) minmax(106px, 43%);
  align-items: center;
  gap: 6px;
  min-width: 0;
  min-height: 53px;
  padding: 8px 8px;
  border: 1px solid #e9e7d219;
  border-radius: 13px;
  background: linear-gradient(105deg, #ffffff0a, #ffffff04);
}
.lobby .global-rank li:nth-child(1) {
  border-color: #edcd8644;
  background: linear-gradient(105deg, #d6a85322, #ffffff05);
}
.lobby .global-rank li.you {
  border-color: #9ff2c169;
  background: linear-gradient(105deg, #6ad5a622, #d4e9bb06);
  outline: none;
}
.lobby .global-rank li i {
  min-width: 0;
  color: #c9c1a9;
  font: 900 12px/1 Inter, sans-serif;
  text-align: center;
}
.lobby .global-rank li .rank-player {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  padding-left: 31px;
  overflow: hidden;
}
.lobby .global-rank li .rank-player b {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: #f4f5f3;
  font: 800 12px/1.3 Inter, sans-serif;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lobby .global-rank li .rank-player small {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: #aeb6b8;
  font: 600 10px/1.3 Inter, sans-serif;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lobby .global-rank li .rank-metric {
  display: block;
  max-width: 100%;
  min-width: 0;
  color: #a5f2cb;
  font: 850 clamp(9px, .72vw, 10px)/1.3 Inter, sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.015em;
  text-align: right;
  white-space: nowrap;
  overflow-wrap: normal;
}
.lobby .global-rank li .rank-metric.level { color: #f1d79e; }
.lobby .global-rank li.rank-empty {
  display: block;
  padding: 23px 15px;
  color: #c9c9c4;
  text-align: center;
}
.lobby .global-rank .rank-footnote {
  margin: 0;
  padding-top: 13px;
  border-top: 1px solid #e4c99226;
  color: #abb4b8;
  font: 650 10px/1.4 Inter, sans-serif;
  letter-spacing: .04em;
}
.lobby footer {
  border-top: 1px solid #d4c2a418;
  padding: 24px 16px 33px;
  color: #939da0;
  font: 700 10px/1.55 Inter, sans-serif;
  letter-spacing: .13em;
  text-align: center;
  overflow-wrap: anywhere;
}

/* Profile and rename panels: proper contrast, keyboard focus, safe scroll. */
.lobby .profile-gate {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  align-items: safe center;
  justify-items: center;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 16px;
  background: #02090de8;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.lobby .profile-gate form {
  width: min(500px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  margin-block: auto;
  padding: clamp(23px, 3.3vw, 38px);
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid #eddbad60;
  border-radius: 27px;
  background:
    radial-gradient(ellipse at 45% -15%, #9d773d3a, transparent 50%),
    linear-gradient(145deg, #1d2928, #12171e 65%);
  box-shadow: inset 0 1px #ffffff20, 0 32px 110px #000e;
  color: #f8f6f1;
}
.lobby .profile-coin {
  border: 2px solid #fff4c294;
  border-radius: 20px;
  background: linear-gradient(135deg, #fff0b9, #c99643 73%, #895923);
  box-shadow: inset 0 1px #fffde2, 0 13px 35px #b995462d;
  color: #38220c;
}
.lobby .profile-gate h2 {
  margin: 13px 0 6px;
  color: #fff8e9;
  font: 700 clamp(32px, 5vw, 43px)/1.12 Oswald, sans-serif;
}
.lobby .profile-gate p { color: #c3cdcb; font-size: 13px; line-height: 1.65; }
.lobby .profile-gate label { color: #eed4a1; }
.lobby .profile-gate input {
  width: 100%;
  min-height: 48px;
  border: 1px solid #b7d1c54a;
  border-radius: 13px;
  background: #0b1419;
  color: #fff;
}
.lobby .profile-gate input:focus {
  border-color: #a7eec6;
  outline: 2px solid #a7eec6;
  outline-offset: 2px;
  box-shadow: none;
}
.lobby .profile-gate form > button[type="submit"] {
  min-height: 50px;
  border: 1px solid #c6ffe9b3;
  border-radius: 13px;
  background: linear-gradient(140deg, #abf6d0, #5fd29e);
  box-shadow: inset 0 1px #e4fff5a6, 0 9px 23px #4dd69b25;
  color: #0e2c22;
  font: 850 12px/1.35 Inter, sans-serif;
  letter-spacing: .045em;
}
.lobby .profile-gate [hidden] { display: none !important; }
.lobby dialog.rename-dialog {
  width: min(470px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  padding: clamp(19px, 3vw, 30px);
  border: 1px solid #eddbad60;
  border-radius: 25px;
  background: linear-gradient(145deg, #1d2928, #11171e 70%);
  box-shadow: inset 0 1px #ffffff1a, 0 35px 110px #000e;
  color: #f9f7f0;
}
.lobby dialog.rename-dialog::backdrop {
  background: #01080dd9;
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
}
.lobby .rename-dialog-head { min-width: 0; }
.lobby .rename-emblem {
  border: 1px solid #ffedaf88;
  border-radius: 15px;
  background: linear-gradient(135deg, #faeac0, #d1a257 70%);
  color: #392510;
}
.lobby .rename-dialog-head small { color: #eacb91; }
.lobby .rename-dialog h2 { color: #fff9ea; }
.lobby .rename-dialog #renameHelp { color: #c1cdcb; }
.lobby .rename-current {
  border: 1px solid #e9d8ae26;
  border-radius: 14px;
  background: #e5f0d409;
}
.lobby .rename-dialog label { color: #efd2a1; }
.lobby .rename-dialog input {
  background: #0b151a;
  border-color: #d5e8d544;
  border-radius: 13px;
  color: #fff;
}
.lobby .rename-dialog .rename-cancel {
  border-color: #f0eedb3a;
  border-radius: 12px;
  background: #ffffff0b;
  color: #f0eee7;
}
.lobby .rename-dialog .rename-save {
  border-color: #cbffe6a3;
  border-radius: 12px;
  background: linear-gradient(135deg, #b0f9d8, #66d6a2);
  color: #103528;
}
.lobby .rename-dialog .rename-error { color: #ffb8c0; }
.lobby .rename-dialog .rename-status { color: #b9f8d6; }
.lobby .rename-toast {
  border-color: #b4f8d4a3;
  border-radius: 13px;
  background: #123229;
  color: #e8fff2;
}

/* Breakpoints complement the existing injected levels.css media rules. */
@media (max-width: 1190px) {
  .lobby main { grid-template-columns: minmax(0, 1fr) minmax(290px, 320px); }
  .lobby .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lobby .game-card:last-child { grid-column: 1 / -1; min-height: 300px; }
  .lobby .game-card:last-child .double-art { width: 57%; right: 1%; }
  .lobby .game-card:last-child > :is(small,h2,p,b) { max-width: 56%; }
}
@media (max-width: 1020px) {
  .lobby > header { flex-wrap: wrap; column-gap: 12px; row-gap: 8px; padding: 10px max(18px, 3.5vw); }
  .lobby > header > p { display: none; }
  .lobby > header.ssp-has-xp #globalLevel {
    flex: 1 0 100%;
    width: 100%;
    margin: 0;
    order: 3;
  }
  .lobby > header.ssp-has-xp #globalLevel .ssp-xp-card { max-width: none; }
  .lobby main {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    padding-top: 22px;
    gap: 20px;
  }
  .lobby .intro { grid-column: 1; grid-row: 1; min-height: 250px; }
  .lobby .game-grid { grid-column: 1; grid-row: 2; }
  .lobby .global-rank { grid-column: 1; grid-row: 3; }
  .lobby .global-rank ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lobby .game-card { min-height: 390px; }
}
@media (max-width: 640px) {
  .lobby > header { min-height: 76px; padding: 9px 13px; gap: 7px; }
  .lobby > header .logo { gap: 5px; font-size: 23px; }
  .lobby > header .logo span { font-size: .67em; letter-spacing: .065em; }
  .lobby > header .account {
    flex: 0 1 auto;
    gap: 7px;
    max-width: calc(100% - 125px);
    min-height: 52px;
    margin-left: auto;
    padding: 6px;
    border-radius: 13px;
  }
  .lobby > header .account > span {
    flex-basis: 31px;
    width: 31px;
    height: 31px;
    border-radius: 10px;
    font-size: 13px;
  }
  .lobby > header .account #lobbyUser {
    font-size: 8px;
    letter-spacing: .04em;
  }
  .lobby > header .account #lobbyBalance {
    font-size: clamp(10px, 2.7vw, 12px);
    line-height: 1.22;
    letter-spacing: -.045em;
    overflow-wrap: anywhere;
  }
  .lobby > header .account .rename-open {
    min-width: 34px;
    min-height: 36px;
    padding: 6px;
    border-radius: 10px;
  }
  .lobby > header .account .rename-open-text { display: none; }
  .lobby > header.ssp-has-xp #globalLevel .ssp-xp-card {
    max-width: none;
    padding: 7px 11px;
  }
  .lobby main {
    width: calc(100% - 26px);
    padding: 17px 0 48px;
    gap: 15px;
  }
  .lobby .intro {
    min-height: 0;
    padding: 25px 21px 23px;
    border-radius: 22px;
  }
  .lobby .intro::before { width: 220px; height: 220px; right: -107px; top: -111px; }
  .lobby .intro h1 { font-size: clamp(41px, 10.7vw, 58px); line-height: 1; }
  .lobby .intro > p { font-size: 9px; letter-spacing: .12em; }
  .lobby .intro .lobby-hero-meta { gap: 6px; }
  .lobby .intro .lobby-hero-meta span { font-size: 8px; padding: 6px 8px; }
  .lobby .game-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .lobby .game-card,
  .lobby .game-card:last-child {
    grid-column: 1;
    min-height: 365px;
    padding: 23px;
    border-radius: 22px;
  }
  .lobby .game-card h2 { font-size: clamp(34px, 8vw, 43px); }
  .lobby .game-card > p { max-width: 74%; font-size: 12px; }
  .lobby .game-card .card-art { right: -10%; bottom: 38px; width: 68%; height: 56%; }
  .lobby .game-card:last-child > :is(small,h2,p,b) { max-width: 100%; }
  .lobby .game-card:last-child .double-art {
    right: -3%;
    bottom: 41px;
    width: 103%;
    height: 45%;
  }
  .lobby .double-art strong { width: 66px; height: 66px; }
  .lobby .global-rank { padding: 23px 15px 17px; border-radius: 22px; }
  .lobby .global-rank ol { grid-template-columns: minmax(0, 1fr); }
  .lobby .global-rank li {
    grid-template-columns: 23px minmax(0, 1fr) minmax(72px, 35%);
    min-height: 52px;
    padding: 8px 9px;
  }
  .lobby .global-rank .rank-heading h2 { font-size: 31px; }
  .lobby .rename-actions { grid-template-columns: 1fr; }
  .lobby .profile-gate { padding: 12px; }
  .lobby .profile-gate form {
    width: min(500px, calc(100vw - 24px));
    max-height: calc(100dvh - 24px);
    border-radius: 21px;
  }
}
@media (max-width: 390px) {
  .lobby > header .logo { font-size: 21px; }
  .lobby > header .account { max-width: calc(100% - 113px); gap: 6px; }
  .lobby > header .account > span { flex-basis: 29px; width: 29px; height: 29px; }
  .lobby .intro h1 { font-size: 41px; }
  .lobby .intro .lobby-hero-meta span { font-size: 7.5px; }
  .lobby .game-card > p { max-width: 77%; }
}
@media (hover: none) {
  .lobby .game-card:hover { transform: none; }
  .lobby .game-card:hover .card-art img { transform: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .lobby > header,
  .lobby .profile-gate { -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-reduced-motion: reduce) {
  .lobby *, .lobby *::before, .lobby *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
