/* ==========================================================================
   Beta v4.6 — Jugar (selector, Pesca, Penales y resultado)
   Mismo lenguaje que la ficha y la barra de chat: crema con borde verde,
   títulos estilo moneda y botones amarillos.
   ========================================================================== */

#stage-floor .games-window {
  --g-line: #6f9340;
  --g-rim: #e4efc2;
  --g-cream: #fbf7e6;
  --g-ink: #4a2c17;
  --g-soft: #7a5a3a;
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 30;
  box-sizing: border-box;
  width: min(840px, calc(100% - 48px));
  max-height: calc(100% - 32px);
  overflow: auto;
  padding: 16px 22px 20px;
  border: 5px solid var(--g-line);
  border-radius: 30px;
  background: var(--g-cream);
  box-shadow: inset 0 0 0 7px var(--g-rim), 0 16px 36px rgba(60, 35, 15, .28);
  color: var(--g-ink);
  font-family: "Baloo 2", sans-serif;
  transform: translate(-50%, -50%);
  animation: gamesIn .22s ease-out;
}
#stage-floor .games-window[hidden] { display: none; }
#stage-floor .games-window.games-play { width: min(920px, calc(100% - 40px)); }
@keyframes gamesIn { from { opacity: 0; transform: translate(-50%, -46%) scale(.97); } }

/* Cabecera: título tipo moneda, fichas de puntaje y cerrar. */
#stage-floor .games-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 10px;
}
#stage-floor .games-title {
  flex: 1;
  margin: 0;
  font: 900 32px/1.1 "Baloo 2", sans-serif;
  color: #ffe052;
  -webkit-text-stroke: 3px #78410d;
  paint-order: stroke fill;
  text-shadow: 0 3px 0 #512a0c;
  letter-spacing: .01em;
}
#stage-floor .games-close {
  flex: none;
  width: 46px;
  height: 46px;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: url("../assets/ui/cursors/pointer.png") 8 1, pointer; cursor: -webkit-image-set(url("../assets/ui/cursors/pointer.png") 1x, url("../assets/ui/cursors/pointer@2x.png") 2x) 8 1, pointer;
  transition: transform .15s ease;
}
#stage-floor .games-close img { display: block; width: 100%; height: 100%; pointer-events: none; }
#stage-floor .games-close:hover { transform: scale(1.08); }
#stage-floor .games-close:active { transform: scale(.92); }
#stage-floor .games-close:focus-visible { outline: 3px solid #d7a95f; outline-offset: 2px; border-radius: 50%; }

#stage-floor .games-chips { display: flex; gap: 8px; }
#stage-floor .games-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 64px;
  justify-content: center;
  padding: 4px 14px;
  border: 3px solid #c9dca4;
  border-radius: 999px;
  background: #fffdf3;
  font: 800 17px/1.2 "Baloo 2", sans-serif;
  color: var(--g-ink);
}
#stage-floor .games-chip:empty { display: none; }
#stage-floor .games-chip img { width: 24px; height: 24px; object-fit: contain; }

/* Botones amarillos (misma paleta que «Enviar»). */
#stage-floor .games-btn {
  min-width: 0;
  min-height: 0;
  padding: 8px 22px 9px;
  border: 3px solid #c98f14;
  border-radius: 16px;
  background: linear-gradient(#ffe27a, #f7c843);
  box-shadow: inset 0 -4px 0 #e5ab25, inset 0 3px 0 rgba(255, 255, 255, .55), 0 3px 0 #a8740f;
  color: #4b331d;
  font: 800 18px/1.1 "Baloo 2", sans-serif;
  cursor: url("../assets/ui/cursors/pointer.png") 8 1, pointer; cursor: -webkit-image-set(url("../assets/ui/cursors/pointer.png") 1x, url("../assets/ui/cursors/pointer@2x.png") 2x) 8 1, pointer;
  transition: transform .12s ease, filter .12s ease, box-shadow .12s ease;
}
#stage-floor .games-btn:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.05); }
#stage-floor .games-btn:active:not(:disabled) { transform: translateY(2px); box-shadow: inset 0 -2px 0 #e5ab25, 0 1px 0 #a8740f; }
#stage-floor .games-btn:focus-visible { outline: 3px solid #6f9340; outline-offset: 2px; }
#stage-floor .games-btn:disabled { filter: grayscale(.85); opacity: .55; cursor: url("../assets/ui/cursors/not-allowed.png") 2 1, not-allowed; cursor: -webkit-image-set(url("../assets/ui/cursors/not-allowed.png") 1x, url("../assets/ui/cursors/not-allowed@2x.png") 2x) 2 1, not-allowed; }
#stage-floor .games-btn-soft {
  border-color: #8fae5a;
  background: linear-gradient(#fbfdf1, #e7f0cc);
  box-shadow: inset 0 -4px 0 #d3e2ad, 0 3px 0 #6f9340;
}

/* ---------------------------------------------------------------- Selector
   v4.6.10: la ventana-tablet de minijuegos_v2.ai sin recuadros
   (assets/ui/games/window-v4.svg, 1396 × 1038) y una grilla de 4 × 2
   recuadros por página (cada uno es el recuadro original del .ai,
   slot.svg), con flechas y puntitos abajo cuando hay más de 8 juegos
   (scripts/export-games-v4610.py). Sólo el ícono de cada juego, sin
   nombres. La ✕ roja es su propio SVG (close.svg). Porcentajes medidos
   sobre el .ai: la pantalla crema va de x 168 a 1276 y de y 191 a 904. */
