/* Bingoo player theme — compact Telegram Mini App interface */
:root {
  --bingoo-bg: #0c0d14;
  --bingoo-panel: #171821;
  --bingoo-panel-raised: #20212c;
  --bingoo-line: #2c2e3c;
  --bingoo-text: #f4f5f8;
  --bingoo-muted: #a3a8b8;
  --bingoo-pink: #df145f;
  --bingoo-pink-light: #ff5b98;
  --bingoo-cyan: #25c7e8;
  --bingoo-green: #25dc70;
  --bingoo-purple: #a83bd4;
  --bingoo-yellow: #f2d129;
}

#root {
  color-scheme: dark;
  font-family: "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
}

#root *, #root *::before, #root *::after { box-sizing: border-box; }
#root button, #root [role="button"], #root [data-card-id] { -webkit-tap-highlight-color: transparent; }
#root button { cursor: pointer; }
#root button:focus-visible, #root [data-card-id]:focus-visible {
  outline: 2px solid var(--bingoo-cyan);
  outline-offset: 2px;
}

#root > div.flex.flex-col.h-screen {
  min-height: 100dvh;
  height: 100dvh;
  background: var(--bingoo-bg) !important;
  color: var(--bingoo-text);
}

#root .bg-purple-300,
#root .bg-purple-100.md\:py-6,
#root .bg-slate-900 {
  background: var(--bingoo-bg) !important;
  color: var(--bingoo-text) !important;
}

#root .bg-purple-600,
#root .bg-indigo-600,
#root .bg-purple-900 {
  background: #11121a !important;
  color: var(--bingoo-text) !important;
  border-bottom: 1px solid var(--bingoo-line);
}

#root .bg-purple-600 > div {
  gap: 6px;
  padding: 8px;
}

#root .bg-purple-600 .bg-purple-100 {
  min-width: 0;
  flex: 1;
  gap: 4px;
  padding: 8px 6px;
  border: 1px solid var(--bingoo-line);
  border-radius: 6px;
  background: var(--bingoo-panel-raised) !important;
  color: var(--bingoo-muted) !important;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
}

#root .bg-purple-600 .bg-purple-100 span:last-child {
  margin-left: 2px;
  color: var(--bingoo-text) !important;
  font-weight: 800;
}

#root .text-purple-800 { color: var(--bingoo-text) !important; }
#root .text-purple-600,
#root .text-gray-600,
#root .text-gray-400 { color: var(--bingoo-muted) !important; }

#root .flex-1.overflow-y-auto.bg-purple-300 {
  background: var(--bingoo-bg) !important;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--bingoo-line) transparent;
}

#root .flex.items-center.p-2:has(> button.flex.items-center.text-purple-800) {
  min-height: 36px;
  padding: 4px 8px;
}

#root button.flex.items-center.text-purple-800 {
  min-height: 32px;
  color: var(--bingoo-muted) !important;
  font-size: 12px;
  font-weight: 700;
}
#root button.flex.items-center.text-purple-800:hover { color: var(--bingoo-cyan) !important; }

#root .px-2.md\:px-0.md\:max-w-6xl:has([data-card-id]) {
  padding: 0 6px 8px;
}

#root .grid.grid-cols-10:has(> [data-card-id]) {
  gap: 3px !important;
  padding: 4px 0 8px;
}

#root [data-card-id] {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 28px;
  padding: 4px 0 !important;
  border: 1px solid #242631;
  border-radius: 3px !important;
  background: #15161f !important;
  color: #c8cbd5 !important;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  transition: background-color 140ms ease-out, border-color 140ms ease-out, transform 140ms ease-out;
}

#root [data-card-id]:hover {
  border-color: var(--bingoo-pink-light);
  color: #ffffff !important;
}
#root [data-card-id]:active { transform: scale(0.94); }

#root [data-card-id].bg-green-600,
#root [data-card-id].bg-green-500,
#root [data-card-id][title^="Your card"] {
  border-color: var(--bingoo-pink-light) !important;
  background: var(--bingoo-pink) !important;
  color: #ffffff !important;
}

#root [data-card-id].bg-red-500,
#root [data-card-id].bg-red-600,
#root [data-card-id][title^="Booked"] {
  border-color: #67132f !important;
  background: #481022 !important;
  color: #d98aa8 !important;
}

#root [data-card-id].bg-yellow-400,
#root [data-card-id].bg-yellow-500,
#root [data-card-id][title^="Previewing"] {
  border-color: #ffe678 !important;
  background: #9b7d12 !important;
  color: #ffffff !important;
}

#root [data-card-id] .bg-green-300 {
  background: #ffc0d7 !important;
}

#root .flex.justify-between.px-4:has(> button.bg-purple-500) {
  gap: 12px;
  padding: 6px 4px 12px;
}

#root button.bg-purple-500,
#root button.bg-orange-600 {
  min-height: 44px;
  border: 0;
  border-radius: 7px !important;
  color: #071217 !important;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.02em;
  transition: filter 140ms ease-out, transform 140ms ease-out;
}

#root button.bg-purple-500 {
  background: var(--bingoo-cyan) !important;
}

#root button.bg-orange-600 {
  background: var(--bingoo-pink) !important;
  color: #ffffff !important;
}

#root button.bg-purple-500:hover,
#root button.bg-orange-600:hover { filter: brightness(1.12); }
#root button.bg-purple-500:active,
#root button.bg-orange-600:active { transform: scale(0.97); }

#root .text-center.text-purple-800.bg-purple-300 {
  padding: 8px;
  border-top: 1px solid #171923;
  background: var(--bingoo-bg) !important;
  color: #777d90 !important;
  font-size: 11px;
}

/* Card preview and dialogs */
#root .fixed.inset-0.bg-black { background: rgba(4, 5, 10, 0.82) !important; }
#root .fixed .bg-purple-100,
#root .fixed .bg-gray-800 {
  border: 1px solid var(--bingoo-line);
  border-radius: 12px !important;
  background: var(--bingoo-panel) !important;
  color: var(--bingoo-text) !important;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.42);
}
#root .fixed .bg-purple-300 { background: var(--bingoo-panel-raised) !important; }
#root .fixed button.bg-green-600 { background: var(--bingoo-pink) !important; }
#root .fixed button.bg-gray-500 { background: #3a3d4b !important; }

