:root {
  color-scheme: light;
  --bg: #f4f5f0;
  --surface: #ffffff;
  --surface-soft: #eef5f7;
  --ink: #1d2329;
  --muted: #647079;
  --line: #d8dedf;
  --teal: #187e7f;
  --mint: #d9f4e5;
  --coral: #e35d4f;
  --gold: #d69a19;
  --violet: #6853ad;
  --shadow: 0 18px 48px rgba(32, 43, 52, 0.14);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

[hidden] {
  display: none !important;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(244, 245, 240, 0.92), rgba(244, 245, 240, 1)),
    repeating-linear-gradient(90deg, rgba(24, 126, 127, 0.04) 0 1px, transparent 1px 64px);
  color: var(--ink);
}

img,
svg {
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 20px;
  align-items: center;
  padding: 14px clamp(16px, 3vw, 36px);
  border-bottom: 1px solid rgba(29, 35, 41, 0.1);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  position: relative;
  isolation: isolate;
  display: grid;
  width: 46px;
  aspect-ratio: 1;
  flex: 0 0 auto;
  place-items: center;
  overflow: visible;
  border: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 238, 143, 0.32), transparent 58%),
    transparent;
  filter: drop-shadow(0 8px 13px rgba(24, 126, 127, 0.22));
}

.brand-mark::after {
  content: none;
}

.brand-logo {
  position: relative;
  z-index: 1;
  width: 42px;
  height: 42px;
}

.brand-logo-ring-back,
.brand-logo-ring-front {
  fill: none;
  stroke-linecap: round;
  stroke-width: 6;
}

.brand-logo-ring-back {
  opacity: 0.86;
}

.brand-logo-ring-front {
  stroke-width: 7;
  filter: drop-shadow(0 0 2px rgba(72, 199, 255, 0.92));
}

.brand-logo-ball {
  fill: url("#brandBallGradient");
  stroke: rgba(37, 19, 11, 0.58);
  stroke-width: 1.5;
}

.brand-logo-ball-shade {
  fill: rgba(120, 73, 12, 0.24);
}

.brand-logo-ball-highlight {
  fill: rgba(255, 255, 255, 0.34);
}

.brand-logo-face {
  fill: #fffdf6;
  stroke: rgba(255, 255, 255, 0.95);
  stroke-width: 2.2;
}

.brand-logo-face-ring {
  fill: none;
  stroke: rgba(32, 43, 52, 0.18);
  stroke-width: 1.6;
}

.brand-logo-number {
  fill: #080808;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 0;
}

.brand-logo-ring-front,
.brand-logo-number {
  paint-order: stroke fill;
}

.brand-lockup h1,
.market-toolbar h2,
.drawer-header h2 {
  margin: 0;
  line-height: 1.05;
}

.brand-lockup h1 {
  font-size: 1.1rem;
}

.brand-lockup p,
.market-toolbar p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  background: #f8faf8;
}

.top-nav a,
.top-nav button {
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 8px 12px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.top-nav a[aria-current="page"],
.top-nav button[aria-current="page"] {
  background: var(--ink);
  color: #fff;
}

.top-nav a[aria-disabled="true"],
.top-nav button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.credits-button,
.account-button,
.settings-button,
.primary-action,
.secondary-action,
.icon-button,
.segmented-control button {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 800;
}

.credits-button,
.account-button,
.primary-action {
  background: var(--teal);
  color: #fff;
  padding: 0 16px;
}

.credits-button {
  display: grid;
  align-content: center;
  gap: 1px;
  min-width: 126px;
  text-align: left;
  line-height: 1.05;
}

.credits-button span {
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

.credits-button small {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.64rem;
  font-weight: 900;
}

.account-button {
  display: flex;
  align-items: center;
  gap: 8px;
}

.account-name {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-button {
  display: grid;
  width: 38px;
  min-width: 38px;
  place-items: center;
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
  padding: 0;
  font-size: 0;
}

.settings-button::before {
  content: "\2699";
  font-size: 1rem;
  line-height: 1;
}

.settings-button:hover,
.settings-button:focus-visible {
  border-color: rgba(24, 126, 127, 0.42);
  outline: 0;
}

.credits-button:disabled,
.account-button:disabled,
.settings-button:disabled,
.primary-action:disabled,
.secondary-action:disabled,
.icon-button:disabled,
.segmented-control button:disabled {
  opacity: 0.54;
  cursor: not-allowed;
}

.primary-action:disabled {
  background: #8eaeb0;
}

.secondary-action:disabled {
  background: #f3f5f4;
  color: var(--muted);
}

.credits-button.connected,
.account-button.connected {
  background: var(--ink);
}

.player-avatar {
  display: grid;
  width: 32px;
  aspect-ratio: 1;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.55), transparent 32%),
    linear-gradient(135deg, var(--avatar-start), var(--avatar-end));
  color: var(--avatar-ink);
  font-size: 0.88rem;
  font-weight: 1000;
  line-height: 1;
  box-shadow:
    inset 0 -2px 5px rgba(29, 35, 41, 0.18),
    0 2px 8px rgba(29, 35, 41, 0.14);
}

.account-avatar {
  width: 24px;
  font-size: 0.72rem;
}

.market-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 22px;
  padding: 22px clamp(16px, 3vw, 36px) 36px;
}

.app-page[hidden] {
  display: none;
}

.preview-shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 24px;
  min-height: calc(100vh - 72px);
  padding: 22px clamp(16px, 3vw, 36px) 36px;
}

.preview-controls-panel,
.preview-stage {
  min-width: 0;
}

.preview-controls-panel {
  align-self: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 28px rgba(36, 50, 58, 0.06);
}

.preview-control-header,
.preview-form,
.preview-details {
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.preview-control-header h2 {
  margin: 4px 0 0;
  font-size: 1.45rem;
  line-height: 1.1;
}

.preview-form {
  display: grid;
  gap: 10px;
}

.preview-submit {
  margin-top: 4px;
}

.preview-details {
  margin: 0;
  border-bottom: 0;
}

.preview-details div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid rgba(216, 222, 223, 0.75);
}

.preview-details div:last-child {
  border-bottom: 0;
}

.preview-stage {
  display: grid;
  min-height: 620px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(238, 245, 247, 0.72)),
    repeating-linear-gradient(45deg, rgba(24, 126, 127, 0.05) 0 12px, transparent 12px 24px);
}

.preview-card-slot {
  display: grid;
  width: min(360px, 86vw);
  place-items: center;
}

.preview-card-slot .bingo-card {
  width: 100%;
}

.leaderboard-shell {
  display: grid;
  gap: 22px;
  min-height: calc(100vh - 72px);
  padding: 22px clamp(16px, 3vw, 36px) 36px;
}

.leaderboard-hero,
.leaderboard-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 28px rgba(36, 50, 58, 0.06);
}

.leaderboard-hero {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
  background:
    radial-gradient(circle at 12% 20%, rgba(214, 154, 25, 0.16), transparent 34%),
    radial-gradient(circle at 92% 8%, rgba(24, 126, 127, 0.13), transparent 30%),
    rgba(255, 255, 255, 0.92);
}

.leaderboard-hero h2,
.leaderboard-panel h3 {
  margin: 4px 0 0;
  line-height: 1.08;
}

.leaderboard-hero h2 {
  font-size: clamp(1.55rem, 3vw, 2.45rem);
}

.leaderboard-hero p {
  max-width: 620px;
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.45;
}

.leaderboard-season-card {
  display: grid;
  align-content: center;
  min-width: 170px;
  border: 1px solid rgba(24, 126, 127, 0.18);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(217, 244, 229, 0.86), rgba(255, 248, 222, 0.82)),
    #fff;
  padding: 16px;
}

.leaderboard-season-card span,
.leaderboard-season-card small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.leaderboard-season-card strong {
  color: var(--ink);
  font-size: 1.36rem;
  line-height: 1.1;
}

.leaderboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 22px;
  align-items: start;
}

.leaderboard-panel {
  overflow: hidden;
}

.leaderboard-panel-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 16px;
}

.leaderboard-chip {
  border-radius: 999px;
  background: rgba(24, 126, 127, 0.1);
  color: var(--teal);
  padding: 6px 10px;
  font-size: 0.72rem;
  font-weight: 1000;
  text-transform: uppercase;
}

.leaderboard-list,
.leaderboard-side {
  display: grid;
  gap: 12px;
}

.leaderboard-list {
  padding: 12px;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(216, 222, 223, 0.88);
  border-radius: 12px;
  background: rgba(251, 252, 251, 0.92);
  padding: 12px;
}

.leaderboard-row.top {
  border-color: rgba(214, 154, 25, 0.48);
  background:
    linear-gradient(135deg, rgba(255, 248, 222, 0.95), rgba(255, 255, 255, 0.92)),
    #fff;
  box-shadow: inset 4px 0 0 var(--gold);
}

.leaderboard-rank {
  display: grid;
  width: 34px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 1000;
}

