:root {
  color-scheme: light;
  --ink: #ffffff;
  --muted: rgba(255, 255, 255, 0.72);
  --panel: rgba(255, 255, 255, 0.12);
  --panel-strong: rgba(255, 255, 255, 0.18);
  --line: rgba(255, 255, 255, 0.26);
  --purple: #5f1bb0;
  --navy: #111a37;
  --teal: #00c994;
  --blue: #159cff;
  --gold: #f7c400;
  --orange: #ff7a1a;
  --red: #ff4d4f;
  --cell: rgba(255, 255, 255, 0.2);
  --shadow: 0 18px 42px rgba(9, 13, 34, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  background: #080914;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 18% 18%, rgba(146, 44, 213, 0.72), transparent 38%),
    linear-gradient(145deg, #64168d 0%, #151b3c 52%, #22217a 100%);
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.app-shell {
  width: min(600px, 100%);
  min-height: 100vh;
  margin: 0 auto;
}

.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  place-items: center;
  background: var(--bg);
}

.boot-screen span {
  width: 42px;
  height: 42px;
  border: 4px solid rgba(255, 255, 255, .2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: boot-spin .7s linear infinite;
}

.is-booting .app-shell { visibility: hidden; }
.is-booting .boot-screen { display: grid; }

@keyframes boot-spin {
  to { transform: rotate(360deg); }
}

.lobby-screen,
.game-screen {
  min-height: 100vh;
  padding: 18px 14px calc(16px + env(safe-area-inset-bottom));
}

.brand-header,
.game-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-header h1,
.game-header h1 {
  margin: 0;
  font-size: 1.6rem;
  line-height: 1.05;
}

.brand-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #8b18da;
  background: #fff;
  font-size: 1.8rem;
  font-weight: 950;
}

.eyebrow,
.game-header p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.icon-button,
.tiny-toggle,
.speaker-button,
.text-button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  font-weight: 900;
}

.icon-button {
  width: 54px;
  border-radius: 14px;
  font-size: 1.12rem;
}

.welcome-block {
  min-height: 220px;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
}

.welcome-block p {
  margin: 0 0 8px;
  color: var(--muted);
  font-weight: 800;
}

.welcome-block h2 {
  width: min(380px, 100%);
  margin: 0;
  font-size: clamp(2rem, 9vw, 3rem);
  line-height: 1.15;
}

.welcome-block h2::first-line {
  color: #fff;
}

.stake-panel,
.history-panel,
.card-stage,
.buy-drawer,
.table-strip {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow);
}

.stake-panel {
  padding: 16px;
}

.section-title {
  display: flex;
  justify-content: center;
  gap: 10px;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 950;
  margin-bottom: 16px;
}

.section-title span {
  color: var(--gold);
}

.room-list {
  display: grid;
  gap: 14px;
}