/* Active game surfaces and controls */
#root .bg-white { background: var(--bingoo-panel) !important; }
#root .bg-gray-100,
#root .bg-gray-200 { background: var(--bingoo-panel-raised) !important; }
#root .text-gray-800,
#root .text-gray-900 { color: var(--bingoo-text) !important; }
#root .border-gray-300,
#root .border-gray-400 { border-color: var(--bingoo-line) !important; }
#root button.bg-blue-500,
#root button.bg-blue-600 { background: var(--bingoo-cyan) !important; }
#root button.bg-green-500,
#root button.bg-green-600 { background: var(--bingoo-green) !important; }
#root button.bg-red-500,
#root button.bg-red-600 { background: var(--bingoo-pink) !important; }

@media (min-width: 768px) {
  #root [data-card-id] { min-height: 34px; font-size: 14px; }
  #root .grid.grid-cols-10:has(> [data-card-id]) { gap: 5px !important; }
}

@media (prefers-reduced-motion: reduce) {
  #root *, #root *::before, #root *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}


/* Live number-calling screen */
#root > div:has(.flex.flex-col.items-center.w-full.max-w-md.mx-auto.px-4.md\:hidden) > .bg-purple-600 > .text-center.py-2.text-cyan-400 {
  display: none;
}

#root .flex-1 > .flex.items-center.p-2:empty { display: none; }

#root .flex.flex-col.items-center.w-full.max-w-md.mx-auto.px-4.md\:hidden {
  width: 100%;
  max-width: 410px;
  padding: 0 8px 8px;
  color: var(--bingoo-text);
}

#root .max-w-md.md\:hidden > .flex.justify-between.p-2.gap-1.bg-purple-600.mb-3.w-full {
  gap: 6px;
  margin-bottom: 10px;
  padding: 0;
  border: 0;
  background: transparent !important;
}

#root .max-w-md.md\:hidden > .flex.justify-between > .text-center.flex.gap-2.bg-purple-700 {
  min-width: 0;
  min-height: 46px;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  padding: 5px 4px;
  border: 1px solid var(--bingoo-line);
  border-radius: 6px;
  background: var(--bingoo-panel-raised) !important;
}

#root .max-w-md.md\:hidden > .flex.justify-between .text-purple-200 {
  color: var(--bingoo-muted) !important;
  font-size: 10px;
  line-height: 1.1;
}

#root .max-w-md.md\:hidden > .flex.justify-between .text-white {
  color: var(--bingoo-text) !important;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.1;
}

#root .max-w-md.md\:hidden > .flex.justify-between > .text-center.flex:last-child {
  min-height: 46px;
  flex: 0 0 44px;
  padding: 0;
  border-color: #34304d;
  background: #211b35 !important;
}

#root .max-w-md.md\:hidden > .flex.justify-between button.bg-purple-700 {
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  color: #c5a6ff !important;
}

#root .max-w-md.md\:hidden > .flex.w-full {
  align-items: flex-start;
  gap: 5px;
}

#root .max-w-md.md\:hidden > .flex.w-full > .w-1\/2:first-child {
  width: 46%;
  padding: 0;
}

#root .max-w-md.md\:hidden > .flex.w-full > .w-1\/2:last-child {
  width: 54%;
  padding: 0 0 0 3px;
}

/* The 75-number called-number board */
#root .max-w-md.md\:hidden .w-1\/2:first-child > .flex.justify-center.gap-2 {
  gap: 4px;
  margin-bottom: 5px;
}

#root .max-w-md.md\:hidden .w-1\/2:first-child > .flex.justify-center.gap-2 > div {
  width: 20px;
  height: 20px;
  background: transparent !important;
  color: var(--bingoo-yellow) !important;
  font-size: 12px;
  font-weight: 900;
}

#root .max-w-md.md\:hidden .w-1\/2:first-child > .flex.justify-center.gap-2 > div:nth-child(2) { color: var(--bingoo-cyan) !important; }
#root .max-w-md.md\:hidden .w-1\/2:first-child > .flex.justify-center.gap-2 > div:nth-child(3) { color: var(--bingoo-green) !important; }
#root .max-w-md.md\:hidden .w-1\/2:first-child > .flex.justify-center.gap-2 > div:nth-child(4) { color: var(--bingoo-pink-light) !important; }
#root .max-w-md.md\:hidden .w-1\/2:first-child > .flex.justify-center.gap-2 > div:nth-child(5) { color: #c084fc !important; }

#root .max-w-md.md\:hidden .w-1\/2:first-child > .grid.grid-cols-5.gap-1.text-xs {
  gap: 2px;
  padding: 5px;
  border: 1px solid #222430;
  border-radius: 5px;
  background: #101119;
}

#root .max-w-md.md\:hidden .w-1\/2:first-child > .grid.grid-cols-5 > div {
  display: flex;
  min-width: 0;
  height: 18px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid #252733;
  border-radius: 2px;
  background: #191a24 !important;
  color: #c6c9d4 !important;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

#root .max-w-md.md\:hidden .w-1\/2:first-child > .grid.grid-cols-5 > div.bg-green-600 {
  border-color: #1dbb60;
  background: #153d2a !important;
  color: #57ef98 !important;
}

#root .max-w-md.md\:hidden .w-1\/2:first-child > .grid.grid-cols-5 > div.bg-orange-500 {
  border-color: #ffe678;
  background: #8c7417 !important;
  color: #ffffff !important;
  box-shadow: 0 0 8px rgba(242, 209, 41, 0.25);
}

/* Current and recent calls */
#root .max-w-md.md\:hidden .w-1\/2:last-child > .bg-purple-200 {
  min-height: 50px;
  margin-bottom: 2px;
  padding: 0;
  border-radius: 0;
  background: transparent !important;
}

#root .max-w-md.md\:hidden .w-1\/2:last-child > .bg-purple-200 > .text-sm {
  color: var(--bingoo-muted) !important;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#root .max-w-md.md\:hidden .w-1\/2:last-child > .bg-purple-200 > .bg-orange-500.w-9.h-9 {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border: 2px solid #e7c7ff;
  background: radial-gradient(circle at 35% 28%, #e98cff 0, #a83bd4 42%, #6b1d9b 100%) !important;
  color: #ffffff !important;
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 0 10px rgba(196, 93, 255, 0.78), 0 0 24px rgba(168, 59, 212, 0.42);
}

