﻿/* GoodBingo-style game layout & colors */

:root {
  --gb-b: #2e5bff;
  --gb-i: #e53935;
  --gb-n: #ffb300;
  --gb-g: #28a745;
  --gb-o: #8e24aa;
  --gb-navy: #111827;
  --gb-bg: #eef2f6;
  --gb-surface: #ffffff;
  --gb-muted: #9ca3af;
  --gb-board-bg: rgba(255, 255, 255, 0.55);
}

/* â”€â”€ Full-screen game overlay â”€â”€ */
div.fixed[class*="game_"].hidden {
  display: none !important;
}

div.fixed[class*="game_"]:not(.hidden) {
  display: block !important;
  align-items: stretch !important;
  justify-content: stretch !important;
  padding: 0 !important;
  background: var(--gb-bg) !important;
}

div.fixed[class*="game_"].gb-game-page {
  position: fixed !important;
  inset: 0 !important;
  z-index: 60 !important;
  width: 100% !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  overflow: visible !important;
  background: var(--gb-bg) !important;
}

/* â”€â”€ Full-screen cartela registry (do not rely on Tailwind CDN) â”€â”€ */
div.fixed[class*="registery_"].hidden {
  display: none !important;
}

div.fixed[class*="registery_"]:not(.hidden) {
  display: flex !important;
  flex-direction: column !important;
  position: fixed !important;
  inset: 0 !important;
  z-index: 50 !important;
  width: 100% !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  overflow: hidden !important;
}

#loadingModal {
  z-index: 40 !important;
}

.ws-reconnect-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(17, 24, 39, 0.92);
  color: #f9fafb;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.35;
  pointer-events: none;
}

.ws-reconnect-banner.hidden {
  display: none !important;
}

.gb-game-shell {
  display: grid !important;
  grid-template-columns: minmax(0, 40%) minmax(0, 60%);
  grid-template-rows: auto 1fr;
  row-gap: 0;
  column-gap: 12px;
  padding: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  overflow: visible !important;
  background: var(--gb-bg) !important;
  background-image: none !important;
  border-radius: 0 !important;
}

.gb-game-stats {
  grid-column: 1 / -1;
  grid-row: 1;
  display: grid !important;
  grid-template-columns: 70% 30% !important;
  gap: 0 !important;
  background: var(--gb-navy) !important;
  border-radius: 0 !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
  flex: none !important;
  position: relative;
  z-index: 35;
  overflow: visible;
}

.gb-game-stats-cols {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  grid-column: 1;
  gap: 0 !important;
}

.gb-countdown {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 800;
  color: var(--gb-b);
  line-height: 1;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

div.fixed[class*="game_"] > .gb-game-shell,
div.fixed[class*="game_"] > div {
  display: grid !important;
  grid-template-columns: minmax(0, 40%) minmax(0, 60%);
  grid-template-rows: auto 1fr;
  row-gap: 0;
  column-gap: 12px;
  padding: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  overflow: visible !important;
  background: var(--gb-bg) !important;
  background-image: none !important;
  border-radius: 0 !important;
}

/* Stats bar â€” DERASH | BALLS | PLAYERS */
div.fixed[class*="game_"] .gb-game-stats,
div.fixed[class*="game_"] > div > div:first-child {
  grid-column: 1 / -1;
  grid-row: 1;
  display: grid !important;
  grid-template-columns: 70% 30% !important;
  gap: 0 !important;
  background: var(--gb-navy) !important;
  border-radius: 0 !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
  flex: none !important;
  position: relative;
  z-index: 35;
  overflow: visible;
}

div.fixed[class*="game_"] .gb-game-stats-cols,
div.fixed[class*="game_"] > div > div:first-child > .gb-game-stats-cols {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  grid-column: 1;
  gap: 0 !important;
}

.gb-game-stats .gb-stat,
.gb-game-stats-cols .gb-stat,
div.fixed[class*="game_"] > div > div:first-child > .gb-stat,
div.fixed[class*="game_"] > div > div:first-child > .gb-game-stats-cols > .gb-stat {
  position: relative;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  padding: 12px 6px !important;
  min-height: 58px;
  background: transparent !important;
  border-radius: 0 !important;
  width: auto !important;
}

.gb-game-stats .gb-stat:not(:last-child)::after,
.gb-game-stats-cols .gb-stat:not(:last-child)::after,
div.fixed[class*="game_"] > div > div:first-child > .gb-stat:not(:last-child)::after,
div.fixed[class*="game_"] > div > div:first-child > .gb-game-stats-cols > .gb-stat:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0;
  top: 20%;
  height: 60%;
  width: 1px;
  background: rgba(255, 255, 255, 0.14);
}

.gb-game-stats .gb-stat-label,
div.fixed[class*="game_"] .gb-stat-label {
  font-size: 0.55rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gb-muted) !important;
  margin: 0 !important;
}

.gb-game-stats .gb-stat-value,
div.fixed[class*="game_"] .gb-stat-value {
  font-size: 0.95rem !important;
  font-weight: 800 !important;
  line-height: 1.1;
}

.gb-stat-derash .gb-stat-value,
div.fixed[class*="game_"] .gb-stat-derash [class*="winning"] {
  color: #22c55e !important;
}

.gb-stat-balls .gb-stat-value,
div.fixed[class*="game_"] .gb-stat-balls .gb-stat-value {
  color: #fff !important;
}

.gb-stat-players .gb-stat-value,
div.fixed[class*="game_"] .gb-stat-players [class*="players"] {
  color: #fbbf24 !important;
}

/* Legacy stat children */
div.fixed[class*="game_"] .gb-game-stats > div:not(.gb-game-stats-cols),
div.fixed[class*="game_"] > div > div:first-child > div:not(.gb-stat):not(.gb-game-stats-cols) {
  background: transparent !important;
  border-radius: 0 !important;
  width: auto !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 4px 6px !important;
  min-height: 50px;
}