#stage-floor .games-window.games-picker {
  width: min(760px, calc(100% - 48px));
  max-height: none;
  aspect-ratio: 1396 / 1038;
  overflow: visible;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: url("../assets/ui/games/window-v4.svg") center / 100% 100% no-repeat;
  box-shadow: none;
  filter: drop-shadow(0 14px 22px rgba(20, 60, 80, .28));
}
#stage-floor .games-picker .games-close {
  position: absolute;
  left: 86.8%;
  top: 6.1%;
  z-index: 2;
  width: 10.1%;
  height: 14.4%;
  aspect-ratio: auto;
}
#stage-floor .games-picker .games-close img { object-fit: contain; }
/* Grilla: recuadros de 240 × 250 unidades, separados 28 × 24. */
#stage-floor .games-panels {
  position: absolute;
  left: 12.32%;
  top: 19.75%;
  width: 75.36%;
  height: 50.48%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 4.58% 2.66%;
}
#stage-floor .game-panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 9% / 8%;
  background: url("../assets/ui/games/slot.svg") center / 100% 100% no-repeat;
  cursor: url("../assets/ui/cursors/pointer.png") 8 1, pointer; cursor: -webkit-image-set(url("../assets/ui/cursors/pointer.png") 1x, url("../assets/ui/cursors/pointer@2x.png") 2x) 8 1, pointer;
  transition: transform .16s ease, filter .16s ease;
}
#stage-floor .game-panel-empty { background: url("../assets/ui/games/slot.svg") center / 100% 100% no-repeat; opacity: .45; }
#stage-floor .game-panel:hover:not(.is-blocked) { transform: scale(1.05); filter: brightness(1.04) drop-shadow(0 4px 0 rgba(90, 58, 34, .18)); }
#stage-floor .game-panel:active:not(.is-blocked) { transform: scale(.97); }
#stage-floor .game-panel:focus-visible { outline: 4px solid #3fb6d9; outline-offset: 3px; }
#stage-floor .game-panel.is-blocked { cursor: url("../assets/ui/cursors/not-allowed.png") 2 1, not-allowed; cursor: -webkit-image-set(url("../assets/ui/cursors/not-allowed.png") 1x, url("../assets/ui/cursors/not-allowed@2x.png") 2x) 2 1, not-allowed; }
#stage-floor .game-panel.is-blocked .game-panel-icon { filter: grayscale(.85); opacity: .45; }
#stage-floor .game-panel-icon {
  width: 70%;
  height: 70%;
  object-fit: contain;
  pointer-events: none;
  transition: transform .2s ease;
}
#stage-floor .game-panel[data-play="ruleta"] .game-panel-icon { width: 78%; height: 78%; }
#stage-floor .game-panel:hover:not(.is-blocked) .game-panel-icon { transform: rotate(-6deg) scale(1.06); }
/* Páginas: flechas del inventario y un puntito por página. */
#stage-floor .games-pager {
  position: absolute;
  left: 50%;
  top: 71.6%;
  height: 7.5%;
  display: flex;
  align-items: center;
  gap: 18px;
  transform: translateX(-50%);
}
#stage-floor .games-pager[hidden] { display: none; }
#stage-floor .games-page-btn {
  height: 100%;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  background: none;
  cursor: url("../assets/ui/cursors/pointer.png") 8 1, pointer; cursor: -webkit-image-set(url("../assets/ui/cursors/pointer.png") 1x, url("../assets/ui/cursors/pointer@2x.png") 2x) 8 1, pointer;
  transition: transform .15s ease;
}
#stage-floor .games-page-btn img { width: 100%; height: 100%; object-fit: contain; display: block; }
#stage-floor .games-page-btn:hover:not(:disabled) { transform: scale(1.1); }
#stage-floor .games-page-btn:disabled { opacity: .3; cursor: url("../assets/ui/cursors/not-allowed.png") 2 1, not-allowed; cursor: -webkit-image-set(url("../assets/ui/cursors/not-allowed.png") 1x, url("../assets/ui/cursors/not-allowed@2x.png") 2x) 2 1, not-allowed; }
#stage-floor .games-page-btn:focus-visible { outline: 3px solid #3fb6d9; outline-offset: 2px; border-radius: 8px; }
#stage-floor .games-page-dots { display: flex; gap: 8px; }
#stage-floor .games-page-dots i { width: 11px; height: 11px; border-radius: 50%; background: #e2cfa6; box-shadow: inset 0 0 0 2px #c9a86a; }
#stage-floor .games-page-dots i.is-current { background: #3fb6d9; box-shadow: inset 0 0 0 2px #1f86a6; }
#stage-floor .games-picker .games-note {
  position: absolute;
  left: 50%;
  bottom: 12.5%;
  width: 70%;
  margin: 0;
  min-height: 0;
  transform: translateX(-50%);
  text-align: center;
  font: 800 15px/1.25 "Baloo 2", sans-serif;
  color: #7a4a1c;
}
#stage-floor .games-picker .games-note:empty { display: none; }

/* ------------------------------------------------------------------ Partida */
#stage-floor .games-hint {
  min-height: 1.5em;
  margin: 0 0 8px;
  text-align: center;
  font: 800 17px/1.4 "Baloo 2", sans-serif;
  color: var(--g-ink);
}
#stage-floor .games-stage { position: relative; }
#stage-floor .games-arena {
  position: relative;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  border: 4px solid var(--g-line);
  border-radius: 22px;
  background: #dff1f7;
  touch-action: manipulation;
}