#root .max-w-md.md\:hidden .w-1\/2:last-child > .flex.justify-center.space-x-1 {
  justify-content: flex-end;
  gap: 4px;
  min-height: 25px;
  margin-bottom: 2px;
}

#root .max-w-md.md\:hidden .w-1\/2:last-child > .flex.justify-center.space-x-1 > .bg-orange-500 {
  display: flex;
  width: 23px;
  height: 23px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 50%;
  background: #7534ad !important;
  color: #ffffff !important;
  font-size: 8px;
  font-weight: 800;
  box-shadow: 0 0 7px rgba(168, 59, 212, 0.35);
}

#root .max-w-md.md\:hidden .w-1\/2:last-child > .flex.justify-center.space-x-1 > .bg-orange-500:nth-child(2) { background: #168ba8 !important; }
#root .max-w-md.md\:hidden .w-1\/2:last-child > .flex.justify-center.space-x-1 > .bg-orange-500:nth-child(3) { background: #1d9e59 !important; }

#root .max-w-md.md\:hidden .w-1\/2:last-child > .flex.items-center.justify-end.mb-1 {
  min-height: 22px;
  margin-bottom: 4px;
}

#root .max-w-md.md\:hidden .w-1\/2:last-child > .flex.items-center.justify-end > span {
  color: var(--bingoo-muted) !important;
  font-size: 10px;
}

#root .max-w-md.md\:hidden .toggle-label {
  height: 14px;
  border-radius: 999px;
  background: #424655 !important;
}

#root .max-w-md.md\:hidden .toggle-checkbox {
  width: 14px;
  height: 14px;
  border-color: #d8dce5;
  background: #ffffff !important;
}

#root .max-w-md.md\:hidden .toggle-checkbox:checked + .toggle-label {
  background: var(--bingoo-green) !important;
}

/* Player Bingo card */
#root .max-w-md.md\:hidden .w-1\/2:last-child .snap-center > .relative.rounded-lg {
  border: 2px solid var(--bingoo-line) !important;
  border-radius: 6px;
  background: #11121a;
  box-shadow: none;
}

#root .max-w-md.md\:hidden .snap-center .grid.grid-cols-5 {
  gap: 1px;
  background: #2a2c38 !important;
}

#root .max-w-md.md\:hidden .snap-center .grid.grid-cols-5:first-child > div {
  padding: 4px 0;
  background: #15161f !important;
  color: var(--bingoo-yellow) !important;
  font-size: 11px;
  font-weight: 900;
}

#root .max-w-md.md\:hidden .snap-center .grid.grid-cols-5:first-child > div:nth-child(2) { color: var(--bingoo-cyan) !important; }
#root .max-w-md.md\:hidden .snap-center .grid.grid-cols-5:first-child > div:nth-child(3) { color: var(--bingoo-green) !important; }
#root .max-w-md.md\:hidden .snap-center .grid.grid-cols-5:first-child > div:nth-child(4) { color: var(--bingoo-pink-light) !important; }
#root .max-w-md.md\:hidden .snap-center .grid.grid-cols-5:first-child > div:nth-child(5) { color: #c084fc !important; }

#root .max-w-md.md\:hidden .snap-center .grid.grid-cols-5:last-child > div {
  min-width: 0;
  border: 0;
  background: #191a24 !important;
  color: #d6d9e2 !important;
  font-size: 11px;
  font-weight: 700;
}

#root .max-w-md.md\:hidden .snap-center .grid.grid-cols-5:last-child > div.bg-green-400,
#root .max-w-md.md\:hidden .snap-center .grid.grid-cols-5:last-child > div.bg-green-500,
#root .max-w-md.md\:hidden .snap-center .grid.grid-cols-5:last-child > div.bg-green-600 {
  background: #17623b !important;
  color: #7dffaf !important;
}

#root .max-w-md.md\:hidden .snap-center .grid.grid-cols-5:last-child > div.bg-yellow-400,
#root .max-w-md.md\:hidden .snap-center .grid.grid-cols-5:last-child > div.bg-orange-500 {
  background: #8c7417 !important;
  color: #ffffff !important;
}

#root .max-w-md.md\:hidden .w-1\/2:last-child > .mt-1.text-center {
  margin-top: 5px;
}

#root .max-w-md.md\:hidden .w-1\/2:last-child > .mt-1.text-center .text-purple-900 {
  color: var(--bingoo-muted) !important;
  font-size: 10px;
}

#root .max-w-md.md\:hidden .w-1\/2:last-child > .mt-2.text-center {
  margin-top: 7px;
}

#root .max-w-md.md\:hidden button.bg-orange-500 {
  min-height: 34px;
  padding: 5px 12px;
  border-radius: 6px;
  background: var(--bingoo-pink) !important;
  color: #ffffff !important;
  font-size: 14px;
  font-weight: 900;
}

#root .max-w-md.md\:hidden .w-1\/2:last-child > .flex.justify-center.mt-2.gap-2 {
  gap: 7px;
  margin-top: 7px;
}

#root .max-w-md.md\:hidden .w-1\/2:last-child > .flex.justify-center.mt-2.gap-2 > button {
  min-height: 32px;
  padding: 5px 13px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
}

#root .max-w-md.md\:hidden button.bg-red-600 {
  background: #30323e !important;
  color: #c4c8d4 !important;
}

#root .max-w-md.md\:hidden button.bg-blue-600 {
  background: var(--bingoo-cyan) !important;
  color: #071217 !important;
}

@media (max-width: 350px) {
  #root .flex.flex-col.items-center.w-full.max-w-md.mx-auto.px-4.md\:hidden { padding-right: 5px; padding-left: 5px; }
  #root .max-w-md.md\:hidden .w-1\/2:first-child > .grid.grid-cols-5 > div { height: 17px; font-size: 9px; }
  #root .max-w-md.md\:hidden .snap-center .grid.grid-cols-5:last-child > div { font-size: 10px; }
}

/* Immediate viewport-level dialog using the native React card controls */
#root .bingoo-native-preview { display: none !important; }

#bingoo-card-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  width: 100vw;
  height: 100dvh;
  pointer-events: auto;
}

#bingoo-card-mount {
  display: flex;
  width: 100%;
  justify-content: center;
}

#bingoo-card-dialog {
  font-family: "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
}

#bingoo-card-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(4, 5, 10, 0.68);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}