/* â”€â”€ Left panel: 1â€“75 board + footer â”€â”€ */
.gb-board-side,
div.fixed[class*="game_"] > div > .gb-board-side,
div.fixed[class*="game_"] > div > div:nth-child(2).gb-board-side,
div.fixed[class*="game_"] > div > div:nth-child(2):not(.gb-game-right) {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100% !important;
  margin: 0 !important;
  background: var(--gb-board-bg) !important;
  border-right: none;
  box-shadow: none;
  border-radius: 0 !important;
  align-self: stretch;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.gb-board-wrap,
.gb-board-side .gb-board-wrap,
div.fixed[class*="game_"] > div > .gb-board-side .gb-board-wrap {
  flex: 1 1 auto;
  min-height: 0;
  width: 100% !important;
  margin: 0 !important;
  padding: 4px 0 12px 4px !important;
  overflow: hidden;
  background: transparent !important;
  border-radius: 0 !important;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

.gb-master-board {
  display: flex;
  flex: 1;
  min-height: 0;
  height: 100%;
  gap: 1px;
  width: 100%;
}

.gb-board-column {
  flex: 1;
  display: grid;
  grid-template-rows: auto repeat(15, 1fr);
  height: 100%;
  gap: 1px;
  min-width: 0;
}

.gb-board-head {
  text-align: center;
  font-weight: 800;
  font-size: 0.95rem;
  color: #fff;
  border-radius: 0;
  padding: 6px 0;
  line-height: 1;
  flex-shrink: 0;
}

.gb-board-head.gb-col-b { background: var(--gb-b); }
.gb-board-head.gb-col-i { background: var(--gb-i); }
.gb-board-head.gb-col-n { background: var(--gb-n); color: #111; }
.gb-board-head.gb-col-g { background: var(--gb-g); }
.gb-board-head.gb-col-o { background: var(--gb-o); }

.gb-board-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #111;
  border: 1px solid #cbd5e1;
  border-radius: 0;
  font-size: clamp(1.05rem, 3.8vw, 1.35rem);
  font-weight: 900;
  min-height: 0;
  line-height: 1;
  padding: 0;
}

.gb-board-cell.ball-called {
  background: #fbbf24 !important;
  color: #111 !important;
  font-weight: 900 !important;
}

.gb-board-cell.ball-current {
  background: var(--gb-g) !important;
  color: #fff !important;
  font-weight: 900 !important;
}

/* Legacy grid override */
div.fixed[class*="game_"] > div > .gb-board-side > .grid,
div.fixed[class*="game_"] > div > div:nth-child(2) > .grid {
  display: grid !important;
  grid-template-columns: repeat(5, 1fr) !important;
  grid-auto-flow: row !important;
  grid-template-rows: auto repeat(15, minmax(14px, auto)) !important;
  gap: 2px !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  opacity: 1 !important;
}

div.fixed[class*="game_"] .bingo-cell.bg-blue-800:nth-child(1) { background: var(--gb-b) !important; }
div.fixed[class*="game_"] .bingo-cell.bg-blue-800:nth-child(2) { background: var(--gb-i) !important; }
div.fixed[class*="game_"] .bingo-cell.bg-blue-800:nth-child(3) { background: var(--gb-n) !important; color: #111 !important; }
div.fixed[class*="game_"] .bingo-cell.bg-blue-800:nth-child(4) { background: var(--gb-g) !important; }
div.fixed[class*="game_"] .bingo-cell.bg-blue-800:nth-child(5) { background: var(--gb-o) !important; }

div.fixed[class*="game_"] .bingo-cell.bg-blue-500 {
  background: #fff !important;
  color: #111 !important;
  border: none !important;
  border-radius: 0 !important;
  font-size: 1.05rem !important;
  font-weight: 900 !important;
  min-height: 14px;
}

div.fixed[class*="game_"] .bingo-cell.ball-called,
div.fixed[class*="game_"] .bingo-cell.bg-orange-500 {
  background: #fbbf24 !important;
  color: #111 !important;
}

div.fixed[class*="game_"] .bingo-cell.ball-current {
  background: var(--gb-g) !important;
  color: #fff !important;
}

/* â”€â”€ Right column: call hero + card (60% col; card = 56vw, 4% right edge gap) â”€â”€ */
.gb-game-right {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  padding: 0 max(0px, calc(100% * 4 / 60 - 4px)) 4px 0;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  align-self: stretch;
  position: relative;
  z-index: 20;
  -webkit-overflow-scrolling: touch;
}

.gb-call-hero,
.gb-call-container,
div.fixed[class*="game_"] > div > [id^="call-container"] {
  flex-shrink: 0;
  width: 100% !important;
  min-height: 52px !important;
  margin: -14px 0 0 !important;
  padding: 8px 4px 8px 6px !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  overflow: visible !important;
  position: relative !important;
  z-index: 15;
}

.gb-call-history-card {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 999px;
  padding: 6px 10px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  width: 158px;
  min-width: 158px;
  min-height: 52px;
  flex-shrink: 0;
  z-index: 12;
  margin-top: 4px;
}

.gb-call-history {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  width: 100%;
  min-height: 40px;
  padding: 0;
  overflow: hidden;
}

.gb-call-current {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 30;
}

.gb-game-stats .gb-call-current,
div.fixed[class*="game_"] .gb-game-stats > .gb-call-current {
  position: absolute;
  right: 6px;
  bottom: -56px;
  width: 148px;
  height: 148px;
  z-index: 40;
  overflow: visible;
  pointer-events: none;
}

.gb-call-current-ball,
.gb-call-current .gb-call-mute {
  pointer-events: auto;
}

.gb-call-current-ball {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.gb-call-mute,
.gb-call-current [class^="voice_"] {
  display: none !important;
}

.gb-call-current .gb-call-mute,
div.fixed[class*="game_"] .gb-call-current .gb-call-mute,
div.fixed[class*="game_"] .gb-call-current [class^="voice_"] {
  position: absolute !important;
  left: 50% !important;
  bottom: 0 !important;
  top: auto !important;
  transform: translateX(-50%) translateY(40%);
  z-index: 40;
  min-width: 36px;
  min-height: 36px;
  padding: 4px !important;
  font-size: 0.9rem !important;
  line-height: 1;
  background: #fff !important;
  border: none !important;
  border-radius: 50% !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  pointer-events: auto !important;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.gb-call-current .gb-call-ball-main,
.gb-call-current .gb-countdown {
  position: relative;
  z-index: 30;
}

.gb-call-ball-main {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 4px solid rgba(90, 60, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900 !important;
  font-size: 1.3rem !important;
  color: #fff !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28), inset 0 -2px 6px rgba(0, 0, 0, 0.12);
  line-height: 1;
}

.gb-call-ball-main.gb-ball-b { background: var(--gb-b); color: #fff !important; }
.gb-call-ball-main.gb-ball-i { background: var(--gb-i); color: #fff !important; }
.gb-call-ball-main.gb-ball-n { background: var(--gb-n); color: #fff !important; }
.gb-call-ball-main.gb-ball-g { background: var(--gb-g); color: #fff !important; }
.gb-call-ball-main.gb-ball-o { background: var(--gb-o); color: #fff !important; }

.gb-recent-ball {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gb-b);
  border: 2px solid rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.56rem;
  color: #fff !important;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  line-height: 1;
}

.gb-recent-ball.gb-ball-b { background: var(--gb-b); color: #fff !important; }
.gb-recent-ball.gb-ball-i { background: var(--gb-i); color: #fff !important; }
.gb-recent-ball.gb-ball-n { background: var(--gb-n); color: #fff !important; }
.gb-recent-ball.gb-ball-g { background: var(--gb-g); color: #fff !important; }
.gb-recent-ball.gb-ball-o { background: var(--gb-o); color: #fff !important; }

div.fixed[class*="game_"] > div > [id^="call-container"] .counter_5,
div.fixed[class*="game_"] > div > [id^="call-container"] .counter_10,
div.fixed[class*="game_"] > div > [id^="call-container"] .counter_20,
div.fixed[class*="game_"] > div > [id^="call-container"] .counter_50,
div.fixed[class*="game_"] > div > [id^="call-container"] .counter_100,
div.fixed[class*="game_"] > div > [id^="call-container"] .counter_500,
div.fixed[class*="game_"] > div > [id^="call-container"] .counter_1000 {
  display: none !important;
}

/* Legacy absolute balls fallback */
div.fixed[class*="game_"] > div > [id^="call-container"] .ball {
  position: absolute !important;
  width: 46px !important;
  height: 46px !important;
  border-radius: 50% !important;
  border: 3px solid #fff !important;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: 800 !important;
  color: #fff !important;
  font-size: 0.7rem !important;
  line-height: 1;
}

div.fixed[class*="game_"] > div > [id^="call-container"] .gb-ball-current {
  width: 96px !important;
  height: 96px !important;
  font-size: 1.1rem !important;
  z-index: 30;
}

.gb-game-right [id^="call-container"] {
  grid-column: unset !important;
  grid-row: unset !important;
  width: 100% !important;
  flex-shrink: 0;
}

.gb-game-right [class*="playing_cartela_section"] {
  grid-column: unset !important;
  grid-row: unset !important;
  flex: 1 1 auto;
  min-height: 0 !important;
  max-height: none !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: stretch !important;
  justify-content: center !important;
  padding: 0 !important;
  margin-top: 0;
  margin-left: 0;
  width: calc(100% * 56 / 60);
  max-width: calc(100% * 56 / 60);
  box-sizing: border-box;
  align-self: flex-start;
}

div.fixed[class*="game_"] [class*="playing_cartela_section"] {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: center !important;
  flex: 1 1 auto;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  overflow: hidden !important;
  min-height: 0 !important;
  width: calc(100% * 56 / 60);
  max-width: calc(100% * 56 / 60);
  box-sizing: border-box;
  z-index: 2;
  align-self: flex-start;
}

div.fixed[class*="game_"] > div > button.hidden {
  display: none !important;
}

.gb-card-error {
  padding: 16px;
  text-align: center;
  color: #b91c1c;
  font-weight: 700;
}

@media (max-width: 520px) {
  div.fixed[class*="game_"] > .gb-game-shell,
  div.fixed[class*="game_"] > div {
    grid-template-columns: minmax(0, 40%) minmax(0, 60%) !important;
    grid-template-rows: auto 1fr !important;
    row-gap: 0 !important;
    column-gap: 12px !important;
    overflow: visible !important;
  }

  .gb-board-side,
  div.fixed[class*="game_"] > div > div:nth-child(2).gb-board-side,
  div.fixed[class*="game_"] > div > div:nth-child(2):not(.gb-game-right) {
    grid-column: 1 !important;
    grid-row: 2 !important;
    max-height: none !important;
  }

  .gb-board-wrap,
  .gb-board-side .gb-board-wrap {
    max-height: none !important;
  }

  .gb-game-right {
    grid-column: 2 !important;
    grid-row: 2 !important;
    min-height: 0;
    min-width: 0;
    overflow: hidden !important;
    padding: 0 max(0px, calc(100% * 4 / 60 - 4px)) 4px 0 !important;
    align-items: flex-start !important;
    z-index: 20;
    position: relative;
  }

  div.fixed[class*="game_"] .gb-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .gb-card-head {
    padding-left: 4px;
    padding-right: 4px;
  }

  .gb-card-grid {
    padding-left: 4px;
    padding-right: 4px;
  }

  .gb-card-col {
    font-size: clamp(1.08rem, 3.1vw, 1.22rem);
    font-weight: 900 !important;
    padding: 6px 0;
  }

  .gb-card-cell {
    font-size: clamp(1.12rem, 3.5vw, 1.32rem);
    font-weight: 900 !important;
  }

  .gb-bingo-btn {
    font-size: 1.3rem !important;
    font-weight: 900 !important;
    padding: 12px 12px !important;
    border-radius: 0 0 16px 16px;
  }

  div.fixed[class*="game_"] .gb-bingo-btn[class*="bingo_"] {
    font-size: 1.3rem !important;
    font-weight: 900 !important;
    border-radius: 0 0 16px 16px !important;
  }

  .gb-board-cell {
    font-size: clamp(0.95rem, 3.4vw, 1.15rem);
    min-height: 0;
  }

  .gb-call-hero,
  .gb-call-container,
  div.fixed[class*="game_"] > div > [id^="call-container"] {
    margin-top: -12px !important;
    min-height: 48px !important;
    padding-top: 8px !important;
  }

  .gb-call-history-card {
    width: min(158px, calc(100% - 96px));
    min-width: 136px;
    padding: 5px 8px;
  }

  .gb-call-ball-main {
    width: 84px;
    height: 84px;
    font-size: 1.3rem !important;
    font-weight: 900 !important;
  }

  .gb-game-stats .gb-call-current,
  div.fixed[class*="game_"] .gb-game-stats > .gb-call-current {
    right: 4px;
    bottom: -48px;
    width: 128px;
    height: 128px;
  }

  .gb-countdown {
    width: 120px;
    height: 120px;
    font-size: 2.5rem;
  }

  .gb-recent-ball {
    width: 34px;
    height: 34px;
    font-size: 0.5rem;
    font-weight: 600 !important;
  }
}

/* â”€â”€ GoodBingo card (play screen) â”€â”€ */
div.fixed[class*="game_"] .gb-card {
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.gb-card {
  width: 100%;
  max-width: min(268px, 100%);
  min-width: 0;
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(17, 24, 39, 0.06);
  box-shadow: 0 6px 20px rgba(17, 24, 39, 0.14);
  overflow: hidden;
  margin: 0 auto;
  flex-shrink: 1;
  box-sizing: border-box;
  visibility: visible !important;
  opacity: 1 !important;
  font-family: "Poppins", system-ui, sans-serif;
}

.gb-card-head {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
  padding: 10px 6px 5px;
  background: #fff;
}

div.fixed[class*="game_"] .gb-card-col,
div.fixed[class*="game_"] .gb-card-cell {
  font-family: "Poppins", system-ui, sans-serif !important;
  font-weight: 900 !important;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

.gb-card-col {
  text-align: center;
  font-weight: 900 !important;
  font-size: clamp(1.12rem, 3.3vw, 1.28rem);
  color: #fff;
  border-radius: 10px;
  padding: 8px 0;
  line-height: 1;
  box-shadow: none;
}

.gb-col-b { background: var(--gb-b); }
.gb-col-i { background: var(--gb-i); }
.gb-col-n { background: var(--gb-n); color: #111 !important; }
.gb-col-g { background: var(--gb-g); }
.gb-col-o { background: var(--gb-o); }

.gb-card-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
  padding: 0 6px 0;
  background: #fff;
}

.gb-card-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: clamp(1.18rem, 3.7vw, 1.42rem);
  font-weight: 900 !important;
  color: #111827;
  cursor: pointer;
  user-select: none;
  line-height: 1;
  box-shadow: none;
}

.gb-card-cell.gb-free {
  background: var(--gb-g);
  border-color: #1e7e34;
  cursor: default;
  box-shadow: none;
}

.gb-star {
  color: var(--gb-b);
  font-size: 1.5rem;
  line-height: 1;
}

.gb-card-cell.gb-cell-hit {
  background: var(--gb-g) !important;
  color: #fff !important;
  border-color: #1e7e34 !important;
}

.gb-bingo-btn {
  width: 100%;
  background: var(--gb-b) !important;
  color: #fff !important;
  font-size: 1.5rem !important;
  font-weight: 900 !important;
  font-style: italic;
  font-family: "Poppins", system-ui, sans-serif;
  text-align: center;
  padding: 14px 14px !important;
  border: none;
  border-radius: 0 0 16px 16px;
  cursor: pointer;
  letter-spacing: 0.04em;
  line-height: 1.1;
  box-shadow: none !important;
  position: relative;
}

.gb-bingo-card-num {
  position: absolute;
  right: 10px;
  bottom: 8px;
  font-size: 0.65rem;
  font-style: normal;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
}

div.fixed[class*="game_"] .gb-bingo-btn[class*="bingo_"] {
  border-radius: 0 0 16px 16px !important;
  box-shadow: none !important;
  background: var(--gb-b) !important;
  font-family: "Poppins", system-ui, sans-serif;
  font-style: italic;
  font-weight: 900 !important;
  font-size: 1.5rem !important;
  letter-spacing: 0.04em;
  padding: 14px 14px !important;
  line-height: 1.1;
}

.gb-bingo-btn:active {
  transform: scale(0.98);
}

.gb-card-stack {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 100%;
}

.gb-card-stack--multi {
  gap: clamp(3px, 0.8vh, 6px);
  transform-origin: top center;
  will-change: transform;
  width: 100%;
}

.gb-card-stack--multi.gb-card-stack--scroll {
  overflow-y: auto;
  justify-content: flex-start;
  max-height: 100%;
  -webkit-overflow-scrolling: touch;
}

.gb-card-stack--multi .gb-card {
  max-width: 100%;
  width: 100%;
  flex-shrink: 0;
}

.gb-card-stack--multi .gb-card-head {
  padding: 5px 3px 2px;
}

.gb-card-stack--multi .gb-card-col {
  font-size: clamp(0.98rem, 3vw, 1.12rem);
  font-weight: 900 !important;
  padding: 5px 0;
}

.gb-card-stack--multi .gb-card-grid {
  padding: 0 3px;
  gap: 2px;
}

.gb-card-stack--multi .gb-card-cell {
  font-size: clamp(0.95rem, 3.2vw, 1.15rem);
  font-weight: 900 !important;
}

.gb-card-stack--multi .gb-bingo-btn {
  font-size: 1rem !important;
  font-weight: 900 !important;
  padding: 7px 10px !important;
}

/* Dual-cartela: compact call bar + fit both cards in viewport */
div.fixed[class*="game_"].gb-multi-cartela > .gb-game-shell,
div.fixed[class*="game_"].gb-multi-cartela > div {
  overflow: hidden !important;
}

div.fixed[class*="game_"].gb-multi-cartela .gb-call-hero,
div.fixed[class*="game_"].gb-multi-cartela .gb-call-container,
div.fixed[class*="game_"].gb-multi-cartela [id^="call-container"] {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  min-height: 44px !important;
  padding: 4px 2px !important;
}

div.fixed[class*="game_"].gb-multi-cartela .gb-game-stats .gb-call-current {
  width: 88px;
  height: 88px;
  bottom: -34px;
}

div.fixed[class*="game_"].gb-multi-cartela .gb-game-right {
  padding: 0 max(0px, calc(100% * 4 / 60 - 4px)) 0 0 !important;
  overflow: hidden;
}

div.fixed[class*="game_"].gb-multi-cartela .gb-game-right [class*="playing_cartela_section"] {
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
  justify-content: flex-start;
  align-items: stretch;
  padding: 0 !important;
}

div.fixed[class*="game_"].gb-multi-cartela .gb-card-stack--multi {
  transform-origin: top center;
}

@media (max-width: 520px) {
  div.fixed[class*="game_"].gb-multi-cartela .gb-game-stats .gb-call-current {
    width: 88px;
    height: 88px;
    bottom: -36px;
  }
}

.gb-game-waiting {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px 12px;
  width: 100%;
  max-width: 220px;
  margin: 0 auto;
}

.gb-game-waiting-icon-wrap {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 6px 20px rgba(17, 24, 39, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.gb-game-waiting-icon {
  font-size: 2rem;
  line-height: 1;
}

.gb-game-waiting-title {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--gb-b);
  margin-bottom: 8px;
}

.gb-game-waiting-sub {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b7280;
  line-height: 1.45;
  max-width: 180px;
}

/* â”€â”€ Game footer (left panel only) â”€â”€ */
.gb-game-footer {
  flex-shrink: 0;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  gap: 0;
  background: var(--gb-navy);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  padding: 0;
  margin-top: 0;
  color: #fff;
  min-height: 52px;
}

.gb-footer-col {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  padding: 8px 6px;
}

.gb-footer-col--room::after {
  content: "";
  position: absolute;
  right: 0;
  top: 20%;
  height: 60%;
  width: 1px;
  background: rgba(255, 255, 255, 0.14);
}

.gb-footer-col--refresh {
  padding: 0;
}

.gb-footer-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.gb-footer-room {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.gb-footer-label {
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gb-muted);
  line-height: 1.1;
}

.gb-footer-value {
  font-size: 0.82rem;
  font-weight: 800;
  font-style: italic;
  color: #fbbf24;
  line-height: 1.1;
  white-space: nowrap;
}

.gb-footer-refresh {
  width: 100%;
  height: 100%;
  min-height: 52px;
  background: transparent;
  border: none;
  border-radius: 0;
  color: var(--gb-muted);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 6px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.gb-footer-refresh:active:not(:disabled) {
  background: rgba(255, 255, 255, 0.06);
}

.gb-footer-refresh:disabled {
  opacity: 0.65;
  cursor: wait;
}

.gb-footer-refresh-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  color: #e5e7eb;
  flex-shrink: 0;
  line-height: 0;
}

.gb-footer-refresh-icon svg {
  display: block;
  width: 16px;
  height: 16px;
}

.gb-footer-refresh.is-syncing .gb-footer-refresh-icon svg {
  animation: gbRefreshSpin 0.8s linear infinite;
}

@keyframes gbRefreshSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.gb-footer-refresh-label {
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gb-muted);
  white-space: nowrap;
  line-height: 1.1;
}

/* â”€â”€ Cartela registry (selection page) â”€â”€ */
body.cartela-page-open {
  background: #f4f6f9;
  overflow: hidden;
}

body.game-page-open {
  background: var(--gb-bg);
  overflow: hidden;
}

.no-stake-gate {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  text-align: center;
  background: #f4f6f9;
}

.no-stake-gate.hidden {
  display: none !important;
}

.no-stake-gate-logo {
  width: 160px;
  height: 160px;
  object-fit: contain;
  margin: 0 0 16px;
  border-radius: 50%;
}

.no-stake-gate-title {
  margin: 0 0 12px;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gb-navy, #1a2b4a);
}

.no-stake-gate-text {
  margin: 0;
  max-width: 320px;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #64748b;
}

.gb-registry-page {
  background: #f4f6f9 !important;
  align-items: stretch !important;
  justify-content: stretch !important;
}

.gb-registry-page > .gb-registry-body {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  background: #f4f6f9 !important;
  background-image: none !important;
  padding: 0 !important;
  overflow: visible !important;
  border-radius: 0 !important;
  position: relative;
}

.gb-cartela-top {
  display: none !important;
}

.gb-cartela-brand {
  font-size: 1.35rem;
  font-weight: 800;
  color: #1a2b4a;
  letter-spacing: -0.02em;
}

.gb-cartela-top-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.gb-cartela-icon {
  appearance: none;
  border: none;
  background: transparent;
  color: #1a2b4a;
  font-size: 1.25rem;
  line-height: 1;
  padding: 6px 8px;
  cursor: pointer;
}

.gb-registry-stats {
  flex-shrink: 0;
  display: flex !important;
  gap: 8px !important;
  padding: 4px 12px 10px !important;
  background: transparent !important;
}

.gb-cartela-board {
  flex: 1;
  min-height: 0;
  margin: 0 12px;
  padding: 14px 12px;
  background: #e2e5ea;
  border-radius: 18px;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.gb-cartela-board .cartela-grid {
  flex: 1;
  min-height: 0;
  padding: 0;
  gap: 5px;
}

.gb-cartela-slots {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 12px 16px 8px;
}

.gb-cartela-slot {
  appearance: none;
  border: 2px dashed #c5cdd8;
  border-radius: 16px;
  background: #f0f4f8;
  min-height: 88px;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  color: #94a3b8;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.gb-cartela-slot--active {
  border-color: #64748b;
  background: #f8fafc;
}

.gb-cartela-slot--filled {
  border-style: solid;
  border-color: #cbd5e1;
  color: #1e293b;
}

.gb-slot-plus {
  font-size: 1.5rem;
  font-weight: 300;
  line-height: 1;
  color: #94a3b8;
}

.gb-slot-text {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}

.gb-cartela-slot--filled .gb-slot-text {
  color: #64748b;
}

.gb-cartela-slot--locked {
  border-color: #94a3b8;
  background: #e8edf2;
  cursor: not-allowed;
}

.gb-cartela-slot--locked .gb-slot-text {
  color: #475569;
  font-size: 0.58rem;
}

.gb-slot-num {
  display: none;
  font-size: 1.75rem;
  font-weight: 800;
  color: #1a2b4a;
  line-height: 1;
}

.gb-cartela-bot {
  flex-shrink: 0;
  text-align: center;
  font-size: 0.72rem;
  color: #94a3b8;
  padding: 6px 12px calc(10px + env(safe-area-inset-bottom, 0px));
}

.cartela-grid {
  overflow-y: auto;
  overflow-x: hidden;
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #64748b transparent;
}

.cartela-grid::-webkit-scrollbar {
  width: 5px;
}

.cartela-grid::-webkit-scrollbar-thumb {
  background: #64748b;
  border-radius: 4px;
}

.cartela-cell {
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  width: 100%;
  min-height: 36px;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 8px;
  background: #fff;
  color: #1f2937;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.1);
  cursor: pointer;
  transition: background 0.1s ease, color 0.1s ease, box-shadow 0.1s ease;
}

.cartela-cell:active:not(.cartela-taken) {
  background: #f8fafc;
}

.cartela-cell.cartela-selected {
  background: #ffc107 !important;
  color: #111 !important;
  border: none !important;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.12) !important;
  transform: none !important;
  pointer-events: auto !important;
  cursor: pointer;
}

.cartela-cell.cartela-selected:active {
  filter: brightness(0.95);
}

.cartela-cell.cartela-taken {
  opacity: 1 !important;
  background: #d1d5db !important;
  color: #9ca3af !important;
  border: none !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  box-shadow: none !important;
  transform: none !important;
}

.gb-registry-actions {
  flex-shrink: 0;
  display: flex !important;
  gap: 10px !important;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
  background: #fff;
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.06);
}

.gb-registry-actions > div {
  flex: 1;
  margin: 0 !important;
  width: auto !important;
  border-radius: 12px !important;
  padding: 14px 12px !important;
  font-size: 0.95rem !important;
  font-weight: 800 !important;
  text-align: center;
}

div.fixed[class*="registery_"] > div {
  background: var(--gb-bg) !important;
}

div.fixed[class*="registery_"] .grid.grid-cols-10 {
  gap: 10px !important;
  padding: 12px 16px !important;
}

div.fixed[class*="registery_"] [class*="card_"],
div.fixed[class*="registery_"] .cartela-cell {
  background: #fff !important;
  color: #1f2937 !important;
  border: none !important;
  border-radius: 8px !important;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.1) !important;
  font-weight: 800 !important;
  font-size: 0.82rem !important;
  min-height: 40px;
}

div.fixed[class*="registery_"] .cartela-selected {
  background: #ffc107 !important;
  color: #111 !important;
  border: none !important;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.12) !important;
  transform: none;
}

div.fixed[class*="registery_"] .cartela-taken {
  opacity: 1 !important;
  background: #d1d5db !important;
  color: #9ca3af !important;
  border: none !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  transform: none !important;
}

div.fixed[class*="registery_"] .cartela-grid button {
  border: none;
  border-radius: 8px;
  padding: 0;
  cursor: pointer;
}

.gb-reg-pill {
  flex: 1;
  border-radius: 12px;
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-height: 48px;
}

.gb-reg-lbl {
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.9;
}

.gb-reg-val {
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.15;
}

.gb-reg-room {
  background: #ffc107 !important;
  color: #111 !important;
  flex: 1.2;
}

.gb-reg-room .gb-reg-val {
  font-size: 0.88rem;
  font-weight: 800;
}

.gb-reg-sold,
.gb-reg-time {
  background: #343a40 !important;
  color: #fff !important;
}

.gb-reg-time .gb-reg-lbl {
  color: #f87171;
}

.gb-reg-balance {
  background: #28a745 !important;
  color: #fff !important;
  flex: 1.15;
}

.gb-reg-balance .gb-reg-lbl,
.gb-reg-balance .gb-reg-val {
  color: #fff;
}

.gb-cartela-toast {
  flex-shrink: 0;
  display: none;
  margin: 0 12px 8px;
  max-width: none;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(55, 65, 81, 0.92);
  color: #fca5a5;
  font-size: 0.68rem;
  font-weight: 700;
  font-style: italic;
  text-transform: uppercase;
  line-height: 1.25;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.gb-cartela-toast.gb-cartela-toast--visible {
  display: block;
}

.gb-cartela-toast--visible {
  opacity: 1;
  transform: translateY(0);
}

div.fixed[class*="registery_"] > div > div:first-child:not(.gb-super-hero) {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
}

div.fixed[class*="registery_"] [onclick*="enter_game"] {
  background: var(--gb-g) !important;
  color: #fff !important;
  font-weight: 800 !important;
}

div.fixed[class*="registery_"] [onclick*="reload_page"] {
  background: var(--gb-b) !important;
  color: #fff !important;
}

/* â”€â”€ Winner modal â”€â”€ */
div.fixed[class*="winner_"] {
  position: fixed !important;
  inset: 0 !important;
  z-index: 80 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
  overflow-y: auto !important;
  background: rgba(26, 43, 74, 0.55) !important;
}

div.fixed[class*="winner_"].hidden {
  display: none !important;
}

.winner-modal {
  border: 4px solid var(--gb-n) !important;
  background: #fff !important;
}

.winner-title {
  color: var(--gb-g) !important;
}

.winner-pool-value {
  color: var(--gb-g) !important;
}

.winner-cell.win {
  background: var(--gb-g) !important;
  color: #fff !important;
  border-color: #1e7e34 !important;
}

.winner-cell.called {
  background: var(--gb-n) !important;
  color: #111 !important;
  border-color: #e6ac00 !important;
}

.winner-continue {
  background: var(--gb-n) !important;
  color: #111 !important;
  font-weight: 800 !important;
}

@keyframes winnerModalEnter {
  from {
    opacity: 0;
    transform: scale(0.85);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes winnerTrophyBounce {
  0%,
  100% {
    transform: translateY(0) rotate(-4deg);
  }
  50% {
    transform: translateY(-10px) rotate(4deg);
  }
}

@keyframes winnerTitleSlide {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes winnerPrizeGlow {
  0%,
  100% {
    text-shadow: 0 0 8px rgba(255, 193, 7, 0.4);
  }
  50% {
    text-shadow: 0 0 18px rgba(255, 193, 7, 0.85);
  }
}

.winner-modal--enter {
  animation: winnerModalEnter 0.35s ease-out both;
}

.winner-modal--enter .winner-trophy {
  animation: winnerTrophyBounce 1.8s ease-in-out infinite;
  animation-delay: 0.2s;
}

.winner-modal--enter .winner-title {
  animation: winnerTitleSlide 0.45s ease-out both;
  animation-delay: 0.15s;
}

.winner-modal--enter .winner-pool-value {
  animation: winnerPrizeGlow 1.6s ease-in-out infinite;
  animation-delay: 0.3s;
}

.winner-continue:active {
  transform: scale(0.97);
  transition: transform 0.1s ease;
}

.winner-auto-timer {
  width: 100%;
  margin: 12px 0 4px;
  text-align: center;
}

.winner-auto-timer-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: #9ca3af;
  margin-bottom: 8px;
}

.winner-auto-timer-sec {
  color: #fbbf24;
  font-weight: 800;
}

.winner-auto-timer-bar {
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.winner-auto-timer-fill {
  height: 100%;
  width: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #fbbf24, #22c55e);
  transition: width 1s linear;
}

/* â”€â”€ Super Bingo (Br. 50) cartela page â”€â”€ */
body.super-bingo-page-open {
  background: #ffffff;
}

body.super-bingo-page-open.cartela-page-open {
  background: #ffffff;
}

.gb-super-bingo.gb-registry-page {
  background: #ffffff;
}

.gb-super-bingo .gb-registry-body {
  background: #ffffff;
}

div.fixed[class*="registery_"] > div > .gb-super-hero,
.gb-super-bingo .gb-super-hero {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: stretch;
  gap: 0;
  margin: 8px 12px 0;
  padding: 10px 0;
  border: none !important;
  border-radius: 16px !important;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 55%, #d97706 100%) !important;
  box-shadow: 0 4px 14px rgba(251, 191, 36, 0.35);
  overflow: hidden;
}

.gb-super-hero-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  padding: 8px 12px;
  border-right: 1px solid rgba(0, 0, 0, 0.15);
}

.gb-super-hero-col--right {
  align-items: flex-end;
  text-align: right;
  border-right: none;
}

.gb-super-lbl {
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(15, 23, 42, 0.65);
}

.gb-super-val {
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
  white-space: nowrap;
}

.gb-super-hero-title {
  display: grid;
  grid-template-rows: 1fr 1fr;
  align-items: stretch;
  justify-items: stretch;
  min-height: 52px;
  padding: 6px 10px;
  border-right: 1px solid rgba(0, 0, 0, 0.15);
}

.gb-super-hero-word {
  color: #fff;
  font-style: italic;
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1;
  letter-spacing: 0.06em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.gb-super-hero-word--super {
  align-self: start;
  justify-self: start;
  font-size: 1.05rem;
}

.gb-super-hero-word--bingo {
  align-self: end;
  justify-self: end;
  font-size: 1.15rem;
}

.gb-super-info {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  margin: 10px 12px 0;
  padding: 0;
  border-radius: 14px;
  background: #1e293b;
  overflow: hidden;
}

.gb-super-info-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  min-height: 56px;
  padding: 10px 8px;
  text-align: center;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.gb-super-info-col:last-child {
  border-right: none;
}

.gb-super-info-lbl {
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
  line-height: 1.2;
}

.gb-super-info-val {
  font-size: 0.82rem;
  font-weight: 800;
  color: #f8fafc;
  line-height: 1.15;
}

.gb-super-info-col:nth-child(2) .gb-super-info-val {
  color: #fbbf24;
}

.gb-super-info-col:last-child .gb-super-info-val {
  color: #38bdf8;
  font-size: 0.72rem;
}

.gb-super-bingo .gb-cartela-board {
  background: #e2e5ea;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.06);
}

.gb-super-bingo .gb-cartela-slots {
  padding-top: 10px;
}

.gb-super-bingo .gb-cartela-bot {
  color: #94a3b8;
}

/* â”€â”€ Super Bingo play page (stake 50 in-game) â”€â”€ */
body.super-bingo-game-open {
  background: #ffffff;
}

div.fixed.game_50.gb-game-page.gb-super-game {
  background: #ffffff !important;
}

.gb-super-game-stats {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 55%, #d97706 100%) !important;
  border-radius: 12px;
}

.gb-super-game-stats .gb-stat-label {
  color: rgba(15, 23, 42, 0.65) !important;
}

.gb-super-game-stats .gb-stat-value {
  color: #111827 !important;
}

.gb-super-game-stats .gb-stat-derash .gb-stat-value {
  color: #166534 !important;
}

.gb-super-game-footer {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 55%, #d97706 100%) !important;
}

.gb-super-game-footer .gb-footer-label {
  color: rgba(15, 23, 42, 0.65);
}

.gb-super-game-footer .gb-footer-value {
  color: #111827;
  font-weight: 800;
}

.gb-super-game-footer .gb-footer-refresh {
  color: #111827;
}

.gb-super-game-footer .gb-footer-refresh-label {
  color: rgba(15, 23, 42, 0.65);
}

/* Super Bingo cartela lock (stake 50 only) */
.gb-super-bingo .cartela-cell.cartela-locked {
  position: relative;
  background: #ffc107 !important;
  color: #111 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
}

.gb-super-bingo .cartela-cell .gb-cartela-lock-icon {
  position: absolute;
  top: 2px;
  right: 3px;
  font-size: 0.65rem;
  line-height: 1;
  pointer-events: none;
}

.gb-super-bingo .gb-cartela-slot--locked {
  position: relative;
}

.gb-super-bingo .gb-cartela-slot--locked .gb-slot-lock-icon {
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 0.75rem;
  line-height: 1;
  pointer-events: none;
}



/* ═══════════════════════════════════════════════════════════════
   PLAY WITH FRIEND — white home, clean responsive design
   ═══════════════════════════════════════════════════════════════ */

/* ── Container ── */
.friend_room_container {
  display: flex !important;
  flex-direction: column !important;
  position: fixed !important;
  inset: 0 !important;
  z-index: 50 !important;
  width: 100% !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  overflow: hidden !important;
  background: #ffffff !important;
}
.friend_room_container.hidden { display: none !important; }

/* ── HOME SCREEN (white) ── */
.fr-home {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  background: #ffffff;
}
.fr-home-header {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 24px 20px;
  background: #ffffff;
  text-align: center;
}
.fr-home-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 8px 24px rgba(245,158,11,0.28);
  margin-bottom: 14px;
}
.fr-home-logo {
  width: 88px;
  height: 88px;
  object-fit: contain;
  border-radius: 50%;
  margin-bottom: 14px;
  box-shadow: 0 8px 24px rgba(26, 43, 74, 0.18);
}
.fr-home-title {
  font-size: 1.35rem;
  font-weight: 900;
  color: #111827;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.fr-home-sub {
  font-size: 0.78rem;
  color: #6b7280;
  font-weight: 500;
  max-width: 260px;
  line-height: 1.5;
}
.fr-home-body {
  flex: 1;
  padding: 4px 16px calc(24px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ── Cards ── */
.fr-card {
  background: #f9fafb;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
}
.fr-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px 12px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #374151;
  border-bottom: 1px solid #e5e7eb;
}
.fr-card-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── Stake pills ── */
.fr-stake-pills {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
@media (min-width: 380px) {
  .fr-stake-pills {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
.fr-stake-pill {
  appearance: none;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
  color: #6b7280;
  font-size: 0.88rem;
  font-weight: 800;
  padding: 14px 4px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.fr-stake-pill.active {
  border-color: #f59e0b;
  background: #fffbeb;
  color: #92400e;
}
.fr-stake-pill-amount {
  display: block;
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1;
  color: inherit;
  margin-bottom: 2px;
}
.fr-stake-pill-label {
  display: block;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #9ca3af;
}
.fr-stake-pill.active .fr-stake-pill-label { color: #b45309; }

.fr-lobby-timer {
  width: 100%;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 800;
  color: #b45309;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 8px;
}
.fr-lobby-timer[hidden] { display: none !important; }

/* ── Create button ── */
.fr-btn-create {
  appearance: none;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
  color: #1a0e00;
  font-size: 1rem;
  font-weight: 900;
  padding: 15px 20px;
  text-align: center;
  cursor: pointer;
  width: 100%;
  box-shadow: 0 4px 14px rgba(245,158,11,0.30);
  transition: filter 0.15s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.fr-btn-create:active { filter: brightness(0.92); transform: scale(0.98); }

/* ── Divider ── */
.fr-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #9ca3af;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.fr-divider::before,
.fr-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

/* ── Join code input — full width, join button stacked below ── */
.fr-code-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  background: #ffffff;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  color: #111827;
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-align: center;
  padding: 14px 8px;
  outline: none;
  transition: border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.fr-code-input:focus { border-color: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,0.15); }
.fr-code-input::placeholder {
  color: #d1d5db;
  letter-spacing: 0.04em;
  font-size: 0.95rem;
  font-weight: 500;
}

/* ── Join button — full width below input ── */
.fr-btn-join {
  appearance: none;
  border: none;
  border-radius: 12px;
  background: #1d4ed8;
  color: #fff;
  font-size: 1rem;
  font-weight: 900;
  padding: 15px 20px;
  width: 100%;
  cursor: pointer;
  text-align: center;
  transition: filter 0.15s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.fr-btn-join:active { filter: brightness(0.88); transform: scale(0.98); }

/* ── LOBBY SCREEN ── */
.fr-lobby {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #f9fafb;
  overflow: hidden;
}
.fr-lobby-header {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
}
.fr-lobby-code-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}
.fr-lobby-code-lbl {
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9ca3af;
}
.fr-lobby-code-val {
  font-size: 1.45rem;
  font-weight: 900;
  color: #d97706;
  letter-spacing: 0.14em;
  line-height: 1.1;
}
.fr-lobby-stake-badge {
  padding: 4px 10px;
  border-radius: 999px;
  background: #fffbeb;
  border: 1.5px solid #fde68a;
  font-size: 0.78rem;
  font-weight: 800;
  color: #92400e;
  white-space: nowrap;
}
.fr-lobby-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.fr-btn-share {
  appearance: none;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  color: #374151;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 6px 10px;
  cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.fr-btn-share:active { background: #f3f4f6; }
.fr-btn-danger {
  appearance: none;
  border: 1.5px solid #fca5a5;
  border-radius: 8px;
  background: #fff5f5;
  color: #dc2626;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 6px 10px;
  cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.fr-btn-danger:active { background: #fee2e2; }

/* ── Members bar ── */
.fr-members-bar {
  flex-shrink: 0;
  padding: 10px 14px;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
}
.fr-members-title {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #9ca3af;
  margin-bottom: 8px;
}
.fr-members-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.fr-member-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px 5px 5px;
  border-radius: 999px;
  background: #f3f4f6;
  border: 1.5px solid #e5e7eb;
  font-size: 0.73rem;
  font-weight: 700;
  color: #374151;
  white-space: nowrap;
}
.fr-member-chip.is-host {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}
.fr-member-chip.is-me {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}
.fr-member-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 900;
  color: #6b7280;
  flex-shrink: 0;
  text-transform: uppercase;
}
.fr-member-chip.is-host .fr-member-avatar { background: #fef3c7; color: #b45309; }
.fr-member-chip.is-me  .fr-member-avatar { background: #dbeafe; color: #1d4ed8; }
.fr-member-cartela {
  font-size: 0.6rem;
  font-weight: 800;
  color: #16a34a;
  background: #dcfce7;
  padding: 1px 6px;
  border-radius: 999px;
}

/* ── Cartela section in lobby ── */
.fr-cartela-section {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 10px 14px 0;
}
.fr-cartela-section-title {
  flex-shrink: 0;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #9ca3af;
  margin-bottom: 8px;
}
.fr-cartela-grid-wrap {
  flex: 1;
  min-height: 0;
  background: #e9ecf0;
  border-radius: 14px;
  padding: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.fr-cartela-grid-wrap .gb-cartela-toast { margin: 0 0 8px; }
.fr-cartela-grid-wrap .cartela-grid {
  flex: 1;
  min-height: 0;
}

/* ── Slot row ── */
.fr-slots-row {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 8px 14px 0;
}

/* ── Start / waiting bar ── */
.fr-start-bar {
  flex-shrink: 0;
  padding: 10px 14px calc(12px + env(safe-area-inset-bottom, 0px));
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
}
.fr-btn-start {
  appearance: none;
  border: none;
  border-radius: 12px;
  width: 100%;
  padding: 16px 20px;
  font-size: 1rem;
  font-weight: 900;
  cursor: pointer;
  text-align: center;
  transition: filter 0.15s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.fr-btn-start.ready {
  background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(22,163,74,0.28);
}
.fr-btn-start.ready:active { filter: brightness(0.9); transform: scale(0.98); }
.fr-btn-start.not-ready {
  background: #f3f4f6;
  color: #9ca3af;
  cursor: not-allowed;
}
.fr-start-hint {
  text-align: center;
  font-size: 0.65rem;
  font-weight: 600;
  color: #9ca3af;
  margin-top: 6px;
}
.fr-waiting-msg {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px;
  border-radius: 12px;
  background: #f3f4f6;
  font-size: 0.82rem;
  font-weight: 700;
  color: #6b7280;
  text-align: center;
}
.fr-waiting-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f59e0b;
  flex-shrink: 0;
  animation: frPulse 1.4s ease-in-out infinite;
}
@keyframes frPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.35; transform: scale(0.7); }
}

/* ── Game screen (friend) reuses gb-game-shell grid ── */
.friend_room_container .gb-game-shell {
  display: grid !important;
  grid-template-columns: minmax(0, 40%) minmax(0, 60%);
  grid-template-rows: auto 1fr;
  row-gap: 0;
  column-gap: 12px;
  width: 100%;
  height: 100%;
  background: var(--gb-bg) !important;
  overflow: visible !important;
}
.friend_room_container .gb-game-stats { grid-column: 1 / -1; grid-row: 1; }
.friend_room_container .gb-board-side { grid-column: 1; grid-row: 2; }
.friend_room_container .gb-game-right { grid-column: 2; grid-row: 2; }

/* Legacy friend winner styles (unused — friend reuses .winner-modal) */
.fr-winner-overlay { display: none !important; }

/* ── Notice toast ── */
.fr-notice {
  flex-shrink: 0;
  display: none;
  margin: 0 0 8px;
  padding: 9px 14px;
  border-radius: 10px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s, transform 0.2s;
}
.fr-notice.fr-notice--visible {
  display: block;
  opacity: 1;
  transform: translateY(0);
}
