/* ==========================================================================
   GENERALA ARGENTINA HD - ESTILOS VISUALES DE ALTA DEFINICIÓN
   Salón Criollo de Dados, Cubilete de Cuero con Mano Animada,
   5 Dados Grandes en 3D y Planilla Oficial Argentina de 10 Categorías.
   ========================================================================== */

@import url('generala_base.css');

:root {
  --generala-felt: #0b3b24;
  --generala-felt-center: #145937;
  --generala-gold: #f59e0b;
  --generala-gold-light: #fef08a;
  --generala-leather: #7c2d12;
  --generala-celeste: #38bdf8;
}

#generala-app {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* ==========================================================================
   FONDO Y ESTÉTICA PROPIA DEL LOBBY DE GENERALA (PULPERÍA & CUERO CRIOLLO)
   ========================================================================== */
.lobby-argentina-salon {
  background:
    radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.16) 0%, transparent 45%),
    radial-gradient(circle at 80% 75%, rgba(16, 185, 129, 0.22) 0%, transparent 50%),
    linear-gradient(165deg, #1b0e08 0%, #0a291b 52%, #07120d 100%) !important;
}

#generala-app .domino-top-bar {
  background: linear-gradient(180deg, #2b160c 0%, #170b06 100%) !important;
  border-bottom: 2px solid rgba(245, 158, 11, 0.55) !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.65) !important;
}

#generala-app .lobby-bottom-dock {
  background: linear-gradient(180deg, #190c06 0%, #2b150b 100%) !important;
  border-top: 2px solid rgba(245, 158, 11, 0.48) !important;
}

/* Quitar los globos flotantes de Dominó/Truco para dar identidad propia de Salón de Dados */
#generala-app .card-balloons-row {
  display: none !important;
}

#generala-app .carousel-card {
  border-radius: 18px !important;
  border: 2px solid rgba(245, 158, 11, 0.55) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

.brand-argentina {
  background: linear-gradient(135deg, rgba(124, 45, 18, 0.65) 0%, rgba(11, 59, 36, 0.85) 100%);
  border: 1.5px solid rgba(245, 158, 11, 0.6);
  padding: 4px 14px;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.brand-argentina .brand-tag {
  background: linear-gradient(90deg, #f59e0b 0%, #fef08a 50%, #f59e0b 100%);
  color: #1c0a00;
  font-weight: 900;
}

/* Barra Superior en el Lobby para elegir 2, 3 o 4 Jugadores */
.lobby-player-mode-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 6px auto 2px;
  padding: 6px 18px;
  background: rgba(9, 13, 22, 0.78);
  border: 1.5px solid rgba(56, 189, 248, 0.4);
  border-radius: 30px;
  z-index: 20;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}

.lobby-mode-title {
  font-size: 12px;
  font-weight: 900;
  color: #fde047;
  letter-spacing: 0.8px;
}

.lobby-mode-pills {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lobby-mode-pill {
  padding: 5px 14px;
  border-radius: 20px;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lobby-mode-pill:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.lobby-mode-pill.active {
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
  border-color: #bae6fd;
  color: #090d16;
  font-weight: 900;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.55);
}

/* Selector de 2, 3 y 4 Jugadores Online integrado en CADA mesa del carrusel */
.card-player-count-selector {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  margin: 4px 0 6px;
  padding: 4px;
  background: rgba(9, 13, 22, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
}

.card-pcount-pill {
  flex: 1;
  padding: 5px 6px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.card-pcount-pill:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.card-pcount-pill.active {
  background: linear-gradient(135deg, #fde047 0%, #f59e0b 100%);
  border-color: #ffffff;
  color: #09090b;
  font-weight: 900;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.55);
}

/* ==========================================================================
   DISPOSICIÓN DE LA MESA DE JUEGO DE GENERALA HD (GAMEPLAY)
   ========================================================================== */
body.in-gameplay .domino-top-bar {
  display: none !important;
}

body.in-gameplay #screen-gameplay {
  height: 100% !important;
}

.generala-gameplay-grid {
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: 1.88fr 0.82fr;
  gap: 10px;
  padding: 46px 6px 8px 12px;
  overflow: hidden;
  position: relative;
  z-index: 10;
}

/* Columna Izquierda: Cabecera Superior + Gran Paño de Fieltro + Botón de Tiro */
.generala-dice-arena {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  min-height: 0;
  height: 100%;
  background: rgba(7, 24, 15, 0.65);
  border: 2px solid rgba(245, 158, 11, 0.35);
  border-radius: 22px;
  padding: 6px 10px 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
  position: relative;
  overflow: hidden;
}

/* Cabecera Superior Compacta: Jugadores Sentados (2 a 4) + Cartel de Turno Bien Arriba */
.arena-top-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 20;
}

/* Tira Superior de Jugadores Sentados en la Mesa (2 a 4 Jugadores) */
.generala-players-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  z-index: 15;
}

.gen-player-card {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.82);
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  padding: 4px 10px 4px 6px;
  min-width: 128px;
  position: relative;
  transition: all 0.25s ease;
}

.gen-player-card.active-turn {
  border-color: #fde047;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.28) 0%, rgba(15, 23, 42, 0.94) 100%);
  box-shadow: 0 0 16px rgba(250, 204, 21, 0.5);
  transform: translateY(-1px) scale(1.02);
}

.gen-player-avatar-wrap {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #fbbf24;
  overflow: hidden;
  flex-shrink: 0;
  background: #0f172a;
}

.gen-player-avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gen-player-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.gen-player-name {
  font-size: 11px;
  font-weight: 800;
  color: #ffffff;
  max-width: 105px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gen-player-score-pill {
  font-size: 11px;
  font-weight: 900;
  color: #fde047;
  display: flex;
  align-items: center;
  gap: 5px;
}

.gen-turn-tag {
  font-size: 8.5px;
  font-weight: 900;
  background: #22c55e;
  color: #052e16;
  padding: 1px 5px;
  border-radius: 5px;
  text-transform: uppercase;
}

/* Cartel de Estado del Turno Elevado Arriba ("¡ES TU TURNO!" / "TURNO DE GAUCHO MARTÍN") */
.turn-roll-status-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(90deg, rgba(9, 13, 22, 0.92) 0%, rgba(15, 23, 42, 0.88) 50%, rgba(9, 13, 22, 0.92) 100%);
  border: 1.5px solid rgba(250, 204, 21, 0.45);
  border-radius: 14px;
  padding: 6px 14px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  flex-wrap: wrap;
}