#bingoo-card-dialog {
  position: fixed !important;
  inset: 50% auto auto 50% !important;
  z-index: 70;
  width: calc(100vw - 40px) !important;
  max-width: 250px !important;
  transform: translate(-50%, -50%);
  max-height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 24px);
  margin: 0 auto !important;
  padding: 10px !important;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid #3b3e4d !important;
  border-radius: 12px !important;
  background: #171821 !important;
  color: var(--bingoo-text) !important;
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.58);
  scrollbar-width: thin;
  scrollbar-color: var(--bingoo-line) transparent;
}

#bingoo-card-dialog::before {
  content: "Card preview";
  display: block;
  margin-bottom: 7px;
  color: var(--bingoo-text);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
}

#bingoo-card-dialog > .flex.flex-col.items-center {
  width: 100%;
  gap: 0;
}

#bingoo-card-dialog .flex.mt-4.space-x-4 {
  order: -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  gap: 8px;
  margin: 0 0 9px !important;
}

#bingoo-card-dialog .flex.mt-4.space-x-4 > button {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  margin: 0 !important;
  padding: 8px 6px !important;
  border: 0;
  border-radius: 7px !important;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  transition: filter 140ms ease-out, transform 140ms ease-out;
}

#bingoo-card-dialog .flex.mt-4.space-x-4 > button:first-child {
  background: var(--bingoo-pink) !important;
  color: #ffffff !important;
}

#bingoo-card-dialog .flex.mt-4.space-x-4 > button:last-child {
  background: #363946 !important;
  color: #f4f5f8 !important;
}

#bingoo-card-dialog .flex.mt-4.space-x-4 > button:hover { filter: brightness(1.12); }
#bingoo-card-dialog .flex.mt-4.space-x-4 > button:active { transform: scale(0.97); }

#bingoo-card-dialog .relative.rounded-lg.overflow-hidden {
  width: min(100%, 200px) !important;
  border: 1px solid #3b3e4d !important;
  border-radius: 8px !important;
  background: #101119 !important;
  box-shadow: none !important;
}

#bingoo-card-dialog .relative .grid.grid-cols-5 {
  gap: 1px !important;
  background: #303240 !important;
}

#bingoo-card-dialog .relative .grid.grid-cols-5:first-child > div {
  min-height: 22px;
  padding: 3px 0 !important;
  font-size: 11px;
  font-weight: 900;
}

#bingoo-card-dialog .relative .grid.grid-cols-5:first-child > div:nth-child(1) { background: #254a9b !important; }
#bingoo-card-dialog .relative .grid.grid-cols-5:first-child > div:nth-child(2) { background: #bd2852 !important; }
#bingoo-card-dialog .relative .grid.grid-cols-5:first-child > div:nth-child(3) { background: #16854b !important; }
#bingoo-card-dialog .relative .grid.grid-cols-5:first-child > div:nth-child(4) { background: #9a7416 !important; }
#bingoo-card-dialog .relative .grid.grid-cols-5:first-child > div:nth-child(5) { background: #8b3ba7 !important; }

#bingoo-card-dialog .relative .grid.grid-cols-5:last-child > div {
  min-height: 26px;
  padding: 3px 0 !important;
  background: #20212c !important;
  color: #f4f5f8 !important;
  font-size: 11px;
  font-weight: 800;
}

#bingoo-card-dialog .relative .grid.grid-cols-5:last-child > div.bg-green-400,
#bingoo-card-dialog .relative .grid.grid-cols-5:last-child > div.bg-green-500,
#bingoo-card-dialog .relative .grid.grid-cols-5:last-child > div.bg-green-600 {
  background: #17623b !important;
  color: #a3ffc7 !important;
}

@media (min-width: 480px) {
  #bingoo-card-dialog {
    width: 250px !important;
    transform: translate(-50%, -50%);
  }
}

@media (max-height: 620px) {
  #bingoo-card-dialog { padding: 10px 12px !important; }
  #bingoo-card-dialog::before { margin-bottom: 6px; font-size: 12px; }
  #bingoo-card-dialog .flex.mt-4.space-x-4 { margin-bottom: 8px !important; }
  #bingoo-card-dialog .relative .grid.grid-cols-5:first-child > div { min-height: 20px; padding: 3px 0 !important; }
  #bingoo-card-dialog .relative .grid.grid-cols-5:last-child > div { min-height: 24px; padding: 3px 0 !important; }
}


/* Reference-aligned card-selection status header */
#root .bingoo-selection-header {
  padding: 0;
  border-bottom: 1px solid #16413f;
  background: #111923 !important;
  color: var(--bingoo-text);
}

#root .bingoo-selection-primary,
#root .bingoo-selection-status,
#root .bingoo-selection-win {
  width: 100%;
  max-width: 1152px;
  margin: 0 auto;
}

#root .bingoo-selection-primary {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 8px 12px;
  border-bottom: 1px solid #25303c;
}

#root .bingoo-refresh-button {
  min-width: 76px;
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid #33738a;
  border-radius: 999px;
  background: #152630;
  color: #d7edf3;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 1px rgba(85, 205, 232, .08), 0 0 12px rgba(37, 199, 232, .1);
  transition: border-color .16s ease, background-color .16s ease, transform .1s ease;
}
#root .bingoo-refresh-button:hover { border-color: var(--bingoo-cyan); background: #19313d; }
#root .bingoo-refresh-button:active { transform: scale(.96); }

#root .bingoo-selection-balance {
  display: flex;
  min-width: 78px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
  white-space: nowrap;
}
#root .bingoo-selection-balance > span {
  color: #9faaba;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}
#root .bingoo-selection-balance > strong {
  margin-top: 3px;
  color: #25edac;
  font-size: 15px;
  font-weight: 900;
}

#root .bingoo-announcement {
  position: relative;
  min-width: 0;
  height: 24px;
  overflow: hidden;
  border: 1px solid #35382b;
  border-radius: 999px;
  background: #151919;
  color: #f4df28;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, .24);
}
#root .bingoo-announcement-track {
  display: flex;
  width: max-content;
  height: 100%;
  align-items: center;
  animation: bingoo-announcement-scroll 18s linear infinite;
  will-change: transform;
}
#root .bingoo-announcement-track > span {
  flex: 0 0 auto;
  padding-right: 38px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}
#root .bingoo-announcement-track > span:first-child { padding-left: 12px; }
@keyframes bingoo-announcement-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