.leaderboard-player {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.leaderboard-avatar {
  display: grid;
  width: 38px;
  aspect-ratio: 1;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #30d5c8, #6853ad);
  color: #fff;
  font-weight: 1000;
}

.leaderboard-avatar.ember {
  background: linear-gradient(135deg, #ff7a45, #d69a19);
  color: #25130b;
}

.leaderboard-avatar.lagoon {
  background: linear-gradient(135deg, #33c7ff, #187e7f);
}

.leaderboard-avatar.violet {
  background: linear-gradient(135deg, #a978ff, #4d3a91);
}

.leaderboard-avatar.gold {
  background: linear-gradient(135deg, #ffd166, #b7791f);
  color: #25130b;
}

.leaderboard-player strong,
.leaderboard-player small {
  display: block;
  min-width: 0;
}

.leaderboard-player strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-player small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.leaderboard-score {
  color: var(--teal);
  font-size: 1.08rem;
  white-space: nowrap;
}

.leaderboard-room-list,
.leaderboard-jackpot-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 12px;
}

.leaderboard-room-list div,
.leaderboard-jackpot-list div {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(216, 222, 223, 0.88);
  border-radius: 10px;
  background: #fbfcfb;
  padding: 12px;
}

.leaderboard-room-list dt,
.leaderboard-room-list dd {
  margin: 0;
}

.leaderboard-room-list dt,
.leaderboard-jackpot-list span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.leaderboard-room-list dd,
.leaderboard-jackpot-list strong {
  color: var(--ink);
  font-weight: 1000;
}

.game-shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 24px;
  min-height: calc(100vh - 72px);
  padding: 22px clamp(16px, 3vw, 36px) 36px;
}

.mobile-game-stepbar,
.mobile-card-confirm,
.mobile-game-meta-bar {
  display: none;
}

.game-setup-panel,
.game-stage {
  min-width: 0;
}

.game-setup-panel {
  align-self: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 28px rgba(36, 50, 58, 0.06);
}

.game-control-header,
.game-table-tabs,
.game-join-block,
.game-picker-block,
.game-start-actions,
.game-prize-table {
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.game-control-header h2,
.game-toolbar h2 {
  margin: 4px 0 0;
  line-height: 1.1;
}

.game-join-block {
  display: grid;
  gap: 10px;
}

.game-table-tabs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  width: 100%;
  overflow: visible;
  padding: 12px;
  transition: padding 180ms ease, gap 180ms ease;
}

.game-table-button {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px 12px;
  align-items: start;
  width: 100%;
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    radial-gradient(circle at 90% 10%, rgba(214, 154, 25, 0.13), transparent 34%),
    #fff;
  color: var(--ink);
  padding: 14px;
  text-align: left;
  cursor: pointer;
}

.game-table-button strong,
.game-table-button small {
  display: block;
}

.game-table-button > strong {
  font-size: 1.08rem;
}

.game-table-button small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.game-table-button > small {
  justify-self: end;
  border-radius: 999px;
  background: rgba(24, 126, 127, 0.08);
  color: var(--teal);
  padding: 4px 9px;
  text-align: right;
}

.game-table-button.active {
  border-color: rgba(24, 126, 127, 0.55);
  box-shadow: inset 4px 0 0 var(--teal);
}

.game-table-button.joined strong::after {
  content: " Joined";
  color: var(--teal);
  font-size: 0.72rem;
  font-weight: 900;
}

.game-table-button.countdown {
  background: linear-gradient(135deg, rgba(214, 154, 25, 0.12), #fff);
}

.game-room-metrics {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.game-room-metric {
  display: grid;
  gap: 2px;
  border: 1px solid rgba(216, 222, 223, 0.82);
  border-radius: 8px;
  background: rgba(247, 250, 250, 0.86);
  padding: 8px;
}

.game-room-metric small {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 900;
  text-transform: uppercase;
}

.game-room-metric strong {
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.1;
}

.game-room-cta {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border-radius: 999px;
  background: var(--teal);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 900;
}

.game-shell.room-selector-collapsed .game-table-tabs {
  gap: 0;
  padding: 10px 16px;
}

.game-shell.room-selector-collapsed .game-table-button:not(.active) {
  display: none;
}

.game-shell.room-selector-collapsed .game-table-button.active {
  min-height: 46px;
  border-radius: 10px;
  padding: 10px 12px;
  background:
    radial-gradient(circle at 90% 12%, rgba(24, 126, 127, 0.14), transparent 34%),
    rgba(255, 255, 255, 0.95);
}

.game-shell.room-selector-collapsed .game-table-button.active > strong {
  align-self: center;
  font-size: 0.98rem;
}

.game-shell.room-selector-collapsed .game-table-button.active > small {
  align-self: center;
  padding: 3px 8px;
  font-size: 0.66rem;
}

.game-shell.room-selector-collapsed .game-table-button.active .game-room-metrics,
.game-shell.room-selector-collapsed .game-table-button.active .game-room-cta {
  display: none;
}

.game-shell.room-selector-collapsed .game-picker-block {
  animation: card-picker-slide-up 220ms ease-out both;
}

@keyframes card-picker-slide-up {
  from {
    opacity: 0.86;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.game-status-note {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.game-selection-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.game-selection-header strong {
  font-size: 0.86rem;
}

.game-card-picker {
  display: grid;
  gap: 8px;
  max-height: 430px;
  overflow: auto;
  padding-right: 2px;
}

.game-picker-card {
  display: grid;
  grid-template-columns: auto 44px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 8px;
  cursor: pointer;
}

.game-picker-card.selected {
  border-color: rgba(24, 126, 127, 0.55);
  box-shadow: inset 4px 0 0 var(--teal);
}

.game-picker-card.favorite {
  border-color: rgba(227, 93, 79, 0.36);
}

.game-picker-card.disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.game-picker-card input {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
}

.game-picker-art,
.game-picker-fallback {
  width: 44px;
  aspect-ratio: 1;
  border-radius: 6px;
  background: var(--surface-soft);
}

.game-picker-art {
  object-fit: contain;
}

.game-picker-fallback {
  display: grid;
  place-items: center;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 900;
}

.game-picker-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.game-picker-copy strong,
.game-picker-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-picker-copy small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.game-picker-empty {
  min-height: 96px;
  padding: 14px;
  text-align: center;
}

.game-start-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.game-prize-table {
  display: grid;
  gap: 8px;
  margin: 0;
  border-bottom: 0;
}

.game-prize-table div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(216, 222, 223, 0.75);
}

.game-prize-table div:last-child {
  border-bottom: 0;
}

.game-stage {
  display: grid;
  position: relative;
  grid-template-columns: minmax(320px, 0.88fr) minmax(430px, 1.12fr);
  grid-template-rows: auto minmax(52px, auto) minmax(460px, auto);
  align-content: start;
  gap: 12px;
}

.game-stage.table-theme-fiesta {
  --theme-fiesta-line: rgba(217, 164, 35, 0.34);
}

.game-stage.table-theme-fiesta .game-toolbar {
  padding: 14px 16px;
  border: 1px solid var(--theme-fiesta-line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 8% 12%, rgba(255, 228, 139, 0.28), transparent 28%),
    linear-gradient(135deg, rgba(255, 252, 241, 0.9), rgba(252, 244, 224, 0.76));
  box-shadow: 0 12px 24px rgba(151, 103, 44, 0.08);
}

.game-stage.table-theme-fiesta .game-hud article,
.game-stage.table-theme-fiesta .called-ball-strip,
.game-stage.table-theme-fiesta .ledger-section,
.game-stage.table-theme-fiesta .ledger-empty {
  border-color: var(--theme-fiesta-line);
  background-color: rgba(255, 252, 244, 0.86);
  backdrop-filter: blur(3px);
}

.game-stage.table-theme-beach {
  --theme-beach-line: rgba(0, 167, 255, 0.34);
}

.game-stage.table-theme-beach .game-toolbar {
  padding: 14px 16px;
  border: 1px solid var(--theme-beach-line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 9% 16%, rgba(255, 212, 0, 0.2), transparent 28%),
    radial-gradient(circle at 88% 10%, rgba(0, 209, 178, 0.18), transparent 24%),
    linear-gradient(135deg, rgba(244, 253, 255, 0.91), rgba(232, 250, 255, 0.78));
  box-shadow: 0 12px 24px rgba(0, 121, 200, 0.08);
}

.game-stage.table-theme-beach .game-hud article,
.game-stage.table-theme-beach .called-ball-strip,
.game-stage.table-theme-beach .ledger-section,
.game-stage.table-theme-beach .ledger-empty {
  border-color: var(--theme-beach-line);
  background-color: rgba(246, 253, 255, 0.86);
  backdrop-filter: blur(3px);
}

.game-stage.table-theme-halloween {
  --theme-halloween-line: rgba(122, 44, 255, 0.34);
}

.game-stage.table-theme-halloween .game-toolbar {
  padding: 14px 16px;
  border: 1px solid var(--theme-halloween-line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 8% 14%, rgba(255, 179, 26, 0.22), transparent 28%),
    radial-gradient(circle at 88% 10%, rgba(0, 224, 196, 0.16), transparent 24%),
    linear-gradient(135deg, rgba(254, 249, 255, 0.92), rgba(246, 238, 255, 0.78));
  box-shadow: 0 12px 24px rgba(74, 28, 132, 0.08);
}

.game-stage.table-theme-halloween .game-hud article,
.game-stage.table-theme-halloween .called-ball-strip,
.game-stage.table-theme-halloween .ledger-section,
.game-stage.table-theme-halloween .ledger-empty {
  border-color: var(--theme-halloween-line);
  background-color: rgba(254, 249, 255, 0.86);
  backdrop-filter: blur(3px);
}

.game-toolbar {
  display: grid;
  grid-column: 1 / -1;
  grid-row: 1;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 68px;
}

.game-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 6px;
}

.audio-action {
  min-width: 96px;
}

.audio-action.active {
  border-color: rgba(24, 126, 127, 0.42);
  background: #eef7f3;
  color: var(--teal);
}

.game-hud {
  display: grid;
  grid-column: 2;
  grid-row: 2;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  align-self: stretch;
}

.game-hud article {
  display: grid;
  align-content: center;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
}

.game-hud small {
  display: block;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1.05;
  text-transform: uppercase;
}

.game-hud span {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.05;
}

.current-ball-tile span {
  color: var(--teal);
  font-size: 1.24rem;
}

.called-ball-strip {
  display: flex;
  grid-column: 1;
  grid-row: 2;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  width: 100%;
  max-width: 100%;
  min-height: 52px;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  padding: 10px;
}

.called-ball,
.called-ball-empty {
  display: inline-grid;
  flex: 0 0 auto;
  width: 46px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  font-size: 0.76rem;
  font-weight: 900;
}

.called-ball {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.74);
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.92) 0 9%, rgba(255, 255, 255, 0.38) 10% 20%, transparent 21%),
    radial-gradient(circle at 64% 72%, rgba(0, 0, 0, 0.24), transparent 36%),
    linear-gradient(145deg, color-mix(in srgb, var(--ball-color, var(--teal)) 82%, #fff), var(--ball-color, var(--teal)) 45%, var(--ball-shadow, #0f5455));
  color: var(--ink);
  box-shadow:
    inset -9px -11px 15px rgba(0, 0, 0, 0.25),
    inset 6px 7px 12px rgba(255, 255, 255, 0.28),
    0 5px 10px rgba(29, 35, 41, 0.16);
}

.called-ball-face {
  position: relative;
  display: grid;
  width: 66%;
  aspect-ratio: 1;
  place-items: center;
  border: 2px solid color-mix(in srgb, var(--ball-color, var(--teal)) 78%, #fff);
  border-radius: 50%;
  background: #fff;
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.9),
    inset -2px -3px 5px rgba(29, 35, 41, 0.1),
    inset 2px 2px 4px rgba(255, 255, 255, 0.9);
}

.called-ball-face small,
.called-ball-face strong {
  position: relative;
  z-index: 1;
  display: block;
  line-height: 0.9;
}

.called-ball-face small {
  margin-top: 3px;
  font-size: 0.42rem;
  font-weight: 1000;
}

.called-ball-face strong {
  margin-top: -5px;
  color: #171b20;
  font-size: 0.88rem;
  font-weight: 1000;
  letter-spacing: 0;
}

.called-ball.current {
  border-color: rgba(255, 255, 255, 0.98);
  box-shadow:
    0 0 0 3px rgba(29, 35, 41, 0.9),
    0 0 0 6px rgba(255, 255, 255, 0.92),
    inset -8px -10px 14px rgba(0, 0, 0, 0.2),
    inset 5px 6px 10px rgba(255, 255, 255, 0.22),
    0 8px 18px rgba(29, 35, 41, 0.24);
}

.called-ball-empty {
  width: auto;
  aspect-ratio: auto;
  color: var(--muted);
}

.called-ball.roll-in {
  animation: called-ball-roll-in 560ms cubic-bezier(0.22, 0.9, 0.24, 1) both;
}

.called-ball.push-slide {
  animation: called-ball-push-slide 560ms cubic-bezier(0.22, 0.9, 0.24, 1) both;
}

@keyframes called-ball-roll-in {
  from {
    opacity: 0;
    transform: translateX(-34px) rotate(-300deg) scale(0.82);
  }

  72% {
    opacity: 1;
    transform: translateX(2px) rotate(14deg) scale(1.04);
  }

  to {
    opacity: 1;
    transform: translateX(0) rotate(0deg) scale(1);
  }
}

@keyframes called-ball-push-slide {
  from {
    transform: translateX(-32px);
  }

  to {
    transform: translateX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .called-ball.roll-in,
  .called-ball.push-slide {
    animation: none;
  }
}

.game-cards-grid {
  position: relative;
  grid-column: 1 / -1;
  grid-row: 3;
  display: grid;
  min-height: clamp(460px, 58vh, 650px);
  overflow: visible;
  border: 1px solid rgba(216, 222, 223, 0.95);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(238, 245, 247, 0.72)),
    repeating-linear-gradient(45deg, rgba(24, 126, 127, 0.05) 0 12px, transparent 12px 24px);
}

.game-cards-grid.table-theme-fiesta {
  isolation: isolate;
  --theme-scene-height: 650px;
  border-color: rgba(217, 164, 35, 0.62);
  background:
    radial-gradient(circle at 14% 16%, rgba(255, 212, 0, 0.14) 0 7%, transparent 21%),
    radial-gradient(circle at 84% 18%, rgba(255, 52, 70, 0.09) 0 6%, transparent 19%),
    radial-gradient(circle at 76% 76%, rgba(22, 119, 255, 0.07) 0 8%, transparent 22%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.18)),
    url("assets/fiesta-table-1-scene.svg") center top / 100% var(--theme-scene-height) repeat-y,
    linear-gradient(180deg, #ffe1a2, #d7ead0);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.52),
    0 14px 32px rgba(151, 103, 44, 0.1);
}

.game-cards-grid.table-theme-fiesta::before,
.game-cards-grid.table-theme-fiesta::after {
  content: "";
  position: absolute;
  pointer-events: none;
  inset: 0;
  z-index: 0;
}

.game-cards-grid.table-theme-fiesta::before {
  background-image: url("assets/fiesta-table-1-pattern.svg");
  background-size: 360px 240px;
  opacity: 0.5;
}

.game-cards-grid.table-theme-fiesta::after {
  background:
    radial-gradient(circle at 22% 24%, rgba(255, 255, 255, 0.08), transparent 13%),
    radial-gradient(circle at 76% 34%, rgba(255, 245, 208, 0.08), transparent 16%),
    linear-gradient(180deg, rgba(255, 249, 233, 0.04), rgba(255, 255, 255, 0.14));
}

.game-cards-grid.table-theme-beach {
  isolation: isolate;
  --theme-scene-height: 650px;
  border-color: rgba(0, 167, 255, 0.56);
  background:
    radial-gradient(circle at 16% 14%, rgba(255, 212, 0, 0.12) 0 7%, transparent 21%),
    radial-gradient(circle at 84% 18%, rgba(255, 79, 137, 0.08) 0 6%, transparent 19%),
    radial-gradient(circle at 72% 78%, rgba(0, 209, 178, 0.08) 0 8%, transparent 22%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.16)),
    url("assets/beach-table-2-scene.svg") center top / 100% var(--theme-scene-height) repeat-y,
    linear-gradient(180deg, #65dfff, #ffe46c);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.5),
    0 14px 32px rgba(0, 121, 200, 0.1);
}

.game-cards-grid.table-theme-beach::before,
.game-cards-grid.table-theme-beach::after {
  content: "";
  position: absolute;
  pointer-events: none;
  inset: 0;
  z-index: 0;
}

.game-cards-grid.table-theme-beach::before {
  background-image: url("assets/beach-table-2-pattern.svg");
  background-size: 360px 240px;
  opacity: 0.5;
}

.game-cards-grid.table-theme-beach::after {
  background:
    radial-gradient(circle at 22% 24%, rgba(255, 255, 255, 0.08), transparent 13%),
    radial-gradient(circle at 76% 34%, rgba(255, 255, 255, 0.08), transparent 16%),
    linear-gradient(180deg, rgba(246, 253, 255, 0.04), rgba(255, 255, 255, 0.14));
}

.game-cards-grid.table-theme-halloween {
  isolation: isolate;
  --theme-scene-height: 650px;
  border-color: rgba(122, 44, 255, 0.54);
  background:
    radial-gradient(circle at 16% 14%, rgba(255, 179, 26, 0.13) 0 7%, transparent 21%),
    radial-gradient(circle at 84% 18%, rgba(255, 79, 184, 0.08) 0 6%, transparent 19%),
    radial-gradient(circle at 72% 78%, rgba(0, 224, 196, 0.07) 0 8%, transparent 22%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.17)),
    url("assets/halloween-table-3-scene.svg") center top / 100% var(--theme-scene-height) repeat-y,
    linear-gradient(180deg, #3a1d8f, #ff8a18);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.5),
    0 14px 32px rgba(74, 28, 132, 0.1);
}

.game-cards-grid.table-theme-halloween::before,
.game-cards-grid.table-theme-halloween::after {
  content: "";
  position: absolute;
  pointer-events: none;
  inset: 0;
  z-index: 0;
}

.game-cards-grid.table-theme-halloween::before {
  background-image: url("assets/halloween-table-3-pattern.svg");
  background-size: 360px 240px;
  opacity: 0.5;
}

.game-cards-grid.table-theme-halloween::after {
  background:
    radial-gradient(circle at 22% 24%, rgba(255, 255, 255, 0.08), transparent 13%),
    radial-gradient(circle at 76% 34%, rgba(255, 245, 208, 0.06), transparent 16%),
    linear-gradient(180deg, rgba(254, 249, 255, 0.04), rgba(255, 255, 255, 0.15));
}

.game-cards-grid.has-cards {
  display: block;
}

.game-card-frame {
  display: grid;
  gap: 8px;
  position: absolute;
  top: 0;
  left: 0;
  width: min(240px, calc(100% - 32px));
  min-width: 0;
  cursor: grab;
  touch-action: none;
  user-select: none;
  transition: filter 140ms ease, box-shadow 140ms ease;
}

.game-card-frame .bingo-card {
  width: 100%;
  pointer-events: auto;
}

.game-card-frame.dragging {
  cursor: grabbing;
  filter: drop-shadow(0 20px 28px rgba(29, 35, 41, 0.28));
}

.other-player-cards-zone {
  position: absolute;
  z-index: 4;
  top: 0;
  left: 0;
  display: grid;
  gap: 8px;
  pointer-events: none;
}

.other-player-cards-title {
  width: max-content;
  max-width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
  padding: 4px 10px;
  font-size: 0.68rem;
  font-weight: 1000;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
}

.other-player-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 128px));
  gap: 12px;
}

.other-player-card-frame {
  display: grid;
  gap: 6px;
  min-width: 0;
  opacity: 0.94;
}

.other-player-card-frame .bingo-card {
  width: 100%;
  border-width: 4px;
  border-radius: 6px;
  box-shadow:
    0 0 0 1px rgba(29, 35, 41, 0.1),
    0 8px 18px rgba(29, 35, 41, 0.12);
}

.other-player-card-frame .nft-image {
  width: 66%;
  height: 38%;
  margin-top: calc(clamp(4px, 3cqw, 8px) + 8px);
  filter: drop-shadow(0 8px 12px rgba(29, 35, 41, 0.22));
}

.other-player-card-frame .card-meta {
  min-height: 24px;
}

.other-player-card-frame .asset-name {
  font-size: clamp(0.48rem, 7.2cqw, 0.62rem);
  line-height: 1.05;
}

.other-player-card-frame .grid-panel {
  padding: clamp(3px, 2.5cqw, 5px);
  padding-top: 0;
}

.other-player-card-frame .bingo-grid {
  --bingo-header-row-height: clamp(7px, 5.2cqw, 10px);
  --bingo-panel-bottom-padding: clamp(3px, 2.6cqw, 5px);
  --bingo-number-row-height: calc((70cqw - var(--bingo-header-row-height) - var(--bingo-panel-bottom-padding) - 10px) / 5);
  gap: 2px;
}

.other-player-card-frame .grid-cell {
  border-radius: 2px;
  font-size: clamp(0.42rem, 5.8cqw, 0.58rem);
}

.other-player-card-frame .grid-cell.header {
  font-size: clamp(0.42rem, 5.2cqw, 0.54rem);
}

.other-player-card-frame .grid-cell.free {
  font-size: clamp(0.36rem, 4.5cqw, 0.48rem);
}

.table-chat-panel {
  position: absolute;
  z-index: 1000;
  top: 16px;
  right: 16px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  width: min(320px, calc(100% - 32px));
  height: clamp(360px, 58vh, 520px);
  max-height: calc(100% - 32px);
  min-height: 280px;
  overflow: hidden;
  border: 1px solid rgba(216, 222, 223, 0.9);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow:
    0 18px 34px rgba(29, 35, 41, 0.14),
    inset 0 0 0 1px rgba(255, 255, 255, 0.52);
  backdrop-filter: blur(6px);
}

.table-chat-header {
  display: grid;
  gap: 8px;
  min-height: 68px;
  border-bottom: 1px solid rgba(216, 222, 223, 0.88);
  padding: 10px 12px;
}

.table-chat-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
}

.table-chat-title {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.table-chat-title strong {
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 900;
  line-height: 1.1;
}

.table-chat-title small {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  white-space: nowrap;
}

.table-chat-menu {
  display: grid;
  width: 32px;
  aspect-ratio: 1;
  place-items: center;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 1px;
}

.table-chat-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  border: 1px solid rgba(216, 222, 223, 0.92);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  padding: 3px;
}

.table-chat-tab {
  appearance: none;
  display: inline-flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 6px 8px;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 900;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.table-chat-tab.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 4px 10px rgba(29, 35, 41, 0.08);
}

.table-chat-tab:hover,
.table-chat-tab:focus-visible {
  color: var(--ink);
  outline: 0;
}

.friend-online-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  background: rgba(24, 126, 127, 0.1);
  color: var(--teal);
  padding: 1px 5px;
  font-size: 0.65rem;
  font-weight: 1000;
}

