:root {
  --bg: #0b0d12;
  --bg-2: #11151d;
  --panel: #161b26;
  --line: rgba(212, 175, 55, .35);
  --gold: #d4af37;
  --gold-2: #f5df8a;
  --text: #eef0f4;
  --muted: #8f97a6;
  --good: #7cfc9a;
  /* Controles nativos (select, archivo, fecha, autocompletado) siempre oscuros, sin importar el modo del celular. */
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
/* touch-action: manipulation desactiva el zoom por doble toque en toda la app (sin quitar el scroll ni el tap). */
html, body { height: 100%; touch-action: manipulation; }
/* Sin el recuadro gris/azul que pinta el navegador del celular sobre lo que tocás: se veía como un fondo que
   aparecía detrás del botón. Se hereda, así vale para toda la app y todos los juegos (antes solo la ruleta lo tenía). */
html { -webkit-tap-highlight-color: transparent; }
/* El iPhone agranda el texto por su cuenta al girar a horizontal (y en algunas tablets): con 100% cada
   pantalla usa exactamente los tamaños del CSS. Antes solo estaba dentro del bloque de celular. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
/* SIN backdrop-filter (vidrio esmerilado) en la plataforma ni en los juegos. En el iPhone cada panel
   desenfocado se vuelve a calcular en cada cuadro mientras el juego anima detrás, y era lo que más pesaba.
   Además Safari lo entiende sin -webkit- recién desde iOS 18: un iPhone lo mostraba y otro no. Para que un
   panel se lea sobre el arte, se usa un fondo un poco más opaco.
   color-mix(): cada declaración que lo usa va precedida de la misma sin él (con el color que más pesa en la
   mezcla). Safari lo entiende desde iOS 16.2; en un iPhone 7 o 6s (iOS 15) se descartaba la declaración
   entera y la ficha, el borde o el brillo quedaban sin color. Las dos líneas seguidas son a propósito.
   Animaciones infinitas: solo transform y opacity, que las resuelve la placa de video sin redibujar. Un brillo que
   late con box-shadow o filter (botón "Retirar", casillas a elegir) usa steps(N, jump-none): ~10 cambios por segundo
   en vez de 60, se ve igual y el celular repinta seis veces menos. */
body {
  background: radial-gradient(1200px 700px at 50% -20%, #1a2030 0%, var(--bg-2) 45%, var(--bg) 100%);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow: hidden; user-select: none; -webkit-user-select: none;
}
button { font: inherit; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 2px; }

/* Barras de desplazamiento doradas. Solo con mouse: en pantallas táctiles quedan las nativas, que
   flotan sobre el contenido y no le quitan ancho a los juegos (mobilefit mide sin ellas). */
@media (hover: hover) and (pointer: fine) {
  ::-webkit-scrollbar { width: 12px; height: 12px; }
  ::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
  ::-webkit-scrollbar-thumb {
    border: 3px solid transparent; border-radius: 999px; background-clip: padding-box;
    background-color: rgba(212,175,55,.42);
  }
  /* Brillo en el eje corto: se lee como una barra de metal, igual que los botones dorados. */
  ::-webkit-scrollbar-thumb:vertical { background-image: linear-gradient(90deg, rgba(0,0,0,.28), rgba(255,240,190,.22) 50%, rgba(0,0,0,.28)); }
  ::-webkit-scrollbar-thumb:horizontal { background-image: linear-gradient(180deg, rgba(0,0,0,.28), rgba(255,240,190,.22) 50%, rgba(0,0,0,.28)); }
  ::-webkit-scrollbar-thumb:hover { border-width: 2px; background-color: rgba(212,175,55,.8); }
  ::-webkit-scrollbar-thumb:active { border-width: 2px; background-color: var(--gold-2); }
  /* El carril del salón lleva el mismo filete dorado que el encabezado. */
  #view::-webkit-scrollbar-track { background: linear-gradient(90deg, rgba(212,175,55,.02), rgba(212,175,55,.07)); box-shadow: inset 1px 0 0 rgba(212,175,55,.14); }
  @supports not selector(::-webkit-scrollbar) {
    * { scrollbar-width: thin; scrollbar-color: rgba(212,175,55,.55) transparent; }
  }
}

#shell { height: 100%; display: grid; grid-template-rows: auto 1fr; }
.shell-header {
  display: flex; align-items: center; gap: 18px; padding: 8px 18px; min-height: 56px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(0,0,0,.45), rgba(0,0,0,.15));
}
.brand { display: flex; align-items: center; gap: 10px; font-family: Cinzel, Georgia, serif; font-weight: 700; letter-spacing: .16em; font-size: 16px; color: var(--gold-2); line-height: 1;
         text-shadow: 0 1px 0 #6b4f10, 0 0 18px rgba(212,175,55,.3); text-decoration: none; }
.brand-logo { width: 44px; height: 44px; display: block; filter: drop-shadow(0 2px 8px rgba(212,175,55,.35)); }
.brand small { display: block; font-family: Inter, sans-serif; font-weight: 500; letter-spacing: .3em; font-size: 9px; color: var(--muted); margin-top: 4px; }
.shell-title { font-family: Cinzel, serif; letter-spacing: .12em; font-size: 13px; color: var(--muted); }
.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 8px 12px; cursor: pointer; font-size: 12px; letter-spacing: .06em; }
.ghost:hover:not(:disabled) { background: rgba(212,175,55,.12); }
.ghost:disabled { opacity: .4; cursor: not-allowed; }
.wallet { margin-left: auto; display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: rgba(0,0,0,.25); }
.wallet span { font-size: 10px; letter-spacing: .2em; color: var(--muted); text-transform: uppercase; }
.wallet b { font-size: 18px; font-variant-numeric: tabular-nums; }
.wallet b.flash { animation: flash .7s ease-out; }
/* el saldo en la moneda con la que cargó ("≈ $ 52.000"): acompaña a las fichas, sin competirles */
.wallet i { font-style: normal; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
@keyframes flash { 0% { color: var(--good); text-shadow: 0 0 14px rgba(124,252,154,.8); } 100% { color: inherit; text-shadow: none; } }
.wallet .ghost { width: 30px; height: 30px; padding: 0; border-radius: 50%; font-size: 16px; line-height: 1; }
.icon-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: rgba(0,0,0,.25); color: var(--gold-2); cursor: pointer; font-size: 16px; display: grid; place-items: center; }
.icon-btn:hover { background: rgba(212,175,55,.15); }

#view { min-height: 0; overflow: auto; position: relative; }
.game-host { height: 100%; min-height: 100%; }
/* Una vez dentro de un juego, el viewport es el marco: nunca aparece scroll de página. Los juegos
   que necesitan repartir el alto reciben data-fit-* desde mobilefit.js y desplazan sólo tableros
   secundarios como último recurso, manteniendo siempre visibles las acciones. */
body[data-playing] #view { overflow: hidden; }
body[data-playing] #view .game-host { height: 100%; min-height: 0; overflow: hidden; }
.loading { display: grid; place-items: center; height: 100%; color: var(--muted); letter-spacing: .2em; font-size: 12px; text-transform: uppercase; }
.game-loader {
  position: absolute; inset: 0; z-index: 90; display: grid; place-content: center; justify-items: center; gap: 8px;
  min-height: 240px; color: #f5df8a; text-align: center; text-transform: uppercase;
  /* cada juego tiñe el fondo con su color (--gl-glow / --gl-bg, ver más abajo); sin ellas queda el violeta de Prisma */
  background: radial-gradient(circle at 50% 45%, var(--gl-glow, rgba(58,38,105,.42)), transparent 32%), var(--gl-bg, #07060d);
  opacity: 1; transition: opacity .2s ease, transform .2s ease;
}
.game-loader.is-ready { opacity: 0; transform: scale(1.012); pointer-events: none; }
.game-loader svg { display: block; overflow: visible; }
.game-loader b { font: 700 18px Cinzel, Georgia, serif; letter-spacing: .28em; text-shadow: 0 0 18px rgba(245,223,138,.42); }
.game-loader span { color: var(--muted); font-size: 9px; letter-spacing: .24em; }
.game-loader-prism { position: relative; width: 74px; height: 64px; margin-bottom: 12px; filter: drop-shadow(0 0 16px rgba(124,92,255,.55)); }
.game-loader-prism::before {
  content: ""; position: absolute; left: 20px; top: 5px; width: 34px; height: 34px; transform: rotate(45deg);
  border: 2px solid rgba(255,255,255,.82); background: linear-gradient(135deg, rgba(255,255,255,.62), rgba(255,255,255,.06));
  box-shadow: inset 0 0 14px rgba(255,255,255,.18);
}
.game-loader-prism i { position: absolute; left: 35px; top: 31px; width: 42px; height: 3px; border-radius: 999px; transform-origin: 0 50%; opacity: .85; animation: game-loader-ray 1.25s ease-in-out infinite alternate; }
.game-loader-prism i:nth-child(1) { background: #ff2e8b; transform: rotate(18deg); }
.game-loader-prism i:nth-child(2) { background: #ffe066; transform: rotate(31deg); animation-delay: -.4s; }
.game-loader-prism i:nth-child(3) { background: #22d3ee; transform: rotate(44deg); animation-delay: -.8s; }
@keyframes game-loader-ray { from { width: 24px; opacity: .35; } to { width: 48px; opacity: 1; } }
/* Pantalla de carga del Libro del Faraón: libro abierto con una gema que late (como la de Prisma, con su propio arte). */
.game-loader[data-game="book"] {
  color: #ffe08a;
  background: radial-gradient(circle at 50% 44%, rgba(27,157,149,.2), transparent 27%), radial-gradient(circle at 50% 48%, rgba(190,126,31,.2), transparent 46%), #080704;
}
.game-loader[data-game="book"] b { text-shadow: 0 0 18px rgba(238,183,60,.5); }
.game-loader-book { position: relative; width: 88px; height: 64px; margin-bottom: 12px; filter: drop-shadow(0 0 14px rgba(223,169,48,.5)); animation: game-loader-book-float 1.5s ease-in-out infinite alternate; }
.game-loader-book::before,
.game-loader-book::after {
  content: ""; position: absolute; top: 8px; width: 41px; height: 50px; border: 2px solid #e6b744;
  background: linear-gradient(145deg, #fff0ad, #c98f29 78%); box-shadow: inset 0 0 0 3px rgba(78,42,6,.25);
}
.game-loader-book::before { left: 3px; border-radius: 6px 2px 2px 9px; transform: perspective(90px) rotateY(13deg); transform-origin: right center; }
.game-loader-book::after { right: 3px; border-radius: 2px 6px 9px 2px; transform: perspective(90px) rotateY(-13deg); transform-origin: left center; }
.game-loader-book i { position: absolute; left: 36px; top: 24px; z-index: 1; width: 16px; height: 16px; border: 2px solid #f7d66f; border-radius: 50%; background: #149c95; box-shadow: 0 0 0 3px #8b5a13, 0 0 13px rgba(31,211,198,.85); animation: game-loader-book-gem .8s ease-in-out infinite alternate; }
@keyframes game-loader-book-float { to { transform: translateY(-5px); filter: drop-shadow(0 8px 18px rgba(223,169,48,.65)); } }
@keyframes game-loader-book-gem { to { background: #42e4d6; box-shadow: 0 0 0 3px #8b5a13, 0 0 22px rgba(66,228,214,1); } }
/* Pantallas de espera del resto de los juegos con PixiJS (tardan de 1 a 4 s en entrar desde el celular):
   mismo esquema que Prisma y el Libro, cada una con el color y un dibujo animado de su juego (ver LOADER_ART en app.js). */
.game-loader[data-game="roulette"]  { --gl-glow: rgba(18,128,66,.34);  --gl-bg: #05090a; }
.game-loader[data-game="american"]  { --gl-glow: rgba(168,24,40,.36);  --gl-bg: #0a0506; }
.game-loader[data-game="lightning"] { --gl-glow: rgba(118,82,255,.42); --gl-bg: #07061a; }
.game-loader[data-game="wheel"]     { --gl-glow: rgba(46,98,230,.42);  --gl-bg: #050918; }
.game-loader[data-game="crash"]     { --gl-glow: rgba(255,106,61,.26); --gl-bg: #070b1a; }
.game-loader[data-game="chicken"]   { --gl-glow: rgba(255,209,102,.24); --gl-bg: #0b0904; }
.game-loader[data-game="plinko"]    { --gl-glow: rgba(24,190,178,.3);  --gl-bg: #0a0f1c; }
.game-loader[data-game="tiger"]     { --gl-glow: rgba(214,48,24,.34);  --gl-bg: #0c0503; }
.game-loader[data-game="fruits"]    { --gl-glow: rgba(255,207,112,.28); --gl-bg: #0a3147; }
.game-loader[data-game="sweets"]    { --gl-glow: rgba(255,95,191,.32); --gl-bg: #12060e; }
.game-loader[data-game="sweets"]::before {
  content: ''; position: absolute; z-index: -1; left: 50%; top: 50%;
  width: min(340px, 76vw); aspect-ratio: 1; transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 242, 205, .62); border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 241, 204, .43), rgba(255, 152, 204, .28) 45%, transparent 72%);
  box-shadow: 0 0 0 10px rgba(255, 236, 247, .13), 0 0 70px rgba(255, 180, 209, .4);
  pointer-events: none;
}
@keyframes game-loader-spin { to { transform: rotate(360deg); } }
/* Ruletas: el paño gira (37 casillas rojo/negro con el cero verde; la americana, 38 con el doble cero) y la bola va al revés. */
.game-loader-roulette { position: relative; width: 70px; height: 70px; margin-bottom: 12px; filter: drop-shadow(0 0 14px rgba(212,175,55,.4)); }
.game-loader-roulette::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%; border: 4px solid #6b3f1d; box-shadow: 0 0 0 2px #d4af37;
  background: radial-gradient(circle closest-side, #f5df8a 0 8%, #7a4a22 9% 36%, #d4af37 37% 40%, transparent 41%),
    conic-gradient(from 350.27deg, #0b8f45 0 9.73deg, transparent 0),
    repeating-conic-gradient(#c0142c 0 9.73deg, #151515 0 19.46deg);
  animation: game-loader-spin 2.4s linear infinite;
}
.game-loader[data-game="american"] .game-loader-roulette::before {
  background: radial-gradient(circle closest-side, #f5df8a 0 8%, #7a4a22 9% 36%, #d4af37 37% 40%, transparent 41%),
    conic-gradient(#0b8f45 0 9.47deg, transparent 0 180deg, #0b8f45 0 189.47deg, transparent 0),
    repeating-conic-gradient(#c0142c 0 9.47deg, #151515 0 18.95deg);
}
.game-loader-roulette i { position: absolute; left: 31px; top: 31px; width: 8px; height: 8px; border-radius: 50%; background: #fff; box-shadow: 0 0 6px rgba(255,255,255,.9); animation: game-loader-ball 1.1s linear infinite; }
@keyframes game-loader-ball { from { transform: rotate(0) translateY(-22px); } to { transform: rotate(-360deg) translateY(-22px); } }
/* Olimpo: minigrilla de gemas con destellos eléctricos; el loader no necesita descargar imágenes. */
.game-loader[data-game="olympus"] {
  --gl-glow: rgba(50,174,255,.32); --gl-bg: #07091d; color: #fff0a6;
  overflow: hidden; isolation: isolate;
  background: radial-gradient(ellipse at 50% 42%, rgba(79,87,255,.28), transparent 35%),
    radial-gradient(ellipse at 50% 48%, rgba(31,224,255,.12), transparent 56%),
    linear-gradient(145deg,#05091a,#11102e 52%,#07091c);
}
.game-loader[data-game="olympus"] b { color: #fff2bd; letter-spacing: .2em; text-shadow: 0 0 10px rgba(255,222,111,.55), 0 0 26px rgba(66,199,255,.42); }
.game-loader[data-game="olympus"] > span { color: #c3d6ef; }
.game-loader-olympus { width: min(220px, 68vw); height: 108px; display: grid; place-items: center; position: relative; margin-bottom: 12px; }
.game-loader-olympus::before { content: ""; position: absolute; inset: 16px 28px; border-radius: 50%; background: rgba(40,196,255,.25); filter: blur(22px); animation: ol-loader-aura 1.3s ease-in-out infinite alternate; }
.game-loader-olympus::after { content: ""; position: absolute; inset: 9px 21px; border: 1px solid rgba(86,219,255,.42); border-radius: 50%; box-shadow: 0 0 14px rgba(62,190,255,.34), inset 0 0 12px rgba(126,88,255,.18); transform: rotate(-12deg); animation: ol-loader-orbit 3.2s linear infinite; }
.ol-loader-reel { position: relative; z-index: 1; width: 190px; height: 76px; display: grid; grid-template-columns: repeat(3, 1fr); align-items: center; gap: 8px; padding: 7px; border: 1px solid rgba(255,224,131,.72); border-radius: 16px; background: linear-gradient(145deg,rgba(13,25,57,.98),rgba(20,20,59,.96)); box-shadow: 0 0 0 3px rgba(39,71,131,.68), 0 0 18px rgba(38,190,255,.42), 0 0 34px rgba(109,74,255,.25), inset 0 0 14px rgba(95,211,255,.15); }
.ol-loader-symbol { height: 58px; display: grid; place-items: center; border: 1px solid rgba(166,222,255,.35); border-radius: 10px; background: linear-gradient(155deg,rgba(46,83,132,.8),rgba(18,31,70,.95)); box-shadow: inset 0 0 12px rgba(81,193,255,.13); animation: ol-loader-symbol 1.2s ease-in-out infinite; }
.ol-loader-symbol:nth-child(2) { animation-delay: .16s; }
.ol-loader-symbol:nth-child(3) { animation-delay: .32s; }
.ol-loader-symbol svg { width: 37px; height: 43px; overflow: visible; fill: rgba(69,220,255,.22); stroke: #aaf6ff; stroke-width: 2.4; stroke-linejoin: round; filter: drop-shadow(0 0 5px rgba(71,224,255,.82)) drop-shadow(0 0 11px rgba(91,111,255,.5)); }
.ol-loader-crown svg { fill: rgba(255,190,64,.3); stroke: #ffe58d; filter: drop-shadow(0 0 6px rgba(255,193,71,.78)) drop-shadow(0 0 12px rgba(255,115,61,.36)); }
.ol-loader-bolt svg { width: 32px; fill: #ffe56c; stroke: #fff9c7; filter: drop-shadow(0 0 6px rgba(255,225,86,.95)) drop-shadow(0 0 13px rgba(52,203,255,.62)); }
.ol-loader-arcs { position: absolute; z-index: 2; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.ol-loader-arcs path { fill: none; stroke: #8ef4ff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: bevel; filter: drop-shadow(0 0 4px #31dfff) drop-shadow(0 0 8px #8a6dff); stroke-dasharray: 34 150; animation: ol-loader-zap 1.05s steps(2,end) infinite; }
.ol-loader-spark { position: absolute; z-index: 3; width: 5px; height: 5px; border-radius: 50%; background: #fff9c9; box-shadow: 0 0 7px #fff, 0 0 16px #5eeaff; animation: ol-loader-spark .85s ease-in-out infinite alternate; }
.ol-loader-spark-a { left: 22%; top: 18%; }
.ol-loader-spark-b { right: 20%; bottom: 16%; width: 4px; height: 4px; animation-delay: -.42s; }
@keyframes ol-loader-aura { to { opacity: .55; transform: scale(1.16); } }
@keyframes ol-loader-orbit { to { transform: rotate(348deg); } }
@keyframes ol-loader-symbol { 0%,100% { transform: translateY(3px) scale(.94); filter: brightness(.88); } 50% { transform: translateY(-3px) scale(1.04); filter: brightness(1.3); } }
@keyframes ol-loader-zap { 0%,100% { opacity: .1; stroke-dashoffset: 60; } 18%,32% { opacity: 1; } 48% { opacity: .18; stroke-dashoffset: 0; } }
@keyframes ol-loader-spark { from { opacity: .22; transform: scale(.55); } to { opacity: 1; transform: scale(1.45); } }
.game-loader-bolt { position: absolute; right: -14px; top: -12px; width: 26px; height: 38px; fill: #ffe45c; filter: drop-shadow(0 0 5px #b69cff) drop-shadow(0 0 10px rgba(255,228,92,.8)); animation: game-loader-bolt 1.3s steps(1) infinite; }
@keyframes game-loader-bolt { 0%, 100% { opacity: 1; } 12% { opacity: .15; } 20% { opacity: 1; } 58% { opacity: .35; } 64% { opacity: 1; } }
/* Rueda: ocho colores que giran y frenan debajo del puntero */
.game-loader-fortune { position: relative; width: 70px; height: 76px; margin-bottom: 12px; filter: drop-shadow(0 0 14px rgba(34,211,238,.45)); }
.game-loader-fortune::before {
  content: ""; position: absolute; left: 0; bottom: 0; width: 70px; height: 70px; border-radius: 50%; border: 4px solid #d4af37;
  background: radial-gradient(circle closest-side, #ffe27a 0 20%, #b8860b 21% 27%, transparent 28%),
    conic-gradient(#e53935 0 45deg, #fbbf24 0 90deg, #22c55e 0 135deg, #3b82f6 0 180deg, #ec4899 0 225deg, #f97316 0 270deg, #22d3ee 0 315deg, #a855f7 0);
  animation: game-loader-spin-settle 2.2s cubic-bezier(.2,.6,.3,1) infinite;
}
.game-loader-fortune::after { content: ""; position: absolute; left: 29px; top: 0; border: 6px solid transparent; border-top: 13px solid #fff4c2; border-bottom: 0; }
@keyframes game-loader-spin-settle { to { transform: rotate(720deg); } }
/* Ignición: la curva del multiplicador sube con una chispa en la punta y se apaga al "explotar" */
.game-loader-crash { width: 84px; height: 64px; margin-bottom: 12px; fill: none; stroke-linecap: round; filter: drop-shadow(0 0 8px rgba(255,106,61,.65)); }
.game-loader-crash path:nth-child(1) { stroke: rgba(139,147,184,.45); stroke-width: 1.5; }
.game-loader-crash path:nth-child(2) { stroke: #ff6a3d; stroke-width: 3; stroke-dasharray: 100 200; animation: game-loader-climb 1.8s ease-in infinite; }
.game-loader-crash path:nth-child(3) { stroke: #ffe08a; stroke-width: 8; stroke-dasharray: .1 200; animation: game-loader-climb-head 1.8s ease-in infinite; }
@keyframes game-loader-climb { 0% { stroke-dashoffset: 100; opacity: 1; } 80% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes game-loader-climb-head { 0% { stroke-dashoffset: 0; opacity: 1; } 80% { stroke-dashoffset: -100; opacity: 1; } 100% { stroke-dashoffset: -100; opacity: 0; } }
/* Gallina: un huevo rajado que se sacude a ratos, como por nacer */
.game-loader-egg { width: 52px; height: 62px; margin-bottom: 12px; transform-origin: 50% 92%; filter: drop-shadow(0 0 14px rgba(255,209,102,.5)); animation: game-loader-wobble 1.2s ease-in-out infinite; }
.game-loader-egg path:first-child { fill: #fff6df; stroke: #ffd166; stroke-width: 2; }
.game-loader-egg path:last-child { fill: none; stroke: #9a6a1c; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
@keyframes game-loader-wobble { 0%, 50%, 100% { transform: rotate(0); } 12% { transform: rotate(-10deg); } 25% { transform: rotate(8deg); } 37% { transform: rotate(-5deg); } }

/* Sic Bo, Video Póker y Limbo antes usaban el texto de carga simple. Ahora tienen una cobertura completa propia. */
.game-loader[data-game="sicbo"] { --gl-glow: rgba(185,34,58,.28); --gl-bg: #120508; }
.game-loader-dice { display: flex; gap: 8px; height: 64px; margin-bottom: 12px; align-items: center; filter: drop-shadow(0 0 15px rgba(255,207,128,.34)); }
.game-loader-dice i { width: 38px; height: 38px; border: 2px solid #f4d395; border-radius: 9px; background-color: #fff9eb; animation: game-loader-die 1.45s ease-in-out infinite; }
.game-loader-dice i:nth-child(1) { background-image: radial-gradient(circle, #8b1428 0 4px, transparent 4.5px); animation-delay: -.3s; }
.game-loader-dice i:nth-child(2) { background-image: radial-gradient(circle at 28% 28%, #8b1428 0 4px, transparent 4.5px), radial-gradient(circle at 72% 72%, #8b1428 0 4px, transparent 4.5px); }
.game-loader-dice i:nth-child(3) { background-image: radial-gradient(circle at 25% 25%, #8b1428 0 4px, transparent 4.5px), radial-gradient(circle, #8b1428 0 4px, transparent 4.5px), radial-gradient(circle at 75% 75%, #8b1428 0 4px, transparent 4.5px); animation-delay: -.7s; }
@keyframes game-loader-die { 0%, 100% { transform: translateY(8px) rotate(-6deg); } 50% { transform: translateY(-8px) rotate(7deg); } }

.game-loader[data-game="vpoker"] { --gl-glow: rgba(210,162,66,.24); --gl-bg: #06110d; }
.game-loader[data-game="blackjack"], .game-loader[data-game="baccarat"],
.game-loader[data-game="hilo"], .game-loader[data-game="dragontiger"],
.game-loader[data-game="andarbahar"], .game-loader[data-game="tcpoker"] { --gl-glow: rgba(44,177,139,.28); --gl-bg: #06120e; }
.game-loader[data-game="keno"], .game-loader[data-game="quiniela"], .game-loader[data-game="bingo"] { --gl-glow: rgba(58,133,255,.32); --gl-bg: #07101d; }
.game-loader[data-game="scratch"], .game-loader[data-game="goldrush"], .game-loader[data-game="futbol"], .game-loader[data-game="pirata"] { --gl-glow: rgba(255,173,43,.3); --gl-bg: #130b03; }
.game-loader[data-game="mines"] { --gl-glow: rgba(45,235,187,.32); --gl-bg: #04110e; }
.game-loader[data-game="dice"], .game-loader[data-game="craps"] { --gl-glow: rgba(255,194,90,.3); --gl-bg: #100806; }
.game-loader[data-game="tower"] { --gl-glow: rgba(255,116,76,.28); --gl-bg: #100806; }
.game-loader[data-game="coinflip"] { --gl-glow: rgba(255,193,67,.34); --gl-bg: #100b03; }
.game-loader[data-game="penalty"], .game-loader[data-game="futbol"] { --gl-glow: rgba(45,213,116,.3); --gl-bg: #04110a; }
.game-loader[data-game="balloon"] { --gl-glow: rgba(244,90,183,.3); --gl-bg: #120611; }
.game-loader[data-game="double"] { --gl-glow: rgba(255,49,93,.3); --gl-bg: #10050a; }
.game-loader-cards { position: relative; width: 116px; height: 76px; margin-bottom: 12px; filter: drop-shadow(0 0 14px rgba(229,190,101,.3)); }
.game-loader-cards i { position: absolute; left: 39px; top: 5px; width: 42px; height: 58px; display: grid; place-items: center; border: 2px solid #efd491; border-radius: 5px; background: linear-gradient(145deg,#fffdf7,#f5e8c9); box-shadow: inset 0 0 0 2px rgba(161,120,42,.12); transform-origin: 50% 92%; animation: game-loader-card 1.65s ease-in-out infinite; }
.game-loader-cards i::after { content: ""; width: 11px; height: 11px; border-radius: 2px 7px 2px 7px; transform: rotate(45deg); background: linear-gradient(135deg,#e6bf64,#2ab9a4); box-shadow: 0 0 12px rgba(42,185,164,.55); }
.game-loader-cards i:nth-child(1) { animation-delay: -.4s; }
.game-loader-cards i:nth-child(2) { animation-delay: -.8s; }
.game-loader-cards i:nth-child(3) { animation-delay: -1.2s; }
@keyframes game-loader-card { 0%, 100% { transform: translate(0, 5px) rotate(0); opacity: .5; } 45%, 60% { transform: translate(22px, -4px) rotate(12deg); opacity: 1; } }

.game-loader[data-game="limbo"] { --gl-glow: rgba(166,18,49,.34); --gl-bg: #080306; }
.game-loader-limbo { position: relative; width: 82px; height: 82px; margin-bottom: 12px; border: 3px solid rgba(224,181,91,.28); border-radius: 50%; background: conic-gradient(from 220deg, #761328, #e44c68 42%, #f0d47f 64%, rgba(240,212,127,.08) 65%); box-shadow: 0 0 24px rgba(156,21,47,.32); }
.game-loader-limbo::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: #0b0508; }
.game-loader-limbo i { position: absolute; left: 38px; top: 7px; z-index: 1; width: 4px; height: 30px; border-radius: 4px; background: #ffe6a2; box-shadow: 0 0 9px #e44c68; transform-origin: 50% 34px; animation: game-loader-limbo-scan 1.55s cubic-bezier(.4,0,.2,1) infinite alternate; }
@keyframes game-loader-limbo-scan { from { transform: rotate(-118deg); } to { transform: rotate(118deg); } }
/* Cascada: una bola que baja zigzagueando entre los clavos (un clavo repetido con sombras en cuatro filas) */
.game-loader-plinko { position: relative; width: 76px; height: 64px; margin-bottom: 12px; filter: drop-shadow(0 0 10px rgba(34,211,238,.5)); }
.game-loader-plinko::before {
  content: ""; position: absolute; left: 35px; top: 10px; width: 6px; height: 6px; border-radius: 50%;
  box-shadow: -8px 0 #bdf6ff, 8px 0 #bdf6ff, -16px 12px #bdf6ff, 0 12px #bdf6ff, 16px 12px #bdf6ff,
    -24px 24px #bdf6ff, -8px 24px #bdf6ff, 8px 24px #bdf6ff, 24px 24px #bdf6ff,
    -32px 36px #bdf6ff, -16px 36px #bdf6ff, 0 36px #bdf6ff, 16px 36px #bdf6ff, 32px 36px #bdf6ff;
}
.game-loader-plinko i { position: absolute; left: 34px; top: -2px; width: 8px; height: 8px; border-radius: 50%; background: #ffd75e; box-shadow: 0 0 8px rgba(255,215,94,.9); animation: game-loader-drop 1.5s ease-in infinite; }
@keyframes game-loader-drop {
  0% { transform: translate(0, 0); opacity: 0; } 8% { opacity: 1; } 22% { transform: translate(0, 11px); } 42% { transform: translate(8px, 23px); }
  62% { transform: translate(0, 35px); } 82% { transform: translate(-8px, 47px); opacity: 1; } 100% { transform: translate(-8px, 60px); opacity: 0; }
}
/* Tigre: moneda de la suerte (con el agujero cuadrado) que da vueltas */
.game-loader-coin {
  position: relative; width: 58px; height: 58px; margin-bottom: 12px; border-radius: 50%; border: 3px solid #ffe08a;
  background: radial-gradient(circle at 35% 30%, #fff3b0, #f2c14e 45%, #a8740c 85%);
  box-shadow: inset 0 0 0 5px rgba(122,74,6,.45), 0 0 20px rgba(214,48,24,.6);
  animation: game-loader-flip 1.6s ease-in-out infinite;
}
.game-loader-coin::before { content: ""; position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; transform: translate(-50%, -50%); background: #2a0805; border: 2px solid #8a5a0f; }
@keyframes game-loader-flip { from { transform: perspective(200px) rotateY(0); } to { transform: perspective(200px) rotateY(360deg); } }
/* Frutas 777: tres sietes que caen como rodillos frenando, uno detrás del otro */
.game-loader-sevens {
  display: flex; gap: 4px; margin-bottom: 12px; padding: 6px 9px; overflow: hidden; border: 2px solid #d4af37; border-radius: 8px;
  background: linear-gradient(#12030a, #3a0a14 50%, #12030a); box-shadow: 0 0 16px rgba(230,30,56,.45), inset 0 0 10px rgba(0,0,0,.8);
}
.game-loader-fruit { display:flex; align-items:center; gap:7px; height:64px; margin-bottom:12px; }
.game-loader-fruit i { width:27px; height:27px; border-radius:50% 50% 48% 48%; background: radial-gradient(circle at 32% 28%,#fff7a5 0 8%,#ffbd35 18%,#ef3d42 72%); box-shadow:0 0 15px rgba(255,89,45,.7); animation:game-loader-fruit 1.15s ease-in-out infinite alternate; }
.game-loader-fruit i::after { content:""; display:block; width:9px; height:5px; margin:-4px auto 0; border-radius:100% 0; background:#5bd26c; transform:rotate(-28deg); }
.game-loader-fruit i:nth-child(2) { animation-delay:-.35s; background:radial-gradient(circle at 32% 28%,#fff7a5 0 8%,#ffd64b 18%,#48b757 72%); }
.game-loader-fruit i:nth-child(3) { animation-delay:-.7s; background:radial-gradient(circle at 32% 28%,#fff7a5 0 8%,#ff9e3d 18%,#e73142 72%); }
@keyframes game-loader-fruit { to { transform:translateY(-8px) rotate(15deg) scale(1.08); } }
.game-loader[data-game="fruits"] {
  background: radial-gradient(ellipse at 50% 47%, rgba(31,143,177,.52), transparent 44%), linear-gradient(160deg, #072838, #15506a 55%, #311824);
}
.game-loader[data-game="fruits"] b { color: #fff0bf; letter-spacing: .18em; text-shadow: 0 0 20px rgba(255,211,117,.65); }
.game-loader[data-game="fruits"] > span { color: #d7eef0; }
.game-loader-fruits {
  position: relative; width: min(190px, 50vw); aspect-ratio: 1; margin-bottom: 14px;
  overflow: hidden; border: 2px solid #ffe4a1; border-radius: 25px;
  box-shadow: 0 0 0 6px rgba(16,91,115,.65), 0 0 0 8px rgba(255,218,144,.45), 0 0 36px rgba(255,195,94,.5);
  animation: fruits-loader-float 2.3s ease-in-out infinite alternate;
}
.game-loader-fruits img { display: block; width: 100%; height: 100%; object-fit: cover; }
.fruits-loader-shine {
  position: absolute; inset: -25%; pointer-events: none;
  background: linear-gradient(110deg, transparent 32%, rgba(255,255,217,.42) 47%, transparent 58%);
  transform: translateX(-115%); animation: fruits-loader-shine 2.2s ease-in-out infinite;
}
@keyframes fruits-loader-float { to { transform: translateY(-6px); box-shadow: 0 0 0 6px rgba(16,91,115,.65), 0 0 0 8px rgba(255,218,144,.62), 0 0 48px rgba(255,214,128,.72); } }
@keyframes fruits-loader-shine { 55%, 100% { transform: translateX(115%); } }
@media (prefers-reduced-motion: reduce) { .game-loader-fruits, .fruits-loader-shine { animation: none !important; } }
/* Dulces: chupetín de rayas que gira */
.game-loader-lollipop { position: relative; width: 56px; height: 80px; margin-bottom: 12px; filter: drop-shadow(0 0 14px rgba(255,95,191,.55)); }
.game-loader-lollipop::before {
  content: ""; position: absolute; left: 0; top: 0; width: 56px; height: 56px; border-radius: 50%; border: 3px solid #fff;
  background: radial-gradient(circle closest-side, #fff 0 14%, transparent 15%), repeating-conic-gradient(#ff5fbf 0 22.5deg, #ffd1f0 0 45deg);
  animation: game-loader-spin 1.8s linear infinite;
}
.game-loader-lollipop::after { content: ""; position: absolute; left: 25px; top: 52px; z-index: -1; width: 6px; height: 28px; border-radius: 3px; background: linear-gradient(90deg, #fff, #e8d9e4); }
.game-loader-balls { display:flex; align-items:center; gap:6px; height:64px; margin-bottom:12px; filter:drop-shadow(0 0 12px rgba(74,164,255,.45)); }
.game-loader-balls i { width:19px;height:19px;border-radius:50%;background:radial-gradient(circle at 32% 27%,#fff 0 5%,#9fe8ff 15%,#3189e9 68%,#102f75 100%);box-shadow:inset -2px -3px 5px #12377b,0 0 8px rgba(82,181,255,.55);animation:game-loader-bounce .85s ease-in-out infinite alternate; }
.game-loader-balls i:nth-child(2),.game-loader-balls i:nth-child(4){animation-delay:-.3s}.game-loader-balls i:nth-child(3){animation-delay:-.6s}
@keyframes game-loader-bounce { to { transform:translateY(-12px) scale(1.08); } }
.game-loader-gem { width:50px;height:50px;margin:0 0 22px;border:2px solid #8bffe5;transform:rotate(45deg) scale(.8);background:linear-gradient(135deg,#bafff0 0 17%,#20c7a0 18% 51%,#076b71 52%);box-shadow:0 0 14px #24e8bf, inset 0 0 8px #eafff9;animation:game-loader-gem 1.4s ease-in-out infinite alternate; }
@keyframes game-loader-gem { to { transform:rotate(225deg) scale(1);filter:brightness(1.35); } }
.game-loader-ticket { display:flex;gap:7px;align-items:center;justify-content:center;width:100px;height:62px;margin-bottom:12px;border:2px solid #e8bb52;border-radius:8px;background:linear-gradient(135deg,#fff0ad,#bc801e);box-shadow:0 0 16px rgba(245,180,40,.5);transform:rotate(-5deg);animation:game-loader-ticket 1.3s ease-in-out infinite alternate; }
.game-loader-ticket i { width:16px;height:16px;border:2px solid rgba(255,255,255,.75);border-radius:50%;background:radial-gradient(circle,#fff4b5 0 20%,#e7a423 25% 55%,#7e4310 60%); }
@keyframes game-loader-ticket { to { transform:rotate(5deg) translateY(-5px); } }
.game-loader-tower { display:flex;align-items:end;gap:4px;height:64px;margin-bottom:12px; }
.game-loader-tower i { width:21px;border:2px solid #f3bb69;border-radius:5px 5px 2px 2px;background:linear-gradient(90deg,#822e20,#ffb33f 50%,#8b311d);box-shadow:0 0 12px rgba(255,129,54,.42);animation:game-loader-build 1s ease-in-out infinite alternate; }
.game-loader-tower i:nth-child(1){height:28px}.game-loader-tower i:nth-child(2){height:43px;animation-delay:-.3s}.game-loader-tower i:nth-child(3){height:58px;animation-delay:-.6s}
@keyframes game-loader-build { to { transform:translateY(-7px);filter:brightness(1.35); } }
.game-loader-football { width:56px;height:56px;margin-bottom:20px;border:3px solid #f4f2d9;border-radius:50%;background:radial-gradient(circle at center,#283b2a 0 16%,transparent 17%),radial-gradient(circle at 20% 25%,#293d2a 0 10%,transparent 11%),radial-gradient(circle at 80% 35%,#293d2a 0 10%,transparent 11%),radial-gradient(circle at 34% 78%,#293d2a 0 10%,transparent 11%),#f5f3df;box-shadow:0 0 16px rgba(95,255,145,.42);animation:game-loader-spin 2s linear infinite; }
.game-loader-balloon { position:relative;width:52px;height:62px;margin-bottom:14px;border-radius:50% 50% 46% 46%;background:radial-gradient(circle at 32% 25%,#fff2ff 0 5%,#ff9de0 12%,#dc349b 60%,#722175 100%);box-shadow:0 0 20px rgba(246,78,192,.7);animation:game-loader-balloon 1.3s ease-in-out infinite alternate; }
.game-loader-balloon::after { content:"";position:absolute;left:23px;bottom:-15px;width:1px;height:20px;background:#ffd5f5; }
@keyframes game-loader-balloon { to { transform:translateY(-8px) scale(1.06); } }
.game-loader-tiles { display:flex;align-items:center;gap:5px;height:64px;margin-bottom:12px; }
.game-loader-tiles i { width:24px;height:48px;border:2px solid #ffb4c8;border-radius:5px;background:linear-gradient(145deg,#ff526e,#a9093a);box-shadow:0 0 12px rgba(255,44,104,.55);animation:game-loader-tile 1s ease-in-out infinite alternate; }
.game-loader-tiles i:nth-child(2){animation-delay:-.35s}.game-loader-tiles i:nth-child(3){animation-delay:-.7s}
@keyframes game-loader-tile { to { transform:translateY(-8px) rotate(8deg);filter:brightness(1.35); } }
.game-loader-ore { width:54px;height:48px;margin-bottom:26px;border-radius:35% 60% 42% 55%;background:linear-gradient(135deg,#fff1a1,#e5aa22 40%,#8a5310 76%,#f5d36a);box-shadow:0 0 18px rgba(255,187,44,.7),inset 3px 3px 4px #fff3ad;transform:rotate(-12deg);animation:game-loader-ore 1.1s ease-in-out infinite alternate; }
@keyframes game-loader-ore { to { transform:rotate(12deg) translateY(-7px);filter:brightness(1.3); } }
.game-loader-chest { position:relative;width:62px;height:44px;margin:6px 0 24px;border:3px solid #f5c64e;border-radius:5px;background:linear-gradient(90deg,#6f3515,#c37927 48%,#733411);box-shadow:0 0 18px rgba(255,185,49,.55);animation:game-loader-chest 1.2s ease-in-out infinite alternate; }
.game-loader-chest::before { content:"";position:absolute;left:-3px;top:-13px;width:62px;height:18px;border:3px solid #f5c64e;border-radius:9px 9px 2px 2px;background:linear-gradient(#e7ad38,#8d4d1b); }
.game-loader-chest i { position:absolute;z-index:1;left:25px;top:12px;width:9px;height:12px;border-radius:5px;background:#ffe883;box-shadow:0 0 10px #fff1a0; }
@keyframes game-loader-chest { to { transform:translateY(-5px);filter:brightness(1.2); } }
.game-loader[data-game="sweets"] {
  isolation: isolate; color: #fff7d9;
  background: linear-gradient(180deg, rgba(68, 25, 73, .2), rgba(67, 21, 67, .68)),
    url('../images/games/sweets/stage-pastel-v3.jpg') center / cover no-repeat, #a85893;
}
.game-loader[data-game="sweets"] b {
  color: #fff7d9; font: 900 24px Inter, sans-serif; letter-spacing: .1em;
  text-shadow: 0 2px 8px rgba(100, 23, 88, .92), 0 0 24px rgba(255, 221, 177, .7);
}
.game-loader[data-game="sweets"] span { color: #fff7e9; font-weight: 800; letter-spacing: .17em; text-shadow: 0 2px 5px rgba(94, 27, 76, .95); }
@media (max-width: 720px) and (orientation: portrait) {
  .game-loader[data-game="sweets"] {
    background-image: linear-gradient(180deg, rgba(68, 25, 73, .16), rgba(67, 21, 67, .62)),
      url('../images/games/sweets/stage-mobile.jpg');
  }
}
/* juego con PixiJS sin dibujo propio todavía: anillo dorado */
.game-loader-ring { width: 54px; height: 54px; margin-bottom: 12px; border-radius: 50%; border: 3px solid rgba(212,175,55,.2); border-top-color: #f5df8a; animation: game-loader-spin 1s linear infinite; }
.game-host { position: relative; }
/* sin animaciones si el jugador lo pidió: vale para todos los dibujos de las pantallas de espera */
@media (prefers-reduced-motion: reduce) { .game-loader *, .game-loader *::before { animation: none; } }
@media (prefers-reduced-motion: reduce) { .game-loader-olympus::after { animation: none; } }

/* ---------- Lobby ---------- */
.lobby { max-width: 1640px; margin: 0 auto; padding: 16px 28px 40px; position: relative; }
/* Palos de fondo, muy sutiles */
.lobby::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .55;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260' viewBox='0 0 260 260'%3E%3Cg fill='%23d4af37' fill-opacity='.045' font-family='serif' font-size='64'%3E%3Ctext x='20' y='80'%3E%E2%99%A0%3C/text%3E%3Ctext x='150' y='80'%3E%E2%99%A5%3C/text%3E%3Ctext x='20' y='210'%3E%E2%99%A6%3C/text%3E%3Ctext x='150' y='210'%3E%E2%99%A3%3C/text%3E%3C/g%3E%3C/svg%3E");
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.5) 50%, transparent 100%);
          mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.5) 50%, transparent 100%);
}

/* Marquesina */
.ticker { width: 0; min-width: 100%; overflow: hidden; border-top: 1px solid rgba(212,175,55,.25); border-bottom: 1px solid rgba(212,175,55,.25); background: linear-gradient(90deg, rgba(212,175,55,.06), rgba(212,175,55,.12) 50%, rgba(212,175,55,.06)); margin-bottom: 18px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.ticker-track { display: flex; width: max-content; gap: 22px; padding: 7px 0; animation: ticker 70s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-track span { font-family: Cinzel, serif; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-2); white-space: nowrap; }
.ticker-track i { font-style: normal; color: var(--gold); opacity: .7; font-size: 12px; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* Portadas (carrusel) */
.hero { position: relative; aspect-ratio: 21 / 7; border-radius: 18px; overflow: hidden; background: #0b0d12; border: 1px solid rgba(212,175,55,.35); box-shadow: 0 24px 60px rgba(0,0,0,.55), 0 0 0 1px rgba(0,0,0,.4), inset 0 0 0 1px rgba(212,175,55,.15); margin-bottom: 22px; }
.hero-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .9s ease; display: block; }
.hero-slide.on { opacity: 1; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,13,18,0) 60%, rgba(11,13,18,.55) 100%); pointer-events: none; }
.hero-corner { position: absolute; width: 34px; height: 34px; z-index: 1; pointer-events: none; border: 2px solid var(--gold); opacity: .9; filter: drop-shadow(0 0 6px rgba(212,175,55,.5)); }
.hero-corner.tl { top: 12px; left: 12px; border-right: 0; border-bottom: 0; border-top-left-radius: 8px; }
.hero-corner.tr { top: 12px; right: 12px; border-left: 0; border-bottom: 0; border-top-right-radius: 8px; }
.hero-corner.bl { bottom: 12px; left: 12px; border-right: 0; border-top: 0; border-bottom-left-radius: 8px; }
.hero-corner.br { bottom: 12px; right: 12px; border-left: 0; border-top: 0; border-bottom-right-radius: 8px; }
.hero-dots { position: absolute; left: 0; right: 0; bottom: 14px; display: flex; justify-content: center; gap: 8px; z-index: 2; }
.hero-dots button { width: 8px; height: 8px; padding: 0; border-radius: 50%; border: 1px solid rgba(245,223,138,.7); background: rgba(0,0,0,.4); cursor: pointer; transition: width .25s ease, background .25s ease; }
.hero-dots button.on { width: 22px; border-radius: 999px; background: var(--gold); }

/* Franja de beneficios */
.perks { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 30px; }
.perks li { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 12px 16px; border-radius: 12px; background: linear-gradient(180deg, rgba(212,175,55,.09), rgba(212,175,55,.03)); border: 1px solid rgba(212,175,55,.22); }
.perks li b { font-family: Cinzel, serif; font-size: 13px; letter-spacing: .08em; color: var(--gold-2); }
.perks li small { color: var(--muted); font-size: 11px; grid-column: 2; }
.perk-ico { grid-row: 1 / 3; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 17px; color: #2b1d02; background: radial-gradient(circle at 35% 30%, #f7e39a, #d4af37 60%, #a8861f); box-shadow: 0 4px 12px rgba(212,175,55,.35), inset 0 0 0 2px rgba(255,255,255,.25), inset 0 0 0 4px rgba(120,90,10,.5); }

/* Encabezado + filtros */
.lobby-head { margin-bottom: 22px; text-align: center; }
.lobby-head h1 { display: flex; align-items: center; justify-content: center; gap: 16px; font-family: Cinzel, serif; font-weight: 700; letter-spacing: .14em; font-size: clamp(20px, 2.6vw, 28px); color: var(--gold-2); text-wrap: balance; text-shadow: 0 0 22px rgba(212,175,55,.25); }
.lobby-head h1 .orn { flex: 0 1 140px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); position: relative; }
.lobby-head h1 .orn::after { content: "◆"; position: absolute; right: -6px; top: 50%; transform: translateY(-50%); font-size: 9px; color: var(--gold); }
.lobby-head h1 .orn:last-child { background: linear-gradient(90deg, var(--gold), transparent); }
.lobby-head h1 .orn:last-child::after { right: auto; left: -6px; }
.lobby-head p { color: var(--muted); margin-top: 8px; font-size: 13px; }
.cats { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.cats button { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: rgba(0,0,0,.3); color: var(--text); cursor: pointer; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; transition: background .15s ease, border-color .15s ease, color .15s ease; }
.cats button i { font-style: normal; color: var(--gold); font-size: 12px; }
.cats button:hover { background: rgba(212,175,55,.12); border-color: var(--gold); }
.cats button.on { background: linear-gradient(180deg, #f7e39a, #d4af37 55%, #a8861f); color: #2b1d02; border-color: transparent; box-shadow: 0 4px 14px rgba(212,175,55,.3); }
.cats button.on i { color: #2b1d02; }
.lobby-empty { text-align: center; color: var(--muted); padding: 40px 0; font-size: 13px; letter-spacing: .1em; }

/* Grilla de cards */
/* 5 por fila en escritorio; baja a 4 / 3 / 2 en pantallas más chicas */
.game-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
@media (max-width: 1180px) { .game-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; } }
@media (max-width: 900px)  { .game-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; } }
@media (max-width: 1100px) { .perks { grid-template-columns: repeat(2, 1fr); } }
.game-card {
  /* el navegador saltea pintar las cards lejos del viewport: con 36 en la grilla, el scroll pasa de 807 ms a 113 ms
     de trabajo. La altura estimada debe parecerse a la real o la página "salta" al scrollear (ver ajuste en móvil). */
  content-visibility: auto; contain-intrinsic-size: auto 322px;
  display: grid; grid-template-rows: auto 1fr; text-decoration: none; color: inherit; border-radius: 14px; overflow: hidden; position: relative;
  background: var(--panel); border: 1px solid rgba(212,175,55,.2);
  box-shadow: 0 10px 30px rgba(0,0,0,.45);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.game-card[hidden] { display: none; }
/* Dentro de un juego, el atributo hidden siempre gana a cualquier display de su CSS (overlays, carteles, paneles). */
.game-host [hidden] { display: none !important; }
.game-card:hover { transform: translateY(-4px); border-color: var(--gold); box-shadow: 0 18px 40px rgba(0,0,0,.55), 0 0 0 1px rgba(212,175,55,.3), 0 0 30px rgba(212,175,55,.12); }
/* brillo dorado que cruza la card al pasar el mouse */
.game-card::after { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(115deg, transparent 35%, rgba(255,240,180,.22) 50%, transparent 65%); transform: translateX(-120%); }
.game-card:hover::after { animation: shine .8s ease forwards; }
@keyframes shine { to { transform: translateX(120%); } }
.thumb { aspect-ratio: 1; position: relative; overflow: hidden; }
.thumb-art { background: #0b0d12; }
.thumb-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease, opacity .35s ease; opacity: 0; }
.thumb-art.ready img { opacity: 1; }
/* Esqueleto: brillo que recorre la card mientras la imagen viaja (en 4G la primera tarda ~2 s). */
.thumb-art::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(100deg, #11161f 22%, #1b2130 42%, #2b3243 50%, #1b2130 58%, #11161f 78%); background-size: 240% 100%; animation: thumb-shimmer 1.4s linear infinite; }
.thumb-art.ready::before { opacity: 0; animation: none; transition: opacity .3s ease; pointer-events: none; }
@keyframes thumb-shimmer { from { background-position: 140% 0; } to { background-position: -40% 0; } }
.game-card:hover .thumb-art img { transform: scale(1.04); }
.thumb .tag { position: absolute; left: 10px; bottom: 10px; z-index: 1; font-size: 9px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-2); background: rgba(11,13,18,.84); border: 1px solid rgba(212,175,55,.45); padding: 4px 8px; border-radius: 999px; }
.thumb-title { position: absolute; z-index: 2; left: 50%; bottom: 29px; width: 92%; transform: translateX(-50%); color: #fff; text-align: center; font: 800 15px/1.08 Cinzel, Georgia, serif; text-wrap: balance; text-shadow: 0 2px 3px #061016, 0 0 12px rgba(3,12,20,.95), 0 0 22px currentColor; pointer-events: none; }
.game-card[data-id="book"] .thumb-title { color: #b7fff3; }
.game-card[data-id="tiger"] .thumb-title { color: #d9ff89; }
.game-card[data-id="hilo"] .thumb-title { color: #9ff7ff; }
.game-card[data-id="vpoker"] .thumb-title { color: #ffe39a; }
.game-card[data-id="keno"] .thumb-title { color: #c3ffbd; }
.card-body { padding: 14px 15px 15px; display: grid; gap: 5px; align-content: start; }
.card-body h2 { font-family: Cinzel, serif; font-weight: 700; letter-spacing: .09em; font-size: 15px; color: var(--gold-2); }
.card-body p { color: var(--muted); font-size: 12.5px; line-height: 1.42; }
/* ".play" es el pie "Entrar ›" de la tarjeta del lobby. Va acotado a .game-card: suelto también agarraba el botón
   "Jugar" de Tres Cartas (.btn.primary.play) y en el celular lo dejaba en 28×32 px, mostrando solo "AR". */
.game-card .play { margin-top: 6px; justify-self: start; padding: 7px 15px; border-radius: 7px; font-size: 10px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: #2b1d02;
        background: linear-gradient(180deg, #f7e39a, #d4af37 55%, #a8861f); box-shadow: 0 4px 14px rgba(212,175,55,.3); }

/* Pie */
.lobby-foot { margin-top: 40px; padding-top: 18px; border-top: 1px solid rgba(212,175,55,.2); display: flex; justify-content: center; align-items: center; gap: 16px; color: var(--muted); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.lobby-foot span { color: var(--gold); letter-spacing: .3em; opacity: .8; }

/* Arte de las cards (CSS puro) */
.thumb-roulette { background: radial-gradient(circle at 50% 60%, #134d39 0%, #0a2e22 60%, #06100b 100%); }
.thumb-roulette::before {
  content: ""; position: absolute; left: 50%; top: 58%; width: 62%; aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%; border: 6px solid #5a3016; box-shadow: 0 0 0 3px #d4af37, 0 20px 40px rgba(0,0,0,.6);
  background:
    radial-gradient(circle, #d4af37 0 9%, #1a1a1a 9.5% 30%, transparent 30.5%),
    repeating-conic-gradient(from 0deg, #c1121f 0 4.86deg, #161616 4.86deg 9.73deg);
}
.thumb-roulette::after { content: ""; position: absolute; left: 50%; top: 58%; width: 5%; aspect-ratio: 1; border-radius: 50%; background: #fff; transform: translate(190%, -430%); box-shadow: 0 2px 6px rgba(0,0,0,.6); }
.thumb-slot { background: radial-gradient(circle at 50% 40%, #2a1f4d 0%, #16122b 55%, #0b0d12 100%); display: flex; align-items: center; justify-content: center; gap: 6%; }
.thumb-slot::before, .thumb-slot::after, .thumb-slot > i { content: ""; width: 20%; aspect-ratio: 1; border-radius: 14%; box-shadow: inset 0 0 0 2px rgba(255,255,255,.25), 0 10px 24px rgba(0,0,0,.6); }
.thumb-slot::before { background: linear-gradient(135deg, #e04a5f, #8e1024); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); border-radius: 0; }
.thumb-slot > i { background: linear-gradient(135deg, #f7e39a, #b8860b); display: block; }
.thumb-slot::after { background: linear-gradient(135deg, #5fb7ff, #1f4ea8); clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); border-radius: 0; }
.thumb-jewelcarnival { background: radial-gradient(ellipse at 50% 80%, #fa32cf 0%, #7116d6 46%, #171080 100%); overflow: hidden; }
.thumb-jewelcarnival::before { content: ""; position: absolute; width: 34%; aspect-ratio: 1; left: 33%; top: 23%; clip-path: polygon(50% 0, 92% 24%, 100% 68%, 50% 100%, 0 68%, 8% 24%); background: linear-gradient(135deg, #e7ffff 0 12%, #28efff 24%, #7b39ff 51%, #ff36bd 72%, #ffe34e 89%); filter: drop-shadow(0 0 16px rgba(255,65,218,.95)); box-shadow: 0 0 34px rgba(255,65,218,.85); }
.thumb-jewelcarnival::after { content: "✦"; position: absolute; left: 50%; top: 39%; transform: translate(-50%, -50%); color: #fffca8; font: 900 25px/1 Georgia, serif; text-shadow: 0 0 12px #fff, 0 0 24px #ff40d1; }
.thumb-jewelcarnival-art { background: radial-gradient(ellipse at 50% 76%, rgba(255,48,193,.74), transparent 52%), radial-gradient(circle at 50% 20%, #5123a0, #120a38 76%); }
.thumb-jewelcarnival-art img { object-fit: contain; padding: 3% 8% 1%; box-sizing: border-box; filter: drop-shadow(0 0 12px rgba(255,72,209,.52)); }

/* Carnaval de Gemas: el bufón flota sobre una rueda de luces y una gema que palpita mientras arranca Pixi. */
.game-loader[data-game="jewelcarnival"] {
  --gl-glow: rgba(255,54,190,.34); --gl-bg: #100626; color: #fff0ad; overflow: hidden; isolation: isolate;
  background: radial-gradient(ellipse at 50% 42%, rgba(125,36,208,.4), transparent 38%), linear-gradient(145deg,#10051e,#2b0d52 52%,#100725);
}
.game-loader[data-game="jewelcarnival"] b { color: #fff0ad; letter-spacing: .18em; text-shadow: 0 0 12px rgba(255,65,202,.58), 0 0 24px rgba(79,210,255,.32); }
.game-loader[data-game="jewelcarnival"] > span { color: #e1c9f8; }
.game-loader-carnival { position: relative; width: min(178px, 52vw); height: 138px; display: grid; place-items: center; margin-bottom: 8px; }
.jc-loader-orbit { position: absolute; inset: 8px 25px 14px; border: 2px solid rgba(255,216,111,.78); border-radius: 50%; box-shadow: 0 0 0 5px rgba(255,57,193,.12), 0 0 22px rgba(255,53,198,.46), inset 0 0 16px rgba(99,221,255,.18); animation: jc-loader-orbit 3s linear infinite; }
.jc-loader-orbit::before { content: ""; position: absolute; inset: -8px; border-radius: inherit; background: repeating-conic-gradient(from 0deg, #ffe56f 0 5deg, transparent 5deg 15deg); mask: radial-gradient(transparent 62%, #000 65% 69%, transparent 72%); }
.game-loader-carnival img { position: relative; z-index: 1; width: 100px; height: 132px; object-fit: contain; filter: drop-shadow(0 0 11px rgba(255,53,204,.55)) drop-shadow(0 0 18px rgba(68,205,255,.28)); animation: jc-loader-bob 1.7s ease-in-out infinite alternate; }
.jc-loader-gem { position: absolute; z-index: 2; left: 19px; top: 22px; color: #b9fcff; font: 900 26px/1 Georgia,serif; text-shadow: 0 0 6px #fff, 0 0 14px #34eaff, 0 0 24px #ff37d0; animation: jc-loader-gem 1s ease-in-out infinite alternate; }
.jc-loader-spark { position: absolute; z-index: 2; width: 5px; height: 5px; border-radius: 50%; background: #fff7c4; box-shadow: 0 0 8px #fff, 0 0 16px #3ceaff, 0 0 24px #ff3ac2; animation: jc-loader-spark .8s ease-in-out infinite alternate; }
.jc-loader-spark-a { right: 20px; top: 28px; }
.jc-loader-spark-b { left: 26px; bottom: 24px; animation-delay: -.45s; }
@keyframes jc-loader-orbit { to { transform: rotate(360deg); } }
@keyframes jc-loader-bob { to { transform: translateY(-5px) scale(1.025); } }
@keyframes jc-loader-gem { to { transform: scale(1.24) rotate(14deg); filter: brightness(1.4); } }
@keyframes jc-loader-spark { from { opacity: .25; transform: scale(.55); } to { opacity: 1; transform: scale(1.35); } }
@media (prefers-reduced-motion: reduce) {
  .game-loader-carnival *, .game-loader-carnival *::before { animation: none !important; }
}

.thumb-blackjack { background: radial-gradient(circle at 50% 30%, #12666c 0%, #0d4a4f 45%, #041a1c 100%); }
.thumb-blackjack::before, .thumb-blackjack::after {
  content: "A"; position: absolute; left: 50%; top: 50%; width: 22%; aspect-ratio: 5 / 7; border-radius: 6%;
  background: linear-gradient(160deg, #fff, #efeee8); color: #c1121f; font: 800 clamp(16px, 2.4vw, 26px) Inter, sans-serif;
  display: grid; place-items: center; box-shadow: 0 12px 28px rgba(0,0,0,.55); border: 1px solid #cfcbbd;
}
.thumb-blackjack::before { transform: translate(-80%, -55%) rotate(-12deg); }
.thumb-blackjack::after { content: "K"; color: #161616; transform: translate(-20%, -45%) rotate(10deg); }

.thumb-crash { background: radial-gradient(circle at 50% 100%, #182353 0%, #0b1030 50%, #070b1a 100%); }
.thumb-crash::before { content: ""; position: absolute; left: 8%; right: 8%; bottom: 14%; height: 70%;
  background: linear-gradient(180deg, rgba(77,227,255,.35), rgba(77,227,255,0)); clip-path: polygon(0 100%, 30% 92%, 55% 78%, 75% 52%, 90% 18%, 100% 0, 100% 100%); }
.thumb-crash::after { content: "2.47×"; position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); font: 800 clamp(24px, 3.4vw, 36px) Inter, sans-serif; color: #fff; text-shadow: 0 0 24px rgba(77,227,255,.6); letter-spacing: -.02em; }

.thumb-baccarat { background: radial-gradient(circle at 50% 30%, #7a1a34 0%, #5a1024 45%, #1a040a 100%); }
.thumb-baccarat::before, .thumb-baccarat::after {
  content: "9"; position: absolute; top: 50%; width: 20%; aspect-ratio: 5 / 7; border-radius: 6%; transform: translateY(-50%);
  background: linear-gradient(160deg, #fff, #efeee8); font: 800 clamp(16px, 2.4vw, 26px) Inter, sans-serif; display: grid; place-items: center;
  box-shadow: 0 12px 28px rgba(0,0,0,.55); border: 1px solid #cfcbbd;
}
.thumb-baccarat::before { left: 22%; color: #2f6fe4; box-shadow: 0 0 0 3px rgba(47,111,228,.6), 0 12px 28px rgba(0,0,0,.55); }
.thumb-baccarat::after { content: "7"; right: 22%; color: #e0353f; box-shadow: 0 0 0 3px rgba(224,53,63,.6), 0 12px 28px rgba(0,0,0,.55); }

.thumb-plinko { background: radial-gradient(circle at 50% 0%, #1b2a4d 0%, #0e162b 50%, #0a0f1c 100%); }
.thumb-plinko::before { content: ""; position: absolute; inset: 12% 18% 30%; background-image: radial-gradient(circle, rgba(255,255,255,.9) 0 2px, transparent 2.5px); background-size: 12% 20%; background-position: 50% 0;
  -webkit-mask: linear-gradient(to bottom, transparent 0, #000 10%); mask: linear-gradient(to bottom, transparent 0, #000 10%); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.thumb-plinko::after { content: ""; position: absolute; left: 12%; right: 12%; bottom: 14%; height: 12%; border-radius: 4px;
  background: linear-gradient(90deg, #e0353f, #f59e0b 30%, #facc15 50%, #f59e0b 70%, #e0353f); box-shadow: 0 8px 20px rgba(0,0,0,.5); }

.thumb-mines { background: radial-gradient(circle at 50% 0%, #17403a 0%, #0f2925 50%, #0a1412 100%); display: grid; place-items: center; }
.thumb-mines::before { content: ""; width: 46%; aspect-ratio: 1; background-image: linear-gradient(180deg, #2b5a52, #1c3f39); background-size: 30% 30%; background-clip: content-box;
  -webkit-mask: repeating-linear-gradient(90deg, #000 0 28%, transparent 28% 36%), repeating-linear-gradient(0deg, #000 0 28%, transparent 28% 36%); -webkit-mask-composite: source-in; mask: repeating-linear-gradient(90deg, #000 0 28%, transparent 28% 36%), repeating-linear-gradient(0deg, #000 0 28%, transparent 28% 36%); mask-composite: intersect; }
.thumb-mines::after { content: ""; position: absolute; left: 50%; top: 50%; width: 14%; aspect-ratio: 1; transform: translate(-50%, -50%); background: linear-gradient(135deg, #b8fff1, #34e0c4 45%, #0f8f7a); clip-path: polygon(25% 0, 75% 0, 100% 35%, 50% 100%, 0 35%); filter: drop-shadow(0 0 12px rgba(52,224,196,.9)); }

.thumb-sicbo { background: radial-gradient(circle at 50% 0%, #3a2c14 0%, #1c1610 50%, #0c0a08 100%); display: flex; align-items: center; justify-content: center; gap: 6%; }
.thumb-sicbo::before, .thumb-sicbo::after, .thumb-sicbo > i { content: ""; display: block; width: 17%; aspect-ratio: 1; border-radius: 16%; background: radial-gradient(circle at 50% 50%, #1a1a1a 0 14%, transparent 15%), linear-gradient(160deg, #fffdf6, #e9e2cf); box-shadow: 0 10px 24px rgba(0,0,0,.6), inset 0 0 0 1px #c9bfa2; }
.thumb-sicbo::before { transform: rotate(-14deg) translateY(8%); background: radial-gradient(circle at 26% 26%, #1a1a1a 0 10%, transparent 11%), radial-gradient(circle at 74% 74%, #1a1a1a 0 10%, transparent 11%), radial-gradient(circle at 50% 50%, #1a1a1a 0 10%, transparent 11%), linear-gradient(160deg, #fffdf6, #e9e2cf); }
.thumb-sicbo::after { transform: rotate(12deg) translateY(-6%); background: radial-gradient(circle at 26% 26%, #c1121f 0 10%, transparent 11%), radial-gradient(circle at 74% 26%, #c1121f 0 10%, transparent 11%), radial-gradient(circle at 26% 74%, #c1121f 0 10%, transparent 11%), radial-gradient(circle at 74% 74%, #c1121f 0 10%, transparent 11%), linear-gradient(160deg, #fffdf6, #e9e2cf); }

.thumb-vpoker { background: radial-gradient(circle at 50% 0%, #142a7a 0%, #0a1846 50%, #050a1f 100%); display: flex; align-items: flex-end; justify-content: center; gap: 2%; padding-bottom: 12%; }
.thumb-vpoker::before, .thumb-vpoker::after, .thumb-vpoker > i { content: "A"; display: grid; place-items: center; width: 15%; aspect-ratio: 5 / 7; border-radius: 6%; background: linear-gradient(160deg, #fff, #efeee8); border: 1px solid #cfcbbd; font: 800 clamp(12px, 1.8vw, 20px) Inter, sans-serif; color: #161616; box-shadow: 0 10px 24px rgba(0,0,0,.55); }
.thumb-vpoker::before { content: "10"; color: #c1121f; transform: rotate(-10deg) translateY(6%); }
.thumb-vpoker > i::before { content: "K"; }
.thumb-vpoker > i { color: #c1121f; font-style: normal; transform: translateY(-4%); box-shadow: 0 0 0 3px #ffd52e, 0 10px 24px rgba(0,0,0,.55); }
.thumb-vpoker::after { transform: rotate(10deg) translateY(6%); }

.thumb-keno { background: radial-gradient(circle at 50% 0%, #3b1d6e 0%, #1f1140 50%, #120a1f 100%); display: grid; place-items: center; }
.thumb-keno::before { content: ""; width: 60%; height: 52%; background-image: radial-gradient(circle, rgba(255,255,255,.14) 0 34%, transparent 36%); background-size: 20% 25%; }
.thumb-keno::after { content: "7"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 16%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; font: 800 clamp(14px, 2vw, 22px) Inter, sans-serif; color: #1a1030; background: radial-gradient(circle at 35% 30%, #fff3d6, #ffb340 70%); box-shadow: 0 0 24px rgba(255,179,64,.9), 0 10px 24px rgba(0,0,0,.5); }

.thumb-dice { background: radial-gradient(circle at 50% 0%, #1d2a3a 0%, #111820 50%, #0b0f14 100%); display: grid; place-items: center; }
.thumb-dice::before { content: ""; width: 70%; height: 10%; border-radius: 999px; background: linear-gradient(90deg, #ff4d6d 0 52%, #2ee59d 52% 100%); box-shadow: inset 0 2px 4px rgba(0,0,0,.5), 0 8px 20px rgba(0,0,0,.5); }
.thumb-dice::after { content: "73.41"; position: absolute; left: 50%; top: 32%; transform: translate(-50%, -50%); font: 800 clamp(20px, 3vw, 32px) Inter, sans-serif; color: #2ee59d; text-shadow: 0 0 24px rgba(46,229,157,.6); letter-spacing: -.02em; }

.thumb-hilo { background: radial-gradient(circle at 50% 0%, #3a2a5e 0%, #1f1838 50%, #12101f 100%); display: flex; align-items: center; justify-content: center; gap: 4%; }
.thumb-hilo::before, .thumb-hilo::after { content: "7"; width: 17%; aspect-ratio: 5 / 7; border-radius: 6%; background: linear-gradient(160deg, #fff, #efeee8); border: 1px solid #cfcbbd; display: grid; place-items: center; font: 800 clamp(16px, 2.4vw, 26px) Inter, sans-serif; color: #161616; box-shadow: 0 12px 28px rgba(0,0,0,.55); }
.thumb-hilo::after { content: "Q"; color: #c1121f; box-shadow: 0 0 0 3px #7cfc9a, 0 12px 28px rgba(0,0,0,.55); }
.thumb-hilo > i::before { content: "›"; }
.thumb-hilo > i { font-style: normal; font: 800 clamp(18px, 2.6vw, 30px) Inter, sans-serif; color: #ff2e88; text-shadow: 0 0 16px rgba(255,46,136,.7); }

.thumb-wheel { background: radial-gradient(circle at 50% 0%, #26304d 0%, #141a2b 50%, #0a0d14 100%); }
.thumb-wheel::before { content: ""; position: absolute; left: 50%; top: 60%; width: 64%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; border: 4px solid #d4af37;
  background: radial-gradient(circle, #0a0d14 0 40%, transparent 41%), conic-gradient(#3b82f6 0 18deg, #2a3142 18deg 36deg, #22c55e 36deg 54deg, #2a3142 54deg 72deg, #eab308 72deg 90deg, #2a3142 90deg 108deg, #f97316 108deg 126deg, #2a3142 126deg 144deg, #a855f7 144deg 162deg, #2a3142 162deg 180deg, #3b82f6 180deg 198deg, #2a3142 198deg 216deg, #22c55e 216deg 234deg, #2a3142 234deg 252deg, #eab308 252deg 270deg, #2a3142 270deg 288deg, #d4af37 288deg 306deg, #2a3142 306deg 324deg, #3b82f6 324deg 342deg, #2a3142 342deg 360deg);
  box-shadow: 0 20px 40px rgba(0,0,0,.6); }
.thumb-wheel::after { content: ""; position: absolute; left: 50%; top: 24%; transform: translateX(-50%); border: 9px solid transparent; border-top: 16px solid #f5df8a; }

.thumb-limbo, .thumb-coinflip, .thumb-penalty, .thumb-balloon { display: grid; place-items: center; }
.thumb-limbo::before, .thumb-coinflip::before, .thumb-penalty::before, .thumb-balloon::before { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-family: Cinzel, serif; font-weight: 700; letter-spacing: .1em; color: #f5df8a; text-shadow: 0 0 14px rgba(212,175,55,.6); }
.thumb-limbo { background: radial-gradient(circle at 50% 0%, #1f3d57 0%, #10212f 50%, #08111a 100%); }
.thumb-limbo::before { content: "×2.00"; font-size: clamp(22px, 3.4vw, 40px); color: #2ee59d; text-shadow: 0 0 20px rgba(46,229,157,.6); }
.thumb-coinflip { background: radial-gradient(circle at 50% 0%, #4a3a12 0%, #2a2109 50%, #14100a 100%); }
.thumb-coinflip::before { content: ""; width: 42%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff2b0, #d4af37 55%, #8c6d1a); box-shadow: 0 14px 30px rgba(0,0,0,.6), inset 0 0 0 5px rgba(255,255,255,.35); }
.thumb-penalty { background: radial-gradient(circle at 50% 0%, #1d5a2b 0%, #123a1c 50%, #0a1a0e 100%); }
.thumb-penalty::before { content: "⚽"; font-size: clamp(34px, 5vw, 60px); text-shadow: 0 10px 20px rgba(0,0,0,.6); }
.thumb-balloon { background: radial-gradient(circle at 50% 0%, #4d1a2a 0%, #2b0f18 50%, #14080c 100%); }
.thumb-balloon::before { content: "🎈"; font-size: clamp(34px, 5vw, 60px); text-shadow: 0 10px 20px rgba(0,0,0,.6); }
.thumb-tiger, .thumb-fruits, .thumb-book, .thumb-sweets { display: grid; place-items: center; }
.thumb-tiger::before, .thumb-fruits::before, .thumb-book::before, .thumb-sweets::before { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: clamp(38px, 5.5vw, 66px); text-shadow: 0 10px 22px rgba(0,0,0,.6); }
.thumb-tiger { background: radial-gradient(circle at 50% 0%, #a3260f 0%, #4a0f08 50%, #1a0604 100%); } .thumb-tiger::before { content: "🐯"; }
.thumb-fruits { background: radial-gradient(circle at 50% 0%, #1b3a5c 0%, #0f2038 50%, #070c16 100%); } .thumb-fruits::before { content: "🍒"; }
.thumb-book { background: radial-gradient(circle at 50% 0%, #8a5f12 0%, #3a2708 50%, #120c03 100%); } .thumb-book::before { content: "📖"; }
.thumb-sweets { background: radial-gradient(circle at 50% 0%, #a3308f 0%, #4a1250 50%, #150722 100%); } .thumb-sweets::before { content: "🍭"; }
.thumb-american, .thumb-lightning { display: grid; place-items: center; }
.thumb-american::before, .thumb-lightning::before { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.thumb-american { background: radial-gradient(circle at 50% 0%, #1b5a3e 0%, #0b2e22 50%, #06100b 100%); }
.thumb-american::before { content: "00"; width: 38%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #2ec27e, #0f8a4b 60%, #064d29); border: 3px solid #d4af37; font: 800 clamp(20px, 3vw, 34px) Inter, sans-serif; color: #fff; box-shadow: 0 14px 30px rgba(0,0,0,.6); }
.thumb-lightning { background: radial-gradient(circle at 50% 0%, #2b3f8f 0%, #141c4a 50%, #070a1c 100%); }
.thumb-lightning::before { content: "⚡"; font-size: clamp(38px, 5.5vw, 66px); filter: drop-shadow(0 0 18px rgba(255,226,122,.9)); }
.thumb-double { background: radial-gradient(circle at 50% 0%, #3a1a3a 0%, #1a1020 50%, #0b0a10 100%); display: flex; align-items: center; justify-content: center; gap: 5%; }
.thumb-double::before, .thumb-double::after, .thumb-double i { content: ""; width: 20%; aspect-ratio: 1; border-radius: 16%; box-shadow: 0 10px 24px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.25); }
.thumb-double::before { background: linear-gradient(180deg, #ff5a6e, #b4121f); } .thumb-double i { background: linear-gradient(180deg, #fff, #cfd4dc); display: block; } .thumb-double::after { background: linear-gradient(180deg, #3a3f4a, #14161c); }
.thumb-tcpoker { background: radial-gradient(circle at 50% 10%, #17503b 0%, #0a2e22 55%, #06100b 100%); display: flex; align-items: center; justify-content: center; }
.thumb-tcpoker::before, .thumb-tcpoker::after, .thumb-tcpoker i { content: "A"; width: 19%; aspect-ratio: 5 / 7; border-radius: 7%; background: linear-gradient(160deg, #fff, #efeee8); border: 1px solid #cfcbbd; display: grid; place-items: center; font: 800 clamp(16px, 2.4vw, 26px) Inter, sans-serif; color: #161616; box-shadow: 0 12px 28px rgba(0,0,0,.55); }
.thumb-tcpoker::before { transform: rotate(-14deg) translateX(18%); color: #c1121f; } .thumb-tcpoker i { transform: translateY(-6%); z-index: 1; content: "K"; } .thumb-tcpoker i::before { content: "K"; } .thumb-tcpoker::after { content: "Q"; transform: rotate(14deg) translateX(-18%); color: #c1121f; }
.thumb-goldrush, .thumb-futbol, .thumb-pirata { display: grid; place-items: center; }
.thumb-goldrush::before, .thumb-futbol::before, .thumb-pirata::before { content: ""; width: 44%; aspect-ratio: 4 / 5; border-radius: 8%; background: linear-gradient(135deg, #c9c9cf, #f2f2f5 35%, #aeb0b8 50%, #e6e6ea 70%, #9a9ca6), var(--tk, #fdf6e3); background-size: 70% 60%, 100% 100%; background-repeat: no-repeat; background-position: 50% 60%, 0 0; box-shadow: 0 16px 34px rgba(0,0,0,.6), inset 0 0 0 3px #fff, inset 0 0 0 4px #d4af37; transform: rotate(-6deg); }
.thumb-goldrush::after, .thumb-futbol::after, .thumb-pirata::after { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-6deg); font-size: clamp(22px, 3.4vw, 40px); filter: drop-shadow(0 4px 8px rgba(0,0,0,.5)); }
.thumb-goldrush { --tk: #fff7d6; background: radial-gradient(circle at 50% 0%, #8a5f12 0%, #3a2708 50%, #14100a 100%); } .thumb-goldrush::after { content: "💰"; }
.thumb-futbol { --tk: #f2fff4; background: radial-gradient(circle at 50% 0%, #1d5a2b 0%, #123a1c 50%, #06110a 100%); } .thumb-futbol::after { content: "⚽"; }
.thumb-pirata { --tk: #f3ead7; background: radial-gradient(circle at 50% 0%, #1b3a5c 0%, #0f2038 50%, #070c16 100%); } .thumb-pirata::after { content: "💀"; }
.thumb-quiniela { background: radial-gradient(circle at 50% 0%, #2f3a2a 0%, #171c14 50%, #0b0d09 100%); display: grid; place-items: center; }
.thumb-quiniela::before { content: "0000"; font: 800 clamp(22px, 3.6vw, 44px) ui-monospace, Menlo, monospace; letter-spacing: .12em; color: #fff7d6; padding: 6% 10%; border-radius: 10px; background: rgba(0,0,0,.45); border: 2px solid #d4af37; text-shadow: 0 0 14px rgba(255,247,214,.4); box-shadow: 0 14px 30px rgba(0,0,0,.6); }
.thumb-bingo { background: radial-gradient(circle at 50% 0%, #3a2a5a 0%, #1c1630 50%, #0b0814 100%); display: flex; align-items: center; justify-content: center; gap: 4%; }
.thumb-bingo::before, .thumb-bingo::after, .thumb-bingo i { content: "7"; width: 22%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; font: 800 clamp(14px, 2.2vw, 24px) Inter, sans-serif; color: #fff; box-shadow: 0 10px 24px rgba(0,0,0,.6), inset 0 -4px 8px rgba(0,0,0,.2); }
.thumb-bingo::before { background: radial-gradient(circle at 35% 30%, #9cc3ff, #2f6fe4); } .thumb-bingo i { content: "23"; background: radial-gradient(circle at 35% 30%, #ff9aa5, #d7263d); display: grid; place-items: center; font: 800 clamp(14px, 2.2vw, 24px) Inter, sans-serif; } .thumb-bingo i::before { content: "23"; } .thumb-bingo::after { content: "61"; background: radial-gradient(circle at 35% 30%, #ffe08a, #f5b400); color: #111; }
.thumb-scratch { background: radial-gradient(circle at 50% 0%, #6b1d1d 0%, #3a1010 50%, #1a0b0b 100%); display: grid; place-items: center; }
.thumb-scratch::before { content: ""; width: 44%; aspect-ratio: 4 / 5; border-radius: 8%; background: linear-gradient(135deg, #c9c9cf, #f2f2f5 35%, #aeb0b8 50%, #e6e6ea 70%, #9a9ca6), #fdf6e3; background-size: 70% 60%, 100% 100%; background-repeat: no-repeat; background-position: 50% 60%, 0 0; box-shadow: 0 16px 34px rgba(0,0,0,.6), inset 0 0 0 3px #fff, inset 0 0 0 4px #d4af37; transform: rotate(-6deg); }
.thumb-scratch::after { content: "★ ★ ★"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-6deg); font: 800 clamp(12px, 1.8vw, 18px) Inter, sans-serif; color: #d4af37; letter-spacing: .1em; text-shadow: 0 0 10px rgba(212,175,55,.8); }

.thumb-dt { background: radial-gradient(circle at 50% 10%, #1b3a5c 0%, #0e2238 50%, #07101c 100%); display: flex; align-items: center; justify-content: center; gap: 8%; }
.thumb-dt::before, .thumb-dt::after { content: "K"; width: 17%; aspect-ratio: 5 / 7; border-radius: 6%; background: linear-gradient(160deg, #fff, #efeee8); border: 1px solid #cfcbbd; display: grid; place-items: center; font: 800 clamp(16px, 2.4vw, 26px) Inter, sans-serif; color: #c1121f; box-shadow: 0 0 0 3px #d7263d, 0 12px 28px rgba(0,0,0,.55); transform: rotate(-8deg); }
.thumb-dt::after { content: "4"; color: #161616; box-shadow: 0 0 0 3px #f59e0b, 0 12px 28px rgba(0,0,0,.55); transform: rotate(8deg); }

.thumb-ab { background: radial-gradient(circle at 50% 10%, #5a3a12 0%, #2e1c08 50%, #120c06 100%); display: flex; align-items: center; justify-content: center; gap: 3%; }
.thumb-ab::before, .thumb-ab::after, .thumb-ab > i { content: "9"; width: 14%; aspect-ratio: 5 / 7; border-radius: 6%; background: linear-gradient(160deg, #fff, #efeee8); border: 1px solid #cfcbbd; display: grid; place-items: center; font: 800 clamp(13px, 2vw, 22px) Inter, sans-serif; color: #161616; box-shadow: 0 10px 24px rgba(0,0,0,.55); }
.thumb-ab::before { transform: translateX(-30%) rotate(-8deg); box-shadow: 0 0 0 3px #2f6fe4, 0 10px 24px rgba(0,0,0,.55); }
.thumb-ab > i::before { content: "9"; }
.thumb-ab > i { font-style: normal; color: #c1121f; transform: translateY(-12%) scale(1.1); box-shadow: 0 0 0 3px #d4af37, 0 10px 24px rgba(0,0,0,.55); }
.thumb-ab::after { content: "5"; color: #c1121f; transform: translateX(30%) rotate(8deg); box-shadow: 0 0 0 3px #d7263d, 0 10px 24px rgba(0,0,0,.55); }

.thumb-craps { background: radial-gradient(circle at 50% 20%, #157a49 0%, #0f5132 50%, #061a10 100%); display: flex; align-items: center; justify-content: center; gap: 6%; }
.thumb-craps::before, .thumb-craps::after { content: ""; width: 17%; aspect-ratio: 1; border-radius: 16%; background: radial-gradient(circle at 26% 26%, #fff 0 10%, transparent 11%), radial-gradient(circle at 74% 74%, #fff 0 10%, transparent 11%), radial-gradient(circle at 50% 50%, #fff 0 10%, transparent 11%), linear-gradient(160deg, #e8253a, #a80f1f); box-shadow: 0 10px 24px rgba(0,0,0,.6), inset 0 0 0 1px #7a0a16; transform: rotate(-12deg); }
.thumb-craps::after { background: radial-gradient(circle at 26% 26%, #fff 0 10%, transparent 11%), radial-gradient(circle at 74% 26%, #fff 0 10%, transparent 11%), radial-gradient(circle at 26% 74%, #fff 0 10%, transparent 11%), radial-gradient(circle at 74% 74%, #fff 0 10%, transparent 11%), linear-gradient(160deg, #e8253a, #a80f1f); transform: rotate(10deg) translateY(-8%); }

.thumb-chicken { background: linear-gradient(90deg, #8d99ae 0 12%, #3a3f47 12% 100%); position: relative; }
.thumb-chicken::before { content: ""; position: absolute; left: 36%; top: 0; bottom: 0; width: 3px; background: repeating-linear-gradient(180deg, #f1f3f5 0 10px, transparent 10px 20px); box-shadow: 24% 0 0 #f1f3f5; opacity: .7; }
.thumb-chicken::after { content: ""; position: absolute; left: 22%; top: 50%; width: 15%; aspect-ratio: 1; transform: translateY(-50%); border-radius: 50% 50% 45% 45%; background: radial-gradient(circle at 60% 40%, #fff, #e9ecef); box-shadow: 0 10px 20px rgba(0,0,0,.5), inset -4px -4px 0 #d7dce3; }
.thumb-chicken > i::before { content: "2.25×"; }
.thumb-chicken > i { position: absolute; right: 12%; top: 50%; transform: translateY(-50%); font: 800 clamp(14px, 2vw, 22px) Inter, sans-serif; color: #ffd166; text-shadow: 0 0 14px rgba(255,209,102,.7); font-style: normal; }

.thumb-tower { background: radial-gradient(circle at 50% 100%, #2a2f6e 0%, #171c3e 50%, #0b0e1a 100%); display: grid; place-items: center; }
.thumb-tower::before { content: ""; width: 42%; height: 66%; background-image: linear-gradient(180deg, #3b4472, #262c52); background-size: 30% 20%; background-clip: content-box;
  -webkit-mask: repeating-linear-gradient(90deg, #000 0 28%, transparent 28% 36%), repeating-linear-gradient(0deg, #000 0 16%, transparent 16% 20%); -webkit-mask-composite: source-in; mask: repeating-linear-gradient(90deg, #000 0 28%, transparent 28% 36%), repeating-linear-gradient(0deg, #000 0 16%, transparent 16% 20%); mask-composite: intersect; }
.thumb-tower::after { content: ""; position: absolute; left: 50%; bottom: 20%; width: 10%; aspect-ratio: 1; transform: translateX(-50%); background: linear-gradient(135deg, #d9fbff, #4de3ff 45%, #0e7c9e); clip-path: polygon(25% 0, 75% 0, 100% 35%, 50% 100%, 0 35%); filter: drop-shadow(0 0 12px rgba(77,227,255,.9)); }

/* En móvil el juego crece más que la pantalla: los modales se fijan al viewport, no al juego */
@media (max-width: 860px) {
  .game-host .modal:not([hidden]), .game-host .sl-modal:not([hidden]) { position: fixed; }
}
@media (max-width: 720px) {
  .game-card { contain-intrinsic-size: auto 235px; }
  body { overflow: auto; }
  #shell { height: auto; min-height: 100%; }
  #view { overflow: visible; }
  .shell-header { gap: 10px; padding: 8px 12px; flex-wrap: wrap; }
  .shell-title { display: none; }
  .wallet b { font-size: 15px; }
  .lobby { padding: 10px 16px 32px; }
  .hero { aspect-ratio: 16 / 9; border-radius: 14px; margin-bottom: 16px; }
  .hero-corner { width: 22px; height: 22px; top: 8px; left: 8px; }
  .hero-corner.tr, .hero-corner.br { left: auto; right: 8px; }
  .hero-corner.bl, .hero-corner.br { top: auto; bottom: 8px; }
  .perks { grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 22px; }
  .perks li { padding: 10px 12px; }
  .perks li small { display: none; }
  .perk-ico { width: 30px; height: 30px; font-size: 14px; }
  .lobby-head h1 .orn { flex-basis: 40px; }
  .cats button { padding: 7px 11px; font-size: 10px; }
  .lobby-foot { flex-direction: column; gap: 8px; text-align: center; }
  .game-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .card-body { padding: 10px 11px 11px; }
  .card-body h2 { font-size: 13px; }
  .card-body p { font-size: 11px; }
}

/* ---------- acceso y estado conectado ---------- */
.shell-user { font-size: 12px; color: var(--muted); letter-spacing: .04em; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shell-user.link { cursor: pointer; text-decoration: underline dotted rgba(212,175,55,.6); text-underline-offset: 3px; } .shell-user.link:hover { color: var(--gold-2); }
/* hidden, no auto: .auth crece con la tarjeta (scrollea #view); con auto, el fondo agrandado por el scale() daba barras fantasma. */
.auth { min-height: 100%; display: grid; place-items: center; padding: 32px 20px; overflow: hidden; position: relative; isolation: isolate; }
.auth::before { content: ""; position: absolute; inset: 0; z-index: -2; background: url("../images/lobby/portada2.webp") center / cover no-repeat; filter: blur(3px) saturate(1.1); transform: scale(1.04); }
.auth::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(800px 500px at 50% 40%, rgba(212,175,55,.14), transparent 70%), linear-gradient(180deg, rgba(11,13,18,.72), rgba(11,13,18,.9)); }
.auth-card { position: relative; width: min(400px, 100%); background: rgba(14,17,24,.78); border: 1px solid rgba(212,175,55,.4); border-radius: 20px; padding: 30px 30px 26px; display: grid; gap: 14px; box-shadow: 0 40px 80px rgba(0,0,0,.6), inset 0 0 0 1px rgba(255,255,255,.03), 0 0 60px rgba(212,175,55,.08); }
.auth-card::before { content: ""; position: absolute; left: 24px; right: 24px; top: -1px; height: 2px; background: linear-gradient(90deg, transparent, var(--gold-2), transparent); }
.auth-logo { width: 130px; height: 130px; justify-self: center; margin: -6px 0 0; filter: drop-shadow(0 8px 22px rgba(212,175,55,.4)); }
.auth-card h1 { text-align: center; font-family: Cinzel, serif; font-size: 20px; letter-spacing: .1em; color: var(--gold-2); text-shadow: 0 0 20px rgba(212,175,55,.25); }
.auth-card > p { text-align: center; color: var(--muted); font-size: 13px; margin-top: -6px; }
.auth-card > p::after { content: ""; display: block; width: 60px; height: 1px; margin: 14px auto 0; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.auth-card p { color: var(--muted); font-size: 13px; }
.auth-card label[hidden] { display: none; }
.auth-card label { display: grid; gap: 6px; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.auth-card input { font: inherit; font-size: 15px; letter-spacing: 0; text-transform: none; color: var(--text); background: rgba(0,0,0,.4); border: 1px solid rgba(212,175,55,.25); border-radius: 10px; padding: 12px 13px; outline: none; user-select: text; -webkit-user-select: text; transition: border-color .15s ease, box-shadow .15s ease; }
.auth-card input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212,175,55,.18); }
.auth-error { color: #ff9b9b; font-size: 12px; min-height: 16px; text-align: center; }
.auth-card .btn-primary { position: relative; overflow: hidden; font: inherit; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; font-size: 12px; padding: 14px; border-radius: 10px; border: 0; cursor: pointer; color: #2b1d02; background: linear-gradient(180deg, #f7e39a, #d4af37 55%, #a8861f); box-shadow: 0 6px 20px rgba(212,175,55,.3); transition: transform .12s ease, box-shadow .12s ease; }
.auth-card .btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(212,175,55,.4); }
.auth-card .btn-primary::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.35) 50%, transparent 65%); transform: translateX(-120%); }
.auth-card .btn-primary:hover::after { animation: shine .7s ease forwards; }
.auth-card .btn-primary:disabled { opacity: .6; cursor: progress; }
.auth-card small { color: var(--muted); font-size: 11px; text-align: center; }
.auth-card small a { color: var(--gold-2); }
.auth-foot { position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: rgba(143,151,166,.7); }
.auth-error { min-height: 16px; color: #ff8a8a; font-size: 12px; }
.game-card.disabled { opacity: .45; cursor: not-allowed; filter: saturate(.4); }
.game-card .badge { position: absolute; top: 10px; right: 10px; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; background: rgba(0,0,0,.65); border: 1px solid var(--line); color: var(--gold-2); padding: 4px 8px; border-radius: 999px; }
.game-card .thumb { position: relative; }

/* ---------- Lobby 2026: evolución visual sin afectar las mesas ---------- */
body {
  background:
    radial-gradient(900px 520px at 12% -10%, rgba(21, 83, 65, .24), transparent 62%),
    radial-gradient(760px 460px at 92% 4%, rgba(123, 28, 43, .16), transparent 66%),
    #090b0e;
}
.shell-header {
  min-height: 68px;
  padding: 9px clamp(14px, 2.4vw, 34px);
  gap: 16px;
  border-bottom-color: rgba(226, 197, 105, .2);
  /* Casi opaco: sin el desenfoque de atrás, el lobby que pasa por debajo al scrollear se leía a través. */
  background: rgba(9, 11, 14, .95);
  box-shadow: 0 12px 38px rgba(0, 0, 0, .28);
  position: relative;
  z-index: 20;
  /* App instalada (iPhone/iPad, "Agregar a inicio"): la hora y la batería quedan encima de la página
     (black-translucent en index.html). Este borde transparente deja ese hueco sin tocar el padding de
     cada tamaño, y el fondo del encabezado se pinta debajo, así la barra toma su color.
     En Safari común y en la compu env() da 0 y no cambia nada. */
  border-top: env(safe-area-inset-top, 0px) solid transparent;
}
.brand { letter-spacing: .12em; }
.brand-logo { width: 46px; height: 46px; }
.wallet {
  min-height: 42px;
  padding: 5px 5px 5px 15px;
  border-radius: 10px;
  border-color: rgba(226, 197, 105, .3);
  background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.018));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.wallet b { color: #f3e5ae; }
.icon-btn { border-radius: 10px; transition: background .2s ease, transform .2s ease, border-color .2s ease; }
.icon-btn:active, .ghost:active { transform: translateY(1px); }
.sound-bars { width: 18px; height: 16px; display: flex; align-items: center; justify-content: center; gap: 2px; }
.sound-bars i { display: block; width: 2px; border-radius: 2px; background: currentColor; transition: height .2s ease, opacity .2s ease; }
.sound-bars i:nth-child(1) { height: 7px; }
.sound-bars i:nth-child(2) { height: 14px; }
.sound-bars i:nth-child(3) { height: 10px; }
.sound-toggle.is-muted .sound-bars i { height: 2px; opacity: .55; }
/* Botón de música, al lado del de sonido: misma caja y trazo fino dorado. Apagada: nota tenue y tachada.
   El tachado lleva debajo una línea del color de la barra para que no se pegue a la nota. */
.music-note { width: 18px; height: 16px; display: block; overflow: visible; }
.music-note path { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.music-note circle { fill: currentColor; }
.music-note > path, .music-note > circle { transition: opacity .2s ease; }
.music-note .music-slash { opacity: 0; transition: opacity .2s ease; }
.music-note .music-slash-gap { stroke: #0b0d12; stroke-width: 3.6; }
.music-toggle.is-muted .music-note > path, .music-toggle.is-muted .music-note > circle { opacity: .55; }
.music-toggle.is-muted .music-slash { opacity: 1; }

.lobby { max-width: 1500px; padding: 20px clamp(18px, 3vw, 44px) 44px; }
.ticker { margin-bottom: 14px; border-top: 0; background: transparent; }
.ticker-track { padding: 6px 0; }
.ticker-track span { color: #b9b7b0; font-family: Inter, sans-serif; font-size: 9px; font-weight: 700; }
.ticker-track i { color: #d6ba58; }

.hero {
  min-height: 390px;
  max-height: 540px;
  aspect-ratio: 16 / 5.2;
  border-radius: 8px;
  border-color: rgba(226, 197, 105, .28);
  margin-bottom: 0;
  box-shadow: 0 30px 80px rgba(0,0,0,.52);
}
.hero-slide { object-position: center; transform: scale(1.015); transition: opacity .9s ease, transform 7s ease; }
.hero-slide.on { transform: scale(1); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(5,8,9,.93) 0%, rgba(5,8,9,.67) 34%, rgba(5,8,9,.08) 67%), linear-gradient(0deg, rgba(5,8,9,.48), transparent 50%); pointer-events: none; }
.hero::after { z-index: 1; background: linear-gradient(180deg, transparent 55%, rgba(5,8,9,.45)); }
.hero-copy { position: absolute; z-index: 3; left: clamp(28px, 5vw, 78px); top: 50%; transform: translateY(-50%); width: min(470px, 45%); }
.hero-kicker { display: inline-block; margin-bottom: 14px; color: #e1c66e; font-size: 10px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.hero-copy h1 { max-width: 440px; color: #f3f0e9; font: 700 clamp(34px, 4.2vw, 62px)/1.03 Cinzel, Georgia, serif; letter-spacing: 0; text-shadow: 0 4px 30px rgba(0,0,0,.6); }
.hero-copy p { max-width: 390px; margin-top: 14px; color: #d1d1cc; font-size: clamp(13px, 1.15vw, 16px); line-height: 1.55; }
.hero-actions { display: flex; align-items: center; gap: 11px; margin-top: 23px; }
.hero-actions a { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 18px; border-radius: 6px; text-decoration: none; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; transition: transform .2s ease, background .2s ease, border-color .2s ease; }
.hero-actions a:active { transform: translateY(1px); }
.hero-play { gap: 12px; color: #201702; background: #dec15f; box-shadow: 0 10px 24px rgba(0,0,0,.32); }
.hero-play:hover { background: #f0d77e; }
.hero-play span { font-size: 20px; line-height: 1; }
.hero-browse { color: #f1eee7; border: 1px solid rgba(255,255,255,.32); background: rgba(8,10,12,.5); }
.hero-browse:hover { border-color: rgba(226,197,105,.75); background: rgba(8,10,12,.62); }
.hero-corner { z-index: 2; width: 28px; height: 28px; opacity: .62; border-width: 1px; filter: none; }
.hero-dots { left: auto; right: 24px; bottom: 20px; }
.hero-dots button { border-radius: 1px; height: 3px; width: 24px; border: 0; background: rgba(255,255,255,.35); }
.hero-dots button.on { width: 38px; border-radius: 1px; background: #dec15f; }

.perks { display: flex; gap: 0; margin: 0 0 48px; border: 1px solid rgba(226,197,105,.18); border-top: 0; background: rgba(14,18,18,.78); }
.perks li { flex: 1; min-width: 0; border: 0; border-right: 1px solid rgba(226,197,105,.14); border-radius: 0; background: transparent; padding: 14px 18px; }
.perks li:last-child { border-right: 0; }
.perks li b { font-family: Inter, sans-serif; font-size: 11px; letter-spacing: .04em; color: #ebe8df; }
.perks li small { color: #8e9691; font-size: 10px; }
.perk-ico {
  border-radius: 6px;
  border: 1px solid rgba(226,197,105,.34);
  color: #f0d77e;
  background: rgba(226,197,105,.1);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 0 14px rgba(226,197,105,.12);
  font-family: Georgia, serif;
  font-weight: 700;
  text-shadow: 0 0 8px rgba(226,197,105,.38);
}

.lobby-head { margin-bottom: 20px; text-align: left; }
.lobby-head h2 { color: #f0ede6; font: 700 clamp(22px, 2.4vw, 31px)/1.1 Cinzel, Georgia, serif; letter-spacing: .02em; }
.lobby-head p { margin-top: 7px; }
.cats { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-top: 18px; padding-bottom: 2px; }
.cats::-webkit-scrollbar { display: none; }
.cats button { flex: 0 0 auto; border-radius: 6px; padding: 9px 14px; letter-spacing: .08em; background: rgba(255,255,255,.025); }
.cats button.on { color: #1d1707; background: #dec15f; box-shadow: none; }

.game-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.game-card { border-radius: 7px; border-color: rgba(255,255,255,.1); background: #12161a; box-shadow: 0 12px 30px rgba(0,0,0,.22); transition: transform .25s cubic-bezier(.16,1,.3,1), border-color .25s ease, box-shadow .25s ease; }
.game-card:hover { transform: translateY(-5px); border-color: rgba(226,197,105,.62); box-shadow: 0 22px 46px rgba(0,0,0,.48); }
.game-card.featured:first-child { grid-column: span 2; grid-row: span 2; grid-template-rows: minmax(0, 1fr) auto; }
.game-card.featured:first-child .thumb { width: 100%; height: 100%; min-height: 360px; aspect-ratio: auto; }
.game-card.featured:first-child .card-body { padding: 18px 20px 20px; }
.game-card.featured:first-child .card-body h2 { font-size: 20px; }
.game-card.featured:first-child .card-body p { max-width: 38ch; }
.thumb { aspect-ratio: 4 / 3; }
.thumb-art::after { content: ""; position: absolute; inset: auto 0 0; height: 45%; background: linear-gradient(transparent, rgba(7,9,11,.58)); pointer-events: none; }
.thumb .tag { z-index: 2; border-radius: 4px; border-color: rgba(255,255,255,.2); color: #f2eee5; background: rgba(7,9,11,.68); }
.card-body { min-height: 122px; padding: 13px 14px 14px; gap: 5px; }
.card-body h2 { color: #f2eee6; font-size: 14px; letter-spacing: .04em; }
.card-body p { min-height: 34px; color: #929a9e; font-size: 11.5px; }
.game-card .play { width: 100%; justify-self: stretch; display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding: 8px 0 0; border-top: 1px solid rgba(255,255,255,.08); border-radius: 0; color: #dcc364; background: transparent; box-shadow: none; }
.game-card .play i { font: normal 18px/1 Inter, sans-serif; }
.game-card:hover .play { background: transparent; box-shadow: none; color: #f0d77e; }
.game-card::after { display: none; }
.game-card-link { display: contents; color: inherit; text-decoration: none; }
.favorite-toggle {
  position: absolute;
  top: 9px;
  left: 9px;
  z-index: 4;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 6px;
  color: rgba(255,255,255,.72);
  background: rgba(6,8,10,.8);
  box-shadow: 0 4px 14px rgba(0,0,0,.35);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  transition: color .15s ease, background .15s ease, transform .15s ease;
}
.favorite-toggle:hover { color: #f3dc81; background: rgba(16,18,20,.9); }
.favorite-toggle:active { transform: scale(.92); }
.favorite-toggle.on { color: #241b06; border-color: #f0d77e; background: #dec15f; }
.favorite-toggle.loading { cursor: progress; }
.favorite-toggle.loading::after {                     /* anillo mientras el servidor confirma */
  content: ""; position: absolute; inset: -3px; border-radius: 8px;
  border: 2px solid transparent; border-top-color: #f0d77e;
  animation: fav-spin .7s linear infinite;
}
.favorite-toggle.pop { animation: fav-pop .32s cubic-bezier(.2,.9,.3,1.4); }
@keyframes fav-spin { to { transform: rotate(360deg); } }
@keyframes fav-pop { 0% { transform: scale(.8); } 55% { transform: scale(1.18); } 100% { transform: scale(1); } }
.lobby-toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 60;
  transform: translateX(-50%); max-width: min(420px, calc(100vw - 32px));
  padding: 11px 16px; border: 1px solid rgba(240,215,126,.35); border-radius: 8px;
  color: #f2eee6; background: rgba(12,14,16,.95); box-shadow: 0 10px 30px rgba(0,0,0,.45);
  font-size: 13px; text-align: center;
}
.mobile-nav { display: none; }
.lobby-break {
  position: relative;
  grid-column: 1 / -1;
  height: clamp(170px, 14vw, 220px);
  display: block;
  overflow: hidden;
  border: 1px solid rgba(226,197,105,.22);
  border-radius: 7px;
  background: #0b0e10;
  box-shadow: 0 18px 42px rgba(0,0,0,.38);
}
.lobby-break[hidden] { display: none; }
.lobby-break.mobile-only { display: none; }
.lobby-break img { width: 100%; height: 100%; display: block; object-fit: cover; }
.lobby-break::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5,8,10,.92) 0%, rgba(5,8,10,.56) 42%, transparent 72%);
  pointer-events: none;
}
.lobby-break span {
  position: absolute;
  left: clamp(24px, 4vw, 58px);
  top: 50%;
  z-index: 1;
  width: min(42%, 430px);
  transform: translateY(-50%);
}
.lobby-break small { display: block; margin-bottom: 8px; color: #dec15f; font-size: 10px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.lobby-break b { display: block; color: #f2efe7; font: 700 clamp(24px, 2.5vw, 36px)/1.08 Cinzel, Georgia, serif; letter-spacing: 0; text-wrap: balance; }

@media (max-width: 1180px) {
  .game-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hero { min-height: 350px; }
}
@media (max-width: 900px) {
  .game-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .perks { display: grid; grid-template-columns: 1fr 1fr; }
  .perks li:nth-child(2) { border-right: 0; }
  .perks li:nth-child(-n+2) { border-bottom: 1px solid rgba(226,197,105,.14); }
}
@media (min-width: 721px) and (max-width: 1024px) {
  .shell-header { gap: 12px; padding-inline: 14px; }
  .brand { gap: 8px; font-size: 13px; letter-spacing: .12em; }
  .brand small { letter-spacing: .18em; font-size: 8px; }
  .wallet { gap: 7px; padding-left: 11px; }
  .wallet b { font-size: 16px; }
  .lobby { padding: 14px 18px 36px; }
  .hero { min-height: 260px; aspect-ratio: 16 / 5.8; margin-bottom: 18px; border-radius: 10px; }
  .hero-copy { left: 34px; width: min(410px, 52%); }
  .hero-copy h1 { font-size: clamp(34px, 5vw, 46px); }
  .perks { gap: 0; margin-bottom: 24px; }
  .perks li { padding: 12px 14px; }
  .cats { gap: 7px; margin-top: 14px; }
  .cats button { padding-inline: 12px; font-size: 10px; letter-spacing: .06em; }
  .game-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
  .game-card { border-radius: 7px; contain-intrinsic-size: auto 248px; }
  .thumb { aspect-ratio: 16 / 11; }
  .card-body { min-height: 104px; padding: 11px 12px 12px; }
  .card-body h2 { font-size: 13px; letter-spacing: .02em; }
  .card-body p { min-height: 32px; font-size: 10.5px; line-height: 1.42; }
  .game-card .play { padding-top: 7px; font-size: 9px; letter-spacing: .12em; }
  .lobby-break:not([hidden]) { height: 148px; border-radius: 7px; }
  .lobby-break span { left: 26px; width: min(46%, 330px); }
  .lobby-break b { font-size: clamp(21px, 3vw, 28px); }
}
@media (min-width: 721px) and (max-width: 900px) and (orientation: portrait) {
  .shell-header { min-height: 54px; }
  .brand-logo { width: 38px; height: 38px; }
  .brand span { max-width: 138px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .brand small { display: none; }
  .shell-title, .shell-user { display: none; }
  .wallet span, .wallet i { display: none; }
  .hero { aspect-ratio: 16 / 6.8; min-height: 230px; }
  .hero-copy { left: 28px; width: min(430px, 64%); }
  .hero-copy p { font-size: 13px; line-height: 1.45; }
  .perks li small { display: none; }
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .game-card.featured:first-child {
    grid-column: span 2;
    grid-row: auto;
    grid-template-rows: auto 1fr;
  }
  .game-card.featured:first-child .thumb {
    min-height: 0;
    aspect-ratio: 16 / 7;
  }
  .game-card.featured:first-child .card-body { padding: 13px 15px 14px; }
  .game-card.featured:first-child .card-body h2 { font-size: 17px; }
  .thumb { aspect-ratio: 4 / 3; }
  .card-body { min-height: 96px; }
  .lobby-break:not([hidden]) { height: 132px; }
}
@media (max-width: 720px), (orientation: landscape) and (max-height: 600px) and (max-width: 1200px) {
  .shell-header { min-height: 60px; flex-wrap: nowrap; padding: 7px 12px; gap: 8px; }
  .brand-logo { width: 42px; height: 42px; }
  .brand span { font-size: 12px; }
  .brand small, .shell-user { display: none; }
  .wallet { margin-left: auto; min-height: 38px; padding-left: 10px; gap: 6px; }
  .wallet span { display: none; }
  .wallet i { display: none; }
  .wallet b { font-size: 14px; }
  .icon-btn { width: 36px; height: 36px; }
  .lobby { padding: 8px 12px 30px; }
  .ticker { display: none; }
  .hero { min-height: 390px; aspect-ratio: 4 / 5; border-radius: 7px; }
  .hero-slide { object-position: 58% center; }
  .hero::before { background: linear-gradient(0deg, rgba(5,8,9,.94) 0%, rgba(5,8,9,.64) 46%, rgba(5,8,9,.08) 78%); }
  .hero-copy { left: 22px; right: 22px; top: auto; bottom: 34px; width: auto; transform: none; }
  .hero-kicker { margin-bottom: 9px; font-size: 8px; }
  .hero-copy h1 { font-size: clamp(30px, 9vw, 42px); }
  .hero-copy p { margin-top: 9px; font-size: 12px; }
  .hero-actions { margin-top: 16px; }
  .hero-actions a { min-height: 39px; padding: 0 13px; font-size: 9px; }
  .hero-dots { top: 18px; right: 18px; bottom: auto; }
  .hero-corner { display: none; }
  .perks { margin-bottom: 34px; }
  .perks li { padding: 11px; }
  .perks li small { display: block; font-size: 9px; }
  .lobby-head { margin-bottom: 16px; }
  .cats { margin-top: 14px; margin-right: -12px; padding-right: 12px; }
  .cats button { padding: 8px 11px; font-size: 9px; }
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .game-card.featured:first-child { grid-column: span 2; grid-row: auto; grid-template-rows: auto 1fr; }
  .game-card.featured:first-child .thumb { min-height: 220px; }
  .game-card.featured:first-child .card-body h2 { font-size: 17px; }
  .thumb { aspect-ratio: 1; }
  .card-body { min-height: 112px; padding: 10px 11px 11px; }
  .card-body p { font-size: 10px; line-height: 1.35; }
  .game-card .play { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .thumb-art::before { animation: none; }
  .hero-slide, .game-card, .thumb-art img, .hero-actions a { transition: none; }
  .ticker-track { animation: none; }
  .favorite-toggle.pop { animation: none; }
  .favorite-toggle.loading::after { animation-duration: 2s; }
}

/* ---------- Experiencia móvil prioritaria ---------- */
@media (max-width: 720px), (max-height: 600px) and (max-width: 1200px) {
  /* + el hueco de la barra de la hora cuando está instalada como app (ver .shell-header, "App instalada"). */
  html { height: auto; min-height: 100%; scroll-padding-top: calc(70px + env(safe-area-inset-top, 0px)); }
  body {
    min-width: 0;
    min-height: 100dvh;
    overflow-x: hidden;
    /* Celular acostado (ancho > 720): sin esto quedaba el overflow:hidden de escritorio y el lobby no bajaba. */
    overflow-y: auto;
    background: #090b0e;
  }
  #shell { min-height: 100dvh; grid-template-rows: auto 1fr; }
  /* overflow visible: scrollea la página y no #view, así el encabezado queda pegado arriba también acostado
     (jugando, game-polish.css lo vuelve a cerrar con body[data-playing]). */
  #view { min-width: 0; overflow: visible; padding-bottom: calc(66px + env(safe-area-inset-bottom)); }

  .shell-header {
    position: sticky;
    top: 0;
    min-width: 0;
    min-height: 58px;
    padding: 6px max(10px, env(safe-area-inset-right)) 6px max(10px, env(safe-area-inset-left));
    gap: 7px;
    flex-wrap: nowrap;
    background: rgba(9, 11, 14, .96);
    border-bottom-color: rgba(255,255,255,.09);
  }
  .brand { flex: 0 0 auto; gap: 0; min-width: 38px; }
  .brand span { display: none; }
  .brand-logo { width: 38px; height: 38px; }
  .shell-title { display: none; }
  .shell-user { display: none; }
  .wallet {
    order: 2;
    min-width: 0;
    min-height: 42px;
    margin-left: auto;
    padding: 4px 5px 4px 11px;
    border-radius: 7px;
  }
  .wallet span { display: none; }
  .wallet i { display: none; }
  .wallet b { max-width: 110px; overflow: hidden; text-overflow: ellipsis; font-size: 14px; white-space: nowrap; }
  .wallet .ghost { width: 32px; height: 32px; min-width: 32px; }
  .shell-header > .ghost { min-height: 42px; padding: 0 10px; border-radius: 7px; font-size: 11px; }
  #nav-back { order: 0; white-space: nowrap; }
  #btn-logout { order: 3; }
  .icon-btn { order: 4; width: 42px; height: 42px; min-width: 42px; border-radius: 7px; }

  .lobby {
    width: 100%;
    max-width: none;
    padding: 8px 10px calc(28px + env(safe-area-inset-bottom));
    overflow: clip;
  }
  .lobby::before, .ticker { display: none; }

  .hero {
    width: 100%;
    min-height: 0;
    max-height: none;
    height: 218px;
    aspect-ratio: auto;
    border-radius: 6px;
    box-shadow: 0 14px 36px rgba(0,0,0,.42);
  }
  .hero-slide { object-position: center; }
  .hero::before { background: linear-gradient(90deg, rgba(5,8,9,.88), rgba(5,8,9,.32) 70%, rgba(5,8,9,.08)); }
  .hero::after { background: linear-gradient(0deg, rgba(5,8,9,.48), transparent 55%); }
  .hero-copy {
    left: 16px;
    right: auto;
    top: 50%;
    bottom: auto;
    width: min(72%, 270px);
    transform: translateY(-50%);
  }
  .hero-kicker, .hero-copy p, .hero-actions a.hero-browse { display: none; }
  .hero-copy h1 { max-width: 230px; font-size: clamp(24px, 7.4vw, 30px); line-height: 1.08; }
  .hero-actions { margin-top: 14px; }
  .hero-actions a {
    min-width: 0;
    min-height: 44px;
    padding: 0 15px;
    border-radius: 6px;
    font-size: 10px;
  }
  .hero-dots { top: auto; right: 12px; bottom: 11px; gap: 5px; }
  .hero-dots button { width: 18px; height: 4px; min-height: 4px; }
  .hero-dots button.on { width: 28px; }

  .perks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin: 0 0 22px;
    border-color: rgba(255,255,255,.08);
    background: #101417;
  }
  .perks li { min-width: 0; padding: 9px 10px; border-color: rgba(255,255,255,.07); }
  .perks li:nth-child(2), .perks li:nth-child(4) { display: none; }
  .perks li:nth-child(1) { border-bottom: 0; }
  .perks li:nth-child(3) { border-right: 0; }
  .perks li b { overflow: hidden; text-overflow: ellipsis; font-size: 10px; white-space: nowrap; }
  .perks li small { display: none; }
  .perk-ico { width: 28px; height: 28px; font-size: 12px; }

  .lobby-head { margin: 0 0 10px; }
  .lobby-head h2 { font-size: 21px; }
  .lobby-head p { margin-top: 4px; font-size: 11px; line-height: 1.4; }
  .cats {
    position: sticky;
    /* Pegada justo debajo del encabezado, que como app instalada es más alto por la barra de la hora. */
    top: calc(58px + env(safe-area-inset-top, 0px));
    z-index: 12;
    width: auto;
    margin: 11px -10px 0;
    padding: 8px 10px;
    gap: 7px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    background: rgb(9,11,14);
    border-top: 1px solid rgba(255,255,255,.06);
    border-bottom: 1px solid rgba(255,255,255,.08);
  }
  .cats button {
    min-height: 42px;
    padding: 0 13px;
    scroll-snap-align: start;
    border-radius: 6px;
    font-size: 9px;
    letter-spacing: .06em;
  }

  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .lobby-break:not([hidden]) {
    height: 138px;
    border-radius: 6px;
    box-shadow: 0 10px 24px rgba(0,0,0,.34);
  }
  .lobby-break.desktop-only { display: none; }
  .lobby-break.mobile-only:not([hidden]) { display: block; }
  .lobby-break::after {
    background: linear-gradient(90deg, rgba(5,8,10,.9) 0%, rgba(5,8,10,.52) 50%, transparent 78%);
  }
  .lobby-break span {
    left: 15px;
    width: min(58%, 210px);
  }
  .lobby-break small { display: block; margin-bottom: 6px; color: #dec15f; font-size: 8px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
  .lobby-break b { display: block; color: #f2efe7; font: 700 18px/1.12 Cinzel, Georgia, serif; letter-spacing: 0; text-wrap: balance; }
  .game-card,
  .game-card.featured:first-child {
    grid-column: auto;
    grid-row: auto;
    grid-template-rows: auto 1fr;
    min-width: 0;
    border-radius: 6px;
    box-shadow: 0 7px 18px rgba(0,0,0,.3);
  }
  .game-card:active { transform: scale(.985); border-color: rgba(226,197,105,.6); }
  .favorite-toggle { top: 6px; left: 6px; width: 38px; height: 38px; font-size: 17px; }
  .thumb,
  .game-card.featured:first-child .thumb {
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 1;
  }
  .thumb .tag { display: none; }
  .card-body,
  .game-card.featured:first-child .card-body {
    min-width: 0;
    min-height: 52px;
    padding: 7px 9px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
  }
  .card-body h2,
  .game-card.featured:first-child .card-body h2 {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: Inter, system-ui, sans-serif;
    font-size: clamp(11px, 3.2vw, 13px);
    letter-spacing: 0;
  }
  .card-body p { display: none; }
  .game-card .play {
    width: 28px;
    min-width: 28px;
    height: 32px;
    margin: 0;
    padding: 0;
    justify-content: center;
    border: 0;
    font-size: 0;
  }
  .game-card .play i { font-size: 21px; }
  .game-card .badge { top: 7px; right: 7px; max-width: calc(100% - 14px); padding: 4px 6px; font-size: 8px; letter-spacing: .08em; }
  .lobby-foot { margin-top: 24px; padding: 14px 20px 0; gap: 5px; font-size: 9px; line-height: 1.5; }
  .lobby-foot span { display: none; }

  .mobile-nav:not([hidden]) {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 80;
    min-height: calc(58px + env(safe-area-inset-bottom));
    padding: 4px max(6px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(6px, env(safe-area-inset-left));
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    background: rgb(8,10,12);
    border-top: 1px solid rgba(226,197,105,.24);
    box-shadow: 0 -12px 30px rgba(0,0,0,.42);
  }
  .mobile-nav a {
    min-width: 0;
    min-height: 54px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border-radius: 6px;
    color: #838a8b;
    text-decoration: none;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .02em;
  }
  .mobile-nav a i { height: 20px; color: inherit; font: normal 18px/20px Inter, sans-serif; }
  .mobile-nav a.on { color: #e4ca6e; background: rgba(226,197,105,.09); }
  .mobile-nav a:active { background: rgba(226,197,105,.14); }
  .mobile-nav a[aria-disabled="true"] { opacity: .38; }
  .lobby-toast { bottom: calc(80px + env(safe-area-inset-bottom)); }
}

@media (max-width: 370px) {
  .shell-header { padding-left: 7px; padding-right: 7px; gap: 5px; }
  .brand-logo { width: 34px; height: 34px; }
  .wallet { padding-left: 8px; }
  .wallet b { max-width: 82px; font-size: 13px; }
  #btn-logout { width: 42px; overflow: hidden; padding: 0 8px; font-size: 0; }
  #btn-logout::before { content: "Salir"; font-size: 9px; }
  .lobby { padding-left: 8px; padding-right: 8px; }
  .hero { height: 200px; }
  .hero-copy { left: 13px; }
  .hero-copy h1 { max-width: 195px; font-size: 23px; }
  .perks, .lobby-head { margin-bottom: 18px; }
  .cats { margin-left: -8px; margin-right: -8px; padding-left: 8px; padding-right: 8px; }
  .game-grid { gap: 7px; }
  .card-body, .game-card.featured:first-child .card-body { padding: 6px 7px; }
}

@media (orientation: landscape) and (max-height: 600px) and (max-width: 1200px) {
  .shell-header { min-height: 52px; padding-top: 4px; padding-bottom: 4px; }
  .lobby { padding-top: 6px; }
  .hero { height: 180px; }
  .hero-copy h1 { font-size: 24px; }
  .perks { display: none; }
  .cats { top: 52px; }
  .game-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lobby-break:not([hidden]) { height: 106px; }
  .lobby-break span { width: min(46%, 300px); }
  .lobby-break b { font-size: 17px; }
  #view { padding-bottom: calc(54px + env(safe-area-inset-bottom)); }
  .mobile-nav:not([hidden]) { min-height: calc(48px + env(safe-area-inset-bottom)); grid-template-columns: repeat(4, minmax(92px, 150px)); justify-content: center; }
  .mobile-nav a { min-height: 44px; flex-direction: row; gap: 7px; font-size: 9px; }
  .mobile-nav a i { height: 18px; line-height: 18px; font-size: 15px; }
}

/* ==== Mi cuenta (jugador): movimientos, apuestas, contraseña, límites ==== */
.account { max-width: 1040px; margin: 0 auto; padding: 22px 20px 48px; }
.account-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.account-head h1 { font-family: Cinzel, serif; font-size: 22px; letter-spacing: .08em; color: var(--gold-2); }
.account-head p { color: var(--muted); font-size: 13px; margin-top: 4px; }
.account-tabs { display: flex; gap: 4px; border-bottom: 1px solid rgba(212,175,55,.25); margin-bottom: 16px; overflow-x: auto; }
.account-tabs button { background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 10px 14px; color: var(--muted); font: inherit; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; white-space: nowrap; }
.account-tabs button.on { color: var(--gold-2); border-color: var(--gold); }
.account-card { background: rgba(14,17,24,.72); border: 1px solid rgba(212,175,55,.22); border-radius: 14px; padding: 16px 18px; }
.account-card + .account-card { margin-top: 14px; }
.account-card h2 { font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: var(--gold-2); margin-bottom: 8px; }
.account-card p { color: var(--muted); font-size: 13px; line-height: 1.5; }
.account table { width: 100%; border-collapse: collapse; font-size: 13px; }
.account th { text-align: left; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid rgba(255,255,255,.08); white-space: nowrap; }
.account td { padding: 9px 10px; border-bottom: 1px solid rgba(255,255,255,.05); white-space: nowrap; }
.account tr:last-child td { border-bottom: 0; }
.account .num { text-align: right; font-variant-numeric: tabular-nums; }
.account .pos { color: #4ade80; } .account .neg { color: #f87171; }
.account .muted { color: var(--muted); }
.account .tbl-wrap { overflow: auto; }
.account .empty { color: var(--muted); text-align: center; padding: 28px; }
.account form { display: grid; gap: 12px; max-width: 420px; }
.account label { display: grid; gap: 6px; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.account input, .account select { font: inherit; font-size: 15px; letter-spacing: 0; text-transform: none; color: var(--text); background: rgba(0,0,0,.4); border: 1px solid rgba(212,175,55,.25); border-radius: 10px; padding: 11px 13px; outline: none; }
.account input:focus, .account select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212,175,55,.18); }
.account .row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.account .btn-primary { font: inherit; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; font-size: 12px; padding: 12px 18px; border-radius: 10px; border: 0; cursor: pointer; color: #2b1d02; background: linear-gradient(180deg, #f7e39a, #d4af37 55%, #a8861f); box-shadow: 0 6px 20px rgba(212,175,55,.3); }
.account .btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.account .btn-danger { font: inherit; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; padding: 11px 16px; border-radius: 10px; cursor: pointer; background: rgba(230,76,76,.12); border: 1px solid rgba(230,76,76,.45); color: #ff9b9b; }
.account .msg { font-size: 13px; min-height: 18px; } .account .msg.ok { color: #4ade80; } .account .msg.err { color: #ff9b9b; }
/* Cotizaciones (Mi cuenta → Cotizaciones) */
.account .rates-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 14px 0 10px; }
.account .rate-card { display: grid; gap: 4px; padding: 16px 18px; border-radius: 12px; border: 1px solid rgba(212,175,55,.28); background: linear-gradient(180deg, rgba(212,175,55,.08), rgba(0,0,0,.25)); }
.account .rate-card small { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.account .rate-card b { font-size: 28px; font-weight: 700; color: var(--gold-2); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.account .rate-card .muted { font-size: 12px; }
.account .rate-card dl { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.08); font-size: 13px; }
.account .rate-card dt { color: var(--muted); } .account .rate-card dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.account .rate-card.off { border-color: rgba(255,255,255,.1); background: rgba(0,0,0,.2); } .account .rate-card.off b { color: var(--muted); }
.account .rates-foot { font-size: 12px; margin-bottom: 12px; }
.account a.btn-primary { display: inline-block; text-decoration: none; }
.account .notice { border-left: 3px solid var(--gold); background: rgba(212,175,55,.08); padding: 10px 14px; border-radius: 8px; font-size: 13px; line-height: 1.5; margin-bottom: 12px; }
.account .notice.crit { border-left-color: #e64c4c; background: rgba(230,76,76,.08); }
.account .more { margin-top: 10px; }
@media (max-width: 720px) { .account { padding: 14px 12px 40px; } .account-card { padding: 14px; } }

/* ---------- Comprar fichas (Mi cuenta) ---------- */
.pay-h3 { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 16px 0 8px; }
.pay-pkgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 12px; }
.pay-pkg { position: relative; display: grid; gap: 2px; justify-items: center; padding: 14px 10px; border-radius: 12px; cursor: pointer; font: inherit; color: var(--text); background: rgba(0,0,0,.35); border: 1px solid rgba(212,175,55,.22); }
.pay-pkg b { font-size: 22px; color: var(--gold-2); font-variant-numeric: tabular-nums; }
.pay-pkg small { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.pay-pkg span { margin-top: 6px; font-size: 14px; font-variant-numeric: tabular-nums; }
.pay-pkg em { position: absolute; top: 6px; right: 8px; font-style: normal; font-size: 11px; font-weight: 700; color: #2b1d02; background: var(--gold); border-radius: 6px; padding: 1px 6px; }
.pay-pkg.on, .pay-method.on { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(212,175,55,.35) inset; background: rgba(212,175,55,.1); }
.pay-methods { display: flex; flex-wrap: wrap; gap: 8px; }
.pay-method { font: inherit; font-size: 13px; padding: 10px 14px; border-radius: 10px; cursor: pointer; color: var(--text); background: rgba(0,0,0,.35); border: 1px solid rgba(212,175,55,.22); }
.account .pay-custom { margin-top: 14px; max-width: 320px; }
.pay-total { margin: 16px 0 12px; font-size: 14px; min-height: 20px; }
.pay-total b { color: var(--gold-2); font-size: 18px; }
.pay-list { display: grid; gap: 8px; }
.pay-item { display: flex; flex-wrap: wrap; gap: 8px 14px; justify-content: space-between; align-items: center; font: inherit; font-size: 13px; color: var(--text); text-align: left; padding: 11px 13px; border-radius: 10px; cursor: pointer; background: rgba(0,0,0,.35); border: 1px solid rgba(212,175,55,.22); }
.pay-st { display: inline-block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: rgba(255,255,255,.08); color: var(--muted); white-space: nowrap; }
.pay-st.st-pending, .pay-st.st-confirming { background: rgba(212,175,55,.16); color: var(--gold-2); }
.pay-st.st-submitted { background: rgba(96,165,250,.16); color: #93c5fd; }
.pay-st.st-completed { background: rgba(74,222,128,.14); color: #4ade80; }
.pay-st.st-rejected { background: rgba(230,76,76,.14); color: #ff9b9b; }
.pay-order-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.pay-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 8px; }
/* `.account form { display: grid }` le gana al atributo hidden (el formulario de comprobante aparecía antes de tocar "Ya transferí") */
.account [hidden] { display: none !important; }
.pay-upload, .pay-upload form, .pay-upload label { min-width: 0; }
.pay-upload input[type=file] { max-width: 100%; min-width: 0; font-size: 13px; }
.pay-field { display: grid; grid-template-columns: minmax(110px, 180px) 1fr auto; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 10px; background: rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.06); }
.pay-field span { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.pay-field b { font-weight: 600; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.pay-field.big b { font-size: 20px; color: var(--gold-2); }
.pay-copy { font: inherit; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; padding: 7px 10px; border-radius: 8px; cursor: pointer; color: var(--gold-2); background: none; border: 1px solid rgba(212,175,55,.35); }
.pay-upload { margin-top: 10px; display: grid; gap: 10px; }
.pay-crypto { display: grid; grid-template-columns: 168px 1fr; gap: 14px; align-items: start; }
.pay-crypto-f { display: grid; gap: 8px; min-width: 0; }
.pay-qr { background: #fff; border-radius: 12px; padding: 6px; width: 168px; }
.pay-qr svg { display: block; width: 100%; height: auto; }
.pay-actions { margin-top: 14px; }
.pay-actions .ghost { font: inherit; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; padding: 11px 16px; border-radius: 10px; cursor: pointer; background: none; color: var(--muted); border: 1px solid rgba(255,255,255,.14); }
@media (max-width: 720px) {
  .pay-crypto { grid-template-columns: 1fr; } .pay-qr { width: 160px; }
  .pay-field { grid-template-columns: 1fr auto; } .pay-field span { grid-column: 1 / -1; }
}
.pay-wd { max-width: 560px !important; margin-top: 12px; }
.pay-wd .row label { flex: 1 1 180px; }
.pay-dest { display: grid; gap: 10px; }

/* ==========================================================================
   La barra de arriba: el saldo es lo más importante y tiene que leerse

   Dos cosas medidas en 375 px: el botón "?" seguía ocupando lugar aun con el atributo `hidden`
   (la regla .icon-btn le ganaba al display:none del navegador), y con los botones nuevos el saldo
   quedaba recortado a "$…" — 28 px de los 89 que necesita — en Mi cuenta y dentro de un juego.
   Un jugador tiene que poder ver cuánta plata tiene, siempre.
   ========================================================================== */
.shell-header [hidden] { display: none !important; }

@media (max-width: 720px), (orientation: landscape) and (max-height: 600px) and (max-width: 1200px) {
  /* El saldo no se achica: se achica lo demás. */
  .wallet { flex: 0 0 auto; }
  .wallet b { max-width: none; }
  /* Fuera del lobby, el logo no aporta (el botón "‹ Lobby" ya dice dónde estás) y libera 45 px. */
  #shell:has(#nav-back:not([hidden])) .brand { display: none; }
}
/* Celular vertical, dentro de un juego: con el botón de música ya no entraban "Salir" + "?" + música + sonido
   (medido con sesión iniciada: en 360, 375 y 390 px el botón de sonido quedaba cortado). "Salir" sigue en el
   lobby, a un toque de "‹ Lobby"; nadie cierra sesión en medio de una jugada. De costado sí entra todo. */
@media (max-width: 720px) {
  #shell:has(#nav-back:not([hidden])) #btn-logout { display: none; }
}
/* Y con saldos de 7-8 cifras ($12.500.000) en 360-375 px faltaban 10 px más: los botones "?", música y sonido
   pierden 4 px de ancho cada uno (el alto de 42 px, que es lo que importa para el dedo, no cambia). */
@media (max-width: 400px) {
  #shell:has(#nav-back:not([hidden])) .icon-btn { width: 38px; min-width: 38px; }
}

/* ==========================================================================
   HISTORIA 1.2 — tutorial "Cómo se juega"
   Cartel por juego con los pasos y una animación. Se abre solo la primera vez y queda
   a mano en el botón "?" de la barra. El texto vive en platform/core/howto.js.
   ========================================================================== */
.howto {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  background: rgba(3, 5, 8, .78);
  animation: howto-in .18s ease-out;
}
@keyframes howto-in { from { opacity: 0; } to { opacity: 1; } }
.howto-card {
  width: min(560px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(212, 175, 55, .34);
  border-radius: 16px;
  background: linear-gradient(180deg, #151a22, #0e1218);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .7);
}
.howto-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid rgba(212, 175, 55, .2);
}
.howto-head small { display: block; color: var(--muted); font-size: 9.5px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.howto-head h2 { margin-top: 5px; color: var(--gold-2); font-family: Cinzel, Georgia, serif; font-size: 20px; letter-spacing: .06em; }
.howto-x {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 10px;
  background: rgba(255, 255, 255, .05);
  color: var(--muted);
  font-size: 15px;
  cursor: pointer;
}
.howto-x:hover { color: var(--text); background: rgba(255, 255, 255, .1); }
.howto-body { padding: 14px 18px 18px; overflow: auto; overscroll-behavior: contain; }
.howto-body h3 { margin: 16px 0 6px; color: var(--gold-2); font-size: 10px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; }
.howto-body p { color: #d6dde5; font-size: 14px; line-height: 1.55; }
.howto-idea { font-size: 15px !important; }
.howto-tip { color: #b9c4cf !important; }
.howto-steps { margin: 0; padding-left: 20px; display: grid; gap: 7px; }
.howto-steps li { color: #d6dde5; font-size: 14px; line-height: 1.5; }
.howto-steps li::marker { color: var(--gold); font-weight: 700; }
.howto-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 18px max(12px, env(safe-area-inset-bottom));
  border-top: 1px solid rgba(212, 175, 55, .2);
  background: rgba(0, 0, 0, .3);
}
.howto-again { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; cursor: pointer; }
.howto-again input { width: 17px; height: 17px; accent-color: var(--gold); cursor: pointer; }
.howto-go {
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 11px;
  color: #2b1d02;
  font: 700 12px Inter, sans-serif;
  letter-spacing: .14em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #f7e39a, #d4af37 55%, #a8861f);
  box-shadow: 0 6px 20px rgba(212, 175, 55, .3);
  cursor: pointer;
}
.howto-go:hover { filter: brightness(1.06); }

/* ---- La animación de arriba: muestra el gesto del juego de un vistazo ---- */
.howto-demo {
  height: 104px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 12px;
  background: radial-gradient(120% 100% at 50% 0%, rgba(212, 175, 55, .12), rgba(0, 0, 0, .25));
  color: var(--gold-2);
}
.howto-demo > div { display: flex; align-items: center; justify-content: center; gap: 8px; }

.d-reels { gap: 6px; }
.d-reel { width: 34px; height: 76px; overflow: hidden; display: block; border: 1px solid rgba(212,175,55,.3); border-radius: 7px; background: rgba(0,0,0,.4); }
.d-reel i { display: grid; place-items: center; height: 38px; font-size: 17px; font-style: normal; animation: d-spin 1.1s cubic-bezier(.3,0,.2,1) infinite; animation-delay: calc(var(--i) * .13s); }
@keyframes d-spin { from { transform: translateY(0); } to { transform: translateY(-114px); } }

.d-wheel { position: relative; width: 78px; height: 78px; }
.d-wheel-face { position: absolute; inset: 0; border-radius: 50%; border: 3px solid rgba(212,175,55,.5); background: conic-gradient(#8f1d1d 0 25%, #12161c 0 50%, #8f1d1d 0 75%, #12161c 0); animation: d-rot 3.4s linear infinite; }
.d-ball { position: absolute; top: 5px; left: 50%; width: 9px; height: 9px; margin-left: -4px; border-radius: 50%; background: #fff; box-shadow: 0 0 8px rgba(255,255,255,.8); transform-origin: 4px 34px; animation: d-rot 1.2s linear infinite reverse; }
@keyframes d-rot { to { transform: rotate(360deg); } }

.d-cards .d-card { width: 50px; height: 70px; display: grid; place-items: center; align-content: center; gap: 2px; border-radius: 8px; background: #f3efe4; color: #1b1b1b; font: 700 17px Inter, sans-serif; box-shadow: 0 8px 18px rgba(0,0,0,.45); }
.d-cards .d-card b { font-size: 19px; }
.d-cards .d-card:nth-child(2) { color: #b3261e; }
.d-flip { animation: d-flip 2.2s ease-in-out infinite; transform-style: preserve-3d; }
@keyframes d-flip { 0%, 40% { transform: rotateY(0); } 60%, 100% { transform: rotateY(180deg); } }

.d-dice { gap: 12px; }
.d-die { position: relative; width: 44px; height: 44px; border-radius: 9px; background: #f3efe4; box-shadow: 0 8px 18px rgba(0,0,0,.45); animation: d-shake .9s ease-in-out infinite; animation-delay: calc(var(--i) * .12s); }
.d-die i { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: #1b1b1b; }
.d-die i:nth-child(1) { top: 7px; left: 7px; } .d-die i:nth-child(2) { top: 7px; right: 7px; }
.d-die i:nth-child(3) { top: 19px; left: 19px; } .d-die i:nth-child(4) { bottom: 7px; left: 7px; }
.d-die i:nth-child(5) { bottom: 7px; right: 7px; }
@keyframes d-shake { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-7px) rotate(12deg); } }

.d-grid { display: grid !important; grid-template-columns: repeat(5, 15px); gap: 4px; }
.d-grid span { width: 15px; height: 15px; border-radius: 4px; background: rgba(255,255,255,.1); animation: d-pop 2.6s ease-in-out infinite; animation-delay: calc(var(--i) * .08s); }
@keyframes d-pop { 0%, 55% { background: rgba(255,255,255,.1); } 65%, 90% { background: rgba(46,229,157,.75); } 100% { background: rgba(255,255,255,.1); } }

.d-curve { gap: 12px; color: #2ee59d; }
.d-curve svg { width: 120px; height: 54px; }
.d-curve path { stroke-dasharray: 130; stroke-dashoffset: 130; animation: d-draw 2.2s ease-in infinite; }
.d-curve b { color: var(--gold-2); font-size: 17px; font-variant-numeric: tabular-nums; }
@keyframes d-draw { 0% { stroke-dashoffset: 130; } 70%, 100% { stroke-dashoffset: 0; } }

.d-scratch { position: relative; gap: 7px; padding: 12px 16px; border-radius: 10px; background: #f6efd9; }
.d-scratch span { width: 26px; height: 32px; display: grid; place-items: center; border-radius: 5px; background: #e6dcbe; color: #8f1d1d; font-size: 15px; }
.d-hand { position: absolute; top: 4px; left: 0; width: 46px; height: 46px; border-radius: 50%; background: rgba(120,120,120,.55); animation: d-wipe 2.4s ease-in-out infinite; }
@keyframes d-wipe { 0% { transform: translateX(-4px); opacity: .85; } 100% { transform: translateX(96px); opacity: .85; } }

.d-plinko { flex-direction: column; gap: 9px !important; position: relative; }
.d-pegs { display: flex; gap: 12px; }
.d-pegs i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.35); }
.d-drop { position: absolute; top: -4px; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--gold-2); box-shadow: 0 0 10px rgba(245,223,138,.8); animation: d-fall 1.9s ease-in infinite; }
@keyframes d-fall { 0% { transform: translate(0, 0); } 35% { transform: translate(-13px, 22px); } 70% { transform: translate(9px, 44px); } 100% { transform: translate(-6px, 66px); opacity: .2; } }

.d-nums span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(212,175,55,.45); background: rgba(0,0,0,.35); font: 700 13px Inter, sans-serif; font-variant-numeric: tabular-nums; animation: d-ball-in 2.8s ease-out infinite; animation-delay: calc(var(--i) * .22s); }
@keyframes d-ball-in { 0%, 8% { transform: scale(.3); opacity: 0; } 20%, 85% { transform: scale(1); opacity: 1; } 100% { opacity: 0; } }

.d-coin span { display: block; width: 58px; height: 58px; border-radius: 50%; border: 3px solid #a8861f; background: linear-gradient(180deg, #f7e39a, #d4af37); box-shadow: 0 8px 20px rgba(0,0,0,.45); animation: d-flip 1.8s ease-in-out infinite; }

.d-path { position: relative; gap: 6px !important; }
.d-lane { width: 26px; height: 60px; border-radius: 5px; background: rgba(255,255,255,.07); border: 1px dashed rgba(255,255,255,.14); }
.d-walker { position: absolute; left: 2px; bottom: 8px; width: 16px; height: 16px; border-radius: 50%; background: var(--gold-2); animation: d-step 2.6s steps(4, end) infinite; }
@keyframes d-step { from { transform: translateX(0); } to { transform: translateX(128px); } }

.d-tower { flex-direction: column-reverse; gap: 5px !important; }
.d-floor { display: flex; gap: 5px; }
.d-floor i { width: 22px; height: 15px; border-radius: 4px; background: rgba(255,255,255,.1); }
.d-floor:nth-child(1) i:nth-child(2), .d-floor:nth-child(2) i:nth-child(1),
.d-floor:nth-child(3) i:nth-child(3), .d-floor:nth-child(4) i:nth-child(2) { animation: d-lit 3s ease-in-out infinite; animation-delay: calc(var(--i) * .3s); }
@keyframes d-lit { 0%, 20% { background: rgba(255,255,255,.1); } 35%, 90% { background: rgba(245,223,138,.8); } 100% { background: rgba(255,255,255,.1); } }

/* Con "reducir movimiento" el dibujo queda quieto: se entiende igual y no marea. */
@media (prefers-reduced-motion: reduce) {
  .howto, .howto-demo * { animation: none !important; }
  .d-curve path { stroke-dashoffset: 0; }
}

@media (max-width: 720px) {
  .howto { padding: max(10px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom)); }
  .howto-card { width: 100%; border-radius: 14px; }
  .howto-head { padding: 13px 14px 10px; }
  .howto-head h2 { font-size: 17px; }
  .howto-body { padding: 12px 14px 16px; }
  .howto-demo { height: 104px; }
  .howto-foot { padding: 10px 14px max(10px, env(safe-area-inset-bottom)); }
  .howto-go { flex: 1 1 auto; }
}

/* Portadas móviles: el nombre del juego queda visible dentro de la imagen, con contraste fijo y sin hover. */
@media (max-width: 720px), (orientation: landscape) and (max-height: 600px) and (max-width: 1200px) {
  .game-card .thumb-title {
    bottom: 8px; width: auto; min-width: 48px; max-width: calc(100% - 14px);
    padding: 5px 8px; border: 1px solid rgba(255,255,255,.42); border-radius: 5px;
    background: rgba(3,7,10,.86); box-shadow: 0 2px 12px rgba(0,0,0,.58);
    font-size: clamp(10px, 3.1vw, 13px); line-height: 1.05; letter-spacing: .045em;
  }
}
@media (max-width: 370px) {
  .game-card .thumb-title { padding: 4px 6px; font-size: 10px; }
}

/* ==== App instalable: "Instalá la app" en el lobby y Mi cuenta → Avisos y app (core/push.js) ==== */
/* va debajo de las perks (portada + perks siguen siendo un bloque) */
.install-slot:not([hidden]) { margin: -6px 0 26px; }
.install-chip { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 12px; border-radius: 12px; border: 1px solid rgba(212,175,55,.32); background: linear-gradient(90deg, rgba(212,175,55,.13), rgba(212,175,55,.03) 70%); }
.install-chip img { flex: none; width: 44px; height: 44px; border-radius: 10px; }
.install-chip span { flex: 1 1 auto; min-width: 0; display: grid; gap: 2px; }
.install-chip b { font-family: Cinzel, serif; font-size: 13px; letter-spacing: .06em; color: var(--gold-2); }
.install-chip small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.install-chip .install-go { flex: none; font: inherit; font-weight: 700; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; padding: 10px 14px; border: 0; border-radius: 9px; cursor: pointer; color: #2b1d02; background: linear-gradient(180deg, #f7e39a, #d4af37 55%, #a8861f); }
.install-chip .install-x { flex: none; width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 14px; cursor: pointer; }
.install-chip .install-x:hover { color: var(--text); background: rgba(255,255,255,.06); }
.install-chip .install-go:disabled { opacity: .55; cursor: default; }
@media (max-width: 720px) {
  .install-slot:not([hidden]) { margin: -6px 0 20px; }
  .install-chip { gap: 10px; padding: 8px 6px 8px 10px; }
  .install-chip img { width: 38px; height: 38px; border-radius: 9px; }
  .install-chip b { font-size: 12px; }
  .install-chip small { font-size: 11px; }
  .install-chip .install-go { padding: 9px 11px; letter-spacing: .1em; }
}
.account .notif-list { display: grid; gap: 8px; margin-top: 12px; }
/* las etiquetas de .account son de formulario (mayúsculas chicas): acá es una fila con casilla */
.account label.notif-ev { display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.07); background: rgba(0,0,0,.18); font-size: 14px; letter-spacing: 0; text-transform: none; color: var(--text); cursor: pointer; }
.account label.notif-ev input { width: 20px; height: 20px; margin: 1px 0 0; padding: 0; flex: none; accent-color: var(--gold); cursor: pointer; }
.account label.notif-ev span { display: grid; gap: 2px; } .account label.notif-ev small { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.account #n-push .row button[disabled] { opacity: .45; cursor: not-allowed; }