#stage-floor .games-controls {
  position: absolute;
  left: 50%;
  bottom: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: min(440px, 80%);
  transform: translateX(-50%);
}
#stage-floor .games-action { min-width: 180px; font-size: 22px; padding: 9px 26px 10px; }
#stage-floor .games-action.is-hidden { visibility: hidden; }
#stage-floor .games-action.is-waiting { filter: grayscale(.6); opacity: .75; }
#stage-floor .games-action.is-hot { animation: gamesHot .7s ease-in-out infinite alternate; }
@keyframes gamesHot { to { box-shadow: inset 0 -4px 0 #e5ab25, 0 3px 0 #a8740f, 0 0 0 6px rgba(255, 224, 82, .45); } }

/* v4.6.11: el botón de Pesca cambia de aspecto según el momento, para que
   «tantean» y «picó» se distingan de un vistazo (sin leer la indicación). */
#stage-floor .games-action[data-mode] { transition: transform .15s ease, background .15s ease, border-color .15s ease, color .15s ease; }
#stage-floor .games-action[data-mode="wait"] {
  border-color: #3a8fb5;
  background: linear-gradient(#eef9fd, #bfe4f3);
  box-shadow: inset 0 -4px 0 #97cfe6, inset 0 3px 0 rgba(255, 255, 255, .7), 0 3px 0 #2c7597;
  color: #22546b;
}
#stage-floor .games-action[data-mode="nibble"] {
  border-color: #d9822b;
  background: linear-gradient(#ffe7bf, #ffbe6e);
  box-shadow: inset 0 -4px 0 #f0a14a, inset 0 3px 0 rgba(255, 255, 255, .6), 0 3px 0 #a85d17;
  color: #6a3510;
  animation: fsBtnNibble .65s ease-in-out;
}
#stage-floor .games-action[data-mode="bite"] {
  border-color: #2f8a1a;
  background: linear-gradient(#c9f78f, #6fd13f);
  box-shadow: inset 0 -4px 0 #4fae27, inset 0 3px 0 rgba(255, 255, 255, .6), 0 3px 0 #276f14, 0 0 0 6px rgba(126, 224, 74, .45);
  color: #173f08;
  font-weight: 900;
  letter-spacing: .02em;
  animation: fsBtnBite .38s ease-in-out infinite alternate;
}
@keyframes fsBtnNibble {
  0%, 100% { transform: none; }
  20% { transform: translateX(-5px) rotate(-2deg); }
  45% { transform: translateX(4px) rotate(1.5deg); }
  70% { transform: translateX(-3px) rotate(-1deg); }
}
@keyframes fsBtnBite {
  from { transform: scale(1.08); box-shadow: inset 0 -4px 0 #4fae27, inset 0 3px 0 rgba(255, 255, 255, .6), 0 3px 0 #276f14, 0 0 0 4px rgba(126, 224, 74, .35); }
  to { transform: scale(1.18); box-shadow: inset 0 -4px 0 #4fae27, inset 0 3px 0 rgba(255, 255, 255, .6), 0 3px 0 #276f14, 0 0 0 12px rgba(126, 224, 74, .5); }
}
/* «!» sobre la bocha cuando pica de verdad. */
#stage-floor .fs-alert { opacity: 0; pointer-events: none; }
#stage-floor [data-phase="bite"] .fs-alert { opacity: 1; }
#stage-floor .fs-alert-pop { transform-box: fill-box; transform-origin: 50% 100%; }
#stage-floor [data-phase="bite"] .fs-alert-pop { animation: fsAlertPop .3s cubic-bezier(.3, 1.8, .5, 1) both, fsAlertWiggle .5s ease-in-out .3s infinite alternate; }
@keyframes fsAlertPop { from { transform: scale(.2); } to { transform: scale(1); } }
@keyframes fsAlertWiggle { from { transform: rotate(-7deg); } to { transform: rotate(7deg); } }

/* ----------------------------------------------------------- Pesca (v4.6.1)
   El lago mide 1672 × 941; todo lo de la escena se ubica en % de ese lienzo. */
/* El área de juego sigue en 2:1 (entra en pantallas bajas): el lago, más
   alto, se apoya abajo y recorta un poco de cielo. */
#stage-floor .fishing-scene { position: absolute; left: 0; right: 0; bottom: -2%; aspect-ratio: 1672 / 941; }
#stage-floor .fs-lake {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  user-select: none;
}
#stage-floor .fs-fx { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }

/* Mascota: lienzo de 400 × 400 que cae sobre 460 unidades del lago. */
/* v4.6.6: la pose de la mascota que pesca (brazo, caña y cuerpo) la mueve
   js/games.js (FS_POSES, fishingApplyPose) con los mismos tiempos y curvas
   que tenían acá las animaciones; así no se recalculan los estilos de toda
   la mascota en cada cuadro. Acá quedan sólo los puntos de giro. */
#stage-floor .fs-pet {
  position: absolute;
  left: 29.3%;
  top: 27.5%;
  width: 27.5%;
  aspect-ratio: 1;
  /* Hotfix v4.6.3: antes una segunda copia del lago, recortada al casco,
     tapaba la mitad de abajo de la mascota; en el borde de ese recorte
     quedaba una línea fina visible (sobre todo la vertical en el agua, a la
     derecha del barco). Ahora se recorta la mascota misma justo en el
     borde rojo del barco: mismo resultado, sin segunda capa ni línea.
     Puntos = el mismo borde de antes, pasado a % de esta caja. */
  clip-path: polygon(-100% -100%, 200% -100%, 200% 200%, 92.44% 200%, 92.44% 67.68%, 84.84% 67.68%,
    78.33% 68.56%, 67.45% 69.64%, 45.71% 71.16%, 23.96% 72.24%, -8.69% 73.35%, -67.38% 74.86%, -100% 74.86%);
}
#stage-floor .fs-pet-body { position: absolute; inset: 0; transform-origin: 50% 66%; }
#stage-floor .fs-pet .fs-pet-stage { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; }
#stage-floor .fs-rod-layer { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
/* El brazo derecho sostiene la caña: brazo, manga y caña giran juntos desde el hombro. */
#stage-floor .fs-pet #brazo-der { animation: none; transform: rotate(-55deg); }
#stage-floor .fs-pet .ropa-brazo-der { animation: none; transform: rotate(-55deg) scale(1.14); }
/* v4.6.11: el brazo libre también lo mueve js/games.js (fishingApplyPose),
   así se anima igual con «movimiento reducido» o en el modo liviano. */
#stage-floor .fs-pet #brazo-izq { animation: none !important; }
#stage-floor .fs-pet .ropa-brazo-izq { animation: none !important; }
#stage-floor .fs-rod-arm { transform-origin: 221.2px 198.8px; }
#stage-floor .fs-paw { fill: var(--pet-body-color, #6cb9dd); stroke: rgba(0, 0, 0, .08); stroke-width: 3; }

/* Hilo, bocha y ondas (en unidades del lago). */
#stage-floor .fs-line { fill: none; stroke: #f6ecd2; stroke-width: 3.5; stroke-linecap: round; }
#stage-floor .fs-line-shadow { fill: none; stroke: rgba(74, 44, 23, .5); stroke-width: 6.5; stroke-linecap: round; }
#stage-floor .fs-bobber-bob { transform-origin: -6px 28px; }
#stage-floor [data-phase="idle"] .fs-bobber-bob { animation: fsSwing 1.6s ease-in-out infinite alternate; }
#stage-floor [data-phase="wait"] .fs-bobber-bob { animation: fsFloat 2.2s ease-in-out infinite; }
#stage-floor [data-phase="nibble"] .fs-bobber-bob { animation: fsNibble .65s ease-in-out; }
#stage-floor [data-phase="bite"] .fs-bobber-bob { animation: fsBite .5s ease-in-out infinite; }
@keyframes fsSwing { from { transform: rotate(-7deg); } to { transform: rotate(7deg); } }
@keyframes fsFloat { 0%, 100% { transform: none; } 50% { transform: translateY(4px) rotate(4deg); } }
@keyframes fsNibble {
  0%, 100% { transform: none; }
  20% { transform: translateY(7px) rotate(-10deg); }
  45% { transform: translateY(1px) rotate(6deg); }
  70% { transform: translateY(6px) rotate(-6deg); }
}
@keyframes fsBite {
  0%, 100% { transform: translateY(6px) rotate(-6deg); }
  50% { transform: translateY(26px) rotate(-14deg); }
}

#stage-floor .fs-ripple { fill: none; stroke: #ffffff; stroke-width: 4; opacity: 0; transform-box: fill-box; transform-origin: center; }
#stage-floor .fs-ripples.is-splash .fs-ripple:nth-child(1) { animation: fsRipple .9s ease-out; }
#stage-floor .fs-ripples.is-splash .fs-ripple:nth-child(2) { animation: fsRipple 1.1s ease-out .15s; }
#stage-floor .fs-ripples.is-nibble .fs-ripple:nth-child(1) { animation: fsRippleSmall .65s ease-out; }
#stage-floor .fs-ripples.is-nibble .fs-ripple:nth-child(2) { animation: fsRippleSmall .65s ease-out .3s; }
#stage-floor .fs-ripples.is-bite .fs-ripple:nth-child(1) { animation: fsRipple .6s ease-out infinite; }
#stage-floor .fs-ripples.is-bite .fs-ripple:nth-child(2) { animation: fsRipple .6s ease-out .3s infinite; }
/* Onda suave de fondo mientras la bocha flota. */
#stage-floor .fs-ripples:is(.is-splash, .is-nibble, .is-bite) .fs-ripple:nth-child(3) { animation: fsRippleSoft 2.4s ease-out .9s infinite; }
@keyframes fsRipple { from { opacity: .95; transform: scale(.4); } to { opacity: 0; transform: scale(2.6); } }
@keyframes fsRippleSmall { from { opacity: .8; transform: scale(.5); } to { opacity: 0; transform: scale(1.5); } }
@keyframes fsRippleSoft { from { opacity: .55; transform: scale(.7); } to { opacity: 0; transform: scale(1.9); } }

/* Lo que sale del agua cuelga debajo de la bocha. */
#stage-floor .fs-catch { opacity: 0; transform-origin: -6px 50px; }
#stage-floor .games-arena[data-catch] .fs-catch { opacity: 1; animation: fsCatch .4s ease-in-out infinite alternate; }
@keyframes fsCatch { from { transform: rotate(-12deg); } to { transform: rotate(12deg); } }
#stage-floor [data-catch="fish"] .fs-catch-img { transform-box: fill-box; transform-origin: center; transform: rotate(-80deg); }

/* Cartel de resultado: cada tiro de Penales y lo que sale en Pesca. */
#stage-floor .games-banner {
  position: absolute;
  left: 50%;
  top: 38%;
  padding: 6px 26px 8px;
  border: 4px solid #5a3a22;
  border-radius: 20px;
  background: #fffdf3;
  font: 900 34px/1 "Baloo 2", sans-serif;
  color: #4a2c17;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(.6);
}
#stage-floor .games-banner[data-result="gol"] { background: #ffe052; }
#stage-floor .games-banner[data-result="lata"] { background: #e6ecef; }
#stage-floor .games-arena[data-game="pesca"] .games-banner { left: 76%; top: 22%; }
#stage-floor .games-banner img { width: 1.25em; height: 1.25em; margin-right: 10px; object-fit: contain; vertical-align: middle; }
#stage-floor .games-banner.is-on { animation: gamesBanner 1.35s ease forwards; }
@keyframes gamesBanner {
  15% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
  25%, 80% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1); }
}