.friend-presence-dot {
  display: inline-block;
  width: 8px;
  min-width: 8px;
  aspect-ratio: 1;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #9ca3af;
  box-shadow: 0 0 0 1px rgba(29, 35, 41, 0.14);
}

.friend-presence-dot.online {
  background: #18b26b;
  box-shadow:
    0 0 0 1px rgba(24, 178, 107, 0.28),
    0 0 10px rgba(24, 178, 107, 0.45);
}

.table-chat-messages {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 0;
  overflow-y: auto;
  padding: 10px 12px;
}

.friends-chat-messages {
  padding: 8px 10px;
}

.friends-chat-content {
  display: grid;
  gap: 10px;
}

.friend-add-form {
  position: sticky;
  top: -8px;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  border-bottom: 1px solid rgba(216, 222, 223, 0.76);
  background: rgba(255, 255, 255, 0.88);
  padding: 2px 0 10px;
  backdrop-filter: blur(4px);
}

.friend-add-input {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(216, 222, 223, 0.92);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  padding: 8px 10px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 500;
}

.friend-add-input:focus {
  border-color: var(--teal);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(24, 126, 127, 0.12);
}

.friend-add-button {
  appearance: none;
  display: grid;
  width: 34px;
  aspect-ratio: 1;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font: inherit;
  font-size: 1.1rem;
  font-weight: 1000;
  cursor: pointer;
}