.room-card {
  min-height: 68px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(100deg, var(--teal), #0cb4c6);
  padding: 10px 14px;
  text-align: center;
  font-weight: 900;
}

.room-card:nth-child(2) {
  background: linear-gradient(100deg, #19b5ff, #623cff);
}

.room-card:nth-child(3) {
  background: linear-gradient(100deg, #f7c400, #ff7a1a);
}

.history-panel {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
}

.room-card strong {
  display: block;
  font-size: 1.35rem;
  line-height: 1;
}

.wallet-pill {
  min-width: 112px;
  display: grid;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.11);
  padding: 8px 10px;
  text-align: right;
}

.wallet-pill span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
}

.wallet-pill strong {
  font-size: 0.92rem;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.compact-title {
  margin-bottom: 0;
  justify-content: flex-start;
}

.history-list {
  display: grid;
  gap: 8px;
  max-height: 190px;
  overflow: auto;
}

.history-item,
.history-empty {
  display: grid;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  padding: 9px 10px;
  text-align: left;
}

.history-item strong,
.history-item span,
.history-item small {
  display: block;
}

.history-item span,
.history-item small,
.history-empty {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.buy-screen,
.game-screen {
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  background:
    linear-gradient(120deg, rgba(118, 36, 155, 0.95), rgba(26, 30, 67, 0.98)),
    var(--navy);
}

.buy-screen {
  min-height: 100dvh;
  overflow: hidden;
}

.buy-focus {
  display: grid;
  gap: 6px;
}

.buy-timer {
  min-height: 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: radial-gradient(circle at center, rgba(247, 196, 0, 0.28), rgba(255, 255, 255, 0.11) 58%);
  box-shadow: var(--shadow);
  padding: 8px 10px;
  text-align: left;
}

.buy-timer span,
.buy-timer small {
  color: var(--muted);
  font-weight: 900;
}

.buy-timer span,
.buy-timer small {
  grid-column: 1;
}

.buy-timer strong {
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 5px solid var(--gold);
  border-radius: 50%;
  color: #7b19d8;
  background: #fff;
  font-size: 1.05rem;
  font-weight: 950;
}

.game-header {
  min-height: 48px;
  text-align: center;
}

.game-header h1 {
  font-size: 1.2rem;
}

.text-button {
  color: #fff;
  background: linear-gradient(100deg, var(--red), var(--orange));
  padding: 0 14px;
}

.header-actions {
  display: flex;
  gap: 6px;
}

.tiny-toggle,
.speaker-button {
  width: 42px;
  padding: 0;
}

.tiny-toggle.enabled {
  background: var(--teal);
}

.top-metrics {
  display: grid;
  grid-template-columns: 1.25fr repeat(4, 1fr);
  gap: 6px;
  margin: 6px 0;
}

.top-metrics div {
  min-height: 48px;
  display: grid;
  align-content: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.13);
  padding: 7px;
}

.top-metrics span {
  min-width: 0;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.top-metrics strong {
  font-size: 0.98rem;
  overflow-wrap: anywhere;
}

.game-grid {
  display: grid;
  grid-template-columns: 46% minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.game-grid > *,
.play-column,
.called-board-wrap {
  min-width: 0;
}

.called-board-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  padding: 7px;
}

.call-board {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
}

.call-column {
  display: grid;
  gap: 5px;
}

.call-column-head,
.call-number {
  min-height: 25px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 7px;
  font-weight: 950;
}

.call-column-head {
  color: #fff;
}

.call-column-head.B {
  background: #159cff;
}

.call-column-head.I {
  background: #5f5cff;
}

.call-column-head.N {
  background: #b13dff;
}

.call-column-head.G {
  background: #00c26f;
}

.call-column-head.O {
  background: #ff6d1b;
}

.call-number {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  font-size: 0.72rem;
}

.call-number.called {
  color: #fff;
  background: #08b86f;
}

.call-number.latest {
  background: #e65d12;
  outline: 2px solid var(--gold);
}

.play-column {
  display: grid;
  gap: 8px;
}

.history-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.09);
  padding: 6px;
}

.last-calls {
  display: flex;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
}

.history-ball {
  min-width: 52px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #fff;
  background: #08b86f;
  font-weight: 950;
}

.history-ball.latest {
  background: #6157ff;
}

.current-ball {
  min-height: 94px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: radial-gradient(circle at center, rgba(255, 214, 0, 0.32), rgba(255, 255, 255, 0.09) 55%);
}

.ball {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border: 6px solid var(--gold);
  border-radius: 50%;
  color: #7b19d8;
  background: #fff;
  font-size: 1.42rem;
  font-weight: 950;
}

.mode-row {
  min-height: 38px;
  display: grid;
  grid-template-columns: 1fr 46px auto;
  gap: 6px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.1);
  padding: 5px 12px;
  font-weight: 900;
}

.mode-row > * {
  min-width: 0;
}

.switch {
  width: 46px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
  padding: 3px;
}

.switch span {
  width: 18px;
  height: 18px;
  display: block;
  border-radius: 50%;
  background: #9aa1b8;
  transition: transform 0.18s ease, background 0.18s ease;
}

.switch.is-on span {
  transform: translateX(22px);
  background: #00c26f;
}

.card-stage {
  min-height: 238px;
  padding: 8px;
  position: relative;
}

.watching-card {
  min-height: 216px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 22px;
  text-align: center;
}

.watching-card h2 {
  margin: 0;
  font-size: 1.42rem;
}