.turn-status-top-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.roll-status-header {
  font-family: var(--font-title);
  font-size: 13px;
  font-weight: 900;
  color: #fde047;
  letter-spacing: 0.8px;
  white-space: nowrap;
}

.roll-dots-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
}

.roll-step-pill {
  text-align: center;
  padding: 3px 10px;
  border-radius: 8px;
  font-size: 10.5px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.07);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.roll-step-pill.active {
  background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
  color: #000;
  border-color: #fef08a;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.65);
}

.roll-step-pill.done {
  background: rgba(34, 197, 94, 0.22);
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.45);
}

.roll-instruction-hint {
  font-size: 11.5px;
  color: #e2e8f0;
  font-weight: 600;
  flex: 1;
  text-align: right;
  min-width: 180px;
}

/* ==========================================================================
   GRAN PAÑO DE FIELTRO VERDE + CUBILETE DE CUERO CON MANO + 5 DADOS 3D
   ========================================================================== */
.cubilete-and-dice-stage {
  flex: 1;
  width: 100%;
  min-height: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
  position: relative;
}

/* El Gran Paño de Mesa de Casino / Pulpería donde caen y ruedan los dados */
.generala-big-felt-surface {
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  background:
    radial-gradient(ellipse at 58% 50%, #177245 0%, #0f5231 52%, #08331d 88%, #041f11 100%);
  border: 10px solid #451a03;
  outline: 2.5px solid rgba(250, 204, 21, 0.55);
  outline-offset: -13px;
  border-radius: 36px;
  box-shadow:
    inset 0 0 55px rgba(0, 0, 0, 0.82),
    inset 0 4px 18px rgba(0, 0, 0, 0.65),
    0 12px 30px rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px 16px 18px;
  position: relative;
  overflow: hidden;
  perspective: 1100px;
}

/* Textura sutil de paño y filete interior dorado */
.generala-big-felt-surface::before {
  content: '';
  position: absolute;
  inset: 14px;
  border: 1.5px dashed rgba(250, 204, 21, 0.24);
  border-radius: 24px;
  pointer-events: none;
}

/* Cartel Superior Izquierdo sobre el Paño Verde ("Tocá el dado para dejarlo en mesa") */
.felt-top-left-banner {
  position: absolute;
  top: 22px;
  left: 28px;
  z-index: 28;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(5, 28, 16, 0.84);
  border: 1.5px solid rgba(250, 204, 21, 0.65);
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  pointer-events: none;
  user-select: none;
}

.felt-banner-icon {
  font-size: 14px;
  line-height: 1;
}

.felt-banner-text {
  font-size: 12.5px;
  font-weight: 800;
  color: #fef08a;
  letter-spacing: 0.4px;
}

.felt-baize-watermark {
  position: absolute;
  top: 50%;
  left: 58%;
  transform: translate(-50%, -50%);
  font-family: var(--font-title);
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 5px;
  color: rgba(255, 255, 255, 0.045);
  pointer-events: none;
  white-space: nowrap;
  user-select: none;
}

/* Variantes de Paños de Mesa (Sincronizado con el Creador de la Sala) */
.generala-big-felt-surface.felt-blue,
.felt-table-wrapper.felt-blue .generala-big-felt-surface {
  background: radial-gradient(ellipse at 58% 50%, #1d4ed8 0%, #1e3a8a 54%, #0f172a 90%, #090d16 100%);
  border-color: #1e293b;
  outline-color: rgba(56, 189, 248, 0.65);
}

.generala-big-felt-surface.felt-turquoise,
.felt-table-wrapper.felt-turquoise .generala-big-felt-surface {
  background: radial-gradient(ellipse at 58% 50%, #0d9488 0%, #115e59 54%, #134e4a 88%, #042f2e 100%);
  border-color: #27272a;
  outline-color: rgba(45, 212, 191, 0.65);
}

.generala-big-felt-surface.felt-wood,
.felt-table-wrapper.felt-wood .generala-big-felt-surface {
  background: radial-gradient(ellipse at 58% 50%, #9a3412 0%, #7c2d12 52%, #431407 88%, #270902 100%);
  border-color: #290f02;
  outline-color: rgba(251, 191, 36, 0.65);
}

.generala-big-felt-surface.felt-red,
.felt-table-wrapper.felt-red .generala-big-felt-surface {
  background: radial-gradient(ellipse at 58% 50%, #b91c1c 0%, #7f1d1d 54%, #450a0a 90%, #280505 100%);
  border-color: #3b0707;
  outline-color: rgba(252, 165, 165, 0.65);
}

.generala-big-felt-surface.felt-purple,
.felt-table-wrapper.felt-purple .generala-big-felt-surface {
  background: radial-gradient(ellipse at 58% 50%, #6d28d9 0%, #4c1d95 54%, #2e1065 90%, #170736 100%);
  border-color: #1e1b4b;
  outline-color: rgba(196, 181, 253, 0.65);
}

.generala-big-felt-surface.felt-obsidian,
.felt-table-wrapper.felt-obsidian .generala-big-felt-surface {
  background: radial-gradient(ellipse at 58% 50%, #27272a 0%, #18181b 54%, #09090b 90%, #000000 100%);
  border-color: #18181b;
  outline-color: rgba(250, 204, 21, 0.75);
}

.generala-big-felt-surface.felt-gold,
.felt-table-wrapper.felt-gold .generala-big-felt-surface {
  background: radial-gradient(ellipse at 58% 50%, #b45309 0%, #78350f 54%, #451a03 90%, #1c0a00 100%);
  border-color: #f59e0b;
  outline-color: rgba(254, 240, 138, 0.85);
}

/* El Cubilete de Cuero con Mano a la izquierda del Gran Paño (Agrandado para mayor presencia visual) */
.cubilete-hand-container {
  width: 320px;
  height: 308px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  z-index: 25;
  margin-left: -4px;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  filter: drop-shadow(0 20px 28px rgba(0, 0, 0, 0.82));
}

.cubilete-hand-container:hover {
  transform: scale(1.04) rotate(3deg);
}

.cubilete-hand-container:active {
  transform: scale(0.97);
}

.cubilete-hand-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* Ocultar líneas de movimiento en reposo; mostrarlas al batir el cubilete */
.cubilete-hand-svg .shake-motion-lines {
  opacity: 0;
  transition: opacity 0.15s ease;
}

.cubilete-hand-container.is-shaking .shake-motion-lines {
  opacity: 1;
}

/* Animación de la Mano Sacudiendo el Cubilete de Cuero ("Shaking the dice") */
.cubilete-hand-container.is-shaking {
  animation: cubileteHandShake 0.68s cubic-bezier(0.36, 0.07, 0.19, 0.97) infinite;
}

.cubilete-hand-container.is-shaking .cup-peeking-dice {
  animation: peekingDiceBounce 0.2s ease-in-out infinite alternate;
}

/* Animación de Volcado Realista del Cubilete hacia el Paño Derecha/Centro */
.cubilete-hand-container.is-pouring {
  animation: cubiletePourDiceToFelt 0.95s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Cuando los dados ya están lanzados en el paño, ocultar los dados que asoman en la boca del cubilete */
.cubilete-hand-container.cup-empty .cup-peeking-dice {
  opacity: 0;
  transform: translateY(18px) scale(0.6);
  transition: all 0.25s ease;
}

@keyframes cubileteHandShake {
  0%   { transform: translate(0, 0) rotate(0deg) scale(1.03); }
  14%  { transform: translate(-16px, -14px) rotate(-17deg) scale(1.07); }
  28%  { transform: translate(16px, 10px) rotate(15deg) scale(1.07); }
  42%  { transform: translate(-18px, -10px) rotate(-19deg) scale(1.08); }
  57%  { transform: translate(15px, -12px) rotate(17deg) scale(1.07); }
  71%  { transform: translate(-12px, 10px) rotate(-13deg) scale(1.06); }
  85%  { transform: translate(12px, -6px) rotate(11deg) scale(1.05); }
  100% { transform: translate(0, 0) rotate(0deg) scale(1.03); }
}

@keyframes peekingDiceBounce {
  0%   { transform: translateY(3px) rotate(-4deg); }
  100% { transform: translateY(-11px) rotate(6deg); }
}

/* El cubilete se inclina hacia la derecha volcando su boca sobre el paño verde */
@keyframes cubiletePourDiceToFelt {
  0%   { transform: rotate(0deg) translate(0, 0); }
  35%  { transform: rotate(72deg) translate(28px, -12px) scale(1.05); }
  70%  { transform: rotate(56deg) translate(20px, -6px); }
  100% { transform: rotate(0deg) translate(0, 0); }
}

/* ==========================================================================
   ZONA AMPLIA DE CAÍDA DE DADOS EN EL PAÑO Y VERDADEROS CUBOS 3D (6 CARAS)
   ========================================================================== */
.dice-tray-container {
  flex: 1;
  height: 100%;
  min-height: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1100px;
}

.dice-tray-container.dice-inside-cup .dice-tray-grid {
  opacity: 0;
  pointer-events: none;
}

.dice-tray-grid {
  width: 100%;
  height: 100%;
  min-height: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-style: preserve-3d;
}

/* Cada dado se posiciona de forma orgánica y dispersa sobre el gran paño */
.generala-die-slot {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: default;
  transform: translate3d(var(--scatter-x, 0px), var(--scatter-y, 0px), 0px);
  transition: transform 0.36s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
  z-index: 15;
}

.generala-die-slot.can-interact {
  cursor: pointer;
}

/* Animación Lenta y Realista de Salida Desde la Boca del Cubilete hacia el Paño (~1.85s) */
.generala-die-slot.slot-launching {
  animation: dieLaunchFromCupMouth 1.85s cubic-bezier(0.14, 0.78, 0.24, 1) var(--roll-delay, 0ms) backwards;
}

@keyframes dieLaunchFromCupMouth {
  0% {
    transform: translate3d(var(--origin-dx, -220px), var(--origin-dy, -30px), 85px) scale(0.42);
    opacity: 0;
  }
  12% {
    opacity: 1;
    transform: translate3d(
      calc(var(--origin-dx, -220px) * 0.68),
      calc(var(--origin-dy, -30px) * 0.65 - 18px),
      65px
    ) scale(0.78);
  }
  42% {
    transform: translate3d(
      calc(var(--scatter-x, 0px) * 0.48),
      calc(var(--scatter-y, 0px) * 0.48 - 16px),
      38px
    ) scale(1.05);
  }
  72% {
    transform: translate3d(
      calc(var(--scatter-x, 0px) * 0.88),
      calc(var(--scatter-y, 0px) * 0.88 + 6px),
      12px
    ) scale(0.99);
  }
  90% {
    transform: translate3d(
      calc(var(--scatter-x, 0px) * 0.98),
      calc(var(--scatter-y, 0px) * 0.98 - 2px),
      3px
    ) scale(1);
  }
  100% {
    transform: translate3d(var(--scatter-x, 0px), var(--scatter-y, 0px), 0px) scale(1);
    opacity: 1;
  }
}

/* Animación cuando los dados no elegidos (o al terminar el turno) vuelven adentro del cubilete */
.generala-die-slot.slot-returning-cup {
  animation: dieReturnIntoCup 0.68s cubic-bezier(0.45, 0.05, 0.55, 0.95) forwards !important;
  pointer-events: none;
}

@keyframes dieReturnIntoCup {
  0% {
    transform: translate3d(var(--scatter-x, 0px), var(--scatter-y, 0px), 0px) scale(1);
    opacity: 1;
  }
  45% {
    transform: translate3d(
      calc(var(--origin-dx, -220px) * 0.45),
      calc(var(--origin-dy, -20px) * 0.45 - 18px),
      45px
    ) scale(0.78);
    opacity: 0.95;
  }
  100% {
    transform: translate3d(var(--origin-dx, -220px), var(--origin-dy, -20px), 65px) scale(0.28);
    opacity: 0;
  }
}

/* Escena 3D de cada cubo (66px x 66px más grande y nítido en el paño) */
.die-3d-scene {
  width: 66px;
  height: 66px;
  position: relative;
  perspective: 800px;
  transform-style: preserve-3d;
}

/* Sombra proyectada sobre el paño verde debajo del cubo 3D */
.die-floor-shadow {
  position: absolute;
  inset: 5px -4px -9px 5px;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.74) 0%, rgba(0, 0, 0, 0) 72%);
  border-radius: 50%;
  transform: translateZ(-18px);
  pointer-events: none;
  transition: all 0.25s ease;
}

.generala-die-slot.can-interact:hover .die-3d-scene {
  transform: translateY(-5px) scale(1.08);
}

.generala-die-slot.can-interact:hover .die-floor-shadow {
  transform: translateZ(-24px) scale(1.15);
  opacity: 0.85;
}

/* Estado de Dado Guardado / Apartado para el siguiente tiro */
.generala-die-slot.is-kept {
  z-index: 22;
}

.generala-die-slot.is-kept .die-face {
  border-color: #fde047 !important;
  box-shadow:
    inset 0 0 12px rgba(250, 204, 21, 0.5),
    0 0 18px rgba(250, 204, 21, 0.75) !important;
}

/* Pequeño candado dorado en la esquina superior del dado guardado (sin rótulos de texto) */
.die-kept-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fde047 0%, #f59e0b 100%);
  border: 1.5px solid #ffffff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  z-index: 30;
  pointer-events: none;
  transform: translateZ(38px);
}

/* VERDADERO CUBO 3D DE 6 CARAS (66px x 66px x 66px) */
.die-3d-cube {
  width: 66px;
  height: 66px;
  position: relative;
  transform-style: preserve-3d;
  transform: rotateX(var(--end-rx, 10deg)) rotateY(var(--end-ry, -12deg)) rotateZ(var(--end-rz, 0deg));
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Rotación 3D Lenta y Completa en los 3 ejes al salir rodando del cubilete (~1.85s) */
.die-3d-cube.rolling-3d {
  animation: dieSpinTumble3D 1.85s cubic-bezier(0.14, 0.78, 0.24, 1) var(--roll-delay, 0ms) both;
}

@keyframes dieSpinTumble3D {
  0% {
    transform: rotateX(var(--start-rx, 730deg)) rotateY(var(--start-ry, -1092deg)) rotateZ(var(--start-rz, 360deg));
  }
  45% {
    transform: rotateX(calc(var(--end-rx, 10deg) + 210deg)) rotateY(calc(var(--end-ry, -12deg) - 260deg)) rotateZ(calc(var(--end-rz, 0deg) + 95deg));
  }
  78% {
    transform: rotateX(calc(var(--end-rx, 10deg) - 22deg)) rotateY(calc(var(--end-ry, -12deg) + 18deg)) rotateZ(calc(var(--end-rz, 0deg) + 8deg));
  }
  100% {
    transform: rotateX(var(--end-rx, 10deg)) rotateY(var(--end-ry, -12deg)) rotateZ(var(--end-rz, 0deg));
  }
}

/* Cada una de las 6 caras del cubo 3D */
.die-face {
  position: absolute;
  width: 66px;
  height: 66px;
  border-radius: 13px;
  background: linear-gradient(145deg, #ffffff 0%, #f6f1e3 58%, #ddd2b8 100%);
  border: 2px solid #e6dcc6;
  box-shadow: inset 0 2px 5px rgba(255, 255, 255, 0.95), inset 0 -3px 6px rgba(0, 0, 0, 0.18);
  padding: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  backface-visibility: hidden;
}

/* Posicionamiento 3D de las 6 caras del cubo (radio = 33px) */
.die-face.face-front  { transform: rotateY(0deg) translateZ(33px); }
.die-face.face-back   { transform: rotateY(180deg) translateZ(33px); }
.die-face.face-right  { transform: rotateY(90deg) translateZ(33px); }
.die-face.face-left   { transform: rotateY(-90deg) translateZ(33px); }
.die-face.face-top    { transform: rotateX(90deg) translateZ(33px); }
.die-face.face-bottom { transform: rotateX(-90deg) translateZ(33px); }

/* Skins adicionales de Dados para las 6 caras (8 variedades HD) */
.die-3d-cube.skin-celeste .die-face {
  background: linear-gradient(145deg, #e0f2fe 0%, #7dd3fc 52%, #0284c7 100%);
  border-color: #ffffff;
  box-shadow: inset 0 2px 6px rgba(255, 255, 255, 0.8);
}

.die-3d-cube.skin-celeste .die-pip {
  background: radial-gradient(circle at 35% 35%, #0f172a 0%, #020617 100%);
}

.die-3d-cube.skin-obsidian .die-face {
  background: linear-gradient(145deg, #3f3f46 0%, #18181b 60%, #09090b 100%);
  border-color: #fbbf24;
  box-shadow: inset 0 2px 5px rgba(255, 255, 255, 0.22);
}

.die-3d-cube.skin-obsidian .die-pip {
  background: radial-gradient(circle at 35% 35%, #fef08a 0%, #f59e0b 70%, #b45309 100%);
  box-shadow: 0 0 6px rgba(251, 191, 36, 0.6);
}

.die-3d-cube.skin-obsidian .die-corner-num {
  color: #fde047;
}

.die-3d-cube.skin-ruby .die-face {
  background: linear-gradient(145deg, #ef4444 0%, #b91c1c 62%, #7f1d1d 100%);
  border-color: #fca5a5;
  box-shadow: inset 0 2px 6px rgba(255, 255, 255, 0.45);
}

.die-3d-cube.skin-ruby .die-pip {
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #fef08a 80%, #f59e0b 100%);
}

.die-3d-cube.skin-ruby .die-corner-num {
  color: #ffffff;
}

.die-3d-cube.skin-emerald .die-face {
  background: linear-gradient(145deg, #34d399 0%, #059669 58%, #064e3b 100%);
  border-color: #a7f3d0;
  box-shadow: inset 0 2px 6px rgba(255, 255, 255, 0.55);
}

.die-3d-cube.skin-emerald .die-pip {
  background: radial-gradient(circle at 35% 35%, #fef08a 0%, #f59e0b 85%, #b45309 100%);
}

.die-3d-cube.skin-emerald .die-corner-num {
  color: #ecfdf5;
}

.die-3d-cube.skin-sapphire .die-face {
  background: linear-gradient(145deg, #60a5fa 0%, #1d4ed8 58%, #1e3a8a 100%);
  border-color: #bfdbfe;
  box-shadow: inset 0 2px 6px rgba(255, 255, 255, 0.55);
}

.die-3d-cube.skin-sapphire .die-pip {
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #e0f2fe 85%, #93c5fd 100%);
}

.die-3d-cube.skin-sapphire .die-corner-num {
  color: #eff6ff;
}

.die-3d-cube.skin-amethyst .die-face {
  background: linear-gradient(145deg, #c084fc 0%, #7e22ce 58%, #4c1d95 100%);
  border-color: #e9d5ff;
  box-shadow: inset 0 2px 6px rgba(255, 255, 255, 0.55);
}

.die-3d-cube.skin-amethyst .die-pip {
  background: radial-gradient(circle at 35% 35%, #fef08a 0%, #fbbf24 85%, #d97706 100%);
}

.die-3d-cube.skin-amethyst .die-corner-num {
  color: #faf5ff;
}

.die-3d-cube.skin-gold .die-face {
  background: linear-gradient(145deg, #fef08a 0%, #f59e0b 55%, #b45309 100%);
  border-color: #ffffff;
  box-shadow: inset 0 2px 6px rgba(255, 255, 255, 0.85);
}

.die-3d-cube.skin-gold .die-pip {
  background: radial-gradient(circle at 35% 35%, #27272a 0%, #09090b 100%);
}

.die-3d-cube.skin-diamond .die-face {
  background: linear-gradient(145deg, #ffffff 0%, #e0f2fe 45%, #bae6fd 75%, #7dd3fc 100%);
  border-color: #38bdf8;
  box-shadow: inset 0 2px 8px rgba(255, 255, 255, 0.95), 0 0 12px rgba(56, 189, 248, 0.45);
}

.die-3d-cube.skin-diamond .die-pip {
  background: radial-gradient(circle at 35% 35%, #0284c7 0%, #0f172a 100%);
}

.die-gloss-overlay {
  position: absolute;
  top: 3px;
  left: 5px;
  right: 5px;
  height: 36%;
  border-radius: 9px 9px 40% 40%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
}

/* Cuadrícula 3x3 de Puntos (Pips) del Dado */
.die-pips-grid {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  place-items: center;
}

.die-pip-cell {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Punto en Bajorrelieve de Alta Visibilidad */
.die-pip {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #27272a 0%, #09090b 100%);
  box-shadow:
    inset 0 2px 3px rgba(0, 0, 0, 0.85),
    0 1px 1px rgba(255, 255, 255, 0.7);
  display: block;
}

/* El As (1) tradicional tiene el punto central más grande y carmesí */
.die-pip.pip-ace-center {
  width: 18px;
  height: 18px;
  background: radial-gradient(circle at 35% 35%, #ef4444 0%, #b91c1c 75%, #7f1d1d 100%);
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.65),
    0 0 8px rgba(239, 68, 68, 0.45);
}

/* Indicador numérico sutil en esquina para lectura instantánea */
.die-corner-num {
  position: absolute;
  bottom: 2px;
  right: 4px;
  font-size: 9px;
  font-weight: 900;
  color: rgba(24, 24, 27, 0.42);
  pointer-events: none;
}

/* ==========================================================================
   BARRA DE CONTROLES DE TIRO DEL CUBILETE (PIE DE LA ARENA)
   ========================================================================== */
.generala-action-dock {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding-top: 4px;
}

.btn-roll-cubilete {
  flex: 1;
  max-width: 420px;
  padding: 14px 24px;
  border-radius: 18px;
  background: linear-gradient(180deg, #4ade80 0%, #16a34a 55%, #15803d 100%);
  border: 3px solid #bbf7d0;
  color: #ffffff;
  font-family: var(--font-title);
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  box-shadow:
    0 8px 24px rgba(22, 163, 74, 0.65),
    inset 0 2px 5px rgba(255, 255, 255, 0.55);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.btn-roll-cubilete:hover:not(:disabled) {
  transform: translateY(-3px) scale(1.02);
  box-shadow:
    0 12px 30px rgba(22, 163, 74, 0.85),
    inset 0 2px 6px rgba(255, 255, 255, 0.75);
}

.btn-roll-cubilete:active:not(:disabled) {
  transform: translateY(1px) scale(0.98);
}

.btn-roll-cubilete:disabled {
  background: rgba(51, 65, 85, 0.65);
  border-color: rgba(148, 163, 184, 0.3);
  color: #94a3b8;
  box-shadow: none;
  cursor: not-allowed;
}

/* ==========================================================================
   COLUMNA DERECHA: LA PLANILLA OFICIAL DE GENERALA (10 CATEGORÍAS)
   ========================================================================== */
.generala-scorecard-panel {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.scorecard-paper-sheet {
  flex: 1;
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  border: 2.5px solid rgba(245, 158, 11, 0.55);
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.65);
}

.scorecard-sheet-header {
  padding: 12px 16px;
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.22) 0%, rgba(15, 23, 42, 0.95) 100%);
  border-bottom: 1.5px solid rgba(245, 158, 11, 0.35);
}

.sc-sheet-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sc-sheet-icon {
  font-size: 24px;
}

.sc-sheet-title {
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 900;
  color: #fde047;
  letter-spacing: 0.8px;
}

.sc-sheet-subtitle {
  font-size: 11px;
  color: #cbd5e1;
  margin-top: 2px;
}

.scorecard-table-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: auto;
  padding: 0;
}

.generala-scorecard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.generala-scorecard-table thead th {
  position: sticky;
  top: 0;
  background: #090d16;
  color: #e2e8f0;
  padding: 8px 10px;
  border-bottom: 2px solid rgba(245, 158, 11, 0.4);
  z-index: 5;
  font-weight: 800;
}

.sc-cat-col-head {
  text-align: left;
  min-width: 155px;
}

.sc-player-col {
  text-align: center;
  min-width: 82px;
}

.sc-player-col.sc-col-me {
  background: rgba(56, 189, 248, 0.14);
}

.sc-player-col.sc-col-turn {
  border-bottom-color: #fde047;
}

.sc-player-head-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.sc-player-name {
  font-size: 11px;
  font-weight: 800;
  color: #ffffff;
  max-width: 85px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sc-player-total-chip {
  font-size: 10px;
  font-weight: 900;
  color: #fde047;
  background: rgba(245, 158, 11, 0.18);
  padding: 1px 6px;
  border-radius: 6px;
}

/* Divisores de Sección: Parte Baja (Números) y Parte Alta (Figuras) */
.sc-section-divider td {
  background: rgba(15, 23, 42, 0.95);
  color: #38bdf8;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.8px;
  padding: 5px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sc-section-divider.sc-section-upper td {
  color: #fde047;
}

.sc-row {
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  transition: background 0.15s ease;
}

.sc-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.sc-cat-info {
  padding: 6px 10px;
}

.sc-cat-main {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sc-cat-icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
}

.sc-cat-text {
  display: flex;
  flex-direction: column;
}

.sc-cat-title {
  font-weight: 800;
  color: #f8fafc;
  font-size: 12px;
}

.sc-cat-hint {
  font-size: 10px;
  color: #94a3b8;
}

.sc-cell {
  text-align: center;
  padding: 5px 6px;
  vertical-align: middle;
}

.sc-cell.sc-col-me {
  background: rgba(56, 189, 248, 0.06);
}

.sc-filled-val {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 13px;
  color: #4ade80;
}

.sc-cell-raya .sc-filled-val {
  color: #f87171;
  font-weight: 700;
  font-size: 11px;
}

.servido-mini-tag {
  background: #f59e0b;
  color: #000;
  font-size: 9px;
  font-weight: 900;
  padding: 1px 4px;
  border-radius: 4px;
}

.sc-empty-dot {
  color: rgba(148, 163, 184, 0.35);
  font-weight: 900;
}

/* Botones Interactivos para Anotar o Tachar en la Planilla */
.btn-score-cell {
  width: 100%;
  padding: 5px 8px;
  border-radius: 8px;
  font-family: var(--font-main);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  transition: all 0.18s ease;
}

.btn-score-valid {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.28) 0%, rgba(21, 128, 61, 0.45) 100%);
  border: 1.5px solid #4ade80;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.35);
}

.btn-score-valid:hover {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: #052e16;
  transform: scale(1.05);
}

.pred-pts {
  font-size: 13px;
  font-weight: 900;
  color: #fde047;
}

.btn-score-valid:hover .pred-pts {
  color: #052e16;
}

.pred-servido-badge {
  font-size: 8px;
  font-weight: 900;
  background: #fde047;
  color: #000;
  padding: 1px 4px;
  border-radius: 4px;
}

.btn-score-scratch {
  background: rgba(239, 68, 68, 0.12);
  border: 1px dashed rgba(248, 113, 113, 0.45);
  color: #fca5a5;
}

.btn-score-scratch:hover {
  background: rgba(239, 68, 68, 0.28);
  border-color: #f87171;
  color: #ffffff;
}

/* Fila de Totales de la Planilla */
.sc-totals-row td {
  background: #090d16;
  padding: 10px;
  border-top: 2px solid rgba(245, 158, 11, 0.5);
  font-weight: 900;
}

.sc-total-label {
  color: #fde047;
  font-family: var(--font-title);
  font-size: 12px;
}

.sc-total-cell {
  text-align: center;
}

.sc-grand-total {
  font-size: 16px;
  font-weight: 900;
  color: #fde047;
}

/* ==========================================================================
   TIENDA DE GENERALA HD & BILLETERA DIFERENCIADA (SIN SUPERPOSICIÓN DE PESTAÑAS)
   ========================================================================== */
.wallet-pill-won {
  background: linear-gradient(135deg, rgba(20, 83, 45, 0.9) 0%, rgba(5, 46, 22, 0.95) 100%) !important;
  border: 1.5px solid rgba(74, 222, 128, 0.65) !important;
  cursor: pointer;
}

#modal-generala-store .modal-dialog.store-modal-dialog {
  display: flex !important;
  flex-direction: column !important;
  max-height: 88vh !important;
  overflow: hidden !important;
  padding: 16px 18px !important;
}

#modal-generala-store .modal-header {
  flex-shrink: 0 !important;
  margin-bottom: 10px !important;
}

.store-wallet-summary-bar {
  flex-shrink: 0 !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 12px;
  margin-bottom: 10px;
  border-radius: 12px;
  background: rgba(9, 13, 22, 0.78);
  border: 1px solid rgba(250, 204, 21, 0.32);
  font-size: 12px;
}

.store-wallet-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #cbd5e1;
  font-weight: 700;
}

/* Pestañas de la Tienda fijas arriba sin que el cuadro de abajo se superponga jamás */
#modal-generala-store .store-categories-pills {
  flex-shrink: 0 !important;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 8px !important;
  margin: 0 0 12px 0 !important;
  padding: 6px !important;
  background: rgba(9, 13, 22, 0.88) !important;
  border: 1.5px solid rgba(56, 189, 248, 0.35) !important;
  border-radius: 14px !important;
  overflow: visible !important;
  position: relative !important;
  z-index: 15 !important;
}

#modal-generala-store .store-cat-pill {
  width: 100% !important;
  min-height: 38px !important;
  padding: 8px 6px !important;
  border-radius: 10px !important;
  border: 1.5px solid rgba(255, 255, 255, 0.16) !important;
  background: rgba(30, 41, 59, 0.85) !important;
  color: #e2e8f0 !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  text-align: center !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  cursor: pointer !important;
  transition: all 0.18s ease !important;
}

#modal-generala-store .store-cat-pill:hover {
  background: rgba(51, 65, 85, 0.95) !important;
  color: #ffffff !important;
}

#modal-generala-store .store-cat-pill.active {
  background: linear-gradient(135deg, #fde047 0%, #f59e0b 100%) !important;
  border-color: #ffffff !important;
  color: #09090b !important;
  font-weight: 900 !important;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.55) !important;
}

#modal-generala-store #store-items-grid {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  margin-top: 0 !important;
  padding: 4px 4px 12px 4px !important;
  position: relative !important;
  z-index: 1 !important;
}

/* ==========================================================================
   RESPONSIVE DESIGN (TABLETS, CELULARES ANDROID EN LANDSCAPE Y PORTRAIT)
   ========================================================================== */
@media (max-width: 1180px) {
  .generala-gameplay-grid {
    grid-template-columns: 1.78fr 0.82fr;
    gap: 8px;
    padding: 44px 4px 8px 10px;
  }

  .die-3d-scene,
  .die-3d-cube,
  .die-face {
    width: 54px;
    height: 54px;
    border-radius: 11px;
  }

  .die-face.face-front  { transform: rotateY(0deg) translateZ(27px); }
  .die-face.face-back   { transform: rotateY(180deg) translateZ(27px); }
  .die-face.face-right  { transform: rotateY(90deg) translateZ(27px); }
  .die-face.face-left   { transform: rotateY(-90deg) translateZ(27px); }
  .die-face.face-top    { transform: rotateX(90deg) translateZ(27px); }
  .die-face.face-bottom { transform: rotateX(-90deg) translateZ(27px); }

  .die-pip {
    width: 9.5px;
    height: 9.5px;
  }

  .die-pip.pip-ace-center {
    width: 14.5px;
    height: 14.5px;
  }

  .cubilete-hand-container {
    width: 225px;
    height: 215px;
  }
}

/* Celulares Android / iPhone (tanto en Horizontal como rotado automáticamente desde Vertical):
   Mesa Grande en Landscape + 5 Dados Grandes + Planilla Corrida Bien a la Derecha */
@media (max-height: 560px), (max-width: 980px) {
  /* --- 1. BARRA SUPERIOR Y LOBBY EN CELULAR --- */
  .domino-top-bar {
    height: 38px !important;
    padding: 0 8px !important;
    gap: 4px !important;
    overflow: hidden;
  }

  .top-bar-profile {
    padding: 2px 8px 2px 4px !important;
    gap: 5px !important;
  }

  .profile-avatar-frame {
    width: 28px !important;
    height: 28px !important;
  }

  .profile-name {
    font-size: 10.5px !important;
  }

  .profile-level-badge {
    font-size: 8.5px !important;
  }

  .wallet-pill {
    padding: 2px 6px !important;
  }

  .wallet-amount {
    font-size: 10px !important;
  }

  .brand-argentina {
    padding: 2px 8px !important;
    border-radius: 14px !important;
    gap: 4px !important;
    flex-shrink: 0;
  }

  .brand-argentina .brand-icon {
    font-size: 14px !important;
  }

  .brand-argentina .brand-title {
    font-size: 10px !important;
    white-space: nowrap !important;
  }

  .brand-argentina .brand-tag {
    display: none !important;
  }

  .top-bar-center-nav {
    gap: 4px !important;
  }

  .btn-top-tab-nav {
    padding: 3px 7px !important;
    font-size: 9px !important;
    gap: 3px !important;
  }

  .btn-buy-coins-glossy {
    padding: 3px 8px !important;
    font-size: 9px !important;
  }

  .sale-badge-burst {
    width: 30px !important;
    height: 30px !important;
  }

  .sale-tag-top,
  .sale-tag-bot {
    font-size: 6px !important;
  }

  .btn-game-menu-tab {
    padding: 3px 7px !important;
    font-size: 9px !important;
  }

  .screen {
    height: calc(100% - 38px) !important;
  }

  body.in-gameplay .screen#screen-gameplay {
    height: 100% !important;
  }

  /* Ajustes de la Tienda en Celular Horizontal para que las 4 pestañas se vean siempre impecables */
  #modal-generala-store .modal-dialog.store-modal-dialog {
    max-height: 94vh !important;
    padding: 10px 12px !important;
  }

  .store-wallet-summary-bar {
    padding: 4px 8px !important;
    margin-bottom: 6px !important;
    font-size: 10.5px !important;
  }

  #modal-generala-store .store-categories-pills {
    gap: 5px !important;
    padding: 4px !important;
    margin-bottom: 8px !important;
  }

  #modal-generala-store .store-cat-pill {
    min-height: 30px !important;
    padding: 5px 4px !important;
    font-size: 10.5px !important;
  }

  .lobby-player-mode-bar {
    margin: 2px auto 0 !important;
    padding: 2px 10px !important;
    gap: 8px !important;
  }

  .lobby-mode-title {
    font-size: 10px !important;
  }

  .lobby-mode-pill {
    padding: 2px 9px !important;
    font-size: 10px !important;
  }

  .lobby-carousel-wrapper {
    padding: 2px 0 !important;
  }

  .lobby-tiers-carousel {
    padding: 4px 40px !important;
    gap: 12px !important;
  }

  .carousel-card {
    flex: 0 0 180px !important;
    height: 212px !important;
    padding: 6px 8px !important;
    border-radius: 16px !important;
    border-width: 2.5px !important;
  }

  .card-balloons-row {
    margin-top: 0 !important;
    gap: 4px !important;
  }

  .balloon {
    width: 32px !important;
    height: 32px !important;
    font-size: 6px !important;
    padding: 2px !important;
  }

  .chain-lock-icon,
  .tier-flags-icon {
    font-size: 19px !important;
  }

  .card-tier-banner {
    margin-top: 1px !important;
  }

  .card-3d-title {
    font-size: 13.5px !important;
    margin-top: 1px !important;
  }

  .card-bet-range-box {
    padding: 3px 6px !important;
    border-radius: 8px !important;
  }

  .bet-range-label {
    font-size: 7px !important;
  }

  .bet-range-value {
    font-size: 10.5px !important;
    margin-top: 0 !important;
  }

  .card-player-count-selector {
    margin: 2px 0 !important;
    padding: 2px !important;
    gap: 3px !important;
  }

  .card-pcount-pill {
    padding: 2.5px 4px !important;
    font-size: 8.5px !important;
  }

  .btn-play-now-glossy {
    padding: 5px 10px !important;
    border-radius: 10px !important;
  }

  .btn-play-now-glossy .play-text {
    font-size: 11px !important;
  }

  .btn-card-action {
    padding: 4px 4px !important;
    font-size: 9px !important;
  }

  .card-players-count {
    font-size: 8px !important;
  }

  .lobby-bottom-dock {
    height: 42px !important;
    padding: 0 8px !important;
  }

  .dock-icon-wrap {
    width: 24px !important;
    height: 24px !important;
    font-size: 12px !important;
  }

  .dock-btn-label {
    font-size: 7.5px !important;
  }

  .dock-sub-badge {
    font-size: 6px !important;
    padding: 0 3px !important;
  }

  /* --- 2. MESA DE JUEGO GRANDE (GAMEPLAY) EN CELULAR LANDSCAPE --- */
  .felt-table-wrapper {
    margin: 1px !important;
    border-width: 3px !important;
    border-radius: 12px !important;
  }

  .table-hud {
    top: 3px !important;
    left: 6px !important;
    right: 6px !important;
  }

  .table-info-box {
    padding: 1.5px 7px !important;
    gap: 5px !important;
  }

  .table-room-code,
  .table-pot,
  .table-target {
    font-size: 9.5px !important;
  }

  .btn-hud-action {
    padding: 1.5px 6px !important;
    font-size: 9px !important;
    gap: 2px !important;
  }

  .turn-timer-hud {
    padding: 1.5px 6px !important;
  }

  .timer-countdown {
    font-size: 10.5px !important;
  }

  /* Correr el cuadro de anotación bien hacia la derecha y agrandar el Gran Paño Verde (~70% mesa / 30% planilla) */
  .generala-gameplay-grid {
    grid-template-columns: 1.84fr 0.76fr !important;
    grid-template-rows: 1fr !important;
    height: 100% !important;
    padding: 24px 2px 2px 6px !important;
    gap: 6px !important;
    overflow: hidden !important;
  }

  /* Quitar borde y padding redundante de la arena para que la mesa verde sea mucho más grande */
  .generala-dice-arena {
    padding: 0 !important;
    gap: 3px !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
  }

  /* Cabecera de Jugadores y Estado de Tiros en UNA SOLA FILA horizontal súper compacta */
  .arena-top-header {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 4px !important;
  }

  .generala-players-strip {
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
    gap: 4px !important;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .gen-player-card {
    padding: 1.5px 6px 1.5px 3px !important;
    min-width: 0 !important;
    border-radius: 8px !important;
    gap: 4px !important;
  }

  .gen-player-avatar-wrap {
    width: 20px !important;
    height: 20px !important;
    border-width: 1.5px !important;
  }

  .gen-player-name {
    font-size: 9px !important;
    max-width: 65px !important;
  }

  .gen-player-score-pill {
    font-size: 8.5px !important;
    gap: 3px !important;
  }

  .gen-turn-tag {
    font-size: 6.5px !important;
    padding: 0 3px !important;
  }

  .turn-roll-status-box {
    padding: 1.5px 6px !important;
    border-radius: 8px !important;
    gap: 4px !important;
    flex-shrink: 0;
  }

  .turn-status-top-row {
    gap: 5px !important;
  }

  .roll-status-header {
    font-size: 9px !important;
  }

  .roll-dots-indicator {
    gap: 3px !important;
  }

  .roll-step-pill {
    padding: 1px 5px !important;
    font-size: 8px !important;
    border-radius: 5px !important;
  }

  /* Ocultar el párrafo largo de ayuda para que el paño verde sea enorme */
  .roll-instruction-hint {
    display: none !important;
  }

  /* El Gran Paño Verde ocupa casi toda la altura y ancho de la columna izquierda */
  .generala-big-felt-surface {
    flex: 1 !important;
    min-height: 0 !important;
    border-width: 4px !important;
    outline-width: 1px !important;
    outline-offset: -6px !important;
    border-radius: 16px !important;
    padding: 4px 10px 4px 6px !important;
  }

  .generala-big-felt-surface::before {
    inset: 6px !important;
    border-radius: 11px !important;
  }

  /* Rótulo discreto arriba a la izquierda sin tapar jamás los dados */
  .felt-top-left-banner {
    top: 4px !important;
    left: 8px !important;
    padding: 1.5px 7px !important;
    gap: 3px !important;
    background: rgba(5, 28, 16, 0.65) !important;
  }

  .felt-banner-icon {
    font-size: 9px !important;
  }

  .felt-banner-text {
    font-size: 8px !important;
  }

  .felt-baize-watermark {
    font-size: 13px !important;
    letter-spacing: 2px !important;
  }

  /* Cubilete de Cuero con Mano más grande y claro a la izquierda del paño */
  .cubilete-hand-container {
    width: 166px !important;
    height: 158px !important;
    margin-left: -2px !important;
  }

  /* 5 Dados 3D más grandes y nítidos en el paño del teléfono (50x50px) */
  .die-3d-scene,
  .die-3d-cube,
  .die-face {
    width: 50px !important;
    height: 50px !important;
    border-radius: 10px !important;
    padding: 4px !important;
  }

  .die-face.face-front  { transform: rotateY(0deg) translateZ(25px) !important; }
  .die-face.face-back   { transform: rotateY(180deg) translateZ(25px) !important; }
  .die-face.face-right  { transform: rotateY(90deg) translateZ(25px) !important; }
  .die-face.face-left   { transform: rotateY(-90deg) translateZ(25px) !important; }
  .die-face.face-top    { transform: rotateX(90deg) translateZ(25px) !important; }
  .die-face.face-bottom { transform: rotateX(-90deg) translateZ(25px) !important; }

  .die-pip {
    width: 9px !important;
    height: 9px !important;
  }

  .die-pip.pip-ace-center {
    width: 14px !important;
    height: 14px !important;
  }

  .die-corner-num {
    font-size: 7.5px !important;
    bottom: 1px !important;
    right: 2.5px !important;
  }

  .die-kept-badge {
    width: 18px !important;
    height: 18px !important;
    font-size: 9px !important;
    top: -6px !important;
    right: -6px !important;
  }

  /* Botón de Sacudir Cubilete y Tirar compacto abajo del Paño */
  .generala-action-dock {
    padding-top: 0 !important;
  }

  .btn-roll-cubilete {
    padding: 4px 12px !important;
    font-size: 11px !important;
    border-radius: 9px !important;
    border-width: 1.5px !important;
    gap: 6px !important;
  }

  /* --- 3. PLANILLA OFICIAL (COLUMNA DERECHA CORRIDA A LA DERECHA) EN CELULAR LANDSCAPE --- */
  .scorecard-paper-sheet {
    border-radius: 12px !important;
    border-width: 1.5px !important;
  }

  .scorecard-sheet-header {
    padding: 2.5px 6px !important;
  }

  .sc-sheet-icon {
    font-size: 12px !important;
  }

  .sc-sheet-title {
    font-size: 9px !important;
  }

  .sc-sheet-subtitle {
    display: none !important;
  }

  .generala-scorecard-table {
    font-size: 8.5px !important;
  }

  .generala-scorecard-table thead th {
    padding: 2px 3px !important;
  }

  .sc-cat-col-head {
    min-width: 68px !important;
  }

  .sc-player-col {
    min-width: 38px !important;
  }

  .sc-player-name {
    font-size: 8px !important;
    max-width: 48px !important;
  }

  .sc-player-total-chip {
    font-size: 7.5px !important;
    padding: 0 3px !important;
  }

  .sc-section-divider td {
    padding: 1px 4px !important;
    font-size: 7px !important;
  }

  .sc-cat-info {
    padding: 1.5px 3px !important;
  }

  .sc-cat-main {
    gap: 2.5px !important;
  }

  .sc-cat-icon {
    font-size: 10.5px !important;
    width: 13px !important;
  }

  .sc-cat-title {
    font-size: 8.5px !important;
  }

  .sc-cat-hint {
    display: none !important;
  }

  .sc-cell {
    padding: 1px 2px !important;
  }

  .sc-filled-val {
    font-size: 9px !important;
  }

  .btn-score-cell {
    padding: 1.5px 2.5px !important;
    font-size: 7.5px !important;
    border-radius: 4px !important;
    flex-direction: row !important;
    gap: 2px !important;
  }

  .pred-pts {
    font-size: 8.5px !important;
  }

  .sc-totals-row td {
    padding: 2.5px 4px !important;
  }

  .sc-total-label {
    font-size: 8.5px !important;
  }

  .sc-grand-total {
    font-size: 11px !important;
  }
}

/* En celulares sostenidos en vertical (Portrait), rotar toda la app 90° automáticamente a Landscape
   para que SIEMPRE se vea la mesa grande horizontal y los 5 dados completos */
@media (max-width: 900px) and (orientation: portrait) {
  html, body {
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
  }

  #generala-app {
    position: fixed !important;
    top: 0 !important;
    left: 100vw !important;
    width: 100vh !important;
    height: 100vw !important;
    left: 100dvw !important;
    width: 100dvh !important;
    height: 100dvw !important;
    transform: rotate(90deg) !important;
    transform-origin: top left !important;
    overflow: hidden !important;
    z-index: 1;
  }
}