.friend-add-button:disabled {
  background: rgba(107, 119, 128, 0.24);
  color: rgba(107, 119, 128, 0.72);
  cursor: not-allowed;
}

.friends-list {
  display: grid;
  gap: 4px;
}

.friend-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  border-radius: 8px;
  padding: 6px;
}

.friend-row.online {
  background: rgba(24, 126, 127, 0.06);
}

.friend-identity {
  position: relative;
  display: inline-grid;
}

.friend-identity .friend-presence-dot {
  position: absolute;
  right: -1px;
  bottom: -1px;
  z-index: 2;
}

.friend-avatar {
  width: 30px;
}

.friend-copy {
  display: grid;
  min-width: 0;
}

.friend-copy strong {
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.1;
}

.friend-copy small,
.friends-empty {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
}

.friend-remove-button {
  appearance: none;
  display: grid;
  width: 24px;
  aspect-ratio: 1;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 1000;
  cursor: pointer;
}

.friend-remove-button:hover,
.friend-remove-button:focus-visible {
  background: rgba(15, 15, 15, 0.06);
  color: var(--ink);
  outline: 0;
}

.friend-remove-button:disabled {
  opacity: 0.36;
  cursor: not-allowed;
}

.friends-chat-thread {
  display: grid;
  gap: 0;
  border-top: 1px solid rgba(216, 222, 223, 0.76);
  padding-top: 8px;
}

.table-chat-empty {
  display: grid;
  min-height: 100%;
  place-items: center;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-align: center;
}

.table-chat-message {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border-radius: 4px;
  padding: 4px 2px;
}

.table-chat-message:hover {
  background: rgba(15, 15, 15, 0.035);
}

.table-chat-avatar {
  width: 28px;
  font-size: 0.76rem;
}

.table-chat-avatar.composer {
  width: 30px;
  align-self: end;
  margin-bottom: 4px;
}

.table-chat-line {
  margin: 0;
  min-width: 0;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1.34;
  overflow-wrap: anywhere;
}

.table-chat-author {
  color: #606970;
  font-size: 0.8rem;
  font-weight: 600;
  margin-right: 6px;
}

.table-chat-text {
  color: var(--ink);
  font-weight: 400;
}

.table-chat-reaction-layer {
  position: absolute;
  right: 8px;
  bottom: 76px;
  width: 92px;
  height: calc(100% - 124px);
  overflow: hidden;
  pointer-events: none;
}

.table-chat-floating-reaction {
  position: absolute;
  right: calc(6px + var(--reaction-lane, 0) * 18px);
  bottom: 0;
  display: grid;
  width: 30px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 6px 16px rgba(29, 35, 41, 0.14);
  font-size: 1.08rem;
  animation: table-chat-reaction-float 2200ms ease-out forwards;
}

@keyframes table-chat-reaction-float {
  0% {
    opacity: 0;
    transform: translateY(22px) scale(0.72);
  }

  12% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateY(-230px) scale(1.18);
  }
}

.table-chat-reaction-bar {
  display: flex;
  gap: 2px;
  align-items: center;
  overflow-x: auto;
  border-top: 1px solid rgba(216, 222, 223, 0.88);
  padding: 7px 10px 0;
}

.table-chat-reaction-button {
  appearance: none;
  display: grid;
  width: 32px;
  min-width: 32px;
  aspect-ratio: 1;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  font-size: 1rem;
  cursor: pointer;
  transition: background 120ms ease, transform 120ms ease;
}

.table-chat-reaction-button:hover,
.table-chat-reaction-button:focus-visible {
  background: rgba(15, 15, 15, 0.06);
  outline: 0;
  transform: translateY(-1px);
}

.table-chat-form {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: end;
  padding: 8px 12px 12px;
}

.table-chat-input {
  width: 100%;
  height: 34px;
  min-width: 0;
  border: 0;
  border-bottom: 1px solid rgba(107, 119, 128, 0.55);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  padding: 0 0 5px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 400;
}

.table-chat-input:focus {
  border-bottom-color: var(--teal);
  outline: 0;
}

.table-chat-emoji-toggle,
.table-chat-send {
  appearance: none;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.table-chat-emoji-toggle {
  background: rgba(15, 15, 15, 0.04);
  color: var(--ink);
  font-size: 1.05rem;
}

.table-chat-emoji-toggle:hover,
.table-chat-emoji-toggle:focus-visible,
.table-chat-emoji-toggle[aria-expanded="true"] {
  background: rgba(15, 15, 15, 0.08);
  outline: 0;
}

.table-chat-emoji-picker {
  position: absolute;
  right: 48px;
  bottom: 54px;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(6, 32px);
  gap: 4px;
  border: 1px solid rgba(216, 222, 223, 0.95);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 28px rgba(29, 35, 41, 0.18);
  padding: 8px;
}

.table-chat-emoji-picker[hidden] {
  display: none;
}

.table-chat-emoji-choice {
  appearance: none;
  display: grid;
  width: 32px;
  aspect-ratio: 1;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  font-size: 1.05rem;
  cursor: pointer;
}

.table-chat-emoji-choice:hover,
.table-chat-emoji-choice:focus-visible {
  background: rgba(15, 15, 15, 0.07);
  outline: 0;
}

.table-chat-send {
  background: var(--teal);
  color: #fff;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
  transform: rotate(-12deg);
}

.table-chat-send:disabled {
  background: rgba(107, 119, 128, 0.24);
  color: rgba(107, 119, 128, 0.72);
  cursor: not-allowed;
  transform: rotate(-12deg);
}

.table-chat-send:hover,
.table-chat-send:focus-visible {
  background: #126d6e;
  outline: 0;
}

.game-stage.table-theme-fiesta .table-chat-panel {
  border-color: rgba(217, 164, 35, 0.44);
  background: rgba(255, 252, 244, 0.82);
}

.game-stage.table-theme-beach .table-chat-panel {
  border-color: rgba(0, 167, 255, 0.42);
  background: rgba(246, 253, 255, 0.82);
}

.game-stage.table-theme-halloween .table-chat-panel {
  border-color: rgba(122, 44, 255, 0.44);
  background: rgba(254, 249, 255, 0.82);
}

.game-cards-grid .game-empty {
  position: relative;
  z-index: 1;
  min-height: 0;
  width: 100%;
  height: 100%;
  padding-right: min(356px, 40%);
}

.game-cards-grid.table-theme-fiesta .game-empty {
  border-color: rgba(217, 164, 35, 0.38);
  background: rgba(255, 252, 244, 0.42);
  backdrop-filter: blur(1px);
}

.game-cards-grid.table-theme-beach .game-empty {
  border-color: rgba(0, 167, 255, 0.38);
  background: rgba(246, 253, 255, 0.42);
  backdrop-filter: blur(1px);
}

.game-cards-grid.table-theme-halloween .game-empty {
  border-color: rgba(122, 44, 255, 0.38);
  background: rgba(254, 249, 255, 0.42);
  backdrop-filter: blur(1px);
}

.game-card-footer {
  appearance: none;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--muted);
  padding: 8px 10px;
  font: inherit;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.game-card-footer:not(:disabled):hover,
.game-card-footer:not(:disabled):focus-visible {
  border-color: rgba(24, 126, 127, 0.42);
  background: #187e7f;
  color: #fff;
  outline: 0;
  transform: translateY(-1px);
}

.game-card-footer:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.game-card .grid-cell.marked {
  border-color: rgba(24, 126, 127, 0.34);
  background: #fff;
  color: var(--ink);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.42),
    0 1px 3px rgba(29, 35, 41, 0.08);
}

.game-card .grid-cell.free.marked {
  background: var(--mint);
  color: var(--teal);
}

.game-card .grid-cell.daubable {
  cursor: pointer;
}

.win-ledger {
  display: none;
  gap: 12px;
}

.ledger-section,
.ledger-empty {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
}

.ledger-section {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.ledger-section h3 {
  margin: 0;
  font-size: 0.92rem;
}

.win-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(110px, 0.8fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 7px;
  background: #fbfcfb;
}

.win-row strong,
.win-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.win-row span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.win-row b {
  color: var(--teal);
  font-size: 0.86rem;
}

.win-row.jackpot {
  background: linear-gradient(135deg, rgba(255, 228, 92, 0.22), rgba(86, 231, 255, 0.18));
  box-shadow: inset 0 0 0 1px rgba(217, 164, 35, 0.28);
}

.ledger-empty {
  display: grid;
  min-height: 80px;
  place-items: center;
  color: var(--muted);
  font-weight: 800;
}

.filters-panel,
.market-main {
  min-width: 0;
}

.filters-panel {
  position: sticky;
  top: 86px;
  align-self: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 28px rgba(36, 50, 58, 0.06);
}

.panel-block {
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.panel-block:last-child {
  border-bottom: 0;
}

.section-label,
.field-label,
.sort-control span,
.eyebrow {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.field-label {
  margin-bottom: 7px;
}

.collection-card {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 11px;
  align-items: center;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.collection-card.selected {
  border-color: rgba(24, 126, 127, 0.45);
  box-shadow: inset 4px 0 0 var(--teal);
}

.collection-code {
  display: grid;
  place-items: center;
  height: 38px;
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--teal);
  font-weight: 900;
}

.collection-card strong,
.collection-card small {
  display: block;
}

.collection-card small {
  color: var(--muted);
  margin-top: 2px;
}

.text-input,
.select-input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  padding: 0 11px;
}

.text-input:focus,
.select-input:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(24, 126, 127, 0.22);
  outline-offset: 2px;
}

.seed-rule {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
}

.seed-rule div,
.asset-details div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(216, 222, 223, 0.75);
}

