.lobby {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px 48px;
}

.hero {
  text-align: center;
  padding: clamp(40px, 8vw, 88px) 0 clamp(28px, 5vw, 48px);
}
.eyebrow {
  margin: 0 0 14px;
  color: var(--gold);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.4rem, 7vw, 4.4rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  background: linear-gradient(180deg, #fff8e2, var(--gold-2) 55%, var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 40px rgba(244, 220, 149, 0.08);
}
.lede {
  max-width: 560px;
  margin: 18px auto 0;
  color: var(--ink-2);
  font-size: clamp(1rem, 2.4vw, 1.12rem);
  line-height: 1.6;
}

.hero-link { margin-top: 26px; min-height: 42px; color: var(--gold-2); border-color: var(--panel-border); }
.hero-link svg { width: 18px; height: 18px; }

.games {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
  gap: 20px;
}

.game-tile {
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
}
.game-tile.soon { cursor: default; }
.game-tile.soon .tile-art { filter: saturate(0.65) brightness(0.8); }

.tile-art {
  --card-w: 66px;
  position: relative;
  height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 50% 120%, rgba(244, 220, 149, 0.16), transparent 60%),
    radial-gradient(ellipse at 50% 40%, var(--felt-1), var(--felt-2));
  border-bottom: 1px solid var(--panel-border);
  overflow: hidden;
}
.tile-art .card {
  position: absolute;
  left: 50%;
  top: 50%;
  margin: calc(var(--card-w) * -0.7) 0 0 calc(var(--card-w) * -0.5);
  transform: rotate(calc((var(--i) - 0.5) * 14deg)) translateX(calc((var(--i) - 0.5) * 30px));
  transform-origin: 50% 120%;
  transition: transform 0.35s var(--ease);
}
.art-gofish .card { transform: rotate(calc((var(--i) - 1) * 14deg)) translateX(calc((var(--i) - 1) * 26px)); }
.game-tile.live:is(:hover, :focus-within) .tile-art .card { transform: rotate(calc((var(--i) - 0.5) * 22deg)) translateX(calc((var(--i) - 0.5) * 44px)) translateY(-6px); }
.game-tile.live:is(:hover, :focus-within) .art-gofish .card { transform: rotate(calc((var(--i) - 1) * 20deg)) translateX(calc((var(--i) - 1) * 38px)) translateY(-6px); }

.chip-stack {
  position: absolute;
  right: 18%;
  bottom: 22px;
  display: flex;
  flex-direction: column-reverse;
}
.chip-stack span {
  width: 44px;
  height: 12px;
  margin-top: -5px;
  border-radius: 50%;
  background: repeating-linear-gradient(90deg, #c0392b 0 7px, #fff 7px 11px);
  box-shadow: 0 2px 0 #7d2219, 0 4px 8px rgba(0, 0, 0, 0.4);
}
.chip-stack span:nth-child(2n) { background: repeating-linear-gradient(90deg, #23232b 0 7px, #e8d6a0 7px 11px); box-shadow: 0 2px 0 #0d0d10, 0 4px 8px rgba(0, 0, 0, 0.4); }

.fish {
  position: absolute;
  left: 14%;
  bottom: 18px;
  width: 54px;
  color: var(--gold-2);
  opacity: 0.85;
  transform: rotate(-8deg);
}

.art-mahjong { gap: 10px; }
.mj {
  display: grid;
  place-items: center;
  width: 50px;
  height: 68px;
  border-radius: 8px;
  font: 700 2rem/1 'Noto Serif SC', 'Songti SC', 'SimSun', serif;
  color: #1d4a8f;
  background: linear-gradient(170deg, #fffdf6, #efe8d4);
  box-shadow: 0 5px 0 #1e7a52, 0 6px 0 #0f4f34, 0 10px 18px rgba(0, 0, 0, 0.45);
}
.mj.red { color: #c62828; transform: rotate(-6deg) translateY(4px); }
.mj.green { color: #1e7a3c; }
.mj:last-child { transform: rotate(6deg) translateY(4px); }

.tile-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.tile-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tile-head h2 { margin: 0; font-family: var(--font-display); font-size: 1.45rem; color: var(--ink); }
.tile-body p { margin: 0; color: var(--ink-2); line-height: 1.5; font-size: 0.95rem; flex: 1; }
.badge {
  flex: none;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  border: 1px solid var(--hairline);
}
.badge-live { color: #2b1c04; border-color: transparent; background: linear-gradient(180deg, var(--gold-2), var(--gold)); }
.tile-body .tile-ranked { flex: none; font-size: 0.88rem; font-weight: 700; color: var(--gold-2); font-variant-numeric: tabular-nums; }
.tile-body .tile-ranked.new { color: var(--gold); font-weight: 600; }
.tile-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.tile-meta li {
  font-size: 0.78rem;
  color: var(--ink-3);
  padding: 4px 9px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
}

.tile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}
.tile-actions .btn { padding: 0 12px; }
.tile-actions .btn svg { width: 16px; height: 16px; flex: none; }
.tile-actions .btn:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.12); }
.tile-actions .btn-gold:hover { box-shadow: 0 10px 24px rgba(217, 180, 90, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.6); }
.tile-actions .btn:active { transform: translateY(-1px) scale(0.97); }

@media (max-width: 480px) {
  .topbar { padding-inline: 12px; gap: 8px; }
  .brand { font-size: 1.1rem; gap: 8px; }
  .brand-mark { width: 30px; height: 30px; font-size: 0.95rem; }
  .topbar .btn-icon { width: 36px; height: 36px; min-height: 36px; }
  .pill { gap: 6px; height: 36px; padding: 0 10px 0 6px; font-size: 0.92rem; }
  .pill .coin { width: 20px; height: 20px; }
}
/* Signed in, the top bar also carries the avatar: keep just the brand mark. */
@media (max-width: 600px) {
  .topbar:has(.account-wrap:not([hidden])) .brand-name { display: none; }
}
@media (max-width: 400px) {
  .topbar:has(.account-wrap:not([hidden])) .brand { display: none; }
}
@media (max-width: 400px) {
  /* Signed out, the name doesn't fit beside Normal chips, Sign in and mute either: just the mark. */
  .brand-name { display: none; }
  .brand { font-size: 1rem; }
  .pill { padding-left: 12px; }
  .pill .coin { display: none; }
}

.site-footer { text-align: center; padding: 8px 16px 32px; color: var(--ink-3); font-size: 0.85rem; }