#root .bingoo-selection-status {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 6px 12px;
  border-bottom: 1px solid #25303c;
}
#root .bingoo-connection {
  display: inline-flex;
  width: fit-content;
  min-height: 32px;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border-radius: 999px;
  background: #142b2b;
  color: #25edac;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}
#root .bingoo-connection-dot {
  width: 11px;
  height: 11px;
  flex: 0 0 11px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 9px currentColor;
}
#root .bingoo-connection.is-disconnected { background: #30261b; color: #ffbd55; }
#root .bingoo-selection-countdown {
  display: flex;
  min-width: 74px;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 12px;
  border-radius: 999px;
  background: #182029;
  color: #f4df28;
  font-size: 12px;
  white-space: nowrap;
}
#root .bingoo-selection-countdown strong { font-size: 19px; line-height: 1; }
#root .bingoo-countdown-icon { font-size: 21px; line-height: 1; }
#root .bingoo-selection-stake {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 5px;
  color: #9faaba;
  font-size: 12px;
  white-space: nowrap;
}
#root .bingoo-selection-stake strong { color: var(--bingoo-cyan); font-size: 14px; }

#root .bingoo-selection-win {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 12px;
  background: #102728;
  color: #a8b6ba;
  font-size: 13px;
}
#root .bingoo-selection-win strong { color: #25edac; font-size: 17px; }

@media (max-width: 430px) {
  #root .bingoo-selection-primary { gap: 7px; padding-inline: 9px; }
  #root .bingoo-refresh-button { min-width: 68px; padding-inline: 9px; font-size: 10px; }
  #root .bingoo-selection-balance { min-width: 68px; }
  #root .bingoo-selection-balance > strong { font-size: 14px; }
  #root .bingoo-selection-status { gap: 5px; padding-inline: 8px; }
  #root .bingoo-connection { gap: 5px; padding-inline: 8px; font-size: 9px; }
  #root .bingoo-selection-countdown { min-width: 64px; padding-inline: 9px; }
  #root .bingoo-selection-stake { gap: 3px; font-size: 11px; }
  #root .bingoo-selection-stake strong { font-size: 12px; }
}

#root .bingoo-mobile-game-summary {
  max-height: none;
  align-items: flex-start;
  overflow: visible;
}
#root .bingoo-mobile-game-summary > div {
  min-width: 0;
  max-height: none;
  overflow: visible;
}
#root .bingoo-mobile-game-summary > div:first-child { padding-right: 4px; }
#root .bingoo-mobile-card-column { align-self: stretch; }

#root .bingoo-active-cards {
  width: 100%;
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid rgba(127, 151, 166, .24);
}
#root .bingoo-card-page-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 4px;
}
#root .bingoo-card-page-label {
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}
#root .bingoo-card-page-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
#root .bingoo-card-page-button {
  width: 30px;
  min-width: 30px;
  min-height: 26px;
  padding: 0;
  border-radius: 999px;
  font-size: 22px;
  font-weight: 750;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}
#root .bingoo-active-card-page {
  display: flex;
  width: 100%;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
}
#root .bingoo-active-card-page-mobile {
  flex-direction: column;
  gap: 6px;
}
#root .bingoo-active-card {
  min-width: 0;
}
#root .bingoo-active-card-page-mobile .bingoo-active-card {
  width: 100%;
  flex: 0 0 100%;
}
#root .bingoo-active-card-page-desktop.is-two .bingoo-active-card {
  width: calc(50% - 4px);
  flex: 0 1 calc(50% - 4px);
}
#root .bingoo-active-card-page-desktop.is-three .bingoo-active-card {
  width: calc(33.333333% - 6px);
  flex: 0 1 calc(33.333333% - 6px);
}
#root .bingoo-active-card > .relative { width: 100%; }
#root .bingoo-active-card-number {
  margin-bottom: 3px;
  font-size: 10px;
  line-height: 1.2;
  text-align: center;
}
#root .bingoo-active-card-number > span { font-weight: 850; }
#root .bingoo-active-card .grid.grid-cols-5 > div { min-width: 0; }
#root .bingoo-active-card .aspect-square {
  font-size: clamp(9px, 2.8vw, 14px);
  line-height: 1;
}
#root .bingoo-active-card .grid.grid-cols-5:first-child > div {
  padding-block: 3px;
  font-size: clamp(9px, 2.6vw, 13px);
  line-height: 1;
}
#root .bingoo-active-card-page-mobile .aspect-square {
  height: clamp(19px, 7vw, 28px);
  aspect-ratio: auto;
}
#root .bingoo-active-card-page-mobile .grid.grid-cols-5:first-child > div { padding-block: 2px; }
#root .bingoo-active-game-actions { margin-top: 4px; }
#root .bingoo-active-card-page-mobile + .bingoo-active-game-actions .mt-2 { margin-top: 2px; }

@media (min-width: 768px) {
  #root .bingoo-card-page-label { font-size: 15px; }
  #root .bingoo-card-page-button { width: 34px; min-width: 34px; min-height: 30px; padding: 0; font-size: 24px; }
  #root .bingoo-active-card-number { font-size: 12px; }
  #root .bingoo-active-card .aspect-square { font-size: clamp(10px, 1.2vw, 15px); }
  #root .bingoo-active-card .grid.grid-cols-5:first-child > div { font-size: 13px; }
}

@media (min-width: 768px) and (max-width: 1199px) {
  #root .bingoo-desktop-card-controls { flex-wrap: wrap; gap: 7px; }
  #root .bingoo-desktop-card-controls .bingoo-card-page-label { width: 100%; font-size: 13px; }
  #root .bingoo-desktop-auto-marking { width: 100%; justify-content: flex-start; }
  #root .bingoo-desktop-auto-marking > span { font-size: 12px; }
}