.seed-rule div:last-child,
.asset-details div:last-child {
  border-bottom: 0;
}

dt {
  color: var(--muted);
  font-size: 0.84rem;
}

dd {
  margin: 0;
  font-weight: 800;
}

.market-main {
  display: grid;
  gap: 18px;
}

.market-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.market-toolbar h2 {
  font-size: clamp(1.7rem, 3vw, 2.45rem);
}

.toolbar-controls {
  display: flex;
  align-items: end;
  gap: 12px;
}

.sort-control {
  display: grid;
  gap: 6px;
  min-width: 210px;
}

.segmented-control {
  display: flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.segmented-control button {
  min-width: 76px;
  background: transparent;
  color: var(--muted);
  padding: 0 10px;
}

.segmented-control button.active {
  background: var(--ink);
  color: #fff;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 12px;
}

.stats-strip article {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
}

.stats-strip span {
  display: block;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 900;
}

.stats-strip small {
  color: var(--muted);
  font-weight: 700;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(236px, 1fr));
  gap: 18px;
}

.cards-grid.compact {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.collection-card-shell {
  position: relative;
}

.market-card-button {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.bingo-card {
  position: relative;
  isolation: isolate;
  container-type: inline-size;
  display: grid;
  grid-template-rows: 1fr 2fr;
  width: 100%;
  aspect-ratio: 5 / 7;
  overflow: hidden;
  border: 6px solid var(--rarity-border, rgba(255, 255, 255, 0.95));
  border-radius: 8px;
  background: #fff;
  box-shadow:
    0 0 0 1px rgba(29, 35, 41, 0.12),
    0 0 20px var(--rarity-glow, rgba(255, 255, 255, 0.28)),
    0 12px 28px rgba(29, 35, 41, 0.12);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.bingo-card::before {
  content: "";
  position: absolute;
  z-index: 6;
  inset: -35%;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 28%, rgba(255, 255, 255, 0.08) 40%, rgba(255, 255, 255, 0.42) 48%, rgba(255, 255, 255, 0.1) 56%, transparent 70%);
  opacity: 0.42;
  transform: translateX(-58%) rotate(8deg);
  transition: opacity 220ms ease, transform 700ms ease;
}

.rarity-common {
  --rarity-border: rgba(255, 255, 255, 0.96);
  --rarity-glow: rgba(255, 255, 255, 0.42);
}

.rarity-rare {
  --rarity-border: #42a5ff;
  --rarity-glow: rgba(66, 165, 255, 0.5);
}

.rarity-epic {
  --rarity-border: #9b5cff;
  --rarity-glow: rgba(155, 92, 255, 0.52);
}

.rarity-legendary {
  --rarity-border: #d9a423;
  --rarity-glow: rgba(217, 164, 35, 0.58);
}

.rarity-mythic {
  --rarity-border: transparent;
  --rarity-glow: rgba(99, 228, 255, 0.55);
}

.rarity-mythic::after {
  content: "";
  position: absolute;
  z-index: 7;
  inset: 0;
  border-radius: 8px;
  padding: 6px;
  pointer-events: none;
  background:
    radial-gradient(circle at 16% 18%, rgba(255, 255, 255, 0.95) 0 1px, transparent 2px),
    radial-gradient(circle at 78% 22%, rgba(86, 231, 255, 0.9) 0 1px, transparent 2px),
    radial-gradient(circle at 88% 68%, rgba(255, 79, 216, 0.85) 0 1px, transparent 2px),
    radial-gradient(circle at 22% 82%, rgba(255, 228, 92, 0.9) 0 1px, transparent 2px);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.58;
  animation: mythic-sparkle 2.8s ease-in-out infinite alternate;
}

.market-card-button:hover .bingo-card,
.market-card-button:focus-visible .bingo-card {
  transform: translateY(-4px);
  box-shadow:
    0 0 0 1px rgba(29, 35, 41, 0.14),
    0 0 28px var(--rarity-glow, rgba(255, 255, 255, 0.35)),
    0 20px 42px rgba(29, 35, 41, 0.18);
}

.market-card-button:hover .bingo-card::before,
.market-card-button:focus-visible .bingo-card::before {
  opacity: 0.72;
  transform: translateX(58%) rotate(8deg);
}

.art-panel {
  position: relative;
  display: grid;
  grid-row: 1;
  min-height: 0;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(135deg, var(--art-primary, rgba(24, 126, 127, 0.16)), var(--art-secondary, rgba(214, 154, 25, 0.18))),
    #e9f3f2;
}

.art-panel::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 38%;
  background: linear-gradient(180deg, transparent, rgba(29, 35, 41, 0.16));
  pointer-events: none;
}

.nft-image {
  position: relative;
  z-index: 1;
  display: block;
  width: 82%;
  height: 92%;
  object-fit: contain;
  filter: drop-shadow(0 14px 20px rgba(29, 35, 41, 0.24));
}

.nft-image.is-hidden {
  display: none;
}

.fallback-art {
  position: absolute;
  inset: 12px;
  display: none;
  place-items: center;
  border: 1px dashed rgba(29, 35, 41, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.44), rgba(255, 255, 255, 0.18)),
    repeating-linear-gradient(45deg, var(--art-primary, rgba(24, 126, 127, 0.12)) 0 9px, var(--art-secondary, rgba(227, 93, 79, 0.12)) 9px 18px);
}

.fallback-art.is-visible {
  display: grid;
}

.fallback-symbol {
  display: grid;
  place-items: center;
  width: 68px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fff;
  color: var(--teal);
  font-weight: 1000;
  box-shadow: inset 0 0 0 2px rgba(24, 126, 127, 0.18);
}

