        @font-face {
            font-family: 'Press Start 2P';
            src: url('../fonts/PressStart2P-Regular.ttf') format('truetype');
            font-weight: normal;
            font-style: normal;
        }
        /* ========== CANDADO: evita que WebView/Java cambien fuentes o escalado ========== */
        html, body {
            font-family: 'Press Start 2P', 'Courier New', monospace !important;
            -webkit-text-size-adjust: 100% !important;
            -moz-text-size-adjust: 100% !important;
            text-size-adjust: 100% !important;
        }
        * {
            -webkit-text-size-adjust: 100% !important;
            -moz-text-size-adjust: 100% !important;
            text-size-adjust: 100% !important;
        }
        /* ========== Fin candado fuentes ========== */

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        html,
        body {
            width: 100%;
            height: 100%;
            margin: 0;
            padding: 0;
            overflow: hidden;
            background: #000000;
            cursor: none;
            -webkit-tap-highlight-color: transparent;
            touch-action: manipulation;
        }

        body.touch-mode {
            cursor: default;
        }

        /* Aviso: gira a horizontal (solo touch + vertical) */
        .rotate-hint {
            display: none;
            position: fixed;
            inset: 0;
            z-index: 99999;
            background: #000;
            color: #DEFFDE;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 18px;
            text-align: center;
            padding: 24px;
            font-family: 'Press Start 2P', monospace;
        }

        body.touch-mode.force-landscape-hint .rotate-hint {
            display: flex;
        }

        body.touch-mode.force-landscape-hint #main-container {
            visibility: hidden;
            pointer-events: none;
        }

        .rotate-hint-icon {
            font-size: 64px;
            color: #ffde00;
            animation: rotate-phone-hint 1.4s ease-in-out infinite;
        }

        .rotate-hint-title {
            font-size: 18px;
            color: #ffde00;
            letter-spacing: 2px;
        }

        .rotate-hint-text {
            font-size: 12px;
            color: #DEFFDE;
            line-height: 1.6;
        }

        /* Banner: navegador de Facebook / Instagram (sin Fullscreen API) */
        .inapp-browser-banner {
            position: fixed;
            left: 8px;
            right: 8px;
            bottom: calc(10px + env(safe-area-inset-bottom, 0px));
            z-index: 100200;
            display: none;
            flex-wrap: wrap;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 10px 12px;
            border-radius: 12px;
            border: 1px solid rgba(240, 180, 41, 0.45);
            background: rgba(12, 18, 28, 0.96);
            color: #e8eef8;
            box-shadow: 0 8px 28px rgba(0,0,0,.45);
            text-align: center;
        }
        .inapp-browser-banner-txt {
            flex: 1 1 180px;
            font-size: 12px;
            line-height: 1.35;
            font-family: system-ui, -apple-system, Segoe UI, sans-serif;
        }
        .inapp-browser-banner-btn {
            width: auto;
            min-height: 40px;
            padding: 8px 12px;
            border-radius: 10px;
            border: 1px solid rgba(61, 214, 198, 0.55);
            background: linear-gradient(180deg, #1a3a44, #123038);
            color: #3dd6c6;
            font-weight: 800;
            font-size: 12px;
            cursor: pointer;
            touch-action: manipulation;
            font-family: system-ui, -apple-system, Segoe UI, sans-serif;
        }
        .inapp-browser-banner-x {
            width: 36px;
            min-height: 36px;
            padding: 0;
            border-radius: 8px;
            border: 1px solid rgba(255,255,255,.2);
            background: transparent;
            color: #8b9bb4;
            font-size: 22px;
            line-height: 1;
            cursor: pointer;
        }

        @keyframes rotate-phone-hint {
            0%, 100% { transform: rotate(0deg); }
            40% { transform: rotate(90deg); }
            60% { transform: rotate(90deg); }
        }

        /* Login jugador (celular / touch) */
        .player-auth-gate {
            position: fixed;
            inset: 0;
            z-index: 100000;
            display: none;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 10px;
            background: rgba(0, 0, 0, 0.94);
            padding: 24px;
            text-align: center;
            font-family: 'Press Start 2P', monospace;
            color: #DEFFDE;
        }

        .player-auth-logo {
            width: min(220px, 50vw);
            height: auto;
            margin-bottom: 8px;
            image-rendering: pixelated;
        }

        .player-auth-title {
            color: #ffde00;
            font-size: 22px;
            letter-spacing: 2px;
        }

        .player-auth-help {
            font-size: 11px;
            margin-bottom: 10px;
            color: #DEFFDE;
        }

        .player-auth-label {
            font-size: 10px;
            align-self: stretch;
            max-width: 360px;
            width: 100%;
            text-align: left;
            color: #ffde00;
        }

        .player-auth-input {
            width: min(360px, 92vw);
            padding: 14px 12px;
            border: 3px solid #ffde00;
            background: #111;
            color: #DEFFDE;
            font-family: 'Press Start 2P', monospace;
            font-size: 16px;
            border-radius: 8px;
            outline: none;
            pointer-events: auto !important;
            user-select: text !important;
            -webkit-user-select: text !important;
            touch-action: manipulation;
            caret-color: #ffde00;
        }

        .player-auth-actions {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            justify-content: center;
            margin-top: 8px;
            width: min(360px, 92vw);
        }

        .player-auth-btn {
            flex: 1;
            min-width: 140px;
            min-height: 48px;
            border: 3px solid #ffde00;
            background: #1a5a1a;
            color: #DEFFDE;
            font-family: 'Press Start 2P', monospace;
            font-size: 11px;
            cursor: pointer;
            border-radius: 8px;
            touch-action: manipulation;
        }

        .player-auth-btn-alt {
            background: #3a2a05;
        }

        .player-auth-status {
            min-height: 1.4em;
            font-size: 10px;
            margin-top: 8px;
            color: #DEFFDE;
            max-width: 360px;
        }

        .player-auth-status.player-auth-error {
            color: #ff6b6b;
        }

        .player-auth-hint {
            font-size: 9px;
            color: #8aa88a;
            max-width: 360px;
            line-height: 1.5;
            margin-top: 4px;
        }

        /* Lobby jugador — landscape inmersivo, 4 juegos */
        .player-lobby {
            position: fixed;
            inset: 0;
            z-index: 99990;
            display: none;
            flex-direction: column;
            align-items: stretch;
            justify-content: flex-start;
            gap: 6px;
            padding:
                max(8px, env(safe-area-inset-top))
                max(12px, env(safe-area-inset-right))
                max(10px, env(safe-area-inset-bottom))
                max(12px, env(safe-area-inset-left));
            overflow-x: hidden;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            background:
                radial-gradient(900px 380px at 8% -20%, rgba(61, 214, 198, 0.18), transparent 55%),
                radial-gradient(800px 360px at 100% 0%, rgba(240, 180, 41, 0.12), transparent 50%),
                linear-gradient(165deg, #0d1524, #070b14);
            color: #e8eef8;
            font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
            text-align: center;
        }
        .player-lobby-top {
            display: flex;
            flex-direction: row;
            flex-wrap: nowrap;
            align-items: stretch;
            justify-content: space-between;
            gap: 10px;
            width: min(1100px, 96vw);
            margin: 0 auto;
        }
        .player-lobby-top-brand {
            display: flex;
            flex-direction: row;
            align-items: center;
            gap: 10px;
            min-width: 0;
        }
        .player-lobby-logo {
            width: min(72px, 12vw);
            height: auto;
            margin: 0;
            filter: drop-shadow(0 8px 18px rgba(0,0,0,.45));
            cursor: pointer;
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
            user-select: none;
            flex-shrink: 0;
        }
        .player-lobby-logo:active {
            filter: drop-shadow(0 6px 14px rgba(0,0,0,.45)) brightness(1.12);
            transform: scale(0.97);
        }
        .player-lobby-hello {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            justify-content: center;
            gap: 4px;
            font-size: 13px;
            color: #8b9bb4;
            text-align: left;
            min-width: 0;
        }
        .player-lobby-hello strong { color: #e8eef8; font-size: 15px; }
        .player-lobby-balance {
            margin: 6px auto 4px;
            width: min(420px, 100%);
            padding: 0;
            border-radius: 12px;
            border: 1px solid rgba(120, 160, 220, 0.35);
            background: rgba(10, 18, 32, 0.92);
            display: flex !important;
            flex-direction: row !important;
            align-items: stretch;
            overflow: hidden;
            visibility: visible !important;
            opacity: 1 !important;
        }
        .player-lobby-bal-half {
            flex: 1 1 50%;
            padding: 12px 10px 10px;
            text-align: center;
            min-width: 0;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 4px;
        }
        .player-lobby-bal-credit {
            border-right: 1px solid rgba(120, 160, 220, 0.28);
            background: rgba(61, 214, 198, 0.06);
        }
        .player-lobby-balance-k {
            font-size: 13px !important;
            font-weight: 800;
            letter-spacing: 0.1em;
            text-transform: uppercase;
            color: #e8eef8 !important;
            line-height: 1.2;
        }
        .player-lobby-balance-v {
            font-size: 30px !important;
            font-weight: 800;
            color: #f0b429 !important;
            line-height: 1.1;
            margin: 0;
            font-variant-numeric: tabular-nums;
        }
        .player-lobby-cashable {
            margin-top: 0;
            font-size: 10px;
            color: #8b9bb4;
            letter-spacing: 0.03em;
        }
        /* DEMO: franja mínima — no debe empujar tiles ni romper landscape */
        .player-lobby-demo-strip {
            width: min(640px, 88vw);
            margin: 2px auto 4px;
            padding: 4px 8px;
            border-radius: 8px;
            border: 1px solid rgba(61, 214, 198, 0.28);
            background: rgba(10, 24, 32, 0.75);
            color: #9adfd8;
            font-size: 11px;
            line-height: 1.25;
            text-align: center;
            flex: 0 0 auto;
            max-height: 28px;
            overflow: hidden;
            white-space: nowrap;
            text-overflow: ellipsis;
        }
        .player-lobby-cashout-inline {
            display: flex !important;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 4px;
            width: auto;
            margin: 0;
            padding: 12px 10px 10px;
            border: 0;
            border-radius: 0;
            background: rgba(240, 180, 41, 0.08) !important;
            color: inherit;
            cursor: pointer;
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
            visibility: visible !important;
            opacity: 1 !important;
            font: inherit;
        }
        .player-lobby-cashout-inline .player-lobby-balance-k {
            color: #f0d78c !important;
            pointer-events: none;
        }
        .player-lobby-cashout-amt {
            font-size: 30px !important;
            font-weight: 800;
            color: #3dd6c6 !important;
            line-height: 1.1;
            font-variant-numeric: tabular-nums;
            pointer-events: none;
        }
        .player-lobby-cashout-inline:active {
            filter: brightness(1.15);
        }
        .player-lobby-cashout-inline:disabled {
            opacity: 0.75 !important;
            cursor: default;
        }
        .player-lobby-cashout-inline:disabled .player-lobby-cashout-amt {
            color: #6a7a8a !important;
        }
        .player-lobby-prog {
            width: min(420px, 100%);
            margin: 0 auto 8px;
            padding: 10px 12px;
            text-align: center;
            border-radius: 12px;
            border: 1px solid rgba(242, 193, 78, 0.35);
            background: linear-gradient(180deg, rgba(242,193,78,0.12), rgba(10,18,32,0.75));
        }
        .player-lobby-prog-k {
            font-size: 11px;
            letter-spacing: 0.12em;
            text-transform: uppercase;
            color: #c9a227;
            font-weight: 700;
        }
        .player-lobby-prog-v {
            margin-top: 2px;
            font-size: 26px;
            font-weight: 800;
            color: #ffe08a;
            font-variant-numeric: tabular-nums;
            line-height: 1.1;
        }
        .prog-win-overlay {
            position: fixed;
            inset: 0;
            z-index: 99999;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(0, 0, 0, 0.72);
            padding: 16px;
        }
        .prog-win-card {
            width: min(92vw, 380px);
            padding: 28px 22px 22px;
            text-align: center;
            border-radius: 14px;
            background: linear-gradient(165deg, #1a1520 0%, #0d1018 100%);
            border: 1px solid rgba(242, 193, 78, 0.55);
            box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
        }
        .prog-win-title {
            font-size: 22px;
            font-weight: 800;
            letter-spacing: 0.14em;
            color: #f2c14e;
        }
        .prog-win-who {
            margin-top: 14px;
            font-size: 18px;
            color: #e8eef8;
            font-weight: 700;
        }
        .prog-win-amt {
            margin-top: 8px;
            font-size: 40px;
            font-weight: 800;
            color: #3dd6c6;
            font-variant-numeric: tabular-nums;
        }
        .prog-win-note {
            margin-top: 10px;
            font-size: 12px;
            color: #9aabbf;
        }
        .prog-win-ok {
            margin-top: 18px;
            min-width: 120px;
            padding: 12px 20px;
            border: 0;
            border-radius: 10px;
            background: #f2c14e;
            color: #1a1208;
            font-weight: 800;
            font-size: 15px;
            letter-spacing: 0.08em;
            cursor: pointer;
        }
        .player-lobby-assets {
            width: min(1100px, 96vw);
            margin: 0 auto 4px;
            text-align: left;
        }
        .player-lobby-assets-txt {
            font-size: 11px;
            color: #8b9bb4;
            margin-bottom: 4px;
            letter-spacing: 0.02em;
        }
        .player-lobby-assets-track {
            height: 4px;
            border-radius: 999px;
            background: rgba(255,255,255,0.08);
            overflow: hidden;
        }
        .player-lobby-assets-bar {
            height: 100%;
            width: 0%;
            border-radius: 999px;
            background: linear-gradient(90deg, #3dd6c6, #f0b429);
            transition: width 0.2s ease;
        }
        .player-lobby-tile.is-loading {
            opacity: 0.45;
            pointer-events: none;
            filter: grayscale(0.35);
        }
        /* 4 juegos en UNA sola fila (iconos chicos) */
        .player-lobby-grid {
            width: min(640px, 88vw);
            margin: 4px auto 0;
            flex: 0 0 auto;
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            grid-template-rows: auto;
            gap: 8px;
            align-content: start;
            justify-content: center;
            min-height: 0;
        }
        .player-lobby-tile {
            display: flex;
            flex-direction: column;
            align-items: stretch;
            gap: 4px;
            margin: 0;
            padding: 6px;
            border-radius: 12px;
            border: 1px solid rgba(61, 214, 198, 0.35);
            background: linear-gradient(180deg, #1a3a44 0%, #123038 100%);
            color: #e8eef8;
            cursor: pointer;
            font: inherit;
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
            min-width: 0;
            min-height: 0;
            height: auto;
            overflow: hidden;
        }
        .player-lobby-tile:active { filter: brightness(1.12); }
        .player-lobby-tile-art {
            display: block;
            width: 100%;
            flex: 0 0 auto;
            aspect-ratio: 4 / 3;
            height: auto;
            max-height: 96px;
            min-height: 0;
            object-fit: cover;
            object-position: center;
            border-radius: 8px;
            background: #000;
        }
        .player-lobby-tile-art--keno {
            display: flex;
            align-items: center;
            justify-content: center;
            background: linear-gradient(160deg, #3a2814 0%, #1a1208 55%, #0d1a12 100%);
            color: #e8c56a;
            font-size: 28px;
            font-weight: 900;
            letter-spacing: 0.08em;
            text-shadow: 0 2px 0 #000, 0 0 18px rgba(232, 197, 106, 0.35);
        }
        .player-lobby-tile-title {
            font-size: 12px;
            font-weight: 800;
            letter-spacing: 0.02em;
            line-height: 1.1;
            text-align: center;
            padding: 0 1px 2px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .player-lobby-tile.is-empty {
            opacity: 0.28;
            border-color: rgba(120, 160, 220, 0.12);
            background: #0a1220;
            cursor: default;
            min-height: 88px;
            justify-content: center;
        }
        .player-lobby-tile.is-empty .player-lobby-tile-title {
            color: #5a6a80;
            font-size: 14px;
        }
        /* Botón COBRAR grande antiguo (ya no se usa) */
        button.player-lobby-cashout:not(#lobbyCashoutBtn) {
            display: none !important;
        }
        .player-lobby-cashout-status {
            width: min(1100px, 96vw);
            margin: 2px auto 0;
            min-height: 16px;
            font-size: 12px;
            color: #8b9bb4;
            line-height: 1.35;
            text-align: center;
        }
        .player-lobby-cashout-status.is-ok { color: #3dd6c6; }
        .player-lobby-cashout-status.is-err { color: #e85d5d; }
        .player-lobby-logout {
            width: auto;
            min-width: 72px;
            margin: 0;
            min-height: 48px;
            padding: 0 14px;
            border-radius: 12px;
            border: 1px solid rgba(232, 93, 93, 0.45);
            background: linear-gradient(180deg, #4a1c1c 0%, #2e1010 100%);
            color: #e8eef8;
            font-weight: 700;
            font-size: 13px;
            cursor: pointer;
            touch-action: manipulation;
            flex-shrink: 0;
            align-self: center;
        }
        .player-lobby-tile-title {
            font-size: 13px;
            font-weight: 800;
            letter-spacing: 0.04em;
        }
        body.player-in-lobby.player-lobby-landscape #main-container,
        html.player-lobby-landscape body.player-in-lobby #main-container {
            transform: none !important;
            left: 0 !important;
            top: 0 !important;
        }
        .player-lobby-fs {
            width: min(420px, 100%);
            margin: 4px auto 0;
            min-height: 48px;
            border-radius: 12px;
            border: 1px solid rgba(61, 214, 198, 0.45);
            background: rgba(61, 214, 198, 0.12);
            color: #3dd6c6;
            font-weight: 800;
            font-size: 15px;
            cursor: pointer;
            touch-action: manipulation;
        }
        .player-lobby-fs-hint {
            width: min(420px, 100%);
            margin: 0 auto;
            font-size: 12px;
            color: #8b9bb4;
            line-height: 1.35;
        }
        html.player-immersive,
        body.player-immersive {
            overflow: hidden !important;
            height: 100% !important;
            height: 100dvh !important;
            overscroll-behavior: none;
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
        }
        body.player-immersive {
            position: fixed;
            inset: 0;
            width: 100%;
        }

        .player-hud {
            display: none;
            position: fixed;
            top: 8px;
            left: 8px;
            right: 8px;
            z-index: 100060;
            padding: 6px 10px;
            gap: 8px;
            align-items: center;
            justify-content: flex-start;
            flex-wrap: wrap;
            pointer-events: none;
        }
        .mp-signal-led {
            display: inline-block;
            width: 14px;
            height: 14px;
            border-radius: 50%;
            flex-shrink: 0;
            border: 1px solid rgba(255, 255, 255, 0.25);
            box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
            vertical-align: middle;
        }
        .mp-signal-led.is-green {
            background: #2ee56d;
            box-shadow: 0 0 10px rgba(46, 229, 109, 0.85);
        }
        .mp-signal-led.is-orange {
            background: #f0a020;
            box-shadow: 0 0 10px rgba(240, 160, 32, 0.8);
        }
        .mp-signal-led.is-red {
            background: #e23b3b;
            box-shadow: 0 0 10px rgba(226, 59, 59, 0.75);
        }
        .player-hud .mp-signal-led {
            pointer-events: none;
            width: 12px;
            height: 12px;
        }
        .mp-hud-home-stack {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 3px;
            pointer-events: auto;
            min-height: 0;
            min-width: 0;
            padding: 6px 10px;
            border-radius: 8px;
            border: 1px solid rgba(61, 214, 198, 0.45);
            background: rgba(10, 18, 32, 0.88);
            color: #3dd6c6;
            cursor: pointer;
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
            font: inherit;
        }
        .mp-hud-home-stack:active {
            filter: brightness(1.12);
        }
        .mp-hud-home-row {
            display: flex;
            align-items: center;
            gap: 6px;
            pointer-events: none;
        }
        .mp-hud-prog {
            pointer-events: none;
            font-size: 11px;
            font-weight: 800;
            letter-spacing: 0.02em;
            color: #ffe08a;
            font-variant-numeric: tabular-nums;
            text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
            white-space: nowrap;
            line-height: 1;
        }
        .mp-hud-salir {
            pointer-events: none;
            display: block;
            margin-top: 2px;
            font-size: 10px;
            font-weight: 800;
            letter-spacing: 0.1em;
            color: #3dd6c6;
            text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
            white-space: nowrap;
            line-height: 1;
            text-transform: uppercase;
        }
        .player-hud .player-hud-lobby.mp-hud-home-stack {
            pointer-events: auto;
        }
        .mp-hud-home-ico {
            display: block;
            width: 18px;
            height: 18px;
            pointer-events: none;
        }
        .menu-royal-fixed {
            position: absolute;
            top: 65%;
            left: 50%;
            transform: translate(-50%, -50%);
            font-family: 'Press Start 2P', cursive;
            font-size: 22px;
            color: #b30000;
            text-shadow:
                -1px -1px 0 #FFD700,
                1px -1px 0 #FFD700,
                -1px 1px 0 #FFD700,
                1px 1px 0 #FFD700,
                2px 2px 0 #000;
            text-align: center;
            z-index: 20;
            pointer-events: none;
            white-space: nowrap;
        }
        body.poker-boot-pending #main-container {
            visibility: hidden !important;
            pointer-events: none !important;
        }
        body.poker-boot-pending {
            background: #000 !important;
        }
        body.player-in-lobby #main-container {
            visibility: hidden;
            pointer-events: none;
        }
        body.player-in-lobby.player-lobby-portrait #main-container,
        html.player-lobby-portrait body.player-in-lobby #main-container {
            transform: none !important;
            left: 0 !important;
            top: 0 !important;
        }
        body.player-in-lobby .player-hud {
            display: none !important;
        }

        body.touch-mode.player-logged-in .player-hud {
            display: flex;
        }

        body.loading-active,
        html.loading-active {
            background: #000000 !important;
        }
        body.loading-active .rotate-hint,
        html.loading-active .rotate-hint {
            display: none !important;
        }
        body.loading-active #main-container {
            visibility: hidden !important;
            pointer-events: none !important;
            transform: none !important;
        }
        body.loading-active #loadingScreen,
        html.loading-active #loadingScreen {
            display: flex !important;
            visibility: visible !important;
            pointer-events: auto !important;
        }
        html.loading-active body {
            background: #000000 !important;
        }

        html.loading-active #main-container {
            background: #000000 !important;
        }

        #main-container {
            width: 1280px;
            height: 1024px;
            position: fixed;
            left: 0;
            top: 0;
            overflow: hidden;
            background: #000000;
            transform-origin: 0 0;
            /* Empaquetado: el navegador trata TODO el juego como UN solo elemento compuesto */
            will-change: transform;
            contain: layout paint;
            isolation: isolate;
            backface-visibility: hidden;
            -webkit-backface-visibility: hidden;
            transform-style: flat;
            pointer-events: auto;
        }

        #menuScreen {
            display: none;
            /* Oculto inicialmente, se muestra tras cargar */
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            justify-content: center;
            align-items: center;
            background: #000000;
        }

        /* PANTALLA DE CONTADORES (AUDITORÍA) — negro + tipografía CREDIT (#DEFFDE) */
        #auditScreen {
            display: none;
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            max-width: none;
            max-height: none;
            transform: none;
            overflow: hidden;
            background-color: #000000;
            border: none;
            box-shadow: none;
            z-index: 9999;
            font-family: 'Press Start 2P', 'Courier New', monospace;
            color: #DEFFDE;
            flex-direction: column;
            justify-content: flex-start;
            align-items: center;
            text-align: left;
            padding: 40px 64px 12px;
            box-sizing: border-box;
            -webkit-font-smoothing: none;
            -moz-osx-font-smoothing: unset;
            text-rendering: optimizeLegibility;
            image-rendering: pixelated;
        }

        .audit-title {
            font-size: 22px;
            color: #DEFFDE;
            line-height: 1;
            margin-bottom: 36px;
            text-align: center;
            width: 100%;
            text-decoration: none;
        }

        .audit-grid {
            width: 72%;
            max-width: 720px;
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .audit-line {
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 2px dashed #333333;
            padding: 14px 4px;
            gap: 24px;
            width: 100%;
            margin-bottom: 0;
        }

        .audit-label {
            font-size: 22px;
            color: #DEFFDE;
            line-height: 1;
            flex-shrink: 1;
        }

        .audit-value {
            font-size: 24px;
            color: #DEFFDE;
            line-height: 1;
            min-width: 28px;
            text-align: right;
            flex-shrink: 0;
        }

        .audit-sheet-panel {
            width: 100%;
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .audit-sheet-hint,
        .audit-reset-hint {
            margin-top: 20px;
            font-size: 11px;
            color: #88aa88;
            text-align: center;
            line-height: 1.6;
            width: 100%;
            max-width: 720px;
        }

        .audit-hold-progress {
            margin-top: 24px;
            width: 72%;
            max-width: 720px;
            display: flex;
            flex-direction: column;
            align-items: stretch;
            gap: 8px;
        }

        .audit-hold-progress-label {
            font-size: 12px;
            color: #ffff88;
            text-align: center;
            line-height: 1.4;
        }

        .audit-hold-progress-track {
            width: 100%;
            height: 18px;
            border: 2px solid #88aa88;
            background: #111111;
            box-sizing: border-box;
        }

        .audit-hold-progress-fill {
            width: 0%;
            height: 100%;
            background: #44ff44;
            transition: width 0.2s linear;
        }

        .audit-hold-progress-time {
            font-size: 14px;
            color: #DEFFDE;
            text-align: center;
            line-height: 1.2;
        }

        .audit-line-vida {
            border: 4px solid #00ffff;
            padding: 14px 8px;
        }

        .machine-number-line {
            border: 4px solid #ffff00;
            border-radius: 8px;
            padding: 18px 16px;
            margin: 6px 0 8px;
            background: rgba(80, 0, 0, 0.2);
            box-sizing: border-box;
        }

        .machine-number-line .audit-label-machine,
        .machine-number-line .audit-value-machine {
            color: #ff2020;
            font-size: 26px;
            line-height: 1.1;
        }

        .machine-number-line .audit-value-machine {
            font-size: 28px;
            min-width: 48px;
        }

        .machine-number-entry {
            width: 72%;
            max-width: 720px;
            border: 4px solid #ffff00;
            background: rgba(40, 0, 0, 0.35);
            padding: 20px 16px;
            margin-top: 20px;
            text-align: center;
            box-sizing: border-box;
        }

        /* PANTALLA DE TEST DE ENTRADAS — negro + tipografía CREDIT (#DEFFDE) */
        #testScreen {
            display: none;
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            max-width: none;
            max-height: none;
            transform: none;
            overflow: hidden;
            background-color: #000000;
            border: none;
            box-shadow: none;
            z-index: 10000;
            font-family: 'Press Start 2P', 'Courier New', monospace;
            color: #DEFFDE;
            flex-direction: column;
            justify-content: flex-start;
            align-items: center;
            text-align: left;
            padding: 40px 64px 12px;
            box-sizing: border-box;
            -webkit-font-smoothing: none;
            -moz-osx-font-smoothing: unset;
            text-rendering: optimizeLegibility;
            image-rendering: pixelated;
        }

        .test-title {
            font-size: 22px;
            color: #DEFFDE;
            line-height: 1;
            margin-bottom: 36px;
            text-align: center;
            width: 100%;
        }

        .test-grid {
            width: 72%;
            max-width: 720px;
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .test-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 2px dashed #333333;
            padding: 14px 4px;
            gap: 24px;
        }

        .test-label {
            font-size: 22px;
            color: #DEFFDE;
            line-height: 1;
            flex-shrink: 1;
        }

        .test-value {
            font-size: 24px;
            color: #DEFFDE;
            line-height: 1;
            min-width: 28px;
            text-align: right;
            flex-shrink: 0;
        }

        .test-value.test-pulse-active {
            color: #DEFFDE;
        }

        /* PANTALLA DENOMINACIÓN PLAY 5 / 10 / 20 */
        #playDenomScreen {
            display: none;
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            max-width: none;
            max-height: none;
            transform: none;
            overflow: hidden;
            background-color: #000000;
            border: none;
            box-shadow: none;
            z-index: 10001;
            font-family: 'Press Start 2P', 'Courier New', monospace;
            color: #DEFFDE;
            flex-direction: column;
            justify-content: flex-start;
            align-items: center;
            text-align: left;
            padding: 40px 64px 12px;
            box-sizing: border-box;
            -webkit-font-smoothing: none;
            -moz-osx-font-smoothing: unset;
            text-rendering: optimizeLegibility;
            image-rendering: pixelated;
        }

        .play-denom-title {
            font-size: 22px;
            color: #DEFFDE;
            line-height: 1;
            margin-bottom: 24px;
            text-align: center;
            width: 100%;
        }

        .play-denom-section-title {
            font-size: 16px;
            color: #888888;
            line-height: 1;
            margin: 20px 0 12px;
            text-align: center;
            width: 100%;
        }

        .play-denom-grid-rtp {
            margin-top: 0;
        }

        .play-denom-grid {
            width: 72%;
            max-width: 720px;
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .play-denom-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 2px dashed #333333;
            padding: 14px 4px;
            gap: 24px;
        }

        .play-denom-row.play-denom-cursor {
            border: 4px solid #ffff00;
            border-radius: 8px;
            padding: 18px 12px;
            background: rgba(80, 0, 0, 0.2);
        }

        .play-denom-row.play-denom-active-level .play-denom-label,
        .play-denom-row.play-denom-active-level .play-denom-status {
            color: #ffff00;
        }

        .play-denom-label {
            font-size: 22px;
            color: #DEFFDE;
            line-height: 1;
            flex-shrink: 1;
        }

        .play-denom-status {
            font-size: 20px;
            color: #DEFFDE;
            line-height: 1;
            min-width: 80px;
            text-align: right;
            flex-shrink: 0;
        }

        .play-denom-help {
            margin-top: 28px;
            font-size: 14px;
            color: #888888;
            text-align: center;
            width: 100%;
        }

        /* Visible con tecla W */
        #auditScreen.w-screen-open,
        #testScreen.w-screen-open,
        #playDenomScreen.w-screen-open {
            display: flex !important;
            justify-content: center;
            align-items: center;
        }

        /* Bloque único: listas + créditos (sin recortar) */
        .w-screen-body {
            flex: 0 0 auto;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: flex-start;
            width: 72%;
            max-width: 720px;
            overflow: visible;
        }

        /* Justo debajo del último texto de cada pantalla W */
        .w-dev-credit {
            width: 100%;
            margin-top: 40px;
            padding: 0 8px 8px;
            box-sizing: border-box;
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
            flex-shrink: 0;
        }

        .w-dev-credit-text {
            font-family: 'Press Start 2P', 'Courier New', monospace;
            font-size: 14px;
            line-height: 1.8;
            color: #DEFFDE;
            text-align: center;
            width: 100%;
            -webkit-font-smoothing: none;
            -moz-osx-font-smoothing: unset;
        }

        .w-dev-credit-logo {
            display: block;
            margin-top: 14px;
            height: 36px;
            width: auto;
            max-width: 140px;
            object-fit: contain;
            opacity: 0.5;
        }

        .machine-number-entry-title {
            color: #ffff00;
            font-size: 20px;
            margin-bottom: 12px;
            line-height: 1.2;
        }

        .machine-number-entry-current {
            color: #ff2020;
            font-size: 28px;
            margin-bottom: 10px;
            letter-spacing: 8px;
            line-height: 1.2;
        }

        .machine-number-entry-digits {
            color: #DEFFDE;
            font-size: 18px;
            margin-bottom: 8px;
            white-space: pre;
            line-height: 1.4;
        }

        .machine-number-entry-help {
            color: #DEFFDE;
            font-size: 12px;
            line-height: 1.4;
            opacity: 0.65;
        }

        #loadingScreen {
            position: fixed;
            inset: 0;
            width: 100%;
            height: 100%;
            height: 100dvh;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            gap: 16px;
            background: #000000;
            z-index: 100040;
            font-family: 'Press Start 2P', 'Courier New', monospace;
            text-align: center;
            padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
            box-sizing: border-box;
        }

        .immersive-gate {
            position: fixed;
            inset: 0;
            z-index: 100050;
            display: none;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 14px;
            background: rgba(0, 0, 0, 0.94);
            color: #e8eef8;
            text-align: center;
            padding: 24px;
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
            cursor: pointer;
        }
        .immersive-gate-logo {
            width: min(120px, 36vw);
            height: auto;
            margin-bottom: 8px;
            filter: drop-shadow(0 8px 20px rgba(0,0,0,.5));
        }
        .immersive-gate-title {
            font-family: 'Press Start 2P', monospace;
            font-size: 14px;
            letter-spacing: 0.04em;
            color: #3dd6c6;
        }
        .immersive-gate-sub {
            font-size: 13px;
            color: #8b9bb4;
        }
        html.player-immersive,
        body.player-immersive {
            width: 100%;
            height: 100%;
            height: 100dvh;
            overflow: hidden;
            overscroll-behavior: none;
            touch-action: manipulation;
        }

        .loading-logo {
            max-width: 50%;
            max-height: 45vh;
            object-fit: contain;
            animation: pulse 2s ease-in-out infinite;
            display: block;
        }

        .loading-bar-container {
            width: 80%;
            max-width: 400px;
            height: 24px;
            background: rgba(255, 255, 255, 0.2);
            border-radius: 12px;
            margin-top: 30px;
            overflow: hidden;
        }

        .loading-bar-fill {
            height: 100%;
            width: 0%;
            background: #FFFFFF;
            border-radius: 12px;
            transition: width 0.1s linear;
        }

        .loading-percent {
            color: #FFFFFF;
            font-size: 14px;
            margin-top: 10px;
            text-align: center;
            width: 100%;
        }

        @keyframes pulse {

            0%,
            100% {
                opacity: 1;
            }

            50% {
                opacity: 0.7;
            }
        }

        .loading-text {
            color: #FFFFFF;
            font-size: 18px;
            margin-top: 20px;
            text-transform: uppercase;
            animation: blink 1.5s ease-in-out infinite;
            text-align: center;
        }

        /* ========== Activación única (primera ejecución) ========== */
        .activation-gate {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            width: 100%;
            height: 100%;
            display: none;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            background: #000000;
            z-index: 100000;
            font-family: 'Press Start 2P', 'Courier New', monospace;
            text-align: center;
            padding: 24px;
        }

        .activation-gate-logo {
            max-width: 42%;
            max-height: 32vh;
            object-fit: contain;
            margin-bottom: 28px;
        }

        .activation-gate-title {
            color: #DEFFDE;
            font-size: 22px;
            margin-bottom: 18px;
            letter-spacing: 2px;
        }

        .activation-gate-help {
            color: #FFFFFF;
            font-size: 11px;
            line-height: 1.8;
            margin-bottom: 24px;
            opacity: 0.9;
        }

        .activation-gate-dots {
            color: #FFFFFF;
            font-size: 28px;
            letter-spacing: 6px;
            margin-bottom: 20px;
        }

        .activation-gate-status {
            color: #FFFFFF;
            font-size: 10px;
            line-height: 1.8;
            min-height: 2.4em;
            margin-bottom: 16px;
        }

        .activation-gate-status.activation-gate-error {
            color: #ff6666;
        }

        .activation-gate-hint {
            color: #888888;
            font-size: 8px;
            line-height: 1.6;
            margin-top: 8px;
        }

        @keyframes activation-gate-shake {
            0%, 100% { transform: translateX(0); }
            20% { transform: translateX(-8px); }
            40% { transform: translateX(8px); }
            60% { transform: translateX(-6px); }
            80% { transform: translateX(6px); }
        }

        .activation-gate-shake {
            animation: activation-gate-shake 0.35s ease-in-out;
        }

        @keyframes blink {

            0%,
            100% {
                opacity: 1;
            }

            50% {
                opacity: 0.3;
            }
        }

        #background {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            object-fit: fill;
            pointer-events: none;
            user-select: none;
            -webkit-user-select: none;
        }

        /* Escenario 16:9 del title_screen (contain dentro del canvas 1280x1024) */
        .menu-art-stage {
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(-50%, -50%);
            width: 100%;
            aspect-ratio: 16 / 9;
            max-height: 100%;
            z-index: 5;
        }

        .menu-game-hits {
            position: absolute;
            inset: 0;
            z-index: 26;
            pointer-events: none;
        }

        .menu-hit {
            position: absolute;
            margin: 0;
            padding: 0;
            border: 0;
            background: transparent;
            appearance: none;
            -webkit-appearance: none;
            pointer-events: auto;
            cursor: pointer;
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
            outline: none;
        }

        body.touch-mode .menu-hit:active {
            background: rgba(255, 222, 0, 0.12);
        }

        .selec-game {
            position: absolute;
            top: 57.2%;
            left: 50%;
            transform: translate(-50%, -50%) scale(0.88);
            font-family: 'Press Start 2P', 'Courier New', monospace;
            font-size: 46px;
            letter-spacing: 0.5px;
            color: #b30000;
            -webkit-text-stroke: 0;
            text-shadow:
                -3px -3px 0 #ffde00,
                3px -3px 0 #ffde00,
                -3px 3px 0 #ffde00,
                3px 3px 0 #ffde00,
                -3px 0 0 #ffde00,
                3px 0 0 #ffde00,
                0 -3px 0 #ffde00,
                0 3px 0 #ffde00,
                -2px -2px 0 #ffde00,
                2px -2px 0 #ffde00,
                -2px 2px 0 #ffde00,
                2px 2px 0 #ffde00,
                -2px 0 0 #ffde00,
                2px 0 0 #ffde00,
                0 -2px 0 #ffde00,
                0 2px 0 #ffde00;
            text-rendering: optimizeSpeed;
            -webkit-font-smoothing: none;
            -moz-osx-font-smoothing: unset;
            font-smooth: never;
            text-align: center;
            z-index: 20;
            animation: blink-select-game 2s ease-in-out infinite;
            /* Parpadeo: un segundo sí, un segundo no */
            pointer-events: none;
            white-space: nowrap;
        }

        @keyframes blink-select-game {

            0%,
            50% {
                opacity: 1;
            }

            50.01%,
            100% {
                opacity: 0;
            }
        }

        /* Royal Flush progresivo en menú (debajo de SELECT GAME, fijo, más pequeño) */
        .menu-royal-progressive {
            position: absolute;
            top: 65%;
            left: 50%;
            transform: translate(-50%, -50%);
            font-family: 'Press Start 2P', cursive;
            font-size: 24px;
            color: #b30000;
            text-shadow:
                -1px -1px 0 #FFD700,
                1px -1px 0 #FFD700,
                -1px 1px 0 #FFD700,
                1px 1px 0 #FFD700,
                2px 2px 0 #000;
            text-align: center;
            z-index: 20;
            pointer-events: none;
            white-space: nowrap;
        }

        .menu-denomination {
            position: absolute;
            top: 55.1%;
            left: 14.8%;
            transform: translate(-50%, -50%) scale(0.88);
            font-family: 'Press Start 2P', 'Courier New', monospace;
            font-size: 48px;
            letter-spacing: 0.5px;
            color: #b30000;
            -webkit-text-stroke: 0;
            text-shadow:
                -3px -3px 0 #ffde00,
                3px -3px 0 #ffde00,
                -3px 3px 0 #ffde00,
                3px 3px 0 #ffde00,
                -3px 0 0 #ffde00,
                3px 0 0 #ffde00,
                0 -3px 0 #ffde00,
                0 3px 0 #ffde00,
                -2px -2px 0 #ffde00,
                2px -2px 0 #ffde00,
                -2px 2px 0 #ffde00,
                2px 2px 0 #ffde00,
                -2px 0 0 #ffde00,
                2px 0 0 #ffde00,
                0 -2px 0 #ffde00,
                0 2px 0 #ffde00;
            text-rendering: optimizeSpeed;
            -webkit-font-smoothing: none;
            -moz-osx-font-smoothing: unset;
            font-smooth: never;
            z-index: 20;
            pointer-events: none;
        }

        .menu-cent-sign {
            font-size: 0.72em;
            position: relative;
            top: -0.16em;
            margin-left: 0.02em;
            display: inline-block;
        }


        #gameScreen {
            display: none;
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: #000000;
            z-index: 100;
        }

        #gameScreen.active {
            display: block;
        }

        /* Letterbox vertical (operador): bandas negras solo arriba/abajo, ancho lleno */
        body.letterbox-mode {
            background: #000000 !important;
        }

        /* Título del juego BONUS POKER */
        .game-title-container {
            position: absolute;
            top: 160px;
            /* Justo encima de la tabla de pagos (top 190px) */
            left: 50%;
            transform: translateX(-50%);
            width: 1160px;
            /* Mismo ancho que tabla de pagos y cartas */
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 201;
            /* Encima del borde amarillo */
            margin-bottom: 0;
        }

        /* Clase de utilidad para fuentes pixeladas comunes */
        .game-title,
        .payout-text,
        .payout-dots,
        .payout-number,
        .credits-label,
        .credits-value,
        .audit-title,
        .audit-label,
        .audit-value,
        .test-title,
        .test-label,
        .test-value,
        .play-denom-title,
        .play-denom-section-title,
        .play-denom-label,
        .play-denom-status,
        .play-denom-help,
        .w-dev-credit-text,
        .winner-text,
        .paid-text,
        .coins-text-label,
        .coins-text-value,
        .loading-text,
        .card-held,
        .dealer-label {
            font-family: 'Press Start 2P', 'Courier New', monospace;
            text-rendering: optimizeLegibility;
            -webkit-font-smoothing: none;
            -moz-osx-font-smoothing: unset;
            image-rendering: pixelated;
        }

        .game-title {
            font-size: 22px;
            color: #DEFFDE;
            line-height: 1;
        }

        /* TABLA MÁS GRANDE Y MEJOR POSICIONADA */
        .payout-table-wrapper {
            position: absolute;
            top: 190px;
            /* Debajo del título del juego */
            left: 0;
            width: 100%;
            display: flex;
            justify-content: center;
            align-items: flex-start;
        }

        .payout-table-container {
            display: flex;
            gap: 15px;
            width: 1160px;
            /* Mismo ancho que las cartas */
        }

        .payout-panel {
            display: flex;
            flex-direction: row;
            border: 5px solid #ffde00;
            position: relative;
            background-color: #000000;
            overflow: hidden;
            width: 572px;
            /* Ajustado para mismo ancho que cartas */
            height: 228px;
            /* 8 filas × 28px + margen (FULL HOUSE en columna izquierda) */
            padding-top: 5px;
            /* Separar texto del borde superior */
        }

        .payout-panel-blue {
            width: 66%;
            display: flex;
            flex-direction: column;
        }

        .payout-panel-red {
            width: 34%;
            display: flex;
            flex-direction: column;
            background-color: #de0000;
            /* Fondo rojo completo: evita huecos cuando hay filas ocultas (ej. Deuces Wild) */
        }

        .payout-row {
            height: 28px;
            /* Ajuste fino para fitting */
            display: flex;
            align-items: center;
            box-sizing: border-box;
        }

        .payout-row-blue {
            justify-content: space-between;
            background-color: #000000;
            padding-left: 15px;
            /* Padding reducido */
            padding-right: 10px;
            /* Padding reducido */
        }

        .payout-row-red {
            justify-content: flex-end;
            background-color: #de0000;
            padding-right: 18px;
            padding-left: 4px;
            box-sizing: border-box;
        }

        .payout-text {
            font-size: 18px;
            /* Reducido para altura menor */
            color: #ffff00;
            white-space: nowrap;
        }

        .payout-dots {
            font-size: 14px;
            /* Reducido para altura menor */
            color: #ffff00;
            letter-spacing: 2px;
        }

        .payout-number {
            font-size: 22px;
            /* Reducido para altura menor */
            color: #ffff00;
            font-weight: normal;
            /* Sin bold para igual grosor */
            display: block;
            width: 100%;
            text-align: right;
            box-sizing: border-box;
        }

        /* PLAY 10 / 20: más aire a la derecha en filas bajo el progresivo */
        #gameScreen[data-play-level="10"] .payout-panel-red .payout-row-red,
        #gameScreen[data-play-level="20"] .payout-panel-red .payout-row-red {
            padding-right: 22px;
        }

        #gameScreen[data-play-level="20"] .payout-panel-red .payout-row-red {
            padding-right: 26px;
        }

        /* PLAY 10/20: mismos 22px que el resto de importes */
        #gameScreen[data-play-level="10"] .payout-panel-red .payout-number,
        #gameScreen[data-play-level="20"] .payout-panel-red .payout-number {
            font-size: 22px;
            letter-spacing: 0;
        }

        /* Progresivo: 10000 + .81 pegados (sin hueco antes del punto), misma fuente 22px */
        .payout-number-progressive {
            white-space: nowrap;
            text-align: right;
        }

        .payout-number-progressive .prog-int,
        .payout-number-progressive .prog-dec {
            letter-spacing: 0;
            word-spacing: 0;
        }

        .payout-number-progressive .prog-dec {
            margin-left: -6px;
        }

        #gameScreen[data-play-level="10"] .payout-number-progressive .prog-dec,
        #gameScreen[data-play-level="20"] .payout-number-progressive .prog-dec {
            margin-left: -8px;
        }

        #gameScreen[data-play-level="10"] .payout-row-royal.payout-row-red,
        #gameScreen[data-play-level="20"] .payout-row-royal.payout-row-red {
            white-space: nowrap;
            overflow: hidden;
        }

        .payout-divider {
            width: 8px;
            /* Más grueso */
            background-color: #ffde00;
            border-left: 5px solid #000000;
            border-right: 5px solid #000000;
            box-sizing: content-box;
            flex-shrink: 0;
            z-index: 20;
        }

        .payout-panel-border {
            position: absolute;
            inset: 0;
            border: 5px solid #000000;
            pointer-events: none;
            z-index: 10;
        }

        /* TABLA DE PAGOS JACKS OR BETTER (tecla V) - Estructura limpia desde cero */
        #jacksOrBetterPayoutWrapper {
            display: none;
            position: absolute;
            top: 190px;
            left: 0;
            width: 100%;
            justify-content: center;
            align-items: flex-start;
        }

        #jacksOrBetterPayoutWrapper.visible {
            display: flex;
        }

        .payout-table-wrapper.hidden-for-jacks {
            display: none !important;
        }

        .jacks-payout-container {
            display: flex;
            gap: 15px;
            width: 1160px;
        }

        .jacks-payout-panel {
            display: flex;
            flex-direction: row;
            border: 5px solid #ffde00;
            position: relative;
            background-color: #000000;
            overflow: hidden;
            width: 572px;
            /* Uniforme con Double Bonus / tabla genérica */
            height: 228px;
            padding-top: 5px;
        }

        /* ÁREA DE CARTAS MÁS GRANDES Y MEJOR POSICIONADAS */
        .cards-container {
            position: absolute;
            bottom: 206px;
            /* Margen con CREDIT/WINNER; hueco tipo HELD hacia abajo */
            left: 0;
            width: 100%;
            display: flex !important;
            /* FORZAR DISPLAY */
            justify-content: center;
            align-items: center;
            gap: 15px;
            /* Espacio entre cartas ajustado */
            overflow: visible;
            /* IMPORTANTE: Cambiado de hidden a visible para ver "HELD" arriba */
            padding: 10px;
            /* Padding para que las esquinas redondeadas no se corten */
            visibility: visible !important;
            /* FORZAR VISIBILIDAD */
            opacity: 1 !important;
            /* FORZAR VISIBILIDAD */
            z-index: 50;
            /* Asegurar que esté visible */
        }

        .card-wrapper {
            position: relative;
            width: 230px;
            /* Un poco más pequeña para que quepa en los márgenes */
            height: 330px;
            /* Un poco más pequeña para mantener proporción */
            flex-shrink: 0;
            display: block !important;
            /* FORZAR VISIBILIDAD */
            visibility: visible !important;
            /* FORZAR VISIBILIDAD */
            overflow: visible;
            /* Permitir que las esquinas redondeadas se vean */
        }

        .card {
            width: 100%;
            height: 100%;
            border-radius: 12px !important;
            /* Forzar border-radius en todas las cartas */
            border: 4px solid #000;
            box-shadow: 0 6px 12px rgba(0, 0, 0, 0.6);
            /* cursor: pointer; ELIMINADO */
            background-size: 100% 100%;
            /* FORZADO para llenar todo el contenedor */
            background-position: center;
            background-repeat: no-repeat;
            transform-style: preserve-3d;
            transform: rotateY(0deg) scale(1) !important;
            /* TAMAÑO CONSTANTE SIEMPRE - FORZADO */
            display: block !important;
            /* FORZAR VISIBILIDAD */
            visibility: visible !important;
            /* FORZAR VISIBILIDAD */
            opacity: 1 !important;
            /* FORZAR VISIBILIDAD */
            overflow: hidden;
            /* Asegurar que el contenido respete el border-radius */
        }

        .card:hover {
            transform: translateY(-8px) scale(1.05);
            /* Efecto hover más pronunciado */
        }

        /* Dorso de la carta - MANTIENE MISMO TAMAÑO */
        .card-back {
            background-image: url('CARTAS NORMALES/ESPALDA.png');
            width: 100% !important;
            height: 100% !important;
            border-radius: 12px !important;
            /* Forzar border-radius en todas las cartas de espalda */
            border: 4px solid #000;
            box-shadow: 0 6px 12px rgba(0, 0, 0, 0.6);
            transform: rotateY(0deg) scale(1) !important;
            background-size: 100% 100% !important;
            background-repeat: no-repeat !important;
            background-position: center !important;
            display: block !important;
            visibility: visible !important;
            opacity: 1 !important;
            overflow: hidden;
            /* Asegurar que el contenido respete el border-radius */
            /* TAMAÑO CONSTANTE SIEMPRE - FORZADO */
        }

        /* Frente de la carta - MANTIENE MISMO TAMAÑO */
        .card-front {
            width: 100% !important;
            height: 100% !important;
            border-radius: 12px !important;
            /* Forzar border-radius en todas las cartas del frente */
            transform: rotateY(0deg) scale(1) !important;
            overflow: hidden;
            /* Asegurar que el contenido respete el border-radius */
            /* TAMAÑO CONSTANTE SIEMPRE - FORZADO */
        }

        /* Animación de rotación. Capa propia para evitar flash/parpadeo. */
        .card.flipping {
            animation: flipCard 0.08s ease-in-out forwards;
            will-change: transform;
            backface-visibility: hidden;
            -webkit-backface-visibility: hidden;
        }

        @keyframes flipCard {
            0% {
                transform: rotateY(0deg) scale(1) !important;
            }

            50% {
                transform: rotateY(90deg) scale(1) !important;
            }

            100% {
                transform: rotateY(0deg) scale(1) !important;
            }
        }

        .card-held {
            position: absolute;
            top: -30px;
            /* Subido más para despegar de la carta */
            left: 50%;
            transform: translateX(-50%);
            background-color: transparent;
            color: #DEFFDE;
            padding: 0;
            border-radius: 0;
            font-weight: normal;
            font-size: 30px;
            /* Igualar tamaños */
            z-index: 50;
            border: none;
            white-space: nowrap;
            /* display: none; Quitado para manejarlo individualmente si se requiere, pero .card-held lo tiene */
            text-shadow: 4px 4px 0px #000000;
            pointer-events: none;
        }

        .dealer-label {
            position: absolute;
            top: -30px;
            left: 50%;
            transform: translateX(-50%);
            font-family: 'Press Start 2P', 'Courier New', monospace;
            font-size: 30px;
            color: #DEFFDE;
            text-shadow: 4px 4px 0px #000000;
            z-index: 50;
            display: none;
            /* Quitamos el !important para permitir que JS lo muestre */
            visibility: hidden;
            pointer-events: none;
            white-space: nowrap;
            border: none;
            background-color: transparent;
            padding: 0;
            border-radius: 0;
            font-weight: normal;
        }

        .card-held {
            display: none;
        }

        .dealer-label {
            position: absolute;
            top: -30px;
            left: 50%;
            transform: translateX(-50%);
            font-family: 'Press Start 2P', 'Courier New', monospace;
            font-size: 30px;
            color: #DEFFDE;
            text-shadow: 4px 4px 0px #000000;
            z-index: 50;
            display: none;
            visibility: hidden;
            pointer-events: none;
            white-space: nowrap;
            border: none;
            background-color: transparent;
            padding: 0;
            border-radius: 0;
            font-weight: normal;
        }



        /* Display de créditos estilo 8 bits - Intercambiado con imagen Menú */
        .credits-display-container {
            position: absolute;
            bottom: 152px;
            /* Un poco bajo las cartas, hueco tipo HELD */
            left: 50%;
            transform: translateX(-50%);
            margin-left: 0;
            /* Centrado real para usar width completo */
            width: 1210px;
            /* Ancho exacto del bloque de cartas (5*230 + 4*15) */
            display: none;
            /* Oculto por defecto */
            flex-direction: column;
            align-items: flex-end;
            /* Alineado al borde derecho (Límite Carta 5) */
            padding-right: 0;
            z-index: 200;
            animation: none;
            opacity: 1;
        }

        /* Mostrar créditos solo cuando el juego está activo */
        #gameScreen.active .credits-display-container {
            display: flex;
        }

        /* Display de créditos en el menú principal */
        /* CONTENEDOR DE INFO MENÚ (CREDITS / PAID) - CORREGIDO */
        /* CONTENEDOR DE INFO MENÚ (CREDITS / PAID) - CORREGIDO */
        /* Usamos IDs específicos con !important para forzar la posición pase lo que pase */
        #menuCreditsContainer,
        #menuPaidContainer,
        .menu-info-container {
            position: absolute !important;
            top: 55% !important;
            /* Mas abajo (antes 40%) */
            left: 85% !important;
            /* A LA DERECHA */
            transform: translate(-50%, -50%) !important;
            display: flex;
            flex-direction: column;
            align-items: center;
            z-index: 9999 !important;
            pointer-events: none;
        }

        .menu-info-label {
            font-family: 'Press Start 2P', 'Courier New', monospace;
            font-size: 27px;
            color: #DEFFDE;
            margin-bottom: 5px;
            text-shadow: 2px 2px 0 #000;
        }

        .menu-info-value {
            font-family: 'Press Start 2P', 'Courier New', monospace;
            font-size: 33px;
            color: #DEFFDE;
            text-shadow: 2px 2px 0 #000;
        }

        /* Regla antigua desactivada */
        #menuScreen .credits-display-container {
            display: none !important;
        }

        .credits-label {
            font-size: 22px;
            color: #DEFFDE;
            line-height: 1;
            margin-bottom: 2px;
        }

        .credits-value {
            font-size: 24px;
            color: #DEFFDE;
            line-height: 1;
            margin-top: 4px;
        }

        /* Indicador de menú (imagen de cartas) - Intercambiado con Credits */
        .menu-indicator {
            position: absolute;
            bottom: 118px;
            /* Un poco más abajo para no montarse sobre las cartas */
            left: 50%;
            transform: translateX(-50%);
            margin-left: 350px;
            /* Movido más a la derecha (mejor centrado bajo cartas 4y5) */
            height: 85px;
            width: auto;
            object-fit: contain;
            display: none;
            animation: blink-menu 2s ease-in-out infinite;
        }

        /* Mostrar solo en estado BETTING */
        .menu-indicator.show {
            display: block;
        }

        @keyframes blink-menu {

            0%,
            49% {
                opacity: 1;
            }

            50%,
            99% {
                opacity: 0;
            }

            100% {
                opacity: 1;
            }
        }

        /* CONTENEDOR DE INFORMACIÓN DEL MENÚ (CREDIT / PAID) */
        .menu-info-container {
            position: absolute;
            top: 65%;
            /* Altura media-baja */
            right: 5%;
            /* Alineado a la derecha */
            display: flex;
            /* Flex para alinear label y valor */
            flex-direction: column;
            align-items: flex-end;
            /* Alinear a la derecha */
            z-index: 20;
        }

        .menu-info-label {
            font-family: 'Press Start 2P', monospace;
            font-size: 27px;
            color: #DEFFDE;
            margin-bottom: 5px;
            text-transform: uppercase;
        }

        .menu-info-value {
            font-family: 'Press Start 2P', monospace;
            font-size: 33px;
            color: #DEFFDE;
        }

        /* Indicador de monedas 2 (COINS / IN 5) */
        /* Eliminamos estilo duplicado si existe */

        /* Indicador de monedas (COINS 5) */
        .coins-indicator {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            margin-top: 132px;
            font-family: 'Press Start 2P', 'Courier New', monospace;
            font-size: 42px;
            letter-spacing: 0.5px;
            line-height: 0.92;
            color: #b30000;
            -webkit-text-stroke: 0;
            text-shadow:
                -3px -3px 0 #ffde00,
                3px -3px 0 #ffde00,
                -3px 3px 0 #ffde00,
                3px 3px 0 #ffde00,
                -3px 0 0 #ffde00,
                3px 0 0 #ffde00,
                0 -3px 0 #ffde00,
                0 3px 0 #ffde00,
                -2px -2px 0 #ffde00,
                2px -2px 0 #ffde00,
                -2px 2px 0 #ffde00,
                2px 2px 0 #ffde00,
                -2px 0 0 #ffde00,
                2px 0 0 #ffde00,
                0 -2px 0 #ffde00,
                0 2px 0 #ffde00;
            text-rendering: optimizeSpeed;
            -webkit-font-smoothing: none;
            -moz-osx-font-smoothing: unset;
            font-smooth: never;
            text-align: center;
            white-space: nowrap;
            display: none;
            align-items: center;
            justify-content: center;
            gap: 14px;
            width: auto;
            padding: 3px 4px 2px 4px;
            background-color: #000000;
            border-top: 1px solid #000000;
            border-bottom: 1px solid #000000;
            animation: blink-menu 2s ease-in-out infinite;
            z-index: 300;
            pointer-events: none;
        }

        .coins-indicator .coins-chunk {
            display: inline-block;
            color: inherit;
            -webkit-text-stroke: 0;
            text-shadow: inherit;
            text-rendering: optimizeSpeed;
            -webkit-font-smoothing: none;
            -moz-osx-font-smoothing: unset;
            font-smooth: never;
        }

        .coins-indicator .coins-play {
            letter-spacing: 0;
        }

        .coins-indicator .coins-bet {
            margin: 0 20px;
        }

        .coins-indicator.show {
            display: inline-flex;
        }

        /* Texto COINS / IN 5 debajo de carta 1 */
        /* Texto COINS / IN 5 debajo de carta 1 */
        .coins-text-container {
            position: absolute;
            bottom: 152px;
            /* Misma altura que CREDIT / WINNER */
            left: 50%;
            transform: translateX(-50%);
            margin-left: 0;
            /* Centrado real para usar width completo */
            width: 1210px;
            /* Ancho exacto del bloque de cartas (5*230 + 4*15) */
            display: none;
            /* Oculto por defecto, visible por clase active */
            flex-direction: column;
            align-items: flex-start;
            /* Alineado al borde izquierdo (Límite Carta 1) */
            z-index: 200;
        }

        /* Mostrar SIEMPRE cuando el juego está activo (como CREDIT) */
        #gameScreen.active .coins-text-container {
            display: flex;
        }

        /* Texto WINNER PAID (Centro) */
        .winner-paid-container {
            position: absolute;
            bottom: 152px;
            /* Misma altura que CREDIT / COINS */
            left: 50%;
            transform: translateX(-50%);
            /* Centrado exacto */
            display: none;
            flex-direction: column;
            align-items: center;
            z-index: 200;
        }

        /* Mostrar SIEMPRE cuando el juego está activo */
        #gameScreen.active .winner-paid-container {
            display: flex;
        }

        .winner-text {
            font-size: 22px;
            color: #DEFFDE;
            line-height: 1;
            margin-bottom: 2px;
        }

        .paid-text {
            font-size: 24px;
            color: #DEFFDE;
            line-height: 1;
            margin-top: 4px;
        }

        .coins-text-label {
            font-size: 22px;
            color: #DEFFDE;
            line-height: 1;
            margin-bottom: 2px;
        }

        .coins-text-value {
            font-size: 24px;
            color: #DEFFDE;
            line-height: 1;
            margin-top: 4px;
        }



        /* Botones en esquinas de la pantalla; letras en el mismo sentido que el juego */
        .game-buttons {
            display: none;
            position: fixed;
            left: 0;
            right: 0;
            top: auto;
            bottom: calc(12px + env(safe-area-inset-bottom, 0px));
            transform: none;
            width: 100%;
            max-width: none;
            z-index: 50000;
            flex-direction: row;
            justify-content: space-between;
            align-items: flex-end;
            gap: 0;
            padding: 0 16px 0 28px;
            box-sizing: border-box;
            pointer-events: none;
        }

        body.touch-mode .game-buttons {
            display: flex;
            align-items: flex-end;
        }

        body.touch-mode .game-buttons .game-button {
            pointer-events: auto;
        }

        /* Vertical: el juego rota 90° → botones al lado, misma rotación (letras horizontales al juego) */
        body.touch-mode.touch-portrait .game-buttons {
            left: calc(18px + env(safe-area-inset-left, 0px));
            right: auto;
            top: 50%;
            bottom: auto;
            width: calc(100vh - 16px);
            padding: 0 56px 0 32px;
            transform: translate(-50%, -50%) rotate(90deg);
            transform-origin: center center;
        }

        .game-button {
            flex: 0 0 auto;
            width: auto;
            min-width: 70px;
            min-height: 28px;
            height: 28px;
            border: 2px solid #ffde00;
            background: linear-gradient(180deg, #1a5a1a 0%, #0a2e0a 100%);
            color: #DEFFDE;
            font-family: 'Press Start 2P', 'Courier New', monospace;
            font-size: 10px;
            letter-spacing: 1px;
            line-height: 1;
            white-space: nowrap;
            writing-mode: horizontal-tb !important;
            text-orientation: mixed !important;
            direction: ltr;
            text-shadow: 1px 1px 0 #000;
            cursor: pointer;
            user-select: none;
            -webkit-user-select: none;
            touch-action: manipulation;
            border-radius: 4px;
            box-shadow: 0 2px 0 #000, inset 0 1px 0 rgba(255, 255, 255, 0.12);
            padding: 0 10px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        .game-button-left-col {
            order: 1;
            display: flex;
            flex-direction: column;
            align-items: stretch;
            gap: 8px;
            position: relative;
            left: -18px;
            pointer-events: auto;
        }

        /* Selector PLAY: deslizar el botón activo; los demás apagados */
        .play-slide {
            width: 86px;
            height: 108px;
            border: 2px solid #555;
            border-radius: 8px;
            background: #0a0a0a;
            box-shadow: inset 0 0 10px #000;
            overflow: hidden;
            touch-action: none;
            user-select: none;
            -webkit-user-select: none;
        }
        .play-slide.is-locked {
            opacity: 0.55;
        }
        .play-slide-track {
            position: relative;
            width: 100%;
            height: 100%;
        }
        .play-slide-mark {
            position: absolute;
            left: 0;
            right: 0;
            height: 36px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-family: 'Press Start 2P', 'Courier New', monospace;
            font-size: 9px;
            color: #3a3a3a;
            pointer-events: none;
            letter-spacing: 0;
        }
        .play-slide-mark[data-play="5"] { top: 0; }
        .play-slide-mark[data-play="10"] { top: 36px; }
        .play-slide-mark[data-play="20"] { top: 72px; }
        .play-slide-mark.is-on {
            color: #666;
        }
        .play-slide-thumb {
            position: absolute;
            left: 3px;
            right: 3px;
            width: auto;
            height: 30px;
            top: 3px;
            margin: 0;
            padding: 0 4px;
            border: 2px solid #ffde00;
            border-radius: 5px;
            background: linear-gradient(180deg, #2a6a2a 0%, #0e3010 100%);
            color: #DEFFDE;
            font-family: 'Press Start 2P', 'Courier New', monospace;
            font-size: 8px;
            letter-spacing: 0;
            line-height: 1;
            white-space: nowrap;
            cursor: grab;
            touch-action: none;
            box-shadow: 0 2px 0 #000, 0 0 8px rgba(255, 222, 0, 0.25);
            z-index: 2;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .play-slide-thumb:active,
        .play-slide-thumb.is-dragging {
            cursor: grabbing;
            filter: brightness(1.08);
        }

        .game-button-menu {
            width: 86px;
            min-width: 86px;
            min-height: 32px;
            height: 32px;
            padding: 0 6px;
            font-size: 10px;
            letter-spacing: 1px;
            align-self: stretch;
        }

        .game-button-back {
            display: none !important;
        }

        .game-button-deal {
            order: 2;
            margin-left: auto;
            margin-right: 10px;
            position: relative;
            left: 0;
            align-self: flex-end;
            min-width: 96px;
            width: auto;
            padding: 0 14px;
            min-height: 34px;
            height: 34px;
            font-size: 11px;
            letter-spacing: 1px;
        }

        /* COBRAR solo vive en el lobby; ocultar restos si aparecen */
        body.touch-mode #collectButton { display: none !important; }

        .game-button:active,
        .game-button.is-pressed {
            transform: translateY(2px);
            box-shadow: 0 1px 0 #000, inset 0 2px 0 rgba(0, 0, 0, 0.25);
        }

        body.touch-mode.touch-portrait .game-button:active,
        body.touch-mode.touch-portrait .game-button.is-pressed {
            transform: translateY(2px);
        }

        .game-button:disabled,
        .game-button.is-disabled {
            opacity: 0.45;
            pointer-events: none;
        }

        body.touch-mode .card,
        body.touch-mode .card-wrapper {
            cursor: pointer;
            touch-action: manipulation;
        }

        body.touch-mode .card:hover {
            transform: rotateY(0deg) scale(1) !important;
        }

        body.touch-mode .menu-indicator {
            pointer-events: auto !important;
            cursor: pointer;
            touch-action: manipulation;
            z-index: 450;
            /* Un poco más grande: fácil de tocar en celular, sin tapar la mesa */
            bottom: 100px;
            height: 112px;
            padding: 8px 16px 16px;
            margin-bottom: -16px;
            box-sizing: content-box;
            -webkit-tap-highlight-color: transparent;
        }

        body.touch-mode .menu-indicator.show {
            /* Evita que el parpadeo “apague” el toque en algunos móviles */
            animation: blink-menu-touch 2s ease-in-out infinite;
        }

        body.touch-mode .menu-indicator.hidden-in-double-up {
            display: none !important;
        }

        @keyframes blink-menu-touch {
            0%, 49% { opacity: 1; }
            50%, 99% { opacity: 0; }
            100% { opacity: 1; }
        }

        body.touch-mode .card-overlay-image {
            pointer-events: auto !important;
            cursor: pointer;
            touch-action: manipulation;
            z-index: 460;
            /* Zona táctil más cómoda bajo la carta */
            min-height: 110px;
            padding: 10px 0;
            bottom: -60px;
        }

        body.touch-mode #yesOverlay,
        body.touch-mode #noOverlay {
            filter: drop-shadow(0 0 6px rgba(255, 222, 0, 0.35));
        }

        /* En oferta de doblete, toda la carta 1 y 5 son zona táctil */
        body.touch-mode #cardWrapper0,
        body.touch-mode #cardWrapper4 {
            z-index: 55;
        }

        /* Lista fea de botones: ya no se usa (hitboxes sobre title_screen) */
        .menu-game-list {
            display: none !important;
        }

        .menu-game-btn {
            display: none !important;
        }

        /* En menú touch: sin padding extra (las flechas del arte son el selector) */
        body.touch-mode #menuScreen {
            padding-bottom: 0;
        }

        /* Restaurar posición gabinete de SELECT GAME / royal en touch */
        body.touch-mode .selec-game {
            top: 57.2%;
        }

        body.touch-mode .menu-royal-fixed,
        body.touch-mode .menu-royal-progressive {
            top: 65%;
        }

        .background-fallback {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: #000000;
            z-index: -1;
        }



        /* ---------------------------------------------------------
           ESTILOS DEL DOBLETE (DOUBLE UP)
           --------------------------------------------------------- */

        /* YOU HAVE WON / DOUBLE UP TO (debajo de cartas): hijo directo de #gameScreen para quedar por encima de las cartas */
        .double-up-info-below-cards {
            position: absolute;
            bottom: 152px;
            left: 50%;
            transform: translateX(-50%);
            text-align: center;
            width: 100%;
            display: none;
            z-index: 55;
            pointer-events: none;
        }

        .double-up-info-below-won {
            font-size: 24px;
            margin-bottom: 12px;
            letter-spacing: 2px;
            color: #DEFFDE;
        }

        .double-up-info-below-next {
            font-size: 24px;
            color: #DEFFDE;
            letter-spacing: 2px;
        }

        .double-up-info-below-cards span {
            color: #DEFFDE;
        }

        .double-up-container {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            /* Fondo transparente para no oscurecer nada */
            background: transparent;
            display: none;
            flex-direction: column;
            align-items: center;
            z-index: 40;
            /* Debajo de las cartas (que son z-index 50) */
            pointer-events: none;
            /* Permitir clicks a través del contenedor hacia las cartas */
        }

        .double-up-container.active {
            display: flex;
        }

        .double-up-info-area {
            position: absolute;
            top: 190px;
            /* Bloque doblete (créditos, instrucciones, DOUBLE UP?) un poco más abajo */
            width: 100%;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: flex-start;
            /* Alineación superior */
            gap: 10px;
            pointer-events: none;
            z-index: 210;
        }

        /* Clase para ocultar elementos durante el doblete */
        .hidden-in-double-up {
            display: none !important;
        }

        .double-up-game-title {
            font-family: 'Press Start 2P', cursive;
            font-size: 42px;
            color: #ff0000;
            text-shadow:
                -2px -2px 0 #ffff00,
                2px -2px 0 #ffff00,
                -2px 2px 0 #ffff00,
                2px 2px 0 #ffff00,
                4px 4px 0 #000;
            margin-bottom: 5px;
        }

        .double-up-instructions {
            font-family: 'Press Start 2P', cursive;
            font-size: 16px;
            color: #ffffff;
            text-align: center;
            line-height: 1.8;
            text-shadow: 2px 2px 0px #000;
            margin-bottom: 30px;
        }

        .double-up-instructions>div {
            margin-bottom: 5px;
        }

        .you-have-won-text {
            font-family: 'Press Start 2P', cursive;
            font-size: 32px;
            color: #ff0000;
            /* Red */
            text-shadow:
                -2px -2px 0 #ffff00,
                2px -2px 0 #ffff00,
                -2px 2px 0 #ffff00,
                2px 2px 0 #ffff00,
                4px 4px 0 #000;
            /* Borde interior amarillo y sombra negra */
            margin-bottom: 5px;
        }

        /* DOUBLE UP centrado con parpadeo y signo de interrogación */
        /* DOUBLE UP centrado con parpadeo y signo de interrogación */
        .double-up-title-fixed {
            font-family: 'Press Start 2P', cursive;
            font-size: 70px;
            color: #ff0000;
            /* Red */
            text-shadow:
                -2px -2px 0 #ffff00,
                2px -2px 0 #ffff00,
                -2px 2px 0 #ffff00,
                2px 2px 0 #ffff00,
                4px 4px 0 #000;
            text-align: center;
            margin-bottom: 10px;
            animation: blink-double-up-title 2s ease-in-out infinite;
            /* Parpadeo: un segundo sí, un segundo no */
        }

        .double-up-title-fixed.small {
            font-size: 42px;
        }

        @keyframes blink-double-up-title {

            0%,
            50% {
                opacity: 1;
            }

            51%,
            100% {
                opacity: 0;
            }
        }

        .double-up-amount-text {
            font-family: 'Press Start 2P', cursive;
            font-size: 20px;
            color: #ffffff;
            text-align: center;
            text-shadow: 2px 2px 0px #000;
            margin-bottom: 20px;
            line-height: 1.6;
        }

        .double-up-amount-text span {
            display: block;
            margin-top: 5px;
            font-size: 24px;
        }


        /* Estilo para SELECT A CARD */
        .double-up-message {
            font-family: 'Press Start 2P', cursive;
            font-size: 36px;
            color: #ff0000;
            text-shadow:
                -2px -2px 0 #ffff00,
                2px -2px 0 #ffff00,
                -2px 2px 0 #ffff00,
                2px 2px 0 #ffff00,
                4px 4px 0 #000;
            margin-top: 20px;
        }

        @keyframes blink-select-card {

            0%,
            50% {
                opacity: 1;
            }

            51%,
            100% {
                opacity: 0;
            }
        }

        /* Imágenes YES/NO sobre las cartas */
        .card-overlay-image {
            position: absolute;
            top: auto;
            bottom: -50px;
            /* Debajo de la carta (doblete YES/NO) */
            /* Posición horizontal en IDs */
            width: 68%;
            height: 88px;
            max-height: none;
            max-width: none;
            object-fit: fill;
            pointer-events: none;
            z-index: 100;
            /* Aumentado de 60 por seguridad */
            display: none;
        }

        #noOverlay {
            left: 50%;
            transform: translateX(-50%);
            /* Centrado en carta 1 */
            right: auto;
        }

        #yesOverlay {
            left: 50%;
            transform: translateX(-50%);
            /* Centrado en carta 5 */
            right: auto;
        }

        @keyframes pulse-yes-no {

            0%,
            49% {
                opacity: 1;
            }

            50%,
            100% {
                opacity: 0;
            }
        }

        .card-overlay-image.animate {
            animation: pulse-yes-no 1s infinite steps(1);
        }

        /* Indicador de Mano Ganadora (Entre Tabla y Cartas) */
        .winning-hand-indicator {
            position: absolute;
            top: 388px;
            /* Por encima del nivel HELD; debajo de la tabla de pagos */
            left: 50%;
            transform: translateX(-50%);
            font-family: 'Press Start 2P', 'Courier New', monospace;
            font-size: 30px;
            color: #de0000;
            /* Rojo solicitado */
            text-shadow:
                -2px -2px 0 #ffff00,
                2px -2px 0 #ffff00,
                -2px 2px 0 #ffff00,
                2px 2px 0 #ffff00,
                4px 4px 0 #000000;
            /* Borde amarillo y sombra negra */
            z-index: 200;
            display: none;
            /* Oculto por defecto */
            white-space: nowrap;
            pointer-events: none;
            text-transform: uppercase;
        }

        /* Highlight para filas de la tabla - SUTIL (Solo texto cambia de color) */

        /* Forzar que el fondo no cambie incluso si hay reglas de especificidad */
        .payout-row-blue.payout-row-highlight {
            background-color: #000000 !important;
        }

        .payout-row-red.payout-row-highlight {
            background-color: #de0000 !important;
        }

        .payout-row-highlight .payout-text,
        .payout-row-highlight .payout-dots,
        .payout-row-highlight .payout-number {
            color: #DEFFDE !important;
            /* Texto color crédito (verde claro) */
        }