@media (max-width: 280px) {
  #root .bingoo-selection-status { grid-template-columns: auto minmax(0, 1fr) auto; }
  #root .bingoo-connection { gap: 0; padding-inline: 6px; font-size: 0; }
  #root .bingoo-connection-dot { width: 8px; height: 8px; flex-basis: 8px; }
  #root .bingoo-selection-countdown { min-width: 0; padding-inline: 6px; overflow: hidden; font-size: 9px; }
  #root .bingoo-selection-stake { font-size: 9px; }
  #root .bingoo-selection-stake strong { font-size: 10px; }
  #root .bingoo-mobile-game-summary,
  #root .bingoo-mobile-game-summary > div { max-height: none; overflow: visible; }
  #root .bingoo-card-page-controls { justify-content: center; gap: 3px; }
  #root .bingoo-card-page-label { font-size: 9px; }
  #root .bingoo-card-page-button { width: 24px; min-width: 24px; min-height: 22px; font-size: 19px; }
  #root .bingoo-active-card-page { gap: 4px; }
  #root .bingoo-active-card-page-mobile .aspect-square { height: 16px; }
  #root .bingoo-active-card-page-mobile .grid.grid-cols-5:first-child > div { padding-block: 1px; }
  #root .bingoo-active-card-page-mobile + .bingoo-active-game-actions button { padding-block: 0; }
  #root .bingoo-active-card-page-mobile .bingoo-active-card {
    width: 100%;
    flex-basis: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  #root .bingoo-announcement { overflow-x: auto; }
  #root .bingoo-announcement-track { animation: none !important; transform: none !important; }
  #root .bingoo-announcement-track > span[aria-hidden="true"] { display: none; }
}

#root .bingoo-winner-identity { color: #374151; }
#root .dark .bingoo-winner-identity { color: #e5e7eb; }


/* v22 — visible winning patterns and one-screen live room */
#root .bingoo-winning-cell {
  background: #22c55e !important;
  color: #052e16 !important;
  box-shadow: inset 0 0 0 2px #86efac;
  text-shadow: none;
}

/* The selection screen retains its prize summary; live play does not repeat it. */
#root .bingoo-selection-header.is-live .bingoo-selection-win { display: none; }

/* Five useful live statistics: prize, players, stake, calls, and sound. */
#root .max-w-md.md\:hidden > .bingoo-mobile-game-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 6px;
  padding: 0;
}
#root .max-w-md.md\:hidden > .bingoo-mobile-game-stats > .text-center.flex,
#root .max-w-md.md\:hidden > .bingoo-mobile-game-stats > .text-center.flex:last-child {
  min-width: 0;
  min-height: 44px;
  flex: initial;
  gap: 2px;
  padding: 4px 2px;
  overflow: hidden;
  white-space: nowrap;
}
#root .max-w-md.md\:hidden > .bingoo-mobile-game-stats .text-purple-200 {
  overflow: hidden;
  font-size: 9px;
  text-overflow: ellipsis;
}
#root .max-w-md.md\:hidden > .bingoo-mobile-game-stats .text-white {
  font-size: 13px;
}
#root .max-w-md.md\:hidden > .bingoo-mobile-game-stats button.bg-purple-700 {
  min-width: 0;
  min-height: 36px;
  padding: 0;
}

/* Reference-style called-number colors, applied by B/I/N/G/O column. */
#root .max-w-md.md\:hidden .w-1\/2:first-child > .flex.justify-center.gap-2 > div {
  color: var(--bingoo-yellow) !important;
}
#root .max-w-md.md\:hidden .w-1\/2:first-child > .grid.grid-cols-5 > div {
  background: #252b3b !important;
  color: #eef2f7 !important;
}
#root .max-w-md.md\:hidden .w-1\/2:first-child > .grid.grid-cols-5 > div.bg-green-600:nth-child(5n+1) {
  border-color: #ff7468;
  background: #e74c3c !important;
  color: #ffffff !important;
}
#root .max-w-md.md\:hidden .w-1\/2:first-child > .grid.grid-cols-5 > div.bg-green-600:nth-child(5n+2) {
  border-color: #6bbbe9;
  background: #3498db !important;
  color: #ffffff !important;
}
#root .max-w-md.md\:hidden .w-1\/2:first-child > .grid.grid-cols-5 > div.bg-green-600:nth-child(5n+3) {
  border-color: #ffe36e;
  background: #f1c40f !important;
  color: #211b05 !important;
}
#root .max-w-md.md\:hidden .w-1\/2:first-child > .grid.grid-cols-5 > div.bg-green-600:nth-child(5n+4) {
  border-color: #75e69b;
  background: #2ecc71 !important;
  color: #092d18 !important;
}
#root .max-w-md.md\:hidden .w-1\/2:first-child > .grid.grid-cols-5 > div.bg-green-600:nth-child(5n+5) {
  border-color: #c493e4;
  background: #9b59b6 !important;
  color: #ffffff !important;
}

@media (max-width: 767px) {
  #root .flex.flex-col.items-center.w-full.max-w-md.mx-auto.px-4.md\:hidden {
    padding: 4px 6px 6px;
  }

  /* Remove duplicated connection/status, prize, refresh, and footer areas. */
  #root .bingoo-selection-header.is-live {
    position: static;
    min-height: 0;
    border: 0;
  }
  #root .bingoo-selection-header.is-live .bingoo-selection-status { display: none; }
  #root .bingoo-live-room .bingoo-in-game-refresh { display: none; }
  #root .bingoo-live-room .text-center.text-purple-800.bg-purple-300 { display: none; }

  /* One bottom bar owns Refresh and the announcement during live play. */
  #root .bingoo-selection-header.is-live .bingoo-selection-primary {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: minmax(96px, 38%) minmax(0, 1fr);
    gap: 8px;
    width: 100%;
    max-width: none;
    min-height: 52px;
    margin: 0;
    padding: 5px 8px calc(5px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #25303c;
    border-bottom: 0;
    background: #111923;
  }
  #root .bingoo-selection-header.is-live .bingoo-selection-balance { display: none; }
  #root .bingoo-selection-header.is-live .bingoo-refresh-button {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    padding: 0 10px;
    border: 1px solid #48d8f2;
    border-radius: 6px;
    background: var(--bingoo-cyan);
    color: #071217;
    box-shadow: none;
  }
  #root .bingoo-selection-header.is-live .bingoo-announcement {
    height: 30px;
    align-self: center;
    border-radius: 6px;
  }
  #root .bingoo-live-room > .flex-1 {
    padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px));
  }
}