/* ---------------------------------------------------------------- Resultado */
#stage-floor .games-result {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: rgba(251, 247, 230, .72);
  backdrop-filter: blur(2px);
}
#stage-floor .games-result[hidden] { display: none; }
#stage-floor .games-result-card {
  width: min(420px, 90%);
  padding: 16px 24px 18px;
  border: 4px solid var(--g-line);
  border-radius: 24px;
  background: #fffdf3;
  box-shadow: inset 0 0 0 5px var(--g-rim), 0 10px 24px rgba(60, 35, 15, .2);
  text-align: center;
  animation: gamesIn2 .25s ease-out;
}
@keyframes gamesIn2 { from { opacity: 0; transform: scale(.94); } }
#stage-floor .games-result-card h3 {
  margin: 0;
  font: 900 30px/1.1 "Baloo 2", sans-serif;
  color: #ffe052;
  -webkit-text-stroke: 3px #78410d;
  paint-order: stroke fill;
  text-shadow: 0 3px 0 #512a0c;
}
#stage-floor .games-result-score { margin: 4px 0 10px; font: 800 20px/1.2 "Baloo 2", sans-serif; color: var(--g-ink); }
#stage-floor .games-rewards { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
#stage-floor .games-rewards li {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 4px 12px;
  border-radius: 12px;
  background: #f3f7e3;
  font: 700 16px/1.2 "Baloo 2", sans-serif;
  text-align: left;
}
#stage-floor .games-rewards img,
#stage-floor .games-rewards svg { width: 28px; height: 28px; object-fit: contain; }
#stage-floor .games-rewards b { font-weight: 900; color: #3f6b1f; }
#stage-floor .games-rewards b.is-cost { color: #9a5a23; }
#stage-floor .games-result-note { min-height: 1.3em; margin: 10px 0 0; font: 700 14px/1.35 "Baloo 2", sans-serif; color: var(--g-soft); }
#stage-floor .games-result-note:empty { display: none; }
#stage-floor .games-result-actions { display: flex; justify-content: center; gap: 12px; margin-top: 12px; }

/* --------------------------------------------------- Viaje (v4.6.2)
   De viaje, el juego ocupa todo el escenario: se esconde la casa con la
   mascota, la ficha, la barra de acciones, el chat y los demás jugadores.
   Sólo queda el juego y la pantalla de carga. Sin título del juego: las
   fichas de puntaje y el botón de volver flotan arriba, sobre el paisaje. */
#stage-floor.is-minigame > :not(#minigame-panel):not(#stage-transition) { visibility: hidden !important; }
/* v4.6.6: lo de la casa queda escondido durante el juego; sus animaciones
   se pausan para no repintar cosas que no se ven. */
#stage-floor.is-minigame > :not(#minigame-panel):not(#stage-transition),
#stage-floor.is-minigame > :not(#minigame-panel):not(#stage-transition) * { animation-play-state: paused !important; }
#stage-floor.is-minigame .games-window.games-play {
  inset: 0;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  max-height: none;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #bfe6f5;
  box-shadow: none;
  transform: none;
  animation: none;
}
#stage-floor.is-minigame .games-play .games-head {
  position: absolute;
  top: 14px;
  left: 16px;
  right: 16px;
  z-index: 5;
  margin: 0;
  justify-content: flex-end;
  pointer-events: none;
}
#stage-floor.is-minigame .games-play .games-head > * { pointer-events: auto; }
#stage-floor.is-minigame .games-play .games-chips { margin-right: auto; }
#stage-floor.is-minigame .games-play .games-chip { box-shadow: 0 3px 0 rgba(60, 35, 15, .18); }
#stage-floor.is-minigame .games-play .games-hint {
  position: absolute;
  left: 50%;
  top: 16px;
  z-index: 4;
  width: max-content;
  max-width: min(560px, 60%);
  min-height: 0;
  margin: 0;
  padding: 6px 18px 7px;
  border: 3px solid #c9dca4;
  border-radius: 999px;
  background: rgba(255, 253, 243, .94);
  box-shadow: 0 3px 0 rgba(60, 35, 15, .18);
  transform: translateX(-50%);
}
#stage-floor.is-minigame .games-play .games-hint:empty { display: none; }
/* Hotfix v4.6.8: en la Pesca la indicación va grande, abajo al centro,
   justo arriba del botón (sobre el agua, entre el barco y la bocha), con el
   mismo cartel que los resultados. */
#stage-floor.is-minigame .games-play[data-game="pesca"] .games-hint {
  top: auto;
  bottom: 98px;
  max-width: 34%;
  padding: 8px 22px 10px;
  border: 4px solid #5a3a22;
  border-radius: 18px;
  background: #fffdf3;
  color: #4b2e18;
  font: 800 22px/1.2 "Baloo 2", system-ui, sans-serif;
  text-align: center;
  box-shadow: 0 5px 0 rgba(60, 35, 15, .28);
}
#stage-floor.is-minigame .games-play .games-hint.is-new { animation: gamesHintPop .35s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes gamesHintPop { from { transform: translateX(-50%) scale(.82); opacity: .4; } to { transform: translateX(-50%) scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { #stage-floor.is-minigame .games-play .games-hint.is-new { animation: none; } }
#stage-floor.is-minigame .games-play .games-stage { position: absolute; inset: 0; }
#stage-floor.is-minigame .games-play .games-arena {
  position: absolute;
  inset: 0;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
}
#stage-floor.is-minigame .games-play .games-result { border-radius: 0; z-index: 6; }
#stage-floor.is-minigame .games-play .games-controls { bottom: 26px; }

