/* ==========================================================================
   redesign-home-overrides.css — Phase 3b.1 (Task #62)
   --------------------------------------------------------------------------
   Visual pixel-match scoped to `body.cl-home-v3` only.
   Loaded AFTER cl-components.css and styles.css so cascade wins by source
   order (no `!important` except where neutralizing inline/legacy `style=`
   or `transform` from styles.css that ships with !important itself).
   --------------------------------------------------------------------------
   Goal: bring CoinLottery home into pixel parity with
         imagenes/redesign-reference/home-desktop-target.png
         while keeping CoinLottery brand (gold + midnight + purple).
   ========================================================================== */

/* --------------------------------------------------------------------------
   1) Body — kill the global purple BG.png pattern, keep flat midnight navy
   -------------------------------------------------------------------------- */
body.cl-home-v3 {
    background-image: none;
    background: #130022;
    color: var(--cl-color-text);
}

/* Color de fondo global del sitio (todas las páginas, no solo home v3). */
html,
body {
    background-color: #130022;
}

/* --------------------------------------------------------------------------
   2) Hero — 3-column layout: copy | illustration | jackpot card
      Reference: text left, 3D art center (prominent), jackpot card right
   -------------------------------------------------------------------------- */
body.cl-home-v3 section#home {
    padding: 0 !important;
    padding-top: 0 !important;
    background: #130022;
}
body.cl-home-v3 section#home > .home__container.bd-container.bd-grid,
body.cl-home-v3 .home__container {
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    grid-template-columns: none !important;
    min-height: 0 !important;
    align-content: normal !important;
    overflow: visible !important;
}
body.cl-home-v3 .home__data#anonymousContent {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
body.cl-home-v3 #anonymousContent > * {
    margin: 0 !important;
}
body.cl-home-v3 .cl-home-hero {
    padding: 48px 48px 24px 64px;
    /* La imagen del hero debe verse COMPLETA, sin recorte. Usamos
       background-size: contain con #130022 detrás para que el sólido
       rellene cualquier banda lateral/inferior cuando el ancho del
       contenedor no coincide con el aspect ratio del PNG (1488x719). */
    background:
        url('/imagenes/redesign/hero-bg.png') center center / contain no-repeat,
        #130022;
    min-height: 560px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    position: relative;
}
/* Mobile: la PNG en 'contain' quedaría diminuta y dejaría mucho aire
   vacío. Anclamos arriba y dejamos que ocupe todo el ancho (100% auto)
   para que se vea completa horizontalmente sin recorte lateral. */
@media (max-width: 768px) {
    body.cl-home-v3 .cl-home-hero {
        padding: 24px 16px 16px;
        min-height: auto;
        background:
            url('/imagenes/redesign/hero-bg.png') center top / 100% auto no-repeat,
            #130022;
    }
}
body.cl-home-v3 .cl-home-hero__inner {
    flex: 1 1 auto;
}
/* KPI strip integrated into the hero — FLOATING rounded card sitting on the
   hero background, with margins on all sides (per reference mockup). */
body.cl-home-v3 .cl-hero-kpi-overlay {
    width: 100%;
    max-width: var(--cl-container-max-wide);
    margin: 0 auto 24px;
    padding: 16px 28px;
    background: linear-gradient(180deg, rgba(20, 8, 40, 0.62) 0%, rgba(20, 8, 40, 0.82) 100%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(140, 60, 220, 0.22);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    position: relative;
    z-index: 2;
}
body.cl-home-v3 .cl-kpi-strip--inhero {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
body.cl-home-v3 .cl-kpi-strip--inhero .cl-kpi {
    background: transparent !important;
    border-radius: 0 !important;
    padding: 0 !important;
}
body.cl-home-v3 .cl-kpi-strip--inhero .cl-kpi::after {
    display: none !important;
}
@media (max-width: 768px) {
    body.cl-home-v3 .cl-hero-kpi-overlay {
        margin: 0 0 16px;
        padding: 14px 16px;
        border-radius: 14px;
    }
    body.cl-home-v3 .cl-kpi-strip--inhero { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}
body.cl-home-v3 .cl-home-hero__inner {
    max-width: var(--cl-container-max-wide);
    width: 100%;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.2fr) minmax(0, 0.85fr);
    gap: 24px;
    align-items: center;
}
body.cl-home-v3 .cl-home-hero__art {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    overflow: visible;
    align-self: center;
}
body.cl-home-v3 .cl-home-hero__art {
    position: relative;
}
body.cl-home-v3 .cl-home-hero__art::before {
    display: none;
}
body.cl-home-v3 .cl-home-hero__illustration {
    display: none;
}
body.cl-home-v3 .cl-home-hero__jackpot-col {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    align-self: flex-start;
    padding-top: 16px;
}
body.cl-home-v3 .cl-home-hero__jackpot-col > .cl-jackpot-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 400px;
    padding: 18px 22px 20px;
    background: rgba(20, 8, 40, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(140, 60, 220, 0.28);
    border-radius: 18px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    gap: 14px;
    display: flex;
    flex-direction: column;
}
body.cl-home-v3 .cl-jackpot-card__tabs {
    display: flex;
    gap: 0;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(140, 60, 220, 0.25);
}
body.cl-home-v3 .cl-jackpot-tab {
    flex: 1;
    padding: 8px 6px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.5);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: color 200ms, border-color 200ms;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    white-space: nowrap;
    font-family: inherit;
}
body.cl-home-v3 .cl-jackpot-tab:hover:not(:disabled) {
    color: rgba(255,255,255,0.8);
}
body.cl-home-v3 .cl-jackpot-tab.active {
    color: var(--cl-color-primary);
    border-bottom-color: var(--cl-color-primary);
}
body.cl-home-v3 .cl-jackpot-tab--locked {
    opacity: 0.45;
    cursor: not-allowed;
}
body.cl-home-v3 .cl-jackpot-tab--locked .cl-icon {
    width: 10px;
    height: 10px;
}
body.cl-home-v3 .cl-jackpot-card__panel {
    display: none;
}
body.cl-home-v3 .cl-jackpot-card__panel.cl-jackpot-card__panel--active {
    display: block;
}
body.cl-home-v3 .cl-jackpot-card__panel--empty.cl-jackpot-card__panel--active {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 160px;
}
body.cl-home-v3 .cl-jackpot-card__locked-msg {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.4);
    text-align: center;
}
body.cl-home-v3 .cl-jackpot-card__locked-msg .cl-icon {
    width: 28px;
    height: 28px;
    opacity: 0.5;
}
body.cl-home-v3 .cl-jackpot-card__locked-msg p {
    font-size: 12px;
    margin: 0;
}
/* Login prompt shown inside Wallet Lotería / Wallet Casino tabs when logged out */
body.cl-home-v3 .cl-jackpot-card__login-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    min-height: 200px;
    padding: 20px 12px;
    color: rgba(255,255,255,0.65);
}
body.cl-home-v3 .cl-jackpot-card__login-prompt .cl-icon {
    width: 36px;
    height: 36px;
    color: rgba(244, 197, 66, 0.8);
}
body.cl-home-v3 .cl-jackpot-card__login-prompt p {
    font-size: 13px;
    margin: 0;
    line-height: 1.4;
}
body.cl-home-v3 .cl-jackpot-card__login-prompt .cl-btn {
    margin-top: 4px;
    padding: 8px 18px;
    font-size: 13px;
    border-radius: 10px;
    background: var(--cl-gradient-gold, linear-gradient(180deg, #F4C542 0%, #D7A73A 100%));
    color: #2A0E48;
    font-weight: 700;
    border: none;
    cursor: pointer;
}

/* Wallet / Casino accordion compacted inside jackpot tab panel */
body.cl-home-v3 .cl-jackpot-card__panel .wallet-accordion.cl-tab-wallet {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
    width: 100%;
    max-width: 100%;
}
body.cl-home-v3 .cl-jackpot-card__panel .wallet-accordion.cl-tab-wallet .wallet-accordion-header {
    display: none;
}
body.cl-home-v3 .cl-jackpot-card__panel .wallet-accordion.cl-tab-wallet .wallet-accordion-body {
    padding: 0;
    max-height: none;
    overflow: visible;
}
body.cl-home-v3 .cl-jackpot-card__panel .wallet-accordion.cl-tab-wallet .balance-card {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
    max-width: 100%;
}
body.cl-home-v3 .cl-jackpot-card__panel .wallet-accordion.cl-tab-wallet .wallet-balance-header {
    margin-bottom: 8px;
}
body.cl-home-v3 .cl-jackpot-card__panel .wallet-accordion.cl-tab-wallet .wallet-secondary-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    flex-wrap: nowrap;
    justify-content: stretch;
}
body.cl-home-v3 .cl-jackpot-card__panel .wallet-accordion.cl-tab-wallet .wallet-mini-btn {
    flex: 0 1 auto;
    min-width: 0;
    width: 100%;
    padding: 7px 6px;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    white-space: nowrap;
}
body.cl-home-v3 .cl-jackpot-card__panel .wallet-accordion.cl-tab-wallet .wallet-mini-btn i {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}
body.cl-home-v3 .cl-jackpot-card__panel .wallet-accordion.cl-tab-wallet .token-row {
    padding: 8px 10px;
    margin-bottom: 4px;
}
body.cl-home-v3 .cl-jackpot-card__panel .wallet-accordion.cl-tab-wallet .token-icon-img {
    width: 28px;
    height: 28px;
}
body.cl-home-v3 .cl-jackpot-card__panel .wallet-accordion.cl-tab-wallet .token-name {
    font-size: 13px;
}
body.cl-home-v3 .cl-jackpot-card__panel .wallet-accordion.cl-tab-wallet .token-fullname {
    font-size: 10px;
}
body.cl-home-v3 .cl-jackpot-card__panel .wallet-accordion.cl-tab-wallet .token-amount {
    font-size: 12px;
}
body.cl-home-v3 .cl-jackpot-card__panel .wallet-accordion.cl-tab-wallet .token-usd {
    font-size: 10px;
}
body.cl-home-v3 .cl-jackpot-card__panel .wallet-accordion.cl-tab-wallet .wallet-quick-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-top: 8px;
}
body.cl-home-v3 .cl-jackpot-card__panel .wallet-accordion.cl-tab-wallet .quick-action-btn {
    padding: 8px 4px;
    font-size: 10px;
}
body.cl-home-v3 .cl-jackpot-card__panel .wallet-accordion.cl-tab-wallet .quick-action-icon {
    width: 28px;
    height: 28px;
}
body.cl-home-v3 .cl-jackpot-card__panel .wallet-accordion.cl-tab-wallet .wallet-payment-methods,
body.cl-home-v3 .cl-jackpot-card__panel .wallet-accordion.cl-tab-wallet .card-logos-external {
    margin-top: 10px;
    gap: 8px;
    justify-content: center;
}
body.cl-home-v3 .cl-jackpot-card__panel .wallet-accordion.cl-tab-wallet .payment-logo,
body.cl-home-v3 .cl-jackpot-card__panel .wallet-accordion.cl-tab-wallet .card-logo-img {
    height: 18px;
    max-height: 18px;
    width: auto;
}
body.cl-home-v3 .cl-jackpot-card__panel .wallet-accordion.cl-tab-wallet .balance-card-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    margin-top: 8px;
}
body.cl-home-v3 .cl-jackpot-card__panel .wallet-accordion.cl-tab-wallet .balance-action-btn {
    padding: 8px 6px;
    font-size: 11px;
}
body.cl-home-v3 .cl-jackpot-card__panel .wallet-accordion.cl-tab-wallet .balance-amount-main {
    font-size: 28px;
}
body.cl-home-v3 .cl-jackpot-card__panel .wallet-accordion.cl-tab-wallet .balance-card-header {
    display: none;
}
body.cl-home-v3 .cl-jackpot-card__panel .wallet-accordion.cl-tab-wallet .balance-card-body {
    margin-bottom: 8px;
    text-align: center;
}
body.cl-home-v3 .cl-jackpot-card__header {
    gap: 8px;
    flex-wrap: nowrap !important;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}