.watching-card p {
  width: min(220px, 100%);
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1rem;
  line-height: 1.45;
}

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

.play-card {
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  padding: 8px;
}

.play-card-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
}

.card-title-detail {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-title-detail span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-mode-lock {
  flex: 0 0 auto;
  width: 34px;
  min-width: 34px;
  min-height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.95rem;
  line-height: 1;
  padding: 0;
  opacity: 0.72;
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.card-mode-lock.is-manual,
.card-mode-lock.is-active {
  border-color: rgba(247, 196, 0, 0.95);
  color: #2d1d00;
  background: var(--gold);
  opacity: 1;
  box-shadow: 0 0 0 2px rgba(255, 209, 92, 0.35), 0 0 16px rgba(255, 196, 0, 0.35);
  transform: scale(1.05);
}

.toast-stack {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  right: 12px;
  z-index: 1200;
  width: min(340px, calc(100vw - 24px));
  display: grid;
  gap: 8px;
  pointer-events: none;
}

.winner-announcement {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(7, 13, 18, 0.9);
  backdrop-filter: blur(8px);
}

.winner-announcement.hidden { display: none; }

.winner-announcement-content {
  width: min(390px, 100%);
  display: grid;
  gap: 12px;
  text-align: center;
  animation: winner-card-in 260ms ease-out both;
}

.winner-announcement-content > p { margin: 0; color: var(--gold); font-weight: 950; text-transform: uppercase; }
.winner-announcement-content h2 { margin: 0; color: #fff; font-size: 1.45rem; letter-spacing: 0; }
.winner-announcement-content > strong { color: #44d6b0; font-size: 1.3rem; }
.winner-announcement-content .bingo-card { padding: 10px; border: 2px solid var(--gold); border-radius: 8px; background: #172534; box-shadow: 0 0 32px rgba(255, 209, 92, 0.3); }
.winner-announcement-content .bingo-cell { min-height: 48px; font-size: 1rem; }

@keyframes winner-card-in { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }

.app-toast {
  min-height: 46px;
  display: grid;
  grid-template-columns: 5px 1fr 30px;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #fff;
  background: rgba(20, 30, 40, 0.96);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
  pointer-events: auto;
  animation: toast-in 180ms ease-out both;
}

.app-toast.is-leaving { animation: toast-out 180ms ease-in both; }
.toast-indicator { align-self: stretch; background: #44d6b0; }
.app-toast.is-error .toast-indicator { background: #ff5d67; }
.toast-message { padding: 9px 0; font-size: 0.82rem; font-weight: 800; line-height: 1.35; }
.toast-close { width: 30px; height: 30px; padding: 0; border: 0; color: #fff; background: transparent; font-size: 1.25rem; }

@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toast-out { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-6px); } }

.bingo-card {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
}

.bingo-head,
.bingo-cell {
  min-height: 24px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  font-weight: 950;
}

.bingo-head {
  color: #fff;
  background: #159cff;
}

.bingo-cell {
  border: 1px solid var(--line);
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  padding: 0;
}

.bingo-cell.marked,
.bingo-cell.free {
  color: #fff;
  background: #06c979;
}

.bingo-cell.callable {
  outline: 2px solid var(--gold);
}

.bingo-claim,
.card-bingo-button {
  width: 100%;
  min-height: 52px;
  margin-top: 8px;
  border-radius: 14px;
  color: #281700;
  background: linear-gradient(100deg, var(--gold), var(--orange));
  font-weight: 950;
}

.bingo-claim:disabled {
  color: rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.18);
  cursor: not-allowed;
}

.bingo-claim.armed {
  box-shadow: 0 0 0 2px rgba(255, 209, 92, 0.26), 0 12px 32px rgba(255, 151, 57, 0.22);
}

.bingo-claim.punitive:not(:disabled) {
  background: linear-gradient(100deg, #ffcf5b, #ef6b4d);
}

.play-card.disqualified {
  opacity: 0.58;
  filter: grayscale(0.75);
}

.round-alert {
  position: fixed;
  left: 50%;
  bottom: 74px;
  z-index: 20;
  width: min(520px, calc(100vw - 28px));
  transform: translateX(-50%);
  border: 1px solid rgba(255, 209, 92, 0.55);
  border-radius: 12px;
  color: #fff;
  background: rgba(9, 24, 38, 0.94);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
  padding: 13px 16px;
  text-align: center;
  font-weight: 950;
  display: grid;
  gap: 4px;
  animation: alert-pop 420ms ease-out both;
}

.round-alert strong {
  font-size: 1.24rem;
}

.round-alert span {
  font-size: 0.92rem;
}

.round-alert.win-alert {
  border-color: rgba(255, 221, 94, 0.95);
  background: linear-gradient(135deg, rgba(9, 34, 28, 0.98), rgba(206, 126, 18, 0.94));
  box-shadow: 0 0 0 3px rgba(255, 209, 92, 0.18), 0 22px 70px rgba(255, 180, 49, 0.42);
}

.round-alert.loss-alert {
  border-color: rgba(255, 108, 108, 0.96);
  background: linear-gradient(135deg, rgba(62, 9, 20, 0.98), rgba(177, 28, 38, 0.95));
  box-shadow: 0 0 0 3px rgba(255, 88, 88, 0.18), 0 22px 70px rgba(208, 18, 42, 0.44);
}

.game-screen.round-lost {
  animation: red-end-pulse 1600ms ease-in-out infinite;
}

.game-screen.round-won .card-stage {
  box-shadow: 0 0 0 2px rgba(255, 209, 92, 0.26), 0 0 44px rgba(255, 209, 92, 0.28);
}

.fireworks {
  position: fixed;
  inset: 0;
  z-index: 21;
  pointer-events: none;
  overflow: hidden;
}

.fireworks span {
  position: absolute;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ffd15c;
  opacity: 0;
  animation: firework 900ms ease-out infinite;
  filter: drop-shadow(0 0 12px currentColor);
}

.fireworks.active::before,
.fireworks.active::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  opacity: 0;
  color: #ffd15c;
  animation: firework-mega 1200ms ease-out infinite;
  filter: drop-shadow(0 0 18px currentColor);
}

.fireworks.active::before {
  left: 50%;
  top: 24%;
}

.fireworks.active::after {
  left: 28%;
  top: 42%;
  color: #44d6b0;
  animation-delay: 220ms;
}

.fireworks span:nth-child(1) { left: 20%; top: 20%; animation-delay: 0ms; background: #44d6b0; }
.fireworks span:nth-child(2) { left: 34%; top: 16%; animation-delay: 180ms; background: #ffd15c; }
.fireworks span:nth-child(3) { left: 52%; top: 22%; animation-delay: 80ms; background: #ff7a59; }
.fireworks span:nth-child(4) { left: 68%; top: 18%; animation-delay: 260ms; background: #8fd3ff; }
.fireworks span:nth-child(5) { left: 78%; top: 30%; animation-delay: 120ms; background: #ffffff; }
.fireworks span:nth-child(6) { left: 44%; top: 34%; animation-delay: 320ms; background: #ffd15c; }

@keyframes firework {
  0% { opacity: 0; transform: scale(0.2); box-shadow: 0 0 0 0 currentColor; }
  20% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.28); box-shadow: 0 -82px 0 0 currentColor, 58px -58px 0 -1px currentColor, 86px 0 0 -1px currentColor, 58px 58px 0 -1px currentColor, 0 82px 0 0 currentColor, -58px 58px 0 -1px currentColor, -86px 0 0 -1px currentColor, -58px -58px 0 -1px currentColor, 0 -42px 0 4px rgba(255,255,255,0.9), 42px 0 0 3px rgba(255,255,255,0.7), 0 42px 0 3px rgba(255,255,255,0.8), -42px 0 0 3px rgba(255,255,255,0.7); }
}

@keyframes firework-mega {
  0% { opacity: 0; transform: scale(0.15) rotate(0deg); box-shadow: 0 0 0 0 currentColor; }
  18% { opacity: 1; }
  100% {
    opacity: 0;
    transform: scale(1.2) rotate(28deg);
    box-shadow:
      0 -140px 0 2px currentColor,
      100px -100px 0 0 #fff,
      140px 0 0 2px #ff7a59,
      100px 100px 0 0 currentColor,
      0 140px 0 2px #8fd3ff,
      -100px 100px 0 0 #fff,
      -140px 0 0 2px #ffd15c,
      -100px -100px 0 0 currentColor;
  }
}

@keyframes alert-pop {
  from { opacity: 0; transform: translateX(-50%) translateY(18px) scale(0.94); }
  to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

@keyframes red-end-pulse {
  0%, 100% { box-shadow: inset 0 0 0 rgba(255, 64, 64, 0); }
  50% { box-shadow: inset 0 0 95px rgba(255, 38, 54, 0.36); }
}

.buy-drawer {
  margin-top: 0;
  padding: 0;
}

.drawer-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  align-items: stretch;
}

.drawer-summary div {
  display: grid;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 5px 7px;
  background: rgba(255, 255, 255, 0.09);
}

.drawer-summary span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
}

.drawer-summary strong {
  font-size: 0.82rem;
}

.primary-button,
.ghost-button {
  min-height: 38px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(100deg, var(--teal), #0cb4c6);
  font-weight: 950;
}

.primary-button:disabled {
  opacity: 0.5;
}

.card-id-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  height: min(430px, calc(100dvh - 236px));
  overflow-y: auto;
  overflow-x: hidden;
  margin-top: 6px;
  padding-bottom: 4px;
}

.card-id-tile {
  min-height: 48px;
  display: grid;
  align-content: center;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  padding: 4px 5px;
  text-align: left;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(0, 194, 111, 0.28);
  user-select: none;
}

.card-id-tile strong {
  font-size: 0.72rem;
}

.card-id-tile span {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
}

.card-id-tile.selected {
  background: #00c26f;
}

.card-id-tile.held {
  opacity: 0.52;
}

.card-id-tile.taken {
  opacity: 0.42;
  border-style: dashed;
  background: rgba(255, 255, 255, 0.06);
}

.card-id-tile.owned {
  opacity: 1;
  border-style: solid;
  border-color: #22c55e;
  background: #14532d;
  color: #fff;
}

.card-id-tile.owned span {
  color: #dcfce7;
}

.card-id-tile.pending {
  opacity: .65;
  cursor: wait;
}

.selected-preview {
  display: none;
}

.ghost-button {
  background: rgba(255, 255, 255, 0.14);
}

.form-error {
  min-height: 18px;
  margin: 6px 0 0;
  color: #ffd1d1;
  font-size: 0.78rem;
  font-weight: 850;
}

.form-error.success {
  color: #a7ffd9;
}

.table-strip {
  margin-top: 6px;
  padding: 5px;
}

#participantList {
  display: flex;
  gap: 6px;
  overflow: auto;
}

.participant-chip,
.winner-row,
.empty-inline {
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  padding: 7px 10px;
  font-size: 0.78rem;
  font-weight: 850;
  white-space: nowrap;
}

.winner-panel {
  margin-top: 8px;
}

.hidden {
  display: none !important;
}

@media (max-width: 430px) {
  .lobby-screen {
    padding-top: 16px;
  }

  .brand-header h1 {
    font-size: 1.35rem;
  }

  .welcome-block {
    min-height: 210px;
  }

  .welcome-block h2 {
    font-size: 2.24rem;
  }

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

  .call-board {
    gap: 5px;
  }

  .call-column {
    gap: 4px;
  }

  .call-column-head,
  .call-number {
    min-height: 24px;
  }

  .current-ball {
    min-height: 92px;
  }

  .card-stage {
    min-height: 232px;
  }

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

@media (max-width: 370px) {
  .top-metrics span {
    font-size: 0.62rem;
  }

  .top-metrics strong {
    font-size: 0.84rem;
  }

  .call-column-head,
  .call-number {
    min-height: 24px;
    font-size: 0.66rem;
  }

  .ball {
    width: 72px;
    height: 72px;
    font-size: 1.32rem;
  }

  .mode-row {
    grid-template-columns: minmax(0, 1fr) 46px 54px;
    padding-inline: 8px;
    font-size: 0.78rem;
  }

  .card-stage {
    padding: 5px;
  }

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

  .drawer-summary button {
    min-height: 34px;
  }
}