/* --------------------------------------------------------- Penales v4.6.2
   Cancha 1254 × 706 apoyada abajo (recorta cielo si sobra alto). */
#stage-floor .penalty-scene { position: absolute; inset: 0; outline: none; cursor: crosshair; touch-action: none; }
#stage-floor .penalty-scene:focus-visible { box-shadow: inset 0 0 0 4px #ffe052; }
#stage-floor [data-phase="shot"] .penalty-scene { cursor: url("../assets/ui/cursors/default.png") 2 1, default; cursor: -webkit-image-set(url("../assets/ui/cursors/default.png") 1x, url("../assets/ui/cursors/default@2x.png") 2x) 2 1, default; }
#stage-floor .pk-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#stage-floor .pk-ball-shadow { fill: #1f4d12; }
#stage-floor .pk-glove image { filter: drop-shadow(0 6px 4px rgba(20, 40, 10, .28)); }
#stage-floor .pk-aim-ring { fill: none; stroke: #ffffff; stroke-width: 6; }
#stage-floor .pk-aim-inner { fill: rgba(242, 102, 63, .35); stroke: #f2663f; stroke-width: 5; }
#stage-floor .pk-aim-cross { stroke: #f2663f; stroke-width: 6; stroke-linecap: round; }
#stage-floor .pk-aim { filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .35)); }
#stage-floor [data-phase="aim"] .pk-aim .pk-aim-ring:first-child { animation: pkAimPulse 1s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
#stage-floor [data-phase="power"] .pk-aim .pk-aim-inner { fill: #f2663f; }
@keyframes pkAimPulse { 50% { transform: scale(1.14); } }

/* Barra de potencia: abajo a la derecha (no tapa la pelota). Verde = potencia justa. */
#stage-floor .pk-power {
  position: absolute;
  right: 3%;
  bottom: 6%;
  width: min(380px, 32%);
  padding: 8px 16px 12px;
  border: 4px solid var(--g-line, #6f9340);
  border-radius: 18px;
  background: #fffdf3;
  box-shadow: 0 5px 0 rgba(60, 35, 15, .22);
  pointer-events: none;
}
#stage-floor .pk-power[hidden] { display: none; }
#stage-floor .pk-power-label { display: block; margin-bottom: 4px; text-align: center; font: 900 16px/1 "Baloo 2", sans-serif; color: #4a2c17; }
#stage-floor .pk-power-track {
  position: relative;
  height: 20px;
  border: 3px solid #5a3a22;
  border-radius: 999px;
  background: linear-gradient(90deg, #9fd3f0 0%, #ffe27a 45%, #f59b3c 82%, #e2553a 100%);
  overflow: hidden;
}
#stage-floor .pk-power-sweet {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 55%;
  width: 25%;
  background: #6fc24a;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .55);
}
#stage-floor .pk-power-needle {
  position: absolute;
  top: -4px;
  bottom: -4px;
  left: 0;
  width: 8px;
  margin-left: -4px;
  border-radius: 4px;
  background: #4a2c17;
  box-shadow: 0 0 0 2px #fff;
}

@media (prefers-reduced-motion: reduce) {
  #stage-floor .games-window,
  #stage-floor .games-result-card,
  #stage-floor .fs-pet,
  #stage-floor .fs-pet-body,
  #stage-floor .fs-bobber-bob,
  #stage-floor .fs-ripple,
  #stage-floor .fs-catch,
  #stage-floor .games-action.is-hot,
  #stage-floor .games-action[data-mode],
  #stage-floor [data-phase="bite"] .fs-alert-pop,
  #stage-floor .pk-aim .pk-aim-ring { animation: none; }
}

/* Escenario más alto que ancho (celular): el lago entra entero, centrado. */
@media (max-aspect-ratio: 1/1) {
  #stage-floor .fishing-scene { top: 50%; bottom: auto; transform: translateY(-50%); }
  #stage-floor.is-minigame .games-play .games-arena[data-game="penales"] { background: linear-gradient(#67c9f3, #b6e6f8 45%, #8cc63f 55%, #86bf3c); }
}

@media (max-width: 760px) {
  #stage-floor.is-minigame .games-play .games-hint { top: 70px; max-width: calc(100% - 32px); font-size: 15px; }
  #stage-floor.is-minigame .games-play .games-chip { min-width: 0; padding: 3px 10px; font-size: 14px; }
  #stage-floor .games-title { font-size: 26px; -webkit-text-stroke-width: 2px; }
  #stage-floor .games-window { padding: 12px 14px 14px; }
  #stage-floor .games-action { min-width: 140px; font-size: 18px; }
}

/* ------------------------------------------------------ Ruleta (v4.6.4)
   Se abre encima de la casa. Capas (todas del mismo tamaño): la ruleta
   entera quieta, el disco que gira (con los íconos de premios), y encima
   otra vez el puntero y el botón central recortados del dibujo quieto. */
#stage-floor > .roulette-overlay .roulette-window {
  position: relative;
  width: min(460px, 92%);
  max-height: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  overflow: visible;
  padding: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}
.roulette-close {
  position: absolute;
  top: 0;
  right: -6%;
  z-index: 3;
  width: 13%;
  aspect-ratio: 150 / 158;
  padding: 0;
  border: 0;
  background: none;
  transition: transform .15s ease;
}
.roulette-close img { display: block; width: 100%; height: 100%; }
.roulette-close:hover { transform: scale(1.08); }
.roulette-close:active { transform: scale(.94); }
.roulette-wheel {
  position: relative;
  width: min(100%, calc(100dvh - 260px));
  aspect-ratio: 1;
  filter: drop-shadow(0 14px 18px rgba(20, 20, 40, .35));
}
.roulette-wheel .rw-layer { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; user-select: none; }
/* v4.6.9: ruleta nueva. El disco gira recortado en círculo justo sobre la
   línea oscura que lo separa del aro (la unión no se ve); el botón central
   y la flecha quedan quietos encima. Medidas en % de ruleta.ai (1254 px). */
.roulette-wheel .rw-disc {
  transform-origin: 50% 49.88%;
  will-change: transform;
}
.roulette-wheel .rw-disc-art { clip-path: circle(39.55% at 50% 49.88%); }
/* v4.6.11: el botón central del dibujo no es concéntrico con el disco (su
   centro está ~5 px más abajo, medido sobre los 1254 px de ruleta.ai), así
   que el recorte viejo (circle 7.3%) cortaba el aro oscuro de un lado y
   dejaba ver un filo de gajo del otro, y al girar asomaba la copia del aro
   que lleva el disco. Ahora: un aro liso (.rw-hub-ring) centrado en el eje
   de giro, que tapa esa copia, y encima la moneda recortada dentro de su
   propio aro (centro 627.4, 630.5 · radio 84) y corrida al eje de giro. */