/* Short phones need a little less vertical spacing, not hidden controls. */
@media (max-width: 767px) and (max-height: 700px) {
  #root .max-w-md.md\:hidden > .bingoo-mobile-game-stats { margin-bottom: 4px; }
  #root .max-w-md.md\:hidden > .bingoo-mobile-game-stats > .text-center.flex,
  #root .max-w-md.md\:hidden > .bingoo-mobile-game-stats > .text-center.flex:last-child {
    min-height: 38px;
    padding-block: 2px;
  }
  #root .max-w-md.md\:hidden > .bingoo-mobile-game-stats button.bg-purple-700 { min-height: 32px; }
  #root .bingoo-active-cards { margin-top: 2px; padding-top: 2px; }
  #root .bingoo-card-page-controls { margin-bottom: 2px; }
  #root .bingoo-active-card-page-mobile { gap: 4px; }
  #root .bingoo-active-game-actions { margin-top: 0; }
}

@media (max-width: 280px) {
  #root .max-w-md.md\:hidden > .bingoo-mobile-game-stats { gap: 2px; }
  #root .max-w-md.md\:hidden > .bingoo-mobile-game-stats > .text-center.flex,
  #root .max-w-md.md\:hidden > .bingoo-mobile-game-stats > .text-center.flex:last-child {
    min-height: 40px;
    padding-inline: 1px;
  }
  #root .max-w-md.md\:hidden > .bingoo-mobile-game-stats .text-purple-200 { font-size: 8px; }
  #root .max-w-md.md\:hidden > .bingoo-mobile-game-stats .text-white { font-size: 10px; }
  #root .bingoo-selection-header.is-live .bingoo-selection-primary {
    grid-template-columns: minmax(82px, 40%) minmax(0, 1fr);
    gap: 5px;
    padding-inline: 5px;
  }
  #root .bingoo-selection-header.is-live .bingoo-refresh-button { font-size: 9px; }
}

/* v23 — one-tap selection and every booked card in live play */
#root .bingoo-selected-cards {
  width: 100%;
  max-width: 960px;
  margin: 10px auto 0;
  padding: 10px;
  border: 1px solid rgba(72, 216, 242, .28);
  border-radius: 8px;
  background: rgba(17, 25, 35, .92);
}
#root .bingoo-selected-cards-title {
  margin-bottom: 8px;
  color: #eef2f7;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  text-align: left;
}
#root .bingoo-selected-card-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
#root .bingoo-selected-card-preview {
  min-width: 0;
  padding: 5px;
  border-radius: 6px;
  background: #252b3b;
}
#root .bingoo-selected-card-preview > .relative { width: 100%; }
#root .bingoo-selected-card-number {
  margin-bottom: 3px;
  color: #48d8f2;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.2;
  text-align: center;
}
#root .bingoo-selected-card-preview .aspect-square {
  height: clamp(21px, 7vw, 32px);
  aspect-ratio: auto;
  font-size: clamp(9px, 2.8vw, 13px);
  line-height: 1;
}
#root .bingoo-selected-card-preview .grid.grid-cols-5:first-child > div {
  padding-block: 2px;
  font-size: clamp(9px, 2.6vw, 12px);
  line-height: 1;
}

#root .bingoo-active-card-page-desktop { flex-wrap: wrap; }
#root .bingoo-card-claim-actions {
  display: flex;
  justify-content: center;
  margin-top: 3px;
}
#root .bingoo-card-bingo-button {
  width: 100%;
  min-height: 28px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.1;
  cursor: pointer;
  transition: background-color .18s ease, transform .18s ease;
}
#root .bingoo-card-bingo-button:active { transform: scale(.98); }
#root .bingoo-card-bingo-button:focus-visible {
  outline: 2px solid #48d8f2;
  outline-offset: 2px;
}

@media (min-width: 768px) {
  #root .bingoo-selected-card-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #root .bingoo-selected-cards-title { font-size: 15px; }
  #root .bingoo-selected-card-preview .aspect-square {
    height: auto;
    aspect-ratio: 1;
    font-size: 14px;
  }
  #root .bingoo-selected-card-preview .grid.grid-cols-5:first-child > div { font-size: 13px; }
  #root .bingoo-card-bingo-button { min-height: 34px; font-size: 15px; }
}

@media (min-width: 1200px) {
  #root .bingoo-selected-card-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 280px) {
  #root .bingoo-selected-cards { padding: 6px; }
  #root .bingoo-selected-card-list { gap: 6px; }
  #root .bingoo-selected-card-preview { padding: 3px; }
  #root .bingoo-selected-card-preview .aspect-square { height: 18px; }
  #root .bingoo-card-bingo-button { min-height: 24px; padding-block: 2px; font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  #root .bingoo-card-bingo-button { transition: none; }
  #root .bingoo-card-bingo-button:active { transform: none; }
}

/* Keep the called-number board visible while the independent card column grows. */
@media (max-width: 767px) {
  #root .bingoo-mobile-game-summary > div:first-child {
    position: sticky;
    top: 4px;
    align-self: flex-start;
  }
}

/* Three-across desktop cards need compact numerals rather than clipped FREE cells. */
@media (min-width: 1200px) {
  #root .bingoo-active-card-page-desktop.is-three .aspect-square { font-size: 11px; }
  #root .bingoo-active-card-page-desktop.is-three .grid.grid-cols-5:first-child > div { font-size: 10px; }
}

/* v24 — countdown selection and a reference-style fixed selected-card tray */
/* v25 — outrank the compact grid's padding shorthand so the last rows clear the dock. */
#root .px-2.md\:px-0.md\:max-w-6xl.bingoo-card-selection-body.has-selected-cards {
  padding-bottom: calc(25vh + 116px);
  scroll-padding-bottom: calc(25vh + 116px);
}
#root .bingoo-selection-dock {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 35;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(72, 216, 242, .4);
  background: rgba(11, 17, 27, .98);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, .28);
}
#root .bingoo-selection-dock .bingoo-selected-cards {
  max-width: 560px;
  margin: 0 auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