body.cl-home-v3 .cl-jackpot-card__title {
    font-size: 13px !important;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    text-transform: none !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
    flex-shrink: 0;
    margin: 0;
}
body.cl-home-v3 .cl-jackpot-card__currency-toggle {
    flex-shrink: 0;
    display: inline-flex;
    background: rgba(255,255,255,0.06);
    border-radius: 999px;
    padding: 2px;
    gap: 0;
}
body.cl-home-v3 .cl-jackpot-card__currency-toggle button {
    font-size: 11px;
    padding: 4px 12px;
    font-weight: 700;
    border-radius: 999px;
    background: transparent;
    color: rgba(255,255,255,0.55);
    border: none;
    cursor: pointer;
    transition: all 200ms;
}
body.cl-home-v3 .cl-jackpot-card__currency-toggle button[aria-pressed="true"] {
    background: var(--cl-gradient-gold, linear-gradient(180deg, #F4C542 0%, #D7A73A 100%));
    color: #2A0E48;
}
body.cl-home-v3 .cl-jackpot-card__amount-wrap {
    gap: 6px;
    align-items: flex-start;
    text-align: left;
    margin-bottom: 2px;
}
body.cl-home-v3 .cl-jackpot-card__amount {
    font-size: 48px;
    line-height: 1;
    font-weight: 800;
    background: var(--cl-gradient-gold, linear-gradient(180deg, #F4C542 0%, #D7A73A 100%));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    letter-spacing: -0.02em;
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
}
body.cl-home-v3 .cl-jackpot-card__amount-suffix {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255,255,255,0.55);
    background: none;
    -webkit-text-fill-color: rgba(255,255,255,0.55);
}
body.cl-home-v3 .cl-jackpot-card__see-all {
    margin-top: 4px;
    font-size: 12px;
    color: rgba(255,255,255,0.6);
    font-weight: 500;
}
body.cl-home-v3 .cl-jackpot-card__see-all-link {
    margin-top: 4px;
    font-size: 13px;
    text-align: center;
    color: var(--cl-color-primary, #F4C542);
    text-decoration: none;
    font-weight: 600;
}
body.cl-home-v3 .cl-jackpot-card__see-all-link:hover { text-decoration: underline; }

body.cl-home-v3 .cl-home-hero__copy .cl-pill {
    align-self: flex-start;
    width: fit-content;
}
body.cl-home-v3 .cl-home-hero__copy {
    gap: 16px;
    padding-left: 40px;
}
body.cl-home-v3 .cl-home-hero__title {
    font-size: clamp(28px, 3.5vw, 44px);
    line-height: 1.1;
    letter-spacing: -0.02em;
}
body.cl-home-v3 .cl-home-hero__title-accent {
    background: var(--cl-gradient-gold);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
body.cl-home-v3 .cl-home-hero__subtitle { max-width: 420px; font-size: 14px; line-height: 1.5; color: rgba(255,255,255,0.75); }

body.cl-home-v3 .cl-hero-cta-main {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 700;
    border-radius: var(--cl-radius-pill);
    background: var(--cl-gradient-gold);
    color: #1a0a2e;
    border: none;
    box-shadow: 0 4px 16px rgba(255, 215, 0, 0.3);
}
body.cl-home-v3 .cl-hero-cta-main .cl-icon {
    width: 18px;
    height: 18px;
    transition: transform 200ms ease;
}
body.cl-home-v3 .cl-hero-cta-main:hover {
    box-shadow: 0 6px 24px rgba(255, 215, 0, 0.45);
    transform: translateY(-1px);
}
body.cl-home-v3 .cl-hero-cta-main:hover .cl-icon {
    transform: translateX(3px);
}

body.cl-home-v3 .cl-jackpot-card__countdown {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 4px 0 2px;
}
body.cl-home-v3 .cl-jackpot-card__countdown .cl-countdown-cell {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(140, 60, 220, 0.18);
    border-radius: 10px;
    padding: 10px 6px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}
body.cl-home-v3 .cl-countdown-cell__value {
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
    color: var(--cl-color-primary, #F4C542);
    letter-spacing: -0.01em;
}
body.cl-home-v3 .cl-countdown-cell__label {
    font-size: 10px;
    font-weight: 500;
    color: rgba(255,255,255,0.55);
    text-transform: none;
    letter-spacing: 0;
}
body.cl-home-v3 .cl-jackpot-card .cl-btn--primary.cl-btn--block {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 4px;
}

@media (max-width: 1024px) {
    body.cl-home-v3 .cl-home-hero__inner {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }
    body.cl-home-v3 .cl-home-hero__art { display: none; }
    body.cl-home-v3 .cl-home-hero__jackpot-col { justify-content: center; }
    body.cl-home-v3 .cl-home-hero__copy { padding-left: 0; }
}
@media (max-width: 768px) {
    body.cl-home-v3 .cl-home-hero { padding: 32px 16px 40px; min-height: auto; }
    body.cl-home-v3 .cl-home-hero__inner { grid-template-columns: 1fr; gap: 24px; }
    body.cl-home-v3 .cl-home-hero__jackpot-col { justify-content: center; }
    body.cl-home-v3 .cl-home-hero__jackpot-col > .cl-jackpot-card { max-width: 100%; }
}

/* --------------------------------------------------------------------------
   3) Header — neutralize legacy transform:scale(1.7) on .header-logo and
      reorder cluster to: balance · lang · pwa · login · register
   -------------------------------------------------------------------------- */
body.cl-home-v3 .cl-home-header {
    background: rgba(26, 10, 46, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(140, 60, 220, 0.15);
}
body.cl-home-v3 .cl-home-header__brand { display: inline-flex; align-items: center; }
body.cl-home-v3 .cl-home-header__brand img,
body.cl-home-v3 .cl-home-header .header-logo {
    /* Logo asset is a 2000×2000 square con mucho padding transparente.
       Subimos la altura del bounding box para que el wordmark "CoinLottery"
       se lea con claridad en el header. */
    transform: none;
    height: 96px;
    width: auto;
    max-width: 280px;
    margin: -16px 0;
    display: block;
    object-fit: contain;
}
@media (max-width: 768px) {
    body.cl-home-v3 .cl-home-header__brand img,
    body.cl-home-v3 .cl-home-header .header-logo {
        height: 72px;
        max-width: 200px;
        margin: -10px 0;
    }
}

/* Cluster order */
body.cl-home-v3 .cl-home-header__actions { gap: 10px; }
body.cl-home-v3 .cl-home-header__balance-pill { order: 1; }
body.cl-home-v3 .cl-home-header__lang        { order: 2; }
body.cl-home-v3 .cl-home-header__pwa         { order: 3; width: 36px; height: 36px; }
body.cl-home-v3 .cl-home-header__cta-login,
body.cl-home-v3 .cl-home-header__cta-logout  { order: 4; }
body.cl-home-v3 .cl-home-header__cta-register { order: 5; }
body.cl-home-v3 .cl-home-header__hamburger    { order: 6; }

/* Header buttons — rectangular with rounded corners per reference */
body.cl-home-v3 .cl-home-header__actions .cl-btn {
    border-radius: 8px;
    font-size: 13px;
    padding: 8px 18px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* "JUGAR AHORA" gold CTA — visible only when logged out */
body.cl-home-v3 .cl-home-header__cta-play {
    order: 3;
    background: var(--cl-gradient-gold);
    color: #1a0a2e;
    border: none;
    font-weight: 800;
    letter-spacing: 0.04em;
    padding: 8px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(255, 215, 0, 0.25);
    transition: box-shadow 200ms ease, transform 200ms ease;
}
body.cl-home-v3 .cl-home-header__cta-play:hover {
    box-shadow: 0 4px 16px rgba(255, 215, 0, 0.4);
    transform: translateY(-1px);
}
body.cl-home-v3[data-authed="true"] .cl-home-header__cta-play {
    display: none;
}

/* Login outlined, register solid gold (already by class but reinforce) */
body.cl-home-v3 .cl-home-header__cta-login.cl-btn--secondary {
    background: transparent;
    border: 1px solid var(--cl-color-border-strong);
    color: var(--cl-color-text);
    border-radius: 8px;
}
body.cl-home-v3 .cl-home-header__cta-login.cl-btn--secondary:hover {
    border-color: var(--cl-color-primary);
    color: var(--cl-color-primary);
}
body.cl-home-v3 .cl-home-header__cta-register {
    border-radius: 8px;
}

/* Header nav links → gold on hover */
/* ----------------------------------------------------------------
   MOBILE HEADER COMPACTING (≤640px)
   Antes mostraba: wallet pill + lang ES/EN + install + login/logout
   + register + hamburger → 5+ botones apretados en 390px haciendo
   que el monto de la wallet se truncara a "$340.". Ahora en móvil
   el header sólo lleva: brand · wallet pill (flex) · hamburger.
   El resto se mueve al drawer (.cl-drawer__utils + .cl-drawer__actions).
   ---------------------------------------------------------------- */
@media (max-width: 640px) {
    body.cl-home-v3 .cl-home-header__lang,
    body.cl-home-v3 .cl-home-header__pwa,
    body.cl-home-v3 .cl-home-header__cta-login,
    body.cl-home-v3 .cl-home-header__cta-logout,
    body.cl-home-v3 .cl-home-header__cta-play,
    body.cl-home-v3 .cl-home-header__cta-register {
        display: none !important;
    }
    /* Wallet pill toma todo el espacio sobrante para mostrar el monto entero */
    body.cl-home-v3 .cl-home-header__balance-pill {
        flex: 1 1 auto;
        min-width: 0;
        justify-content: flex-end;
        padding-right: 10px;
    }
    body.cl-home-v3 .cl-home-header__balance-pill .cl-balance-pill__amount {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }
    body.cl-home-v3 .cl-home-header__actions { gap: 6px; }
    /* Asegurar que el hamburger nunca se aplaste */
    body.cl-home-v3 .cl-home-header__hamburger { flex: 0 0 40px; }
}

/* Drawer overflow guard: el drawer es estrecho (88vw, max 360px). Apilamos
   las utilidades en columna y bloqueamos scroll horizontal para evitar la
   barra amarilla que aparecía con lang + install en la misma fila. */
.cl-drawer { overflow-x: hidden; }
.cl-drawer__utils {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 10px 0;
    margin: 0;
    border-top: 1px solid rgba(255,255,255,0.08);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    max-width: 100%;
}
.cl-drawer__lang {
    display: inline-flex;
    align-self: flex-start;
}
.cl-drawer__pwa {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
    padding: 10px 14px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 10px;
    color: var(--cl-color-text);
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cl-drawer__pwa span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* Auth gating del drawer: misma lógica que header (body[data-authed]) */
body[data-authed="true"] .cl-drawer__cta-login,
body[data-authed="true"] .cl-drawer__cta-register {
    display: none !important;
}
body:not([data-authed="true"]) .cl-drawer__cta-logout {
    display: none !important;
}

body.cl-home-v3 .cl-home-header__menu a:hover,
body.cl-home-v3 .cl-home-header__menu a:focus-visible {
    color: var(--cl-color-primary);
}

/* --------------------------------------------------------------------------
   4) KPI strip — horizontal icon+text layout per reference
   -------------------------------------------------------------------------- */
body.cl-home-v3 .cl-kpi-section {
    padding: 4px 24px;
    border-top: 1px solid rgba(140, 60, 220, 0.12);
    border-bottom: 1px solid rgba(140, 60, 220, 0.12);
}
body.cl-home-v3 .cl-kpi-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    align-items: center;
}
body.cl-home-v3 .cl-kpi {
    display: flex;
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 12px;
}
body.cl-home-v3 .cl-kpi__icon {
    width: 24px;
    height: 24px;
    color: var(--cl-color-primary);
    flex-shrink: 0;
}
body.cl-home-v3 .cl-kpi__text-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
body.cl-home-v3 .cl-kpi__value {
    font-size: 16px;
    font-weight: 800;
    color: var(--cl-color-text);
    letter-spacing: -0.01em;
    line-height: 1.1;
}
body.cl-home-v3 .cl-kpi__label {
    font-size: 12px;
    color: var(--cl-color-text-muted);
    letter-spacing: 0.02em;
}
@media (max-width: 768px) {
    body.cl-home-v3 .cl-kpi-strip { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    body.cl-home-v3 .cl-kpi__value { font-size: 18px; }
}

/* --------------------------------------------------------------------------
   5) Popular section — header título-izq + link-der, 4 cards uniform 240 alto
   -------------------------------------------------------------------------- */
body.cl-home-v3 .cl-popular {
    padding: 6px 24px 8px;
    background: transparent;
    border-top: 1px solid rgba(140, 60, 220, 0.12);
}
body.cl-home-v3 .cl-popular__head {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    text-align: left;
    gap: 16px;
    margin-bottom: 8px;
}
body.cl-home-v3 .cl-popular__main {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
}
body.cl-home-v3 .cl-popular__head-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
body.cl-home-v3 .cl-popular__title { font-size: 22px; font-weight: 800; margin: 0; }
body.cl-home-v3 .cl-popular__subtitle { margin: 0; font-size: 12px; display: none; }
body.cl-home-v3 .cl-popular__see-all {
    color: var(--cl-color-primary);
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    white-space: nowrap;
    padding: 4px 4px;
    border-radius: 4px;
    transition: opacity 200ms ease;
}
body.cl-home-v3 .cl-popular__see-all:hover,
body.cl-home-v3 .cl-popular__see-all:focus-visible { opacity: 0.8; text-decoration: underline; }
@media (max-width: 768px) {
    body.cl-home-v3 .cl-popular__head { flex-direction: row; align-items: center; justify-content: space-between; }
    body.cl-home-v3 .cl-popular__title { font-size: 24px; }
}

/* Grid: carousel wrapper (bordered) + bonus card (outside border).
   Desktop (>1024): 2-col grid — carousel container (4 cards inside) + bonus aside
   Tablet (769-1024): carousel container stacked above bonus
   Mobile (≤768): inherits cl-components.css scroll-snap carousel — DO NOT override here */
@media (min-width: 769px) {
    body.cl-home-v3 .cl-popular__grid {
        grid-template-columns: 1fr minmax(240px, 0.32fr);
        gap: 12px;
        align-items: stretch;
        padding: 0;
        border: none;
        background: none;
        box-shadow: none;
    }
    body.cl-home-v3 .cl-popular__carousel {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 10px;
        padding: 10px;
        border: 1px solid rgba(164, 95, 255, 0.35);
        border-radius: 14px;
        background: rgba(42, 14, 72, 0.35);
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), 0 0 20px rgba(135, 58, 220, 0.22);
        align-items: stretch;
        position: relative;
    }
    body.cl-home-v3 .cl-popular__grid > .cl-bonus-card {
        grid-column: 2 / 3;
        grid-row: 1 / 2;
        align-self: stretch;
    }
}
@media (min-width: 769px) and (max-width: 1024px) {
    body.cl-home-v3 .cl-popular__grid {
        grid-template-columns: 1fr;
    }
    body.cl-home-v3 .cl-popular__carousel {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
    body.cl-home-v3 .cl-popular__grid > .cl-bonus-card {
        grid-column: 1;
        grid-row: auto;
        align-self: auto;
    }
    body.cl-home-v3 .cl-popular__main {
        grid-column: 1;
    }
}
/* Mobile ≤768 reinforces scroll-snap carousel from cl-components.css so any
   future global change does not regress this contract. */
@media (max-width: 768px) {
    body.cl-home-v3 .cl-popular__carousel {
        display: flex;
        gap: 16px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 12px;
        -webkit-overflow-scrolling: touch;
        scroll-padding-inline: 16px;
        border: none;
        background: none;
        box-shadow: none;
        padding-top: 0;
        position: static;
    }
    body.cl-home-v3 .cl-popular__carousel > .cl-game-card {
        flex: 0 0 78%;
        scroll-snap-align: start;
        min-height: 240px;
    }
    body.cl-home-v3 .cl-popular__grid > .cl-bonus-card {
        width: 100%;
        grid-column: auto;
        grid-row: auto;
    }
}

/* Cards — 2-column grid: ball left | title+desc right, matching reference layout */
body.cl-home-v3 .cl-game-card {
    position: relative;
    min-height: 0;
    display: grid !important;
    flex-direction: unset !important;
    grid-template-columns: 60px 1fr;
    grid-template-rows: auto auto auto auto 1fr auto;
    grid-template-areas:
        "media title"
        "media desc"
        "label label"
        "countdown countdown"
        ".       .       "
        "cta     cta     ";
    column-gap: 12px;
    row-gap: 4px;
    padding: 18px 16px 14px;
    background: linear-gradient(180deg, #5A1D8F 0%, #3A125F 100%);
    border: 1px solid rgba(188, 112, 255, 0.35);
    border-radius: 14px;
    text-decoration: none;
    transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 -24px 32px rgba(0, 0, 0, 0.22), 0 8px 18px rgba(14, 4, 28, 0.45);
}
body.cl-home-v3 .cl-game-card::before { content: none !important; }
body.cl-home-v3 .cl-game-card:hover,
body.cl-home-v3 .cl-game-card:focus-within {
    transform: translateY(-3px);
    border-color: rgba(188, 112, 255, 0.55);
    box-shadow: 0 8px 28px rgba(80, 20, 160, 0.35);
}

body.cl-home-v3 .cl-game-card__media {
    grid-area: media;
    width: 60px;
    height: 60px;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    align-self: start;
    background: none;
    box-shadow: none;
    overflow: visible;
}
body.cl-home-v3 .cl-game-card__media:has(.cl-game-card__ball) {
    background: radial-gradient(circle at 38% 28%, rgba(255,255,255,0.55) 0%, rgba(180,180,200,0.3) 25%, rgba(40,40,60,0.8) 60%, rgba(10,10,20,0.95) 100%);
    box-shadow:
        0 6px 16px rgba(0, 0, 0, 0.5),
        inset -4px -6px 10px rgba(0, 0, 0, 0.4),
        inset 6px 8px 12px rgba(255, 255, 255, 0.15);
}
body.cl-home-v3 .cl-game-card[data-lottery-id="balotin"] .cl-game-card__media {
    background: radial-gradient(circle at 38% 28%, rgba(255,255,255,0.5) 0%, #4ade80 25%, #22c55e 55%, #166534 100%);
    box-shadow:
        0 6px 16px rgba(0, 0, 0, 0.5),
        inset -4px -6px 10px rgba(0, 0, 0, 0.4),
        inset 6px 8px 12px rgba(255, 255, 255, 0.15);
}
body.cl-home-v3 .cl-game-card[data-cl-pixel-name="popular_lucky"] .cl-game-card__media {
    background: radial-gradient(circle at 38% 28%, rgba(255,255,255,0.5) 0%, #fbbf24 25%, #f59e0b 55%, #92400e 100%);
    box-shadow:
        0 6px 16px rgba(0, 0, 0, 0.5),
        inset -4px -6px 10px rgba(0, 0, 0, 0.4),
        inset 6px 8px 12px rgba(255, 255, 255, 0.15);
}
body.cl-home-v3 .cl-game-card__logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    display: block;
    border-radius: 50%;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}
body.cl-home-v3 .cl-game-card__media .cl-icon { color: #fff; width: 22px; height: 22px; }
body.cl-home-v3 .cl-game-card__ball {
    color: #fff;
    font-family: var(--cl-font-family-sans);
    font-weight: 800;
    font-size: 24px;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: -0.02em;
}

/* Title — grid area, right of ball */
body.cl-home-v3 .cl-game-card__title {
    grid-area: title;
    font-size: 15px;
    font-weight: 700;
    color: var(--cl-color-text);
    margin: 0;
    letter-spacing: -0.005em;
    align-self: end;
}

/* Description — grid area, right of ball */
body.cl-home-v3 .cl-game-card__desc {
    grid-area: desc;
    font-size: 12px;
    color: var(--cl-color-text-muted);
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    align-self: start;
}

/* Draw label — centered below ball+text block */
body.cl-home-v3 .cl-game-card__draw-label {
    grid-area: label;
    font-size: 11px;
    text-transform: none;
    letter-spacing: 0;
    color: rgba(255, 255, 255, 0.72);
    margin-top: 10px;
    text-align: center;
    justify-self: center;
}

/* Countdown — centered, prominent */
body.cl-home-v3 .cl-game-card__countdown {
    grid-area: countdown;
    min-height: 0;
    text-align: center;
    justify-self: center;
}
body.cl-home-v3 .cl-game-card__countdown:not(:empty) {
    display: flex;
    gap: 4px;
    align-items: baseline;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: #F4C542;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
}

/* Meta — hidden por defecto */
body.cl-home-v3 .cl-game-card__meta {
    display: none;
}

/* ==========================================================================
   Card Keno (cl-popular-card--keno) — Popular games
   --------------------------------------------------------------------------
   Reusa el grid base de .cl-game-card. Diferencias:
   - La media es la imagen de la moneda Keno (no la esfera con gradiente).
   - La card entera es focusable y clickable (role=button + tabindex=0).
   - Sin countdown, jackpot ni meta — solo título, descripción y CTA.
   El click se maneja en js/home-redesign.js con gate de auth explícito.
   ========================================================================== */
body.cl-home-v3 .cl-popular-card--keno {
    cursor: pointer;
}
body.cl-home-v3 .cl-popular-card--keno .cl-game-card__media {
    background: none !important;
    box-shadow: none !important;
}
body.cl-home-v3 .cl-popular-card--keno__img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}
body.cl-home-v3 .cl-popular-card--keno:focus-visible {
    outline: 2px solid #FFD700;
    outline-offset: 2px;
}
@media (max-width: 768px) {
    body.cl-home-v3 .cl-popular__carousel > .cl-popular-card--keno {
        flex: 0 0 78%;
        scroll-snap-align: start;
        min-height: 240px;
    }
}

/* ==========================================================================
   Cards populares MM / PB (cl-popular-card--intl)
   --------------------------------------------------------------------------
   Estructura:
     .cl-popular-card__head      (logo + título + descripción, fila)
     .cl-popular-card__jackpot-block (monto $XXM grande dorado + label)
     .cl-popular-card__timing    (filas Próximo sorteo / Cierre con icono)
     .cl-game-card__cta          (botón Jugar ahora)
   Datos vienen de window.internationalLotteries.lotteryGames vía
   js/popular-cards-countdown-adapter.js (formatDrawingTime / getCutoffCountdown).
   ========================================================================== */
body.cl-home-v3 .cl-popular-card--intl {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    grid-template-rows: none !important;
    grid-template-areas: none !important;
    gap: 10px;
    padding: 16px 14px 14px;
    text-align: center;
}
body.cl-home-v3 .cl-popular-card--intl .cl-popular-card__head {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    text-align: left;
    width: 100%;
    min-width: 0;
}
body.cl-home-v3 .cl-popular-card--intl .cl-popular-card__head .cl-game-card__media {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    align-self: center;
}
body.cl-home-v3 .cl-popular-card--intl .cl-popular-card__head .cl-game-card__logo {
    width: 48px;
    height: 48px;
}
body.cl-home-v3 .cl-popular-card--intl .cl-popular-card__head-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1 1 auto;
}
body.cl-home-v3 .cl-popular-card--intl .cl-game-card__title {
    grid-area: auto;
    align-self: auto;
    font-size: 15px;
    line-height: 1.15;
    margin: 0;
}
body.cl-home-v3 .cl-popular-card--intl .cl-game-card__desc {
    grid-area: auto;
    align-self: auto;
    font-size: 12px;
    line-height: 1.35;
    margin: 0;
}

/* Bloque del jackpot — centrado, dorado, prominente. */
body.cl-home-v3 .cl-popular-card--intl .cl-popular-card__jackpot-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 100%;
    padding: 10px 8px;
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(244, 197, 66, 0.28);
    border-radius: 12px;
    box-sizing: border-box;
}
body.cl-home-v3 .cl-popular-card--intl .cl-popular-card__jackpot-value {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.1;
    color: #F4C542;
    background: linear-gradient(180deg, #F8D766 0%, #D7A73A 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
    white-space: nowrap;
    letter-spacing: -0.01em;
}
body.cl-home-v3 .cl-popular-card--intl .cl-popular-card__jackpot-label {
    font-size: 10px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-align: center;
}

/* Timing rows — icono + label + valor. */
body.cl-home-v3 .cl-popular-card--intl .cl-popular-card__timing {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}
body.cl-home-v3 .cl-popular-card--intl .cl-popular-card__timing-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.3;
    flex-wrap: wrap;
}
body.cl-home-v3 .cl-popular-card--intl .cl-popular-card__timing-icon,
body.cl-home-v3 .cl-popular-card--intl .cl-popular-card__timing-row svg {
    width: 14px;
    height: 14px;
    color: rgba(255, 255, 255, 0.55);
    flex-shrink: 0;
}
body.cl-home-v3 .cl-popular-card--intl .cl-popular-card__timing-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    white-space: nowrap;
}
body.cl-home-v3 .cl-popular-card--intl .cl-popular-card__timing-value {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* CTA del card MM/PB ocupa el ancho. */
body.cl-home-v3 .cl-popular-card--intl .cl-game-card__cta {
    grid-area: auto;
    margin-top: 4px;
    width: 100%;
}

/* Balotín mantiene el countdown HH:MM:SS con tipografía estable. */
body.cl-home-v3 .cl-popular .cl-game-card[data-lottery-id="balotin"] .cl-game-card__countdown {
    font-size: 18px;
    line-height: 1.25;
    padding: 2px 4px 0;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    white-space: nowrap;
}

/* CTA — gold outline button matching reference */
body.cl-home-v3 .cl-game-card__cta {
    grid-area: cta;
    width: 100%;
    margin-top: 4px;
    padding: 8px 12px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1.5px solid #D7A73A;
    color: #F4C542;
    font-weight: 600;
    font-size: 13px;
    border-radius: 10px;
    cursor: pointer;
    box-sizing: border-box;
    line-height: 1.2;
    min-height: 36px;
    text-transform: none !important;
    letter-spacing: 0;
    text-decoration: none !important;
    box-shadow: none;
    transition: transform 200ms ease, background 200ms ease;
}
body.cl-home-v3 .cl-game-card__cta:hover,
body.cl-home-v3 .cl-game-card__cta:focus-visible {
    transform: translateY(-1px);
    background: rgba(244, 197, 66, 0.12);
    box-shadow: none;
}

/* Bonus card — gift box illustration on right, content on left */
body.cl-home-v3 .cl-bonus-card {
    padding: 0 !important;
    gap: 0 !important;
    min-height: 0 !important;
    align-self: stretch !important;
    display: flex !important;
    align-items: stretch;
    background:
        linear-gradient(90deg, #3A125F 0%, rgba(58, 18, 95, 0.85) 35%, rgba(58, 18, 95, 0.1) 55%, rgba(58, 18, 95, 0) 70%),
        url('/imagenes/redesign/bonus-bg.png') right center / auto 100% no-repeat,
        linear-gradient(180deg, #5A1D8F 0%, #3A125F 100%);
    background-color: #3A125F;
    border: 1px solid rgba(188, 112, 255, 0.35);
    border-radius: 14px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 8px 18px rgba(14, 4, 28, 0.45);
    overflow: hidden;
    position: relative;
}
body.cl-home-v3 .cl-bonus-card__content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    text-align: left;
    gap: 10px;
    padding: 22px 18px;
    width: 70%;
    max-width: 70%;
    position: relative;
    z-index: 1;
}
body.cl-home-v3 .cl-bonus-card__title {
    font-size: 20px;
    font-weight: 800;
    margin: 0;
    color: #fff;
    line-height: 1.2;
    text-align: left;
}
body.cl-home-v3 .cl-bonus-card__copy {
    font-size: 13px;
    line-height: 1.45;
    margin: 0;
    color: rgba(255, 255, 255, 0.92);
    text-align: left;
}
body.cl-home-v3 .cl-bonus-card__amount {
    color: #F4C542;
    font-weight: 800;
    white-space: nowrap;
}
body.cl-home-v3 .cl-bonus-card__cta {
    padding: 10px 18px;
    font-size: 14px;
    border-radius: 10px;
    margin-top: 4px;
    background: linear-gradient(180deg, #F4C542 0%, #D7A73A 100%);
    border: none;
    color: #2A0E48;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.35);
    transition: transform 150ms ease, box-shadow 150ms ease;
}
body.cl-home-v3 .cl-bonus-card__cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(212, 175, 55, 0.45);
}
@media (max-width: 768px) {
    body.cl-home-v3 .cl-bonus-card {
        background-position: right -40px center;
    }
    body.cl-home-v3 .cl-bonus-card__content {
        width: 65%;
        max-width: 65%;
    }
}

/* --------------------------------------------------------------------------
   6) Benefits strip — refined
   -------------------------------------------------------------------------- */
body.cl-home-v3 .cl-benefits {
    padding: 16px 24px 20px;
    background: transparent;
    border-top: none;
}
body.cl-home-v3 .cl-benefits__inner {
    max-width: var(--cl-container-max-wide, 1440px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    background: linear-gradient(168deg, rgba(45, 17, 80, 0.75) 0%, rgba(26, 10, 46, 0.85) 100%);
    border: 1px solid rgba(140, 60, 220, 0.15);
    border-radius: 14px;
    padding: 16px 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}
body.cl-home-v3 .cl-benefit {
    text-align: left;
    padding: 6px 12px;
    display: grid;
    grid-template-columns: 28px 1fr;
    grid-template-rows: auto auto;
    gap: 1px 10px;
    align-items: start;
    position: relative;
}
body.cl-home-v3 .cl-benefit + .cl-benefit::before {
    content: '';
    position: absolute;
    left: 0;
    top: 15%;
    bottom: 15%;
    width: 1px;
    background: rgba(140, 60, 220, 0.2);
}
body.cl-home-v3 .cl-benefit__icon {
    width: 28px;
    height: 28px;
    color: var(--cl-color-primary);
    grid-row: 1 / -1;
    display: block;
    margin-top: 2px;
}
body.cl-home-v3 .cl-benefit__title { font-size: 14px; font-weight: 700; margin: 0; color: var(--cl-color-text); grid-column: 2; }
body.cl-home-v3 .cl-benefit__desc  { font-size: 12px; color: var(--cl-color-text-muted); margin: 0; line-height: 1.4; grid-column: 2; }
@media (max-width: 768px) {
    body.cl-home-v3 .cl-benefits__inner { grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 16px; }
    body.cl-home-v3 .cl-benefit { grid-template-columns: 24px 1fr; gap: 2px 8px; }
    body.cl-home-v3 .cl-benefit__icon { width: 24px; height: 24px; }
    body.cl-home-v3 .cl-benefit + .cl-benefit::before { display: none; }
}

/* --------------------------------------------------------------------------
   7) Footer — casino-app multi-column con jerarquía clara
       · Columna 1: marca + tagline + social
       · Columna 2/3/4: Juegos · Información · Legal
       · Trust strip: badges de licencias + 18+ + soporte crypto
       · Subfooter: copyright + disclaimer LuckyStreak/MGA
   -------------------------------------------------------------------------- */
body.cl-home-v3 .cl-home-footer--casino {
    background:
        radial-gradient(1200px 300px at 50% -50px, rgba(140, 60, 220, 0.18), transparent 60%),
        linear-gradient(180deg, #160630 0%, #0d0420 100%);
    border-top: 1px solid rgba(140, 60, 220, 0.22);
    padding: 48px 24px 24px;
    color: var(--cl-color-text-muted);
    position: relative;
}
body.cl-home-v3 .cl-home-footer--casino::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 215, 0, 0.0) 10%,
        rgba(255, 215, 0, 0.55) 50%,
        rgba(255, 215, 0, 0.0) 90%,
        transparent 100%);
}
body.cl-home-v3 .cl-home-footer--casino .cl-home-footer__inner {
    max-width: var(--cl-container-max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1.1fr;
    gap: 40px;
    align-items: start;
}

/* Columnas */
body.cl-home-v3 .cl-home-footer__col {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}
body.cl-home-v3 .cl-home-footer__col--brand { gap: 16px; }

/* Marca */
body.cl-home-v3 .cl-home-footer--casino .cl-home-footer__brand {
    display: inline-flex;
    align-items: center;
    margin: -12px 0 0;
}
body.cl-home-v3 .cl-home-footer--casino .cl-home-footer__brand {
    margin: -24px 0 -8px;
}
body.cl-home-v3 .cl-home-footer--casino .cl-home-footer__brand img {
    height: 128px;
    width: auto;
    max-width: 320px;
    display: block;
    object-fit: contain;
}
body.cl-home-v3 .cl-home-footer__tagline {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.65);
    max-width: 280px;
}

/* Headings de columna */
body.cl-home-v3 .cl-home-footer__heading {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--cl-color-primary, #FFD700);
    margin: 0 0 4px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(140, 60, 220, 0.22);
}

/* Listas de links */
body.cl-home-v3 .cl-home-footer__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
body.cl-home-v3 .cl-home-footer__list a,
body.cl-home-v3 .cl-home-footer__list button {
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    font-size: 13.5px;
    line-height: 1.5;
    transition: color 0.15s ease, transform 0.15s ease;
    background: transparent;
    border: 0;
    padding: 0;
    font: inherit;
    cursor: pointer;
    text-align: left;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
body.cl-home-v3 .cl-home-footer__list a:hover,
body.cl-home-v3 .cl-home-footer__list button:hover {
    color: var(--cl-color-primary, #FFD700);
    transform: translateX(2px);
}
body.cl-home-v3 .cl-home-footer__rg-btn .cl-icon { color: var(--cl-color-primary, #FFD700); }

/* Social */
body.cl-home-v3 .cl-home-footer--casino .cl-home-footer__social {
    display: inline-flex;
    gap: 10px;
}
body.cl-home-v3 .cl-home-footer--casino .cl-home-footer__social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(140, 60, 220, 0.35);
    background: rgba(60, 20, 100, 0.25);
    color: rgba(255, 255, 255, 0.85);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
body.cl-home-v3 .cl-home-footer--casino .cl-home-footer__social a:hover {
    background: rgba(255, 215, 0, 0.15);
    border-color: rgba(255, 215, 0, 0.6);
    color: var(--cl-color-primary, #FFD700);
    transform: translateY(-2px);
}

/* Trust strip */
body.cl-home-v3 .cl-home-footer__trust {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid rgba(140, 60, 220, 0.18);
}
body.cl-home-v3 .cl-home-footer__trust-inner {
    max-width: var(--cl-container-max);
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px 14px;
}
body.cl-home-v3 .cl-home-footer__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(60, 20, 100, 0.35);
    border: 1px solid rgba(140, 60, 220, 0.28);
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1;
}
body.cl-home-v3 .cl-home-footer__badge strong {
    color: var(--cl-color-primary, #FFD700);
    font-weight: 700;
}
body.cl-home-v3 .cl-home-footer__badge--age {
    background: rgba(220, 60, 60, 0.18);
    border-color: rgba(220, 60, 60, 0.4);
    color: #ffb4b4;
}
body.cl-home-v3 .cl-home-footer__badge--age .cl-icon { color: #ff8a8a; }
body.cl-home-v3 .cl-home-footer__badge--crypto .cl-icon { color: #ffb84d; }

/* Subfooter */
body.cl-home-v3 .cl-home-subfooter {
    padding: 14px 24px;
    background: #07021a;
    border-top: 1px solid rgba(140, 60, 220, 0.12);
}
body.cl-home-v3 .cl-home-subfooter__inner {
    max-width: var(--cl-container-max);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 24px;
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.5;
}
body.cl-home-v3 .cl-home-subfooter__copy { font-weight: 500; color: rgba(255, 255, 255, 0.7); }
body.cl-home-v3 .cl-home-subfooter__licenses { flex: 1 1 auto; max-width: 760px; text-align: right; }
body.cl-home-v3 .cl-home-subfooter strong { color: rgba(255, 215, 0, 0.85); font-weight: 600; }

/* Tablet */
@media (max-width: 960px) {
    body.cl-home-v3 .cl-home-footer--casino .cl-home-footer__inner {
        grid-template-columns: 1fr 1fr;
        gap: 32px 24px;
    }
    body.cl-home-v3 .cl-home-footer__col--brand { grid-column: 1 / -1; }
    body.cl-home-v3 .cl-home-subfooter__licenses { text-align: left; }
}

/* Mobile */
@media (max-width: 600px) {
    body.cl-home-v3 .cl-home-footer--casino { padding: 36px 18px 20px; }
    body.cl-home-v3 .cl-home-footer--casino .cl-home-footer__inner {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    body.cl-home-v3 .cl-home-footer--casino .cl-home-footer__brand img {
        height: 96px;
        max-width: 240px;
    }
    body.cl-home-v3 .cl-home-footer__heading { font-size: 11px; }
    body.cl-home-v3 .cl-home-footer__list a,
    body.cl-home-v3 .cl-home-footer__list button { font-size: 14px; }
    body.cl-home-v3 .cl-home-footer__trust-inner { gap: 8px; }
    body.cl-home-v3 .cl-home-footer__badge { font-size: 11.5px; padding: 7px 11px; }
    body.cl-home-v3 .cl-home-subfooter__inner { justify-content: center; text-align: center; }
    body.cl-home-v3 .cl-home-subfooter__licenses { text-align: center; }
}

/* --------------------------------------------------------------------------
   8) Microinteractions — focus-visible accessible gold ring everywhere
   -------------------------------------------------------------------------- */
body.cl-home-v3 a:focus-visible,
body.cl-home-v3 button:focus-visible {
    outline: 2px solid var(--cl-color-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

/* --------------------------------------------------------------------------
   8b) Mobile drawer — purple theme
   -------------------------------------------------------------------------- */
body.cl-home-v3 .cl-drawer {
    background: linear-gradient(180deg, #2d1150 0%, #1a0a2e 100%);
    border-left: 1px solid rgba(140, 60, 220, 0.2);
}

/* --------------------------------------------------------------------------
   9) Hide legacy decorations that the redesign supersedes (scoped to home v3)
   -------------------------------------------------------------------------- */
body.cl-home-v3 .home__moneda { display: none; }
body.cl-home-v3 .promo::before { background: none; opacity: 0; }
/* #balotin: visible in home v3 (auth-system manages buy gating).
   Section was hidden during initial redesign; restored so logged-in users
   see Lotería Blockchain (Balotín USDT/SPS) below Casino SPS. */
body.cl-home-v3 .pre-footer-stats { display: none; }
/* Bonos SPS section: removed from home v3 (legacy "Próximamente" placeholder). */
body.cl-home-v3 #Bonuses { display: none !important; }

/* --------------------------------------------------------------------------
   10) Hero — floating gold coins (Task #67)
   -------------------------------------------------------------------------- */
body.cl-home-v3 .cl-home-hero {
    overflow-x: clip;
}
body.cl-home-v3 .cl-home-hero__art {
    overflow: visible;
}
body.cl-home-v3 .cl-hero-coin {
    display: none;
}
body.cl-home-v3 .cl-hero-coin::after {
    content: '$';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    color: rgba(26,10,46,0.5);
    line-height: 1;
}
body.cl-home-v3 .cl-hero-coin--1 { top: 8%; left: 6%; width: 28px; height: 28px; animation-delay: 0s; animation-duration: 3.5s; }
body.cl-home-v3 .cl-hero-coin--1::after { font-size: 12px; }
body.cl-home-v3 .cl-hero-coin--2 { top: 55%; left: 2%; width: 36px; height: 36px; animation-delay: -1.2s; animation-duration: 4.2s; opacity: 0.6; }
body.cl-home-v3 .cl-hero-coin--2::after { font-size: 16px; }
body.cl-home-v3 .cl-hero-coin--3 { bottom: 12%; right: 4%; width: 24px; height: 24px; animation-delay: -2s; animation-duration: 3.8s; opacity: 0.55; }
body.cl-home-v3 .cl-hero-coin--3::after { font-size: 11px; }
body.cl-home-v3 .cl-hero-coin--4 { top: 18%; right: 2%; width: 30px; height: 30px; animation-delay: -0.8s; animation-duration: 4.5s; opacity: 0.65; }
body.cl-home-v3 .cl-hero-coin--4::after { font-size: 13px; }
body.cl-home-v3 .cl-hero-coin--5 { bottom: 30%; left: 12%; width: 22px; height: 22px; animation-delay: -2.5s; animation-duration: 3.2s; opacity: 0.5; }
body.cl-home-v3 .cl-hero-coin--5::after { font-size: 10px; }

@keyframes cl-coin-float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(8deg); }
}
@media (prefers-reduced-motion: reduce) {
    body.cl-home-v3 .cl-hero-coin { animation: none; }
}
@media (max-width: 768px) {
    body.cl-home-v3 .cl-hero-coin--4,
    body.cl-home-v3 .cl-hero-coin--5 { display: none; }
    body.cl-home-v3 .cl-hero-coin--1 { top: 5%; left: 4%; }
    body.cl-home-v3 .cl-hero-coin--2 { top: 60%; left: 2%; width: 28px; height: 28px; }
    body.cl-home-v3 .cl-hero-coin--2::after { font-size: 12px; }
    body.cl-home-v3 .cl-hero-coin--3 { bottom: 8%; right: 8%; }
}


/* --------------------------------------------------------------------------
   13) KPI strip — card wrapper with separators (Task #67)
   -------------------------------------------------------------------------- */
body.cl-home-v3 .cl-kpi-strip {
    background: linear-gradient(135deg, rgba(60, 20, 100, 0.5) 0%, rgba(45, 17, 80, 0.4) 100%);
    border: 1px solid rgba(140, 60, 220, 0.18);
    border-radius: 12px;
    padding: 8px 16px;
}
body.cl-home-v3 .cl-kpi {
    position: relative;
    background: linear-gradient(135deg, rgba(80, 30, 130, 0.3) 0%, rgba(50, 18, 90, 0.2) 100%);
    border-radius: 10px;
    padding: 8px 12px;
}
body.cl-home-v3 .cl-kpi:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -12px;
    top: 10%;
    height: 80%;
    width: 1px;
    background: rgba(140, 60, 220, 0.2);
}
@media (max-width: 768px) {
    body.cl-home-v3 .cl-kpi:not(:last-child)::after { display: none; }
    body.cl-home-v3 .cl-kpi-strip { padding: 16px 12px; }
}


/* --------------------------------------------------------------------------
   14) Hero "Loterías" tabs — Mega Millions / Powerball (Task #83)
   -------------------------------------------------------------------------- */
body.cl-home-v3 .cl-jackpot-card--lotteries .cl-jackpot-card__header--lotteries {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 0;
}
body.cl-home-v3 .cl-jackpot-card--lotteries .cl-jackpot-card__title {
    font-size: 14px;
    font-weight: 700;
    color: rgba(255,255,255,0.85);
    text-transform: none;
    letter-spacing: 0;
}
body.cl-home-v3 .cl-jackpot-card__lottery-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border-bottom: 1px solid rgba(140, 60, 220, 0.28);
    margin-bottom: 6px;
}
body.cl-home-v3 .cl-jackpot-lottery-tab {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: rgba(255,255,255,0.55);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    padding: 10px 6px;
    cursor: pointer;
    transition: color 200ms ease, border-color 200ms ease, opacity 200ms ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0.65;
}
body.cl-home-v3 .cl-jackpot-lottery-tab__logo {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    background: #fff;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.18), 0 2px 6px rgba(0,0,0,0.35);
    flex-shrink: 0;
    transition: transform 200ms ease, box-shadow 200ms ease;
}
body.cl-home-v3 .cl-jackpot-lottery-tab:hover {
    color: rgba(255,255,255,0.9);
    opacity: 1;
}
body.cl-home-v3 .cl-jackpot-lottery-tab[aria-selected="true"] .cl-jackpot-lottery-tab__logo {
    box-shadow: 0 0 0 1px var(--cl-color-primary), 0 2px 8px rgba(255, 215, 0, 0.45);
    transform: scale(1.05);
}
body.cl-home-v3 .cl-jackpot-lottery-tab[aria-selected="true"] {
    color: var(--cl-color-primary);
    border-bottom-color: var(--cl-color-primary);
    opacity: 1;
}
body.cl-home-v3 .cl-jackpot-lottery-tab:focus-visible {
    outline: 2px solid var(--cl-color-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

/* --------------------------------------------------------------------------
   15) Mobile reorder — KPI strip glued under the jackpot card (Task #83)
   En mobile, las columnas del hero (copy / art / jackpot-col) y el bloque
   de KPIs viven en contenedores distintos (.cl-home-hero__inner vs
   .cl-hero-kpi-overlay). Para poder reordenarlos juntos sin tocar el HTML,
   convertimos el inner a `display: contents` y el hero a flex-column en
   mobile, y luego asignamos `order` para dejar: copy → jackpot → KPIs → art.
   Breakpoint estricto < 768 px para no tocar el layout horizontal de la
   tira de KPIs en tablet (768–1024 px) ni en desktop.
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
    body.cl-home-v3 .cl-home-hero {
        display: flex;
        flex-direction: column;
    }
    body.cl-home-v3 .cl-home-hero__inner {
        display: contents;
    }
    body.cl-home-v3 .cl-home-hero__copy { order: 1; }
    body.cl-home-v3 .cl-home-hero__jackpot-col {
        order: 2;
        padding-top: 8px;
        justify-content: center;
    }
    body.cl-home-v3 .cl-home-hero__jackpot-col > .cl-jackpot-card {
        max-width: 100%;
    }
    body.cl-home-v3 .cl-home-hero__art { order: 4; }

    /* KPI strip portaled OUT of the hero on mobile (js/kpi-mobile-portal.js)
       y aterriza justo antes de .cl-benefits → queda al final del scroll,
       sobre el footer. En desktop el portal restaura el nodo al hero y
       este bloque no aplica. */
    body.cl-home-v3 .cl-hero-kpi-overlay--portaled {
        margin: 24px auto 16px;
        padding: 0 16px;
        max-width: var(--cl-container-max, 1200px);
        width: 100%;
        box-sizing: border-box;
    }
}

/* --------------------------------------------------------------------------
   16) Balotín — toggle USDT/SPS encima de las cards (Task #83)
   Reemplaza al toggle USDT/SPS que vivía en el hero. Reusa el look del
   pill toggle anterior (gold-bordered pill con segmento activo dorado).
   -------------------------------------------------------------------------- */
.balotin-currency-toggle {
    display: inline-flex;
    margin: 0 auto 24px;
    background: rgba(20, 8, 40, 0.6);
    border: 1px solid rgba(255, 215, 0, 0.35);
    border-radius: 999px;
    padding: 4px;
    gap: 4px;
    width: max-content;
    max-width: 100%;
}
.balotin-currency-toggle__btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 8px 18px;
    border-radius: 999px;
    cursor: pointer;
    transition: background 200ms ease, color 200ms ease, box-shadow 200ms ease;
    white-space: nowrap;
}
.balotin-currency-toggle__btn:hover {
    color: #fff;
}
.balotin-currency-toggle__btn[aria-selected="true"] {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #1a0a2e;
    box-shadow: 0 4px 12px rgba(255, 165, 0, 0.35);
}
.balotin-currency-toggle__btn:focus-visible {
    outline: 2px solid #FFD700;
    outline-offset: 2px;
}
/* Center the toggle row above the .balotin-container grid. */
#balotin .balotin-currency-toggle {
    display: flex;
    margin-left: auto;
    margin-right: auto;
}
@media (max-width: 480px) {
    .balotin-currency-toggle__btn {
        padding: 8px 14px;
        font-size: 12px;
    }
}

/* ============================================================
   GOOGLE ADS COMPLIANCE DISCLAIMERS (Task #88)
   Small, accessible legal copy with ≥4.5:1 contrast on purple bg.
   ============================================================ */
.cl-responsible-note {
    margin: 12px 0 0;
    font-size: 13px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    letter-spacing: 0.01em;
}
.cl-disclaimer-small {
    display: block;
    margin-top: 8px;
    font-size: 11px;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.78);
    font-weight: 400;
}
.cl-disclaimer-small a {
    color: #FFD700;
    text-decoration: underline;
}
.cl-disclaimer-small a:hover {
    color: #FFA500;
}
.toast-winner-disclaimer {
    display: block;
    margin-top: 4px;
    font-size: 10px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.72);
    font-weight: 400;
    max-width: 220px;
}
.cl-bonus-terms {
    margin: 10px 0 0;
}
.cl-bonus-terms a {
    color: #FFD700;
}
.cl-odds-note {
    margin: 10px 0 0;
    text-align: center;
}
.cl-jurisdiction-note {
    display: block;
    margin-top: 6px;
    font-size: 11px;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.78);
}
@media (max-width: 768px) {
    .cl-responsible-note { font-size: 12px; }
    .toast-winner-disclaimer { font-size: 9px; max-width: 180px; }
}