.roulette-wheel .rw-hub-ring {
  position: absolute;
  left: 50%;
  top: 49.88%;
  width: 15.5%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #040a2e;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.roulette-wheel .rw-hub {
  clip-path: circle(6.7% at 50.03% 50.28%);
  transform: translate(-.03%, -.4%);
}
.roulette-wheel .rw-pointer {
  position: absolute;
  left: 41%;
  top: 0.5%;
  width: 18%;
  height: auto;
  display: block;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 3px 2px rgba(40, 20, 10, .35));
}
.roulette-wheel .rw-prize {
  position: absolute;
  width: 11%;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translate(-50%, -50%) rotate(var(--a));
  pointer-events: none;
}
.roulette-wheel .rw-prize img,
.roulette-wheel .rw-prize svg { width: 100%; aspect-ratio: 1; object-fit: contain; filter: drop-shadow(0 2px 0 rgba(40, 20, 10, .3)); }
.roulette-wheel .rw-prize b {
  margin-top: -6%;
  font: 900 clamp(13px, 3.4vw, 20px)/1 "Baloo 2", sans-serif;
  color: #fff;
  -webkit-text-stroke: 3px #4a2c17;
  paint-order: stroke fill;
}
.roulette-wheel .rw-prize.is-small { width: 7.5%; }
.roulette-spin.games-btn {
  min-width: 170px;
  padding: 9px 30px 10px;
  border: 3px solid #c98f14;
  border-radius: 16px;
  background: linear-gradient(#ffe27a, #f7c843);
  box-shadow: inset 0 -4px 0 #e5ab25, inset 0 3px 0 rgba(255, 255, 255, .55), 0 3px 0 #a8740f;
  color: #4b331d;
  font: 900 22px/1.1 "Baloo 2", sans-serif;
}
.roulette-spin.games-btn:disabled { filter: grayscale(.85); opacity: .6; }
.roulette-status {
  margin: 0;
  padding: 4px 16px 5px;
  border-radius: 999px;
  background: rgba(255, 253, 243, .94);
  color: #4a2c17;
  font: 800 15px/1.3 "Baloo 2", sans-serif;
  text-align: center;
}
.roulette-status:empty { display: none; }
.roulette-result {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
}
.roulette-result[hidden] { display: none; }
.roulette-result-card {
  width: min(320px, 90%);
  padding: 16px 22px 18px;
  border: 5px solid #3fb6d9;
  border-radius: 26px;
  background: #fffbf0;
  box-shadow: inset 0 0 0 6px #d9f3fb, 0 14px 30px rgba(20, 30, 50, .35);
  text-align: center;
  animation: rouletteWin .45s cubic-bezier(.2, 1.4, .4, 1);
}
.roulette-result-icon { display: inline-flex; flex-direction: column; align-items: center; width: 96px; }
.roulette-result-icon img, .roulette-result-icon svg { width: 96px; height: 96px; object-fit: contain; }
.roulette-result-icon b { margin-top: -10px; font: 900 24px/1 "Baloo 2", sans-serif; color: #fff; -webkit-text-stroke: 3px #4a2c17; paint-order: stroke fill; }
.roulette-result-card h3 {
  margin: 6px 0 4px;
  font: 900 26px/1.1 "Baloo 2", sans-serif;
  color: #ffe052;
  -webkit-text-stroke: 3px #78410d;
  paint-order: stroke fill;
  text-shadow: 0 3px 0 #512a0c;
}
.roulette-result-card p { margin: 0 0 10px; font: 700 15px/1.35 "Baloo 2", sans-serif; color: #7a5a3a; }
.roulette-result-card .games-btn {
  padding: 8px 26px 9px;
  border: 3px solid #c98f14;
  border-radius: 16px;
  background: linear-gradient(#ffe27a, #f7c843);
  box-shadow: inset 0 -4px 0 #e5ab25, 0 3px 0 #a8740f;
  color: #4b331d;
  font: 800 18px/1.1 "Baloo 2", sans-serif;
}
@keyframes rouletteWin { from { opacity: 0; transform: scale(.7); } }
@media (prefers-reduced-motion: reduce) {
  .roulette-result-card { animation: none; }
}

/* v4.6.11: tiradas pagas — precio en el botón y confirmación. */
.roulette-spin.games-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.roulette-price { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.roulette-price .roulette-coin { width: 1.15em; height: 1.15em; object-fit: contain; filter: drop-shadow(0 1px 0 rgba(90, 50, 10, .35)); }
.roulette-spin .roulette-price {
  padding: 1px 10px 2px 6px;
  border-radius: 999px;
  background: rgba(120, 65, 13, .16);
  box-shadow: inset 0 1px 2px rgba(80, 40, 10, .25);
}
.roulette-confirm { background: none; }
.roulette-confirm-card {
  width: min(370px, 94%);
  padding: 16px 20px 18px;
  border: 5px solid #c98f14;
  border-radius: 26px;
  background: #fffbf0;
  box-shadow: inset 0 0 0 6px #fbe7a6, 0 14px 30px rgba(20, 30, 50, .35);
  text-align: center;
  animation: rouletteWin .35s cubic-bezier(.2, 1.4, .4, 1);
}
.roulette-confirm-card h3 {
  margin: 2px 0 6px;
  font: 900 26px/1.1 "Baloo 2", sans-serif;
  color: #ffe052;
  -webkit-text-stroke: 3px #78410d;
  paint-order: stroke fill;
  text-shadow: 0 3px 0 #512a0c;
}
.roulette-confirm-card p { margin: 0 0 12px; font: 700 16px/1.4 "Baloo 2", sans-serif; color: #7a5a3a; }
.roulette-confirm-card p .roulette-price b { color: #4b331d; font-weight: 900; }
.roulette-confirm-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.roulette-confirm-card p .roulette-price { vertical-align: -3px; }
.roulette-confirm-card .games-btn {
  padding: 8px 14px 9px;
  white-space: nowrap;
  border-radius: 16px;
  font: 800 17px/1.1 "Baloo 2", sans-serif;
}
.roulette-confirm-card .roulette-confirm-yes {
  border: 3px solid #c98f14;
  background: linear-gradient(#ffe27a, #f7c843);
  box-shadow: inset 0 -4px 0 #e5ab25, 0 3px 0 #a8740f;
  color: #4b331d;
}
.roulette-confirm-card .roulette-confirm-no {
  border: 3px solid #b99a74;
  background: linear-gradient(#fffaf0, #efe3cf);
  box-shadow: inset 0 -4px 0 #dccbb0, 0 3px 0 #9c7d58;
  color: #6b4a2a;
}
@media (prefers-reduced-motion: reduce) { .roulette-confirm-card { animation: none; } }

/* v4.6.10: la ventana de minijuegos nueva (window-v4.svg, 42 KB) ya es liviana: no lleva copia WebP. */
/* v4.6.6: en celulares, cada parte de la Pesca en su propia capa: el lago
   no se repinta cuando se mueven la mascota, la caña o el hilo. */
html.is-lite #stage-floor .fs-lake,
html.is-lite #stage-floor .fs-pet-body,
html.is-lite #stage-floor .fs-fx { will-change: transform; }

/* ------------------------------------------------------ Trotito (v4.6.12)
   Pista 1672 × 941 apoyada abajo (recorta cielo si sobra alto, igual que
   el SVG de los corredores: xMidYMax slice). */
#stage-floor .trot-scene { position: absolute; inset: 0; overflow: hidden; background: #7cc4f2; }
#stage-floor .trot-track {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 100%;
  pointer-events: none; user-select: none;
}
#stage-floor .trot-runners { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
#stage-floor .trot-shadow { fill: rgba(90, 45, 15, .22); }
#stage-floor .trot-num,
#stage-floor .trot-pick .trot-num,
#stage-floor .trot-podium-runner .trot-num {
  font: 900 44px/1 "Baloo 2", sans-serif;
  text-anchor: middle;
  fill: #fff;
  stroke: rgba(40, 25, 10, .75);
  stroke-width: 7px;
  paint-order: stroke;
}
#stage-floor .trot-you { display: none; }
#stage-floor .trot-runner.is-mine .trot-you { display: inline; }
#stage-floor .trot-you path { fill: #fffdf3; stroke: #5a3a22; stroke-width: 7; stroke-linejoin: round; }
#stage-floor .trot-you text { font: 900 34px/1 "Baloo 2", sans-serif; text-anchor: middle; fill: #4a2c17; }
#stage-floor .trot-runner-body.is-cheered .trot-frame { animation: trotHop .42s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes trotHop { 40% { transform: translateY(-60px); } }
#stage-floor .trot-cheer-word { font: 900 120px/1 "Baloo 2", sans-serif; fill: #fff; stroke: #c2374f; stroke-width: 16px; paint-order: stroke; text-anchor: middle; animation: trotCheerUp 1.1s ease-out forwards; }
#stage-floor .trot-cheer-heart { fill: #f06a8a; stroke: #7a2c3c; stroke-width: .8; transform-box: fill-box; animation: trotCheerUp 1s ease-out forwards; }
@keyframes trotCheerUp { from { opacity: 0; translate: 0 30px; } 20% { opacity: 1; } to { opacity: 0; translate: 0 -200px; } }

/* Cuenta regresiva */
#stage-floor .trot-countdown {
  position: absolute; left: 50%; top: 40%; z-index: 4;
  font: 900 min(120px, 16vw)/1 "Baloo 2", sans-serif;
  color: #ffe052; -webkit-text-stroke: 6px #78410d; paint-order: stroke fill;
  text-shadow: 0 6px 0 #512a0c;
  opacity: 0; pointer-events: none;
  transform: translate(-50%, -50%);
}
#stage-floor .trot-countdown.is-on { animation: trotCount .72s ease-out forwards; }
@keyframes trotCount {
  from { opacity: 0; transform: translate(-50%, -50%) scale(1.8); }
  25% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  80% { opacity: 1; }
  to { opacity: 0; transform: translate(-50%, -50%) scale(.9); }
}

/* Apuesta: tarjeta crema arriba, sobre la tribuna. */
#stage-floor .trot-bet {
  position: absolute; left: 50%; top: 64px; z-index: 4;
  width: min(640px, 92%);
  padding: 14px 20px 16px;
  border: 4px solid var(--g-line);
  border-radius: 24px;
  background: #fffdf3;
  box-shadow: inset 0 0 0 5px var(--g-rim), 0 10px 24px rgba(60, 35, 15, .22);
  text-align: center;
  transform: translateX(-50%);
  animation: gamesIn2 .25s ease-out;
}
#stage-floor .trot-bet[hidden] { display: none; }
#stage-floor .trot-bet h3 {
  margin: 0 0 10px;
  font: 900 26px/1.1 "Baloo 2", sans-serif;
  color: #ffe052; -webkit-text-stroke: 3px #78410d; paint-order: stroke fill;
  text-shadow: 0 3px 0 #512a0c;
}
#stage-floor .trot-picks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
#stage-floor .trot-pick {
  position: relative;
  display: grid; justify-items: center; gap: 0;
  padding: 6px 4px 8px;
  border: 3px solid #e3d6b8;
  border-radius: 18px;
  background: #fff8e4;
  color: var(--g-ink);
  font: 800 16px/1.1 "Baloo 2", sans-serif;
  cursor: url("../assets/ui/cursors/pointer.png") 8 1, pointer; cursor: -webkit-image-set(url("../assets/ui/cursors/pointer.png") 1x, url("../assets/ui/cursors/pointer@2x.png") 2x) 8 1, pointer;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
#stage-floor .trot-pick svg { width: 100%; max-width: 118px; aspect-ratio: 472 / 385; overflow: visible; }
#stage-floor .trot-pick:hover { transform: translateY(-2px); }
#stage-floor .trot-pick.is-on {
  border-color: var(--manta);
  background: color-mix(in srgb, var(--manta) 14%, #fffdf3);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--manta) 35%, transparent), 0 6px 12px rgba(60, 35, 15, .16);
  transform: translateY(-3px) scale(1.04);
}
#stage-floor .trot-pick-odds {
  margin-top: 3px; padding: 1px 10px 2px;
  border-radius: 999px;
  background: var(--manta); color: #fff;
  font: 900 15px/1.2 "Baloo 2", sans-serif;
  text-shadow: 0 1px 0 rgba(0, 0, 0, .3);
}
#stage-floor .trot-amounts { display: flex; justify-content: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
#stage-floor .trot-amount {
  display: inline-flex; align-items: center; gap: 5px;
  min-width: 78px; padding: 5px 12px 6px;
  border: 3px solid #e3cf8f; border-radius: 14px;
  background: #fff6d6; color: #5a3a22;
  font: 900 18px/1 "Baloo 2", sans-serif;
  cursor: url("../assets/ui/cursors/pointer.png") 8 1, pointer; cursor: -webkit-image-set(url("../assets/ui/cursors/pointer.png") 1x, url("../assets/ui/cursors/pointer@2x.png") 2x) 8 1, pointer;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
#stage-floor .trot-amount img { width: 22px; height: 22px; }
#stage-floor .trot-amount:hover:not(:disabled) { transform: translateY(-2px); }
#stage-floor .trot-amount.is-on { border-color: #c98f14; background: linear-gradient(#ffe27a, #f7c843); box-shadow: 0 3px 0 #a8740f; transform: translateY(-2px); }
#stage-floor .trot-amount:disabled { opacity: .45; filter: grayscale(.7); cursor: url("../assets/ui/cursors/not-allowed.png") 8 1, not-allowed; }
#stage-floor .trot-bet-summary { min-height: 1.4em; margin: 10px 0 8px; font: 700 16px/1.35 "Baloo 2", sans-serif; color: var(--g-soft); }
#stage-floor .trot-bet-summary img { width: 1.1em; height: 1.1em; vertical-align: -3px; margin: 0 2px 0 4px; }
#stage-floor .trot-bet-summary b { color: var(--g-ink); }
#stage-floor .trot-go { min-width: 180px; font-size: 22px; padding: 9px 26px 10px; }
#stage-floor .trot-go:disabled { filter: grayscale(.7); opacity: .6; cursor: url("../assets/ui/cursors/not-allowed.png") 8 1, not-allowed; }

/* Alentar: botón del color de la manta del elegido. */
#stage-floor .trot-controls[hidden] { display: none; }
#stage-floor .trot-cheer {
  min-width: 220px; padding: 10px 28px 11px;
  border-color: color-mix(in srgb, var(--manta, #c98f14) 70%, #000);
  background: linear-gradient(color-mix(in srgb, var(--manta, #f7c843) 55%, #fff), var(--manta, #f7c843));
  box-shadow: inset 0 -4px 0 color-mix(in srgb, var(--manta, #e5ab25) 80%, #000), inset 0 3px 0 rgba(255, 255, 255, .5), 0 3px 0 color-mix(in srgb, var(--manta, #a8740f) 55%, #000);
  color: #fff; font-size: 22px; font-weight: 900;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .35);
}
#stage-floor .trot-cheer:disabled { filter: grayscale(.6); opacity: .6; }
#stage-floor .trot-cheer.is-pop { animation: trotCheerBtn .3s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes trotCheerBtn { 40% { transform: scale(1.12); } }

/* Podio: fondo liso (sin estadio), confeti animado, los 3 primeros arriba
   de su escalón (1º y 2º contentos, 3º triste) y la tarjeta del resultado. */
#stage-floor .trot-podium {
  position: absolute; inset: 0; z-index: 6;
  overflow: hidden;
  /* Hotfix 1: fondo crema con sombras (antes celeste liso): rayos suaves
     desde arriba, viñeta cálida en los bordes y una sombra en el piso. */
  background:
    radial-gradient(ellipse 46% 9% at 50% 97%, rgba(120, 80, 30, .22), transparent 70%),
    radial-gradient(ellipse 80% 70% at 50% 42%, rgba(255, 252, 240, 0) 55%, rgba(196, 150, 90, .28) 100%),
    repeating-conic-gradient(from 0deg at 50% 18%, rgba(255, 255, 255, .45) 0deg 7deg, rgba(255, 255, 255, 0) 7deg 16deg),
    linear-gradient(#fff6e2, #f7e6c4 70%, #efd7aa);
  animation: gamesIn2 .3s ease-out;
}
#stage-floor .trot-podium[hidden] { display: none; }
#stage-floor .trot-podium-stage {
  position: absolute; left: 50%; bottom: 1.5%;
  width: min(720px, 56%);
  aspect-ratio: 1400 / 343;
  transform: translateX(-50%);
  filter: drop-shadow(0 10px 14px rgba(110, 70, 25, .25));
}
#stage-floor .trot-podium-art { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* Corredores más grandes, apoyados sobre la cara de arriba de su escalón
   (las patas del cuadro parado terminan en y 368 de 385: el margen
   negativo baja el dibujo para que pisen justo). */
#stage-floor .trot-podium-runner {
  position: absolute;
  width: 29%;
  display: grid; justify-items: center;
  transform: translateX(-50%);
}
#stage-floor .trot-podium-runner svg { width: 100%; aspect-ratio: 472 / 385; overflow: visible; margin-bottom: -3.6%; }
#stage-floor .trot-podium-runner[data-place="1"] { left: 49%; bottom: 94%; width: 32%; }
#stage-floor .trot-podium-runner[data-place="2"] { left: 19.5%; bottom: 76%; }
#stage-floor .trot-podium-runner[data-place="3"] { left: 79%; bottom: 58%; }
#stage-floor .trot-podium-runner[data-place="1"] svg :is(use, .trot-num) { animation: trotJoy .9s ease-in-out infinite; }
#stage-floor .trot-podium-runner[data-place="2"] svg :is(use, .trot-num) { animation: trotJoy 1.1s ease-in-out .2s infinite; }
#stage-floor .trot-podium-runner[data-place="3"] svg :is(use, .trot-num) { animation: trotJoy 1.3s ease-in-out .45s infinite; }
@keyframes trotJoy { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-10%); } 60% { transform: translateY(-7%); } }
#stage-floor .trot-podium-name {
  order: -1;
  margin-bottom: 2px; padding: 1px 12px 2px;
  border-radius: 999px;
  background: var(--manta); color: #fff;
  font: 900 16px/1.25 "Baloo 2", sans-serif;
  text-shadow: 0 1px 0 rgba(0, 0, 0, .3);
  box-shadow: 0 2px 0 rgba(0, 0, 0, .15);
}
#stage-floor .trot-podium-card {
  position: absolute; left: 50%; top: 16px; z-index: 2;
  width: min(400px, 88%);
  padding: 8px 20px 10px;
  border: 4px solid var(--g-line);
  border-radius: 24px;
  background: #fffdf3;
  box-shadow: inset 0 0 0 5px var(--g-rim), 0 10px 24px rgba(60, 35, 15, .2);
  text-align: center;
  transform: translateX(-50%);
}
#stage-floor .trot-podium-card h3 {
  margin: 0;
  font: 900 28px/1.1 "Baloo 2", sans-serif;
  color: #ffe052; -webkit-text-stroke: 3px #78410d; paint-order: stroke fill;
  text-shadow: 0 3px 0 #512a0c;
}
#stage-floor .trot-podium-line { margin: 4px 0 8px; font: 700 16px/1.3 "Baloo 2", sans-serif; color: var(--g-ink); }
#stage-floor .trot-confetti { position: absolute; inset: 0; pointer-events: none; }
#stage-floor .trot-confetti i {
  position: absolute; top: -20px;
  border-radius: 2px;
  animation-name: trotConfetti;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}
@keyframes trotConfetti {
  from { transform: translate(0, -20px) rotate(0deg); }
  to { transform: translate(var(--drift), 110vh) rotate(var(--spin)); }
}

/* En Trotito la indicación de arriba no hace falta (la dicen la tarjeta y
   los botones): queda sólo para lectores de pantalla. */
#stage-floor.is-minigame .games-play[data-game="trotito"] .games-hint,
#stage-floor.is-minigame .games-play[data-game="pesca"] .games-hint {
  position: absolute !important; width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important; overflow: hidden !important;
  clip: rect(0 0 0 0) !important; border: 0 !important; white-space: nowrap !important;
}

@media (prefers-reduced-motion: reduce) {
  #stage-floor .trot-countdown.is-on { animation-duration: .01ms; opacity: 1; }
  #stage-floor .trot-podium-runner svg :is(use, .trot-num),
  #stage-floor .trot-runner-body.is-cheered .trot-frame,
  #stage-floor .trot-cheer.is-pop { animation: none !important; }
}
@media (max-width: 760px) {
  #stage-floor .trot-bet { top: 56px; padding: 10px 12px 12px; }
  #stage-floor .trot-bet h3 { font-size: 20px; }
  #stage-floor .trot-pick { font-size: 13px; }
  #stage-floor .trot-amount { min-width: 60px; font-size: 15px; }
}