.grid-panel {
  position: relative;
  z-index: 2;
  display: grid;
  grid-row: 2;
  grid-template-rows: 1fr;
  min-height: 0;
  align-self: end;
  padding: clamp(5px, 2.6cqw, 9px);
  padding-top: 0;
  background:
    linear-gradient(180deg, #fff, #f9fbfa);
}

.full-art-card {
  background: #eef5f7;
}

.rarity-mythic.full-art-card {
  background:
    linear-gradient(#eef5f7, #eef5f7) padding-box,
    conic-gradient(from 0deg, #ff4fd8, #56e7ff, #65ff8a, #ffe45c, #ff7a4d, #b46cff, #ff4fd8) border-box;
}

.full-art-card .art-panel {
  position: absolute;
  z-index: 0;
  inset: 0;
}

.full-art-card .art-panel::after {
  inset: 0;
  height: auto;
  background:
    linear-gradient(180deg, rgba(29, 35, 41, 0.02), rgba(29, 35, 41, 0.14)),
    linear-gradient(0deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0));
}

.full-art-card .nft-image {
  width: 70%;
  height: 41%;
  align-self: start;
  margin-top: calc(clamp(6px, 3.2cqw, 12px) + 10px);
  object-fit: contain;
  object-position: center center;
  filter: drop-shadow(0 14px 22px rgba(29, 35, 41, 0.26));
}

.full-art-card .grid-panel {
  background: transparent;
}

.full-art-card .card-meta {
  position: absolute;
  z-index: 4;
  top: calc(clamp(7px, 3.5cqw, 12px) - 10px);
  left: clamp(7px, 3.5cqw, 12px);
  right: calc(clamp(7px, 3.5cqw, 12px) + 48px);
  border-radius: 7px;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.card-owner-badge {
  position: absolute;
  z-index: 7;
  top: calc(clamp(7px, 3.5cqw, 12px) - 7px);
  right: clamp(7px, 3.5cqw, 12px);
  display: grid;
  justify-items: center;
  gap: 2px;
  width: 44px;
  pointer-events: none;
}

.card-owner-badge .player-avatar {
  width: 30px;
  border: 2px solid rgba(255, 255, 255, 0.88);
  font-size: 0.68rem;
  box-shadow: 0 4px 10px rgba(29, 35, 41, 0.22);
}

.card-owner-name {
  display: block;
  width: 100%;
  overflow: hidden;
  color: #fff;
  font-size: 0.52rem;
  font-weight: 1000;
  line-height: 1.05;
  text-align: center;
  text-overflow: ellipsis;
  text-shadow:
    0 1px 2px rgba(29, 35, 41, 0.92),
    0 0 8px rgba(29, 35, 41, 0.68);
  white-space: nowrap;
}

.full-art-card .asset-name,
.full-art-card .asset-seed {
  color: #fff;
  text-shadow:
    0 1px 2px rgba(29, 35, 41, 0.88),
    0 0 10px rgba(29, 35, 41, 0.56);
}

.card-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 34px;
}

@keyframes mythic-sparkle {
  from {
    opacity: 0.34;
  }

  to {
    opacity: 0.72;
  }
}

.asset-name,
.asset-seed {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-name {
  font-size: 0.9rem;
  line-height: 1.1;
}

.asset-seed {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.bingo-card .asset-seed {
  display: none;
}

.price-pill {
  border-radius: 999px;
  background: #f4ecda;
  color: #7a520c;
  padding: 5px 7px;
  font-size: 0.74rem;
  font-weight: 900;
  white-space: nowrap;
}

.bingo-grid {
  --bingo-header-row-height: clamp(11px, 5.2cqw, 18px);
  --bingo-panel-bottom-padding: clamp(5px, 2.6cqw, 9px);
  --bingo-number-row-height: calc((70cqw - var(--bingo-header-row-height) - var(--bingo-panel-bottom-padding) - 15px) / 5);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: var(--bingo-header-row-height) repeat(5, var(--bingo-number-row-height));
  align-self: end;
  gap: 3px;
  min-height: 0;
}

.grid-cell {
  position: relative;
  isolation: isolate;
  display: grid;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgba(29, 35, 41, 0.11);
  border-radius: 4px;
  background: #fff;
  font-size: clamp(0.66rem, 0.95vw, 0.9rem);
  font-weight: 900;
  line-height: 1;
}

.grid-cell-value {
  position: relative;
  z-index: 2;
  pointer-events: none;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.78),
    0 0 5px rgba(255, 255, 255, 0.82);
}

.daub-stamp {
  position: absolute;
  inset: -6%;
  z-index: 3;
  width: 112%;
  height: 112%;
  opacity: 0.88;
  object-fit: contain;
  pointer-events: none;
  transform: rotate(var(--stamp-rotation, -4deg)) scale(1.08);
  filter:
    saturate(1.18)
    drop-shadow(0 0 0 #000)
    drop-shadow(1px 0 0 #000)
    drop-shadow(-1px 0 0 #000)
    drop-shadow(0 1px 0 #000)
    drop-shadow(0 -1px 0 #000)
    drop-shadow(0 2px 3px rgba(29, 35, 41, 0.38));
}

.grid-cell.header {
  border: 0;
  background: var(--ink);
  color: #fff;
  font-size: 0.72rem;
}

.grid-cell.free {
  background: var(--mint);
  color: var(--teal);
  font-size: 0.66rem;
}

.detail-drawer {
  position: fixed;
  z-index: 40;
  top: 0;
  right: 0;
  display: grid;
  grid-template-rows: auto auto auto auto;
  gap: 16px;
  align-content: start;
  width: min(420px, calc(100vw - 28px));
  height: 100vh;
  overflow-y: auto;
  padding: 18px;
  background: #fff;
  box-shadow: var(--shadow);
  transform: translateX(108%);
  transition: transform 220ms ease;
}

.detail-drawer.is-open {
  transform: translateX(0);
}

.drawer-backdrop {
  position: fixed;
  z-index: 35;
  inset: 0;
  background: rgba(29, 35, 41, 0.38);
}

.auth-backdrop {
  position: fixed;
  z-index: 45;
  inset: 0;
  background: rgba(29, 35, 41, 0.42);
}

.auth-dialog {
  position: fixed;
  z-index: 50;
  top: 50%;
  left: 50%;
  display: grid;
  gap: 16px;
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  transform: translate(-50%, -50%);
}

.auth-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.auth-header h2 {
  margin: 4px 0 0;
  line-height: 1.1;
}

.auth-form,
.auth-profile {
  display: grid;
  gap: 10px;
}

.auth-wallet-block {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(216, 222, 223, 0.88);
  border-radius: var(--radius);
  background: #fbfcfb;
  padding: 12px;
}

.auth-wallet-block small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.35;
}

.auth-divider {
  display: grid;
  place-items: center;
  margin: -2px 0;
}

.auth-divider span {
  border-radius: 999px;
  background: rgba(24, 126, 127, 0.08);
  color: var(--teal);
  padding: 5px 9px;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.auth-form .primary-action,
.auth-profile .secondary-action {
  height: 40px;
}

.auth-details {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 12px;
  background: #fbfcfb;
}

.auth-details div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(216, 222, 223, 0.75);
}

.auth-details div:last-child {
  border-bottom: 0;
}

.auth-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.45;
}

.auth-note.error {
  color: var(--coral);
}

.credits-backdrop {
  position: fixed;
  z-index: 45;
  inset: 0;
  background: rgba(29, 35, 41, 0.24);
}

.credits-dialog {
  position: fixed;
  z-index: 50;
  top: 72px;
  right: clamp(16px, 3vw, 36px);
  display: grid;
  gap: 16px;
  width: min(380px, calc(100vw - 32px));
  max-height: calc(100vh - 92px);
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow);
  padding: 16px;
}

.credits-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.credits-header h2 {
  margin: 4px 0 0;
  line-height: 1.1;
}

.credits-balance-card {
  display: grid;
  gap: 3px;
  border: 1px solid rgba(24, 126, 127, 0.24);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 86% 12%, rgba(255, 209, 102, 0.24), transparent 28%),
    linear-gradient(135deg, rgba(217, 244, 229, 0.86), rgba(238, 245, 247, 0.9));
  padding: 14px;
}

.credits-balance-card span,
.credits-balance-card small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.credits-balance-card strong {
  color: var(--ink);
  font-size: 2rem;
  line-height: 1;
}

.demo-credits-button {
  width: 100%;
}

.credits-details {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfb;
  padding: 4px 12px;
}

.credits-details div {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(216, 222, 223, 0.75);
}

.credits-details div:last-child {
  border-bottom: 0;
}

.credits-details dt,
.credits-details dd {
  margin: 0;
  font-size: 0.84rem;
}

.credits-details dt {
  color: var(--muted);
  font-weight: 900;
}

.credits-details dd {
  color: var(--ink);
  font-weight: 800;
  line-height: 1.35;
}

.settings-backdrop {
  position: fixed;
  z-index: 45;
  inset: 0;
  background: rgba(29, 35, 41, 0.18);
}

.settings-menu {
  position: fixed;
  z-index: 50;
  top: 72px;
  right: clamp(16px, 3vw, 36px);
  display: grid;
  gap: 16px;
  width: min(380px, calc(100vw - 32px));
  max-height: calc(100vh - 92px);
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  padding: 16px;
}

.settings-header,
.settings-player-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.settings-header h2 {
  margin: 4px 0 0;
  line-height: 1.1;
}

.settings-player-row {
  align-items: center;
  justify-content: start;
  border: 1px solid rgba(216, 222, 223, 0.88);
  border-radius: var(--radius);
  background: #fbfcfb;
  padding: 12px;
}

.settings-player-avatar {
  width: 48px;
  font-size: 1.16rem;
}

.settings-player-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.settings-player-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-player-copy small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.35;
}

.settings-name-section,
.settings-avatar-section,
.settings-daub-section {
  display: grid;
  gap: 10px;
}

.settings-name-form {
  display: grid;
  gap: 8px;
}

.settings-name-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.settings-audio-section {
  display: grid;
  gap: 10px;
}

.settings-audio-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.settings-preview-button {
  width: 100%;
  min-height: 42px;
}

.settings-avatar-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.settings-daub-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.settings-avatar-option,
.settings-daub-option {
  appearance: none;
  display: grid;
  gap: 7px;
  place-items: center;
  min-height: 78px;
  border: 1px solid rgba(216, 222, 223, 0.95);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 8px 6px;
  font-size: 0.72rem;
  font-weight: 900;
  cursor: pointer;
}

.settings-avatar-option.selected,
.settings-daub-option.selected {
  border-color: rgba(24, 126, 127, 0.74);
  background: rgba(217, 244, 229, 0.55);
  box-shadow: inset 0 0 0 1px rgba(24, 126, 127, 0.28);
}

.settings-avatar-option:hover,
.settings-avatar-option:focus-visible,
.settings-daub-option:hover,
.settings-daub-option:focus-visible {
  border-color: rgba(24, 126, 127, 0.5);
  outline: 0;
}

.settings-avatar-preview {
  width: 36px;
  font-size: 0.98rem;
}

.settings-daub-preview {
  display: grid;
  width: 42px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(216, 222, 223, 0.95);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(244, 247, 246, 0.92)),
    repeating-linear-gradient(45deg, rgba(29, 35, 41, 0.05) 0 5px, transparent 5px 10px);
}

.settings-daub-preview .daub-stamp {
  position: relative;
  inset: auto;
  width: 34px;
  height: 34px;
  opacity: 0.92;
  transform: rotate(-6deg);
}

.drawer-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.icon-button {
  width: 38px;
  flex: 0 0 auto;
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

.drawer-card-slot {
  display: grid;
  width: min(240px, 100%);
  place-items: center;
  justify-self: center;
}

.drawer-card-slot .bingo-card {
  width: 100%;
  height: auto;
}

.asset-details {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 12px;
  background: #fbfcfb;
}

.drawer-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.drawer-actions > * {
  height: 38px;
  min-height: 38px;
}

.secondary-action {
  display: grid;
  place-items: center;
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
  padding: 0 14px;
  text-decoration: none;
}

.empty-state {
  display: grid;
  min-height: 260px;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  font-weight: 800;
}

@media (max-width: 980px) {
  .app-header {
    grid-template-columns: 1fr auto;
  }

  .header-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 42px;
    gap: 8px;
    width: min(420px, 100%);
    justify-self: end;
  }

  .credits-button,
  .account-button {
    min-width: 0;
  }

  .account-button {
    justify-content: center;
  }

  .settings-button {
    width: 42px;
    min-width: 42px;
  }

  .top-nav {
    display: flex;
    grid-column: 1 / -1;
    width: 100%;
    justify-self: stretch;
    order: 3;
  }

  .top-nav button,
  .top-nav .nav-tab {
    flex: 1 1 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .market-shell,
  .preview-shell,
  .leaderboard-grid,
  .game-shell {
    grid-template-columns: 1fr;
  }

  .table-chat-panel {
    width: min(292px, calc(100% - 32px));
  }

  .filters-panel {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .panel-block {
    border-right: 1px solid var(--line);
  }

  .panel-block:nth-child(2n),
  .panel-block:last-child {
    border-right: 0;
  }
}

@media (max-width: 680px) {
  :root {
    --mobile-page-gutter: 12px;
  }

  .app-header,
  .market-shell,
  .preview-shell,
  .leaderboard-shell,
  .game-shell {
    padding-left: 12px;
    padding-right: 12px;
  }

  .app-header {
    grid-template-columns: 1fr;
    gap: 12px;
    align-items: stretch;
    overflow: hidden;
    padding-top: calc(10px + env(safe-area-inset-top, 0px));
    padding-bottom: 10px;
  }

  .app-header > *,
  .market-main,
  .filters-panel,
  .preview-controls-panel,
  .preview-stage,
  .leaderboard-hero,
  .leaderboard-panel,
  .game-setup-panel,
  .game-stage {
    min-width: 0;
    max-width: calc(100vw - var(--mobile-page-gutter) - var(--mobile-page-gutter));
  }

  .brand-lockup {
    gap: 10px;
  }

  .brand-mark {
    width: 40px;
    border-radius: 9px;
  }

  .brand-logo {
    width: 36px;
    height: 36px;
  }

  .credits-button,
  .account-button {
    min-width: 0;
    padding: 0 10px;
  }

  .header-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 42px;
    gap: 6px;
    width: calc(100vw - var(--mobile-page-gutter) - var(--mobile-page-gutter));
    justify-self: stretch;
  }

  .settings-button {
    position: static;
    width: 42px;
    min-width: 42px;
    height: 42px;
    border-color: var(--line);
    background: #fff;
    color: var(--ink);
    box-shadow: none;
  }

  .account-button {
    justify-content: center;
  }

  .account-name {
    max-width: 92px;
  }

  .brand-lockup p {
    display: none;
  }

  .top-nav {
    display: flex;
    width: calc(100vw - var(--mobile-page-gutter) - var(--mobile-page-gutter));
    min-width: 0;
    max-width: 100%;
    justify-self: stretch;
    overflow: visible;
    border-radius: 10px;
  }

  .top-nav button,
  .top-nav .nav-tab {
    flex: 1 1 0;
    min-width: 0;
    padding: 8px 7px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .market-toolbar,
  .toolbar-controls,
  .game-toolbar,
  .game-actions {
    display: grid;
    align-items: stretch;
    width: 100%;
    gap: 10px;
  }

  .market-toolbar h2 {
    font-size: 1.45rem;
  }

  .toolbar-controls {
    grid-template-columns: 1fr;
  }

  .sort-control {
    min-width: 0;
    width: 100%;
  }

  .segmented-control {
    width: 100%;
  }

  .segmented-control button {
    flex: 1 1 0;
    min-width: 0;
  }

  .filters-panel {
    grid-template-columns: 1fr;
  }

  .stats-strip,
  .game-hud {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .stats-strip article,
  .game-hud article {
    padding: 12px;
  }

  .panel-block,
  .panel-block:nth-child(2n) {
    border-right: 0;
  }

  .cards-grid,
  .cards-grid.compact {
    grid-template-columns: minmax(0, 1fr);
  }

  .collection-card-shell {
    width: min(100%, 360px);
    justify-self: center;
  }

  .preview-stage {
    min-height: 480px;
    padding: 16px;
  }

  .preview-card-slot {
    width: min(320px, calc(100vw - 48px));
  }

  .leaderboard-hero {
    display: grid;
  }

  .leaderboard-season-card {
    min-width: 0;
  }

  .leaderboard-row {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .leaderboard-score {
    grid-column: 2;
    justify-self: start;
  }

  .game-shell {
    gap: 14px;
  }

  .game-stage {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
  }

  .game-toolbar,
  .game-hud,
  .called-ball-strip,
  .game-cards-grid {
    grid-column: 1;
    grid-row: auto;
  }

  .game-setup-panel {
    overflow: hidden;
    width: calc(100vw - var(--mobile-page-gutter) - var(--mobile-page-gutter));
  }

  .game-control-header,
  .game-table-tabs,
  .game-join-block,
  .game-picker-block,
  .game-start-actions,
  .game-prize-table {
    padding: 12px;
  }

  .game-table-tabs {
    grid-template-columns: repeat(3, minmax(142px, 1fr));
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .game-table-button {
    scroll-snap-align: start;
  }

  .game-card-picker {
    display: flex;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    max-height: none;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .game-selection-header {
    min-width: 0;
  }

  .game-selection-header strong {
    min-width: 0;
    overflow: hidden;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .game-picker-empty {
    flex: 0 0 100%;
    width: 100%;
    min-width: 0;
  }

  .game-picker-card {
    grid-template-columns: auto 40px minmax(132px, 1fr);
    min-width: 232px;
  }

  .game-picker-art,
  .game-picker-fallback {
    width: 40px;
  }

  .game-start-actions {
    grid-template-columns: 1fr 1fr;
  }

  .game-prize-table {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .game-prize-table div {
    display: grid;
    gap: 4px;
    align-content: start;
  }

  .game-toolbar {
    grid-template-columns: 1fr;
  }

  .game-toolbar h2 {
    font-size: 1.2rem;
    line-height: 1.2;
  }

  .game-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .game-actions button,
  .audio-action {
    min-width: 0;
    width: 100%;
  }

  .called-ball-strip {
    flex-wrap: nowrap;
    min-height: 58px;
    overflow-x: auto;
    padding: 8px;
    -webkit-overflow-scrolling: touch;
  }

  .called-ball,
  .called-ball-empty {
    flex: 0 0 auto;
  }

  .called-ball {
    width: 42px;
  }

  .game-cards-grid {
    min-height: 720px;
  }

  .game-cards-grid.table-theme-fiesta,
  .game-cards-grid.table-theme-beach,
  .game-cards-grid.table-theme-halloween {
    --theme-scene-height: 720px;
  }

  .table-chat-panel {
    top: auto;
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: auto;
    min-height: 0;
    height: min(46vh, 320px);
  }

  .credits-dialog,
  .settings-menu {
    top: auto;
    right: calc(8px + env(safe-area-inset-right, 0px));
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    left: calc(8px + env(safe-area-inset-left, 0px));
    width: auto;
    max-height: min(78vh, 640px);
    border-radius: 12px;
  }

  .game-cards-grid .game-empty {
    padding-right: 0;
    padding-bottom: min(46vh, 320px);
  }

  .win-row {
    grid-template-columns: 1fr;
  }

  .detail-drawer {
    width: 100vw;
    max-width: none;
    padding:
      calc(14px + env(safe-area-inset-top, 0px))
      calc(14px + env(safe-area-inset-right, 0px))
      calc(18px + env(safe-area-inset-bottom, 0px))
      calc(14px + env(safe-area-inset-left, 0px));
  }

  .drawer-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  :root {
    --mobile-page-gutter: 10px;
  }

  .app-header,
  .market-shell,
  .preview-shell,
  .leaderboard-shell,
  .game-shell {
    padding-left: 10px;
    padding-right: 10px;
  }

  .brand-lockup h1 {
    font-size: 1rem;
  }

  .credits-button span {
    font-size: 0.7rem;
  }

  .credits-button small {
    font-size: 0.56rem;
  }

  .account-name {
    max-width: 72px;
  }

  .top-nav button {
    font-size: 0.78rem;
    padding: 8px 5px;
  }

  .stats-strip,
  .game-hud {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .game-hud span {
    font-size: 1.06rem;
  }

  .current-ball-tile span {
    font-size: 1.28rem;
  }

  .game-table-tabs {
    grid-template-columns: repeat(3, minmax(128px, 1fr));
  }

  .game-picker-card {
    min-width: 218px;
  }

  .game-actions {
    grid-template-columns: 1fr 1fr;
  }

  .called-ball {
    width: 38px;
  }

  .called-ball-face small {
    font-size: 0.38rem;
  }

  .called-ball-face strong {
    font-size: 0.78rem;
  }

  .settings-avatar-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .settings-daub-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 680px), (max-height: 520px) and (max-width: 980px) {
  html,
  body,
  .game-shell {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  html::-webkit-scrollbar,
  body::-webkit-scrollbar,
  .game-shell::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }

  .mobile-game-stepbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: calc(100vw - var(--mobile-page-gutter) - var(--mobile-page-gutter));
    margin: 0 auto;
    border: 1px solid rgba(216, 222, 223, 0.95);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    padding: 4px;
    box-shadow: 0 10px 22px rgba(29, 35, 41, 0.08);
    backdrop-filter: blur(10px);
  }

  .mobile-game-stepbar button {
    min-height: 34px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 0.78rem;
    font-weight: 900;
    cursor: pointer;
  }

  .mobile-game-stepbar button.active {
    background: var(--teal);
    color: #fff;
  }

  .mobile-game-stepbar button:disabled {
    color: rgba(107, 119, 128, 0.5);
    cursor: not-allowed;
  }

  .game-shell {
    display: block;
    min-height: auto;
    padding-top: 12px;
    padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  }

  .game-shell[data-mobile-step="rooms"] .game-stage,
  .game-shell[data-mobile-step="cards"] .game-stage,
  .game-shell[data-mobile-step="game"] .game-setup-panel {
    display: none;
  }

  .game-shell[data-mobile-step="rooms"] .game-setup-panel,
  .game-shell[data-mobile-step="cards"] .game-setup-panel {
    display: grid;
    width: calc(100vw - var(--mobile-page-gutter) - var(--mobile-page-gutter));
    max-width: none;
    margin: 12px auto 0;
    overflow: visible;
  }

  .game-shell[data-mobile-step="rooms"] .game-join-block,
  .game-shell[data-mobile-step="rooms"] .game-picker-block,
  .game-shell[data-mobile-step="rooms"] .mobile-card-confirm,
  .game-shell[data-mobile-step="rooms"] .game-start-actions,
  .game-shell[data-mobile-step="rooms"] .game-prize-table {
    display: none;
  }

  .game-shell[data-mobile-step="cards"] .game-control-header,
  .game-shell[data-mobile-step="cards"] .game-prize-table {
    display: none;
  }

  .game-shell[data-mobile-step="cards"] .game-join-block {
    display: grid;
    padding: 12px 14px;
  }

  .game-table-tabs {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    width: 100%;
    overflow: visible;
    padding: 12px;
    scroll-snap-type: none;
  }

  .game-table-button {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px 12px;
    align-items: start;
    width: 100%;
    min-height: 150px;
    border-radius: 12px;
    padding: 14px;
    background:
      radial-gradient(circle at 90% 10%, rgba(214, 154, 25, 0.13), transparent 34%),
      #fff;
  }

  .game-table-button > strong {
    font-size: 1.08rem;
  }

  .game-table-button > small {
    justify-self: end;
    border-radius: 999px;
    background: rgba(24, 126, 127, 0.08);
    color: var(--teal);
    padding: 4px 9px;
    text-align: right;
  }

  .game-room-metrics {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .game-room-metric {
    display: grid;
    gap: 2px;
    border: 1px solid rgba(216, 222, 223, 0.82);
    border-radius: 8px;
    background: rgba(247, 250, 250, 0.86);
    padding: 8px;
  }

  .game-room-metric small {
    color: var(--muted);
    font-size: 0.66rem;
    font-weight: 900;
    text-transform: uppercase;
  }

  .game-room-metric strong {
    color: var(--ink);
    font-size: 0.88rem;
    line-height: 1.1;
  }

  .game-room-cta {
    display: flex;
    grid-column: 1 / -1;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    border-radius: 999px;
    background: var(--teal);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 900;
  }

  .game-card-picker {
    display: grid;
    gap: 10px;
    max-height: none;
    overflow: visible;
    padding: 0;
  }

  .game-picker-card {
    grid-template-columns: auto 54px minmax(0, 1fr);
    min-width: 0;
    width: 100%;
    min-height: 74px;
    border-radius: 10px;
    padding: 10px;
  }

  .game-picker-art,
  .game-picker-fallback {
    width: 54px;
  }

  .mobile-card-confirm {
    position: sticky;
    bottom: 0;
    z-index: 50;
    display: grid;
    grid-template-columns: minmax(92px, 0.42fr) minmax(0, 1fr);
    gap: 10px;
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.94);
    padding:
      10px
      12px
      calc(10px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -14px 28px rgba(29, 35, 41, 0.1);
    backdrop-filter: blur(10px);
  }

  .game-shell[data-mobile-step="game"] {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(var(--mobile-page-gutter) * -1);
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
  }

  .game-shell[data-mobile-step="game"] .mobile-game-stepbar {
    left: var(--mobile-page-gutter);
    width: calc(100vw - var(--mobile-page-gutter) - var(--mobile-page-gutter));
    margin-left: var(--mobile-page-gutter);
  }

  .game-shell[data-mobile-step="game"] .game-stage {
    display: grid;
    grid-template-columns: minmax(320px, 0.88fr) minmax(430px, 1.12fr);
    grid-template-rows: auto auto minmax(460px, auto);
    width: 980px;
    max-width: none;
    min-width: 980px;
    padding: 12px 14px 28px;
  }

  .game-shell[data-mobile-step="game"] .game-toolbar {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    align-items: end;
    justify-content: space-between;
  }

  .game-shell[data-mobile-step="game"] .game-actions {
    display: flex;
    width: auto;
  }

  .game-shell[data-mobile-step="game"] .game-actions button,
  .game-shell[data-mobile-step="game"] .audio-action {
    width: auto;
    min-width: 108px;
  }

  .game-shell[data-mobile-step="game"] .game-hud {
    grid-column: 2;
    grid-row: 1 / span 2;
    grid-template-columns: repeat(5, minmax(96px, 1fr));
  }

  .game-shell[data-mobile-step="game"] .called-ball-strip {
    grid-column: 1;
    grid-row: 2;
    flex-wrap: wrap;
    overflow: visible;
  }

  .game-shell[data-mobile-step="game"] .called-ball {
    width: 46px;
  }

  .game-shell[data-mobile-step="game"] .game-cards-grid {
    grid-column: 1 / -1;
    grid-row: 3;
    min-height: 720px;
  }

  .game-shell[data-mobile-step="game"] .game-cards-grid.table-theme-fiesta,
  .game-shell[data-mobile-step="game"] .game-cards-grid.table-theme-beach,
  .game-shell[data-mobile-step="game"] .game-cards-grid.table-theme-halloween {
    --theme-scene-height: 720px;
  }

  .game-shell[data-mobile-step="game"] .table-chat-panel {
    top: 16px;
    right: 16px;
    bottom: auto;
    left: auto;
    width: min(320px, calc(100% - 32px));
    height: clamp(360px, 58vh, 520px);
    max-height: calc(100% - 32px);
  }

  .game-shell[data-mobile-step="game"] .game-cards-grid .game-empty {
    padding-right: min(356px, 40%);
    padding-bottom: 0;
  }

  body.mobile-landscape-game {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    width: 100svw;
    height: 100svh;
    overflow: hidden;
    background: #10181b;
  }

  body.mobile-landscape-game .app-header,
  body.mobile-landscape-game .market-shell,
  body.mobile-landscape-game .preview-shell,
  body.mobile-landscape-game .leaderboard-shell {
    display: none !important;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] {
    --mobile-landscape-chat-width: clamp(244px, 38vw, 360px);
    --mobile-landscape-meta-width: clamp(132px, 22vw, 166px);
    --mobile-landscape-top-gap: 5px;
    position: fixed;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: 3px;
    width: 100vw;
    height: 100vh;
    width: 100svw;
    height: 100svh;
    max-width: none;
    min-height: 0;
    margin: 0;
    overflow-x: hidden;
    overflow-y: auto;
    background:
      linear-gradient(135deg, rgba(18, 29, 32, 0.96), rgba(12, 18, 22, 0.98)),
      var(--surface-soft);
    padding: 4px;
    -webkit-overflow-scrolling: touch;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .mobile-game-stepbar {
    position: relative;
    grid-column: 2;
    grid-row: 1;
    z-index: 60;
    align-self: stretch;
    justify-self: start;
    width: calc(100% - var(--mobile-landscape-meta-width) - var(--mobile-landscape-top-gap));
    margin: 0;
    min-height: 20px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.92);
    padding: 1px;
    box-shadow: none;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .mobile-game-stepbar button {
    min-height: 18px;
    border-radius: 7px;
    font-size: 0.52rem;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .mobile-game-meta-bar {
    display: grid;
    grid-column: 2;
    grid-row: 1;
    grid-template-columns: minmax(68px, 1fr) 30px 30px;
    gap: 3px;
    align-self: stretch;
    justify-self: end;
    width: var(--mobile-landscape-meta-width);
    margin-right: 0;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .mobile-game-credit-chip,
  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .mobile-game-account-chip,
  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .mobile-game-settings-button {
    appearance: none;
    min-width: 0;
    min-height: 22px;
    border: 1px solid rgba(216, 222, 223, 0.95);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--ink);
    padding: 0 6px;
    font: inherit;
    cursor: pointer;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .mobile-game-credit-chip {
    display: grid;
    align-content: center;
    gap: 0;
    text-align: left;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .mobile-game-credit-chip span {
    color: var(--muted);
    font-size: 0.42rem;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .mobile-game-credit-chip small {
    overflow: hidden;
    color: var(--teal);
    font-size: 0.62rem;
    font-weight: 1000;
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .mobile-game-account-chip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    overflow: hidden;
    font-size: 0.58rem;
    font-weight: 900;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .mobile-game-avatar {
    flex: 0 0 auto;
    width: 18px;
    font-size: 0.56rem;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .mobile-game-account-name {
    display: none;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .mobile-game-settings-button {
    display: grid;
    place-items: center;
    padding: 0;
    color: var(--teal);
    font-size: 0;
    font-weight: 1000;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .mobile-game-settings-button::before {
    content: "\2699";
    font-size: 1rem;
    line-height: 1;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .game-stage {
    display: contents;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .game-toolbar {
    grid-column: 1;
    grid-row: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 5px;
    min-width: 0;
    min-height: 22px;
    padding: 3px 6px;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .game-toolbar > div:first-child {
    min-width: 0;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .game-toolbar h2 {
    overflow: hidden;
    margin-top: 1px;
    font-size: 0.76rem;
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .eyebrow {
    font-size: 0.46rem;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .game-actions {
    display: flex;
    gap: 4px;
    width: auto;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .game-actions button,
  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .audio-action {
    min-width: 56px;
    width: auto;
    min-height: 20px;
    padding: 0 5px;
    font-size: 0.5rem;
    white-space: nowrap;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .game-hud {
    grid-column: 2;
    grid-row: 2;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 3px;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .game-hud article {
    border-radius: 9px;
    padding: 2px 5px;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .game-hud small {
    font-size: 0.38rem;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .game-hud span {
    margin-top: 1px;
    font-size: 0.66rem;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .current-ball-tile span {
    font-size: 0.78rem;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .called-ball-strip {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    width: calc((31px * 6) + (4px * 5) + 12px);
    max-width: 100%;
    min-height: 36px;
    height: 36px;
    gap: 4px;
    overflow: hidden;
    padding: 2px 6px;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .called-ball {
    flex: 0 0 auto;
    width: 31px;
    will-change: transform;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .called-ball-empty {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .called-ball.roll-in {
    animation: called-ball-roll-in 560ms cubic-bezier(0.22, 0.9, 0.24, 1) both;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .called-ball.push-slide {
    animation: called-ball-push-slide 560ms cubic-bezier(0.22, 0.9, 0.24, 1) both;
  }

  @keyframes called-ball-roll-in {
    from {
      opacity: 0;
      transform: translateX(-34px) rotate(-300deg) scale(0.82);
    }

    72% {
      opacity: 1;
      transform: translateX(2px) rotate(14deg) scale(1.04);
    }

    to {
      opacity: 1;
      transform: translateX(0) rotate(0deg) scale(1);
    }
  }

  @keyframes called-ball-push-slide {
    from {
      transform: translateX(-32px);
    }

    to {
      transform: translateX(0);
    }
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .called-ball-face {
    width: 72%;
    border-width: 1px;
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.9),
      inset -1px -2px 3px rgba(29, 35, 41, 0.12),
      inset 1px 1px 2px rgba(255, 255, 255, 0.95);
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .called-ball-face small {
    font-size: 0.3rem;
    margin-top: 0;
    transform: translateY(-2px);
    line-height: 0.85;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .called-ball-face strong {
    color: #111;
    font-size: 0.68rem;
    font-weight: 1000;
    margin-top: -4px;
    line-height: 0.9;
  }

  @media (prefers-reduced-motion: reduce) {
    body.mobile-landscape-game .game-shell[data-mobile-step="game"] .called-ball.roll-in,
    body.mobile-landscape-game .game-shell[data-mobile-step="game"] .called-ball.push-slide {
      animation: none;
    }
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .game-cards-grid {
    grid-column: 1 / -1;
    grid-row: 3;
    align-self: stretch;
    min-height: 252px;
    border-radius: 10px;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .game-cards-grid.table-theme-fiesta,
  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .game-cards-grid.table-theme-beach,
  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .game-cards-grid.table-theme-halloween {
    --theme-scene-height: max(252px, 100%);
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .game-card-frame {
    width: 171px;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .game-card-footer {
    min-height: 22px;
    padding: 2px 7px;
    font-size: 0.62rem;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .other-player-cards-zone {
    gap: 5px;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .other-player-cards-title {
    padding: 2px 7px;
    font-size: 0.52rem;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .other-player-cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(92px, 106px));
    gap: 8px;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .other-player-card-frame .bingo-card {
    border-width: 3px;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .other-player-card-frame .grid-panel {
    padding: 3px;
    padding-top: 0;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .other-player-card-frame .bingo-grid {
    --bingo-header-row-height: 7px;
    --bingo-panel-bottom-padding: 3px;
    gap: 1.5px;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .table-chat-panel {
    top: 2px;
    right: 2px;
    bottom: auto;
    left: auto;
    width: var(--mobile-landscape-chat-width);
    height: calc(100% - 4px);
    min-height: 220px;
    max-height: none;
    border-radius: 10px;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .table-chat-header {
    min-height: 62px;
    gap: 5px;
    padding: 6px 8px;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .table-chat-title strong {
    font-size: 0.82rem;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .table-chat-tab {
    padding: 4px 6px;
    font-size: 0.66rem;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .table-chat-messages {
    padding: 8px 9px;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .table-chat-form {
    gap: 5px;
    padding: 6px 8px 8px;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .table-chat-avatar {
    width: 24px;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .table-chat-input {
    height: 30px;
    font-size: 0.76rem;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .table-chat-emoji-toggle,
  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .table-chat-send {
    width: 30px;
    height: 30px;
  }

  body.mobile-landscape-game .game-shell[data-mobile-step="game"] .game-cards-grid .game-empty {
    padding-right: calc(var(--mobile-landscape-chat-width) + 22px);
    padding-bottom: 0;
  }
}