#root .bingoo-selection-dock .bingoo-selected-cards-title {
  margin-bottom: 4px;
  font-size: 12px;
  line-height: 1.2;
}
#root .bingoo-selection-dock .bingoo-selected-card-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  max-height: 25vh;
  padding-right: 2px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #48d8f2 transparent;
}
#root .bingoo-selection-dock .bingoo-selected-card-preview {
  padding: 3px;
  border-radius: 4px;
}
#root .bingoo-selection-dock .bingoo-selected-card-preview > .relative {
  border-width: 2px;
  border-radius: 4px;
}
#root .bingoo-selection-dock .bingoo-selected-card-number {
  margin-bottom: 2px;
  font-size: 10px;
}
#root .bingoo-selection-dock .bingoo-selected-card-preview .aspect-square,
#root .bingoo-selection-dock .bingoo-selected-card-preview .grid.grid-cols-5 > div {
  min-width: 0;
}
#root .bingoo-selection-dock .bingoo-selected-card-preview .aspect-square {
  height: clamp(14px, 4.4vw, 20px);
  aspect-ratio: auto;
  overflow: hidden;
  font-size: clamp(7px, 2.2vw, 10px);
}
#root .bingoo-selection-dock .bingoo-selected-card-preview .grid.grid-cols-5:first-child > div {
  padding-block: 1px;
  font-size: clamp(7px, 2vw, 9px);
}
#root .bingoo-selection-actions {
  gap: 12px;
  margin-top: 6px;
}
#root .bingoo-selection-dock .bingoo-selection-actions {
  max-width: 360px;
  margin: 6px auto 0;
  padding: 0;
}
#root .bingoo-selection-actions button {
  min-height: 36px;
  cursor: pointer;
}
#root .bingoo-selection-actions button:focus-visible {
  outline: 2px solid #48d8f2;
  outline-offset: 2px;
}

@media (min-width: 768px) {
  #root .bingoo-selection-dock {
    bottom: 10px;
    border: 1px solid rgba(72, 216, 242, .4);
    border-radius: 10px;
  }
  #root .bingoo-selection-dock .bingoo-selected-card-preview .aspect-square {
    height: 20px;
    font-size: 10px;
  }
  #root .bingoo-selection-dock .bingoo-selected-card-preview .grid.grid-cols-5:first-child > div {
    font-size: 9px;
  }
}

@media (max-width: 280px) {
  #root .bingoo-selection-dock { padding-inline: 5px; }
  #root .bingoo-selection-dock .bingoo-selected-card-list { gap: 4px; }
  #root .bingoo-selection-dock .bingoo-selected-card-preview .aspect-square { height: 13px; }
  #root .bingoo-selection-actions { gap: 6px; }
}


/* v26 — give the card-selection announcement a full mobile row. */
@media (max-width: 767px) {
  #root .bingoo-card-selection-room .bingoo-selection-header:not(.is-live) .bingoo-selection-primary {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 6px 10px;
    padding-block: 6px;
  }
  #root .bingoo-card-selection-room .bingoo-selection-header:not(.is-live) .bingoo-announcement {
    grid-column: 1 / -1;
    width: 100%;
  }
}


/* v27 — a single live card uses a content-height room instead of a tall empty page. */
@media (max-width: 767px) {
  #root:has(> div.bingoo-live-room [data-card-page="mobile"] .bingoo-active-card:first-child:last-child) {
    min-height: 100dvh;
    background: var(--bingoo-bg);
  }
  #root > div.flex.flex-col.h-screen.bingoo-live-room:has([data-card-page="mobile"] .bingoo-active-card:first-child:last-child) {
    position: relative;
    height: auto;
    min-height: 0;
  }
  #root > div.flex.flex-col.h-screen.bingoo-live-room:has([data-card-page="mobile"] .bingoo-active-card:first-child:last-child) .bingoo-selection-header.is-live .bingoo-selection-primary {
    position: absolute;
  }
}


/* v28 — remove the outer viewport-height constraint for one-card mobile live rooms. */
@media (max-width: 767px) {
  html:has(#root > div.bingoo-live-room [data-card-page="mobile"] .bingoo-active-card:first-child:last-child),
  body:has(#root > div.bingoo-live-room [data-card-page="mobile"] .bingoo-active-card:first-child:last-child) {
    height: auto;
    min-height: 0;
    background: var(--bingoo-bg);
  }
  #root:has(> div.bingoo-live-room [data-card-page="mobile"] .bingoo-active-card:first-child:last-child) {
    height: auto;
    min-height: 0;
  }
}


/* v33 — moderately taller single card with compact reference-style controls. */
@media (max-width: 767px) {
  html:has(#root > div.bingoo-live-room [data-card-page="mobile"] .bingoo-active-card:first-child:last-child),
  body:has(#root > div.bingoo-live-room [data-card-page="mobile"] .bingoo-active-card:first-child:last-child),
  #root:has(> div.bingoo-live-room [data-card-page="mobile"] .bingoo-active-card:first-child:last-child) {
    height: auto;
    min-height: 100dvh;
  }
  #root > div.flex.flex-col.h-screen.bingoo-live-room:has([data-card-page="mobile"] .bingoo-active-card:first-child:last-child) {
    height: 100dvh;
    min-height: 100dvh;
  }
  #root .bingoo-live-room:has([data-card-page="mobile"] .bingoo-active-card:first-child:last-child) .bingoo-active-card-page-mobile .aspect-square {
    height: clamp(32px, 5dvh, 48px);
  }
  #root .bingoo-live-room:has([data-card-page="mobile"] .bingoo-active-card:first-child:last-child) > .flex-1 {
    padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px));
  }
  #root > div.flex.flex-col.h-screen.bingoo-live-room:has([data-card-page="mobile"] .bingoo-active-card:first-child:last-child) .bingoo-selection-header.is-live .bingoo-selection-primary {
    position: fixed;
    top: auto;
    right: auto;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    left: 8px;
    z-index: 30;
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: clamp(120px, 38vw, 220px);
    max-width: none;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
  #root > div.flex.flex-col.h-screen.bingoo-live-room:has([data-card-page="mobile"] .bingoo-active-card:first-child:last-child) .bingoo-selection-header.is-live .bingoo-announcement {
    order: 1;
    width: 100%;
    height: 26px;
    min-height: 26px;
    align-self: auto;
    border: 1px solid rgba(245, 197, 24, .55);
    border-radius: 999px;
    background: rgba(17, 25, 35, .96);
    font-size: 10px;
    box-shadow: 0 0 10px rgba(245, 197, 24, .12);
  }
  #root > div.flex.flex-col.h-screen.bingoo-live-room:has([data-card-page="mobile"] .bingoo-active-card:first-child:last-child) .bingoo-selection-header.is-live .bingoo-refresh-button {
    order: 2;
    width: 100%;
    min-height: 40px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 12px;
  }
}


/* v34 — selected cards keep only their previews; header Refresh stays available. */
#root .bingoo-selection-dock > .bingoo-selection-actions {
  display: none;
}
